Skip to content

Commit f613383

Browse files
committed
feat: add memory care and multi-workspace handoffs
1 parent f3e6c7f commit f613383

24 files changed

Lines changed: 514 additions & 4 deletions

AGENTS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,10 @@ A typical day has two short cross-harness summaries plus a session-review pass a
118118
|-----|----------|----------|
119119
| Nightshift standup | typical: `0 21 * * *` | `memory/cards/pipeline-standups.md` |
120120
| Memory sweep / session review | typical: `0 22 * * *` | `memory/cards/memory-scanner.md` |
121+
| Memory-care staleness scan | typical: quiet hours | `memory/cards/memory-care-staleness.md` |
121122
| Morning report | typical: `0 8 * * *` | `memory/cards/pipeline-standups.md` |
122123

123-
Standups summarize state already in memory. The memory scanner promotes durable findings *into* memory from the day's sessions. Run order: standup -> scanner -> overnight ingester sweeps -> morning report next day.
124+
Standups summarize state already in memory. The memory scanner promotes durable findings *into* memory from the day's sessions. Memory care checks existing cards for stale facts. Run order: standup -> scanner -> overnight ingester sweeps -> memory-care scan -> morning report next day.
124125

125126
## Multi-Agent Workflow
126127

INSTALL_FOR_AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ You may be invoked as the agent behind any of these. They are isolated sessions;
3232

3333
See `memory/cards/pipeline-standups.md` and `memory/cards/memory-scanner.md` for the full job shape.
3434

35+
If this workspace is one of several agent homes, read `memory/cards/multi-workspace-handoff-admin.md`. Secondary setups should inform the canonical owner through handoffs rather than keeping separate durable truth.
36+
37+
If you are maintaining an established card set, read `memory/cards/memory-care-staleness.md` before editing stale cards. Refresh only from current source-of-truth files or route to manual review.
38+
3539
## If your harness loads a compact context
3640

3741
Some harnesses load a generated `llms.txt` or `llms-full.txt` instead of every bootstrap file individually. If those exist in this workspace, follow them and rebuild via the workspace's build script when source docs change. If they do not exist, default to reading the files listed in "Start here" directly.

MEMORY.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ Replace this with your actual agent roster. Example shape:
5454
| Night (~21:00) | Pipeline standup | [pipeline-standups](memory/cards/pipeline-standups.md) |
5555
| Night (~22:00) | Memory sweep / session review | [memory-scanner](memory/cards/memory-scanner.md) |
5656
| Continuous | Handoff ingester | [handoff-flow](memory/cards/handoff-flow.md) |
57+
| Quiet hours | Memory-care staleness scan | [memory-care-staleness](memory/cards/memory-care-staleness.md) |
5758
| Morning (~08:00) | Morning report | [pipeline-standups](memory/cards/pipeline-standups.md) |
5859

5960
## Card Categories
@@ -62,12 +63,13 @@ Build out this table as you learn the shape of your durable knowledge. Starter s
6263

6364
| Category | Topics |
6465
|----------|--------|
65-
| foundation | memory architecture, handoff flow, content safety, memory scanner, chat-surface crawlers, pipeline standups |
66+
| foundation | memory architecture, handoff flow, content safety, memory scanner, memory care, chat-surface crawlers, pipeline standups |
6667
| system | identity, memory-search system, sub-agent patterns, agent-wrapper patterns |
6768
| user | personal context, communication style, preferences |
6869
| infrastructure | hosts, ports, deploys, mounts, local services |
6970
| models | subscriptions, assignment rules, benchmarks |
7071
| workflow | pipeline rules, content strategy, publishing checklist |
72+
| admin | multi-workspace handoff routing |
7173
| tools | local APIs, browser stacks, MCPs, skills |
7274
| security | hardening, audits, runbooks |
7375
| lessons | hard-won gotchas, corrections, prior-incident learnings |
@@ -79,6 +81,8 @@ Add categories as the workspace grows. One topic per card; one card per topic.
7981
- [memory-architecture](memory/cards/memory-architecture.md) - how this workspace stores durable knowledge
8082
- [handoff-flow](memory/cards/handoff-flow.md) - how Memory Handoffs flow into canonical memory
8183
- [memory-scanner](memory/cards/memory-scanner.md) - session-review pass that promotes durable findings
84+
- [memory-care-staleness](memory/cards/memory-care-staleness.md) - card decay scans and safe refresh rules
85+
- [multi-workspace-handoff-admin](memory/cards/multi-workspace-handoff-admin.md) - pulling remote setup handoffs into one canonical owner
8286
- [pipeline-standups](memory/cards/pipeline-standups.md) - nightshift + morning cross-harness recaps
8387
- [chat-surface-crawlers](memory/cards/chat-surface-crawlers.md) - discrawl-shaped local archives for Discord, Slack, WhatsApp, etc.
8488
- [content-safety](memory/cards/content-safety.md) - publish gates and what they block

QUICKSTART.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ solo-mise ingest --target ~/agent-kitchen
8484

8585
The ingester is conservative. Handoffs with `Recommended memory action: create-card` and a safe filename + frontmatter become memory cards. Handoffs that route to `TOOLS.md`, `USER.md`, `rules/*.md`, or `.learnings/*.md` get appended. Anything ambiguous lands in `memory/handoff-inbox/` for manual review.
8686

87+
If you administer multiple agent setups, keep one canonical owner and pull remote handoffs into staging directories before ingesting them. See `memory/cards/multi-workspace-handoff-admin.md`.
88+
8789
## 7. Scrub before publishing
8890

8991
```bash
@@ -106,3 +108,4 @@ The fragments are JSON files you can inspect and merge into your `openclaw.json`
106108
- Read [the cookbook](https://github.com/solomonneas/solos-cookbook) for the deep version of every concept here.
107109
- Customize `USER.md` and `TOOLS.md` with your real preferences and runbooks (kept private; do not commit personal details).
108110
- Wire the ingester on a cron or a manual end-of-day workflow.
111+
- Add a memory-care staleness scan when your card set starts to matter. See `memory/cards/memory-care-staleness.md`.

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ The cookbook explains the why. This package gives you the kitchen.
3636
- a canonical memory layout where one configured owner holds durable knowledge
3737
- a shared `.claude/memory-handoffs/` inbox for Claude Code, Codex, and other side harnesses
3838
- starter memory cards and routing rules
39+
- multi-workspace handoff patterns for people administering more than one agent setup
40+
- memory-care staleness checks so durable cards do not quietly rot
3941
- content-guard publish gates so private infrastructure does not leak into public docs
4042
- adapter fragments for OpenClaw (tested), Hermes (stubbed), and generic harnesses
4143
- doctor checks that prove the system is wired before you trust it
@@ -94,6 +96,8 @@ memory/cards/*.md, TOOLS.md, USER.md, rules/*.md, .learnings/*.md
9496

9597
The ingester is intentionally conservative. Safe card handoffs become cards. Targeted updates append to the right file. Ambiguous material gets kicked out for review instead of being trusted automatically.
9698

99+
For users running multiple agent homes, treat the owner workspace as the hub. Remote or secondary workspaces can write handoffs into their own `.claude/memory-handoffs/` directories, then a trusted sync pulls those files into a staging inbox on the owner. That keeps agents informed about what happened elsewhere without creating multiple canonical memories.
100+
97101
## Related
98102

99103
- [Solomon's Cookbook](https://github.com/solomonneas/solos-cookbook): the long-form guide and reference docs

TOOLS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ See `RELEASE.md`.
7373
| `generic` | workspace + contract docs |
7474
| `publisher` | publish gate only (hook + policies + content-safety card) |
7575

76+
## Multi-workspace memory
77+
78+
Use `memory/cards/multi-workspace-handoff-admin.md` as the public-safe pattern for pulling handoffs from secondary agent homes into one canonical owner. Use `memory/cards/memory-care-staleness.md` for the card decay scanner and safe refresh loop.
79+
7680
## Where things live
7781

7882
- Source: `src/solo_mise/`

memory/cards/handoff-flow.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ Claude Code, Codex, and other side harnesses write Memory Handoffs to `.claude/m
1717
5. Handoffs route to: a memory card, an appendable document, or the review inbox.
1818
6. Processed handoffs move to `.claude/memory-handoffs/processed/`.
1919

20+
## Multiple Workspaces
21+
22+
If you administer more than one agent setup, keep this flow hub-and-spoke. Secondary workspaces write local handoffs, then the canonical owner pulls them into staging directories and runs the same ingester. This lets agents on separate machines or repos inform each other about what changed without creating competing memory stores.
23+
24+
See [multi-workspace-handoff-admin](multi-workspace-handoff-admin.md) for the full pattern.
25+
2026
## Auto-promotion rules
2127

2228
Only three handoff shapes can silently mutate canonical memory. Everything else lands in `memory/handoff-inbox/` for manual review.

memory/cards/memory-architecture.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ This workspace uses a single canonical memory owner. Side harnesses may keep loc
2323
INSTALL_FOR_AGENTS.md
2424
memory/
2525
cards/ # durable knowledge cards (auto-promotion target)
26+
decay/ # optional staleness scan output + refresh queue
2627
handoff-inbox/ # ambiguous handoffs land here for review
2728
rules/ # workflow rules (appendable target)
2829
.learnings/ # concrete failures + lessons (appendable target)
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
topic: memory-care-staleness
3+
category: foundation
4+
tags: [memory, staleness, decay, refresh, maintenance]
5+
---
6+
7+
# Memory Care Staleness
8+
9+
Memory needs care after it is written. Durable cards can become wrong when services move, workflows change, models are renamed, or project priorities expire. A staleness checker gives the memory owner a queue of cards that need refresh, without letting an agent rewrite sensitive or judgment-heavy knowledge blindly.
10+
11+
## Reference Loop
12+
13+
```text
14+
memory/cards/*.md
15+
|
16+
v
17+
card decay scanner
18+
|
19+
v
20+
memory/cards/decay/scan-latest.json
21+
memory/cards/decay/refresh-queue.json
22+
|
23+
v
24+
safe refresh agent or manual review
25+
```
26+
27+
## Scanner Output
28+
29+
Store scan state under `memory/cards/decay/`:
30+
31+
- `scan-latest.json` - latest full scan, counts, card statuses, decay ratios, and refresh queue size.
32+
- `refresh-queue.json` - small queue of cards that are stale enough to review.
33+
34+
The scanner should report at least total cards, fresh count, aging count, stale count, critical count, and refresh queue size.
35+
36+
## Safe Refresh Rules
37+
38+
Only auto-refresh cards when current facts are grounded in local source-of-truth files read during the run. Good sources include `TOOLS.md`, `MEMORY.md`, recent `memory/YYYY-MM-DD.md`, local project docs, local scripts, and repo health reports.
39+
40+
Do not auto-refresh cards that require human judgment, personal context, career decisions, school work, business strategy, or outside research. Put those in a manual queue.
41+
42+
Never refresh by only bumping an `updated:` date. The content must change because a current source proves it should change.
43+
44+
## Suggested Schedule
45+
46+
- Daily scanner during quiet hours.
47+
- Safe auto-refresh shortly after the scanner, capped to a small number of cards.
48+
- Weekly deep report for manual review of sensitive or repeatedly skipped stale cards.
49+
50+
## Verification
51+
52+
```bash
53+
test -f memory/cards/decay/scan-latest.json
54+
test -f memory/cards/decay/refresh-queue.json
55+
jq '.counts, .refresh_queue_size' memory/cards/decay/scan-latest.json
56+
```
57+
58+
If the queue grows for several days, either the refresh agent is too conservative, the source-of-truth files are stale, or the cards need manual pruning.

memory/cards/memory-scanner.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ Avoid promoting during active sessions because card writes invalidate prefix cac
8686
- the prompt should embed the skip-rules and cost controls above
8787
- output goes either directly to `memory/cards/*.md` (if your harness can write there) or through `.claude/memory-handoffs/` for the conservative ingester to route
8888

89+
## Relationship to Memory Care
90+
91+
The memory scanner captures new durable knowledge. The memory-care staleness loop reviews old cards for drift. Run both: scanner for new facts, staleness checker for old facts that may no longer be true. See [memory-care-staleness](memory-care-staleness.md).
92+
8993
## Anti-patterns
9094

9195
- **Auto-promoting raw session fragments into `MEMORY.md`.** The index loads on every session; appending fragments nightly bloats it past the bootstrap budget and turns the on-load cache cost into a monthly tax. Write cards instead.

0 commit comments

Comments
 (0)