Skip to content

Support safe existing repository adoption - #2

Merged
suyog19 merged 1 commit into
mainfrom
agent/safe-existing-repository-adoption
Aug 18, 2026
Merged

Support safe existing repository adoption#2
suyog19 merged 1 commit into
mainfrom
agent/safe-existing-repository-adoption

Conversation

@suyog19

@suyog19 suyog19 commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • prevent initialization and upgrades from overwriting repository-owned guidance
  • add an explicit local_context model and reviewed mature-repository adoption flow
  • keep generated assistant bootstraps compact while linking canonical policy and contextual local documents
  • validate ownership boundaries, missing references, stale generated files, and safe upgrade behavior

Why

Existing repositories may already contain important workflow, architecture, UX, deployment, and validation guidance in AGENTS.md or CLAUDE.md. Initialization previously replaced those files unconditionally, making adoption destructive.

Impact

Mature repositories can now preserve existing guidance verbatim with --adopt-existing-context, declare it in the manifest, validate it, and carry it safely through upgrades. Existing override mechanisms remain authoritative for policy-level configuration and cannot weaken locked controls.

Validation

  • 45 pytest cases passed
  • 19 acceptance checks passed
  • production-adoption dry run against suyog19/suyog19.github.io preserved both assistant files byte-for-byte and validated with the frontend profile

Closes #1

@suyog19
suyog19 merged commit fa26e62 into main Aug 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support safe adoption in existing repositories with local-context preservation

1 participant