(motir-meta) The sweep's HIT reinforces — `run.md` step 5 and `_shared.md`'s lesson-store row stop being read-only
A seam with no caller changes nothing. Every card before this one builds the ability to reinforce; this is the card that makes a run actually do it.
The two sites, both verified present on origin/main
prompts/run.md step 5 — "Search the LESSON STORE for related past mistakes — search_lessons, one call … read the lessons it ranks back, and carry them into the prompt's CONTEXT." It ends at carry them. It gains the second half: when a lesson you searched turns out to describe the thing that just went wrong, reinforce_lesson it — whether or not you then widen it.
prompts/_shared.md's LESSON STORE row (the source-of-truth table) — today: "Search it with search_lessons … Written with add_lesson (tenant) or a curated row in lessons.base.ts (global)." Two doors, read and create. It gains the third: reinforce, the one that applies to a lesson that already exists.
What the amendment must say — the discriminator, not just the tool name
The corpus's failure mode here is a rule that reads as call this after every search, which would fabricate occurrences at scale and is worse than the defect. So the text carries the rule, in the register the packs use:
- The bump belongs to the OCCURRENCE, not to the edit. A match to something that just went wrong is a hit and reinforces whether or not an edit follows — deciding the lesson already covers it is a hit, and so is widening it.
- An editorial pass with no incident behind it reinforces NOTHING — and
humanOverride: exemptstays the instrument for this is stale but still right. - A search that merely returned rows is not a hit. The sweep at step 5 reads eight lessons on every card; the reinforcement is owed only for the one that describes what actually happened, which is a judgement the runner makes after the fact, not at the moment of searching.
- One occurrence reinforces once, across doors.
Acceptance criteria
run.mdstep 5 instructs the reinforcement and states the four points above; it namesreinforce_lessonand theidfrom the structured payload as what identifies the lesson._shared.md's LESSON STORE row names the third door beside search and create.- The amendment states explicitly that a search returning rows is NOT by itself a hit — the sentence that stops the rule being read as call it every time.
- Grep both files before writing and quote the result in the PR: this card's own premise is that the text is not already there, and that is a claim about a file (
plan-rules/core.mdgate 2's absence direction). - The
motir-metaPR carriesMOTIR-<id>in its branch AND title, becausetargetRepoISmotir-meta— this PR is the deliverable, not a record about one. - No rule text is duplicated from the parent card; the runbook states the rule and the parent stays the single place its derivation lives.
Context refs
prompts/run.md— step 5 of themotir next/motir runselection sequence; the Search the mistakes corpus before building section; the A LESSON GOES TO THE STORE rule, which this sits beside and does not replace.prompts/_shared.md— the source-of-truth table's LESSON STORE row (line ~106).MOTIR-3547(the parent) — the rule and its derivation, stated once.- Its sibling in the other home is the
SHARED_PLANNING_RULEScard, which this one blocks — the two-homes obligation (plan-rules/core.mdgate 19).