diff options
Diffstat (limited to 'claude-templates')
| -rw-r--r-- | claude-templates/.ai/protocols.org | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/claude-templates/.ai/protocols.org b/claude-templates/.ai/protocols.org index 600ddd6..30b0274 100644 --- a/claude-templates/.ai/protocols.org +++ b/claude-templates/.ai/protocols.org @@ -98,7 +98,11 @@ The Summary lets a future reader scan quickly. The Log preserves the /why/ and t *** When to update (Session Log) -Append to the Session Log at /progress points/ — moments where something has changed that you'd want to recover to if the session crashed right now: +*Primary trigger (mechanical).* A turn that called any state-modifying tool — Edit, Write, Agent dispatch, MCP write, or Bash that mutates state (anything beyond pure reads like =git status=, =ls=, =grep=, =cat=) — writes to the Session Log before the closing user-facing message. This is not a judgment call. If the turn changed state, the turn gets a Session Log entry before the response goes out. The entry can be brief: one short paragraph naming what changed and why. + +Pure-read turns (only Read, Glob, Grep, or read-only Bash) do not trigger. Conversational turns with no tools do not trigger. + +The bullets below are not optional supplements — they all change state and so the primary trigger already covers them. They appear explicitly because they are the high-loss moments where missing the write is most expensive: - A decision was reached ("we agreed on X, not Y") - A workflow phase completed, or a new phase is starting @@ -108,8 +112,6 @@ Append to the Session Log at /progress points/ — moments where something has c - Before long-running or blocking tool calls — agent spawns, builds, rsync/ssh loops, MCP calls to external services. You could be waiting minutes; if anything crashes during the wait, everything since the last save is gone. - Before destructive or irreversible operations — =rm -rf=, =git reset --hard=, force-push, package removal, database drops. If the op succeeds and something breaks afterward, you need to know what state you caused. -Heuristic: /"If this session crashed right now, what would I wish I had written down?"/ If the answer is substantive, append to the Log. - *** Safety net If 5 user turns pass without appending to the Log, save anyway. Semantic triggers should catch most cases; this fallback covers judgment failures. |
