Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude/hooks/session-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
9 changes: 7 additions & 2 deletions ORGANISM.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions agents/_pyauto_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"PyAutoHands",
"PyAutoNerves",
"PyAutoGut",
"PyAutoEyes",
)

# A workspace root says so itself by holding this file. It is deliberately
Expand Down
21 changes: 14 additions & 7 deletions agents/conductors/eyes/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -35,7 +42,7 @@ in the `/eyes` skill. Reference instance: `autolens_workspace_test`.
## The loop (driven by the `/eyes` skill)

1. `eyes survey <workspace>` — 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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bin/_pyauto_root.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion bin/clean_slate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 6 additions & 4 deletions docs/concepts/organism.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 <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;
Expand Down
5 changes: 3 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -60,6 +60,7 @@ organs/memory
organs/heart
organs/build
organs/gut
organs/eyes
```

```{toctree}
Expand Down
61 changes: 61 additions & 0 deletions docs/organs/eyes.md
Original file line number Diff line number Diff line change
@@ -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/<domain>/visualization.py` producers, `scripts/<domain>/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.
2 changes: 1 addition & 1 deletion docs/satellites.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down
16 changes: 10 additions & 6 deletions skills/eyes/eyes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <workspace-root>`: 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 [<domain>|--all]` (ends in the
builder's own `--check`; `--all` adds the slow tier + JAX variants). Then
`python gallery/gallery_build.py --embed` and copy
Expand Down Expand Up @@ -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.
Loading
Loading