Plan the workspace
Get a {slug}-plan.md that says what to build and in what order.
The work spans documents and hooks. Do not write TypeScript in this skill.
Outcome
You hold a plan file in gradual order, then a critic verdict.
Prerequisites
- Discovery findings, or a situation you can state in one block
/logic-planor@.agents/skills/logic-plan/SKILL.md
Load discovery findings or quote them. Format: .agents/rules/logic/plan-format.md.
First message
The first message does not name a job. It does not give a list of choices. It does not name a plan type.
Do not paste a pipeline story into this message.
/logic-plan
If the slash name does not start the skill, put @.agents/skills/logic-plan/SKILL.md on line 1.
Slots
Use these labels. You may use one. You may use two. You may use three. Ground: is not required.
| Label | Holds | Must not hold |
|---|---|---|
Problem: | situation, wanted outcome, or want: / got: | job, type, method, file path |
Open: | unknowns | skill choice list, answers you already have |
Plan: | an existing {slug}-plan.md, or a short outline you already have | job, type, hook source |
Put files that are not a workspace plan below Ground: if you need them. Paths only.
Order in the message: Problem: then Open: then Plan: then Ground:.
The first message may use Problem: and Open: with no files.
Empty call
If you send no slots, send only /logic-plan.
The skill must not call MCP. It must not reuse a stored sample. It replies with one new fill-in instruction. The instruction is generated for this turn. It is not copied from this page.
Shape of that reply (the skill writes new sentences each time):
Send the message again. Fill one block.
Problem:
<one new sentence: wanted result, or want: / got:>
or
Open:
- <one new unknown>
or
Plan:
<one new outline line, or @path-to-plan.md>
Do not paste a job list into that reply.
Minimal example
/logic-plan
Problem:
warehouse can freeze a bin so pickers cannot allocate stock from it
Expected result: The skill asks what job this run is. You select the job in the question box.
Problem: examples
Wanted outcome
/logic-plan
Problem:
warehouse can freeze a bin so pickers cannot allocate stock from it
Want vs got
Do not name a cause. Do not name a fix.
/logic-plan
Problem:
want: bank import rejects a duplicate hash before a payment-log row is created
got: a second row is created with the same hash
Lifecycle outcome
/logic-plan
Problem:
a paused recurring journal does not post on the calendar day, and resume posts only from the resume date
Cross-domain outcome
/logic-plan
Problem:
shipping a transfer order decrements source on-hand and increments destination only after receive is confirmed
Open: examples
Unknowns only
/logic-plan
Open:
- which document stores the freeze flag
- who may set freeze
Scope unknowns
/logic-plan
Open:
- does AP aging read open bills only or also unposted
- is aging a report hook or a scheduled calculate
Identity unknowns
/logic-plan
Open:
- what is the unique key for a lot on an item
- which status means expired vs quarantined
Plan: examples
Plan file only
/logic-plan
Plan:
@tasks/bin-freeze-plan.md
Outline only
Do not name a job. Do not name a type.
/logic-plan
Plan:
1. add freeze on the bin document
2. block allocate when freeze is true
3. show freeze on the warehouse screen
Plan file and a constraint
/logic-plan
Plan:
@tasks/transfer-receive-plan.md
receive must not write source on-hand
Combined examples
Problem: and Open:
/logic-plan
Problem:
expired lots cannot be issued to a manufacturing order
Open:
- is expiry a date on the lot or a status
- which hook issues components
Problem: and Plan:
/logic-plan
Problem:
mix percent on a production report must total 100 with no tolerance when policy is strict
Plan:
@tasks/mix-percent-plan.md
Open: and Plan:
/logic-plan
Open:
- which phases in the plan still have UNKNOWN fields
Plan:
@tasks/recurring-journal-plan.md
All three
/logic-plan
Problem:
want: credit exposure report includes a 90–100 percent utilization band
got: the report stops at 80–90
Open:
- is the band a document setting or hard-coded in the hook
Plan:
@tasks/credit-exposure-plan.md
Problem: plus hook names under Ground:
/logic-plan
Problem:
one receive path must update transfer status and on-hand together
Ground:
inventory-management/receive-transfer
inventory-management/update-shipping-and-invoicing-statuses
After the question
The skill asks: what job is this run?
You see only the live jobs for this intake. You do not see the full catalog. Select the choice in the question box. Do not put that choice in the first message.
If two hooks and a batch or job flood are in Problem:, live is impact, spawn, handoff to hook-plan. It is not patch. It is not retire.
If you select a Pass 2 job, the skill may ask the plan type. Answer in the question box.
bug | feature | fix | user-request | research
Incomplete facts are allowed. If facts are missing, the skill sends you back to discovery.
explain
You want to read the intake. You do not want a workspace plan now. The skill does not call MCP. It does not write a plan file.
patch
You want to change the current system.
spawn
You want new documents or hooks. Intake is reference only. New documents come before new hooks.
impact
You want the graph of documents and hooks this situation can touch. The skill uses hook_graph in Pass 2. Do not put blast words in the first message.
retire
You want to remove documents or hooks and disconnect callers. Deletes come last in the order.
Named handoff
Each option names who receives the work.
handoff to hook-plan — plan one hook.
/hook-plan
Ground:
create-journal-entry-with-items
handoff to logic-discovery — find facts first.
/logic-discovery
Problem:
want: bank import rejects a duplicate hash before a payment-log row is created
got: a second row is created with the same hash
handoff to logic-plan-critic — audit the workspace plan that exists.
/logic-plan-critic
Plan:
@tasks/bin-freeze-plan.md
Plan types
Select the type in the question box. Do not put the type in the first message.
| Type | Meaning |
|---|---|
bug | Smallest fix. Symptom. Expected vs actual. Technical blast radius. Do not state root cause as fact. |
feature | New behaviour. Document vs hook phases. Gradual order. |
fix | Smallest converging change. Replay and overlap gates. No unrelated refactors. |
user-request | Quote the user sentence. Phase schema vs hook. No silent extra features. |
research | Remaining questions only. No implementation phases. Then stop. |
Situations for feature
finance-reports/account-credit-exposure-report (pattern: 'report').
/logic-plan
Problem:
Add a 90–100% utilization tier to the account credit exposure report.
Ground:
finance-reports/account-credit-exposure-report
When asked, select feature. The plan must include document vs hook phases, gradual order, and blast from hook_graph.
finance-reports/bill-aging-report (Not Yet Due, 1–30, 31–60, 61–90, 90+).
/logic-plan
Problem:
AP aging needs a 91–120 bucket.
Ground:
finance-reports/bill-aging-report
Situations for user-request
procurement/create-purchase-order (pattern: 'create-document'): optional bob.options.status (for example confirmed drop-ship).
/logic-plan
Problem:
"Drop-ship POs must still start as draft. Remove the status override on
`procurement/create-purchase-order`."
Ground:
procurement/create-purchase-order
Quote that sentence when you answer the type. Phase schema vs hook work. Name logic gates.
shipping-ai/generate-invoice-from-bill-of-lading.
/logic-plan
Problem:
"Invoicing from a BOL should stay a separate button. Do not invoice
inside drop-ship receive."
Ground:
shipping-ai/generate-invoice-from-bill-of-lading
manufacturing-ai/move-manufacturing-quantity. Split preserves status. Full move resets to draft.
/logic-plan
Problem:
"A full warehouse move of an MO should keep the current status,
same as split does."
Ground:
manufacturing-ai/move-manufacturing-quantity
Do not expand into costing or routing edits.
Situations for fix
sales-blanket-orders/expire-blanket-orders-schedule (pattern: 'schedule'). The JSDoc says to isolate per-order failures. The body uses one updateMany for active → expired.
/logic-plan
Problem:
JSDoc says one stuck blanket must not abort the batch, but execute() uses a single updateMany.
Ground:
sales-blanket-orders/expire-blanket-orders-schedule
Plan the smallest converging change. Replay and overlap gates. No unrelated refactors.
inventory-management/sync-next-cycle-count-date. Create and enrich return in-memory. Deactivate writes.
/logic-plan
Problem:
Suspending a cycle schedule still shows a next count date.
Ground:
inventory-management/sync-next-cycle-count-date
Smallest change to sync-next-cycle-count-date. Replay gates. Do not redesign create-cycle-schedule.
finance-fiscal-periods/compute-fiscal-period-metrics (pattern compute, body patches).
/logic-plan
Problem:
The hook is labeled compute but it patches fiscalPeriod.
Ground:
finance-fiscal-periods/compute-fiscal-period-metrics
Smallest converging change (reclassify vs split). No unrelated close-year work.
Situations for bug
procurement-ai/receive-dropshipping-purchase-order (over-shipment guard).
/logic-plan
Problem:
drop-ship receive wrote PO/SO shipped qty before the
over-shipment guard.
Ground:
procurement-ai/receive-dropshipping-purchase-order
finance-payments/void-check (delegates reverse-vendor-credit-memo).
/logic-plan
Problem:
void-check zeros the bill payment but skips restoring
consumed vendor credit memos when reverse-vendor-credit-memo fails.
Ground:
finance-payments/void-check
Technical blast radius comes from hook_graph after the job is bound. Confirm business impact yourself.
Situations for research
sales-ai/calculate-sales-order (pattern: 'calculate').
/logic-plan
Problem:
Who calls the hook, which fields it writes on the payload, and whether any callee mutates.
Ground:
sales-ai/calculate-sales-order
Remaining questions only.
finance-fiscal-periods/close-fiscal-year.
/logic-plan
Problem:
Who calls the hook, which years or periods it writes, and
whether metrics persist on the period or only on the year.
Ground:
finance-fiscal-periods/close-fiscal-year
Journal template cron vs calculate.
/logic-plan
Problem:
What check-journal-entry-templates-schedule owns vs
calculate-journal-template vs create-journal-entry-with-items.
Callers, statuses (running / inactive / paused).
Ground:
finance-journal-templates/check-journal-entry-templates-schedule
Type not named yet
The skill must ask.
/logic-plan
Problem:
year close takes forever. make it faster. or skip some checks?
not sure if that's a fix or a feature.
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 is the graph (🟢 local / 🟡 shared / 🔴 cross-domain). Business impact is a question. Do not guess.
Criticize the plan
Run the critic on any non-research plan after {slug}-plan.md exists.
/logic-plan-critic
Plan:
@tasks/bin-freeze-plan.md
The critic tests the plan. It finds counterexamples. It checks gradual order. It re-queries blast radius. Verdict PASS, REVISE, or REJECT.
Checks
- The first message has no job name and no type.
- Empty slots get a generated fill-in, not MCP.
Plan:holds a plan file or an outline. It does not hold hook source.
If a problem occurs
| Problem | Cause | Action |
|---|---|---|
| Tools start at once | Job, type, or method in the first message | Keep only Problem:, Open:, Plan:, and paths |
| No situation found | Prose is under Ground: or Plan: | Move prose to Problem: or Open: |
| Plan file ignored | Plan path is under Ground: | Move {slug}-plan.md under Plan: |
Empty /logic-plan reused an old sample | Stored example | Generate a new fill-in instruction |
Next
- Plan one hook after critic
PASSwhen the change is a hook - Implement and review after an approved hook-plan
- Discover facts if the skill sends you back