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 .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Nightly Release

# The scheduled-nightly release driver (PyAutoBuild/docs/nightly_release_design.md
# The scheduled-nightly release driver (PyAutoHands/docs/nightly_release_design.md
# §3) — the ONLY path authorised to ship a live PyPI release without a
# per-release human, under PyAutoBrain/AUTONOMY.md's standing grant (2026-07-09).
#
# This workflow is a scheduler, nothing more: all sequencing, gating and
# notification logic lives in agents/conductors/release/nightly.sh (testable
# locally via `pyauto-brain release nightly`). Scheduling authority moved HERE
# from PyAutoBuild's release.yml (whose cron was removed in the same change) —
# from PyAutoHands's release.yml (whose cron was removed in the same change) —
# Build executes releases, it does not decide when.
#
# Arming (design §9, all human acts, in order):
Expand Down
8 changes: 4 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This file is for AI coding agents (Claude Code, Codex, Cursor, etc.) and humans
discovering this repository. It is the canonical description of PyAutoBrain — the
**reasoning layer** of the PyAuto organism — and of the Brain / Heart / Build
boundary; PyAutoBuild and PyAutoHeart point back here.
boundary; PyAutoHands and PyAutoHeart point back here.

## The organism map

Expand All @@ -18,7 +18,7 @@ Canonical boundaries live in `PyAutoBrain/ORGANISM.md`; the full body map
|-------|------|------|
| **Mind** | PyAutoMind | Intent, goals, priorities, workflow state; every task starts as a markdown prompt here. |
| **Brain** | PyAutoBrain | Reasoning/orchestration layer; how work is decomposed and routed; the specialist agents. |
| **Hands** | PyAutoBuild | Packaging, tagging, notebook generation, PyPI release execution. |
| **Hands** | PyAutoHands | Packaging, tagging, notebook generation, PyPI release execution. |
| **Heart** | PyAutoHeart | Health/readiness — the authoritative "is it safe to release?" verdict. |
| **Memory** | PyAutoMemory | Long-term scientific/software/project knowledge (see science pointer below). |
| **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). |
Expand All @@ -40,7 +40,7 @@ the right points.

PyAutoBrain owns **no state, no health checks, and no execution mechanics**. It
only *reasons* and *delegates*: it asks PyAutoHeart whether the organism is
healthy, decides whether and how to proceed, and tells PyAutoBuild to execute
healthy, decides whether and how to proceed, and tells PyAutoHands to execute
when it should.

## The organism
Expand Down Expand Up @@ -141,7 +141,7 @@ the `/<verb>` slash commands.
| `profiling` | The proprioceptive function — the organism's sense of its own effort: campaign/ingest/triage plans over the autolens_profiling workspace — ProfilingDecision | `bin/pyauto-brain profiling` |
| `hygiene` | The maintenance function — the organism's sense of its own upkeep: code-quality debt (dev-loop cost + tidiness), delegating fixes — HygieneDecision | `bin/pyauto-brain hygiene` |
| `clone` | The Mitosis Agent: partition the reference assistant, analyze the domain, emit the CloneDecision; --apply --mode lightweight-seed delegates the seed birth to Build | `bin/pyauto-brain clone` |
| `build` | Coordinate execution: consult the vitals faculty, then delegate to PyAutoBuild | `bin/pyauto-brain build` |
| `build` | Coordinate execution: consult the vitals faculty, then delegate to PyAutoHands | `bin/pyauto-brain build` |
| `release` | Release door → the Build Agent release mode (single gate); 'release rehearse'/'release validate' drive release validation; 'release nightly' is the scheduled-nightly driver | `bin/pyauto-brain release` |
| `health` | The organism's clinician: run the health loop with a human, dispatch by dispatch, toward green | `bin/pyauto-brain health` |

Expand Down
2 changes: 1 addition & 1 deletion AUTONOMY.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ exception to the release cap above — not a weakening of it.
**Scope — the grant attaches to the schedule, not to the pipeline:**

- It covers exactly the scheduled nightly driver defined in
`PyAutoBuild/docs/nightly_release_design.md`: activity-gated (quiet nights
`PyAutoHands/docs/nightly_release_design.md`: activity-gated (quiet nights
skip, loudly), Heart-GREEN-gated (STALE/YELLOW/RED stop the run — on this
path YELLOW is never acknowledged by anyone; there is no force input), and
kill-switchable (the `NIGHTLY_RELEASES` repo var).
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Contributing

The PyAutoScientist organs (PyAutoBrain, PyAutoMind, PyAutoHeart,
PyAutoBuild, PyAutoMemory) are a **living reference implementation** — the
PyAutoHands, PyAutoMemory) are a **living reference implementation** — the
maintainer's daily working system, not a stable library.

What that means in practice:
Expand Down
10 changes: 6 additions & 4 deletions ORGANISM.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ organs plan, build, test and release it, and you make every judgment call.
| **Mind** | PyAutoMind | Decides *what* — intent, goals, priorities, workflow state, the prompt registry and taxonomy. Also holds the body map (`repos.yaml`, the single source of repo identity). |
| **Brain** | PyAutoBrain | Figures out *how* — reasoning, planning, decomposition, routing; hosts the specialist agents. Owns **no state, no health checks, no execution mechanics**. |
| **Heart** | PyAutoHeart | Determines whether the organism is healthy. `pyauto-heart readiness` is the **authoritative** GREEN/YELLOW/RED "is it safe to release?" gate. An observer: never writes into other repos, never triggers Build. |
| **Hands** | PyAutoBuild | 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. |
| **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. |
| **Memory** | PyAutoMemory | Long-term knowledge — *what the science says* (literature wikis, concepts, bibliographies). Operational history — *what the organism did* — lives in Mind (the `complete/` records, issues), not here. |
| **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. |
| **Nerves** | PyAutoConf | The configuration/serialization layer (`autoconf`) — 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. The seventh organ. |

*Hands* and *Build* name the **same organ** (PyAutoBuild) throughout this
*Hands* and *Build* name the **same organ** (PyAutoHands) throughout this
document: the organ is the **Hands**, and *Build* is the call-chain step it
performs. (The repo is still named `PyAutoBuild`; likewise `PyAutoConf` for the
Nerves — the repo renames are a later, mechanical follow-up.)
performs. (The Hands repo was renamed PyAutoBuild → PyAutoHands; the *Build*
call-chain shorthand and the `autobuild` package/CLI keep their names.
`PyAutoConf` likewise remains the Nerves repo's name, aligned with its
`autoconf` package.)

The scientific libraries (PyAutoFit, PyAutoArray, PyAutoGalaxy, PyAutoLens) and
the workspaces are **capabilities the organism uses, not organs**. The full
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ version:
| Mind | PyAutoMind | what to do — intent, priorities, workflow state |
| Brain | PyAutoBrain (this repo) | how to do it — reasoning, planning, routing |
| Heart | PyAutoHeart | is it healthy — the release-readiness verdict |
| Hands | PyAutoBuild | do it — packaging, tagging, PyPI releases |
| Hands | PyAutoHands | do it — packaging, tagging, PyPI releases |
| Memory | PyAutoMemory | what we know — long-term scientific knowledge |
| Gut | PyAutoGut | what we shed — condemned branches, stashes and dead code, held recoverably then voided |

Expand Down
2 changes: 1 addition & 1 deletion agents/_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ resolve_heart() {
}

resolve_autobuild() {
_resolve_bin autobuild "$PYAUTO_ROOT/PyAutoBuild/bin/autobuild"
_resolve_bin autobuild "$PYAUTO_ROOT/PyAutoHands/bin/autobuild"
}

# _resolve_dir <env-var-name> <repo-name> — echo the path to a sibling PyAuto
Expand Down
6 changes: 3 additions & 3 deletions agents/conductors/bug/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ decision. See [`BUG_TAXONOMY.md`](./BUG_TAXONOMY.md) for the full fix-locus rule
## It reasons; it does not build

The Bug Agent never edits source, opens PRs, or runs builds — that is the existing
`start_dev` / `ship_*` workflow (and PyAutoBuild at release). It never *runs* tests or
`start_dev` / `ship_*` workflow (and PyAutoHands at release). It never *runs* tests or
health checks either: reproduction means **identifying** the repro command or the Heart
check, and validation is delegated to the vitals faculty. It emits a `BugDecision`; the
workflow acts on it.
Expand Down Expand Up @@ -63,7 +63,7 @@ so (`rehome_suggestion`) instead of planning a fix.
The bug can come from PyAutoHeart. `bug.sh health` gathers both signals and hands them
to `_bug.py`, which emits a first-pass **category hint** per finding (real-bug / config /
flaky / expected) that the reasoning layer confirms before deciding whether the fix
belongs in the affected repo, PyAutoHeart, PyAutoBuild or PyAutoBrain:
belongs in the affected repo, PyAutoHeart, PyAutoHands or PyAutoBrain:

1. the **live vitals verdict** — via the vitals faculty (never Heart directly);
2. the **filed PyAutoHeart issues** — `gh issue list --repo PyAutoLabs/PyAutoHeart`
Expand Down Expand Up @@ -121,7 +121,7 @@ clean seam, exactly as Release stayed a mode of Build. See

## What this agent must never do

- Edit source, open PRs, or run builds — that is `start_dev` / `ship_*` / PyAutoBuild.
- Edit source, open PRs, or run builds — that is `start_dev` / `ship_*` / PyAutoHands.
- Run tests or health checks, or re-implement a PyAutoHeart check — consult the vitals
faculty (`--check-health`) and let Heart measure.
- Query PyAutoHeart directly — only the vitals faculty talks to the Heart organ.
Expand Down
4 changes: 2 additions & 2 deletions agents/conductors/bug/BUG_TAXONOMY.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ re-implement a Heart check. `bug.sh health` reads two complementary signals:

For each finding `_bug.py` emits a first-pass **category hint** (real-bug / config /
flaky / expected, from the issue title + labels); the reasoning layer confirms it and
decides where the fix belongs (affected repo, PyAutoHeart, PyAutoBuild, PyAutoBrain).
decides where the fix belongs (affected repo, PyAutoHeart, PyAutoHands, PyAutoBrain).
Confirmed real defects become `PyAutoMind/bug/health_fixes/<name>.md` prompts and enter
the normal workflow; flaky / expected findings are left to the Health conductor's loop.
Validation after patching is always the vitals faculty (`pyauto-heart readiness` GREEN,
Expand Down Expand Up @@ -109,7 +109,7 @@ intent → PyAutoMind (bug/* prompts, bug/health_fixes/, active/planned s
reasoning → PyAutoBrain (Bug Agent — this; reuses the Feature core)
knowledge → PyAutoMemory (recurring failures / prior fixes / flaky tests; cited, not invented)
health → PyAutoHeart (via the vitals faculty + filed Heart issues; never re-implemented)
execution → PyAutoBuild (via start_dev / ship_* — never run by this agent)
execution → PyAutoHands (via start_dev / ship_* — never run by this agent)
```

No execution, health-checking, or knowledge-authoring logic lives in the Bug Agent. It
Expand Down
2 changes: 1 addition & 1 deletion agents/conductors/bug/_bug.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
# (the organs themselves), not library-source or workspace work.
INFRA_TARGETS = {
"pyautobrain": "PyAutoBrain", "pyautoheart": "PyAutoHeart",
"pyautobuild": "PyAutoBuild", "autobuild": "PyAutoBuild",
"pyautobuild": "PyAutoHands", "autobuild": "PyAutoHands",
"pyautomind": "PyAutoMind", "pyautomemory": "PyAutoMemory",
}

Expand Down
26 changes: 13 additions & 13 deletions agents/conductors/build/AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# Build agent

> **Tier: conductor** — a front-door agent you *drive*. It decides *whether/what*
> to build and drives execution, delegating the *building* to PyAutoBuild and the
> to build and drives execution, delegating the *building* to PyAutoHands and the
> *health decision* to the read-only vitals faculty. It acts; it does not measure.

The second canonical **PyAutoBrain** reasoning agent, and the reference example
of how the Brain coordinates *multiple* organs. It is the executive function for
execution work: it owns the build *workflow* but delegates the *building* to
PyAutoBuild and the *health decision* to the vitals faculty.
PyAutoHands and the *health decision* to the vitals faculty.

```
Mind → Build Agent → vitals faculty → Heart → GREEN/YELLOW/RED
→ Build Agent → PyAutoBuild (execute)
→ Build Agent → PyAutoHands (execute)
```

## Fundamental principle

**The Build Agent does not build software itself — PyAutoBuild does.** The Build
**The Build Agent does not build software itself — PyAutoHands does.** The Build
Agent decides *whether* building should happen, *what* to build, *which*
PyAutoBuild capability to invoke, and *whether to proceed or stop*. It reasons;
PyAutoBuild executes. It must never duplicate PyAutoBuild functionality.
PyAutoHands capability to invoke, and *whether to proceed or stop*. It reasons;
PyAutoHands executes. It must never duplicate PyAutoHands functionality.

## Brain agents consult one another

Expand All @@ -32,12 +32,12 @@ tree is fit for a refactor; a Release Agent asking the Build Agent to package.

## Modes (one agent now, clean seam for a Release Agent later)

Release is in scope today because PyAutoBuild currently owns release/build/deploy
Release is in scope today because PyAutoHands currently owns release/build/deploy
execution. It is isolated as its own **mode** so release-specific reasoning never
bleeds into generic build execution, and can split into a dedicated Release Agent
later with no churn to build mode.

| Mode | Default action | Gate policy | Routes to (PyAutoBuild) |
| Mode | Default action | Gate policy | Routes to (PyAutoHands) |
|------|----------------|-------------|--------------------------|
| `build` | `run_all` | lenient — GREEN/YELLOW proceed, RED aborts | `generate`, `run`, `run_python`, `run_all`, `script_matrix`, `aggregate_results`, `slow_skip_check`, `repro_command`, `bump_colab_urls` |
| `deploy` | `generate` | cautious — GREEN proceeds, YELLOW needs `--force`, RED aborts | `generate`, `bump_colab_urls` |
Expand All @@ -55,7 +55,7 @@ An **unknown** verdict collapses to YELLOW — never silently GREEN.
3. Consult the vitals faculty for the readiness verdict.
4. Interpret it: **GREEN** proceed · **YELLOW** caution (proceed in build mode,
else `--force`) · **RED** abort with blockers.
5. Invoke the appropriate PyAutoBuild capability.
5. Invoke the appropriate PyAutoHands capability.
6. Emit a structured `BuildDecision`.

## Run
Expand All @@ -69,7 +69,7 @@ bin/pyauto-brain build --mode deploy --force generate
bin/pyauto-brain build --mode release -- 2 # release mode; forward minor_version 2 to pre_build
```

Anything after `--` is forwarded verbatim to the PyAutoBuild subcommand.
Anything after `--` is forwarded verbatim to the PyAutoHands subcommand.

Exit codes: `0` proceeded/delegated (or dry-run) · `2` yellow blocked (use
`--force`) · `3` red blocked · `4` unknown/could-not-consult · `5` invalid
Expand All @@ -83,7 +83,7 @@ mode/action.
{
"agent": "build",
"mode": "build|deploy|release",
"requested_action": "<PyAutoBuild capability>",
"requested_action": "<PyAutoHands capability>",
"health_status": "green|yellow|red|unknown",
"decision": "proceed|proceed-with-caution|abort",
"execution_plan": ["autobuild <action> <args>"],
Expand All @@ -99,7 +99,7 @@ A future Python `BuildAgent().execute(...)` wrapper can return this same shape.

## What this agent must never do

- Build, package, tag, or publish anything itself — that is PyAutoBuild's job.
- Build, package, tag, or publish anything itself — that is PyAutoHands's job.
- Query PyAutoHeart directly or re-derive a readiness verdict — consult the
vitals faculty.
- Re-own a health-shim command (`verify_install`, `url_check`, `watch`, `status`,
Expand All @@ -108,4 +108,4 @@ A future Python `BuildAgent().execute(...)` wrapper can return this same shape.
release mode.

See [`BUILD_CAPABILITIES.md`](./BUILD_CAPABILITIES.md) for the audit of every
PyAutoBuild capability the agent calls, and the execution/health boundary.
PyAutoHands capability the agent calls, and the execution/health boundary.
Loading
Loading