SKILL.md
Full skill instructions
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. - Prefer
curl -spiped tojqso results are easy to inspect. - 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.
- Expect all responses to use
{ success, data }or{ success, error }. - Never use
sleepto wait for subtasks or long-running operations. Create a cron job (issue-follow-up) to callback the coordinator issue on a schedule, then let the current turn end. - 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, 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
# 1. Create issue
ISSUE=$(curl -s -X POST "$BKD_URL/projects/{projectId}/issues" \
-H 'Content-Type: application/json' \
-d '{"title":"short title","statusId":"todo"}')
ISSUE_ID=$(echo "$ISSUE" | jq -r '.data.id')
# 2. Send details — write the prompt to a file, never inline (Rule 10)
cat > /tmp/bkd-prompt.txt <<'PROMPT'
full implementation details
PROMPT
jq -n --rawfile prompt /tmp/bkd-prompt.txt '{prompt: $prompt}' > /tmp/bkd-body.json
curl -s -X POST "$BKD_URL/projects/{projectId}/issues/$ISSUE_ID/follow-up" \
-H 'Content-Type: application/json' \
--data-binary @/tmp/bkd-body.json | jq
# 3. Start execution
curl -s -X PATCH "$BKD_URL/projects/{projectId}/issues/$ISSUE_ID" \
-H 'Content-Type: application/json' \
-d '{"statusId":"working"}' | jq
Quick Operations
# Health check
curl -s "$BKD_URL/health" | jq
# Execution capacity
curl -s "$BKD_URL/processes/capacity" | jq
# Monitor logs (last 3 turns, assistant messages only)
curl -s "$BKD_URL/projects/{projectId}/issues/{issueId}/logs/filter/types/assistant-message/turn/last3" | jq
# Cron jobs
curl -s "$BKD_URL/cron/actions" | jq
curl -s "$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 the L1/L2/L3 cron-driven autonomous coordination pattern: user-facing agent session (L1) reports to user only, BKD scheduling issue (L2) owns DAG decomposition + dispatch via 30-min self cron, short-lived subtasks (L3). 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/orchestration.md. - Subtask quality assessment or code review: load
references/quality-review.md. - Branch merging after worktree subtasks: load
references/merge-strategy.md. - Long-running, cron-driven L1/L2/L3 autonomous coordination across heterogeneous engines: load
references/three-tier-coordination.md(use instead oforchestration.mdwhen the user wants the user-facing agent to only talk to the user while BKD self-drives dispatch via cron, and when L2/L3 may run on different engines than L1). - Full orchestration pipeline: load
references/orchestration.md, thenreferences/quality-review.md, thenreferences/merge-strategy.mdas each phase is reached.
