<< All versions

Skill v1.0.1

currentAutomated scan100/100
jcrabapple/hermes-skills/hermes-kanban-workflow
──Details
PublishedNovember 24, 2026 at 04:21 PM
Content Hashsha256:be5fd8da3d052c07...
Git SHA7c2975d79a3d
──Files
Files (1 file, 26.0 KB)
SKILL.md26.0 KBactive
SKILL.md · 203 lines · 26.0 KB

name: hermes-kanban-workflow description: "Hermes Kanban workflow playbook for both roles — orchestrator (decomposition, routing, anti-temptation rules) and worker (handoff shapes, retry diagnostics, edge cases). The basic lifecycle is auto-injected into every kanban process via KANBAN_GUIDANCE; this skill is the deeper playbook for both sides of the multi-agent board." version: 1.0.1 author: Hermes Agent license: MIT metadata: hermes: tags: [kanban, multi-agent, orchestration, worker, handoff, decomposition, dispatch] related_skills: [hermes-agent, coding-agent-cli]


Hermes Kanban Workflow

Single umbrella for the two roles on the Hermes Kanban board. The basic 6-step lifecycle (orient → work → heartbeat → block/complete) is auto-injected into every kanban process via the KANBAN_GUIDANCE system-prompt block — you do not need this skill for the basics. Load this skill when you need the deeper playbook for one of the two roles.

Which role are you?

If you are…Load this reference
Orchestrator (decomposition, routing, "don't execute the work yourself" rules)references/orchestrator.md
Worker (a kanban process dispatched to do a single card)references/worker.md

The two roles cross-reference each other. If you're the orchestrator, you'll often also want the worker's handoff patterns so you know what to ask for in kanban_complete/kanban_block calls. If you're the worker, you'll often want the orchestrator's decomposition patterns so you can request the right parents.

Profiles are user-configured — not a fixed roster

Hermes setups vary widely. Some users run a single profile that does everything; some run a small fleet (docker-worker, cron-worker); some run a curated specialist team they've named themselves. There is no default specialist roster — the orchestrator skill does not know what profiles exist on this machine.

Before fanning out, the orchestrator must ground the decomposition in the profiles that actually exist:

  • hermes profile list — prints the table of profiles configured on this machine
  • kanban_list(assignee="<some-name>") — sanity-check a single name (returns empty list, not error, for unknown assignees)
  • Just ask the user. "What profiles do you have set up?" is a fine first turn when the goal needs more than one specialist

The dispatcher silently fails to spawn unknown assignee names — it doesn't autocorrect, doesn't suggest, doesn't fall back. A card assigned to researcher on a setup that only has docker-worker just sits in ready forever. This is the single most common orchestrator failure mode.

Jason's coding-project routing (standing preference)

For coding projects in this setup, the default profile orchestrates with Kimi K3.1 Pro via Kimi Code (1,048,576-token context). Route implementation cards to coder (Software Engineer), whose profile is pinned to kimi-for-coding on Kimi Code, and review cards to reviewer, pinned to Gemini 3.8 Flash via Solstice (1M-token context). Use the profiles' existing pins without per-card model or provider overrides. kimi-for-coding is an alias: do not bake its currently advertised underlying Kimi version into plans or documentation.

The normal graph is default plans/decomposes -> coder implements and tests -> reviewer performs a blind, read-only review -> coder fixes findings -> reviewer re-reviews -> default verifies integration and reports. Give reviewers the original acceptance criteria, raw diff/files, and exact validation commands, never the implementer's self-assessment. Independent implementation lanes may run concurrently only when file ownership and build resources will not collide.

Trivial changes are the exception: the default model may directly handle small, localized, low-risk edits without creating cards or requiring delegated review. If blast radius or validation is uncertain, treat the work as nontrivial and use the full loop.

Do not use OpenRouter for coding or code review by default. If a pinned subscription route is unavailable, surface the failure and ask before choosing a fallback; do not silently implement nontrivial work in the orchestrator or reroute to OpenRouter. This preference does not change auxiliary-model or cron-job routing: those may remain on OpenRouter with Crusoe preferred, then Cloudflare, for greener inference.

When to use the board (vs. just doing the work)

Create Kanban tasks when any of these are true:

  1. Multiple specialists are needed (research + analysis + writing is three profiles)
  2. The work should survive a crash or restart (long-running, recurring, or important)
  3. The user might want to interject (human-in-the-loop at any step)
  4. Multiple subtasks can run in parallel (fan-out for speed)
  5. Review / iteration is expected (a reviewer profile loops on drafter output)
  6. The audit trail matters (board rows persist in SQLite forever)

If none of those apply — small one-shot reasoning task — use delegate_task instead or answer the user directly.

Never route coding work through hosted bot rooms

Hosted bot rooms (Bot Mode group chats) are deliberation machines, not workbenches. The member-turn prompt is conversational by design: "Reply with one conversational message only when you have something new worth adding," else reply "(pass)", capped at 3 rounds / 10 messages per send, with each member seeing only the recent message delta (~24 lines). Nothing in the room prompt asks for artifacts, tool use, or completion — so members produce prose, not diffs, regardless of model quality. A stronger model just chats more articulately.

  • Use rooms for: design arguments, triage, verdicts, "X or Y" decisions that finish in a verdict before any card exists.
  • Use the board for: build, fix, ship — anything with an artifact and a completion contract.
  • If a user reports "the bots talk forever without doing anything," this is the cause; re-route execution to cards, not to better models.
  • Flash-tier models with tool_use_enforcement: auto make it worse (talk is the cheapest move), but upgrading models does not fix a chat-shaped prompt.

For in-session fan-out, delegate_task children also die with the session and share the parent cwd; give parallel code-editing children worktree kanban workspaces (or git worktrees) so they don't collide.

Cards land on the board the current symlink points at

~/.hermes/kanban/current decides where kanban_create puts a card, and it has no board argument: a Waypoint card created while current was ptv landed on the PTV board even though a waypoint board existed. Check cat ~/.hermes/kanban/current before fanning out, switch with hermes kanban boards switch <slug>, and use the global hermes kanban --board <slug> … form for CLI reads afterwards (the tool calls take a board argument). Cards cannot be moved between boards, so a wrong-board card is cosmetic unless per-board automation depends on it.

Check the orchestrator's kanban toolset is enabled

Before telling the orchestrator profile to "use Kanban", verify it has the toolset: hermes -p <profile> tools list | grep kanban. If it shows ✗ disabled, run hermes -p <profile> tools enable kanban. Without it the agent must shell out to hermes kanban via terminal instead of calling kanban_create/kanban_assign/kanban_complete as real tools, which is clunkier and error-prone. Toolset changes take effect in a NEW session, not the current one.

Cross-role shared concepts

These are explained in detail in the role-specific references, but are shared between orchestrator and worker:

  • Workspace kinds (scratch, dir:<path>, worktree) — how the worker should behave in $HERMES_KANBAN_WORKSPACE. See references/worker.md §"Workspace handling".
  • Tenant isolation — if $HERMES_TENANT is set, prefix memory entries with the tenant. See references/worker.md §"Tenant isolation".
  • `kanban_complete` vs `kanban_request_review` vs `kanban_block` — a code-changing card that needs review calls kanban_request_review(summary=..., reviewer=..., metadata=...). It moves the card to the review column and is not a blocker, so review cycles never trip block-loop accounting. The reviewer approves with kanban_complete or returns work with kanban_request_changes. kanban_block is for genuine external escalation only. See references/worker.md §"Good summary + metadata shapes".
  • `created_cards` claim on completion — pass the IDs you captured from successful kanban_create returns. Never invent IDs. The kernel rejects phantom IDs. See references/worker.md §"Claiming cards you actually created".
  • Goal-mode cards — goal_mode=True wraps a worker in a Ralph-style goal loop for "keep going until X is true" tasks. See references/orchestrator.md §"Goal-mode cards (persistent workers)".
  • Stuck-worker recovery — Reclaim / Reassign / Change profile model. See references/orchestrator.md §"Recovering stuck workers".

Codex-as-implementation-lane (cross-role)

When you want to use Codex CLI as an isolated implementation lane (Hermes owns the kanban lifecycle, Codex produces a diff in a worktree that you review and reconcile):

Single-profile operation

Many setups have only one profile (e.g., default). This is fine — the dispatcher serializes tasks assigned to the same profile, so a single-profile board simply processes cards one at a time in priority order. When only one profile exists:

  • All cards go to `default` — there is no specialist routing.
  • Dependencies matter more than routing — use parents=[...] to enforce execution order, since the dispatcher can't parallelize across profiles.
  • Goal-mode is valuable — since one profile handles everything, goal-mode ensures each card gets enough turns to reach acceptance criteria without blocking the queue. Size the budget to the task: 15-25 for medium tasks (5-15 files), 30-40 for large tasks (20-50 files). See references/orchestrator.md §"Goal-mode budget sizing" for the full table.
  • `--priority` controls execution order — higher priority cards claim first when multiple are ready.
  • Batch creation via `execute_code` — see the CLI fallback section for the pattern.

Common patterns

MoA-research → plan → Kanban graph: A productive pattern for large projects. First dispatch N parallel delegate_task subagents to research different dimensions of the problem (codebase, bugs/security, API compat). Synthesize their outputs into a single plan document. Then decompose the plan into a Kanban task graph with dependency links, goal-mode, priorities, and idempotency keys. This separates the research/planning phase (parallel, stateless) from the execution phase (serialized, tracked, goal-gated). See references/orchestrator.md §"Large-project decomposition pattern" for the full workflow.

Live testing after board completion: When all kanban tasks are done and the code is committed, the user will want to test the app. For web apps, see references/dev-server-lan-testing.md for the full guide. Key points: start Vite with npx vite dev --host 0.0.0.0 --port 5173 (not pnpm run dev -- --host which may not pass the flag), verify with ss -tlnp | grep <port> that it's on 0.0.0.0 not 127.0.0.1, find the LAN IP, and give the user http://<LAN-IP>:<port>/login/. OAuth redirect URIs use location.origin dynamically. The Camofox browser tool can't run JS — verify with curl and have the user test in a real browser.

Parallel implementation + validation: one implementer card makes the change while one explorer/researcher card verifies config, docs, or source mapping. A reviewer card can depend on both. Do not make the implementer own unrelated verification just because the user mentioned both in one sentence. Orchestrator's job.

Orchestrator-authored fixes need an explicit review annotation: when you commit a correction on top of a lane's work while its review card is open, kanban_comment on the review card naming the extra commit (hash + prefix) and what it fixes — reviewers only diff what the card's summary tells them to look at, and unannotated orchestrator commits silently escape review.

Verify red-checks in the review gate, not just collect them. Workers hand off code with REDCHECK markers (temporary mutation of the just-written logic + tests, to prove the tests fail when the logic is broken). The marker count reaching 0 is NOT proof: a mutation may be dead code the tests never exercise. Before accepting a lane, re-run the red-check yourself for each claimed marker — apply the mutation, run the targeted tests, confirm they actually FAIL, restore. If a claimed red-check passes vacuously, suspect the test harness: make the test client's HTTP configuration identical to the production client's (response validation, interceptors, status assertions) — a config mismatch routes the failure through a different code path (e.g. a generic ResponseException handler) and the test under review passes even though the mapping is dead.

Replay the claimed mutation, not a weaker one. For a stale-result/generation guard, disabling only the guard often passes vacuously because job cancellation still wins the race deterministically; neutralize BOTH the cancellation and the guard (or use the exact mutation the worker recorded) before calling the check unreproducible. Likewise, a callback-identity mutation must compile — use a fully-qualified constructor/copy when the production file does not import the type, rather than concluding the red-check is bogus from a compile failure.

Test-only review findings have no red. When a finding asks only for assertions on behavior already implemented, the new tests pass immediately by design; record that as "could not be made red" in the triage/handoff instead of mutating unrelated production code to force a failure.

Use the packet, not the repo, for blind review. A ready-to-fill packet template is at templates/blind-review-packet-prompt.md.

Kanban reviewer dispatch can hard-fail; fall back to a reviewer one-shot. Failure signature (seen 2026-11-02, 4+ attempts across two boards): dispatcher spawns the reviewer worker, the owner admits the claim (owner_admitted event), a kanban session row is created in the reviewer profile — and then prompt.receipt returns unknown, the worker exits 1 with "Kanban execution unknown; retained by owner", and the card crash-blocks after max-retries. No reviewer message ever lands (check sqlite3 ~/.hermes/profiles/<reviewer>/state.db "SELECT ... FROM messages" — only interrupted-delivery notes). hermes -p reviewer -z "reply ok" works, so the profile is healthy; the gateway-side kanban path is what breaks. Working fallback that preserves blind review: build a packet dir (SPEC.md + change.diff + files/ full copies + PROMPT.md with the verdict format), run cd <packet> && hermes -p reviewer -z "$(cat PROMPT.md)" (promotes to a background process at ~10+ min; poll with process_manage), then record the verdict with hermes kanban comment <task_id> "$(cat verdict.md)". To return work without an active review run (crashed dispatch leaves the card blocked, so kanban request-changes refuses): hermes kanban assign <task_id> <implementer> then hermes kanban reopen-review <task_id> — that lands the card back in ready on the implementer. Do not burn turns debugging the dispatcher mid-task; flag it to the user at the end.

Pipeline with gates: planner → implementer → reviewer. Each stage's parents=[previous_task]. The implementer hands off with kanban_request_review; the reviewer approves with kanban_complete or returns it with kanban_request_changes, which requeues the implementer without block-loop accounting. Orchestrator's job.

Review failure after downstream auto-promotion (race brake): when a blind review returns changes-required, the NEXT card in the chain may already have promoted and started — dependency gating only fires on completion events, and a worker can be mid-mutation by the time the verdict lands. Recovery order matters:

  1. kanban_comment a STOP order on the running downstream card (hold before any install/apply/send/restart). Best-effort only — a comment is not a brake.
  2. hermes kanban reclaim <task_id> (CLI) — the only real brake; it terminates the worker and demotes the card. Reclaim BEFORE re-gating, because kanban_link refuses a new parent on a child that is currently running.
  3. Build the whole fix chain in a non-dispatchable state FIRST: create the fix card with initial_status="blocked", create the re-review card as its child (auto-gated), leave the integration card in todo. Only then unblock the fix card. Creating fix cards ready-first lets the dispatcher race one of them into running before the gates exist.
  4. Link the fix card and re-review card as parents of the integration card so it stays gated until both close.

A reclaim mid-run means the interrupted worker may have left partial state (a half-applied policy, a staged file). The integration card's re-verify step must check git status/workspace diffs for leftovers from the killed run, not just rerun tests.

Live-state integration cards need explicit mutation scope and superseded-comment bookkeeping:

  • When a fix loop touches code that a RUNNING integration card has already applied to live state (cron delivery targets, sent messages, installed wrappers), scope the fix card to "work only in the repo and temp test homes; do NOT mutate real Hermes state" and give the live-state mutation work to the integration card only. A coder fixing code while the integrator holds live mutations prevents half-migrated state.
  • When live behavior has a "first send must not dump history" property (digests, digests-of-digests, notification sweeps), baseline cursors to the newest existing run BEFORE the first real send. Apply-time baselining beats send-time baselining: a baseline computed at send time races the jobs that ran between apply and send.
  • A STOP comment on a gated card survives on the thread after the situation changes. Post an explicit superseding comment ("the earlier STOP is superseded: <why>") — workers reading the thread act on the LATEST comment, and a stale STOP with no supersession stalls the card forever.
  • Dry-run of a consuming pipeline must never advance persistent "seen" state, and its report must flag jobs whose cursor is missing (jobs_without_baseline) so the integrator baselines before --send instead of shipping a backlog.

Plan-doc-as-contract for build → review → activate graphs: for a multi-lane project, write the full acceptance plan (architecture, constraints, test gates, rollout steps) as a doc committed in the project repo FIRST, then create the card graph — implementer (builds + tests), blind reviewer (judges against the doc), integration (verifies + installs + activates) — with each card pointing at the doc instead of restating the spec in its body. Give all lanes the same shared dir: workspace when they build on one repo, chain them with parents, set an idempotency_key per card, and size goal-mode budgets per lane (implementation largest, review smallest). The integration card must re-verify worker claims itself (rerun the tests and red-checks, read the diff) before activating — self-reported success is exactly what the last lane exists to catch.

Shared-file hotfixes use the orchestrator grant, not a new OWNERS lane. When a fix touches a file no existing lane owns (shell wiring, DI root, navigation registry, OWNERS.yml itself), run the gate as LANE=orchestrator on the same diff instead of creating a one-off lane. Lane globs encode permanent ownership boundaries; the orchestrator grant is the escape hatch for integration-owned files. Record which grant a mixed-diff used in the handoff so the reviewer can check the lane choice rather than chasing a phantom ownership gap.

Merge-and-verify sequencing for lane integration. When all reviews on a lane APPROVE: merge the lane into main, commit the orchestrator-owned wiring (DI bindings, navigation, status/resume docs) as separate commits, run the full gate on main itself (LANE=orchestrator BASE=HEAD), then push and watch CI. Do not push before the merged-main gate passes: a gate on the lane branch proves the lane, not the merge, and detekt or ktlint findings that only exist after the merge are the ones reviewers never saw. Update the project's status/resume doc as part of the same integration step — a landed lane that the resume doc doesn't record is unfindable by the next session.

Don't restock the red-checks either. Worker claims of red-checks (tests mutated to fail) must be replayed against production code before counting them as evidence; equally, when a fix round adds regression tests, mutate the production code deliberately once to confirm each new test actually fails — a regression test that passes even when the bug is reintroduced is decoration.

Do not gate a review/follow-up card on a parent still in `review`. Dependency gating releases children only when a parent reaches done, so a child created under a parent in the review column sits in todo through the review. Either wait for the parent to close, create the follow-up unlinked, or unlink the edge and promote the child. Do not work around it by marking the parent done before its review passes.

Repo-facing cards must be created with `workspace_kind="dir"` and an absolute `workspace_path`. A card created without them lands in a scratch workspace, where a coder or reviewer cannot see the real repo. If one was already created wrong, archive it and recreate it with the correct workspace rather than trying to patch the workspace after dispatch.

Checkpoint long-running goal-mode reviews with a verdict-forcing comment. When a reviewer card keeps heartbeating well past its expected duration without a verdict, post a comment asking it to conclude from the evidence gathered so far. This converts a silent stall into PASS or numbered changes instead of another polling loop.

Same-profile queue: N tasks, all assigned to the same profile, no dependencies between them. Dispatcher serializes — that profile processes them in priority order, accumulating experience in its own memory. Orchestrator's job; worker just handles each card as it arrives.

Human-in-the-loop: Any task can kanban_block() to wait for input. Dispatcher respawns after /unblock. The comment thread carries the full context. Worker's job; orchestrator may also block if it needs design clarification.

CLI fallback (for scripting)

Every kanban_* tool has a CLI equivalent for human operators and scripts. The CLI is also usable from execute_code via subprocess.run(["hermes", "kanban", ...]) — useful for batch-creating task graphs (see references/cli-commands.md for the full flag reference).

ToolCLI
kanban_showhermes kanban show <id> --json
kanban_completehermes kanban complete <id> --summary "..." --metadata '{...}'
kanban_blockhermes kanban block <id> "reason"
kanban_createhermes kanban create "title" --assignee <profile> [--parent <id>]
Board createhermes kanban boards create <slug> --name "Display Name" --switch
Board switchhermes kanban boards switch <slug>
Board listhermes kanban boards list
Task list (JSON)hermes kanban list --json

Pitfall: --board <slug> is NOT a valid flag for hermes kanban create. Boards are selected by switching (hermes kanban boards switch <slug>) or by passing --switch during board creation. Attempting --board will fail with an argparse error about unrecognized arguments.

Pitfall: hermes kanban boards create takes the slug as a positional argument, not --slug. The display name is --name, not positional. Run hermes kanban boards create --help if unsure.

Use the tools from inside an agent; the CLI exists for the human at the terminal. The CLI is unavailable inside Docker/Modal/SSH terminal backends because the hermes binary isn't installed there — use the tools.

Batch task creation via execute_code

When creating a task graph with many cards and dependency links, calling kanban_create one at a time is tedious. Use execute_code with a Python helper that calls subprocess.run(["hermes", "kanban", "create", ...]) and captures the JSON task_id from each response, then passes it as --parent to dependent cards. Key flags for project planning: --goal + --goal-max-turns N for open-ended tasks, --priority N for ordering, --workspace dir:/path/to/project for shared project directory, --idempotency-key <unique-string> to prevent duplicate cards on re-runs.

References (full role playbooks)

All versions