Kanbanzai kanbanzai-agents
git clone https://github.com/sambeau/kanbanzai
T=$(mktemp -d) && git clone --depth=1 https://github.com/sambeau/kanbanzai "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.agents/skills/kanbanzai-agents" ~/.claude/skills/sambeau-kanbanzai-kanbanzai-agents && rm -rf "$T"
.agents/skills/kanbanzai-agents/SKILL.mdSKILL: Kanbanzai Agents
Purpose
How agents interact with the Kanbanzai system: assembling context, dispatching and completing tasks, writing commits, contributing knowledge, and spawning sub-agents.
When to Use
- Before starting implementation work on any task
- When dispatching or completing tasks
- When writing commit messages
- When contributing knowledge entries after completing work
- When spawning sub-agents for parallel or delegated work
Vocabulary
| Term | Definition |
|---|---|
| context packet | The byte-budgeted bundle of spec sections, knowledge entries, file paths, and role instructions returned by when claiming a task |
| task claim | Calling to transition a task from to and receive its context packet |
| finish summary | The field passed to — institutional memory describing what was accomplished and decisions made |
| knowledge entry | A concise, actionable statement contributed to the knowledge base via or |
| retrospective signal | A structured observation about friction or positive patterns, passed via |
| commit discipline | The practice of committing at logical checkpoints with properly formatted messages, including files |
| sub-agent delegation | Spawning a sub-agent to handle a task, using to generate a self-contained prompt |
| handoff prompt | The Markdown prompt generated by containing all context a sub-agent needs |
| store discipline | Treating files as versioned project state — committing them alongside the work that produced them |
| verification performed | The field in describing what testing was done |
Task Lifecycle Checklist
Copy this checklist when starting any task:
- Claimed the task with
— context assemblednext(id: "TASK-xxx") - Read the assembled context (spec sections, knowledge entries, file paths)
- Confirmed the parent feature is in the correct lifecycle state
- Implemented the changes
- Ran tests (
) and they passgo test ./... - Committed with a properly formatted message (see Commit Message Format)
- Completed the task with
finish(task_id: "TASK-xxx", summary: "...", verification: "...") - Included retrospective observations if any friction was encountered
Context Assembly
Before beginning any task, assemble context by claiming it:
- Call
with a task ID to claim the task and receive a context packet containing role instructions, relevant knowledge entries, design context, and task details.next - The packet is byte-budgeted and prioritised — it contains what matters most for this task and role.
- To generate a prompt for a sub-agent instead, call
with the task ID — it produces a self-contained Markdown prompt ready for delegation.handoff
After completing the task, maintain the knowledge base:
- Call
action:knowledge
on entries that were accurate and useful — their use count increments and confidence grows.confirm - Call
action:knowledge
on entries that were incorrect or misleading — their miss count increments; repeatedly-flagged entries are auto-retired.flag
Task Dispatch and Completion
Picking up work
- Call
(without an ID) to see ready tasks, sorted by priority.next - Call
with a task ID to claim it. This moves it fromnext
toready
and returns a context packet.active - Do the work.
Finishing work
Call
finish with:
— the task being completedtask_id
— brief description of what was accomplishedsummary
— files created or changedfiles_modified
— what testing or verification was doneverification
— any reusable knowledge learned during the taskknowledge
Feature Completion
When
status shows an attention item like "FEAT-xxx has N/N tasks done — ready to advance to reviewing", the feature is ready for close-out. Follow this procedure:
- Transition the feature:
entity(action: "transition", id: "FEAT-xxx", status: "reviewing") - PR and merge (if a worktree exists):
, thenpr(action: "create", entity_id: "FEAT-xxx")
, thenmerge(action: "check", entity_id: "FEAT-xxx")
. If the tools returnmerge(action: "execute", entity_id: "FEAT-xxx")
(no worktree), skip these steps.not_applicable - Clean up:
if applicable.worktree(action: "remove", entity_id: "FEAT-xxx")
For the full close-out procedure, see
.kbz/skills/orchestrate-development/SKILL.md Phase 6.
Commit Message Format
Every commit follows this format:
<type>(<object-id>): <summary>
Types
| Type | When to use |
|---|---|
| New feature behaviour |
| Bug fix |
| Documentation change |
| Test-only change |
| Behaviour-preserving structural improvement |
| Workflow-state-only change |
| Decision-record change |
| Small maintenance, no better category |
Add
! after the type for breaking changes: feat(FEAT-001)!: description
Examples
feat(FEAT-152): add profile editing API and validationfix(BUG-027): prevent avatar uploads hanging on large filesworkflow(TASK-152.3): mark upload task complete after verification
Bad vs. Good
Bad:
fix: update code — No scope, no description of what changed.
Good: fix(validate): reject task finish when parent feature is in draft
Bad:
feat: add new feature — Every feature commit "adds a new feature".
Good: feat(mcp): add context budget estimation to handoff tool
Commit discipline
- Commit at logical checkpoints — after completing a coherent change, before starting a risky edit.
- Do not commit directly to
. Work on feature or bug branches.main - MCP tools now auto-commit
changes after each operation (.kbz/state/
,entity
,doc
,finish
,decompose
, etc.). Manual commits for state files are no longer required.merge - Manual commits are still needed for work files — Go code, markdown docs
not managed by
, and any other non-state changes.doc register - The
check at session start remains a safety net: orphanedgit status
files from interrupted sessions are rare but still worth committing before starting new work..kbz/state/
Knowledge Contribution
When you learn something useful during a task, contribute it:
knowledge( action="contribute", topic="<topic>", content="<concise actionable statement>", scope="<role or 'project'>", tier=3, learned_from="<task-id>" )
- Tier 3 — session-level; expires after 30 days without use.
- Tier 2 — project-level; the system promotes tier-3 entries automatically when used repeatedly.
Good entries are concise, actionable, and specific. "The API returns 404 for deleted users, not 410" is good. "Be careful with the API" is not.
Entity Names
Every entity (plan, feature, task, bug, decision) requires a
name field. These rules
apply to all entity types.
Hard Rules
These are code-enforced. Violations are rejected with an error:
- Required —
must be set on every entity. Never omit it.name - 60-character maximum.
- No colon (
).: - No phase or version prefix — do not start a name with a pattern like
,P4
, orP8
followed by a space or dash. The phase is already encoded in the entity's parent field.P11 - Leading/trailing whitespace is stripped automatically.
Quality Guidance
- Target approximately four words. If you need more than five or six, the scope is too broad or the name is doing the summary's job.
- No em-dashes as separators. Hyphens in compound technical terms are fine
(
), but not"Human-friendly ID display"
."P8 — decompose" - A name should not be merely the slug capitalised.
→init-command
adds nothing. Prefer"Init command"
or"Project init command"
."Init and skill install" - Names must be self-contained — readable without knowing the parent entity.
is ambiguous;"Update agents"
is not."Update AGENTS.md layout" - Do not include the parent plan or feature name in the entity name — the hierarchy is visible from the parent field.
Examples
Good names:
| Entity | Name | Why |
|---|---|---|
| Plan | Kanbanzai 2.0 | Short, identity-oriented |
| Feature | Human-friendly ID display | ~4 words, no prefix, self-contained |
| Feature | Init and skill install | ~4 words, descriptive, no prefix |
| Task | Server info tool | ~3 words, clear |
| Task | Label model and storage | ~4 words |
| Decision | Use TSID for entity IDs | Self-contained, concise |
Bad names:
| Entity | Name | Problem |
|---|---|---|
| Plan | P4 Kanbanzai 2.0: MCP Tool Surface Redesign | Phase prefix + colon |
| Feature | P8 — decompose propose Reliability Fixes | Phase prefix + separator dash |
| Feature | The kanbanzai init command: creates .kbz/config.yaml | Colon + far too long — this is a summary |
| Task | Update | Too vague, not self-contained |
Communicating With Humans
Documents are the human interface to the system. Decision records and their IDs are internal tracking mechanisms.
When talking with humans:
- Reference documents by name: "the ID system design", "the Phase 1 spec §10"
- Use prose descriptions of decisions: "the decision about cache-based locking"
- Do not lead with decision IDs:
"P1-DEC-021 defines the ID format"
Sub-Agent Spawning
When delegating work to a sub-agent:
- Include context — sub-agents do not see your conversation history. Include the project name for codebase knowledge graph, relevant file paths, and conventions the sub-agent needs.
- Scope boundaries — tell each sub-agent which files it owns. If spawning multiple agents, ensure they do not write to the same files.
- MCP delivery —
andnext
automatically include relevant skill content in the context packet for sub-agents.handoff
Anti-Patterns
Unclaimed Implementation
- Detect: Agent starts implementation without calling
first.next(id: ...) - BECAUSE: Without claiming, the agent misses assembled context — spec sections, knowledge entries, and file paths curated for this task. This leads to wasted effort re-discovering what the system already knows.
- Resolve: Always claim via
before starting work.next(id: ...)
Empty Finish Summary
- Detect:
or similarly vague completion.finish(summary: "done") - BECAUSE: The summary is institutional memory — future agents and humans read these to understand what happened. An empty summary forces re-investigation of completed work.
- Resolve: Describe what was accomplished, the approach taken, and any decisions made.
Forgotten Retrospective
- Detect: Task completed without retrospective signals despite encountering friction.
- BECAUSE: Without signals, the same friction repeats across every future task. The retro system cannot synthesise improvements from observations that were never recorded.
- Resolve: Include retrospective signals in
whenever friction, ambiguity, or positive patterns are noticed.finish()
Uncommitted Tests
- Detect: Commit made without running
first.go test ./... - BECAUSE: A commit that breaks tests blocks every subsequent task and requires rework. The cost of running tests is always less than the cost of fixing a broken build.
- Resolve: Run tests before every commit.
Gotchas
- If
fails when claiming a task, another agent likely claimed it. Callnext
again (without an ID) to pick a different one.next - If a Kanbanzai tool call returns an error, read the message — it tells you what went wrong. Do not retry with the same arguments.
- Completing a task without
degrades review quality. Always include what you tested.verification - For workflow rules (stage gates, human vs. agent ownership, when to stop),
see
.kanbanzai-workflow
Retrospective Observations
When completing a task, reflect on the process. If you noticed any of these, include a
retrospective signal in your finish call:
- The spec was ambiguous or contradictory on a point that mattered
- Information you needed was not in the context packet
- A tool was missing or returned unhelpful output
- The task was too large, too small, or had undeclared dependencies
- Something worked particularly well and should be preserved
Not every task will have observations. Don't force it. When you do, be specific: name the section, tool, or step that caused friction.
At task completion (primary mechanism)
Pass a
retrospective array to finish:
finish( task_id: "TASK-...", summary: "Implemented the billing webhook handler", retrospective: [ { category: "spec-ambiguity", observation: "Spec did not define retry behaviour for failed deliveries", suggestion: "Add retry policy section to webhook specs", severity: "moderate" } ] )
Valid categories:
workflow-friction, tool-gap, tool-friction,
spec-ambiguity, context-gap, decomposition-issue, design-gap,
worked-well
Valid severities:
minor (slight friction), moderate (required
workaround), significant (materially slowed the work)
Outside a task context
Observations during planning or design review can be contributed directly via
knowledge(action="contribute") with tags ["retrospective", "<category>"].
Evaluation Criteria
| # | Question | Weight |
|---|---|---|
| 1 | Did the agent claim the task via before starting implementation? | required |
| 2 | Does the finish summary describe what was accomplished with enough detail for a future reader? | required |
| 3 | Was run before committing? | high |
| 4 | Were files committed alongside the work that produced them? | high |
| 5 | Were retrospective signals included when friction or positive patterns were observed? | medium |
Questions This Skill Answers
- How do I claim and start work on a task?
- What should I include in a finish summary?
- How do I format commit messages?
- When and how do I contribute knowledge entries?
- How do I spawn a sub-agent with proper context?
- What should I include in retrospective signals?
- How do I handle
files in commits?.kbz/state/ - What do I do if
fails when claiming a task?next
Related
— session orientation (what to do first)kanbanzai-getting-started
— stage gates and when to stop and ask the humankanbanzai-workflow
— document registration and approvalkanbanzai-documents