Sprint 3071 — Task B (parallel with Task A; depends on A2 schema and A3 package for final integration)
Goal
Expose verify_after_edit as the new MCP tool on @domscribe/relay, fed by an element-scoped screenshot capturer in @domscribe/runtime. Strongly recommend verify in MCP prompts; do not gate the lifecycle on it (per RFC 0002 §Decision — deliberate divergence from the DOP memo).
Refs: RFC 0002, commit e8d452d (underscore MCP tool-name grammar).
Scope
B1. @domscribe/runtime — element-scoped ScreenshotCapturer
- Add
ScreenshotCapturer alongside StyleCapturer in ContextCapturer.
- Element-scoped via
boundingRect; cap per-capture payload at ≤200 KB.
- Returns a blob reference streamed to the relay — never inlined into the annotation payload (preserves the 4 KB-per-element serialization budget from RFC 0001).
- Adapter changes flow through
@domscribe/core only — no per-adapter work in domscribe-react, -vue, -next, -nuxt.
B2. @domscribe/relay — verify_after_edit MCP tool
- Register under the underscore tool-name grammar from commit
e8d452d (MCP tool count goes from 13 → 14).
- Input:
{ annotationId: string }. Output: VerifyResult (from Task A2; if A2 has not merged yet, stub locally from RFC 0002 §Decision and reconcile in final PR).
- Implementation: re-capture post-edit
componentStyles via existing StyleCapturer + new ScreenshotCapturer, run @domscribe/verify comparator (Task A3) against the pre-edit baseline, return verdict.
B3. MCP prompt + tool description updates (soft-recommend, no gate)
- Update
process-next.prompt to recommend calling verify_after_edit after annotation_respond and before annotation_update_status.
- Update the
annotation_respond tool description with the same recommendation.
- No lifecycle gate —
annotation_update_status accepts PROCESSED regardless of whether verify ran (per RFC 0002 §Decision; the gate is the falsifier-trip escalation path, not the v1 design).
Acceptance
Out of scope
- Lifecycle gate on
PROCESSED (explicit RFC 0002 §Decision — escalation path only if falsifier trips)
- Overlay sidebar rendering of
VerifyResult (P1 follow-up, next sprint)
- Per-property source-map back-references (escalation path only)
Coordination with Task A
- A2 schema is the source of truth for
VerifyResult. If A's PR lands first, import directly. If B's PR is ready first, stub locally from RFC 0002 §Decision and reconcile in review.
- The
@domscribe/verify comparator from A3 must be available before relay implementation can land green; if A is still in flight when B is otherwise ready, vendor a local copy and replace in a follow-up PR.
Effort estimate
~32 hours (≤90% of one staff-swe sprint capacity).
Sprint 3071 — Task B (parallel with Task A; depends on A2 schema and A3 package for final integration)
Goal
Expose
verify_after_editas the new MCP tool on@domscribe/relay, fed by an element-scoped screenshot capturer in@domscribe/runtime. Strongly recommend verify in MCP prompts; do not gate the lifecycle on it (per RFC 0002 §Decision — deliberate divergence from the DOP memo).Refs: RFC 0002, commit
e8d452d(underscore MCP tool-name grammar).Scope
B1.
@domscribe/runtime— element-scopedScreenshotCapturerScreenshotCaptureralongsideStyleCapturerinContextCapturer.boundingRect; cap per-capture payload at ≤200 KB.@domscribe/coreonly — no per-adapter work indomscribe-react,-vue,-next,-nuxt.B2.
@domscribe/relay—verify_after_editMCP toole8d452d(MCP tool count goes from 13 → 14).{ annotationId: string }. Output:VerifyResult(from Task A2; if A2 has not merged yet, stub locally from RFC 0002 §Decision and reconcile in final PR).componentStylesvia existingStyleCapturer+ newScreenshotCapturer, run@domscribe/verifycomparator (Task A3) against the pre-edit baseline, return verdict.B3. MCP prompt + tool description updates (soft-recommend, no gate)
process-next.promptto recommend callingverify_after_editafterannotation_respondand beforeannotation_update_status.annotation_respondtool description with the same recommendation.annotation_update_statusacceptsPROCESSEDregardless of whether verify ran (per RFC 0002 §Decision; the gate is the falsifier-trip escalation path, not the v1 design).Acceptance
verify_after_editregistered and visible in the MCP tool list (count 13 → 14)annotation_respond→verify_after_editreturns a structuredVerifyResulton at least one RFC 0001 fixtureAnnotation(assert via serialization-size test)process-next.promptandannotation_responddescription updated; matched by an MCP integration testtscandnpm testpass; relay startup smoke test greenOut of scope
PROCESSED(explicit RFC 0002 §Decision — escalation path only if falsifier trips)VerifyResult(P1 follow-up, next sprint)Coordination with Task A
VerifyResult. If A's PR lands first, import directly. If B's PR is ready first, stub locally from RFC 0002 §Decision and reconcile in review.@domscribe/verifycomparator from A3 must be available before relay implementation can land green; if A is still in flight when B is otherwise ready, vendor a local copy and replace in a follow-up PR.Effort estimate
~32 hours (≤90% of one staff-swe sprint capacity).