Skip to main content

/hook-plan

Plan a version-2 business hook. Do not write hook files.

Outcome

You hold {collection}-{slug}-hook-plan.md. The hook .ts is unchanged.

Assumptions

  • The work is one hook. If more than one hook must change, use /logic-plan.
  • Skill file: .agents/skills/hook-plan/SKILL.md

Non-goals

  • Do not call create_hook, scaffold, or edit *.hook.ts.
  • Do not run the coder implement station.
  • Do not emit hook source.

Contract

Grain is one business hook. The skill plans the hook. It does not implement the hook.

Pass 0 is local intake. Pass 1 binds job. Pass 2 calls MCP and writes the hook-plan.

Pass 2 is illegal until job is a Pass 2 job. Skip does not bind a job.

Accuracy in Pass 2 requires MCP evidence, exactly one pattern, Pattern grammar order, replay, and transaction.

Syntax

The first message does not name a job. It does not name a type.

/hook-plan uses Ground: for operands. It does not use Problem: or Open:.

LabelHoldsMust not hold
Ground:@*.hook.ts, *-hook-plan.md, or collection/slugverbs, job names, option lists

At most five Read calls. Zero reads are legal.

/hook-plan
Ground: warehouse/freeze-bin

If the slash name does not start the skill, put @.agents/skills/hook-plan/SKILL.md on line 1.

Expected result: An <intake> block. Then the question: what job is this run? Select a live job in the question box.

Question

What job is this run?

  1. Aimpacta user story that may have upstream/downstream blast
  2. Bpatcha change to the seen hook
  3. Cspawna new hook
  4. Dretireunwiring or deleting the seen hook
  5. Eexplainreading the seen stream with no change planned

Fields

Passes

PassNameTool budgetEnters when
0local intakeat most five Readskill invoked
1job bindnonePass 0 filled seen / kind
2MCP and planMCP + path-loadjob is a Pass 2 job

No MCP in Pass 0 or Pass 1.

Job catalog

jobPassPrepares
impact2a user story that may have upstream/downstream blast
patch2a change to the seen hook
spawn2a new hook
retire2unwiring or deleting the seen hook
explain1 terminalread the seen stream with no change planned
handoff-logic-plan1 terminalplan many documents and hooks in order
handoff-discovery1 terminalfind facts first
handoff-critic1 terminalaudit the hook-plan that exists

Live subset

Pass 0live
seen=nonespawn, handoff-discovery
kind=hook.ts or named collection/slugimpact, patch, spawn, retire, explain, handoff-logic-plan
kind=hook-plan.mdpatch, spawn, handoff-critic

Several hooks or order-of-work → handoff-logic-plan. Do not add jobs outside the catalog.

patch / explain: understand the seen execute() stream only. Do not traverse callee hooks or actions in that step. Extract, split, and reclassify are flavors of patch, not extra jobs.

spawn: a seen hook is a reference only. Do not treat it as the artifact to change.

Pass 2 rules (load, do not recopy)

  1. .agents/rules/mcp.md
  2. .agents/rules/logic/thinking.md — a hook plan is scope=IN
  3. .agents/rules/hook-utils-mcp.md
  4. .agents/rules/hook-utils-forbidden-constraints.md
  5. .agents/rules/hook-utils-patterns.md
  6. .agents/rules/logic/grill.md
  7. .agents/rules/hook/coder.md
  8. selected authoring specialist from .agents/rules/hook-utils-patterns.md
  9. .agents/rules/query/api.md and/or .agents/rules/query/bulk.md as the hook requires
  10. .agents/skills/hook-code-style/SKILL.md

Coder stations allowed: preflight, discover, gate_domain, gate_requirements, classify_pattern, sample_exemplars.

Banned station: implement.

The coder rule does not load thinking.md. This skill does, in Pass 2 only.

Pass 2 output

Write {collection}-{slug}-hook-plan.md with all of:

  • Pattern decision and rejection of narrower or wrong patterns
  • Evidence ledger (VERIFIED / INFERRED / UNKNOWN)
  • Decorator fields (idempotent, concurrency, timeout) with justification
  • execute() phase list matching Pattern grammar
  • Result contract (ok + data)
  • Replay, transaction, error policy
  • Downstream calls
  • Open questions

Then tell the user to run /hook-plan-critic.

Pass 1 intake

<intake>
- seen: none | <path> | <collection/slug>
- kind: hook.ts | hook-plan.md | named-in-prompt | none
- live: comma-separated job ids
- recommend: one live job
</intake>

Constraints

  • Choose exactly one LogicHookPattern. Counterexample the others.
  • Mapping execute() onto the selected Pattern grammar is mandatory. Reorder is a BLOCKER.
  • Every required identity, field, status, key, or relationship that is UNKNOWN must be asked.
  • If required MCP tools are missing, stop. No filesystem fallback for what MCP owns.
  • English in the skill must obey ASD-STE100. TypeScript, EBNF, paths, MCP names, and catalog tokens stay unchanged.

Errors

ProblemCauseAction
Tools start in Pass 0Verb or job in the first messageKeep only paths under Ground:
More than one hook must changeWrong grainCall /logic-plan
Only some files readMore than five @ filesRemove files
Grammar order unboundPhases do not match Pattern grammarBind order before COMMIT
Required slot inventedUNKNOWN filled without evidenceAsk. Do not invent