diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-02 21:14:56 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-02 21:14:56 -0500 |
| commit | 2433e74131582e7010fba4e561f40d793bdc5334 (patch) | |
| tree | b8283e08a77d6252be2b1d764590766a94f1791b /flush | |
| parent | 656f11d8aea1595ce72f04b44744764c1ef343fa (diff) | |
| download | rulesets-2433e74131582e7010fba4e561f40d793bdc5334.tar.gz rulesets-2433e74131582e7010fba4e561f40d793bdc5334.zip | |
feat(flush): read notes.org before the anchor on resume
On a flush resume, the SessionStart(clear) hook now reads .ai/notes.org key sections before the session-context anchor. The anchor carries session state. notes.org carries the project's standing knowledge (code-repo paths, conventions, key contacts) that a resumed session needs to act correctly. A resume with the anchor alone floundered on context notes.org already documents, hunting for a repo whose path notes.org records.
The hook guards on notes.org presence: when it's absent, the resume reads the anchor alone. flush/SKILL.md documents the same read order so the skill and the hook agree. The handoff rationale is preserved in docs/design/2026-06-02-flush-promotion.org.
Diffstat (limited to 'flush')
| -rw-r--r-- | flush/SKILL.md | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/flush/SKILL.md b/flush/SKILL.md index d46c18b..4c2709a 100644 --- a/flush/SKILL.md +++ b/flush/SKILL.md @@ -72,9 +72,11 @@ That is the wrap/restart rhythm. When both conditions hold, run Phase 1 and end This half is driven by the `SessionStart(clear)` hook, not by this skill — but it is documented here so the loop is legible. -1. The user types `/clear`. The hook `~/.claude/hooks/session-clear-resume.sh` fires and injects "read the anchor, reply 'flushed.', resume" into the fresh context. +1. The user types `/clear`. The hook `~/.claude/hooks/session-clear-resume.sh` fires and injects the resume instruction into the fresh context. 2. The user sends any message (e.g. "go", "resume"). The injected context loads at `/clear` but the model waits for the user's next message before acting — that one keystroke is expected, not a bug. -3. The fresh agent reads the anchor, replies `flushed.` on its own line, restates the Active Goal and immediate Next Step, and continues. It does NOT run startup or re-sync anything — this is a resume, not a fresh start. +3. The fresh agent reads `.ai/notes.org` key sections (Project-Specific Context, Active Reminders, Pending Decisions) first, then the anchor, replies `flushed.` on its own line, restates the Active Goal and immediate Next Step, and continues. It does NOT run startup or re-sync anything — this is a resume, not a fresh start. + +The notes.org-before-anchor order matters: the anchor carries session-specific state, but notes.org carries the project's standing knowledge — code-repo paths, conventions, key contacts — that a resumed session needs to act correctly. Reading the anchor alone has led a resumed session to flounder on context notes.org already documents. When notes.org is absent, the hook resumes from the anchor alone. If the anchor is absent (a stray `/clear` with no prior flush), the hook instead points the fresh session at the startup workflow. |
