diff --git a/templates/commands/implement.md b/templates/commands/implement.md index 7ba5ba8e0c..52a042161f 100644 --- a/templates/commands/implement.md +++ b/templates/commands/implement.md @@ -88,6 +88,7 @@ You **MUST** consider the user input before proceeding (if not empty). - **IF EXISTS**: Read data-model.md for entities and relationships - **IF EXISTS**: Read contracts/ for API specifications and test requirements - **IF EXISTS**: Read research.md for technical decisions and constraints + - **IF EXISTS**: Read /memory/constitution.md for governance constraints - **IF EXISTS**: Read quickstart.md for integration scenarios 4. **Project Setup Verification**: diff --git a/tests/integrations/test_integration_generic.py b/tests/integrations/test_integration_generic.py index 290a36419e..4f515a01d2 100644 --- a/tests/integrations/test_integration_generic.py +++ b/tests/integrations/test_integration_generic.py @@ -185,6 +185,16 @@ def test_plan_references_correct_context_file(self, tmp_path): ) assert "__CONTEXT_FILE__" not in content + def test_implement_loads_constitution_context(self, tmp_path): + """The generated implement command should load constitution governance context.""" + i = get_integration("generic") + m = IntegrationManifest("generic", tmp_path) + i.setup(tmp_path, m, parsed_options={"commands_dir": ".custom/cmds"}) + implement_file = tmp_path / ".custom" / "cmds" / "speckit.implement.md" + assert implement_file.exists() + content = implement_file.read_text(encoding="utf-8") + assert ".specify/memory/constitution.md" in content + # -- CLI -------------------------------------------------------------- def test_cli_generic_without_commands_dir_fails(self, tmp_path):