-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Issue summary
I am using SpecKit in an existing project on macOS and my AI agent is the Codex CLI. When I run the /speckit.constitution command, Codex unexpectedly modifies the template files under .specify/templates in my repository.
Expected behavior
From my understanding of the SpecKit documentation, the files in .specify/templates are meant to serve as base templates for spec, plan and tasks generation and should only ever be updated during specify init or upgrades. They should not be changed when running commands like /speckit.constitution, which should only write to .specify/memory/constitution.md.
Actual behavior
After running /speckit.constitution with Codex CLI, I noticed that some of the files in .specify/templates were altered by the agent. This suggests that Codex is treating the templates as editable content and updating them during the constitution step. That seems like unexpected behaviour, and it could potentially break future runs because the base templates are no longer pristine.
Proposed solution
It would be great if SpecKit could introduce a mode or mechanism to prevent any AI agent from modifying .specify/templates or other files that should remain read‑only. For example, there could be an enforced read‑only flag for the templates directory, or the slash commands could explicitly ignore those files when generating the constitution.
Environment
- macOS
- Codex CLI (latest version)
- SpecKit version 0.0.85 (from GitHub release)
Additional context
I have a mature codebase under Git, and I installed SpecKit with specify init --here --force --ai codex. Running /speckit.constitution unexpectedly modified files inside .specify/templates. I would appreciate clarification on whether this is intended, and if not, please consider adding a way to enforce that AI agents do not modify template files.
Thanks!