mirror of
https://github.com/garrytan/gstack.git
synced 2026-06-17 07:10:12 +02:00
docs(memory): document the cross-session decision-memory loop in CLAUDE.md
Adds a '## Cross-session decision memory' section: how to resurface (gstack-decision-search) and capture (gstack-decision-log) durable decisions, the supersede/redact/compact verbs, and a crisp durable-vs-trivial definition so the store stays signal. Reliable file-only path; gbrain not required. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -903,6 +903,29 @@ Key routing rules:
|
||||
- Save progress → invoke /context-save
|
||||
- Resume context → invoke /context-restore
|
||||
|
||||
## Cross-session decision memory
|
||||
|
||||
Durable decisions and their rationale are captured in an append-only, event-sourced
|
||||
store at `~/.gstack/projects/<slug>/decisions.jsonl` so neither you nor the user
|
||||
re-litigates a settled call or loses the "why" across sessions. This is the reliable,
|
||||
file-only path: it works with gbrain OFF. (gbrain semantic recall is an optional
|
||||
enhancement layered on top, never a dependency.)
|
||||
|
||||
- **Resurface** active decisions before re-deciding: `bin/gstack-decision-search`
|
||||
(`--recent N`, `--scope repo|branch|issue`, `--query KW`, `--all`, `--json`).
|
||||
Session start already surfaces scope-relevant active decisions via Context Recovery.
|
||||
If a decision is listed, treat it as settled with its rationale; if you're about to
|
||||
reverse it, say so explicitly.
|
||||
- **Capture** a DURABLE decision when you or the user make one:
|
||||
`bin/gstack-decision-log '{"decision":"...","rationale":"...","scope":"repo|branch|issue","source":"user|skill|agent","confidence":1-10}'`.
|
||||
Reverse a prior call with `--supersede <id>`; expunge an accidental secret with
|
||||
`--redact <id>`; rewrite the log to the active set with `--compact`. Non-interactive
|
||||
(never prompts), injection-sanitized, and HIGH-secret-blocking on write.
|
||||
- **Durable means:** architecture choice, scope cut, tool/vendor choice, or a reversal
|
||||
of a prior call. NOT a turn-level edit, a phrasing tweak, or anything trivially
|
||||
re-derivable. Capture is curated at the source — log durable decisions only, or the
|
||||
store becomes noise.
|
||||
|
||||
## GBrain Search Guidance (configured by /sync-gbrain)
|
||||
<!-- gstack-gbrain-search-guidance:start -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user