Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 141 additions & 10 deletions .claude/commands/remember.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
---
description: Commit this conversation to working memory. Extracts knowledge, decisions, insights, open threads, and next actions.
description: Commit this conversation to working memory. Extracts knowledge, decisions, insights, open threads, and next actions — then writes a living summary and changelog entry for the detected project node. Also flushes any observations accumulated by the passive learning engine. Can run in full mode (user-triggered) or silent mode (auto-triggered at conversation end).
---

# /remember

You are committing this conversation to working memory. Work through the following steps precisely.
You are committing this conversation to Claude's working memory. Work through the following steps precisely.

---

## Mode Detection

This command runs in one of two modes:

### Full mode (default — user triggered /remember explicitly)
- Complete extraction with all steps below
- Confirmation output at the end
- User sees what was committed

### Silent mode (auto-triggered at conversation end)
- Same extraction logic, but NO confirmation output
- Triggered when the conversation is ending (farewell signals detected)
- Skip if the conversation was trivial (no decisions, no knowledge, no meaningful observations)
- Exception: if creating a NEW node, briefly mention: "Noted — started tracking [node-id]."
- Always commit user observations (corrections, preferences) even from trivial conversations — these are never wasted

---

## Step 1 — Detect the project node

Scan the full conversation and identify which project(s) this session belongs to.

Check existing memory for any established project nodes first. If a matching node exists, use it. If the session covers something genuinely new, create a new node using kebab-case.
Check Claude's existing memory for any established project nodes first. If a matching node exists, use it. If the session covers something genuinely new, create a new node using kebab-case.

**Node naming conventions:**
- Client work: prefix with `client:` (`client:acme-corp`, `client:northstar`)
Expand Down Expand Up @@ -93,30 +111,36 @@ INSIGHTS:
- New understanding gained during this session
- "Aha" moments, reframes, or realizations
- Connections spotted between previously unrelated things
- Example: "Realized our churn isn't a product problem — it's an onboarding problem. Customers who complete setup in week 1 retain at 92%."

LESSONS LEARNED:
- Things tried that worked → why they worked
- Things tried that failed → why they failed, what to do instead
- Mistakes made → what the correct approach is
- Example: "Tried sending proposals same-day — close rate dropped. Waiting 48 hours with a tailored deck closes 3x better."

MENTAL MODELS:
- How something works, explained for future reference
- Business processes, decision frameworks, domain rules, workflows
- "The way X actually works is..."
- Example: "Their approval process: department head → finance review → VP sign-off → procurement. Skip finance and it stalls for weeks."

GOTCHAS & PITFALLS:
- Specific traps or non-obvious behaviors in processes, tools, or relationships
- Things that look like they should work but don't
- Surprising rules, undocumented requirements, edge cases
- Example: "Their fiscal year starts in April, not January — all budget conversations need to reference Q1 as April-June."

PATTERNS & RECIPES:
- Techniques or approaches that proved effective
- Reusable solutions to specific types of problems
- Workflows or processes worth repeating
- Example: "For getting executive buy-in: lead with the metric they own, show the gap, propose one action, name the timeline."

CORRECTED BELIEFS:
- Assumptions that turned out to be wrong
- Previous understanding that was updated or reversed
- Example: "Previously assumed they were price-sensitive — actually they have budget, they just need ROI framing to get internal approval."

CONTEXT & BACKGROUND:
- Domain knowledge needed to understand this project or topic
Expand All @@ -131,6 +155,7 @@ CONTEXT & BACKGROUND:
CROSS-PROJECT SIGNALS:
- Anything with implications for a different node
- Knowledge that applies across projects
- "The caching pattern here would solve the performance issue in [other-node]"

PEOPLE:
- Anyone who came up: name, role, context
Expand All @@ -143,11 +168,39 @@ QUESTIONS FOR NEXT TIME:
- Hypotheses to confirm or reject
```

### D. User Observations (from passive learning engine)

```
PREFERENCES:
- Communication style signals (terse vs. detailed, options vs. decisions)
- Tool/platform preferences expressed or demonstrated
- Working style patterns (batching, time-of-day, delegation)
- Vocabulary and framing they use and expect

CORRECTIONS:
- Anything the user corrected about your approach
- Implicit corrections (they ignored your suggestion and did it differently)
- Format: [what was wrong] → [what they wanted] → [why, if given]

DOMAIN CONTEXT:
- Facts about their company, team, industry shared in passing
- How their processes/systems work
- Constraints they operate under
```

These observations are ALWAYS extracted, even in silent mode. They go to the `user` node, not project nodes (unless the observation is project-specific domain knowledge).

---

## Step 3 — Write to memory

Memory is stored at `~/Documents/Claude/memory/`. Create directories as needed.
### Storage Location

Memory is stored in `~/Documents/Claude/memory/`.

**Before writing**: Ensure the memory directory exists (`~/Documents/Claude/memory/` on macOS/Linux, or `%USERPROFILE%\Documents\Claude\memory` on Windows). Create parent folders if missing.

If the directory cannot be created or accessed, explain that memory cannot be persisted without this folder and stop.

1. Determine the file path from the node ID:
- If node has a prefix (e.g., `client:acme-corp`): `memory/{prefix}/{slug}.md`
Expand All @@ -162,6 +215,35 @@ Memory is stored at `~/Documents/Claude/memory/`. Create directories as needed.
- Add any new knowledge entries to Recent Knowledge (keep last 7 days only)
- Update the "Last updated" timestamp

#### Dashboard File Format

If `DASHBOARD.md` doesn't exist, create it with this template:

```markdown
# Working World Dashboard
> Last updated: YYYY-MM-DD

## Active Nodes
| Node | Summary | Last Updated |
|------|---------|-------------|
| [node-id] | [1-line living summary] | YYYY-MM-DD |

## P0 Actions
- [P0] [node-id]: [action]

## Waiting On
- [WAITING:who] [node-id]: [what]

## Recent Knowledge (last 7 days)
- [node-id] [TYPE] (date): [entry]

## Stale Threads
- [node-id]: [thread] — open since [date]

## Dormant Nodes
- [node-id]: Last active [date]
```

#### Node File Format

```markdown
Expand Down Expand Up @@ -210,6 +292,45 @@ Memory is stored at `~/Documents/Claude/memory/`. Create directories as needed.
[node] SIGNAL from [other-node] (date): [implication]
```

### User Node — Observation Flush

**Before writing project data**, flush observations to the user profile node:

1. File path: `~/Documents/Claude/memory/user.md`
2. If it doesn't exist, create it with this template:

```markdown
# user
> Last updated: YYYY-MM-DD

## Communication Preferences

## Working Style

## Corrections

## Domain Expertise

## Relationships & Org Context

## Tool & Platform Preferences
```

3. Append new observations to the appropriate section:
- Preferences → Communication Preferences or Working Style or Tool & Platform Preferences
- Corrections → Corrections (always — these are highest priority)
- Domain context → Domain Expertise
- Relationship info → Relationships & Org Context

4. Before appending, check for duplicates or contradictions:
- If new observation reinforces existing → skip (already captured)
- If new observation contradicts existing → write a CORRECTION entry, remove the old one
- If new observation is genuinely new → append

5. Update `DASHBOARD.md` with the user node's last-updated timestamp

**Confidence gating**: Only commit observations with reasonable confidence. A single offhand remark is a signal, not a fact. But direct corrections — always commit.

### A. Living Summary (replace if exists, create if new)

Format:
Expand Down Expand Up @@ -281,19 +402,29 @@ Scan for:

## Step 5 — Confirm

### Full mode (user-triggered)

Respond with:
1. **Node(s)** written to
2. **Living summary** (for verification)
3. **Knowledge captured** — list INSIGHT/LESSON/MODEL/GOTCHA/RECIPE/CORRECTION entries
4. **Open threads** with staleness
5. **Blockers** (if any)
6. **Next actions** — P0 → P1 → P2 → WAITING
7. **Cross-project signals** (if any)
8. **Knowledge updates** — prior entries invalidated, reinforced, or corrected
9. **Unanswered questions** carried forward
4. **Observations captured** — count of preferences, corrections, patterns written to user node
5. **Open threads** with staleness
6. **Blockers** (if any)
7. **Next actions** — P0 → P1 → P2 → WAITING
8. **Cross-project signals** (if any)
9. **Knowledge updates** — prior entries invalidated, reinforced, or corrected
10. **Unanswered questions** carried forward

Keep tight. Skimmable in 20 seconds.

### Silent mode (auto-triggered)

- Say nothing unless creating a new node
- If creating a new node: "Noted — started tracking [node-id]."
- If a critical correction was captured that changes future behavior, optionally note: "Got it — I'll [adjusted behavior] going forward."
- Otherwise: complete silence. The user shouldn't notice the commit happened.

---

## Memory hygiene
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to the Cortex Plugin are documented here.

Format follows [Keep a Changelog](https://keepachangelog.com/). Versions match `plugin.json`.

## [Unreleased]

### Fixed
- `.claude/commands/remember.md` now includes v4 features: silent mode, user observation extraction, user node writes, and dashboard template (parity with `commands/remember.md`).

## [4.0.0] — Always-On Learning

### Added
Expand Down
Loading