Skip to content

feat(kanban): add orchestrator board tools — kanban_list + kanban_unblock (carve-out of #20568)#23012

Merged
teknium1 merged 5 commits into
mainfrom
salvage/pr-20568-kanban-list-unblock
May 10, 2026
Merged

feat(kanban): add orchestrator board tools — kanban_list + kanban_unblock (carve-out of #20568)#23012
teknium1 merged 5 commits into
mainfrom
salvage/pr-20568-kanban-list-unblock

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Adds two new orchestrator-only Kanban tools (kanban_list, kanban_unblock) that close the discovery + recovery gap orchestrator profiles hit on a real board. Workers (HERMES_KANBAN_TASK set) keep their focused 7-tool surface; profiles with toolsets: [kanban] and no task scope additionally see the two routing tools.

Why these two and not all four

The original PR added 4 orchestrator tools (kanban_list, kanban_assign, kanban_unblock, kanban_archive). This salvage keeps the two without workarounds:

  • kanban_list is the discovery primitive — without it an orchestrator can call kanban_show(t_abc) only if it already has the ID. There's no other tool path to enumerate "what's in triage / blocked / P1".
  • kanban_unblock is the recovery primitive — orchestrators routinely sweep the blocked column and lift blocks once external dependencies clear. No tool path otherwise (workers can't unblock foreign tasks, and the existing kanban_block is the inverse only).

kanban_assign and kanban_archive are deferred — orchestrators can punt assign via kanban_create(parents=[...]) workarounds and archive via kanban_complete. We can revisit if real users complain. Schema bloat is paid by every orchestrator turn; +2 tools instead of +4 is meaningful.

Two-tier gating (orchestrator vs worker)

Adopted from the upstream PR's last commit: board-routing tools (kanban_list, kanban_unblock) use a separate _check_kanban_orchestrator_mode() gate that returns False whenever HERMES_KANBAN_TASK is set — so dispatcher-spawned task workers see only their 7 lifecycle tools (show/complete/block/heartbeat/comment/create/link). The worker-vs-orchestrator distinction is enforced both at schema-registration time (check_fn) and at handler-entry time (_require_orchestrator_tool runtime guard) for defense in depth.

Changes

  • tools/kanban_tools.py: add kanban_list + kanban_unblock schemas/handlers; introduce _check_kanban_orchestrator_mode() and _require_orchestrator_tool() gates; kanban_list is bounded to 50 rows by default / 200 max with truncated + next_limit metadata so the model can paginate without dumping the board.
  • toolsets.py: add the two new tools to the kanban toolset.
  • tests/tools/test_kanban_tools.py: schema visibility tests for all three roles (worker / orchestrator / normal chat); handler happy-path + error-case coverage for both new tools; regression test that a worker with toolsets: [kanban] in config still does NOT see board-routing tools.
  • website/docs/user-guide/features/kanban.md + kanban-tutorial.md: list the two new tools in the worker tool table; clarify the worker-vs-orchestrator visibility split.

Validation

Before After
tests/tools/test_kanban_tools.py 36/36 55/55
tests/hermes_cli/test_kanban_db.py + test_kanban_core_functionality.py + test_kanban_cli.py n/a 255/255
E2E orchestrator (toolsets: [kanban], no env) only had 7 worker tools at best all 9 (7 + list + unblock)
E2E worker (HERMES_KANBAN_TASK set) n/a 7 lifecycle tools, no list/unblock
E2E normal chat 0 0

Closes #20048 via salvage. Carve-out of #20568; original commits by @kallidean (Eric Litovsky) preserved in the cherry-picked feat + parsing fixes; the orchestrator-restriction commit is co-authored to retain credit for the two-tier gating design. AUTHOR_MAP entry added.

Issues #19931, #19932, and #20157 — the bigger architectural asks (specialist worker lane contracts, persistent lane registry, GitHub bridge) — are NOT addressed here. They were clustered with #20048 in triage but are separate scope and need a design call before any implementation.

kallidean and others added 5 commits May 9, 2026 23:00
Adapted from PR #20568 commit ce35185 (Eric Litovsky / @kallidean).
Adds two-tier gating for the kanban tool surface so dispatcher-spawned
workers see only task-lifecycle tools (show/complete/block/heartbeat/
comment/create/link) while orchestrator profiles with `toolsets: [kanban]`
also see board-routing tools (kanban_list, kanban_unblock).

Workers shouldn't be enumerating or unblocking the board — they should
close their own task via the lifecycle tools. Hiding board-routing tools
from worker schemas keeps the worker focused and the toolset-isolation
contract honest.

Plus inherited from the same upstream commit:
- 50/200 row bound on kanban_list with `truncated` + `next_limit` metadata.
- Belt-and-suspenders runtime guard `_require_orchestrator_tool()` inside
  the orchestrator handlers in case a stale registration ever routes a
  worker to one of them.
- Tests for the new gate, the stricter bound, and the fact that even a
  worker with `toolsets: [kanban]` in config still doesn't see board
  routing.

Co-authored-by: Eric Litovsky <elitovsky@zenproject.net>
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: salvage/pr-20568-kanban-list-unblock vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 7971 on HEAD, 7967 on base (🆕 +4)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4210 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/feature New feature or request comp/tools Tool registry, model_tools, toolsets comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have labels May 10, 2026
@teknium1 teknium1 merged commit ce374bc into main May 10, 2026
16 of 19 checks passed
@teknium1 teknium1 deleted the salvage/pr-20568-kanban-list-unblock branch May 10, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins comp/tools Tool registry, model_tools, toolsets P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add kanban_list, kanban_unblock, kanban_assign, kanban_archive tools for orchestrator profiles

3 participants