docs(ST-1115): agent-batch flow — branch-only-at-start, commit lokaal per taak

- CLAUDE.md Track A: voeg stap 1 (branch aanmaken) toe, splits stap 6
  (commit, geen push) af, voeg stap 7-8 (herhaal / push+PR bij lege queue)
- Hardstop Push-regel: verduidelijkt dat commits lokaal accumuleren per
  taak; push pas bij lege queue of expliciete gebruikersbevestiging
- docs/runbooks/branch-and-commit.md: nieuwe subsectie "Agent-batch flow"
  met tabel (run-start / na taak / queue leeg) en single-task edge case
This commit is contained in:
Scrum4Me Agent 2026-05-03 14:07:18 +02:00
parent add275fa6d
commit f1dc7d7865
3 changed files with 25 additions and 7 deletions

View file

@ -61,6 +61,7 @@ Auto-generated on 2026-05-03 from front-matter and headings.
| [Prisma Client singleton](./patterns/prisma-client.md) | active | 2026-05-03 |
| [Proxy (route protection)](./patterns/proxy.md) | active | 2026-05-03 |
| [QR-pairing via unauth-SSE + pre-auth cookie](./patterns/qr-login.md) | active | 2026-05-03 |
| [Realtime NOTIFY payload — veldnaam-contract](./patterns/realtime-notify-payload.md) | active | 2026-05-03 |
| [Route Handler (REST API)](./patterns/route-handler.md) | active | 2026-05-03 |
| [Server Action](./patterns/server-action.md) | active | 2026-05-03 |
| [Float sort_order (drag-and-drop volgorde)](./patterns/sort-order.md) | active | 2026-05-03 |

View file

@ -4,7 +4,7 @@ status: active
audience: [ai-agent, contributor]
language: nl
last_updated: 2026-05-03
when_to_read: "Before creating a branch, commit, or PR."
when_to_read: "Before creating a branch, commit, or PR. Also before any agent-batch run."
---
# Branch, PR & Commit Strategy
@ -45,6 +45,20 @@ Elke `git push` naar een feature-branch triggert een Vercel preview-deployment.
Zodra het Vercel-account naar Pro (of andere omgeving zonder per-build-kosten) gaat: vervang deze regel door "branch + PR per story" zoals oorspronkelijk in dit document stond. Werk deze sectie bij én documenteer de wijziging in `docs/decisions/agent-instructions-history.md`.
### Agent-batch flow (verplicht voor worker-runs)
Wanneer de NAS-agent (`/opt/agent/`) een batch jobs uitvoert:
| Moment | Actie | Verbod |
|---|---|---|
| Start run | `git checkout -b feat/<batch-slug>` lokaal | `gh pr create` |
| Na elke taak | `git add -A && git commit -m "<type>(ST-XXX): <title>"` | `git push` |
| Queue leeg | `git push -u origin <branch>` + `gh pr create` | — |
- Alle commits accumuleren op dezelfde branch — lopende state blijft op disk tot de run klaar is.
- Één PR per batch → één Vercel preview-deployment.
- Single-task batch (1 job in queue): dezelfde flow — 1 commit → push + PR.
---
## Plan Mode