@weavelogic/knowledge-graph-agent 0.10.6 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/analyze.d.ts.map +1 -1
- package/dist/cli/commands/analyze.js +102 -0
- package/dist/cli/commands/analyze.js.map +1 -1
- package/dist/cultivation/deep-analyzer.d.ts +27 -28
- package/dist/cultivation/deep-analyzer.d.ts.map +1 -1
- package/dist/cultivation/deep-analyzer.js +214 -101
- package/dist/cultivation/deep-analyzer.js.map +1 -1
- package/dist/cultivation/migration-orchestrator.d.ts +195 -0
- package/dist/cultivation/migration-orchestrator.d.ts.map +1 -0
- package/dist/cultivation/migration-orchestrator.js +797 -0
- package/dist/cultivation/migration-orchestrator.js.map +1 -0
- package/dist/node_modules/@typescript-eslint/project-service/dist/index.js +1 -1
- package/dist/node_modules/@typescript-eslint/types/dist/index.js +1 -1
- package/dist/node_modules/@typescript-eslint/visitor-keys/dist/index.js +1 -1
- package/dist/node_modules/tinyglobby/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/analyze.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,
|
|
1
|
+
{"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/analyze.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAoe9C"}
|
|
@@ -173,6 +173,108 @@ function createAnalyzeCommand() {
|
|
|
173
173
|
process.exit(1);
|
|
174
174
|
}
|
|
175
175
|
});
|
|
176
|
+
command.command("migrate").description("Implement analysis recommendations using AI agents to fill gaps, answer questions, and build connections").argument("[path]", "Project root path", ".").option("-d, --docs <dir>", "Documentation directory", "docs").option("-a, --analysis <dir>", "Analysis directory (relative to docs)", "analysis").option("--max-agents <n>", "Maximum parallel agents", "8").option("--dry-run", "Preview changes without making them").option("--use-vector", "Use vector search for context retrieval").option("-v, --verbose", "Verbose output").action(async (path, options) => {
|
|
177
|
+
const spinner = ora("Initializing migration orchestration...").start();
|
|
178
|
+
try {
|
|
179
|
+
const projectRoot = validateProjectRoot(path);
|
|
180
|
+
const docsDir = options.docs;
|
|
181
|
+
const analysisDir = options.analysis;
|
|
182
|
+
const dryRun = options.dryRun ?? false;
|
|
183
|
+
const verbose = options.verbose ?? false;
|
|
184
|
+
const analysisPath = join(projectRoot, docsDir, analysisDir);
|
|
185
|
+
if (!existsSync(analysisPath)) {
|
|
186
|
+
spinner.fail(`Analysis directory not found: ${analysisPath}`);
|
|
187
|
+
console.log(chalk.gray(' Run "kg cultivate --deep-analysis" first to generate analysis'));
|
|
188
|
+
process.exit(1);
|
|
189
|
+
}
|
|
190
|
+
const requiredFiles = ["documentation-gaps.md", "research-questions.md"];
|
|
191
|
+
const missingFiles = requiredFiles.filter((f) => !existsSync(join(analysisPath, f)));
|
|
192
|
+
if (missingFiles.length > 0) {
|
|
193
|
+
spinner.warn(`Missing analysis files: ${missingFiles.join(", ")}`);
|
|
194
|
+
console.log(chalk.gray(' Run "kg cultivate --deep-analysis" to generate complete analysis'));
|
|
195
|
+
}
|
|
196
|
+
const { MigrationOrchestrator } = await import("../../cultivation/migration-orchestrator.js");
|
|
197
|
+
const orchestrator = new MigrationOrchestrator({
|
|
198
|
+
projectRoot,
|
|
199
|
+
docsPath: docsDir,
|
|
200
|
+
analysisDir,
|
|
201
|
+
verbose,
|
|
202
|
+
dryRun,
|
|
203
|
+
useVectorSearch: options.useVector ?? false,
|
|
204
|
+
maxAgents: parseInt(options.maxAgents || "8", 10)
|
|
205
|
+
});
|
|
206
|
+
const status = await orchestrator.getAvailabilityStatus();
|
|
207
|
+
if (!status.available) {
|
|
208
|
+
spinner.fail("Migration unavailable");
|
|
209
|
+
console.log(chalk.red(` ${status.reason}`));
|
|
210
|
+
console.log(chalk.gray(" Set GOOGLE_GEMINI_API_KEY or ANTHROPIC_API_KEY"));
|
|
211
|
+
process.exit(1);
|
|
212
|
+
}
|
|
213
|
+
spinner.text = `Running migration (${status.reason})...`;
|
|
214
|
+
if (dryRun) {
|
|
215
|
+
spinner.text = `Running migration dry run (${status.reason})...`;
|
|
216
|
+
}
|
|
217
|
+
const result = await orchestrator.migrate();
|
|
218
|
+
if (result.success) {
|
|
219
|
+
if (dryRun) {
|
|
220
|
+
spinner.succeed("Migration dry run complete!");
|
|
221
|
+
} else {
|
|
222
|
+
spinner.succeed("Migration complete!");
|
|
223
|
+
}
|
|
224
|
+
} else {
|
|
225
|
+
spinner.warn("Migration completed with errors");
|
|
226
|
+
}
|
|
227
|
+
console.log();
|
|
228
|
+
console.log(chalk.cyan.bold(" Migration Results"));
|
|
229
|
+
console.log(chalk.gray(" ─────────────────────────────────────"));
|
|
230
|
+
console.log();
|
|
231
|
+
if (dryRun) {
|
|
232
|
+
console.log(chalk.yellow(" [DRY RUN] No changes were made\n"));
|
|
233
|
+
}
|
|
234
|
+
console.log(chalk.white(" Summary:"));
|
|
235
|
+
console.log(chalk.gray(` Analysis dir: ${docsDir}/${analysisDir}/`));
|
|
236
|
+
console.log(chalk.green(` Agents used: ${result.agentsUsed}`));
|
|
237
|
+
console.log(chalk.green(` Documents created: ${result.documentsCreated}`));
|
|
238
|
+
console.log(chalk.blue(` Documents updated: ${result.documentsUpdated}`));
|
|
239
|
+
console.log(chalk.cyan(` Gaps filled: ${result.gapsFilled}`));
|
|
240
|
+
console.log(chalk.cyan(` Questions answered: ${result.questionsAnswered}`));
|
|
241
|
+
console.log(chalk.cyan(` Connections added: ${result.connectionsAdded}`));
|
|
242
|
+
console.log(chalk.gray(` Duration: ${(result.duration / 1e3).toFixed(1)}s`));
|
|
243
|
+
if (result.warnings.length > 0) {
|
|
244
|
+
console.log();
|
|
245
|
+
console.log(chalk.yellow(" Warnings:"));
|
|
246
|
+
result.warnings.slice(0, 5).forEach((w) => {
|
|
247
|
+
console.log(chalk.gray(` - ${w}`));
|
|
248
|
+
});
|
|
249
|
+
if (result.warnings.length > 5) {
|
|
250
|
+
console.log(chalk.gray(` ... and ${result.warnings.length - 5} more`));
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
if (result.errors.length > 0) {
|
|
254
|
+
console.log();
|
|
255
|
+
console.log(chalk.red(" Errors:"));
|
|
256
|
+
result.errors.slice(0, 5).forEach((e) => {
|
|
257
|
+
console.log(chalk.gray(` - ${e}`));
|
|
258
|
+
});
|
|
259
|
+
if (result.errors.length > 5) {
|
|
260
|
+
console.log(chalk.gray(` ... and ${result.errors.length - 5} more`));
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
if (!dryRun && result.documentsCreated > 0) {
|
|
264
|
+
console.log();
|
|
265
|
+
console.log(chalk.cyan(" Next steps:"));
|
|
266
|
+
console.log(chalk.white(` 1. Review generated documents in ${docsDir}/`));
|
|
267
|
+
console.log(chalk.white(` 2. Check ${docsDir}/${analysisDir}/ for summaries`));
|
|
268
|
+
console.log(chalk.white(` 3. Run: kg graph --docs ${docsDir}`));
|
|
269
|
+
console.log(chalk.white(` 4. Run: kg stats --docs ${docsDir}`));
|
|
270
|
+
}
|
|
271
|
+
console.log();
|
|
272
|
+
} catch (error) {
|
|
273
|
+
spinner.fail("Migration failed");
|
|
274
|
+
console.error(chalk.red(String(error)));
|
|
275
|
+
process.exit(1);
|
|
276
|
+
}
|
|
277
|
+
});
|
|
176
278
|
command.command("report").description("Generate analysis report without creating files").option("-p, --path <path>", "Project root path", ".").option("-s, --source <dir>", "Source docs directory", "docs").option("--json", "Output as JSON").action(async (options) => {
|
|
177
279
|
const spinner = ora("Generating analysis report...").start();
|
|
178
280
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze.js","sources":["../../../src/cli/commands/analyze.ts"],"sourcesContent":["/**\n * Analyze Command\n *\n * Advanced documentation analyzer using claude-flow for deep analysis\n * and creating proper knowledge graph documentation structure.\n */\n\nimport { Command } from 'commander';\nimport chalk from 'chalk';\nimport ora from 'ora';\nimport { existsSync } from 'fs';\nimport { join } from 'path';\nimport { analyzeDocs } from '../../generators/docs-analyzer.js';\nimport { validateProjectRoot } from '../../core/security.js';\n\n/**\n * Create analyze command\n */\nexport function createAnalyzeCommand(): Command {\n const command = new Command('analyze');\n\n command\n .description('Analyze and migrate docs to knowledge graph structure')\n .option('-p, --path <path>', 'Project root path', '.')\n .option('-s, --source <dir>', 'Source docs directory', 'docs')\n .option('-t, --target <dir>', 'Target directory', 'docs')\n .option('--use-claude-flow', 'Use claude-flow for deep analysis')\n .option('--no-moc', 'Skip MOC (Map of Content) generation')\n .option('--no-link-original', 'Do not link back to original docs')\n .option('--max-depth <n>', 'Maximum analysis depth', '3')\n .option('--dry-run', 'Show what would be done without making changes')\n .option('-v, --verbose', 'Verbose output')\n .action(async (options) => {\n const spinner = ora('Analyzing documentation...').start();\n\n try {\n const projectRoot = validateProjectRoot(options.path);\n const sourceDir = options.source;\n const targetDir = options.target;\n\n // Check source exists\n if (!existsSync(join(projectRoot, sourceDir))) {\n spinner.fail(`Source directory not found: ${sourceDir}`);\n console.log(chalk.gray(' Specify source with --source <dir>'));\n process.exit(1);\n }\n\n // Check if target already exists\n if (existsSync(join(projectRoot, targetDir)) && !options.dryRun) {\n spinner.warn(`Target directory exists: ${targetDir}`);\n console.log(chalk.yellow(' Files may be overwritten. Use --dry-run to preview.'));\n }\n\n if (options.dryRun) {\n spinner.text = 'Analyzing documentation (dry run)...';\n }\n\n if (options.useClaudeFlow) {\n spinner.text = 'Analyzing with claude-flow (deep analysis)...';\n }\n\n const result = await analyzeDocs({\n sourceDir,\n targetDir,\n projectRoot,\n useClaudeFlow: options.useClaudeFlow,\n createMOC: options.moc !== false,\n linkOriginal: options.linkOriginal !== false,\n maxDepth: parseInt(options.maxDepth, 10),\n dryRun: options.dryRun,\n verbose: options.verbose,\n });\n\n if (result.success) {\n if (options.dryRun) {\n spinner.succeed('Dry run complete!');\n } else {\n spinner.succeed('Documentation analyzed and migrated!');\n }\n } else {\n spinner.warn('Analysis completed with errors');\n }\n\n // Display results\n console.log();\n console.log(chalk.cyan.bold(' Analysis Results'));\n console.log(chalk.gray(' ─────────────────────────────────────'));\n console.log();\n console.log(chalk.white(' Summary:'));\n console.log(chalk.gray(` Source: ${sourceDir}/`));\n console.log(chalk.gray(` Target: ${targetDir}/`));\n console.log(chalk.green(` Files analyzed: ${result.filesAnalyzed}`));\n console.log(chalk.green(` Files created: ${result.filesCreated}`));\n console.log(chalk.blue(` MOC files: ${result.mocFilesCreated}`));\n\n // Category breakdown\n if (result.structure.size > 0) {\n console.log();\n console.log(chalk.white(' Categories:'));\n for (const [category, docs] of result.structure) {\n console.log(chalk.cyan(` ${category.padEnd(15)}`), chalk.gray(`${docs.length} docs`));\n }\n }\n\n // Show sample analyzed documents\n if (result.analyzed.length > 0 && options.verbose) {\n console.log();\n console.log(chalk.white(' Sample documents:'));\n result.analyzed.slice(0, 5).forEach(doc => {\n console.log(chalk.gray(` ${doc.originalPath}`));\n console.log(chalk.cyan(` → ${doc.newPath}`) + chalk.gray(` [${doc.type}]`));\n if (doc.tags.length > 0) {\n console.log(chalk.gray(` tags: ${doc.tags.slice(0, 5).map(t => `#${t}`).join(' ')}`));\n }\n });\n if (result.analyzed.length > 5) {\n console.log(chalk.gray(` ... and ${result.analyzed.length - 5} more`));\n }\n }\n\n // Show errors\n if (result.errors.length > 0) {\n console.log();\n console.log(chalk.red(' Errors:'));\n result.errors.slice(0, 5).forEach(err => {\n console.log(chalk.gray(` - ${err}`));\n });\n if (result.errors.length > 5) {\n console.log(chalk.gray(` ... and ${result.errors.length - 5} more`));\n }\n }\n\n // Research needed summary\n const researchDocs = result.analyzed.filter(d => d.researchNeeded.length > 0);\n const todoDocs = result.analyzed.filter(d => d.todos.length > 0);\n\n if (researchDocs.length > 0 || todoDocs.length > 0) {\n console.log();\n console.log(chalk.yellow(' Attention Needed:'));\n if (researchDocs.length > 0) {\n console.log(chalk.yellow(` 📚 ${researchDocs.length} docs need research`));\n }\n if (todoDocs.length > 0) {\n console.log(chalk.yellow(` ✏️ ${todoDocs.length} docs have TODOs`));\n }\n }\n\n // Next steps\n if (!options.dryRun && result.filesCreated > 0) {\n console.log();\n console.log(chalk.cyan(' Next steps:'));\n console.log(chalk.white(` 1. Review ${targetDir}/MOC.md (Master Index)`));\n console.log(chalk.white(` 2. Check ${targetDir}/PRIMITIVES.md`));\n console.log(chalk.white(` 3. Run: kg graph --docs ${targetDir}`));\n console.log(chalk.white(` 4. Run: kg stats --docs ${targetDir}`));\n if (researchDocs.length > 0) {\n console.log(chalk.white(` 5. Address research items in flagged docs`));\n }\n }\n\n console.log();\n\n } catch (error) {\n spinner.fail('Analysis failed');\n console.error(chalk.red(String(error)));\n process.exit(1);\n }\n });\n\n // Deep analyze subcommand (uses claude-flow agents)\n command\n .command('deep')\n .description('Deep analysis using claude-flow agents for comprehensive knowledge extraction')\n .option('-p, --path <path>', 'Project root path', '.')\n .option('-s, --source <dir>', 'Source docs directory', 'docs')\n .option('-t, --target <dir>', 'Target directory', 'docs')\n .option('--agents <n>', 'Number of parallel agents', '3')\n .action(async (options) => {\n const spinner = ora('Initializing deep analysis with claude-flow...').start();\n\n try {\n const projectRoot = validateProjectRoot(options.path);\n const sourceDir = options.source;\n const targetDir = options.target;\n\n // Check source exists\n if (!existsSync(join(projectRoot, sourceDir))) {\n spinner.fail(`Source directory not found: ${sourceDir}`);\n process.exit(1);\n }\n\n spinner.text = 'Running claude-flow deep analysis...';\n\n // Run deep analysis with claude-flow\n const result = await analyzeDocs({\n sourceDir,\n targetDir,\n projectRoot,\n useClaudeFlow: true,\n createMOC: true,\n linkOriginal: true,\n maxDepth: 5,\n dryRun: false,\n verbose: true,\n });\n\n if (result.success) {\n spinner.succeed('Deep analysis complete!');\n } else {\n spinner.warn('Deep analysis completed with some errors');\n }\n\n console.log();\n console.log(chalk.cyan.bold(' Deep Analysis Results'));\n console.log(chalk.gray(' ─────────────────────────────────────'));\n console.log(chalk.green(` Documents analyzed: ${result.filesAnalyzed}`));\n console.log(chalk.green(` Knowledge docs: ${result.filesCreated}`));\n console.log(chalk.blue(` Index files (MOC): ${result.mocFilesCreated}`));\n console.log(chalk.gray(` Categories: ${result.structure.size}`));\n\n // Research summary\n const totalResearch = result.analyzed.reduce((sum, d) => sum + d.researchNeeded.length, 0);\n const totalTodos = result.analyzed.reduce((sum, d) => sum + d.todos.length, 0);\n\n console.log();\n console.log(chalk.white(' Knowledge extraction:'));\n console.log(chalk.cyan(` Research areas: ${totalResearch}`));\n console.log(chalk.cyan(` TODOs found: ${totalTodos}`));\n console.log(chalk.cyan(` Concepts: ${result.analyzed.reduce((sum, d) => sum + d.concepts.length, 0)}`));\n console.log(chalk.cyan(` Cross-refs: ${result.analyzed.reduce((sum, d) => sum + d.related.length, 0)}`));\n\n console.log();\n console.log(chalk.white(` Output: ${targetDir}/`));\n console.log(chalk.gray(` MOC.md Master index`));\n console.log(chalk.gray(` PRIMITIVES.md Core building blocks`));\n console.log(chalk.gray(` */\\_MOC.md Category indexes`));\n console.log();\n\n } catch (error) {\n spinner.fail('Deep analysis failed');\n console.error(chalk.red(String(error)));\n process.exit(1);\n }\n });\n\n // Report subcommand\n command\n .command('report')\n .description('Generate analysis report without creating files')\n .option('-p, --path <path>', 'Project root path', '.')\n .option('-s, --source <dir>', 'Source docs directory', 'docs')\n .option('--json', 'Output as JSON')\n .action(async (options) => {\n const spinner = ora('Generating analysis report...').start();\n\n try {\n const projectRoot = validateProjectRoot(options.path);\n const sourceDir = options.source;\n\n if (!existsSync(join(projectRoot, sourceDir))) {\n spinner.fail(`Source directory not found: ${sourceDir}`);\n process.exit(1);\n }\n\n const result = await analyzeDocs({\n sourceDir,\n targetDir: 'docs',\n projectRoot,\n useClaudeFlow: false,\n createMOC: false,\n linkOriginal: false,\n dryRun: true,\n verbose: false,\n });\n\n spinner.succeed('Report generated!');\n\n if (options.json) {\n // JSON output\n const report = {\n summary: {\n totalDocs: result.filesAnalyzed,\n categories: Object.fromEntries(result.structure),\n },\n documents: result.analyzed.map(d => ({\n original: d.originalPath,\n target: d.newPath,\n type: d.type,\n category: d.category,\n tags: d.tags,\n concepts: d.concepts,\n researchNeeded: d.researchNeeded,\n todos: d.todos,\n })),\n researchAreas: result.analyzed\n .flatMap(d => d.researchNeeded.map(r => ({ doc: d.title, area: r }))),\n todos: result.analyzed\n .flatMap(d => d.todos.map(t => ({ doc: d.title, todo: t }))),\n };\n console.log(JSON.stringify(report, null, 2));\n } else {\n // Human-readable output\n console.log();\n console.log(chalk.cyan.bold(' Documentation Analysis Report'));\n console.log(chalk.gray(' ─────────────────────────────────────'));\n console.log();\n console.log(chalk.white(` Total documents: ${result.filesAnalyzed}`));\n console.log();\n\n // Type breakdown\n const byType = new Map<string, number>();\n result.analyzed.forEach(d => {\n byType.set(d.type, (byType.get(d.type) || 0) + 1);\n });\n\n console.log(chalk.white(' By Type:'));\n for (const [type, count] of byType) {\n const bar = '█'.repeat(Math.ceil(count / result.filesAnalyzed * 20));\n console.log(chalk.cyan(` ${type.padEnd(12)} ${bar} ${count}`));\n }\n console.log();\n\n // Category breakdown\n console.log(chalk.white(' By Category:'));\n for (const [category, docs] of result.structure) {\n const bar = '█'.repeat(Math.ceil(docs.length / result.filesAnalyzed * 20));\n console.log(chalk.cyan(` ${category.padEnd(12)} ${bar} ${docs.length}`));\n }\n console.log();\n\n // Issues\n const withResearch = result.analyzed.filter(d => d.researchNeeded.length > 0);\n const withTodos = result.analyzed.filter(d => d.todos.length > 0);\n\n console.log(chalk.white(' Areas Needing Attention:'));\n console.log(chalk.yellow(` 📚 Research needed: ${withResearch.length} docs`));\n console.log(chalk.yellow(` ✏️ With TODOs: ${withTodos.length} docs`));\n console.log();\n\n // Top research areas\n if (withResearch.length > 0) {\n console.log(chalk.white(' Top Research Areas:'));\n withResearch.slice(0, 5).forEach(d => {\n console.log(chalk.gray(` ${d.title}:`));\n d.researchNeeded.slice(0, 2).forEach(r => {\n console.log(chalk.yellow(` - ${r.slice(0, 60)}...`));\n });\n });\n console.log();\n }\n\n console.log(chalk.cyan(' Run `kg analyze` to migrate documentation'));\n console.log();\n }\n\n } catch (error) {\n spinner.fail('Report generation failed');\n console.error(chalk.red(String(error)));\n process.exit(1);\n }\n });\n\n return command;\n}\n"],"names":[],"mappings":";;;;;;;AAkBO,SAAS,uBAAgC;AAC9C,QAAM,UAAU,IAAI,QAAQ,SAAS;AAErC,UACG,YAAY,uDAAuD,EACnE,OAAO,qBAAqB,qBAAqB,GAAG,EACpD,OAAO,sBAAsB,yBAAyB,MAAM,EAC5D,OAAO,sBAAsB,oBAAoB,MAAM,EACvD,OAAO,qBAAqB,mCAAmC,EAC/D,OAAO,YAAY,sCAAsC,EACzD,OAAO,sBAAsB,mCAAmC,EAChE,OAAO,mBAAmB,0BAA0B,GAAG,EACvD,OAAO,aAAa,gDAAgD,EACpE,OAAO,iBAAiB,gBAAgB,EACxC,OAAO,OAAO,YAAY;AACzB,UAAM,UAAU,IAAI,4BAA4B,EAAE,MAAA;AAElD,QAAI;AACF,YAAM,cAAc,oBAAoB,QAAQ,IAAI;AACpD,YAAM,YAAY,QAAQ;AAC1B,YAAM,YAAY,QAAQ;AAG1B,UAAI,CAAC,WAAW,KAAK,aAAa,SAAS,CAAC,GAAG;AAC7C,gBAAQ,KAAK,+BAA+B,SAAS,EAAE;AACvD,gBAAQ,IAAI,MAAM,KAAK,sCAAsC,CAAC;AAC9D,gBAAQ,KAAK,CAAC;AAAA,MAChB;AAGA,UAAI,WAAW,KAAK,aAAa,SAAS,CAAC,KAAK,CAAC,QAAQ,QAAQ;AAC/D,gBAAQ,KAAK,4BAA4B,SAAS,EAAE;AACpD,gBAAQ,IAAI,MAAM,OAAO,uDAA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,KAAK,GAAG,CAAC;AACzC,cAAE,eAAe,MAAM,GAAG,CAAC,EAAE,QAAQ,CAAA,MAAK;AACxC,sBAAQ,IAAI,MAAM,OAAO,WAAW,EAAE,MAAM,GAAG,EAAE,CAAC,KAAK,CAAC;AAAA,YAC1D,CAAC;AAAA,UACH,CAAC;AACD,kBAAQ,IAAA;AAAA,QACV;AAEA,gBAAQ,IAAI,MAAM,KAAK,6CAA6C,CAAC;AACrE,gBAAQ,IAAA;AAAA,MACV;AAAA,IAEF,SAAS,OAAO;AACd,cAAQ,KAAK,0BAA0B;AACvC,cAAQ,MAAM,MAAM,IAAI,OAAO,KAAK,CAAC,CAAC;AACtC,cAAQ,KAAK,CAAC;AAAA,IAChB;AAAA,EACF,CAAC;AAEH,SAAO;AACT;"}
|
|
1
|
+
{"version":3,"file":"analyze.js","sources":["../../../src/cli/commands/analyze.ts"],"sourcesContent":["/**\n * Analyze Command\n *\n * Advanced documentation analyzer using claude-flow for deep analysis\n * and creating proper knowledge graph documentation structure.\n */\n\nimport { Command } from 'commander';\nimport chalk from 'chalk';\nimport ora from 'ora';\nimport { existsSync } from 'fs';\nimport { join } from 'path';\nimport { analyzeDocs } from '../../generators/docs-analyzer.js';\nimport { validateProjectRoot } from '../../core/security.js';\n\n/**\n * Create analyze command\n */\nexport function createAnalyzeCommand(): Command {\n const command = new Command('analyze');\n\n command\n .description('Analyze and migrate docs to knowledge graph structure')\n .option('-p, --path <path>', 'Project root path', '.')\n .option('-s, --source <dir>', 'Source docs directory', 'docs')\n .option('-t, --target <dir>', 'Target directory', 'docs')\n .option('--use-claude-flow', 'Use claude-flow for deep analysis')\n .option('--no-moc', 'Skip MOC (Map of Content) generation')\n .option('--no-link-original', 'Do not link back to original docs')\n .option('--max-depth <n>', 'Maximum analysis depth', '3')\n .option('--dry-run', 'Show what would be done without making changes')\n .option('-v, --verbose', 'Verbose output')\n .action(async (options) => {\n const spinner = ora('Analyzing documentation...').start();\n\n try {\n const projectRoot = validateProjectRoot(options.path);\n const sourceDir = options.source;\n const targetDir = options.target;\n\n // Check source exists\n if (!existsSync(join(projectRoot, sourceDir))) {\n spinner.fail(`Source directory not found: ${sourceDir}`);\n console.log(chalk.gray(' Specify source with --source <dir>'));\n process.exit(1);\n }\n\n // Check if target already exists\n if (existsSync(join(projectRoot, targetDir)) && !options.dryRun) {\n spinner.warn(`Target directory exists: ${targetDir}`);\n console.log(chalk.yellow(' Files may be overwritten. Use --dry-run to preview.'));\n }\n\n if (options.dryRun) {\n spinner.text = 'Analyzing documentation (dry run)...';\n }\n\n if (options.useClaudeFlow) {\n spinner.text = 'Analyzing with claude-flow (deep analysis)...';\n }\n\n const result = await analyzeDocs({\n sourceDir,\n targetDir,\n projectRoot,\n useClaudeFlow: options.useClaudeFlow,\n createMOC: options.moc !== false,\n linkOriginal: options.linkOriginal !== false,\n maxDepth: parseInt(options.maxDepth, 10),\n dryRun: options.dryRun,\n verbose: options.verbose,\n });\n\n if (result.success) {\n if (options.dryRun) {\n spinner.succeed('Dry run complete!');\n } else {\n spinner.succeed('Documentation analyzed and migrated!');\n }\n } else {\n spinner.warn('Analysis completed with errors');\n }\n\n // Display results\n console.log();\n console.log(chalk.cyan.bold(' Analysis Results'));\n console.log(chalk.gray(' ─────────────────────────────────────'));\n console.log();\n console.log(chalk.white(' Summary:'));\n console.log(chalk.gray(` Source: ${sourceDir}/`));\n console.log(chalk.gray(` Target: ${targetDir}/`));\n console.log(chalk.green(` Files analyzed: ${result.filesAnalyzed}`));\n console.log(chalk.green(` Files created: ${result.filesCreated}`));\n console.log(chalk.blue(` MOC files: ${result.mocFilesCreated}`));\n\n // Category breakdown\n if (result.structure.size > 0) {\n console.log();\n console.log(chalk.white(' Categories:'));\n for (const [category, docs] of result.structure) {\n console.log(chalk.cyan(` ${category.padEnd(15)}`), chalk.gray(`${docs.length} docs`));\n }\n }\n\n // Show sample analyzed documents\n if (result.analyzed.length > 0 && options.verbose) {\n console.log();\n console.log(chalk.white(' Sample documents:'));\n result.analyzed.slice(0, 5).forEach(doc => {\n console.log(chalk.gray(` ${doc.originalPath}`));\n console.log(chalk.cyan(` → ${doc.newPath}`) + chalk.gray(` [${doc.type}]`));\n if (doc.tags.length > 0) {\n console.log(chalk.gray(` tags: ${doc.tags.slice(0, 5).map(t => `#${t}`).join(' ')}`));\n }\n });\n if (result.analyzed.length > 5) {\n console.log(chalk.gray(` ... and ${result.analyzed.length - 5} more`));\n }\n }\n\n // Show errors\n if (result.errors.length > 0) {\n console.log();\n console.log(chalk.red(' Errors:'));\n result.errors.slice(0, 5).forEach(err => {\n console.log(chalk.gray(` - ${err}`));\n });\n if (result.errors.length > 5) {\n console.log(chalk.gray(` ... and ${result.errors.length - 5} more`));\n }\n }\n\n // Research needed summary\n const researchDocs = result.analyzed.filter(d => d.researchNeeded.length > 0);\n const todoDocs = result.analyzed.filter(d => d.todos.length > 0);\n\n if (researchDocs.length > 0 || todoDocs.length > 0) {\n console.log();\n console.log(chalk.yellow(' Attention Needed:'));\n if (researchDocs.length > 0) {\n console.log(chalk.yellow(` 📚 ${researchDocs.length} docs need research`));\n }\n if (todoDocs.length > 0) {\n console.log(chalk.yellow(` ✏️ ${todoDocs.length} docs have TODOs`));\n }\n }\n\n // Next steps\n if (!options.dryRun && result.filesCreated > 0) {\n console.log();\n console.log(chalk.cyan(' Next steps:'));\n console.log(chalk.white(` 1. Review ${targetDir}/MOC.md (Master Index)`));\n console.log(chalk.white(` 2. Check ${targetDir}/PRIMITIVES.md`));\n console.log(chalk.white(` 3. Run: kg graph --docs ${targetDir}`));\n console.log(chalk.white(` 4. Run: kg stats --docs ${targetDir}`));\n if (researchDocs.length > 0) {\n console.log(chalk.white(` 5. Address research items in flagged docs`));\n }\n }\n\n console.log();\n\n } catch (error) {\n spinner.fail('Analysis failed');\n console.error(chalk.red(String(error)));\n process.exit(1);\n }\n });\n\n // Deep analyze subcommand (uses claude-flow agents)\n command\n .command('deep')\n .description('Deep analysis using claude-flow agents for comprehensive knowledge extraction')\n .option('-p, --path <path>', 'Project root path', '.')\n .option('-s, --source <dir>', 'Source docs directory', 'docs')\n .option('-t, --target <dir>', 'Target directory', 'docs')\n .option('--agents <n>', 'Number of parallel agents', '3')\n .action(async (options) => {\n const spinner = ora('Initializing deep analysis with claude-flow...').start();\n\n try {\n const projectRoot = validateProjectRoot(options.path);\n const sourceDir = options.source;\n const targetDir = options.target;\n\n // Check source exists\n if (!existsSync(join(projectRoot, sourceDir))) {\n spinner.fail(`Source directory not found: ${sourceDir}`);\n process.exit(1);\n }\n\n spinner.text = 'Running claude-flow deep analysis...';\n\n // Run deep analysis with claude-flow\n const result = await analyzeDocs({\n sourceDir,\n targetDir,\n projectRoot,\n useClaudeFlow: true,\n createMOC: true,\n linkOriginal: true,\n maxDepth: 5,\n dryRun: false,\n verbose: true,\n });\n\n if (result.success) {\n spinner.succeed('Deep analysis complete!');\n } else {\n spinner.warn('Deep analysis completed with some errors');\n }\n\n console.log();\n console.log(chalk.cyan.bold(' Deep Analysis Results'));\n console.log(chalk.gray(' ─────────────────────────────────────'));\n console.log(chalk.green(` Documents analyzed: ${result.filesAnalyzed}`));\n console.log(chalk.green(` Knowledge docs: ${result.filesCreated}`));\n console.log(chalk.blue(` Index files (MOC): ${result.mocFilesCreated}`));\n console.log(chalk.gray(` Categories: ${result.structure.size}`));\n\n // Research summary\n const totalResearch = result.analyzed.reduce((sum, d) => sum + d.researchNeeded.length, 0);\n const totalTodos = result.analyzed.reduce((sum, d) => sum + d.todos.length, 0);\n\n console.log();\n console.log(chalk.white(' Knowledge extraction:'));\n console.log(chalk.cyan(` Research areas: ${totalResearch}`));\n console.log(chalk.cyan(` TODOs found: ${totalTodos}`));\n console.log(chalk.cyan(` Concepts: ${result.analyzed.reduce((sum, d) => sum + d.concepts.length, 0)}`));\n console.log(chalk.cyan(` Cross-refs: ${result.analyzed.reduce((sum, d) => sum + d.related.length, 0)}`));\n\n console.log();\n console.log(chalk.white(` Output: ${targetDir}/`));\n console.log(chalk.gray(` MOC.md Master index`));\n console.log(chalk.gray(` PRIMITIVES.md Core building blocks`));\n console.log(chalk.gray(` */\\_MOC.md Category indexes`));\n console.log();\n\n } catch (error) {\n spinner.fail('Deep analysis failed');\n console.error(chalk.red(String(error)));\n process.exit(1);\n }\n });\n\n // Migrate subcommand - implements analysis recommendations\n command\n .command('migrate')\n .description('Implement analysis recommendations using AI agents to fill gaps, answer questions, and build connections')\n .argument('[path]', 'Project root path', '.')\n .option('-d, --docs <dir>', 'Documentation directory', 'docs')\n .option('-a, --analysis <dir>', 'Analysis directory (relative to docs)', 'analysis')\n .option('--max-agents <n>', 'Maximum parallel agents', '8')\n .option('--dry-run', 'Preview changes without making them')\n .option('--use-vector', 'Use vector search for context retrieval')\n .option('-v, --verbose', 'Verbose output')\n .action(async (path: string, options) => {\n const spinner = ora('Initializing migration orchestration...').start();\n\n try {\n const projectRoot = validateProjectRoot(path);\n const docsDir = options.docs;\n const analysisDir = options.analysis;\n const dryRun = options.dryRun ?? false;\n const verbose = options.verbose ?? false;\n\n // Check analysis directory exists\n const analysisPath = join(projectRoot, docsDir, analysisDir);\n if (!existsSync(analysisPath)) {\n spinner.fail(`Analysis directory not found: ${analysisPath}`);\n console.log(chalk.gray(' Run \"kg cultivate --deep-analysis\" first to generate analysis'));\n process.exit(1);\n }\n\n // Check for required analysis files\n const requiredFiles = ['documentation-gaps.md', 'research-questions.md'];\n const missingFiles = requiredFiles.filter(f => !existsSync(join(analysisPath, f)));\n if (missingFiles.length > 0) {\n spinner.warn(`Missing analysis files: ${missingFiles.join(', ')}`);\n console.log(chalk.gray(' Run \"kg cultivate --deep-analysis\" to generate complete analysis'));\n }\n\n // Import and create orchestrator\n const { MigrationOrchestrator } = await import('../../cultivation/migration-orchestrator.js');\n const orchestrator = new MigrationOrchestrator({\n projectRoot,\n docsPath: docsDir,\n analysisDir,\n verbose,\n dryRun,\n useVectorSearch: options.useVector ?? false,\n maxAgents: parseInt(options.maxAgents || '8', 10)\n });\n\n // Check availability\n const status = await orchestrator.getAvailabilityStatus();\n if (!status.available) {\n spinner.fail('Migration unavailable');\n console.log(chalk.red(` ${status.reason}`));\n console.log(chalk.gray(' Set GOOGLE_GEMINI_API_KEY or ANTHROPIC_API_KEY'));\n process.exit(1);\n }\n\n spinner.text = `Running migration (${status.reason})...`;\n if (dryRun) {\n spinner.text = `Running migration dry run (${status.reason})...`;\n }\n\n // Run migration\n const result = await orchestrator.migrate();\n\n if (result.success) {\n if (dryRun) {\n spinner.succeed('Migration dry run complete!');\n } else {\n spinner.succeed('Migration complete!');\n }\n } else {\n spinner.warn('Migration completed with errors');\n }\n\n // Display results\n console.log();\n console.log(chalk.cyan.bold(' Migration Results'));\n console.log(chalk.gray(' ─────────────────────────────────────'));\n console.log();\n\n if (dryRun) {\n console.log(chalk.yellow(' [DRY RUN] No changes were made\\n'));\n }\n\n console.log(chalk.white(' Summary:'));\n console.log(chalk.gray(` Analysis dir: ${docsDir}/${analysisDir}/`));\n console.log(chalk.green(` Agents used: ${result.agentsUsed}`));\n console.log(chalk.green(` Documents created: ${result.documentsCreated}`));\n console.log(chalk.blue(` Documents updated: ${result.documentsUpdated}`));\n console.log(chalk.cyan(` Gaps filled: ${result.gapsFilled}`));\n console.log(chalk.cyan(` Questions answered: ${result.questionsAnswered}`));\n console.log(chalk.cyan(` Connections added: ${result.connectionsAdded}`));\n console.log(chalk.gray(` Duration: ${(result.duration / 1000).toFixed(1)}s`));\n\n // Show warnings\n if (result.warnings.length > 0) {\n console.log();\n console.log(chalk.yellow(' Warnings:'));\n result.warnings.slice(0, 5).forEach(w => {\n console.log(chalk.gray(` - ${w}`));\n });\n if (result.warnings.length > 5) {\n console.log(chalk.gray(` ... and ${result.warnings.length - 5} more`));\n }\n }\n\n // Show errors\n if (result.errors.length > 0) {\n console.log();\n console.log(chalk.red(' Errors:'));\n result.errors.slice(0, 5).forEach(e => {\n console.log(chalk.gray(` - ${e}`));\n });\n if (result.errors.length > 5) {\n console.log(chalk.gray(` ... and ${result.errors.length - 5} more`));\n }\n }\n\n // Next steps\n if (!dryRun && result.documentsCreated > 0) {\n console.log();\n console.log(chalk.cyan(' Next steps:'));\n console.log(chalk.white(` 1. Review generated documents in ${docsDir}/`));\n console.log(chalk.white(` 2. Check ${docsDir}/${analysisDir}/ for summaries`));\n console.log(chalk.white(` 3. Run: kg graph --docs ${docsDir}`));\n console.log(chalk.white(` 4. Run: kg stats --docs ${docsDir}`));\n }\n\n console.log();\n\n } catch (error) {\n spinner.fail('Migration failed');\n console.error(chalk.red(String(error)));\n process.exit(1);\n }\n });\n\n // Report subcommand\n command\n .command('report')\n .description('Generate analysis report without creating files')\n .option('-p, --path <path>', 'Project root path', '.')\n .option('-s, --source <dir>', 'Source docs directory', 'docs')\n .option('--json', 'Output as JSON')\n .action(async (options) => {\n const spinner = ora('Generating analysis report...').start();\n\n try {\n const projectRoot = validateProjectRoot(options.path);\n const sourceDir = options.source;\n\n if (!existsSync(join(projectRoot, sourceDir))) {\n spinner.fail(`Source directory not found: ${sourceDir}`);\n process.exit(1);\n }\n\n const result = await analyzeDocs({\n sourceDir,\n targetDir: 'docs',\n projectRoot,\n useClaudeFlow: false,\n createMOC: false,\n linkOriginal: false,\n dryRun: true,\n verbose: false,\n });\n\n spinner.succeed('Report generated!');\n\n if (options.json) {\n // JSON output\n const report = {\n summary: {\n totalDocs: result.filesAnalyzed,\n categories: Object.fromEntries(result.structure),\n },\n documents: result.analyzed.map(d => ({\n original: d.originalPath,\n target: d.newPath,\n type: d.type,\n category: d.category,\n tags: d.tags,\n concepts: d.concepts,\n researchNeeded: d.researchNeeded,\n todos: d.todos,\n })),\n researchAreas: result.analyzed\n .flatMap(d => d.researchNeeded.map(r => ({ doc: d.title, area: r }))),\n todos: result.analyzed\n .flatMap(d => d.todos.map(t => ({ doc: d.title, todo: t }))),\n };\n console.log(JSON.stringify(report, null, 2));\n } else {\n // Human-readable output\n console.log();\n console.log(chalk.cyan.bold(' Documentation Analysis Report'));\n console.log(chalk.gray(' ─────────────────────────────────────'));\n console.log();\n console.log(chalk.white(` Total documents: ${result.filesAnalyzed}`));\n console.log();\n\n // Type breakdown\n const byType = new Map<string, number>();\n result.analyzed.forEach(d => {\n byType.set(d.type, (byType.get(d.type) || 0) + 1);\n });\n\n console.log(chalk.white(' By Type:'));\n for (const [type, count] of byType) {\n const bar = '█'.repeat(Math.ceil(count / result.filesAnalyzed * 20));\n console.log(chalk.cyan(` ${type.padEnd(12)} ${bar} ${count}`));\n }\n console.log();\n\n // Category breakdown\n console.log(chalk.white(' By Category:'));\n for (const [category, docs] of result.structure) {\n const bar = '█'.repeat(Math.ceil(docs.length / result.filesAnalyzed * 20));\n console.log(chalk.cyan(` ${category.padEnd(12)} ${bar} ${docs.length}`));\n }\n console.log();\n\n // Issues\n const withResearch = result.analyzed.filter(d => d.researchNeeded.length > 0);\n const withTodos = result.analyzed.filter(d => d.todos.length > 0);\n\n console.log(chalk.white(' Areas Needing Attention:'));\n console.log(chalk.yellow(` 📚 Research needed: ${withResearch.length} docs`));\n console.log(chalk.yellow(` ✏️ With TODOs: ${withTodos.length} docs`));\n console.log();\n\n // Top research areas\n if (withResearch.length > 0) {\n console.log(chalk.white(' Top Research Areas:'));\n withResearch.slice(0, 5).forEach(d => {\n console.log(chalk.gray(` ${d.title}:`));\n d.researchNeeded.slice(0, 2).forEach(r => {\n console.log(chalk.yellow(` - ${r.slice(0, 60)}...`));\n });\n });\n console.log();\n }\n\n console.log(chalk.cyan(' Run `kg analyze` to migrate documentation'));\n console.log();\n }\n\n } catch (error) {\n spinner.fail('Report generation failed');\n console.error(chalk.red(String(error)));\n process.exit(1);\n }\n });\n\n return command;\n}\n"],"names":[],"mappings":";;;;;;;AAkBO,SAAS,uBAAgC;AAC9C,QAAM,UAAU,IAAI,QAAQ,SAAS;AAErC,UACG,YAAY,uDAAuD,EACnE,OAAO,qBAAqB,qBAAqB,GAAG,EACpD,OAAO,sBAAsB,yBAAyB,MAAM,EAC5D,OAAO,sBAAsB,oBAAoB,MAAM,EACvD,OAAO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AACd,cAAQ,KAAK,0BAA0B;AACvC,cAAQ,MAAM,MAAM,IAAI,OAAO,KAAK,CAAC,CAAC;AACtC,cAAQ,KAAK,CAAC;AAAA,IAChB;AAAA,EACF,CAAC;AAEH,SAAO;AACT;"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* DeepAnalyzer -
|
|
2
|
+
* DeepAnalyzer - Documentation Cultivation & Knowledge Graph Enhancement
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* -
|
|
6
|
-
* -
|
|
7
|
-
* -
|
|
8
|
-
* -
|
|
4
|
+
* Analyzes existing documentation to:
|
|
5
|
+
* - Understand the vision and requirements described
|
|
6
|
+
* - Identify documentation gaps and unclear areas
|
|
7
|
+
* - Guide the documentation process with research questions
|
|
8
|
+
* - Build knowledge graph connections
|
|
9
|
+
*
|
|
10
|
+
* This is NOT for code analysis - use analyze-codebase for that.
|
|
9
11
|
*
|
|
10
12
|
* @module cultivation/deep-analyzer
|
|
11
13
|
*/
|
|
@@ -21,11 +23,9 @@ export interface DeepAnalyzerOptions {
|
|
|
21
23
|
outputDir?: string;
|
|
22
24
|
/** Enable verbose logging */
|
|
23
25
|
verbose?: boolean;
|
|
24
|
-
/** Maximum
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
agentMode?: 'sequential' | 'parallel' | 'adaptive';
|
|
28
|
-
/** Timeout for each agent (ms) */
|
|
26
|
+
/** Maximum documents to analyze */
|
|
27
|
+
maxDocuments?: number;
|
|
28
|
+
/** Timeout for each analysis (ms) */
|
|
29
29
|
agentTimeout?: number;
|
|
30
30
|
/** Force use of API key even if CLI is available */
|
|
31
31
|
forceApiKey?: boolean;
|
|
@@ -61,12 +61,13 @@ export interface DeepAnalysisResult {
|
|
|
61
61
|
mode: 'cli' | 'anthropic' | 'gemini' | 'static';
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
* DeepAnalyzer -
|
|
64
|
+
* DeepAnalyzer - Documentation cultivation with AI-powered analysis
|
|
65
65
|
*
|
|
66
|
-
*
|
|
67
|
-
* -
|
|
68
|
-
* -
|
|
69
|
-
* -
|
|
66
|
+
* Reads existing markdown documentation and provides:
|
|
67
|
+
* - Vision synthesis from requirements
|
|
68
|
+
* - Gap analysis identifying missing documentation
|
|
69
|
+
* - Research questions for unclear areas
|
|
70
|
+
* - Knowledge graph connection suggestions
|
|
70
71
|
*
|
|
71
72
|
* @example
|
|
72
73
|
* ```typescript
|
|
@@ -84,8 +85,7 @@ export declare class DeepAnalyzer {
|
|
|
84
85
|
private docsPath;
|
|
85
86
|
private outputDir;
|
|
86
87
|
private verbose;
|
|
87
|
-
private
|
|
88
|
-
private agentMode;
|
|
88
|
+
private maxDocuments;
|
|
89
89
|
private agentTimeout;
|
|
90
90
|
private forceApiKey;
|
|
91
91
|
private preferredProvider;
|
|
@@ -100,7 +100,6 @@ export declare class DeepAnalyzer {
|
|
|
100
100
|
private hasAnthropicApiKey;
|
|
101
101
|
/**
|
|
102
102
|
* Check if Google AI / Gemini API key is available
|
|
103
|
-
* Supports: GOOGLE_AI_API_KEY, GOOGLE_GEMINI_API_KEY, GEMINI_API_KEY, GOOGLE_API_KEY
|
|
104
103
|
*/
|
|
105
104
|
private hasGeminiApiKey;
|
|
106
105
|
/**
|
|
@@ -113,10 +112,6 @@ export declare class DeepAnalyzer {
|
|
|
113
112
|
private isCliAvailable;
|
|
114
113
|
/**
|
|
115
114
|
* Determine the best execution mode
|
|
116
|
-
*
|
|
117
|
-
* Priority: API keys > CLI (CLI often hangs in various contexts)
|
|
118
|
-
* - Prefer API when available for reliability
|
|
119
|
-
* - Fall back to CLI only when no API key is available
|
|
120
115
|
*/
|
|
121
116
|
private detectExecutionMode;
|
|
122
117
|
/**
|
|
@@ -130,6 +125,14 @@ export declare class DeepAnalyzer {
|
|
|
130
125
|
available: boolean;
|
|
131
126
|
reason: string;
|
|
132
127
|
}>;
|
|
128
|
+
/**
|
|
129
|
+
* Scan documentation directory for markdown files
|
|
130
|
+
*/
|
|
131
|
+
private scanDocumentation;
|
|
132
|
+
/**
|
|
133
|
+
* Read full content of key documents
|
|
134
|
+
*/
|
|
135
|
+
private readKeyDocuments;
|
|
133
136
|
/**
|
|
134
137
|
* Run deep analysis
|
|
135
138
|
*/
|
|
@@ -139,13 +142,9 @@ export declare class DeepAnalyzer {
|
|
|
139
142
|
*/
|
|
140
143
|
private executeAgent;
|
|
141
144
|
/**
|
|
142
|
-
* Build context-aware prompt for
|
|
145
|
+
* Build context-aware prompt for documentation cultivation
|
|
143
146
|
*/
|
|
144
147
|
private buildPrompt;
|
|
145
|
-
/**
|
|
146
|
-
* Gather project context for analysis
|
|
147
|
-
*/
|
|
148
|
-
private gatherProjectContext;
|
|
149
148
|
/**
|
|
150
149
|
* Run analysis using Claude CLI
|
|
151
150
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deep-analyzer.d.ts","sourceRoot":"","sources":["../../src/cultivation/deep-analyzer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"deep-analyzer.d.ts","sourceRoot":"","sources":["../../src/cultivation/deep-analyzer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AASH;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mCAAmC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qDAAqD;IACrD,iBAAiB,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;CAC5C;AAED;;GAEG;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