💫 Toolkit to help you get started with SDD or any other process!
Load constitution context in `/speckit.implement` to enforce governance during implementation (#2460)
Copilotb4060d562040
diff --git a/templates/commands/implement.md b/templates/commands/implement.mdindex 7ba5ba8e0..52a042161 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 scenarios4. **Project Setup Verification**:diff --git a/tests/integrations/test_integration_generic.py b/tests/integrations/test_integration_generic.pyindex 290a36419..4f515a01d 100644--- a/tests/integrations/test_integration_generic.py+++ b/tests/integrations/test_integration_generic.py@@ -185,6 +185,16 @@ class TestGenericIntegration:)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):