From haiku
Advances H·AI·K·U intents through stages via orchestrator loop: call haiku_run_next, execute actions like start_stage or decompose, repeat until done. Invoke with /haiku:resume [slug].
npx claudepluginhub gigsmart/haiku-method --plugin haikuThis skill is limited to using the following tools:
`haiku:resume` - Advance an H·AI·K·U intent through its stages.
Implements H·AI·K·U lifecycle framework for structured AI-assisted work, orchestrating via studios, stages, units, bolts, hats, and haiku tools.
Orchestrates adversarial plan-implement-review pipeline by spawning role-specific agents with separate contexts. Run after /brainstorm, /repo-eval, /repo-health, or /doc-health.
Generates atomic PLAN.md files for hierarchical project planning in solo agentic dev with Claude. Covers briefs, roadmaps, phases; includes tasks, verification, checkpoints, success criteria.
Share bugs, ideas, or general feedback.
haiku:resume - Advance an H·AI·K·U intent through its stages.
/haiku:resume [intent-slug]
User-facing command — Drives an intent through the studio's stage sequence. The MCP orchestrator (haiku_run_next) tells you what to do at each step. You execute, then ask again. Repeat until the intent completes.
CLAUDE_CODE_IS_COWORK=1, the agent MUST stop with an error.The entire execution model is a loop:
1. Call haiku_run_next { intent: slug }
2. Read the returned action
3. Execute the action
4. Repeat from step 1
The orchestrator handles ALL state logic — which stage is active, which phase it's in, which unit is ready, whether the gate passed. The agent MUST follow the action returned by the orchestrator and MUST NOT attempt to manage state independently.
If a slug was provided as an argument, use it. Otherwise:
haiku_intent_list → find the active intent
If no active intent: error, suggest /haiku:new.
The orchestrator returns one of these actions. Follow the instructions for each:
start_stageA new stage is beginning. The orchestrator provides the stage name and hat list.
{ "action": "start_stage", "intent": "...", "studio": "...", "stage": "...", "hats": [...], "follows": "parent-slug", "parent_knowledge": ["DISCOVERY.md", ...] }
Do:
haiku_stage_start { intent, stage } — marks the stage as activefollows is present (this intent iterates on a previous one), load the parent intent's knowledge artifacts via haiku_knowledge_read { intent: follows, name: ... } for each file in parent_knowledge. Copy relevant knowledge to this intent's knowledge directory as a starting point.haiku_run_next again — it will return the elaboration action (decompose)decomposeElaborate on the stage: research the problem space, produce knowledge artifacts, then break the stage's work into units.
{ "action": "decompose", "intent": "...", "studio": "...", "stage": "..." }
Do:
Read the stage's STAGE.md for inputs, unit types, criteria guidance, and elaboration: mode (collaborative or autonomous)
collaborative — the agent MUST engage the user as a multi-turn conversation (steps 9-10 below are REQUIRED)autonomous — the agent MAY drive elaboration independently. The agent SHOULD still present the final plan via open_review but MAY skip iterative questions if the upstream specs are clear and completeRead the stage's discovery/ definitions (in the studio directory: stages/{stage}/discovery/*.md) to understand what knowledge artifacts this stage must produce
Load resolved input artifacts from upstream stages — each discovery definition specifies a location: field indicating where the artifact lives (.haiku/knowledge/ for project-wide, .haiku/intents/{slug}/knowledge/ for intent-specific). Check freshness metadata — if inputs are stale or code has drifted, use /haiku:refine stage:{upstream} for a scoped side-trip
Research and write discovery artifacts to their specified locations. These are knowledge artifacts — analysis, inventories, specs, threat models — that capture what you learned about the problem space. Write each artifact to the location: specified in its discovery definition
Elaborate the work into units with completion criteria and a dependency DAG
For each unit, populate refs: in frontmatter — an array of paths to upstream artifacts relevant to that unit.
Write unit files to .haiku/intents/{slug}/stages/{stage}/units/
ELABORATE COLLABORATIVELY. Elaboration is a multi-turn conversation between the agent and the user. The agent MUST NOT treat elaboration as a single pass where it researches, writes units, and presents a finished plan. Instead:
Simple questions → the agent MUST ask in the terminal as natural conversation.
Rich content (wireframes, diagrams, multi-option comparisons, design directions, formatted specs) → the agent MUST use ask_user_visual_question. The visual tool renders markdown, supports images, and provides structured input. Any time the agent is presenting something the user needs to SEE to evaluate, the visual tool is REQUIRED.
PRESENT THE FINAL PLAN for approval using a visual review tool. Once units are written, the agent MUST call open_review { intent_dir, review_type: "intent" } in a background subagent to present the complete plan visually. The tool blocks until the user submits their decision. The agent MUST run it in a subagent so the main conversation remains responsive:
Agent { prompt: "Call open_review for intent ..., wait for decision, return result", run_in_background: true }
Tell the user the review is open and wait for the subagent to return.
After user approval: haiku_stage_set { intent, stage, field: "phase", value: "execute" }
Call haiku_run_next again
The key words "MUST", "MUST NOT", "SHALL", "SHALL NOT", "REQUIRED" in this section are to be interpreted as described in RFC 2119.
1. Natural conversation (terminal text)
AskUserQuestion for free-text prompts — it renders as a clunky select form2. ask_user_visual_question (rich HTML page in browser)
/haiku:new Step 9 (intent direction review)3. open_review (full review page in browser, run in background subagent)
4. pick_design_direction (design archetype picker)
AskUserQuestion (the Claude Code built-in select/form tool) — it produces ugly select dropdowns. Use ask_user_visual_question instead for structured questions, or natural conversation for free-text.open_review for the plan.open_review.Discovery vs. Output artifacts: Stages define two artifact directories:
stages/{stage}/discovery/ — knowledge artifacts produced during elaboration (research, analysis, specs)stages/{stage}/outputs/ — work products produced during execute (code, configs, deliverables)start_units (parallel)Multiple units are ready with no blocking dependencies. Execute them in parallel using agent teams.
{ "action": "start_units", "intent": "...", "stage": "...", "units": ["unit-01", "unit-02", ...], "first_hat": "...", "hats": [...] }
Do:
units, spawn an Agent (subagent) using the Agent tool:
isolation: "worktree" so each agent works on an isolated copy of the repohaiku_unit_start { intent, stage, unit, hat: first_hat } at the beginninghaiku_unit_complete { intent, stage, unit } when criteria are methaiku_run_next again — it will return the next batch of ready units or advance the phaseEach agent's prompt should include:
stages/{stage}/hats/{hat}.mdrefs: artifactshaiku_unit_start, haiku_unit_advance_hat, haiku_unit_complete, haiku_unit_increment_boltstart_unitA single unit is ready (no other units can run in parallel). Execute it directly.
{ "action": "start_unit", "intent": "...", "stage": "...", "unit": "...", "first_hat": "...", "hats": [...] }
Do:
haiku_unit_start { intent, stage, unit, hat: first_hat }stages/{stage}/hats/{hat}.mdrefs: from frontmatter — read each referenced artifact. These are the upstream designs, specs, and knowledge docs that inform this unit's work. For image/binary refs, note their existence and what they represent (from the design brief). For text refs, read and use their content.discovery/*.md and outputs/*.mdhaiku_run_next againcontinue_unitAn active unit — resume where you left off.
{ "action": "continue_unit", "intent": "...", "stage": "...", "unit": "...", "hat": "...", "bolt": N, "hats": [...] }
Do:
refs: — the upstream artifacts that inform this unit (same as start_unit step 3)haiku_unit_advance_hat { intent, stage, unit, hat: next_hat }haiku_unit_complete { intent, stage, unit }haiku_unit_increment_bolt { intent, stage, unit } — starts a new bolt cyclehaiku_run_next againCRITICAL: The agent MUST NOT ask questions during execution. The bolt loop is fully autonomous. If the agent encounters ambiguity, the agent MUST make a reasonable decision. The agent MUST document assumptions in the unit's ## Notes section.
advance_phaseThe orchestrator is moving to the next phase within a stage.
{ "action": "advance_phase", "intent": "...", "stage": "...", "from_phase": "...", "to_phase": "..." }
Do:
haiku_stage_set { intent, stage, field: "phase", value: to_phase }haiku_run_next againreviewRun adversarial review agents for the stage.
{ "action": "review", "intent": "...", "studio": "...", "stage": "..." }
Do:
stages/{stage}/review-agents/ (own agents)review-agents-include in the stage's STAGE.mdhaiku_stage_set { intent, stage, field: "phase", value: "gate" }haiku_stage_set { intent, stage, field: "gate_entered_at", value: NOW }haiku_run_next againNote: Artifacts are persisted (committed to git) automatically during execution — haiku_unit_start, haiku_unit_complete, haiku_stage_start, and haiku_stage_complete all auto-commit. There is no separate "persist" step.
gate_askThe stage's review gate requires human approval.
{ "action": "gate_ask", "intent": "...", "stage": "...", "next_stage": "..." }
The visual review MUST open. When haiku_run_next returns gate_ask, the agent MUST call open_review in a background subagent (the tool blocks until the user submits). If haiku_run_next auto-opened it (check for review_url in the response), the subagent MUST call get_review_status to wait for the decision instead.
Do:
open_review { intent_dir, review_type: "intent" } and waits for the user's decision. Tell the user the review is open.haiku_gate_approve { intent, stage } then call haiku_run_nextchanges_requested: analyze the annotations to determine which stage needs the fix:
location field (file path or section name)stages/design/artifacts/..., DESIGN-BRIEF.md) → /haiku:refine stage:designBEHAVIORAL-SPEC.md, DATA-CONTRACTS.md) → /haiku:refine stage:product/haiku:refine stage:inceptionhaiku_run_next againgate_externalPush for external review.
{ "action": "gate_external", "intent": "...", "stage": "...", "next_stage": "..." }
Do:
https://{site}/browse/{host}/{project}/intent/{slug}/{stage}//haiku:triggers picks up the approval on next poll and advances the gatehaiku_stage_complete { intent, stage, gate_outcome: "blocked" } — blocks until approvalgate_awaitWaiting for an external event.
{ "action": "gate_await", "intent": "...", "stage": "...", "next_stage": "..." }
Do:
haiku_stage_complete { intent, stage, gate_outcome: "awaiting" }/haiku:resume when the event occurs.advance_stageGate passed — moving to the next stage (continuous mode).
{ "action": "advance_stage", "intent": "...", "stage": "...", "next_stage": "...", "gate_outcome": "advanced" }
Do:
haiku_stage_complete { intent, stage, gate_outcome: "advanced" }haiku_intent_set { slug, field: "active_stage", value: next_stage }haiku_run_next again — it will return start_stage for the next stagestage_complete_discreteStage done but discrete mode — stop and wait for user.
{ "action": "stage_complete_discrete", "intent": "...", "stage": "...", "next_stage": "..." }
Do:
haiku_stage_complete { intent, stage, gate_outcome: "advanced" }haiku_intent_set { slug, field: "active_stage", value: next_stage }/haiku:resume for the next stage."intent_completeAll stages are done.
{ "action": "intent_complete", "intent": "...", "studio": "..." }
Do:
haiku_intent_set { slug, field: "status", value: "completed" }haiku_intent_set { slug, field: "completed_at", value: NOW }/haiku:review then PR creation.blockedUnits are blocked on dependencies or need intervention.
{ "action": "blocked", "intent": "...", "stage": "...", "blocked_units": [...] }
Do:
composite_run_stageFor composite intents — a specific studio:stage is ready.
{ "action": "composite_run_stage", "intent": "...", "studio": "...", "stage": "...", "hats": [...] }
Do: Same as start_stage, but for a composite intent. The orchestrator handles sync points.
errorSomething is wrong.
{ "action": "error", "message": "..." }
Do: Report the error to the user.
/haiku:new — Creates the intent that /haiku:resume advances/haiku:composite — Creates composite intents with sync points/haiku:refine — Amend specs mid-execution or refine upstream stages/haiku:review — Pre-delivery code review/haiku:reflect — Post-completion analysis/haiku:operate — Post-delivery operational tasks