Skip to content

refactor: replace the nine pure launcher scripts with a registry entry #710

Closed

Description

@Jammy2211

Overview

Nine agent wrappers in PyAutoBrain (docs, clone, workspace, profiling, eyes, community, cortex, batch, review) only source _common.sh and exec python3 "$HERE/_<verb>.py" "$@". This makes them a registry entry in bin/pyauto-brain (the verb's _<verb>.py) with one exec python3 branch in main(), deletes the nine scripts after their header usage is checked against each AGENTS.md, and updates the two PyAutoMind repos_sync.py allow-list keys that name clone.sh and profiling.sh.

Plan

  • bin/pyauto-brain: an AGENT_PY registry for the nine verbs; main() runs exec python3 "${AGENT_PY[$sub]}" "$@"; help <verb> still finds the verb's AGENTS.md beside its module.
  • Before deleting each script, move any usage its header documents that its AGENTS.md lacks into that AGENTS.md.
  • PyAutoMind scripts/repos_sync.py: drop the clone.sh and profiling.sh allow-list entries (their files are gone); --check must pass. Own PR, from a PyAutoMind worktree.
  • Leave sizing, memory, samplers, refactor, feature, bug, intake, vitals, release and board as they are.
  • Witness: capture --help and one read-only invocation per verb before and after (byte-identical) plus the environment the Python process receives; run tests/test_skill_install.py, tests/test_conductor_discovery.py, repos_sync.py --check and the full suite.
  • Tier + merge mode: effective level: supervised; merge mode: auto-merge on green (this session: PRs opened, merge left to the human).
Detailed implementation plan

Affected Repositories

  • PyAutoBrain (primary)
  • PyAutoMind

Branch Survey

Repository Current Branch Dirty?
./organs/PyAutoBrain main clean
./organs/PyAutoMind main (shared checkout) untracked .worktrees/ only

Suggested branch: feature/launcher-registry

Implementation Steps

  1. bin/pyauto-brain: declare -A AGENT_PY for the nine; remove them from AGENT_SCRIPT; cmd_help resolves the doc from either map; main() execs python for AGENT_PY.
  2. Delete agents/conductors/{docs,clone,workspace,profiling,eyes,community,cortex,batch}/<verb>.sh and agents/faculties/review/review.sh; fix references (review/AGENTS.md).
  3. PyAutoMind scripts/repos_sync.py: remove the two allow-list keys.
  4. Witness captures before/after, tests, repos_sync.py --check.

Key Files

  • bin/pyauto-brain, the nine *.sh, their AGENTS.md
  • PyAutoMind scripts/repos_sync.py

Original Prompt

Click to expand starting prompt

Replace the nine pure launcher scripts with a registry entry

Type: refactor
Target: PyAutoBrain
Repos:

  • PyAutoBrain
  • PyAutoMind
    Difficulty: large
    Autonomy: supervised
    Priority: normal
    Status: formalised
    Consequence: notify
    Witness: every verb's output is byte-identical before and after for --help and one real invocation; tests/test_skill_install.py and tests/test_conductor_discovery.py pass; repos_sync.py --check passes.
    Review-minutes: 0
    Unattended: ready
    Lane: any

Replace the nine pure launcher scripts with a registry entry

Type: refactor
Target: PyAutoBrain
Repos:

  • PyAutoBrain
  • PyAutoMind
    Lane: any

Nine agent wrappers in @PyAutoBrain only exec python3 "$HERE/_<verb>.py" "$@" after sourcing _common.sh: docs.sh, clone.sh, workspace.sh, profiling.sh, eyes.sh, community.sh, cortex.sh, batch.sh, review.sh (265 lines, 36 of them code; board/board.sh is the same shape). Let a registry value in bin/pyauto-brain name _<verb>.py and add one exec python3 branch in main(); the dispatcher already exports PYAUTO_ROOT. Check each script's header usage text against its AGENTS.md before deleting it. @PyAutoMind scripts/repos_sync.py (around lines 1860 and 1884) lists clone.sh and profiling.sh in allow-lists and needs the matching edit. Leave sizing, memory, samplers, refactor, feature, bug, intake, vitals, release: they resolve sibling checkouts or reorder arguments. Found in the 2026-11-22 refactor review (PyAutoBrain#700).

Witness: every verb's output is byte-identical before and after for --help and one real invocation; tests/test_skill_install.py and tests/test_conductor_discovery.py pass; repos_sync.py --check passes.

Activity

  1. Jammy2211 commented on Nov 22, 2026

    @Jammy2211
    ContributorAuthor

    PRs opened: PyAutoBrain #711 and PyAutoLabs/PyAutoMind#598. Witness: --help and one real read-only run per verb byte-identical for all nine (captures in the session scratchpad); test_skill_install + test_conductor_discovery 39 passed; Brain full suite 2450 passed, 1 skipped; Mind repos_sync tests 186 passed. repos_sync.py --check: tenant firewall OK, no new failure, but it still exits 1 on the pre-existing euclid_assistant stale block (also red on main; euclid_assistant#18) and the worktree bundle's COWLS layout. Trial merge with #703/#705/#707/#709 clean. Heart: door YELLOW (unrelated); dev-ship STALE only from a TLS timeout in Heart's CI poll. Merge left to the human (/prm).

  2. Jammy2211 commented on Nov 22, 2026

    @Jammy2211
    ContributorAuthor

    Shipped

    Merged in #711 and PyAutoLabs/PyAutoMind#598 (2026-11-22). The nine pure launcher scripts (docs, clone, workspace, profiling, eyes, community, cortex, batch, review) are replaced by an AGENT_PY registry entry in bin/pyauto-brain; CLI output is unchanged. Mind's repos_sync.py drops the tenant-firewall allow-list keys for the deleted clone.sh and profiling.sh. #598's firewall leg was re-run green after #711 merged.

    Heart STALE at ship time was this network's TLS timeouts only; accepted by the human.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions