Skip to content

moooon

Motir

Vibe your whole project. Bring an idea — Motir's three AI layers plan it, track it, and ship it, end to end. You're looking at Motir, built in Motir.

  • Vibe Project
  • Open Source
  • AI Agent
  • AI Loop
1
requests
0
upvotes
145
planned
1,361
shipped

Motir · Work items

MOTIR-3393Done

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.txtit 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_ORDER gains type-test and type-bars, each with at least one segment tagged to it in CORPUS_ORDER, and PACKS_BY_TYPE gains a test entry resolving to type-testor the PR body records, per pack, why the routing stays as it is.
  • Every legal cell that selects a test leaf at deepen resolves to a non-empty composed pack, demonstrated by a test rather than asserted.
  • Every migrate row in RESTATEMENT.md's five type-* sections has a disposition here: a new BASE_LESSONS row or a MERGED line with its covering sourceRef and reason.
  • Rows derived from a type-scoped limb carry a types constraint naming that type; the PR body states the constraint chosen for each row and why.
  • No new sourceRef carries a #N above 356; CORPUS_HEAD is unchanged; the totality, uniqueness, generic-rewrite and date guards pass unweakened.
  • pnpm lessons:generate-migration is 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.txt refreshed with removed-word and added-word counts reported; registerCeiling.json refreshed with the ceiling FALLING and before/after figures quoted; planningRuleRouting.baseline.txt refreshed with its diff reviewed and the new cells named.
  • pnpm typecheck, pnpm format:check and pnpm test are green, all four planning-rule suites included.
  • No file outside motir-ai is changed.

Context refs

  • motir-ai src/llm/planningRulePacks.tsCORPUS_ORDER, PLANNING_RULE_PACKS, PLANNING_RULE_PACK_ORDER, PlanningRulePackName, PACKS_BY_TYPE, resolvePlanningRulePacks, legalPlanningRuleCells.
  • motir-ai tests/planningRuleRouting.test.ts + tests/helpers/planningRuleRouting.ts + tests/fixtures/planningRuleRouting.baseline.txt — where a new cell has to show up.
  • motir-ai src/seed/lessons.base.ts · tests/lessonsBaseSeed.test.ts · scripts/generate-lessons-migration.ts.
  • motir-ai tests/planningRuleConservation.test.ts · planningRuleRegister.test.ts · planningRulePacks.test.ts, and the three scripts/refresh-*.ts.
  • motir-meta prompts/plan-rules/RESTATEMENT.md and the five restated type-* packs — read-only inputs.
  • motir-meta prompts/plan-rules/MANIFEST.md — the source-side routing these slots are meant to match.