feat(graceful-handoff): sync the ritual with the global session-end mechanism (v3.2.0)
SKILL.md had drifted from the global CLAUDE.md on two counts, both verified by grep before the rewrite: the STATE.md template predated the mandatory `board:` line and the `route:`/`route-last:` lines, and the closing line still demanded three fields where six are now required (Innboks, Modell neste okt, Oppstartskommando were missing). - New step 3 routes the next session via `repo-mailbox:route` BEFORE the Write. It cannot run after the commit: the emitted lines live inside STATE.md, so routing afterwards would dirty a file that was just committed. One invocation feeds both the three comment lines and the closing line's model fields. - `repo-mailbox` stays a soft dependency — documented fallback if it is absent or the cross-plugin Skill invocation is blocked. `route.sh`'s path is deliberately not hardcoded (plugin cache, versioned, drifts). - The single-line constraint on the three comments is now in prose: `board.sh` reads the first non-blank, non-heading, non-`<!--` line under the heading as the repo's next step, so a wrapped `rationale=` corrupts the board. - Closing line 3 -> 6 fields. The Innboks field reports what the session did rather than re-querying the mailbox — inbox handling belongs first in a session, and "no inbox injected" must never be reported as "empty". - STATE format consolidated to ONE copy. Repo CLAUDE.md restated it with the same defect; it now points at SKILL.md step 4 as the authority, following the model-rubric precedent (two copies drift, prose cannot be tested). - allowed-tools gains `Skill`. `plugin.json` description left unchanged on purpose — editing it would require the manual marketplace.json edit that release-plugin.mjs does not perform. Tests 30 -> 42, all green. They are prose greps: drift guards, not proof the ritual runs. Verifying that means a manual /graceful-handoff against a scratch repo. Release (tag + catalog ref bump) is operator-gated and NOT done here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013V59bNbWa5x2oTH2NMBJy4
This commit is contained in:
parent
9f84234440
commit
96a22474bd
7 changed files with 202 additions and 30 deletions
18
CHANGELOG.md
18
CHANGELOG.md
|
|
@ -4,10 +4,26 @@ All notable changes to graceful-handoff are documented here.
|
|||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
|
||||
## [Unreleased]
|
||||
## [3.2.0] - 2026-08-09
|
||||
|
||||
### Changed
|
||||
|
||||
- **The ritual is back in sync with the global "Session Slutt" mechanism.** SKILL.md had drifted: its STATE.md template predated the mandatory `board:` line and the `route:` / `route-last:` lines, and its closing line still demanded three fields where the global CLAUDE.md now requires six. Both are fixed, and the ordering matters — see below.
|
||||
- **New step 3: route the next session *before* STATE.md is written.** The ritual now invokes the `repo-mailbox:route` skill between `--plan` and the Write. It cannot run after the commit: the emitted lines live *inside* STATE.md, so routing afterwards would dirty a file that was just committed. One invocation feeds two consumers — the three comment lines in the template, and the `Modell neste økt` / `Oppstartskommando` fields in the closing line. Deriving the model by hand in the closing line is exactly what the lookup exists to prevent.
|
||||
- **`repo-mailbox` is a soft dependency.** The plugin is separately installable, so step 3 documents a fallback: if `repo-mailbox` is absent (or the cross-plugin `Skill` invocation is blocked), the ritual continues, fills `next-cost` by judgement, and says so explicitly rather than passing it off as a rubric lookup. `route.sh`'s path is deliberately **not** hardcoded — it sits in the plugin cache behind a version number that drifts.
|
||||
- **The template now carries the single-line constraint in prose, not just by example.** `board.sh` reads the first line under the `👉 NESTE` heading that is non-blank, non-heading and does not *start* with `<!--`, and shows it as that repo's next step across every repo — so a `rationale=` wrapped across two lines replaces the repo's next step on the board with garbage.
|
||||
- **Closing line: 3 fields → 6.** Added `Innboks`, `Modell neste økt` and `Oppstartskommando`. The inbox field **reports what the session did** rather than re-querying the mailbox: inbox handling belongs first in a session, and a fresh read at handoff time surfaces messages too late to act on. A new light step 7 makes the distinction explicit, including that "no inbox was injected" must never be reported as "empty ✅".
|
||||
- **STATE.md format consolidated to one copy.** The repo's own `CLAUDE.md` restated the format — with the same missing lines, the identical defect in a second location. It now points at SKILL.md step 4 as the authority instead, following the precedent set when the model rubric was removed from the global CLAUDE.md: two copies drift, and prose in a doc file cannot be tested.
|
||||
- `allowed-tools` gains `Skill` (needed to invoke `repo-mailbox:route`). `Bash` stays sub-scoped; `curl`/`wget` remain unapproved.
|
||||
- **`plugin.json`'s `description` is deliberately unchanged** — it is still accurate, and editing it would require the manual `marketplace.json` description edit that `release-plugin.mjs` does not perform.
|
||||
|
||||
### Tests
|
||||
|
||||
- 30 → 42. Eleven new guards in `skill-structure.test.mjs` (all three comment lines present, closed status-token set, single-line warning, `repo-mailbox:route` referenced, route step ordered *before* the Write, documented fallback, all six closing-line fields, the "three items" phrasing gone, the inbox honesty rule, and repo `CLAUDE.md` deferring to SKILL.md) plus the version/CHANGELOG pins in `plugin-manifest.test.mjs`.
|
||||
- **These are prose greps — drift guards, not correctness proofs.** None of them executes the ritual. Verifying it means running `/graceful-handoff` manually against a scratch repo.
|
||||
|
||||
### Changed (documentation, released with this version)
|
||||
|
||||
- **README brought in line with the org repo standard** (`repo-standard` gate, 0 ERROR). Documentation only — no plugin code, version, or behaviour changed. H1 is now the repo name; the opening line is verbatim the forge description (so description == catalog == README is machine-checkable); `## Install` is a top-level heading on the first screen and carries the CLI command `claude plugin install graceful-handoff@ktg-plugin-marketplace` next to `marketplace add`; `## Non-goals` and `## Changelog` sections added.
|
||||
- **Dropped the static `tests-30` badge.** This forge has no CI runner, so the badge asserted a run nothing verifies. The Testing section now states the command and says plainly that nothing runs it automatically. Note for the catalog: the tests axis no longer has a badge backing it.
|
||||
- **Fixed two dead `../../README.md` references** inherited from the monorepo (README lines 7 and the marketplace footer) — both pointed outside a standalone repo and 404'd.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue