refactor(data): restructure content directory for galaxy scale

Replace flat content/districts/ with hierarchical campaign/system/
station/district structure. Path mirrors canonical IDs, enables
glob-based discovery, and is multi-campaign/DLC ready.

- git mv 46 files preserving history
- New metadata: campaign.yaml, system.yaml, station.yaml
- Rewrite content.yaml with glob-based district discovery
- Add campaign, system, station JSON schemas
- Update district schema: hierarchy fields derived from path
- Update npc-profile schema: accept district-scoped IDs
- Add TODO to 17 dialogue/monologue pool files for generator revision
- Update _meta/README.md with new hierarchy documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-12 21:22:23 +01:00
co-authored by Claude Opus 4.6
parent 8cd7ef21ae
commit 9d53869ca7
73 changed files with 196 additions and 36 deletions
+22
View File
@@ -0,0 +1,22 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "campaign.schema.json",
"title": "Campaign Metadata",
"description": "Campaign definition file — one per campaign directory (D-003).",
"type": "object",
"required": ["display_name", "description"],
"additionalProperties": false,
"properties": {
"display_name": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string"
},
"version": {
"type": "string",
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
}
}
}
+9 -6
View File
@@ -2,15 +2,15 @@
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "district.schema.json",
"title": "District Metadata",
"description": "District definition file — one per district directory (D-036).",
"description": "District definition file — one per district directory (D-036). Identity derived from directory path.",
"type": "object",
"required": ["display_name", "system", "station", "district", "description", "locations", "npc_count"],
"required": ["display_name", "description", "locations", "npc_count"],
"additionalProperties": false,
"properties": {
"canonical_id": {
"type": "string",
"pattern": "^[a-z]+\\.[a-z]+\\.[a-z-]+$",
"description": "Optional — derived from directory path at load time. If present, must match {system}.{station}.{district}."
"description": "Deprecated — derived from directory path at load time. If present, must match {system}.{station}.{district}."
},
"display_name": {
"type": "string",
@@ -18,15 +18,18 @@
},
"system": {
"type": "string",
"pattern": "^[a-z]+$"
"pattern": "^[a-z]+$",
"description": "Deprecated — derived from directory path."
},
"station": {
"type": "string",
"pattern": "^[a-z]+$"
"pattern": "^[a-z]+$",
"description": "Deprecated — derived from directory path."
},
"district": {
"type": "string",
"pattern": "^[a-z-]+$"
"pattern": "^[a-z-]+$",
"description": "Deprecated — derived from directory path."
},
"description": {
"type": "string",
+3 -3
View File
@@ -9,8 +9,8 @@
"properties": {
"canonical_id": {
"type": "string",
"pattern": "^npc:[a-z][a-z0-9-]*$",
"description": "Short-form canonical ID: npc:{slug}"
"pattern": "^npc:([a-z][a-z0-9-]+\\.)?[a-z][a-z0-9-]*$",
"description": "Canonical ID: npc:{slug} (within district) or npc:{district}.{slug} (cross-district)"
},
"display_name": {
"type": "string",
@@ -167,7 +167,7 @@
"properties": {
"target": {
"type": "string",
"pattern": "^npc:[a-z][a-z0-9-]*$"
"pattern": "^npc:([a-z][a-z0-9-]+\\.)?[a-z][a-z0-9-]*$"
},
"kind": {
"type": "string",
+26
View File
@@ -0,0 +1,26 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "station.schema.json",
"title": "Station Metadata",
"description": "Station definition file — one per station directory (D-036).",
"type": "object",
"required": ["display_name"],
"additionalProperties": false,
"properties": {
"display_name": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string"
},
"districts": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]*$"
},
"uniqueItems": true
}
}
}
+26
View File
@@ -0,0 +1,26 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "system.schema.json",
"title": "Star System Metadata",
"description": "System definition file — one per system directory (D-036).",
"type": "object",
"required": ["display_name"],
"additionalProperties": false,
"properties": {
"display_name": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string"
},
"stations": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]*$"
},
"uniqueItems": true
}
}
}