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

@ -29,11 +29,14 @@ Desktop-first Scrum-app voor solo developers en kleine teams. Hiërarchie: produ
## Hoe werk vinden
**Track A — MCP (aanbevolen):**
1. `mcp__scrum4me__get_claude_context` → pak de next story
2. Voer taken uit in `sort_order`; update status per taak
3. Lees het relevante patroon en styling vóór je begint
4. Verifieer: `npm run lint && npm test && npm run build`
5. Commit per laag — zie [docs/runbooks/branch-and-commit.md](./docs/runbooks/branch-and-commit.md)
1. Branch aanmaken: `git checkout -b feat/<batch-slug>` — nog **geen** `gh pr create`
2. `mcp__scrum4me__get_claude_context` → pak de next story
3. Voer taken uit in `sort_order`; update status per taak
4. Lees het relevante patroon en styling vóór je begint
5. Verifieer: `npm run lint && npm test && npm run build`
6. Commit per laag: `git add -A && git commit`**geen** `git push` — zie [docs/runbooks/branch-and-commit.md](./docs/runbooks/branch-and-commit.md)
7. Herhaal stap 26 per story; branch blijft dezelfde
8. Queue leeg → `git push -u origin <branch>` + `gh pr create`
**Track B — manueel:**
1. Lees taak in `docs/backlog/index.md`
@ -48,7 +51,7 @@ Volledige MCP-tool documentatie: [docs/runbooks/mcp-integration.md](./docs/runbo
- **Styling:** nooit `bg-blue-500`; altijd MD3-tokens (`bg-primary`, `bg-status-done`, …)
- **UI:** gebruik `@base-ui/react` met `render`-prop, niet Radix `asChild`
- **Push:** nooit pushen zonder expliciete gebruikersbevestiging — zie [branch-and-commit.md](./docs/runbooks/branch-and-commit.md)
- **Push:** commits accumuleren lokaal per taak (`git add -A && git commit`); push + PR pas bij lege queue of na expliciete gebruikersbevestiging — zie [branch-and-commit.md](./docs/runbooks/branch-and-commit.md)
- **Demo:** drie lagen — proxy.ts + server action + UI disabled knop
- **Enum:** DB UPPER_SNAKE ↔ API lowercase — uitsluitend via `lib/task-status.ts`
- **Foutcodes:** 400 = parse-fout, 422 = Zod-validatie, 403 = demo-token

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