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

The pass asks a per-CARD question — its own query text, and the kind, type and phase it is working in

selectForInjection takes a queryText its own comment calls "the planning job's intent"one string for the whole pass. A run planning twelve cards embeds it twelve times and hands all twelve identical lessons, ranked identically. That is indistinguishable from injecting a fixed block, which is what this epic exists to stop.

This story moves the question down a level. For each card the pass is working on, it composes:

  • the query text, from that card — title, kind, type, target repo, the deliverables it enumerates;
  • the kind and type of the card;
  • the phase it is in — skeleton while laying a level's children, deepen while writing a body.

The phase is the coordinate only the pass can supply. The card does not carry it and the store cannot infer it, so it has never been asked for — which is why lessons about shaping a level arrive while somebody is writing acceptance criteria.

Keep the enhancement property: an empty selection yields an empty promptSection and injects nothing, so a card whose question matches no lesson plans exactly as it does today.

Acceptance criteria

  • The planning path builds a per-card query and the three axes from the card and the pass, not from the job intent.
  • Two cards planned in the SAME pass, of different type, produce different queries and different selected lesson id sets — asserted on ids, not rendered prose.
  • The same card produces a different selection while widening than while deepening, asserted — the phase axis actually discriminates.
  • Selected ids are recorded per card on the job record, so injection stays inspectable per card rather than per pass.
  • An empty selection still yields an empty promptSection and injects nothing.
  • Generate, augment and replan all go through the one shared helper — no per-handler query construction.

Context refs

  • motir-ai src/services/lessonService.tsSelectForInjectionInput.queryText, LessonInjection.lessonIds, the shared-helper contract.
  • motir-ai src/jobs/plannerInputs.ts — where the query is filled and the phase is known.
  • motir-ai src/jobs/handlers/generateTree.ts, src/jobs/handlers/replan.ts — the two call sites the helper keeps aligned.
  • motir-ai tests/lessonInjection.test.ts, tests/plannerInputs.test.ts.