Define subject content format

This commit is contained in:
2026-05-19 15:42:55 -07:00
parent 8e33068d01
commit 7b1f9b81c0
3 changed files with 76 additions and 1 deletions
+43
View File
@@ -0,0 +1,43 @@
#!/usr/bin/env python3
"""Verify the first subject content format is documented."""
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
DOC = ROOT / "Docs" / "KnowledgeAndSkillFoundation.md"
ROADMAP = ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md"
REQUIRED = {
DOC: [
"## Subject Content Format",
"`topic`",
"`concepts`",
"`difficulty_tier`",
"`prerequisite_concepts`",
"`in_game_effect`",
"`practice_action`",
"`source_note`",
"topic: fire.clearance",
"Format rule:",
],
ROADMAP: [
"[x] Define the first subject content format: topic, concepts, difficulty tier, prerequisite concepts, in-game effect, practice action, and source note.",
],
}
def main() -> None:
missing: list[str] = []
for path, snippets in REQUIRED.items():
text = path.read_text(encoding="utf-8")
for snippet in snippets:
if snippet not in text:
missing.append(f"{path.relative_to(ROOT)} missing {snippet!r}")
if missing:
raise SystemExit("FAILED: " + "; ".join(missing))
print("OK: subject content format is documented.")
if __name__ == "__main__":
main()