From c553f04085e7088f8d1f3fa38ab6fad4fc80598e Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 27 Aug 2026 19:06:54 +0000 Subject: [PATCH] =?UTF-8?q?docs(skills):=20a=20Mind=20ledger=20push=20land?= =?UTF-8?q?s=20itself=20=E2=80=94=20stop=20leaving=20branches=20hanging?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PyAutoMind now auto-merges a ledger-only `claude/**` push into main and deletes the branch (mind_ledger_merge.yml). Every skill that mutates Mind state ends in `prompt_sync_push`, so the fact belongs once in WORKFLOW.md — the shared page they all point at — rather than in ten skill bodies. /prm step 5.4 said "push Mind on `main`", which is wrong on every branch-scoped surface and is exactly where the close-out's ledger commit was stranding. It now says push the branch you are on, names the three outcomes (lands by itself / waits for a human because the diff touched code / never was going to merge because `lifecycle.py check` fails), and gives the one command that tells them apart before the push. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01CmGdNA97ajAyLJ4jemvki8 --- skills/WORKFLOW.md | 16 ++++++++++++++++ skills/prm/prm.md | 21 ++++++++++++++++++--- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/skills/WORKFLOW.md b/skills/WORKFLOW.md index 9ad7dae5..de876df4 100644 --- a/skills/WORKFLOW.md +++ b/skills/WORKFLOW.md @@ -233,6 +233,22 @@ that resolve from any sibling repo: drift-checks them (`check`). See `PyAutoMind/complete/AGENTS.md` (issues #71/#81). - `source PyAutoMind/scripts/prompt_sync.sh` → `prompt_sync_push ""` (commit+push registry) +`prompt_sync_push` pushes **the branch you are on**, never a hardcoded `main` — +on a laptop that branch is `main`; on a branch-scoped surface (the phone, +claude.ai/code, any `claude/**` flow) it is the session's branch. **That is the +whole job either way.** A registry/prompt/record/dashboard diff is *ledger*, and +`PyAutoMind/.github/workflows/mind_ledger_merge.yml` merges a ledger-only +`claude/**` push into `main` and deletes the branch, unattended — no PR, and +nothing for the human to merge afterwards. Do not leave a Mind branch hanging, +and do not ask for it to be merged. + +The gate is default-deny and blocks on code: a push that also touches +`PyAutoMind/scripts/`, `tests/`, `.github/`, `skills/`, `policy/`, `docs/`, +`repos.yaml` or the prose pages waits for a human — say so rather than implying +the state landed. `python3 scripts/ledger_merge.py classify --base origin/main` +in the Mind checkout answers it before you push; the contract is +`PyAutoMind/REFERENCE.md` "How the ledger lands". + `active.md` task schema, the completion-record schema, and the prompt taxonomy (`draft/feature//`, `draft/bug//`, …) are documented in `PyAutoMind/README.md`. **Under `draft/`, the first folder is the work type, the diff --git a/skills/prm/prm.md b/skills/prm/prm.md index 9e2eae44..64036bef 100644 --- a/skills/prm/prm.md +++ b/skills/prm/prm.md @@ -172,8 +172,21 @@ Typing `/prm` authorized all of this; the only questions are the guards in step ``` Never hand-edit either page. Commit the render **with** the record, then - `lifecycle.py check` and push Mind on `main`. `git show --stat HEAD` must name - both dashboard files beside the record, or leg 3 did not happen. + `lifecycle.py check` and push Mind. `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 + *is* `main`. On a branch-scoped surface (the phone, claude.ai/code, any + `claude/**` flow) it is the session's branch, and pushing it is the whole + job: a close-out diff is ledger by construction, so + `mind_ledger_merge.yml` merges it into `main` and deletes the branch within + a minute — no PR, and no "merge that branch too" left for the human. Say in + the ledger that the Mind branch was pushed and will land itself. Two things + change that: the close-out also touched `scripts/`, `.github/`, `skills/` or + another code path (then the branch waits for a human — say so plainly), or + `lifecycle.py check` fails (then it was never going to merge; fix the drift). + `python3 scripts/ledger_merge.py classify --base origin/main` in the Mind + checkout tells you which of the three you are in. 5. **Worktree** — `worktree_remove `, never `rm -rf`. It refuses on a dirty repo and on a claim still registered in `active.md` — which is exactly why step 3 comes first. @@ -209,7 +222,9 @@ Stop and report instead of pressing on when: ## Notes - `/prm` merges an **existing** PR. No PR yet → `/ship_library` or - `/ship_workspace` first; `/prm` will say so rather than opening one. + `/ship_workspace` first; `/prm` will say so rather than opening one. The one + exception is Mind's own close-out commit, which needs no PR at all: pushing + the branch is what lands it (step 5.4). - It never bypasses the Heart readiness gate — that ran at ship time, and a red Heart is not something a merge shortcut may re-judge. Nor does merge ever stop being human: `/prm` is a human-typed door, never invoked by the `--auto` queue.