diff options
Diffstat (limited to 'hooks')
| -rwxr-xr-x | hooks/session-clear-resume.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/hooks/session-clear-resume.sh b/hooks/session-clear-resume.sh index 6692f54..56b7b2f 100755 --- a/hooks/session-clear-resume.sh +++ b/hooks/session-clear-resume.sh @@ -45,7 +45,17 @@ else fi if [ -f "$sc" ]; then - ctx="A context flush just happened (/clear). The session-context anchor is at ${sc}. Read it now — the * Summary (Active Goal, Next Steps) plus the most recent * Session Log entries — then reply with 'flushed.' on its own line, followed by one line restating the Active Goal and the immediate Next Step, and resume that work. This is a mid-session resume, NOT a fresh start: do not run the startup workflow, do not re-pull rulesets or re-sync templates." + # On resume, read notes.org standing knowledge (code-repo paths, + # conventions, key contacts) BEFORE the anchor — the anchor carries + # session state, notes.org carries the project context a resumed session + # needs to act correctly. Same "key sections" scope startup uses. Only + # when notes.org is present; otherwise resume from the anchor alone. + if [ -f ".ai/notes.org" ]; then + read_order="First read .ai/notes.org key sections (Project-Specific Context, Active Reminders, Pending Decisions; skip About This File) for the project's standing knowledge — code-repo paths, conventions, key contacts. Then read the session-context anchor at ${sc}" + else + read_order="Read the session-context anchor at ${sc}" + fi + ctx="A context flush just happened (/clear). ${read_order} — the * Summary (Active Goal, Next Steps) plus the most recent * Session Log entries. Then reply with 'flushed.' on its own line, followed by one line restating the Active Goal and the immediate Next Step, and resume that work. This is a mid-session resume, NOT a fresh start: do not run the startup workflow, do not re-pull rulesets or re-sync templates." else ctx="Session started with no session-context anchor present (.ai/session-context.org absent). Run the startup workflow at .ai/workflows/startup.org." fi |
