Skip to main content

/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.

/logic-plan

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

Closed intake labels:

LabelHoldsMust not hold
Problem:situation, wanted outcome, or want: / got:job, type, method, file path
Open:the user's unbound unknownsjob catalog, answers you already have
Ground:paths onlyProblem: 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.

/logic-plan
Problem: warehouse can freeze a bin so pickers cannot allocate stock from it

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

Fields

Passes

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

No MCP in Pass 0 or Pass 1. That includes flow_documents preflight and hook_graph stats.

Job catalog

jobPassPrepares
impact2a change that may touch many documents and hooks
patch2a change to the named situation
spawn2new documents and/or hooks
retire2deletes and unwiring across the workspace
explain1 terminalread intake with no workspace plan
handoff-hook-plan1 terminalplan one hook
handoff-discovery1 terminalfind facts first
handoff-critic1 terminalaudit 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

SignalFires when
coupletwo or more hook or document slugs in Problem: or Ground:
fanoutbatch, import, volume, N jobs, or a named callee flooded by a named producer
deleteunwire, remove, or stop a named hook or document
one-targetexactly one hook or document as write-target, and not fanout
create-capwanted outcome with no existing named producer
read-onlyOpen: 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.

TypeMust includeMust not
bugSymptom. Expected vs actual. Technical blast radiusRoot cause as fact
featureDocument and hook tables. Phased separation of concernsImplementation code
fixSmallest converging change. ReplayUnrelated refactors
user-requestUser words quoted. Phased separation of concernsSilent scope expansion
researchRemaining questions. Evidence ledgerImplementation 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.

LevelTechnical 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)

  1. .agents/rules/mcp.md
  2. .agents/rules/logic/thinking.md — a workspace plan is scope=IN
  3. .agents/rules/hook-utils-mcp.md
  4. .agents/rules/logic/grill.md
  5. .agents/rules/logic/plan-format.md
  6. type-specific leaves named by plan-format.md
  7. domain file from .agents/rules/catalog.md only 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 / Glob of 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.
  • research uses Remaining questions, not implementation phases.

Errors

ProblemCauseAction
Tools start in Pass 0Job, type, or method in the first messageKeep only Problem:, Open:, and paths under Ground:
No situation foundProse under Ground:Move prose to Problem: or Open:
MCP missing in Pass 2Tools not visibleStop. Fix Setup.
BLOCKER on orderLater step before an earlier required stepReorder to gradual order
Required identity UNKNOWNInvented nameAsk. Do not fill the slot