44 lines
1.4 KiB
Python
44 lines
1.4 KiB
Python
from __future__ import annotations
|
|
|
|
import unittest
|
|
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
AUTHOR_SKILL = ROOT / ".agents" / "skills" / "technical-document-author"
|
|
|
|
|
|
class RepositoryContractTests(unittest.TestCase):
|
|
def test_technical_author_skill_is_complete(self) -> None:
|
|
required_files = (
|
|
AUTHOR_SKILL / "SKILL.md",
|
|
AUTHOR_SKILL / "references" / "logic-contract.md",
|
|
AUTHOR_SKILL / "references" / "review-rubric.md",
|
|
AUTHOR_SKILL / "agents" / "openai.yaml",
|
|
)
|
|
for path in required_files:
|
|
with self.subTest(path=path.relative_to(ROOT)):
|
|
self.assertTrue(path.is_file())
|
|
|
|
skill_text = (AUTHOR_SKILL / "SKILL.md").read_text(encoding="utf-8")
|
|
for required_term in (
|
|
"Brief",
|
|
"SourcePack",
|
|
"STRUCTURE_SPECS",
|
|
"revising-korean-technical-prose",
|
|
"quality-gate.json",
|
|
"provenance",
|
|
):
|
|
with self.subTest(required_term=required_term):
|
|
self.assertIn(required_term, skill_text)
|
|
|
|
normalized = " ".join(skill_text.casefold().split())
|
|
self.assertIn("do not claim completion", normalized)
|
|
self.assertIn("lint", normalized)
|
|
self.assertIn("independent review", normalized)
|
|
self.assertIn("quality-gate", normalized)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|