Summary
A preset that provides a constitution-template with strategy: replace does not get its constitution installed into the project, and the rendered speckit.constitution command is not preset-aware. So an organization that ships a fixed, ready-to-use constitution in a preset cannot get it installed without the agent re-authoring one.
Environment
- Spec Kit CLI:
0.8.18 (the project's init-options.json recorded 0.8.18.dev0)
- Agent integration:
claude (also reproducible conceptually for other integrations)
What happens
After specify init followed by specify preset add with a preset that declares:
provides:
templates:
- type: "template"
name: "constitution-template"
file: "templates/constitution-template.md"
replaces: "constitution-template"
strategy: "replace"
.specify/templates/constitution-template.md is still the generic upstream placeholder (# [PROJECT_NAME] Constitution, [PRINCIPLE_1_NAME], ...).
.specify/memory/constitution.md is also the generic placeholder.
- Only
.specify/presets/<id>/templates/constitution-template.md carries the preset's content.
Separately, the rendered speckit.constitution command (from templates/commands/constitution.md) instructs the agent to treat .specify/memory/constitution.md as a template and fill the [PLACEHOLDER] tokens. So even running /speckit.constitution does not install the preset's document; it has the agent author principles.
Steps to reproduce
- Create a preset whose
constitution-template entry has replaces: constitution-template, strategy: replace, and a complete, ready-to-use constitution as its content.
specify init . --integration claude
specify preset add --dev /path/to/preset
- Inspect
.specify/templates/constitution-template.md and .specify/memory/constitution.md.
Expected
The preset's constitution-template (declared replace) should be the active template, and there should be a supported way for the preset's ratified constitution to land in .specify/memory/constitution.md without the agent re-authoring principles.
Actual
The live template and the memory file are the generic placeholder; the preset content is only in the presets/<id> copy; and speckit.constitution re-authors rather than installs.
Impact
For organizations with a fixed, ratified constitution, a developer who runs /speckit.constitution silently gets an AI-invented constitution, which then governs every Constitution Check gate in plan and analyze.
Suggested fix
Either:
- honor
strategy: replace for constitution-template when resolving .specify/memory/constitution.md during setup, or
- document
specify preset resolve constitution-template as the install path and make speckit.constitution preset-aware so a preset can override it to install/validate the preset's document rather than author one (presets can already override other commands such as a custom backlog command).
Summary
A preset that provides a
constitution-templatewithstrategy: replacedoes not get its constitution installed into the project, and the renderedspeckit.constitutioncommand is not preset-aware. So an organization that ships a fixed, ready-to-use constitution in a preset cannot get it installed without the agent re-authoring one.Environment
0.8.18(the project'sinit-options.jsonrecorded0.8.18.dev0)claude(also reproducible conceptually for other integrations)What happens
After
specify initfollowed byspecify preset addwith a preset that declares:.specify/templates/constitution-template.mdis still the generic upstream placeholder (# [PROJECT_NAME] Constitution,[PRINCIPLE_1_NAME], ...)..specify/memory/constitution.mdis also the generic placeholder..specify/presets/<id>/templates/constitution-template.mdcarries the preset's content.Separately, the rendered
speckit.constitutioncommand (fromtemplates/commands/constitution.md) instructs the agent to treat.specify/memory/constitution.mdas a template and fill the[PLACEHOLDER]tokens. So even running/speckit.constitutiondoes not install the preset's document; it has the agent author principles.Steps to reproduce
constitution-templateentry hasreplaces: constitution-template,strategy: replace, and a complete, ready-to-use constitution as its content.specify init . --integration claudespecify preset add --dev /path/to/preset.specify/templates/constitution-template.mdand.specify/memory/constitution.md.Expected
The preset's
constitution-template(declaredreplace) should be the active template, and there should be a supported way for the preset's ratified constitution to land in.specify/memory/constitution.mdwithout the agent re-authoring principles.Actual
The live template and the memory file are the generic placeholder; the preset content is only in the
presets/<id>copy; andspeckit.constitutionre-authors rather than installs.Impact
For organizations with a fixed, ratified constitution, a developer who runs
/speckit.constitutionsilently gets an AI-invented constitution, which then governs every Constitution Check gate inplanandanalyze.Suggested fix
Either:
strategy: replaceforconstitution-templatewhen resolving.specify/memory/constitution.mdduring setup, orspecify preset resolve constitution-templateas the install path and makespeckit.constitutionpreset-aware so a preset can override it to install/validate the preset's document rather than author one (presets can already override other commands such as a custom backlog command).