Appendix A: Command Reference
Quick-reference for all 33 Draft commands. Syntax shown is for Claude Code; Cursor uses the same /draft:command syntax (it reads the native plugin structure), Copilot uses draft command (no slash), and Gemini uses natural-language @draft prompts.
| Command | Purpose | Key Flags / Modifiers | Prerequisite | Chapters |
|---|---|---|---|---|
/draft |
Show overview, available commands, and intent mapping | — | None | 0, 2 |
/draft:init |
Analyze codebase and generate context files, architecture docs, and state tracking. Scope-aware and root-first; supports --module-only and --graph-only flags |
refresh — re-analyze and update existing context; --module-only — build just the module; --graph-only — (re)build graph memory only |
None (run once per project) | 3, 4, 5, 18 |
/draft:graph |
Build or refresh the knowledge-graph snapshot (codebase-memory-mcp). Reports engine, counts, hotspots, and cycles. Does not generate architecture docs. Live query wrappers fail loud: shapeless {} is unavailable, not a measured empty result. |
[path] — repo root to index (default: .) |
None (fetches the engine on first use) | — |
/draft:upload |
Pre-upload handoff gate: review status, HLD approvals, deploy checklist, validator chain | track <id> — specific track (or the active [~] track) |
Passing /draft:review on the track |
— |
/draft:integrations |
External system exports and syncs. Routes to Jira preview or create based on context | jira-preview, jira-create |
None | — |
/draft:discover |
Discovery, debugging, investigation, and quality router. Dispatches to debug, bughunt, reviews, coverage, learn, tour, impact, assist-review | <intent> — natural-language or specialist name |
None (specialists may require init) | 12 |
/draft:plan |
Canonical parent planning command. Routes planning intent to specialist commands based on context | new-track, decompose, change, adr — route directly; <description> — initial feature description |
/draft:init |
4, 7, 8, 9 |
/draft:new-track |
Create a feature/fix track with spec and phased plan through collaborative dialogue | --quick — streamlined mode with fewer questions; <description> — initial feature description |
/draft:init (or routed from /draft:plan) |
4 |
/draft:implement |
Execute tasks from plan with TDD workflow and architecture checkpoints | Resumes in-progress tasks automatically | /draft:plan (requires plan.md) |
5 |
/draft:status |
Show progress overview: active tracks, phase/task counts, blocked items | — | /draft:init |
7 |
/draft:review |
Three-stage code review: automated validation, spec compliance, code quality. Runs with zero setup on an un-indexed repo; adds blast radius, callers, hotspots, and cycles once indexed | --track <id> — specific track; --full — full review; with-bughunt — add bughunt pass |
None (init upgrades structural checks) | 6 |
/draft:deep-review |
Module lifecycle audit covering ACID properties and production robustness | [module] — specific module to audit |
/draft:init |
14 |
/draft:bughunt |
14-dimension exhaustive bug discovery with taint tracking and evidence | --track <id> — scope to a specific track |
/draft:init |
15 |
/draft:coverage |
Code coverage analysis targeting 95%+ with gap identification | — | /draft:init, tests exist |
16 |
/draft:learn |
Discover coding patterns in the codebase and update guardrails | promote — promote pattern to guardrail; migrate — migrate patterns; path — specific path |
/draft:init |
17 |
/draft:decompose |
Module decomposition with dependency mapping and implementation ordering | project — project-wide; <track-id> — track-scoped |
/draft:init |
8 |
/draft:adr |
Create and manage Architecture Decision Records | "title" — create with title; list — list all; supersede <n> — supersede existing ADR |
/draft:init |
9 |
/draft:change |
Handle mid-track requirement changes with impact analysis | <description> — description of the change |
Active track | 7 |
/draft:revert |
Git-aware rollback at task, phase, or track level | Interactive — prompts for revert level and target | Active track with commits | 7 |
/draft:ops |
Canonical parent operations command. Routes intent to specialist commands based on context | deploy-checklist, incident-response, standup, status, revert — route directly |
/draft:init |
7, 15 |
/draft:debug |
Structured debugging: reproduce, isolate, diagnose, fix | track <id>, <JIRA-KEY> |
init (optional) | — |
/draft:quick-review |
Lightweight 4-dimension code review for a PR, diff, or file | <file>, <PR-URL>, <commit-range> |
None | 6 |
/draft:deploy-checklist |
Pre-deployment verification checklist with rollback triggers | <service>, track <id> |
init (optional) | — |
/draft:testing-strategy |
Design test strategies with coverage targets | track <id>, module <name> |
init (optional) | 14 |
/draft:tech-debt |
Technical debt analysis across 7 dimensions with prioritization | module <name>, category <type> |
init (optional) | — |
/draft:standup |
Generate standup summary from git history and track progress | <days>, weekly |
None | — |
/draft:incident-response |
Incident management: triage, communicate, mitigate, postmortem | new, update, postmortem |
None | — |
/draft:docs |
Canonical parent documentation command. Routes intent to the documentation specialist | documentation (readme, runbook, api, onboarding) |
/draft:init |
0, 14, 17 |
/draft:documentation |
Technical documentation: readme, runbook, api, onboarding | readme, runbook <service>, api <module>, onboarding |
init (optional) | — |
/draft:jira preview |
Generate Jira export file from track plan for review before creating issues | [track-id] — specific track |
/draft:new-track (requires plan.md) |
19 |
/draft:jira create |
Create Jira issues from export file via MCP | [track-id] — specific track; auto-generates export if missing |
/draft:jira preview (or auto-generates), MCP-Jira configured |
19 |
/draft:jira review <JIRA-ID> |
Qualification pipeline for a Jira ticket: deep-review + bughunt + coverage + test-gap analysis | <JIRA-ID> — the ticket to qualify |
MCP-Jira configured | 19 |
/draft:tour |
Interactive architecture mentorship and codebase walk-through | — | /draft:init |
0 |
/draft:impact |
Generate ROI analytics mapping track friction and timeline metrics | — | /draft:init |
0 |
/draft:assist-review |
Summarize intent and highlight structural PR risks for human reviewers | <PR-URL>, track <id> |
/draft:new-track |
6 |
Intent Mapping
Draft recognizes natural language equivalents for all commands. You do not need to memorize slash syntax — describe what you want and Draft maps it to the right command.
| What You Say | What Runs |
|---|---|
| "Set up the project" | /draft:init |
| "Start a new feature" | /draft:new-track |
| "Build it" | /draft:implement |
| "Review the code" | /draft:review |
| "Hunt for bugs" | /draft:bughunt |
| "What's the status?" | /draft:status |
| "Break this down" | /draft:decompose |
| "Record this decision" | /draft:adr |
| "Generate a deploy checklist" | /draft:deploy-checklist |
| "Write the docs" | /draft:documentation |
| "Learn the patterns" | /draft:learn |
| "Send to Jira" | /draft:jira create |
| "Tour the codebase" | /draft:tour |
| "Show AI impact metrics" | /draft:impact |
| "Assist PR review" | /draft:assist-review |
Run /draft (the overview command) to see the complete intent mapping table with the 4 primary commands, 5 routers (recommended interface), and all specialists.
Deterministic helpers
Beneath the 33 commands sit 53 shell helpers in scripts/tools/. Graph wrappers (graph-callers.sh, graph-impact.sh, hotspot-rank.sh, cycle-detect.sh, mermaid-from-graph.sh) fail loud: gq_run requires a .rows array, so shapeless {} is source:"unavailable" with a non-zero exit — not “no callers / no cycles / no edges”.