Ship the completed work.
-
Derive the topic — progress file → Plan: ref → plan's Design: ref → design-doc filename → <topic>. Ambiguous with several designs in flight? Ask.
-
Delete consumed plan docs — only this design's three artifacts, matched by the exact topic slug (with the YYYY-MM-DD- prefix) so similarly-named plans for other topics survive:
rm -f docs/plans/????-??-??-<topic>-design.md docs/plans/????-??-??-<topic>-implementation.md docs/plans/????-??-??-<topic>-progress.md
The ????-??-??- glob enforces the dated filename; a bare *<topic>* would over-match unrelated docs (e.g. topic auth would also hit feature-auth-redesign-design.md). Verify with ls docs/plans/ before and after. rm -f handles missing files. docs/adr/, docs/lessons.md, CHANGELOG.md, and README.md are permanent — leave them entirely out of the delete set.
-
Curate lessons (Agile Scrum Master hat) — if docs/lessons.md exists: add missed lessons, generalize domain-specific rules into generic patterns, de-duplicate, categorize, retire stale rules. None exists but lessons were learned? Create it.
-
Update documentation — if the API or surface changed: README.md, CHANGELOG.md, any inline docs.
-
Choose a merge strategy — ask the human:
- Create PR —
git push origin <branch> then gh pr create.
- Rebase & merge (recommended) — rebase onto parent,
--ff-only merge, push parent, delete branch.
- Squash & merge — squash onto parent, push, delete branch.
- Merge commit —
--no-ff merge, push parent, delete branch.
For 2–4, confirm the detected parent branch before proceeding.
-
Clean up — remove the worktree if one was used: git worktree remove ../<repo>-<topic>.