Skip to content

Commit 23a4ead

Browse files
committed
fix(prm): make the dashboard regen unconditional, not a third bullet
The regen landed as leg 3 of a sub-step whose first two legs are judgement calls, which reads as "do this if the sweep found something". It is the opposite: `lifecycle.py record` changes what the page shows all by itself, so the ordinary close-out — clean sweep, no sibling retired — is exactly the one that still has to re-render. - Leg 3 is now stated as a command with no condition, ahead of the three legs, with both verbs spelled out (`intake --apply dashboard`, then `intake dashboard --check` for the confirmation). - Verified and documented that re-rendering an already-current tree is a no-op: `--apply` rewrites both files byte-identically and `git status` stays clean. So there is no judgement to make about whether it is needed — the cheap mistake is the redundant render, not the stale page. - Added the leg's own check: `git show --stat HEAD` must name dashboard.md and dashboard.html beside the record, or leg 3 did not happen. The ledger's dashboard line is a claim that has to be backed. - Closed the loophole in Notes. "A task with no issue/prompt/worktree skips those sub-steps" does not extend to the regen — that is skippable only where the close-out wrote nothing to Mind at all. - reference.md notes both invocation paths (direct `_intake.py` and the `pyauto-brain` router), since the environment decides which resolves. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011QFJaycmUfaEhR4XoZajy9
1 parent 5724107 commit 23a4ead

2 files changed

Lines changed: 48 additions & 11 deletions

File tree

skills/prm/prm.md

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,14 @@ step 6. Order is forced by the tooling, so do not reorder:
139139
is released; it is finished when `dashboard.md` stops offering this work.
140140
`dashboard_refresh.yml` self-heals a stale *render*, never a stale *prompt*,
141141
so this leg belongs to `/prm` and to nothing else — skipping it is how
142-
shipped and half-shipped tasks accumulate on the page:
142+
shipped and half-shipped tasks accumulate on the page.
143+
144+
Legs 1 and 2 are judgement and may find nothing. **Leg 3 is a command, and it
145+
runs on every close-out that touched Mind at all** — including the ordinary
146+
one where the sweep is clean and no sibling is retired. Moving a prompt
147+
`active/``complete/` changes the page by itself; a close-out that recorded
148+
the task and did not re-render has left the page wrong. There is no "nothing
149+
changed" exit from leg 3, only a `--check` that says the render is current.
143150

144151
1. **Sweep what this task is named in.** Grep the slug and the prompt
145152
filename across `draft/`, `active/`, `epics.md` and the registry files.
@@ -156,15 +163,25 @@ step 6. Order is forced by the tooling, so do not reorder:
156163
`/prm` authorization. One that merely *looks* alike gets a ledger line
157164
naming it and the `/intake reconcile` door; never retire on resemblance,
158165
and never turn this sweep into a second question (step 6 owns the only one).
159-
3. **Regenerate.** `pyauto-brain intake --apply dashboard` — never hand-edit
160-
`dashboard.md` / `dashboard.html`. Commit the render **with** the record,
161-
in one commit: the workflow's heal commit is made with `GITHUB_TOKEN`,
162-
which triggers no other workflow and has to re-dispatch
163-
`pages_dashboard.yml` by hand, so a self-healed page reaches Pages later
164-
than a correctly-committed one — and heals nothing you retired in 1 and 2.
166+
3. **Regenerate — always.** Two commands, in this order, no condition on
167+
either:
168+
169+
```bash
170+
pyauto-brain intake --apply dashboard # writes dashboard.md + dashboard.html
171+
pyauto-brain intake dashboard --check # must print "…are current"
172+
```
173+
174+
Never hand-edit `dashboard.md` / `dashboard.html`. Commit the render
175+
**with** the record, in one commit: the workflow's heal commit is made
176+
with `GITHUB_TOKEN`, which triggers no other workflow and has to
177+
re-dispatch `pages_dashboard.yml` by hand, so a self-healed page reaches
178+
Pages later than a correctly-committed one — and heals nothing you retired
179+
in 1 and 2.
165180
166181
Then `lifecycle.py check` and push Mind — on `main`, and note that
167-
`prompt_sync_push` stages `-A`, so check for unrelated work first.
182+
`prompt_sync_push` stages `-A`, so check for unrelated work first. The push
183+
is not the end of the leg: `git show --stat HEAD` must name `dashboard.md`
184+
and `dashboard.html` alongside the record, or leg 3 did not happen.
168185
5. **Worktree** — `worktree_remove <task>` (source `bin/worktree.sh`, `PYAUTO_MAIN`
169186
set), never `rm -rf`. It refuses on a dirty repo and on a claim still
170187
registered in `active.md` — which is exactly why step 3 comes first.
@@ -178,7 +195,8 @@ step 6. Order is forced by the tooling, so do not reorder:
178195
released, **dashboard regenerated** (plus any sibling prompt retired, and any
179196
suspect left standing with its `/intake reconcile` prefix), worktree removed,
180197
branches deleted, and anything skipped. Branches are simply absent from the
181-
ledger where sub-step 6 did not apply.
198+
ledger where sub-step 6 did not apply. The dashboard line is not optional
199+
prose: if you cannot write it, leg 4.3 did not run — go back and run it.
182200
183201
**Remote (mobile/codex):** sub-steps 1 and 2 run over `gh`/`git ls-remote` as
184202
usual. Mind (3) works if PyAutoMind is checked out; otherwise say the record is
@@ -212,4 +230,8 @@ Stop and report instead of pressing on when:
212230
- Under a `--auto` workflow run, merge stays human: `/prm` is a human-typed door
213231
and is never invoked by the autonomous queue.
214232
- A task with no issue, no Mind prompt, or no worktree (a direct wiring change,
215-
say) simply skips those sub-steps and says so — it is not an error.
233+
say) simply skips those sub-steps and says so — it is not an error. That
234+
licence does **not** extend to the dashboard regen: it is skippable only where
235+
the close-out wrote nothing to Mind at all. Re-rendering an already-current
236+
tree is a no-op that leaves `git status` clean, so when in doubt, run it —
237+
the cheap mistake is the redundant render, not the stale page.

skills/prm/reference.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,24 @@ Mind script importing a Brain module inverts the organ boundary — which is why
230230
`dashboard_refresh.yml` checks out both repos to do it. So the render stays a
231231
step someone has to take, and `/prm` is the door that takes it.
232232

233-
**Regenerate, and commit the render with the record:**
233+
**Regenerate, and commit the render with the record.** Unconditional — the
234+
sweep and the reconcile above may both come back empty, this does not:
235+
`lifecycle.py record` alone changes what the page shows.
234236

235237
```bash
236238
python3 "$BRAIN" --mind . --apply dashboard # writes dashboard.md + dashboard.html
237239
python3 "$BRAIN" --mind . dashboard --check # "…are current"; exit 1 = drift
238240
python3 scripts/lifecycle.py check
239241
```
240242

243+
Or through the router, identically — `pyauto-brain intake --apply dashboard` and
244+
`pyauto-brain intake dashboard --check`; use whichever the environment resolves.
245+
246+
Running it on an already-current tree is a **no-op**: the renderer rewrites both
247+
files byte-identically and `git status` stays clean, so there is never a reason
248+
to guess whether it is needed. `--apply` prints
249+
`Wrote: dashboard.md + dashboard.html (<n> prompts, <n> hygiene flag(s))`.
250+
241251
`--check` exits **1** for drift and anything higher for a renderer failure
242252
(Brain/Mind version skew) — a non-1 code is not a stale page, so read the
243253
message rather than re-rendering.
@@ -248,8 +258,13 @@ work first and use explicit pathspecs if any exists:
248258
```bash
249259
git status --short # unrelated work?
250260
source scripts/prompt_sync.sh && prompt_sync_push "complete: <task>"
261+
git show --stat HEAD # names dashboard.md + dashboard.html?
251262
```
252263

264+
That last line is the leg's own check: a close-out commit that does not carry
265+
`dashboard.md` and `dashboard.html` beside the record did not regenerate, and
266+
the ledger's dashboard line would be a claim you cannot back.
267+
253268
One commit carrying the record, the retirements and the regenerated pages is the
254269
goal. The workflow's fallback is strictly worse: its heal commit is made with
255270
`GITHUB_TOKEN`, which triggers no other workflow, so it must dispatch

0 commit comments

Comments
 (0)