test_skills_footprint.py python
66 lines 2.8 KB
Raw
sha256:a78e7e5a8740e03315f325d19edeb3aa1b306b3337d04abbaa9a9e0f3bbeb7a1 docs: MuseHub-first before ISR #74 — staging solidify NEXT Human 2 days ago
1 """Unit tests — overseer skills ship in vendored footprint."""
2
3 from __future__ import annotations
4
5 from cli.footprint import resolve_footprint
6
7
8 def test_footprint_includes_review_loop_skills(git_only_config) -> None:
9 dests = {f.destination for f in resolve_footprint(git_only_config)}
10 assert ".cursor/skills/freeze-review-loop/SKILL.md" in dests
11 assert ".cursor/skills/build-verification-review/SKILL.md" in dests
12 assert ".claude/skills/freeze-review-loop/SKILL.md" in dests
13 assert ".claude/skills/build-verification-review/SKILL.md" in dests
14
15
16 def test_review_loop_skill_documents_bounded_loop(git_only_config) -> None:
17 files = {f.destination: f.text for f in resolve_footprint(git_only_config)}
18 loop = files[".cursor/skills/freeze-review-loop/SKILL.md"]
19 assert "MAX_ROUNDS" in loop
20 assert "Not automatic by default" in loop
21 assert "while ROUND" in loop
22
23
24 def test_footprint_includes_build_verification_rule(git_only_config) -> None:
25 dests = {f.destination for f in resolve_footprint(git_only_config)}
26 assert ".cursor/rules/build-verification-required.mdc" in dests
27
28
29 def test_footprint_includes_orchestrator_rule(git_only_config) -> None:
30 files = {f.destination: f.text for f in resolve_footprint(git_only_config)}
31 assert ".cursor/rules/orchestrator.mdc" in files
32 text = files[".cursor/rules/orchestrator.mdc"]
33 assert "alwaysApply: true" in text
34 assert "RULE #8" in text
35 assert "ok init" in text
36 assert "Paste-ready prompt" in text
37 assert "/freeze-review-loop" in text
38 assert "/build-verification-review" in text
39 assert "{{docs.roadmap_path}}" in text
40 assert "{{docs.handover_path}}" in text
41
42
43 def test_build_verification_skill_documents_honesty_gate(git_only_config) -> None:
44 files = {f.destination: f.text for f in resolve_footprint(git_only_config)}
45 verify = files[".cursor/skills/build-verification-review/SKILL.md"]
46 assert "honesty gate" in verify.lower()
47 assert "{step}b" in verify
48 assert "thinking-high" in verify
49 assert "Mandatory" in verify
50
51
52 def test_footprint_includes_workspace_authority_and_skill(git_only_config) -> None:
53 dests = {f.destination for f in resolve_footprint(git_only_config)}
54 assert ".cursor/rules/workspace-authority.mdc" in dests
55 assert ".cursor/skills/workspace-status/SKILL.md" in dests
56 assert ".claude/skills/workspace-status/SKILL.md" in dests
57
58
59 def test_rendered_templates_include_build_verification_in_dod(git_only_config) -> None:
60 from adapters.templating import render_template
61 from cli.kit_root import kit_root
62
63 handover = render_template(kit_root() / "templates/OVERSEER-HANDOVER.template.md", git_only_config)
64 roadmap = render_template(kit_root() / "templates/ROADMAP.template.md", git_only_config)
65 assert "build-verification-review" in handover
66 assert "Build verification" in roadmap
File History 2 commits
sha256:a78e7e5a8740e03315f325d19edeb3aa1b306b3337d04abbaa9a9e0f3bbeb7a1 docs: MuseHub-first before ISR #74 — staging solidify NEXT Human 2 days ago
sha256:4671b7f787ddbe63ced31c895b688c77ab495653b65a730b423329f26b3c1439 feat: K1-P1 complete — agent provenance, build-verification… Sonnet 4.6 patch 54 days ago