oneie 1.3.3 → 1.3.4
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/.claude/agents/engineering-architect.md +39 -56
- package/.claude/agents/engineering-developer.md +37 -57
- package/.claude/agents/engineering-director.md +37 -144
- package/.claude/agents/engineering-ingestor.md +229 -0
- package/.claude/agents/engineering-quality-assurance.md +40 -206
- package/.claude/agents/engineering-user-experience.md +36 -207
- package/.claude/agents/improver.md +454 -0
- package/.claude/agents/marketing-brand-identity.md +37 -48
- package/.claude/agents/marketing-director.md +9 -0
- package/.claude/agents/one-orchestrator.md +50 -136
- package/.claude/agents/story-teller.md +10 -0
- package/.claude/agents/task-master.md +10 -0
- package/.claude/agents/turbo-repo-builder.md +51 -0
- package/.claude/claude-code-hooks.json +20 -233
- package/.claude/commands/agent-balance +111 -0
- package/.claude/commands/agent.md +24 -7
- package/.claude/commands/cascade-status.md +128 -0
- package/.claude/commands/ingest.md +290 -0
- package/.claude/commands/ingestor.md +136 -0
- package/.claude/commands/mission.md +26 -8
- package/.claude/commands/one.md +351 -14
- package/.claude/commands/quality-check.md +204 -0
- package/.claude/commands/smart-route.md +220 -0
- package/.claude/commands/start.md +9 -8
- package/.claude/commands/story.md +18 -3
- package/.claude/commands/task.md +22 -1
- package/.claude/settings.local.json +18 -3
- package/.obsidian/core-plugins.json +3 -1
- package/.one/checklists/agent-quality-checklist.md +24 -15
- package/.one/checklists/story-quality-checklist.md +24 -15
- package/.one/checklists/task-quality-checklist.md +24 -15
- package/.one/templates/bun-workspace-guide-template.md +188 -0
- package/.one/templates/bunfig-template.toml +95 -0
- package/.one/templates/root-package-template.json +37 -21
- package/.one/templates/turbo-config-template.json +18 -3
- package/.one/tools/bump-core-version.js +0 -0
- package/.one/tools/bump-expansion-version.js +0 -0
- package/.one/tools/code-generators.js +0 -0
- package/.one/tools/compression-engine.js +638 -0
- package/.one/tools/content-deduplicator.js +336 -0
- package/.one/tools/convert-wav-to-mp3.js +0 -0
- package/.one/tools/foundation-wizard.js +0 -0
- package/.one/tools/generate-toc.js +0 -0
- package/.one/tools/ingestor/cascade-integration.js +523 -0
- package/.one/tools/ingestor/cli.ts +234 -0
- package/.one/tools/ingestor/context-mapper.ts +604 -0
- package/.one/tools/ingestor/error-handling-monitor.js +742 -0
- package/.one/tools/ingestor/file-discovery.ts +484 -0
- package/.one/tools/ingestor/file-transformer.ts +524 -0
- package/.one/tools/ingestor/ingestor-orchestrator.ts +416 -0
- package/.one/tools/ingestor/package.json +47 -0
- package/.one/tools/ingestor/usage-examples.md +458 -0
- package/.one/tools/lazy-loader.js +489 -0
- package/.one/tools/minimal-generators.js +0 -0
- package/.one/tools/performance-benchmark.js +300 -0
- package/.one/tools/premium-manager.js +0 -0
- package/.one/tools/semantic-release-sync-installer.js +0 -0
- package/.one/tools/size-memory-optimizer.js +475 -0
- package/.one/tools/sync-installer-version.js +0 -0
- package/.one/tools/text-to-speech.js +0 -0
- package/.one/tools/transformative-ai-engine.js +0 -0
- package/.one/workflows/safe-improvement-deployment.yaml +420 -0
- package/CLAUDE.md +30 -0
- package/README.md +41 -10
- package/one/cache/benchmark-results.json +43 -0
- package/one/cache/file-index.json +12480 -0
- package/one/config/agent-routing.yaml +124 -0
- package/one/config/agent-skills.yaml +451 -0
- package/one/config/cache-config.yaml +304 -0
- package/one/config/feedback-templates.yaml +152 -0
- package/one/config/performance-config.yaml +281 -0
- package/one/config/quality-automation.yaml +405 -0
- package/one/config/routing-logic.yaml +292 -0
- package/one/data/task-registry.yaml +224 -0
- package/one/stories/story-1.10-parallel-task-execution-orchestration.md +119 -0
- package/one/stories/story-3.1-external-repository-foundation.md +374 -0
- package/one/stories/story-3.2-3-levels-architecture-integration.md +449 -0
- package/one/stories/story-3.3-multi-platform-application-development.md +677 -0
- package/one/stories/story-3.4-shared-package-system-ui-components.md +854 -0
- package/one/stories/story-3.5-backend-integration-production-deployment.md +1034 -0
- package/one/tasks/task-1.10.1-design-parallel-execution-architecture.md +108 -0
- package/one/tasks/task-1.10.2-create-task-dependency-mapping-system.md +82 -0
- package/one/tasks/task-1.10.3-build-agent-spawning-orchestration-engine.md +120 -0
- package/one/tasks/task-1.10.4-implement-task-queue-dependency-resolution.md +125 -0
- package/one/tasks/task-1.10.5-create-task-numbering-convention-system.md +542 -0
- package/one/tasks/task-3.1.1-external-repository-creation.md +303 -0
- package/one/tasks/task-3.1.2-turborepo-configuration-optimization.md +402 -0
- package/one/tasks/task-3.1.3-shared-configuration-packages.md +571 -0
- package/one/tasks/task-3.1.4-bun-package-management-optimization.md +627 -0
- package/one/tools/task-numbering-validator.js +429 -0
- package/package.json +1 -1
- package/quality-gate-optimization-analysis.md +260 -0
- package/turbo-benchmark.js +268 -0
- package/turbo-optimization-guide.md +163 -0
- package/turbo-workspace-template.json +83 -0
- package/turbo.json +178 -0
- package/.claude/commands/analyst.md +0 -70
- package/.claude/commands/architect.md +0 -67
- package/.claude/commands/commander.md +0 -78
- package/.claude/commands/deploy.md +0 -68
- package/.claude/commands/dev.md +0 -60
- package/.claude/commands/playbook.md +0 -81
- package/.claude/commands/pm.md +0 -64
- package/.claude/commands/po.md +0 -68
- package/.claude/commands/qa.md +0 -59
- package/.claude/commands/taskmaster.md +0 -85
- package/.claude/commands/ux-expert.md +0 -58
- package/.one/stories/bullstamp-attract-module-complete.md +0 -255
- package/.one/stories/bullstamp-deployment-master-plan.md +0 -518
- package/.one/stories/bullstamp-executive-implementation-summary.md +0 -254
- package/.one/stories/bullstamp-project-status-complete.md +0 -257
- package/.one/stories/obsidian-pandoc-config.md +0 -159
- package/.one/stories/story-1.1-perfect-filesystem-organization.md +0 -270
- package/.one/stories/story-1.1.1.md +0 -136
- package/.one/stories/story-1.1.md +0 -131
- package/.one/stories/story-1.2.md +0 -420
- package/.one/stories/story-1.3.md +0 -177
- package/.one/stories/story-1.4.md +0 -356
- package/.one/stories/story-1.5.md +0 -572
- package/.one/stories/story-1.6.md +0 -481
- package/.one/stories/story-1.7.md +0 -923
- package/.one/stories/story-1.8.md +0 -404
- package/.one/stories/story-2.0.md +0 -132
- package/.one/stories/story-2.1.md +0 -110
- package/.one/stories/story-2.2.md +0 -110
- package/.one/stories/story-2.3.md +0 -112
- package/.one/stories/story-2.4.md +0 -116
- package/.one/stories/story-2.5.md +0 -114
- package/.one/stories/story-3.1.md +0 -298
- package/.one/stories/story-3.10.md +0 -302
- package/.one/stories/story-3.11.md +0 -167
- package/.one/stories/story-3.12.md +0 -235
- package/.one/stories/story-3.13.md +0 -235
- package/.one/stories/story-3.14.md +0 -225
- package/.one/stories/story-3.15.md +0 -238
- package/.one/stories/story-3.16.md +0 -244
- package/.one/stories/story-3.17.md +0 -245
- package/.one/stories/story-3.18.md +0 -248
- package/.one/stories/story-3.2.md +0 -226
- package/.one/stories/story-3.3.md +0 -226
- package/.one/stories/story-3.4.md +0 -226
- package/.one/stories/story-3.5.md +0 -167
- package/.one/stories/story-3.6.md +0 -167
- package/.one/stories/story-3.7.md +0 -181
- package/.one/stories/story-3.8.md +0 -198
- package/.one/stories/story-3.9.md +0 -169
- package/.one/stories/story-4.1.md +0 -245
- package/.one/stories/story-4.2.md +0 -314
- package/.one/stories/story-4.3.md +0 -610
- package/.one/stories/story-4.4.md +0 -931
- package/.one/stories/story-4.5.md +0 -727
- package/.one/stories/story-4.6-consistency.md +0 -175
- package/.one/stories/story-5.1.md +0 -508
- package/.one/stories/story-5.2.md +0 -451
- package/.one/stories/story-5.3.md +0 -405
- package/.one/stories/story-5.4.md +0 -447
- package/.one/stories/story-5.5.md +0 -349
- package/.one/stories/story-5.6.md +0 -445
- package/.one/stories/story-6.1-text-content-engine.md +0 -144
- package/.one/stories/story-6.2-audio-content-engine.md +0 -145
- package/.one/stories/story-6.3-video-content-engine.md +0 -145
- package/.one/stories/story-6.4-visual-content-engine.md +0 -177
- package/.one/stories/story-6.5-cross-platform-distribution.md +0 -188
- package/.one/stories/story-6.6.ai-content-generation-pipeline.md +0 -196
- package/.one/stories/story-6.7-character-consistency-quality-control.md +0 -216
- package/.one/stories/story-6.8-claude-code-content-integration.md +0 -181
- package/.one/stories/story-6.8-content-production-workflows.md +0 -247
- package/.one/stories/story-7.1-implementation.md +0 -128
- package/.one/stories/story-7.1.md +0 -203
- package/.one/stories/story-7.2-implementation.md +0 -147
- package/.one/stories/story-7.2.md +0 -415
- package/.one/stories/story-7.3-implementation.md +0 -159
- package/.one/stories/story-7.3.md +0 -463
- package/.one/stories/story-7.4-implementation.md +0 -154
- package/.one/stories/story-7.4.md +0 -500
- package/.one/stories/story-validation-report.md +0 -169
- package/one/archive-index.json +0 -91
- /package/one/stories/{story-3.1-npx-oneie-turbo-enhancement.md → story-2.1.1-npx-oneie-turbo-enhancement.md} +0 -0
- /package/one/stories/{story-3.2-npx-connection-implementation.md → story-2.21-npx-connection-implementation.md} +0 -0
|
@@ -0,0 +1,523 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CASCADE Integration Module for /ingest Command
|
|
3
|
+
* Leverages existing Mission → Story → Task → Agent parallel orchestration
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const { CascadeOrchestrator } = require('../cascade/parallel-orchestrator');
|
|
7
|
+
const { ConcurrentTaskEngine } = require('../cascade/concurrent-task-engine');
|
|
8
|
+
const { DynamicAgentPool } = require('../cascade/dynamic-agent-pool');
|
|
9
|
+
|
|
10
|
+
class IngestCascadeIntegrator {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.cascadeOrchestrator = new CascadeOrchestrator();
|
|
13
|
+
this.taskEngine = new ConcurrentTaskEngine();
|
|
14
|
+
this.agentPool = new DynamicAgentPool();
|
|
15
|
+
this.activeIngestionTasks = new Map();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Spawn parallel agents for comprehensive project ingestion
|
|
20
|
+
* @param {Object} config - Ingestion configuration
|
|
21
|
+
* @returns {Promise<Object>} - Orchestrated ingestion results
|
|
22
|
+
*/
|
|
23
|
+
async orchestrateParallelIngestion(config) {
|
|
24
|
+
const ingestionMission = await this.createIngestionMission(config);
|
|
25
|
+
const parallelStories = await this.decomposeIntoParallelStories(ingestionMission);
|
|
26
|
+
const concurrentTasks = await this.breakdownIntoConcurrentTasks(parallelStories);
|
|
27
|
+
|
|
28
|
+
return await this.executeConcurrentIngestion(concurrentTasks, config);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Create an ingestion mission using existing Mission Commander patterns
|
|
33
|
+
*/
|
|
34
|
+
async createIngestionMission(config) {
|
|
35
|
+
const missionSpec = {
|
|
36
|
+
id: `ingestion-${Date.now()}`,
|
|
37
|
+
title: `Project Ingestion: ${config.source}`,
|
|
38
|
+
objective: 'Comprehensive project discovery, analysis, and intelligent code import',
|
|
39
|
+
context: {
|
|
40
|
+
source: config.source,
|
|
41
|
+
target: config.target || process.cwd(),
|
|
42
|
+
framework: config.framework || 'nextjs',
|
|
43
|
+
missionContext: config.mission,
|
|
44
|
+
storyContext: config.story,
|
|
45
|
+
taskContext: config.task
|
|
46
|
+
},
|
|
47
|
+
parallelExecution: {
|
|
48
|
+
maxConcurrentStories: config.agents?.length || 6,
|
|
49
|
+
qualityGateRequired: true,
|
|
50
|
+
timeoutMinutes: config.timeout || 5
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// Use existing Mission Commander validation
|
|
55
|
+
return await this.cascadeOrchestrator.createMission(missionSpec);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Decompose ingestion into parallel stories (one per agent type)
|
|
60
|
+
*/
|
|
61
|
+
async decomposeIntoParallelStories(mission) {
|
|
62
|
+
const agentStoryMap = {
|
|
63
|
+
'ingestor': {
|
|
64
|
+
title: 'Core Code Discovery & Import',
|
|
65
|
+
agent: 'engineering-ingestor',
|
|
66
|
+
priority: 1,
|
|
67
|
+
dependencies: []
|
|
68
|
+
},
|
|
69
|
+
'architect': {
|
|
70
|
+
title: 'Architecture Analysis & Recommendations',
|
|
71
|
+
agent: 'engineering-architect',
|
|
72
|
+
priority: 2,
|
|
73
|
+
dependencies: ['ingestor'] // Needs discovery data
|
|
74
|
+
},
|
|
75
|
+
'qa': {
|
|
76
|
+
title: 'Quality Assurance & Security Audit',
|
|
77
|
+
agent: 'engineering-quality-assurance',
|
|
78
|
+
priority: 2,
|
|
79
|
+
dependencies: ['ingestor'] // Needs code to audit
|
|
80
|
+
},
|
|
81
|
+
'research': {
|
|
82
|
+
title: 'Technology Stack & Market Analysis',
|
|
83
|
+
agent: 'research-market-analyst',
|
|
84
|
+
priority: 3,
|
|
85
|
+
dependencies: [] // Independent analysis
|
|
86
|
+
},
|
|
87
|
+
'content': {
|
|
88
|
+
title: 'Documentation & Knowledge Extraction',
|
|
89
|
+
agent: 'content-team-manager',
|
|
90
|
+
priority: 3,
|
|
91
|
+
dependencies: [] // Independent analysis
|
|
92
|
+
},
|
|
93
|
+
'performance': {
|
|
94
|
+
title: 'Performance Optimization Analysis',
|
|
95
|
+
agent: 'engineering-performance',
|
|
96
|
+
priority: 4,
|
|
97
|
+
dependencies: ['architect', 'qa'] // Needs architectural context
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const requestedAgents = mission.context.agents || ['ingestor', 'architect', 'qa'];
|
|
102
|
+
const parallelStories = [];
|
|
103
|
+
|
|
104
|
+
for (const agentType of requestedAgents) {
|
|
105
|
+
const storyTemplate = agentStoryMap[agentType];
|
|
106
|
+
if (!storyTemplate) continue;
|
|
107
|
+
|
|
108
|
+
const story = {
|
|
109
|
+
id: `${mission.id}-${agentType}`,
|
|
110
|
+
missionId: mission.id,
|
|
111
|
+
title: storyTemplate.title,
|
|
112
|
+
assignedAgent: storyTemplate.agent,
|
|
113
|
+
priority: storyTemplate.priority,
|
|
114
|
+
dependencies: storyTemplate.dependencies.filter(dep => requestedAgents.includes(dep)),
|
|
115
|
+
context: {
|
|
116
|
+
...mission.context,
|
|
117
|
+
agentSpecialization: agentType,
|
|
118
|
+
analysisScope: this.defineAnalysisScope(agentType, mission.context)
|
|
119
|
+
},
|
|
120
|
+
acceptanceCriteria: this.generateAcceptanceCriteria(agentType, mission.context)
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
parallelStories.push(story);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Use existing Story Teller validation for parallel stories
|
|
127
|
+
return await this.cascadeOrchestrator.validateParallelStories(parallelStories);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Break stories into concurrent tasks using existing Task Master patterns
|
|
132
|
+
*/
|
|
133
|
+
async breakdownIntoConcurrentTasks(stories) {
|
|
134
|
+
const allTasks = [];
|
|
135
|
+
|
|
136
|
+
for (const story of stories) {
|
|
137
|
+
const tasks = await this.generateTasksForStory(story);
|
|
138
|
+
allTasks.push(...tasks);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Use existing concurrent task engine for dependency analysis
|
|
142
|
+
return await this.taskEngine.processConcurrentTasks(allTasks);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Generate tasks for each story type
|
|
147
|
+
*/
|
|
148
|
+
async generateTasksForStory(story) {
|
|
149
|
+
const taskGenerators = {
|
|
150
|
+
'ingestor': this.generateIngestorTasks,
|
|
151
|
+
'architect': this.generateArchitectTasks,
|
|
152
|
+
'qa': this.generateQATasks,
|
|
153
|
+
'research': this.generateResearchTasks,
|
|
154
|
+
'content': this.generateContentTasks,
|
|
155
|
+
'performance': this.generatePerformanceTasks
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
const generator = taskGenerators[story.context.agentSpecialization];
|
|
159
|
+
return generator ? await generator.call(this, story) : [];
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Execute concurrent ingestion using existing agent pool
|
|
164
|
+
*/
|
|
165
|
+
async executeConcurrentIngestion(tasks, config) {
|
|
166
|
+
const executionPlan = {
|
|
167
|
+
tasks,
|
|
168
|
+
maxConcurrentTasks: Math.min(tasks.length, config.parallel || 3),
|
|
169
|
+
qualityGateRequired: true,
|
|
170
|
+
timeoutPerTask: 300000, // 5 minutes per task
|
|
171
|
+
elasticScaling: true
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
// Use existing dynamic agent pool for execution
|
|
175
|
+
const results = await this.agentPool.executeConcurrentTasks(executionPlan);
|
|
176
|
+
|
|
177
|
+
// Aggregate results using existing quality amplification
|
|
178
|
+
return await this.aggregateIngestionResults(results, config);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Task generators for each agent specialization
|
|
183
|
+
*/
|
|
184
|
+
async generateIngestorTasks(story) {
|
|
185
|
+
return [
|
|
186
|
+
{
|
|
187
|
+
id: `${story.id}-discovery`,
|
|
188
|
+
title: 'Project Discovery & Classification',
|
|
189
|
+
agent: story.assignedAgent,
|
|
190
|
+
priority: 1,
|
|
191
|
+
estimatedMinutes: 2,
|
|
192
|
+
dependencies: []
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
id: `${story.id}-analysis`,
|
|
196
|
+
title: 'Context-Aware Relevance Analysis',
|
|
197
|
+
agent: story.assignedAgent,
|
|
198
|
+
priority: 2,
|
|
199
|
+
estimatedMinutes: 3,
|
|
200
|
+
dependencies: [`${story.id}-discovery`]
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
id: `${story.id}-import`,
|
|
204
|
+
title: 'Intelligent Code Import & Adaptation',
|
|
205
|
+
agent: story.assignedAgent,
|
|
206
|
+
priority: 3,
|
|
207
|
+
estimatedMinutes: 5,
|
|
208
|
+
dependencies: [`${story.id}-analysis`]
|
|
209
|
+
}
|
|
210
|
+
];
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
async generateArchitectTasks(story) {
|
|
214
|
+
return [
|
|
215
|
+
{
|
|
216
|
+
id: `${story.id}-patterns`,
|
|
217
|
+
title: 'Architecture Pattern Analysis',
|
|
218
|
+
agent: story.assignedAgent,
|
|
219
|
+
priority: 1,
|
|
220
|
+
estimatedMinutes: 4,
|
|
221
|
+
dependencies: []
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
id: `${story.id}-recommendations`,
|
|
225
|
+
title: 'Design Improvement Recommendations',
|
|
226
|
+
agent: story.assignedAgent,
|
|
227
|
+
priority: 2,
|
|
228
|
+
estimatedMinutes: 3,
|
|
229
|
+
dependencies: [`${story.id}-patterns`]
|
|
230
|
+
}
|
|
231
|
+
];
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
async generateQATasks(story) {
|
|
235
|
+
return [
|
|
236
|
+
{
|
|
237
|
+
id: `${story.id}-quality`,
|
|
238
|
+
title: 'Code Quality Analysis',
|
|
239
|
+
agent: story.assignedAgent,
|
|
240
|
+
priority: 1,
|
|
241
|
+
estimatedMinutes: 3,
|
|
242
|
+
dependencies: []
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
id: `${story.id}-security`,
|
|
246
|
+
title: 'Security Vulnerability Assessment',
|
|
247
|
+
agent: story.assignedAgent,
|
|
248
|
+
priority: 2,
|
|
249
|
+
estimatedMinutes: 4,
|
|
250
|
+
dependencies: []
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
id: `${story.id}-testing`,
|
|
254
|
+
title: 'Testing Strategy Recommendations',
|
|
255
|
+
agent: story.assignedAgent,
|
|
256
|
+
priority: 3,
|
|
257
|
+
estimatedMinutes: 2,
|
|
258
|
+
dependencies: [`${story.id}-quality`]
|
|
259
|
+
}
|
|
260
|
+
];
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
async generateResearchTasks(story) {
|
|
264
|
+
return [
|
|
265
|
+
{
|
|
266
|
+
id: `${story.id}-stack`,
|
|
267
|
+
title: 'Technology Stack Analysis',
|
|
268
|
+
agent: story.assignedAgent,
|
|
269
|
+
priority: 1,
|
|
270
|
+
estimatedMinutes: 3,
|
|
271
|
+
dependencies: []
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
id: `${story.id}-dependencies`,
|
|
275
|
+
title: 'Dependency Audit & Recommendations',
|
|
276
|
+
agent: story.assignedAgent,
|
|
277
|
+
priority: 2,
|
|
278
|
+
estimatedMinutes: 2,
|
|
279
|
+
dependencies: []
|
|
280
|
+
}
|
|
281
|
+
];
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
async generateContentTasks(story) {
|
|
285
|
+
return [
|
|
286
|
+
{
|
|
287
|
+
id: `${story.id}-docs`,
|
|
288
|
+
title: 'Documentation Analysis & Extraction',
|
|
289
|
+
agent: story.assignedAgent,
|
|
290
|
+
priority: 1,
|
|
291
|
+
estimatedMinutes: 2,
|
|
292
|
+
dependencies: []
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
id: `${story.id}-knowledge`,
|
|
296
|
+
title: 'Knowledge Base Integration',
|
|
297
|
+
agent: story.assignedAgent,
|
|
298
|
+
priority: 2,
|
|
299
|
+
estimatedMinutes: 3,
|
|
300
|
+
dependencies: [`${story.id}-docs`]
|
|
301
|
+
}
|
|
302
|
+
];
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
async generatePerformanceTasks(story) {
|
|
306
|
+
return [
|
|
307
|
+
{
|
|
308
|
+
id: `${story.id}-bottlenecks`,
|
|
309
|
+
title: 'Performance Bottleneck Identification',
|
|
310
|
+
agent: story.assignedAgent,
|
|
311
|
+
priority: 1,
|
|
312
|
+
estimatedMinutes: 4,
|
|
313
|
+
dependencies: []
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
id: `${story.id}-optimization`,
|
|
317
|
+
title: 'Optimization Recommendations',
|
|
318
|
+
agent: story.assignedAgent,
|
|
319
|
+
priority: 2,
|
|
320
|
+
estimatedMinutes: 3,
|
|
321
|
+
dependencies: [`${story.id}-bottlenecks`]
|
|
322
|
+
}
|
|
323
|
+
];
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Define analysis scope for each agent type
|
|
328
|
+
*/
|
|
329
|
+
defineAnalysisScope(agentType, context) {
|
|
330
|
+
const scopes = {
|
|
331
|
+
'ingestor': {
|
|
332
|
+
fileTypes: ['*.ts', '*.tsx', '*.js', '*.jsx', '*.vue', '*.svelte'],
|
|
333
|
+
focus: 'code-discovery-and-import',
|
|
334
|
+
relevanceScoring: true
|
|
335
|
+
},
|
|
336
|
+
'architect': {
|
|
337
|
+
fileTypes: ['package.json', '*.config.*', 'README.md', '/src/**'],
|
|
338
|
+
focus: 'architecture-patterns-and-design',
|
|
339
|
+
systemAnalysis: true
|
|
340
|
+
},
|
|
341
|
+
'qa': {
|
|
342
|
+
fileTypes: ['*.ts', '*.tsx', '*.js', '*.jsx', '*.test.*', '*.spec.*'],
|
|
343
|
+
focus: 'quality-and-security-analysis',
|
|
344
|
+
securityScanning: true
|
|
345
|
+
},
|
|
346
|
+
'research': {
|
|
347
|
+
fileTypes: ['package.json', 'package-lock.json', 'yarn.lock'],
|
|
348
|
+
focus: 'technology-stack-and-dependencies',
|
|
349
|
+
marketAnalysis: true
|
|
350
|
+
},
|
|
351
|
+
'content': {
|
|
352
|
+
fileTypes: ['*.md', 'README.*', '/docs/**', '*.txt'],
|
|
353
|
+
focus: 'documentation-and-knowledge-extraction',
|
|
354
|
+
knowledgeMapping: true
|
|
355
|
+
},
|
|
356
|
+
'performance': {
|
|
357
|
+
fileTypes: ['*.ts', '*.tsx', '*.js', '*.jsx', 'webpack.config.*'],
|
|
358
|
+
focus: 'performance-optimization',
|
|
359
|
+
bottleneckAnalysis: true
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
return scopes[agentType] || {};
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Generate acceptance criteria for each agent type
|
|
368
|
+
*/
|
|
369
|
+
generateAcceptanceCriteria(agentType, context) {
|
|
370
|
+
const criteriaMap = {
|
|
371
|
+
'ingestor': [
|
|
372
|
+
'Project discovery completed with file classification',
|
|
373
|
+
'Context-aware relevance scoring applied (0-1 scale)',
|
|
374
|
+
'Intelligent import with framework adaptation completed',
|
|
375
|
+
'Quality gates passed (4.0+ stars)'
|
|
376
|
+
],
|
|
377
|
+
'architect': [
|
|
378
|
+
'Architecture patterns identified and documented',
|
|
379
|
+
'Design improvement recommendations provided',
|
|
380
|
+
'Scalability assessment completed',
|
|
381
|
+
'Integration recommendations documented'
|
|
382
|
+
],
|
|
383
|
+
'qa': [
|
|
384
|
+
'Code quality analysis completed with scoring',
|
|
385
|
+
'Security vulnerabilities identified and prioritized',
|
|
386
|
+
'Testing strategy recommendations provided',
|
|
387
|
+
'Quality improvement roadmap created'
|
|
388
|
+
],
|
|
389
|
+
'research': [
|
|
390
|
+
'Technology stack analysis completed',
|
|
391
|
+
'Dependency audit with security assessment',
|
|
392
|
+
'Market positioning recommendations',
|
|
393
|
+
'Technology roadmap suggestions provided'
|
|
394
|
+
],
|
|
395
|
+
'content': [
|
|
396
|
+
'Documentation completeness assessment',
|
|
397
|
+
'Knowledge extraction and categorization',
|
|
398
|
+
'Content improvement recommendations',
|
|
399
|
+
'Knowledge base integration plan'
|
|
400
|
+
],
|
|
401
|
+
'performance': [
|
|
402
|
+
'Performance bottlenecks identified and prioritized',
|
|
403
|
+
'Optimization recommendations with impact estimates',
|
|
404
|
+
'Performance monitoring suggestions',
|
|
405
|
+
'Resource utilization analysis completed'
|
|
406
|
+
]
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
return criteriaMap[agentType] || [];
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Aggregate results from all parallel agents
|
|
414
|
+
*/
|
|
415
|
+
async aggregateIngestionResults(agentResults, config) {
|
|
416
|
+
const consolidatedAnalysis = {
|
|
417
|
+
metadata: {
|
|
418
|
+
executionTime: Date.now(),
|
|
419
|
+
agentsDeployed: agentResults.length,
|
|
420
|
+
sourceDirectory: config.source,
|
|
421
|
+
targetFramework: config.framework,
|
|
422
|
+
qualityScores: {}
|
|
423
|
+
},
|
|
424
|
+
discovery: {
|
|
425
|
+
projectsFound: 0,
|
|
426
|
+
filesAnalyzed: 0,
|
|
427
|
+
relevantFiles: 0,
|
|
428
|
+
importRecommendations: []
|
|
429
|
+
},
|
|
430
|
+
analysis: {
|
|
431
|
+
architectureInsights: [],
|
|
432
|
+
qualityIssues: [],
|
|
433
|
+
securityFindings: [],
|
|
434
|
+
performanceBottlenecks: [],
|
|
435
|
+
technologyRecommendations: []
|
|
436
|
+
},
|
|
437
|
+
recommendations: {
|
|
438
|
+
immediate: [],
|
|
439
|
+
shortTerm: [],
|
|
440
|
+
longTerm: []
|
|
441
|
+
},
|
|
442
|
+
qualityMetrics: {
|
|
443
|
+
overallScore: 0,
|
|
444
|
+
codeQuality: 0,
|
|
445
|
+
architecture: 0,
|
|
446
|
+
security: 0,
|
|
447
|
+
performance: 0,
|
|
448
|
+
documentation: 0
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
|
|
452
|
+
// Aggregate results from each agent using existing quality amplification
|
|
453
|
+
for (const result of agentResults) {
|
|
454
|
+
await this.integrateAgentResult(consolidatedAnalysis, result);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
// Calculate compound quality effects using CASCADE methodology
|
|
458
|
+
consolidatedAnalysis.qualityMetrics.overallScore =
|
|
459
|
+
await this.calculateCompoundQuality(consolidatedAnalysis.qualityMetrics);
|
|
460
|
+
|
|
461
|
+
return consolidatedAnalysis;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Integrate individual agent results into consolidated analysis
|
|
466
|
+
*/
|
|
467
|
+
async integrateAgentResult(consolidated, agentResult) {
|
|
468
|
+
const agentType = agentResult.agentSpecialization;
|
|
469
|
+
|
|
470
|
+
// Merge discovery data
|
|
471
|
+
if (agentResult.discovery) {
|
|
472
|
+
consolidated.discovery.projectsFound += agentResult.discovery.projectsFound || 0;
|
|
473
|
+
consolidated.discovery.filesAnalyzed += agentResult.discovery.filesAnalyzed || 0;
|
|
474
|
+
consolidated.discovery.relevantFiles += agentResult.discovery.relevantFiles || 0;
|
|
475
|
+
consolidated.discovery.importRecommendations.push(...(agentResult.discovery.importRecommendations || []));
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
// Merge analysis data based on agent specialization
|
|
479
|
+
if (agentType === 'architect' && agentResult.analysis) {
|
|
480
|
+
consolidated.analysis.architectureInsights.push(...(agentResult.analysis.insights || []));
|
|
481
|
+
}
|
|
482
|
+
if (agentType === 'qa' && agentResult.analysis) {
|
|
483
|
+
consolidated.analysis.qualityIssues.push(...(agentResult.analysis.qualityIssues || []));
|
|
484
|
+
consolidated.analysis.securityFindings.push(...(agentResult.analysis.securityFindings || []));
|
|
485
|
+
}
|
|
486
|
+
if (agentType === 'performance' && agentResult.analysis) {
|
|
487
|
+
consolidated.analysis.performanceBottlenecks.push(...(agentResult.analysis.bottlenecks || []));
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
// Store agent-specific quality scores
|
|
491
|
+
if (agentResult.qualityScore) {
|
|
492
|
+
consolidated.metadata.qualityScores[agentType] = agentResult.qualityScore;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Calculate compound quality score using CASCADE methodology
|
|
498
|
+
*/
|
|
499
|
+
async calculateCompoundQuality(qualityMetrics) {
|
|
500
|
+
// Use existing quality amplification algorithms
|
|
501
|
+
const weights = {
|
|
502
|
+
codeQuality: 0.25,
|
|
503
|
+
architecture: 0.20,
|
|
504
|
+
security: 0.25,
|
|
505
|
+
performance: 0.15,
|
|
506
|
+
documentation: 0.15
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
let weightedSum = 0;
|
|
510
|
+
let totalWeight = 0;
|
|
511
|
+
|
|
512
|
+
for (const [metric, weight] of Object.entries(weights)) {
|
|
513
|
+
if (qualityMetrics[metric] && qualityMetrics[metric] > 0) {
|
|
514
|
+
weightedSum += qualityMetrics[metric] * weight;
|
|
515
|
+
totalWeight += weight;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
return totalWeight > 0 ? (weightedSum / totalWeight) : 0;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
module.exports = { IngestCascadeIntegrator };
|