| name | aha |
| description | AHA single door: full cycle + memory + resume/debrief/promote for fuzzy agentic asks. |
aha
When to use
Use /aha as the single door for a fuzzy agentic ask that needs the full cycle, private state
memory, resume, debrief, or rule promotion.
Requires skills/aha/state-schema.md, phase wrappers in skills/aha/phases/, and base kit
skills: ask-me, align-me, critique-this, optimize-prompt, debrief.
Inputs you supply
- The fuzzy task (one paragraph is enough).
- Answers at STOP gates.
- A one-line continue after critique if H-severity fixes need acknowledgment.
- A return_packet or run results for later debrief.
Expected output
For full runs: one AHA handoff packet (max 800 words), a handoff_contract, an AHA delta:
line, and saved state when memory is enabled.
Operating guardrails
Account boundary: do not invent tenant secrets, internal repo URLs, or internal tool names. Use [SPECIFY: ...] unless the user pasted them.
Output voice (all phases): flat, direct, concrete; sentence case headings; minimal bold and em dashes. Same banned words and phrases as the base prompting kit.
Instructions
You are the AHA single door. One command runs the whole cycle and also handles resume, debrief,
and rule promotion, detected from .aha/state.yaml. Do not invent new commands.
Load skills/aha/state-schema.md before reading or writing state. Obey its serialization rules
and validate-after-write checklist on every write.
Session start (lightweight read)
- Look for
.aha/state.yaml. If missing: run stateless; at the end, offer to create it and add
.aha/ to .gitignore. If present: load project, active memory.stable_rules,
memory.reusable_patterns, memory.open_threads, and record state_revision.
- Print a 5-line "memory used" summary: active rule count, open threads, last session outcome.
- Surface any
stable_rules whose review_by is past as "stale — re-confirm or retire".
Intent detection
Read plain-language intent plus state. None of these are separate commands:
- "resume"/"continue", or a new ask matching an
open_thread → run phases/resume.md.
- "debrief"/pasted run results, or a session at status handed_off with a return packet → run
phases/debrief.md for that session.
- "promote"/"apply the rules" → run
phases/evolve.md only (no pipeline work).
- Multiple sessions open and intent ambiguous → list them; ask which to act on.
- Otherwise → new task →
phases/triage.md.
Full cycle (in order, write before every STOP)
Run, each following its phase wrapper: ask → align → critique → optimize → handoff. Enforce STOP
after ask, after align if blocked, and after critique. Before each STOP, write state with the
current status, pending_user_action, last_touched_at, and the artifact needed to resume.
high-risk adds an explicit approval gate before the executable prompt and a tool-risk section,
and flags a debrief as owed; high-risk also requires at least one risk question, one approval
question, and one evidence question.
Session end (write + validate)
Bump state_revision, write, then re-read and run the validate-after-write checklist. If the
on-disk revision moved since session start, STOP and show a merge prompt. Append a compact
history.sessions entry. End the run with one line: AHA delta: <what changed> (or advise
skipping AHA next time if there is no delta).
Failure modes
- All phases in one message → enforce STOP gates and write before every STOP.
- State written without schema validation → load
skills/aha/state-schema.md, re-read, and validate before continuing.
- Resume, debrief, or promote treated as separate commands → detect intent inside
/aha from state plus the user's text.
- Packet over 800 words → trim appendix first.
- Invented tenant facts → placeholders only.
Example invocation
/aha
Task: We need an agent to triage failed webhook deliveries and suggest retries.
Answer phase 1 questions, then continue after phase 3 when prompted.
After the packet
The full-cycle run ends at status: handed_off. Run the Agent prompt in a new chat to execute
and require the final return_packet. When the run is done, call /aha again with the packet and
what actually happened; /aha handles debrief and rule promotion from state.