fix(KIND_DEFAULTS): permission_mode acceptEdits voor idea-kinds + PLAN_CHAT (#172)

* fix(KIND_DEFAULTS): permission_mode acceptEdits voor idea-kinds + PLAN_CHAT

Spiegel van scrum4me-mcp PR #40. Symptoom: IDEA_GRILL job IDEA-047 werd
3x geclaimd, Claude liep telkens succesvol (exit 0 na 600-900s) maar
deed nooit update_job_status('done'). Lease verliep, retry_count >= 2 →
status FAILED met "agent did not complete job within 2 attempts".

Root cause: KIND_DEFAULTS.permission_mode='plan' voor idea-kinds en
PLAN_CHAT. In autonome batch-mode wacht plan-mode op een human "go" na
elke planning-fase — geen mens in de loop in deze runner-context.

Fix:
- IDEA_GRILL.permission_mode: plan → acceptEdits
- IDEA_MAKE_PLAN.permission_mode: plan → acceptEdits
- PLAN_CHAT.permission_mode: plan → acceptEdits
- PLAN_CHAT.allowed_tools krijgt mcp__scrum4me__update_job_status (ontbrak)

De allowed_tools-lijsten doen de echte sandboxing (geen Bash, geen Edit
voor IDEA_GRILL/PLAN_CHAT). Plan-mode's "veiligheid" wordt al door
tool-allowlists geleverd; acceptEdits is hier puur om Claude door zijn
eigen update_job_status loop te laten lopen zonder approval-wachttijd.

Plus: docs/runbooks/{job-model-selection,worker-idempotency}.md tabellen
bijgewerkt. last_updated note in job-model-selection.md.

Verify: 587 tests in 78 files passed (incl. nieuwe lib/job-config tests).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: remove .claude/scheduled_tasks.lock per ongeluk meegecommit

Lokale tooling-lock-file van de cowork-skills, hoort niet in de repo.

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Janpeter Visser 2026-05-09 11:33:03 +02:00 committed by GitHub
parent 00c5045558
commit c2633695d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 20 additions and 12 deletions

View file

@ -128,7 +128,7 @@ Auto-generated on 2026-05-09 from front-matter and headings.
| [Branch, PR & Commit Strategy](./runbooks/branch-and-commit.md) | `runbooks/branch-and-commit.md` | active | 2026-05-03 | | [Branch, PR & Commit Strategy](./runbooks/branch-and-commit.md) | `runbooks/branch-and-commit.md` | active | 2026-05-03 |
| [Deploy-controle: triggers, labels, path-filter](./runbooks/deploy-control.md) | `runbooks/deploy-control.md` | active | 2026-05-07 | | [Deploy-controle: triggers, labels, path-filter](./runbooks/deploy-control.md) | `runbooks/deploy-control.md` | active | 2026-05-07 |
| [Vercel Deployment](./runbooks/deploy-vercel.md) | `runbooks/deploy-vercel.md` | active | 2026-05-03 | | [Vercel Deployment](./runbooks/deploy-vercel.md) | `runbooks/deploy-vercel.md` | active | 2026-05-03 |
| [Job-model-selectie per ClaudeJob-kind](./runbooks/job-model-selection.md) | `runbooks/job-model-selection.md` | active | 2026-05-09 | | [Job-model-selectie per ClaudeJob-kind](./runbooks/job-model-selection.md) | `runbooks/job-model-selection.md` | active | 2026-05-09 (idea-kinds + PLAN_CHAT permission_mode → acceptEdits) |
| [MCP Integration — Scrum4Me Tools](./runbooks/mcp-integration.md) | `runbooks/mcp-integration.md` | active | 2026-05-08 | | [MCP Integration — Scrum4Me Tools](./runbooks/mcp-integration.md) | `runbooks/mcp-integration.md` | active | 2026-05-08 |
| [v1.0 Smoke Test Checklist](./runbooks/v1-smoke-test.md) | `runbooks/v1-smoke-test.md` | active | 2026-05-04 | | [v1.0 Smoke Test Checklist](./runbooks/v1-smoke-test.md) | `runbooks/v1-smoke-test.md` | active | 2026-05-04 |
| [Worker idempotency & job-status protocol](./runbooks/worker-idempotency.md) | `runbooks/worker-idempotency.md` | active | 2026-05-09 | | [Worker idempotency & job-status protocol](./runbooks/worker-idempotency.md) | `runbooks/worker-idempotency.md` | active | 2026-05-09 |

View file

@ -3,7 +3,7 @@ title: "Job-model-selectie per ClaudeJob-kind"
status: active status: active
audience: [ai-agent, contributor] audience: [ai-agent, contributor]
language: nl language: nl
last_updated: 2026-05-09 last_updated: 2026-05-09 (idea-kinds + PLAN_CHAT permission_mode → acceptEdits)
when_to_read: "Vóór het wijzigen van model/thinking/permission-mode-keuze of bij debugging van 'verkeerd model gebruikt'-incidents." when_to_read: "Vóór het wijzigen van model/thinking/permission-mode-keuze of bij debugging van 'verkeerd model gebruikt'-incidents."
--- ---
@ -39,9 +39,9 @@ altijd kind-default — geen product- of task-override.
| Kind | Model | Thinking-budget | Permission-mode | max_turns | allowed_tools | | Kind | Model | Thinking-budget | Permission-mode | max_turns | allowed_tools |
|---|---|---|---|---|---| |---|---|---|---|---|---|
| `IDEA_GRILL` | `claude-sonnet-4-6` | 12 000 | `plan` | 15 | Read, Grep, Glob, WebSearch, AskUserQuestion | | `IDEA_GRILL` | `claude-sonnet-4-6` | 12 000 | `acceptEdits` | 15 | Read, Grep, Glob, WebSearch, AskUserQuestion |
| `IDEA_MAKE_PLAN` | `claude-opus-4-7` | 24 000 | `plan` | 20 | Read, Grep, Glob, WebSearch, AskUserQuestion, Write | | `IDEA_MAKE_PLAN` | `claude-opus-4-7` | 24 000 | `acceptEdits` | 20 | Read, Grep, Glob, WebSearch, AskUserQuestion, Write |
| `PLAN_CHAT` | `claude-sonnet-4-6` | 6 000 | `plan` | 5 | Read, Grep, AskUserQuestion | | `PLAN_CHAT` | `claude-sonnet-4-6` | 6 000 | `acceptEdits` | 5 | Read, Grep, AskUserQuestion |
| `TASK_IMPLEMENTATION` | `claude-sonnet-4-6` | 6 000 | `bypassPermissions` | 50 | (alle) | | `TASK_IMPLEMENTATION` | `claude-sonnet-4-6` | 6 000 | `bypassPermissions` | 50 | (alle) |
| `SPRINT_IMPLEMENTATION` | `claude-sonnet-4-6` | 6 000 | `bypassPermissions` | (geen) | (alle) | | `SPRINT_IMPLEMENTATION` | `claude-sonnet-4-6` | 6 000 | `bypassPermissions` | (geen) | (alle) |

View file

@ -161,9 +161,9 @@ Claude. De resolver in `lib/job-config.ts` exporteert
| Kind | Model | thinking_budget | --effort | permission_mode | | Kind | Model | thinking_budget | --effort | permission_mode |
|---|---|---|---|---| |---|---|---|---|---|
| `IDEA_GRILL` | sonnet-4-6 | 12000 | high | plan | | `IDEA_GRILL` | sonnet-4-6 | 12000 | high | acceptEdits |
| `IDEA_MAKE_PLAN` | opus-4-7 | 24000 | xhigh | plan | | `IDEA_MAKE_PLAN` | opus-4-7 | 24000 | xhigh | acceptEdits |
| `PLAN_CHAT` | sonnet-4-6 | 6000 | medium | plan | | `PLAN_CHAT` | sonnet-4-6 | 6000 | medium | acceptEdits |
| `TASK_IMPLEMENTATION` | sonnet-4-6 | 6000 | medium | bypassPermissions | | `TASK_IMPLEMENTATION` | sonnet-4-6 | 6000 | medium | bypassPermissions |
| `SPRINT_IMPLEMENTATION` | sonnet-4-6 | 6000 | medium | bypassPermissions | | `SPRINT_IMPLEMENTATION` | sonnet-4-6 | 6000 | medium | bypassPermissions |

View file

@ -70,10 +70,15 @@ const TASK_TOOLS = [
] ]
const KIND_DEFAULTS: Record<string, JobConfig> = { const KIND_DEFAULTS: Record<string, JobConfig> = {
// Idea-kinds en PLAN_CHAT draaien in `acceptEdits` (niet `plan`):
// `plan`-mode wacht op human-approval na elke planning-fase, wat in een
// autonome runner-context betekent dat Claude geen `update_job_status`
// aanroept en de job na lease-expiry FAILED'd. De `allowed_tools`-lijst
// doet de echte sandboxing (geen Bash, geen Edit, alleen Read/Grep/etc).
IDEA_GRILL: { IDEA_GRILL: {
model: 'claude-sonnet-4-6', model: 'claude-sonnet-4-6',
thinking_budget: 12000, thinking_budget: 12000,
permission_mode: 'plan', permission_mode: 'acceptEdits',
max_turns: 15, max_turns: 15,
allowed_tools: [ allowed_tools: [
'Read', 'Grep', 'Glob', 'WebSearch', 'AskUserQuestion', 'Read', 'Grep', 'Glob', 'WebSearch', 'AskUserQuestion',
@ -87,7 +92,7 @@ const KIND_DEFAULTS: Record<string, JobConfig> = {
IDEA_MAKE_PLAN: { IDEA_MAKE_PLAN: {
model: 'claude-opus-4-7', model: 'claude-opus-4-7',
thinking_budget: 24000, thinking_budget: 24000,
permission_mode: 'plan', permission_mode: 'acceptEdits',
max_turns: 20, max_turns: 20,
allowed_tools: [ allowed_tools: [
'Read', 'Grep', 'Glob', 'WebSearch', 'AskUserQuestion', 'Write', 'Read', 'Grep', 'Glob', 'WebSearch', 'AskUserQuestion', 'Write',
@ -99,9 +104,12 @@ const KIND_DEFAULTS: Record<string, JobConfig> = {
PLAN_CHAT: { PLAN_CHAT: {
model: 'claude-sonnet-4-6', model: 'claude-sonnet-4-6',
thinking_budget: 6000, thinking_budget: 6000,
permission_mode: 'plan', permission_mode: 'acceptEdits',
max_turns: 5, max_turns: 5,
allowed_tools: ['Read', 'Grep', 'AskUserQuestion'], allowed_tools: [
'Read', 'Grep', 'AskUserQuestion',
'mcp__scrum4me__update_job_status',
],
}, },
TASK_IMPLEMENTATION: { TASK_IMPLEMENTATION: {
model: 'claude-sonnet-4-6', model: 'claude-sonnet-4-6',