@ekkos/cli 1.0.34 → 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.
Files changed (44) hide show
  1. package/dist/capture/jsonl-rewriter.js +72 -7
  2. package/dist/commands/dashboard.js +186 -557
  3. package/dist/commands/init.js +3 -15
  4. package/dist/commands/run.js +222 -256
  5. package/dist/commands/setup.js +0 -47
  6. package/dist/commands/swarm-dashboard.js +4 -13
  7. package/dist/deploy/instructions.d.ts +2 -5
  8. package/dist/deploy/instructions.js +8 -11
  9. package/dist/deploy/settings.js +21 -15
  10. package/dist/deploy/skills.d.ts +0 -8
  11. package/dist/deploy/skills.js +0 -26
  12. package/dist/index.js +2 -2
  13. package/dist/lib/usage-parser.js +1 -2
  14. package/dist/utils/platform.d.ts +0 -3
  15. package/dist/utils/platform.js +1 -4
  16. package/dist/utils/session-binding.d.ts +1 -1
  17. package/dist/utils/session-binding.js +2 -3
  18. package/package.json +1 -1
  19. package/templates/agents/README.md +182 -0
  20. package/templates/agents/code-reviewer.md +166 -0
  21. package/templates/agents/debug-detective.md +169 -0
  22. package/templates/agents/ekkOS_Vercel.md +99 -0
  23. package/templates/agents/extension-manager.md +229 -0
  24. package/templates/agents/git-companion.md +185 -0
  25. package/templates/agents/github-test-agent.md +321 -0
  26. package/templates/agents/railway-manager.md +179 -0
  27. package/templates/hooks/assistant-response.ps1 +26 -94
  28. package/templates/hooks/lib/count-tokens.cjs +0 -0
  29. package/templates/hooks/lib/ekkos-reminders.sh +0 -0
  30. package/templates/hooks/session-start.ps1 +224 -61
  31. package/templates/hooks/session-start.sh +1 -1
  32. package/templates/hooks/stop.ps1 +249 -103
  33. package/templates/hooks/stop.sh +1 -1
  34. package/templates/hooks/user-prompt-submit.ps1 +519 -129
  35. package/templates/hooks/user-prompt-submit.sh +2 -2
  36. package/templates/plan-template.md +0 -0
  37. package/templates/spec-template.md +0 -0
  38. package/templates/windsurf-hooks/before-submit-prompt.sh +238 -0
  39. package/templates/windsurf-hooks/install.sh +0 -0
  40. package/templates/windsurf-hooks/lib/contract.sh +0 -0
  41. package/templates/windsurf-hooks/post-cascade-response.sh +0 -0
  42. package/templates/windsurf-hooks/pre-user-prompt.sh +0 -0
  43. package/templates/windsurf-skills/ekkos-memory/SKILL.md +219 -0
  44. package/README.md +0 -57
@@ -108,7 +108,7 @@ if [ -f "$EKKOS_CONFIG" ] && [ -f "$JSON_PARSE_HELPER" ]; then
108
108
  fi
109
109
  [ -z "$AUTH_TOKEN" ] && AUTH_TOKEN=$(grep -E "^SUPABASE_SECRET_KEY=" "$PROJECT_ROOT/.env.local" 2>/dev/null | cut -d'=' -f2- | tr -d '"' | tr -d "'" || echo "")
110
110
 
111
- MEMORY_API_URL="https://mcp.ekkos.dev"
111
+ MEMORY_API_URL="https://api.ekkos.dev"
112
112
 
113
113
  # ═══════════════════════════════════════════════════════════════════════════
114
114
  # Session ID
@@ -327,7 +327,7 @@ const body = JSON.stringify({
327
327
  pendingSession: process.argv[4]
328
328
  });
329
329
  const req = https.request({
330
- hostname: 'mcp.ekkos.dev',
330
+ hostname: 'api.ekkos.dev',
331
331
  path: '/proxy/session/bind',
332
332
  method: 'POST',
333
333
  headers: {'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(body)}
File without changes
File without changes
@@ -0,0 +1,238 @@
1
+ #!/bin/bash
2
+ # ═══════════════════════════════════════════════════════════════════════════
3
+ # ekkOS_ Hook: BeforeSubmitPrompt (Windsurf Cascade) - RETRIEVE + INJECT + CONTRACT
4
+ #
5
+ # ARCHITECTURE: Dumb Hook, Smart Backend
6
+ # ═══════════════════════════════════════════════════════════════════════════
7
+ # This hook runs BEFORE the prompt is sent to the AI.
8
+ # It is THE CANONICAL retrieval path for Windsurf.
9
+ #
10
+ # GOLDEN LOOP ENFORCEMENT:
11
+ # - Writes turn contract as evidence of retrieval
12
+ # - In STRICT mode, returns continue=false to block turn
13
+ # - Lists pattern IDs explicitly for PatternGuard validation
14
+ # ═══════════════════════════════════════════════════════════════════════════
15
+
16
+ set +e # Don't exit on errors - be bulletproof
17
+
18
+ # Get project root
19
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
20
+ PROJECT_ROOT="$(dirname "$(dirname "$SCRIPT_DIR")")"
21
+ STATE_DIR="$PROJECT_ROOT/.windsurf/state"
22
+ mkdir -p "$STATE_DIR" 2>/dev/null || true
23
+
24
+ # Load turn contract library
25
+ if [ -f "$SCRIPT_DIR/lib/contract.sh" ]; then
26
+ source "$SCRIPT_DIR/lib/contract.sh" 2>/dev/null || true
27
+ fi
28
+
29
+ # Fallback functions if library didn't load
30
+ if ! command -v write_turn_contract >/dev/null 2>&1; then
31
+ write_turn_contract() { return 0; }
32
+ fi
33
+ if ! command -v generate_query_hash >/dev/null 2>&1; then
34
+ generate_query_hash() { echo "$(date +%s)"; }
35
+ fi
36
+ if ! command -v is_strict_mode >/dev/null 2>&1; then
37
+ is_strict_mode() { [ "${EKKOS_STRICT:-0}" = "1" ]; }
38
+ fi
39
+ if ! command -v get_strict_blocker_message >/dev/null 2>&1; then
40
+ get_strict_blocker_message() { echo "⛔ EKKOS_STRICT: Retrieval failed - DO NOT ANSWER"; }
41
+ fi
42
+
43
+ # Read JSON input from stdin
44
+ INPUT=$(cat)
45
+
46
+ # Extract prompt text and session info
47
+ PROMPT_TEXT=$(echo "$INPUT" | jq -r '.prompt // .text // ""' 2>/dev/null || echo "")
48
+ SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // .conversation_id // ""' 2>/dev/null || echo "")
49
+ MODEL_INFO=$(echo "$INPUT" | jq -r '.model // ""' 2>/dev/null || echo "")
50
+
51
+ # Generate session ID if not provided
52
+ if [ -z "$SESSION_ID" ] || [ "$SESSION_ID" = "null" ]; then
53
+ SESSION_ID="windsurf-$(date +%s)-$$"
54
+ fi
55
+
56
+ # Skip if empty
57
+ if [ -z "$PROMPT_TEXT" ] || [ "$PROMPT_TEXT" = "null" ]; then
58
+ echo '{"continue": true}'
59
+ exit 0
60
+ fi
61
+
62
+ # Generate query hash for contract
63
+ QUERY_HASH=$(generate_query_hash "$PROMPT_TEXT")
64
+
65
+ # ═══════════════════════════════════════════════════════════════════════════
66
+ # Load auth token - PORTABLE: Check 3 sources in priority order
67
+ # ═══════════════════════════════════════════════════════════════════════════
68
+ EKKOS_CONFIG="$HOME/.ekkos/config.json"
69
+ AUTH_TOKEN=""
70
+ USER_ID=""
71
+
72
+ # 1. First try ~/.ekkos/config.json (set by VS Code extension - most portable)
73
+ # Prefer hookApiKey (scoped key for hooks) over apiKey (legacy)
74
+ if [ -f "$EKKOS_CONFIG" ]; then
75
+ AUTH_TOKEN=$(jq -r '.hookApiKey // .apiKey // ""' "$EKKOS_CONFIG" 2>/dev/null || echo "")
76
+ USER_ID=$(jq -r '.userId // ""' "$EKKOS_CONFIG" 2>/dev/null || echo "")
77
+ fi
78
+
79
+ # 2. Then try project .env.local (for developers)
80
+ if [ -z "$AUTH_TOKEN" ] && [ -f "$PROJECT_ROOT/.env.local" ]; then
81
+ AUTH_TOKEN=$(grep -E "^SUPABASE_SECRET_KEY=" "$PROJECT_ROOT/.env.local" | cut -d'=' -f2- | tr -d '"' | tr -d "'" | tr -d '\r')
82
+ fi
83
+
84
+ # 3. Finally try environment variable
85
+ if [ -z "$AUTH_TOKEN" ]; then
86
+ AUTH_TOKEN="${SUPABASE_SECRET_KEY:-}"
87
+ fi
88
+
89
+ # Track retrieval status
90
+ RETRIEVAL_OK="false"
91
+ RETRIEVED_PATTERN_IDS=""
92
+ RETRIEVED_DIRECTIVE_IDS=""
93
+
94
+ # Skip if no auth
95
+ if [ -z "$AUTH_TOKEN" ]; then
96
+ # STRICT MODE: Block turn if no auth
97
+ if is_strict_mode; then
98
+ BLOCKER_MSG=$(get_strict_blocker_message)
99
+ write_turn_contract "$SESSION_ID" "false" "windsurf" "" "" "$QUERY_HASH" "$PROJECT_ROOT"
100
+ echo "{\"continue\": false, \"user_message\": $(echo "$BLOCKER_MSG" | jq -R -s .)}"
101
+ exit 0
102
+ fi
103
+
104
+ write_turn_contract "$SESSION_ID" "false" "windsurf" "" "" "$QUERY_HASH" "$PROJECT_ROOT"
105
+ echo '{"continue": true, "user_message": "[ekkOS] No auth token. Run ekkOS: Connect in VS Code."}'
106
+ exit 0
107
+ fi
108
+
109
+ # Cloud API
110
+ MEMORY_API_URL="https://mcp.ekkos.dev"
111
+
112
+ # ═══════════════════════════════════════════════════════════════════════════
113
+ # [ekkOS_RETRIEVE] Search memory for patterns (all 8 queryable layers)
114
+ # ═══════════════════════════════════════════════════════════════════════════
115
+ JSON_PAYLOAD=$(jq -n \
116
+ --arg query "$PROMPT_TEXT" \
117
+ --arg user_id "${USER_ID:-system}" \
118
+ --arg session "windsurf-$SESSION_ID" \
119
+ '{
120
+ query: $query,
121
+ user_id: $user_id,
122
+ session_id: $session,
123
+ max_per_layer: 5,
124
+ include_layers: ["working", "episodic", "semantic", "patterns", "procedural", "collective", "codebase", "directives"],
125
+ metadata: { source: "windsurf-cascade-hook" }
126
+ }' 2>/dev/null || echo '{}')
127
+
128
+ API_RESPONSE=$(curl -s -X POST "$MEMORY_API_URL/api/v1/context/retrieve" \
129
+ -H "Authorization: Bearer $AUTH_TOKEN" \
130
+ -H "Content-Type: application/json" \
131
+ -d "$JSON_PAYLOAD" \
132
+ --connect-timeout 3 \
133
+ --max-time 5 2>/dev/null || echo '{"error":"timeout"}')
134
+
135
+ # Check if retrieval succeeded
136
+ if echo "$API_RESPONSE" | jq -e '.layers' >/dev/null 2>&1; then
137
+ RETRIEVAL_OK="true"
138
+ else
139
+ # STRICT MODE: Block turn if retrieval failed
140
+ if is_strict_mode; then
141
+ BLOCKER_MSG=$(get_strict_blocker_message)
142
+ write_turn_contract "$SESSION_ID" "false" "windsurf" "" "" "$QUERY_HASH" "$PROJECT_ROOT"
143
+ echo "{\"continue\": false, \"user_message\": $(echo "$BLOCKER_MSG" | jq -R -s .)}"
144
+ exit 0
145
+ fi
146
+
147
+ API_RESPONSE='{"error":"timeout","formatted_context":"","layers":{"patterns":[],"directives":[]}}'
148
+ fi
149
+
150
+ # Extract counts
151
+ PATTERN_COUNT=$(echo "$API_RESPONSE" | jq '.layers.patterns // [] | length' 2>/dev/null || echo "0")
152
+ DIRECTIVE_COUNT=$(echo "$API_RESPONSE" | jq '.layers.directives // [] | length' 2>/dev/null || echo "0")
153
+ TOTAL_COUNT=$((PATTERN_COUNT + DIRECTIVE_COUNT))
154
+
155
+ # Extract pattern and directive IDs for turn contract
156
+ RETRIEVED_PATTERN_IDS=$(echo "$API_RESPONSE" | jq -r '.layers.patterns // [] | map(.pattern_id // .id) | join(",")' 2>/dev/null || echo "")
157
+ RETRIEVED_DIRECTIVE_IDS=$(echo "$API_RESPONSE" | jq -r '.layers.directives // [] | map(.directive_id // .id) | join(",")' 2>/dev/null || echo "")
158
+
159
+ # ═══════════════════════════════════════════════════════════════════════════
160
+ # [ekkOS_CONTRACT] Write turn contract as evidence of retrieval
161
+ # ═══════════════════════════════════════════════════════════════════════════
162
+ write_turn_contract "$SESSION_ID" "$RETRIEVAL_OK" "windsurf" "$RETRIEVED_PATTERN_IDS" "$RETRIEVED_DIRECTIVE_IDS" "$QUERY_HASH" "$PROJECT_ROOT"
163
+
164
+ # Save session ID to state file
165
+ echo "$SESSION_ID" > "$STATE_DIR/current_session_id.txt" 2>/dev/null || true
166
+
167
+ # ═══════════════════════════════════════════════════════════════════════════
168
+ # [ekkOS_INJECT] Build user message with patterns
169
+ # ═══════════════════════════════════════════════════════════════════════════
170
+ if [ "$PATTERN_COUNT" -gt 0 ]; then
171
+ # Get formatted context
172
+ FORMATTED=$(echo "$API_RESPONSE" | jq -r '.formatted_context // ""' 2>/dev/null)
173
+
174
+ # Get pattern IDs for PatternGuard
175
+ PATTERN_ID_LIST=$(echo "$API_RESPONSE" | jq -r '.layers.patterns[:5][] | .pattern_id // .id' 2>/dev/null || echo "")
176
+
177
+ if [ -n "$FORMATTED" ] && [ "$FORMATTED" != "null" ]; then
178
+ MESSAGE="━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
179
+ 🧠 ekkOS™ Memory Substrate
180
+ ✓ $PATTERN_COUNT patterns loaded from memory
181
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
182
+
183
+ $FORMATTED
184
+
185
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
186
+ ⚠️ PATTERNGUARD REQUIRED
187
+
188
+ You MUST acknowledge ALL $PATTERN_COUNT pattern(s) above.
189
+
190
+ Pattern IDs to acknowledge:
191
+ $PATTERN_ID_LIST
192
+
193
+ For patterns you USE:
194
+ [ekkOS_SELECT]
195
+ - id: <pattern-uuid>
196
+ reason: <why using>
197
+ confidence: <0.0-1.0>
198
+ [/ekkOS_SELECT]
199
+
200
+ For patterns you DO NOT use:
201
+ [ekkOS_SKIP]
202
+ - id: <pattern-uuid>
203
+ reason: <why not relevant>
204
+ [/ekkOS_SKIP]
205
+
206
+ Coverage MUST be 100% (all IDs acknowledged).
207
+
208
+ RESPONSE FORMAT: End with:
209
+ 🧠 **ekkOS_™** · 📅 YYYY-MM-DD H:MM AM/PM TZ
210
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
211
+ else
212
+ # Fallback: minimal injection
213
+ MESSAGE="━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
214
+ 🧠 ekkOS™: $PATTERN_COUNT patterns found
215
+
216
+ Pattern IDs to acknowledge with [ekkOS_SELECT] or [ekkOS_SKIP]:
217
+ $PATTERN_ID_LIST
218
+
219
+ End response with: 🧠 **ekkOS_™** · 📅 YYYY-MM-DD
220
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
221
+ fi
222
+
223
+ # Save patterns for capture
224
+ echo "$API_RESPONSE" | jq '.layers.patterns // []' > "$STATE_DIR/patterns-${SESSION_ID}.json" 2>/dev/null || true
225
+
226
+ echo "{\"continue\": true, \"user_message\": $(echo "$MESSAGE" | jq -R -s .)}" | jq -c .
227
+ else
228
+ # No patterns - still write contract and remind about footer
229
+ MESSAGE="━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
230
+ 🧠 ekkOS™: No patterns found (new territory)
231
+
232
+ End response with: 🧠 **ekkOS_™** · 📅 YYYY-MM-DD
233
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
234
+
235
+ echo "{\"continue\": true, \"user_message\": $(echo "$MESSAGE" | jq -R -s .)}" | jq -c .
236
+ fi
237
+
238
+ exit 0
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,219 @@
1
+ ---
2
+ title: ekkOS Memory System
3
+ description: AI-native cognitive memory with 31 MCP tools for persistent learning and context continuity
4
+ trigger: always_on
5
+ author: ekkOS Technologies
6
+ tags: [memory, patterns, learning, context]
7
+ ---
8
+
9
+ # ekkOS Memory System Skill
10
+
11
+ This skill enables Cascade to leverage the full ekkOS 11-layer cognitive memory system for persistent learning, pattern recognition, and context continuity across sessions.
12
+
13
+ ## When to Use This Skill
14
+
15
+ **ALWAYS USE** for:
16
+ - Technical questions (before answering, search memory)
17
+ - Bug fixes (forge patterns after solving)
18
+ - Architecture decisions (check for existing patterns)
19
+ - Code reviews (retrieve relevant patterns)
20
+ - Refactoring (find proven approaches)
21
+
22
+ ## Core Workflow
23
+
24
+ ### 1. Search Before Answering (MANDATORY)
25
+
26
+ ```
27
+ Before answering ANY technical question:
28
+
29
+ 1. Call ekkOS_Search with the query
30
+ 2. Review retrieved patterns
31
+ 3. Acknowledge ALL patterns with [ekkOS_SELECT] or [ekkOS_SKIP]
32
+ 4. THEN provide your answer
33
+ ```
34
+
35
+ ### 2. PatternGuard Acknowledgment
36
+
37
+ For every pattern retrieved, you MUST acknowledge it:
38
+
39
+ ```
40
+ [ekkOS_SELECT]
41
+ - id: <pattern-uuid>
42
+ reason: Using this because...
43
+ confidence: 0.95
44
+ [/ekkOS_SELECT]
45
+
46
+ [ekkOS_SKIP]
47
+ - id: <pattern-uuid>
48
+ reason: Not relevant because...
49
+ [/ekkOS_SKIP]
50
+ ```
51
+
52
+ **Coverage must be 100%** - every pattern ID must be acknowledged.
53
+
54
+ ### 3. Forge What You Learn
55
+
56
+ After fixing bugs, solving problems, or discovering gotchas:
57
+
58
+ ```
59
+ Call ekkOS_Forge with:
60
+ - Problem: What was broken
61
+ - Solution: How you fixed it
62
+ - Tags: [language, framework, error-type]
63
+ ```
64
+
65
+ ## MCP Tools Reference
66
+
67
+ ### Core Memory (8 tools)
68
+
69
+ | Tool | Purpose | When to Use |
70
+ |------|---------|-------------|
71
+ | `ekkOS_Search` | Search all 11 memory layers | **Before EVERY technical answer** |
72
+ | `ekkOS_Context` | Get relevant task context | When starting multi-step tasks |
73
+ | `ekkOS_Capture` | Capture memory events | Log significant actions |
74
+ | `ekkOS_Forge` | Create patterns from solutions | After fixing bugs/discoveries |
75
+ | `ekkOS_Directive` | Create MUST/NEVER/PREFER/AVOID rules | When user states preferences |
76
+ | `ekkOS_Outcome` | Track success/failure | After applying patterns |
77
+ | `ekkOS_Detect` | Auto-detect pattern usage | In responses |
78
+ | `ekkOS_Recall` | Recall past conversations | When user asks "what did we" |
79
+
80
+ ### Schema Awareness (2 tools)
81
+
82
+ | Tool | Purpose | When to Use |
83
+ |------|---------|-------------|
84
+ | `ekkOS_IndexSchema` | Index database schemas | With Supabase/Prisma projects |
85
+ | `ekkOS_GetSchema` | Get specific table schema | When writing queries |
86
+
87
+ ### Plan Management (9 tools)
88
+
89
+ | Tool | Purpose | When to Use |
90
+ |------|---------|-------------|
91
+ | `ekkOS_Plan` | Create structured plans | Multi-step features |
92
+ | `ekkOS_Generate` | AI-generate plans | Complex tasks |
93
+ | `ekkOS_PlanStatus` | Update plan status | Marking steps complete |
94
+ | `ekkOS_PlanStep` | Mark step done | Step completion |
95
+ | `ekkOS_SaveTemplate` | Save as template | Reusable workflows |
96
+ | `ekkOS_Templates` | List templates | Finding existing plans |
97
+ | `ekkOS_FromTemplate` | Create from template | Starting from template |
98
+
99
+ ### Portability & Secrets (8 tools)
100
+
101
+ | Tool | Purpose | When to Use |
102
+ |------|---------|-------------|
103
+ | `ekkOS_Export` | Export as backup | Before major changes |
104
+ | `ekkOS_Import` | Import from backup | Restoring context |
105
+ | `ekkOS_StoreSecret` | Encrypt credentials | Storing API keys |
106
+ | `ekkOS_GetSecret` | Retrieve secrets | Using stored credentials |
107
+ | `ekkOS_ListSecrets` | List secret metadata | Checking what's stored |
108
+ | `ekkOS_RotateSecret` | Rotate secret values | Key rotation |
109
+
110
+ ### System Health (4 tools)
111
+
112
+ | Tool | Purpose | When to Use |
113
+ |------|---------|-------------|
114
+ | `ekkOS_Stats` | Get layer statistics | Health checks |
115
+ | `ekkOS_Summary` | Get activity summary | Progress updates |
116
+ | `ekkOS_Conflict` | Check for conflicts | Before dangerous ops |
117
+ | `ekkOS_Reflect` | Analyze for improvements | Post-task review |
118
+
119
+ ## 11-Layer Architecture
120
+
121
+ | Layer | Purpose | Example Content |
122
+ |-------|---------|-----------------|
123
+ | 1 | Working | Current session context |
124
+ | 2 | Episodic | Past conversation turns |
125
+ | 3 | Semantic | Embeddings/vectors |
126
+ | 4 | Patterns | Proven solutions |
127
+ | 5 | Procedural | Step-by-step guides |
128
+ | 6 | Collective | Community patterns |
129
+ | 7 | Meta | Pattern effectiveness |
130
+ | 8 | Codebase | Project code context |
131
+ | 9 | Directives | User rules (MUST/NEVER) |
132
+ | 10 | Conflict | Auto-resolution rules |
133
+ | 11 | Secrets | Encrypted credentials |
134
+
135
+ ## Forge Triggers
136
+
137
+ **Always forge when you:**
138
+ - Fix a bug (create anti-pattern from the bug)
139
+ - Find a better approach (update existing pattern)
140
+ - Discover a gotcha (create warning pattern)
141
+ - Get corrected by user (learn from correction)
142
+ - Solve auth/config issues (create setup pattern)
143
+ - Make architecture decisions (document rationale)
144
+ - Debug non-trivially (capture the journey)
145
+
146
+ ## Response Format
147
+
148
+ End EVERY response with:
149
+
150
+ ```
151
+ 🧠 **ekkOS_™** · 📅 YYYY-MM-DD H:MM AM/PM TZ
152
+ ```
153
+
154
+ ## Examples
155
+
156
+ ### Example 1: Technical Question
157
+
158
+ User: "How do I fix CORS in Next.js?"
159
+
160
+ Your workflow:
161
+ 1. Call `ekkOS_Search` with query: "Next.js CORS fix"
162
+ 2. Review retrieved patterns
163
+ 3. Acknowledge all patterns with SELECT/SKIP
164
+ 4. Provide answer based on patterns + your knowledge
165
+ 5. End with footer
166
+
167
+ ### Example 2: Bug Fix
168
+
169
+ User: "The build is failing with this error..."
170
+
171
+ Your workflow:
172
+ 1. Call `ekkOS_Search` with error message
173
+ 2. Apply relevant patterns
174
+ 3. Acknowledge with SELECT
175
+ 4. Fix the bug
176
+ 5. Call `ekkOS_Forge` with the solution
177
+ 6. Call `ekkOS_Outcome` to track success
178
+
179
+ ### Example 3: User Preference
180
+
181
+ User: "I always want TypeScript strict mode"
182
+
183
+ Your workflow:
184
+ 1. Call `ekkOS_Directive`:
185
+ - type: PREFER
186
+ - rule: "Use TypeScript strict mode"
187
+ - scope: project
188
+ 2. Acknowledge in future responses
189
+
190
+ ## Best Practices
191
+
192
+ 1. **Search first** - Never answer without searching
193
+ 2. **Acknowledge all** - 100% PatternGuard coverage required
194
+ 3. **Forge immediately** - Don't wait to capture learnings
195
+ 4. **Track outcomes** - Success/failure feedback improves patterns
196
+ 5. **Use directives** - Convert user preferences to rules
197
+ 6. **Export regularly** - Backup before major changes
198
+ 7. **End with footer** - Every response needs the ekkOS footer
199
+
200
+ ## Troubleshooting
201
+
202
+ **"No patterns found"**
203
+ → You're in new territory. Forge what you discover.
204
+
205
+ **"Pattern retrieval failed"**
206
+ → Check auth: `~/.ekkos/config.json` should have hookApiKey
207
+
208
+ **"How do I continue from last session?"**
209
+ → Ask: "recall our last conversation" or "where were we"
210
+
211
+ ## Resources
212
+
213
+ - Website: https://ekkos.dev
214
+ - Docs: https://docs.ekkos.dev
215
+ - Support: support@ekkos.dev
216
+
217
+ ---
218
+
219
+ 🧠 **ekkOS_™** · Built for infinite context
package/README.md DELETED
@@ -1,57 +0,0 @@
1
- # @ekkos/cli
2
-
3
- Persistent cognitive memory for AI coding assistants. ekkOS gives Claude Code, Cursor, and Windsurf long-term memory — patterns, decisions, and operational intelligence that compound across every interaction.
4
-
5
- ## Quick Start
6
-
7
- ```bash
8
- # Install globally
9
- npm install -g @ekkos/cli
10
-
11
- # Authenticate and configure your IDE
12
- ekkos init
13
-
14
- # Launch Claude Code with memory
15
- ekkos run
16
- ```
17
-
18
- ## Commands
19
-
20
- | Command | Description |
21
- |---------|-------------|
22
- | `ekkos init` | Authenticate and configure your IDE (Claude Code, Cursor, Windsurf) |
23
- | `ekkos run` | Launch Claude Code with ekkOS memory connected |
24
- | `ekkos run --dashboard` | Launch with live metrics dashboard (tmux split) |
25
- | `ekkos status` | Check connection and memory health |
26
- | `ekkos dashboard` | Open the live session dashboard |
27
- | `ekkos export` | Export your patterns and memory as JSON |
28
- | `ekkos --help` | Show all commands |
29
-
30
- ## What It Does
31
-
32
- - **Remembers what works** — Patterns from successful solutions are recalled automatically
33
- - **Learns from mistakes** — Anti-patterns prevent repeating the same errors
34
- - **Crosses sessions** — Knowledge persists across conversations, projects, and tools
35
- - **Gets smarter over time** — Success rates compound as patterns are verified
36
-
37
- ## How It Works
38
-
39
- ekkOS installs hooks into your AI coding assistant that:
40
-
41
- 1. **Before each prompt** — Searches 11 memory layers for relevant patterns
42
- 2. **After each response** — Captures new solutions as reusable patterns
43
- 3. **Between sessions** — Preserves context through eviction and rehydration
44
-
45
- ## Requirements
46
-
47
- - Node.js >= 18
48
- - An ekkOS account ([platform.ekkos.dev](https://platform.ekkos.dev/signup))
49
- - One of: Claude Code, Cursor, Windsurf, or VS Code
50
-
51
- ## Documentation
52
-
53
- [docs.ekkos.dev](https://docs.ekkos.dev)
54
-
55
- ## License
56
-
57
- Proprietary — see [ekkos.dev/terms](https://ekkos.dev/terms)