"""Focused contract checks for discussion-first behaviour; not LLM behaviour tests.""" import unittest from pathlib import Path ROOT = Path(__file__).resolve().parents[1] class DiscussionFirstContractTests(unittest.TestCase): def test_context_and_contributor_reference_the_shared_protocol(self): reference = ROOT / "skills/bortstack-context/references/discussion-first.md" self.assertTrue(reference.is_file()) context = (ROOT / "skills/bortstack-context/SKILL.md").read_text() contributor = (ROOT / "skills/bortstack-contributor/SKILL.md").read_text() self.assertIn("references/discussion-first.md", context) self.assertIn("discussion-first.md", contributor) def test_questions_agreement_and_explicit_actions_are_distinct(self): rules = (ROOT / "skills/bortstack-context/references/discussion-first.md").read_text() for required in ("ending with `?`", "**Yes** or **No**", "agreement", "ask", "`MISSION-ID engage`", "patch", "latest"): self.assertIn(required.lower(), rules.lower()) def test_chatgpt_instructions_are_separate_from_codex_skill(self): instructions = (ROOT / "docs/specifications/discussion-first-protocol.md").read_text() self.assertIn("ChatGPT project instructions", instructions) self.assertIn("cannot update ChatGPT project instructions automatically", instructions) if __name__ == "__main__": unittest.main()