Skip to content

Add kanban_bulk_create_tasks tool for batch task creation#80

Open
rephapeng wants to merge 1 commit into
anvie:mainfrom
rephapeng:feat/kanban-bulk-create-tasks
Open

Add kanban_bulk_create_tasks tool for batch task creation#80
rephapeng wants to merge 1 commit into
anvie:mainfrom
rephapeng:feat/kanban-bulk-create-tasks

Conversation

@rephapeng

@rephapeng rephapeng commented Jun 24, 2026

Copy link
Copy Markdown

Summary

Adds a kanban_bulk_create_tasks tool to the kanban skill so an agent can create several board tasks in a single call, instead of issuing one kanban_create_task call per task.

Why

When asked to create several tasks at once (e.g. a multi-step plan like 9B/9C/9D), the model naturally reaches for a single "bulk create" call. Since no such tool existed, it would hallucinate a kanban_bulk_create_tasks call. The quality monitor then rejected the unknown tool, and after the 2-correction cap the model frequently gave up and falsely reported a "board/registry error server-side" — so the tasks were never created at all.

Providing the real tool removes that failure at the source: the call the model already wants to make now exists and succeeds.

What it does

  • skills/kanban/backend/tools/kanban_bulk_create_tasks.py — wraps kanban_create_task.execute once per item, so permission checks, validation, and single-task dependency handling stay byte-for-byte identical to the single-create path. The sibling tool is loaded by file path because skills/ is not an importable package.
  • skills/kanban/tools.json — registers the tool schema so it's exposed to the agent.

Behaviour

  • Accepts a tasks array (max 50 per call). Each item takes the same fields as kanban_create_task (title required; description, priority, assignee, dependencies optional).
  • Partial-on-error: a failure on one task does not abort the rest. Returns {status, created_count, task_ids, results, errors} where status is:
    • success — all created
    • partial — some failed
    • error — all failed
  • Intra-batch dependencies via depends_on_index (1-based index of an earlier task in the same batch). The referenced task's real id is resolved once it is created, so e.g. 9C/9D can depend on 9B without knowing its id in advance.

Testing

  • python -c "import ast; ast.parse(...)" — tool module parses
  • json.load(...) on skills/kanban/tools.json — schema is valid JSON

When asked to create several tasks at once, the model reaches for a single bulk
call. Without such a tool it hallucinates `kanban_bulk_create_tasks`; the quality
monitor rejects it, and after the 2-correction cap the model often gives up and
falsely reports a "board/registry error server-side" — so the tasks never get
created (observed with the 9B/9C/9D plan).

Provide the real tool. It wraps kanban_create_task.execute per item (identical
permission/validation), creates partial-on-error, and supports intra-batch
dependencies via depends_on_index (1-based index of an earlier task in the same
batch) so e.g. 9C/9D can depend on 9B before its id exists.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant