Skip to content

Eyes agent: visualization render harness, gallery + manifest (Phase 1 of 3) #117

Description

@Jammy2211

Overview

The organism produces rich visualizations (imaging / interferometer / point_source / multi / cluster) but has no formal loop for a human to look at them, judge them, and drive updates. This epic adds the missing loop as the Eyes agent: a domain-agnostic PyAutoBrain conductor for render → present → critique → delegate, fed by a per-project viz manifest contract. This issue tracks the epic; Phase 1 (this task) builds the render harness + gallery + manifest in autolens_workspace_test, riding the existing visualization scripts.

Plan

  • Phase 1 (this task) — render harness + gallery: a gallery builder over the existing workspace_test visualization scripts' PNG outputs, plus a generated machine-readable viz manifest ("every figure the project can output"). autolens_workspace_test only.
  • Phase 2 — Eyes conductor in PyAutoBrain: judge-and-iterate loop consuming the manifest/gallery; reasons and delegates plot edits via start_dev (like the hygiene conductor, it never edits plot source itself). Blocked until workspace-agent ships (PyAutoBrain worktree claim).
  • Phase 3 — paper-informed critique ("restyle to match this paper"), leaning on the manifest + PyAutoMemory. Must not gate phases 1–2.

Design context: the plot API is now functional (aplt.subplot_* + config/visualize yaml — the old MatPlot2D/Output plotter classes are gone), so the surface the Eyes agent ultimately steers is the functional plot API + visualize configs. The five per-domain visualization*.py scripts already run the real Visualizer and write the complete expected PNG+FITS set, with expected outputs derived from the visualizer source — Phase 1 is thin glue, not new machinery.

Detailed implementation plan

Affected Repositories

  • autolens_workspace_test (primary, Phase 1)
  • PyAutoBrain (Phase 2, blocked — claimed by workspace-agent)

Branch Survey

Repository Current Branch Dirty?
./autolens_workspace_test main clean
./PyAutoBrain main 1 file (_intake.py, unrelated in-progress fix)

Suggested branch: feature/viz-render-gallery
Worktree root: ~/Code/PyAutoLabs-wt/viz-render-gallery/ (created by /start_workspace)
Work classification: Workspace

Implementation Steps (Phase 1)

  1. scripts/gallery/gallery_build.py — walk scripts/<domain>/images/** PNGs (domains: imaging, interferometer, point_source, multi, cluster), emit a static gallery.html contact sheet grouped domain → script → source-type with relative image links, plus viz_manifest.yaml: domain → script → figure name / path / producing Visualizer method, derived from the scripts' own expected-output lists.
  2. scripts/gallery/gallery_run.sh — run the five visualization*.py scripts under the TEST_MODE env, then build the gallery. Time each script first; only fast ones go in the default run list (cluster-tier scripts may need a --slow flag).
  3. Viewing loop needs no new code: Claude reads PNGs natively in-session for critique; towin() copies gallery.html + images for human viewing on Windows.
  4. Hygiene: confirm .gitignore covers the gallery output and images/ dirs (known ship_workspace binary-leak trap).

Testing

  • Run the imaging visualization script + gallery build end-to-end; verify every HTML img reference resolves and the manifest lists every PNG on disk (and vice versa).

Key Files

  • autolens_workspace_test/scripts/imaging/visualization.py — reference harness script (pattern for all domains)
  • autolens_workspace_test/scripts/<domain>/images/ — PNG/FITS output trees the gallery walks
  • autolens/imaging/model/visualizer.py, autolens/analysis/plotter.py — where expected outputs are derived from (read-only in Phase 1)

Original Prompt

Click to expand starting prompt

I am now at the point where PyAutoLens and other projects produce lots of
visualizations, but I dont have an easy way to look at them, judge them and
then get them updated based on my requirements. We have places which outputs
them for tests (e.g. autolens_workspace_test/scripts/imaging/visualizaiotn.py),
but I think we need a more formal mechanism for me to look at images, judge
them and then update them.

In particular, I wonder if PyAutoBrain would benefit from a visualization
agent for this task, which handles both a streamlined way to make .png files
from PyAutoLens (and other projects), shows me them and then has the context
to change them based on my input as well as make suggestions for how they
could be improved. I can imagine me giving it papers and asking it to make
updates based on how those papers work.

What do you think? Full on brain conductor or something simpler? Obviously
the agent should not be project specific (PyAutoScientist is code-base and
domain agnostic), but it needs to interface with PyAutoLens to understand
"These are all the images it could output, there are lots (imaging /
interferometer / point source", it probably needs to output them via a
Visualizer so its representation of modeling runs. So maybe we need a domain
agnostic visualization (eyes) conductor but also something which more
direclty links to how it runs on a given project.

Filed via /intake on 2026-07-16 as draft/feature/pyautobrain/visualization_eyes_agent.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions