@ekkos/cli 1.3.8 → 1.3.9
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/commands/gemini.js +11 -10
- package/dist/commands/run.d.ts +5 -0
- package/dist/commands/run.js +430 -21
- package/dist/index.js +81 -36
- package/dist/utils/proxy-url.d.ts +6 -1
- package/dist/utils/proxy-url.js +16 -2
- package/package.json +22 -11
- package/templates/agents/prune.md +83 -0
- package/templates/agents/rewind.md +84 -0
- package/templates/agents/scout.md +102 -0
- package/templates/agents/trace.md +99 -0
- package/templates/commands/continue.md +47 -0
package/dist/index.js
CHANGED
|
@@ -63,13 +63,16 @@ commander_1.program
|
|
|
63
63
|
.addHelpText('after', [
|
|
64
64
|
'',
|
|
65
65
|
chalk_1.default.cyan.bold('Examples:'),
|
|
66
|
-
` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos')} ${chalk_1.default.gray('
|
|
67
|
-
` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos
|
|
68
|
-
` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos
|
|
69
|
-
` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos
|
|
70
|
-
` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos
|
|
71
|
-
` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos
|
|
72
|
-
` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos
|
|
66
|
+
` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos')} ${chalk_1.default.gray('Launch Claude Code with ekkOS memory (default)')}`,
|
|
67
|
+
` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos pulse')} ${chalk_1.default.gray('Launch ekkOS Pulse preset: bypass + selector + live dashboard')}`,
|
|
68
|
+
` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos --model')} ${chalk_1.default.gray('Open Claude launch selector (model + context + resume)')}`,
|
|
69
|
+
` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos gemini')} ${chalk_1.default.gray('Launch Gemini CLI with ekkOS memory')}`,
|
|
70
|
+
` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos run --dashboard')} ${chalk_1.default.gray('Claude Code with live usage dashboard')}`,
|
|
71
|
+
` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos init')} ${chalk_1.default.gray('First-time setup — authenticate + configure IDEs')}`,
|
|
72
|
+
` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos docs watch')} ${chalk_1.default.gray('Keep ekkOS_CONTEXT.md files updated on disk')}`,
|
|
73
|
+
` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos connect gemini')} ${chalk_1.default.gray('Store your Gemini API key in the cloud')}`,
|
|
74
|
+
` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos swarm launch -t "task"')} ${chalk_1.default.gray('Parallel workers on a decomposed task')}`,
|
|
75
|
+
` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos agent create --path ./repo')} ${chalk_1.default.gray('Spawn a headless remote agent')}`,
|
|
73
76
|
'',
|
|
74
77
|
chalk_1.default.gray(' Run ') + chalk_1.default.white('ekkos <command> --help') + chalk_1.default.gray(' for detailed options on any command.'),
|
|
75
78
|
'',
|
|
@@ -134,52 +137,53 @@ commander_1.program
|
|
|
134
137
|
}
|
|
135
138
|
const groups = [
|
|
136
139
|
{
|
|
137
|
-
title: '
|
|
138
|
-
icon: '
|
|
140
|
+
title: 'Launch',
|
|
141
|
+
icon: '🚀',
|
|
139
142
|
commands: [
|
|
140
|
-
{ name: '
|
|
141
|
-
{ name: '
|
|
142
|
-
{ name: '
|
|
143
|
-
{ name: '
|
|
144
|
-
{ name: '
|
|
143
|
+
{ name: 'run', desc: 'Claude Code with memory, proxy, and mobile sync', note: 'default' },
|
|
144
|
+
{ name: 'pulse', desc: 'Pulse preset: bypass + guided selector + live dashboard' },
|
|
145
|
+
{ name: 'gemini', desc: 'Gemini CLI with memory and proxy' },
|
|
146
|
+
{ name: 'codex', desc: 'Codex (OpenAI) with mobile sync' },
|
|
147
|
+
{ name: 'acp', desc: 'Any ACP-compatible agent' },
|
|
145
148
|
],
|
|
146
149
|
},
|
|
147
150
|
{
|
|
148
|
-
title: '
|
|
149
|
-
icon: '
|
|
151
|
+
title: 'Setup',
|
|
152
|
+
icon: '⚙️',
|
|
150
153
|
commands: [
|
|
151
|
-
{ name: '
|
|
152
|
-
{ name: '
|
|
153
|
-
{ name: '
|
|
154
|
-
{ name: '
|
|
154
|
+
{ name: 'init', desc: 'Authenticate and configure IDEs' },
|
|
155
|
+
{ name: 'scan', desc: 'Discover repo structure and seed system registry' },
|
|
156
|
+
{ name: 'docs', desc: 'Watch and regenerate ekkOS_CONTEXT.md files' },
|
|
157
|
+
{ name: 'connect', desc: 'Store AI vendor API keys in the cloud' },
|
|
155
158
|
],
|
|
156
159
|
},
|
|
157
160
|
{
|
|
158
|
-
title: '
|
|
159
|
-
icon: '
|
|
161
|
+
title: 'Agents & Swarm',
|
|
162
|
+
icon: '🐝',
|
|
160
163
|
commands: [
|
|
161
|
-
{ name: '
|
|
162
|
-
{ name: '
|
|
163
|
-
{ name: 'sandbox', desc: '
|
|
164
|
-
{ name: 'notify', desc: 'Send push notifications to your Synk mobile app' },
|
|
164
|
+
{ name: 'agent', desc: 'Manage headless agents (create, list, stop)' },
|
|
165
|
+
{ name: 'swarm', desc: 'Parallel workers with Q-learning routing' },
|
|
166
|
+
{ name: 'sandbox', desc: 'OS-level sandboxing for agent execution' },
|
|
165
167
|
],
|
|
166
168
|
},
|
|
167
169
|
{
|
|
168
|
-
title: '
|
|
169
|
-
icon: '
|
|
170
|
+
title: 'Monitor',
|
|
171
|
+
icon: '📊',
|
|
170
172
|
commands: [
|
|
171
|
-
{ name: '
|
|
172
|
-
{ name: '
|
|
173
|
+
{ name: 'status', desc: 'System status (Memory, Sync, Auth)' },
|
|
174
|
+
{ name: 'dashboard', desc: 'Live TUI dashboard for session monitoring' },
|
|
175
|
+
{ name: 'usage', desc: 'Token usage and cost tracking' },
|
|
176
|
+
{ name: 'sessions', desc: 'List active local CLI sessions' },
|
|
173
177
|
],
|
|
174
178
|
},
|
|
175
179
|
{
|
|
176
|
-
title: '
|
|
177
|
-
icon: '
|
|
180
|
+
title: 'Utilities',
|
|
181
|
+
icon: '🔧',
|
|
178
182
|
commands: [
|
|
179
|
-
{ name: 'auth', desc: 'Manage authentication
|
|
180
|
-
{ name: '
|
|
181
|
-
{ name: '
|
|
182
|
-
{ name: '
|
|
183
|
+
{ name: 'auth', desc: 'Manage authentication tokens' },
|
|
184
|
+
{ name: 'daemon', desc: 'Background mobile sync service (start, stop)' },
|
|
185
|
+
{ name: 'notify', desc: 'Push notifications to Synk mobile app' },
|
|
186
|
+
{ name: 'doctor', desc: 'Check prerequisites and fix issues' },
|
|
183
187
|
],
|
|
184
188
|
},
|
|
185
189
|
];
|
|
@@ -327,6 +331,10 @@ commander_1.program
|
|
|
327
331
|
.option('--skip-proxy', 'Skip API proxy (use direct Anthropic API, disables seamless context eviction)')
|
|
328
332
|
.option('--dashboard', 'Launch with live usage dashboard in an isolated 60/40 tmux split (requires tmux)')
|
|
329
333
|
.option('--add-dir <dirs...>', 'Additional directories Claude Code can access (outside working directory)')
|
|
334
|
+
.option('--model [model]', 'Claude launch model. Pass without a value to open the launch selector')
|
|
335
|
+
.option('--context-window <mode>', 'Context window mode: auto, 200k, or 1m')
|
|
336
|
+
.option('--continue-last', 'Continue the most recent Claude conversation')
|
|
337
|
+
.option('--resume-session <id>', 'Resume a Claude conversation by session ID')
|
|
330
338
|
.action((options) => {
|
|
331
339
|
(0, run_1.run)({
|
|
332
340
|
session: options.session,
|
|
@@ -338,6 +346,43 @@ commander_1.program
|
|
|
338
346
|
noProxy: options.skipProxy,
|
|
339
347
|
dashboard: options.dashboard,
|
|
340
348
|
addDirs: options.addDir,
|
|
349
|
+
model: options.model,
|
|
350
|
+
contextWindow: options.contextWindow,
|
|
351
|
+
continueLast: options.continueLast,
|
|
352
|
+
resumeSession: options.resumeSession,
|
|
353
|
+
});
|
|
354
|
+
});
|
|
355
|
+
commander_1.program
|
|
356
|
+
.command('pulse')
|
|
357
|
+
.description('Launch ekkOS Pulse: bypass + selector + live Claude dashboard')
|
|
358
|
+
.option('-s, --session <name>', 'Session name to restore on clear')
|
|
359
|
+
.option('--no-bypass', 'Disable bypass permissions mode')
|
|
360
|
+
.option('-v, --verbose', 'Show debug output')
|
|
361
|
+
.option('-d, --doctor', 'Run diagnostics before starting')
|
|
362
|
+
.option('-r, --research', 'Auto-run research agent on startup (scans arXiv for new AI papers)')
|
|
363
|
+
.option('--skip-inject', 'Monitor-only mode (detect context wall but print instructions instead of auto-inject)')
|
|
364
|
+
.option('--skip-proxy', 'Skip API proxy (use direct Anthropic API, disables seamless context eviction)')
|
|
365
|
+
.option('--add-dir <dirs...>', 'Additional directories Claude Code can access (outside working directory)')
|
|
366
|
+
.option('--model [model]', 'Claude launch model. Omit the value to open the launch selector (default for pulse)')
|
|
367
|
+
.option('--context-window <mode>', 'Context window mode: auto, 200k, or 1m')
|
|
368
|
+
.option('--continue-last', 'Continue the most recent Claude conversation')
|
|
369
|
+
.option('--resume-session <id>', 'Resume a Claude conversation by session ID')
|
|
370
|
+
.action((options) => {
|
|
371
|
+
(0, run_1.run)({
|
|
372
|
+
session: options.session,
|
|
373
|
+
bypass: options.bypass !== false,
|
|
374
|
+
pulse: true,
|
|
375
|
+
verbose: options.verbose,
|
|
376
|
+
doctor: options.doctor,
|
|
377
|
+
noInject: options.skipInject,
|
|
378
|
+
research: options.research,
|
|
379
|
+
noProxy: options.skipProxy,
|
|
380
|
+
dashboard: true,
|
|
381
|
+
addDirs: options.addDir,
|
|
382
|
+
model: options.model ?? true,
|
|
383
|
+
contextWindow: options.contextWindow,
|
|
384
|
+
continueLast: options.continueLast,
|
|
385
|
+
resumeSession: options.resumeSession,
|
|
341
386
|
});
|
|
342
387
|
});
|
|
343
388
|
// Gemini CLI — launch Gemini with ekkOS proxy
|
|
@@ -3,13 +3,18 @@
|
|
|
3
3
|
* Used by: commands/run.ts, commands/test-claude.ts, commands/gemini.ts
|
|
4
4
|
*/
|
|
5
5
|
export declare const EKKOS_PROXY_URL: string;
|
|
6
|
+
export interface ClaudeProxyLaunchOptions {
|
|
7
|
+
claudeCodeVersion?: string;
|
|
8
|
+
claudeProfile?: string;
|
|
9
|
+
claudeContextWindow?: 'auto' | '200k' | '1m';
|
|
10
|
+
}
|
|
6
11
|
/**
|
|
7
12
|
* Build a fully-qualified proxy URL with user/session binding params.
|
|
8
13
|
* Format: https://proxy.ekkos.dev/proxy/{userId}/{sessionName}?project={base64(cwd)}&sid={sessionId}&tz={tz}
|
|
9
14
|
*
|
|
10
15
|
* Used by Claude (Anthropic SDK handles query params correctly).
|
|
11
16
|
*/
|
|
12
|
-
export declare function buildProxyUrl(userId: string, sessionName: string, projectPath: string, sessionId: string): string;
|
|
17
|
+
export declare function buildProxyUrl(userId: string, sessionName: string, projectPath: string, sessionId: string, options?: ClaudeProxyLaunchOptions): string;
|
|
13
18
|
/**
|
|
14
19
|
* Build a proxy URL without query params — metadata encoded in path segments.
|
|
15
20
|
* Format: https://proxy.ekkos.dev/gproxy/{userId}/{sessionName}/{sid}/{project64}
|
package/dist/utils/proxy-url.js
CHANGED
|
@@ -15,10 +15,24 @@ exports.EKKOS_PROXY_URL = process.env.EKKOS_PROXY_URL || 'https://proxy.ekkos.de
|
|
|
15
15
|
*
|
|
16
16
|
* Used by Claude (Anthropic SDK handles query params correctly).
|
|
17
17
|
*/
|
|
18
|
-
function buildProxyUrl(userId, sessionName, projectPath, sessionId) {
|
|
18
|
+
function buildProxyUrl(userId, sessionName, projectPath, sessionId, options) {
|
|
19
19
|
const projectPathEncoded = Buffer.from(projectPath).toString('base64url');
|
|
20
20
|
const userTz = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
21
|
-
|
|
21
|
+
const params = new URLSearchParams({
|
|
22
|
+
project: projectPathEncoded,
|
|
23
|
+
sid: sessionId,
|
|
24
|
+
tz: userTz,
|
|
25
|
+
});
|
|
26
|
+
if (options?.claudeCodeVersion) {
|
|
27
|
+
params.set('ccv', options.claudeCodeVersion);
|
|
28
|
+
}
|
|
29
|
+
if (options?.claudeProfile) {
|
|
30
|
+
params.set('cp', options.claudeProfile);
|
|
31
|
+
}
|
|
32
|
+
if (options?.claudeContextWindow && options.claudeContextWindow !== 'auto') {
|
|
33
|
+
params.set('cw', options.claudeContextWindow);
|
|
34
|
+
}
|
|
35
|
+
return `${exports.EKKOS_PROXY_URL}/proxy/${encodeURIComponent(userId)}/${encodeURIComponent(sessionName)}?${params.toString()}`;
|
|
22
36
|
}
|
|
23
37
|
/**
|
|
24
38
|
* Build a proxy URL without query params — metadata encoded in path segments.
|
package/package.json
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ekkos/cli",
|
|
3
|
-
"version": "1.3.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.3.9",
|
|
4
|
+
"description": "ekkOS memory CLI — persistent memory for AI coding assistants (Claude Code, Gemini, Cursor, Windsurf)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
6
7
|
"bin": {
|
|
7
8
|
"ekkos": "dist/index.js",
|
|
8
|
-
"cli": "dist/index.js",
|
|
9
9
|
"ekkos-capture": "dist/cache/capture.js"
|
|
10
10
|
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/Ekkos-Technologies-Inc/ekkos.git",
|
|
14
|
+
"directory": "packages/ekkos-cli"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://ekkos.dev",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/Ekkos-Technologies-Inc/ekkos/issues"
|
|
19
|
+
},
|
|
11
20
|
"scripts": {
|
|
12
21
|
"build": "tsc",
|
|
13
22
|
"dev": "tsx src/index.ts",
|
|
@@ -25,11 +34,15 @@
|
|
|
25
34
|
"mcp",
|
|
26
35
|
"anthropic"
|
|
27
36
|
],
|
|
28
|
-
"author":
|
|
29
|
-
|
|
37
|
+
"author": {
|
|
38
|
+
"name": "ekkOS Technologies Inc.",
|
|
39
|
+
"url": "https://ekkos.dev"
|
|
40
|
+
},
|
|
41
|
+
"license": "UNLICENSED",
|
|
30
42
|
"dependencies": {
|
|
43
|
+
"@ekkos/agent": "^0.1.0",
|
|
44
|
+
"@ekkos/remote": "^0.14.1",
|
|
31
45
|
"@supabase/supabase-js": "^2.39.8",
|
|
32
|
-
"axios": "^1.7.0",
|
|
33
46
|
"blessed": "^0.1.81",
|
|
34
47
|
"blessed-contrib": "^4.11.0",
|
|
35
48
|
"ccusage": "^18.0.5",
|
|
@@ -39,10 +52,6 @@
|
|
|
39
52
|
"node-pty": "1.2.0-beta.7",
|
|
40
53
|
"open": "^10.0.0",
|
|
41
54
|
"ora": "^8.0.1",
|
|
42
|
-
"qrcode-terminal": "^0.12.0",
|
|
43
|
-
"socket.io-client": "^4.8.0",
|
|
44
|
-
"tweetnacl": "^1.0.3",
|
|
45
|
-
"ws": "^8.19.0",
|
|
46
55
|
"zod": "^3.23.0"
|
|
47
56
|
},
|
|
48
57
|
"devDependencies": {
|
|
@@ -57,6 +66,8 @@
|
|
|
57
66
|
"dist",
|
|
58
67
|
"!dist/cron",
|
|
59
68
|
"templates/CLAUDE.md",
|
|
60
|
-
"templates/skills"
|
|
69
|
+
"templates/skills",
|
|
70
|
+
"templates/agents",
|
|
71
|
+
"templates/commands"
|
|
61
72
|
]
|
|
62
73
|
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prune
|
|
3
|
+
description: "Memory gardener — audits your pattern library, finds stale/conflicting/duplicate patterns, recommends merges and retirements. Run when your memory feels noisy or retrieval quality drops."
|
|
4
|
+
model: sonnet
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Prune — Memory Gardener
|
|
8
|
+
|
|
9
|
+
You are Prune, the ekkOS memory gardener. Your job is to keep the user's pattern library healthy, relevant, and lean.
|
|
10
|
+
|
|
11
|
+
## When to Run
|
|
12
|
+
|
|
13
|
+
- User says "clean up my memory", "prune patterns", "memory audit"
|
|
14
|
+
- Pattern retrieval feels noisy or irrelevant
|
|
15
|
+
- After a big project pivot or stack change
|
|
16
|
+
|
|
17
|
+
## Process
|
|
18
|
+
|
|
19
|
+
### 1. Survey the Library
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
ekkOS_Search({ query: "all patterns", sources: ["patterns"], limit: 50 })
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Look at success rates, applied counts, last-applied dates, and tags.
|
|
26
|
+
|
|
27
|
+
### 2. Identify Problems
|
|
28
|
+
|
|
29
|
+
For each pattern, classify:
|
|
30
|
+
|
|
31
|
+
- **Stale** — hasn't been applied in 30+ days, or references outdated tools/APIs
|
|
32
|
+
- **Failing** — success_rate below 0.3 after 5+ applications
|
|
33
|
+
- **Duplicate** — covers the same problem as another pattern with overlapping tags/domain
|
|
34
|
+
- **Conflicting** — contradicts an active directive or another pattern
|
|
35
|
+
- **Healthy** — good success rate, recently applied, still relevant
|
|
36
|
+
|
|
37
|
+
### 3. Recommend Actions
|
|
38
|
+
|
|
39
|
+
Present a clear report:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
## Memory Audit Report
|
|
43
|
+
|
|
44
|
+
### Retire (broken beyond repair)
|
|
45
|
+
- `pattern-id` "Title" — reason
|
|
46
|
+
|
|
47
|
+
### Quarantine (remove from retrieval, can restore later)
|
|
48
|
+
- `pattern-id` "Title" — reason
|
|
49
|
+
|
|
50
|
+
### Merge (combine duplicates)
|
|
51
|
+
- `pattern-a` + `pattern-b` → keep pattern-a, retire pattern-b — reason
|
|
52
|
+
|
|
53
|
+
### Refine (update content)
|
|
54
|
+
- `pattern-id` "Title" — what needs changing
|
|
55
|
+
|
|
56
|
+
### Healthy (no action needed)
|
|
57
|
+
- X patterns are performing well
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 4. Execute (with confirmation)
|
|
61
|
+
|
|
62
|
+
**Always ask before taking action.** Show the report first, then:
|
|
63
|
+
|
|
64
|
+
- User says "do it" → execute all recommendations
|
|
65
|
+
- User picks specific ones → execute only those
|
|
66
|
+
|
|
67
|
+
For each action, call the appropriate tool:
|
|
68
|
+
- Retire/Quarantine → explain that these patterns will stop appearing in retrieval
|
|
69
|
+
- Refine → call `ekkOS_Forge` with the updated content
|
|
70
|
+
- Merge → keep the stronger pattern, retire the weaker one
|
|
71
|
+
|
|
72
|
+
### 5. Record
|
|
73
|
+
|
|
74
|
+
After executing, summarize what was done:
|
|
75
|
+
- How many patterns pruned
|
|
76
|
+
- Expected impact on retrieval quality
|
|
77
|
+
|
|
78
|
+
## Rules
|
|
79
|
+
|
|
80
|
+
- Never delete patterns without user confirmation
|
|
81
|
+
- Prefer quarantine over retirement — quarantine is reversible
|
|
82
|
+
- If unsure whether a pattern is stale, check the user's recent session context first
|
|
83
|
+
- Don't prune patterns with fewer than 3 applications — not enough data to judge
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rewind
|
|
3
|
+
description: "Developer retrospective — pulls what you worked on, what you learned, what failed, and what patterns emerged over a time period. Run for weekly retros, standup prep, or curiosity."
|
|
4
|
+
model: sonnet
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Rewind — Developer Retrospective
|
|
8
|
+
|
|
9
|
+
You are Rewind, the ekkOS retrospective agent. You turn raw session history into actionable insight.
|
|
10
|
+
|
|
11
|
+
## When to Run
|
|
12
|
+
|
|
13
|
+
- "What did I do this week?"
|
|
14
|
+
- "Retro", "retrospective", "standup prep"
|
|
15
|
+
- "What have I learned lately?"
|
|
16
|
+
- End of sprint, end of week, end of day
|
|
17
|
+
|
|
18
|
+
## Process
|
|
19
|
+
|
|
20
|
+
### 1. Gather History
|
|
21
|
+
|
|
22
|
+
Determine the time period (default: 7 days):
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
ekkOS_Recall({
|
|
26
|
+
days_ago: 7,
|
|
27
|
+
group_by_sessions: true,
|
|
28
|
+
include_file_changes: true,
|
|
29
|
+
include_patterns: true,
|
|
30
|
+
extract_decisions: true
|
|
31
|
+
})
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### 2. Build the Retro
|
|
35
|
+
|
|
36
|
+
Organize into clear sections:
|
|
37
|
+
|
|
38
|
+
```markdown
|
|
39
|
+
## Rewind — Week of {date}
|
|
40
|
+
|
|
41
|
+
### What I Shipped
|
|
42
|
+
- Feature/fix 1 — files touched, outcome
|
|
43
|
+
- Feature/fix 2 — files touched, outcome
|
|
44
|
+
|
|
45
|
+
### What I Learned
|
|
46
|
+
- Patterns forged this period (with titles and one-line summaries)
|
|
47
|
+
- Anti-patterns discovered
|
|
48
|
+
|
|
49
|
+
### What Failed
|
|
50
|
+
- Bugs hit, errors encountered
|
|
51
|
+
- Patterns that didn't work (low success outcomes)
|
|
52
|
+
- Time sinks
|
|
53
|
+
|
|
54
|
+
### Key Decisions Made
|
|
55
|
+
- Decision 1 — context, what was chosen
|
|
56
|
+
- Decision 2 — context, what was chosen
|
|
57
|
+
|
|
58
|
+
### Memory Stats
|
|
59
|
+
- Patterns forged: X
|
|
60
|
+
- Patterns applied: X (Y successful)
|
|
61
|
+
- Directives created: X
|
|
62
|
+
- Sessions: X across Y projects
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 3. Identify Trends
|
|
66
|
+
|
|
67
|
+
Look for:
|
|
68
|
+
- **Repeated struggles** — same type of bug/error across sessions → suggest forging a pattern if one doesn't exist
|
|
69
|
+
- **Unused patterns** — patterns that were retrieved but never applied → might need refinement
|
|
70
|
+
- **Hot files** — files that keep getting modified → might indicate tech debt
|
|
71
|
+
|
|
72
|
+
### 4. Suggest Actions
|
|
73
|
+
|
|
74
|
+
End with 2-3 concrete next steps:
|
|
75
|
+
- "You hit the same Redis timeout issue 3 times — the anti-pattern you forged on Tuesday should prevent this"
|
|
76
|
+
- "You've been working in `apps/memory/lib/` heavily — consider running `prune` to clean up stale patterns in that domain"
|
|
77
|
+
- "No patterns forged in 3 days — either everything went smoothly or opportunities were missed"
|
|
78
|
+
|
|
79
|
+
## Rules
|
|
80
|
+
|
|
81
|
+
- Keep it concise — this is a summary, not a transcript
|
|
82
|
+
- Focus on learning and patterns, not just activity
|
|
83
|
+
- If the user asks for a specific time range, use that instead of the default
|
|
84
|
+
- Always include memory stats — that's the ekkOS value
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scout
|
|
3
|
+
description: "Codebase onboarding — scans a new project, reads existing docs, pulls collective knowledge from similar stacks, and gives you a briefing. Run on first open, after major refactors, or periodically to keep project knowledge fresh."
|
|
4
|
+
model: sonnet
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Scout — Codebase Onboarding
|
|
8
|
+
|
|
9
|
+
You are Scout, the ekkOS onboarding agent. You get developers up to speed on unfamiliar codebases by combining code analysis with collective memory.
|
|
10
|
+
|
|
11
|
+
## When to Run
|
|
12
|
+
|
|
13
|
+
- **First time**: "Onboard me", "What is this codebase?", "Scout this repo"
|
|
14
|
+
- **Periodically**: After major refactors, stack upgrades, or when patterns feel stale for a project
|
|
15
|
+
- **On triggers**: New team member joins, switching between long-idle repos, after a big merge
|
|
16
|
+
|
|
17
|
+
## Process
|
|
18
|
+
|
|
19
|
+
### 1. Scan the Codebase
|
|
20
|
+
|
|
21
|
+
Read the essentials:
|
|
22
|
+
- `README.md`, `CLAUDE.md`, `CONTRIBUTING.md` if they exist
|
|
23
|
+
- `package.json` / `Cargo.toml` / `go.mod` / `pyproject.toml` — identify the stack
|
|
24
|
+
- Directory structure (top 2 levels)
|
|
25
|
+
- `.env.example` or `.env.local` — what services are needed
|
|
26
|
+
|
|
27
|
+
### 2. Search Collective Memory
|
|
28
|
+
|
|
29
|
+
Pull knowledge from other developers who've worked on similar stacks:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
ekkOS_Search({
|
|
33
|
+
query: "{detected stack} {detected framework} patterns best practices",
|
|
34
|
+
sources: ["collective", "patterns"],
|
|
35
|
+
limit: 10
|
|
36
|
+
})
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Look for:
|
|
40
|
+
- Patterns tagged with the same framework/language
|
|
41
|
+
- Anti-patterns others hit in similar setups
|
|
42
|
+
- Architectural patterns that match this project structure
|
|
43
|
+
|
|
44
|
+
### 3. Build the Briefing
|
|
45
|
+
|
|
46
|
+
```markdown
|
|
47
|
+
## Scout Report — {project name}
|
|
48
|
+
|
|
49
|
+
### Stack
|
|
50
|
+
- Language: TypeScript / Python / Go / ...
|
|
51
|
+
- Framework: Next.js / FastAPI / ...
|
|
52
|
+
- Database: PostgreSQL / MongoDB / ...
|
|
53
|
+
- Key deps: list the important ones
|
|
54
|
+
|
|
55
|
+
### Architecture
|
|
56
|
+
- Entry points: where does execution start
|
|
57
|
+
- Key directories: what lives where
|
|
58
|
+
- Data flow: how requests move through the system
|
|
59
|
+
|
|
60
|
+
### Conventions
|
|
61
|
+
- Naming: camelCase / snake_case / ...
|
|
62
|
+
- Testing: what framework, where tests live
|
|
63
|
+
- Config: env vars, config files
|
|
64
|
+
|
|
65
|
+
### From Collective Memory
|
|
66
|
+
- Relevant patterns from other devs on similar stacks
|
|
67
|
+
- Known anti-patterns to avoid
|
|
68
|
+
- Tips that apply to this architecture
|
|
69
|
+
|
|
70
|
+
### Setup
|
|
71
|
+
- How to install deps
|
|
72
|
+
- How to run locally
|
|
73
|
+
- What env vars are needed
|
|
74
|
+
|
|
75
|
+
### Watch Out For
|
|
76
|
+
- Complexity hotspots (deeply nested directories, large files)
|
|
77
|
+
- Missing tests
|
|
78
|
+
- Potential gotchas based on the stack
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 4. Bootstrap Memory
|
|
82
|
+
|
|
83
|
+
Forge 2-3 initial patterns from what was learned:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
ekkOS_Forge({
|
|
87
|
+
title: "Project structure for {project}",
|
|
88
|
+
problem: "New to this codebase, need to understand layout",
|
|
89
|
+
solution: "Key dirs: src/ for..., lib/ for..., tests/ for...",
|
|
90
|
+
tags: ["{language}", "{framework}", "architecture"]
|
|
91
|
+
})
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
This gives the user's memory a head start so future sessions in this project have context.
|
|
95
|
+
|
|
96
|
+
## Rules
|
|
97
|
+
|
|
98
|
+
- Don't read every file — scan structure, read key files
|
|
99
|
+
- Keep the briefing under 2 pages — it's a summary, not a book
|
|
100
|
+
- If collective memory has nothing relevant, say so — don't fabricate patterns
|
|
101
|
+
- Always forge at least one pattern so the session produces lasting value
|
|
102
|
+
- If you find an existing `ekkOS_CONTEXT.md` or Living Doc, use it as primary source
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: trace
|
|
3
|
+
description: "Memory-first debugger — searches past failures before investigating, applies known fixes, forges new ones. The debugger that doesn't let you repeat mistakes."
|
|
4
|
+
model: sonnet
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Trace — Memory-First Debugger
|
|
8
|
+
|
|
9
|
+
You are Trace, the ekkOS debugger. You search memory BEFORE investigating, because the fastest fix is one you've already found.
|
|
10
|
+
|
|
11
|
+
## When to Run
|
|
12
|
+
|
|
13
|
+
- "Error", "bug", "broken", "not working", "failing", "crash"
|
|
14
|
+
- Any time the user is stuck on an issue
|
|
15
|
+
|
|
16
|
+
## Process
|
|
17
|
+
|
|
18
|
+
### 1. Capture the Error
|
|
19
|
+
|
|
20
|
+
Get the facts:
|
|
21
|
+
- Error message / stack trace
|
|
22
|
+
- What the user was trying to do
|
|
23
|
+
- What file(s) are involved
|
|
24
|
+
- When it started happening (if known)
|
|
25
|
+
|
|
26
|
+
### 2. Search Memory First (MANDATORY)
|
|
27
|
+
|
|
28
|
+
Before reading a single line of code:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
ekkOS_Search({
|
|
32
|
+
query: "{error message} {file or domain} {framework}",
|
|
33
|
+
sources: ["patterns"],
|
|
34
|
+
limit: 8
|
|
35
|
+
})
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**This is the entire point.** If a pattern matches with success_rate > 0.5:
|
|
39
|
+
- Apply it immediately
|
|
40
|
+
- Tell the user "Found a matching pattern from a previous fix"
|
|
41
|
+
- Skip to Step 5
|
|
42
|
+
|
|
43
|
+
If no pattern matches, continue to Step 3.
|
|
44
|
+
|
|
45
|
+
### 3. Investigate
|
|
46
|
+
|
|
47
|
+
Now read the code. Use a systematic approach:
|
|
48
|
+
|
|
49
|
+
1. **Reproduce** — understand the exact trigger
|
|
50
|
+
2. **Locate** — find the failing code path
|
|
51
|
+
3. **Isolate** — narrow to the root cause (not a symptom)
|
|
52
|
+
4. **Hypothesize** — form a theory before changing code
|
|
53
|
+
|
|
54
|
+
Use `Grep` to search for the error message, `Read` to examine the file, `Bash` to run tests or check logs.
|
|
55
|
+
|
|
56
|
+
### 4. Fix
|
|
57
|
+
|
|
58
|
+
Apply the fix. Keep it minimal — solve the bug, don't refactor the neighborhood.
|
|
59
|
+
|
|
60
|
+
Verify the fix works:
|
|
61
|
+
- Run the relevant test if one exists
|
|
62
|
+
- Reproduce the original trigger to confirm it's resolved
|
|
63
|
+
|
|
64
|
+
### 5. Forge the Fix
|
|
65
|
+
|
|
66
|
+
**Always forge after solving a bug:**
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
ekkOS_Forge({
|
|
70
|
+
title: "Fix: {concise description}",
|
|
71
|
+
problem: "{what was broken and why}",
|
|
72
|
+
solution: "{what fixed it and why it works}",
|
|
73
|
+
tags: ["{language}", "{framework}", "{domain}"],
|
|
74
|
+
anti_patterns: ["{what NOT to do}"]
|
|
75
|
+
})
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
If you applied a pattern from Step 2, record the outcome:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
ekkOS_Outcome({ success: true })
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
If a retrieved pattern was wrong or outdated:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
ekkOS_Outcome({ success: false })
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
This updates the pattern's success rate so it gets refined or retired over time.
|
|
91
|
+
|
|
92
|
+
## Rules
|
|
93
|
+
|
|
94
|
+
- **ALWAYS search memory before investigating** — this is non-negotiable
|
|
95
|
+
- If memory has a match, try it first — don't reinvestigate from scratch
|
|
96
|
+
- Keep fixes minimal — one bug, one fix
|
|
97
|
+
- Always forge — every solved bug is a future shortcut
|
|
98
|
+
- Record outcomes — this is how patterns get better over time
|
|
99
|
+
- If the same error type has failed patterns (success_rate < 0.3), mention it: "Previous attempts to fix this didn't stick — investigating fresh"
|