@wipcomputer/wip-ldm-os 0.4.37 → 0.4.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SKILL.md +1 -1
- package/bin/ldm.js +114 -0
- package/docs/bridge/README.md +12 -2
- package/docs/bridge/TECHNICAL.md +27 -1
- package/docs/recall/TECHNICAL.md +6 -0
- package/docs/total-recall/README.md +84 -0
- package/docs/total-recall/TECHNICAL.md +124 -0
- package/package.json +1 -1
package/SKILL.md
CHANGED
package/bin/ldm.js
CHANGED
|
@@ -261,9 +261,42 @@ async function cmdInit() {
|
|
|
261
261
|
join(LDM_ROOT, 'messages'),
|
|
262
262
|
join(LDM_ROOT, 'shared', 'boot'),
|
|
263
263
|
join(LDM_ROOT, 'shared', 'cron'),
|
|
264
|
+
join(LDM_ROOT, 'shared', 'rules'),
|
|
265
|
+
join(LDM_ROOT, 'shared', 'prompts'),
|
|
264
266
|
join(LDM_ROOT, 'hooks'),
|
|
265
267
|
];
|
|
266
268
|
|
|
269
|
+
// Scaffold per-agent memory dirs
|
|
270
|
+
try {
|
|
271
|
+
const config = JSON.parse(readFileSync(join(LDM_ROOT, 'config.json'), 'utf8'));
|
|
272
|
+
const agents = config.agents || [];
|
|
273
|
+
const agentList = Array.isArray(agents) ? agents : Object.keys(agents);
|
|
274
|
+
for (const agentId of agentList) {
|
|
275
|
+
for (const sub of ['memory/daily', 'memory/journals', 'memory/sessions', 'memory/transcripts']) {
|
|
276
|
+
dirs.push(join(LDM_ROOT, 'agents', agentId, sub));
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// Scaffold workspace output dirs if workspace is configured
|
|
281
|
+
const workspace = config.workspace;
|
|
282
|
+
if (workspace && existsSync(workspace)) {
|
|
283
|
+
// Per-agent workspace dirs
|
|
284
|
+
const agentNameMap = { 'cc-mini': 'cc-mini', 'cc-air': 'cc-air', 'oc-lesa-mini': 'Lēsa' };
|
|
285
|
+
for (const agentId of agentList) {
|
|
286
|
+
const teamName = agentNameMap[agentId] || agentId;
|
|
287
|
+
for (const sub of ['journals', 'automated/memory/summaries/daily', 'automated/memory/summaries/weekly', 'automated/memory/summaries/monthly', 'automated/memory/summaries/quarterly']) {
|
|
288
|
+
dirs.push(join(workspace, 'team', teamName, sub));
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
// Org-wide dirs
|
|
292
|
+
for (const track of ['team', 'dev']) {
|
|
293
|
+
for (const cadence of ['daily', 'weekly', 'monthly', 'quarterly']) {
|
|
294
|
+
dirs.push(join(workspace, 'operations', 'updates', track, cadence));
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
} catch {} // config.json may not exist on first init
|
|
299
|
+
|
|
267
300
|
const existing = existsSync(VERSION_PATH);
|
|
268
301
|
|
|
269
302
|
if (DRY_RUN) {
|
|
@@ -363,6 +396,87 @@ async function cmdInit() {
|
|
|
363
396
|
}
|
|
364
397
|
}
|
|
365
398
|
|
|
399
|
+
// Deploy backup + restore scripts (#119)
|
|
400
|
+
const backupSrc = join(__dirname, '..', 'scripts', 'ldm-backup.sh');
|
|
401
|
+
const backupDest = join(LDM_ROOT, 'bin', 'ldm-backup.sh');
|
|
402
|
+
if (existsSync(backupSrc)) {
|
|
403
|
+
mkdirSync(join(LDM_ROOT, 'bin'), { recursive: true });
|
|
404
|
+
cpSync(backupSrc, backupDest);
|
|
405
|
+
chmodSync(backupDest, 0o755);
|
|
406
|
+
console.log(` + ldm-backup.sh deployed to ~/.ldm/bin/`);
|
|
407
|
+
}
|
|
408
|
+
const restoreSrc = join(__dirname, '..', 'scripts', 'ldm-restore.sh');
|
|
409
|
+
const restoreDest = join(LDM_ROOT, 'bin', 'ldm-restore.sh');
|
|
410
|
+
if (existsSync(restoreSrc)) {
|
|
411
|
+
cpSync(restoreSrc, restoreDest);
|
|
412
|
+
chmodSync(restoreDest, 0o755);
|
|
413
|
+
console.log(` + ldm-restore.sh deployed to ~/.ldm/bin/`);
|
|
414
|
+
}
|
|
415
|
+
const summarySrc = join(__dirname, '..', 'scripts', 'ldm-summary.sh');
|
|
416
|
+
const summaryDest = join(LDM_ROOT, 'bin', 'ldm-summary.sh');
|
|
417
|
+
if (existsSync(summarySrc)) {
|
|
418
|
+
cpSync(summarySrc, summaryDest);
|
|
419
|
+
chmodSync(summaryDest, 0o755);
|
|
420
|
+
console.log(` + ldm-summary.sh deployed to ~/.ldm/bin/`);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
// Deploy shared rules to ~/.ldm/shared/rules/ and to harnesses
|
|
424
|
+
const rulesSrc = join(__dirname, '..', 'shared', 'rules');
|
|
425
|
+
const rulesDest = join(LDM_ROOT, 'shared', 'rules');
|
|
426
|
+
if (existsSync(rulesSrc)) {
|
|
427
|
+
mkdirSync(rulesDest, { recursive: true });
|
|
428
|
+
let rulesCount = 0;
|
|
429
|
+
for (const file of readdirSync(rulesSrc)) {
|
|
430
|
+
if (!file.endsWith('.md')) continue;
|
|
431
|
+
cpSync(join(rulesSrc, file), join(rulesDest, file));
|
|
432
|
+
rulesCount++;
|
|
433
|
+
}
|
|
434
|
+
if (rulesCount > 0) {
|
|
435
|
+
console.log(` + ${rulesCount} shared rules deployed to ~/.ldm/shared/rules/`);
|
|
436
|
+
|
|
437
|
+
// Deploy to Claude Code harness (~/.claude/rules/)
|
|
438
|
+
const claudeRules = join(HOME, '.claude', 'rules');
|
|
439
|
+
if (existsSync(join(HOME, '.claude'))) {
|
|
440
|
+
mkdirSync(claudeRules, { recursive: true });
|
|
441
|
+
for (const file of readdirSync(rulesDest)) {
|
|
442
|
+
if (!file.endsWith('.md')) continue;
|
|
443
|
+
cpSync(join(rulesDest, file), join(claudeRules, file));
|
|
444
|
+
}
|
|
445
|
+
console.log(` + rules deployed to ~/.claude/rules/`);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
// Deploy to OpenClaw harness (~/.openclaw/workspace/DEV-RULES.md)
|
|
449
|
+
const ocWorkspace = join(HOME, '.openclaw', 'workspace');
|
|
450
|
+
if (existsSync(ocWorkspace)) {
|
|
451
|
+
let combined = '# Dev Rules (deployed by ldm install)\n\n';
|
|
452
|
+
combined += '> Do not edit this file. It is regenerated by `ldm install`.\n';
|
|
453
|
+
combined += '> Source: ~/.ldm/shared/rules/\n\n';
|
|
454
|
+
for (const file of readdirSync(rulesDest).sort()) {
|
|
455
|
+
if (!file.endsWith('.md')) continue;
|
|
456
|
+
combined += readFileSync(join(rulesDest, file), 'utf8') + '\n\n---\n\n';
|
|
457
|
+
}
|
|
458
|
+
writeFileSync(join(ocWorkspace, 'DEV-RULES.md'), combined);
|
|
459
|
+
console.log(` + rules deployed to ~/.openclaw/workspace/DEV-RULES.md`);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
// Deploy shared prompts to ~/.ldm/shared/prompts/
|
|
465
|
+
const promptsSrc = join(__dirname, '..', 'shared', 'prompts');
|
|
466
|
+
const promptsDest = join(LDM_ROOT, 'shared', 'prompts');
|
|
467
|
+
if (existsSync(promptsSrc)) {
|
|
468
|
+
mkdirSync(promptsDest, { recursive: true });
|
|
469
|
+
let promptsCount = 0;
|
|
470
|
+
for (const file of readdirSync(promptsSrc)) {
|
|
471
|
+
if (!file.endsWith('.md')) continue;
|
|
472
|
+
cpSync(join(promptsSrc, file), join(promptsDest, file));
|
|
473
|
+
promptsCount++;
|
|
474
|
+
}
|
|
475
|
+
if (promptsCount > 0) {
|
|
476
|
+
console.log(` + ${promptsCount} shared prompts deployed to ~/.ldm/shared/prompts/`);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
|
|
366
480
|
console.log('');
|
|
367
481
|
console.log(` LDM OS v${PKG_VERSION} initialized at ${LDM_ROOT}`);
|
|
368
482
|
console.log('');
|
package/docs/bridge/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## Your AIs talk to each other.
|
|
6
6
|
|
|
7
|
-
Cross-platform agent communication. Bridge (MCP), Agent Client Protocol (ACP-Client, Zed Industries), and Agent Communication Protocol (ACP-Comm, IBM/Linux Foundation). Three protocols, one system.
|
|
7
|
+
Cross-platform agent communication. Claude Code talks to Claude Code. Claude Code talks to OpenClaw. OpenClaw talks back. Bridge (MCP), Agent Client Protocol (ACP-Client, Zed Industries), and Agent Communication Protocol (ACP-Comm, IBM/Linux Foundation). Three protocols, one system.
|
|
8
8
|
|
|
9
9
|
## Three Protocols, One System
|
|
10
10
|
|
|
@@ -16,7 +16,7 @@ LDM OS uses three complementary protocols. Bridge is one of them.
|
|
|
16
16
|
| **Protocol** | MCP (JSON-RPC over stdio) | JSON-RPC over stdio + WebSocket | REST/HTTP |
|
|
17
17
|
| **Built by** | WIP Computer | Zed Industries | IBM / Linux Foundation |
|
|
18
18
|
| **In LDM OS** | Core (v0.3.0+) | Available via OpenClaw | Planned (Cloud Relay) |
|
|
19
|
-
| **What it connects** |
|
|
19
|
+
| **What it connects** | CC <-> CC + CC <-> OpenClaw agents | IDEs (Zed, VS Code) <-> agents | Cloud agents <-> each other |
|
|
20
20
|
| **Memory access** | Yes (search + read across agents) | No | No |
|
|
21
21
|
| **Skill sharing** | Yes (OpenClaw skills as MCP tools) | No | No |
|
|
22
22
|
| **Where it runs** | Localhost only | Localhost (stdio) + remote (WebSocket) | Cloud (HTTP endpoints) |
|
|
@@ -37,13 +37,23 @@ All three are Apache 2.0 compatible with our MIT + AGPL license. See [ACP docs](
|
|
|
37
37
|
| `oc_skills_list` | List all OpenClaw skills. |
|
|
38
38
|
| `oc_skill_*` | Run any OpenClaw skill with scripts. |
|
|
39
39
|
|
|
40
|
+
## Session Discovery
|
|
41
|
+
|
|
42
|
+
Multiple Claude Code sessions can discover each other via the Agent Register. On boot, Recall registers each session at `~/.ldm/sessions/`. Any session can list all running sessions with `ldm sessions`.
|
|
43
|
+
|
|
44
|
+
The registry tracks agent ID (cc-mini, cc-air), PID, working directory, and start time. Stale sessions (dead PIDs) are auto-cleaned on read. See `lib/sessions.mjs`.
|
|
45
|
+
|
|
40
46
|
## Message Flow
|
|
41
47
|
|
|
48
|
+
**CC <-> OpenClaw:**
|
|
42
49
|
```
|
|
43
50
|
CC --lesa_send_message--> OpenClaw Gateway (localhost:18789) --> Lesa
|
|
44
51
|
CC <--lesa_check_inbox--- HTTP Inbox (localhost:18790) <-- Lesa
|
|
45
52
|
```
|
|
46
53
|
|
|
54
|
+
**CC <-> CC:**
|
|
55
|
+
Multiple Claude Code sessions communicate via the file-based message bus and session registry at `~/.ldm/sessions/`. Each session registers on boot and can discover peers. No broker daemon required.
|
|
56
|
+
|
|
47
57
|
Both directions are live. Everything is localhost. No cloud.
|
|
48
58
|
|
|
49
59
|
## Part of LDM OS
|
package/docs/bridge/TECHNICAL.md
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
## Architecture
|
|
4
4
|
|
|
5
5
|
```
|
|
6
|
-
Claude Code CLI
|
|
6
|
+
Claude Code CLI (cc-mini, cc-air, or any CC session)
|
|
7
|
+
|
|
|
8
|
+
|-- On boot --> registerSession() --> ~/.ldm/sessions/{name}.json (session discovery)
|
|
7
9
|
|
|
|
8
10
|
|-- MCP stdio --> wip-bridge MCP server (single process)
|
|
9
11
|
| |
|
|
@@ -22,6 +24,13 @@ Claude Code CLI
|
|
|
22
24
|
| |-- lesa_memory_search --> filesystem (workspace/*.md)
|
|
23
25
|
| |
|
|
24
26
|
| |-- oc_skill_* --> exec scripts in ~/.openclaw/extensions/*/skills/
|
|
27
|
+
|
|
28
|
+
CC <-> CC (multi-session):
|
|
29
|
+
CC session A --> registerSession() --> ~/.ldm/sessions/a.json
|
|
30
|
+
CC session B --> registerSession() --> ~/.ldm/sessions/b.json
|
|
31
|
+
CC session A --> listSessions() --> discovers session B (agent ID, PID, cwd)
|
|
32
|
+
CC session B --> listSessions() --> discovers session A
|
|
33
|
+
Communication via file-based message bus at ~/.ldm/sessions/
|
|
25
34
|
```
|
|
26
35
|
|
|
27
36
|
## MCP Tools
|
|
@@ -65,6 +74,22 @@ Bridge starts a localhost-only HTTP server on port 18790:
|
|
|
65
74
|
|
|
66
75
|
Messages are held in memory. `lesa_check_inbox` drains the queue.
|
|
67
76
|
|
|
77
|
+
## Session Discovery
|
|
78
|
+
|
|
79
|
+
On boot, Recall registers the session via `registerSession()` from `lib/sessions.mjs`. Each session writes a JSON file to `~/.ldm/sessions/{name}.json` containing:
|
|
80
|
+
|
|
81
|
+
- `name` — session identifier
|
|
82
|
+
- `agentId` — agent identity (e.g. `cc-mini`, `cc-air`)
|
|
83
|
+
- `pid` — process ID (used for liveness checks)
|
|
84
|
+
- `startTime` — ISO timestamp
|
|
85
|
+
- `cwd` — working directory
|
|
86
|
+
|
|
87
|
+
`listSessions()` reads all session files, validates PID liveness (signal 0 probe), and auto-cleans stale entries. Filter by `agentId` to find specific agents. `sessionCount()` returns a quick count of live sessions.
|
|
88
|
+
|
|
89
|
+
CLI: `ldm sessions` lists all active sessions.
|
|
90
|
+
|
|
91
|
+
This enables CC-to-CC awareness without a broker daemon. Any session can discover any other session on the machine.
|
|
92
|
+
|
|
68
93
|
## Key Files
|
|
69
94
|
|
|
70
95
|
| File | What |
|
|
@@ -72,6 +97,7 @@ Messages are held in memory. `lesa_check_inbox` drains the queue.
|
|
|
72
97
|
| `src/bridge/core.ts` | Pure logic: config, messaging, search, skills |
|
|
73
98
|
| `src/bridge/mcp-server.ts` | MCP server: tool registration, inbox HTTP server |
|
|
74
99
|
| `src/bridge/cli.ts` | CLI wrapper (`lesa` command) |
|
|
100
|
+
| `lib/sessions.mjs` | Session registration, discovery, PID liveness |
|
|
75
101
|
| `dist/bridge/` | Compiled output (ships with npm package) |
|
|
76
102
|
|
|
77
103
|
## Node Communication (Future)
|
package/docs/recall/TECHNICAL.md
CHANGED
|
@@ -39,3 +39,9 @@ The hook runs with a 15-second timeout. If any file is missing, it's skipped sil
|
|
|
39
39
|
## Session Registration
|
|
40
40
|
|
|
41
41
|
On boot, Recall also registers the session in the Agent Register (`~/.ldm/sessions/`). This enables other sessions to discover this one via `ldm sessions`.
|
|
42
|
+
|
|
43
|
+
## Connection to Total Recall
|
|
44
|
+
|
|
45
|
+
Recall loads context at session start. [Total Recall](../total-recall/TECHNICAL.md) fills the memory that Recall serves. Total Recall imports historical conversations, generates multi-cadence summaries (daily/weekly/monthly/quarterly), and writes everything to Memory Crystal. On the next session start, Recall picks up the new data automatically.
|
|
46
|
+
|
|
47
|
+
Without Total Recall, Recall only has what was captured going forward. With Total Recall, Recall has the complete history.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
###### WIP Computer
|
|
2
|
+
|
|
3
|
+
# Total Recall
|
|
4
|
+
|
|
5
|
+
## Connect your AI accounts. Bring every memory home. Never lose a conversation again.
|
|
6
|
+
|
|
7
|
+
Total Recall is LDM OS's memory import and consolidation system. It connects to AI platforms, imports conversation history, and uses Dream Weaver to consolidate raw data into searchable, structured memories in Memory Crystal.
|
|
8
|
+
|
|
9
|
+
It also generates multi-cadence summaries (daily, weekly, monthly, quarterly) for every agent.
|
|
10
|
+
|
|
11
|
+
## The Pipeline
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
1. CONNECT -> Sign into your AI accounts (Anthropic, OpenAI, xAI, etc.)
|
|
15
|
+
2. IMPORT -> Pull every conversation (API, data export, or automation)
|
|
16
|
+
3. RELIVE -> Dream Weaver processes raw conversations into memories
|
|
17
|
+
4. CRYSTAL -> Consolidated memories stored in Memory Crystal
|
|
18
|
+
5. SUMMARIZE -> Multi-cadence summaries (daily/weekly/monthly/quarterly)
|
|
19
|
+
6. MONITOR -> System check alerts when any agent stops capturing
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Two Modes
|
|
23
|
+
|
|
24
|
+
### Going Forward (daily)
|
|
25
|
+
|
|
26
|
+
Each agent writes its own daily summary. Persistent agents (OpenClaw, Letta) write from their own context. Ephemeral agents (Claude Code, Codex) get script-generated summaries from crystal + daily logs. Org-wide summaries combine all agents.
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
~/.ldm/bin/ldm-summary.sh daily # today
|
|
30
|
+
~/.ldm/bin/ldm-summary.sh daily --team-only # team track only
|
|
31
|
+
~/.ldm/bin/ldm-summary.sh daily --dev-only # dev track only
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Backfill (historical)
|
|
35
|
+
|
|
36
|
+
Import and summarize everything from day 1. Uses `--force` to generate for all agents regardless of harness type.
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
~/.ldm/bin/ldm-summary.sh daily --date 2026-02-10 --force # one day
|
|
40
|
+
bash scripts/backfill-summaries.sh # all days
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Output Locations
|
|
44
|
+
|
|
45
|
+
### Per-agent
|
|
46
|
+
```
|
|
47
|
+
~/wipcomputerinc/team/{agent}/automated/memory/summaries/
|
|
48
|
+
daily/YYYY-MM-DD.md
|
|
49
|
+
weekly/YYYY-MM-DD.md
|
|
50
|
+
monthly/YYYY-MM.md
|
|
51
|
+
quarterly/YYYY-QX.md
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Org-wide
|
|
55
|
+
```
|
|
56
|
+
~/wipcomputerinc/operations/updates/
|
|
57
|
+
team/daily/YYYY-MM-DD.md <- conversations, decisions, insights
|
|
58
|
+
dev/daily/YYYY-MM-DD.md <- code shipped, PRs, releases
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Recursive Consolidation
|
|
62
|
+
|
|
63
|
+
Each level reads the level below:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
Transcripts + Crystal -> Daily summaries
|
|
67
|
+
7 dailies -> Weekly summary
|
|
68
|
+
4 weeklies -> Monthly summary
|
|
69
|
+
3 monthlies -> Quarterly summary
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
This is the Dream Weaver paper's consolidation architecture applied at four cadences.
|
|
73
|
+
|
|
74
|
+
## Connection to Recall
|
|
75
|
+
|
|
76
|
+
[Recall](../recall/README.md) loads context at session start. Total Recall fills the memory that Recall serves. Without Total Recall, Recall only has what was captured going forward. With Total Recall, Recall has the complete history.
|
|
77
|
+
|
|
78
|
+
## Part of LDM OS
|
|
79
|
+
|
|
80
|
+
Total Recall is included with LDM OS. Summaries activate after `ldm init`. External imports are opt-in per platform.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
[Technical Reference](./TECHNICAL.md)
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Total Recall ... Technical Reference
|
|
2
|
+
|
|
3
|
+
## Architecture
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
~/.ldm/agents/{agentId}/memory/ <- SOURCE (raw data per agent)
|
|
7
|
+
daily/ <- daily logs
|
|
8
|
+
journals/ <- Dream Weaver journals
|
|
9
|
+
sessions/ <- session exports (.md)
|
|
10
|
+
transcripts/ <- raw JSONL
|
|
11
|
+
|
|
|
12
|
+
v
|
|
13
|
+
Dream Weaver (prompts at ~/.ldm/shared/prompts/)
|
|
14
|
+
|
|
|
15
|
+
v
|
|
16
|
+
~/wipcomputerinc/team/{agent}/automated/memory/summaries/
|
|
17
|
+
daily/ weekly/ monthly/ quarterly/ <- per-agent summaries
|
|
18
|
+
|
|
|
19
|
+
v (combine all agents)
|
|
20
|
+
~/wipcomputerinc/operations/updates/
|
|
21
|
+
team/ daily/ weekly/ monthly/ quarterly/ <- org-wide team
|
|
22
|
+
dev/ daily/ weekly/ monthly/ quarterly/ <- org-wide dev (from git)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Harness Logic
|
|
26
|
+
|
|
27
|
+
Each agent in `~/.ldm/config.json` has a harness type:
|
|
28
|
+
|
|
29
|
+
| Harness | Behavior | Examples |
|
|
30
|
+
|---------|----------|---------|
|
|
31
|
+
| Persistent (openclaw, letta, hermes) | Agent writes own summaries via prompt | Lesa |
|
|
32
|
+
| Ephemeral (claude-code, codex) | Script generates from crystal + daily logs | CC |
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
for each agent:
|
|
36
|
+
if persistent AND summary file exists: skip (agent wrote it)
|
|
37
|
+
if persistent AND file missing AND --force: generate via script
|
|
38
|
+
if ephemeral: always generate via script
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Key Files
|
|
42
|
+
|
|
43
|
+
| File | What |
|
|
44
|
+
|------|------|
|
|
45
|
+
| `scripts/ldm-summary.sh` | Orchestrator. Per-agent search, org-wide combine. |
|
|
46
|
+
| `scripts/backfill-summaries.sh` | Loop: dailies -> weeklies -> monthlies -> quarterly |
|
|
47
|
+
| `shared/prompts/daily-agent-summary.md` | Prompt for daily per-agent summary |
|
|
48
|
+
| `shared/prompts/weekly-agent-summary.md` | Prompt for weekly (reads 7 dailies) |
|
|
49
|
+
| `shared/prompts/monthly-agent-summary.md` | Prompt for monthly (reads 4 weeklies) |
|
|
50
|
+
| `shared/prompts/quarterly-agent-summary.md` | Prompt for quarterly (reads 3 monthlies) |
|
|
51
|
+
| `shared/prompts/org-daily-team.md` | Prompt for combining agent summaries |
|
|
52
|
+
| `shared/prompts/daily-dev.md` | Prompt for git log summary |
|
|
53
|
+
| `bin/ldm.js` | Installer. Deploys scripts + prompts. Scaffolds dirs. |
|
|
54
|
+
|
|
55
|
+
## Data Sources
|
|
56
|
+
|
|
57
|
+
### Team track (conversations, decisions)
|
|
58
|
+
|
|
59
|
+
- `~/.ldm/agents/{agentId}/memory/daily/{date}.md` ... raw daily log
|
|
60
|
+
- `crystal search --agent {id} --since {date} --until {date+1}` ... crystal chunks for that day
|
|
61
|
+
- Both fed to Dream Weaver prompt to produce the summary
|
|
62
|
+
|
|
63
|
+
### Dev track (code shipped)
|
|
64
|
+
|
|
65
|
+
- `git log --since={date} --until={date+1} --oneline --all` across all repos in workspace
|
|
66
|
+
- Fed to prompt to produce factual dev summary
|
|
67
|
+
|
|
68
|
+
## Config
|
|
69
|
+
|
|
70
|
+
`~/wipcomputerinc/settings/config.json`:
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
"summaries": {
|
|
74
|
+
"cadences": ["daily", "weekly", "monthly", "quarterly"],
|
|
75
|
+
"tracks": ["team", "dev"],
|
|
76
|
+
"schedule": {
|
|
77
|
+
"daily": "06:00",
|
|
78
|
+
"weekly": "Monday 07:00",
|
|
79
|
+
"monthly": "1st 08:00",
|
|
80
|
+
"quarterly": "1st of Q 09:00"
|
|
81
|
+
},
|
|
82
|
+
"perAgent": "team/{agent}/automated/memory/summaries/",
|
|
83
|
+
"orgWide": "operations/updates/"
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`~/.ldm/config.json`:
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
"agents": ["cc-mini", "oc-lesa-mini"]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Schedule
|
|
94
|
+
|
|
95
|
+
Cron via LDM Dev Tools.app:
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
0 6 * * * ldm-summary.sh daily
|
|
99
|
+
0 7 * * 1 ldm-summary.sh weekly (Monday)
|
|
100
|
+
0 8 1 * * ldm-summary.sh monthly (1st of month)
|
|
101
|
+
0 9 1 1,4,7,10 * ldm-summary.sh quarterly (1st of quarter)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## External Imports (Future)
|
|
105
|
+
|
|
106
|
+
Total Recall will also import from external platforms:
|
|
107
|
+
|
|
108
|
+
| Platform | Method | Status |
|
|
109
|
+
|----------|--------|--------|
|
|
110
|
+
| Anthropic (Claude) | API / data export | Planned |
|
|
111
|
+
| OpenAI (ChatGPT) | API / data export | Planned |
|
|
112
|
+
| xAI (Grok) | API | Planned |
|
|
113
|
+
| X (Twitter) | Full archive import | Planned |
|
|
114
|
+
| Apple Music | Listening history | Planned |
|
|
115
|
+
| Browser | Chrome/Safari extension | Planned |
|
|
116
|
+
|
|
117
|
+
Each import follows the same pipeline: CONNECT -> IMPORT -> RELIVE -> CRYSTAL.
|
|
118
|
+
|
|
119
|
+
## Connection to Other Components
|
|
120
|
+
|
|
121
|
+
- **[Recall](../recall/TECHNICAL.md)** ... loads context at session start. Total Recall fills what Recall serves.
|
|
122
|
+
- **[Bridge](../bridge/TECHNICAL.md)** ... agent-to-agent communication. Summaries are shared via the workspace, not Bridge.
|
|
123
|
+
- **[Memory Crystal](https://github.com/wipcomputer/memory-crystal)** ... storage + search. Total Recall writes to Crystal. Crystal search provides data for summaries.
|
|
124
|
+
- **[Dream Weaver](https://github.com/wipcomputer/dream-weaver-protocol)** ... consolidation engine. Prompts invoke Dream Weaver via `claude -p`.
|