You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Constitution template should be in .specify/templates/ to prevent overwrites during reinitialization #1541
The constitution.md template currently resides in .specify/memory/constitution.md by default. This causes user-customized constitutions to be overwritten when spec kit is reinitialized (e.g., when setting up for a different AI agent in the same project).
Steps to Reproduce
Initialize spec kit in a project: /speckit.init
Customize .specify/memory/constitution.md with project-specific principles
Run spec kit initialization again (e.g., for a different agent/configuration)
Result: The customized constitution.md is overwritten with the template version
Expected Behavior
The customized constitution.md should be preserved across reinitialization. Only the template files in .specify/templates/ should be updated/overwritten.
Proposed Solution
Move the default constitution template from .specify/memory/constitution.md to .specify/templates/constitution.md
On first initialization (when memory/constitution.md doesn't exist), copy the template from templates/ to memory/
On subsequent initializations, check if memory/constitution.md exists:
If it exists, skip copying (preserve user's version)
If it doesn't exist, copy from template
Benefits
Prevents accidental loss of customized constitutions
Allows the same .specify/ structure to work with multiple AI agents without conflicts
Aligns with the principle that .specify/memory/ contains project-specific artifacts, while .specify/templates/ contains reusable scaffolds
Workaround (Current)
Users must manually restore their constitution after reinitialization:
Activity
fix: preserve constitution.md during reinitialization (github#1541)
fix: preserve constitution.md during reinitialization (github#1541) (g…
chore/merge upstream v0.0.91 (#11)
fix: preserve constitution.md during reinitialization (github#1541) (g…