clew-code 0.2.20 → 0.2.22
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/dist/main.js +1888 -1883
- package/docs/architecture.html +91 -148
- package/docs/assets/clew-agent-loop.png +0 -0
- package/docs/assets/clew-general-architecture.png +0 -0
- package/docs/assets/clew-mcp-architecture.png +0 -0
- package/docs/assets/clew-p2p-swarm.png +0 -0
- package/docs/changelog.html +150 -0
- package/docs/cli-reference.html +90 -0
- package/docs/commands.html +156 -265
- package/docs/configuration.html +85 -147
- package/docs/contributing.html +91 -0
- package/docs/css/styles.css +425 -425
- package/docs/daemon.html +62 -129
- package/docs/features/bridge-mode.html +61 -66
- package/docs/features/evals.html +57 -149
- package/docs/features/searxng-search.html +58 -118
- package/docs/features/sentry-setup.html +61 -124
- package/docs/index.html +137 -125
- package/docs/installation.html +77 -105
- package/docs/internals/growthbook-ab-testing.html +69 -91
- package/docs/internals/hidden-features.html +81 -143
- package/docs/js/main.js +29 -0
- package/docs/loop.html +69 -181
- package/docs/mcp.html +99 -247
- package/docs/models.html +69 -110
- package/docs/permission-model.html +86 -102
- package/docs/plugins.html +84 -102
- package/docs/providers.html +87 -127
- package/docs/quick-start.html +81 -93
- package/docs/research-memory.html +71 -102
- package/docs/security.html +71 -0
- package/docs/skills.html +67 -117
- package/docs/swarm.html +78 -236
- package/docs/tools.html +152 -151
- package/docs/troubleshooting.html +86 -106
- package/docs/voice-mode.html +79 -0
- package/package.json +1 -1
- package/docs/architecture.th.html +0 -79
- package/docs/clew-code-architecture.html +0 -1126
- package/docs/commands.th.html +0 -269
- package/docs/configuration.th.html +0 -108
- package/docs/daemon.th.html +0 -73
- package/docs/features/bridge-mode.th.html +0 -62
- package/docs/features/evals.th.html +0 -62
- package/docs/features/searxng-search.th.html +0 -67
- package/docs/features/sentry-setup.th.html +0 -69
- package/docs/features/swarm.html +0 -156
- package/docs/generated/providers.html +0 -625
- package/docs/generated/tools.html +0 -558
- package/docs/index.th.html +0 -292
- package/docs/installation.th.html +0 -105
- package/docs/internals/growthbook-ab-testing.th.html +0 -60
- package/docs/internals/hidden-features.th.html +0 -107
- package/docs/loop.th.html +0 -227
- package/docs/mcp.th.html +0 -207
- package/docs/models.th.html +0 -61
- package/docs/permission-model.th.html +0 -67
- package/docs/plugins.th.html +0 -79
- package/docs/prompts-and-features.html +0 -806
- package/docs/providers.th.html +0 -81
- package/docs/quick-start.th.html +0 -89
- package/docs/research-memory.th.html +0 -72
- package/docs/skills.th.html +0 -90
- package/docs/swarm.th.html +0 -280
- package/docs/tools.th.html +0 -84
- package/docs/troubleshooting.th.html +0 -85
package/docs/providers.html
CHANGED
|
@@ -1,127 +1,87 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<tr><
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<tr><td>
|
|
33
|
-
<tr><td>
|
|
34
|
-
<tr><td>
|
|
35
|
-
<tr><td>
|
|
36
|
-
<tr><td>
|
|
37
|
-
<tr><td>
|
|
38
|
-
<tr><td>
|
|
39
|
-
<tr><td>
|
|
40
|
-
<tr><td>
|
|
41
|
-
<tr><td>
|
|
42
|
-
<tr><td>
|
|
43
|
-
<tr><td>
|
|
44
|
-
<tr><td>NVIDIA NIM</td><td><code>NVIDIA_API_KEY</code></td><td
|
|
45
|
-
<tr><td>
|
|
46
|
-
<tr><td>
|
|
47
|
-
<tr><td>
|
|
48
|
-
<tr><td>
|
|
49
|
-
<tr><td>
|
|
50
|
-
<tr><td>
|
|
51
|
-
<tr><td>
|
|
52
|
-
<tr><td>
|
|
53
|
-
<tr><td>
|
|
54
|
-
<tr><td>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
<li><strong>toolCalling</strong> — native, adapted, or none</li>
|
|
89
|
-
<li><strong>vision</strong> — Image input support</li>
|
|
90
|
-
<li><strong>jsonSchema</strong> — Structured output via JSON schema</li>
|
|
91
|
-
<li><strong>reasoningEffort</strong> — Configurable reasoning depth</li>
|
|
92
|
-
<li><strong>contextLength</strong> — Maximum context window size</li>
|
|
93
|
-
</ul>
|
|
94
|
-
|
|
95
|
-
<h2>Local / Offline Development</h2>
|
|
96
|
-
<pre><code># Ollama — fully offline
|
|
97
|
-
export OLLAMA_API_KEY=ollama # (any non-empty value)
|
|
98
|
-
export OLLAMA_HOST=http://localhost:11434
|
|
99
|
-
clew
|
|
100
|
-
> /model ollama/llama4:70b
|
|
101
|
-
|
|
102
|
-
# Debug specific provider
|
|
103
|
-
DEBUG=provider:anthropic clew</code></pre>
|
|
104
|
-
|
|
105
|
-
<footer class="footer">
|
|
106
|
-
<span>Clew Code 0.2.14 — Open Source</span>
|
|
107
|
-
<div class="footer-links">
|
|
108
|
-
<a href="https://github.com/ClewCode/ClewCode">GitHub</a>
|
|
109
|
-
<a href="https://github.com/ClewCode/ClewCode/issues">Issues</a>
|
|
110
|
-
</div>
|
|
111
|
-
</footer>
|
|
112
|
-
</main>
|
|
113
|
-
<nav class="toc-sidebar"></nav>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
<script src="js/main.js"></script>
|
|
117
|
-
</body>
|
|
118
|
-
</html>
|
|
119
|
-
/footer>
|
|
120
|
-
</main>
|
|
121
|
-
<nav class="toc-sidebar"></nav>
|
|
122
|
-
</div>
|
|
123
|
-
</div>
|
|
124
|
-
<script src="js/main.js"></script>
|
|
125
|
-
</body>
|
|
126
|
-
</html>
|
|
127
|
-
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Providers — Clew Code</title>
|
|
7
|
+
<meta name="description" href="All 27 AI providers supported by Clew Code.">
|
|
8
|
+
<link rel="icon" type="image/svg+xml" href="assets/clew.svg">
|
|
9
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
10
|
+
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
11
|
+
<link rel="stylesheet" href="css/styles.css">
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<header class="header"></header>
|
|
15
|
+
<div id="sidebarOverlay" class="sidebar-overlay"></div>
|
|
16
|
+
<aside id="sidebar" class="sidebar"></aside>
|
|
17
|
+
|
|
18
|
+
<div class="content-wrap">
|
|
19
|
+
<div class="content">
|
|
20
|
+
|
|
21
|
+
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span class="current">Providers</span></div>
|
|
22
|
+
|
|
23
|
+
<h1>Providers</h1>
|
|
24
|
+
<p class="sub">Clew Code supports 27 AI providers. Switch between them anytime with <code>/model</code>.</p>
|
|
25
|
+
|
|
26
|
+
<h2 id="supported">Supported Providers</h2>
|
|
27
|
+
<table>
|
|
28
|
+
<thead>
|
|
29
|
+
<tr><th>Provider</th><th>Env Variable</th><th>Notes</th></tr>
|
|
30
|
+
</thead>
|
|
31
|
+
<tbody>
|
|
32
|
+
<tr><td>Anthropic</td><td><code>ANTHROPIC_API_KEY</code></td><td>Claude models</td></tr>
|
|
33
|
+
<tr><td>OpenAI</td><td><code>OPENAI_API_KEY</code></td><td>GPT-4, GPT-4o, o-series</td></tr>
|
|
34
|
+
<tr><td>Google Gemini</td><td><code>GOOGLE_API_KEY</code></td><td>Gemini 1.5/2.0</td></tr>
|
|
35
|
+
<tr><td>DeepSeek</td><td><code>DEEPSEEK_API_KEY</code></td><td>DeepSeek-V3, R1</td></tr>
|
|
36
|
+
<tr><td>Groq</td><td><code>GROQ_API_KEY</code></td><td>Fast inference</td></tr>
|
|
37
|
+
<tr><td>xAI (Grok)</td><td><code>XAI_API_KEY</code></td><td>Grok models</td></tr>
|
|
38
|
+
<tr><td>Mistral</td><td><code>MISTRAL_API_KEY</code></td><td>Mistral Large, Small</td></tr>
|
|
39
|
+
<tr><td>Cohere</td><td><code>COHERE_API_KEY</code></td><td>Command R+</td></tr>
|
|
40
|
+
<tr><td>Perplexity</td><td><code>PERPLEXITY_API_KEY</code></td><td>Sonar models</td></tr>
|
|
41
|
+
<tr><td>Cerebras</td><td><code>CEREBRAS_API_KEY</code></td><td>Fast ASIC inference</td></tr>
|
|
42
|
+
<tr><td>Moonshot (Kimi)</td><td><code>MOONSHOT_API_KEY</code></td><td>Chinese market</td></tr>
|
|
43
|
+
<tr><td>Zhipu (GLM)</td><td><code>ZHIPU_API_KEY</code></td><td>GLM models</td></tr>
|
|
44
|
+
<tr><td>NVIDIA NIM</td><td><code>NVIDIA_API_KEY</code></td><td>Self-hosted NIM</td></tr>
|
|
45
|
+
<tr><td>OpenRouter</td><td><code>OPENROUTER_API_KEY</code></td><td>Unified API to many models</td></tr>
|
|
46
|
+
<tr><td>GitHub Copilot</td><td><code>COPILOT_GITHUB_TOKEN</code></td><td>Copilot models</td></tr>
|
|
47
|
+
<tr><td>OpenCode</td><td><code>OPENCODE_API_KEY</code></td><td>Open-source provider</td></tr>
|
|
48
|
+
<tr><td>KiloCode</td><td><code>KILOCODE_API_KEY</code></td><td>Kilo API</td></tr>
|
|
49
|
+
<tr><td>Ollama</td><td><code>OLLAMA_HOST</code></td><td>Local models (<code>http://localhost:11434</code>)</td></tr>
|
|
50
|
+
<tr><td>Together AI</td><td><code>TOGETHER_API_KEY</code></td><td>Hosted open models</td></tr>
|
|
51
|
+
<tr><td>Fireworks AI</td><td><code>FIREWORKS_API_KEY</code></td><td>Fast inference</td></tr>
|
|
52
|
+
<tr><td>Deep Infra</td><td><code>DEEP_INFRA_API_KEY</code></td><td>Serverless GPU</td></tr>
|
|
53
|
+
<tr><td>SiliconFlow</td><td><code>SILICONFLOW_API_KEY</code></td><td>Asian cloud</td></tr>
|
|
54
|
+
<tr><td>Hugging Face</td><td><code>HUGGINGFACE_API_KEY</code></td><td>HF Inference API</td></tr>
|
|
55
|
+
<tr><td>Poe</td><td><code>POE_API_KEY</code></td><td>Poe by Quora</td></tr>
|
|
56
|
+
<tr><td>DigitalOcean</td><td><code>DIGITALOCEAN_API_KEY</code></td><td>GPU droplets</td></tr>
|
|
57
|
+
<tr><td>Cline</td><td><code>CLINE_API_KEY</code></td><td>Cline provider</td></tr>
|
|
58
|
+
<tr><td>OpenCode Go</td><td><code>OPENCODE_GO_API_KEY</code></td><td>OpenCode Go variant</td></tr>
|
|
59
|
+
</tbody>
|
|
60
|
+
</table>
|
|
61
|
+
|
|
62
|
+
<h2 id="switch">Switching Providers</h2>
|
|
63
|
+
<p>Use the <code>/model</code> command inside the REPL:</p>
|
|
64
|
+
<pre><code class="language-bash">❯ /model openai
|
|
65
|
+
❯ /model gpt-5.5
|
|
66
|
+
|
|
67
|
+
❯ /model deepseek-v4-flash
|
|
68
|
+
|
|
69
|
+
❯ /model ollama/llama3.3
|
|
70
|
+
</code></pre>
|
|
71
|
+
|
|
72
|
+
<h2 id="list">List Available Models</h2>
|
|
73
|
+
<pre><code class="language-bash">❯ /model list
|
|
74
|
+
</code></pre>
|
|
75
|
+
<p>Shows live model lists from provider APIs with capability tags:<br>
|
|
76
|
+
<code>[200K ctx, vision, tools, reason, free]</code></p>
|
|
77
|
+
|
|
78
|
+
<h2 id="effort">Reasoning Effort</h2>
|
|
79
|
+
<p>Some providers expose <code>reasoningEffort</code> (NVIDIA, DeepSeek, OpenRouter, etc.). Control it with:</p>
|
|
80
|
+
<pre><code class="language-bash">❯ /effort high
|
|
81
|
+
</code></pre>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<script src="js/main.js"></script>
|
|
86
|
+
</body>
|
|
87
|
+
</html>
|
package/docs/quick-start.html
CHANGED
|
@@ -1,93 +1,81 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
clew
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
>
|
|
52
|
-
|
|
53
|
-
>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
<div class="callout callout-info">
|
|
83
|
-
<strong>Tips</strong>
|
|
84
|
-
Type <code>/</code> to discover all commands. Use <code>/powerup</code> for interactive lessons. Set <code>--model sonnet</code> at startup to skip the default model.
|
|
85
|
-
</div>
|
|
86
|
-
</main>
|
|
87
|
-
<nav class="toc-sidebar"></nav>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
<script src="js/main.js"></script>
|
|
91
|
-
</body>
|
|
92
|
-
</html>
|
|
93
|
-
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Quick Start — Clew Code</title>
|
|
7
|
+
<meta name="description" content="Get started with Clew Code in under a minute.">
|
|
8
|
+
<link rel="icon" type="image/svg+xml" href="assets/clew.svg">
|
|
9
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
10
|
+
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
11
|
+
<link rel="stylesheet" href="css/styles.css">
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<header class="header"></header>
|
|
15
|
+
<div id="sidebarOverlay" class="sidebar-overlay"></div>
|
|
16
|
+
<aside id="sidebar" class="sidebar"></aside>
|
|
17
|
+
|
|
18
|
+
<div class="content-wrap">
|
|
19
|
+
<div class="content">
|
|
20
|
+
|
|
21
|
+
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span class="current">Quick Start</span></div>
|
|
22
|
+
|
|
23
|
+
<h1>Quick Start</h1>
|
|
24
|
+
<p class="sub">Get Clew Code running in under a minute.</p>
|
|
25
|
+
|
|
26
|
+
<h2 id="install">1. Install</h2>
|
|
27
|
+
<pre><code class="language-bash">npm install -g clew-code
|
|
28
|
+
</code></pre>
|
|
29
|
+
<p>Requires <a href="https://bun.sh">Bun</a> 1.3+, Node.js 18+, Git, and one provider API key.</p>
|
|
30
|
+
|
|
31
|
+
<h2 id="run">2. Run</h2>
|
|
32
|
+
<pre><code class="language-bash">cd my-project
|
|
33
|
+
clew
|
|
34
|
+
</code></pre>
|
|
35
|
+
<p>On first launch you'll be prompted to select a provider.</p>
|
|
36
|
+
|
|
37
|
+
<h2 id="configure-provider">3. Configure a Provider</h2>
|
|
38
|
+
<p>Inside the REPL, pick your provider and model:</p>
|
|
39
|
+
<pre><code class="language-bash">❯ /model openai
|
|
40
|
+
❯ /model gpt-5.5
|
|
41
|
+
|
|
42
|
+
❯ /model deepseek-v4-pro
|
|
43
|
+
|
|
44
|
+
❯ /model ollama/llama3.3
|
|
45
|
+
</code></pre>
|
|
46
|
+
<p>Or set environment variables before starting:</p>
|
|
47
|
+
<pre><code class="language-bash">export ANTHROPIC_API_KEY=sk-ant-...
|
|
48
|
+
export OPENAI_API_KEY=sk-...
|
|
49
|
+
export GOOGLE_API_KEY=...
|
|
50
|
+
export DEEPSEEK_API_KEY=...
|
|
51
|
+
</code></pre>
|
|
52
|
+
|
|
53
|
+
<h2 id="first-commands">4. Try Commands</h2>
|
|
54
|
+
<pre><code class="language-bash">❯ /help # list everything
|
|
55
|
+
❯ /status # current provider, model, context info
|
|
56
|
+
❯ /mesh discover # find other Clew instances on LAN
|
|
57
|
+
❯ /mcp list # connected MCP servers
|
|
58
|
+
</code></pre>
|
|
59
|
+
|
|
60
|
+
<h2 id="one-shot">One-Shot Mode</h2>
|
|
61
|
+
<p>Pipe-friendly single-use mode:</p>
|
|
62
|
+
<pre><code class="language-bash">clew -p "summarize CHANGELOG.md"
|
|
63
|
+
</code></pre>
|
|
64
|
+
|
|
65
|
+
<h2 id="resume">Resume Last Session</h2>
|
|
66
|
+
<pre><code class="language-bash">clew --resume last
|
|
67
|
+
</code></pre>
|
|
68
|
+
|
|
69
|
+
<h2 id="next">Next Steps</h2>
|
|
70
|
+
<ul>
|
|
71
|
+
<li><a href="installation.html">Full installation guide</a></li>
|
|
72
|
+
<li><a href="configuration.html">Configuration reference</a></li>
|
|
73
|
+
<li><a href="providers.html">All 27 providers</a></li>
|
|
74
|
+
<li><a href="commands.html">Slash commands</a></li>
|
|
75
|
+
</ul>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<script src="js/main.js"></script>
|
|
80
|
+
</body>
|
|
81
|
+
</html>
|
|
@@ -1,102 +1,71 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
<tr><td><code>/memory preview</code></td><td>Preview sessions ready for consolidation</td></tr>
|
|
73
|
-
<tr><td><code>/memory consolidate</code></td><td>Mark old sessions as consolidated</td></tr>
|
|
74
|
-
<tr><td><code>/memory search <query></code></td><td>Search indexed memory facts using SQLite FTS5</td></tr>
|
|
75
|
-
<tr><td><code>/memory-search</code></td><td>Search memories using FTS5 (cross-lingual)</td></tr>
|
|
76
|
-
</table>
|
|
77
|
-
|
|
78
|
-
<h2>Architecture Files</h2>
|
|
79
|
-
<table>
|
|
80
|
-
<tr><th>Path</th><th>Role</th></tr>
|
|
81
|
-
<tr><td><code>src/research/</code></td><td>Deep research, dossier generation, truth checking, source ranking</td></tr>
|
|
82
|
-
<tr><td><code>src/memory/</code></td><td>SQLite FTS5 memory search (14 files, no embeddings)</td></tr>
|
|
83
|
-
<tr><td><code>src/services/longTermMemory/</code></td><td>Knowledge graph, experience system, consolidation, timeline, cross-session, auto-inject</td></tr>
|
|
84
|
-
</table>
|
|
85
|
-
|
|
86
|
-
<footer class="footer">
|
|
87
|
-
<span>Clew Code 0.2.14 — Open Source</span>
|
|
88
|
-
<div class="footer-links">
|
|
89
|
-
<a href="https://github.com/ClewCode/ClewCode">GitHub</a>
|
|
90
|
-
<a href="https://github.com/ClewCode/ClewCode/issues">Issues</a>
|
|
91
|
-
</div>
|
|
92
|
-
</footer>
|
|
93
|
-
</main>
|
|
94
|
-
<nav class="toc-sidebar"></nav>
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
97
|
-
<script src="js/main.js"></script>
|
|
98
|
-
</body>
|
|
99
|
-
</html>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Research & Memory — Clew Code</title>
|
|
7
|
+
<meta name="description" content="Persistent memory and research system in Clew Code.">
|
|
8
|
+
<link rel="icon" type="image/svg+xml" href="assets/clew.svg">
|
|
9
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
10
|
+
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
11
|
+
<link rel="stylesheet" href="css/styles.css">
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<header class="header"></header>
|
|
15
|
+
<div id="sidebarOverlay" class="sidebar-overlay"></div>
|
|
16
|
+
<aside id="sidebar" class="sidebar"></aside>
|
|
17
|
+
|
|
18
|
+
<div class="content-wrap">
|
|
19
|
+
<div class="content">
|
|
20
|
+
|
|
21
|
+
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span class="current">Research & Memory</span></div>
|
|
22
|
+
|
|
23
|
+
<h1>Research & Memory</h1>
|
|
24
|
+
<p class="sub">Clew Code learns from your sessions over time. The memory system persists knowledge, preferences, and project context across sessions.</p>
|
|
25
|
+
|
|
26
|
+
<h2 id="auto-memory">Auto-Memory</h2>
|
|
27
|
+
<p>Clew Code automatically captures lessons from edit and exec sessions, storing them in <code>.moocode/memory.md</code>. The system tracks:</p>
|
|
28
|
+
<ul>
|
|
29
|
+
<li>Project conventions and patterns</li>
|
|
30
|
+
<li>User preferences and workflow choices</li>
|
|
31
|
+
<li>Frequently used commands and tools</li>
|
|
32
|
+
<li>Architectural decisions and their rationale</li>
|
|
33
|
+
</ul>
|
|
34
|
+
|
|
35
|
+
<h2 id="ltm">Long-Term Memory</h2>
|
|
36
|
+
<p>The long-term memory system uses SQLite (<code>~/.clew/projects/<project>/session-memory.db</code>) with a human-like consolidation model:</p>
|
|
37
|
+
|
|
38
|
+
<table>
|
|
39
|
+
<thead>
|
|
40
|
+
<tr><th>Age</th><th>Level</th><th>Detail</th></tr>
|
|
41
|
+
</thead>
|
|
42
|
+
<tbody>
|
|
43
|
+
<tr><td>< 7 days</td><td>Raw</td><td>Full session detail</td></tr>
|
|
44
|
+
<tr><td>1-4 weeks</td><td>Weekly digest</td><td>Summary + patterns</td></tr>
|
|
45
|
+
<tr><td>> 1 month</td><td>Monthly digest</td><td>High-level trends</td></tr>
|
|
46
|
+
<tr><td>Ancient</td><td>Patterns only</td><td>Recurring topics preserved</td></tr>
|
|
47
|
+
</tbody>
|
|
48
|
+
</table>
|
|
49
|
+
|
|
50
|
+
<h2 id="memory-commands">Memory Commands</h2>
|
|
51
|
+
<pre><code class="language-bash">❯ /memory save # save session summary
|
|
52
|
+
❯ /memory timeline # show chronological session history
|
|
53
|
+
❯ /memory stats # activity density chart
|
|
54
|
+
❯ /memory digest # weekly/monthly digests
|
|
55
|
+
❯ /memory preview # preview sessions ready for consolidation
|
|
56
|
+
❯ /memory consolidate # mark old sessions as consolidated
|
|
57
|
+
❯ /memory search <q> # search stored memory entries
|
|
58
|
+
</code></pre>
|
|
59
|
+
|
|
60
|
+
<h2 id="research">Research System</h2>
|
|
61
|
+
<p>The research system enables deep-dive investigations with persistent findings. Research results are indexed and searchable across sessions.</p>
|
|
62
|
+
<pre><code class="language-bash">❯ /research start "topic" # start a research session
|
|
63
|
+
❯ /research list # list all research topics
|
|
64
|
+
❯ /research show <id> # show research findings
|
|
65
|
+
</code></pre>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<script src="js/main.js"></script>
|
|
70
|
+
</body>
|
|
71
|
+
</html>
|