-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Description
Problem
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.mdwith project-specific principles - Run spec kit initialization again (e.g., for a different agent/configuration)
- Result: The customized
constitution.mdis 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.mdto.specify/templates/constitution.md - On first initialization (when
memory/constitution.mddoesn't exist), copy the template fromtemplates/tomemory/ - On subsequent initializations, check if
memory/constitution.mdexists:- 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:
git restore .specify/memory/constitution.mdRedeem-Grimm-Satoshi
Metadata
Metadata
Assignees
Labels
No labels