feat: add 3 authoring tools — create_pbi / create_story / create_task

Tot nu toe konden MCP-tools alleen bestaande stories/tasks bewerken
(update_task_status, log_*). Met deze drie tools kan Claude Code een
volledige backlog vanaf nul opbouwen — handig voor nieuwe projecten waar
het Scrum4Me-product nog leeg is.

- create_pbi: { product_id, title, description?, priority, sort_order? }
  Auto sort_order = last+1 binnen prio-groep. Code-veld blijft null
  (Scrum4Me-app genereert auto-codes via UI/seed).
- create_story: { pbi_id, title, description?, acceptance_criteria?, priority,
  sort_order? } — product_id afgeleid uit PBI (denormalized FK conform CLAUDE.md
  convention; nooit op client-input vertrouwen). Status='OPEN' default →
  landt in product-backlog, niet auto in een sprint.
- create_task: { story_id, title, description?, implementation_plan?, priority,
  sort_order? } — sprint_id geërfd van story. Status='TO_DO' default.

Alle drie achter `requireWriteAccess` (PERMISSION_DENIED voor demo) +
`userCanAccessProduct` op de relevante parent-product. Mirror van het
create-todo-patroon.

scripts/smoke-test.ts: tool-count check 13 → 16. README.md: tool-tabel
uitgebreid.

Quality gates: typecheck clean, build success, smoke-test toont 16 tools.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Janpeter Visser 2026-04-29 15:52:15 +02:00
parent 4088ae2692
commit 6fd2cc83de
6 changed files with 237 additions and 1 deletions

View file

@ -18,6 +18,9 @@ activity and create todos via native tool calls instead of curl.
| `log_test_result` | Append TEST_RESULT (PASSED/FAILED) | no |
| `log_commit` | Append COMMIT with hash and message | no |
| `create_todo` | Add a todo, optionally scoped to a product | no |
| `create_pbi` | Add a Product Backlog Item to a product (auto sort_order) | no |
| `create_story` | Add a story under a PBI (status=OPEN, lands in product backlog) | no |
| `create_task` | Add a task under a story (status=TO_DO, inherits sprint_id) | no |
| `ask_user_question` | Post a question to the active user about a story; optional `wait_seconds` (max 600) polls for the answer | no |
| `get_question_answer` | Fetch the current status + answer of a previously-asked question | n/a |
| `list_open_questions` | List own open/answered questions, most recent first (max 50) | n/a |