Overview
PyAutoMind/issued/ is a flat, append-only pile of 444 prompt files — every prompt ever start_dev'd, done or not — so it is useless for tracking state. The root cause is two parallel lifecycles that have drifted apart: prompt files flow <work-type>/ → issued/ (and then never move), while ledger entries flow active.md → complete.md. This task makes the file lifecycle track the three ledger states via a clean top-level split — draft/ → active/ → complete/YYYY/MM/ — and splits the 6000-line complete.md into per-task rich records (the substrate for a later token-light archive wiki, filed separately).
Phase 2 (the complete/ wiki index) is the already-filed follow-up feature/pyautomind/complete_archive_wiki.md and is out of scope here — do not issue it until this nears shipping.
Plan
Ships as two sequential PRs under this issue (the Feature Agent flagged the task too-large for one PR; its generic core_api/workspace/docs phases don't apply to a Mind-internal restructure):
PR-A — Rewire (no historical data moved):
- Establish
draft/ / active/ / complete/YYYY/MM/ conventions (zero-padded months = numerical order). draft/ wraps the existing <work-type>/<target>/ taxonomy.
- New
scripts/lifecycle.py: move (bucket a completed file by its ledger completed: date), split-complete (complete.md → per-file records), --check (drift detection).
- Update the 6 Brain skills and 3 Mind scripts to the new paths (see Implementation Steps).
- Smoke a throwaway
create_issue → ship round-trip. New work flows correctly; the 444 files still sit in issued/.
PR-B — Migrate (mechanical, big diff):
- Run
lifecycle.py to move the 444 issued/ files into active/ vs complete/YYYY/MM/ (cross-referenced against active.md/complete.md; orphans → complete/unknown/), and split complete.md into per-file rich records — via a review manifest first, then git mv to preserve history.
- Regenerate + republish the spawn template (
spawn --check / spawn_drift CI).
Detailed implementation plan
Affected Repositories
- PyAutoMind (primary) — dir layout,
scripts/lifecycle.py, spawn.py, status.sh, prompt_sync.sh
- PyAutoBrain — the 6 dev-workflow skills wired to
issued/ / complete.md
Branch Survey
| Repository |
Current Branch |
Dirty? |
| ./PyAutoMind |
main |
clean |
| ./PyAutoBrain |
main |
clean |
Suggested branch: feature/lifecycle-state-split
Note: two stray codex worktrees sit on PyAutoMind branches (codex-organ-skill-wrappers, codex-skill-bookkeeping) — not conflicting (worktree_check_conflict exit 0), but land this before they grow to avoid merge friction.
Implementation Steps (PR-A)
- Conventions + docs — define
draft/ active/ complete/YYYY/MM/ in PyAutoMind/README.md "Prompt taxonomy"; add complete/AGENTS.md stub for the archive schema.
scripts/lifecycle.py — move <file> (read ledger completed: date → complete/<year>/<month>/), split-complete (parse complete.md H2 sections → complete/YYYY/MM/<slug>.md rich records + append ## Original prompt), --check (active-file whose ledger entry is already in complete.md; complete-file with no ledger entry; draft with an open issue; mis-bucketed date). Mirror repos_sync.py --check exit-code convention.
- Brain skills (
PyAutoBrain/skills/):
create_issue/SKILL.md — mv <path> issued/ → active/; "timestamp-suffix if exists in issued/" → active/.
ship_library/{ship_library,reference}.md + ship_workspace/{ship_workspace,reference}.md — on merge, also move the file active/<name>.md → complete/<year>/<month>/<slug>.md and write the rich record, in the same beat as the active.md → complete.md ledger move.
start_dev/reference.md — issued/<basename> lookup → active/; grep complete.md for ^## <candidate>$ shipped-check → scan complete/** (or generated index).
intake/intake.md — reconcile cross-ref against complete.md/issued/ and "retire to issued/ by hand" → new paths.
WORKFLOW.md, PyAutoMind/skills/OWNERSHIP.md — schema/pointer prose.
- Mind scripts:
spawn.py — glob ("issued/*","DROP") → ("active/*","DROP") + ("complete/**", …); adjust ("complete.md","EMPTY") for the split/retired file.
status.sh — LIFECYCLE_DIRS (issued→active, add complete); complete_count counts complete/**/*.md not complete.md H2s.
prompt_sync.sh — grep -v '^issued/' → active/.
- Smoke — throwaway prompt through
create_issue → active/, simulate ship → complete/YYYY/MM/, run lifecycle.py --check clean.
Implementation Steps (PR-B)
- Migration —
lifecycle.py batch pass emits a review manifest (each issued/ file → target state + confidence); human/agent review; execute git mv + complete.md split in a committed series. Orphans → complete/unknown/, never dropped.
- Template parity —
spawn.py --write regenerate PyAutoMind-template; confirm spawn --check / spawn_drift CI green; republish.
Key Files
PyAutoMind/scripts/lifecycle.py — new; the move/split/check engine.
PyAutoMind/scripts/{spawn.py,status.sh,prompt_sync.sh} — path rewiring.
PyAutoBrain/skills/{create_issue,ship_library,ship_workspace,start_dev,intake}/*.md — lifecycle path rewiring.
PyAutoMind/complete.md (640KB, ~6000 lines) — split source.
PyAutoMind/issued/ (444 files) — migration source.
Traps
active.md - Repo lines are claims (feedback_active_md_dash_repos) — migration script must not misread them.
- Filenames map only fuzzily to complete.md slugs — decide state by ledger cross-ref, never by name.
- No JAX / behaviour change here; Mind-internal, so no downstream library API impact — but there IS a
create_issue/ship_* behaviour change, hence the round-trip smoke.
Original Prompt
Click to expand starting prompt
See PyAutoMind/issued/lifecycle_state_split.md (moved from feature/pyautomind/ on issue creation). Original user request:
pyautomind/issued is huge and hard ot track, can we: (i) put all things not in issued in a folder called active, to make state split; (ii) make a complete folder which is for complete and separate from issued which are on going; (iii) put a folder for not yet active, e.g. drafts or thigns which are intaken but not start_dev; (iv) For complete, put them in folders by year and month in a way that appears numerically in order. As a follow up, I think we probbaly want to then build a wiki or indexing scheme for the complete folder so its really easy for an agent to look up old issues in a token light way, analogous to the wiki features used in autolens_assistant (e.g. RAG is dead).
Overview
PyAutoMind/issued/is a flat, append-only pile of 444 prompt files — every prompt everstart_dev'd, done or not — so it is useless for tracking state. The root cause is two parallel lifecycles that have drifted apart: prompt files flow<work-type>/ → issued/(and then never move), while ledger entries flowactive.md → complete.md. This task makes the file lifecycle track the three ledger states via a clean top-level split —draft/→active/→complete/YYYY/MM/— and splits the 6000-linecomplete.mdinto per-task rich records (the substrate for a later token-light archive wiki, filed separately).Phase 2 (the
complete/wiki index) is the already-filed follow-upfeature/pyautomind/complete_archive_wiki.mdand is out of scope here — do not issue it until this nears shipping.Plan
Ships as two sequential PRs under this issue (the Feature Agent flagged the task too-large for one PR; its generic
core_api/workspace/docsphases don't apply to a Mind-internal restructure):PR-A — Rewire (no historical data moved):
draft//active//complete/YYYY/MM/conventions (zero-padded months = numerical order).draft/wraps the existing<work-type>/<target>/taxonomy.scripts/lifecycle.py:move(bucket a completed file by its ledgercompleted:date),split-complete(complete.md → per-file records),--check(drift detection).create_issue → shipround-trip. New work flows correctly; the 444 files still sit inissued/.PR-B — Migrate (mechanical, big diff):
lifecycle.pyto move the 444issued/files intoactive/vscomplete/YYYY/MM/(cross-referenced againstactive.md/complete.md; orphans →complete/unknown/), and splitcomplete.mdinto per-file rich records — via a review manifest first, thengit mvto preserve history.spawn --check/spawn_driftCI).Detailed implementation plan
Affected Repositories
scripts/lifecycle.py,spawn.py,status.sh,prompt_sync.shissued//complete.mdBranch Survey
Suggested branch:
feature/lifecycle-state-splitNote: two stray codex worktrees sit on PyAutoMind branches (
codex-organ-skill-wrappers,codex-skill-bookkeeping) — not conflicting (worktree_check_conflict exit 0), but land this before they grow to avoid merge friction.Implementation Steps (PR-A)
draft/ active/ complete/YYYY/MM/inPyAutoMind/README.md"Prompt taxonomy"; addcomplete/AGENTS.mdstub for the archive schema.scripts/lifecycle.py—move <file>(read ledgercompleted:date →complete/<year>/<month>/),split-complete(parsecomplete.mdH2 sections →complete/YYYY/MM/<slug>.mdrich records + append## Original prompt),--check(active-file whose ledger entry is already in complete.md; complete-file with no ledger entry; draft with an open issue; mis-bucketed date). Mirrorrepos_sync.py --checkexit-code convention.PyAutoBrain/skills/):create_issue/SKILL.md—mv <path> issued/→active/; "timestamp-suffix if exists in issued/" →active/.ship_library/{ship_library,reference}.md+ship_workspace/{ship_workspace,reference}.md— on merge, also move the fileactive/<name>.md → complete/<year>/<month>/<slug>.mdand write the rich record, in the same beat as theactive.md → complete.mdledger move.start_dev/reference.md—issued/<basename>lookup →active/;grep complete.md for ^## <candidate>$shipped-check → scancomplete/**(or generated index).intake/intake.md—reconcilecross-ref againstcomplete.md/issued/and "retire to issued/ by hand" → new paths.WORKFLOW.md,PyAutoMind/skills/OWNERSHIP.md— schema/pointer prose.spawn.py— glob("issued/*","DROP")→("active/*","DROP")+("complete/**", …); adjust("complete.md","EMPTY")for the split/retired file.status.sh—LIFECYCLE_DIRS(issued→active, addcomplete);complete_countcountscomplete/**/*.mdnotcomplete.mdH2s.prompt_sync.sh—grep -v '^issued/'→active/.create_issue → active/, simulate ship →complete/YYYY/MM/, runlifecycle.py --checkclean.Implementation Steps (PR-B)
lifecycle.pybatch pass emits a review manifest (eachissued/file → target state + confidence); human/agent review; executegit mv+complete.mdsplit in a committed series. Orphans →complete/unknown/, never dropped.spawn.py --writeregenerate PyAutoMind-template; confirmspawn --check/spawn_driftCI green; republish.Key Files
PyAutoMind/scripts/lifecycle.py— new; the move/split/check engine.PyAutoMind/scripts/{spawn.py,status.sh,prompt_sync.sh}— path rewiring.PyAutoBrain/skills/{create_issue,ship_library,ship_workspace,start_dev,intake}/*.md— lifecycle path rewiring.PyAutoMind/complete.md(640KB, ~6000 lines) — split source.PyAutoMind/issued/(444 files) — migration source.Traps
active.md- Repolines are claims (feedback_active_md_dash_repos) — migration script must not misread them.create_issue/ship_*behaviour change, hence the round-trip smoke.Original Prompt
Click to expand starting prompt
See
PyAutoMind/issued/lifecycle_state_split.md(moved fromfeature/pyautomind/on issue creation). Original user request: