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,366
shipped

Motir · Roadmap

MOTIR-3917Done

Decision: what decides a rule’s PHASE? Settle the ACT test before any rule text moves

Opened by Zhu Yue ·

The story MOTIR-3891 could not finish, because it never asked the question this one settles.

What that story cut on, and what it missed

MOTIR-3891 cut the corpus on SUBJECTwho needs to know about datastores? — and it worked: a translate deepen cell no longer carries pg_policies, and it fell 19% in the process. It never cut on ACTwhose tool surface can discharge this rule? — and the residue is measurable.

A DEEPEN session's whole tool surface is DEEPEN_PHASE_TOOLS: deepen_node, validate_plan, log_planning_mistake, log_planning_bug. It writes ONE body and stops. It cannot propose a card, split one, re-parent one, reconcile an existing one, or wire an edge. So every rule discharged by propose_node / modify_node / remove_node / link_work_items is unreachable there whatever its subject, and every one of those currently reaches all 17 deepen cells.

Acceptance criteria

  • The decision is RECORDED as an ADR under motir-meta beside DECISION.clause-unit.md, naming the test, what it is a test OF (a rule's phase, not its pack), and how it composes with the SUBJECT test MOTIR-3891 established — a rule has a phase AND a kind-or-type, and the two axes are decided by different questions.
  • It states the DISCRIMINATOR in a form a card can run without judgement: name the act each rule's discharge requires, and read that act against the phase's tool surface. Both tool surfaces are quoted from treeGeneration.ts so the ADR does not become a second source of truth for them.
  • It settles the THREE contested cases by name, because each one is a rule whose situation spans the boundary and whose discharge does not: (a) the estimation gate — SPLITTING is a skeleton act, SIZING is a deepen one, and the rule is one segment; (b) RECONCILE_EXISTING_NOT_DONE_WORK — its tools are skeleton-only, but a deepen pass must not contradict a reconcile decision it cannot make; (c) THE_GATE"before you PROPOSE anything", which is skeleton by its own words while its second check (is the outcome determinate?) reads on content. For each: one phase, or a split, and the reason.
  • It states what happens to a rule that is genuinely BOTH — whether core survives as a third tier for rules no phase narrows, or whether every rule lands in exactly one phase. The answer decides whether the split is 2-way or 3-way and nothing downstream can proceed without it.
  • It names, by opening phrase, every core and phase-* segment whose home the test CHANGES — so the two cuts that follow have a fixed and countable scope rather than discovering it mid-move, exactly as DECISION.clause-unit.md did for the connectives.
  • It states what it does NOT settle: which pack a rule lands in beyond its phase, and whether the framing is split — that is its own card and needs no decision, because the framing names tools the session does not have.

Context refs

  • motir-ai src/llm/treeGeneration.tsSKELETON_PHASE_TOOLS and DEEPEN_PHASE_TOOLS, the two surfaces the test reads; runDeepenSession for what a deepen session is given.
  • motir-ai src/llm/planningRulePacks.tsCORPUS_ORDER, and the core / phase-skeleton / phase-deepen segments the test classifies.
  • motir-meta prompts/plan-rules/DECISION.clause-unit.mdMOTIR-3892's record, whose shape and register this follows, and whose SEGMENT unit makes any of these moves addressable.
  • motir-meta prompts/plan-rules/DECISION.md §1 — the selector signature this amends a second time.

Discussion

No comments yet.

Adding to this discussion signs you in on app.motir.co and brings you back to this request.

Add a comment