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
6 changes: 3 additions & 3 deletions agents/conductors/batch/_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def scoped_reach_why(r: dict) -> str:
size = r.get("difficulty") or "unsized"
return (f"not in queue.md and {size}, {len(repos)} repo(s) — beyond queue.md a "
"scoped dip takes only small single-repo tasks; the human queues "
"bigger work (ruling 2026-11-16)")
"bigger work")


#: The idle line for a queued epic with no draft prompt at its next phase.
Expand Down Expand Up @@ -1047,7 +1047,7 @@ def main(argv=None) -> int:
help="plan: a human at the keyboard picks for THIS session — "
"an absent Lane reads as any and an empty queue.md "
"does not stop the backlog dip (default: unattended, "
"both fail closed; AUTONOMY.md M2 rulings)")
"both fail closed; see AUTONOMY.md)")
ap.add_argument("--json", action="store_true", dest="as_json")
# brief / plan
ap.add_argument("--check", default="", metavar="FILE", nargs="?", const=True,
Expand All @@ -1056,7 +1056,7 @@ def main(argv=None) -> int:
"whether the stream is attachable now (no FILE)")
ap.add_argument("--new", default="", metavar="SLOT",
help="brief: print a skeleton shift brief for SLOT (e.g. "
"2026-11-14-am) whose goals: come from goals.md; "
"<YYYY-MM-DD>-am) whose goals: come from goals.md; "
"needs --review-at; --out FILE writes it instead")
# the keep-Heart-green lane: `brief --new` and `green`
ap.add_argument("--green", default="", choices=("",) + _green.MODES,
Expand Down
2 changes: 1 addition & 1 deletion agents/conductors/batch/_digest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ def names(urls):
+ names(bare))
reach = gates.get("scoped_reach") or []
if reach:
out.append(f"Backlog reach (ruling 2026-11-16): {len(reach)} unqueued draft(s) not "
out.append(f"Backlog reach: {len(reach)} unqueued draft(s) not "
"dipped — beyond queue.md only small single-repo tasks: " + names(reach))
# One line per queued epic ledger: what it gave the shift, or why
# nothing. `· ` rather than an indent: an indented line would read as the
Expand Down
4 changes: 2 additions & 2 deletions agents/conductors/batch/_green.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def _pickable(mind: Path, rel: str, lanes: list[str]) -> str:
return "in flight (active/) — another session's task"
p = parse_prompt(mind / rel, mind)
if not p.get("lane"):
return "lane absent or invalid — unattended picks fail closed (M2.3)"
return "lane absent or invalid — unattended picks fail closed"
if p["lane"] not in lanes:
return f"lane {p['lane']} not in the brief's lanes ({' '.join(lanes)})"
level, _s, factors, derived = effective_difficulty(p)
Expand Down Expand Up @@ -500,7 +500,7 @@ def section(res: dict) -> str:
L.append("- nothing")
if any(f["rule"] == "workspace-script" for f in res["findings"]):
L.append("- proposal only: a failing Stage 3 script with a filed bug task "
"may be quarantined (your ruling 2026-11-12) — the lane never does it")
"may be quarantined (a human decision) — the lane never does it")
L += ["", f"Filed: {', '.join(res['filed']) or 'none'} · picked: "
f"{', '.join(res['picks']) or 'none'}"]
return "\n".join(L) + "\n"
6 changes: 3 additions & 3 deletions agents/conductors/batch/_orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def pr_files(self, url: str) -> None:
your proof packet: after a sibling merges, the close-out updates your branch
from main and refuses (leaving it for the human's /prm) on a conflict. A
`worktree_check_conflict` hit that names only a listed sibling's branch slug
is not a conflict (ruling e, 2026-11-19): go on. End at PR-open, as every
is not a conflict: go on. End at PR-open, as every
shift worker does.

"""
Expand Down Expand Up @@ -384,7 +384,7 @@ def after_step(after: list[str] | None = None, before: list[str] | None = None,
from this PR's, which are named and not checked."""
if not (after or before or disjoint):
return ""
out = ["4b. Merge order (M3.6j, PyAutoBrain#683): this shift's earlier PRs on this\n"
out = ["4b. Merge order: this shift's earlier PRs on this\n"
" library merge before this one.\n"]
if before:
out.append(" Refuse with why `<url> still open → merge it first` if any of these\n"
Expand Down Expand Up @@ -1284,7 +1284,7 @@ def land_question(slot: Path, counters: dict, lease: dict, task: str, issue: str
issue`. True when it was queued."""
prompt = lease.get("prompt") or (counters["picks"].get(task) or {}).get("prompt") or ""
why = ("no prompt recorded for the task" if not prompt
else "no shift issue on its lease (spawned before M3.5)" if not issue
else "no shift issue on its lease (spawned by an older orchestrator)" if not issue
else f"issue `{str(issue)[:80]}` is not an https URL"
if not str(issue).startswith("https://") else "")
if why:
Expand Down
18 changes: 9 additions & 9 deletions agents/conductors/clone/_clone.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env python3
"""agents/conductors/clone/_clone.py — core for the Clone (Mitosis) Agent, v0.
"""agents/conductors/clone/_clone.py — core for the Clone (Mitosis) Agent.

analyze (default) is decision only. v1 adds `--apply --mode
lightweight-seed`: the agent writes its generation plan as JSON and hands
execution to PyAutoHands's `clone_seed.py` primitive (repo creation
PRIVATE-first; the newborn's publish gate is Heart's newborn-validation
checklist). The agent itself still writes no repo and no GitHub state — the
mandatory clone-mode question is answered by the human typing `--mode`.
Other modes (exact-clone, differentiated-sibling) are v2 and exit 5.
analyze (default) is decision only. `--apply --mode lightweight-seed` writes
the generation plan as JSON and hands execution to PyAutoHands's
`clone_seed.py` primitive (repo creation PRIVATE-first; the newborn's publish
gate is Heart's newborn-validation checklist). The agent itself writes no repo
and no GitHub state — the mandatory clone-mode question is answered by the
human typing `--mode`. The other modes (exact-clone, differentiated-sibling)
are not implemented and exit 5.

The generic-vs-domain partition is OWNED BY THE REFERENCE ASSISTANT
(`modes/maintainer.md`, "Assistant-as-template") — this agent reads that
Expand Down Expand Up @@ -905,7 +905,7 @@ def main():
if args.apply and args.mode != "lightweight-seed":
fail(5, "--apply requires --mode lightweight-seed (the human-answered "
"clone-mode question); exact-clone / differentiated-sibling "
"are v2 — see agents/conductors/clone/DESIGN.md")
"are not implemented — see agents/conductors/clone/DESIGN.md")

decision = build_decision(args)
if args.json:
Expand Down
4 changes: 1 addition & 3 deletions agents/conductors/clone/check_boundary.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@

This runs the same check at PR time in the reference's own CI, so the author who
adds a file classifies it while they still remember whether it is framework or
science. Three features (the euclid mode, the JOSS paper, the results-inspector
MCP wiring) each landed unclassified and silently blocked every future birth
before this existed.
science.

Usage:
python check_boundary.py <reference-checkout> [--reference <name>]
Expand Down
6 changes: 3 additions & 3 deletions agents/conductors/hygiene/_hygiene_extras.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
``autofit[optional]`` — has to be hand-added to the smoke leg, and nothing
enforces that. The gap is invisible until a nightly smoke run goes red against
a script that passes release validation, and the failure looks like a broken
script rather than a missing install (2026-08-03: ``tfp-nightly``, needed by
the JAX Matern-kernel regularization path, was in ``autoarray[optional]`` only;
two scripts red in smoke, both green in release).
script rather than a missing install: a package declared only in
``autoarray[optional]`` leaves the scripts that need it red in smoke and green
in release.

The remedy is always the install set, never the script: a script that passes
release validation is correct, and parking or skip-guarding it destroys the
Expand Down
4 changes: 1 addition & 3 deletions agents/conductors/hygiene/_hygiene_repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
Why a helper rather than an array in ``hygiene.sh``: a hardcoded repo list
drifts as the organism grows, and the drift is *invisible* — a repo that is
never scanned produces no findings, so the conductor reports a clean bill of
health it has not earned. (It did: five libraries scanned where the map
declared six, four organs of seven, and a CRLF count of 5 against a true 127.)
Deriving the sets means adding a repo to the map adds it to the scan.
health it has not earned. Deriving the sets means adding a repo to the map adds it to the scan.

This file deliberately contains **no repository names**. That is what keeps it
firewall-clean under ``repos_sync.py``'s tenant check, and it is also the
Expand Down
2 changes: 1 addition & 1 deletion agents/conductors/intake/_intake.py
Original file line number Diff line number Diff line change
Expand Up @@ -4345,7 +4345,7 @@ def main(argv=None):
help="comma-separated Themes: keywords, primary first "
"(vocabulary: PyAutoMind/themes.md)")
lane_help = ("declare where the work can run; required when the text has "
"no `Lane:` header and names no resource (M2.3)")
"no `Lane:` header and names no resource")
cl.add_argument("--lane", default="", choices=("",) + LANE_VALUES, help=lane_help)

idp = sub.add_parser("ideas", help="scan ideas.md and propose one prompt per bullet")
Expand Down
4 changes: 2 additions & 2 deletions agents/conductors/profiling/_profiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,8 +864,8 @@ def _classify_drift(row: dict[str, Any], cold: dict[tuple, float]) -> dict[str,
"--xla_gpu_autotune_level=0 not reaching XLA"
),
"action": (
"verify the flag actually reaches XLA first; the 2026-07-15 A/B was "
"invalidated for two months by XLA_FLAGS being clobbered at import"
"verify the flag actually reaches XLA first; an XLA_FLAGS clobbered at "
"import silently invalidates the A/B"
),
}

Expand Down
5 changes: 2 additions & 3 deletions agents/conductors/workspace/_workspace.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#!/usr/bin/env python3
"""agents/conductors/workspace/_workspace.py — core for the Workspace Agent.

The Voice — the organism's expressive function. v0 is DECISION ONLY: it reads
The Voice — the organism's expressive function. It is DECISION ONLY: it reads
intent (raw text or a PyAutoMind prompt file) or a workspace repo's example
catalogue, and emits a WorkspaceDecision / WorkspaceSurvey. It never edits
source, never writes files — authoring is executed by the ordinary
start_dev → start_workspace → ship_workspace flow this decision routes into.

Two audience registers, one agent (the founding assessment:
PyAutoMind active/workspace_examples_agent.md):
Two audience registers, one agent:

workspace reference examples for practitioners (*_workspace repos)
howto narrative teaching for first-time learners (HowTo* repos)
Expand Down
8 changes: 3 additions & 5 deletions bin/lane_backfill.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#!/usr/bin/env python3
"""Propose — and, only when told, write — a `Lane:` for every lane-less draft.

Programme task M1.3, slice 2 (PyAutoBrain#608). `Lane:` was on 12 of ~270
drafts and an absent Lane reads as `any`, so a draft whose Witness needs RAL or
an A100 is planned into a cloud session that cannot run it. Intake has
inferred a lane at filing since 2026-11-03; the older backlog was never
backfilled. This is the one scripted pass.
An absent `Lane:` reads as `any`, so a draft whose Witness needs RAL or an
A100 is planned into a cloud session that cannot run it. Intake infers a lane
when it files a draft; this backfills the drafts filed without one.

lane_backfill.py [--mind DIR] [--all] [--out proposals.md] [--json]
lane_backfill.py --apply [--from proposals.md] [--mind DIR]
Expand Down
3 changes: 1 addition & 2 deletions bin/mind_commit_guard.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@ def check_command(command: str, cwd: str = "") -> str | None:
return (
f"PyAutoMind commit pathspec '{spec}' is a DIRECTORY — "
"directory pathspecs sweep whatever concurrent sessions "
"staged under them (this exact shape hit twice on "
"2026-07-16). List the individual files. Deliberate "
"staged under them. List the individual files. Deliberate "
"exception: prefix PYAUTO_SKIP_MIND_GUARD=1."
)
return None
Expand Down
6 changes: 3 additions & 3 deletions bin/shift_ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
together, and its completion record is held while any of them is set aside.

shift_ledger.py --task T append active.md --text-file entry.md
shift_ledger.py --task T write complete/2026/11/x.md --text-file record.md # creates only
shift_ledger.py --task T write complete/<YYYY>/<MM>/x.md --text-file record.md # creates only
shift_ledger.py --task T edit draft/feature/x/y.md --old-file was.txt --new-file now.txt
shift_ledger.py --task T move draft/feature/x/y.md active/y.md
shift_ledger.py --task T remove active/y.md
shift_ledger.py --task T drop-section active.md my-task
shift_ledger.py --task T set-header draft/x/y.md Verified --text "2026-11-12 abc1234 (Repo)"
shift_ledger.py --task T set-header draft/x/y.md Verified --text "<YYYY-MM-DD> <sha> (<Repo>)"
shift_ledger.py --task T table-append autonomy_log.md "## Calibration runs" --text "| … |"
shift_ledger.py --task T queue-retire queue.md y.md --text "<PR url> → complete/2026/11/y.md (2026-11-14)"
shift_ledger.py --task T queue-retire queue.md y.md --text "<PR url> → complete/<YYYY>/<MM>/y.md (<YYYY-MM-DD>)"

`write` refuses a path that already exists; `edit` replaces `--old`, which must
appear exactly once in the file as it is on Mind origin/main, with `--new`.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_batch_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def test_a_queued_epic_ledger_queues_its_medium_multi_repo_phase():
def test_an_unqueued_epic_member_is_still_held_to_the_reach_ruling():
d = _batch.plan([ledger(), member("draft/feature/lib/p5c.md", 5)],
budget=200, session_lane="local-dev", brief=_brief_of(), queue=["x.md"])
assert "ruling 2026-11-16" in why(d, "draft/feature/lib/p5c.md")
assert "the human queues bigger work" in why(d, "draft/feature/lib/p5c.md")


def test_a_queued_epic_still_offers_only_its_next_phase():
Expand Down
58 changes: 58 additions & 0 deletions tests/test_help_text_no_history.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
"""Tools whose module docstring is their ``--help`` describe what they do.

These modules pass ``description=__doc__`` (or its first line) to argparse, so
their docstring is program output. It says what the tool does, in the present
tense: no dates, milestone tags or issue references from how it came to be.
"""

import re
import subprocess
import sys
from pathlib import Path

import pytest

ROOT = Path(__file__).resolve().parents[1]

TOOLS = [
"agents/_repo_paths.py",
"agents/conductors/clone/_clone.py",
"agents/conductors/clone/check_boundary.py",
"agents/conductors/community/_community.py",
"agents/conductors/docs/_docs.py",
"agents/conductors/hygiene/_hygiene_ci.py",
"agents/conductors/hygiene/_hygiene_extras.py",
"agents/conductors/hygiene/_hygiene_optdeps.py",
"agents/conductors/hygiene/_hygiene_repos.py",
"agents/conductors/hygiene/_hygiene_tokens.py",
"agents/conductors/workspace/_workspace.py",
"bin/codex_usage.py",
"bin/dataset_provenance.py",
"bin/lane_backfill.py",
"bin/project_discovery.py",
"bin/regroup_workspace.py",
"bin/shift_ledger.py",
"bin/sync_feedback.py",
"bin/workspace_instructions.py",
"board/_board.py",
"board/_publish.py",
]

HISTORY = re.compile(
r"\b20\d\d-[01]\d-[0-3]\d\b" # a date
r"|\bM\d+\.\d+[a-z]?\b" # a programme milestone tag (M1.3, M3.6j)
r"|\bPyAuto[A-Za-z]+#\d+" # an issue/PR reference
r"|\bv[0-2]\b" # a roadmap version (v0, v1, v2)
)


@pytest.mark.parametrize("tool", TOOLS)
def test_help_names_no_history(tool):
proc = subprocess.run(
[sys.executable, str(ROOT / tool), "--help"],
capture_output=True, text=True, timeout=60, cwd=ROOT,
)
assert proc.returncode == 0, proc.stderr[-2000:]
assert proc.stdout.strip()
hits = [m.group(0) for m in HISTORY.finditer(proc.stdout)]
assert not hits, f"{tool} --help names {hits}"
2 changes: 1 addition & 1 deletion tests/test_m31_live_shift_findings.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def test_6_a_scoped_dip_beyond_the_queue_takes_only_small_single_repo_tasks(tmp_
queue=_batch.read_queue(mind))
assert sorted(m["path"] for m in d_["members"]) == sorted([queued, small])
why = dict(d_["rejected"])
assert "medium, 1 repo(s)" in why[medium] and "ruling 2026-11-16" in why[medium]
assert "medium, 1 repo(s)" in why[medium] and "the human queues bigger work" in why[medium]
assert "small, 2 repo(s)" in why[multi]
assert sorted(d_["scoped_reach"]) == sorted([medium, multi])
# The ruling is recorded once in the doctrine.
Expand Down
4 changes: 2 additions & 2 deletions tests/test_questions_inbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,8 @@ def test_an_unfiled_question_is_named_in_the_digest(tmp_path):
"k", NOW)
text = _digest.build(_brief.parse(brief.read_text())["brief"], slot, c,
health=lambda u: "HEALTHY")
assert ("Inbox: not filed — `t1` (blocked): no shift issue on its lease (spawned before "
"M3.5); see the task's issue or session yourself.") in text
assert ("Inbox: not filed — `t1` (blocked): no shift issue on its lease (spawned by an "
"older orchestrator); see the task's issue or session yourself.") in text
assert "Inbox: not filed — `t1` (question): issue `issue-70` is not an https URL" in text


Expand Down
Loading