feat(mentor): apply/skip fix cards (#25)
CI / ci (push) Canceled after 0s
CI / ci (push) Canceled after 0s
Fix Cards become actionable. Mechanical cards offer Apply behind a blocking ask-before sheet showing the exact edit (anchored quote -> replacement, occurrence + context; empty fix cuts); the sheet is the only path to a write, one card at a time, no apply-all. The edit lands through the editing session (pending edits flush first, the editor re-seeds via adoptText, the card closes applied); Skip and Done close the card in place, recording nothing; demonstration cards close Done/Skip only (ADR-0006). Cards arrive ranked (store-stamped, scan-ordered, open-first palette) and capped at ten per submit — the app keeps the ranked head and the wire reply discloses the drop. Stale anchors re-validate at apply: no text selected or changed, the card flags itself. Includes the finish-audit round (11 fixes, 2 flip-verified pins); 316 tests green. Closes #25
This commit is contained in:
1 parent
5700264628
commit
4d33676a08
15 files changed
+1012
-74
No files matched your search
@@ -1,3 +1,3 @@
|
||||
# 0006 — Fix cards travel as typed MCP tool calls
|
||||
|
||||
Mentor findings reach the app as typed tool calls — the fix-card schema is the tool's argument schema — rendered from ACP tool-call events, never parsed out of streamed prose. Anchors are quote-based (exact substring + occurrence + context), so edits between issue and accept degrade to a loud no-match, never a wrong-span patch. One schema serves the card UI, the apply-write, and learning promotion; M0's round-trip test exercises exactly this rail. Every fix declares a lane — `mechanical` (the whole fix is a pure function of the anchor plus fixed tables: cut, move, mapping, case) or `demonstration` (any generation) — and only a mechanical fix is ever applied. Every card declares an emitter — `lint` or `engine` — so the engine never re-cards a live lint finding; provenance keeps skill attribution. Rejected: prose parsing (fragile, untyped) and file-watching spools (cards are conversation events, not artifacts).
|
||||
Mentor findings reach the app as typed tool calls — the fix-card schema is the tool's argument schema — rendered from ACP tool-call events, never parsed out of streamed prose. Anchors are quote-based (exact substring + occurrence + context), so edits between issue and accept degrade to a loud no-match, never a wrong-span patch. One schema serves the card UI, the apply-write, and learning promotion; M0's round-trip test exercises exactly this rail. Every fix declares a lane — `mechanical` (the whole fix is a pure function of the anchor plus fixed tables: cut, move, mapping, case) or `demonstration` (any generation) — and only a mechanical fix is ever applied. Every card declares an emitter — `lint` or `engine` — so the engine never re-cards a live lint finding; provenance keeps skill attribution. Rejected: prose parsing (fragile, untyped) and file-watching spools (cards are conversation events, not artifacts). A mechanical card's fix is the exact replacement for its anchored span (empty = cut) — the only edit Apply ever writes; submits are capped at ten cards, the app keeping the ranked head as backstop.
|
||||
Reference in new issue
Block a user