@zzci/bkd
Operate a BKD kanban board over its REST API. Use when the user wants to manage BKD projects, issue execution workflows, cron jobs, or execution capacity through a reachable BKD server.
| name | bkd |
| description | Operate a BKD kanban board over its REST API. Use when the user wants to manage BKD projects, issue execution workflows, cron jobs, or execution capacity, including three-tier coordination with an event-driven L1, multiple cron-driven L2 workstreams, and L3 execution, plus multi-subtask orchestration (trigger phrases like "use bkd to start coordination", "start BKD L1"). Requires a reachable BKD server ($BKD_URL). |
BKD
Operate BKD by sending HTTP requests to $BKD_URL, which must point at the BKD
API root such as http://host:port/api.
Keep this entry file small. Load only the references needed for the current turn.
Always-On Rules
- Confirm
$BKD_URLbefore making any request. If it is missing, ask for it. - Use
curl -sS --fail-with-bodyand check its exit status before parsing. For mutations, also assert.success == true; never rely oncurl -s | jqbecause HTTP errors and failure envelopes can otherwise pass silently. - Use the safe issue execution flow: create in
todo-> follow-up -> move toworking. - Check
/processes/capacitybefore starting any execution. - Move finished work to
review, notdone. Usedoneonly after human confirmation. - Use follow-up for all inter-issue communication.
- Treat project and issue deletions as soft-delete unless the API says otherwise.
- Successful API calls normally use
{ success, data }and application failures normally use{ success, error }, but some HTTP validation errors have no JSON envelope. Check transport/HTTP success first, then the envelope; fail closed if either check fails. - Never use
sleepto wait for subtasks or long-running operations. In the three-tier pattern, L1 never creates a cron: user messages and L2 follow-ups wake it. Each L2 owns its ownissue-follow-upcron and ends the current turn between rounds. For non-three-tier orchestration, use the coordinator cron described inreferences/orchestration.md. - The never-inline rule: never inline free-form text (prompts, descriptions) into
-d '{...}'— quotes,$, backticks, and newlines get mangled by shell + JSON escaping. Write the text to a temp file outside the repository, build the body withjq, and POST it with--data-binary @file. Seereferences/rest-api.md→ Sending Request Bodies Safely. Fixed-value bodies (e.g.{"statusId":"working"}) are safe to inline.
Core Workflow
Three-Tier Coordination Shortcut
When the user says a short phrase such as "use bkd to start coordination" or
"start BKD L1", treat the current agent session as L1 and load
references/three-tier-coordination.md. The user does not need to repeat the
full L1/L2/L3 rules in the prompt.
Single Issue Execution
set -o pipefail
# 1. Create issue
ISSUE=$(jq -n --arg title "short title" '{title:$title,statusId:"todo"}' \
| curl -sS --fail-with-body -X POST "$BKD_URL/projects/{projectId}/issues" \
-H 'Content-Type: application/json' -d @-) || exit 1
if ! printf '%s\n' "$ISSUE" | jq -e '.success == true and (.data.id | type == "string")' >/dev/null; then
printf 'BKD error: %s\n' "$(printf '%s\n' "$ISSUE" | jq -r '.error // "invalid response"')" >&2
exit 1
fi
ISSUE_ID=$(printf '%s\n' "$ISSUE" | jq -er '.data.id')
# 2. Send details — write the prompt to a file, never inline (the never-inline rule)
cat > /tmp/bkd-prompt.txt <<'PROMPT'
full implementation details
PROMPT
jq -n --rawfile prompt /tmp/bkd-prompt.txt '{prompt: $prompt}' > /tmp/bkd-body.json
FOLLOWUP=$(curl -sS --fail-with-body -X POST "$BKD_URL/projects/{projectId}/issues/$ISSUE_ID/follow-up" \
-H 'Content-Type: application/json' \
--data-binary @/tmp/bkd-body.json) || exit 1
printf '%s\n' "$FOLLOWUP" | jq -e '.success == true' >/dev/null || exit 1
# 3. Start execution
START=$(curl -sS --fail-with-body -X PATCH "$BKD_URL/projects/{projectId}/issues/$ISSUE_ID" \
-H 'Content-Type: application/json' \
-d '{"statusId":"working"}') || exit 1
printf '%s\n' "$START" | jq -e '.success == true' >/dev/null || exit 1
Apply both guards after every BKD mutation: curl --fail-with-body must succeed,
then .success must be true. Use jq -er for required .data values. A bare
false inside an || block does not abort a shell that lacks set -e.
Quick Operations
set -o pipefail
# Health check
curl -sS --fail-with-body "$BKD_URL/health" | jq
# Execution capacity
curl -sS --fail-with-body "$BKD_URL/processes/capacity" | jq
# Monitor logs (last 3 turns, assistant messages only)
curl -sS --fail-with-body "$BKD_URL/projects/{projectId}/issues/{issueId}/logs/filter/types/assistant-message/turn/last3" | jq
# Cron jobs
curl -sS --fail-with-body "$BKD_URL/cron/actions" | jq
curl -sS --fail-with-body "$BKD_URL/cron" | jq
Reference Packs
Load only what the current task needs:
references/rest-api.mdUse for exact BKD routes, payload shapes, query params, and field lists.references/orchestration.mdUse for multi-subtask dispatch workflows, mode selection (worktree vs simple), subtask creation and monitoring, and follow-up communication patterns.references/quality-review.mdUse for subtask self-review responsibilities, coordinator logs filter assessment, and signal classification.references/merge-strategy.mdUse for worktree branch merging, conflict resolution, post-merge verification, and cleanup after subtasks complete in worktree mode.references/three-tier-coordination.mdUse for event-driven L1, cron-driven L2, and short-lived L3 autonomous coordination: the user-facing L1 is woken only by the user or L2 follow-ups, every campaign is partitioned across multiple bounded L2 coordinators, each L2 owns its own DAG and 15-min self cron, and L3 issues execute short-lived subtasks. Engine-agnostic — L1/L2/L3 may each run on different engines (Claude Code, Codex, etc.). Pick overorchestration.mdwhen the campaign spans sessions/hours, needs capacity-aware DAG scheduling, and must run sleep-free.
Quick Routing
Choose references by intent:
- Single issue CRUD, cron jobs, or API details: load
references/rest-api.md. - Short activation phrases like "use bkd to start coordination" or "start BKD L1": load
references/three-tier-coordination.md. - Multi-subtask dispatch or orchestration: load
references/rest-api.mdonce for guarded transport, thenreferences/orchestration.md. - Subtask quality assessment or code review: load
references/rest-api.mdonce for guarded transport, thenreferences/quality-review.md. - Branch merging after worktree subtasks: load
references/rest-api.mdonce for guarded transport, thenreferences/merge-strategy.md. - Long-running three-tier coordination across heterogeneous engines: load
references/three-tier-coordination.md(use instead oforchestration.mdwhen L1 must remain user-facing and event-driven, multiple L2 coordinators must own separate workstreams and self-drive via cron, and L2/L3 may run on different engines than L1). - Full orchestration pipeline: load
references/rest-api.mdonce, thenreferences/orchestration.md,references/quality-review.md, andreferences/merge-strategy.mdas each phase is reached.
Loading...
Select a file to preview
Analyzing security...
Checking scan reports and verification data.
Bill of Materials
Everything this skill can do — files, network, commands, and more.