@ekkos/cli 1.3.1 → 1.3.5
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/capture/jsonl-rewriter.d.ts +1 -1
- package/dist/capture/jsonl-rewriter.js +3 -3
- package/dist/capture/transcript-repair.d.ts +2 -2
- package/dist/capture/transcript-repair.js +2 -2
- package/dist/commands/claw.d.ts +13 -0
- package/dist/commands/claw.js +253 -0
- package/dist/commands/dashboard.js +742 -118
- package/dist/commands/doctor.d.ts +3 -3
- package/dist/commands/doctor.js +6 -79
- package/dist/commands/gemini.d.ts +19 -0
- package/dist/commands/gemini.js +193 -0
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.js +56 -41
- package/dist/commands/run.d.ts +0 -1
- package/dist/commands/run.js +288 -263
- package/dist/commands/scan.d.ts +21 -0
- package/dist/commands/scan.js +386 -0
- package/dist/commands/status.d.ts +4 -1
- package/dist/commands/status.js +165 -27
- package/dist/commands/swarm-dashboard.js +156 -28
- package/dist/commands/swarm.d.ts +1 -1
- package/dist/commands/swarm.js +1 -1
- package/dist/commands/test-claude.d.ts +2 -2
- package/dist/commands/test-claude.js +3 -3
- package/dist/deploy/index.d.ts +0 -2
- package/dist/deploy/index.js +0 -2
- package/dist/deploy/settings.d.ts +6 -5
- package/dist/deploy/settings.js +64 -16
- package/dist/deploy/skills.js +1 -2
- package/dist/index.js +86 -96
- package/dist/lib/usage-parser.d.ts +1 -1
- package/dist/lib/usage-parser.js +9 -6
- package/dist/local/index.d.ts +14 -0
- package/dist/local/index.js +28 -0
- package/dist/local/local-embeddings.d.ts +49 -0
- package/dist/local/local-embeddings.js +232 -0
- package/dist/local/offline-fallback.d.ts +44 -0
- package/dist/local/offline-fallback.js +159 -0
- package/dist/local/sqlite-store.d.ts +126 -0
- package/dist/local/sqlite-store.js +393 -0
- package/dist/local/sync-engine.d.ts +42 -0
- package/dist/local/sync-engine.js +223 -0
- package/dist/utils/platform.d.ts +5 -1
- package/dist/utils/platform.js +24 -4
- package/dist/utils/proxy-url.d.ts +21 -0
- package/dist/utils/proxy-url.js +34 -0
- package/dist/utils/state.d.ts +1 -1
- package/dist/utils/state.js +11 -3
- package/dist/utils/templates.js +1 -1
- package/package.json +11 -4
- package/templates/CLAUDE.md +49 -107
- package/dist/agent/daemon.d.ts +0 -130
- package/dist/agent/daemon.js +0 -606
- package/dist/agent/health-check.d.ts +0 -35
- package/dist/agent/health-check.js +0 -243
- package/dist/agent/pty-runner.d.ts +0 -53
- package/dist/agent/pty-runner.js +0 -190
- package/dist/commands/agent.d.ts +0 -50
- package/dist/commands/agent.js +0 -544
- package/dist/commands/setup-remote.d.ts +0 -20
- package/dist/commands/setup-remote.js +0 -582
- package/dist/utils/verify-remote-terminal.d.ts +0 -10
- package/dist/utils/verify-remote-terminal.js +0 -415
- package/templates/README.md +0 -378
- package/templates/claude-plugins/PHASE2_COMPLETION.md +0 -346
- package/templates/claude-plugins/PLUGIN_PROPOSALS.md +0 -1776
- package/templates/claude-plugins/README.md +0 -587
- package/templates/claude-plugins/agents/code-reviewer.json +0 -14
- package/templates/claude-plugins/agents/debug-detective.json +0 -15
- package/templates/claude-plugins/agents/git-companion.json +0 -14
- package/templates/claude-plugins/blog-manager/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins/blog-manager/commands/blog.md +0 -691
- package/templates/claude-plugins/golden-loop-monitor/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins/golden-loop-monitor/commands/loop-status.md +0 -434
- package/templates/claude-plugins/learning-tracker/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins/learning-tracker/commands/my-patterns.md +0 -282
- package/templates/claude-plugins/memory-lens/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins/memory-lens/commands/memory-search.md +0 -181
- package/templates/claude-plugins/pattern-coach/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins/pattern-coach/commands/forge.md +0 -365
- package/templates/claude-plugins/project-schema-validator/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins/project-schema-validator/commands/validate-schema.md +0 -582
- package/templates/claude-plugins-admin/AGENT_TEAM_PROPOSALS.md +0 -819
- package/templates/claude-plugins-admin/README.md +0 -446
- package/templates/claude-plugins-admin/autonomous-admin-agent/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins-admin/autonomous-admin-agent/commands/agent.md +0 -595
- package/templates/claude-plugins-admin/backend-agent/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins-admin/backend-agent/commands/backend.md +0 -798
- package/templates/claude-plugins-admin/deploy-guardian/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins-admin/deploy-guardian/commands/deploy.md +0 -554
- package/templates/claude-plugins-admin/frontend-agent/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins-admin/frontend-agent/commands/frontend.md +0 -881
- package/templates/claude-plugins-admin/mcp-server-manager/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins-admin/mcp-server-manager/commands/mcp.md +0 -85
- package/templates/claude-plugins-admin/memory-system-monitor/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins-admin/memory-system-monitor/commands/memory-health.md +0 -569
- package/templates/claude-plugins-admin/qa-agent/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins-admin/qa-agent/commands/qa.md +0 -863
- package/templates/claude-plugins-admin/tech-lead-agent/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins-admin/tech-lead-agent/commands/lead.md +0 -732
- package/templates/commands/continue.md +0 -47
- package/templates/cursor-rules/ekkos-memory.md +0 -127
- package/templates/ekkos-manifest.json +0 -223
- package/templates/helpers/json-parse.cjs +0 -101
- package/templates/hooks-node/lib/state.js +0 -187
- package/templates/hooks-node/stop.js +0 -416
- package/templates/hooks-node/user-prompt-submit.js +0 -337
- package/templates/plan-template.md +0 -306
- package/templates/rules/00-hooks-contract.mdc +0 -89
- package/templates/rules/30-ekkos-core.mdc +0 -188
- package/templates/rules/31-ekkos-messages.mdc +0 -78
- package/templates/shared/hooks-enabled.json +0 -22
- package/templates/shared/session-words.json +0 -45
- package/templates/skills/ekkOS_Deep_Recall/Skill.md +0 -282
- package/templates/skills/ekkOS_Learn/Skill.md +0 -265
- package/templates/skills/ekkOS_Memory_First/Skill.md +0 -206
- package/templates/skills/ekkOS_Plan_Assist/Skill.md +0 -302
- package/templates/skills/ekkOS_Preferences/Skill.md +0 -247
- package/templates/skills/ekkOS_Reflect/Skill.md +0 -257
- package/templates/skills/ekkOS_Safety/Skill.md +0 -265
- package/templates/skills/ekkOS_Schema/Skill.md +0 -251
- package/templates/skills/ekkOS_Summary/Skill.md +0 -257
- package/templates/spec-template.md +0 -159
- package/templates/windsurf-rules/ekkos-memory.md +0 -127
- package/templates/windsurf-skills/README.md +0 -58
- package/templates/windsurf-skills/ekkos-continue/SKILL.md +0 -81
- package/templates/windsurf-skills/ekkos-golden-loop/SKILL.md +0 -225
- package/templates/windsurf-skills/ekkos-insights/SKILL.md +0 -138
- package/templates/windsurf-skills/ekkos-recall/SKILL.md +0 -96
- package/templates/windsurf-skills/ekkos-safety/SKILL.md +0 -89
- package/templates/windsurf-skills/ekkos-vault/SKILL.md +0 -86
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ekkOS_Learn
|
|
3
|
-
description: Capture solutions as patterns for future use. Activate when you fix a bug, solve a non-trivial problem, get corrected by the user, discover something that works (or doesn't work), find a better approach, or complete any solution worth remembering. Failures are just as valuable as successes - forge anti-patterns too.
|
|
4
|
-
allowed-tools:
|
|
5
|
-
- mcp__ekkos-memory__ekkOS_Forge
|
|
6
|
-
- mcp__ekkos-memory__ekkOS_Outcome
|
|
7
|
-
- mcp__ekkos-memory__ekkOS_Track
|
|
8
|
-
- mcp__ekkos-memory__ekkOS_Search
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# ekkOS_Learn
|
|
12
|
-
|
|
13
|
-
You are augmented with **ekkOS_ memory** - and your job is to make it SMARTER over time by forging what you learn.
|
|
14
|
-
|
|
15
|
-
## Why This Skill Exists
|
|
16
|
-
|
|
17
|
-
The Stop hook detects `[ekkOS_LEARN]` markers in your responses and auto-forges patterns. This skill teaches you **WHEN** to add those markers and **HOW** to forge patterns directly.
|
|
18
|
-
|
|
19
|
-
**The Golden Rule**: If you solved something non-trivial, FORGE IT. If something didn't work, FORGE IT AS AN ANTI-PATTERN. Every forged pattern makes future sessions smarter.
|
|
20
|
-
|
|
21
|
-
## When To Activate
|
|
22
|
-
|
|
23
|
-
This skill should trigger when you detect:
|
|
24
|
-
|
|
25
|
-
| Trigger | What To Forge |
|
|
26
|
-
|---------|---------------|
|
|
27
|
-
| **Bug fixed** | Problem + root cause + solution |
|
|
28
|
-
| **Non-trivial solution** | The approach that worked |
|
|
29
|
-
| **User corrected you** | What you got wrong + the correct way |
|
|
30
|
-
| **Unexpected success** | Why it worked (capture the insight) |
|
|
31
|
-
| **Unexpected failure** | Why it didn't work (anti-pattern) |
|
|
32
|
-
| **Better approach found** | The improvement over first attempt |
|
|
33
|
-
| **Configuration solved** | Setup steps that worked |
|
|
34
|
-
| **Architecture decision** | The decision + rationale |
|
|
35
|
-
| **Gotcha discovered** | The pitfall + how to avoid it |
|
|
36
|
-
|
|
37
|
-
## Pattern vs Anti-Pattern
|
|
38
|
-
|
|
39
|
-
**Patterns** = Things that WORK
|
|
40
|
-
```
|
|
41
|
-
Title: "Fix JWT expiration errors with clock tolerance"
|
|
42
|
-
Problem: "JWT tokens rejected as expired due to clock skew"
|
|
43
|
-
Solution: "Add clockTolerance: 30 to jwt.verify options"
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
**Anti-Patterns** = Things that DON'T WORK
|
|
47
|
-
```
|
|
48
|
-
Title: "Don't use setTimeout for rate limiting"
|
|
49
|
-
Problem: "Tried setTimeout to throttle API calls"
|
|
50
|
-
Solution: "This doesn't work because... Use debounce instead"
|
|
51
|
-
anti_patterns: ["setTimeout for throttling"]
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
**BOTH ARE VALUABLE.** Anti-patterns prevent repeating mistakes.
|
|
55
|
-
|
|
56
|
-
## Instructions
|
|
57
|
-
|
|
58
|
-
### Method 1: Marker-Based (Recommended)
|
|
59
|
-
|
|
60
|
-
Add a marker in your response that the Stop hook will detect:
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
[ekkOS_LEARN] Forging: "Your Pattern Title"
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
The hook extracts:
|
|
67
|
-
- Title from the marker
|
|
68
|
-
- Problem from user's question
|
|
69
|
-
- Solution from your response
|
|
70
|
-
|
|
71
|
-
**Example:**
|
|
72
|
-
```
|
|
73
|
-
The issue was that the database connection wasn't being released.
|
|
74
|
-
Here's the fix:
|
|
75
|
-
|
|
76
|
-
```typescript
|
|
77
|
-
finally {
|
|
78
|
-
await connection.release();
|
|
79
|
-
}
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
[ekkOS_LEARN] Forging: "Always release database connections in finally block"
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### Method 2: Direct Forge (For Complex Patterns)
|
|
86
|
-
|
|
87
|
-
For patterns that need specific structure:
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
ekkOS_Forge({
|
|
91
|
-
title: "Handle race conditions in React useEffect",
|
|
92
|
-
problem: "Multiple rapid state updates cause stale closures",
|
|
93
|
-
solution: "Use cleanup function with cancelled flag: let cancelled = false; return () => { cancelled = true; }",
|
|
94
|
-
tags: ["react", "useEffect", "race-condition", "hooks"],
|
|
95
|
-
works_when: ["async operations in useEffect", "rapid re-renders"],
|
|
96
|
-
anti_patterns: ["ignoring cleanup", "not checking cancelled flag"]
|
|
97
|
-
})
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### Method 3: Report Outcome (After Applying Patterns)
|
|
101
|
-
|
|
102
|
-
When you apply a pattern from search, report if it worked:
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
ekkOS_Outcome({
|
|
106
|
-
success: true, // or false if it didn't work
|
|
107
|
-
model_used: "claude-opus-4-5"
|
|
108
|
-
})
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
This helps the system learn which patterns are reliable.
|
|
112
|
-
|
|
113
|
-
## What Makes a Good Pattern
|
|
114
|
-
|
|
115
|
-
### Good Pattern Titles
|
|
116
|
-
- "Fix CORS errors by setting correct headers"
|
|
117
|
-
- "Prevent memory leaks in event listeners"
|
|
118
|
-
- "Handle null values in JSON parsing"
|
|
119
|
-
|
|
120
|
-
### Bad Pattern Titles
|
|
121
|
-
- "Fixed the bug" (too vague)
|
|
122
|
-
- "Solution" (no context)
|
|
123
|
-
- "Code change" (not descriptive)
|
|
124
|
-
|
|
125
|
-
### Good Problem Descriptions
|
|
126
|
-
- Specific error message or symptom
|
|
127
|
-
- Context where it occurred
|
|
128
|
-
- What was expected vs what happened
|
|
129
|
-
|
|
130
|
-
### Good Solutions
|
|
131
|
-
- The specific fix or approach
|
|
132
|
-
- Why it works (the insight)
|
|
133
|
-
- Any caveats or edge cases
|
|
134
|
-
|
|
135
|
-
## Forge Triggers Checklist
|
|
136
|
-
|
|
137
|
-
Ask yourself after solving anything:
|
|
138
|
-
|
|
139
|
-
- [ ] Was this non-trivial? → FORGE
|
|
140
|
-
- [ ] Did the user teach me something? → FORGE (they corrected me)
|
|
141
|
-
- [ ] Would I want to remember this? → FORGE
|
|
142
|
-
- [ ] Did something NOT work? → FORGE AS ANTI-PATTERN
|
|
143
|
-
- [ ] Is this project-specific? → FORGE with project tags
|
|
144
|
-
- [ ] Is this universal? → FORGE for collective layer
|
|
145
|
-
|
|
146
|
-
## Integration with Hooks
|
|
147
|
-
|
|
148
|
-
```
|
|
149
|
-
┌─────────────────────────────────────────────────────────────────┐
|
|
150
|
-
│ YOUR RESPONSE │
|
|
151
|
-
│ └── Include [ekkOS_LEARN] marker if you solved something │
|
|
152
|
-
│ ↓ │
|
|
153
|
-
│ STOP HOOK │
|
|
154
|
-
│ └── Detects marker, extracts title │
|
|
155
|
-
│ └── Calls ekkOS_Forge with problem/solution │
|
|
156
|
-
│ ↓ │
|
|
157
|
-
│ MEMORY SUBSTRATE │
|
|
158
|
-
│ └── Pattern saved to Layer 4 │
|
|
159
|
-
│ └── Indexed for future retrieval │
|
|
160
|
-
│ ↓ │
|
|
161
|
-
│ NEXT SESSION │
|
|
162
|
-
│ └── Pattern retrieved when similar problem arises │
|
|
163
|
-
└─────────────────────────────────────────────────────────────────┘
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
## Example Scenarios
|
|
167
|
-
|
|
168
|
-
### Scenario 1: Bug Fix
|
|
169
|
-
```
|
|
170
|
-
User: "My API keeps timing out"
|
|
171
|
-
|
|
172
|
-
You: *investigate*
|
|
173
|
-
*find the issue*
|
|
174
|
-
|
|
175
|
-
"The problem is connection pooling. Your pool was set to
|
|
176
|
-
max 5 connections but you have 20 concurrent requests.
|
|
177
|
-
|
|
178
|
-
Fix: Increase pool size to match expected concurrency:
|
|
179
|
-
```
|
|
180
|
-
pool: { max: 25, min: 5, idle: 10000 }
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
[ekkOS_LEARN] Forging: "Match connection pool size to concurrent request volume"
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
### Scenario 2: User Correction
|
|
187
|
-
```
|
|
188
|
-
User: "No, that's wrong. You should use useCallback, not useMemo"
|
|
189
|
-
|
|
190
|
-
You: "You're right, I apologize for the confusion.
|
|
191
|
-
|
|
192
|
-
- useMemo: Memoizes a VALUE (result of computation)
|
|
193
|
-
- useCallback: Memoizes a FUNCTION (prevents recreation)
|
|
194
|
-
|
|
195
|
-
For passing callbacks to child components, useCallback is correct.
|
|
196
|
-
|
|
197
|
-
[ekkOS_LEARN] Forging: "useCallback for functions, useMemo for values"
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### Scenario 3: Anti-Pattern Discovery
|
|
201
|
-
```
|
|
202
|
-
User: "I tried your suggestion but it made things worse"
|
|
203
|
-
|
|
204
|
-
You: "I see what went wrong. Using synchronous file reads in the
|
|
205
|
-
request handler blocks the event loop.
|
|
206
|
-
|
|
207
|
-
This is an ANTI-PATTERN:
|
|
208
|
-
```javascript
|
|
209
|
-
// DON'T DO THIS
|
|
210
|
-
const data = fs.readFileSync(path);
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
Instead, use async:
|
|
214
|
-
```javascript
|
|
215
|
-
const data = await fs.promises.readFile(path);
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
ekkOS_Forge({
|
|
219
|
-
title: "Never use sync file operations in request handlers",
|
|
220
|
-
problem: "Synchronous file reads block Node.js event loop",
|
|
221
|
-
solution: "Always use fs.promises or callback-based async operations",
|
|
222
|
-
anti_patterns: ["fs.readFileSync in handlers", "blocking I/O in async context"]
|
|
223
|
-
})
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
### Scenario 4: Configuration Success
|
|
227
|
-
```
|
|
228
|
-
User: "Finally got Tailwind working with the monorepo!"
|
|
229
|
-
|
|
230
|
-
You: "Great! Let me capture that configuration for future reference.
|
|
231
|
-
|
|
232
|
-
ekkOS_Forge({
|
|
233
|
-
title: "Tailwind CSS in Turborepo monorepo setup",
|
|
234
|
-
problem: "Tailwind not detecting classes across workspace packages",
|
|
235
|
-
solution: "Add all workspace paths to content array: content: ['./src/**/*.{ts,tsx}', '../../packages/ui/**/*.{ts,tsx}']",
|
|
236
|
-
tags: ["tailwind", "turborepo", "monorepo", "css"],
|
|
237
|
-
works_when: ["monorepo with shared UI package", "Turborepo setup"]
|
|
238
|
-
})
|
|
239
|
-
|
|
240
|
-
This is now saved for next time you set up a similar project.
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
## Success Metrics
|
|
244
|
-
|
|
245
|
-
You're using this skill correctly when:
|
|
246
|
-
- You forge after EVERY non-trivial solution
|
|
247
|
-
- You capture anti-patterns when things fail
|
|
248
|
-
- You acknowledge user corrections as learning moments
|
|
249
|
-
- Your forge titles are specific and searchable
|
|
250
|
-
- You include both WHAT worked and WHY
|
|
251
|
-
|
|
252
|
-
## Remember
|
|
253
|
-
|
|
254
|
-
**The memory only gets smarter if you teach it.**
|
|
255
|
-
|
|
256
|
-
Every pattern you forge helps:
|
|
257
|
-
- Future you (in the next session)
|
|
258
|
-
- This user (across all their projects)
|
|
259
|
-
- Other users (via collective layer)
|
|
260
|
-
|
|
261
|
-
Don't be stingy with forging. If in doubt, FORGE.
|
|
262
|
-
|
|
263
|
-
---
|
|
264
|
-
|
|
265
|
-
**Mantra**: Solved it? Forge it. Broke it? Forge the anti-pattern. Learned something? Forge it.
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ekkOS_Memory_First
|
|
3
|
-
description: Search your memory before solving problems. Activate when debugging errors, discussing architecture, answering "how do I...", fixing bugs, making technical decisions, or when you realize mid-response that past solutions might help. This skill ensures you check existing patterns BEFORE reasoning from scratch.
|
|
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
|
-
- Read
|
|
10
|
-
- Glob
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# ekkOS_Memory_First
|
|
14
|
-
|
|
15
|
-
You are augmented with **ekkOS_ memory** - a cognitive substrate that remembers solutions from past conversations.
|
|
16
|
-
|
|
17
|
-
## Why This Skill Exists
|
|
18
|
-
|
|
19
|
-
The UserPromptSubmit hook already injects patterns at the START of each turn. This skill activates **MIDSTREAM** when you realize:
|
|
20
|
-
- The initial patterns weren't enough
|
|
21
|
-
- You need project-specific context (codebase layer)
|
|
22
|
-
- A follow-up search would help
|
|
23
|
-
- The problem is evolving and you need fresh patterns
|
|
24
|
-
|
|
25
|
-
## When To Activate
|
|
26
|
-
|
|
27
|
-
This skill should trigger when you detect:
|
|
28
|
-
|
|
29
|
-
| Trigger | Example |
|
|
30
|
-
|---------|---------|
|
|
31
|
-
| Debugging | "Why is X failing?", "error", "not working", "bug" |
|
|
32
|
-
| Architecture | "How should I structure...", "best approach", "design pattern" |
|
|
33
|
-
| Implementation | "How do I...", "what's the pattern for", "implement" |
|
|
34
|
-
| Configuration | "setup", "config", "environment", "deploy" |
|
|
35
|
-
| Mid-response realization | "Wait, I might have solved this before..." |
|
|
36
|
-
|
|
37
|
-
## Instructions
|
|
38
|
-
|
|
39
|
-
### Step 1: Assess What You Already Have
|
|
40
|
-
|
|
41
|
-
The hook may have already injected patterns. Check if they're sufficient:
|
|
42
|
-
- Are the patterns relevant to THIS specific problem?
|
|
43
|
-
- Do you need more context about the codebase?
|
|
44
|
-
- Has the problem evolved since the initial query?
|
|
45
|
-
|
|
46
|
-
If patterns were injected and are sufficient, acknowledge them and proceed.
|
|
47
|
-
|
|
48
|
-
### Step 2: Search for Additional Context (If Needed)
|
|
49
|
-
|
|
50
|
-
**For general patterns:**
|
|
51
|
-
```
|
|
52
|
-
ekkOS_Search({
|
|
53
|
-
query: "<specific problem description>",
|
|
54
|
-
sources: ["patterns", "collective"],
|
|
55
|
-
limit: 5
|
|
56
|
-
})
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
**For project-specific patterns:**
|
|
60
|
-
```
|
|
61
|
-
ekkOS_Codebase({
|
|
62
|
-
query: "<what you're looking for in this project>",
|
|
63
|
-
limit: 5
|
|
64
|
-
})
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
**For task context (combines patterns + episodes):**
|
|
68
|
-
```
|
|
69
|
-
ekkOS_Context({
|
|
70
|
-
task: "<what you're trying to accomplish>"
|
|
71
|
-
})
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Step 3: Acknowledge What You Found
|
|
75
|
-
|
|
76
|
-
**When you find relevant patterns:**
|
|
77
|
-
```
|
|
78
|
-
🧠 I remember solving something like this...
|
|
79
|
-
|
|
80
|
-
[Reference the pattern title and key insight]
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
**When applying a pattern:**
|
|
84
|
-
```
|
|
85
|
-
Using your approach from "[Pattern Title]"...
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
**When patterns don't quite fit:**
|
|
89
|
-
```
|
|
90
|
-
I found some related patterns, but this seems like a new variation.
|
|
91
|
-
Let me solve it and we can save the solution for next time.
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### Step 4: Track Usage (For Learning)
|
|
95
|
-
|
|
96
|
-
When you apply a pattern, track it:
|
|
97
|
-
```
|
|
98
|
-
ekkOS_Track({
|
|
99
|
-
pattern_id: "<id from search>",
|
|
100
|
-
retrieval_id: "<from search response>"
|
|
101
|
-
})
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
This helps the system learn which patterns are most useful.
|
|
105
|
-
|
|
106
|
-
## Fallback Behavior
|
|
107
|
-
|
|
108
|
-
If the MCP server is unavailable:
|
|
109
|
-
|
|
110
|
-
1. **Check local cache:**
|
|
111
|
-
- Read `.ekkos/patterns/recent.json`
|
|
112
|
-
- Read `.ekkos/patterns/project.json`
|
|
113
|
-
|
|
114
|
-
2. **If no cache:**
|
|
115
|
-
- Proceed without memory
|
|
116
|
-
- Note: "🧠 Memory unavailable - solving from first principles"
|
|
117
|
-
- The solution can still be forged later
|
|
118
|
-
|
|
119
|
-
## What NOT To Do
|
|
120
|
-
|
|
121
|
-
- **Don't duplicate hook retrieval** - If patterns were already injected at turn start, don't re-search the same query
|
|
122
|
-
- **Don't over-search** - One focused search is better than many broad ones
|
|
123
|
-
- **Don't ignore results** - If patterns are retrieved, acknowledge them (SELECT or SKIP)
|
|
124
|
-
- **Don't fabricate patterns** - Only reference patterns that were actually retrieved
|
|
125
|
-
|
|
126
|
-
## Integration with Golden Loop
|
|
127
|
-
|
|
128
|
-
This skill is the **RETRIEVE** phase of the Golden Loop:
|
|
129
|
-
|
|
130
|
-
```
|
|
131
|
-
┌─────────────────────────────────────────────────────────────────┐
|
|
132
|
-
│ RETRIEVE (This Skill) │
|
|
133
|
-
│ ├── Hook injects patterns at turn start │
|
|
134
|
-
│ └── Skill searches midstream when needed │
|
|
135
|
-
│ ↓ │
|
|
136
|
-
│ REASON (Your Response) │
|
|
137
|
-
│ └── Apply patterns to solve the problem │
|
|
138
|
-
│ ↓ │
|
|
139
|
-
│ FORGE (ekkOS_Learn Skill) │
|
|
140
|
-
│ └── Save novel solutions as new patterns │
|
|
141
|
-
│ ↓ │
|
|
142
|
-
│ APPLY (Next Time) │
|
|
143
|
-
│ └── Retrieved patterns make future responses better │
|
|
144
|
-
└─────────────────────────────────────────────────────────────────┘
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
## Example Scenarios
|
|
148
|
-
|
|
149
|
-
### Scenario 1: Debugging Question
|
|
150
|
-
```
|
|
151
|
-
User: "Why is my API returning 500 errors?"
|
|
152
|
-
|
|
153
|
-
[Hook already injected 2 patterns about error handling]
|
|
154
|
-
|
|
155
|
-
You: *Check if injected patterns are relevant*
|
|
156
|
-
*They're about frontend errors, not API*
|
|
157
|
-
|
|
158
|
-
"Let me search for API-specific patterns..."
|
|
159
|
-
|
|
160
|
-
ekkOS_Search({query: "API 500 error server backend", sources: ["patterns"]})
|
|
161
|
-
|
|
162
|
-
"🧠 I remember - we solved a similar issue last month.
|
|
163
|
-
It was related to connection pooling timeouts..."
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
### Scenario 2: Architecture Discussion
|
|
167
|
-
```
|
|
168
|
-
User: "How should I structure the authentication system?"
|
|
169
|
-
|
|
170
|
-
[Hook injected 1 pattern about JWT]
|
|
171
|
-
|
|
172
|
-
You: *Pattern is relevant but need more context*
|
|
173
|
-
|
|
174
|
-
ekkOS_Codebase({query: "authentication auth login session"})
|
|
175
|
-
|
|
176
|
-
"I found your existing auth patterns in this codebase.
|
|
177
|
-
You're using JWT with refresh tokens. Building on that..."
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### Scenario 3: Mid-Response Realization
|
|
181
|
-
```
|
|
182
|
-
User: "Help me optimize this database query"
|
|
183
|
-
|
|
184
|
-
[No patterns injected - hook found nothing]
|
|
185
|
-
|
|
186
|
-
You: *Start analyzing the query*
|
|
187
|
-
*Realize: "Wait, we optimized something similar before"*
|
|
188
|
-
|
|
189
|
-
ekkOS_Search({query: "database query optimization SQL performance"})
|
|
190
|
-
|
|
191
|
-
"🧠 Actually, I remember we solved a similar optimization.
|
|
192
|
-
The key was adding an index on the foreign key..."
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
## Success Metrics
|
|
196
|
-
|
|
197
|
-
You're using this skill correctly when:
|
|
198
|
-
- You search BEFORE saying "I don't know" or "I'm not sure"
|
|
199
|
-
- You acknowledge patterns that were retrieved
|
|
200
|
-
- You credit past solutions when applying them
|
|
201
|
-
- You don't repeat searches the hook already did
|
|
202
|
-
- Users hear "I remember..." more often than "Let me figure this out from scratch..."
|
|
203
|
-
|
|
204
|
-
---
|
|
205
|
-
|
|
206
|
-
**Remember**: Every pattern you find was a solution that worked before. Trust the memory. Use it first.
|