From haiku
Decomposes intents into independent units with dependency graphs, analyzes cross-cutting concerns, and validates spec flow for H·AI·K·U elaboration.
npx claudepluginhub gigsmart/haiku-method --plugin haikuThis skill uses the workspace's default tool permissions.
Composable sub-skill for elaborating an intent into units with dependency graphs, cross-cutting concern analysis, and spec flow validation. Used by single-stage and stage-elaborate mode sub-skills.
Reviews Unit definitions for decomposition suitability, dependency clarity, estimation quality, Intent alignment, and decision record completeness before approval.
Transform approved Intent into executable phased plan with strict TDD. Each step requires tests first (happy/bad/edge/security cases), then implementation. Use after /intent-review when ready to start development.
Generates structured implementation workflows from PRDs or feature specs with task decomposition, dependency mapping, and validation gates. Use for translating specs into actionable multi-domain plans.
Share bugs, ideas, or general feedback.
Composable sub-skill for elaborating an intent into units with dependency graphs, cross-cutting concern analysis, and spec flow validation. Used by single-stage and stage-elaborate mode sub-skills.
This sub-skill runs inline — it has access to AskUserQuestion and the full conversation context.
INTENT_SLUG — the intent slugAUTONOMOUS_MODE — true or falseDOMAIN_MODEL — the domain model from discoverySUCCESS_CRITERIA — the confirmed success criteria from the criteria sub-skillSELECTED_WORKFLOW — the selected workflow from workflow-selectUNIT_TYPES (optional) — if set by stage-elaborate, constrains which unit disciplines to create. Empty for single-stage (all types).PRIOR_UNITS (optional) — units from prior stages that this stage's units may reference or depend onITERATES_ON (optional) — previous intent context for iteration intentsElaborate the intent into Units — independent pieces of work. You decide whether elaboration is needed based on the scope:
Do NOT ask the user whether to elaborate. Assess the complexity from the domain model, success criteria, and data sources — then elaborate accordingly.
When UNIT_TYPES is set, only create units with disciplines matching the values. The active stage's definition file specifies which unit types belong to this stage.
When UNIT_TYPES is empty (single-stage), create units of all types as needed.
When
ITERATES_ONis set, reference the previous intent's units to understand what already exists in the codebase:
- Identify which previous units are affected by the follow-up work
- Suggest units that modify or extend specific previous units rather than starting from scratch
- Auto-populate
contextreferences pointing to previous unit files- Avoid duplicating work — describe how the new unit changes existing work
- Carry forward domain knowledge from the previous intent
Units MUST NOT span dependency boundaries. If a piece of work depends on another piece being done first, those are two separate units with an explicit depends_on edge.
Units MUST NOT span domains. A unit has exactly one discipline (frontend, backend, api, documentation, devops, design, etc.). No unit should mix frontend and backend work.
Design work is its own unit. If a feature needs UI/UX design work, create a separate unit with discipline: design and workflow: design.
| Discipline / Concern | Suggested Workflow | Rationale |
|---|---|---|
backend, api, devops, documentation | default (planner → builder → reviewer) | Standard implementation cycle |
design | design (planner → designer → reviewer) | Design artifacts need design hat, not builder |
infrastructure | default (planner → builder → reviewer) | IaC provisioning follows standard plan-build-review |
observability | default (planner → builder → reviewer) | Monitoring/alerting setup follows standard plan-build-review |
| Security-sensitive units | adversarial (planner → builder → red-team → blue-team → reviewer) | Adversarial testing for auth, crypto, data handling |
| Test-driven units | tdd (test-writer → implementer → refactorer → reviewer) | Red-Green-Refactor cycle |
| Units without a clear workflow need | (omit workflow: field) | Inherits the intent-level workflow |
Auto-routing rules:
discipline: design → automatically set workflow: designdiscipline: infrastructure or discipline: observability → default workflow (no override needed)Define each unit with enough detail that a builder with zero prior context builds the right thing:
Gate: Skip this sub-phase entirely if the intent has no deployment surface.
When the intent DOES have a deployment surface:
# Read stack layers from settings via MCP
STACK_INFRA=$(haiku_settings_get { field: "stack.infrastructure" } || echo "")
STACK_MONITORING=$(haiku_settings_get { field: "stack.monitoring" } || echo "")
STACK_COMPUTE=$(haiku_settings_get { field: "stack.compute" } || echo "")
Large intents (>2 units) with new deployable services:
discipline: infrastructure) with no depends_ondiscipline: observability) that depends_on feature unitsSmall intents (1-2 units):
No deployment surface:
depends_on: [] (foundational)depends_ondepends_on all feature unitsSkip if there is only one unit.
After units are defined, identify concerns that span multiple units (authentication, error handling, logging, shared state, caching).
Auto-decide how to handle each concern:
depends_on: [] and add it to consuming units' dependenciesAfter elaborating into units, analyze the specification flow for gaps:
Report gaps as:
### Spec Flow Gaps
- [ ] **Missing unit**: {user flow} has no unit covering {step}
- [ ] **Missing error path**: {unit} specifies success but not {failure scenario}
- [ ] **Contract gap**: {unit A} outputs {format} but {unit B} expects {different format}
Fix gaps by adding missing units or updating existing unit specs before proceeding.
This is a high-level alignment check before writing artifacts. Confirm the overall direction before investing effort in detailed unit specs.
Present the elaboration summary:
## Elaboration Summary
### Intent
{1-2 sentence problem statement}
### Domain Model
{Key entities and relationships — abbreviated}
### Data Sources
{List each data source}
### Units
For each unit:
- **unit-NN-{slug}**: {one-line description}
- Discipline: {discipline}
- Depends on: {dependencies or "none"}
- Builds: {specific components/modules/endpoints}
### Workflow
{workflow name}
Visual Review (preferred):
Check if visual review is enabled and ask_user_visual_question MCP tool is available. If so, call it with the elaboration summary as context.
Fallback: Use AskUserQuestion:
{
"questions": [{
"question": "Does this intent and unit breakdown generally align with what you want built? (You'll review each unit in detail when we write the specs.)",
"header": "Alignment",
"options": [
{"label": "Looks right", "description": "The intent, units, and scope are correct — proceed to write detailed specs"},
{"label": "Wrong breakdown", "description": "The unit elaboration needs changes"},
{"label": "Wrong direction", "description": "The overall approach needs rethinking"}
],
"multiSelect": false
}]
}
Autonomous mode: Auto-approve. Skip the alignment question.
The elaborated unit list (with disciplines, dependencies, specs, and criteria) is carried forward to the calling mode sub-skill for artifact writing (Phase 6).