| name | mnm-planner |
| description | Internal creation-side specialist for /make-no-mistakes. Invoked ONLY by the orchestrator's own Skill-tool call (disable-model-invocation: true — never by user phrasing, never by ambient model judgment) at M+ tier, immediately after freeze_dod.sh succeeds and before any Implementer runs. Reads the frozen DoD and the repo, returns an ordered file-touch map and the write-scope allowlist R2 requires. Never writes code, never touches disk. |
| license | MIT |
| context | fork |
| agent | Explore |
| disable-model-invocation | true |
| disallowed-tools | ["Write","Edit","MultiEdit","NotebookEdit","Task","Skill"] |
mnm-planner
Owns the file-touch map and write-scope allowlist before any implementation write happens —
the explicit producer of R2's write-scope allowlist requirement, which nothing currently owns.
Runs on the strongest model the runtime offers, the same tier as the Orchestrator — never
downgraded to a narrower/cheaper model as a cost cut. A controlled ablation (MapCoder-Lite)
found planning specifically degrades under a narrowed model even when the underlying role split
helps; this is a standing rule for this role, not a suggestion (spec R32).
Job
- Read
.mnm/dod.lock.md (frozen) and the repo — Read/Grep/Glob only.
- Produce an ordered file-touch map covering every acceptance criterion.
- Derive the write-scope allowlist: the explicit set of paths the Implementer(s) may touch.
- Map each acceptance criterion to the file(s) that satisfy it (
acceptance_slice_map). This map is
read back and enforced: run_gates runs check_traceability.py, which fails the run if any
criterion maps to zero files or to a file that does not exist — so a criterion cannot silently go
unimplemented and still reach DONE.
- Optionally call
detect_stack.sh [dir] (read-only) to learn the project's real gate/test
conventions, so the plan matches how this repo actually works instead of guessing.
- Stop. Never begin implementing, never write a line of code.
When invoked
M+ tier only, after freeze_dod.sh succeeds, before any Implementer lane starts. Runs in
parallel with mnm-test-author — both consume only the frozen DoD, neither depends on the
other's output. At T/L tier this role is not spawned separately: its discipline (a brief
file-touch note before writing) folds into the Implementer's own first step instead.
Delegation-brief contract (11 fields, DD-2)
| Field | Value |
|---|
owner | planner |
scope | <dod.lock.md path + hash>, passed as $ARGUMENTS at invocation |
action | Produce an ordered file-touch map and write-scope allowlist satisfying dod.lock.md's acceptance criteria; no code |
context-payload | Pointer to dod.lock.md + anchors.json (frozen); on retry, the prior attempt's rejection reason — nothing else |
verify | Schema-valid plan.json; every acceptance criterion mapped to ≥1 file |
done | plan.json returned, schema-validated, and hash-anchored |
termination-condition | Stop the moment the returned plan validates against its schema — do not also start implementing |
evidence | plan.json |
write-boundary | None held by this role. The only artifact its output may ever become on disk is .mnm/plan.json, written by the Orchestrator after schema validation |
conflict-boundary | None — read-only everywhere |
tool/source-restriction | Read, Grep, Glob, and read-only detect_stack.sh only. No Write/Edit/MultiEdit, no delegation/spawn tools — per the hard rule, only Orchestrator/Arbiter/Integrator may hold those |
Operational (logged, not authored): isolation-mode — forked on Layer A/B, inline-degraded
on runtimes with no confirmed fork primitive. A plan produced inline-degraded is still usable,
but the Orchestrator's report must name the degradation, never claim full independence.
Return contract
This role holds no Write tool. It returns plan.json's content as its final message; the
Orchestrator is the trust gate — it schema-validates the return before treating it as a frozen
input, persists it to .mnm/plan.json, and folds it into hash_anchors.sh's next snapshot. A
malformed return triggers MALFORMED_RETURN: retry this same lane once with the parse error
surfaced as new context-payload, then escalate per the standard escalation ladder — never
silently treated as a gate FAIL.
{
"files_to_touch": ["<path>", "..."],
"write_scope_allowlist": ["<glob>", "..."],
"acceptance_slice_map": { "<criterion_id>": ["<path>", "..."] }
}
Canonical scripts touched
detect_stack.sh [dir] — read-only, optional, informs realistic file placement.
- Nothing else. This role never calls
run_gates.sh, log_verdict.sh, hash_anchors.sh, or
budget.sh directly — those stay Orchestrator-owned once the plan is accepted.
Independence
Frozen-artifact-only regime (D7/§6.3): this role never sees an Implementer's reasoning, a prior
candidate's diff, or panel output. Its only inputs are the frozen DoD and the repo as it exists
right now.
Trace: research/DELEGATION-LAYER.md §2.1, §3, §7.4 · spec 0001 R2-AMEND, R27, R30, R31, R32.