@weavelogic/knowledge-graph-agent 0.8.3 → 0.8.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/docs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAmJ3C"}
1
+ {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/docs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAkM3C"}
@@ -2,11 +2,12 @@ import { Command } from "commander";
2
2
  import chalk from "chalk";
3
3
  import ora from "ora";
4
4
  import { docsExist, initDocs, getDocsPath } from "../../generators/docs-init.js";
5
+ import { generateDocsWithAgents } from "../../generators/doc-generator-agents.js";
5
6
  import { validateProjectRoot, validateDocsPath } from "../../core/security.js";
6
7
  function createDocsCommand() {
7
8
  const command = new Command("docs");
8
9
  command.description("Documentation management commands");
9
- command.command("init").description("Initialize documentation directory with weave-nn structure").option("-p, --path <path>", "Project root path", ".").option("-d, --docs <path>", "Docs directory path", "docs").option("-t, --template <template>", "Template to use (default, minimal)").option("--no-examples", "Skip example files").option("--no-detect", "Skip framework detection").option("-f, --force", "Overwrite existing files").action(async (options) => {
10
+ command.command("init").description("Initialize documentation directory with weave-nn structure").option("-p, --path <path>", "Project root path", ".").option("-d, --docs <path>", "Docs directory path", "docs").option("-t, --template <template>", "Template to use (default, minimal)").option("--no-examples", "Skip example files").option("--no-detect", "Skip framework detection").option("-f, --force", "Overwrite existing files").option("-g, --generate", "Generate documents using expert agents").option("--parallel", "Run agent generation in parallel").option("--dry-run", "Show what would be generated without creating files").option("-v, --verbose", "Show detailed agent output").action(async (options) => {
10
11
  const spinner = ora("Initializing documentation...").start();
11
12
  try {
12
13
  const projectRoot = validateProjectRoot(options.path);
@@ -60,6 +61,43 @@ function createDocsCommand() {
60
61
  ├── guides/ # How-to guides
61
62
  └── references/ # API references
62
63
  `));
64
+ if (options.generate) {
65
+ console.log();
66
+ const genSpinner = ora("Analyzing project and generating documents with expert agents...").start();
67
+ try {
68
+ const genResult = await generateDocsWithAgents(projectRoot, result.docsPath, {
69
+ parallel: options.parallel,
70
+ dryRun: options.dryRun,
71
+ verbose: options.verbose
72
+ });
73
+ if (options.dryRun) {
74
+ genSpinner.info("Dry run complete - no files created");
75
+ } else if (genResult.success) {
76
+ genSpinner.succeed(`Generated ${genResult.documentsGenerated.filter((d) => d.generated).length} documents using ${genResult.agentsSpawned} agents`);
77
+ } else {
78
+ genSpinner.warn(`Generated ${genResult.documentsGenerated.filter((d) => d.generated).length} documents with ${genResult.errors.length} errors`);
79
+ }
80
+ if (genResult.documentsGenerated.length > 0 && !options.dryRun) {
81
+ console.log();
82
+ console.log(chalk.white(" Generated Documents:"));
83
+ for (const doc of genResult.documentsGenerated) {
84
+ const icon = doc.generated ? chalk.green("✓") : chalk.red("✗");
85
+ console.log(` ${icon} ${doc.path}${doc.error ? chalk.gray(` (${doc.error})`) : ""}`);
86
+ }
87
+ }
88
+ if (genResult.errors.length > 0 && !options.dryRun) {
89
+ console.log();
90
+ console.log(chalk.yellow(" Agent Errors:"));
91
+ genResult.errors.forEach((err) => {
92
+ console.log(chalk.gray(` - ${err}`));
93
+ });
94
+ }
95
+ } catch (genError) {
96
+ genSpinner.fail("Agent generation failed");
97
+ console.error(chalk.red(String(genError)));
98
+ }
99
+ }
100
+ console.log();
63
101
  console.log(chalk.cyan("Next: ") + chalk.white("kg graph") + chalk.gray(" to generate knowledge graph"));
64
102
  console.log();
65
103
  } catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"docs.js","sources":["../../../src/cli/commands/docs.ts"],"sourcesContent":["/**\n * Docs Command\n *\n * Initialize and manage documentation directory.\n */\n\nimport { Command } from 'commander';\nimport chalk from 'chalk';\nimport ora from 'ora';\nimport { initDocs, docsExist, getDocsPath } from '../../generators/docs-init.js';\nimport { validateProjectRoot, validateDocsPath } from '../../core/security.js';\n\n/**\n * Create docs command\n */\nexport function createDocsCommand(): Command {\n const command = new Command('docs');\n\n command\n .description('Documentation management commands');\n\n // Init subcommand\n command\n .command('init')\n .description('Initialize documentation directory with weave-nn structure')\n .option('-p, --path <path>', 'Project root path', '.')\n .option('-d, --docs <path>', 'Docs directory path', 'docs')\n .option('-t, --template <template>', 'Template to use (default, minimal)')\n .option('--no-examples', 'Skip example files')\n .option('--no-detect', 'Skip framework detection')\n .option('-f, --force', 'Overwrite existing files')\n .action(async (options) => {\n const spinner = ora('Initializing documentation...').start();\n\n try {\n // Validate paths to prevent traversal attacks\n const projectRoot = validateProjectRoot(options.path);\n const docsPath = options.docs;\n validateDocsPath(projectRoot, docsPath); // Ensure docs stays within project\n\n // Note: initDocs is additive - it only creates missing files/directories\n // The --force flag is for overwriting existing files if needed in the future\n const isExisting = docsExist(projectRoot, docsPath);\n if (isExisting) {\n spinner.text = 'Adding missing files to existing documentation...';\n }\n\n const result = await initDocs({\n projectRoot,\n docsPath,\n includeExamples: options.examples !== false,\n detectFramework: options.detect !== false,\n });\n\n if (result.success) {\n if (isExisting && result.filesCreated.length === 0) {\n spinner.succeed('Documentation already complete - no new files needed');\n } else if (isExisting) {\n spinner.succeed(`Documentation updated - added ${result.filesCreated.length} missing files`);\n } else {\n spinner.succeed('Documentation initialized!');\n }\n } else {\n spinner.warn('Documentation initialized with errors');\n }\n\n console.log();\n console.log(chalk.white(' Created:'));\n console.log(chalk.gray(` Path: ${result.docsPath}`));\n console.log(chalk.green(` Files: ${result.filesCreated.length}`));\n\n if (result.errors.length > 0) {\n console.log();\n console.log(chalk.yellow(' Errors:'));\n result.errors.forEach(err => {\n console.log(chalk.gray(` - ${err}`));\n });\n }\n\n console.log();\n console.log(chalk.cyan('Structure created:'));\n console.log(chalk.gray(`\n ${docsPath}/\n ├── README.md # Documentation home\n ├── PRIMITIVES.md # Technology primitives\n ├── MOC.md # Map of Content\n ├── concepts/ # Abstract concepts\n ├── components/ # Reusable components\n ├── services/ # Backend services\n ├── features/ # Product features\n ├── integrations/ # External integrations\n ├── standards/ # Coding standards\n ├── guides/ # How-to guides\n └── references/ # API references\n `));\n\n console.log(chalk.cyan('Next: ') + chalk.white('kg graph') + chalk.gray(' to generate knowledge graph'));\n console.log();\n\n } catch (error) {\n spinner.fail('Failed to initialize documentation');\n console.error(chalk.red(String(error)));\n process.exit(1);\n }\n });\n\n // Status subcommand\n command\n .command('status')\n .description('Show documentation status')\n .option('-p, --path <path>', 'Project root path', '.')\n .action(async (options) => {\n // Validate path to prevent traversal\n const projectRoot = validateProjectRoot(options.path);\n const docsPath = getDocsPath(projectRoot);\n\n if (!docsPath) {\n console.log(chalk.yellow(' No documentation directory found'));\n console.log(chalk.gray(' Run ') + chalk.cyan('kg docs init') + chalk.gray(' to create one'));\n return;\n }\n\n console.log(chalk.white('\\n Documentation Status\\n'));\n console.log(chalk.gray(' Path:'), chalk.white(docsPath));\n console.log();\n\n // Count files\n const fg = await import('fast-glob');\n const files = await fg.default('**/*.md', {\n cwd: docsPath,\n ignore: ['node_modules/**', '.git/**'],\n });\n\n console.log(chalk.gray(' Markdown files:'), chalk.white(files.length));\n\n // Check for key files\n const keyFiles = ['README.md', 'PRIMITIVES.md', 'MOC.md'];\n const fs = await import('fs');\n const path = await import('path');\n\n console.log();\n console.log(chalk.white(' Key Files:'));\n keyFiles.forEach(file => {\n const exists = fs.existsSync(path.join(docsPath, file));\n const icon = exists ? chalk.green('✓') : chalk.red('✗');\n console.log(` ${icon} ${file}`);\n });\n\n // Check directories\n const dirs = ['concepts', 'components', 'services', 'features', 'guides'];\n console.log();\n console.log(chalk.white(' Directories:'));\n dirs.forEach(dir => {\n const exists = fs.existsSync(path.join(docsPath, dir));\n const icon = exists ? chalk.green('✓') : chalk.gray('○');\n console.log(` ${icon} ${dir}/`);\n });\n\n console.log();\n });\n\n return command;\n}\n"],"names":[],"mappings":";;;;;AAeO,SAAS,oBAA6B;AAC3C,QAAM,UAAU,IAAI,QAAQ,MAAM;AAElC,UACG,YAAY,mCAAmC;AAGlD,UACG,QAAQ,MAAM,EACd,YAAY,4DAA4D,EACxE,OAAO,qBAAqB,qBAAqB,GAAG,EACpD,OAAO,qBAAqB,uBAAuB,MAAM,EACzD,OAAO,6BAA6B,oCAAoC,EACxE,OAAO,iBAAiB,oBAAoB,EAC5C,OAAO,eAAe,0BAA0B,EAChD,OAAO,eAAe,0BAA0B,EAChD,OAAO,OAAO,YAAY;AACzB,UAAM,UAAU,IAAI,+BAA+B,EAAE,MAAA;AAErD,QAAI;AAEF,YAAM,cAAc,oBAAoB,QAAQ,IAAI;AACpD,YAAM,WAAW,QAAQ;AACzB,uBAAiB,aAAa,QAAQ;AAItC,YAAM,aAAa,UAAU,aAAa,QAAQ;AAClD,UAAI,YAAY;AACd,gBAAQ,OAAO;AAAA,MACjB;AAEA,YAAM,SAAS,MAAM,SAAS;AAAA,QAC5B;AAAA,QACA;AAAA,QACA,iBAAiB,QAAQ,aAAa;AAAA,QACtC,iBAAiB,QAAQ,WAAW;AAAA,MAAA,CACrC;AAED,UAAI,OAAO,SAAS;AAClB,YAAI,cAAc,OAAO,aAAa,WAAW,GAAG;AAClD,kBAAQ,QAAQ,sDAAsD;AAAA,QACxE,WAAW,YAAY;AACrB,kBAAQ,QAAQ,iCAAiC,OAAO,aAAa,MAAM,gBAAgB;AAAA,QAC7F,OAAO;AACL,kBAAQ,QAAQ,4BAA4B;AAAA,QAC9C;AAAA,MACF,OAAO;AACL,gBAAQ,KAAK,uCAAuC;AAAA,MACtD;AAEA,cAAQ,IAAA;AACR,cAAQ,IAAI,MAAM,MAAM,YAAY,CAAC;AACrC,cAAQ,IAAI,MAAM,KAAK,aAAa,OAAO,Q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,MAAM,MAAM,QAAQ,CAAC;AACxD,YAAQ,IAAA;AAGR,UAAM,KAAK,MAAM,OAAO,WAAW;AACnC,UAAM,QAAQ,MAAM,GAAG,QAAQ,WAAW;AAAA,MACxC,KAAK;AAAA,MACL,QAAQ,CAAC,mBAAmB,SAAS;AAAA,IAAA,CACtC;AAED,YAAQ,IAAI,MAAM,KAAK,mBAAmB,GAAG,MAAM,MAAM,MAAM,MAAM,CAAC;AAGtE,UAAM,WAAW,CAAC,aAAa,iBAAiB,QAAQ;AACxD,UAAM,KAAK,MAAM,OAAO,IAAI;AAC5B,UAAM,OAAO,MAAM,OAAO,MAAM;AAEhC,YAAQ,IAAA;AACR,YAAQ,IAAI,MAAM,MAAM,cAAc,CAAC;AACvC,aAAS,QAAQ,CAAA,SAAQ;AACvB,YAAM,SAAS,GAAG,WAAW,KAAK,KAAK,UAAU,IAAI,CAAC;AACtD,YAAM,OAAO,SAAS,MAAM,MAAM,GAAG,IAAI,MAAM,IAAI,GAAG;AACtD,cAAQ,IAAI,OAAO,IAAI,IAAI,IAAI,EAAE;AAAA,IACnC,CAAC;AAGD,UAAM,OAAO,CAAC,YAAY,cAAc,YAAY,YAAY,QAAQ;AACxE,YAAQ,IAAA;AACR,YAAQ,IAAI,MAAM,MAAM,gBAAgB,CAAC;AACzC,SAAK,QAAQ,CAAA,QAAO;AAClB,YAAM,SAAS,GAAG,WAAW,KAAK,KAAK,UAAU,GAAG,CAAC;AACrD,YAAM,OAAO,SAAS,MAAM,MAAM,GAAG,IAAI,MAAM,KAAK,GAAG;AACvD,cAAQ,IAAI,OAAO,IAAI,IAAI,GAAG,GAAG;AAAA,IACnC,CAAC;AAED,YAAQ,IAAA;AAAA,EACV,CAAC;AAEH,SAAO;AACT;"}
1
+ {"version":3,"file":"docs.js","sources":["../../../src/cli/commands/docs.ts"],"sourcesContent":["/**\n * Docs Command\n *\n * Initialize and manage documentation directory.\n */\n\nimport { Command } from 'commander';\nimport chalk from 'chalk';\nimport ora from 'ora';\nimport { initDocs, docsExist, getDocsPath } from '../../generators/docs-init.js';\nimport { generateDocsWithAgents } from '../../generators/doc-generator-agents.js';\nimport { validateProjectRoot, validateDocsPath } from '../../core/security.js';\n\n/**\n * Create docs command\n */\nexport function createDocsCommand(): Command {\n const command = new Command('docs');\n\n command\n .description('Documentation management commands');\n\n // Init subcommand\n command\n .command('init')\n .description('Initialize documentation directory with weave-nn structure')\n .option('-p, --path <path>', 'Project root path', '.')\n .option('-d, --docs <path>', 'Docs directory path', 'docs')\n .option('-t, --template <template>', 'Template to use (default, minimal)')\n .option('--no-examples', 'Skip example files')\n .option('--no-detect', 'Skip framework detection')\n .option('-f, --force', 'Overwrite existing files')\n .option('-g, --generate', 'Generate documents using expert agents')\n .option('--parallel', 'Run agent generation in parallel')\n .option('--dry-run', 'Show what would be generated without creating files')\n .option('-v, --verbose', 'Show detailed agent output')\n .action(async (options) => {\n const spinner = ora('Initializing documentation...').start();\n\n try {\n // Validate paths to prevent traversal attacks\n const projectRoot = validateProjectRoot(options.path);\n const docsPath = options.docs;\n validateDocsPath(projectRoot, docsPath); // Ensure docs stays within project\n\n // Note: initDocs is additive - it only creates missing files/directories\n // The --force flag is for overwriting existing files if needed in the future\n const isExisting = docsExist(projectRoot, docsPath);\n if (isExisting) {\n spinner.text = 'Adding missing files to existing documentation...';\n }\n\n const result = await initDocs({\n projectRoot,\n docsPath,\n includeExamples: options.examples !== false,\n detectFramework: options.detect !== false,\n });\n\n if (result.success) {\n if (isExisting && result.filesCreated.length === 0) {\n spinner.succeed('Documentation already complete - no new files needed');\n } else if (isExisting) {\n spinner.succeed(`Documentation updated - added ${result.filesCreated.length} missing files`);\n } else {\n spinner.succeed('Documentation initialized!');\n }\n } else {\n spinner.warn('Documentation initialized with errors');\n }\n\n console.log();\n console.log(chalk.white(' Created:'));\n console.log(chalk.gray(` Path: ${result.docsPath}`));\n console.log(chalk.green(` Files: ${result.filesCreated.length}`));\n\n if (result.errors.length > 0) {\n console.log();\n console.log(chalk.yellow(' Errors:'));\n result.errors.forEach(err => {\n console.log(chalk.gray(` - ${err}`));\n });\n }\n\n console.log();\n console.log(chalk.cyan('Structure created:'));\n console.log(chalk.gray(`\n ${docsPath}/\n ├── README.md # Documentation home\n ├── PRIMITIVES.md # Technology primitives\n ├── MOC.md # Map of Content\n ├── concepts/ # Abstract concepts\n ├── components/ # Reusable components\n ├── services/ # Backend services\n ├── features/ # Product features\n ├── integrations/ # External integrations\n ├── standards/ # Coding standards\n ├── guides/ # How-to guides\n └── references/ # API references\n `));\n\n // Run agent generation if requested\n if (options.generate) {\n console.log();\n const genSpinner = ora('Analyzing project and generating documents with expert agents...').start();\n\n try {\n const genResult = await generateDocsWithAgents(projectRoot, result.docsPath, {\n parallel: options.parallel,\n dryRun: options.dryRun,\n verbose: options.verbose,\n });\n\n if (options.dryRun) {\n genSpinner.info('Dry run complete - no files created');\n } else if (genResult.success) {\n genSpinner.succeed(`Generated ${genResult.documentsGenerated.filter(d => d.generated).length} documents using ${genResult.agentsSpawned} agents`);\n } else {\n genSpinner.warn(`Generated ${genResult.documentsGenerated.filter(d => d.generated).length} documents with ${genResult.errors.length} errors`);\n }\n\n if (genResult.documentsGenerated.length > 0 && !options.dryRun) {\n console.log();\n console.log(chalk.white(' Generated Documents:'));\n for (const doc of genResult.documentsGenerated) {\n const icon = doc.generated ? chalk.green('✓') : chalk.red('✗');\n console.log(` ${icon} ${doc.path}${doc.error ? chalk.gray(` (${doc.error})`) : ''}`);\n }\n }\n\n if (genResult.errors.length > 0 && !options.dryRun) {\n console.log();\n console.log(chalk.yellow(' Agent Errors:'));\n genResult.errors.forEach(err => {\n console.log(chalk.gray(` - ${err}`));\n });\n }\n } catch (genError) {\n genSpinner.fail('Agent generation failed');\n console.error(chalk.red(String(genError)));\n }\n }\n\n console.log();\n console.log(chalk.cyan('Next: ') + chalk.white('kg graph') + chalk.gray(' to generate knowledge graph'));\n console.log();\n\n } catch (error) {\n spinner.fail('Failed to initialize documentation');\n console.error(chalk.red(String(error)));\n process.exit(1);\n }\n });\n\n // Status subcommand\n command\n .command('status')\n .description('Show documentation status')\n .option('-p, --path <path>', 'Project root path', '.')\n .action(async (options) => {\n // Validate path to prevent traversal\n const projectRoot = validateProjectRoot(options.path);\n const docsPath = getDocsPath(projectRoot);\n\n if (!docsPath) {\n console.log(chalk.yellow(' No documentation directory found'));\n console.log(chalk.gray(' Run ') + chalk.cyan('kg docs init') + chalk.gray(' to create one'));\n return;\n }\n\n console.log(chalk.white('\\n Documentation Status\\n'));\n console.log(chalk.gray(' Path:'), chalk.white(docsPath));\n console.log();\n\n // Count files\n const fg = await import('fast-glob');\n const files = await fg.default('**/*.md', {\n cwd: docsPath,\n ignore: ['node_modules/**', '.git/**'],\n });\n\n console.log(chalk.gray(' Markdown files:'), chalk.white(files.length));\n\n // Check for key files\n const keyFiles = ['README.md', 'PRIMITIVES.md', 'MOC.md'];\n const fs = await import('fs');\n const path = await import('path');\n\n console.log();\n console.log(chalk.white(' Key Files:'));\n keyFiles.forEach(file => {\n const exists = fs.existsSync(path.join(docsPath, file));\n const icon = exists ? chalk.green('✓') : chalk.red('✗');\n console.log(` ${icon} ${file}`);\n });\n\n // Check directories\n const dirs = ['concepts', 'components', 'services', 'features', 'guides'];\n console.log();\n console.log(chalk.white(' Directories:'));\n dirs.forEach(dir => {\n const exists = fs.existsSync(path.join(docsPath, dir));\n const icon = exists ? chalk.green('✓') : chalk.gray('○');\n console.log(` ${icon} ${dir}/`);\n });\n\n console.log();\n });\n\n return command;\n}\n"],"names":[],"mappings":";;;;;;AAgBO,SAAS,oBAA6B;AAC3C,QAAM,UAAU,IAAI,QAAQ,MAAM;AAElC,UACG,YAAY,mCAAmC;AAGlD,UACG,QAAQ,MAAM,EACd,YAAY,4DAA4D,EACxE,OAAO,qBAAqB,qBAAqB,GAAG,EACpD,OAAO,qBAAqB,uBAAuB,MAAM,EACzD,OAAO,6BAA6B,oCAAoC,EACxE,OAAO,iBAAiB,oBAAoB,EAC5C,OAAO,eA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AA,MACL,QAAQ,CAAC,mBAAmB,SAAS;AAAA,IAAA,CACtC;AAED,YAAQ,IAAI,MAAM,KAAK,mBAAmB,GAAG,MAAM,MAAM,MAAM,MAAM,CAAC;AAGtE,UAAM,WAAW,CAAC,aAAa,iBAAiB,QAAQ;AACxD,UAAM,KAAK,MAAM,OAAO,IAAI;AAC5B,UAAM,OAAO,MAAM,OAAO,MAAM;AAEhC,YAAQ,IAAA;AACR,YAAQ,IAAI,MAAM,MAAM,cAAc,CAAC;AACvC,aAAS,QAAQ,CAAA,SAAQ;AACvB,YAAM,SAAS,GAAG,WAAW,KAAK,KAAK,UAAU,IAAI,CAAC;AACtD,YAAM,OAAO,SAAS,MAAM,MAAM,GAAG,IAAI,MAAM,IAAI,GAAG;AACtD,cAAQ,IAAI,OAAO,IAAI,IAAI,IAAI,EAAE;AAAA,IACnC,CAAC;AAGD,UAAM,OAAO,CAAC,YAAY,cAAc,YAAY,YAAY,QAAQ;AACxE,YAAQ,IAAA;AACR,YAAQ,IAAI,MAAM,MAAM,gBAAgB,CAAC;AACzC,SAAK,QAAQ,CAAA,QAAO;AAClB,YAAM,SAAS,GAAG,WAAW,KAAK,KAAK,UAAU,GAAG,CAAC;AACrD,YAAM,OAAO,SAAS,MAAM,MAAM,GAAG,IAAI,MAAM,KAAK,GAAG;AACvD,cAAQ,IAAI,OAAO,IAAI,IAAI,GAAG,GAAG;AAAA,IACnC,CAAC;AAED,YAAQ,IAAA;AAAA,EACV,CAAC;AAEH,SAAO;AACT;"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Agent-Driven Document Generator
3
+ *
4
+ * Spawns expert agents from claude-flow to analyze existing code and
5
+ * documentation, then generates appropriate documents for each directory.
6
+ */
7
+ /**
8
+ * Document generation context
9
+ */
10
+ export interface GenerationContext {
11
+ projectRoot: string;
12
+ docsPath: string;
13
+ projectName: string;
14
+ languages: string[];
15
+ frameworks: string[];
16
+ existingDocs: string[];
17
+ sourceFiles: string[];
18
+ }
19
+ /**
20
+ * Generation result for a single document
21
+ */
22
+ export interface GeneratedDoc {
23
+ path: string;
24
+ title: string;
25
+ type: string;
26
+ generated: boolean;
27
+ error?: string;
28
+ }
29
+ /**
30
+ * Overall generation result
31
+ */
32
+ export interface AgentGenerationResult {
33
+ success: boolean;
34
+ documentsGenerated: GeneratedDoc[];
35
+ agentsSpawned: number;
36
+ errors: string[];
37
+ }
38
+ /**
39
+ * Analyze project and generate documents using expert agents
40
+ */
41
+ export declare function generateDocsWithAgents(projectRoot: string, docsPath: string, options?: {
42
+ parallel?: boolean;
43
+ dryRun?: boolean;
44
+ verbose?: boolean;
45
+ }): Promise<AgentGenerationResult>;
46
+ //# sourceMappingURL=doc-generator-agents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doc-generator-agents.d.ts","sourceRoot":"","sources":["../../src/generators/doc-generator-agents.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,EAAE,YAAY,EAAE,CAAC;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAaD;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE;IACP,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACd,GACL,OAAO,CAAC,qBAAqB,CAAC,CA0EhC"}