docs(agents): require deleting feature branch after merge

This commit is contained in:
William Valentin
2026-02-17 23:53:32 -08:00
parent 540f6780e6
commit d48adbe0b0
+1 -1
View File
@@ -7,7 +7,7 @@
- **Minimize main agent context:** Always delegate tasks to subagents with the right model to execute each task more efficiently and keep the main agent context window usage minimum. The main agent should coordinate and synthesize, not perform detailed implementation work.
- **Commit often:** `git commit` frequently — after each meaningful unit of work, not just at the end of a task.
- **Commit structure:** Prefer small, atomic commits that each represent one meaningful unit of work. Keep unrelated changes out of the same commit. When a change affects docs/diagrams/state, update and commit those alongside the code change (not later).
- **Branch + merge workflow:** Do work on a feature branch (`git switch -c feature/<descriptive-slug>`). Keep branches rebased onto `main` (avoid merge commits). When finished: `git rebase main`, then fast-forward merge back to main: `git switch main && git merge --ff-only feature/<slug>`.
- **Branch + merge workflow:** Do work on a feature branch (`git switch -c feature/<descriptive-slug>`). Keep branches rebased onto `main` (avoid merge commits). When finished: `git rebase main`, then fast-forward merge back to main: `git switch main && git merge --ff-only feature/<slug>`, then delete the merged feature branch: `git branch -d feature/<slug>`.
- **Update state.json:** After every feature implementation, modification, or significant change, update `docs/plans/state.json` accordingly — add new phases/entries, update test counts, adjust the `overall_progress` section, and update the `feature_gap_scorecard` if the gap analysis is affected. Commit state.json alongside the feature change, not as a separate afterthought.
- **Keep docs + diagrams current:** When behavior, config keys, APIs, or architecture changes, update the relevant docs in the same change (README + `docs/`). If the change affects a documented flow, also update the corresponding Mermaid diagrams (e.g. `docs/architecture/AGENT_DIAGRAM.md`, `docs/api/PROTOCOL.md`) so they stay source-of-truth.