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-3389Done

The restated core mirrored into SHARED_PLANNING_RULES — both baselines refreshed and the register ceiling tightened

Carry the restated core wording into the constant customers actually pay for. Until this lands, the epic has improved one person's working file and changed nothing about the plans the product generates.

Ten segments in CORPUS_ORDER are tagged coreBANNER_AND_TERMINOLOGY, DECISION_AUTHORITY_LADDER, THE_GATE, CONTAINER_RUNNABLE_ONLY_OVER_LEAVES, CODING_CONVENTIONS_AND_ONE_REPO_ONE_PR, A_CARD_THAT_DECLARES_ITS_SPLIT, A_FOLD_IN_IS_A_REPO_CLAIM, CAPTURE_PLANNING_MISTAKES, SEARCH_THE_LESSONS_IN_TAKEAWAY_REGISTER, AUTHOR_ONE_CARD_AT_A_TIME — the largest core block in the corpus and the first place a mirror edit here has ever been a removal at scale.

Find each destination by a TEXT PROBE over the constant, never by a pack-name lookup. The two homes disagree about which pack owns a rule: the claim-vs-pointer gate is gate 2 of core.md in the source and sits under phase-deepen in the mirror. Carry the WORDS and keep the mirror's placement — do not re-pack a segment as a side effect of restating it. A_CARD_THAT_DECLARES_ITS_SPLIT and A_FOLD_IN_IS_A_REPO_CLAIM are the paired case to watch: both are core here and both restate limbs the source file keeps under gate 1.

Three guard suites are shaped around the assumption that a mirror change is an APPEND, and this is the second removal they have ever seen:

  • planningRuleConservation.test.ts classifies the diff and treats a replace or delete as fatal, permitting only a whole added sentence. Refresh the baseline with scripts/refresh-planning-rules-baseline.ts, then read the fixture's own diff — refreshing without reading is the one use its author calls out as defeating the check — and report the removed-word and added-word counts.
  • planningRulePacks.test.ts asserts specific phrases survive into every cell. A phrase belonging to a migrated limb is deleted from that suite in this commit, named in the PR body against its RESTATEMENT.md row. Deleting an assertion whose phrase was deliberately migrated is correct; loosening one because it is inconvenient is how a guard stops guarding.
  • planningRuleRouting.test.ts conserves delivery by segment title. Restating a rule's first line moves a title, so refresh planningRuleRouting.baseline.txt with its own script and read that diff too.

And TIGHTEN the register ceiling, do not merely keep it. sharedPlanningRules.registerCeiling.json asserts cautionary <= cautionaryCeiling, currently 57. A ratchet only bites in the direction it was last set: leaving 57 in place after this card removes cautionary text lets the corpus refill to exactly where it was. Re-run scripts/refresh-planning-rules-register-ceiling.ts so the new, lower number becomes the ceiling every later card inherits.

Acceptance criteria

  • The restated wording of all ten core segments is in SHARED_PLANNING_RULES, and every phrase belonging to a migrated limb is gone from it — checked by probing the constant for each migrated phrase and reporting a zero.
  • Each segment stays under the pack CORPUS_ORDER already gives it; no segment is re-tagged, re-ordered or moved between packs.
  • sharedPlanningRules.baseline.txt is refreshed in the same commit, with the removed-word and added-word counts and a sentence on why removal is expected here in the PR body.
  • sharedPlanningRules.registerCeiling.json is refreshed so the ceiling FALLS; the before and after cautionaryCeiling, prescriptiveAtCeiling and corpusChars are quoted in the PR body.
  • Every planningRulePacks.test.ts assertion pinning a migrated phrase is deleted, each named against its RESTATEMENT.md row; no assertion is left failing and none is weakened to pass.
  • planningRuleRouting.baseline.txt is refreshed if segment titles moved, with its diff reviewed and reported; otherwise the PR states it was unaffected.
  • pnpm typecheck, pnpm format:check and all four planning-rule suites pass.
  • The composed corpus still names no repository, no card key and no corpus file — the existing guard for that is unchanged and green.
  • No file outside motir-ai is changed.

Context refs

  • motir-ai src/llm/planningRulePacks.tsCORPUS_ORDER, the ten core constants, composePlanningRules.
  • motir-ai tests/planningRuleConservation.test.ts + tests/fixtures/sharedPlanningRules.baseline.txt.
  • motir-ai tests/planningRuleRegister.test.ts + tests/fixtures/sharedPlanningRules.registerCeiling.json + tests/helpers/registerCount.ts.
  • motir-ai tests/planningRulePacks.test.ts · tests/planningRuleRouting.test.ts · tests/fixtures/planningRuleRouting.baseline.txt.
  • motir-ai scripts/refresh-planning-rules-baseline.ts · refresh-planning-rules-register-ceiling.ts · refresh-planning-rule-routing-baseline.ts.
  • motir-meta prompts/plan-rules/core.md — read-only: the restated source wording this lifts.
  • MOTIR-3310 — the proof card for this step, and the first removal these guards saw.