@stackmemoryai/stackmemory 0.5.66 → 0.6.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.
Files changed (58) hide show
  1. package/README.md +139 -45
  2. package/bin/codex-sm +6 -0
  3. package/bin/opencode-sm +1 -1
  4. package/dist/src/cli/claude-sm.js +162 -25
  5. package/dist/src/cli/claude-sm.js.map +2 -2
  6. package/dist/src/cli/commands/ping.js +14 -0
  7. package/dist/src/cli/commands/ping.js.map +7 -0
  8. package/dist/src/cli/commands/ralph.js +103 -1
  9. package/dist/src/cli/commands/ralph.js.map +2 -2
  10. package/dist/src/cli/commands/retrieval.js +1 -1
  11. package/dist/src/cli/commands/retrieval.js.map +2 -2
  12. package/dist/src/cli/commands/skills.js +201 -6
  13. package/dist/src/cli/commands/skills.js.map +2 -2
  14. package/dist/src/cli/index.js +66 -27
  15. package/dist/src/cli/index.js.map +2 -2
  16. package/dist/src/core/digest/types.js +1 -1
  17. package/dist/src/core/digest/types.js.map +1 -1
  18. package/dist/src/core/extensions/provider-adapter.js +2 -5
  19. package/dist/src/core/extensions/provider-adapter.js.map +2 -2
  20. package/dist/src/core/retrieval/llm-provider.js +2 -2
  21. package/dist/src/core/retrieval/llm-provider.js.map +1 -1
  22. package/dist/src/core/retrieval/types.js +1 -1
  23. package/dist/src/core/retrieval/types.js.map +1 -1
  24. package/dist/src/features/sweep/pty-wrapper.js +15 -5
  25. package/dist/src/features/sweep/pty-wrapper.js.map +2 -2
  26. package/dist/src/features/workers/tmux-manager.js +71 -0
  27. package/dist/src/features/workers/tmux-manager.js.map +7 -0
  28. package/dist/src/features/workers/worker-registry.js +52 -0
  29. package/dist/src/features/workers/worker-registry.js.map +7 -0
  30. package/dist/src/integrations/linear/webhook-handler.js +82 -0
  31. package/dist/src/integrations/linear/webhook-handler.js.map +2 -2
  32. package/dist/src/integrations/mcp/server.js +16 -10
  33. package/dist/src/integrations/mcp/server.js.map +2 -2
  34. package/dist/src/integrations/ralph/patterns/oracle-worker-pattern.js +2 -2
  35. package/dist/src/integrations/ralph/patterns/oracle-worker-pattern.js.map +2 -2
  36. package/dist/src/orchestrators/multimodal/constants.js +1 -1
  37. package/dist/src/orchestrators/multimodal/constants.js.map +1 -1
  38. package/dist/src/orchestrators/multimodal/harness.js +28 -29
  39. package/dist/src/orchestrators/multimodal/harness.js.map +2 -2
  40. package/dist/src/orchestrators/multimodal/providers.js +35 -22
  41. package/dist/src/orchestrators/multimodal/providers.js.map +2 -2
  42. package/dist/src/skills/claude-skills.js +116 -1
  43. package/dist/src/skills/claude-skills.js.map +2 -2
  44. package/dist/src/skills/linear-task-runner.js +262 -0
  45. package/dist/src/skills/linear-task-runner.js.map +7 -0
  46. package/dist/src/skills/recursive-agent-orchestrator.js +114 -85
  47. package/dist/src/skills/recursive-agent-orchestrator.js.map +2 -2
  48. package/dist/src/skills/spec-generator-skill.js +441 -0
  49. package/dist/src/skills/spec-generator-skill.js.map +7 -0
  50. package/package.json +12 -5
  51. package/scripts/install-claude-hooks-auto.js +23 -9
  52. package/scripts/install-claude-hooks.sh +2 -2
  53. package/templates/claude-hooks/hooks.json +4 -2
  54. package/templates/claude-hooks/on-task-complete.js +91 -0
  55. package/templates/claude-hooks/post-edit-sweep.js +7 -10
  56. package/templates/claude-hooks/skill-eval.cjs +411 -0
  57. package/templates/claude-hooks/skill-eval.sh +31 -0
  58. package/templates/claude-hooks/skill-rules.json +274 -0
@@ -0,0 +1,274 @@
1
+ {
2
+ "$schema": "./skill-rules.schema.json",
3
+ "version": "2.0",
4
+ "config": {
5
+ "minConfidenceScore": 3,
6
+ "showMatchReasons": true,
7
+ "maxSkillsToShow": 5
8
+ },
9
+ "scoring": {
10
+ "keyword": 2,
11
+ "keywordPattern": 3,
12
+ "pathPattern": 4,
13
+ "directoryMatch": 5,
14
+ "intentPattern": 4,
15
+ "contentPattern": 3,
16
+ "contextPattern": 2
17
+ },
18
+ "directoryMappings": {
19
+ "src/core": "frame-management",
20
+ "src/cli": "cli-commands",
21
+ "src/integrations/linear": "linear-integration",
22
+ "src/integrations/mcp": "mcp-server",
23
+ "src/features/tui": "terminal-ui",
24
+ "src/core/context": "context-bridge",
25
+ "src/core/storage": "storage-tiers",
26
+ "src/core/tasks": "task-management",
27
+ ".claude": "claude-integration",
28
+ ".github/workflows": "github-actions",
29
+ "scripts": "build-scripts",
30
+ "docs": "documentation"
31
+ },
32
+ "skills": {
33
+ "frame-management": {
34
+ "description": "Frame stack and context management patterns",
35
+ "priority": 9,
36
+ "triggers": {
37
+ "keywords": ["frame", "stack", "context", "framemanager", "push", "pop"],
38
+ "keywordPatterns": ["\\bframe\\b", "\\bstack\\b", "context(?:Bridge)?"],
39
+ "pathPatterns": ["**/frame-*.ts", "**/context/*.ts", "**/stack-*.ts"],
40
+ "intentPatterns": [
41
+ "(?:manage|handle).*(?:frame|context)",
42
+ "(?:push|pop).*(?:frame|stack)"
43
+ ],
44
+ "contentPatterns": ["FrameManager", "pushFrame", "popFrame", "getContext"]
45
+ },
46
+ "relatedSkills": ["context-bridge", "storage-tiers"]
47
+ },
48
+ "linear-integration": {
49
+ "description": "Linear API integration and task sync",
50
+ "priority": 8,
51
+ "triggers": {
52
+ "keywords": ["linear", "issue", "sync", "task sync", "oauth"],
53
+ "keywordPatterns": ["\\blinear\\b", "\\bissue\\b", "sync.*task"],
54
+ "pathPatterns": ["**/linear/**", "**/linear-*.ts"],
55
+ "intentPatterns": [
56
+ "(?:sync|update).*(?:linear|issue)",
57
+ "(?:linear).*(?:task|issue|sync)"
58
+ ],
59
+ "contentPatterns": ["LinearClient", "syncIssue", "createIssue"]
60
+ }
61
+ },
62
+ "mcp-server": {
63
+ "description": "Model Context Protocol server implementation",
64
+ "priority": 8,
65
+ "triggers": {
66
+ "keywords": ["mcp", "tool", "server", "protocol", "claude code"],
67
+ "keywordPatterns": ["\\bmcp\\b", "model.context", "claude.code"],
68
+ "pathPatterns": ["**/mcp/**", "**/mcp-*.ts", "**/tools/**"],
69
+ "intentPatterns": [
70
+ "(?:implement|create).*(?:mcp|tool)",
71
+ "(?:mcp).*(?:server|tool|protocol)"
72
+ ],
73
+ "contentPatterns": ["MCPServer", "registerTool", "@tool", "toolCall"]
74
+ },
75
+ "relatedSkills": ["claude-integration"]
76
+ },
77
+ "testing-patterns": {
78
+ "description": "Jest testing and test infrastructure",
79
+ "priority": 7,
80
+ "triggers": {
81
+ "keywords": ["test", "jest", "spec", "mock", "fixture"],
82
+ "keywordPatterns": ["\\btest\\b", "\\bspec\\b", "\\bjest\\b"],
83
+ "pathPatterns": ["**/*.test.ts", "**/*.spec.ts", "**/__tests__/**"],
84
+ "intentPatterns": [
85
+ "(?:write|add|fix).*(?:test|spec)",
86
+ "(?:test).*(?:coverage|suite)"
87
+ ],
88
+ "contentPatterns": ["describe\\(", "it\\(", "expect\\(", "jest\\.mock"]
89
+ }
90
+ },
91
+ "cli-commands": {
92
+ "description": "CLI command implementation and structure",
93
+ "priority": 7,
94
+ "triggers": {
95
+ "keywords": ["cli", "command", "yargs", "terminal", "console"],
96
+ "keywordPatterns": ["\\bcli\\b", "\\bcommand\\b", "\\byargs\\b"],
97
+ "pathPatterns": ["**/cli/**", "**/commands/**", "**/cli-*.ts"],
98
+ "intentPatterns": [
99
+ "(?:add|create).*(?:command|cli)",
100
+ "(?:cli).*(?:command|option|argument)"
101
+ ],
102
+ "contentPatterns": ["yargs", "command\\(", "option\\(", "argv"]
103
+ }
104
+ },
105
+ "storage-tiers": {
106
+ "description": "3-tier storage system (Redis/Railway/GCS)",
107
+ "priority": 7,
108
+ "triggers": {
109
+ "keywords": ["storage", "redis", "railway", "bucket", "tier", "cache"],
110
+ "keywordPatterns": ["\\bstorage\\b", "\\btier\\b", "\\bredis\\b"],
111
+ "pathPatterns": ["**/storage/**", "**/railway-*.ts", "**/redis-*.ts"],
112
+ "intentPatterns": [
113
+ "(?:implement|configure).*(?:storage|tier)",
114
+ "(?:migrate).*(?:data|storage)"
115
+ ],
116
+ "contentPatterns": ["RailwayOptimizedStorage", "StorageTier", "Redis"]
117
+ }
118
+ },
119
+ "context-bridge": {
120
+ "description": "Cross-session context synchronization",
121
+ "priority": 8,
122
+ "triggers": {
123
+ "keywords": ["bridge", "sync", "session", "shared context", "handoff"],
124
+ "keywordPatterns": ["context.*bridge", "shared.*context", "handoff"],
125
+ "pathPatterns": ["**/context-bridge*.ts", "**/shared-context/**"],
126
+ "intentPatterns": [
127
+ "(?:sync|share).*(?:context|session)",
128
+ "(?:handoff).*(?:session|context)"
129
+ ],
130
+ "contentPatterns": ["ContextBridge", "SharedContext", "syncContext"]
131
+ },
132
+ "relatedSkills": ["frame-management"]
133
+ },
134
+ "task-management": {
135
+ "description": "Task creation, tracking, and persistence",
136
+ "priority": 7,
137
+ "triggers": {
138
+ "keywords": ["task", "todo", "progress", "tracking", "pebbles"],
139
+ "keywordPatterns": ["\\btask\\b", "\\btodo\\b", "pebbles"],
140
+ "pathPatterns": ["**/tasks/**", "**/task-*.ts", "**/pebbles-*.ts"],
141
+ "intentPatterns": [
142
+ "(?:create|manage).*(?:task|todo)",
143
+ "(?:track).*(?:progress|task)"
144
+ ],
145
+ "contentPatterns": ["TaskManager", "createTask", "updateTask", "PebblesTaskStore"]
146
+ }
147
+ },
148
+ "terminal-ui": {
149
+ "description": "Terminal UI with Ink and React",
150
+ "priority": 6,
151
+ "triggers": {
152
+ "keywords": ["tui", "terminal", "ink", "dashboard", "monitor"],
153
+ "keywordPatterns": ["\\btui\\b", "\\bink\\b", "terminal.*ui"],
154
+ "pathPatterns": ["**/tui/**", "**/terminal-*.tsx", "**/dashboard/**"],
155
+ "intentPatterns": [
156
+ "(?:create|build).*(?:tui|terminal)",
157
+ "(?:dashboard|monitor).*(?:ui|interface)"
158
+ ],
159
+ "contentPatterns": ["ink", "Text", "Box", "useInput"]
160
+ }
161
+ },
162
+ "claude-integration": {
163
+ "description": "Claude Code integration and hooks",
164
+ "priority": 8,
165
+ "triggers": {
166
+ "keywords": ["claude", "hook", "skill", "auto-trigger", "clear survival"],
167
+ "keywordPatterns": ["claude.*(?:code|hook)", "skill.*eval"],
168
+ "pathPatterns": [".claude/**", "**/claude-*.ts", "**/hooks/**"],
169
+ "intentPatterns": [
170
+ "(?:integrate|setup).*(?:claude)",
171
+ "(?:hook|trigger).*(?:claude|skill)"
172
+ ],
173
+ "contentPatterns": ["UserPromptSubmit", "PreToolUse", "PostToolUse", "skill-eval"]
174
+ },
175
+ "relatedSkills": ["mcp-server"]
176
+ },
177
+ "build-scripts": {
178
+ "description": "Build, deployment, and utility scripts",
179
+ "priority": 5,
180
+ "triggers": {
181
+ "keywords": ["script", "build", "deploy", "npm", "package"],
182
+ "keywordPatterns": ["\\bscript\\b", "\\bbuild\\b", "npm.*run"],
183
+ "pathPatterns": ["scripts/**", "**/*.sh", "**/build/**"],
184
+ "intentPatterns": [
185
+ "(?:create|write).*(?:script)",
186
+ "(?:build|deploy).*(?:project)"
187
+ ],
188
+ "contentPatterns": ["#!/bin/bash", "npm run", "NODE_ENV"]
189
+ }
190
+ },
191
+ "documentation": {
192
+ "description": "Documentation and API reference",
193
+ "priority": 4,
194
+ "triggers": {
195
+ "keywords": ["docs", "documentation", "readme", "api", "reference"],
196
+ "keywordPatterns": ["\\bdoc(?:s)?\\b", "readme", "api.*reference"],
197
+ "pathPatterns": ["docs/**", "**/*.md", "**/README*"],
198
+ "intentPatterns": [
199
+ "(?:write|update).*(?:doc|documentation)",
200
+ "(?:document).*(?:api|feature)"
201
+ ]
202
+ }
203
+ },
204
+ "github-actions": {
205
+ "description": "CI/CD workflows and GitHub Actions",
206
+ "priority": 6,
207
+ "triggers": {
208
+ "keywords": ["workflow", "action", "ci", "cd", "pipeline"],
209
+ "keywordPatterns": ["github.*action", "ci.*cd", "\\bworkflow\\b"],
210
+ "pathPatterns": [".github/workflows/**", ".github/**/*.yml"],
211
+ "intentPatterns": [
212
+ "(?:create|setup).*(?:workflow|pipeline)",
213
+ "(?:ci|cd).*(?:setup|configure)"
214
+ ],
215
+ "contentPatterns": ["runs-on:", "uses:", "steps:"]
216
+ }
217
+ },
218
+ "code-quality": {
219
+ "description": "Code review and quality checks",
220
+ "priority": 8,
221
+ "triggers": {
222
+ "keywords": ["review", "lint", "quality", "eslint", "prettier"],
223
+ "keywordPatterns": ["code.*review", "\\blint\\b", "quality.*check"],
224
+ "intentPatterns": [
225
+ "(?:review|check).*(?:code|quality)",
226
+ "(?:fix).*(?:lint|formatting)"
227
+ ]
228
+ }
229
+ },
230
+ "performance-optimization": {
231
+ "description": "Performance analysis and optimization",
232
+ "priority": 7,
233
+ "triggers": {
234
+ "keywords": ["performance", "optimize", "slow", "bottleneck", "profile"],
235
+ "keywordPatterns": ["\\bperf\\b", "optimiz", "bottleneck"],
236
+ "intentPatterns": [
237
+ "(?:optimize|improve).*(?:performance|speed)",
238
+ "(?:debug|fix).*(?:slow|performance)"
239
+ ],
240
+ "contentPatterns": ["performance\\.now", "console\\.time", "profiler"]
241
+ }
242
+ },
243
+ "spec-generator": {
244
+ "description": "Iterative spec document generation (one-pager, dev-spec, prompt-plan, agents)",
245
+ "priority": 8,
246
+ "triggers": {
247
+ "keywords": ["spec", "one-pager", "dev-spec", "prompt-plan", "agents.md", "scaffold"],
248
+ "keywordPatterns": ["\\bspec\\b", "one.pager", "dev.spec", "prompt.plan"],
249
+ "pathPatterns": ["docs/specs/**", "**/AGENTS.md", "**/ONE_PAGER.md", "**/PROMPT_PLAN.md"],
250
+ "intentPatterns": [
251
+ "(?:generate|create).*(?:spec|one-pager|dev-spec)",
252
+ "(?:spec).*(?:generate|validate|update|list)"
253
+ ],
254
+ "contentPatterns": ["SpecGeneratorSkill", "ONE_PAGER", "DEV_SPEC", "PROMPT_PLAN"]
255
+ },
256
+ "relatedSkills": ["linear-task-runner"]
257
+ },
258
+ "linear-task-runner": {
259
+ "description": "Execute Linear tasks via RLM orchestrator",
260
+ "priority": 8,
261
+ "triggers": {
262
+ "keywords": ["linear-run", "run task", "execute task", "task runner", "ralph linear"],
263
+ "keywordPatterns": ["linear.run", "run.*task", "task.*runner"],
264
+ "pathPatterns": ["**/linear-task-runner.ts"],
265
+ "intentPatterns": [
266
+ "(?:run|execute).*(?:linear|task)",
267
+ "(?:linear).*(?:run|execute|next|all)"
268
+ ],
269
+ "contentPatterns": ["LinearTaskRunner", "runNext", "runAll", "runTask"]
270
+ },
271
+ "relatedSkills": ["spec-generator", "linear-integration"]
272
+ }
273
+ }
274
+ }