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
16 changes: 8 additions & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ For the full workflow narrative, conventions, and registry schemas, read
numerical order. `scripts/lifecycle.py` owns the moves and drift-checks
them.

Meta folders are **not** lifecycle states and keep their own names:
`z_features/` (multi-task epic trackers), `z_vault/` (deferred prompts — the
former `shelved/` merged here), and `autoprompt/` (prompts about this repo's
own infrastructure).
Retired non-record material lives in **`complete/archive/`** (skipped by
`lifecycle.py check`/`index`): `archive/epics/` (former `z_features/`
multi-task trackers) and `archive/shelved/` (former `z_vault/` deferred
prompts + dev notes). The old `z_features/`, `z_vault/` and `autoprompt/`
top-level folders were retired here on 2026-07-13.
- **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
Expand All @@ -64,11 +65,10 @@ For the full workflow narrative, conventions, and registry schemas, read
## Hard rules

1. **Never rewrite history on any branch with a remote.** No `git init` over an
existing repo, no `git push --force` to `main`. The 2026-04-27 drift incident
that motivated `autoprompt/03_history_rewrite_guard.md` is the reason.
existing repo, no `git push --force` to `main`. (Motivated by the 2026-04-27
drift incident.)
2. **Pull before edit.** `git fetch && git status` first, every time. If behind
`origin/main`, `git pull --ff-only` before touching anything. See
`autoprompt/04_source_of_truth_rule.md`.
`origin/main`, `git pull --ff-only` before touching anything.
3. **One prompt = one task = one PR.** If a prompt outlines multiple
loosely-related changes, split into separate prompt files before issuing.
4. **`tmp/` is scratch.** Never commit anything under it.
Expand Down
67 changes: 15 additions & 52 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,10 @@ PyAutoMind/
│ ├── AGENTS.md ← archive schema + how to look records up
│ └── 2026/07/<slug>.md ← bucketed by completion date (zero-padded months)
│ LIFECYCLE / META — not work-types; keep their own names.
├── z_features/ ← multi-task epic trackers (one tracker → many sub-prompts)
│ └── complete/ ← archived trackers (all sub-prompts shipped)
├── z_vault/ ← deferred prompts (z_ prefix sorts last in listings)

├── autoprompt/ ← prompts about THIS repo's own infrastructure (meta)
│ (complete/archive/ holds retired non-record material — see below)
├── complete/archive/ ← skipped by lifecycle.py check/index
│ ├── epics/ ← retired multi-task epic trackers (former z_features/)
│ └── shelved/ ← deferred prompts + dev notes (former z_vault/)
├── scripts/
│ ├── status.sh ← prompt inventory helper
Expand Down Expand Up @@ -249,9 +245,10 @@ experiment/autoarray/jax_sparse_mapping.md

### Not work-types

`active/`, `complete/`, `z_features/`, `z_vault/` are **workflow lifecycle**
folders, and `autoprompt/` holds **meta** prompts about this repo's own
infrastructure. They keep their own names and are not routed by work type.
`active/` and `complete/` are **workflow lifecycle** folders, not routed by work
type. `complete/archive/` holds retired non-record material — `epics/` (former
`z_features/` trackers) and `shelved/` (former `z_vault/` deferred prompts + dev
notes) — and is skipped by `lifecycle.py check`/`index`.

### Migration note

Expand Down Expand Up @@ -351,47 +348,13 @@ Each task is an H2 section:
Long-form description of what landed, gotchas, follow-ups.
```

### `z_features/` (multi-task epics)

`z_features/` holds **umbrella trackers** for multi-task epics — single
markdown files listing a sequence of sub-prompts that ship as their own PRs
under `autofit/`, `autogalaxy/`, etc. The tracker itself never becomes an
issue; only its sub-prompts do.

```
z_features/
├── latent_refactor.md ← tracker (lists sub-prompt links)
├── ellipse_fitting_jax.md
├── ...
└── complete/ ← archived trackers (all sub-prompts shipped)
```
### Epic trackers (retired 2026-07-13)

Use this pattern when a single ask decomposes into 5+ dependent sub-tasks.
`/start_dev z_features/<tracker>.md` runs in **audit-only mode** — it reports
which sub-prompts are not-yet-issued / in-flight / shipped, and offers to
move the tracker to `z_features/complete/` once everything has landed.

**Naming convention for clean audit:** the audit derives task-name
candidates from each sub-prompt's `active/` filename stem with `_`→`-`. For
the audit to auto-match against `complete.md` headings, **the task slug in
`active.md` / `complete.md` must equal the issued filename's stem after
that transform**.

| Issued filename | Task slug that matches | Task slug that does NOT match |
|---|---|---|
| `active/latent_module_autogalaxy.md` | `latent-module-autogalaxy` ✓ | `latent-autogalaxy-module` ✗ |
| `active/latent_smoke_test.md` | `latent-smoke-test` ✓ | `smoke-test-latent` ✗ |
| `active/latent_variables_tutorial_expand_autofit.md` | `latent-variables-tutorial-expand-autofit` ✓ | `latent-tutorial-autofit` ✗ |

The third row is the trap — if `/start_dev` renames the prompt on move
(e.g. appends a repo suffix for disambiguation) and `active.md`'s task slug
diverges from the issued stem, the audit will report the sub-prompt as
"in flight" forever and never archive the tracker. The cure is to either:

- Pick the task slug at `/start_dev` time to match the eventual issued
filename stem, or
- Manually archive the tracker (`mv z_features/<name>.md z_features/complete/`
+ `prompt_sync_push`) when you know it's all shipped.
Multi-task **epic trackers** (umbrella markdown files listing a sequence of
sub-prompts) formerly lived in `z_features/`. That folder was retired into
`complete/archive/epics/` once the `draft/ → active/ → complete/` lifecycle made
its `z_`-prefixed home redundant. The per-task completion records live in
`complete/<YYYY>/<MM>/`; the archived trackers keep the epic-level narrative.

---

Expand All @@ -404,7 +367,7 @@ bash scripts/status.sh
```

Prints counts per category, lists the active and recently-completed tasks, and
flags anything in `z_vault/` that's been sitting for a while.
and lists the recently-completed tasks.

### From inside Claude Code

Expand Down
6 changes: 3 additions & 3 deletions ROUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ commands; PyAutoBrain performs the routing.* Bodies + the boundary live in

## Not routed by work type

`active/`, `complete/`, `z_features/`, `z_vault/` are workflow-lifecycle
folders; `autoprompt/` holds meta prompts about this repo's own infrastructure.
None of these are work-type folders and PyAutoBrain does not route them.
`active/` and `complete/` are workflow-lifecycle folders (with
`complete/archive/` for retired epic trackers + shelved prompts). None of these
are work-type folders and PyAutoBrain does not route them.
70 changes: 0 additions & 70 deletions autoprompt/README.md

This file was deleted.

16 changes: 16 additions & 0 deletions complete/archive/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# complete/archive/ — retired non-record material

This holds material that isn't a **dated task record** (those live in
`complete/<YYYY>/<MM>/` and pair 1:1 with `complete.md`). `lifecycle.py`
`check` and `index` deliberately **skip** this directory.

- **`epics/`** — retired multi-task **epic trackers** (formerly `z_features/`).
Each tracked a series of related tasks; the per-task completion records live
in `complete/<YYYY>/<MM>/`. Kept for the epic-level narrative.
- **`shelved/`** — **deferred / shelved** prompts and dev notes (formerly
`z_vault/`). Not shipped; parked here rather than lost. Pull one back into
`draft/<work-type>/<target>/` if you decide to action it.

The `z_features/` and `z_vault/` top-level folders were retired here (2026-07-13)
once the `draft/ → active/ → complete/` lifecycle (issue #71) made them
redundant.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 7 additions & 2 deletions scripts/lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
ROOT = Path(__file__).resolve().parent.parent
ACTIVE_DIR = ROOT / "active"
COMPLETE_DIR = ROOT / "complete"
# complete/archive/ holds non-record material (retired epic trackers, shelved
# prompts) — NOT dated task records, so check/index skip it.
ARCHIVE_DIR = COMPLETE_DIR / "archive"
DRAFT_DIR = ROOT / "draft"
ACTIVE_MD = ROOT / "active.md"
COMPLETE_MD = ROOT / "complete.md"
Expand Down Expand Up @@ -365,7 +368,7 @@ def _all_records() -> "list[tuple[str, str, Path]]":
return []
recs = []
for f in COMPLETE_DIR.rglob("*.md"):
if f.name in ("index.md", "AGENTS.md"):
if f.name in ("index.md", "AGENTS.md") or ARCHIVE_DIR in f.parents:
continue
bucket = "/".join(f.relative_to(COMPLETE_DIR).parts[:-1]) or "unknown"
recs.append((bucket, f.stem, f))
Expand Down Expand Up @@ -461,7 +464,7 @@ def cmd_check(args) -> int:

if COMPLETE_DIR.exists():
for f in COMPLETE_DIR.rglob("*.md"):
if f.name in ("index.md", "AGENTS.md"):
if f.name in ("index.md", "AGENTS.md") or ARCHIVE_DIR in f.parents:
continue
slug = f.stem
if slug not in {safe_name(s) for s in c_slugs}:
Expand All @@ -474,6 +477,8 @@ def cmd_check(args) -> int:
if ACTIVE_DIR.exists() and COMPLETE_DIR.exists():
active_names = {f.name for f in ACTIVE_DIR.glob("*.md")}
for f in COMPLETE_DIR.rglob("*.md"):
if ARCHIVE_DIR in f.parents:
continue
if f.name in active_names:
problems.append(f"file in both active/ and complete/: {f.name}")

Expand Down
7 changes: 3 additions & 4 deletions scripts/spawn.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@
("draft/*", "SKELETON"),
("complete/AGENTS.md", "KEEP"),
("active/*", "DROP"), ("complete/*", "DROP"),
("z_features/*", "DROP"), ("z_vault/*", "DROP"),
("autoprompt/*", "DROP"), ("docs/*", "DROP"),
# Instance root docs + legacy pre-migration prompt dirs:
("dashboard.md", "DROP"), ("overview.md", "DROP"), ("autolens/*", "DROP"),
("docs/*", "DROP"),
# Instance root docs:
("dashboard.md", "DROP"), ("overview.md", "DROP"),
("skills/*", "KEEP"), ("policy/*", "KEEP"),
(".github/*", "KEEP_SUB"),
# Agent-discovery symlinks are install artifacts (recreated by the
Expand Down
6 changes: 3 additions & 3 deletions scripts/status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ dim() { printf "\033[2m%s\033[0m\n" "$1"; }
# active/ issued, in flight
# complete/<YYYY>/<MM>/ shipped
# Draft prompts are organised by WORK TYPE (feature/, bug/, …) under draft/.
# Meta folders (z_features/, z_vault/, autoprompt/) keep their own names.
# See README "Prompt taxonomy".
# See README "Prompt taxonomy". (The former z_features/ z_vault/ autoprompt/
# meta folders were retired into complete/archive/ on 2026-07-13.)

WORK_TYPES=(feature bug refactor docs test release maintenance research experiment triage)
LIFECYCLE_DIRS=(active complete z_features z_vault autoprompt)
LIFECYCLE_DIRS=(active complete)

bold "== Draft prompts (by work type) =="
printf "%-35s %s\n" "category" "count"
Expand Down
Loading