@@ -209,17 +209,66 @@ Tags use `prefix:value` format for consistent discovery:
209209
210210### Recommended Workflow
211211
212- 1 . ** RECALL before working** — always check existing knowledge before starting a task
213- 2 . ** ADD after learning** — record discoveries, decisions, and observations immediately
214- 3 . ** SUPERSEDE, don't edit** — when knowledge changes, add a new memory and deprecate the old one
215- 4 . ** CHECK STALENESS periodically** — use ` memory stale ` to maintain knowledge quality
212+ #### 1. READ — Peek then Drill (two-phase recall)
213+
214+ Always use a ** two-phase** approach. Never go straight to body text on broad queries.
215+
216+ ** Phase A — Peek** (scan titles, zero body text):
217+ ``` bash
218+ memory recall --tag topic:gateway --format brief --expand 0
219+ ```
220+ Returns ` [ID] Title (confidence) ` one-liners. Minimal tokens. Do this FIRST.
221+
222+ ** Phase B — Drill** (read full body of specific memories):
223+ ``` bash
224+ memory get DEC_handler_context_pattern
225+ ```
226+ Only after peeking — pick the 2-3 most relevant IDs and ` get ` them individually.
227+
228+ ** When to recall** — recall is NOT just a session-start ritual. Recall at each of these moments:
229+
230+ | Trigger | What to recall |
231+ | ---------| ---------------|
232+ | Session start | ` recall --format brief --limit 20 --sort newest ` |
233+ | New task or topic | ` recall --tag topic:<X> --format brief ` |
234+ | Entering unfamiliar code | ` recall --tag repo:<X> --type fact --format brief ` |
235+ | Before a design decision | ` recall --tag topic:<X> --type dec ` |
236+ | When stuck or debugging | ` recall <error keywords> ` |
237+ | Before implementing a pattern | ` recall --tag intent:coding-style --type pref ` |
238+
239+ #### 2. WRITE — Record at specific trigger points
240+
241+ Recording memories is NOT optional. Write at these concrete moments:
242+
243+ | Trigger | Type | Example |
244+ | ---------| ------| ---------|
245+ | Chose approach A over B | ` dec ` | "Use tl::expected over exceptions" |
246+ | Fixed a non-obvious bug | ` mem ` | "EntityCache race condition fix" |
247+ | Discovered undocumented API | ` fact ` | "Routes match in registration order" |
248+ | User stated a preference | ` pref ` | "Prefer Zustand over Redux" |
249+ | Identified a risk | ` risk ` | "JWT secret hardcoded in tests" |
250+ | Question remains unanswered | ` q ` | "Should synthetic components expose operations?" |
251+
252+ ** End-of-task writes** : summarize architecture learned (` fact ` ), record conventions (` pref ` ), note anything a future agent needs (` mem ` ), capture unfinished goals (` goal ` ).
253+
254+ ** Write quality rules** :
255+ - ` --tags ` is mandatory — without tags, the memory is unfindable
256+ - ` --body ` must be self-contained with file paths and concrete details
257+ - Use ` --rebuild ` flag to make new memories immediately searchable
258+
259+ #### 3. SUPERSEDE, don't edit
260+
261+ When knowledge changes, add a new entry with ` --supersedes OLD_ID ` and deprecate the old one.
262+
263+ #### 4. CHECK STALENESS periodically
264+
265+ Run ` memory stale ` at the start of long sessions to keep the graph accurate.
216266
217267### Context Window Optimization
218268
219- - Default ` recall ` omits body text — use ` memory get <ID> ` only when you need details
220- - Use ` --format brief ` for initial scanning, then drill into specific IDs
221- - Use ` --limit 10 ` when exploring broad topics
222- - Use ` --expand 0 ` to skip graph expansion for exact matches only
269+ - ` recall ` omits body by default — this is intentional, not a limitation
270+ - ** Peek** with ` --format brief ` → ** drill** with ` get <ID> ` — this is the core pattern
271+ - Use ` --limit 10 ` and ` --expand 0 ` when exploring broad topics
223272- Use ` --tag ` filters to narrow results instead of free-text
224273- Use ` memory tags ` to discover available tag prefixes before filtering
225274
0 commit comments