add-skill-kit 3.2.3 → 3.2.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/lib/agent-cli/lib/audit.js +154 -0
- package/lib/agent-cli/lib/audit.test.js +100 -0
- package/lib/agent-cli/lib/auto-learn.js +319 -0
- package/lib/agent-cli/lib/auto_preview.py +148 -0
- package/lib/agent-cli/lib/backup.js +138 -0
- package/lib/agent-cli/lib/backup.test.js +78 -0
- package/lib/agent-cli/lib/checklist.py +222 -0
- package/lib/agent-cli/lib/cognitive-lesson.js +476 -0
- package/lib/agent-cli/lib/completion.js +149 -0
- package/lib/agent-cli/lib/config.js +35 -0
- package/lib/agent-cli/lib/eslint-fix.js +238 -0
- package/lib/agent-cli/lib/evolution-signal.js +215 -0
- package/lib/agent-cli/lib/export.js +86 -0
- package/lib/agent-cli/lib/export.test.js +65 -0
- package/lib/agent-cli/lib/fix.js +337 -0
- package/lib/agent-cli/lib/fix.test.js +80 -0
- package/lib/agent-cli/lib/gemini-export.js +83 -0
- package/lib/agent-cli/lib/generate-registry.js +42 -0
- package/lib/agent-cli/lib/hooks/install-hooks.js +152 -0
- package/lib/agent-cli/lib/hooks/lint-learn.js +172 -0
- package/lib/agent-cli/lib/ignore.js +116 -0
- package/lib/agent-cli/lib/ignore.test.js +58 -0
- package/lib/agent-cli/lib/init.js +124 -0
- package/lib/agent-cli/lib/learn.js +255 -0
- package/lib/agent-cli/lib/learn.test.js +70 -0
- package/lib/agent-cli/lib/migrate-to-v4.js +322 -0
- package/lib/agent-cli/lib/proposals.js +199 -0
- package/lib/agent-cli/lib/proposals.test.js +56 -0
- package/lib/agent-cli/lib/recall.js +820 -0
- package/lib/agent-cli/lib/recall.test.js +107 -0
- package/lib/agent-cli/lib/selfevolution-bridge.js +167 -0
- package/lib/agent-cli/lib/session_manager.py +120 -0
- package/lib/agent-cli/lib/settings.js +203 -0
- package/lib/agent-cli/lib/skill-learn.js +296 -0
- package/lib/agent-cli/lib/stats.js +132 -0
- package/lib/agent-cli/lib/stats.test.js +94 -0
- package/lib/agent-cli/lib/types.js +33 -0
- package/lib/agent-cli/lib/ui/audit-ui.js +146 -0
- package/lib/agent-cli/lib/ui/backup-ui.js +107 -0
- package/lib/agent-cli/lib/ui/clack-helpers.js +317 -0
- package/lib/agent-cli/lib/ui/common.js +83 -0
- package/lib/agent-cli/lib/ui/completion-ui.js +126 -0
- package/lib/agent-cli/lib/ui/custom-select.js +69 -0
- package/lib/agent-cli/lib/ui/dashboard-ui.js +123 -0
- package/lib/agent-cli/lib/ui/evolution-signals-ui.js +107 -0
- package/lib/agent-cli/lib/ui/export-ui.js +94 -0
- package/lib/agent-cli/lib/ui/fix-all-ui.js +191 -0
- package/lib/agent-cli/lib/ui/help-ui.js +49 -0
- package/lib/agent-cli/lib/ui/index.js +169 -0
- package/lib/agent-cli/lib/ui/init-ui.js +56 -0
- package/lib/agent-cli/lib/ui/knowledge-ui.js +55 -0
- package/lib/agent-cli/lib/ui/learn-ui.js +706 -0
- package/lib/agent-cli/lib/ui/lessons-ui.js +148 -0
- package/lib/agent-cli/lib/ui/pretty.js +145 -0
- package/lib/agent-cli/lib/ui/proposals-ui.js +99 -0
- package/lib/agent-cli/lib/ui/recall-ui.js +342 -0
- package/lib/agent-cli/lib/ui/routing-demo.js +79 -0
- package/lib/agent-cli/lib/ui/routing-ui.js +325 -0
- package/lib/agent-cli/lib/ui/settings-ui.js +381 -0
- package/lib/agent-cli/lib/ui/stats-ui.js +123 -0
- package/lib/agent-cli/lib/ui/watch-ui.js +236 -0
- package/lib/agent-cli/lib/verify_all.py +327 -0
- package/lib/agent-cli/lib/watcher.js +181 -0
- package/lib/agent-cli/lib/watcher.test.js +85 -0
- package/lib/agent-cli/package.json +51 -0
- package/lib/agentskillskit-cli/README.md +21 -0
- package/lib/agentskillskit-cli/ag-smart.js +158 -0
- package/lib/agentskillskit-cli/package.json +51 -0
- package/package.json +10 -6
- /package/{node_modules/agentskillskit-cli → lib/agent-cli}/README.md +0 -0
- /package/{node_modules/agentskillskit-cli → lib/agent-cli}/bin/ag-smart.js +0 -0
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recall UI - Scan files for violations
|
|
3
|
+
*/
|
|
4
|
+
import {
|
|
5
|
+
showIntro,
|
|
6
|
+
textInput,
|
|
7
|
+
createSpinner,
|
|
8
|
+
showSuccessNote,
|
|
9
|
+
showErrorNote,
|
|
10
|
+
theme,
|
|
11
|
+
} from "./clack-helpers.js";
|
|
12
|
+
import { scanDirectory, loadKnowledge, saveKnowledge, scanDirectoryStructured, saveScanResult } from "../recall.js";
|
|
13
|
+
import * as p from "@clack/prompts";
|
|
14
|
+
import fs from "fs";
|
|
15
|
+
import path from "path";
|
|
16
|
+
|
|
17
|
+
// ============================================================================
|
|
18
|
+
// GOVERNANCE CHECK
|
|
19
|
+
// ============================================================================
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Check if governance files exist
|
|
23
|
+
* @param {string} projectRoot
|
|
24
|
+
* @returns {{ passed: boolean, details: string[] }}
|
|
25
|
+
*/
|
|
26
|
+
function checkGovernance(projectRoot) {
|
|
27
|
+
const details = [];
|
|
28
|
+
let passed = true;
|
|
29
|
+
|
|
30
|
+
const governanceFiles = [
|
|
31
|
+
{ path: path.join(projectRoot, ".agent", "GEMINI.md"), name: "GEMINI.md" },
|
|
32
|
+
{ path: path.join(projectRoot, ".agent", "ARCHITECTURE.md"), name: "ARCHITECTURE.md" }
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
governanceFiles.forEach(file => {
|
|
36
|
+
if (fs.existsSync(file.path)) {
|
|
37
|
+
details.push(`✓ ${file.name} found`);
|
|
38
|
+
} else {
|
|
39
|
+
details.push(`⚠ ${file.name} not found (optional)`);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// Check for skills
|
|
44
|
+
const skillsDir = path.join(projectRoot, ".agent", "skills");
|
|
45
|
+
if (fs.existsSync(skillsDir)) {
|
|
46
|
+
try {
|
|
47
|
+
const skills = fs.readdirSync(skillsDir).filter(f =>
|
|
48
|
+
fs.statSync(path.join(skillsDir, f)).isDirectory()
|
|
49
|
+
);
|
|
50
|
+
details.push(`✓ ${skills.length} skill(s) loaded`);
|
|
51
|
+
} catch (e) {
|
|
52
|
+
details.push(`○ Skills directory not accessible`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return { passed, details };
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// ============================================================================
|
|
60
|
+
// RECALL UI
|
|
61
|
+
// ============================================================================
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Show detailed violation breakdown after scan
|
|
65
|
+
*/
|
|
66
|
+
async function showViolationDetails(scanResult) {
|
|
67
|
+
console.log(`\n${'─'.repeat(60)}`);
|
|
68
|
+
console.log(`${theme.primary('📋 Violation Details')}`);
|
|
69
|
+
console.log(`${'─'.repeat(60)}\n`);
|
|
70
|
+
|
|
71
|
+
// Group by severity
|
|
72
|
+
const errors = scanResult.issues.filter(i => i.severity === 'ERROR');
|
|
73
|
+
const warnings = scanResult.issues.filter(i => i.severity === 'WARNING');
|
|
74
|
+
|
|
75
|
+
// Show summary
|
|
76
|
+
console.log(theme.bold('Summary:'));
|
|
77
|
+
console.log(` ${theme.error('✗')} ${errors.length} errors`);
|
|
78
|
+
console.log(` ${theme.warning('⚠')} ${warnings.length} warnings`);
|
|
79
|
+
console.log(` Total: ${scanResult.totalIssues} violations\n`);
|
|
80
|
+
|
|
81
|
+
// Group by file
|
|
82
|
+
const byFile = {};
|
|
83
|
+
scanResult.issues.forEach(issue => {
|
|
84
|
+
const file = path.relative(process.cwd(), issue.file);
|
|
85
|
+
if (!byFile[file]) byFile[file] = [];
|
|
86
|
+
byFile[file].push(issue);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
const fileList = Object.entries(byFile).sort((a, b) => b[1].length - a[1].length);
|
|
90
|
+
|
|
91
|
+
console.log(theme.bold('Top Files with Issues:'));
|
|
92
|
+
fileList.slice(0, 10).forEach(([file, issues], i) => {
|
|
93
|
+
const errorCount = issues.filter(i => i.severity === 'ERROR').length;
|
|
94
|
+
const warnCount = issues.filter(i => i.severity === 'WARNING').length;
|
|
95
|
+
console.log(` ${i + 1}. ${theme.primary(file)}`);
|
|
96
|
+
console.log(` ${theme.error(`${errorCount} errors`)} • ${theme.warning(`${warnCount} warnings`)}`);
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
if (fileList.length > 10) {
|
|
100
|
+
console.log(theme.dim(`\n ... and ${fileList.length - 10} more files`));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
console.log(`\n${'─'.repeat(60)}\n`);
|
|
104
|
+
|
|
105
|
+
// Wait for user
|
|
106
|
+
await p.select({
|
|
107
|
+
message: "What's next?",
|
|
108
|
+
options: [
|
|
109
|
+
{ value: "back", label: "← Back to Main Menu" }
|
|
110
|
+
]
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
export async function runRecallUI(autoScan = false) {
|
|
116
|
+
showIntro("🔍 Recall - Scan Violations");
|
|
117
|
+
|
|
118
|
+
let targetPath;
|
|
119
|
+
|
|
120
|
+
// Scan All mode - skip directory selection
|
|
121
|
+
if (autoScan) {
|
|
122
|
+
targetPath = ".";
|
|
123
|
+
|
|
124
|
+
const spinner = createSpinner('Scanning entire project...');
|
|
125
|
+
|
|
126
|
+
try {
|
|
127
|
+
const db = loadKnowledge();
|
|
128
|
+
|
|
129
|
+
if (!db.lessons || db.lessons.length === 0) {
|
|
130
|
+
spinner.stop("No patterns");
|
|
131
|
+
showErrorNote("No lessons learned yet. Use the Learn command first.", "No Patterns");
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Use structured scan
|
|
136
|
+
const scanResult = scanDirectoryStructured(targetPath, db);
|
|
137
|
+
|
|
138
|
+
// Save to disk
|
|
139
|
+
saveScanResult(scanResult);
|
|
140
|
+
|
|
141
|
+
// Update hit counts
|
|
142
|
+
saveKnowledge(db);
|
|
143
|
+
|
|
144
|
+
spinner.stopSuccess("Scan complete");
|
|
145
|
+
|
|
146
|
+
// Display summary
|
|
147
|
+
if (scanResult.totalIssues === 0) {
|
|
148
|
+
showSuccessNote(
|
|
149
|
+
`Scanned ${theme.primary(scanResult.summary.filesScanned)} files\nNo violations found! 🎉`,
|
|
150
|
+
"✓ All Clear"
|
|
151
|
+
);
|
|
152
|
+
} else {
|
|
153
|
+
console.log('');
|
|
154
|
+
showErrorNote(
|
|
155
|
+
`${theme.error(scanResult.totalIssues)} violations found\n` +
|
|
156
|
+
`${theme.error(`${scanResult.summary.errors} errors`)} • ${theme.warning(`${scanResult.summary.warnings} warnings`)}`,
|
|
157
|
+
`✗ Scan Results`
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
p.note(
|
|
161
|
+
`Scan ID: ${theme.primary(scanResult.scanId)}\n\n` +
|
|
162
|
+
`Results saved to: .agent/scans/${scanResult.scanId}.json`,
|
|
163
|
+
'📋 Scan Complete'
|
|
164
|
+
);
|
|
165
|
+
|
|
166
|
+
// Offer to fix violations immediately
|
|
167
|
+
const fixAction = await p.select({
|
|
168
|
+
message: `Found ${scanResult.totalIssues} violation(s). What would you like to do?`,
|
|
169
|
+
options: [
|
|
170
|
+
{ value: "fix", label: "🔧 Fix All", hint: "Auto-fix violations now" },
|
|
171
|
+
{ value: "skip", label: "← Skip", hint: "Return to menu" }
|
|
172
|
+
]
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
if (!p.isCancel(fixAction) && fixAction === "fix") {
|
|
176
|
+
// Import and run Fix All with current scan ID
|
|
177
|
+
const { runFixAllUI } = await import('./fix-all-ui.js');
|
|
178
|
+
await runFixAllUI(scanResult.scanId);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
} catch (error) {
|
|
183
|
+
spinner.stopError("Scan failed");
|
|
184
|
+
showErrorNote(error.message, "✗ Error");
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// Get file/directory path via select menu
|
|
191
|
+
const pathChoice = await p.select({
|
|
192
|
+
message: "Select directory to scan:",
|
|
193
|
+
options: [
|
|
194
|
+
{ value: ".", label: "Current Directory", hint: "Scan entire project" },
|
|
195
|
+
{ value: "packages", label: "packages/", hint: "All monorepo packages" },
|
|
196
|
+
{ value: "packages/cli", label: "packages/cli/", hint: "CLI package only" },
|
|
197
|
+
{ value: "packages/cli/lib", label: "packages/cli/lib/", hint: "Library code" },
|
|
198
|
+
{ value: ".agent", label: ".agent/", hint: "Agent configuration" },
|
|
199
|
+
{ value: "custom", label: "Custom Path", hint: "Enter manually" }
|
|
200
|
+
]
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
if (p.isCancel(pathChoice)) {
|
|
204
|
+
p.cancel("Cancelled");
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
targetPath = pathChoice;
|
|
209
|
+
|
|
210
|
+
// If custom path, ask for input
|
|
211
|
+
if (pathChoice === "custom") {
|
|
212
|
+
targetPath = await textInput({
|
|
213
|
+
message: "Enter custom path:",
|
|
214
|
+
placeholder: "e.g., src/components",
|
|
215
|
+
validate: (value) => {
|
|
216
|
+
if (!value) return "Please enter a path";
|
|
217
|
+
},
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
if (p.isCancel(targetPath)) {
|
|
221
|
+
p.cancel("Cancelled");
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// Run scan
|
|
227
|
+
const spinner = createSpinner(`Scanning ${targetPath}...`);
|
|
228
|
+
|
|
229
|
+
try {
|
|
230
|
+
const db = loadKnowledge();
|
|
231
|
+
|
|
232
|
+
if (!db.lessons || db.lessons.length === 0) {
|
|
233
|
+
spinner.stop("No patterns");
|
|
234
|
+
showErrorNote("No lessons learned yet. Use the Learn command first.", "No Patterns");
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
const resolvedPath = path.resolve(targetPath);
|
|
239
|
+
const { results } = scanDirectory(resolvedPath, db);
|
|
240
|
+
spinner.stopSuccess("Scan complete");
|
|
241
|
+
|
|
242
|
+
// Calculate stats
|
|
243
|
+
let totalViolations = 0;
|
|
244
|
+
let errorCount = 0;
|
|
245
|
+
let warningCount = 0;
|
|
246
|
+
const violationsByFile = [];
|
|
247
|
+
|
|
248
|
+
results.forEach(result => {
|
|
249
|
+
if (result.violations.length === 0) return;
|
|
250
|
+
|
|
251
|
+
result.violations.forEach(({ lesson, matches }) => {
|
|
252
|
+
totalViolations += matches.length;
|
|
253
|
+
if (lesson.severity === "ERROR") {
|
|
254
|
+
errorCount += matches.length;
|
|
255
|
+
} else {
|
|
256
|
+
warningCount += matches.length;
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
violationsByFile.push(result);
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
// Display results
|
|
264
|
+
if (totalViolations === 0) {
|
|
265
|
+
showSuccessNote(
|
|
266
|
+
`Scanned ${theme.primary(results.length)} files\nNo violations found! 🎉`,
|
|
267
|
+
"✓ All Clear"
|
|
268
|
+
);
|
|
269
|
+
} else {
|
|
270
|
+
// Simple summary
|
|
271
|
+
console.log('');
|
|
272
|
+
showErrorNote(
|
|
273
|
+
`${theme.error(totalViolations)} violations found\n` +
|
|
274
|
+
`${theme.error(`${errorCount} errors`)} • ${theme.warning(`${warningCount} warnings`)} across ${violationsByFile.length} files`,
|
|
275
|
+
`✗ Scan Results`
|
|
276
|
+
);
|
|
277
|
+
|
|
278
|
+
// Show top 3 critical issues only
|
|
279
|
+
const topIssues = [];
|
|
280
|
+
violationsByFile.slice(0, 3).forEach(result => {
|
|
281
|
+
const fileName = path.relative(process.cwd(), result.file);
|
|
282
|
+
result.violations.forEach(({ lesson, matches }) => {
|
|
283
|
+
if (lesson.severity === "ERROR" || topIssues.length < 3) {
|
|
284
|
+
topIssues.push({
|
|
285
|
+
file: fileName,
|
|
286
|
+
message: lesson.message,
|
|
287
|
+
line: matches[0].line,
|
|
288
|
+
severity: lesson.severity
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
// Display top issues
|
|
295
|
+
if (topIssues.length > 0) {
|
|
296
|
+
console.log(theme.dim('\nTop Issues:\n'));
|
|
297
|
+
topIssues.slice(0, 3).forEach((issue, i) => {
|
|
298
|
+
const icon = issue.severity === "ERROR" ? theme.error('✗') : theme.warning('⚠');
|
|
299
|
+
console.log(`${i + 1}. ${icon} ${theme.primary(issue.file)}:${issue.line}`);
|
|
300
|
+
console.log(` ${theme.dim(issue.message)}\n`);
|
|
301
|
+
});
|
|
302
|
+
|
|
303
|
+
if (violationsByFile.length > 3) {
|
|
304
|
+
console.log(theme.dim(`... and ${violationsByFile.length - 3} more files with issues\n`));
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// Ask if user wants to auto-fix violations
|
|
309
|
+
const fixAction = await p.select({
|
|
310
|
+
message: `Found ${totalViolations} violation(s). What would you like to do?`,
|
|
311
|
+
options: [
|
|
312
|
+
{ value: "fix", label: "🔧 Fix All", hint: "Auto-fix violations now" },
|
|
313
|
+
{ value: "skip", label: "← Skip", hint: "Return to menu" }
|
|
314
|
+
]
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
if (!p.isCancel(fixAction) && fixAction === "fix") {
|
|
318
|
+
// Import and run Fix All
|
|
319
|
+
const { runFixAllUI } = await import('./fix-all-ui.js');
|
|
320
|
+
await runFixAllUI();
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// Save updated hit counts
|
|
324
|
+
saveKnowledge(db);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
// Governance Check
|
|
328
|
+
const govSpinner = createSpinner("Checking governance...");
|
|
329
|
+
const govResult = checkGovernance(resolvedPath);
|
|
330
|
+
govSpinner.stopSuccess("Governance checked");
|
|
331
|
+
|
|
332
|
+
// Simple governance display
|
|
333
|
+
const govStatus = govResult.details.filter(d => d.startsWith('✓')).length;
|
|
334
|
+
console.log(`\n${theme.dim('Governance:')} ${govStatus}/${govResult.details.length} checks passed\n`);
|
|
335
|
+
|
|
336
|
+
} catch (error) {
|
|
337
|
+
spinner.stopError("Scan failed");
|
|
338
|
+
showErrorNote(error.message, "✗ Error");
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export default runRecallUI;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Demo: FAANG-level Agent Routing UI
|
|
4
|
+
* Run: node packages/cli/lib/ui/routing-demo.js
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
showRoutingResult,
|
|
9
|
+
showRoutingInline,
|
|
10
|
+
showRoutingLog,
|
|
11
|
+
showRoutingStep,
|
|
12
|
+
analyzeAndShowRouting,
|
|
13
|
+
showAgentIntro,
|
|
14
|
+
showAgentOutro,
|
|
15
|
+
showAgentThinking
|
|
16
|
+
} from "./routing-ui.js";
|
|
17
|
+
import * as p from "@clack/prompts";
|
|
18
|
+
import pc from "picocolors";
|
|
19
|
+
|
|
20
|
+
showAgentIntro("Agent Routing Demo");
|
|
21
|
+
|
|
22
|
+
// Demo 1: Focused (Single specialist)
|
|
23
|
+
p.log.step("1. Focused Mode — Single Specialist");
|
|
24
|
+
showRoutingResult({
|
|
25
|
+
selectedAgents: ["frontend-specialist"],
|
|
26
|
+
domains: ["frontend"],
|
|
27
|
+
complexity: "SIMPLE",
|
|
28
|
+
reasoning: "Expert matched to your task"
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
// Demo 2: Collaborative (Multi-specialist)
|
|
32
|
+
p.log.step("2. Collaborative Mode — Multi-specialist");
|
|
33
|
+
showRoutingResult({
|
|
34
|
+
selectedAgents: ["security-auditor", "backend-specialist"],
|
|
35
|
+
domains: ["security", "backend"],
|
|
36
|
+
complexity: "MODERATE",
|
|
37
|
+
reasoning: "Cross-functional team assembled"
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// Demo 3: Full Stack (Complete team)
|
|
41
|
+
p.log.step("3. Full Stack Mode — Complete Team");
|
|
42
|
+
showRoutingResult({
|
|
43
|
+
selectedAgents: ["orchestrator", "frontend-specialist", "backend-specialist", "database-architect"],
|
|
44
|
+
domains: ["frontend", "backend", "database"],
|
|
45
|
+
complexity: "COMPLEX",
|
|
46
|
+
reasoning: "Enterprise-grade orchestration"
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// Demo 4: Inline engagement
|
|
50
|
+
p.log.step("4. Inline Engagement");
|
|
51
|
+
showRoutingInline(["orchestrator", "code-archaeologist"]);
|
|
52
|
+
console.log(`${pc.gray("│")} ${pc.dim("Your response continues here...")}`);
|
|
53
|
+
console.log("");
|
|
54
|
+
|
|
55
|
+
// Demo 5: Log style
|
|
56
|
+
p.log.step("5. Log Message Style");
|
|
57
|
+
showRoutingLog({
|
|
58
|
+
selectedAgents: ["debugger", "test-engineer"],
|
|
59
|
+
complexity: "MODERATE"
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
// Demo 6: Multi-step flow
|
|
63
|
+
p.log.step("6. Multi-step Agent Flow");
|
|
64
|
+
console.log(`${pc.gray("│")}`);
|
|
65
|
+
showRoutingStep("orchestrator", "complete");
|
|
66
|
+
showRoutingStep("security-auditor", "active");
|
|
67
|
+
showRoutingStep("backend-specialist", "pending");
|
|
68
|
+
console.log(`${pc.gray("│")}`);
|
|
69
|
+
|
|
70
|
+
// Demo 7: Agent thinking
|
|
71
|
+
p.log.step("7. Agent Thinking Indicator");
|
|
72
|
+
showAgentThinking("Processing your request");
|
|
73
|
+
console.log(`${pc.gray("│")}`);
|
|
74
|
+
|
|
75
|
+
// Demo 8: Auto-analysis
|
|
76
|
+
p.log.step("8. Auto-analysis from Request");
|
|
77
|
+
analyzeAndShowRouting("Implement secure OAuth2 login with React frontend and PostgreSQL database");
|
|
78
|
+
|
|
79
|
+
showAgentOutro("Demo complete");
|