From haiku
Loads artifacts from prior stages—unit files, design blueprints, wireframes, discovery logs, and knowledge—as context for current stage in multi-stage intent elaboration.
npx claudepluginhub gigsmart/haiku-method --plugin haikuThis skill uses the workspace's default tool permissions.
Composable sub-skill that reads artifacts from completed stages as context for the current stage during multi-stage elaboration. This provides continuity between stages — each subsequent stage builds on what came before.
Orchestrates elaboration for one stage in multi-stage workflows by loading STAGE.md definitions, extracting metadata like workflows and criteria, and presenting stage context.
Generates next-session.md or phase-handoff.md from cwf-state.yaml, plan.md, lessons.md, and logs to preserve context across agent sessions or phases. Triggers on 'cwf:handoff'.
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.
Composable sub-skill that reads artifacts from completed stages as context for the current stage during multi-stage elaboration. This provides continuity between stages — each subsequent stage builds on what came before.
This sub-skill runs inline — it reads files and sets context variables.
INTENT_SLUG — the intent slugACTIVE_STAGE — the current stage being elaboratedSTAGES — the ordered list of all stages for this intent (e.g., [design, product, dev])Determine which stages have already been completed by examining the stage order:
PRIOR_STAGES=""
for stage in $(echo "$STAGES" | tr ',' ' '); do
if [ "$stage" = "$ACTIVE_STAGE" ]; then
break
fi
PRIOR_STAGES="${PRIOR_STAGES}${PRIOR_STAGES:+ }${stage}"
done
If PRIOR_STAGES is empty, this is the first stage — skip to Output with empty context.
For each prior stage, load the artifacts it produced:
Read all unit files tagged with a prior stage:
INTENT_DIR=".haiku/intents/${INTENT_SLUG}"
for unit_file in ${INTENT_DIR}/unit-*.md; do
[ -f "$unit_file" ] || continue
UNIT_STAGE=$(sed -n '/^---$/,/^---$/{ /^stage:/s/^stage: *//p }' "$unit_file" 2>/dev/null || echo "")
for prior_stage in $PRIOR_STAGES; do
if [ "$UNIT_STAGE" = "$prior_stage" ]; then
# This unit belongs to a prior stage — include in context
echo "## $(basename "$unit_file") (stage: $UNIT_STAGE)"
cat "$unit_file"
echo "---"
fi
done
done
If a prior stage was design, check for:
.haiku/intents/${INTENT_SLUG}/design-blueprint.md.haiku/intents/${INTENT_SLUG}/mockups/.haiku/knowledge/design.md# Design blueprint
if [ -f ".haiku/intents/${INTENT_SLUG}/design-blueprint.md" ]; then
echo "## Design Blueprint"
cat ".haiku/intents/${INTENT_SLUG}/design-blueprint.md"
fi
# Wireframes list
if [ -d ".haiku/intents/${INTENT_SLUG}/mockups" ]; then
echo "## Wireframes"
ls -1 ".haiku/intents/${INTENT_SLUG}/mockups/"*.html 2>/dev/null
fi
# Design knowledge
# Knowledge operations now use MCP tools: haiku_knowledge_list, haiku_knowledge_read
DESIGN_K=$(# Read knowledge via MCP: haiku_knowledge_read { type: "design" }
haiku_knowledge_read "design" 2>/dev/null || echo "")
if [ -n "$DESIGN_K" ]; then
echo "## Design Knowledge"
echo "$DESIGN_K"
fi
The discovery log is shared across stages — always load it:
if [ -f "${INTENT_DIR}/discovery.md" ]; then
echo "## Discovery Context"
cat "${INTENT_DIR}/discovery.md"
fi
Read the current intent.md for the problem statement, solution, domain model, and criteria defined by prior stages:
if [ -f "${INTENT_DIR}/intent.md" ]; then
echo "## Intent Context"
cat "${INTENT_DIR}/intent.md"
fi
Synthesize the loaded artifacts into a structured context summary:
## Prior Stage Context
### Stages Completed
{list of prior stages and their status}
### Prior Units
| Unit | Stage | Discipline | Status | Description |
|------|-------|-----------|--------|-------------|
| {unit slug} | {stage} | {discipline} | {status} | {brief description} |
### Design Direction (if design stage completed)
- Archetype: {from blueprint}
- Key tokens: {colors, fonts, spacing}
- Layout approach: {from blueprint guidelines}
### Key Decisions
{Summarize major decisions from prior stage artifacts that constrain this stage}
### What This Stage Should Build On
{Specific guidance for how the current stage relates to prior work}
The prior stage context is carried forward to the calling mode sub-skill. This context is used by:
When the current stage is product, emphasize design artifacts as input context.
When the current stage is dev, emphasize both design and product artifacts as input context.