retrofit-project
This skill produces the same end-state as bootstrap-project (same templates,
same canonical shape) on a repo that already has content. The hard part is
not the writing — it is the negotiation with what is already there:
preserving facts under reshape, finding canonical homes for bespoke content,
moving files without breaking references, and being explicit about what was
deleted and why.
The full playbook lives in INSTRUCTIONS.md. Read it
when the skill is invoked. The short version:
- Refuse if invoked cold or on a non-git repo. Need analysis context and a git safety net.
- Inventory diff. Walk every always-present file from the bootstrap spec; classify as missing / present-template-shape / present-bespoke / empty-placeholder. Print the table.
- Extract spec from conversation — same fields as bootstrap-project (project_name, principles, milestones, stack_profile, deploy_model, audience, license, add-ons), plus content-preservation strategy.
- Confirm the plan in one block: what gets written, rewritten, moved, deleted. Wait for "go."
- Execute in this order: (a) write missing always-present files;
(b) rewrite bespoke docs to canonical shape, preserving content;
(c) move files with reference-updating sub-passes; (d) delete with
explicit justification; (e) backfill CHANGELOG from
git tag+git log+ any existing PROGRESS versioning table; (f) write.bootstrap-meta.yamlwithmode: retrofit. - Generate
BOOTSTRAP-MANIFEST.mdwith the richer retrofit shape:files written / rewritten / moved / deleted / preserved unchanged. - Final compliance review. Cross-ref check, no-clobber check, no-forbidden-file check. Print the "next 30 minutes" punch list.
The skill shares templates/ with bootstrap-project — same renderers,
same conditional flags. Don't duplicate.
The skill never deletes silently. Every deletion appears in the confirmation block before execution and in the manifest after.
For background on why retrofits are not just "bootstrap on a dirty
directory," see patterns/why-retrofit-is-different.md.