MotirBuilding in public
MOTIR · moooon
onMotir
You’re viewing a public project. Anyone can view it — no account needed. Sign in to submit, upvote, or comment on requests.View-only — you can’t edit work items
MOTIR-3556

(motir-ai) The mirror — `SHARED_PLANNING_RULES` teaches the shipped planner that a hit reinforces (gate 19's second home)

Done
Description

Gate 19's second home. The plan-rules/ packs teach the manual planner; SHARED_PLANNING_RULES teaches the shipped one, and a rule in one home teaches one planner. Its sibling card lands the runbook text; this one mirrors it.

The target, verified present on origin/main

src/llm/planningRulePacks.ts already carries SEARCH_THE_LESSONS_IN_TAKEAWAY_REGISTER (routed ['core', …]) — the shipped planner's version of the sweep. It teaches narrow-by-axis-then-ask and ends there: it says nothing about what to do when a search turns out to have HIT. CAPTURE_PLANNING_MISTAKES in the same file covers writing a NEW lesson and the global-vs-tenant test, and is silent on an existing one.

So the gap is real and it is in the constant this card edits. Grep it before writing and quote the result — this card's own premise is an absence, which is a claim about a file (plan-rules/core.md gate 2's absence direction).

What to build

The reinforce clause, appended to SEARCH_THE_LESSONS_IN_TAKEAWAY_REGISTER (or as its own constant beside it, if that reads better in corpus order — say which and why). It carries the same four points the runbook card lands, narrowed to what the SHIPPED planner can observe:

  • A hit reinforces whether or not an edit follows.
  • An editorial pass with no incident reinforces nothing.
  • A search returning rows is not by itself a hit.
  • One occurrence reinforces once.

⚠️ A NARROWING is legitimate; SILENCE is not. Mirror the clauses whose trigger the shipped planner can actually observe, and where one is deliberately excluded — anything that depends on a human's judgement the planner does not have — say so ON THIS CARD with the grep that excluded it, rather than dropping it quietly.

⚠️ The mechanical trap in this file

planningRuleConservation.test.ts asserts BASELINE.length === constant.length outright, so every corpus edit needs BOTH fixtures refreshed on purpose: pnpm tsx scripts/refresh-planning-rules-baseline.ts and scripts/refresh-planning-rule-routing-baseline.ts. The word-level differ also SPLITS an appended run when its second word duplicates the first word of the NEXT constant in CORPUS_ORDER — the refresh makes it moot, but opening the addition with a token the successor does not share keeps the pre-refresh report readable.

Acceptance criteria

  • SHARED_PLANNING_RULES teaches the reinforcement, carrying the four points above in the corpus's own register.
  • The card records the grep that established the clause was absent, and the grep of the runbook sibling's landed text that this mirrors.
  • Any clause deliberately NOT mirrored is named on the card with the reason — a narrowing stated, never a silence.
  • Both baseline fixtures are refreshed in the same PR and planningRuleConservation.test.ts is green.
  • The routing is unchanged unless this card says otherwise: the clause reaches the same passes SEARCH_THE_LESSONS_IN_TAKEAWAY_REGISTER already reaches.
  • The wording does not contradict its motir-meta sibling — the two homes say the same rule, and this card is authored AFTER that text is settled, which is why it is blocked by it.

Context refs

  • src/llm/planningRulePacks.tsSEARCH_THE_LESSONS_IN_TAKEAWAY_REGISTER, CAPTURE_PLANNING_MISTAKES, CORPUS_ORDER, and the SHARED_PLANNING_RULES rebuild.
  • tests/planningRuleConservation.test.ts — the BASELINE.length === constant.length assertion.
  • scripts/refresh-planning-rules-baseline.ts, scripts/refresh-planning-rule-routing-baseline.ts — the two refreshes this edit owes.
  • MOTIR-3547 (the parent) — the rule, stated once. Its motir-meta sibling — the text this mirrors.