Skip to content

feat(vision): @coderadar/vision screenshot adapter, ephemeral (A10/E3/A13)#28

Merged
officialCodeWork merged 1 commit into
developmentfrom
build/phase-4/step-4.4-vision
Jul 14, 2026
Merged

feat(vision): @coderadar/vision screenshot adapter, ephemeral (A10/E3/A13)#28
officialCodeWork merged 1 commit into
developmentfrom
build/phase-4/step-4.4-vision

Conversation

@officialCodeWork

Copy link
Copy Markdown
Owner

Step 4.4 — Screenshot adapter

Failure modes A10 / E3 / A13. New internal @coderadar/vision package, bundled into the published ui-lineage as the ui-lineage/vision subpath.

  • VisionAdapter interface: extract(image) → { terms, structure, annotations, looksLikeApp }. Images are processed in memory, never persisted (G7 — documented in the package README).
  • StubVisionAdapter — deterministic, replays a recorded extraction (the "OCR-only fallback stub"; no network in CI).
  • ClaudeVisionAdapter — Claude-vision implementation (claude-opus-4-8, base64 image + json_schema output). The @anthropic-ai/sdk import is lazy and optional, so neither CI nor the default bundle depends on it — you install it yourself for live extraction.
  • extractionToQuery / matchFromVision: terms inside an annotation region (a circle/arrow the user drew — E3) are weighted ; a non-app screenshot (looksLikeApp: false) declines rather than guessing (A13).

Core

MatchQuery gains boosts (per-term weight multipliers; keys normalized to match query terms).

Eval / tests

Fixture e3-annotated-screenshot with a checked-in extraction.json: the circled "Revenue breakdown" resolves an otherwise-ambiguous match to RevenuePanel (verified in parser-react/src/vision.test.ts); without the annotation it's ambiguous.

Verification

  • 36 core + 3 vision + 102 parser tests pass; 5 packages typecheck.
  • pnpm eval: green. ui-lineage bundle rebuilt — vision subpath ships, no @coderadar or hard @anthropic-ai/sdk imports leak.

🤖 Generated with Claude Code

…/A13)

New internal @coderadar/vision package (TRACKER step 4.4), bundled into the
published ui-lineage as the `ui-lineage/vision` subpath:

- VisionAdapter interface: extract(image) → { terms, structure, annotations,
  looksLikeApp }. Images are processed in memory, never persisted (G7).
- StubVisionAdapter — deterministic, replays a recorded extraction (the
  OCR-only fallback; no network in CI).
- ClaudeVisionAdapter — Claude-vision implementation (model claude-opus-4-8,
  base64 image + json_schema output). The @anthropic-ai/sdk import is lazy and
  optional, so neither CI nor the default bundle depends on it.
- extractionToQuery / matchFromVision: annotation-region terms (a circle/arrow
  the user drew, E3) are weighted 3×; a non-app screenshot (looksLikeApp:false)
  declines rather than guessing (A13).

Core: MatchQuery gains `boosts` (per-term weight multipliers, normalized keys).
Fixture e3-annotated-screenshot with a checked-in extraction.json: the circled
"Revenue breakdown" resolves an otherwise-ambiguous match to RevenuePanel.
36 core + 3 vision + 102 parser tests pass; eval green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@officialCodeWork
officialCodeWork merged commit bd8b557 into development Jul 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants