| index b922b58..efaf4ec 100644 |
| --- a/.claude/skills/end-session/SKILL.md |
| +++ b/.claude/skills/end-session/SKILL.md |
| @@ -21,13 +21,21 @@ Work through both gates, then end with the owed/clear summary at the bottom. |
| 2. **Working trees.** `git status` in the main checkout, and `git worktree list` |
| then `git -C <wt> status` for every open worktree. Uncommitted changes → |
| commit (area-prefixed: `web:`/`server:`/`docs:`…) or explain why they're left. |
| -3. **Unpushed commits.** `git log --branches --not --remotes --oneline` — anything |
| - printed is local-only. Push it (feature branches, never straight to `main`). |
| -4. **Open PRs.** `gh pr list --author @me --state open` — for each, either it's |
| - ready (offer to `gh pr merge <n> --squash --delete-branch`) or say what it's |
| - waiting on. After a squash-merge, delete the remote branch + `git worktree |
| - remove` the merged worktree (gh may fail the local step when `main` is a |
| - sibling worktree — that's cosmetic; the server-side merge still lands). |
| +3. **Unpushed commits.** `git log --branches --not --remotes --oneline`. ⚠️ In a |
| + **shared checkout this lists every session's local branches, not just yours** — |
| + scope to the branches THIS session created. Anything of yours that's genuinely |
| + local-only → push it (feature branches, never `main`). Note a squash-merged |
| + branch leaves a **stale local ref** that shows here as "unpushed" even though |
| + the work is on `main` — that's not owed work, just delete the ref |
| + (`git branch -D <branch>`). |
| +4. **Open PRs.** `gh pr list --author @me --state open`. ⚠️ This returns **all of |
| + your account's open PRs across every session** (the team commits under one |
| + author here), so **scope to the PRs THIS session opened** — the rest are other |
| + sessions' and not yours to touch. For each of yours: it's ready (offer to |
| + `gh pr merge <n> --squash --delete-branch`) or say what it's waiting on. After a |
| + squash-merge, delete the remote branch + `git worktree remove` the merged |
| + worktree (gh may fail the local step when `main` is a sibling worktree — that's |
| + cosmetic; the server-side merge still lands). |
| 5. **Leftover worktrees** from already-merged branches → `git worktree remove`. |
| 6. **Shared `main` checkout** is shared with other sessions — don't force-pull or |
| mutate it; just report if it's behind after a merge. |
| @@ -76,14 +84,25 @@ session as **"no summary recorded"** (that state IS the enforcement). |
| accrual is a judgment call you run. |
| |
| ### B3. Prompt registry |
| -- Run `node tools/prompt-registry.mjs check`. **Silent / "no corpus at …" → |
| - nothing owed** (publishing is opt-in; the nudge follows that choice). If it |
| - nags (corpus >3 days old *and* transcripts touched since), accrue per |
| - `docs/status.md § The prompt registry`: build (`--out <dir>`), **summarise the |
| - new sessions with haiku subagents over the REDACTED build output only** (never |
| - raw transcripts), re-build (fail-closed re-scan), upload the corpus, and commit |
| - the hash-ledger entry. It's heavy and judgment-bound — surface it clearly and |
| - do it deliberately, don't half-run it. |
| +**Nothing auto-publishes the registry.** The only automation is the SessionStart |
| +hook running `check`, which merely *nags* — building, **summarising**, and |
| +uploading are all manual, so the ledger drifts whenever they're skipped. |
| +- Run `node tools/prompt-registry.mjs check`. **Silent / "no corpus at …"** means |
| + the *staleness* nag is quiet — but ⚠️ **`check` only tests corpus AGE (>3 days), |
| + not whether recent sessions are SUMMARISED.** A corpus published <3 days ago |
| + without the haiku step passes silently. The visible tell is rows on |
| + `prompts.html` that fall back to **"FIRST PROMPT / LATEST"** instead of a |
| + one-line summary — those sessions still owe the **haiku summarise** step even |
| + though `check` is quiet. So don't trust `check` alone here: glance at |
| + `prompts.html` (or the built `index.json`) for un-summarised rows. |
| +- To accrue (nagged, OR un-summarised rows exist), per `docs/status.md § The |
| + prompt registry`: build (`--out <dir>`) → **summarise every new session with |
| + haiku subagents over the REDACTED build output only** (never raw transcripts; |
| + ≤90-char one-liners ending in the session's most relevant GitHub URL) → re-build |
| + (fail-closed re-scan) → upload the corpus → commit the hash-ledger entry. It's |
| + heavy, creds-bound (bucket PutObject), and judgment-bound (the security sweep) — |
| + publishing is opt-in, so do it deliberately, never half-run it, and never |
| + auto-publish it from this skill. |
| |
| ## What this skill does NOT do |
| - Merge / deploy / publish without the user's OK — fleet publishes, box scps, and |