From brana
Manage the backlog — plan, track, navigate phases and streams. Use when planning phases, viewing roadmaps, or restructuring work.
How this skill is triggered — by the user, by Claude, or both
Slash command
/brana:backlogThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Manage the project backlog — plan, track, and navigate work across phases,
Manage the project backlog — plan, track, and navigate work across phases, milestones, and streams. Natural language is the primary interface; these commands are shortcuts for complex operations.
When explicitly managing the backlog: planning phases, viewing roadmaps, restructuring work. Daily task interaction happens through natural language guided by the task-convention rule — no skill invocation needed.
NEVER read or write tasks.json directly. Use the brana CLI via the Bash tool for ALL task operations.
The binary is at system/cli/rust/target/release/brana (from git root) or
${CLAUDE_PLUGIN_ROOT}/cli/rust/target/release/brana.
| Operation | CLI command |
|---|---|
| Project status | brana backlog status |
| Cross-client status | brana backlog status --all --json |
| Full roadmap tree | brana backlog roadmap --json |
| Subtree of phase | brana backlog tree <id> --json |
| Aggregate stats | brana backlog stats |
| Tag inventory | brana backlog tags --output json |
| Tag filter (AND) | brana backlog tags --filter "a,b" --output json |
| Next unblocked task | brana backlog next --stream X --tag Y |
| Query tasks | brana backlog query --status pending --stream bugs --output json |
| Multi-tag AND query | brana backlog query --tag "dx,cli" --count |
| Filter by parent | brana backlog query --parent ph-001 --type task |
| Get full task | brana backlog get <id> |
| Get single field | brana backlog get <id> --field status |
| Operation | CLI command |
|---|---|
| Set any field | brana backlog set <id> <field> <value> |
| Set to null | brana backlog set <id> priority null |
| Append to text | brana backlog set <id> context --append "note" |
| Add/remove tag | brana backlog set <id> tags +newtag / tags -oldtag |
| Add blocked_by | brana backlog set <id> blocked_by +t-100 |
| Create task (JSON) | brana backlog add --json '{"subject":"...","stream":"...","type":"task"}' |
| Create task (shorthand) | brana backlog add --subject "..." --stream roadmap --type task --tags "a,b" --effort S |
| Create task (from file) | brana backlog add --json @/tmp/task.json |
| Create task (stdin) | echo '{"subject":"..."}' | brana backlog add --json - |
| Rollup parents | brana backlog rollup |
brana backlog set or brana backlog add.brana backlog add once per task.jq if needed.All rendering sections below use the task-line template to determine icons, progress bars, and decorations. Resolve the active theme before rendering:
--theme <name> flag is on the command, use it~/.claude/tasks-config.json → {"theme": "<name>"}classicclassic: {icon} {id} {subject} {detail}
✓ done ← active → pending · blocked · parked
bars: ████░░░░ {done}/{total}
emoji: {icon} {id} {subject} {detail}
✅ done 🔨 active 🔲 pending 🔒 blocked 💤 parked
bars: ████░░░░ {done}/{total}
project header: 📋 {name}
status --all header: boxed ╭╮╰╯ with 📊
priority high: ⚡high
blocked ref: ⛓ {id}
health dots: 🟢 done 🟡 active 🔴 blocked
minimal: {icon} {id} {subject} {detail}
● done ◐ active ○ pending ⊘ blocked ◌ parked
bars: ━━━━╍╍╍╍ {done}/{total}
blocked ref: ← {id}
--wide)Any view command (status, roadmap, next, tags --filter) accepts --wide.
Wide mode renders tasks as tabular rows with all metadata visible on one line — like kubectl get pods -o wide.
Wide mode composes with any theme (icons come from the active theme).
Wide-mode template:
Columns: {icon} {id} {subject} {status} {tags} {pri} {eff} {stream} {project} {blocked_by} {started} {completed}
Header row (always shown):
ID Subject Status Tags Pri Eff Stream Project Blocked Started Done
Task rows (classic icons):
✓ t-007 Design auth flow done auth P1 S roadmap — 2026-02-10 2026-02-12
→ t-008 Implement JWT middleware pending auth, quick-win P1 S roadmap — — —
· t-009 Write auth tests blocked auth P1 M roadmap t-008 — —
Task rows (emoji icons):
✅ t-007 Design auth flow done auth P1 S roadmap — 2026-02-10 2026-02-12
🔲 t-008 Implement JWT middleware pending auth, quick-win P1 S roadmap — — —
🔒 t-009 Write auth tests blocked auth ⛓ t-008
Task rows (minimal icons):
● t-007 Design auth flow done auth P1 S roadmap — 2026-02-10 2026-02-12
○ t-008 Implement JWT middleware pending auth, quick-win P1 S roadmap — — —
⊘ t-009 Write auth tests blocked auth P1 M roadmap ← t-008 — —
Rules:
subject gets remaining width after fixed columns; truncate with … if too longtags shows first 3 comma-separated, then +N if more— (em-dash), never blankproject column: in cross-client views (--all), shows client/project for multi-project clients, client slug for single-project. In single-project views, shows project slug from tasks.json root or —ph-002 Phase 2: API Foundation ████░░░░ 3/8
✓ t-007 Design auth flow done auth P1 S roadmap — 2026-02-10 2026-02-12
→ t-008 Implement JWT middleware pending auth, quick-win P1 S roadmap — — —
--wide, all views use the compact tree layout (unchanged default behavior)Hierarchy views (status, roadmap) use box-drawing characters when not in --wide mode:
├── child (has siblings after)
└── child (last sibling)
│ continuation line
/brana:backlog plan [project] "[phase-title]" — plan a phase interactively/brana:backlog status [project] [--all] [--unified] [--wide] — progress overview (--all = cross-client task drill-down, --unified = priority-sorted flat list)/brana:backlog roadmap [project] [--wide] — full tree view with all levels/brana:backlog next [project] [--stream X] [--wide] — next unblocked task by priority/brana:backlog start <id> — begin work on a task/brana:backlog done [id] — complete current task/brana:backlog add "[description]" — quick-add a task/brana:backlog replan [project] [phase-id] — restructure a phase/brana:backlog archive [project] — move completed phases to archive/brana:backlog migrate <file> — import tasks from a markdown backlog/brana:backlog execute [scope] [--dry-run] [--max-parallel N] [--retry] — execute tasks via subagents/brana:backlog tags [project] — tag inventory, filtering, and bulk tag management/brana:backlog context <id> [text] — view or set rich context on a task/brana:backlog theme [name] — view or set display theme (classic, emoji, minimal)/brana:backlog triage [project] [--reresearch] [--scope P2+] — research-informed priority reassessment/brana:backlog sync [--dry-run] [--force] — sync tasks.json with GitHub IssuesFor the plan and execute subcommands, create a CC Task step registry on entry. Follow the guided-execution protocol. Other subcommands (status, roadmap, next, add, etc.) are single-step and don't need a registry.
plan steps: DETECT, READ, MILESTONES, TASKS, DEPS, PROPOSE, WRITE execute steps: READ, FILTER, WAVES, CONFIRM, EXECUTE, WRITEBACK, REPORT
If context was compressed during a plan or execute flow:
TaskList — find CC Tasks matching /brana:backlog — {STEP}in_progress task is your current step — resume from thereInteractive phase planning. Builds the hierarchy conversationally.
brana backlog search "{subject keywords}" # per proposed task
brana backlog query --tag "{tag1},{tag2}" # for each unique tag in the phase
question: "Found existing tasks that overlap with proposed phase tasks:"
options:
- "Link {new-subject} → blocked_by {existing-id} {existing-subject} (tag overlap: {shared})"
- "Merge {new-subject} into {existing-id} (duplicate)"
- "No relation — keep all as-is"
High-level progress view with aggregation. Use --all for cross-client task-level drill-down.
Delegate entirely to CLI. Do not read tasks.json or compute anything manually.
brana backlog status — outputs themed project status (progress bar, counts)brana backlog stats — outputs JSON aggregate stats (by_status, by_stream, by_priority, by_type)brana backlog next — outputs themed next-up list (top 3 by priority)--all)Run brana backlog status --all — CLI handles portfolio aggregation, theming, and rendering.
For JSON output (when you need to process data): brana backlog status --all --json
brana backlog blockedbrana backlog stats outputbrana backlog roadmapbrana backlog tree <phase-id>Full tree view — every level expanded.
Delegate entirely to CLI. Do not read tasks.json or build trees manually.
brana backlog roadmap — outputs themed full tree (phases -> milestones -> tasks with icons, progress bars, blocked indicators)For JSON output: brana backlog roadmap --json
For a subtree: brana backlog tree <phase-or-milestone-id>
Find the highest-priority unblocked task.
Delegate entirely to CLI.
brana backlog next — outputs themed top-3 list sorted by priorityOptional filters (pass through to CLI):
brana backlog next --tag schedulerbrana backlog next --stream researchBegin work on a specific task. For code tasks, enters the /brana:build loop.
stream: bugs or tag bug → strategy: bug-fixstream: research → strategy: spikestream: tech-debt or tag refactor → strategy: refactorstream: docs → strategy: feature (light)migration → strategy: migrationinvestigation → strategy: investigationfeaturestrategy field to the taskbrana skills suggest --task <id>
question: "Skills that may help with this task:"
options: one per match ("/brana:{name} — {reason}") + "Skip — none needed"
code execution: offer external search:
question: "No local skill matches this task context. Search external sources?"
options: ["Search externally", "Skip"]
If yes: run /brana:acquire-skills <task keywords>.code: check git status clean → create branch {prefix}{id}-{slug} → set status + started date + branch field → enter /brana:build with the task's strategy (build_step: classify)external: set status + started date, show task descriptionmanual: set status + started date, show checklist from descriptiongithub_sync.enabled in ~/.claude/tasks-config.json):
github_issue: run system/scripts/gh-sync.sh create {task-id} {tasks-json-path}. Read issue number from stdout, write to task's github_issue field.github_issue: run system/scripts/gh-sync.sh pull-context {issue-number}. If comments returned, replace ## GitHub Comments section in task's context field./brana:build immediately using the Skill tool:Skill(skill="brana:build", args="{task-id}")
This is mandatory — do NOT stop after the report. The build loop takes over from CLASSIFY onward.
# Check for existing branch
git branch --list "feat/t-008-*" 2>/dev/null
# If exists: "Branch already exists. Resume?" -> checkout
# If not: create new
git checkout -b feat/t-008-jwt-middleware
Integrate with worktree pattern if on a different branch:
git worktree add ../project-feat-t-008 -b feat/t-008-jwt-middleware
Complete the current task. For code tasks that went through /brana:build, the CLOSE step already handles completion — use /brana:backlog done only for manual and external tasks.
build_step field set, warn: "This task is in the /brana:build loop (step: {build_step}). Use /brana:build CLOSE to complete it, or force-complete here?"git add -A (or ask user what to stage)gh pr create --title "{type}: {subject}" --body "Closes #{github_issue}"git worktree list shows ../project-{prefix}{id}), offer to remove it after merge: git worktree remove ../project-{prefix}{id} && git branch -d {branch}docs, feature, workflow, skill, or description mentions "build", "create", "launch", "design"), ask via AskUserQuestion:
question: "This task produced deliverables. Generate documentation?"
options:
- "Tech doc + user guide" (writes both from templates)
- "Tech doc only"
- "User guide only"
- "Skip docs"
If user selects any doc option, generate using templates at system/skills/build/templates/tech-doc.md and/or system/skills/build/templates/user-guide.md. Output to docs/architecture/features/{task-slug}.md and/or docs/guide/features/{task-slug}.md.github_sync.enabled in ~/.claude/tasks-config.json):
github_issue: run system/scripts/gh-sync.sh close {issue-number}.Quick-add a single task with intelligent suggestions.
All interactive confirmations use the AskUserQuestion tool for a selectable UI experience. Batch independent questions into a single AskUserQuestion call (up to 4 questions per call).
https://, suggest stream: research, auto-extract the URL to the context field (format: URL: {url}), and skip the milestone/stream prompt.strategy from description/stream/tags (same heuristic as /brana:backlog start). Leave build_step null.question: "Link any as blocked_by?"
options: one per candidate task ("{id} {subject} (reason)")
context field/brana:backlog triage or direct edit)github_sync.enabled in ~/.claude/tasks-config.json):
system/scripts/gh-sync.sh create {task-id} {tasks-json-path}. Read issue number from stdout, write to task's github_issue field./brana:backlog sync later." — do NOT block add.Restructure an existing phase.
Move completed phases to archive.
Import tasks from an existing markdown backlog.
Tag inventory, filtering, and bulk tag management.
/brana:backlog tags [project] — tag inventory (all tags + task counts)
/brana:backlog tags --filter "tag1,tag2" — AND filter (tasks with ALL listed tags)
/brana:backlog tags --any "tag1,tag2" — OR filter (tasks with ANY listed tag)
/brana:backlog tags add <id|ids> "tag1,tag2" — add tags to one or more tasks
/brana:backlog tags remove <id|ids> "tag1" — remove a tag from one or more tasks
Inventory (no subcommand):
Tags in {project}:
scheduler 4 tasks (2 pending, 1 in_progress, 1 completed)
quick-win 3 tasks (3 pending)
research 2 tasks (1 in_progress, 1 completed)
auth 2 tasks (2 pending)
Filter (--filter or --any):
--filter: keep tasks where tags array contains ALL specified tags (AND)--any: keep tasks where tags array contains ANY specified tag (OR)--wide, render using wide-mode template (all columns). Otherwise render using task-line template — flat list with status and tags:Tasks tagged [scheduler]:
→ t-008 Implement JWT middleware [scheduler, auth] pending
· t-012 Seed dev data [scheduler] blocked
← t-018 Deploy scheduler config [scheduler, quick-win] in_progress
✓ t-021 Scheduler v2 research [scheduler, research] completed
Icons come from active theme (example above uses classic).
Add tags:
Remove tags:
View or set rich context on a task — rationale, links, notes, decisions.
/brana:backlog context <id> — show context for a task
/brana:backlog context <id> "context text" — set context (replaces existing)
/brana:backlog context <id> --append "note" — append to existing context
View (no text):
t-008 Implement JWT middleware
Context:
Rationale: chose JWT over session cookies for stateless API. See ADR-005.
Key constraint: tokens must expire in 15min, refresh tokens in 7d.
Related: t-009 (tests), ms-003 (parent milestone).
Set (with text):
Append (--append):
View or set the display theme.
/brana:backlog theme — show current theme
/brana:backlog theme emoji — set theme to emoji
/brana:backlog theme classic — set theme to classic
/brana:backlog theme minimal — set theme to minimal
View (no argument):
~/.claude/tasks-config.jsontheme field, show: "Current theme: {name}"/brana:backlog theme <name>."Set (with name):
classic, emoji, minimal~/.claude/tasks-config.json (create if missing)theme field to the given name, preserve other fields/brana:backlog output will use {name} icons."{
"theme": "emoji"
}
Stored at ~/.claude/tasks-config.json (global, not per-project).
Execute tasks via subagents — DAG-aware parallel execution with automatic wave scheduling.
/brana:backlog execute [scope] [--dry-run] [--max-parallel N] [--retry]
Arguments:
scope: task/milestone/phase ID, or "next" for the next unblocked wave. Default: next--dry-run: show execution plan without running agents--max-parallel N: max concurrent subagents per wave (default: 3)--retry: re-run failed/partial tasks, skip completedTasks must have spawn field set (see ADR-003 for schema). Tasks without spawn are skipped with a message: "no tasks configured for agent execution."
spawn: "subagent" and status pending (or in_progress/failed for --retry)blocked_by DAG (topological sort):
spawn_strategy — if set, override wave ordering:
"parallel": all children in one wave (ignore inter-child deps)"sequential": one task per wave, in order"auto": use DAG (default behavior)Execution plan for ph-002 (3 waves, 8 tasks):
Wave 1 (parallel):
t-007 Design auth flow haiku research
t-010 Design schema haiku research
Wave 2 (parallel):
t-008 Implement JWT middleware sonnet code
t-011 Write migrations sonnet code
Wave 3 (parallel):
t-009 Write auth tests sonnet code
t-012 Seed dev data sonnet code
Estimated: 3 waves, max 2 parallel agents per wave.
Proceed? (yes / dry-run was requested)
subagent_type: from agent_config.type (default: "general-purpose")model: from agent_config.model (default: haiku for research, sonnet for code)prompt: task subject + description + relevant context (file paths, dependencies)agent_result to tasks.json: {status: "completed", summary: "...", completed_at: "..."}/tmp/task-{id}-output.jsonagent_result: {status: "failed", error: "...", completed_at: "..."}in_progress. Dependents remain blocked./tmp/task-{id}-output.jsongit worktree add ../project-{prefix}{id} -b {prefix}{id}-{slug}agent_result.status: "partial", leave for userExecution complete:
✓ 6 tasks completed
◐ 1 task partial (t-009: tests failed)
✗ 1 task failed (t-012: agent timeout)
Milestone 'Auth System': 3/4 done
Next: /brana:backlog execute --retry ph-002
Icons come from active theme (✓/✅/● for completed).Before spawning an agent for a task, compute a complexity score (0.0–1.0):
| Input | Score contribution | Max |
|---|---|---|
min(word_count(description) / 100, 0.3) | Description length | 0.3 |
min(len(blocked_by) * 0.1, 0.2) | Dependency count | 0.2 |
0.2 if stream is roadmap | Stream type | 0.2 |
0.1 if architecture in tags | Architecture tag | 0.1 |
0.1 if effort is L or XL | Effort estimate | 0.1 |
Score → model mapping:
Override: If the task or agent_config.model specifies a model explicitly, that wins over the computed score.
Logging: Log each routing decision to the decision log as a cost entry: uv run python3 system/scripts/decisions.py log "backlog" "cost" "t-NNN routed to MODEL (score: X.XX)"
User override tracking: If the user explicitly requests a different model than the computed score suggests (e.g., "use opus for this"), log the override: uv run python3 system/scripts/decisions.py log "backlog" "cost" "t-NNN override: computed=MODEL1 (score: X.XX), user chose MODEL2". After 10+ overrides in the same direction (e.g., user keeps upgrading haiku→sonnet), /brana:review routing will flag this as a threshold adjustment signal.
Fallback: If no task metadata is available (e.g., ad-hoc agent spawn), use the agent's default model from its frontmatter.
--retry re-runs tasks with agent_result.status of "failed" or "partial"/brana:backlog start <id> on any failed task{
"spawn": "subagent",
"agent_config": {"type": "general-purpose", "model": "sonnet"},
"agent_result": null
}
After execution:
{
"agent_result": {
"status": "completed",
"summary": "Implemented JWT middleware with refresh token rotation",
"error": null,
"completed_at": "2026-02-18T14:30:00Z"
}
}
On parent tasks, spawn_strategy controls child batching:
{
"type": "milestone",
"spawn_strategy": "auto"
}
Research-informed priority reassessment across project backlogs.
/brana:backlog triage [project] [--reresearch] [--scope P2+]
--reresearch--scope P2+Only re-evaluate tasks at P2 or lower (skip P0/P1 which were recently triaged).
| Tier | Meaning | Review cadence |
|---|---|---|
| P0 | This week — active work | Daily |
| P1 | Next up — queue | Weekly |
| P2 | Backlog — when bandwidth allows | Monthly |
| P3 | Icebox — someday/maybe | Quarterly |
P0 > P1 > P2 > P3 > null. Ties broken by: in_progress first, then pending, then order field.
Sync tasks.json with GitHub Issues. Creates missing issues, closes completed ones, updates stale labels.
/brana:backlog sync [--dry-run] [--force]
github_sync.enabled from ~/.claude/tasks-config.json. If not enabled, report: "GitHub sync not configured. Add github_sync to ~/.claude/tasks-config.json."github_issue → need creationgithub_issue + open issue → need closinggh issue view --json labels)--dry-run: show the plan (task IDs + subjects) and exit without executing.system/scripts/gh-sync.sh sync-all {tasks-json-path}. Script handles progress output.--force: run system/scripts/gh-sync.sh sync-all {tasks-json-path} without filtering — re-sync all tasks.npx claudepluginhub martineserios/thebrana --plugin branaManages backlog items synced to GitHub Issues via MCP tools. Create, list, view, update, close, resolve, groom, and sync without direct file edits.