claude-code-workflow 6.3.49 → 6.3.51
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/commands/issue/new.md +1 -2
- package/.claude/commands/view.md +367 -0
- package/.claude/commands/workflow/unified-execute-with-file.md +807 -0
- package/.claude/skills/ccw-help/SKILL.md +72 -12
- package/.claude/skills/ccw-help/command.json +922 -520
- package/.claude/skills/ccw-help/index/all-agents.json +97 -0
- package/.claude/skills/ccw-help/index/all-commands.json +805 -0
- package/.claude/skills/ccw-help/index/by-category.json +833 -0
- package/.claude/skills/ccw-help/index/by-use-case.json +819 -0
- package/.claude/skills/ccw-help/index/command-relationships.json +160 -0
- package/.claude/skills/ccw-help/index/essential-commands.json +90 -0
- package/.claude/skills/ccw-help/scripts/auto-update.py +34 -0
- package/.claude/skills/skill-generator/SKILL.md +255 -208
- package/.claude/skills/skill-generator/phases/01-requirements-discovery.md +238 -228
- package/.claude/skills/skill-generator/phases/02-structure-generation.md +261 -262
- package/.claude/skills/skill-generator/phases/03-phase-generation.md +976 -969
- package/.claude/skills/skill-generator/phases/04-specs-templates.md +398 -398
- package/.claude/skills/skill-generator/phases/05-validation.md +417 -417
- package/.claude/skills/skill-generator/specs/cli-integration.md +131 -131
- package/.claude/skills/skill-generator/specs/execution-modes.md +399 -396
- package/.claude/skills/skill-generator/specs/reference-docs-spec.md +271 -0
- package/.claude/skills/skill-generator/specs/scripting-integration.md +265 -265
- package/.claude/skills/skill-generator/specs/skill-requirements.md +466 -466
- package/.claude/skills/skill-generator/templates/autonomous-action.md +91 -88
- package/.claude/skills/skill-generator/templates/autonomous-orchestrator.md +89 -89
- package/.claude/skills/skill-generator/templates/code-analysis-action.md +148 -149
- package/.claude/skills/skill-generator/templates/llm-action.md +367 -367
- package/.claude/skills/skill-generator/templates/script-template.md +79 -79
- package/.claude/skills/skill-generator/templates/sequential-phase.md +129 -129
- package/.claude/skills/skill-generator/templates/skill-md.md +134 -75
- package/.codex/prompts/UNIFIED_EXECUTE_COMPARISON.md +205 -0
- package/.codex/prompts/analyze-with-file.md +5 -2
- package/.codex/prompts/brainstorm-to-cycle.md +4 -3
- package/.codex/prompts/brainstorm-with-file.md +6 -2
- package/.codex/prompts/clean.md +7 -2
- package/.codex/prompts/compact.md +5 -3
- package/.codex/prompts/debug-with-file.md +6 -2
- package/.codex/prompts/execute.md +6 -2
- package/.codex/prompts/issue-execute.md +10 -2
- package/.codex/prompts/issue-new.md +390 -285
- package/.codex/prompts/lite-execute.md +8 -7
- package/.codex/prompts/lite-fix.md +6 -2
- package/.codex/prompts/lite-plan-a.md +6 -2
- package/.codex/prompts/lite-plan-b.md +6 -2
- package/.codex/prompts/lite-plan-c.md +6 -2
- package/.codex/prompts/unified-execute-with-file.md +722 -0
- package/.codex/skills/codex-issue-plan-execute/SKILL.md +239 -0
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-complete.md +173 -0
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-execute.md +220 -0
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-init.md +86 -0
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-list.md +165 -0
- package/.codex/skills/codex-issue-plan-execute/phases/actions/action-plan.md +170 -0
- package/.codex/skills/codex-issue-plan-execute/phases/orchestrator.md +210 -0
- package/.codex/skills/codex-issue-plan-execute/phases/state-schema.md +136 -0
- package/.codex/skills/codex-issue-plan-execute/prompts/execution-agent-system.md +136 -0
- package/.codex/skills/codex-issue-plan-execute/prompts/execution-agent.md +135 -0
- package/.codex/skills/codex-issue-plan-execute/prompts/planning-agent-system.md +107 -0
- package/.codex/skills/codex-issue-plan-execute/prompts/planning-agent.md +122 -0
- package/.codex/skills/codex-issue-plan-execute/specs/issue-handling.md +187 -0
- package/.codex/skills/codex-issue-plan-execute/specs/quality-standards.md +231 -0
- package/.codex/skills/codex-issue-plan-execute/specs/solution-schema.md +270 -0
- package/.codex/skills/codex-issue-plan-execute/specs/subagent-roles.md +268 -0
- package/ccw/dist/cli.d.ts.map +1 -1
- package/ccw/dist/cli.js +1 -0
- package/ccw/dist/cli.js.map +1 -1
- package/ccw/dist/commands/cli.d.ts +1 -0
- package/ccw/dist/commands/cli.d.ts.map +1 -1
- package/ccw/dist/commands/cli.js +74 -6
- package/ccw/dist/commands/cli.js.map +1 -1
- package/ccw/dist/core/routes/cli-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/cli-routes.js +16 -1
- package/ccw/dist/core/routes/cli-routes.js.map +1 -1
- package/ccw/dist/core/routes/help-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/help-routes.js +51 -1
- package/ccw/dist/core/routes/help-routes.js.map +1 -1
- package/ccw/dist/tools/cli-executor-core.d.ts.map +1 -1
- package/ccw/dist/tools/cli-executor-core.js +5 -3
- package/ccw/dist/tools/cli-executor-core.js.map +1 -1
- package/ccw/dist/tools/cli-executor-utils.d.ts +1 -0
- package/ccw/dist/tools/cli-executor-utils.d.ts.map +1 -1
- package/ccw/dist/tools/cli-executor-utils.js +3 -1
- package/ccw/dist/tools/cli-executor-utils.js.map +1 -1
- package/ccw/src/cli.ts +1 -0
- package/ccw/src/commands/cli.ts +77 -6
- package/ccw/src/core/routes/cli-routes.ts +16 -1
- package/ccw/src/core/routes/help-routes.ts +60 -1
- package/ccw/src/templates/dashboard-js/views/help.js +423 -1
- package/ccw/src/tools/cli-executor-core.ts +6 -3
- package/ccw/src/tools/cli-executor-utils.ts +5 -2
- package/package.json +1 -1
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
# Code Analysis Action Template
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Code analysis action template for integrating code exploration and analysis capabilities into a Skill.
|
|
4
4
|
|
|
5
5
|
## Purpose
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Generate code analysis actions for a Skill, integrating MCP tools (ACE) and Agents for semantic search and in-depth analysis.
|
|
8
8
|
|
|
9
9
|
## Usage Context
|
|
10
10
|
|
|
11
11
|
| Phase | Usage |
|
|
12
12
|
|-------|-------|
|
|
13
|
-
| Optional |
|
|
14
|
-
| Generation Trigger |
|
|
13
|
+
| Optional | Use when Skill requires code exploration and analysis capabilities |
|
|
14
|
+
| Generation Trigger | User selects to add code-analysis action type |
|
|
15
15
|
| Agent Types | Explore, cli-explore-agent, universal-executor |
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Configuration Structure
|
|
20
20
|
|
|
21
21
|
```typescript
|
|
22
22
|
interface CodeAnalysisActionConfig {
|
|
23
23
|
id: string; // "analyze-structure", "explore-patterns"
|
|
24
24
|
name: string; // "Code Structure Analysis"
|
|
25
|
-
type: 'code-analysis'; //
|
|
25
|
+
type: 'code-analysis'; // Action type identifier
|
|
26
26
|
|
|
27
|
-
//
|
|
27
|
+
// Analysis scope
|
|
28
28
|
scope: {
|
|
29
|
-
paths: string[]; //
|
|
30
|
-
patterns: string[]; // Glob
|
|
31
|
-
excludes?: string[]; //
|
|
29
|
+
paths: string[]; // Target paths
|
|
30
|
+
patterns: string[]; // Glob patterns
|
|
31
|
+
excludes?: string[]; // Exclude patterns
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
//
|
|
34
|
+
// Analysis type
|
|
35
35
|
analysis_type: 'structure' | 'patterns' | 'dependencies' | 'quality' | 'security';
|
|
36
36
|
|
|
37
|
-
// Agent
|
|
37
|
+
// Agent config
|
|
38
38
|
agent: {
|
|
39
39
|
type: 'Explore' | 'cli-explore-agent' | 'universal-executor';
|
|
40
40
|
thoroughness: 'quick' | 'medium' | 'very thorough';
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
//
|
|
43
|
+
// Output config
|
|
44
44
|
output: {
|
|
45
45
|
format: 'json' | 'markdown';
|
|
46
46
|
file: string;
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
// MCP
|
|
49
|
+
// MCP tool enhancement
|
|
50
50
|
mcp_tools?: string[]; // ['mcp__ace-tool__search_context']
|
|
51
51
|
}
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
---
|
|
55
55
|
|
|
56
|
-
##
|
|
56
|
+
## Template Generation Function
|
|
57
57
|
|
|
58
58
|
```javascript
|
|
59
59
|
function generateCodeAnalysisAction(config) {
|
|
@@ -64,20 +64,20 @@ function generateCodeAnalysisAction(config) {
|
|
|
64
64
|
|
|
65
65
|
## Action: ${id}
|
|
66
66
|
|
|
67
|
-
###
|
|
67
|
+
### Analysis Scope
|
|
68
68
|
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
${scope.excludes ? `-
|
|
69
|
+
- **Paths**: ${scope.paths.join(', ')}
|
|
70
|
+
- **Patterns**: ${scope.patterns.join(', ')}
|
|
71
|
+
${scope.excludes ? `- **Excludes**: ${scope.excludes.join(', ')}` : ''}
|
|
72
72
|
|
|
73
|
-
###
|
|
73
|
+
### Execution Logic
|
|
74
74
|
|
|
75
75
|
\`\`\`javascript
|
|
76
76
|
async function execute${toPascalCase(id)}(context) {
|
|
77
77
|
const workDir = context.workDir;
|
|
78
78
|
const results = [];
|
|
79
79
|
|
|
80
|
-
// 1.
|
|
80
|
+
// 1. File discovery
|
|
81
81
|
const files = await discoverFiles({
|
|
82
82
|
paths: ${JSON.stringify(scope.paths)},
|
|
83
83
|
patterns: ${JSON.stringify(scope.patterns)},
|
|
@@ -86,34 +86,34 @@ async function execute${toPascalCase(id)}(context) {
|
|
|
86
86
|
|
|
87
87
|
console.log(\`Found \${files.length} files to analyze\`);
|
|
88
88
|
|
|
89
|
-
// 2.
|
|
90
|
-
${mcp_tools.length > 0 ?
|
|
89
|
+
// 2. Semantic search using MCP tools (if configured)
|
|
90
|
+
${mcp_tools.length > 0 ? \`
|
|
91
91
|
const semanticResults = await mcp__ace_tool__search_context({
|
|
92
92
|
project_root_path: context.projectRoot,
|
|
93
|
-
query: '
|
|
93
|
+
query: '\${getQueryForAnalysisType(analysis_type)}'
|
|
94
94
|
});
|
|
95
95
|
results.push({ type: 'semantic', data: semanticResults });
|
|
96
|
-
|
|
96
|
+
\` : '// No MCP tools configured'}
|
|
97
97
|
|
|
98
|
-
// 3.
|
|
98
|
+
// 3. Launch Agent for in-depth analysis
|
|
99
99
|
const agentResult = await Task({
|
|
100
|
-
subagent_type: '
|
|
100
|
+
subagent_type: '\${agent.type}',
|
|
101
101
|
prompt: \`
|
|
102
|
-
|
|
102
|
+
\${generateAgentPrompt(analysis_type, scope)}
|
|
103
103
|
\`,
|
|
104
104
|
run_in_background: false
|
|
105
105
|
});
|
|
106
106
|
|
|
107
107
|
results.push({ type: 'agent', data: agentResult });
|
|
108
108
|
|
|
109
|
-
// 4.
|
|
109
|
+
// 4. Aggregate results
|
|
110
110
|
const summary = aggregateResults(results);
|
|
111
111
|
|
|
112
|
-
// 5.
|
|
112
|
+
// 5. Output results
|
|
113
113
|
const outputPath = \`\${workDir}/${output.file}\`;
|
|
114
114
|
${output.format === 'json'
|
|
115
|
-
?
|
|
116
|
-
:
|
|
115
|
+
? \`Write(outputPath, JSON.stringify(summary, null, 2));\`
|
|
116
|
+
: \`Write(outputPath, formatAsMarkdown(summary));\`}
|
|
117
117
|
|
|
118
118
|
return {
|
|
119
119
|
success: true,
|
|
@@ -122,8 +122,7 @@ ${generateAgentPrompt(analysis_type, scope)}
|
|
|
122
122
|
analysis_type: '${analysis_type}'
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
|
|
126
|
-
`;
|
|
125
|
+
\`\`\`;
|
|
127
126
|
}
|
|
128
127
|
|
|
129
128
|
function getQueryForAnalysisType(type) {
|
|
@@ -139,101 +138,101 @@ function getQueryForAnalysisType(type) {
|
|
|
139
138
|
|
|
140
139
|
function generateAgentPrompt(type, scope) {
|
|
141
140
|
const prompts = {
|
|
142
|
-
structure:
|
|
143
|
-
|
|
141
|
+
structure: \`Analyze code structure of the following paths:
|
|
142
|
+
\${scope.paths.map(p => \`- \${p}\`).join('\\n')}
|
|
144
143
|
|
|
145
|
-
|
|
146
|
-
1.
|
|
147
|
-
2.
|
|
148
|
-
3.
|
|
149
|
-
4.
|
|
144
|
+
Tasks:
|
|
145
|
+
1. Identify main modules and entry points
|
|
146
|
+
2. Analyze directory organization structure
|
|
147
|
+
3. Extract module import/export relationships
|
|
148
|
+
4. Generate structure overview diagram (Mermaid)
|
|
150
149
|
|
|
151
|
-
|
|
150
|
+
Output format: JSON
|
|
152
151
|
{
|
|
153
152
|
"modules": [...],
|
|
154
153
|
"entry_points": [...],
|
|
155
154
|
"structure_diagram": "mermaid code"
|
|
156
|
-
}
|
|
155
|
+
}\`,
|
|
157
156
|
|
|
158
|
-
patterns:
|
|
159
|
-
|
|
157
|
+
patterns: \`Analyze design patterns in the following paths:
|
|
158
|
+
\${scope.paths.map(p => \`- \${p}\`).join('\\n')}
|
|
160
159
|
|
|
161
|
-
|
|
162
|
-
1.
|
|
163
|
-
2.
|
|
164
|
-
3.
|
|
165
|
-
4.
|
|
160
|
+
Tasks:
|
|
161
|
+
1. Identify design patterns used (Factory, Strategy, Observer, etc.)
|
|
162
|
+
2. Analyze abstraction levels
|
|
163
|
+
3. Evaluate appropriateness of pattern usage
|
|
164
|
+
4. Extract reusable pattern instances
|
|
166
165
|
|
|
167
|
-
|
|
166
|
+
Output format: JSON
|
|
168
167
|
{
|
|
169
168
|
"patterns": [{ "name": "...", "location": "...", "usage": "..." }],
|
|
170
169
|
"abstractions": [...],
|
|
171
170
|
"reusable_components": [...]
|
|
172
|
-
}
|
|
171
|
+
}\`,
|
|
173
172
|
|
|
174
|
-
dependencies:
|
|
175
|
-
|
|
173
|
+
dependencies: \`Analyze dependencies in the following paths:
|
|
174
|
+
\${scope.paths.map(p => \`- \${p}\`).join('\\n')}
|
|
176
175
|
|
|
177
|
-
|
|
178
|
-
1.
|
|
179
|
-
2.
|
|
180
|
-
3.
|
|
181
|
-
4.
|
|
176
|
+
Tasks:
|
|
177
|
+
1. Extract internal module dependencies
|
|
178
|
+
2. Identify external package dependencies
|
|
179
|
+
3. Analyze coupling degree
|
|
180
|
+
4. Detect circular dependencies
|
|
182
181
|
|
|
183
|
-
|
|
182
|
+
Output format: JSON
|
|
184
183
|
{
|
|
185
184
|
"internal_deps": [...],
|
|
186
185
|
"external_deps": [...],
|
|
187
186
|
"coupling_score": 0-100,
|
|
188
187
|
"circular_deps": [...]
|
|
189
|
-
}
|
|
188
|
+
}\`,
|
|
190
189
|
|
|
191
|
-
quality:
|
|
192
|
-
|
|
190
|
+
quality: \`Analyze code quality in the following paths:
|
|
191
|
+
\${scope.paths.map(p => \`- \${p}\`).join('\\n')}
|
|
193
192
|
|
|
194
|
-
|
|
195
|
-
1.
|
|
196
|
-
2.
|
|
197
|
-
3.
|
|
198
|
-
4.
|
|
193
|
+
Tasks:
|
|
194
|
+
1. Assess code complexity
|
|
195
|
+
2. Check test coverage
|
|
196
|
+
3. Analyze documentation completeness
|
|
197
|
+
4. Identify technical debt
|
|
199
198
|
|
|
200
|
-
|
|
199
|
+
Output format: JSON
|
|
201
200
|
{
|
|
202
201
|
"complexity": { "avg": 0, "max": 0, "hotspots": [...] },
|
|
203
202
|
"test_coverage": { "percentage": 0, "gaps": [...] },
|
|
204
203
|
"documentation": { "score": 0, "missing": [...] },
|
|
205
204
|
"tech_debt": [...]
|
|
206
|
-
}
|
|
205
|
+
}\`,
|
|
207
206
|
|
|
208
|
-
security:
|
|
209
|
-
|
|
207
|
+
security: \`Analyze security in the following paths:
|
|
208
|
+
\${scope.paths.map(p => \`- \${p}\`).join('\\n')}
|
|
210
209
|
|
|
211
|
-
|
|
212
|
-
1.
|
|
213
|
-
2.
|
|
214
|
-
3.
|
|
215
|
-
4.
|
|
210
|
+
Tasks:
|
|
211
|
+
1. Check authentication/authorization implementation
|
|
212
|
+
2. Analyze input validation
|
|
213
|
+
3. Detect sensitive data handling
|
|
214
|
+
4. Identify common vulnerability patterns
|
|
216
215
|
|
|
217
|
-
|
|
216
|
+
Output format: JSON
|
|
218
217
|
{
|
|
219
218
|
"auth": { "methods": [...], "issues": [...] },
|
|
220
219
|
"input_validation": { "coverage": 0, "gaps": [...] },
|
|
221
220
|
"sensitive_data": { "found": [...], "protected": true/false },
|
|
222
221
|
"vulnerabilities": [{ "type": "...", "severity": "...", "location": "..." }]
|
|
223
|
-
}
|
|
222
|
+
}\`
|
|
224
223
|
};
|
|
225
224
|
|
|
226
225
|
return prompts[type] || prompts.structure;
|
|
227
226
|
}
|
|
228
|
-
|
|
227
|
+
\`\`\`
|
|
229
228
|
|
|
230
229
|
---
|
|
231
230
|
|
|
232
|
-
##
|
|
231
|
+
## Preset Code Analysis Actions
|
|
233
232
|
|
|
234
|
-
### 1.
|
|
233
|
+
### 1. Project Structure Analysis
|
|
235
234
|
|
|
236
|
-
|
|
235
|
+
\`\`\`yaml
|
|
237
236
|
id: analyze-project-structure
|
|
238
237
|
name: Project Structure Analysis
|
|
239
238
|
type: code-analysis
|
|
@@ -255,11 +254,11 @@ output:
|
|
|
255
254
|
file: structure-analysis.json
|
|
256
255
|
mcp_tools:
|
|
257
256
|
- mcp__ace-tool__search_context
|
|
258
|
-
|
|
257
|
+
\`\`\`
|
|
259
258
|
|
|
260
|
-
### 2.
|
|
259
|
+
### 2. Design Pattern Extraction
|
|
261
260
|
|
|
262
|
-
|
|
261
|
+
\`\`\`yaml
|
|
263
262
|
id: extract-design-patterns
|
|
264
263
|
name: Design Pattern Extraction
|
|
265
264
|
type: code-analysis
|
|
@@ -275,11 +274,11 @@ agent:
|
|
|
275
274
|
output:
|
|
276
275
|
format: markdown
|
|
277
276
|
file: patterns-report.md
|
|
278
|
-
|
|
277
|
+
\`\`\`
|
|
279
278
|
|
|
280
|
-
### 3.
|
|
279
|
+
### 3. Dependency Analysis
|
|
281
280
|
|
|
282
|
-
|
|
281
|
+
\`\`\`yaml
|
|
283
282
|
id: analyze-dependencies
|
|
284
283
|
name: Dependency Analysis
|
|
285
284
|
type: code-analysis
|
|
@@ -297,11 +296,11 @@ agent:
|
|
|
297
296
|
output:
|
|
298
297
|
format: json
|
|
299
298
|
file: dependency-graph.json
|
|
300
|
-
|
|
299
|
+
\`\`\`
|
|
301
300
|
|
|
302
|
-
### 4.
|
|
301
|
+
### 4. Security Audit
|
|
303
302
|
|
|
304
|
-
|
|
303
|
+
\`\`\`yaml
|
|
305
304
|
id: security-audit
|
|
306
305
|
name: Security Audit
|
|
307
306
|
type: code-analysis
|
|
@@ -320,15 +319,15 @@ output:
|
|
|
320
319
|
file: security-report.json
|
|
321
320
|
mcp_tools:
|
|
322
321
|
- mcp__ace-tool__search_context
|
|
323
|
-
|
|
322
|
+
\`\`\`
|
|
324
323
|
|
|
325
324
|
---
|
|
326
325
|
|
|
327
|
-
##
|
|
326
|
+
## Usage Examples
|
|
328
327
|
|
|
329
|
-
###
|
|
328
|
+
### Using in Phase
|
|
330
329
|
|
|
331
|
-
|
|
330
|
+
\`\`\`javascript
|
|
332
331
|
// phases/01-code-exploration.md
|
|
333
332
|
|
|
334
333
|
const analysisConfig = {
|
|
@@ -351,14 +350,14 @@ const analysisConfig = {
|
|
|
351
350
|
}
|
|
352
351
|
};
|
|
353
352
|
|
|
354
|
-
//
|
|
353
|
+
// Execute
|
|
355
354
|
const result = await executeCodeAnalysis(analysisConfig, context);
|
|
356
|
-
|
|
355
|
+
\`\`\`
|
|
357
356
|
|
|
358
|
-
###
|
|
357
|
+
### Combining Multiple Analyses
|
|
359
358
|
|
|
360
|
-
|
|
361
|
-
//
|
|
359
|
+
\`\`\`javascript
|
|
360
|
+
// Serial execution of multiple analyses
|
|
362
361
|
const analyses = [
|
|
363
362
|
{ type: 'structure', file: 'structure.json' },
|
|
364
363
|
{ type: 'patterns', file: 'patterns.json' },
|
|
@@ -373,7 +372,7 @@ for (const analysis of analyses) {
|
|
|
373
372
|
}, context);
|
|
374
373
|
}
|
|
375
374
|
|
|
376
|
-
//
|
|
375
|
+
// Parallel execution (independent analyses)
|
|
377
376
|
const parallelResults = await Promise.all(
|
|
378
377
|
analyses.map(a => executeCodeAnalysis({
|
|
379
378
|
...baseConfig,
|
|
@@ -381,51 +380,51 @@ const parallelResults = await Promise.all(
|
|
|
381
380
|
output: { format: 'json', file: a.file }
|
|
382
381
|
}, context))
|
|
383
382
|
);
|
|
384
|
-
|
|
383
|
+
\`\`\`
|
|
385
384
|
|
|
386
385
|
---
|
|
387
386
|
|
|
388
|
-
## Agent
|
|
387
|
+
## Agent Selection Guide
|
|
389
388
|
|
|
390
|
-
|
|
|
391
|
-
|
|
392
|
-
| structure | Explore | medium |
|
|
393
|
-
| patterns | cli-explore-agent | very thorough |
|
|
394
|
-
| dependencies | Explore | medium |
|
|
395
|
-
| quality | universal-executor | medium |
|
|
396
|
-
| security | universal-executor | very thorough |
|
|
389
|
+
| Analysis Type | Recommended Agent | Thoroughness | Reason |
|
|
390
|
+
|-------------|-----------------|--------------|--------|
|
|
391
|
+
| structure | Explore | medium | Quick directory structure retrieval |
|
|
392
|
+
| patterns | cli-explore-agent | very thorough | Requires deep code understanding |
|
|
393
|
+
| dependencies | Explore | medium | Mainly analyzes import statements |
|
|
394
|
+
| quality | universal-executor | medium | Requires running analysis tools |
|
|
395
|
+
| security | universal-executor | very thorough | Requires comprehensive scanning |
|
|
397
396
|
|
|
398
397
|
---
|
|
399
398
|
|
|
400
|
-
## MCP
|
|
399
|
+
## MCP Tool Integration
|
|
401
400
|
|
|
402
|
-
###
|
|
401
|
+
### Semantic Search Enhancement
|
|
403
402
|
|
|
404
|
-
|
|
405
|
-
//
|
|
403
|
+
\`\`\`javascript
|
|
404
|
+
// Use ACE tool for semantic search
|
|
406
405
|
const semanticContext = await mcp__ace_tool__search_context({
|
|
407
406
|
project_root_path: projectRoot,
|
|
408
407
|
query: 'authentication logic, user session management'
|
|
409
408
|
});
|
|
410
409
|
|
|
411
|
-
//
|
|
410
|
+
// Use semantic search results as Agent input context
|
|
412
411
|
const agentResult = await Task({
|
|
413
412
|
subagent_type: 'Explore',
|
|
414
|
-
prompt:
|
|
415
|
-
|
|
413
|
+
prompt: \`
|
|
414
|
+
Based on following semantic search results, perform in-depth analysis:
|
|
416
415
|
|
|
417
|
-
|
|
416
|
+
\${semanticContext}
|
|
418
417
|
|
|
419
|
-
|
|
420
|
-
|
|
418
|
+
Task: Analyze authentication logic implementation details...
|
|
419
|
+
\`,
|
|
421
420
|
run_in_background: false
|
|
422
421
|
});
|
|
423
|
-
|
|
422
|
+
\`\`\`
|
|
424
423
|
|
|
425
|
-
### smart_search
|
|
424
|
+
### smart_search Integration
|
|
426
425
|
|
|
427
|
-
|
|
428
|
-
//
|
|
426
|
+
\`\`\`javascript
|
|
427
|
+
// Use smart_search for exact matching
|
|
429
428
|
const exactMatches = await mcp__ccw_tools__smart_search({
|
|
430
429
|
action: 'search',
|
|
431
430
|
query: 'class.*Controller',
|
|
@@ -433,19 +432,19 @@ const exactMatches = await mcp__ccw_tools__smart_search({
|
|
|
433
432
|
path: 'src/'
|
|
434
433
|
});
|
|
435
434
|
|
|
436
|
-
//
|
|
435
|
+
// Use find_files for file discovery
|
|
437
436
|
const configFiles = await mcp__ccw_tools__smart_search({
|
|
438
437
|
action: 'find_files',
|
|
439
438
|
pattern: '**/*.config.ts',
|
|
440
439
|
path: 'src/'
|
|
441
440
|
});
|
|
442
|
-
|
|
441
|
+
\`\`\`
|
|
443
442
|
|
|
444
443
|
---
|
|
445
444
|
|
|
446
|
-
##
|
|
445
|
+
## Results Aggregation
|
|
447
446
|
|
|
448
|
-
|
|
447
|
+
\`\`\`javascript
|
|
449
448
|
function aggregateResults(results) {
|
|
450
449
|
const aggregated = {
|
|
451
450
|
timestamp: new Date().toISOString(),
|
|
@@ -478,38 +477,38 @@ function aggregateResults(results) {
|
|
|
478
477
|
}
|
|
479
478
|
|
|
480
479
|
function extractKeyFindings(agentResult) {
|
|
481
|
-
//
|
|
482
|
-
//
|
|
480
|
+
// Extract key findings from Agent result
|
|
481
|
+
// Implementation depends on Agent output format
|
|
483
482
|
return {
|
|
484
483
|
modules: agentResult.modules?.length || 0,
|
|
485
484
|
patterns: agentResult.patterns?.length || 0,
|
|
486
485
|
issues: agentResult.issues?.length || 0
|
|
487
486
|
};
|
|
488
487
|
}
|
|
489
|
-
|
|
488
|
+
\`\`\`
|
|
490
489
|
|
|
491
490
|
---
|
|
492
491
|
|
|
493
|
-
##
|
|
492
|
+
## Best Practices
|
|
494
493
|
|
|
495
|
-
1.
|
|
496
|
-
-
|
|
497
|
-
-
|
|
494
|
+
1. **Scope Control**
|
|
495
|
+
- Use precise patterns to reduce analysis scope
|
|
496
|
+
- Configure excludes to ignore irrelevant files
|
|
498
497
|
|
|
499
|
-
2. **Agent
|
|
500
|
-
-
|
|
501
|
-
-
|
|
502
|
-
-
|
|
498
|
+
2. **Agent Selection**
|
|
499
|
+
- Use Explore for quick exploration
|
|
500
|
+
- Use cli-explore-agent for in-depth analysis
|
|
501
|
+
- Use universal-executor when execution is required
|
|
503
502
|
|
|
504
|
-
3. **MCP
|
|
505
|
-
-
|
|
506
|
-
-
|
|
507
|
-
-
|
|
503
|
+
3. **MCP Tool Combination**
|
|
504
|
+
- First use mcp__ace-tool__search_context for semantic context
|
|
505
|
+
- Then use Agent for in-depth analysis
|
|
506
|
+
- Finally use smart_search for exact matching
|
|
508
507
|
|
|
509
|
-
4.
|
|
510
|
-
-
|
|
511
|
-
-
|
|
508
|
+
4. **Result Caching**
|
|
509
|
+
- Persist analysis results to workDir
|
|
510
|
+
- Subsequent phases can read directly, avoiding re-analysis
|
|
512
511
|
|
|
513
512
|
5. **Brief Returns**
|
|
514
|
-
- Agent
|
|
515
|
-
-
|
|
513
|
+
- Agent returns path + summary, not full content
|
|
514
|
+
- Prevents context overflow
|