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
Back to roadmap
Blocked

The `motir-meta` MIRROR — the SUM cut and the PHASE cut, in one pass over the same two files

Featureopened by Zhu YueMOTIR-3907

The SINGLE motir-meta mirror, and it is deliberately the LAST card in this area: it carries the outstanding half of MOTIR-3891's SUM cut and the PHASE cut this story's siblings make, in ONE pass over the same two files.

Why one card and not two

phase-deepen.md and kind-leaf-deepen.md are the files BOTH cuts divide. Cutting them twice means two word-diffs over a moving target, and the second one reviews a file the first one just re-shaped — the reviewer cannot tell a re-cut from a regression. Cutting them once, after both shipped-side cuts have landed and been verified by this story's gate, means one diff against a stable origin/main and one conservation proof.

That is also why gate 19's TWO HOMES obligation is discharged here for the whole story rather than card-by-card: the obligation is that no rule teaches one planner only, and one mirror at the end satisfies it with one review instead of four.

What has to mirror — BOTH cuts

From MOTIR-3891 (the SUM):

  • The selector becomes a SUM. At deepen a cell takes its KIND's packs (epic / story / bug) or its TYPE's (task / subtask), never both. In motir-meta that lives in THREE homes — DECISION.numbers.py's cell(), COMPRESSION.measure.py's resolve() and the MANIFEST's own selector block.
  • kind-leaf.md and kind-leaf-deepen.md are retired, their lines redistributed rather than re-tagged.
  • phase-deepen.md is cut on its SUBJECTS — the datastore discharges and the deployed-state assertion to type-runtime.md, the HTTP/method and data-seam discharges to type-seam.md, the design-allocation sweep to type-design.md.

From THIS story (the PHASE / ACT cut):

  • core.md splits into core.md + core-skeleton.md + core-deepen.md on the act test — a rule belongs to the phase whose TOOL SURFACE can discharge it.
  • phase-skeleton.md and phase-deepen.md are re-audited on the same test, and whatever the shipped side moved moves here.

Acceptance criteria

  • All three motir-meta homes of the selector — DECISION.numbers.py's cell(), COMPRESSION.measure.py's resolve() and the generated MANIFEST — express the SUM and the phase split, and a check asserts the first two agree with each other. Three homes for one selector is how they drift.
  • kind-leaf.md and kind-leaf-deepen.md are retired through split.py's RETIRED map, and core.md is split, with every line re-homed. A word-diff over the union of each retired or split file's destinations shows ZERO runs lost, as MOTIR-3870's does.
  • A composed translate / copy / legal cell contains no pg_policies, information_schema, row_security_active, AUTH surface or response body; and a composed DEEPEN cell of any type contains no rule discharged by propose_node, modify_node or remove_node. Both asserted by a script over the composed text, not reviewed by eye.
  • Every rule this cut moves is shown to sit in the SAME pack as its motir-ai twin, or the PR says which one diverges and why — the two homes may differ on a rule's pack and must do so on the record (DECISION.md § For MOTIR-2624).
  • COMPRESSION.conserve.py is green, and each MOVE is reviewed by its own word-diff in the PR: a move is a delete plus an insert and the checker cannot see the pair.
  • REGISTER.count.py's corpus-wide cautionary count does not rise.
  • The worst cell is measured before and after and stated in the PR. COMPRESSION.measure.py --check is RED on main today (1 check over budget, worst cell 2788/2774) — the PR states whether this card moves that number and in which direction; it does not have to turn it green.
  • The MANIFEST's WHERE THIS TREE STILL DIFFERS FROM THE SHIPPED PLANNER block is REMOVED, because it stops being true. That block is this card's own closure condition, written into the file it generates.

Context refs

  • motir-meta prompts/plan-rules/split.pySELECTOR, RETIRED, lines_of, packs_on_disk, the header-stranger guard.
  • motir-meta prompts/plan-rules/DECISION.numbers.pycell(), PACKS_BY_TYPE.
  • motir-meta prompts/plan-rules/COMPRESSION.measure.pyresolve(), TYPE_PACKS.
  • motir-meta prompts/plan-rules/core.md, phase-deepen.md, phase-skeleton.md, kind-leaf.md, kind-leaf-deepen.md — the packs that are cut.
  • motir-ai src/llm/planningRulePacks.ts — both cuts, to mirror.
  • MOTIR-3892DECISION.clause-unit.md: a SEGMENT is the unit a guard may address, which is what makes either cut legal.

Comments (0)

No comments yet — be the first to weigh in.

Sign in to comment

Reading is open to everyone; posting needs a Motir account.

Sign in