Skip to content

refactor(vision): finish vision_analyst tools — EXIF correction + metadata + doc fix#19

Merged
DONGRYEOLLEE1 merged 1 commit into
mainfrom
refactor/vision-tools-finish
May 25, 2026
Merged

refactor(vision): finish vision_analyst tools — EXIF correction + metadata + doc fix#19
DONGRYEOLLEE1 merged 1 commit into
mainfrom
refactor/vision-tools-finish

Conversation

@DONGRYEOLLEE1
Copy link
Copy Markdown
Owner

Summary

Audit follow-up to #18 — the CLAUDE.md table referenced ghost workers (image_inspector / image_editor) that never had implementations. The real Vision Team already exposes vision_analyst with two PIL tools; this PR finishes the setup and aligns the doc.

Changes

  • resize_image now applies ImageOps.exif_transpose so phone photos with EXIF Orientation read upright (silent quality fix). Output now reports (new_size) from (original_size) + FileSize: a -> b bytes delta.
  • get_image_metadata surfaces FileSize, EXIF presence, and Alpha channel — structured signals beyond bare format/size/mode.
  • CLAUDE.md §"도메인별 첫 분기 의무" vision row corrected: ghost workers → vision_analyst (tools: get_image_metadata, resize_image); pointer to prompt-kit's # REQUIRED FIRST ROUTES / # VISION TEAM HANDOFF.
  • Regression lock: new test verifies EXIF Orientation=6 (rotate 90 CW) swaps width/height after resize.

Test plan

  • `cd apps/backend && PYTHONPATH=. uv run pytest tests -q` → 191 passed (190 baseline + 1 new EXIF regression).
  • EXIF Orientation=6 round-trip swap verified.
  • CLAUDE.md table now matches `packages/agent-tools/src/agent_tools/vision.py` and `apps/backend/workflow/teams/vision.py` member list.

🤖 Generated with Claude Code

…uctured metadata + doc fix

Audit found the supposed `image_inspector` / `image_editor` workers were
never implemented — only mentioned in CLAUDE.md §"도메인별 첫 분기 의무"
as gardened ghost names. The real Vision Team already exposes
`vision_analyst` with two PIL/Pillow tools (`get_image_metadata`,
`resize_image`), so this commit finishes that setup and aligns the doc.

- packages/agent-tools/src/agent_tools/vision.py
  * `resize_image`: apply `ImageOps.exif_transpose` so phone photos with
    EXIF Orientation tags read upright. Without this, vision_analyst was
    reading rotated pixels and silently degrading recognition accuracy.
  * `resize_image`: report `(new_size) from (original_size)` and the
    `FileSize: a -> b bytes` delta so the analyst can reason about
    whether the resize actually saved bytes.
  * `get_image_metadata`: surface `FileSize`, `EXIF` presence, and
    `Alpha` channel flag — gives the analyst structured signals beyond
    bare format/size/mode.

- apps/backend/tests/test_agent_tools.py
  * Lock the new metadata fields (`FileSize:`, `EXIF:`, `Alpha:`).
  * Lock the resize summary's `from (...)` and `->` markers.
  * New regression test: EXIF Orientation=6 (rotate 90 CW) must swap
    width/height after resize.

- CLAUDE.md §"도메인별 첫 분기 의무"
  * Vision row corrected: `image_inspector` → `image_editor` (ghosts)
    replaced with `vision_analyst (tools: get_image_metadata,
    resize_image)`. prompt-kit's `# REQUIRED FIRST ROUTES` /
    `# VISION TEAM HANDOFF` blocks are now the single source.

Validation:
- pytest tests -q → 191 passed (190 baseline + 1 new EXIF regression).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
orchagent Ready Ready Preview, Comment May 25, 2026 9:13am
project-vdajw Ready Ready Preview, Comment May 25, 2026 9:13am

@DONGRYEOLLEE1 DONGRYEOLLEE1 merged commit 97f69f8 into main May 25, 2026
5 checks passed
@DONGRYEOLLEE1 DONGRYEOLLEE1 deleted the refactor/vision-tools-finish branch May 25, 2026 09:15
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.

1 participant