spec-kit icon indicating copy to clipboard operation
spec-kit copied to clipboard

Disable automatic CLAUDE.md updates by default

Open cheapsteak opened this issue 10 months ago • 5 comments

Problem

The spec-kit tool automatically updates the root CLAUDE.md file with technology information, and this behavior is quite annoying because:

  1. Repeated additions: It repeatedly adds the same technologies to the file, creating duplicate entries
  2. Unwanted modifications: Users may not want their CLAUDE.md file modified automatically as part of the spec workflow
  3. Noisy diffs: These automatic changes create noise in git diffs and can accidentally get committed

Current Behavior

When running spec-kit commands, it modifies the root CLAUDE.md file to add entries like:

## Active Technologies
- Python 3.12 (backend/ingest), TypeScript (frontend) ...

These entries accumulate and repeat, cluttering the file.

Requested Change

Please make the automatic CLAUDE.md updates opt-in rather than opt-out. Options could include:

  1. Add a flag like --update-claude-md that must be explicitly passed to enable this behavior
  2. Add a configuration option in the spec-kit config to control this behavior (default: disabled)
  3. At minimum, prevent duplicate entries from being added

Workaround

Currently users must manually revert changes to CLAUDE.md after running spec-kit commands.

cheapsteak avatar Jan 12 '26 23:01 cheapsteak

you can remove #templates/commands/plan.md line 14-16

agent_scripts:
  sh: scripts/bash/update-agent-context.sh __AGENT__
  ps: scripts/powershell/update-agent-context.ps1 -AgentType __AGENT__

carter003 avatar Jan 17 '26 16:01 carter003

you can remove #templates/commands/plan.md line 14-16

We can remove from that file manually, but I'd rather have a "config" option to avoid these - as it we update the spec kit template it'll override/clash with our changes to remove that

Add a flag like --update-claude-md that must be explicitly passed to enable this behavior

I wouldn't have thought this would be a good approach - as it'd be a breaking change based on the current behaviour, so would probably have to have --dont-update-instructions-files (as this applies to copilot-instructions.md and/or AGENTS.md too)

BUT config is probably better than this - as you're not likely to change what you want per feature, and so would be better to just set it once in the repo

echarrod avatar Mar 17 '26 15:03 echarrod

This feature really breaks the multi-agent development. SPoF in a form of claude.md or any other focal point is brittle and cannot be used effectively when a number of agents are working on the same project. I hard-wired my agents to work on git worktrees, but that pointer, as well as the integration.json, is making a lot of noise.

zaytsevand avatar May 27 '26 19:05 zaytsevand

A PR to address this is in flight

mnriem avatar May 28 '26 12:05 mnriem

Addressed by #3097

mnriem avatar Jul 08 '26 23:07 mnriem