Closing the visual loop for AI coding sessions
An AI coding session can produce UI code and images all day long. But it cannot SEE what it just produced, so it acts on visuals while blind to them.
The repo has a name for exactly this gap.
Generate UI code and images on demand.
No way to look at the result it produced.
Slide 2 of the module’s visual-intelligence.html story deck states the problem verbatim — this is self-diagnosed, not our framing.
And here is why words alone can’t close it.
Describe → implement → screenshot → describe again. Each pass through words loses a little more, and small deviations compound silently.
To close the loop, the AI needs to actually see — not narrate.
Spacing, weight, color survive only as approximation in words.
The build drifts from the mockup a little.
Another lossy pass — deviations compound silently.
One tool module wrapping Google’s Gemini VLM exposes three operations — concrete sight replacing verbal approximation. Its input schema enum lists precisely these three.
But the design is careful about how they combine.
Structured description of a single image: components, fonts, colors, layout.
Two images → match %, differences named and located.
Text → image, optional reference images, 1–4 outputs.
The image_path schema warns against it directly, because turning a picture into words and back reintroduces the exact text bottleneck the tool exists to avoid.
So when it’s time to check the result, one operation does it right.
The AI finally sees the difference precisely instead of guessing at it in prose — the operation the repo itself calls the one that closes the loop.
Now make it dependable in a real session.
The latest commit adds retry with exponential backoff plus a model fallback chain, so transient failures don’t leave the loop open.
Which leaves one thing for you to take away.
Give it sight, and let compare close the loop. Precise vision beats verbal round trips.
Feature status: Active — module version 0.1.0, no release tags.
Primary source: kenotron-ms/amplifier-module-tool-nano-banana, verified against clone at /tmp/nano-banana (branch main, HEAD 4aefe6a, 20 commits).
Commands run:
git rev-list --count HEAD → 20 commits; git log --reverse / git log -1 (first 4315b08, 2026-02-16; latest 4aefe6a, 2026-03-27)grep -n 'enum' tool.py; grep -n 'operation ==' tool.py — confirmed three operations (analyze, compare, generate)grep -in -E 'lossy|codec|close[sd]? the loop' docs/stories/visual-intelligence.html — verbatim “Text is a lossy codec” framing (slide 2)sed -n '142,153p' tool.py; git show -s 89988f5 — analyze→generate warninggit show --stat 4aefe6a — resilience layer (retry + model fallback)sed -n '15,32p' tool.py — default model gemini-3-pro-image-preview; wc -l tool.py = 601git log --format='%an <%ae>' | sort | uniq -c — contributor tally; gh pr list --repo kenotron-ms/amplifier-module-tool-nano-banana --state all → []Primary contributor: Ken Chau (kenotron-ms) — sole author of all 20 commits.
Gaps: No merged PRs (development via direct commits). Runtime behavior against the live Gemini API was not executed; all claims grounded in source, docs, and git history. The “~150 lines of core logic” figure is the repo’s own approximate/marketing claim (actual tool.py = 601 lines).