From 9b95170998d3aac3671b10d9209085e27b8456d7 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Fri, 25 Sep 2026 20:23:53 +0100 Subject: [PATCH] =?UTF-8?q?organism:=20the=20Eyes=20join=20as=20an=20organ?= =?UTF-8?q?=20=E2=80=94=20ORGANISM.md,=20docs,=20SIBLING=5FORGANS,=20Eyes?= =?UTF-8?q?=20conductor=20=E2=86=92=20PyAutoEyes=20(PyAutoMind#437)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 0 of the pyautoeyes-birth epic. ORGANISM.md gains the Eyes row (the perception mirror of the Heart: what the software shows, not whether it is healthy) and the growth-rule mention (three organs have earned status; the Eyes own the perception lifecycle). docs: organism table + instance-organ list, new docs/organs/eyes.md + toctree, organ counts in README/docs index. SIBLING_ORGANS and bin/_pyauto_root.sh learn PyAutoEyes; WITNESS_EXEMPT holds it until phase 1 lands tests; clean_slate.sh records why the Eyes' datasets and renders are never wiped. The Eyes conductor and /eyes skill default to the PyAutoEyes lens instance (organs/PyAutoEyes/lens after phase 1), with autolens_workspace_test secondary. Generated by repos_sync --write: the AGENTS.md organism map block and the installed session-start hook. Deferred (Cortex precedent): board/_theme.py palette + policy.yaml boards row → phase 2; bin/install.sh ORGAN_REPOS → phase 1. Refs PyAutoLabs/PyAutoMind#437 Co-Authored-By: Claude Fable 5.1 --- .claude/hooks/session-start.sh | 4 +-- AGENTS.md | 1 + ORGANISM.md | 9 +++-- README.md | 5 +-- agents/_pyauto_root.py | 1 + agents/conductors/eyes/AGENTS.md | 21 +++++++---- bin/_pyauto_root.sh | 2 +- bin/clean_slate.sh | 5 ++- docs/concepts/organism.md | 10 +++--- docs/index.md | 5 +-- docs/organs/eyes.md | 61 ++++++++++++++++++++++++++++++++ docs/satellites.md | 2 +- skills/eyes/eyes.md | 16 +++++---- tests/test_policy_seams.py | 2 ++ 14 files changed, 116 insertions(+), 28 deletions(-) create mode 100644 docs/organs/eyes.md diff --git a/.claude/hooks/session-start.sh b/.claude/hooks/session-start.sh index b85694d7..bd9dcd2c 100755 --- a/.claude/hooks/session-start.sh +++ b/.claude/hooks/session-start.sh @@ -132,12 +132,12 @@ marked_root() { holds_an_organ() { [ -d "$1/PyAutoMind" ] || [ -d "$1/PyAutoBrain" ] || [ -d "$1/PyAutoHeart" ] \ || [ -d "$1/PyAutoHands" ] || [ -d "$1/PyAutoMemory" ] || [ -d "$1/PyAutoGut" ] \ - || [ -d "$1/PyAutoNerves" ] || [ -d "$1/PyAutoCortex" ] \ + || [ -d "$1/PyAutoNerves" ] || [ -d "$1/PyAutoCortex" ] || [ -d "$1/PyAutoEyes" ] \ || [ -d "$1/organs/PyAutoMind" ] \ || [ -d "$1/organs/PyAutoBrain" ] || [ -d "$1/organs/PyAutoHeart" ] \ || [ -d "$1/organs/PyAutoHands" ] || [ -d "$1/organs/PyAutoMemory" ] \ || [ -d "$1/organs/PyAutoGut" ] || [ -d "$1/organs/PyAutoNerves" ] \ - || [ -d "$1/organs/PyAutoCortex" ] + || [ -d "$1/organs/PyAutoCortex" ] || [ -d "$1/organs/PyAutoEyes" ] } # Assigns WORKSPACE_ROOT and WORKSPACE_ROOT_REASON rather than printing: one diff --git a/AGENTS.md b/AGENTS.md index 7f26f21c..1dcb15aa 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -24,6 +24,7 @@ Canonical boundaries live in `PyAutoBrain/ORGANISM.md`; the full body map | **Hands** | PyAutoHands | Packaging, tagging, notebook generation, PyPI release execution. | | **Nerves** | PyAutoNerves | The Nerves — the configuration/serialization layer connecting workspace conventions to libraries (layered config, version handshake, test_mode), delivered as the `autonerves` package. | | **Gut** | PyAutoGut | Owns the lifecycle of condemned self-material (stale branches, stashes, dead code/tests): holds it as durable, recoverable git refs through a transit window and voids it on a sweep. The storage mirror of Memory (retention vs release). | +| **Eyes** | PyAutoEyes | The Eyes — where the organism sees what its figures look like: one rendered gallery per library (lens, galaxy, fit, cti) of every visualizer output on realistic data, the harness that renders them, the instance registry and the board that is the single point of contact for the visual behaviour of the whole ecosystem. Renders and holds figures; never judges them (the Brain's Eyes conductor does) and never edits library plot code (critiques route through intake). | Call chain (always this order): **Brain → Heart (gate) → Build (execute)**. Brain agents are **conductors** (front-door; a human drives them; they decide *and* act) or **faculties** (read-only opinions the conductors consult; they judge and stop). New capability grows as a faculty, not a new organ, unless it owns state or effects no existing organ can. diff --git a/ORGANISM.md b/ORGANISM.md index 3253f6a9..c8291b31 100644 --- a/ORGANISM.md +++ b/ORGANISM.md @@ -20,6 +20,7 @@ organs plan, build, test and release it, and you make every judgment call. | **Hands** | PyAutoHands | Builds and releases — packaging, tagging, notebook generation, PyPI via `release.yml`. A pure executor: runs no readiness checks and never re-derives a gate decision. | | **Nerves** | PyAutoNerves | The configuration/serialization layer (`autonerves`) — layered config with overrides, the workspace↔library version handshake, `test_mode`, FITS/JSON I/O. Connects the organism's conventions to every library; the base layer the scientific libraries all import. | | **Gut** | PyAutoGut | Owns the lifecycle of *condemned self-material* — stale branches, stashes, dead code/tests. Holds each as a durable, recoverable git ref through a transit window and **voids** it on a sweep. The storage mirror of Memory (retention ↔ release); the hygiene conductor drives it, as vitals reads Heart. | +| **Eyes** | PyAutoEyes | Sees *what the figures look like* — one rendered gallery per library (lens, galaxy, fit, cti) of every visualizer output on realistic data, the harness that renders them, the instance registry and the board that is the single point of contact for the visual behaviour of the whole ecosystem. Plain git PNGs, re-rendered on library release. The Eyes see what is true of the figures — the perception mirror of the Heart (what the software shows, not whether it is healthy); the Brain's Eyes conductor drives it and does the judging, as vitals reads Heart. Renders and holds figures; never judges them and never edits library plot code (critiques route through intake). | *Hands* and *Build* name the **same organ** (PyAutoHands) throughout this document: the organ is the **Hands**, and *Build* is the call-chain step it @@ -66,12 +67,16 @@ human types); let faculties multiply behind them. New capability grows as a **faculty** (cheap: one directory, one doc, one script), not as a repo. A new organ costs an `AGENTS.md`, a `CLAUDE.md` stub, install wiring, a body-map row and boundary prose — it must earn that by -owning state or effects no existing organ can. Two capabilities have earned +owning state or effects no existing organ can. Three capabilities have earned organ status that way. Configuration/signalling is the **Nerves** (PyAutoNerves), the base config/serialization layer every library imports — new config surfaces belong there, not in a new organ. Keeping track of what is true is the **Cortex** (PyAutoCortex), the second organ to earn it: it owns state no organ owned before — the science body map and the per-project ledgers — so science runs and the human's notes on them belong there, not in -the Mind. The human interaction layer is the command surface (`/route` + the +the Mind. Seeing what the software shows is the **Eyes** (PyAutoEyes): it owns +the perception lifecycle — every library's rendered figures, their manifests, +the one render harness, the instance registry and the board — state that was +copy-pasted between workspace repos before, so figures belong there, not in a +per-library gallery. The human interaction layer is the command surface (`/route` + the verb commands), which is part of Brain. diff --git a/README.md b/README.md index 8b01dc27..e18cf564 100644 --- a/README.md +++ b/README.md @@ -79,9 +79,10 @@ the linked canonical file retains the full instructions. Commit the generated adapters with the skill. Regeneration checks name collisions across the installed repository inventory and refuses conflicting user-owned destinations. -The eight organs the Brain coordinates — Brain (reasoning), Mind (intent), +The nine organs the Brain coordinates — Brain (reasoning), Mind (intent), Cortex (learning what is true), Memory (knowledge), Heart (health), Hands -(release), Nerves (configuration), Gut (shedding) — are defined once in +(release), Nerves (configuration), Gut (shedding), Eyes (seeing the figures) — +are defined once in [ORGANISM.md](ORGANISM.md), which this repo hosts. Agent contracts and the generated command table are in [AGENTS.md](AGENTS.md). The full organism documentation — including how to diff --git a/agents/_pyauto_root.py b/agents/_pyauto_root.py index 6d6cdb9e..372d9d6c 100644 --- a/agents/_pyauto_root.py +++ b/agents/_pyauto_root.py @@ -65,6 +65,7 @@ "PyAutoHands", "PyAutoNerves", "PyAutoGut", + "PyAutoEyes", ) # A workspace root says so itself by holding this file. It is deliberately diff --git a/agents/conductors/eyes/AGENTS.md b/agents/conductors/eyes/AGENTS.md index dd5362d9..5efba7df 100644 --- a/agents/conductors/eyes/AGENTS.md +++ b/agents/conductors/eyes/AGENTS.md @@ -4,9 +4,11 @@ > function* — the organism's sense of its own appearance: it owns the > render → present → critique → delegate loop over a project's visualization > surface. It consults the read-only memory faculty for style/paper context -> like every conductor; it never renders (the workspace's own -> `gallery/gallery_run.sh` does), never edits plot source, and -> delegates every accepted change via intake → start_dev. +> like every conductor; it never renders (the **PyAutoEyes** organ's harness +> does — `gallery/gallery_run.sh` in each instance), never edits plot source, +> and delegates every accepted change via intake → start_dev. The conductor +> drives the Eyes organ exactly as vitals reads the Heart: the organ renders +> and holds the figures, the conductor judges them with the human. Grown from demonstrated need: the organism produces rich visualizations (imaging / interferometer / point_source / multi / cluster) but had no formal @@ -22,7 +24,12 @@ The deterministic core consumes any **visualization workspace**: a repo with visualization scripts, plus `output/gallery/` from its gallery builder. The workspace root is always a CLI argument — the `.py`/`.sh` here name no repositories (tenant firewall); the instance pointer lives in this prose and -in the `/eyes` skill. Reference instance: `autolens_workspace_test`. +in the `/eyes` skill. Default instance: the **PyAutoEyes** lens gallery, +`organs/PyAutoEyes/lens` (the organ holds one instance subtree per library — +lens, galaxy, fit, cti; PyAutoEyes phase 1 moves today's flat checkout into +`lens/`, so until it lands the instance root is `organs/PyAutoEyes` itself). +`autolens_workspace_test` remains a secondary instance (its `gallery/` +harness is retired by PyAutoEyes phase 5). ## Modes @@ -35,7 +42,7 @@ in the `/eyes` skill. Reference instance: `autolens_workspace_test`. ## The loop (driven by the `/eyes` skill) 1. `eyes survey ` — establish what needs (re)rendering. -2. Render in the workspace: `bash gallery/gallery_run.sh` (`--all` +2. Render in the instance: `bash gallery/gallery_run.sh` (`--all` adds the slow tier + JAX variants), which ends in the gallery builder's own `--check`. 3. Present: the embedded gallery for the human; the agent reads figure PNGs @@ -50,8 +57,8 @@ in the `/eyes` skill. Reference instance: `autolens_workspace_test`. ## Boundaries - Decision-only, stdlib-only core: reads the filesystem, writes nothing. -- Rendering and figure regeneration belong to the workspace; the conductor - only tells you they are stale. +- Rendering and figure regeneration belong to the Eyes organ (or the + workspace instance); the conductor only tells you they are stale. - Paper-informed passes (`review --against`): the reference figures are gathered by the session (PDF pages read directly, or panels extracted to a directory) — the core never fetches anything. The reviewing session reads diff --git a/bin/_pyauto_root.sh b/bin/_pyauto_root.sh index 78cfaf16..4a7c0b01 100755 --- a/bin/_pyauto_root.sh +++ b/bin/_pyauto_root.sh @@ -85,7 +85,7 @@ _pyauto_marked_root() { _pyauto_is_root() { [ -d "$1/PyAutoMind" ] || [ -d "$1/PyAutoHeart" ] || [ -d "$1/PyAutoHands" ] \ || [ -d "$1/PyAutoMemory" ] || [ -d "$1/PyAutoGut" ] || [ -d "$1/PyAutoNerves" ] \ - || [ -d "$1/PyAutoCortex" ] + || [ -d "$1/PyAutoCortex" ] || [ -d "$1/PyAutoEyes" ] } # Assigns PYAUTO_ROOT and PYAUTO_ROOT_REASON rather than printing: one diff --git a/bin/clean_slate.sh b/bin/clean_slate.sh index 777486d8..9cd773f3 100755 --- a/bin/clean_slate.sh +++ b/bin/clean_slate.sh @@ -74,7 +74,10 @@ PACKAGING_REPOS=(PyAutoNerves PyAutoFit PyAutoArray PyAutoGalaxy PyAutoLens) # whose dataset/ is auto-simulated but whose results/ are tracked witnesses — it # is swept by its own tooling, never here. autolens_jax_joss was excluded here # for the same reason (JWST cosmos_web_ring); its local checkout was removed in -# 2026-09 (PyAutoBrain#389) and the repo lives on GitHub only. +# 2026-09 (PyAutoBrain#389) and the repo lives on GitHub only. The Eyes organ +# (organs/PyAutoEyes) is excluded too: its instances' dataset/ trees are the +# tracked realistic inputs its galleries are rendered from and its PNG renders +# are the tracked record (re-rendered on library release only) — never wiped. DATASET_REPOS=(autolens_workspace autogalaxy_workspace autofit_workspace \ autocti_workspace HowToLens HowToGalaxy HowToFit) # Committed dataset files above this size are flagged as repo bloat. diff --git a/docs/concepts/organism.md b/docs/concepts/organism.md index b5846160..5ef9aba5 100644 --- a/docs/concepts/organism.md +++ b/docs/concepts/organism.md @@ -17,6 +17,7 @@ it and adds the framework/instance distinction an adopter needs. | **Hands** | PyAutoHands | *Does* — packaging, tagging, notebook generation, PyPI releases. A pure executor: never re-derives a gate decision. | | **Nerves** | PyAutoNerves | *Connects* — the configuration/serialization layer (`autonerves`): layered config, the workspace↔library version handshake, `test_mode`, FITS/JSON I/O. The base layer every library imports. | | **Gut** | PyAutoGut | *Sheds* — the lifecycle of condemned self-material (stale branches, stashes, dead code/tests): holds each as a durable, recoverable git ref through a transit window, then **voids** it on a sweep. The storage mirror of Memory (retention ↔ release); the hygiene conductor drives it, as vitals reads Heart. | +| **Eyes** | PyAutoEyes | *Sees* — one rendered gallery per library (lens, galaxy, fit, cti) of every visualizer output on realistic data, the render harness, the instance registry and the board: the single point of contact for what the software shows. The perception mirror of the Heart (what the software shows, not whether it is healthy); renders and holds figures, never judges them — the Brain's Eyes conductor does. | Everything else — the libraries being developed, their example workspaces, test suites, tutorials — is a **satellite**: a capability the organism works @@ -43,10 +44,11 @@ The organs split on one line that matters for adoption: pipelines. Domain facts appear only in declared config surfaces (tables and policy files, not logic), and a drift check — the {ref}`tenant firewall ` — keeps it that way. -- **Instance organs — Mind, Cortex, Memory, Gut.** Committed state, ledgers, - knowledge, and shed material. These are *inherently yours*: an adopter never - forks the upstream Mind, Cortex, Memory or Gut content, they create their own - repos with the same documented shape. +- **Instance organs — Mind, Cortex, Memory, Gut, Eyes.** Committed state, + ledgers, knowledge, shed material, and rendered figures. These are + *inherently yours*: an adopter never forks the upstream Mind, Cortex, Memory, + Gut or Eyes content, they create their own repos with the same documented + shape. One more principle worth knowing before you read anything else: **one canonical page per fact.** Organ boundaries live in ORGANISM.md; diff --git a/docs/index.md b/docs/index.md index d73db947..2465631d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,8 +2,8 @@ PyAutoScientist is a working, opinionated reference implementation of an **AI-agent development organism** for human-led, natural-language software -development: a set of eight git repositories — Brain, Mind, Cortex, Memory, -Heart, Hands, Nerves, Gut — through which you lead a multi-repo project in +development: a set of nine git repositories — Brain, Mind, Cortex, Memory, +Heart, Hands, Nerves, Gut, Eyes — through which you lead a multi-repo project in plain English. You describe what you want; AI agents plan, implement, test, gate and release it; you make every judgment call. @@ -60,6 +60,7 @@ organs/memory organs/heart organs/build organs/gut +organs/eyes ``` ```{toctree} diff --git a/docs/organs/eyes.md b/docs/organs/eyes.md new file mode 100644 index 00000000..89b16663 --- /dev/null +++ b/docs/organs/eyes.md @@ -0,0 +1,61 @@ +# Eyes — PyAutoEyes + +**What it owns:** the *perception lifecycle* — one **rendered gallery per +library** (lens, galaxy, fit, cti) of every visualizer output on realistic +data, the manifests that inventory them, the one harness that renders them, +the instance registry and the board. The Eyes are the perception mirror of the +Heart: the Heart says whether the software is *healthy*; the Eyes show what it +*shows*. + +**Repo:** [PyAutoLabs/PyAutoEyes](https://github.com/PyAutoLabs/PyAutoEyes) + +## The defining function: seeing + +Every PyAuto library draws, on one shared plotting API — and the figures a +library draws are the part of it a user sees first. The Eyes render each +library's figures on fixed, realistic datasets (HST-scale imaging, an SMA-like +interferometer, and their equivalents per library) and keep the PNGs **in +git**, so a figure's history is a `git log` and a visual regression is a diff. +Figures are **re-rendered on library release only**: a release is the moment +the record changes. + +## Instances + +The organ holds one instance subtree per library, each with the same layout — +`scripts//visualization.py` producers, `scripts//images/` +renders, `output/gallery/{gallery.html,viz_manifest.yaml}` and a `GALLERY.md` +index. The lens instance (`lens/`) is the first; galaxy, fit and cti follow. +An instance registry (`registry.yaml`) names every instance, its library and +its domains, and the board shows each one's figure count, stale renders, gaps +and open critiques — the single point of contact for the visual behaviour of +the whole ecosystem. + +## The driver split + +The Eyes *render and hold* figures; they judge nothing. The Brain's **Eyes +conductor** (`bin/pyauto-brain eyes`, `/eyes`) surveys an instance, prepares +the review surface and walks the human through the figures — the same split +as **Heart ↔ vitals** and **Gut ↔ hygiene**: the organ keeps the state, the +conductor reasons over it. + +## What it never does + +- **It never judges a figure.** Critique happens in the conductor's review + loop, with the human. +- **It never edits library plot code.** An accepted critique becomes a Mind + prompt through intake and ships through start_dev like any other change. +- **It never re-simulates a shared dataset.** Where an instance borrows a + profiling dataset, it is kept byte-identical. +- **It issues no verdict.** Readiness is the Heart's. + +## For an adopter + +Like Mind, Cortex, Memory and Gut, the Eyes are an **instance organ** — +inherently yours. You do not fork this repo's figures; you create your own +Eyes with the same shape, rendering your own libraries. + +The birth of this organ is tracked in the `pyautoeyes-birth` epic +([PyAutoMind#437](https://github.com/PyAutoLabs/PyAutoMind/issues/437) is +phase 0). The repo was renamed from `autolens_visualization`, so its lens +gallery is already rendered; phase 1 moves it into the `lens/` instance and +adds the harness package, registry and CLI. diff --git a/docs/satellites.md b/docs/satellites.md index 927ad8b7..7ce0a9e4 100644 --- a/docs/satellites.md +++ b/docs/satellites.md @@ -8,7 +8,7 @@ repos that honour the contracts your body map declares. | Category | What it is for | What the organism expects of it | |----------|----------------|--------------------------------| -| `organ` | The eight organism repos themselves. | Framework identity — names survive a fork; excluded from the tenant firewall's instance-fact tokens. | +| `organ` | The organism repos themselves. | Framework identity — names survive a fork; excluded from the tenant firewall's instance-fact tokens. | | `library` | A source package you release. | A test suite and CI workflow Heart gates on; a row in the Brain release conductor's library set; a PyPI package the Hands release; a version floor workspaces pin against. | | `workspace` | Runnable, user-facing examples for one library. | A `run_workspace` row in `pre_build.sh` (repo, package, flags, parent library); a version pin Heart's `version_skew` compares to the installed library; required CI (smoke tests) on `main`; notebook generation from its scripts. | | `workspace_test` | Regression / smoke / parity scripts — code-heavy, doc-light. | Same `run_workspace` mechanics; scripts runnable headless in the validation pipeline; the home for cross-package and integration checks that don't belong in a library's unit tests. | diff --git a/skills/eyes/eyes.md b/skills/eyes/eyes.md index 833f1f33..ba772ee2 100644 --- a/skills/eyes/eyes.md +++ b/skills/eyes/eyes.md @@ -5,16 +5,20 @@ visualization surface, via PyAutoBrain's **Eyes Agent** (the *perceptive function*). You never name the Brain; this command is the door. Shared routing context: `PyAutoBrain/skills/COMMANDS.md`. The default -visualization workspace is **`autolens_workspace_test`** (the reference -instance of the gallery contract from epic PyAutoBrain#117 Phase 1); pass a -different workspace root to review another project. +visualization instance is the **PyAutoEyes** lens gallery, +**`organs/PyAutoEyes/lens`** — the Eyes organ holds one rendered gallery per +library (lens, galaxy, fit, cti). PyAutoEyes phase 1 moves today's flat +checkout into `lens/`; until it lands, pass `organs/PyAutoEyes` itself. +`autolens_workspace_test` (the original reference instance from epic +PyAutoBrain#117 Phase 1) remains a secondary instance; pass a different +instance root to review another project. ## Do 1. **Survey** — `bin/pyauto-brain eyes survey `: per-script figure inventory, stale renders (producer script newer than its figures), never-rendered gaps, gallery currency. -2. **Render** what the survey flags, in the workspace itself: +2. **Render** what the survey flags, in the instance itself: `bash gallery/gallery_run.sh [|--all]` (ends in the builder's own `--check`; `--all` adds the slow tier + JAX variants). Then `python gallery/gallery_build.py --embed` and copy @@ -49,7 +53,7 @@ panels): ## Boundary -- The Eyes Agent decides and routes; the workspace renders; intake/start_dev - ship. No step edits plots directly from critique. +- The Eyes Agent decides and routes; the PyAutoEyes organ (or a workspace + instance) renders and holds the figures; intake/start_dev ship. No step edits plots directly from critique. - The core never fetches papers or figures — the session gathers reference material; the conductor only lists what it is given. diff --git a/tests/test_policy_seams.py b/tests/test_policy_seams.py index 43253be6..9cf8be0e 100644 --- a/tests/test_policy_seams.py +++ b/tests/test_policy_seams.py @@ -103,6 +103,8 @@ def test_refactor_test_witness_loads(): # statement that the repo has no test suite — not a licence to skip one. WITNESS_EXEMPT = { "PyAutoGut": "no test suite (bin/ + docs only, verified at PyAutoBrain#269)", + "PyAutoEyes": "organ row born 2026-09-25 (pyautoeyes-birth phase 0, PyAutoMind#437); " + "phase 1 adds the hermetic harness tests/ and the test_witness row", }