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

(motir-ai) Mirror W5 into `SHARED_PLANNING_RULES` — the taker inherits the donor's blockers

Repo: motir-ai. One PR. Type: content · Executor: coding_agent · blocked_by MOTIR-2913 (the motir-meta half — the written playbook lands first, so the two homes never disagree about the wording).

A standing planning rule has TWO homes (plan-rules/SHARED_PLANNING_RULES). MOTIR-2913 widens op-replan.md limb (2); this card carries the SAME clause into the constant the shipped planner composes into every generation and every re-plan. Without it the widening is half-landed and the shipped planner keeps making the miss MOTIR-2582 made.

⚠️ The file MOVED — do not grep treeGeneration.ts

SHARED_PLANNING_RULES now lives in src/llm/planningRulePacks.ts (134 073 chars on origin/main), not src/llm/treeGeneration.ts. motir-meta's COMPRESSION.md records the move with the old path struck through. A grep of treeGeneration.ts for the sweep family returns 0 for every stem (sweep 0, same write 0, survivor 0, Referrers swept 0) and is a false negative — the same class of self-inflicted negative result the corpus warns about. In planningRulePacks.ts the same stems return sweep 20, same write 1, survivor 2, ABSORBED 1, already claim this deliverable 1.

The mirror is a PACK TREE now, not one blob — this is what changes the edit. planningRulePacks.ts is 501 lines holding 34 named rule constants, each tagged with its pack in CORPUS_ORDER, with SHARED_PLANNING_RULES derived as a composition over them (PLANNING_RULE_PACKS / resolvePlanningRulePacks / composePlanningRules / legalPlanningRuleCells). So a mirror edit targets ONE NAMED CONSTANT, not an append to a single string.

The target is RECONCILE_EXISTING_NOT_DONE_WORK — the constant whose text carries NO TWO CARDS MAY OWN THE SAME WRITE (at char ~115 900), tagged op-replan in CORPUS_ORDER, i.e. the same pack as MOTIR-2913's edit site. Its own doc comment reads "lines 99–100 of the pre-split constant → op-replan". Do not re-pack it as a side effect — carry the WORDS and keep the mirror's placement.

grep DOES work in planningRulePacks.ts (~272 chars/line); it is treeGeneration.ts whose single very long lines defeat it. But a naive backtick scan mis-terminates, because the rule text contains markdown code spans — extract to the backtick followed by ; / , / ).

The mirror's current text, and what is missing from it

The mirror carries the taker's-seat clause verbatim, uppercased in its own register:

"SWEEP FROM THE TAKER'S SEAT, NOT ONLY THE DONOR'S — … 'does any EXISTING card already claim this deliverable? If yes, re-scope THAT card in the SAME pass.' NO TWO CARDS MAY OWN THE SAME WRITE."

The remedy is scope only — identical to the plan-rules/ original, and identically silent on the edges. shared noun, proper noun and dedup all return 0 here.

The clause to add (match the mirror's existing uppercase-imperative register, do not paste Markdown)

AND THE TAKER INHERITS THE DONOR'S BLOCKERS, NOT ONLY ITS SCOPE. Whenever ownership of one write MOVES between cards — a dedup that picks a survivor, an absorption, a carve-out into a new owner — the taker's blocked_by set is the UNION of both cards' sets. Diff them BEFORE applying the choice. A blocker present on exactly one side is the interesting case, and it is interesting in BOTH directions: the loser's extra edge is usually a prerequisite the survivor was never told about, the survivor's extra edge one the loser was missing. Neither card is authoritative alone — they were authored by different passes, and whatever gated the half being dropped was gating the WORK, which is not being dropped. THE TELL: A CARD OFFERING N DISPOSITIONS FOR ONE WRITE WHOSE OPTIONS DIFFER ONLY IN WHICH CARD KEEPS THE SCOPE — options symmetric in scope are almost always asymmetric in edges, and that asymmetry is what the choice discards.

Acceptance criteria

  1. FIRST, confirm MOTIR-2913's PR has merged to motir-meta's main and read the landed wording from origin/main:prompts/plan-rules/op-replan.md; the clause added here is derived from THAT text, not from this card's draft, so the two homes cannot drift at birth.
  2. The clause is appended to the RECONCILE_EXISTING_NOT_DONE_WORK constant in src/llm/planningRulePacks.tsnot as a new constant, not in a different pack, and with no change to its CORPUS_ORDER op-replan tag — AFTER criterion 1's read.
  3. The clause is written in the surrounding text's register (uppercase imperative, no Markdown tables, no motir: chips) so it reads as one voice with its neighbours, and the pack's own line-length/quoting conventions are preserved — verified by reading the emitted string, not the source line.
  4. tests/planningRulePacks.test.ts asserts the composed rule text contains the new clause for every legal cell that already includes RECONCILE_EXISTING_NOT_DONE_WORK (derive the cell list from legalPlanningRuleCells, do not hand-enumerate) — added AFTER the clause itself, and asserting on composePlanningRules output rather than on the constant, so a future re-partition that drops op-replan from a cell fails loudly.
  5. pnpm lint / pnpm typecheck / the changed spec file pass locally (changed files only — the PR's CI runs the suite); the PR body quotes the composed-length delta and names MOTIR-2913's merged PR.
  6. The PR body states that SHARED_PLANNING_RULES moved from treeGeneration.ts to planningRulePacks.ts, so the next reader of a stale citation does not repeat the false-negative grep.

Context refs

  • motir-ai/src/llm/planningRulePacks.ts — the mirror home; RECONCILE_EXISTING_NOT_DONE_WORK is the only constant this card edits. tests/planningRulePacks.test.ts is the spec. src/llm/treeGeneration.ts now only re-exports the composition — the old path still RESOLVES, which is why a stale citation manufactures a false absence (MOTIR-2663 sat open six days on exactly that).
  • MOTIR-2913 — the motir-meta half, whose landed text is this card's input.
  • MOTIR-2897 — the record card that settled the promote question; MOTIR-2582 — the fixture; notes.html #284 (motir-meta PR #198, merged 2026-08-17).
  • MOTIR-2879 — the sibling mirror card (W2/W3/W4). Same file. Coordinate merge order with it if both are open; two cards appending to planningRulePacks.ts is the one real collision in this pair.