@stackmemoryai/stackmemory 0.4.2 → 0.5.1

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 (49) hide show
  1. package/dist/cli/commands/ralph.js +305 -0
  2. package/dist/cli/commands/ralph.js.map +2 -2
  3. package/dist/cli/streamlined-cli.js +144 -0
  4. package/dist/cli/streamlined-cli.js.map +7 -0
  5. package/dist/core/events/event-bus.js +110 -0
  6. package/dist/core/events/event-bus.js.map +7 -0
  7. package/dist/core/plugins/plugin-interface.js +87 -0
  8. package/dist/core/plugins/plugin-interface.js.map +7 -0
  9. package/dist/core/storage/simplified-storage.js +328 -0
  10. package/dist/core/storage/simplified-storage.js.map +7 -0
  11. package/dist/integrations/claude-code/agent-bridge.js +764 -0
  12. package/dist/integrations/claude-code/agent-bridge.js.map +7 -0
  13. package/dist/integrations/claude-code/task-coordinator.js +356 -0
  14. package/dist/integrations/claude-code/task-coordinator.js.map +7 -0
  15. package/dist/integrations/ralph/bridge/ralph-stackmemory-bridge.js +33 -11
  16. package/dist/integrations/ralph/bridge/ralph-stackmemory-bridge.js.map +2 -2
  17. package/dist/integrations/ralph/monitoring/swarm-registry.js +10 -1
  18. package/dist/integrations/ralph/monitoring/swarm-registry.js.map +2 -2
  19. package/dist/integrations/ralph/patterns/compounding-engineering-pattern.js +396 -0
  20. package/dist/integrations/ralph/patterns/compounding-engineering-pattern.js.map +7 -0
  21. package/dist/integrations/ralph/patterns/extended-coherence-sessions.js +469 -0
  22. package/dist/integrations/ralph/patterns/extended-coherence-sessions.js.map +7 -0
  23. package/dist/integrations/ralph/patterns/oracle-worker-pattern.js +384 -0
  24. package/dist/integrations/ralph/patterns/oracle-worker-pattern.js.map +7 -0
  25. package/dist/integrations/ralph/swarm/git-workflow-manager.js +71 -18
  26. package/dist/integrations/ralph/swarm/git-workflow-manager.js.map +2 -2
  27. package/dist/integrations/ralph/swarm/swarm-coordinator.js +243 -49
  28. package/dist/integrations/ralph/swarm/swarm-coordinator.js.map +2 -2
  29. package/dist/plugins/linear/index.js +166 -0
  30. package/dist/plugins/linear/index.js.map +7 -0
  31. package/dist/plugins/loader.js +57 -0
  32. package/dist/plugins/loader.js.map +7 -0
  33. package/dist/plugins/plugin-interface.js +67 -0
  34. package/dist/plugins/plugin-interface.js.map +7 -0
  35. package/dist/plugins/ralph/simple-ralph-plugin.js +305 -0
  36. package/dist/plugins/ralph/simple-ralph-plugin.js.map +7 -0
  37. package/dist/plugins/ralph/use-cases/code-generator.js +151 -0
  38. package/dist/plugins/ralph/use-cases/code-generator.js.map +7 -0
  39. package/dist/plugins/ralph/use-cases/test-generator.js +201 -0
  40. package/dist/plugins/ralph/use-cases/test-generator.js.map +7 -0
  41. package/package.json +1 -8
  42. package/scripts/simple-swarm-demo.ts +114 -0
  43. package/scripts/test-ralph-iterations.ts +164 -0
  44. package/scripts/test-swarm-fixes.ts +161 -0
  45. package/scripts/testing/ab-test-runner.ts +4 -2
  46. package/scripts/testing/collect-metrics.ts +2 -2
  47. package/scripts/testing/real-performance-test.js +1 -1
  48. package/scripts/testing/run-effectiveness-tests.sh +1 -1
  49. package/scripts/testing/simple-effectiveness-test.js +1 -1
@@ -0,0 +1,396 @@
1
+ import * as fs from "fs/promises";
2
+ import * as path from "path";
3
+ import { v4 as uuidv4 } from "uuid";
4
+ import { logger } from "../../../core/monitoring/logger.js";
5
+ class CompoundingEngineeringManager {
6
+ knowledgeBase;
7
+ baseDir;
8
+ projectId;
9
+ constructor(baseDir = "./.compounding", projectId) {
10
+ this.baseDir = baseDir;
11
+ this.projectId = projectId || "default";
12
+ this.knowledgeBase = {
13
+ totalFeatures: 0,
14
+ learningsByCategory: {
15
+ planning: [],
16
+ implementation: [],
17
+ testing: [],
18
+ deployment: []
19
+ },
20
+ bestPractices: [],
21
+ automatedHooks: [],
22
+ specializedAgents: [],
23
+ customCommands: [],
24
+ metrics: {
25
+ developmentVelocityTrend: [],
26
+ errorRateReduction: 0,
27
+ codeReuseIncrease: 0,
28
+ onboardingTimeReduction: 0
29
+ }
30
+ };
31
+ }
32
+ /**
33
+ * Initialize the compounding system
34
+ */
35
+ async initialize() {
36
+ await fs.mkdir(this.baseDir, { recursive: true });
37
+ await this.loadExistingKnowledge();
38
+ logger.info("Compounding Engineering Manager initialized", {
39
+ totalFeatures: this.knowledgeBase.totalFeatures,
40
+ baseDir: this.baseDir
41
+ });
42
+ }
43
+ /**
44
+ * Capture learning from a feature development session
45
+ */
46
+ async captureFeatureLearning(featureName, sessionData, agentOutputs, userFeedback) {
47
+ const learningId = uuidv4();
48
+ logger.info("Capturing feature learning", {
49
+ featureName,
50
+ learningId,
51
+ agentCount: agentOutputs.length
52
+ });
53
+ const learning = await this.extractLearningsFromSession(
54
+ learningId,
55
+ featureName,
56
+ sessionData,
57
+ agentOutputs,
58
+ userFeedback
59
+ );
60
+ await this.storeLearning(learning);
61
+ await this.updateCompoundedKnowledge(learning);
62
+ await this.generateArtifacts();
63
+ return learningId;
64
+ }
65
+ /**
66
+ * Extract actionable learnings from development session
67
+ */
68
+ async extractLearningsFromSession(id, featureName, sessionData, agentOutputs, userFeedback) {
69
+ const successes = this.identifySuccesses(sessionData, agentOutputs);
70
+ const failures = this.identifyFailures(sessionData, agentOutputs);
71
+ const patterns = this.extractPatterns(sessionData, agentOutputs);
72
+ const agentLearnings = this.analyzeAgentBehavior(agentOutputs);
73
+ const automationOpportunities = this.identifyAutomationOpportunities(
74
+ sessionData,
75
+ agentOutputs
76
+ );
77
+ return {
78
+ id,
79
+ featureName,
80
+ timestamp: Date.now(),
81
+ developmentPhase: this.inferDevelopmentPhase(sessionData),
82
+ successes,
83
+ failures,
84
+ patterns,
85
+ agentLearnings,
86
+ automationOpportunities
87
+ };
88
+ }
89
+ /**
90
+ * Identify what worked well in the session
91
+ */
92
+ identifySuccesses(sessionData, agentOutputs) {
93
+ const successes = [];
94
+ for (const output of agentOutputs) {
95
+ if (output.success && output.strategy) {
96
+ successes.push({
97
+ strategy: output.strategy,
98
+ impact: this.assessImpact(output),
99
+ reusability: this.assessReusability(output),
100
+ description: output.description || "Successful agent execution"
101
+ });
102
+ }
103
+ }
104
+ if (sessionData.codePatterns) {
105
+ for (const pattern of sessionData.codePatterns) {
106
+ if (pattern.successful) {
107
+ successes.push({
108
+ strategy: `Code pattern: ${pattern.name}`,
109
+ impact: "high",
110
+ reusability: "universal",
111
+ description: pattern.description
112
+ });
113
+ }
114
+ }
115
+ }
116
+ return successes;
117
+ }
118
+ /**
119
+ * Identify failures and their resolutions
120
+ */
121
+ identifyFailures(sessionData, agentOutputs) {
122
+ const failures = [];
123
+ for (const output of agentOutputs) {
124
+ if (output.errors && output.errors.length > 0) {
125
+ for (const error of output.errors) {
126
+ failures.push({
127
+ issue: error.message || "Agent execution failed",
128
+ cause: error.cause || "Unknown cause",
129
+ solution: error.resolution || "Manual intervention required",
130
+ prevention: this.generatePreventionStrategy(error)
131
+ });
132
+ }
133
+ }
134
+ }
135
+ if (sessionData.buildErrors) {
136
+ for (const error of sessionData.buildErrors) {
137
+ failures.push({
138
+ issue: `Build error: ${error.type}`,
139
+ cause: error.details,
140
+ solution: error.fix,
141
+ prevention: "Add pre-build validation hook"
142
+ });
143
+ }
144
+ }
145
+ return failures;
146
+ }
147
+ /**
148
+ * Extract reusable patterns from the session
149
+ */
150
+ extractPatterns(sessionData, agentOutputs) {
151
+ const patterns = [];
152
+ if (agentOutputs.length > 1) {
153
+ const coordinationPattern = this.analyzeCoordinationPattern(agentOutputs);
154
+ if (coordinationPattern) {
155
+ patterns.push(coordinationPattern);
156
+ }
157
+ }
158
+ if (sessionData.codeStructure) {
159
+ const structurePattern = this.analyzeCodeStructurePattern(sessionData.codeStructure);
160
+ if (structurePattern) {
161
+ patterns.push(structurePattern);
162
+ }
163
+ }
164
+ return patterns;
165
+ }
166
+ /**
167
+ * Analyze agent behavior for improvements
168
+ */
169
+ analyzeAgentBehavior(agentOutputs) {
170
+ const commonMistakes = [];
171
+ const effectivePrompts = [];
172
+ const toolUsagePatterns = [];
173
+ const coordinationInsights = [];
174
+ for (const output of agentOutputs) {
175
+ if (output.retries && output.retries.length > 0) {
176
+ commonMistakes.push(...output.retries.map((r) => r.reason));
177
+ }
178
+ if (output.success && output.promptUsed) {
179
+ effectivePrompts.push(output.promptUsed);
180
+ }
181
+ if (output.toolsUsed) {
182
+ toolUsagePatterns.push(...output.toolsUsed);
183
+ }
184
+ if (output.coordination) {
185
+ coordinationInsights.push(output.coordination.insight);
186
+ }
187
+ }
188
+ return {
189
+ commonMistakes: [...new Set(commonMistakes)],
190
+ effectivePrompts: [...new Set(effectivePrompts)],
191
+ toolUsagePatterns: [...new Set(toolUsagePatterns)],
192
+ coordinationInsights: [...new Set(coordinationInsights)]
193
+ };
194
+ }
195
+ /**
196
+ * Identify tasks that can be automated
197
+ */
198
+ identifyAutomationOpportunities(sessionData, agentOutputs) {
199
+ const opportunities = [];
200
+ const taskFrequency = this.analyzeTaskFrequency(agentOutputs);
201
+ for (const [task, frequency] of Object.entries(taskFrequency)) {
202
+ if (frequency > 2) {
203
+ opportunities.push({
204
+ task,
205
+ frequency: "often",
206
+ complexity: "simple",
207
+ implementation: "hook"
208
+ });
209
+ }
210
+ }
211
+ if (sessionData.manualSteps) {
212
+ for (const step of sessionData.manualSteps) {
213
+ opportunities.push({
214
+ task: step.description,
215
+ frequency: "sometimes",
216
+ complexity: step.complexity || "simple",
217
+ implementation: "command"
218
+ });
219
+ }
220
+ }
221
+ return opportunities;
222
+ }
223
+ /**
224
+ * Update compounded knowledge with new learning
225
+ */
226
+ async updateCompoundedKnowledge(learning) {
227
+ this.knowledgeBase.learningsByCategory[learning.developmentPhase].push(learning);
228
+ this.knowledgeBase.totalFeatures++;
229
+ await this.updateBestPractices(learning);
230
+ await this.updateMetrics(learning);
231
+ await this.saveKnowledge();
232
+ }
233
+ /**
234
+ * Generate artifacts (hooks, commands, agents) from accumulated learnings
235
+ */
236
+ async generateArtifacts() {
237
+ await this.generateHooks();
238
+ await this.generateSpecializedAgents();
239
+ await this.generateCustomCommands();
240
+ }
241
+ /**
242
+ * Generate automation hooks
243
+ */
244
+ async generateHooks() {
245
+ const allOpportunities = Object.values(this.knowledgeBase.learningsByCategory).flat().flatMap((learning) => learning.automationOpportunities).filter((opp) => opp.implementation === "hook");
246
+ const hookCounts = /* @__PURE__ */ new Map();
247
+ for (const opp of allOpportunities) {
248
+ hookCounts.set(opp.task, (hookCounts.get(opp.task) || 0) + 1);
249
+ }
250
+ for (const [task, count] of hookCounts) {
251
+ if (count >= 3 && !this.knowledgeBase.automatedHooks.includes(task)) {
252
+ await this.createHook(task);
253
+ this.knowledgeBase.automatedHooks.push(task);
254
+ }
255
+ }
256
+ }
257
+ /**
258
+ * Create an automation hook
259
+ */
260
+ async createHook(task) {
261
+ const hookName = task.replace(/\s+/g, "-").toLowerCase();
262
+ const hookPath = path.join(this.baseDir, "hooks", `${hookName}.ts`);
263
+ await fs.mkdir(path.dirname(hookPath), { recursive: true });
264
+ const hookContent = `
265
+ /**
266
+ * Auto-generated hook for: ${task}
267
+ * Generated by Compounding Engineering Pattern
268
+ */
269
+
270
+ export async function ${hookName.replace(/-/g, "")}Hook() {
271
+ // TODO: Implement automation for: ${task}
272
+ console.log('Executing automated hook: ${task}');
273
+ }
274
+ `;
275
+ await fs.writeFile(hookPath, hookContent);
276
+ logger.info("Generated automation hook", { task, hookPath });
277
+ }
278
+ /**
279
+ * Load existing knowledge base
280
+ */
281
+ async loadExistingKnowledge() {
282
+ const knowledgePath = path.join(this.baseDir, "knowledge.json");
283
+ try {
284
+ const content = await fs.readFile(knowledgePath, "utf-8");
285
+ this.knowledgeBase = JSON.parse(content);
286
+ } catch (error) {
287
+ logger.info("Starting fresh knowledge base");
288
+ }
289
+ }
290
+ /**
291
+ * Save knowledge base to disk
292
+ */
293
+ async saveKnowledge() {
294
+ const knowledgePath = path.join(this.baseDir, "knowledge.json");
295
+ await fs.writeFile(
296
+ knowledgePath,
297
+ JSON.stringify(this.knowledgeBase, null, 2)
298
+ );
299
+ }
300
+ /**
301
+ * Get current compounding metrics
302
+ */
303
+ getCompoundingMetrics() {
304
+ const totalLearnings = Object.values(this.knowledgeBase.learningsByCategory).flat().length;
305
+ const automationLevel = this.knowledgeBase.automatedHooks.length / Math.max(totalLearnings, 1);
306
+ const recentLearnings = totalLearnings > 5 ? totalLearnings / 5 : totalLearnings;
307
+ return {
308
+ totalFeatures: this.knowledgeBase.totalFeatures,
309
+ automationLevel,
310
+ learningVelocity: recentLearnings,
311
+ knowledgeReuse: this.knowledgeBase.bestPractices.length
312
+ };
313
+ }
314
+ // Helper methods
315
+ assessImpact(output) {
316
+ if (output.linesChanged > 100) return "high";
317
+ if (output.linesChanged > 20) return "medium";
318
+ return "low";
319
+ }
320
+ assessReusability(output) {
321
+ if (output.pattern === "generic") return "universal";
322
+ if (output.domain) return "domain_specific";
323
+ return "feature_specific";
324
+ }
325
+ generatePreventionStrategy(error) {
326
+ return `Add validation for: ${error.type || "unknown error type"}`;
327
+ }
328
+ inferDevelopmentPhase(sessionData) {
329
+ if (sessionData.phase) return sessionData.phase;
330
+ if (sessionData.testsRun) return "testing";
331
+ if (sessionData.codeGenerated) return "implementation";
332
+ return "planning";
333
+ }
334
+ analyzeCoordinationPattern(agentOutputs) {
335
+ return {
336
+ name: "Multi-agent coordination",
337
+ context: `${agentOutputs.length} agents worked together`,
338
+ solution: "Successful multi-agent coordination pattern",
339
+ examples: agentOutputs.map((a) => a.role || "unknown")
340
+ };
341
+ }
342
+ analyzeCodeStructurePattern(structure) {
343
+ return {
344
+ name: "Code structure pattern",
345
+ context: structure.type,
346
+ solution: structure.pattern,
347
+ examples: structure.examples || []
348
+ };
349
+ }
350
+ analyzeTaskFrequency(agentOutputs) {
351
+ const frequency = {};
352
+ for (const output of agentOutputs) {
353
+ if (output.task) {
354
+ frequency[output.task] = (frequency[output.task] || 0) + 1;
355
+ }
356
+ }
357
+ return frequency;
358
+ }
359
+ async updateBestPractices(learning) {
360
+ for (const success of learning.successes) {
361
+ if (success.impact === "high" && success.reusability === "universal") {
362
+ const existing = this.knowledgeBase.bestPractices.find(
363
+ (bp) => bp.practice === success.strategy
364
+ );
365
+ if (existing) {
366
+ existing.evidence.push(learning.featureName);
367
+ existing.confidence = Math.min(existing.confidence + 0.1, 1);
368
+ } else {
369
+ this.knowledgeBase.bestPractices.push({
370
+ category: learning.developmentPhase,
371
+ practice: success.strategy,
372
+ evidence: [learning.featureName],
373
+ confidence: 0.7
374
+ });
375
+ }
376
+ }
377
+ }
378
+ }
379
+ async updateMetrics(learning) {
380
+ const velocityScore = learning.successes.length - learning.failures.length;
381
+ this.knowledgeBase.metrics.developmentVelocityTrend.push(velocityScore);
382
+ if (this.knowledgeBase.metrics.developmentVelocityTrend.length > 10) {
383
+ this.knowledgeBase.metrics.developmentVelocityTrend.shift();
384
+ }
385
+ }
386
+ async generateSpecializedAgents() {
387
+ }
388
+ async generateCustomCommands() {
389
+ }
390
+ }
391
+ var compounding_engineering_pattern_default = CompoundingEngineeringManager;
392
+ export {
393
+ CompoundingEngineeringManager,
394
+ compounding_engineering_pattern_default as default
395
+ };
396
+ //# sourceMappingURL=compounding-engineering-pattern.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/integrations/ralph/patterns/compounding-engineering-pattern.ts"],
4
+ "sourcesContent": ["/**\n * Compounding Engineering Pattern Implementation\n * \n * Transforms traditional engineering's diminishing returns into cumulative learning.\n * Each feature development improves future development capabilities.\n * \n * Core Philosophy: \"Make the next feature easier to build from the feature that you just added.\"\n */\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { v4 as uuidv4 } from 'uuid';\nimport { logger } from '../../../core/monitoring/logger.js';\n\nexport interface FeatureLearning {\n id: string;\n featureName: string;\n timestamp: number;\n developmentPhase: 'planning' | 'implementation' | 'testing' | 'deployment';\n \n // What worked well\n successes: {\n strategy: string;\n impact: 'high' | 'medium' | 'low';\n reusability: 'universal' | 'domain_specific' | 'feature_specific';\n description: string;\n }[];\n \n // What didn't work\n failures: {\n issue: string;\n cause: string;\n solution: string;\n prevention: string;\n }[];\n \n // Emerging patterns\n patterns: {\n name: string;\n context: string;\n solution: string;\n examples: string[];\n }[];\n \n // Agent improvements\n agentLearnings: {\n commonMistakes: string[];\n effectivePrompts: string[];\n toolUsagePatterns: string[];\n coordinationInsights: string[];\n };\n \n // Automation opportunities\n automationOpportunities: {\n task: string;\n frequency: 'always' | 'often' | 'sometimes';\n complexity: 'trivial' | 'simple' | 'complex';\n implementation: 'hook' | 'command' | 'subagent';\n }[];\n}\n\nexport interface CompoundedKnowledge {\n totalFeatures: number;\n learningsByCategory: {\n planning: FeatureLearning[];\n implementation: FeatureLearning[];\n testing: FeatureLearning[];\n deployment: FeatureLearning[];\n };\n \n // Distilled wisdom\n bestPractices: {\n category: string;\n practice: string;\n evidence: string[];\n confidence: number;\n }[];\n \n // Generated artifacts\n automatedHooks: string[];\n specializedAgents: string[];\n customCommands: string[];\n \n // Metrics\n metrics: {\n developmentVelocityTrend: number[];\n errorRateReduction: number;\n codeReuseIncrease: number;\n onboardingTimeReduction: number;\n };\n}\n\n/**\n * Compounding Engineering Pattern Manager\n * Captures, processes, and compounds development learnings\n */\nexport class CompoundingEngineeringManager {\n private knowledgeBase: CompoundedKnowledge;\n private baseDir: string;\n private projectId: string;\n \n constructor(baseDir: string = './.compounding', projectId?: string) {\n this.baseDir = baseDir;\n this.projectId = projectId || 'default';\n this.knowledgeBase = {\n totalFeatures: 0,\n learningsByCategory: {\n planning: [],\n implementation: [],\n testing: [],\n deployment: [],\n },\n bestPractices: [],\n automatedHooks: [],\n specializedAgents: [],\n customCommands: [],\n metrics: {\n developmentVelocityTrend: [],\n errorRateReduction: 0,\n codeReuseIncrease: 0,\n onboardingTimeReduction: 0,\n },\n };\n }\n\n /**\n * Initialize the compounding system\n */\n async initialize(): Promise<void> {\n await fs.mkdir(this.baseDir, { recursive: true });\n await this.loadExistingKnowledge();\n logger.info('Compounding Engineering Manager initialized', {\n totalFeatures: this.knowledgeBase.totalFeatures,\n baseDir: this.baseDir,\n });\n }\n\n /**\n * Capture learning from a feature development session\n */\n async captureFeatureLearning(\n featureName: string,\n sessionData: any,\n agentOutputs: any[],\n userFeedback?: string\n ): Promise<string> {\n const learningId = uuidv4();\n \n logger.info('Capturing feature learning', { \n featureName, \n learningId,\n agentCount: agentOutputs.length \n });\n\n // Analyze session for learnings\n const learning = await this.extractLearningsFromSession(\n learningId,\n featureName,\n sessionData,\n agentOutputs,\n userFeedback\n );\n\n // Store the learning\n await this.storeLearning(learning);\n \n // Update compounded knowledge\n await this.updateCompoundedKnowledge(learning);\n \n // Generate new artifacts if patterns emerge\n await this.generateArtifacts();\n \n return learningId;\n }\n\n /**\n * Extract actionable learnings from development session\n */\n private async extractLearningsFromSession(\n id: string,\n featureName: string,\n sessionData: any,\n agentOutputs: any[],\n userFeedback?: string\n ): Promise<FeatureLearning> {\n // Analyze what worked well\n const successes = this.identifySuccesses(sessionData, agentOutputs);\n \n // Analyze failures and resolutions\n const failures = this.identifyFailures(sessionData, agentOutputs);\n \n // Extract emerging patterns\n const patterns = this.extractPatterns(sessionData, agentOutputs);\n \n // Analyze agent behavior\n const agentLearnings = this.analyzeAgentBehavior(agentOutputs);\n \n // Identify automation opportunities\n const automationOpportunities = this.identifyAutomationOpportunities(\n sessionData,\n agentOutputs\n );\n\n return {\n id,\n featureName,\n timestamp: Date.now(),\n developmentPhase: this.inferDevelopmentPhase(sessionData),\n successes,\n failures,\n patterns,\n agentLearnings,\n automationOpportunities,\n };\n }\n\n /**\n * Identify what worked well in the session\n */\n private identifySuccesses(\n sessionData: any,\n agentOutputs: any[]\n ): FeatureLearning['successes'] {\n const successes = [];\n\n // Analyze successful agent strategies\n for (const output of agentOutputs) {\n if (output.success && output.strategy) {\n successes.push({\n strategy: output.strategy,\n impact: this.assessImpact(output),\n reusability: this.assessReusability(output),\n description: output.description || 'Successful agent execution',\n });\n }\n }\n\n // Analyze successful patterns in code\n if (sessionData.codePatterns) {\n for (const pattern of sessionData.codePatterns) {\n if (pattern.successful) {\n successes.push({\n strategy: `Code pattern: ${pattern.name}`,\n impact: 'high',\n reusability: 'universal',\n description: pattern.description,\n });\n }\n }\n }\n\n return successes;\n }\n\n /**\n * Identify failures and their resolutions\n */\n private identifyFailures(\n sessionData: any,\n agentOutputs: any[]\n ): FeatureLearning['failures'] {\n const failures = [];\n\n // Analyze agent failures\n for (const output of agentOutputs) {\n if (output.errors && output.errors.length > 0) {\n for (const error of output.errors) {\n failures.push({\n issue: error.message || 'Agent execution failed',\n cause: error.cause || 'Unknown cause',\n solution: error.resolution || 'Manual intervention required',\n prevention: this.generatePreventionStrategy(error),\n });\n }\n }\n }\n\n // Analyze build/test failures\n if (sessionData.buildErrors) {\n for (const error of sessionData.buildErrors) {\n failures.push({\n issue: `Build error: ${error.type}`,\n cause: error.details,\n solution: error.fix,\n prevention: 'Add pre-build validation hook',\n });\n }\n }\n\n return failures;\n }\n\n /**\n * Extract reusable patterns from the session\n */\n private extractPatterns(\n sessionData: any,\n agentOutputs: any[]\n ): FeatureLearning['patterns'] {\n const patterns = [];\n\n // Agent coordination patterns\n if (agentOutputs.length > 1) {\n const coordinationPattern = this.analyzeCoordinationPattern(agentOutputs);\n if (coordinationPattern) {\n patterns.push(coordinationPattern);\n }\n }\n\n // Code structure patterns\n if (sessionData.codeStructure) {\n const structurePattern = this.analyzeCodeStructurePattern(sessionData.codeStructure);\n if (structurePattern) {\n patterns.push(structurePattern);\n }\n }\n\n return patterns;\n }\n\n /**\n * Analyze agent behavior for improvements\n */\n private analyzeAgentBehavior(agentOutputs: any[]): FeatureLearning['agentLearnings'] {\n const commonMistakes = [];\n const effectivePrompts = [];\n const toolUsagePatterns = [];\n const coordinationInsights = [];\n\n for (const output of agentOutputs) {\n // Common mistakes\n if (output.retries && output.retries.length > 0) {\n commonMistakes.push(...output.retries.map((r: any) => r.reason));\n }\n\n // Effective prompts\n if (output.success && output.promptUsed) {\n effectivePrompts.push(output.promptUsed);\n }\n\n // Tool usage\n if (output.toolsUsed) {\n toolUsagePatterns.push(...output.toolsUsed);\n }\n\n // Coordination\n if (output.coordination) {\n coordinationInsights.push(output.coordination.insight);\n }\n }\n\n return {\n commonMistakes: [...new Set(commonMistakes)],\n effectivePrompts: [...new Set(effectivePrompts)],\n toolUsagePatterns: [...new Set(toolUsagePatterns)],\n coordinationInsights: [...new Set(coordinationInsights)],\n };\n }\n\n /**\n * Identify tasks that can be automated\n */\n private identifyAutomationOpportunities(\n sessionData: any,\n agentOutputs: any[]\n ): FeatureLearning['automationOpportunities'] {\n const opportunities = [];\n\n // Repeated agent tasks\n const taskFrequency = this.analyzeTaskFrequency(agentOutputs);\n for (const [task, frequency] of Object.entries(taskFrequency)) {\n if (frequency > 2) {\n opportunities.push({\n task,\n frequency: 'often',\n complexity: 'simple',\n implementation: 'hook',\n });\n }\n }\n\n // Manual interventions\n if (sessionData.manualSteps) {\n for (const step of sessionData.manualSteps) {\n opportunities.push({\n task: step.description,\n frequency: 'sometimes',\n complexity: step.complexity || 'simple',\n implementation: 'command',\n });\n }\n }\n\n return opportunities;\n }\n\n /**\n * Update compounded knowledge with new learning\n */\n private async updateCompoundedKnowledge(learning: FeatureLearning): Promise<void> {\n // Add to appropriate category\n this.knowledgeBase.learningsByCategory[learning.developmentPhase].push(learning);\n this.knowledgeBase.totalFeatures++;\n\n // Update best practices\n await this.updateBestPractices(learning);\n \n // Update metrics\n await this.updateMetrics(learning);\n \n // Save updated knowledge\n await this.saveKnowledge();\n }\n\n /**\n * Generate artifacts (hooks, commands, agents) from accumulated learnings\n */\n private async generateArtifacts(): Promise<void> {\n // Generate hooks from automation opportunities\n await this.generateHooks();\n \n // Generate specialized agents from patterns\n await this.generateSpecializedAgents();\n \n // Generate custom commands from repeated tasks\n await this.generateCustomCommands();\n }\n\n /**\n * Generate automation hooks\n */\n private async generateHooks(): Promise<void> {\n const allOpportunities = Object.values(this.knowledgeBase.learningsByCategory)\n .flat()\n .flatMap(learning => learning.automationOpportunities)\n .filter(opp => opp.implementation === 'hook');\n\n const hookCounts = new Map<string, number>();\n for (const opp of allOpportunities) {\n hookCounts.set(opp.task, (hookCounts.get(opp.task) || 0) + 1);\n }\n\n // Generate hooks for frequently occurring tasks\n for (const [task, count] of hookCounts) {\n if (count >= 3 && !this.knowledgeBase.automatedHooks.includes(task)) {\n await this.createHook(task);\n this.knowledgeBase.automatedHooks.push(task);\n }\n }\n }\n\n /**\n * Create an automation hook\n */\n private async createHook(task: string): Promise<void> {\n const hookName = task.replace(/\\s+/g, '-').toLowerCase();\n const hookPath = path.join(this.baseDir, 'hooks', `${hookName}.ts`);\n \n await fs.mkdir(path.dirname(hookPath), { recursive: true });\n \n const hookContent = `\n/**\n * Auto-generated hook for: ${task}\n * Generated by Compounding Engineering Pattern\n */\n\nexport async function ${hookName.replace(/-/g, '')}Hook() {\n // TODO: Implement automation for: ${task}\n console.log('Executing automated hook: ${task}');\n}\n `;\n\n await fs.writeFile(hookPath, hookContent);\n logger.info('Generated automation hook', { task, hookPath });\n }\n\n /**\n * Load existing knowledge base\n */\n private async loadExistingKnowledge(): Promise<void> {\n const knowledgePath = path.join(this.baseDir, 'knowledge.json');\n \n try {\n const content = await fs.readFile(knowledgePath, 'utf-8');\n this.knowledgeBase = JSON.parse(content);\n } catch (error) {\n // No existing knowledge, start fresh\n logger.info('Starting fresh knowledge base');\n }\n }\n\n /**\n * Save knowledge base to disk\n */\n private async saveKnowledge(): Promise<void> {\n const knowledgePath = path.join(this.baseDir, 'knowledge.json');\n await fs.writeFile(\n knowledgePath,\n JSON.stringify(this.knowledgeBase, null, 2)\n );\n }\n\n /**\n * Get current compounding metrics\n */\n getCompoundingMetrics(): {\n totalFeatures: number;\n automationLevel: number;\n learningVelocity: number;\n knowledgeReuse: number;\n } {\n const totalLearnings = Object.values(this.knowledgeBase.learningsByCategory)\n .flat().length;\n \n const automationLevel = this.knowledgeBase.automatedHooks.length / \n Math.max(totalLearnings, 1);\n \n const recentLearnings = totalLearnings > 5 ? \n totalLearnings / 5 : totalLearnings;\n \n return {\n totalFeatures: this.knowledgeBase.totalFeatures,\n automationLevel,\n learningVelocity: recentLearnings,\n knowledgeReuse: this.knowledgeBase.bestPractices.length,\n };\n }\n\n // Helper methods\n private assessImpact(output: any): 'high' | 'medium' | 'low' {\n if (output.linesChanged > 100) return 'high';\n if (output.linesChanged > 20) return 'medium';\n return 'low';\n }\n\n private assessReusability(output: any): 'universal' | 'domain_specific' | 'feature_specific' {\n if (output.pattern === 'generic') return 'universal';\n if (output.domain) return 'domain_specific';\n return 'feature_specific';\n }\n\n private generatePreventionStrategy(error: any): string {\n return `Add validation for: ${error.type || 'unknown error type'}`;\n }\n\n private inferDevelopmentPhase(sessionData: any): 'planning' | 'implementation' | 'testing' | 'deployment' {\n if (sessionData.phase) return sessionData.phase;\n if (sessionData.testsRun) return 'testing';\n if (sessionData.codeGenerated) return 'implementation';\n return 'planning';\n }\n\n private analyzeCoordinationPattern(agentOutputs: any[]): any {\n return {\n name: 'Multi-agent coordination',\n context: `${agentOutputs.length} agents worked together`,\n solution: 'Successful multi-agent coordination pattern',\n examples: agentOutputs.map(a => a.role || 'unknown'),\n };\n }\n\n private analyzeCodeStructurePattern(structure: any): any {\n return {\n name: 'Code structure pattern',\n context: structure.type,\n solution: structure.pattern,\n examples: structure.examples || [],\n };\n }\n\n private analyzeTaskFrequency(agentOutputs: any[]): Record<string, number> {\n const frequency: Record<string, number> = {};\n for (const output of agentOutputs) {\n if (output.task) {\n frequency[output.task] = (frequency[output.task] || 0) + 1;\n }\n }\n return frequency;\n }\n\n private async updateBestPractices(learning: FeatureLearning): Promise<void> {\n // Extract best practices from successes\n for (const success of learning.successes) {\n if (success.impact === 'high' && success.reusability === 'universal') {\n const existing = this.knowledgeBase.bestPractices.find(\n bp => bp.practice === success.strategy\n );\n \n if (existing) {\n existing.evidence.push(learning.featureName);\n existing.confidence = Math.min(existing.confidence + 0.1, 1.0);\n } else {\n this.knowledgeBase.bestPractices.push({\n category: learning.developmentPhase,\n practice: success.strategy,\n evidence: [learning.featureName],\n confidence: 0.7,\n });\n }\n }\n }\n }\n\n private async updateMetrics(learning: FeatureLearning): Promise<void> {\n // Update development velocity trend\n const velocityScore = learning.successes.length - learning.failures.length;\n this.knowledgeBase.metrics.developmentVelocityTrend.push(velocityScore);\n \n // Keep only last 10 measurements\n if (this.knowledgeBase.metrics.developmentVelocityTrend.length > 10) {\n this.knowledgeBase.metrics.developmentVelocityTrend.shift();\n }\n }\n\n private async generateSpecializedAgents(): Promise<void> {\n // Implementation for generating specialized agents from patterns\n }\n\n private async generateCustomCommands(): Promise<void> {\n // Implementation for generating custom commands from repeated tasks\n }\n}\n\nexport default CompoundingEngineeringManager;"],
5
+ "mappings": "AASA,YAAY,QAAQ;AACpB,YAAY,UAAU;AACtB,SAAS,MAAM,cAAc;AAC7B,SAAS,cAAc;AAoFhB,MAAM,8BAA8B;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EAER,YAAY,UAAkB,kBAAkB,WAAoB;AAClE,SAAK,UAAU;AACf,SAAK,YAAY,aAAa;AAC9B,SAAK,gBAAgB;AAAA,MACnB,eAAe;AAAA,MACf,qBAAqB;AAAA,QACnB,UAAU,CAAC;AAAA,QACX,gBAAgB,CAAC;AAAA,QACjB,SAAS,CAAC;AAAA,QACV,YAAY,CAAC;AAAA,MACf;AAAA,MACA,eAAe,CAAC;AAAA,MAChB,gBAAgB,CAAC;AAAA,MACjB,mBAAmB,CAAC;AAAA,MACpB,gBAAgB,CAAC;AAAA,MACjB,SAAS;AAAA,QACP,0BAA0B,CAAC;AAAA,QAC3B,oBAAoB;AAAA,QACpB,mBAAmB;AAAA,QACnB,yBAAyB;AAAA,MAC3B;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,aAA4B;AAChC,UAAM,GAAG,MAAM,KAAK,SAAS,EAAE,WAAW,KAAK,CAAC;AAChD,UAAM,KAAK,sBAAsB;AACjC,WAAO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