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
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ humans invoke identically, so behaviour isn't re-derived from prose each time.
- **`agents/faculties/memory/`** — *recalls what the organism knows*: given a
topic, returns a **cited digest** (ranked pages + snippets) over
PyAutoMemory's sub-wikis, `autolens_assistant`'s skills/wiki, and Mind's
`complete.md` history. Grep-ranked at query time — no indexes, no layout
`complete/` records. Grep-ranked at query time — no indexes, no layout
coupling, never a page dump; an empty digest is the honest answer. Privacy
seam: PyAutoMemory citations never reach public user-facing output.
- **`agents/faculties/samplers/`** — *the motor faculty*: expertise in how the
Expand Down
2 changes: 1 addition & 1 deletion ORGANISM.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ organs plan, build, test and release it, and you make every judgment call.
| **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. |
| **Memory** | PyAutoMemory | Long-term knowledge — *what the science says* (literature wikis, concepts, bibliographies). Operational history — *what the organism did* — lives in Mind (`complete.md`, issues), not here. |
| **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. |

The scientific libraries (PyAutoConf, PyAutoFit, PyAutoArray, PyAutoGalaxy,
Expand Down
4 changes: 2 additions & 2 deletions agents/conductors/intake/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ schema — light structure over free-form prose.
| **census** | `intake census` | inventory every filed prompt (work-type/target/difficulty/status + hygiene flags); always read-only |
| **dashboard** | `intake dashboard` | render the census as the Mind **backlog** page; `--apply` writes `PyAutoMind/dashboard.md` |
| **formalise** | `intake formalise [prefix]` | retroactively header the prompts census flags — derive the missing fields, insert in place, prose untouched; `--apply` writes |
| **reconcile** | `intake reconcile [prefix]` | rank backlog prompts that look already-shipped (vs `complete.md` / `issued/`); always read-only — retiring stays human |
| **reconcile** | `intake reconcile [prefix]` | rank backlog prompts that look already-shipped (vs the `complete/` records / `active/`); always read-only — retiring stays human |

Census/dashboard are the Mind *backlog* view — deliberately distinct from
Heart's `/health status` health view (see "must never do"). The prompt-taxonomy
Expand All @@ -101,7 +101,7 @@ moves or deletes a file.
Reconcile exists because a prompt's `Status:` header is **not** a completeness
signal — formalise preserves an existing Status verbatim, so shipped work can
still read `Status: planned`. It cross-references each backlog prompt against
`complete.md` (path references + `## header` topic overlap), `issued/`
the `complete/` records (path references + `## header` topic overlap), `active/`
basenames, and hand-set Status values, then ranks suspects (high/medium/low)
with the evidence shown. The final verification — the target repo's git log /
merged PRs — and the retirement itself stay human.
Expand Down
2 changes: 1 addition & 1 deletion agents/conductors/intake/INTAKE_TAXONOMY.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ only under `--apply` and re-runs are no-ops (nothing left missing).
status went stale (a header `Status:` is display metadata — formalise preserves
an existing value verbatim, so `Status: planned` can outlive the work by
months). Per backlog prompt it collects four Mind-local signals — a
`complete.md` line referencing its path (follow-up/restore/parked wording
completion-record line referencing its path (follow-up/restore/parked wording
downgrades it to likely-open), a duplicate basename in `issued/`, token overlap
with a completed task's `## header`, and a hand-set Status — then ranks
suspects high/medium/low with the evidence shown. Always read-only: the final
Expand Down
29 changes: 17 additions & 12 deletions agents/conductors/intake/_intake.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,8 @@ def emit_formalise(res: dict):
"the a an of to in for and or is are be with on by via from into as at it "
"this that use using make add new fix update support get set can we i you "
"our my need should will when once each all its".split())
# Wording in a complete.md reference line that marks the prompt as a deferred
# follow-up (still open) rather than the shipped task itself.
# Wording in a completion-record reference line that marks the prompt as a
# deferred follow-up (still open) rather than the shipped task itself.
_FOLLOWUP_WORDS = ("follow", "restore", "parked", "remain", "blocked", "later",
"next step", "next-step", "deferred")

Expand All @@ -606,23 +606,28 @@ def _tokens(s: str) -> set:
def reconcile(mind: Path, prefix: str = "") -> dict:
"""Rank backlog prompts that look already-shipped, for a human to retire.

Mind-local signals per prompt: a legacy complete.md line referencing its
Mind-local signals per prompt: a completion-record line referencing its
path (follow-up wording downgrades it), a duplicate basename in `active/`
or the `complete/` archive, token overlap with a completed task's header /
archive record, and a hand-set Status the formalise pass deliberately
preserved. Never writes anything.
"""
c = census(mind)
comp = mind / "complete.md"
comp_lines = (comp.read_text(encoding="utf-8", errors="replace").splitlines()
if comp.is_file() else [])
headers = [(ln[3:].strip(), _tokens(ln[3:].replace("-", " ")))
for ln in comp_lines if ln.startswith("## ")]
comp_dir = mind / "complete"
comp_files = ([p for p in comp_dir.rglob("*.md")
if "archive" not in p.parts and p.name != "AGENTS.md"]
if "archive" not in p.parts
and p.name not in ("AGENTS.md", "index.md")]
if comp_dir.is_dir() else [])
comp_names = {p.name for p in comp_files}
# reference lines + `## <slug>` topic headers now live inside the dated
# records (the monolithic complete.md ledger was retired — issue #81)
comp_lines: list = []
for p in comp_files:
comp_lines.extend(
p.read_text(encoding="utf-8", errors="replace").splitlines())
headers = [(ln[3:].strip(), _tokens(ln[3:].replace("-", " ")))
for ln in comp_lines
if ln.startswith("## ") and ln[3:].strip() != "Original prompt"]
headers += [(f"complete/{p.relative_to(comp_dir)}",
_tokens(p.stem.replace("_", " "))) for p in comp_files]
active = mind / "active"
Expand Down Expand Up @@ -664,7 +669,7 @@ def reconcile(mind: Path, prefix: str = "") -> dict:
if best[0] >= 0.40 or len(best[2]) >= 3:
score = best[0]
findings.append(("topic-overlap",
f"complete.md '## {best[1]}' "
f"completion record '{best[1]}' "
f"(shared: {', '.join(sorted(best[2]))})"))

if r["status"] not in ("-", "formalised"):
Expand Down Expand Up @@ -697,8 +702,8 @@ def emit_reconcile(res: dict):
print(f"== Intake reconcile: {len(res['suspects'])} suspect(s) of "
f"{res['scanned']} scanned ==")
if not res["suspects"]:
print(" backlog reconciles clean against the complete/ archive, "
"complete.md and active/.")
print(" backlog reconciles clean against the complete/ records "
"and active/.")
for s in res["suspects"]:
print(f"[{s['confidence']:>6}] {s['path']}")
for f in s["findings"]:
Expand Down
2 changes: 1 addition & 1 deletion agents/conductors/intake/intake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# census flags (word-vomit is intent, not defect);
# --apply writes the headers in place
# intake reconcile [prefix] rank backlog prompts that look already-shipped
# (vs complete.md / issued/); always read-only —
# (vs the complete/ records / active/); always read-only —
# retiring a prompt stays human
#
# Flags (place before the subcommand; both default OFF):
Expand Down
8 changes: 4 additions & 4 deletions agents/faculties/memory/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
> *consult*, not a front door you drive. It *recalls what the organism knows*:
> given a topic or question, it returns a **cited digest** — pointers into
> PyAutoMemory's sub-wikis, `autolens_assistant`'s skills/wiki pages, and
> Mind's operational history (`complete.md`) with matching snippets — and
> Mind's operational history (the `complete/` records) with matching snippets — and
> stops. It never dispatches, never mutates, never bulk-loads a wiki into
> context.

Expand All @@ -23,16 +23,16 @@ synthesises. The digest is pointers + evidence, never wholesale content:
memory.sh "delaunay regularization prior work"
-> ranked pages (path · hit count · 1-2 matching snippet lines each)
across: PyAutoMemory/<sub-wiki>/ · autolens_assistant/{skills,wiki}/ ·
PyAutoMind/complete.md sections
PyAutoMind/complete/ records
```

- **No indexes, no embeddings, no new infra** — grep + the wikis' own
structure, the same as a careful human session, kept deterministic.
- **No layout coupling** — sub-wikis are discovered at query time
(`*_wiki/` directories); when Memory grows a wiki, the faculty sees it with
no edits (the standing "do not couple to Memory's internal layout" rule).
- Operational history stays Mind's: `complete.md` is *read* here as a recall
surface, but the boundary prose in ORGANISM.md is unchanged.
- Operational history stays Mind's: the `complete/` records are *read* here as
a recall surface, but the boundary prose in ORGANISM.md is unchanged.

## Privacy seam (hard rule)

Expand Down
14 changes: 11 additions & 3 deletions agents/faculties/memory/_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

The **memory faculty** is a read-only opinion sink: given a topic/question, it
greps the organism's knowledge surfaces — PyAutoMemory's sub-wikis,
autolens_assistant's skills/wiki pages, and Mind's complete.md history — and
autolens_assistant's skills/wiki pages, and Mind's complete/ records — and
returns a **cited digest**: ranked pages with matching snippets. The consulting
agent reads only the listed pages and synthesises; this script never dumps
content, never writes, and builds no index.
Expand Down Expand Up @@ -41,8 +41,16 @@ def surfaces(memory: Path | None, assistant: Path | None, mind: Path | None):
if root.is_dir():
for f in root.rglob("*.md"):
yield f"autolens_assistant/{sub}", assistant.parent, f
if mind and (mind / "complete.md").is_file():
yield "PyAutoMind/complete.md", mind.parent, mind / "complete.md"
comp = mind / "complete" if mind else None
if comp and comp.is_dir():
# the dated records are Mind's completion history (complete.md retired,
# issue #81); archive/ holds non-record material, index/AGENTS are meta
for f in comp.rglob("*.md"):
if f.name in ("index.md", "AGENTS.md"):
continue
if "archive" in f.relative_to(comp).parts:
continue
yield "PyAutoMind/complete", mind.parent, f


def score_file(f: Path, terms: list[str]):
Expand Down
2 changes: 1 addition & 1 deletion agents/faculties/memory/memory.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# read-only reasoning capability). It recalls what the organism knows.
#
# Greps the knowledge surfaces — PyAutoMemory sub-wikis, autolens_assistant
# skills/wiki, PyAutoMind complete.md — and emits a cited digest (ranked pages
# skills/wiki, PyAutoMind complete/ records — and emits a cited digest (ranked pages
# + matching snippets). The consulting agent reads only the listed pages and
# synthesises. Read-only: never writes, never dumps whole pages, never invents
# context when the surfaces are empty. Privacy seam: PyAutoMemory citations
Expand Down
6 changes: 3 additions & 3 deletions docs/concepts/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ idea → prompt file → issue → worktree → PR(s) → merge →
4. **`ship_*`** gates the finish: test suites, the review faculty, and the
Heart readiness verdict. GREEN ships; YELLOW needs an explicit human
acknowledgement; RED stops. One PR per repo, always.
5. **Merge is always human.** After merge, the task entry moves from
`active.md` to `complete.md` — the organism's operational history.
5. **Merge is always human.** After merge, the task leaves `active.md` and a
dated `complete/` record is written — the organism's operational history.

The registry files (`active.md`, `planned.md`, `complete.md`) are shared
The registry files (`active.md`, `planned.md`, the `complete/` records) are shared
state in the Mind repo, so any machine or session — laptop, web, CI — can
read the current picture and resume an in-flight task with no handoff
ceremony.
Expand Down
2 changes: 1 addition & 1 deletion docs/example.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Development touched PyAutoArray and PyAutoGalaxy; the ship gate ran both
test suites, the review faculty, and Heart's verdict; one PR landed per
repo; the workspaces then gained a demonstration script in a follow-up
workspace task. The registry recorded every state transition, and the task
retired to `complete.md`.
retired to its dated `complete/` record.

That is the whole pitch: the input was a paragraph of intent, and every
step from there — planning, isolation, testing, gating, releasing,
Expand Down
2 changes: 1 addition & 1 deletion docs/organs/memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Memory is **pull-only, on demand**. No agent loads it automatically; the
Brain's memory faculty consults it when a task is scientific, returning a
cited digest (pages + snippets) rather than bulk content. Operational
history — what the organism *did* — deliberately lives in the Mind
(`complete.md`, issues), not here: Memory is what the domain says, Mind is
(the `complete/` records, issues), not here: Memory is what the domain says, Mind is
what the organism did.

## The pieces
Expand Down
4 changes: 2 additions & 2 deletions docs/organs/mind.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**What it owns:** intent and workflow state. Every task starts here as a
plain-English markdown prompt; the registry files track what is in flight
(`active.md`), queued (`planned.md`) and done (`complete.md`); and
(`active.md`), queued (`planned.md`) and done (the dated `complete/` records); and
`repos.yaml` — the **body map** — is the single source of repo identity for
the whole organism.

Expand All @@ -18,7 +18,7 @@ the whole organism.
repo or domain. Prompts are free-form prose; an optional light header
(`Type:` / `Difficulty:` / `Autonomy:` / `Priority:`) gives both humans
and the Brain a glance-level summary.
- **The registry** (`active.md` / `planned.md` / `complete.md`) is the
- **The registry** (`active.md` / `planned.md` / the `complete/` records) is the
shared task state — worktree claims, issue links, status, resume notes.
It is what makes the workflow machine-independent.
- **The body map** (`repos.yaml`) declares every repo's GitHub home,
Expand Down
15 changes: 8 additions & 7 deletions skills/WORKFLOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ the individual skill files can stay short.
The organs and boundaries are defined once in
[`../ORGANISM.md`](../ORGANISM.md). What the workflow skills need to know on
top of that: Mind owns the workflow **state** (`active.md` / `planned.md` /
`complete.md`, the prompt taxonomy), and Build owns **no dev-workflow skills**
the `complete/` records, the prompt taxonomy), and Build owns **no dev-workflow skills**
— it is the release/packaging executor only.

A workflow skill reasons through **Brain**, gates ship through **Heart**, records
Expand Down Expand Up @@ -97,7 +97,7 @@ execution tier — no manual model toggling.
(`start_library`/`start_workspace`), release triage (`review_release`);
identifying affected repos, drafting the commit message and full PR body
(`## API Changes` / `## Scripts Changed`), workspace-impact analysis, the
library-first merge gate, the merge decision, `active.md` / `complete.md`
library-first merge gate, the merge decision, `active.md` / completion-record
updates, and final issue comments. In `pre_build`: validating clean `main`,
asking for the minor version, printing the summary.

Expand Down Expand Up @@ -202,13 +202,14 @@ shared task state, so any environment reads it and continues an in-flight task.
Workflow skills read and write Mind state via **workspace-root-relative** paths
that resolve from any sibling repo:

- `PyAutoMind/active.md`, `PyAutoMind/planned.md`, `PyAutoMind/complete.md` (ledgers)
- Prompt **files** advance `draft/ → active/ → complete/<YYYY>/<MM>/` in lockstep
with the ledgers; `PyAutoMind/scripts/lifecycle.py` owns the moves (`move`) and
drift-checks them (`check`). See `PyAutoMind/complete/AGENTS.md` (issue #71).
- `PyAutoMind/active.md`, `PyAutoMind/planned.md` (live ledgers)
- Prompt **files** advance `draft/ → active/ → complete/<YYYY>/<MM>/`; the dated
record IS the completion ledger (`complete.md` retired 2026-07-16, issue #81).
`PyAutoMind/scripts/lifecycle.py` owns the writes (`record`, `move`) and
drift-checks them (`check`). See `PyAutoMind/complete/AGENTS.md` (issues #71/#81).
- `source PyAutoMind/scripts/prompt_sync.sh` → `prompt_sync_push "<msg>"` (commit+push registry)

`active.md` task schema, `complete.md` schema, and the prompt taxonomy
`active.md` task schema, the completion-record schema, and the prompt taxonomy
(`draft/feature/<target>/`, `draft/bug/<target>/`, …) are documented in
`PyAutoMind/README.md`. **Under `draft/`, the first folder is the work type, the
second is the target repo/domain.**
Expand Down
2 changes: 1 addition & 1 deletion skills/health/health.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Shared routing context: `PyAutoBrain/skills/COMMANDS.md`.
|------------|--------------|---------------|
| `/health` | The Brain **Health conductor** loop with you: assess (vitals → Heart) → triage → dispatch a validation leg → re-judge, until GREEN. | `bin/pyauto-brain health` |
| `/health check` | One-shot **green-light sweep**: sync each repo's `main`, run library pytest + workspace smoke, report a pass/fail matrix. | `PyAutoHeart/skills/health_sweep/reference.md` |
| `/health status` | **Active-work dashboard**: what's in flight across the repos (reads `active.md` / `planned.md` / `complete.md`), conflicts, idle repos. | `PyAutoHeart/skills/pyauto-status/reference.md` |
| `/health status` | **Active-work dashboard**: what's in flight across the repos (reads `active.md` / `planned.md` / the `complete/` records), conflicts, idle repos. | `PyAutoHeart/skills/pyauto-status/reference.md` |
| `/health full` | **Release-run dashboard**: what the last PyAutoBuild release-prep run produced (per-workspace pass/fail/timing, slowest scripts, failure tracebacks). | `PyAutoHeart/skills/pyauto-status-full/reference.md` |
| `/health worktrees` | **Worktree/task dashboard**: every task worktree under `~/Code/PyAutoLabs-wt/`, cross-referenced with `active.md` — which parallel tasks are in flight and which repos each holds. | `PyAutoHeart/skills/worktree_status/reference.md` |

Expand Down
2 changes: 1 addition & 1 deletion skills/intake/intake.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dev workflow (issue, branch, plan). Do not bypass the Brain.
(then regenerate the dashboard).
- `bin/pyauto-brain intake reconcile [prefix]` — ranks backlog (`draft/`)
prompts that look already-shipped (cross-referenced against the `complete/`
archiveor the legacy `complete.md` until retired — and `active/`; a stale
records — the sole completion ledger since `complete.md` retired, #81 — and `active/`; a stale
hand-set `Status:` is a signal, never proof). Always read-only: verify each
suspect against the target repo's git log / merged PRs, then retire it to the
`complete/` archive by hand (it is already done).
Expand Down
Loading
Loading