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
3 changes: 1 addition & 2 deletions ORGANISM.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ human types); let faculties multiply behind them.
## Growth rule: no new organs by default

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
script), not as a repo. A new organ costs an `AGENTS.md`, install wiring, a body-map row and boundary prose — it must earn that by
owning state or effects no existing organ can. Five capabilities have earned
organ status that way. Configuration/signalling is the **Nerves**
(PyAutoNerves), the base config/serialization layer every library imports — new
Expand Down
6 changes: 3 additions & 3 deletions agents/conductors/build/BUILD_CAPABILITIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This audit records the execution surface the PyAutoBrain Build Agent reasons over
and **calls**. The agent must treat every item here as a PyAutoHands capability,
not as logic to reimplement inside Brain. Source of truth: the `autohands`
dispatcher (`PyAutoHands/bin/autohands`) and `PyAutoHands/CLAUDE.md`.
dispatcher (`PyAutoHands/bin/autohands`) and `PyAutoHands/AGENTS.md`.

## Execution capabilities (the Build Agent calls these)

Expand Down Expand Up @@ -51,8 +51,8 @@ per-workspace `config/build/{no_run,profile_smoke,visualise_notebooks}.yaml`.
## Boundary audit — execution vs. health

PyAutoHands is meant to be a **pure executor**: it runs no readiness checks of
its own. Confirmed against `PyAutoHands/CLAUDE.md` ("PyAutoHands is the executor
… it runs **no** release-readiness checks of its own").
its own. Confirmed against `PyAutoHands/AGENTS.md` ("PyAutoHands is the **executor**
… It runs no release-readiness checks of its own").

It does, however, still expose **health-shim commands** that delegate to the
health authority (PyAutoHeart):
Expand Down
8 changes: 6 additions & 2 deletions agents/conductors/clone/_clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

# Framework/infrastructure shared by every assistant, regardless of domain.
_SHARED_GENERIC = [
"AGENTS.md", "CLAUDE.md", "LICENSE", ".gitignore", ".gitattributes",
"AGENTS.md", "LICENSE", ".gitignore", ".gitattributes",
"Makefile", "__init__.py", "activate.sh", "version.txt",
"AI_POLICY.md", "CITATIONS.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md",
# (No chat-mode counterpart of AGENTS.md and no generated chat bundles: the
Expand All @@ -93,7 +93,11 @@
# but the file and its schema are framework
".github/*", # wiki-currency / citation workflows
"wiki/README.md", "wiki/project/*", # project wiki rules + profile template
"scripts/AGENTS.md", "scripts/CLAUDE.md", "scripts/README.md",
"scripts/AGENTS.md", "scripts/README.md",
# Legacy per-tool pointer files, still present in older references until
# they are retired (harnesses now read AGENTS.md natively). Matched only
# when present, so their absence is harmless.
"CLAUDE.md", "scripts/CLAUDE.md",
# Harness mirrors of the generic machinery (.claude/, .codex/, .gemini/):
".claude/hooks/*", ".claude/settings.json", ".codex/hooks.json", ".gemini/*",
".claude/skills/_*", ".claude/skills/start-new-project*",
Expand Down
3 changes: 1 addition & 2 deletions agents/faculties/memory/_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ def surfaces(memory: Path | None, assistant: Path | None, mind: Path | None):
# queue, the bibliography workflow, and the wiki schema. Without
# these the front door PyAutoMemory/AGENTS.md points every agent at
# ("index first") was invisible to this faculty (PyAutoBrain#239).
schema = "wiki/AGENTS.md" if (memory / "wiki/AGENTS.md").is_file() else "wiki/CLAUDE.md"
for rel in ("index.md", "reading-queue.md",
"bibliography/README.md", schema):
"bibliography/README.md", "wiki/AGENTS.md"):
f = memory / rel
if f.is_file():
yield "PyAutoMemory/root", memory, f
Expand Down
2 changes: 1 addition & 1 deletion agents/faculties/vitals/HEART_CAPABILITIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ reimplement inside Brain.
`worktree_drift.sh`, `script_timing.py`, `test_run.py`, `version_skew.py`.
- Config: `config/repos.yaml`, including thresholds and `noise_globs`.
- Tests: `tests/`, expected to run quickly with stdlib + PyYAML only.
- Docs / agent guidance: `README.md`, `AGENTS.md`, `CLAUDE.md`.
- Docs / agent guidance: `README.md`, `AGENTS.md`.

## PyAutoHands delegation audit

Expand Down
5 changes: 5 additions & 0 deletions bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
# bash PyAutoBrain/bin/install.sh --write-workspace-policy # refresh root AGENTS.md delegation block
# bash PyAutoBrain/bin/install.sh --check-workspace-policy # drift-check that block
#
# The workspace-policy block (policy/workspace_model_delegation.md) is the one
# versioned home for workspace-wide delegation and slash-command notes; every
# harness reads the root AGENTS.md natively, so no per-tool instruction file
# carries a copy.
#
# The command-surface modes are the agent-agnostic half of command discovery:
# per-tool symlinks (above) are absent in cloud/web sessions, which load only
# committed repo files — so the verb → purpose → `bin/pyauto-brain <verb>` index
Expand Down
3 changes: 2 additions & 1 deletion bin/regroup_workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ def plan(root, state, bundles_root=None, manifest_root=None):
# These are local, workspace-owned paths, not versioned source or shell RCs.
config_paths = list((root / '.idea').glob('*.xml')) + list((root / '.idea').glob('*.iml'))
config_paths += [root / '.claude/settings.json', root / '.codex/hooks.json',
root / 'AGENTS.md', root / 'CLAUDE.md']
root / 'AGENTS.md',
root / 'CLAUDE.md'] # legacy pointer; skipped when absent
for path in config_paths:
if not path.is_file() or path.is_symlink():
continue
Expand Down
8 changes: 4 additions & 4 deletions docs/agent_harness_smoke.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ of every scientific workflow or every agent product.

## Shared instructions and adapters

`AGENTS.md` holds shared policy, including nested folder instructions.
`CLAUDE.md` imports the sibling file. Public assistant skills retain their flat
`AGENTS.md` holds shared policy, including nested folder instructions, and
every supported harness reads it natively. Public assistant skills retain their flat
canonical Markdown; workspace skills live at `skills/<name>/SKILL.md`.
Generated Claude links and Codex adapters refer to these same bodies. Canonical
instructions retain the full skill description when the discovery description
Expand Down Expand Up @@ -74,8 +74,8 @@ read the shared workflow instructions and ran `bin/pyauto-brain help` successful
and compatibility with older checkouts.
- Memory board suite: 62 tests passed with `PYAUTO_BRAIN` unset for its isolated
workspace-resolution fixture; structure and wikilink validation passed.
- Eight nested instruction migrations preserve their original bodies except
references updated from `CLAUDE.md` to `AGENTS.md`.
- Eight nested instruction migrations preserve their original bodies, moved
into `AGENTS.md`.

The hook fixtures exercise the shared scripts and adapter generation; they do
not prove that a user's installed session has trusted or invoked project hooks.
Expand Down
23 changes: 15 additions & 8 deletions policy/workspace_model_delegation.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
<!-- pyauto:model-delegation:begin -->
- **Choose delegation by provider.** Anthropic preserves its execution-tier
policy: Fable → Opus, Opus → Opus, with Sonnet only for the documented
mechanical floor. OpenAI executes routine sequential work directly and uses
Sol workers selectively for independent parallel work, substantial noisy work
needing separate context, or independent review. Duration alone is not a
reason to spawn. Brain roles are not automatic LLM spawns. State the
session model before the first delegation decision. Full policy:
`skills/MODEL_DELEGATION.md` in the resolved Brain checkout.
- **Choose delegation by provider — every task, not only start_dev.** State
the session model in the opening line. Anthropic sessions keep judgment
in-session and delegate execution: Fable is the architect and sends all
edits, tests, prose and ship phases to Opus; Opus → Opus; Sonnet only for
the fixed ship_* step 4 / pre_build step 2 recipes (unsure → Opus).
Delegate beyond a few lines of edits or a couple of file reads; stay
in-session for loaded-context answers, few-line edits in files already read
and user conversations. Long delegations write a progress file the main
session monitors. OpenAI executes routine sequential work directly; Sol
workers only for independent parallel work, substantial noisy work or
independent review. Duration alone is not a reason to spawn; Brain roles
are not automatic LLM spawns. Workflow steps are installed skills
(`/start_dev`, `/ship_library`…, via `bin/install.sh`). Full policy and
heartbeat: "Bounded worker contract" in `skills/MODEL_DELEGATION.md` of the
resolved Brain checkout.
<!-- pyauto:model-delegation:end -->
19 changes: 10 additions & 9 deletions skills/MODEL_DELEGATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,16 @@ The receiving environment resumes the existing branch; it does not create a
second task or lifecycle. The orchestrator consumes the returned evidence and
continues the same Brain → review/vitals → Heart → PR flow.

**Independent review is a separate capability.** A conversation that authored
the branch cannot satisfy the independent-review leg by rereading its own diff.
If no independent worker/reviewer is available in the current surface, hand off
only the review phase or require human review.

**No OpenAI API fallback.** An ordinary ChatGPT orchestration route must never
turn a missing worker/runtime into an OpenAI SDK, Responses API,
`OPENAI_API_KEY`, browser/session automation or other separately billed API
call. Use an explicitly chosen supported execution surface or stop at the
**Independent review is a separate capability** — when it is required and how
to supply it: [`WORKFLOW.md`](WORKFLOW.md) (execution-environment section).

**No OpenAI API fallback.** An ordinary ChatGPT orchestration route has no API
billing path: never turn a missing worker/runtime into an OpenAI SDK,
Responses API, API Platform key, `OPENAI_API_KEY`, browser/session credential
reuse, a local Brain process that programmatically starts a ChatGPT
conversation, or any other separately billed call — regardless of the user's
API billing settings. Use an explicitly chosen supported execution surface
(existing GitHub Actions, Codex/Work, local shell or HPC) or stop at the
missing phase.

## Bounded worker contract
Expand Down
26 changes: 4 additions & 22 deletions skills/WORKFLOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ cannot self-certify the review faculty's independence. That requirement is
path-specific — notably the review-faculty leg of the `--auto`
autonomous-ship gate and the independent-adversary cases defined by
`AUTONOMY.md` — not a universal prerequisite for an ordinary human-approved
merge. Delegate only the review phase when the active path actually requires
it.
merge. When the active path actually requires it, delegate only the review
phase, or require human review if no independent reviewer is available.

**Heart remains separate from CI.** Exact-head CI can satisfy applicable test or
smoke evidence; it never substitutes for the authoritative Heart verdict. If the
Expand All @@ -89,29 +89,11 @@ for a task that genuinely needs local data/output/SSH resources. It is not the
name of the orchestrating product and must not grow a `chatgpt`, `codex` or
`claude` value.

### No OpenAI API fallback

The ordinary-Chat route has **no API billing path**. Never use an OpenAI SDK,
Responses API, API Platform key, `OPENAI_API_KEY`, browser/session credential
reuse, or a local Brain process that programmatically starts a ChatGPT
conversation as a fallback. If the current Chat lacks a capability, use only an
explicitly selected supported execution surface (for example existing GitHub
Actions, Codex/Work, local shell or HPC) or stop at that phase. This invariant
does not depend on the user's API billing settings.
**No OpenAI API fallback** — see [`MODEL_DELEGATION.md`](MODEL_DELEGATION.md).

## Model delegation

Provider policies are intentionally asymmetric. Anthropic retains mandatory
execution delegation: Fable → Opus and Opus → Opus, with Sonnet only for the
documented mechanical floor. OpenAI performs routine sequential edits, tests,
and git steps inline; use Sol workers selectively for independent parallel
work, substantial noisy execution or independent progress, and independent
review. Wall-clock duration alone does not force a worker. A Brain role or faculty
consultation does not itself require a new LLM worker.

Read [`MODEL_DELEGATION.md`](MODEL_DELEGATION.md) before assigning a worker. It
contains the preserved Anthropic heartbeat, mechanical, tutorial, bundle, and
Cortex rules plus the bounded worker contract.
Read [`MODEL_DELEGATION.md`](MODEL_DELEGATION.md) before assigning a worker.

## Memory and planning

Expand Down
2 changes: 1 addition & 1 deletion skills/batch/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: batch
description: Compose the next unattended batch through the PyAutoBrain Batch Agent — the BatchDecision, planned against the slot's review-minute budget rather than a task count, with backpressure, lane detection and the one-member-per-library-repo rule. Use when picking what to run in a shift, or asking what fits in a review slot. It proposes; approving it in the slot is what launches a batch.
description: Compose the next unattended batch via the Batch Agent — a BatchDecision planned against the slot's review-minute budget, with backpressure and lane rules. Use when picking what to run in a shift or what fits in a review slot. It only proposes.
---

# Batch
Expand Down
2 changes: 1 addition & 1 deletion skills/board/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: board
description: Read the PyAutoBrain operational board — the organism's morning surface (overnight runs, readiness, community, resume, upkeep). Links the published Pages board or relays `pyauto-brain board`'s live digest; read-only — every action routes through the door the board's chips name. Use for a morning status glance or when asked what needs attention.
description: Read the PyAutoBrain operational board — the morning surface (overnight runs, readiness, community, resume, upkeep) — via the Pages board or `pyauto-brain board`; read-only. Use for a morning status glance or when asked what needs attention.
---

# Board
Expand Down
2 changes: 1 addition & 1 deletion skills/ci_speedup/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: ci-speedup
description: Pick the slowest parts of CI off the PyAutoHeart board — smoke scripts, unit tests, workflow gates — name why each is slow, and drive the speed-up through the dev flow (a smoke-profile override, an in-script reduction, a cache or CI change), re-timing under the smoke profile before it ships. Use for "why is CI slow", "speed up the smoke tests", or the periodic CI-cost sweep; never for modelling speed (that is /profiling).
description: Find the slowest CI parts on the PyAutoHeart board (smoke scripts, unit tests, workflow gates), and drive speed-ups through the dev flow. Use for "why is CI slow", "speed up the smoke tests", or the CI-cost sweep; never modelling speed (/profiling).
---

# CI speed-up
Expand Down
2 changes: 1 addition & 1 deletion skills/community/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: community
description: Hear and answer the PyAuto community through the PyAutoBrain Community Agent — scan the Discussions hub and every repo for user threads awaiting a response, triage one discussion or issue's context sufficiency, then draft human-approved replies and route actionable work via start_dev_for_user. Use when responding to external users' GitHub discussions or issues, or checking what the community is waiting on.
description: Hear and answer the PyAuto community via the Community Agent — scan Discussions and all repos for threads awaiting a reply, triage, draft human-approved replies, route work via start_dev_for_user. Use for external users' GitHub discussions or issues.
---

# Community
Expand Down
2 changes: 1 addition & 1 deletion skills/cortex/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: cortex
description: Check in on the science — run the PyAutoBrain Cortex Agent's two doors ('cortex pull' on the laptop, which pulls every active project through its own sync CLI and shows where each run stands; 'cortex checkin' anywhere, which stamps, re-renders and pushes the board) and read each project's ledger back to the human — Now, the runs, the last entries — then record what they say with the Cortex's own cortex.py verbs. Use for science runs and project ledgers; never for development tasks, which are the Mind's.
description: Check in on the science via the Cortex Agent — 'cortex pull' on the laptop (pull each project's runs) and 'cortex checkin' anywhere (stamp, re-render, push the board) — and read ledgers back. Use for science runs and ledgers; never dev tasks.
---

# Cortex
Expand Down
2 changes: 1 addition & 1 deletion skills/eyes/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: eyes
description: Run the visualization review loop through the PyAutoBrain Eyes Agent — survey a visualization workspace's figure surface, render via its gallery harness, review figures with the human, and route accepted critiques to intake/start_dev. Use when the user wants to look at, judge, or update the organism's plots and figures.
description: Run the visualization review loop via the Eyes Agent — survey a figure surface, render via its gallery harness, review figures with the human, route critiques to intake/start_dev. Use to look at, judge or update the organism's plots and figures.
---

# Eyes
Expand Down
2 changes: 1 addition & 1 deletion skills/feedback/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: feedback
description: Draft user-reviewed feedback about using PyAutoLabs software and assistants, including goals, successes, friction and evidence. Use when a user asks to share feedback, summarize their experience for maintainers, or prepare an agent-assisted retrospective. Produces a draft for the existing Discussions hub; never posts it.
description: Draft user-reviewed feedback on using PyAutoLabs software and assistants (goals, successes, friction, evidence). Use to share feedback, summarize experience for maintainers, or prepare an agent-assisted retrospective. Drafts only; never posts.
---

# Feedback
Expand Down
2 changes: 1 addition & 1 deletion skills/hygiene/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: hygiene
description: Audit and prioritise the organism's code-quality upkeep — slow tests/scripts/imports, CLI noise, dependency-cap drift, stale API docs, adjacent workspace documentation blocks, git debris, and generated packaging debris — through the PyAutoBrain Hygiene Agent, which reasons and delegates fixes without editing source itself.
description: Audit and prioritise code-quality upkeep — slow tests/scripts/imports, CLI noise, dependency-cap drift, stale API docs, workspace doc blocks, git and packaging debris — via the Hygiene Agent, which delegates fixes and edits no source itself.
---

# Hygiene
Expand Down
2 changes: 1 addition & 1 deletion skills/intake/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: intake
description: Turn raw PyAutoLabs ideas, bug reports, or loose requirements into classified and sized PyAutoMind prompt files through the PyAutoBrain Intake Agent, regenerating the Mind dashboard in the same commit. Also the door for flagging already-shipped work for human review (Type: human review), which is only ever filed when explicitly asked for. Use before start-dev when intent is not yet formalized.
description: Turn raw PyAutoLabs ideas, bug reports or loose requirements into classified, sized PyAutoMind prompt files via the Intake Agent; also files a human review of shipped work, only when asked. Use before start-dev when intent is not formalized.
---

# Intake
Expand Down
2 changes: 1 addition & 1 deletion skills/issue_cleanup/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: issue-cleanup
description: Reconcile the PyAuto GitHub issue trackers — audit every open issue against the PyAutoMind completion records and merged PRs, bucket them (shipped / weak evidence / deliberately open / in flight / external / unreconciled), then close only what a human confirms. Use for tracker drift, stale issue backlogs, or "are any of these already done?".
description: Reconcile the PyAuto GitHub issue trackers — audit open issues against Mind completion records and merged PRs, bucket them, close only what a human confirms. Use for tracker drift, stale issue backlogs, or "are any of these already done?".
---

# Issue Cleanup
Expand Down
2 changes: 1 addition & 1 deletion skills/repo_cleanup/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ execution-environment model: [`../WORKFLOW.md`](../WORKFLOW.md).
> the recommendation; run this skill to act on it.

**Distinct from:** `/health worktrees` (Heart read-only diagnostic — consulted here,
but this also mutates); post-merge cleanup in `CLAUDE.md` (once per shipped task —
but this also mutates); post-merge cleanup in the ship skill / prm close-out (once per shipped task —
this covers residue when that flow is skipped); the start_dev branch survey
(task start — this is between-tasks hygiene).

Expand Down
Loading
Loading