| name | haiku-adopt |
| description | Reverse-engineer an existing feature into H·AI·K·U intent artifacts |
Adopt
Reverse-engineer an existing feature into H·AI·K·U intent artifacts.
Process
Phase 0 — Pre-checks
Phase 1 — Gather description
- Get feature description
- Ask for code paths (specific directories or search whole repo)
- Ask for git references (PRs, branches, date range)
Phase 2 — Feature exploration (5 parallel subagents)
- Code path analysis (modules, entry points, dependencies)
- Git history analysis (commit groups, PR boundaries, timeline)
- Test analysis (test files, coverage patterns, verified behaviors)
- CI configuration analysis (pipelines, quality gates)
- Deployment surface analysis (containers, infra, monitoring)
Phase 3 — Propose intent and units (user confirms)
Phase 4 — Reverse-engineer success criteria from tests
Phase 5 — Generate operational plan (if operational surface found)
Phase 6 — Write artifacts (intent.md, unit files, discovery.md, operations/)
Phase 7 — Handoff (summary + next steps)
CRITICAL: MUST NOT modify existing code. Adopted units describe what already exists — they are written with synthetic terminal iterations[] (last entry result: "advance") and signed reviews{} / approvals{} so the cursor sees them as completed and never dispatches a hat against them. Forward-only invariant: completed work is immutable.
Wait for user confirmation at each gate (Phase 3, 4, 5).