From d576fc217ba304b48dfb1c54b92bc1849397fd9b Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 11 Jun 2026 11:32:40 -0500 Subject: fix(install): link default hooks in make install session-clear-resume.sh shipped 2026-06-02 with its settings.json entry, but make install didn't cover hooks and nothing re-ran install-hooks, so the symlink only existed on machines that had linked it by hand. Everywhere else the hook errored silently on every /clear. make install now links DEFAULT_HOOKS alongside skills, rules, config, and bin scripts, so the startup workflow's install step propagates new hooks machine-wide. Opt-in hooks stay manual. scripts/tests/install-hooks-link.bats covers the new section. The SessionStart-on-clear todo task closes with this: the hook feature already existed, and the gap was distribution. --- todo.org | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'todo.org') diff --git a/todo.org b/todo.org index 30fd7e0..bae9d09 100644 --- a/todo.org +++ b/todo.org @@ -42,14 +42,23 @@ The org-table standard keeps project-doc tables <=120 cols with multi-line wrapp Out of a work-project handoff 2026-06-09. -** TODO [#C] SessionStart-on-clear hook for auto-resume :feature: +** DONE [#C] SessionStart-on-clear hook for auto-resume :feature: +CLOSED: [2026-06-11 Thu] :PROPERTIES: -:LAST_REVIEWED: 2026-06-10 +:LAST_REVIEWED: 2026-06-11 :END: Add a SessionStart hook (matcher: clear) in settings.json that auto-injects "read .ai/session-context.org and resume if present, else run startup.org". Today /flush prompts the user to /clear and the next session relies on the model re-reading session-context; the hook makes resume automatic on /clear. Keep full startup.org for genuine fresh starts (new day, other machine, been away). Likely lands as claude-templates workflow notes plus the hook in settings.json. The checkpoint+resume halves already shipped as /flush. This is the remaining automation piece. Out of a work-project handoff 2026-06-09 (process tooling, belongs in rulesets not the work project). +Resolution 2026-06-11: the hook itself had already shipped 2026-06-02 (hooks/session-clear-resume.sh + the SessionStart clear entry in the tracked settings.json — this task duplicated it). What was actually broken: make install didn't cover hooks, so the symlink never reached machines that hadn't run make install-hooks by hand, and the hook errored silently on every /clear. Fixed by folding default-hook linking into make install (startup's Phase A.0 now propagates hooks machine-wide), with bats coverage in scripts/tests/install-hooks-link.bats. Both hook branches verified on ratio; the live /clear fire is a one-keystroke manual test. +*** TODO Manual testing and validation :test: +**** /clear mid-session resumes from the anchor +What we're verifying: the SessionStart(clear) hook fires and the fresh context resumes instead of cold-starting. +- In any project session with a live .ai/session-context.org (this rulesets session qualifies), type /clear +- Send any short message (the injected context loads but the model waits for your next keystroke) +Expected: the reply starts with "flushed." on its own line, restates the Active Goal and immediate Next Step, and does NOT run the startup workflow. + ** DOING [#C] Check that memories are sync'd across machines via git :spec: :PROPERTIES: :LAST_REVIEWED: 2026-06-10 -- cgit v1.2.3