Skip to content

Prompt-file lifecycle: draft/ active/ complete/ — structure + rewire (PR-A, #71) - #72

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/lifecycle-state-split
Jul 13, 2026
Merged

Prompt-file lifecycle: draft/ active/ complete/ — structure + rewire (PR-A, #71)#72
Jammy2211 merged 2 commits into
mainfrom
feature/lifecycle-state-split

Conversation

@Jammy2211

@Jammy2211 Jammy2211 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

PR-A: draft/ active/ complete/ prompt-file lifecycle — structure + engine + rewire

Part of #71 (PR-A of 2). Advances the prompt file through three top-level
states that mirror the active.md → complete.md ledger, so issued/ stops
being an append-only 444-file pile of done + in-flight prompts.

draft/<work-type>/<target>/<name>.md   not started (was the bare work-type dirs)
active/<name>.md                        issued, in flight (was issued/)
complete/<YYYY>/<MM>/<slug>.md          shipped — rich records (complete/AGENTS.md)

Structure (git mv — history preserved; ~535 of the changed files are pure renames)

  • issued/ → active/ (440 files, wholesale rename; the intelligent sort of
    these into complete/ is PR-B).
  • work-type dirs (feature/ bug/ refactor/ docs/ test/ maintenance/ research/ triage/) → draft/. docs/ was split: only Type:-headed prompts moved to
    draft/docs/; reference material (docs/pyautobrain/spawn_spec.md etc.)
    stays in docs/.
  • new complete/ + complete/AGENTS.md (archive schema).

Engine

  • scripts/lifecycle.py (stdlib-only): move (active→complete/YYYY/MM by the
    complete.md completed: date), split-complete, migrate, check (drift
    guard, mirrors repos_sync --check). safe_name() sanitises slugs so
    spaces// round-trip.

Rewire

  • spawn.py rules (draft/* SKELETON, active/+complete/ DROP,
    complete/AGENTS.md KEEP first-match) + docs/pyautobrain/spawn_spec.md table.
  • status.sh (draft inventory, active/complete lifecycle dirs), prompt_sync.sh
    (idea-sweep excludes active/ + complete/).
  • docs: AGENTS.md, README.md, REFERENCE.md, ROUTING.md.

Validation

  • lifecycle.py check OK; spawn.py dry-run unmatched: none (exit 0);
    status.sh clean; draft→active→complete/2026/07 round-trip smoke passed.

Coupled + follow-ups

  • Skills half of PR-A is Wire dev workflow to draft/ active/ complete/ lifecycle (PR-A, #71) PyAutoBrain#109 (create_issue/ship_*/start_dev/intake).
  • Post-merge: republish the PyAutoMind-template (deferred so it tracks
    main, not this branch) — spawn --check / spawn_drift is expected red
    until then.
  • PR-B: lifecycle.py migrate/split-complete to sort active/ into
    complete/YYYY/MM/ + split complete.md, behind a review manifest.

🤖 Generated with Claude Code

Jammy2211 and others added 2 commits July 13, 2026 16:44
scripts/lifecycle.py — stdlib-only engine for the draft/ active/ complete/
state split (issue #71). Subcommands: move (active->complete/YYYY/MM by the
complete.md completed: date), split-complete (explode complete.md into per-task
records), migrate (classify legacy files, ledger-backed only), check (drift
guard, mirrors repos_sync --check). Validated against live complete.md: 554
entries parse (542 dated), filenames sanitised (safe_name) so slugs with
spaces/slashes round-trip; check OK on current ledgers.

Structural moves + skill/script rewire deferred pending the docs/ conflation
decision (see #71).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ewire (#71)

Advance the prompt-FILE lifecycle in lockstep with the task ledger:
  draft/<work-type>/<target>/   not started (was the bare work-type dirs)
  active/                        issued, in flight (was issued/)
  complete/<YYYY>/<MM>/          shipped (rich records; see complete/AGENTS.md)

Structural (git mv, history preserved):
- issued/ -> active/ (440 files; the intelligent sort into complete/ is PR-B)
- work-type dirs (feature/ bug/ refactor/ docs/ test/ maintenance/ research/
  triage/) -> draft/; docs/ split — Type:-headed prompts -> draft/docs/, the
  reference material (docs/pyautobrain/spawn_spec.md etc.) stays in docs/
- new complete/ + complete/AGENTS.md (archive schema)

Rewire:
- scripts/spawn.py rules: draft/* SKELETON, active/*+complete/* DROP,
  complete/AGENTS.md KEEP (first-match); docs/pyautobrain/spawn_spec.md spec
  table updated to match. spawn dry-run: unmatched none.
- scripts/status.sh: draft/ inventory, LIFECYCLE_DIRS active/complete,
  complete_count from complete/ records (falls back to complete.md).
- scripts/prompt_sync.sh: idea-sweep excludes active/ + complete/.
- docs: AGENTS.md, README.md, REFERENCE.md, ROUTING.md.

lifecycle.py check OK; draft->active->complete round-trip smoke passed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 0653328 into main Jul 13, 2026
@Jammy2211
Jammy2211 deleted the feature/lifecycle-state-split branch July 13, 2026 17:09
Jammy2211 pushed a commit that referenced this pull request Jul 14, 2026
Jammy2211 pushed a commit that referenced this pull request Jul 14, 2026
… (Heart RED→YELLOW on fresh mode=release v66001)
Jammy2211 added a commit that referenced this pull request Jul 27, 2026
Three separate defects, all surfaced by the nightly Spawn Drift job:

1. issued/remove_pulse_compat.md — the sole survivor of the retired flat
   issued/ pile. The lifecycle split (#71/#72) repointed spawn.py's
   ('issued/*', 'DROP') rule to 'active/*', leaving this one file with no
   matching rule -> UNMATCHED -> exit 1. The work it describes is done
   (PyAutoPulse gone, no pulse refs in PyAutoHeart) and already recorded at
   complete/2026/07/remove-pulse-compat.md, so it is a pure orphan. Deleted.

2. AI_POLICY.md — added org-wide today, with no spec rule, so it became the
   next UNMATCHED the moment (1) was cleared. It names the owning org twice,
   so it takes KEEP_SUB (PyAutoLabs -> YOURORG), not a verbatim KEEP.

3. CONTRIBUTING.md — was KEEP verbatim. Today's centralisation rewrote it to
   'Contributing to PyAutoLabs', so a republish would have stamped PyAutoLabs
   branding into a fresh-slate template spawned for another org. Same defect
   class as (2); moved to KEEP_SUB in both rule sets.

Also repoints planned.md's jax-point-source-point-smoke-sentinel entry, which
pointed at issued/jax_point_source_point_smoke_sentinel.md — a 130-line
diagnostic prompt dropped as 'legacy' by the lifecycle migration while the
task stayed planned and unfixed. Restored verbatim to draft/bug/autolens/.

spawn.py and spawn_spec.md are changed together (the spec is the source of
record and the code mirrors it). After this, --check reports
'unmatched: none' + 'canary scan: clean' for both templates; the remaining
drift is content staleness that a republish clears.

Co-authored-by: Jammy2211 <JNightingale2211@gmail.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Jammy2211 pushed a commit that referenced this pull request Aug 24, 2026
Both PRs open:
- PyAutoReduce#72 (library) — distribution renamed to `pyautoreduce`
- autoreduce_workspace#1 (workspace) — merges behind #72

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V19RfJbExKP4hsT5c6LttV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant