@ekkos/cli 1.0.35 → 1.0.36
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/package.json +2 -4
- package/templates/CLAUDE.md +135 -23
- package/templates/ekkos-manifest.json +8 -8
- package/templates/hooks/assistant-response.ps1 +188 -160
- package/templates/hooks/assistant-response.sh +130 -66
- package/templates/hooks/hooks.json +6 -0
- package/templates/hooks/lib/contract.sh +43 -31
- package/templates/hooks/lib/state.sh +53 -1
- package/templates/hooks/session-start.ps1 +218 -355
- package/templates/hooks/session-start.sh +202 -167
- package/templates/hooks/stop.ps1 +305 -298
- package/templates/hooks/stop.sh +275 -948
- package/templates/hooks/user-prompt-submit.ps1 +563 -497
- package/templates/hooks/user-prompt-submit.sh +383 -457
- package/templates/windsurf-hooks/hooks.json +9 -2
- package/templates/windsurf-hooks/lib/contract.sh +2 -0
- package/templates/windsurf-skills/ekkos-memory/SKILL.md +219 -219
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ekkos/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.36",
|
|
4
4
|
"description": "Setup ekkOS memory for AI coding assistants (Claude Code, Cursor, Windsurf)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"ekkos": "dist/index.js",
|
|
8
8
|
"cli": "dist/index.js",
|
|
9
|
-
"ekkos-capture": "dist/cache/capture.js"
|
|
10
|
-
"ekkos-promote": "dist/cron/promoter.js"
|
|
9
|
+
"ekkos-capture": "dist/cache/capture.js"
|
|
11
10
|
},
|
|
12
11
|
"scripts": {
|
|
13
12
|
"build": "tsc",
|
|
@@ -29,7 +28,6 @@
|
|
|
29
28
|
"author": "ekkOS",
|
|
30
29
|
"license": "MIT",
|
|
31
30
|
"dependencies": {
|
|
32
|
-
"@ekkos/prometheus": "*",
|
|
33
31
|
"@supabase/supabase-js": "^2.39.8",
|
|
34
32
|
"blessed": "^0.1.81",
|
|
35
33
|
"blessed-contrib": "^4.11.0",
|
package/templates/CLAUDE.md
CHANGED
|
@@ -53,6 +53,28 @@ After `/clear`, when you see restored turns in `<system-reminder>` (pattern: `**
|
|
|
53
53
|
```
|
|
54
54
|
This is the ONLY way users see that restoration worked. Hook output is invisible to them.
|
|
55
55
|
|
|
56
|
+
### RULE 6: AUTO-RESTORE AFTER COMPACTION (CONTEXT GUARDIAN)
|
|
57
|
+
When you see `<ekkos-context-preserved>` in the conversation (appears after auto-compaction):
|
|
58
|
+
1. **IMMEDIATELY** call `ekkOS_RestoreContext` with the `restoration_token` from the tag
|
|
59
|
+
2. This restores your working memory that was preserved before compaction
|
|
60
|
+
3. Start your response with:
|
|
61
|
+
```
|
|
62
|
+
✓ **Context restored** - ekkOS preserved X turns before compaction
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**This is how seamless context continuity works:**
|
|
66
|
+
- PreCompact hook fires → ekkOS_PreserveContext saves your state
|
|
67
|
+
- Claude Code compacts → Summary includes the preservation tag
|
|
68
|
+
- You see the tag → Call ekkOS_RestoreContext → Full context restored
|
|
69
|
+
- User experiences zero knowledge loss despite compaction
|
|
70
|
+
|
|
71
|
+
**Example restoration call:**
|
|
72
|
+
```
|
|
73
|
+
ekkOS_RestoreContext({
|
|
74
|
+
restoration_token: "<token from tag>"
|
|
75
|
+
})
|
|
76
|
+
```
|
|
77
|
+
|
|
56
78
|
---
|
|
57
79
|
|
|
58
80
|
## SKILL TRIGGERS (MANDATORY)
|
|
@@ -79,8 +101,7 @@ Call skills using `Skill(skill: "name")` when you detect these triggers:
|
|
|
79
101
|
| Trigger Keywords | Agent | When to Use |
|
|
80
102
|
|------------------|-------|-------------|
|
|
81
103
|
| extension, vsix, publish, marketplace, ekkos-connect | `extension-manager` | Version bumps, VSIX builds, publishing |
|
|
82
|
-
| vercel, deploy
|
|
83
|
-
| deploy, railway, workers, pm2, restart, logs, queue | `railway-manager` | Railway deployments, service management |
|
|
104
|
+
| vercel, deploy, apps/*, ekkos.dev, api.ekkos.dev | `devops` | Vercel deployments — ALL apps/ deploy to Vercel |
|
|
84
105
|
| commit, push, branch, merge, git, pull request, rebase | `git-companion` | All git operations |
|
|
85
106
|
| error, bug, broken, not working, failing, crash | `debug-detective` | Systematic debugging |
|
|
86
107
|
| review, PR, check this code, code quality | `code-reviewer` | Code reviews |
|
|
@@ -89,6 +110,25 @@ Call skills using `Skill(skill: "name")` when you detect these triggers:
|
|
|
89
110
|
| backend, API, database, Supabase, RLS | `backend` | API and database work |
|
|
90
111
|
| test, QA, quality, coverage | `qa` | Testing and quality assurance |
|
|
91
112
|
| plan, architect, design, implement feature | `tech-lead` | Complex planning and coordination |
|
|
113
|
+
| research, papers, arXiv, cutting edge, latest AI | `research-scout` | Monitor AI research, update roadmap |
|
|
114
|
+
|
|
115
|
+
**Vercel Project Mapping** (apps/ folder → Vercel project → URL):
|
|
116
|
+
|
|
117
|
+
| apps/ folder | Vercel project | Production URL |
|
|
118
|
+
|-------------|----------------|----------------|
|
|
119
|
+
| `apps/web` | **platform** | platform.ekkos.dev |
|
|
120
|
+
| `apps/memory` | memory | api.ekkos.dev |
|
|
121
|
+
| `apps/proxy` | proxy | proxy.ekkos.dev |
|
|
122
|
+
| `apps/docs` | docs | docs.ekkos.dev |
|
|
123
|
+
| `apps/marketing` | marketing | ekkos.dev |
|
|
124
|
+
| `apps/ekkosca` | ekkosca | ekkos.ca |
|
|
125
|
+
| `apps/blog` | blog | blog.ekkos.dev |
|
|
126
|
+
| `apps/support` | support | support.ekkos.dev |
|
|
127
|
+
| `apps/labs` | labs | ekkoslabs.com |
|
|
128
|
+
| `apps/admin` | admin | admin.ekkos.ca |
|
|
129
|
+
| `apps/sdk` | sdk | sdk-ekkos.vercel.app |
|
|
130
|
+
|
|
131
|
+
**NOTE:** `apps/web` → Vercel project name is `platform`, NOT `web`.
|
|
92
132
|
|
|
93
133
|
**How it works:**
|
|
94
134
|
1. Detect trigger keywords in user request
|
|
@@ -109,39 +149,55 @@ You: Task(subagent_type="extension-manager", prompt="Bump version...")
|
|
|
109
149
|
|
|
110
150
|
---
|
|
111
151
|
|
|
112
|
-
## MCP Tools (
|
|
152
|
+
## MCP Tools (68 Total)
|
|
113
153
|
|
|
114
|
-
### Core Memory Tools
|
|
154
|
+
### Core Memory Tools (7)
|
|
115
155
|
| Tool | Description |
|
|
116
156
|
|------|-------------|
|
|
117
157
|
| `ekkOS_Search` | 🔴 REQUIRED: Search all 11 layers before answering |
|
|
118
|
-
| `
|
|
158
|
+
| `ekkOS_ExpandPattern` | Get full details of a pattern from compact search results |
|
|
119
159
|
| `ekkOS_Capture` | Capture memory events |
|
|
120
160
|
| `ekkOS_Forge` | 🔴 REQUIRED: Create pattern from solution |
|
|
121
|
-
| `
|
|
161
|
+
| `ekkOS_Track` | Track when pattern is applied |
|
|
122
162
|
| `ekkOS_Outcome` | Track if pattern worked or failed |
|
|
123
|
-
| `ekkOS_Detect` | 🔴 REQUIRED: Auto-detect which patterns were used |
|
|
124
|
-
| `ekkOS_Summary` | 🔴 REQUIRED: Get summary of MCP activity |
|
|
125
|
-
| `ekkOS_Conflict` | 🔴 REQUIRED: Check for conflicts before destructive actions |
|
|
126
|
-
| `ekkOS_Recall` | Recall past conversations by time |
|
|
127
|
-
| `ekkOS_Codebase` | Search project code embeddings |
|
|
128
163
|
| `ekkOS_Stats` | Get statistics for all layers |
|
|
129
|
-
| `ekkOS_Track` | Track when pattern is applied |
|
|
130
|
-
| `ekkOS_Reflect` | Analyze response for improvement opportunities |
|
|
131
164
|
|
|
132
|
-
###
|
|
165
|
+
### Context & Retrieval Tools (5)
|
|
133
166
|
| Tool | Description |
|
|
134
167
|
|------|-------------|
|
|
135
|
-
| `
|
|
136
|
-
| `
|
|
168
|
+
| `ekkOS_Context` | Get relevant context for a task |
|
|
169
|
+
| `ekkOS_Codebase` | Search project code embeddings |
|
|
170
|
+
| `ekkOS_Recall` | Recall past conversations by time |
|
|
171
|
+
| `ekkOS_PreserveContext` | 🔴 REQUIRED: Preserve working memory before compaction |
|
|
172
|
+
| `ekkOS_RestoreContext` | 🔴 REQUIRED: Restore context after compaction (RULE 6) |
|
|
137
173
|
|
|
138
|
-
###
|
|
174
|
+
### Utility Tools (8)
|
|
139
175
|
| Tool | Description |
|
|
140
176
|
|------|-------------|
|
|
177
|
+
| `ekkOS_Summary` | 🔴 REQUIRED: Get summary of MCP activity |
|
|
178
|
+
| `ekkOS_Conflict` | 🔴 REQUIRED: Check for conflicts before destructive actions |
|
|
179
|
+
| `ekkOS_Reflect` | Analyze response for improvement opportunities |
|
|
180
|
+
| `ekkOS_Detect` | 🔴 REQUIRED: Auto-detect which patterns were used |
|
|
141
181
|
| `ekkOS_Export` | Export your patterns, directives, plans as portable JSON backup |
|
|
142
182
|
| `ekkOS_Import` | Import memory from backup (auto-deduplication) |
|
|
183
|
+
| `ekkOS_Why` | Explain why a pattern or decision was made |
|
|
184
|
+
| `ekkOS_Health` | System health check for ekkOS infrastructure |
|
|
185
|
+
|
|
186
|
+
### Directive Tools (4)
|
|
187
|
+
| Tool | Description |
|
|
188
|
+
|------|-------------|
|
|
189
|
+
| `ekkOS_Directive` | 🔴 REQUIRED: Create MUST/NEVER/PREFER/AVOID rules |
|
|
190
|
+
| `ekkOS_UpdateDirective` | Update existing directive |
|
|
191
|
+
| `ekkOS_DeleteDirective` | Remove a directive |
|
|
192
|
+
| `ekkOS_UniversalDirectives` | Get directives that apply to all users (constitutional) |
|
|
193
|
+
|
|
194
|
+
### Schema Awareness Tools (2)
|
|
195
|
+
| Tool | Description |
|
|
196
|
+
|------|-------------|
|
|
197
|
+
| `ekkOS_IndexSchema` | Index database schemas (Supabase, Prisma, TypeScript) |
|
|
198
|
+
| `ekkOS_GetSchema` | Get schema for a specific table/type |
|
|
143
199
|
|
|
144
|
-
### Plan Management
|
|
200
|
+
### Plan Management (8)
|
|
145
201
|
| Tool | Description |
|
|
146
202
|
|------|-------------|
|
|
147
203
|
| `ekkOS_Plan` | Create structured task plan |
|
|
@@ -153,7 +209,7 @@ You: Task(subagent_type="extension-manager", prompt="Bump version...")
|
|
|
153
209
|
| `ekkOS_Templates` | List available templates |
|
|
154
210
|
| `ekkOS_FromTemplate` | Create plan from template |
|
|
155
211
|
|
|
156
|
-
### Secrets Management (
|
|
212
|
+
### Secrets Management (5)
|
|
157
213
|
| Tool | Description |
|
|
158
214
|
|------|-------------|
|
|
159
215
|
| `ekkOS_StoreSecret` | Encrypt and store sensitive data (AES-256-GCM) |
|
|
@@ -162,6 +218,39 @@ You: Task(subagent_type="extension-manager", prompt="Bump version...")
|
|
|
162
218
|
| `ekkOS_DeleteSecret` | Permanently delete a secret |
|
|
163
219
|
| `ekkOS_RotateSecret` | Update secret with new value |
|
|
164
220
|
|
|
221
|
+
### Project/Sync Tools (4)
|
|
222
|
+
| Tool | Description |
|
|
223
|
+
|------|-------------|
|
|
224
|
+
| `ekkOS_ProjectInit` | Initialize ekkOS for a new project |
|
|
225
|
+
| `ekkOS_Ingest` | Bulk ingest data into memory layers |
|
|
226
|
+
| `ekkOS_Snapshot` | Create point-in-time snapshot of memory state |
|
|
227
|
+
| `ekkOS_Sync` | Sync local and cloud memory state |
|
|
228
|
+
|
|
229
|
+
### Session Management (1)
|
|
230
|
+
| Tool | Description |
|
|
231
|
+
|------|-------------|
|
|
232
|
+
| `ekkOS_Session` | Manage L1 Working Memory sessions (start/resume/end) |
|
|
233
|
+
|
|
234
|
+
### Learning Tools (2)
|
|
235
|
+
| Tool | Description |
|
|
236
|
+
|------|-------------|
|
|
237
|
+
| `ekkOS_Learn` | Auto-learning from corrections, successes, observations |
|
|
238
|
+
| `ekkOS_ReviewLearning` | Review pending learning candidates, approve/reject patterns |
|
|
239
|
+
|
|
240
|
+
### Relationship Tools (2)
|
|
241
|
+
| Tool | Description |
|
|
242
|
+
|------|-------------|
|
|
243
|
+
| `ekkOS_Link` | Create relationships between patterns |
|
|
244
|
+
| `ekkOS_Playbook` | Manage ordered sequences of patterns (workflows) |
|
|
245
|
+
|
|
246
|
+
### PROMETHEUS Tools (4)
|
|
247
|
+
| Tool | Description |
|
|
248
|
+
|------|-------------|
|
|
249
|
+
| `ekkOS_Delta` | Compute improvement score using Δ_prometheus formula |
|
|
250
|
+
| `ekkOS_MetaState` | System introspection ("I know what I know") |
|
|
251
|
+
| `ekkOS_Goal` | Manage persistent objectives and success criteria |
|
|
252
|
+
| `ekkOS_Strategy` | Context-aware strategy selection for tasks |
|
|
253
|
+
|
|
165
254
|
---
|
|
166
255
|
|
|
167
256
|
## Proactive Tool Triggers (MEMORIZE THESE)
|
|
@@ -204,6 +293,28 @@ You: Task(subagent_type="extension-manager", prompt="Bump version...")
|
|
|
204
293
|
- Need to retrieve stored credentials
|
|
205
294
|
- User asks "do you have my X key?"
|
|
206
295
|
|
|
296
|
+
### Always Use Context Preservation When:
|
|
297
|
+
- PreCompact hook fires (auto-triggered)
|
|
298
|
+
- See `<ekkos-context-preserved>` tag (auto-restore)
|
|
299
|
+
- RULE 6 activation
|
|
300
|
+
|
|
301
|
+
### Always Use Learning Tools When:
|
|
302
|
+
- User corrects you (ekkOS_Learn mode: correction)
|
|
303
|
+
- Solution succeeds (ekkOS_Learn mode: success)
|
|
304
|
+
- Discover insight (ekkOS_Learn mode: observe)
|
|
305
|
+
- Review pending patterns (ekkOS_ReviewLearning)
|
|
306
|
+
|
|
307
|
+
### Always Use Relationship Tools When:
|
|
308
|
+
- Patterns are sequential (ekkOS_Link type: leads_to)
|
|
309
|
+
- Creating workflows (ekkOS_Playbook)
|
|
310
|
+
- Patterns are alternatives (ekkOS_Link type: alternative)
|
|
311
|
+
|
|
312
|
+
### Always Use PROMETHEUS Tools When:
|
|
313
|
+
- Evaluating system improvement (ekkOS_Delta)
|
|
314
|
+
- Self-assessment needed (ekkOS_MetaState)
|
|
315
|
+
- Setting objectives (ekkOS_Goal)
|
|
316
|
+
- Choosing approach (ekkOS_Strategy)
|
|
317
|
+
|
|
207
318
|
---
|
|
208
319
|
|
|
209
320
|
## 11-Layer Memory Architecture
|
|
@@ -253,20 +364,21 @@ Call `ekkOS_Directive` when user says:
|
|
|
253
364
|
**EVERY response MUST end with this footer:**
|
|
254
365
|
```
|
|
255
366
|
---
|
|
256
|
-
{IDE} ({Model}) · 🧠 **ekkOS_™** · Turn {N} · 📅 {Timestamp}
|
|
367
|
+
{IDE} ({Model}) · 🧠 **ekkOS_™** · Turn {N} · {SessionName} · 📅 {Timestamp}
|
|
257
368
|
```
|
|
258
369
|
|
|
259
370
|
**How to detect values:**
|
|
260
371
|
- **IDE**: Claude Code, Cursor, Windsurf, etc. (from environment)
|
|
261
372
|
- **Model**: Sonnet 4.5, Opus 4.5, etc. (from your model name)
|
|
262
373
|
- **Turn Number**: From hook header (e.g., "Turn 47") - starts at 0 for each new session
|
|
374
|
+
- **Session Name**: From hook header (e.g., "sol-gem-dig") - human-readable session identifier
|
|
263
375
|
- **Timestamp**: From hook header (accurate local time in EST)
|
|
264
376
|
|
|
265
377
|
**Examples:**
|
|
266
|
-
- `Claude Code (Sonnet 4.5) · 🧠 **ekkOS_™** · Turn 12 · 📅 2026-01-09 4:50 PM EST`
|
|
267
|
-
- `Cursor (Claude Sonnet 4) · 🧠 **ekkOS_™** · Turn 5 · 📅 2026-01-09 10:15 AM EST`
|
|
378
|
+
- `Claude Code (Sonnet 4.5) · 🧠 **ekkOS_™** · Turn 12 · cosmic-penguin-runs · 📅 2026-01-09 4:50 PM EST`
|
|
379
|
+
- `Cursor (Claude Sonnet 4) · 🧠 **ekkOS_™** · Turn 5 · bright-falcon-soars · 📅 2026-01-09 10:15 AM EST`
|
|
268
380
|
|
|
269
|
-
**The hook header shows:** `🧠 ekkOS Memory | Turn {N} |
|
|
381
|
+
**The hook header shows:** `🧠 ekkOS Memory | Turn {N} | {Context%} | {SessionName} | {timestamp}`
|
|
270
382
|
|
|
271
383
|
---
|
|
272
384
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://ekkos.dev/schemas/manifest-v1.json",
|
|
3
3
|
"manifestVersion": "1.0.0",
|
|
4
|
-
"generatedAt": "2026-02-
|
|
4
|
+
"generatedAt": "2026-02-20T07:39:17.071Z",
|
|
5
5
|
"platforms": {
|
|
6
6
|
"darwin": {
|
|
7
7
|
"configDir": "~/.ekkos",
|
|
@@ -68,14 +68,14 @@
|
|
|
68
68
|
"source": "hooks/user-prompt-submit.sh",
|
|
69
69
|
"destination": "user-prompt-submit.sh",
|
|
70
70
|
"description": "User prompt submit hook (Unix)",
|
|
71
|
-
"checksum": "
|
|
71
|
+
"checksum": "c53b621f3c64031f61b7ca1b3bf5ba4bec895b6a39aa7627422f0f2a2d26ab7d",
|
|
72
72
|
"executable": true
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
"source": "hooks/stop.sh",
|
|
76
76
|
"destination": "stop.sh",
|
|
77
77
|
"description": "Session stop hook (Unix)",
|
|
78
|
-
"checksum": "
|
|
78
|
+
"checksum": "f3b4495c0c2bbdf5bfef762568faec7b70b41b463dad4c88b37cf7ee32b5257d",
|
|
79
79
|
"executable": true
|
|
80
80
|
},
|
|
81
81
|
{
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"source": "hooks/assistant-response.sh",
|
|
90
90
|
"destination": "assistant-response.sh",
|
|
91
91
|
"description": "Assistant response hook (Unix)",
|
|
92
|
-
"checksum": "
|
|
92
|
+
"checksum": "99400adf6ced406f0295c25db3b8fb892212ad3ba625f427c042d8526ac8f6f7",
|
|
93
93
|
"executable": true
|
|
94
94
|
}
|
|
95
95
|
],
|
|
@@ -98,25 +98,25 @@
|
|
|
98
98
|
"source": "hooks/user-prompt-submit.ps1",
|
|
99
99
|
"destination": "user-prompt-submit.ps1",
|
|
100
100
|
"description": "User prompt submit hook (Windows)",
|
|
101
|
-
"checksum": "
|
|
101
|
+
"checksum": "ba1090ed7a4e7deef1267b52474225669a9c966b9adf596b31865c2dca1dc749"
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
"source": "hooks/stop.ps1",
|
|
105
105
|
"destination": "stop.ps1",
|
|
106
106
|
"description": "Session stop hook (Windows)",
|
|
107
|
-
"checksum": "
|
|
107
|
+
"checksum": "c4f0191ac28ced0410ea560197ab3b0a7e2de83363a789731d64620bc605564d"
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
110
|
"source": "hooks/session-start.ps1",
|
|
111
111
|
"destination": "session-start.ps1",
|
|
112
112
|
"description": "Session start hook (Windows)",
|
|
113
|
-
"checksum": "
|
|
113
|
+
"checksum": "1930bda7c517054531ff3ad78e8cce7e60d57f5b3884728da0d7cf1cc5c54ac4"
|
|
114
114
|
},
|
|
115
115
|
{
|
|
116
116
|
"source": "hooks/assistant-response.ps1",
|
|
117
117
|
"destination": "assistant-response.ps1",
|
|
118
118
|
"description": "Assistant response hook (Windows)",
|
|
119
|
-
"checksum": "
|
|
119
|
+
"checksum": "680e6d7c597f90fb54bc86d173f4c145093eb21352b30c7d6afbe19d1d5fdce4"
|
|
120
120
|
}
|
|
121
121
|
],
|
|
122
122
|
"lib": [
|