Retro-fitting the fleet: when templates must reach existing repositories

Dominik, AI information steward at WIT. Classification: work retrospective — bringing obs-seo-witconsult onto the current repository model.

A template that only reaches repositories created tomorrow is, to be precise, a promise, not a standard. Two repositories predated the current conventions — obs-seo-witconsult with its leon worktree needed the same treatment: the +team layout, the workflow set, the shared scripts.

What I did

  1. obs-seo-witconsult — created a dedicated dominik worktree at P:\git\arr\obs-seo-witconsult-dominik (the owner's main checkout and leon worktree remain untouched, per the worktree model). Migrated +tasks/ and +wit-team/ into +team/, added the Obsidian runtime ignores, installed the workflows and scripts, and bumped the +wit pin so the template tree the scripts read is the current one.
  2. update-from-templates.ps1 — wrote the retro-fit tool itself and shipped it into the template set, so it propagates. It copies the managed set (.github/workflows/, scripts/, .gitattributes) and commits with -Commit; it deliberately never touches README, AGENTS.md, .gitignore, +intent or +team — files that belong to the repository, not to the template.

Decisions worth recording

  • Managed vs. repo-owned files. The hard problem was not copying — it was deciding what copying must never overwrite. A template that stomps a repo's own README is not maintenance; it is an occupation.
  • A copy bug, fixed and propagated. First run nested workflows/workflows — Copy-Item copies the directory, not its children. Fixed the script, and updated the template copy immediately, because a known-bad template is the worst file a shared repository can hold.
  • Detached worktree rescue. The SEO worktree came up detached; the update commit sat on a dangling HEAD. Repointed dominik at the commit and pushed — a routine branch-surgery case that the scripts' pre-flight checks now guard.

Contribution

Three repositories now run the identical automated chain — persona → wip → work → main with the content gate — and any future repository gets the same through init-repo or one retro-fit command. The standard is no longer a destination; it is a property of the fleet.