Skip to content

Commit 1354ead

Browse files
fix(constitution): stop propagating guidance into templates (#3737) (#3790)
Issue #3737 asked the /constitution command to synchronize constitutional guidance into every effective task/plan/spec template, including active preset-provided replacements. This changes the fix's direction: rather than teach the command to discover and edit more template layers, it removes the template-propagation behavior entirely. Why this is the correct fix: - The governed templates do not embed constitutional content. plan-template carries a runtime placeholder ("[Gates determined based on constitution file]") and spec-template/tasks-template reference no principles at all. - The consuming commands read .specify/memory/constitution.md at runtime and derive their Constitution Check gates live (plan, tasks), and analyze is the dedicated drift checker that validates spec/plan/tasks against the constitution. Enforcement is therefore already automatic and always current. - Statically editing template files fights the preset/override composition system: a replace preset shadows an edited core template entirely, and a hand-edited versioned preset file is clobbered on its next update. Presets and extensions are formalized, versioned artifacts the command must not mutate. So the original bug (constitution edits missing active preset templates) is resolved by not propagating at all: the runtime read is the single source of truth. The /constitution command is scoped to its own artifact — it drafts and writes the constitution and reports a Sync Impact Report changelog, and no longer reads, edits, or reports on plan/spec/tasks/preset/extension templates. Refs #3737 Assisted-by: GitHub Copilot (model: Claude Opus 4.8, supervised) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5b80589c-74e8-42e5-b2cb-7a7e0d69a964
1 parent 2a29b53 commit 1354ead

1 file changed

Lines changed: 10 additions & 18 deletions

File tree

‎templates/commands/constitution.md‎

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
2+
description: Create or update the project constitution from interactive or provided principle inputs.
33
handoffs:
44
- label: Build Specification
55
agent: speckit.specify
@@ -16,16 +16,16 @@ You **MUST** consider the user input before proceeding (if not empty).
1616

1717
## Scope Guard
1818

19-
This command's own work is limited to updating the project constitution and propagating
20-
constitution-driven changes to the dependent artifacts identified in this command.
19+
This command's own work is limited to updating the project constitution itself. Dependent templates
20+
and commands read the constitution at runtime and are not modified here.
2121

2222
- Classify every part of the user input as either constitution content or a separate,
2323
non-governance intent.
2424
- If the input includes feature implementation, code generation, refactoring, building, or
2525
deployment requests, you **MUST NOT** execute them. Extract them as deferred intents instead.
2626
- You **MUST NOT** create, modify, or delete application source files, feature routes,
2727
components, tests, deployment files, or other artifacts unrelated to the constitution
28-
workflow and its required propagation.
28+
workflow.
2929
- If it is unclear whether an instruction is constitution content, ask for clarification before
3030
making changes.
3131
- After completing the constitution update, include a `Next Actions` section for each deferred
@@ -70,7 +70,7 @@ constitution-driven changes to the dependent artifacts identified in this comman
7070
7171
## Outline
7272
73-
You are updating the project constitution at `.specify/memory/constitution.md`. This file is a TEMPLATE containing placeholder tokens in square brackets (e.g. `[PROJECT_NAME]`, `[PRINCIPLE_1_NAME]`). Your job is to (a) collect/derive concrete values, (b) fill the template precisely, and (c) propagate any amendments across dependent artifacts.
73+
You are updating the project constitution at `.specify/memory/constitution.md`. This file is a TEMPLATE containing placeholder tokens in square brackets (e.g. `[PROJECT_NAME]`, `[PRINCIPLE_1_NAME]`). Your job is to (a) collect/derive concrete values and (b) fill the template precisely.
7474
7575
**Note**: If `.specify/memory/constitution.md` does not exist yet, it should have been initialized from `.specify/templates/constitution-template.md` during project setup. If it's missing, copy the template first.
7676
@@ -96,32 +96,24 @@ Follow this execution flow:
9696
- Ensure each Principle section: succinct name line, paragraph (or bullet list) capturing non‑negotiable rules, explicit rationale if not obvious.
9797
- Ensure Governance section lists amendment procedure, versioning policy, and compliance review expectations.
9898
99-
4. Consistency propagation checklist (convert prior checklist into active validations):
100-
- Read `.specify/templates/plan-template.md` and ensure any "Constitution Check" or rules align with updated principles.
101-
- Read `.specify/templates/spec-template.md` for scope/requirements alignment—update if constitution adds/removes mandatory sections or constraints.
102-
- Read `.specify/templates/tasks-template.md` and ensure task categorization reflects new or removed principle-driven task types (e.g., observability, versioning, testing discipline).
103-
- Read each installed Spec Kit command file for your agent (including this one) — named `speckit.*` or `speckit-*` (dot or hyphen depending on the agent), or laid out as `speckit-<name>/SKILL.md` for skills-based integrations, e.g. in `.github/agents/`, `.github/skills/`, `.claude/skills/`, or your agent's equivalent commands directory — to verify no outdated references (CLAUDE-only or other agent-specific names) remain when generic guidance is required.
104-
- Read any runtime guidance docs (e.g., `README.md`, `docs/quickstart.md`, or agent-specific guidance files if present). Update references to principles changed.
105-
106-
5. Produce a Sync Impact Report (prepend as an HTML comment at top of the constitution file after update):
99+
4. Produce a Sync Impact Report (prepend as an HTML comment at top of the constitution file after update):
107100
- Version change: old → new
108101
- List of modified principles (old title → new title if renamed)
109102
- Added sections
110103
- Removed sections
111-
- Templates requiring updates (✅ updated / ⚠ pending) with file paths
112104
- Follow-up TODOs if any placeholders intentionally deferred.
113105
114-
6. Validation before final output:
106+
5. Validation before final output:
115107
- No remaining unexplained bracket tokens.
116108
- Version line matches report.
117109
- Dates ISO format YYYY-MM-DD.
118110
- Principles are declarative, testable, and free of vague language ("should" → replace with MUST/SHOULD rationale where appropriate).
119111
120-
7. Write the completed constitution back to `.specify/memory/constitution.md` (overwrite).
112+
6. Write the completed constitution back to `.specify/memory/constitution.md` (overwrite).
121113
122-
8. Output a final summary to the user with:
114+
7. Output a final summary to the user with:
123115
- New version and bump rationale.
124-
- Any files flagged for manual follow-up.
116+
- Any TODO placeholders or deferred items requiring manual follow-up.
125117
- Suggested commit message (e.g., `docs: amend constitution to vX.Y.Z (principle additions + governance update)`).
126118
- A `Next Actions` section for any deferred non-governance intents.
127119

0 commit comments

Comments
 (0)