The five type-* packs — lesson rows, the mirror, and the type-test / type-bars routing slots
The motir-ai half of the type-* family, and the card that closes two of the three routing holes the story names.
The holes, measured on origin/main: PLANNING_RULE_PACK_ORDER has twelve entries and PlanningRulePackName is derived from it — core, phase-skeleton, phase-deepen, kind-container, kind-story, kind-leaf, kind-leaf-deepen, kind-bug, type-code, type-design, type-migration, op-replan. There is no type-test and no type-bars slot, so those two source packs have nowhere to land, and PACKS_BY_TYPE has no test key, so a test leaf loads no type pack at all. This card opens both slots and wires the test type to the first of them. (The third hole, op-sprint, belongs to the op card.)
Opening a slot means landing content in it, not just adding a name. A pack that composes to an empty string is a routing entry that asserts nothing, and PLANNING_RULE_PACKS derives each pack by filtering CORPUS_ORDER — so each new slot needs at least one segment tagged to it, lifted from the restated type-test.md and type-bars.md. If either pack's restated content turns out not to warrant a mirror segment, do NOT open an empty slot: record in the PR body why the routing stays as it is, which is the disposition the story's own criterion allows.
The rest is the standard family shape. Lesson rows and the mirror in one PR: for each migrate row in RESTATEMENT.md's five type-* sections, add a BASE_LESSONS row or record a MERGED line naming the covering row's sourceRef. This is the family where the types routing axis is most obviously right — a type-migration limb is types: ['code', 'chore', 'deploy'], a type-design limb is types: ['design'], a type-test limb is types: ['test'] — so constrain deliberately rather than leaving everything unconstrained.
Same two constraints as every lesson card here: no new sourceRef may carry a #N above CORPUS_HEAD = 356, and title / body / howToApply may name no repository, file, symbol, card key or date. Run pnpm lessons:generate-migration and commit the emitted delta.
Then the mirror and the baselines: locate each destination by probing the constant for the restated wording, not by pack tag; refresh sharedPlanningRules.baseline.txt and read its diff; delete any planningRulePacks.test.ts assertion pinning a migrated phrase; refresh planningRuleRouting.baseline.txt — it will move here, because new packs change the cells — and refresh the register ceiling DOWNWARD.
blocked_by the previous link in the motir-ai chain as well as its own source card.
Acceptance criteria
PLANNING_RULE_PACK_ORDERgainstype-testandtype-bars, each with at least one segment tagged to it inCORPUS_ORDER, andPACKS_BY_TYPEgains atestentry resolving totype-test— or the PR body records, per pack, why the routing stays as it is.- Every legal cell that selects a
testleaf atdeepenresolves to a non-empty composed pack, demonstrated by a test rather than asserted. - Every migrate row in
RESTATEMENT.md's fivetype-*sections has a disposition here: a newBASE_LESSONSrow or a MERGED line with its coveringsourceRefand reason. - Rows derived from a type-scoped limb carry a
typesconstraint naming that type; the PR body states the constraint chosen for each row and why. - No new
sourceRefcarries a#Nabove 356;CORPUS_HEADis unchanged; the totality, uniqueness, generic-rewrite and date guards pass unweakened. pnpm lessons:generate-migrationis run and its delta migration committed; the PR body names the directory and row count.- Every migrated phrase probes to zero in the composed constant; no existing segment changes its pack tag or its position in
CORPUS_ORDER. sharedPlanningRules.baseline.txtrefreshed with removed-word and added-word counts reported;registerCeiling.jsonrefreshed with the ceiling FALLING and before/after figures quoted;planningRuleRouting.baseline.txtrefreshed with its diff reviewed and the new cells named.pnpm typecheck,pnpm format:checkandpnpm testare green, all four planning-rule suites included.- No file outside
motir-aiis changed.
Context refs
motir-aisrc/llm/planningRulePacks.ts—CORPUS_ORDER,PLANNING_RULE_PACKS,PLANNING_RULE_PACK_ORDER,PlanningRulePackName,PACKS_BY_TYPE,resolvePlanningRulePacks,legalPlanningRuleCells.motir-aitests/planningRuleRouting.test.ts+tests/helpers/planningRuleRouting.ts+tests/fixtures/planningRuleRouting.baseline.txt— where a new cell has to show up.motir-aisrc/seed/lessons.base.ts·tests/lessonsBaseSeed.test.ts·scripts/generate-lessons-migration.ts.motir-aitests/planningRuleConservation.test.ts·planningRuleRegister.test.ts·planningRulePacks.test.ts, and the threescripts/refresh-*.ts.motir-metaprompts/plan-rules/RESTATEMENT.mdand the five restatedtype-*packs — read-only inputs.motir-metaprompts/plan-rules/MANIFEST.md— the source-side routing these slots are meant to match.