total-recall-brain 3.32.3 → 3.33.0

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.
Files changed (86) hide show
  1. package/README.md +3 -1
  2. package/bin/total-recall.mjs +3 -0
  3. package/docs/ARCHITECTURE.md +21 -4
  4. package/docs/SSSS.md +230 -0
  5. package/docs/reference/CLI_INVENTORY.md +77 -0
  6. package/docs/reference/cli-reference.md +610 -0
  7. package/frontend/dist/assets/{index-DGMNZi_1.js → index-BPrkIYkZ.js} +174 -130
  8. package/frontend/dist/index.html +1 -1
  9. package/frontend/src/App.tsx +8 -4
  10. package/frontend/src/api/plugins.ts +80 -0
  11. package/frontend/src/components/brand/AnimatedBrandMark.tsx +163 -0
  12. package/frontend/src/components/brand/BrandMark.spec.tsx +4 -4
  13. package/frontend/src/components/brand/BrandMark.tsx +12 -3
  14. package/frontend/src/components/plugins/previews/CodeQualityPreview.tsx +130 -0
  15. package/frontend/src/components/plugins/previews/ComposableCliPreview.tsx +131 -0
  16. package/frontend/src/components/plugins/previews/DecisionPreview.tsx +156 -0
  17. package/frontend/src/components/plugins/previews/DesignPreview.tsx +118 -0
  18. package/frontend/src/components/plugins/previews/DomainsPreview.tsx +139 -0
  19. package/frontend/src/components/plugins/previews/PhonePreview.tsx +86 -0
  20. package/frontend/src/components/plugins/previews/SigningPreview.tsx +109 -0
  21. package/frontend/src/components/plugins/previews/TextPreview.tsx +144 -0
  22. package/frontend/src/components/plugins/previews/index.tsx +83 -0
  23. package/package.json +4 -1
  24. package/plugins/creative-search/README.md +26 -0
  25. package/plugins/creative-search/cli.mjs +421 -0
  26. package/plugins/creative-search/config.mjs +103 -0
  27. package/plugins/creative-search/generator.mjs +44 -0
  28. package/plugins/creative-search/plugin.json +59 -0
  29. package/plugins/creative-search/ui/DESIGN.md +50 -0
  30. package/plugins/creative-search/ui/csearch-main.js +311 -0
  31. package/plugins/creative-search/ui/csearch-settings.js +392 -0
  32. package/plugins/creative-search/ui/index.js +2 -0
  33. package/plugins/creative-search/ui/tokens.css +34 -0
  34. package/plugins/dsh/README.md +20 -0
  35. package/plugins/dsh/cli.mjs +232 -0
  36. package/plugins/dsh/generator.mjs +65 -0
  37. package/plugins/dsh/plugin.json +57 -0
  38. package/plugins/dsh/ui/DESIGN.md +48 -0
  39. package/plugins/dsh/ui/dsh-main.js +226 -0
  40. package/plugins/dsh/ui/dsh-status.js +265 -0
  41. package/plugins/dsh/ui/index.js +2 -0
  42. package/plugins/dsh/ui/tokens.css +32 -0
  43. package/plugins/git-sentinel/README.md +2 -0
  44. package/plugins/operator-alerts/README.md +9 -4
  45. package/plugins/operator-alerts/notify-core.mjs +26 -3
  46. package/plugins/system-monitor/README.md +2 -0
  47. package/scaffold/.agent/skills/start/SKILL.md +75 -0
  48. package/scaffold/.agent/skills/start/evals/evals.json +25 -0
  49. package/scaffold/.agent/skills/start/evals/resolve-startup-entry.test.mjs +17 -0
  50. package/scaffold/.agent/skills/start/references/runtime-contract.md +9 -0
  51. package/scaffold/.agent/skills/start/references/startup-check-registration.mjs +14 -0
  52. package/scaffold/.agent/skills/start/scripts/resolve-startup-entry.mjs +39 -0
  53. package/scaffold/.agent/skills/start/scripts/start-session.mjs +28 -0
  54. package/scaffold/.agent/skills/start/subagents/runtime-review.md +3 -0
  55. package/scaffold/.agent/skills/total-recall/SKILL.md +31 -664
  56. package/scaffold/.agent/skills/total-recall/references/operations.md +671 -0
  57. package/src/cli/brief.mjs +5 -1
  58. package/src/cli/command.mjs +44 -2
  59. package/src/cli/context.mjs +35 -0
  60. package/src/cli/doctor.mjs +24 -1
  61. package/src/cli/help.mjs +2 -1
  62. package/src/cli/mesh.mjs +15 -1
  63. package/src/cli/plugin/install.mjs +6 -1
  64. package/src/cli/plugin/remove.mjs +5 -1
  65. package/src/cli/recall.mjs +22 -4
  66. package/src/cli/repo-expert-generate.mjs +35 -2
  67. package/src/cli/skill.mjs +6 -0
  68. package/src/cli/startup.mjs +41 -0
  69. package/src/cli/status.mjs +2 -1
  70. package/src/core/command-surface.mjs +13 -1
  71. package/src/core/context-compiler.mjs +42 -311
  72. package/src/core/context-policy.mjs +59 -0
  73. package/src/core/env-import.mjs +4 -7
  74. package/src/core/fast-recall.mjs +130 -70
  75. package/src/core/memory-layers.mjs +2 -0
  76. package/src/core/mesh.mjs +34 -7
  77. package/src/core/skills-registry.mjs +113 -21
  78. package/src/core/startup-health.mjs +174 -0
  79. package/src/core/surface.mjs +40 -227
  80. package/src/server/route-manifest.json +12 -0
  81. package/src/server/routes/_shared.mjs +5 -2
  82. package/src/server/routes/context.mjs +17 -3
  83. package/src/server/routes/instructions.mjs +5 -4
  84. package/src/server/routes/plugins.mjs +137 -1
  85. package/frontend/dist/assets/index-BUEZPLim.js +0 -5742
  86. package/frontend/dist/assets/index-FOJG4jQh.js +0 -5742
package/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # Total Recall
2
2
 
3
- [![Version](https://img.shields.io/badge/version-3.13.0-indigo.svg)](package.json)
3
+ [![Version](https://img.shields.io/badge/version-3.32.4-indigo.svg)](package.json)
4
4
  [![License](https://img.shields.io/badge/license-MIT-emerald.svg)](LICENSE)
5
5
 
6
6
  **Portable personal memory for any IDE** — filesystem-native, database-free, open source.
7
7
 
8
+ Plugin status (September 30, 2026): the tree contains five bundled plugins; standalone plugin repos retain their own documents. Current review found incomplete operations, fabricated preview data and unsupported readiness claims. The [audit](docs/projects/in-progress/PLUGIN_IMPLEMENTATION_CORRECTIONS/PLUGIN_IMPLEMENTATION_CORRECTIONS_AUDIT.md) and [correction tracker](docs/projects/in-progress/PLUGIN_IMPLEMENTATION_CORRECTIONS/PLUGIN_IMPLEMENTATION_CORRECTIONS_PROJECT_TRACKER.md) record evidence, owners and acceptance. Findings remain open. The version badge reflects the local manifest, not publication verification.
9
+
8
10
  Total Recall stores your rules, preferences, facts, and project knowledge as plain Markdown (SSSS). It compiles them into IDE instruction surfaces, runs a dream consolidation cycle, and lets agents enqueue background tasks. Host apps and product repos are equal implementations: **nothing is hard-coded to a specific codebase.**
9
11
 
10
12
  ```text
@@ -44,6 +44,7 @@ const COMMANDS = {
44
44
  init: 'init.mjs',
45
45
  setup: 'setup.mjs',
46
46
  start: 'start.mjs',
47
+ startup: 'startup.mjs',
47
48
  deploy: 'deploy.mjs',
48
49
  doctor: 'doctor.mjs',
49
50
  backup: 'backup.mjs',
@@ -60,6 +61,7 @@ const COMMANDS = {
60
61
  forget: 'forget.mjs',
61
62
  edit: 'edit.mjs',
62
63
  recall: 'recall.mjs',
64
+ context: 'context.mjs',
63
65
  search: 'recall.mjs',
64
66
  research: 'research.mjs',
65
67
  proposals: 'proposals.mjs',
@@ -132,6 +134,7 @@ function printHelp() {
132
134
  agent <cmd> Process controller: spawn, list, logs, kill across mesh
133
135
  brain <cmd> Register / ensure any project brain
134
136
  status / doctor Health and diagnostics
137
+ startup check|ensure Readiness checks / missing managed local runtime start
135
138
 
136
139
  Optional:
137
140
  update [--apply] Auto-download total-recall-brain for registered repos
@@ -1,5 +1,7 @@
1
1
  # Total Recall — System Architecture
2
2
 
3
+ > September 30, 2026: the older narrative below is historical background. The [current plugin correction architecture](projects/in-progress/PLUGIN_IMPLEMENTATION_CORRECTIONS/PLUGIN_IMPLEMENTATION_CORRECTIONS_ARCHITECTURE.md) records reviewed boundaries/gaps. Core-only portable memory remains an extraction target; five plugin directories are still bundled. Reviews fail the actual SSSS contract; DSH/search generators do not satisfy host consumption/UI generation. Declared previews do not establish operational UI. Earlier provider/model examples and readiness claims have not been recertified by this review. Resolve endpoints/models from configuration and verify official contracts before integration changes.
4
+
3
5
  > Verified against codebase: `relay.mjs`, `session-watcher.mjs`, `daemon-loop.mjs`, `surface.mjs`, `scheduler.mjs`, `embeddings.mjs`, `dispatch.mjs`, `vault-cache.mjs`, `config.mjs`, `sandbox.mjs`.
4
6
  > Last Updated: May 25, 2026
5
7
 
@@ -132,7 +134,7 @@ Total Recall partitions your brain memory into two virtual directories:
132
134
 
133
135
  ## 🌀 The Daemon Loop & Priority Task Scheduler
134
136
 
135
- The background daemon (`dream.mjs`) manages the **Continuous Intelligent Scheduler** ([src/core/scheduler.mjs](src/core/scheduler.mjs)) and task execution loops:
137
+ The background daemon (`dream.mjs`) manages the **Continuous Intelligent Scheduler** ([src/core/scheduler.mjs](../src/core/scheduler.mjs)) and task execution loops:
136
138
 
137
139
  ### 1. Priority-Driven Queue Mechanics
138
140
  Tasks are enqueued dynamically as standard Markdown files (`type: task`) located in your vault's `scheduler/queue/` directory. The scheduler resolves an **Effective Priority** by multiplying the task's base `priority` (10 to 100) by a strictly-regulated **layer weight** (`LAYER_WEIGHTS`), prioritizing critical correctness and active developer guidance over passive exploration:
@@ -161,7 +163,7 @@ When the active developer queues are empty, the scheduler **automatically auto-g
161
163
 
162
164
  ## 🏃 hard Task Execution
163
165
 
164
- Pending priority tasks are executed by the **Task Runner** ([src/core/task_runner.mjs](src/core/task_runner.mjs)):
166
+ Historical task-runner description: `src/core/task_runner.mjs` is absent from the current tree. Current executor source is [src/core/task-executors.mjs](../src/core/task-executors.mjs); the older routing description below has not been recertified:
165
167
  - **State Machine Updates**: Tasks transition transparently through states: `pending` → `in_progress` → `done` or `failed` (logging full exceptions to disk).
166
168
  - **Subagent Routing**: Routes tasks to specialized subagents depending on category:
167
169
  - `proactive-research`: Spawns autonomous web crawls and gathers cited research reports (`research.mjs`).
@@ -226,7 +228,7 @@ Total Recall consolidates all data folders under the meta-skill `skills/total-re
226
228
 
227
229
  ## 💬 Interactive CLI Agent Chat REPL
228
230
 
229
- Total Recall features a native terminal-based chat REPL (`npx total-recall chat`) running [src/cli/chat.mjs](src/cli/chat.mjs) that enables direct, conversational access to your active brain kernel from the terminal:
231
+ Total Recall features a native terminal-based chat REPL (`npx total-recall chat`) running [src/cli/chat.mjs](../src/cli/chat.mjs) that enables direct, conversational access to your active brain kernel from the terminal:
230
232
 
231
233
  - **CLI-Agent Execution**: Conversation turns are dispatched dynamically to your prioritized **Unified Headless CLI Agents Registry** (`antigravity`, `gemini`, `claude`, `codex`) via `spawnSync`.
232
234
  - **Pre-flight Health Routing**: Upon starting, `chat` checks agent binary availability, selecting the highest-priority active subagent found in your `$PATH`.
@@ -318,9 +320,24 @@ For web dashboard access, Total Recall strictly avoids external third-party OAut
318
320
  - **TLS Protection**: The daemon blocks non-secure remote connections, requiring active HTTPS TLS layers (automated via Caddy proxying) for all production traffic.
319
321
 
320
322
  ### 2. Personal Access Token (PAT) Key Lifecycle Manager
321
- Headless tools, IDE editors, and session Relays authenticate via standard HTTP Bearer headers (`Authorization: Bearer tr_<token>`), managed by the **Keys Lifecycle Manager** ([src/server/keys.mjs](src/server/keys.mjs)):
323
+ Headless tools, IDE editors, and session Relays authenticate via standard HTTP Bearer headers (`Authorization: Bearer tr_<token>`), managed by the **Keys Lifecycle Manager** ([src/server/keys.mjs](../src/server/keys.mjs)):
322
324
  - **SHA-256 Hash Preservation**: To eliminate credential exposure risk, the server **never writes tokens to disk in plaintext**. It persists only a timing-safe SHA-256 hash (`token_hash`) and a short identifying prefix (`token_prefix`) inside the owner-exclusive `config/keys.jsonl` file (written with `0o600` access modes). Diffs are cleanly git-versioned.
323
325
  - **Timing-Attack Protection**: Inbound Bearer PAT tokens are verified using cryptographically secure timing-safe comparisons (`crypto.timingSafeEqual`) on SHA-256 hashes, eliminating timing vector leaks.
324
326
  - **Role-Based Granular Scopes**: Validated PAT keys carry granular permission scopes (e.g., `chat:write`, `memory:read`, `sandbox:run`), permitting fine-grained access control boundaries for different editors.
325
327
 
326
328
  ```
329
+
330
+ ## Task context and local retrieval
331
+
332
+ Connected instruction files contain a small routing bootstrap. Before action,
333
+ `total-recall context` assembles required rules using `src/core/context-policy.mjs`.
334
+ Activation uses existing validated memory tags, not semantic inference or storage
335
+ scope. Unknown applicability stays required; oversized required sets report
336
+ not-ready status. Contributions are admitted whole under complete-render token
337
+ estimates. User-authored text outside generated blocks remains intact.
338
+
339
+ `recall` defaults to local retrieval. Compilation builds `local-search.json` as a
340
+ disposable full-text posting/locator projection; matching documents are hydrated
341
+ individually after path and source checks. `--semantic` opts into the existing
342
+ provider path. Static files do not erase context already loaded in a client.
343
+ Core and generated expert skill entrypoints route into package-relative references.
package/docs/SSSS.md ADDED
@@ -0,0 +1,230 @@
1
+ # SSSS — Structured Semantic Syntax System
2
+
3
+ The official database-free schema specification utilized by the **Total Recall Local AI OS** for SSSS memory vaults, conflict quarantine files, session traces, and background research queue manifests.
4
+
5
+ ---
6
+
7
+ ## ⚡ 1. Core Principles
8
+
9
+ The SSSS specification operates strictly on the following local architecture:
10
+
11
+ | Principle | Specification |
12
+ | :--- | :--- |
13
+ | **No Relation Databases** | System configuration and memories must never live in Postgres, SQLite, or third-party database engines. |
14
+ | **Markdown is Law** | Every primary memory component (rules, patterns, concepts, decisions) exists as a plain `.md` file. |
15
+ | **Semantic YAML** | Every Markdown file MUST contain valid YAML frontmatter specifying its SSSS ontology and parameters. |
16
+ | **Disposable Indexes** | Derived cached indexes (`graph-index.jsonl`, embeddings vectors) are disposable. They are fully rebuildable from the canonical Markdown vaults. |
17
+ | **Git Provenance** | The vault directories are version-controlled, providing a transparent audit trail of intelligence shifts. |
18
+
19
+ ---
20
+
21
+ ## 📂 2. Virtual File System VFS Topography
22
+
23
+ All user data directories are consolidated directly under the meta-skill `skills/total-recall/` path (in the global home directory layer `~/.agent/` or project repository layers `<repo>/.agent/`):
24
+
25
+ ```text
26
+ .agent/
27
+ └── skills/
28
+ └── total-recall/ # THE BRAIN Root Folder
29
+ ├── memory-vault/ # Canonical SSSS Markdown Nodes
30
+ │ ├── invariants/ # absolute invariants (compiled to T1)
31
+ │ ├── patterns/ # best practices ("Always do X")
32
+ │ ├── anti-patterns/ # negative constraints ("Never do X")
33
+ │ ├── preferences/ # style and editor rules
34
+ │ ├── decisions/ # architectural histories
35
+ │ ├── concepts/ # domain models and definitions
36
+ │ └── facts/ # verified evidence and research outputs
37
+ ├── memory-derived/ # Ephemeral cached indexes (JSONL/JSON)
38
+ ├── memory-inbox/ # Staging area for new nodes
39
+ │ ├── pending/ # observational drafts awaiting check
40
+ │ └── conflicts/ # quarantined rule collisions
41
+ └── sessions/ # Ingested conversation history files (JSONL)
42
+ ```
43
+
44
+ ---
45
+
46
+ ## 📝 3. File Type Specifications
47
+
48
+ ### 3.1 Memory Node Specification (`type: memory`)
49
+
50
+ Lives under `.agent/skills/total-recall/memory-vault/<category>/<slug>.md`.
51
+
52
+ ```markdown
53
+ ---
54
+ type: memory
55
+ slug: prefer-atomic-writes
56
+ category: patterns
57
+ title: "Always write files atomically (write-then-rename)"
58
+ schema_version: 2
59
+ status: active
60
+ confidence: 0.95
61
+ importance: 4
62
+ modality: must
63
+ priority: normal
64
+ created: '2026-05-25T14:00:00Z'
65
+ updated: '2026-05-25T14:02:15Z'
66
+ last_accessed: '2026-05-25T14:05:00Z'
67
+ source:
68
+ type: manual
69
+ session_id: active-session-id
70
+ evidence_count: 3
71
+ supersedes: []
72
+ superseded_by: null
73
+ contradicts: []
74
+ tags: [filesystem, reliability]
75
+ routes_to_skills: [deploy]
76
+ subject: agent
77
+ predicate: use_atomic_write
78
+ object: file_system
79
+ sentiment_polarity: directive_must
80
+ sentiment_target: file writes
81
+ decay:
82
+ half_life_days: 180
83
+ access_count: 5
84
+ ---
85
+
86
+ Always write to a temporary file first, then synchronously execute `fs.renameSync()` to overwrite the target path. `rename` is atomic on POSIX-compliant filesystems, preventing partial file corruption.
87
+ ```
88
+
89
+ #### Category Taxonomy
90
+ - `invariants/`: Absolute rules that must never be bypassed. Injected directly into Tier 1 shims.
91
+ - `patterns/`: Best practices and standard operations ("Always do X").
92
+ - `anti-patterns/`: Anti-patterns and constraints to avoid ("Never do X").
93
+ - `preferences/`: Custom style preferences, styling tokens, or coding conventions.
94
+ - `decisions/`: One-time design choices or architectural histories.
95
+ - `concepts/`: Deep technical domain models, explanations, or definitions.
96
+ - `facts/`: Validated factual assertions, library signatures, or platform constraints.
97
+
98
+ #### Required Fields (Zod Schema Spec v2.0)
99
+ - `type`: Must be strictly `"memory"`.
100
+ - `slug`: kebab-case identifier that matches the filename on disk.
101
+ - `category`: Must match the parent directory name.
102
+ - `title`: A single-line human-readable summary of the rule.
103
+ - `schema_version`: Integer specifying the schema standard (must be `2`).
104
+ - `status`: Lifecycle enum: `active | draft | superseded | deprecated`.
105
+ - `confidence`: Floating-point value between `0.0` and `1.0`.
106
+ - `importance`: Integer between `1` and `5`.
107
+ - `modality`: Enforcement strength enum: `must | must_not | should | should_not`.
108
+ - `subject`/`predicate`/`object`: Structured triple checks used for O(1) semantic clash detection.
109
+ - `sentiment_polarity`: Sentiment weight mapping: `directive_must | directive_must_not | descriptive | preference`.
110
+ - `decay.half_life_days`: Interval in days before confidence halves from disuse.
111
+
112
+ ---
113
+
114
+ ### 3.2 Conflict Record Specification (`type: conflict`)
115
+
116
+ Quarantined under `.agent/skills/total-recall/memory-inbox/conflicts/<conflict-id>.md` when two rules collide.
117
+
118
+ ```markdown
119
+ ---
120
+ type: conflict
121
+ conflict_id: conflict-2026-05-25-001
122
+ status: auto-resolved
123
+ new_slug: use-pm2-reload
124
+ existing_slug: use-pm2-restart
125
+ detected_at: '2026-05-25T14:10:00Z'
126
+ reason: "Semantic clash on subject 'pm2' with cosine similarity 0.89 ≥ 0.75"
127
+ resolution: "supersede: use-pm2-reload"
128
+ resolved_at: '2026-05-25T14:10:01Z'
129
+ ---
130
+
131
+ ### Collision Targets:
132
+ - New: `use-pm2-reload` (User-written preferences)
133
+ - Existing: `use-pm2-restart` (Research-derived facts)
134
+ ```
135
+
136
+ #### Collision Tier Resolution Matrix
137
+ When conflicts are checked, the steering engine attempts auto-resolution in order:
138
+ 1. **Double Absolute**: Both are `priority: absolute` → **Quarantine** (Requires manual developer intervention via `total-recall resolve`).
139
+ 2. **Invariant Dominance**: One is a protected invariant → **Invariant wins** automatically.
140
+ 3. **User Authority**: One is user-created and the other is machine-derived → **User intent wins**.
141
+ 4. **Temporal Cascade**: Same source authority → **Most recent timestamp wins**.
142
+
143
+ ---
144
+
145
+ ### 3.3 Session Log Specification (`type: session`, JSONL)
146
+
147
+ Stored under `.agent/skills/total-recall/sessions/<session-id>.jsonl`. One flat JSON object per conversation trace.
148
+
149
+ ```jsonl
150
+ {"id":"a1","parentId":null,"type":"task","ts":"2026-05-25T14:00:00Z","content":"Provision REST router."}
151
+ {"id":"a2","parentId":"a1","type":"tool_call","ts":"2026-05-25T14:00:15Z","content":"write_file src/server/routes/keys.mjs"}
152
+ {"id":"a3","parentId":"a2","type":"observation","ts":"2026-05-25T14:01:00Z","content":"Keys router successfully mounted."}
153
+ ```
154
+
155
+ ---
156
+
157
+ ### 3.4 Skill Manifest Specification (`type: skill`)
158
+
159
+ Stored under `.agent/skills/<name>/SKILL.md` (or consolidated namespaces).
160
+
161
+ ```markdown
162
+ ---
163
+ type: skill
164
+ name: code-quality
165
+ description: "Verify TypeScript compiles and lint checks pass cleanly."
166
+ needs: []
167
+ token_budget: 4000
168
+ last_compiled: '2026-05-25T14:02:00Z'
169
+ schema_version: 1
170
+ ---
171
+
172
+ # Code Quality
173
+
174
+ ## Authoritative Rules (compiled from memory-vault)
175
+
176
+ <!-- BEGIN INJECTED MEMORY: do not edit by hand; rebuilt by total-recall surface -->
177
+ <!-- @route: hybrid-bm25, generated_at: 2026-05-25T14:02:00Z -->
178
+
179
+ - **never-run-tsc-directly** (confidence 1.0, importance 5):
180
+ NEVER run tsc or eslint directly. Always use standard skills scripts.
181
+
182
+ <!-- END INJECTED MEMORY -->
183
+
184
+ ## Mechanics
185
+ ...
186
+ ```
187
+
188
+ ---
189
+
190
+ ### 3.5 Research Queue Task Specification (`type: task`)
191
+
192
+ Lives under `.agent/skills/total-recall/scheduler/queue/<slug>.md`. Outlines background research agendas.
193
+
194
+ ```markdown
195
+ ---
196
+ type: task
197
+ priority: 85
198
+ category: proactive-research
199
+ target: concepts/cloudflare-worker-bindings.md
200
+ estimated_calls: 30
201
+ deadline: '2026-06-01'
202
+ created_by: research-daemon
203
+ status: pending
204
+ progress: 0
205
+ ---
206
+
207
+ ## Objective
208
+ Research Cloudflare Workers bind capabilities for environment mappings.
209
+
210
+ ## Steps
211
+ 1. Crawl official Cloudflare Worker environment binding documentation.
212
+ 2. Draft a conceptual node with code examples.
213
+ 3. Validate node against SSSS Zod v2 specifications.
214
+
215
+ ## Success Criteria
216
+ - [ ] MD report has valid schema-v2 frontmatter
217
+ - [ ] Zero lint issues detected
218
+ ```
219
+
220
+ ---
221
+
222
+ ## ⚡ 4. Three-Tier Memory Surfacing Hierarchy
223
+
224
+ To ensure local IDE sessions remain lightning-fast and under token thresholds, memory nodes are progressively disclosed based on context relevance:
225
+
226
+ | Surfacing Tier | File Location | Intended Scope / Purpose | Token Overhead | Latency |
227
+ | :--- | :--- | :--- | :--- | :--- |
228
+ | **Tier 1: Hot** | `INSTRUCTIONS.md` / `.cursorrules` | Absolute invariants that must govern every single prompt. | < 1,000 tokens | 0ms (pre-loaded) |
229
+ | **Tier 2: Skills** | `SKILL.md` files | Behavioral rule capsules loaded dynamically on demand. | ≤ 7 rules / skill | ~100ms (file read) |
230
+ | **Tier 3: Vault** | `memory-vault/` directory | Full vector-indexed catalog of experiences and facts. | Unlimited | ~500ms (semantic scan) |
@@ -0,0 +1,77 @@
1
+ ---
2
+ title: Total Recall CLI inventory
3
+ tags: [cli, TR_CORE_FOCUS]
4
+ ---
5
+
6
+ # CLI inventory (core | optional | legacy)
7
+
8
+ Classification for the portable-memory product focus. Commands remain available unless noted; **core** is what default docs and onboarding emphasize.
9
+
10
+ ## Core
11
+
12
+ | Command | Role |
13
+ |---------|------|
14
+ | `init` | Bootstrap global or project brain + openwiki |
15
+ | `connect <client>` | Wire IDE / Obsidian / generic HTTP host |
16
+ | `remember` / `forget` | Write-path memory |
17
+ | `recall` / `search` | Read-path hybrid search |
18
+ | `compile` / `rebuild` | Surfaces + indexes |
19
+ | `dream` | Sleep-path consolidation |
20
+ | `task` | Open daemon task envelope |
21
+ | `daemon` | Background worker (ingest, tasks, system dream) |
22
+ | `skill` | Registry, deploy, track, multi-repo sync |
23
+ | `secret` / `secrets` | Secrets store + usage (not vault) |
24
+ | `mesh` | Control server: nodes, ACL policy, Tailscale SSH |
25
+ | `harness` | Multi-harness orchestration, task dispatch, council consensus |
26
+ | `agent` | Process controller (spawn, list, logs, kill) across mesh |
27
+ | `brain` | List / register / ensure / unregister project brains |
28
+ | `status` | Health / brain connection summary |
29
+ | `doctor` | Environment diagnostics |
30
+ | `help` | Offline help topics |
31
+
32
+ ## Optional
33
+
34
+ | Command | Role |
35
+ |---------|------|
36
+ | `research` | Long-horizon research queue (user-enqueued) |
37
+ | `share` | Quick capture to remember/research |
38
+ | `ingest` | IDE log / takeout ingest (also runs in dream/daemon) |
39
+ | `import` | Import existing rule files into vault |
40
+ | `export` | OKF bundle export |
41
+ | `relay` | Ship local sessions to remote brain |
42
+ | `setup` | Interactive provision wizard |
43
+ | `deploy` | Host provision (Caddy, tunnels, services) |
44
+ | `start` | Foreground brain server |
45
+ | `backup` / `restore` | Encrypted VFS backup |
46
+ | `config` | security.yml / budget.yml style settings |
47
+ | `map` | Vault category visualization |
48
+ | `key` | Dashboard/API PATs |
49
+ | `hash-password` / `reset-password` | Dashboard auth helpers |
50
+ | `lint` | SSSS schema validation |
51
+ | `sync` | Pull remote brain instructions / vault git helpers |
52
+
53
+ ## Legacy / niche
54
+
55
+ | Command | Role |
56
+ |---------|------|
57
+ | `chat` | Terminal chat against local server |
58
+ | `collab` | Collab sandbox dev server |
59
+ | `friction` | Watchdog latency analysis |
60
+ | `upgrade` | Kernel model swap helpers |
61
+ | `migrate` | Schema migrations |
62
+ | `snapshot` | VFS snapshots |
63
+ | `command` | Project-local custom CLI commands |
64
+
65
+ ## Not product surface (repo hygiene)
66
+
67
+ Root one-off scripts (`fix-*.mjs`, `patch-*.mjs`) are **not** CLI entrypoints. Prefer deleting or moving them out of the package root in a follow-up hygiene PR; they are not part of the published command surface.
68
+
69
+ ## Env flags (power)
70
+
71
+ | Env | Effect |
72
+ |-----|--------|
73
+ | `TR_IDLE_TASKS=1` | Allow daemon idle task invent |
74
+ | `TR_POWER_EXECUTORS=1` | Enable system2 / cutoff / self-diagnosis style jobs |
75
+ | `TR_REMOTE_VAULT_SYNC=1` | Optional remote vault content sync |
76
+ | `TR_SECRETS_PASSWORD` | AES-encrypt secrets.enc |
77
+ | `TR_SYNC_REPOS` | Extra multi-repo roots (`:` / `,` separated) |