Mirror the pack restructure into motir-meta — and teach `split.py` about packs that do not exist in the pre-split corpus
The runbook half of MOTIR-3866 and MOTIR-3869. The shipped planner now has one pack per type, deepen packs for epic / story / bug, and no operation axis; motir-meta still has the old shape.
What has to mirror
- 11 per-type packs replacing
type-bars.md—type-content,type-copy,type-translate,type-research,type-review,type-verification,type-decision,type-deploy,type-manual,type-legal,type-chore.type-migration.mdstays shared (code,chore,deploy). kind-epic-deepen.md,kind-story-deepen.md,kind-bug-deepen.md— the three deepen rule sets authored in motir-ai#329.kind-container.mdandkind-story.mdload atdeepentoo. Their currentSELECTORentries insplit.pyread "and phase = skeleton", which is the same hole motir-ai had: deepening a container is writing its two bodies, and that is exactly the pass the slice and journey rules are about.op-replan.mdmerges intocore.mdand the operation axis is retired —replanisplan, and the re-plan REASON is carried by the situation prompt.op-sprint.mdSTAYS: it is a runbook command with no shipped counterpart, which is a legitimate one-home pack.
⚠️ The machinery blocks a straight copy — read this before starting
prompts/plan-rules/MANIFEST.md is generated by split.py, and split.py builds its pending map from the PRE-SPLIT row model in DECISION.numbers.py:
for pack, body in blocks.items():
assert len(body) == P[pack]
assert sum(n for _, n in pending.values()) == dn.TOTAL
A pack with no rows in that model is not in pending, so:
split.py --headers— the only safe write mode, which re-emits headers with bodies read off disk — will not touch a new pack, and itsdn.TOTALassertion pins the model to the pre-split corpus.- The generated MANIFEST's routing table and "The files" table are derived from the same model, so new packs will not appear in the routing anybody reads.
- The full write is already guarded (it refuses because the packs have been compressed since the split), and
--forcewould revert every compression.
So the first deliverable is a split.py change, not a markdown one: let a pack exist without pre-split rows — --headers and the MANIFEST tables iterate the packs that exist on disk plus SELECTOR, rather than only the rows of the f7d5723 model. Keep the compression guard and the byte-identical body assertion exactly as they are; they are what make the mode safe.
Acceptance criteria
split.pysupports a pack with no pre-split rows:--headersemits its header, and both MANIFEST tables list it. The existingdn.TOTALassertion still holds over the packs that DO come from the model, and the compression guard is unchanged.- The 14 new pack files exist with generated headers, each carrying the rules authored in motir-ai#329 for the same pack name, so a TEXT probe finds the same rule in both homes.
kind-container.mdandkind-story.md'sSELECTORentries drop thephase = skeletonrestriction;type-bars.mdandop-replan.mdare retired,op-sprint.mdis not.COMPRESSION.conserve.pyis green, or the PR states which pack diverged and why — a MOVE between packs is a delete plus an insert and must be reviewed, not waved through.REGISTER.count.pyis re-run and its per-pack table is in the PR; the corpus-wide cautionary count does not rise.- The MANIFEST's per-command rows are regenerated, not hand-edited.
Context refs
motir-metaprompts/plan-rules/split.py—SELECTOR(~line 47), thependingbuild (~line 110),--headers(~line 125), the compression guard (~line 155), MANIFEST generation (~line 190).motir-metaprompts/plan-rules/DECISION.numbers.py— the row modelsplit.pyreads.motir-metaprompts/plan-rules/type-bars.md,op-replan.md,kind-story.md— the packs that change.- motir-ai#329 / motir-ai#330 — the authored rule text and the retired axis, to mirror verbatim.
- MOTIR-3866 / MOTIR-3869 — the shipped-side cards.
⚠️ The MANIFEST already documents the hole this fixes. It states: "Step 4 is the only step that loads a
type-*pack, because it is the only step at which a card has a type: steps 1–3 lay titles and edges, anddeepen_nodeis where the final type is set." That is the same constraint recorded in motir-ai#329 — the type is an OUTPUT of the deepen pass, so a prompt composed once cannot carry the chosen type's rules. Mirroring the packs does not fix that; it is tracked separately.
Comments (0)
No comments yet — be the first to weigh in.