Repository navigation
Description
Overview
When iterating on figures for PyAutoEyes, feedback currently waits for the full loop (fix → PR → CI → dashboard refresh). This adds an opt-in "scratch mirror": each <lib>_visualization harness copies freshly rendered PNGs to $PYAUTO_EYES_SCRATCH/<lib>/<dataset_type>/ as producers finish, so the human can inspect figures on the fly before any PR or CI. Phase 1 covers autogalaxy/autofit/autocti_visualization and the Brain Eyes skill; autolens_visualization follows in phase 2 (after autolens_visualization#7 merges).
Plan
- Opt-in env var
PYAUTO_EYES_SCRATCH(human sets/mnt/c/Users/Jammy/Science/scratch/eyes); unset = silent no-op, so CI and other machines are unaffected and no machine path is committed. - Layout mirrors the Eyes dashboard:
$PYAUTO_EYES_SCRATCH/<lib>/<dataset_type>/(autogalaxy/imaging,autogalaxy/ellipse,autofit/...,autocti/...),<dataset_type>= producer domainscripts/<domain>/. - Each repo's
_viz_cli.pygainsmirror_to_scratch(domains=None)+python _viz_cli.py scratch [domain ...], replacing the scratch domain folder with current PNGs (no stale figures) and printing the path. gallery/gallery_run.shcalls the mirror after each successful producer; a mirror failure never fails the run.- Brain
skills/eyes/eyes.mdgains an "Active image work (on-the-fly)" mode: after each fix re-render that domain, mirror, tell the human the scratch path.
Detailed implementation plan
Affected Repositories
- autogalaxy_visualization (primary)
- autofit_visualization
- autocti_visualization
- PyAutoBrain (skills/eyes/eyes.md; own PR on the same branch name)
- autolens_visualization — phase 2, NOT in this task (claimed by point-image-fit-filename, PR docs: describe the pyautolabs-bot App token instead of the retired PAT_PYAUTOLABS #7)
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./autogalaxy_visualization | main | clean |
| ./autofit_visualization | main | clean |
| ./autocti_visualization | main | clean |
| ./PyAutoBrain | main | clean |
Suggested branch: feature/eyes-scratch-mirror
Implementation Steps
_viz_cli.py(each viz repo): addmirror_to_scratch(domains=None) -> Path | None; for each domain delete$PYAUTO_EYES_SCRATCH/<lib>/<domain>/and copy every PNG underscripts/<domain>/images/preserving the subpath belowimages/.<lib>= registryimport_name(autogalaxy/autofit/autocti). Add__main__entrypython _viz_cli.py scratch [domain ...](no domains = every domain with images/, skipmisc). Cross-checkgallery/viz_manifest.yamlfile:entries so the mirror captures what the gallery shows.gallery/gallery_run.sh: after a producer succeeds andPYAUTO_EYES_SCRATCHis set, mirror that script's domain (failure tolerated); update header usage comment.- Short README/AGENTS.md note where the harness is documented.
- Brain
skills/eyes/eyes.md: "Active image work (on-the-fly)" section. - Test: scratchpad-pointed run of one cheap domain per repo; unset = no-op; ruff lint; revert test re-renders.
Key Files
_viz_cli.py— mirror helper + CLI entrygallery/gallery_run.sh— per-producer mirror hookPyAutoBrain/skills/eyes/eyes.md— active image work mode
Original Prompt
Click to expand starting prompt
Eyes scratch mirror — on-the-fly figure inspection
Consequence: judge
Autonomy: human-required
@autolens_visualization @autogalaxy_visualization @autofit_visualization @autocti_visualization @PyAutoBrain
Request (verbatim, 2026-10-21)
For PYAutoEyes work, I often have to wait for a complete loop of image fix to
dashboard update to provide feedback, but when im actively working on images it
needs to be more on-the-fly (e.g. before PRs, CI). Can we make it so such work
puts images for inspection in Science/scratch/eyes/dataset_type as we go.
Follow-up: "go, mirror the dashboard so its eyes/autolens/<dataset_type>"
Approved plan
- Opt-in env var
PYAUTO_EYES_SCRATCH(human sets it to
/mnt/c/Users/Jammy/Science/scratch/eyes); unset = no-op, so CI and other
machines are unaffected and no Windows path is committed. - Layout mirrors the PyAutoEyes dashboard:
$PYAUTO_EYES_SCRATCH/<lib>/<dataset_type>/
(autolens/imaging,autogalaxy/ellipse,autofit/samples,autocti/imaging_ci, …),
where<dataset_type>= the producer domainscripts/<domain>/. - Each
<lib>_visualization/_viz_cli.pygains a mirror helper + entry point
python _viz_cli.py scratch [domain ...]: replaces the scratch domain folder
with the current PNGs (no stale figures), prints the path. gallery/gallery_run.shcalls it after each successful producer, so a
worktree run of one domain lands figures in scratch immediately.- Brain
skills/eyes/eyes.mdgains an "active image work" mode: after each fix,
re-render that domain, mirror, tell the human the scratch path.
Split (human decision 2026-10-21)
autolens_visualization is claimed by point-image-fit-filename (PR #7, also edits
_viz_cli.py). Phase 1 = autogalaxy/autofit/autocti_visualization + Brain eyes.md
now. Phase 2 = autolens_visualization, same change, after #7 merges via /prm.
Activity
Jammy2211 commentedon Oct 21, 2026
Phase 1 shipped to PR-open (awaiting human /prm):
Phase 2 (autolens_visualization) follows after autolens_visualization#7 merges.
Jammy2211 commentedon Oct 21, 2026
Shipped (phase 1). Merged via /prm on 2026-10-21. Every CI leg was green.
/eyes"Active image work" sectionSetting
PYAUTO_EYES_SCRATCHturns the mirror on:gallery_run.sh <domain>andpython _viz_cli.py scratch [domain]copy figures to$PYAUTO_EYES_SCRATCH/<lib>/<dataset_type>/.Phase 2 (autolens_visualization) is filed as a separate draft. It can start once autolens_visualization#7 merges.