Skip to content

bootstrap --yes overwrites .charter/config.json, .mcp.json's charter entry and related files without --force or a backup #369

Closed

Description

@stackbilt-admin

Found while blueprinting #354.

charter bootstrap --yes overwrites .charter/config.json, .charter/patterns/blessed-stack.json, .charter/policies/governance.md and .gitignore without --force. The code sets setupOverwrite = yes || force (bootstrap.ts:130, then init.ts:402-425). There is no backup and no "Updated" line, so a hand-tuned config is silently reset: in the #354 repro, config.json project was rewritten. --yes is documented as "skip prompts", not "overwrite".

Fix: overwrite these only under --force (or --reset-adf, from #354), back them up like .ai/ files, and print "Replaced " so the change is visible. Without --force, keep the existing file and merge in any missing keys, as #354 does for .ai/. This changes what a released flag does, so it needs a CHANGELOG note.

Activity

  1. changed the title [-]bootstrap --yes overwrites .charter/config.json and related files without --force or a backup[/-] [+]bootstrap --yes overwrites .charter/config.json, .mcp.json's charter entry and related files without --force or a backup[/+] on Oct 17, 2026
  2. stackbilt-admin commented on Oct 17, 2026

    @stackbilt-admin
    MemberAuthor

    Scope note from the #372 review: setupOverwrite = yes || force (bootstrap.ts:152) also replaces the .mcp.json mcpServers.charter entry under --yes alone (in 2.0.0 and after #372). It's covered here too: it should happen only under --force.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions