From 9ecd45ac0008a8877aa4b3e37997e35e85f621ce Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Thu, 12 Nov 2026 17:26:01 +0000 Subject: [PATCH 1/2] docs: pass explicit paths to prompt_sync_push (PyAutoMind#554) prompt_sync_push now commits only the paths it is given and refuses on changes outside them, conflict markers, or an unparseable state.json. Every skill call site names the files its step changes: intake (prompt + dashboard pages), start_dev / start_dev_for_user / start_library / start_workspace (active.md, or planned.md on a conflict), ship_library / ship_workspace (the paths `lifecycle.py record` changes, plus autonomy_log.md at PR-open), and prm, whose `add -A` warning is replaced by the new rule. start_dev carries the one-paragraph note on the refusals. Co-Authored-By: Claude Opus 5.5 --- skills/intake/intake.md | 12 ++++++++++-- skills/prm/reference.md | 16 ++++++++++++---- skills/ship_library/reference.md | 6 +++--- skills/ship_workspace/reference.md | 3 ++- skills/start_dev/start_dev.md | 8 +++++++- skills/start_dev_for_user/reference.md | 2 +- skills/start_dev_for_user/start_dev_for_user.md | 3 ++- skills/start_library/start_library.md | 2 +- skills/start_workspace/reference.md | 2 +- 9 files changed, 39 insertions(+), 15 deletions(-) diff --git a/skills/intake/intake.md b/skills/intake/intake.md index 991cefe9..8ed352e7 100644 --- a/skills/intake/intake.md +++ b/skills/intake/intake.md @@ -39,9 +39,16 @@ Shared routing context: `PyAutoBrain/skills/COMMANDS.md`. cd "${PYAUTO_MIND:-$(test -d "$PYAUTO_MAIN/organs/PyAutoMind" && echo "$PYAUTO_MAIN/organs/PyAutoMind" || echo "$PYAUTO_MAIN/PyAutoMind")}" pyauto-brain intake --apply dashboard # writes dashboard.md + dashboard.html pyauto-brain intake dashboard --check # must print "…are current" - source scripts/prompt_sync.sh && prompt_sync_push "intake: file " + source scripts/prompt_sync.sh && prompt_sync_push "intake: file " \ + dashboard.md dashboard.html ``` + `` is the file `--apply` wrote (e.g. `draft///.md`); + for `formalise` or the `ideas` sweep, list every prompt file it changed. The + helper commits only the paths it is given and refuses, committing nothing, + if anything else in the tree has changed, if a changed file holds conflict + markers, or if a changed `state.json` does not parse. + One commit carrying the prompt **and** the regenerated pages. This is not optional tidying: the dashboard is how a task is picked up β€” tap πŸ“‹, get `/start_dev ` β€” so a prompt filed without it is invisible on the phone @@ -69,7 +76,8 @@ dev workflow (issue, branch, plan). Do not bypass the Brain. into a session. `--apply` also writes `dashboard.html`, the one-tap-copy twin GitHub Pages serves (real clipboard buttons; PyAutoMind's `pages_dashboard.yml` deploys it), with links derived from `repos.yaml`. - Dry-run prints it, `--apply` writes it (commit via `prompt_sync_push`), + Dry-run prints it, `--apply` writes it (commit via + `prompt_sync_push "" dashboard.md dashboard.html`), `--check` exits 1 if the committed page has drifted. PyAutoMind's `dashboard_refresh.yml` self-heals a stale **render** on pushes to main β€” that is a backstop for a page nobody rebuilt, not a reason to skip step 4 above: diff --git a/skills/prm/reference.md b/skills/prm/reference.md index 4597d96a..76a526ec 100644 --- a/skills/prm/reference.md +++ b/skills/prm/reference.md @@ -343,15 +343,23 @@ to guess whether it is needed. `--apply` prints (Brain/Mind version skew) β€” a non-1 code is not a stale page, so read the message rather than re-rendering. -Then commit + push. `prompt_sync_push` runs `git add -A`, so check for unrelated -work first and use explicit pathspecs if any exists: +Then commit + push. `prompt_sync_push` commits only the paths it is given, and +refuses, committing nothing, when anything else in the tree has changed (another +session's work, or a path you forgot), when a changed file holds conflict +markers, or when a changed `state.json` does not parse. Name every path this +close-out changed, both sides of any `git mv`, and every prompt the sweep retired: ```bash -git status --short # unrelated work? -source scripts/prompt_sync.sh && prompt_sync_push "complete: " +git status --short # every line should be yours +source scripts/prompt_sync.sh && prompt_sync_push "complete: " \ + active.md active/.md complete/index.md complete///.md \ + dashboard.md dashboard.html # + retired draft/ prompts git show --stat HEAD # names dashboard.md + dashboard.html? ``` +On a refusal for changes outside the paths, add the ones that are this +close-out's; leave another session's work alone and tell the human. + That last line is the leg's own check: a close-out commit that does not carry `dashboard.md` and `dashboard.html` beside the record did not regenerate, and the ledger's dashboard line would be a claim you cannot back. diff --git a/skills/ship_library/reference.md b/skills/ship_library/reference.md index 2c36f740..522f5739 100644 --- a/skills/ship_library/reference.md +++ b/skills/ship_library/reference.md @@ -74,7 +74,7 @@ what the human validates instead of the pre-approval they didn't give: After PR-open, append the calibration row (`PyAutoMind/autonomy_log.md`, schema in that file's header; outcome starts `parked`/blank and is set at the human's merge decision) and push Mind with -`prompt_sync_push "mind: autonomy_log β€” at PR-open"`. +`prompt_sync_push "mind: autonomy_log β€” at PR-open" autonomy_log.md`. **Which table.** The calibration row goes in the **first** table of that file β€” the five-cell `| date | task | effective level | gates | outcome |` @@ -192,5 +192,5 @@ ledger (issues #71/#81): (all the state `lifecycle.py check` drift-checks): `python3 "${PYAUTO_MIND:-$(test -d organs/PyAutoMind && echo organs/PyAutoMind || echo PyAutoMind)}/scripts/lifecycle.py" record --date --from-file --prompt --apply` -Then push Mind with -`prompt_sync_push "prompt: ship (#) β†’ complete"`. +Then push Mind with the paths `record` changed: +`prompt_sync_push "prompt: ship (#) β†’ complete" active.md active/ complete/index.md complete///.md`. diff --git a/skills/ship_workspace/reference.md b/skills/ship_workspace/reference.md index f2bef9de..9f49710b 100644 --- a/skills/ship_workspace/reference.md +++ b/skills/ship_workspace/reference.md @@ -125,7 +125,8 @@ SHIP_EOF python3 "${PYAUTO_MIND:-$(test -d organs/PyAutoMind && echo organs/PyAutoMind || echo PyAutoMind)}/scripts/lifecycle.py" record --date --from-file --prompt --apply ``` -Push Mind: `prompt_sync_push "prompt: ship (#) β†’ complete"`. +Push Mind with the paths `record` changed: +`prompt_sync_push "prompt: ship (#) β†’ complete" active.md active/ complete/index.md complete///.md`. If the task is not fully finished (e.g. only the library half shipped), leave it in `active.md` with an updated `status:` instead of moving it β€” any later session, diff --git a/skills/start_dev/start_dev.md b/skills/start_dev/start_dev.md index 360e0594..750ec0e9 100644 --- a/skills/start_dev/start_dev.md +++ b/skills/start_dev/start_dev.md @@ -155,9 +155,15 @@ Push the routing registration from step 6 (`/create_issue` pushed the rest): ```bash source "${PYAUTO_MIND:-$(test -d organs/PyAutoMind && echo organs/PyAutoMind || echo PyAutoMind)}/scripts/prompt_sync.sh" -prompt_sync_push "prompt: route (#) β†’ " +prompt_sync_push "prompt: route (#) β†’ " active.md +# planned.md instead of active.md when step 6 hit a conflict ``` +The helper commits only the paths it is given (relative to the Mind root). It +refuses, committing nothing, when no paths are given, when anything else in the +tree has changed, when a changed file holds conflict markers, or when a changed +`state.json` does not parse. Another session's edits are left to that session. + ## Notes - Always present the issue body for review before creating it. diff --git a/skills/start_dev_for_user/reference.md b/skills/start_dev_for_user/reference.md index 7018da5c..6db4971e 100644 --- a/skills/start_dev_for_user/reference.md +++ b/skills/start_dev_for_user/reference.md @@ -66,7 +66,7 @@ choice. If clear, proceed to the plan. If unclear: ``` 5. Tell the developer to re-run once the reporter replies. **Stop** (no plan, branch survey, or routing). The push carries the partial registration: - `prompt_sync_push "prompt: register (#) awaiting reporter info [user-facing]"`. + `prompt_sync_push "prompt: register (#) awaiting reporter info [user-facing]" active.md`. ## Plan comment (milestone #2) diff --git a/skills/start_dev_for_user/start_dev_for_user.md b/skills/start_dev_for_user/start_dev_for_user.md index a6529b9f..ced3485b 100644 --- a/skills/start_dev_for_user/start_dev_for_user.md +++ b/skills/start_dev_for_user/start_dev_for_user.md @@ -97,7 +97,8 @@ repo, branch, classification, plus the user-facing reminder ```bash source "${PYAUTO_MIND:-$(test -d organs/PyAutoMind && echo organs/PyAutoMind || echo PyAutoMind)}/scripts/prompt_sync.sh" -prompt_sync_push "prompt: route (#) β†’ [user-facing]" +prompt_sync_push "prompt: route (#) β†’ [user-facing]" active.md +# planned.md instead of active.md when step 6 hit a conflict ``` ## Notes diff --git a/skills/start_library/start_library.md b/skills/start_library/start_library.md index 2cac39d5..854a75ef 100644 --- a/skills/start_library/start_library.md +++ b/skills/start_library/start_library.md @@ -105,7 +105,7 @@ informational and may be omitted. Then: ```bash source "${PYAUTO_MIND:-$(test -d organs/PyAutoMind && echo organs/PyAutoMind || echo PyAutoMind)}/scripts/prompt_sync.sh" -prompt_sync_push "prompt: register library repos in active.md" +prompt_sync_push "prompt: register library repos in active.md" active.md ``` ### 6. Explore key files + present "ready to develop" diff --git a/skills/start_workspace/reference.md b/skills/start_workspace/reference.md index 94134e62..54eb9b46 100644 --- a/skills/start_workspace/reference.md +++ b/skills/start_workspace/reference.md @@ -71,7 +71,7 @@ The ` - ` bullets are the claim `worktree_check_conflict` reads. Both informational and may be omitted. Standalone mode β€” same shape without `library-pr:` and with only workspace repos. -Push with `prompt_sync_push "prompt: register workspace repos in active.md"`. +Push with `prompt_sync_push "prompt: register workspace repos in active.md" active.md`. ## "Ready to develop" summary From cf0339ee6ecd57a8b5cc79ecf9e17af8705e92d1 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Thu, 12 Nov 2026 17:40:25 +0000 Subject: [PATCH 2/2] docs: complete prompt_sync_push path lists per what each step writes (#554 review) Review findings on #554: several documented calls would refuse. - intake + prm: the dashboard render writes state.json too; it is now listed. - prm close-out: points at the exact line `lifecycle.py close` prints and spells out the conditional files (planned.md / parked.md when the dry run's `registry:` lines name them, autonomy_log.md for a glance shadow row, the prompt's real active/ or draft/ path, plus sweep paths); closeout.md says the same. - ship_workspace: the record path uses the same passed to `record`. - ship_library: the PR-open push carries active.md with autonomy_log.md (the row's awaiting-merge status), and the workspace-pending push gets its call. - start_library / start_workspace: add planned.md when the entry was promoted from it. Co-Authored-By: Claude Opus 5.5 --- skills/intake/intake.md | 6 +++--- skills/prm/closeout.md | 6 ++++-- skills/prm/reference.md | 23 ++++++++++++++++------- skills/ship_library/reference.md | 6 ++++-- skills/ship_workspace/reference.md | 2 +- skills/start_library/start_library.md | 1 + skills/start_workspace/reference.md | 3 ++- 7 files changed, 31 insertions(+), 16 deletions(-) diff --git a/skills/intake/intake.md b/skills/intake/intake.md index 8ed352e7..5e8c36a5 100644 --- a/skills/intake/intake.md +++ b/skills/intake/intake.md @@ -37,10 +37,10 @@ Shared routing context: `PyAutoBrain/skills/COMMANDS.md`. ```bash cd "${PYAUTO_MIND:-$(test -d "$PYAUTO_MAIN/organs/PyAutoMind" && echo "$PYAUTO_MAIN/organs/PyAutoMind" || echo "$PYAUTO_MAIN/PyAutoMind")}" - pyauto-brain intake --apply dashboard # writes dashboard.md + dashboard.html + pyauto-brain intake --apply dashboard # writes dashboard.md + dashboard.html + state.json pyauto-brain intake dashboard --check # must print "…are current" source scripts/prompt_sync.sh && prompt_sync_push "intake: file " \ - dashboard.md dashboard.html + dashboard.md dashboard.html state.json ``` `` is the file `--apply` wrote (e.g. `draft///.md`); @@ -77,7 +77,7 @@ dev workflow (issue, branch, plan). Do not bypass the Brain. twin GitHub Pages serves (real clipboard buttons; PyAutoMind's `pages_dashboard.yml` deploys it), with links derived from `repos.yaml`. Dry-run prints it, `--apply` writes it (commit via - `prompt_sync_push "" dashboard.md dashboard.html`), + `prompt_sync_push "" dashboard.md dashboard.html state.json`), `--check` exits 1 if the committed page has drifted. PyAutoMind's `dashboard_refresh.yml` self-heals a stale **render** on pushes to main β€” that is a backstop for a page nobody rebuilt, not a reason to skip step 4 above: diff --git a/skills/prm/closeout.md b/skills/prm/closeout.md index 54fc5904..311e3f7c 100644 --- a/skills/prm/closeout.md +++ b/skills/prm/closeout.md @@ -131,12 +131,14 @@ in step 6. Order is forced by the tooling, so do not reorder: changed" exit, only a `--check` that says the render is current: ```bash - pyauto-brain intake --apply dashboard # writes dashboard.md + dashboard.html + pyauto-brain intake --apply dashboard # writes dashboard.md + dashboard.html + state.json pyauto-brain intake dashboard --check # must print "…are current" ``` Never hand-edit either page. Commit the render **with** the record, then - `lifecycle.py check` and push Mind. `git show --stat HEAD` must name both + `lifecycle.py check` and push Mind with the `prompt_sync_push` line `close` + printed, plus any sweep paths ([reference.md](reference.md) β†’ "4. Mind: leave + the page true"). `git show --stat HEAD` must name both dashboard files beside the record, or leg 3 did not happen. **Push the branch you are on β€” never force `main`.** On a laptop that branch diff --git a/skills/prm/reference.md b/skills/prm/reference.md index 76a526ec..cd04e4ac 100644 --- a/skills/prm/reference.md +++ b/skills/prm/reference.md @@ -326,7 +326,7 @@ sweep and the reconcile above may both come back empty, this does not: `lifecycle.py record` alone changes what the page shows. ```bash -python3 "$BRAIN" --mind . --apply dashboard # writes dashboard.md + dashboard.html +python3 "$BRAIN" --mind . --apply dashboard # writes dashboard.md + dashboard.html + state.json python3 "$BRAIN" --mind . dashboard --check # "…are current"; exit 1 = drift python3 scripts/lifecycle.py check ``` @@ -346,14 +346,23 @@ message rather than re-rendering. Then commit + push. `prompt_sync_push` commits only the paths it is given, and refuses, committing nothing, when anything else in the tree has changed (another session's work, or a path you forgot), when a changed file holds conflict -markers, or when a changed `state.json` does not parse. Name every path this -close-out changed, both sides of any `git mv`, and every prompt the sweep retired: +markers, or when a changed `state.json` does not parse. + +`lifecycle.py close` prints the exact call as its last line, built from what it +wrote: the record, the prompt it removed (`active/` **or** `draft/`, as the dry +run's `remove:` line says), `complete/index.md`, every registry it pruned +(`active.md`, plus `planned.md` / `parked.md` whenever the dry run's `registry:` +lines name them), `autonomy_log.md` whenever it wrote the glance shadow row, and +the render's `dashboard.md dashboard.html state.json`. Run that line, adding +every file the sweep and reconcile above changed (retired prompts, their +records, repointed `epics.md` / `draft/` references): ```bash -git status --short # every line should be yours -source scripts/prompt_sync.sh && prompt_sync_push "complete: " \ - active.md active/.md complete/index.md complete///.md \ - dashboard.md dashboard.html # + retired draft/ prompts +git status --short # every line: close's list or your sweep +source scripts/prompt_sync.sh && prompt_sync_push "complete: " \ + complete///.md complete/index.md \ + active.md [planned.md] [parked.md] [autonomy_log.md] \ + dashboard.md dashboard.html state.json [sweep paths…] # [..] = when close named it git show --stat HEAD # names dashboard.md + dashboard.html? ``` diff --git a/skills/ship_library/reference.md b/skills/ship_library/reference.md index 522f5739..fde8dcb3 100644 --- a/skills/ship_library/reference.md +++ b/skills/ship_library/reference.md @@ -74,7 +74,8 @@ what the human validates instead of the pre-approval they didn't give: After PR-open, append the calibration row (`PyAutoMind/autonomy_log.md`, schema in that file's header; outcome starts `parked`/blank and is set at the human's merge decision) and push Mind with -`prompt_sync_push "mind: autonomy_log β€” at PR-open" autonomy_log.md`. +`prompt_sync_push "mind: autonomy_log β€” at PR-open" autonomy_log.md active.md` +(`active.md` carries the row's awaiting-merge status and PR keys). **Which table.** The calibration row goes in the **first** table of that file β€” the five-cell `| date | task | effective level | gates | outcome |` @@ -151,7 +152,8 @@ Options (i) new scripts and (ii) migration both route to `/start_workspace`; **Progress (option i/ii) β€” workspace work to follow:** post a "Library PR Created" comment (PR URLs, "Next: /start_workspace", API-change summary), set the `active.md` status to `library-shipped, workspace-pending`, add `library-pr:`, -push Mind. Do **not** record completion yet. +push Mind (`prompt_sync_push "prompt: library shipped (#)" active.md`). +Do **not** record completion yet. **The PR keys are schematised** β€” `PyAutoMind/REFERENCE.md` β†’ "The PR keys". Write one `- library-pr: ` line **per PR** (the key is repeatable; the diff --git a/skills/ship_workspace/reference.md b/skills/ship_workspace/reference.md index 9f49710b..bcf9e2e1 100644 --- a/skills/ship_workspace/reference.md +++ b/skills/ship_workspace/reference.md @@ -126,7 +126,7 @@ python3 "${PYAUTO_MIND:-$(test -d organs/PyAutoMind && echo organs/PyAutoMind || ``` Push Mind with the paths `record` changed: -`prompt_sync_push "prompt: ship (#) β†’ complete" active.md active/ complete/index.md complete///.md`. +`prompt_sync_push "prompt: ship (#) β†’ complete" active.md active/ complete/index.md complete///.md` (the same `` passed to `record`). If the task is not fully finished (e.g. only the library half shipped), leave it in `active.md` with an updated `status:` instead of moving it β€” any later session, diff --git a/skills/start_library/start_library.md b/skills/start_library/start_library.md index 854a75ef..61fed54b 100644 --- a/skills/start_library/start_library.md +++ b/skills/start_library/start_library.md @@ -106,6 +106,7 @@ informational and may be omitted. Then: ```bash source "${PYAUTO_MIND:-$(test -d organs/PyAutoMind && echo organs/PyAutoMind || echo PyAutoMind)}/scripts/prompt_sync.sh" prompt_sync_push "prompt: register library repos in active.md" active.md +# add planned.md when step 2 promoted the entry from it ``` ### 6. Explore key files + present "ready to develop" diff --git a/skills/start_workspace/reference.md b/skills/start_workspace/reference.md index 54eb9b46..62c9b609 100644 --- a/skills/start_workspace/reference.md +++ b/skills/start_workspace/reference.md @@ -71,7 +71,8 @@ The ` - ` bullets are the claim `worktree_check_conflict` reads. Both informational and may be omitted. Standalone mode β€” same shape without `library-pr:` and with only workspace repos. -Push with `prompt_sync_push "prompt: register workspace repos in active.md" active.md`. +Push with `prompt_sync_push "prompt: register workspace repos in active.md" active.md`, +adding `planned.md` when the entry was promoted from it. ## "Ready to develop" summary