From haiku
Orchestrates elaboration for one stage in multi-stage workflows by loading STAGE.md definitions, extracting metadata like workflows and criteria, and presenting stage context.
npx claudepluginhub gigsmart/haiku-method --plugin haikuThis skill uses the workspace's default tool permissions.
Orchestrates elaboration for one stage in multi-stage mode. The active stage's definition file controls behavior — this sub-skill runs the same phase sequence regardless of which stage is active. The stage definition's metadata (discipline, available_workflows, skip, add, criteria_focus, unit_types) naturally constrains what each phase produces.
Orchestrates single-stage collaborative project elaboration by setting up Git worktrees, gitignore for .haiku dirs, and discovery logs for intents.
Orchestrates Evidence-Driven Development sessions: initializes state from files, detects stale sessions, parses flags like --tdd and --team, runs model migrations, and routes to phases.
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
Orchestrates elaboration for one stage in multi-stage mode. The active stage's definition file controls behavior — this sub-skill runs the same phase sequence regardless of which stage is active. The stage definition's metadata (discipline, available_workflows, skip, add, criteria_focus, unit_types) naturally constrains what each phase produces.
This sub-skill runs inline — it has full access to AskUserQuestion, Agent, and all tools from the parent skill.
The dispatcher (elaborate/SKILL.md) sets these before routing here:
INTENT_SLUG — the intent slugPROJECT_MATURITY — greenfield, early, or establishedAUTONOMOUS_MODE — true or falseITERATES_ON — previous intent slug if this is a follow-up, empty otherwiseINTENT_DESCRIPTION — the user's description from Phase 1CLARIFICATION_ANSWERS — Q&A from Phase 2ACTIVE_STAGE — the stage being elaborated (e.g., design, product, dev)STAGES — the full ordered stage list (e.g., [design, product, dev])Read the active stage's definition file to determine elaboration parameters:
# Stage metadata is now read from STAGE.md frontmatter directly or via MCP tools
# Resolve stage definition file directly (no shell lib needed)
# Check project override first, then plugin built-in
STAGE_DEF_FILE=".haiku/studios/$STUDIO/stages/$ACTIVE_STAGE/STAGE.md"
[ ! -f "$STAGE_DEF_FILE" ] && STAGE_DEF_FILE="$CLAUDE_PLUGIN_ROOT/studios/$STUDIO/stages/$ACTIVE_STAGE/STAGE.md"
# Read stage metadata (from stage definition file frontmatter)
STAGE_NAME=$(sed -n '/^---$/,/^---$/{ /^name:/s/^name: *//p }' "$STAGE_DEF_FILE")
STAGE_DESCRIPTION=$(sed -n '/^---$/,/^---$/{ /^description:/s/^description: *//p }' "$STAGE_DEF_FILE")
STAGE_AVAILABLE_WORKFLOWS=$(sed -n '/^---$/,/^---$/{ /^available_workflows:/s/^available_workflows: *//p }' "$STAGE_DEF_FILE")
STAGE_DEFAULT_WORKFLOW=$(sed -n '/^---$/,/^---$/{ /^default_workflow:/s/^default_workflow: *//p }' "$STAGE_DEF_FILE")
# Elaboration hints (optional — empty means "no constraint")
STAGE_SKIP=$(sed -n '/^---$/,/^---$/{ /^skip:/s/^skip: *//p }' "$STAGE_DEF_FILE" 2>/dev/null || echo "")
STAGE_ADD=$(sed -n '/^---$/,/^---$/{ /^add:/s/^add: *//p }' "$STAGE_DEF_FILE" 2>/dev/null || echo "")
STAGE_CRITERIA_FOCUS=$(sed -n '/^---$/,/^---$/{ /^criteria_focus:/s/^criteria_focus: *//p }' "$STAGE_DEF_FILE" 2>/dev/null || echo "")
STAGE_UNIT_TYPES=$(sed -n '/^---$/,/^---$/{ /^unit_types:/s/^unit_types: *//p }' "$STAGE_DEF_FILE" 2>/dev/null || echo "")
Present stage context to the user:
## Stage: {STAGE_NAME}
{STAGE_DESCRIPTION}
Elaborating for the **{ACTIVE_STAGE}** stage ({N} of {total stages}).
FIRST_STAGE=$(echo "$STAGES" | tr ',' ' ' | awk '{print $1}')
IS_FIRST_STAGE="false"
if [ "$ACTIVE_STAGE" = "$FIRST_STAGE" ]; then
IS_FIRST_STAGE="true"
fi
If first stage: Create the intent worktree and initialize discovery, identical to single-stage mode.
If subsequent stage: The worktree and discovery log already exist from the first stage. Verify we're in the right place:
REPO_ROOT=$(git worktree list --porcelain | head -1 | sed 's/^worktree //')
INTENT_WORKTREE="${REPO_ROOT}/.haiku/worktrees/${INTENT_SLUG}"
if [ -d "$INTENT_WORKTREE" ]; then
cd "$INTENT_WORKTREE"
else
echo "ERROR: Intent worktree not found at $INTENT_WORKTREE"
echo "Expected from prior stage. Was the first stage elaboration completed?"
exit 1
fi
If IS_FIRST_STAGE is false: Read and follow subskills/load-prior-artifacts/SKILL.md.
Set inputs: INTENT_SLUG, ACTIVE_STAGE, STAGES.
This loads all artifacts from completed stages as context for this stage's elaboration. The prior stage context informs discovery, criteria, and elaboration.
If first stage: Run knowledge bootstrap identical to single-stage (check maturity, synthesize if needed).
If subsequent stage: Skip — knowledge artifacts already exist from the first stage.
If first stage: Full domain discovery via discover subagent, identical to single-stage.
If subsequent stage: Abbreviated discovery focused on new areas and changes since the prior stage. Include prior stage context in the discovery brief under ## Previous Stage Context.
After completion, present domain model and confirm with user (same as single-stage).
Check skip list: If design-direction is in STAGE_SKIP, skip this phase.
Otherwise, read and follow subskills/design-direction/SKILL.md.
Set inputs: INTENT_SLUG, PROJECT_MATURITY, AUTONOMOUS_MODE.
Read and follow subskills/workflow-select/SKILL.md.
Set inputs: INTENT_SLUG, AUTONOMOUS_MODE, STAGE_CONSTRAINT="{STAGE_AVAILABLE_WORKFLOWS}" (constrains to this stage's available workflows).
Read and follow subskills/criteria/SKILL.md.
Set inputs: INTENT_SLUG, AUTONOMOUS_MODE, CRITERIA_FOCUS="{STAGE_CRITERIA_FOCUS}".
Read and follow subskills/decompose/SKILL.md.
Set inputs: INTENT_SLUG, AUTONOMOUS_MODE, DOMAIN_MODEL, SUCCESS_CRITERIA, SELECTED_WORKFLOW, UNIT_TYPES="{STAGE_UNIT_TYPES}", PRIOR_UNITS (from load-prior-artifacts), ITERATES_ON.
Check skip list: If git-strategy is in STAGE_SKIP, skip this phase.
Otherwise, read and follow subskills/git-strategy/SKILL.md.
Set inputs: INTENT_SLUG, AUTONOMOUS_MODE, UNITS.
Same as single-stage — read from project settings, do not ask.
In stage-elaborate mode, the stages are already configured by the dispatcher. Set stages and active_stage in intent frontmatter from the dispatcher's values.
Same artifact writing flow as single-stage:
intent.mdStage tagging: Every unit created during this elaboration session MUST have its
stage:frontmatter field set toACTIVE_STAGE.
Skip if no units have discipline: frontend or discipline: design.
Check skip list: If wireframes is in STAGE_SKIP, skip this phase.
Write the wireframes brief. Wireframe fidelity is driven by the stage's discipline:
discipline: design), use HIGH fidelity (Mode A — styled)Set fidelity: in the wireframes brief frontmatter accordingly.
Invoke the wireframes subagent and run the product review gate (same as single-stage).
Check skip list: If ticket-sync is in STAGE_SKIP, skip this phase.
Otherwise, same as single-stage — load ticketing config, write brief, invoke subagent.
Same as single-stage — run spec review and adversarial review.
add field)If STAGE_ADD is non-empty, it lists custom sub-skill names to run during this stage. For each name in STAGE_ADD:
.haiku/subskills/{name}/SKILL.mdCustom sub-skills allow stage definitions to inject project-specific elaboration phases without modifying the core plugin.
Present the stage elaboration summary:
Elaboration complete for **{ACTIVE_STAGE}** stage!
Intent Worktree: .haiku/worktrees/{intent-slug}/
Branch: haiku/{intent-slug}/main
Units created for this stage:
- unit-NN-{name}.md (stage: {ACTIVE_STAGE})
...
Next stage: {next stage name, or "none — all stages elaborated"}
If there are remaining stages:
If all stages have been elaborated: