- Evidence
- docs/CC-Analysis/trovesnap-vision-scanning-spec.md
Goals
Vision scan service contract and provider adapter scaffold — advances E1, E2, E3 toward its gate(s).
Implementation — what to build
Contracts (consume Platform & Contracts)
- Implement the frozen scan contracts (WI-010) for the first two scans: table_hunt + item_scan.
- src/lib/troveVision.ts + troveVisionTypes.ts hold the canonical result types + the scan call.
Provider adapter (WI-011 / WI-012)
- Wire ONE hosted provider (e.g. Gemini) returning strict structured output -> canonical result.
- Run the validation pipeline on every response (syntax->schema->enum->coordinate->business-rule).
UI (apps/web)
- Overlay/review on a captured image: draw candidate bboxes (normalized 0-1000), ordinal labels, tap-to-select, why-flagged, launch next scan; capture corrections.
Cost
- Economy tier + per-scan caps (WI-017); key optional with a simulated fallback (mirror /api/appraise).
Acceptance
- table_hunt + item_scan render as tappable overlays from one provider behind the adapter, validated.
Checklist
- ○
E1 table_hunt and item_scan schemas are accepted and rendered as overlays. - ○
E2 Provider adapter scaffold is in place (consumes the P2 boundary). - ○
E3 Overlay/review UX validates confidence and captures corrections.
Gates & testing
- ○ E1 table_hunt and item_scan schemas are accepted and rendered as overlays.
CODE TEST
- ○ E2 Provider adapter scaffold is in place (consumes the P2 boundary).
CODE TEST 💲 API COST
- ○ E3 Overlay/review UX validates confidence and captures corrections.
CODE TEST
Requirements
REQ-VISION-001 accepted Table hunt and item scan schemas need accepted contracts rendered as overlays. Done when: table_hunt + item_scan schema examples validate; candidates render as tappable overlays.
REQ-VISION-002 accepted Vision providers need an adapter boundary (consuming the P2 boundary). Done when: Provider-specific code is behind an adapter scaffold returning the canonical result.
REQ-VISION-003 accepted Vision confidence and corrections need a visible review UX. Done when: Overlay/review demo shows confidence and captures bounding-box and identity corrections.
Verify (done when)
table_hunt/item_scan schemas validate and overlays render against the adapter.
Cost triggers
💲 API COST
First hosted vision-provider calls turn on API spend; keep economy tier + per-scan caps (spec sections 25).
Status & editing
queued Sprint: Sprint 4 - Vision Contract POC
Edit status / sprint on the ★ Live Board → — changes are logged live with who / when / why.
Human-in-the-loop
No human tasks linked.
Findings
None recorded yet.
Concerns
None recorded yet.
Tech debt
None recorded yet.
Tools used
No tool calls recorded.
Files & artifacts
No files / artifacts recorded.
Update log
No log entries yet.