@ekkos/cli 0.2.0
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/cache/LocalSessionStore.d.ts +129 -0
- package/dist/cache/LocalSessionStore.js +688 -0
- package/dist/cache/capture.d.ts +26 -0
- package/dist/cache/capture.js +461 -0
- package/dist/cache/index.d.ts +7 -0
- package/dist/cache/index.js +23 -0
- package/dist/cache/types.d.ts +147 -0
- package/dist/cache/types.js +40 -0
- package/dist/commands/init.d.ts +9 -0
- package/dist/commands/init.js +478 -0
- package/dist/commands/run.d.ts +12 -0
- package/dist/commands/run.js +829 -0
- package/dist/commands/setup.d.ts +6 -0
- package/dist/commands/setup.js +658 -0
- package/dist/commands/status.d.ts +1 -0
- package/dist/commands/status.js +109 -0
- package/dist/commands/test.d.ts +1 -0
- package/dist/commands/test.js +157 -0
- package/dist/deploy/agents.d.ts +15 -0
- package/dist/deploy/agents.js +72 -0
- package/dist/deploy/hooks.d.ts +16 -0
- package/dist/deploy/hooks.js +121 -0
- package/dist/deploy/index.d.ts +7 -0
- package/dist/deploy/index.js +24 -0
- package/dist/deploy/instructions.d.ts +12 -0
- package/dist/deploy/instructions.js +36 -0
- package/dist/deploy/mcp.d.ts +19 -0
- package/dist/deploy/mcp.js +109 -0
- package/dist/deploy/plugins.d.ts +19 -0
- package/dist/deploy/plugins.js +62 -0
- package/dist/deploy/settings.d.ts +8 -0
- package/dist/deploy/settings.js +84 -0
- package/dist/deploy/skills.d.ts +19 -0
- package/dist/deploy/skills.js +60 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +71 -0
- package/dist/restore/RestoreOrchestrator.d.ts +48 -0
- package/dist/restore/RestoreOrchestrator.js +481 -0
- package/dist/restore/index.d.ts +4 -0
- package/dist/restore/index.js +20 -0
- package/dist/utils/platform.d.ts +29 -0
- package/dist/utils/platform.js +65 -0
- package/dist/utils/session-words.json +119 -0
- package/dist/utils/state.d.ts +57 -0
- package/dist/utils/state.js +186 -0
- package/dist/utils/templates.d.ts +24 -0
- package/dist/utils/templates.js +118 -0
- package/package.json +48 -0
- package/templates/CLAUDE.md +287 -0
- package/templates/README.md +378 -0
- package/templates/agents/README.md +182 -0
- package/templates/agents/code-reviewer.md +166 -0
- package/templates/agents/debug-detective.md +169 -0
- package/templates/agents/ekkOS_Vercel.md +99 -0
- package/templates/agents/extension-manager.md +229 -0
- package/templates/agents/git-companion.md +185 -0
- package/templates/agents/github-test-agent.md +321 -0
- package/templates/agents/railway-manager.md +179 -0
- package/templates/claude-plugins/PHASE2_COMPLETION.md +346 -0
- package/templates/claude-plugins/PLUGIN_PROPOSALS.md +1776 -0
- package/templates/claude-plugins/README.md +587 -0
- package/templates/claude-plugins/agents/code-reviewer.json +14 -0
- package/templates/claude-plugins/agents/debug-detective.json +15 -0
- package/templates/claude-plugins/agents/git-companion.json +14 -0
- package/templates/claude-plugins/blog-manager/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins/blog-manager/commands/blog.md +691 -0
- package/templates/claude-plugins/golden-loop-monitor/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins/golden-loop-monitor/commands/loop-status.md +434 -0
- package/templates/claude-plugins/learning-tracker/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins/learning-tracker/commands/my-patterns.md +282 -0
- package/templates/claude-plugins/memory-lens/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins/memory-lens/commands/memory-search.md +181 -0
- package/templates/claude-plugins/pattern-coach/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins/pattern-coach/commands/forge.md +365 -0
- package/templates/claude-plugins/project-schema-validator/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins/project-schema-validator/commands/validate-schema.md +582 -0
- package/templates/claude-plugins-admin/AGENT_TEAM_PROPOSALS.md +819 -0
- package/templates/claude-plugins-admin/README.md +446 -0
- package/templates/claude-plugins-admin/autonomous-admin-agent/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/autonomous-admin-agent/commands/agent.md +595 -0
- package/templates/claude-plugins-admin/backend-agent/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/backend-agent/commands/backend.md +798 -0
- package/templates/claude-plugins-admin/deploy-guardian/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/deploy-guardian/commands/deploy.md +554 -0
- package/templates/claude-plugins-admin/frontend-agent/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/frontend-agent/commands/frontend.md +881 -0
- package/templates/claude-plugins-admin/mcp-server-manager/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/mcp-server-manager/commands/mcp.md +85 -0
- package/templates/claude-plugins-admin/memory-system-monitor/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/memory-system-monitor/commands/memory-health.md +569 -0
- package/templates/claude-plugins-admin/qa-agent/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/qa-agent/commands/qa.md +863 -0
- package/templates/claude-plugins-admin/tech-lead-agent/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/tech-lead-agent/commands/lead.md +732 -0
- package/templates/commands/continue.md +47 -0
- package/templates/cursor-hooks/after-agent-response.sh +117 -0
- package/templates/cursor-hooks/before-submit-prompt.sh +419 -0
- package/templates/cursor-hooks/hooks.json +20 -0
- package/templates/cursor-hooks/lib/contract.sh +320 -0
- package/templates/cursor-hooks/stop.sh +75 -0
- package/templates/cursor-rules/ekkos-memory.md +187 -0
- package/templates/hooks/assistant-response.sh +96 -0
- package/templates/hooks/hooks.json +28 -0
- package/templates/hooks/lib/contract.sh +320 -0
- package/templates/hooks/lib/state.sh +158 -0
- package/templates/hooks/session-start.ps1 +41 -0
- package/templates/hooks/session-start.sh +318 -0
- package/templates/hooks/stop.ps1 +16 -0
- package/templates/hooks/stop.sh +989 -0
- package/templates/hooks/user-prompt-submit.ps1 +174 -0
- package/templates/hooks/user-prompt-submit.sh +587 -0
- package/templates/hooks-node/lib/state.js +187 -0
- package/templates/hooks-node/stop.js +416 -0
- package/templates/hooks-node/user-prompt-submit.js +337 -0
- package/templates/plan-template.md +306 -0
- package/templates/rules/00-hooks-contract.mdc +89 -0
- package/templates/rules/30-ekkos-core.mdc +188 -0
- package/templates/rules/31-ekkos-messages.mdc +78 -0
- package/templates/skills/continue/SKILL.md +169 -0
- package/templates/skills/ekkOS_Deep_Recall/Skill.md +282 -0
- package/templates/skills/ekkOS_Learn/Skill.md +265 -0
- package/templates/skills/ekkOS_Memory_First/Skill.md +206 -0
- package/templates/skills/ekkOS_Plan_Assist/Skill.md +302 -0
- package/templates/skills/ekkOS_Preferences/Skill.md +247 -0
- package/templates/skills/ekkOS_Reflect/Skill.md +257 -0
- package/templates/skills/ekkOS_Safety/Skill.md +265 -0
- package/templates/skills/ekkOS_Schema/Skill.md +251 -0
- package/templates/skills/ekkOS_Summary/Skill.md +257 -0
- package/templates/skills/ekkOS_Vault/Skill.md +287 -0
- package/templates/skills/permissions/Skill.md +322 -0
- package/templates/spec-template.md +159 -0
- package/templates/windsurf-hooks/before-submit-prompt.sh +238 -0
- package/templates/windsurf-hooks/hooks.json +10 -0
- package/templates/windsurf-hooks/lib/contract.sh +320 -0
- package/templates/windsurf-rules/ekkos-memory.md +129 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ekkOS_Preferences
|
|
3
|
+
description: Capture user preferences as permanent directives. Activate when the user says "always", "never", "I prefer", "I like", "don't", "avoid", expresses a coding style preference, states a workflow requirement, or corrects you about how they want things done. These become rules that apply to all future sessions.
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- mcp__ekkos-memory__ekkOS_Directive
|
|
6
|
+
- mcp__ekkos-memory__ekkOS_Search
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# ekkOS_Preferences
|
|
10
|
+
|
|
11
|
+
You are augmented with **ekkOS_ memory** - and your job is to remember what this user PREFERS across all sessions.
|
|
12
|
+
|
|
13
|
+
## Why This Skill Exists
|
|
14
|
+
|
|
15
|
+
The SessionStart hook loads existing directives. This skill **CREATES** new directives when the user expresses preferences mid-conversation.
|
|
16
|
+
|
|
17
|
+
**Directives are higher priority than patterns.** When a directive conflicts with a pattern, the directive wins.
|
|
18
|
+
|
|
19
|
+
## Directive Types
|
|
20
|
+
|
|
21
|
+
| Type | Meaning | Trigger Words |
|
|
22
|
+
|------|---------|---------------|
|
|
23
|
+
| **MUST** | Always do this | "always", "make sure to", "you must", "required" |
|
|
24
|
+
| **NEVER** | Never do this | "never", "don't ever", "stop doing", "forbidden" |
|
|
25
|
+
| **PREFER** | Do this when possible | "I prefer", "I like", "better if", "ideally" |
|
|
26
|
+
| **AVOID** | Try not to do this | "avoid", "try not to", "don't usually", "minimize" |
|
|
27
|
+
|
|
28
|
+
## When To Activate
|
|
29
|
+
|
|
30
|
+
This skill should trigger when you detect:
|
|
31
|
+
|
|
32
|
+
| Trigger | Example | Directive Type |
|
|
33
|
+
|---------|---------|----------------|
|
|
34
|
+
| "Always..." | "Always use TypeScript strict mode" | MUST |
|
|
35
|
+
| "Never..." | "Never use var, only let/const" | NEVER |
|
|
36
|
+
| "I prefer..." | "I prefer functional components" | PREFER |
|
|
37
|
+
| "I like..." | "I like tabs over spaces" | PREFER |
|
|
38
|
+
| "Don't..." | "Don't add comments to obvious code" | AVOID |
|
|
39
|
+
| "Avoid..." | "Avoid inline styles" | AVOID |
|
|
40
|
+
| Style correction | "No, use snake_case for this project" | MUST |
|
|
41
|
+
| Workflow requirement | "Run tests before every commit" | MUST |
|
|
42
|
+
|
|
43
|
+
## Instructions
|
|
44
|
+
|
|
45
|
+
### Step 1: Detect Preference Statement
|
|
46
|
+
|
|
47
|
+
Listen for language that indicates a preference:
|
|
48
|
+
- Explicit: "I always want...", "Never do...", "I prefer..."
|
|
49
|
+
- Implicit: "That's not how I like it", "Actually, use X instead"
|
|
50
|
+
- Corrections: "No, do it this way", "Wrong style"
|
|
51
|
+
|
|
52
|
+
### Step 2: Classify the Directive Type
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
"Always X" → MUST
|
|
56
|
+
"Never X" → NEVER
|
|
57
|
+
"I prefer X" → PREFER
|
|
58
|
+
"Try to avoid X" → AVOID
|
|
59
|
+
"Don't X unless..." → AVOID (with condition)
|
|
60
|
+
"You must always X" → MUST (priority: high)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Step 3: Create the Directive
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
ekkOS_Directive({
|
|
67
|
+
type: "MUST", // MUST | NEVER | PREFER | AVOID
|
|
68
|
+
rule: "Use TypeScript strict mode", // The actual rule
|
|
69
|
+
scope: "global", // "global" | "project" | specific scope
|
|
70
|
+
reason: "User preference for type safety", // Optional context
|
|
71
|
+
priority: 50 // 1-100, higher = more important
|
|
72
|
+
})
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Step 4: Confirm to User
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
🧠 Preference saved: [MUST] Use TypeScript strict mode
|
|
79
|
+
This will apply to all future sessions.
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Priority Guidelines
|
|
83
|
+
|
|
84
|
+
| Priority | When to Use |
|
|
85
|
+
|----------|-------------|
|
|
86
|
+
| 80-100 | Critical rules, security-related, strong user insistence |
|
|
87
|
+
| 50-79 | Standard preferences, coding style |
|
|
88
|
+
| 20-49 | Nice-to-haves, soft preferences |
|
|
89
|
+
| 1-19 | Weak suggestions, easily overridable |
|
|
90
|
+
|
|
91
|
+
## Scope Guidelines
|
|
92
|
+
|
|
93
|
+
| Scope | When to Use |
|
|
94
|
+
|-------|-------------|
|
|
95
|
+
| `"global"` | Applies everywhere (general preferences) |
|
|
96
|
+
| `"project"` | Only this repository (project conventions) |
|
|
97
|
+
| `"typescript"` | Only TypeScript files |
|
|
98
|
+
| `"python"` | Only Python files |
|
|
99
|
+
| `"frontend"` | Frontend code only |
|
|
100
|
+
| `"backend"` | Backend code only |
|
|
101
|
+
|
|
102
|
+
## Example Scenarios
|
|
103
|
+
|
|
104
|
+
### Scenario 1: Explicit Preference
|
|
105
|
+
```
|
|
106
|
+
User: "I always want you to use arrow functions instead of function declarations"
|
|
107
|
+
|
|
108
|
+
You: "Understood! I'll save this preference.
|
|
109
|
+
|
|
110
|
+
ekkOS_Directive({
|
|
111
|
+
type: "PREFER",
|
|
112
|
+
rule: "Use arrow functions instead of function declarations",
|
|
113
|
+
scope: "global",
|
|
114
|
+
reason: "User prefers arrow function syntax"
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
🧠 Preference saved: [PREFER] Use arrow functions instead of function declarations
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Scenario 2: Strong Prohibition
|
|
121
|
+
```
|
|
122
|
+
User: "NEVER commit directly to main. Always use feature branches."
|
|
123
|
+
|
|
124
|
+
You: "Absolutely, that's a critical workflow rule.
|
|
125
|
+
|
|
126
|
+
ekkOS_Directive({
|
|
127
|
+
type: "NEVER",
|
|
128
|
+
rule: "Commit directly to main branch",
|
|
129
|
+
scope: "global",
|
|
130
|
+
priority: 90,
|
|
131
|
+
reason: "Protected branch workflow - user requirement"
|
|
132
|
+
})
|
|
133
|
+
|
|
134
|
+
ekkOS_Directive({
|
|
135
|
+
type: "MUST",
|
|
136
|
+
rule: "Use feature branches for all changes",
|
|
137
|
+
scope: "global",
|
|
138
|
+
priority: 90,
|
|
139
|
+
reason: "Protected branch workflow - user requirement"
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
🧠 Saved two directives:
|
|
143
|
+
[NEVER] Commit directly to main branch (priority: 90)
|
|
144
|
+
[MUST] Use feature branches for all changes (priority: 90)
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Scenario 3: Style Correction
|
|
148
|
+
```
|
|
149
|
+
User: "No, in this project we use PascalCase for component files, not kebab-case"
|
|
150
|
+
|
|
151
|
+
You: "Got it, I'll remember that for this project.
|
|
152
|
+
|
|
153
|
+
ekkOS_Directive({
|
|
154
|
+
type: "MUST",
|
|
155
|
+
rule: "Use PascalCase for React component filenames",
|
|
156
|
+
scope: "project",
|
|
157
|
+
reason: "Project naming convention"
|
|
158
|
+
})
|
|
159
|
+
|
|
160
|
+
🧠 Project preference saved: [MUST] Use PascalCase for React component filenames
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Scenario 4: Soft Preference
|
|
164
|
+
```
|
|
165
|
+
User: "I kind of prefer shorter variable names when the context is clear"
|
|
166
|
+
|
|
167
|
+
You: "Noted as a soft preference.
|
|
168
|
+
|
|
169
|
+
ekkOS_Directive({
|
|
170
|
+
type: "PREFER",
|
|
171
|
+
rule: "Use concise variable names when context is clear",
|
|
172
|
+
scope: "global",
|
|
173
|
+
priority: 30,
|
|
174
|
+
reason: "User prefers brevity over verbosity in obvious contexts"
|
|
175
|
+
})
|
|
176
|
+
|
|
177
|
+
🧠 Preference saved: [PREFER] Use concise variable names when context is clear
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Scenario 5: Avoiding Something
|
|
181
|
+
```
|
|
182
|
+
User: "Try to avoid using any type in TypeScript"
|
|
183
|
+
|
|
184
|
+
You: "I'll make a note to avoid 'any'.
|
|
185
|
+
|
|
186
|
+
ekkOS_Directive({
|
|
187
|
+
type: "AVOID",
|
|
188
|
+
rule: "Using 'any' type in TypeScript",
|
|
189
|
+
scope: "typescript",
|
|
190
|
+
reason: "User wants strict typing"
|
|
191
|
+
})
|
|
192
|
+
|
|
193
|
+
🧠 Preference saved: [AVOID] Using 'any' type in TypeScript
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## What NOT to Capture
|
|
197
|
+
|
|
198
|
+
Don't create directives for:
|
|
199
|
+
- One-time requests ("make this function shorter")
|
|
200
|
+
- Context-specific instructions ("for this file, use X")
|
|
201
|
+
- Questions ("should I use tabs or spaces?")
|
|
202
|
+
- Unclear preferences ("maybe we should...")
|
|
203
|
+
|
|
204
|
+
Only capture clear, generalizable preferences that should apply across sessions.
|
|
205
|
+
|
|
206
|
+
## Checking Before Creating
|
|
207
|
+
|
|
208
|
+
Before creating a new directive, optionally check if one already exists:
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
ekkOS_Search({
|
|
212
|
+
query: "variable naming convention",
|
|
213
|
+
sources: ["directives"]
|
|
214
|
+
})
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
If a conflicting directive exists, ask the user:
|
|
218
|
+
```
|
|
219
|
+
"You previously said [PREFER] camelCase. Do you want to change this to PascalCase?"
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Integration with Patterns
|
|
223
|
+
|
|
224
|
+
Directives override patterns when there's a conflict:
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
Pattern: "Use semicolons in JavaScript"
|
|
228
|
+
Directive: [NEVER] Use semicolons in JavaScript
|
|
229
|
+
|
|
230
|
+
→ Directive wins. No semicolons.
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
This is why capturing directives is important - they ensure patterns follow user preferences.
|
|
234
|
+
|
|
235
|
+
## Success Metrics
|
|
236
|
+
|
|
237
|
+
You're using this skill correctly when:
|
|
238
|
+
- You capture preferences WITHOUT being asked to
|
|
239
|
+
- You use the right directive type (MUST/NEVER/PREFER/AVOID)
|
|
240
|
+
- You set appropriate scope (global vs project)
|
|
241
|
+
- You confirm saves with the 🧠 indicator
|
|
242
|
+
- User corrections become permanent rules
|
|
243
|
+
- Future sessions automatically apply these preferences
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
**Mantra**: User said "always"? Save it. User said "never"? Save it. User corrected you? Save the correction.
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ekkOS_Reflect
|
|
3
|
+
description: Analyze response quality and learn from it. Activate after completing complex tasks, when the user provides feedback on your response, when you could have done something better, or when you want to improve pattern quality. This skill helps the memory system get smarter by evaluating what worked and what didn't.
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- mcp__ekkos-memory__ekkOS_Reflect
|
|
6
|
+
- mcp__ekkos-memory__ekkOS_Outcome
|
|
7
|
+
- mcp__ekkos-memory__ekkOS_Forge
|
|
8
|
+
- mcp__ekkos-memory__ekkOS_Search
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# ekkOS_Reflect
|
|
12
|
+
|
|
13
|
+
You are augmented with **ekkOS_ memory** - and you can analyze your own responses to improve future performance.
|
|
14
|
+
|
|
15
|
+
## Why This Skill Exists
|
|
16
|
+
|
|
17
|
+
The memory system only improves if we close the feedback loop:
|
|
18
|
+
- Did that pattern actually help?
|
|
19
|
+
- Could the response have been better?
|
|
20
|
+
- What should be remembered for next time?
|
|
21
|
+
|
|
22
|
+
This skill enables self-improvement.
|
|
23
|
+
|
|
24
|
+
## When To Activate
|
|
25
|
+
|
|
26
|
+
This skill should trigger when:
|
|
27
|
+
|
|
28
|
+
| Trigger | Example |
|
|
29
|
+
|---------|---------|
|
|
30
|
+
| Complex task completed | Finished multi-step implementation |
|
|
31
|
+
| User provides feedback | "That's not quite right", "Perfect!" |
|
|
32
|
+
| You sense improvement opportunity | "I could have done this better" |
|
|
33
|
+
| Pattern was applied | Need to record if it worked |
|
|
34
|
+
| User corrects you | Learn from the correction |
|
|
35
|
+
| After difficult debugging | What was the key insight? |
|
|
36
|
+
|
|
37
|
+
## Instructions
|
|
38
|
+
|
|
39
|
+
### Step 1: Analyze the Response
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
ekkOS_Reflect({
|
|
43
|
+
user_query: "Original user question",
|
|
44
|
+
response: "Your complete response",
|
|
45
|
+
context: {
|
|
46
|
+
patterns_used: 3,
|
|
47
|
+
session_id: "...",
|
|
48
|
+
model: "claude-opus-4-5"
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Response:
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"quality_score": 8.5,
|
|
57
|
+
"improvement_opportunities": [
|
|
58
|
+
"Could have included error handling example",
|
|
59
|
+
"Solution was correct but verbose"
|
|
60
|
+
],
|
|
61
|
+
"pattern_suggestions": [
|
|
62
|
+
{
|
|
63
|
+
"title": "Concise error handling patterns",
|
|
64
|
+
"reason": "Response could be more concise"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"positive_aspects": [
|
|
68
|
+
"Correct solution",
|
|
69
|
+
"Good explanation of trade-offs"
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Step 2: Record Outcomes
|
|
75
|
+
|
|
76
|
+
For each pattern that was applied:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
ekkOS_Outcome({
|
|
80
|
+
success: true, // or false
|
|
81
|
+
model_used: "claude-opus-4-5"
|
|
82
|
+
})
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
This updates the pattern's success rate.
|
|
86
|
+
|
|
87
|
+
### Step 3: Forge Improvements
|
|
88
|
+
|
|
89
|
+
If reflection reveals a better approach:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
ekkOS_Forge({
|
|
93
|
+
title: "Concise error handling in async functions",
|
|
94
|
+
problem: "Error handling code is often verbose and repetitive",
|
|
95
|
+
solution: "Use wrapper function: const safe = (fn) => async (...args) => { try { return await fn(...args); } catch (e) { handleError(e); } }",
|
|
96
|
+
tags: ["improvement", "reflection", "error-handling"]
|
|
97
|
+
})
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Example Scenarios
|
|
101
|
+
|
|
102
|
+
### Scenario 1: User Feedback - Positive
|
|
103
|
+
```
|
|
104
|
+
User: "Perfect, that's exactly what I needed!"
|
|
105
|
+
|
|
106
|
+
You: *Reflect on what made it good*
|
|
107
|
+
|
|
108
|
+
ekkOS_Outcome({ success: true })
|
|
109
|
+
|
|
110
|
+
ekkOS_Reflect({
|
|
111
|
+
response: "...",
|
|
112
|
+
user_query: "..."
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
Analysis: Pattern #auth-jwt-123 was applied, user confirmed success.
|
|
116
|
+
|
|
117
|
+
"Glad it helped! I've recorded that this approach works well.
|
|
118
|
+
It'll be even faster to help with similar issues next time."
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Scenario 2: User Feedback - Needs Improvement
|
|
122
|
+
```
|
|
123
|
+
User: "This works but it's way too complicated"
|
|
124
|
+
|
|
125
|
+
You: *Reflect on the complexity issue*
|
|
126
|
+
|
|
127
|
+
ekkOS_Outcome({ success: false }) // Partially failed
|
|
128
|
+
|
|
129
|
+
ekkOS_Reflect({
|
|
130
|
+
response: "...",
|
|
131
|
+
user_query: "..."
|
|
132
|
+
})
|
|
133
|
+
|
|
134
|
+
Analysis: Solution was correct but overly complex.
|
|
135
|
+
|
|
136
|
+
"You're right, let me simplify:
|
|
137
|
+
|
|
138
|
+
[Simpler solution]
|
|
139
|
+
|
|
140
|
+
I've noted that simpler solutions are preferred.
|
|
141
|
+
|
|
142
|
+
ekkOS_Forge({
|
|
143
|
+
title: 'Prefer simple solutions over comprehensive ones',
|
|
144
|
+
problem: 'Tendency to over-engineer solutions',
|
|
145
|
+
solution: 'Start with minimal implementation, add complexity only when needed',
|
|
146
|
+
tags: ['meta', 'style', 'simplicity']
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
This preference is now saved."
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Scenario 3: Post-Task Reflection
|
|
153
|
+
```
|
|
154
|
+
*After completing a complex debugging session*
|
|
155
|
+
|
|
156
|
+
You: "Let me reflect on this debugging session...
|
|
157
|
+
|
|
158
|
+
ekkOS_Reflect({
|
|
159
|
+
response: 'Full debugging process and solution',
|
|
160
|
+
user_query: 'Original bug report'
|
|
161
|
+
})
|
|
162
|
+
|
|
163
|
+
📊 Session Analysis:
|
|
164
|
+
|
|
165
|
+
✅ What worked:
|
|
166
|
+
- Systematic elimination of causes
|
|
167
|
+
- Using git bisect to find regression
|
|
168
|
+
- Checking logs before guessing
|
|
169
|
+
|
|
170
|
+
⚠️ Could improve:
|
|
171
|
+
- Took 3 attempts before checking logs
|
|
172
|
+
- Should have reproduced issue first
|
|
173
|
+
|
|
174
|
+
💡 Key insight to remember:
|
|
175
|
+
'Always reproduce the bug in isolation first'
|
|
176
|
+
|
|
177
|
+
ekkOS_Forge({
|
|
178
|
+
title: 'Reproduce bug before debugging',
|
|
179
|
+
problem: 'Jumping into debugging without reproduction wastes time',
|
|
180
|
+
solution: 'First step: create minimal reproduction case',
|
|
181
|
+
tags: ['debugging', 'methodology', 'reflection']
|
|
182
|
+
})
|
|
183
|
+
|
|
184
|
+
This insight is now saved for future debugging sessions."
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Scenario 4: Pattern Quality Check
|
|
188
|
+
```
|
|
189
|
+
*After applying a pattern that didn't work*
|
|
190
|
+
|
|
191
|
+
You: *Pattern #db-query-123 was applied but query failed*
|
|
192
|
+
|
|
193
|
+
ekkOS_Outcome({ success: false })
|
|
194
|
+
|
|
195
|
+
"That pattern didn't work for this case. Let me update it...
|
|
196
|
+
|
|
197
|
+
ekkOS_Search({
|
|
198
|
+
query: 'db-query-123',
|
|
199
|
+
sources: ['patterns']
|
|
200
|
+
})
|
|
201
|
+
|
|
202
|
+
Found: 'Use LIMIT for pagination'
|
|
203
|
+
Current success rate: 85%
|
|
204
|
+
|
|
205
|
+
The pattern is generally good but doesn't handle
|
|
206
|
+
offset-based pagination with large tables.
|
|
207
|
+
|
|
208
|
+
ekkOS_Forge({
|
|
209
|
+
title: 'Use cursor-based pagination for large tables',
|
|
210
|
+
problem: 'OFFSET pagination slows down on large datasets',
|
|
211
|
+
solution: 'Use WHERE id > last_id ORDER BY id LIMIT n',
|
|
212
|
+
works_when: ['table > 100k rows', 'pagination needed'],
|
|
213
|
+
anti_patterns: ['Using OFFSET with large datasets']
|
|
214
|
+
})
|
|
215
|
+
|
|
216
|
+
Added a more specific pattern for this case."
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
## Reflection Questions
|
|
220
|
+
|
|
221
|
+
Ask yourself after responses:
|
|
222
|
+
|
|
223
|
+
1. **Did the applied patterns help?**
|
|
224
|
+
- Yes → `ekkOS_Outcome({ success: true })`
|
|
225
|
+
- No → `ekkOS_Outcome({ success: false })`
|
|
226
|
+
|
|
227
|
+
2. **Was the response quality good?**
|
|
228
|
+
- Run `ekkOS_Reflect` to analyze
|
|
229
|
+
|
|
230
|
+
3. **What would I do differently?**
|
|
231
|
+
- Forge the improvement as a new pattern
|
|
232
|
+
|
|
233
|
+
4. **Did I learn something new?**
|
|
234
|
+
- Forge it immediately
|
|
235
|
+
|
|
236
|
+
## Integration with Learning
|
|
237
|
+
|
|
238
|
+
Reflection feeds back into the Golden Loop:
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
Response → Reflect → Improve Patterns → Better Future Responses
|
|
242
|
+
↑ ↓
|
|
243
|
+
└────────────────────────────────────────────┘
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## Success Metrics
|
|
247
|
+
|
|
248
|
+
You're using this skill correctly when:
|
|
249
|
+
- Pattern success rates are accurate
|
|
250
|
+
- Improvements are forged after corrections
|
|
251
|
+
- Response quality increases over time
|
|
252
|
+
- You proactively reflect, not just when asked
|
|
253
|
+
- The memory system gets demonstrably smarter
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
**Mantra**: Every response is a learning opportunity. Reflect. Record. Improve.
|