@ekkos/cli 1.0.30 → 1.0.32
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/init.js +15 -3
- package/dist/commands/run.js +10 -7
- package/dist/commands/setup.js +47 -0
- package/dist/deploy/skills.d.ts +8 -0
- package/dist/deploy/skills.js +26 -0
- package/dist/utils/platform.d.ts +1 -0
- package/dist/utils/platform.js +2 -1
- package/package.json +1 -1
- package/templates/ekkos-manifest.json +5 -5
- package/templates/hooks/assistant-response.ps1 +4 -4
- package/templates/hooks/session-start.ps1 +2 -2
- package/templates/hooks/stop.ps1 +167 -4
- package/templates/hooks/user-prompt-submit.ps1 +33 -8
- package/templates/windsurf-skills/README.md +58 -0
- package/templates/windsurf-skills/ekkos-continue/SKILL.md +81 -0
- package/templates/windsurf-skills/ekkos-golden-loop/SKILL.md +225 -0
- package/templates/windsurf-skills/ekkos-insights/SKILL.md +138 -0
- package/templates/windsurf-skills/ekkos-recall/SKILL.md +96 -0
- package/templates/windsurf-skills/ekkos-safety/SKILL.md +89 -0
- package/templates/windsurf-skills/ekkos-vault/SKILL.md +86 -0
- package/templates/windsurf-skills/ekkos-memory/SKILL.md +0 -219
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# ekkOS Windsurf Skills
|
|
2
|
+
|
|
3
|
+
6 skills following the [Agent Skills specification](https://agentskills.io/specification) for Windsurf Cascade.
|
|
4
|
+
|
|
5
|
+
## Skills
|
|
6
|
+
|
|
7
|
+
| # | Skill | Golden Loop Step | Description |
|
|
8
|
+
|---|-------|-----------------|-------------|
|
|
9
|
+
| 1 | `ekkos-golden-loop` | All 5 steps | Core loop — Search, Apply, Forge, Outcome, Reflect |
|
|
10
|
+
| 2 | `ekkos-recall` | Search (deep) | Time-based and semantic recall across sessions |
|
|
11
|
+
| 3 | `ekkos-safety` | Guard | Conflict checks before destructive operations |
|
|
12
|
+
| 4 | `ekkos-vault` | Utility | AES-256-GCM encrypted credential storage |
|
|
13
|
+
| 5 | `ekkos-continue` | Utility | Session resumption after clear/compaction |
|
|
14
|
+
| 6 | `ekkos-insights` | Reflect (system) | Prometheus metrics, delta scores, system health |
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
### Workspace Skills (per-project)
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
cp -r templates/windsurf-skills/* .windsurf/skills/
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Global Skills (all projects)
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
cp -r templates/windsurf-skills/* ~/.codeium/windsurf/skills/
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Via CLI
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
ekkos init --windsurf
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## The Golden Loop (5 Steps)
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
SEARCH → APPLY → FORGE → OUTCOME → REFLECT
|
|
40
|
+
│ │ │ │ │
|
|
41
|
+
│ │ │ │ └─ Quality analysis
|
|
42
|
+
│ │ │ └─ Success/failure → Prometheus
|
|
43
|
+
│ │ └─ Save solution as pattern
|
|
44
|
+
│ └─ Use pattern + track usage
|
|
45
|
+
└─ Query memory before answering
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Every step generates metrics consumed by the Prometheus Feedback Loop Worker (runs every 15 min):
|
|
49
|
+
- **Auto-demotion**: Patterns >50% skip rate → quarantined
|
|
50
|
+
- **Auto-promotion**: Patterns >85% success + 10 uses → collective layer (L6)
|
|
51
|
+
- **Delta evaluation**: Δ_prometheus improvement score per interaction
|
|
52
|
+
|
|
53
|
+
## Naming Convention
|
|
54
|
+
|
|
55
|
+
All skills use lowercase-hyphenated names per the Agent Skills spec:
|
|
56
|
+
- Directory name MUST match the `name` field in SKILL.md frontmatter
|
|
57
|
+
- Names are 1-64 characters, lowercase alphanumeric + hyphens only
|
|
58
|
+
- No consecutive hyphens (`--`), no leading/trailing hyphens
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ekkos-continue
|
|
3
|
+
description: Resume session after clear or context compaction. Activate when the user types /continue or /clear, after context compaction occurs, or when you see an ekkos-context-preserved tag. Restores working memory from local cache (1ms) with Redis/Supabase fallback.
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- mcp__ekkos-memory__ekkOS_RestoreContext
|
|
6
|
+
- mcp__ekkos-memory__ekkOS_Recall
|
|
7
|
+
- mcp__ekkos-memory__ekkOS_Search
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# ekkOS Continue
|
|
11
|
+
|
|
12
|
+
Resume sessions seamlessly after `/clear` or context compaction.
|
|
13
|
+
|
|
14
|
+
## When To Activate
|
|
15
|
+
|
|
16
|
+
| Trigger | What Happened |
|
|
17
|
+
|---------|--------------|
|
|
18
|
+
| User types `/continue` | Manual resume request |
|
|
19
|
+
| After `/clear` | Context was cleared, need to restore |
|
|
20
|
+
| `<ekkos-context-preserved>` tag appears | Auto-compaction occurred |
|
|
21
|
+
| Restored turns in `<system-reminder>` | Session was restored by hook |
|
|
22
|
+
|
|
23
|
+
## Instructions
|
|
24
|
+
|
|
25
|
+
### After `/clear` (Manual)
|
|
26
|
+
|
|
27
|
+
If you see restored turns in a `<system-reminder>` tag (pattern: `**Turn XX**: ...`), respond with:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
✓ **Session continued (Turn N)** - X turns preserved, context restored
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Then resume the conversation naturally.
|
|
34
|
+
|
|
35
|
+
### After Compaction (Automatic)
|
|
36
|
+
|
|
37
|
+
When you see `<ekkos-context-preserved>` with a restoration token:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
ekkOS_RestoreContext({
|
|
41
|
+
restoration_token: "<token from the tag>"
|
|
42
|
+
})
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Then respond with:
|
|
46
|
+
```
|
|
47
|
+
✓ **Context restored** - ekkOS preserved X turns before compaction
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Fallback: Semantic Recall
|
|
51
|
+
|
|
52
|
+
If no restoration token is available:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
ekkOS_Recall({
|
|
56
|
+
days_ago: 1,
|
|
57
|
+
semantic_query: "<topic from the conversation>",
|
|
58
|
+
include_full_content: true,
|
|
59
|
+
group_by_sessions: true,
|
|
60
|
+
limit: 5
|
|
61
|
+
})
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## How It Works
|
|
65
|
+
|
|
66
|
+
1. **Local cache** (fastest, 1ms) — hooks save turns to local JSON
|
|
67
|
+
2. **Redis** (fast, 10ms) — working memory backed up to Redis
|
|
68
|
+
3. **Supabase** (reliable, 100ms) — episodic memory (L2) persists everything
|
|
69
|
+
4. **Semantic search** (last resort) — find relevant context by meaning
|
|
70
|
+
|
|
71
|
+
## Integration with Golden Loop
|
|
72
|
+
|
|
73
|
+
Continue is a specialized SEARCH — it queries working memory (L1) and episodic memory (L2) to restore session state. After successful restoration, record it:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
ekkOS_Outcome({ success: true }) // Restoration worked
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
**Mantra**: No context is ever lost. Every session can be resumed.
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ekkos-golden-loop
|
|
3
|
+
description: The 5-step cognitive learning loop that makes AI smarter over time. Activate on every technical question, bug fix, architecture decision, debugging session, user correction, or when solving any non-trivial problem. Steps — Search, Apply, Forge, Outcome, Reflect. This is the core skill that drives all ekkOS memory operations.
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- mcp__ekkos-memory__ekkOS_Search
|
|
6
|
+
- mcp__ekkos-memory__ekkOS_Context
|
|
7
|
+
- mcp__ekkos-memory__ekkOS_Codebase
|
|
8
|
+
- mcp__ekkos-memory__ekkOS_Track
|
|
9
|
+
- mcp__ekkos-memory__ekkOS_Forge
|
|
10
|
+
- mcp__ekkos-memory__ekkOS_Outcome
|
|
11
|
+
- mcp__ekkos-memory__ekkOS_Reflect
|
|
12
|
+
- Read
|
|
13
|
+
- Glob
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# ekkOS Golden Loop
|
|
17
|
+
|
|
18
|
+
You are augmented with **ekkOS_ memory** — an 11-layer cognitive memory system. This skill defines the **5-step Golden Loop** that makes you smarter over time.
|
|
19
|
+
|
|
20
|
+
## The 5 Steps
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
24
|
+
│ 1. SEARCH → Query memory before answering │
|
|
25
|
+
│ 2. APPLY → Use retrieved patterns, track usage │
|
|
26
|
+
│ 3. FORGE → Save new solutions as patterns │
|
|
27
|
+
│ 4. OUTCOME → Record success or failure │
|
|
28
|
+
│ 5. REFLECT → Analyze quality, forge improvements │
|
|
29
|
+
│ ↓ │
|
|
30
|
+
│ Prometheus collects metrics → demotion / promotion │
|
|
31
|
+
└─────────────────────────────────────────────────────────────┘
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Every step feeds metrics to Prometheus** — skip rates, success rates, and delta scores that determine which patterns get promoted to collective wisdom and which get quarantined.
|
|
35
|
+
|
|
36
|
+
## Step 1: SEARCH (Before Answering)
|
|
37
|
+
|
|
38
|
+
Before answering ANY technical question, search memory first.
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
ekkOS_Search({
|
|
42
|
+
query: "<specific problem description>",
|
|
43
|
+
sources: ["patterns", "collective", "codebase"],
|
|
44
|
+
limit: 5
|
|
45
|
+
})
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**When to search:**
|
|
49
|
+
- User asks a technical question
|
|
50
|
+
- Debugging an error
|
|
51
|
+
- Architecture or design discussion
|
|
52
|
+
- "How do I..." questions
|
|
53
|
+
- Configuration or deployment
|
|
54
|
+
- Mid-response when you realize past context would help
|
|
55
|
+
|
|
56
|
+
**For project-specific code:**
|
|
57
|
+
```
|
|
58
|
+
ekkOS_Codebase({
|
|
59
|
+
query: "<what you need from this project>",
|
|
60
|
+
limit: 5
|
|
61
|
+
})
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**For combined context (patterns + episodes):**
|
|
65
|
+
```
|
|
66
|
+
ekkOS_Context({
|
|
67
|
+
task: "<what you're trying to accomplish>"
|
|
68
|
+
})
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Step 2: APPLY (Use Patterns, Track Usage)
|
|
72
|
+
|
|
73
|
+
When patterns are retrieved, you MUST acknowledge every single one.
|
|
74
|
+
|
|
75
|
+
**For patterns you USE:**
|
|
76
|
+
```
|
|
77
|
+
[ekkOS_SELECT]
|
|
78
|
+
- id: <pattern_id>
|
|
79
|
+
reason: <why using>
|
|
80
|
+
confidence: <0.0-1.0>
|
|
81
|
+
[/ekkOS_SELECT]
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**For patterns NOT relevant:**
|
|
85
|
+
```
|
|
86
|
+
[ekkOS_SKIP]
|
|
87
|
+
- id: <pattern_id>
|
|
88
|
+
reason: <why not relevant>
|
|
89
|
+
[/ekkOS_SKIP]
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Track is called automatically during search when patterns are found. The Track call creates an `application_id` that links your search to the outcome — this is how Prometheus knows which patterns are actually being used vs skipped.
|
|
93
|
+
|
|
94
|
+
**Why this matters:** Every SKIP increments the pattern's skip rate. Patterns with >50% skip rate get auto-demoted by the Prometheus worker. Every SELECT reinforces the pattern.
|
|
95
|
+
|
|
96
|
+
## Step 3: FORGE (Save Solutions)
|
|
97
|
+
|
|
98
|
+
When you solve something non-trivial, save it immediately.
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
ekkOS_Forge({
|
|
102
|
+
title: "Descriptive, searchable title",
|
|
103
|
+
problem: "What went wrong or what was needed",
|
|
104
|
+
solution: "What worked and WHY it works",
|
|
105
|
+
tags: ["relevant", "tags"],
|
|
106
|
+
works_when: ["specific conditions"],
|
|
107
|
+
anti_patterns: ["what NOT to do"]
|
|
108
|
+
})
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**FORGE triggers — ask yourself after every solution:**
|
|
112
|
+
- Was this non-trivial? → FORGE
|
|
113
|
+
- Did the user correct me? → FORGE
|
|
114
|
+
- Did something NOT work? → FORGE as anti-pattern
|
|
115
|
+
- Would I want to remember this? → FORGE
|
|
116
|
+
- Is this a gotcha or pitfall? → FORGE
|
|
117
|
+
- Was an architecture decision made? → FORGE
|
|
118
|
+
|
|
119
|
+
**Anti-patterns are equally valuable.** When something DOESN'T work:
|
|
120
|
+
```
|
|
121
|
+
ekkOS_Forge({
|
|
122
|
+
title: "Don't use setTimeout for rate limiting",
|
|
123
|
+
problem: "Tried setTimeout to throttle API calls — doesn't work",
|
|
124
|
+
solution: "Use proper debounce/throttle library instead",
|
|
125
|
+
anti_patterns: ["setTimeout for throttling", "manual timer-based rate limiting"]
|
|
126
|
+
})
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Good titles:** Specific, searchable, actionable
|
|
130
|
+
- "Fix CORS by setting Access-Control-Allow-Origin header"
|
|
131
|
+
- "Use cursor pagination for tables over 100K rows"
|
|
132
|
+
|
|
133
|
+
**Bad titles:** Vague, unsearchable
|
|
134
|
+
- "Fixed the bug"
|
|
135
|
+
- "Solution"
|
|
136
|
+
|
|
137
|
+
## Step 4: OUTCOME (Record Success/Failure)
|
|
138
|
+
|
|
139
|
+
After applying a pattern and seeing the result, record the outcome.
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
ekkOS_Outcome({
|
|
143
|
+
success: true, // or false
|
|
144
|
+
model_used: "claude-sonnet-4-6"
|
|
145
|
+
})
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**When to record outcomes:**
|
|
149
|
+
- User confirms solution works → `success: true`
|
|
150
|
+
- User says "that's not right" → `success: false`
|
|
151
|
+
- Applied pattern solved the problem → `success: true`
|
|
152
|
+
- Pattern didn't apply well → `success: false`
|
|
153
|
+
- After completing a complex task → record overall outcome
|
|
154
|
+
|
|
155
|
+
**Why this matters:** Outcome feeds directly into Prometheus:
|
|
156
|
+
- Success rates determine pattern quality scores
|
|
157
|
+
- Patterns with >85% success + 10 uses → promoted to collective (L6)
|
|
158
|
+
- Patterns with <30% success after 10 uses → quarantined
|
|
159
|
+
- Delta scores (Δ_prometheus) track improvement over time
|
|
160
|
+
|
|
161
|
+
## Step 5: REFLECT (Analyze and Improve)
|
|
162
|
+
|
|
163
|
+
After complex tasks or when receiving feedback, analyze your response.
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
ekkOS_Reflect({
|
|
167
|
+
user_query: "Original question",
|
|
168
|
+
response: "Your response summary",
|
|
169
|
+
context: {
|
|
170
|
+
patterns_used: 3,
|
|
171
|
+
model: "claude-sonnet-4-6"
|
|
172
|
+
}
|
|
173
|
+
})
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Reflection feeds back into the loop:**
|
|
177
|
+
- Identify missed patterns → better future searches
|
|
178
|
+
- Spot over-engineering → forge simplicity preferences
|
|
179
|
+
- Record what worked → reinforce good patterns
|
|
180
|
+
- Find gaps → forge new patterns to fill them
|
|
181
|
+
|
|
182
|
+
## Metric Collection Summary
|
|
183
|
+
|
|
184
|
+
Every step generates metrics that Prometheus uses:
|
|
185
|
+
|
|
186
|
+
| Step | Metric Generated | Prometheus Impact |
|
|
187
|
+
|------|-----------------|-------------------|
|
|
188
|
+
| Search | retrieval count, latency | retrieval_precision |
|
|
189
|
+
| Apply (SELECT) | application count | Reinforces pattern |
|
|
190
|
+
| Apply (SKIP) | skip count | skip_rate → demotion risk |
|
|
191
|
+
| Forge | new patterns | capability growth |
|
|
192
|
+
| Outcome | success/failure | success_rate → promotion/demotion |
|
|
193
|
+
| Reflect | quality scores | pattern_quality delta |
|
|
194
|
+
|
|
195
|
+
The **Prometheus Feedback Loop Worker** (runs every 15 min) processes:
|
|
196
|
+
1. **Auto-demotion**: Patterns >50% skip rate → quarantined
|
|
197
|
+
2. **Auto-promotion**: Patterns >85% success + 10 uses → collective layer
|
|
198
|
+
3. **Delta evaluation**: Δ_prometheus score per interaction
|
|
199
|
+
|
|
200
|
+
## Response Format
|
|
201
|
+
|
|
202
|
+
Every response MUST end with:
|
|
203
|
+
```
|
|
204
|
+
---
|
|
205
|
+
🧠 **ekkOS_™**
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
## Fallback Behavior
|
|
209
|
+
|
|
210
|
+
If the MCP server is unavailable:
|
|
211
|
+
1. Proceed without memory
|
|
212
|
+
2. Note: "Memory unavailable — solving from first principles"
|
|
213
|
+
3. Solutions can still be forged when connection restores
|
|
214
|
+
|
|
215
|
+
## What NOT To Do
|
|
216
|
+
|
|
217
|
+
- **Don't skip Search** — always query memory first
|
|
218
|
+
- **Don't skip Outcome** — this is how Prometheus learns
|
|
219
|
+
- **Don't fabricate patterns** — only reference patterns actually retrieved
|
|
220
|
+
- **Don't over-search** — one focused search beats many broad ones
|
|
221
|
+
- **Don't forge trivial things** — "changed a variable name" isn't worth forging
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
**Mantra**: Search first. Apply what you find. Forge what you learn. Record what happened. Reflect and improve.
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ekkos-insights
|
|
3
|
+
description: System introspection and improvement metrics powered by Prometheus. Activate when the user asks "how am I improving", "show my stats", "what does the system know", "ekkOS status", "memory summary", "pattern quality", "delta score", or wants to understand memory health, pattern effectiveness, or system performance.
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- mcp__ekkos-memory__ekkOS_Stats
|
|
6
|
+
- mcp__ekkos-memory__ekkOS_Summary
|
|
7
|
+
- mcp__ekkos-memory__ekkOS_Search
|
|
8
|
+
- mcp__ekkos-memory__ekkOS_Health
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# ekkOS Insights (Prometheus)
|
|
12
|
+
|
|
13
|
+
System introspection — see how ekkOS is improving over time.
|
|
14
|
+
|
|
15
|
+
## When To Activate
|
|
16
|
+
|
|
17
|
+
| Trigger | What To Show |
|
|
18
|
+
|---------|-------------|
|
|
19
|
+
| "How am I improving?" | Delta score and trends |
|
|
20
|
+
| "Show my stats" | Layer statistics |
|
|
21
|
+
| "What does ekkOS know?" | MetaState overview |
|
|
22
|
+
| "ekkOS status" / "memory summary" | Activity summary |
|
|
23
|
+
| "Pattern quality" | Success rates, skip rates |
|
|
24
|
+
| "Is ekkOS healthy?" | System health check |
|
|
25
|
+
| "What patterns are being used?" | Applied/skipped breakdown |
|
|
26
|
+
| "Show me what you learned" | Recent forges and outcomes |
|
|
27
|
+
|
|
28
|
+
## Instructions
|
|
29
|
+
|
|
30
|
+
### Memory Statistics (All Layers)
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
ekkOS_Stats({
|
|
34
|
+
scope: "both" // "personal", "collective", or "both"
|
|
35
|
+
})
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Shows counts across all 11 layers:
|
|
39
|
+
- L1 Working — current session turns
|
|
40
|
+
- L2 Episodic — past conversations
|
|
41
|
+
- L3 Semantic — embedded knowledge
|
|
42
|
+
- L4 Patterns — proven solutions
|
|
43
|
+
- L5 Procedural — step-by-step guides
|
|
44
|
+
- L6 Collective — cross-project wisdom
|
|
45
|
+
- L7 Meta — pattern effectiveness
|
|
46
|
+
- L8 Codebase — project-specific code
|
|
47
|
+
- L9 Directives — user rules (MUST/NEVER/PREFER/AVOID)
|
|
48
|
+
- L10 Conflict — auto-resolution
|
|
49
|
+
- L11 Secrets — encrypted credentials
|
|
50
|
+
|
|
51
|
+
### Activity Summary
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
ekkOS_Summary({
|
|
55
|
+
time_window_seconds: 3600 // last hour (default: 5 min)
|
|
56
|
+
})
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Shows recent activity: searches, forges, outcomes, tracks.
|
|
60
|
+
|
|
61
|
+
### System Health
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
ekkOS_Health({
|
|
65
|
+
include_stats: true
|
|
66
|
+
})
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Checks connectivity to all services: Supabase, Redis, embeddings, etc.
|
|
70
|
+
|
|
71
|
+
## Prometheus Metrics (What Gets Tracked)
|
|
72
|
+
|
|
73
|
+
The Prometheus system quantifies improvement using:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
Δ_prometheus = γ × Δ_performance + (1-γ) × Δ_ekkOS
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Performance Metrics (Δ_performance)
|
|
80
|
+
| Metric | Weight | What It Measures |
|
|
81
|
+
|--------|--------|-----------------|
|
|
82
|
+
| Task Success | 0.4 | Are solutions working? (outcome success rate) |
|
|
83
|
+
| Efficiency | 0.3 | Are we solving faster? (turns to solution) |
|
|
84
|
+
| Stability | 0.2 | System reliability (1 - error_rate) |
|
|
85
|
+
| Capability | 0.1 | New patterns forged / total patterns |
|
|
86
|
+
|
|
87
|
+
### ekkOS Metrics (Δ_ekkOS)
|
|
88
|
+
| Metric | Weight | What It Measures |
|
|
89
|
+
|--------|--------|-----------------|
|
|
90
|
+
| Pattern Quality | 0.4 | Avg success rate improvement |
|
|
91
|
+
| Retrieval Precision | 0.3 | 1 - (skip_rate / total_retrievals) |
|
|
92
|
+
| Directive Compliance | 0.2 | Compliant actions / total actions |
|
|
93
|
+
| Collective Contribution | 0.1 | Patterns promoted to collective / forged |
|
|
94
|
+
|
|
95
|
+
### Prometheus Worker Actions (Every 15 min)
|
|
96
|
+
| Action | Threshold | Result |
|
|
97
|
+
|--------|-----------|--------|
|
|
98
|
+
| **Auto-demotion** | >50% skip rate, 5+ uses | Pattern quarantined |
|
|
99
|
+
| **Auto-promotion** | >85% success, 10+ uses | Pattern → collective (L6) |
|
|
100
|
+
| **Delta evaluation** | Per-interaction | Δ score stored for trending |
|
|
101
|
+
|
|
102
|
+
## Presenting Insights
|
|
103
|
+
|
|
104
|
+
When the user asks for insights, present them clearly:
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
📊 **ekkOS Memory Status**
|
|
108
|
+
|
|
109
|
+
**Patterns:** 142 active, 8 quarantined, 12 promoted to collective
|
|
110
|
+
**Success Rate:** 87% (↑ 3% this week)
|
|
111
|
+
**Retrieval Precision:** 92% (low skip rate = patterns are relevant)
|
|
112
|
+
**Most Used Pattern:** "Handle Supabase RLS errors" (23 applications, 96% success)
|
|
113
|
+
**Recent Forges:** 4 new patterns this session
|
|
114
|
+
|
|
115
|
+
**Prometheus Δ Score:** +0.12 (improving)
|
|
116
|
+
- Task success: +0.08
|
|
117
|
+
- Pattern quality: +0.15
|
|
118
|
+
- Retrieval precision: +0.11
|
|
119
|
+
- Collective contribution: +0.04
|
|
120
|
+
|
|
121
|
+
**Health:** All systems operational ✓
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Integration with Golden Loop
|
|
125
|
+
|
|
126
|
+
Insights is Step 5 (REFLECT) at the system level — instead of reflecting on a single response, it reflects on the entire memory system's health and improvement trajectory.
|
|
127
|
+
|
|
128
|
+
The metrics displayed here are collected by Steps 1-4:
|
|
129
|
+
1. **Search** → retrieval counts, latency
|
|
130
|
+
2. **Apply** → skip rates, application counts
|
|
131
|
+
3. **Forge** → new pattern counts, capability growth
|
|
132
|
+
4. **Outcome** → success rates, delta scores
|
|
133
|
+
|
|
134
|
+
Without proper Outcome tracking, these metrics are incomplete. This is why the Golden Loop skill emphasizes recording outcomes — it's what feeds Prometheus.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
**Mantra**: What gets measured gets improved. Prometheus sees everything.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ekkos-recall
|
|
3
|
+
description: Deep memory retrieval across sessions and projects. Activate when the user says "yesterday", "last week", "remember when", "what did we discuss", "we worked on X before", "bring context from", or asks about past decisions, fixes, or discussions. Combines time-based recall with semantic search.
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- mcp__ekkos-memory__ekkOS_Recall
|
|
6
|
+
- mcp__ekkos-memory__ekkOS_Search
|
|
7
|
+
- mcp__ekkos-memory__ekkOS_Context
|
|
8
|
+
- mcp__ekkos-memory__ekkOS_RestoreContext
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# ekkOS Deep Recall
|
|
12
|
+
|
|
13
|
+
You can recall past conversations, decisions, and context from previous sessions.
|
|
14
|
+
|
|
15
|
+
## When To Activate
|
|
16
|
+
|
|
17
|
+
| Trigger | Example |
|
|
18
|
+
|---------|---------|
|
|
19
|
+
| Time reference | "yesterday", "last week", "last month" |
|
|
20
|
+
| Past work | "remember when we...", "we worked on X before" |
|
|
21
|
+
| Decision recall | "what did we decide about...", "why did we choose..." |
|
|
22
|
+
| Context transfer | "bring context from the other project" |
|
|
23
|
+
| Session continuity | "where did we leave off", "continue from last time" |
|
|
24
|
+
|
|
25
|
+
## Instructions
|
|
26
|
+
|
|
27
|
+
### Time-Based Recall
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
ekkOS_Recall({
|
|
31
|
+
days_ago: 1, // 1, 2, 7, 30...
|
|
32
|
+
semantic_query: "what we discussed about auth",
|
|
33
|
+
include_file_changes: true, // show files modified
|
|
34
|
+
include_patterns: true, // show patterns used
|
|
35
|
+
extract_decisions: true, // pull out decisions made
|
|
36
|
+
group_by_sessions: true // organize by session
|
|
37
|
+
})
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Semantic Recall (By Topic)
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
ekkOS_Recall({
|
|
44
|
+
semantic_query: "database migration strategy",
|
|
45
|
+
limit: 10,
|
|
46
|
+
include_full_content: true
|
|
47
|
+
})
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Session-Based Recall
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
ekkOS_Recall({
|
|
54
|
+
session_id: "<session-id>",
|
|
55
|
+
from_turn: 1,
|
|
56
|
+
to_turn: 50,
|
|
57
|
+
include_full_content: true
|
|
58
|
+
})
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Context Restoration (After Compaction)
|
|
62
|
+
|
|
63
|
+
When you see `<ekkos-context-preserved>` with a restoration token:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
ekkOS_RestoreContext({
|
|
67
|
+
restoration_token: "<token from tag>"
|
|
68
|
+
})
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Response Format
|
|
72
|
+
|
|
73
|
+
Present recalled information clearly:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
🧠 From [date/session]:
|
|
77
|
+
|
|
78
|
+
**Topic:** [what was discussed]
|
|
79
|
+
**Decision:** [what was decided]
|
|
80
|
+
**Files changed:** [list]
|
|
81
|
+
**Patterns used:** [list]
|
|
82
|
+
**Key insight:** [the important takeaway]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Integration with Golden Loop
|
|
86
|
+
|
|
87
|
+
Recall is an extended SEARCH — it queries episodic memory (L2) instead of pattern memory (L4). Results should still be acknowledged and tracked like any retrieval.
|
|
88
|
+
|
|
89
|
+
After recalling useful context, record the outcome:
|
|
90
|
+
```
|
|
91
|
+
ekkOS_Outcome({ success: true })
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
**Mantra**: Nothing is forgotten. Every session is searchable. Context persists.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ekkos-safety
|
|
3
|
+
description: Check for conflicts before dangerous operations. Activate before deleting files, dropping tables, deploying to production, pushing to main, running destructive commands, modifying configuration files, force-pushing, or any irreversible action. Prevents accidents by checking user directives and patterns.
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- mcp__ekkos-memory__ekkOS_Conflict
|
|
6
|
+
- mcp__ekkos-memory__ekkOS_Search
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# ekkOS Safety Guard
|
|
10
|
+
|
|
11
|
+
Check for conflicts with user directives and patterns before destructive operations.
|
|
12
|
+
|
|
13
|
+
## When To Activate
|
|
14
|
+
|
|
15
|
+
**MUST fire before:**
|
|
16
|
+
- `rm -rf`, `rm -r`, deleting files or directories
|
|
17
|
+
- `DROP TABLE`, `DELETE FROM`, `TRUNCATE`
|
|
18
|
+
- `git push --force`, `git reset --hard`
|
|
19
|
+
- Deploying to production
|
|
20
|
+
- Modifying CI/CD pipelines
|
|
21
|
+
- Changing environment variables
|
|
22
|
+
- Overwriting configuration files
|
|
23
|
+
- Killing processes
|
|
24
|
+
- Any command that is hard to reverse
|
|
25
|
+
|
|
26
|
+
## Instructions
|
|
27
|
+
|
|
28
|
+
### Step 1: Check for Conflicts
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
ekkOS_Conflict({
|
|
32
|
+
proposed_action: "delete all migration files in /db/migrations",
|
|
33
|
+
scope: "deployment" // optional: deployment, auth, security, database
|
|
34
|
+
})
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Step 2: Review Response
|
|
38
|
+
|
|
39
|
+
The conflict check returns:
|
|
40
|
+
- **Matching directives** — user rules that may prohibit the action
|
|
41
|
+
- **Matching patterns** — past experiences relevant to this action
|
|
42
|
+
- **Risk level** — safe, caution, or blocked
|
|
43
|
+
|
|
44
|
+
### Step 3: Act Based on Result
|
|
45
|
+
|
|
46
|
+
**If BLOCKED:** Do NOT proceed. Inform the user why.
|
|
47
|
+
|
|
48
|
+
**If CAUTION:** Present the conflict to the user and ask for confirmation before proceeding.
|
|
49
|
+
|
|
50
|
+
**If SAFE:** Proceed normally.
|
|
51
|
+
|
|
52
|
+
## Example
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
User: "Drop the users table and recreate it"
|
|
56
|
+
|
|
57
|
+
You: Let me check for conflicts first...
|
|
58
|
+
|
|
59
|
+
ekkOS_Conflict({
|
|
60
|
+
proposed_action: "DROP TABLE users and recreate",
|
|
61
|
+
scope: "database"
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
Result: CAUTION — Directive found: "NEVER drop tables in production without backup"
|
|
65
|
+
|
|
66
|
+
"⚠️ I found a directive: 'NEVER drop tables in production without backup.'
|
|
67
|
+
Should I create a backup first, or is this a development database?"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Integration with Golden Loop
|
|
71
|
+
|
|
72
|
+
Safety checks are part of Step 1 (SEARCH) — they query the directive layer (L9) specifically. If a safety check prevents an accident, forge it:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
ekkOS_Forge({
|
|
76
|
+
title: "Always backup before DROP TABLE",
|
|
77
|
+
problem: "Nearly dropped production table without backup",
|
|
78
|
+
solution: "ekkOS_Conflict caught the directive — always check first"
|
|
79
|
+
})
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Record the outcome:
|
|
83
|
+
```
|
|
84
|
+
ekkOS_Outcome({ success: true }) // Safety check prevented accident
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
**Mantra**: Measure twice, cut once. Check before destroying.
|