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-3072

(motir-ai) Mirror the sweep-is-not-its-grep-pattern limb into `SHARED_PLANNING_RULES` — a pattern's silence is a result, never a scope verdict

Done
Description

Repo: motir-ai. One PR. The second home of the rule MOTIR-3053, whose motir-meta half is open as motir-meta PR #247 (not yet merged — see AC 6). Per the standing two-homes rule a planning RULE lives in motir-meta/prompts/plan-rules/ for the manual planner AND in SHARED_PLANNING_RULES (src/llm/planningRulePacks.ts) for the shipped one. Precedent: MOTIR-1645 → MOTIR-1646, MOTIR-1773 → MOTIR-1774, MOTIR-2975 → MOTIR-2995.

The gap is READ OFF the repo, not reasoned to

Verified on origin/main @ e772c91 (src/llm/planningRulePacks.ts, 507 lines / 147 167 bytes / 32 rule constants):

probecount
REDEFINES A MECHANISM1
THREE THINGS THAT SWEEP IS NOT1
GREP EVERY NAMED CARD'S TITLE1
not-yet-built · invalidated1 · 1
the new limb's own tellsPARAPHRAS · remaining surface · SAMPLE of the claim · pattern is a0 · 0 · 0 · 0

So the corollary is carried and its (a)/(b)/(c) enumeration is carried, and the fourth limb is absent — a zero standing against a populated baseline rather than an asserted gap.

⚠️ Find it in const VERIFY_EVERY_PRECONDITION (line 177), NOT in RECONCILE_EXISTING_NOT_DONE_WORK. The referrer-sweep family is SPLIT across two constants in two different packs: RECONCILE_EXISTING_NOT_DONE_WORK (op-replan) carries NO TWO CARDS MAY OWN THE SAME WRITE and reconcile-existing-not-done; the mechanism-redefinition corollary this card amends is in VERIFY_EVERY_PRECONDITION, tagged phase-deepen in CORPUS_ORDER. Probing the op-replan-tagged constant for this rule returns nothing and reads as a genuine absence. The two homes disagree about the PACK on purposeop-replan.md in motir-meta, phase-deepen here. Carry the WORDS and keep the mirror's placement; do NOT re-pack as a side effect. (The constants are bare const NAME = \…`— noPLANNING_RULE_prefix, not individually exported; onlyCORPUS_ORDER, SHARED_PLANNING_RULES, PLANNING_RULE_PACKS, PLANNING_RULE_PACK_ORDER` and the resolver/composer helpers are.)

The clause is FIRABLE in this home, which is why it is owed

The constant already tells this planner to sweep and to grep ("sweep the tree for not-yet-built cards whose BODIES describe the OLD mechanism", "GREP EVERY NAMED CARD'S TITLE FOR THE MECHANISM YOU JUST REPLACED"). The new limb bounds what that grep's silence proves. Its input — the pattern the planner itself chose, and the sentence it writes after the result — is observable at the moment it fires, so it clears notes.html #166.

Acceptance criteria

  1. VERIFY_EVERY_PRECONDITION in src/llm/planningRulePacks.ts gains a clause, appended to the THREE THINGS THAT SWEEP IS NOT enumeration, stating that the sweep is not its grep pattern: a pattern is a SAMPLE of the claim's WORDING, so its silence is a result and never a scope verdict. It names both halves — state the PATTERN beside its result, and run at least one pattern over the claim's MEANING (the mechanism's effect, the environment it names, the artefact it cites) — and the reason the asymmetry is structural: a pattern built from the original phrasing finds the COPIES and misses the PARAPHRASES, and a warrant is exactly the sentence a second author restates in their own words.
  2. The clause carries the TELL in the same all-caps imperative register as its neighbours: the sentence AFTER the number — a result invites a wider search, a surface verdict ("the whole remaining surface", "exactly N files") ends one, and the site the pattern missed then inherits the card's authority for having been implicitly cleared.
  3. The clause carries NO source citations and NO Motir-specific nouns — no notes.html #315, no MOTIR-<n>, no plan-rules / phase-deepen.md pack name, no motir-core / motir-ai / open-core. Two DIFFERENT guard files enforce this and must not be conflated: the source-citation ban is tests/treeGeneration.test.ts:615 (expect(r).not.toMatch(/plan-procedure|plan-rules|notes\.html|_shared\.md/) over SHARED_PLANNING_RULES), with a per-rule case at :463 that also bans open-core and MOTIR-\d; tests/planningRulePacks.test.ts § GENERICITY, per pack (AC 8) bans ONLY repository names (motir-core|motir-ai|motir-gateway|motir-meta) and says nothing about citations. State the swept surface abstractly (a claim can be stated in card bodies, code comments, docs and design assets alike) rather than by naming our repos.
  4. It does NOT restate what the constant already says — the sweep trigger, the (a)/(b)/(c) limbs and the blocked_by-never-relates_to sentence stay exactly as they are. The diff is an addition to one enumeration.
  5. A test in tests/planningRulePacks.test.ts pins the new clause by phrase, in the same shape as the per-limb rides its host constant into every cell assertions already there (MOTIR-2914 / 2924 / 2931 / 2995), so a silent re-wording of the shipped corpus is a red test. This file IS the right home for the phrase assertion — it is only AC 3's citation guard that lives elsewhere.
  6. ORDERING — this card runs AFTER motir-meta PR #247 merges (MOTIR-3053), because the mirror LIFTS that wording rather than re-deriving it; it is wired blocked_by that card. If the motir-meta wording changed in review, mirror what actually merged, not what this description quotes.
  7. MOTIR-3053's own motir-meta files are NOT edited from here — one subtask, one repo, one PR. No change to plan-rules/ or notes.html.

Context refs

  • MOTIR-3053 / motir-meta PR #247 — the motir-meta half; prompts/plan-rules/op-replan.md's limb (d) on the mechanism-redefinition sweep corollary is the text being lifted, and prompts/plan-rules/fixtures/op-replan.md#a-sweep-is-not-its-grep-pattern is its warrant.
  • src/llm/planningRulePacks.tsVERIFY_EVERY_PRECONDITION (line 177), CORPUS_ORDER, composePlanningRules.
  • tests/treeGeneration.test.ts :463 / :615 — AC 3's guard. tests/planningRulePacks.test.ts — AC 5's phrase assertions and the repo-name genericity case.
  • MOTIR-2995 / MOTIR-1774 / MOTIR-1646 — the prior mirrors, for the shape of the edit, its test, and the narrowing discipline.