diff --git a/.claude/hooks/session-start.sh b/.claude/hooks/session-start.sh index f58396f7..54a10fe6 100755 --- a/.claude/hooks/session-start.sh +++ b/.claude/hooks/session-start.sh @@ -132,12 +132,13 @@ marked_root() { holds_an_organ() { [ -d "$1/PyAutoBrain" ] || [ -d "$1/PyAutoMind" ] || [ -d "$1/PyAutoCortex" ] \ || [ -d "$1/PyAutoMemory" ] || [ -d "$1/PyAutoEyes" ] || [ -d "$1/PyAutoHeart" ] \ - || [ -d "$1/PyAutoHands" ] || [ -d "$1/PyAutoNerves" ] || [ -d "$1/PyAutoGut" ] \ + || [ -d "$1/PyAutoHands" ] || [ -d "$1/PyAutoPulse" ] || [ -d "$1/PyAutoNerves" ] \ + || [ -d "$1/PyAutoGut" ] \ || [ -d "$1/organs/PyAutoBrain" ] || [ -d "$1/organs/PyAutoMind" ] \ || [ -d "$1/organs/PyAutoCortex" ] || [ -d "$1/organs/PyAutoMemory" ] \ || [ -d "$1/organs/PyAutoEyes" ] || [ -d "$1/organs/PyAutoHeart" ] \ - || [ -d "$1/organs/PyAutoHands" ] || [ -d "$1/organs/PyAutoNerves" ] \ - || [ -d "$1/organs/PyAutoGut" ] + || [ -d "$1/organs/PyAutoHands" ] || [ -d "$1/organs/PyAutoPulse" ] \ + || [ -d "$1/organs/PyAutoNerves" ] || [ -d "$1/organs/PyAutoGut" ] } # Assigns WORKSPACE_ROOT and WORKSPACE_ROOT_REASON rather than printing: one diff --git a/AGENTS.md b/AGENTS.md index c0e4601b..59cb02b9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -23,6 +23,7 @@ Canonical boundaries live in `PyAutoBrain/ORGANISM.md`; the full body map | **Eyes** | PyAutoEyes | The Eyes — where the organism sees what its figures look like: the cross-project visualization dashboard over the `_visualization` project repos (autolens_visualization, autogalaxy_visualization, autofit_visualization and autocti_visualization) — the registry of those repos, the tracked-manifest read contract (`gallery/viz_manifest.yaml`) and the Pages board that links to their PNGs as the single point of contact for the visual behaviour of the whole ecosystem. Renders nothing and copies no figures (the project repos render and hold them); never judges them (the Brain's Eyes conductor does) and never edits library plot code (critiques route through intake). | | **Heart** | PyAutoHeart | Health/readiness — the authoritative "is it safe to release?" verdict. | | **Hands** | PyAutoHands | Packaging, tagging, notebook generation, PyPI release execution. | +| **Pulse** | PyAutoPulse | The Pulse — where the organism feels how fast it runs: the cross-project profiling dashboard over the `_profiling` project repos (today autolens_profiling) — the instance registry, the versioned `profiling-summary` read contract (v1 live at `autolens_profiling/dashboard/summary.json`), the ingest receipts (resolved commit per project per render) and the Pages board. Validates the exchange contract only; never moves pins, combines unmatched timings, applies the compile threshold to runtime, computes an ecosystem-wide speed score or issues a Heart verdict, and never judges (the Brain's profiling conductor does); the project repos keep their producers, results, drift policy and their own Pages page. | | **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). | diff --git a/ORGANISM.md b/ORGANISM.md index 0632cce2..381cbbae 100644 --- a/ORGANISM.md +++ b/ORGANISM.md @@ -19,6 +19,7 @@ organs plan, build, test and release it, and you make every judgment call. | **Eyes** | PyAutoEyes | Sees *what the figures look like* across the `_visualization` project repos. Owns the instance registry, the manifest read contract and the dashboard that links to project-owned PNGs. Project repos own producers, render harnesses, figures and manifests; Eyes renders no figures and copies none. The Brain's Eyes conductor drives review and judgment; accepted critiques route through intake, never directly into library plot code. | | **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** | 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. | +| **Pulse** | PyAutoPulse | Feels *how fast the organism runs* across the `_profiling` project repos. Owns the profiling instance registry, the versioned `profiling-summary` read contract, the ingest receipts (resolved commit per project per render) and the cross-project board. Validates the exchange contract only; project repos own producers, results, pins, drift policy and their own Pages page. Never moves pins, combines unmatched timings, applies the compile threshold to runtime, computes an ecosystem-wide speed score or issues a readiness verdict; the Brain's profiling conductor (`triage`) is the only judge. | | **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. | @@ -98,7 +99,7 @@ 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. Three capabilities have earned +owning state or effects no existing organ can. Four 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 @@ -109,7 +110,13 @@ the Mind. Seeing what the software shows is the **Eyes** (PyAutoEyes): it owns the cross-project instance registry, manifest read contract and dashboard. Each visualization project retains its render harness, figures and generated manifest; the organ reads those manifests and links to the figures. The -Brain's Eyes conductor owns review and judgment. A dashboard alone does not +Brain's Eyes conductor owns review and judgment. Feeling how fast the software +runs is the **Pulse** (PyAutoPulse), the fourth: the same layering over the +`_profiling` project repos — it owns the profiling instance registry, the +versioned `profiling-summary` read contract, the ingest receipts and the +cross-project board, while each profiling project keeps its producers, results +and drift policy and the Brain's profiling conductor stays the only judge. A +dashboard alone does not waive the state-or-effects requirement for a new organ. 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 653d1fac..cfadd041 100644 --- a/README.md +++ b/README.md @@ -79,10 +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 nine organs the Brain coordinates — Brain (reasoning), Mind (intent), +The ten organs the Brain coordinates — Brain (reasoning), Mind (intent), Cortex (learning what is true), Memory (knowledge), Eyes (seeing the -figures), Heart (health), Hands (release), Nerves (configuration), Gut -(shedding) — +figures), Heart (health), Hands (release), Pulse (feeling how fast it runs), +Nerves (configuration), Gut (shedding) — are defined once in [ORGANISM.md](ORGANISM.md), which this repo hosts. Agent contracts and the generated command table are in diff --git a/agents/_pyauto_root.py b/agents/_pyauto_root.py index a4bb40b0..5a627849 100644 --- a/agents/_pyauto_root.py +++ b/agents/_pyauto_root.py @@ -64,6 +64,7 @@ "PyAutoEyes", "PyAutoHeart", "PyAutoHands", + "PyAutoPulse", "PyAutoNerves", "PyAutoGut", ) diff --git a/agents/conductors/profiling/AGENTS.md b/agents/conductors/profiling/AGENTS.md index cae00215..c1a5c0e4 100644 --- a/agents/conductors/profiling/AGENTS.md +++ b/agents/conductors/profiling/AGENTS.md @@ -103,6 +103,14 @@ as malformed — only a record missing *some* of its key fields is corruption. loop's cost (unit-test time, `PYAUTO_TEST_MODE` / `PYAUTO_SMALL_DATASETS` scripts, import time) and repo tidiness. Hunting generally-slow functions flagged by integration tests is hygiene's `perf` mode, not profiling's. +- **vs the Pulse** — the **Pulse** organ (PyAutoPulse, `ORGANISM.md`) holds + the cross-project view: the registry of `_profiling` projects, the + versioned `profiling-summary` read contract, ingest receipts and the board. + It validates the exchange contract only and never judges; this conductor + (`triage`) stays the only judge of what a timing or a drift means, with the + human. The projects keep their producers, results, pins and drift policy. + Same split as Heart ↔ vitals and Eyes ↔ the Eyes conductor. (Organ row + born in PyAutoMind#463; its reader and board arrive in phase 2.) - **vs build** — campaigns are not releases; `profile.yml`'s on-release runs stay CI/Build territory. - **release-validation script cost is NOT ours.** The compile axis was diff --git a/bin/_pyauto_root.sh b/bin/_pyauto_root.sh index 9106812a..c5c041c0 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/PyAutoCortex" ] || [ -d "$1/PyAutoMemory" ] \ || [ -d "$1/PyAutoEyes" ] || [ -d "$1/PyAutoHeart" ] || [ -d "$1/PyAutoHands" ] \ - || [ -d "$1/PyAutoNerves" ] || [ -d "$1/PyAutoGut" ] + || [ -d "$1/PyAutoPulse" ] || [ -d "$1/PyAutoNerves" ] || [ -d "$1/PyAutoGut" ] } # Assigns PYAUTO_ROOT and PYAUTO_ROOT_REASON rather than printing: one diff --git a/bin/clean_slate.sh b/bin/clean_slate.sh index 891cbed4..822adae2 100755 --- a/bin/clean_slate.sh +++ b/bin/clean_slate.sh @@ -82,7 +82,10 @@ PACKAGING_REPOS=(PyAutoNerves PyAutoFit PyAutoArray PyAutoGalaxy PyAutoLens) # lens hst imaging is a byte-identical copy of autolens_profiling's) and their # PNG renders are the tracked record (re-rendered on library release only) — # never wiped. The Eyes organ (organs/PyAutoEyes) is the cross-project dashboard -# over such project repos and holds no datasets of its own to wipe. +# over such project repos and holds no datasets of its own to wipe. The Pulse +# organ (organs/PyAutoPulse) is likewise the cross-project profiling dashboard +# over the _profiling project repos: it reads their summaries and holds no +# datasets of its own to wipe. 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 444556ec..62689cb4 100644 --- a/docs/concepts/organism.md +++ b/docs/concepts/organism.md @@ -16,6 +16,7 @@ it and adds the framework/instance distinction an adopter needs. | **Eyes** | PyAutoEyes | *Sees* — the cross-project visualization registry, manifest read contract and dashboard. Project repos render and hold figures; Eyes links to them. The Brain's Eyes conductor handles judgment. | | **Heart** | PyAutoHeart | Decides whether the organism is *healthy*. `pyauto-heart readiness` is the authoritative GREEN/YELLOW/RED release gate. An observer: never writes into other repos, never triggers a build. | | **Hands** | PyAutoHands | *Does* — packaging, tagging, notebook generation, PyPI releases. A pure executor: never re-derives a gate decision. | +| **Pulse** | PyAutoPulse | *Feels* — the cross-project profiling registry, the versioned `profiling-summary` read contract, ingest receipts and dashboard. Project repos produce and hold timings; Pulse validates the exchange and links to them. The Brain's profiling conductor handles judgment. | | **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. | @@ -34,8 +35,9 @@ is the container, and a workspace is one familiar kind of project. These roles do not replace the {doc}`repository categories <../satellites>` or change their workflow and release gates. Profiling, inference and visualization -repos illustrate the project role; Eyes provides an existing cross-project -organ view. The project-to-organ boundary is described in {doc}`../organs/eyes`. +repos illustrate the project role; Eyes and Pulse provide cross-project organ +views over the visualization and profiling projects. The project-to-organ +boundary is described in {doc}`../organs/eyes` and {doc}`../organs/pulse`. ## The call chain @@ -57,10 +59,10 @@ 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, Eyes, Gut.** Committed state, - ledgers, knowledge, visualization registries and shed material. These are - *inherently yours*: an adopter never forks the upstream Mind, Cortex, Memory, - Eyes or Gut content, they create their own repos with the same documented +- **Instance organs — Mind, Cortex, Memory, Eyes, Pulse, Gut.** Committed + state, ledgers, knowledge, visualization and profiling registries and shed + material. These are *inherently yours*: an adopter never forks the upstream + Mind, Cortex, Memory, Eyes, Pulse or Gut content, they create their own repos with the same documented shape. One more principle worth knowing before you read anything else: diff --git a/docs/index.md b/docs/index.md index b2fcffac..7b504659 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 nine git repositories — Brain, Mind, Cortex, Memory, -Eyes, Heart, Hands, Nerves, Gut — through which you lead a multi-repo project in +development: a set of ten git repositories — Brain, Mind, Cortex, Memory, +Eyes, Heart, Hands, Pulse, Nerves, Gut — 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/eyes organs/heart organs/build +organs/pulse organs/gut ``` diff --git a/docs/organs/pulse.md b/docs/organs/pulse.md new file mode 100644 index 00000000..14c559ea --- /dev/null +++ b/docs/organs/pulse.md @@ -0,0 +1,78 @@ +# Pulse — PyAutoPulse + +**What it owns:** the **cross-project profiling view** over the +`_profiling` project repos (today `autolens_profiling`) — the instance +registry of those repos, the versioned `profiling-summary` read contract they +publish, the ingest receipts (the resolved commit per project per render) and +the board built from them. The project repos produce and hold the timings; the +organ measures nothing and copies no results. The Pulse is the speed mirror of +the Eyes: the Eyes show what the software *shows*; the Pulse feels how fast it +*runs*. + +**Repo:** [PyAutoLabs/PyAutoPulse](https://github.com/PyAutoLabs/PyAutoPulse) + +**Status:** organ row registered (phase 0 of the `profiling-organ-birth` +epic); the registry, reader, receipts, board and workflows arrive in phase 2. +Design: `docs/research/profiling_inference_organs.md` in the Brain repo. + +## The defining function: feeling the pulse + +A pulse is a rate read over time — and the question the organ answers is how +fast each library runs now, and how that has changed from release to release. +Each profiling project times its own likelihoods and searches on fixed data, +pins its baselines and applies its own drift policy; since phase 1, +`autolens_profiling` also publishes a versioned summary +(`dashboard/summary.json`, `profiling-summary` v1, grammar in +`autolens_profiling/dashboard/README.md`). The organ reads those summaries +across projects. It validates the **exchange contract** — envelope, version, +freshness, provenance — and leaves **domain semantics** to the project. + +## Instances + +Each instance is a `_profiling` project repo that publishes a +`profiling-summary`. `autolens_profiling` is the one real producer today. The +organ's instance registry names every instance, where its summary lives and +which contract version it speaks; each render records an ingest receipt so a +board row can always be traced to the commit it was built from. A second +project is registered only when a real producer exists — a fixture tests the +reader, an empty sibling repo is never manufactured to fill the row. + +The board shows one row per registered project with scope, evidence time, last +fetch, coverage and links, and keeps missing or refused evidence visible beside +valid data. A valid empty feed says "no measurements", never "all passed". + +## The driver split + +The project repos *produce and hold* timings and the Pulse *shows* them; +neither judges a cross-project trend. The Brain's **profiling conductor** +(`bin/pyauto-brain profiling`, `/profiling`) plans campaigns, ingests fresh +results and triages drift with the human — `triage` is the only judge. The +same split as **Heart ↔ vitals** and **Eyes ↔ Eyes conductor**: the organ +keeps the state, the conductor reasons over it. + +## What it never does + +- **It never judges a timing.** Drift triage is the conductor's, with the human. +- **It never moves pins** or re-baselines a project's measurements. +- **It never combines unmatched timings** across projects, hardware or + configurations. +- **It never applies the compile threshold to runtime.** The runtime rule + (2x ratio, 1 ms floor) and the compile conductor's 1 s floor stay distinct, + as each source declares them. +- **It computes no ecosystem-wide speed score** and builds no league table + across unrelated tasks. +- **It issues no verdict.** Readiness is the Heart's. + +## For an adopter + +Like Mind, Cortex, Memory, Eyes and Gut, the Pulse is an **instance organ** — +inherently yours. You create your own Pulse registry and dashboard over your +own libraries' profiling project repos. Those projects produce and retain the +measurements; the organ reads their summaries and links to them. + +The organ is being born through the `profiling-organ-birth` epic: + +- **Phase 1** (autolens_profiling#360) published `profiling-summary` v1 from + the lens profiling project. +- **Phase 0** ([PyAutoMind#463](https://github.com/PyAutoLabs/PyAutoMind/issues/463)) + added the organ row to the body map. diff --git a/skills/profiling/profiling.md b/skills/profiling/profiling.md index b18e3c63..3e02b76e 100644 --- a/skills/profiling/profiling.md +++ b/skills/profiling/profiling.md @@ -15,6 +15,12 @@ Shared routing context: `PyAutoBrain/skills/COMMANDS.md`. through the normal dev workflow on `autolens_profiling`, triage routes library regressions to `bug/` via `/intake`. +The cross-project view of profiling results lives in the **Pulse** organ +(PyAutoPulse): its registry, `profiling-summary` read contract, ingest receipts +and board show how fast each `_profiling` project runs, but it never +judges. This command's `triage` is the only judge of what a timing or a drift +means; the projects keep their producers, results, pins and drift policy. + The Profiling Agent **reasons; it never runs sweeps or edits source.** The classification is the result for CPU-unusable cells; full timings for those belong to the A100 rows. diff --git a/tests/test_policy_seams.py b/tests/test_policy_seams.py index 43253be6..83869e3a 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)", + "PyAutoPulse": "organ row born 2026-10-02 (profiling-organ-birth phase 0); " + "phase 2 adds tests/ and the witness row", }