#!/usr/bin/env python3
"""Verify the 0.1.R first-pass skill taxonomy 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: [
        "## First-Pass Skill Taxonomy",
        "Survival:",
        "Gathering:",
        "Tool use:",
        "Crafting:",
        "Fire:",
        "Shelter:",
        "Navigation:",
        "First aid:",
        "Food safety:",
        "Weather awareness:",
        "skills are not unlock gates",
    ],
    ROADMAP: [
        "[x] Add a first-pass skill taxonomy for survival, gathering, tool use, crafting, fire, shelter, navigation, first aid, food safety, and weather awareness.",
    ],
}


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: first-pass skill taxonomy is documented.")


if __name__ == "__main__":
    main()
