test: lock README prose contract
This commit is contained in:
@@ -3,6 +3,8 @@ from __future__ import annotations
|
|||||||
import unittest
|
import unittest
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
from claridoc.style_contracts import first_person_metrics, plain_form_ending_locations
|
||||||
|
|
||||||
|
|
||||||
ROOT = Path(__file__).resolve().parents[1]
|
ROOT = Path(__file__).resolve().parents[1]
|
||||||
AUTHOR_SKILL = ROOT / ".agents" / "skills" / "technical-document-author"
|
AUTHOR_SKILL = ROOT / ".agents" / "skills" / "technical-document-author"
|
||||||
@@ -38,6 +40,17 @@ class RepositoryContractTests(unittest.TestCase):
|
|||||||
self.assertIn("independent review", normalized)
|
self.assertIn("independent review", normalized)
|
||||||
self.assertIn("quality-gate", normalized)
|
self.assertIn("quality-gate", normalized)
|
||||||
|
|
||||||
|
def test_repository_readme_satisfies_korean_experience_contract(self) -> None:
|
||||||
|
text = (ROOT / "README.md").read_text(encoding="utf-8")
|
||||||
|
metrics = first_person_metrics(text)
|
||||||
|
|
||||||
|
self.assertEqual(plain_form_ending_locations(text), [])
|
||||||
|
self.assertTrue(metrics["opening_has_first_person"])
|
||||||
|
self.assertGreaterEqual(metrics["experience_section_coverage"], 0.5)
|
||||||
|
self.assertIn("STYLE002", text)
|
||||||
|
self.assertIn("STYLE003", text)
|
||||||
|
self.assertIn("examples/briefs/claridoc-readme.json", text)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|||||||
Reference in New Issue
Block a user