Skip to content

[Bug]: integration use overwrites team-customized shared scripts/templates when custom baseline is recorded in speckit manifest #2918

@jinaparkdev

Description

@jinaparkdev

Bug Description

specify integration use <key> can overwrite team-customized files under .specify/scripts/ and .specify/templates/ without --force.
This happens when the customized files are recorded as the current baseline in .specify/integrations/speckit.manifest.json.

Steps to Reproduce

  1. Initialize a Spec Kit project with Codex.
  2. Customize files under .specify/templates/ and/or .specify/scripts/.
  3. Ensure those customized files are recorded in .specify/integrations/speckit.manifest.json.
  4. Install Claude integration.
  5. Run:
  specify integration use claude
  1. Observe that customized shared scripts/templates can be replaced or re-rendered.

Expected Behavior

specify integration use claude should preserve customized shared scripts/templates unless --force is explicitly passed.

Actual Behavior

integration use refreshes shared infrastructure with refresh_managed=True.
If the current file hash matches the hash in speckit.manifest.json, Spec Kit treats the file as managed and rewrites it from the bundled default templates/scripts. This can reset team customizations when switching the default integration, for example from Codex to Claude.

Specify CLI Version

0.9.4

AI Agent

Claude Code

Operating System

macOS Tahoe 26.5

Python Version

Python 3.14.3

Error Logs

Additional Context

We use Spec Kit as a shared spec-driven development environment across a team. The project intentionally commits customized templates and shell scripts so all developers and agents share the same workflow.
Once those customized files are recorded in the manifest, they are no longer detected as modifications. integration use can therefore overwrite them even without --force.

The overwrite decision relies on manifest hash equality:

  • current file hash == manifest hash → treated as managed and refreshed
  • current file hash != manifest hash → treated as customized and preserved

This cannot distinguish bundled Spec Kit files from team-customized files that were intentionally recorded as the project baseline.

Possible fixes:

  • Do not rewrite full shared scripts/templates during integration use; only update command invocation references in-place.
  • Refresh only files that match the bundled source rendered for the previous default integration.
  • Add a supported customization layer for shared scripts/templates that is never managed by integration switching.
  • Warn or provide a dry-run before rewriting shared infrastructure during use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions