Load constitution context in /speckit.implement to enforce governance during implementation#2460
Open
Load constitution context in /speckit.implement to enforce governance during implementation#2460
/speckit.implement to enforce governance during implementation#2460Conversation
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>
Copilot
AI
changed the title
[WIP] Fix implement command to load constitution.md during code generation
Load constitution context in May 5, 2026
/speckit.implement to enforce governance during implementation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the core /speckit.implement command template so implementation-time prompts include the project constitution, aligning implementation with governance rules that are already enforced elsewhere in the workflow.
Changes:
- Added
/memory/constitution.mdto the implementation context-loading step in the sharedimplementcommand template. - Added a generic integration test intended to verify generated
speckit.implement.mdoutput includes constitution context loading.
Show a summary per file
| File | Description |
|---|---|
templates/commands/implement.md |
Adds constitution loading to the implement workflow context. |
tests/integrations/test_integration_generic.py |
Adds regression coverage for generated generic speckit.implement.md content. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 1
| implement_file = tmp_path / ".custom" / "cmds" / "speckit.implement.md" | ||
| assert implement_file.exists() | ||
| content = implement_file.read_text(encoding="utf-8") | ||
| assert "/memory/constitution.md" in content |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/speckit.implementloaded feature artifacts but omittedconstitution.md, so implementation could ignore project governance and reintroduce violations caught later by/speckit.analyze. This change adds constitution to implement-time context so governance constraints are present during code generation.Template update: implement context loading
templates/commands/implement.mdto load constitution alongside existing implementation artifacts.Regression coverage: generated command output
tests/integrations/test_integration_generic.pyto verify generatedspeckit.implement.mdincludes/memory/constitution.mdin its context-loading instructions.