This file is for AI coding agents (Claude Code, Codex, Cursor, etc.) discovering this repository.
PyAutoMind is the Mind of the PyAuto organism and the starting point of the
PyAuto workflow. It holds the organism's ideas, intent, goals, priorities and
workflow state. Every task that ends up as a PR in PyAutoConf, PyAutoFit,
PyAutoArray, PyAutoGalaxy, PyAutoLens, or any of the *_workspace* repos begins
as a markdown file here.
PyAutoMind is the organism's Mind (intent and direction). The organs and their
boundaries are defined once in PyAutoBrain/ORGANISM.md; see
README.md for this repo's full picture.
For the full workflow narrative, conventions, and registry schemas, read README.md. The summary below is just enough to operate.
- Prompts —
<work-type>/<target>/<name>.md(free-form markdown, one task per file). The first folder is the kind of work; the second is the target repo or domain. Work-types:feature/,bug/,refactor/,docs/,test/,release/,maintenance/,research/,experiment/(plustriage/for prompts whose classification is still unclear). PyAutoBrain routes by the first folder — see README.md "Prompt taxonomy" andROUTING.md. Lifecycle/meta folders are not work-types and keep their own names:issued/(routed prompts),z_features/(multi-task epic trackers),z_vault/(deferred prompts — the formershelved/merged here), andautoprompt/(prompts about this repo's own infrastructure). - Registry — root-level markdown files, each with one job:
active.md(in-flight tasks),planned.md(scoped, not started),complete.md(shipped),parked.md(started but not in flight),queue.md(ordered input forregister_and_iterate --queue),ideas.md(raw inbox swept by$intake,/intakein Claude). Mutate these only via the skills inskills/so commit messages stay consistent.parked.mdholds tasks that were started or scoped but are not currently in flight (e.g. work parked in a stash, orphan worktrees); move back toactive.md(orplanned.mdif re-scoping) when resuming. - Body map —
repos.yamlis the single source of repo identity (GitHub home, category, one-line role) for every repo in the workspace. The routing table in the workspace-rootAGENTS.mdand the owner map inPyAutoBrain/skills/WORKFLOW.mdare generated from it, and the repo lists in Heart/Build/admin scripts are drift-checked against it:python3 scripts/repos_sync.py --write. - Skills —
skills/<name>/are agent skills and command bodies tightly coupled to the registry. Claude and Codex discovery is installed by PyAutoBrain; they sourcescripts/prompt_sync.shfor commit/push. - Scripts —
scripts/status.sh(inventory),scripts/prompt_sync.sh(commit/push helpers).
- Never rewrite history on any branch with a remote. No
git initover an existing repo, nogit push --forcetomain. The 2026-04-27 drift incident that motivatedautoprompt/03_history_rewrite_guard.mdis the reason. - Pull before edit.
git fetch && git statusfirst, every time. If behindorigin/main,git pull --ff-onlybefore touching anything. Seeautoprompt/04_source_of_truth_rule.md. - One prompt = one task = one PR. If a prompt outlines multiple loosely-related changes, split into separate prompt files before issuing.
tmp/is scratch. Never commit anything under it.
Write the file under <work-type>/<target>/<name>.md — pick the work-type from
the list above (use triage/ if genuinely unsure) and the target repo/domain as
the second folder, e.g. feature/autolens/potential_corrections.md or
bug/autoarray/mask_edge_case.md. Don't touch active.md or issued/ directly
— those are managed by $start-dev and $create-issue (/start_dev and
/create_issue in Claude).
To skip the manual filing, run $intake (/intake in Claude), the
PyAutoBrain Intake/Conception Agent. It classifies a raw idea into the right
<work-type>/<target>/ folder,
writes the light header (incl. the optional Difficulty:/Autonomy:/Priority:
keys — see README "Prompt file format"), and files the prompt for you. It files a
prompt only; $start-dev (/start_dev in Claude) remains the separate next step.
Use $start-dev <work-type>/<target>/<name>.md (/start_dev in Claude). Older
<target>/<name>.md paths from before the taxonomy migration still work. It
routes to $start-library or $start-workspace (/start_library or
/start_workspace in Claude) based on the repos referenced in the prompt body;
routing keys off @RepoName references in the content, not the folder.
Read README.md. It is current as of the last commit on this branch.
NEVER perform these operations on any repo with a remote:
git initin a directory already tracked by gitrm -rf .git && git init- Commit with subject "Initial commit", "Fresh start", "Start fresh", "Reset for AI workflow", or any equivalent message on a branch with a remote
git push --forcetomain(or any branch tracked asorigin/HEAD)git filter-repo/git filter-branchon shared branchesgit rebase -irewriting commits already pushed to a shared branch
If the working tree needs a clean state, the only correct sequence is:
git fetch origin
git reset --hard origin/main
git clean -fd
This applies equally to humans, local Claude Code, cloud Claude agents, Codex, and any other agent. The "Initial commit — fresh start for AI workflow" pattern that appeared independently on origin and local for three workspace repos is exactly what this rule prevents — it costs ~40 commits of redundant local work every time it happens.