/logic-plan
Produce a workspace plan for what to build and in what order. Do not write TypeScript.
Outcome
You hold {slug}-plan.md at repo root or tasks/, or a Pass 1 terminal with no plan file.
Assumptions
- Skill file:
.agents/skills/logic-plan/SKILL.md - Plan chapters:
.agents/rules/logic/plan-format.md - Discovery findings may exist. They are not required.
Non-goals
- Do not implement.
- Do not call
create_hook, scaffold, or edit*.hook.ts. - Do not edit interfaces.
- Do not seize
/hook-plan,/logic-discovery, or/logic-plan-critic.
Contract
Grain is the workspace: documents and hooks, and their order. Grain is not one hook.
Pass 0 is local intake. Pass 1 binds job. Pass 2 calls MCP and writes the plan.
Pass 2 is illegal until job is a Pass 2 job. Skip does not bind a job.
Syntax
The first message does not name a job. It does not name a plan type. It does not paste a job list.
If the slash name does not start the skill, put @.agents/skills/logic-plan/SKILL.md on line 1.
Closed intake labels:
| Label | Holds | Must not hold |
|---|---|---|
Problem: | situation, wanted outcome, or want: / got: | job, type, method, file path |
Open: | the user's unbound unknowns | job catalog, answers you already have |
Ground: | paths only | Problem: or Open: prose |
Ground: is optional. Zero files is legal. At most five Read calls. Allowlist: files already in the prompt that match *-discovery.md, *-requirments.md, *-plan.md, *-hook-plan.md, *.hook.ts, or a user-named path.
Empty Problem: + Open: + Ground: is success. The skill does not call MCP to find a situation.
Expected result: An <intake> block. Then the question: what job is this run? Select a live job in the question box.
Fields
Passes
| Pass | Name | Tool budget | Enters when |
|---|---|---|---|
| 0 | local intake | at most five Read | skill invoked |
| 1 | job bind | none | Pass 0 filled slots |
| 2 | MCP and plan | MCP + path-load | job is a Pass 2 job |
No MCP in Pass 0 or Pass 1. That includes flow_documents preflight and hook_graph stats.
Job catalog
| job | Pass | Prepares |
|---|---|---|
impact | 2 | a change that may touch many documents and hooks |
patch | 2 | a change to the named situation |
spawn | 2 | new documents and/or hooks |
retire | 2 | deletes and unwiring across the workspace |
explain | 1 terminal | read intake with no workspace plan |
handoff-hook-plan | 1 terminal | plan one hook |
handoff-discovery | 1 terminal | find facts first |
handoff-critic | 1 terminal | audit the workspace plan that exists |
Live jobs are computed from signals. The question box shows only live jobs. Offering a job the signals exclude is illegal.
A named handoff label must name the owner skill and path.
Signals
| Signal | Fires when |
|---|---|
couple | two or more hook or document slugs in Problem: or Ground: |
fanout | batch, import, volume, N jobs, or a named callee flooded by a named producer |
delete | unwire, remove, or stop a named hook or document |
one-target | exactly one hook or document as write-target, and not fanout |
create-cap | wanted outcome with no existing named producer |
read-only | Open: only, or no defect-under-load and no change to build |
fanout never includes patch. If there is no delete signal, retire is not live. explain only if read-only.
Empty intake live set: spawn, handoff-discovery.
A workspace *-plan.md or a Plan: label can add handoff-critic.
Plan type (Pass 2)
If type is unbound, the skill asks once:
bug | feature | fix | user-request | research
Do not put type in the first message. Labels come from plan-format.md.
| Type | Must include | Must not |
|---|---|---|
bug | Symptom. Expected vs actual. Technical blast radius | Root cause as fact |
feature | Document and hook tables. Phased separation of concerns | Implementation code |
fix | Smallest converging change. Replay | Unrelated refactors |
user-request | User words quoted. Phased separation of concerns | Silent scope expansion |
research | Remaining questions. Evidence ledger | Implementation phases |
Gradual order
Skip a missing step. Never reorder.
new documents → document deletes → document updates
→ new hooks → hook updates → hook deletes
→ conflict / overlap resolution
A later step before an earlier required step is a BLOCKER.
Blast radius
Technical graph from hook_graph upstream, downstream, references, plus relationships.
| Level | Technical meaning |
|---|---|
| 🟢 | Local. No upstream callers. No cross-domain write. |
| 🟡 | Shared calculate/validator, dependents, or replay-sensitive. |
| 🔴 | Cross-domain, lifecycle/status, inventory or accounting posting, unbounded scan, or unresolved graph edge |
Business impact is a decision. Ask. Do not invent it.
Pass 2 rules (load, do not recopy)
.agents/rules/mcp.md.agents/rules/logic/thinking.md— a workspace plan isscope=IN.agents/rules/hook-utils-mcp.md.agents/rules/logic/grill.md.agents/rules/logic/plan-format.md- type-specific leaves named by
plan-format.md - domain file from
.agents/rules/catalog.mdonly when the domain is named
Output
Pass 1:
<intake>
- problem: empty | filled
- open: empty | filled
- seen: none | <path> | <collection/slug>
- kind: problem | open | discovery.md | requirments.md | plan.md | hook-plan.md | hook.ts | named-in-prompt | mixed | none
- signals: comma-separated signal ids
- live: comma-separated job ids
- recommend: one live job
</intake>
Pass 2: write {task-slug}-plan.md. Follow plan-format.md chapters. Omit empty chapters.
Then tell the user to run /logic-plan-critic.
Evidence grades: VERIFIED | INFERRED | UNKNOWN.
Constraints
- At most five Pass 0 tool calls. A sixth call is illegal.
- Ban
Grep/Globof the hooks tree for MCP-owned facts. - Do not invent required identities, fields, statuses, keys, or relationships.
- If conversation or a discovery file already exists, use it. Do not re-derive settled facts.
researchuses Remaining questions, not implementation phases.
Errors
| Problem | Cause | Action |
|---|---|---|
| Tools start in Pass 0 | Job, type, or method in the first message | Keep only Problem:, Open:, and paths under Ground: |
| No situation found | Prose under Ground: | Move prose to Problem: or Open: |
| MCP missing in Pass 2 | Tools not visible | Stop. Fix Setup. |
| BLOCKER on order | Later step before an earlier required step | Reorder to gradual order |
Required identity UNKNOWN | Invented name | Ask. Do not fill the slot |
Related
/logic-discoveryif facts are missing/logic-plan-criticafter a non-research plan file/hook-planwhen the job is one hook