Skip to content

Commit b4060d5

Browse files
CopilotmnriemCopilot
authored
Load constitution context in /speckit.implement to enforce governance during implementation (#2460)
* Initial plan * fix implement command to load constitution context Agent-Logs-Url: https://github.com/github/spec-kit/sessions/05663d9d-149b-4c13-a22d-2552b3fa619c Co-authored-by: mnriem <15701806+mnriem@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mnriem <15701806+mnriem@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 0f26551 commit b4060d5

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

templates/commands/implement.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ You **MUST** consider the user input before proceeding (if not empty).
8888
- **IF EXISTS**: Read data-model.md for entities and relationships
8989
- **IF EXISTS**: Read contracts/ for API specifications and test requirements
9090
- **IF EXISTS**: Read research.md for technical decisions and constraints
91+
- **IF EXISTS**: Read /memory/constitution.md for governance constraints
9192
- **IF EXISTS**: Read quickstart.md for integration scenarios
9293
9394
4. **Project Setup Verification**:

tests/integrations/test_integration_generic.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,16 @@ def test_plan_references_correct_context_file(self, tmp_path):
185185
)
186186
assert "__CONTEXT_FILE__" not in content
187187

188+
def test_implement_loads_constitution_context(self, tmp_path):
189+
"""The generated implement command should load constitution governance context."""
190+
i = get_integration("generic")
191+
m = IntegrationManifest("generic", tmp_path)
192+
i.setup(tmp_path, m, parsed_options={"commands_dir": ".custom/cmds"})
193+
implement_file = tmp_path / ".custom" / "cmds" / "speckit.implement.md"
194+
assert implement_file.exists()
195+
content = implement_file.read_text(encoding="utf-8")
196+
assert ".specify/memory/constitution.md" in content
197+
188198
# -- CLI --------------------------------------------------------------
189199

190200
def test_cli_generic_without_commands_dir_fails(self, tmp_path):

0 commit comments

Comments
 (0)