@ai-coders/context 0.2.1 → 0.3.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/README.md +113 -580
- package/dist/generators/agents/agentGenerator.d.ts +6 -9
- package/dist/generators/agents/agentGenerator.d.ts.map +1 -1
- package/dist/generators/agents/agentGenerator.js +89 -32
- package/dist/generators/agents/agentGenerator.js.map +1 -1
- package/dist/generators/agents/index.d.ts +0 -2
- package/dist/generators/agents/index.d.ts.map +1 -1
- package/dist/generators/agents/index.js +1 -5
- package/dist/generators/agents/index.js.map +1 -1
- package/dist/generators/agents/templates/index.d.ts +4 -0
- package/dist/generators/agents/templates/index.d.ts.map +1 -0
- package/dist/generators/agents/templates/index.js +8 -0
- package/dist/generators/agents/templates/index.js.map +1 -0
- package/dist/generators/agents/templates/indexTemplate.d.ts +3 -0
- package/dist/generators/agents/templates/indexTemplate.d.ts.map +1 -0
- package/dist/generators/agents/templates/indexTemplate.js +35 -0
- package/dist/generators/agents/templates/indexTemplate.js.map +1 -0
- package/dist/generators/agents/templates/playbookTemplate.d.ts +4 -0
- package/dist/generators/agents/templates/playbookTemplate.d.ts.map +1 -0
- package/dist/generators/agents/templates/playbookTemplate.js +63 -0
- package/dist/generators/agents/templates/playbookTemplate.js.map +1 -0
- package/dist/generators/agents/templates/types.d.ts +14 -0
- package/dist/generators/agents/templates/types.d.ts.map +1 -0
- package/dist/generators/agents/templates/types.js +3 -0
- package/dist/generators/agents/templates/types.js.map +1 -0
- package/dist/generators/documentation/documentationGenerator.d.ts +9 -15
- package/dist/generators/documentation/documentationGenerator.d.ts.map +1 -1
- package/dist/generators/documentation/documentationGenerator.js +65 -77
- package/dist/generators/documentation/documentationGenerator.js.map +1 -1
- package/dist/generators/documentation/guideRegistry.d.ts +6 -0
- package/dist/generators/documentation/guideRegistry.d.ts.map +1 -0
- package/dist/generators/documentation/guideRegistry.js +82 -0
- package/dist/generators/documentation/guideRegistry.js.map +1 -0
- package/dist/generators/documentation/index.d.ts +0 -6
- package/dist/generators/documentation/index.d.ts.map +1 -1
- package/dist/generators/documentation/index.js +1 -17
- package/dist/generators/documentation/index.js.map +1 -1
- package/dist/generators/documentation/templates/architectureTemplate.d.ts +3 -0
- package/dist/generators/documentation/templates/architectureTemplate.d.ts.map +1 -0
- package/dist/generators/documentation/templates/architectureTemplate.js +66 -0
- package/dist/generators/documentation/templates/architectureTemplate.js.map +1 -0
- package/dist/generators/documentation/templates/common.d.ts +7 -0
- package/dist/generators/documentation/templates/common.d.ts.map +1 -0
- package/dist/generators/documentation/templates/common.js +58 -0
- package/dist/generators/documentation/templates/common.js.map +1 -0
- package/dist/generators/documentation/templates/dataFlowTemplate.d.ts +3 -0
- package/dist/generators/documentation/templates/dataFlowTemplate.d.ts.map +1 -0
- package/dist/generators/documentation/templates/dataFlowTemplate.js +55 -0
- package/dist/generators/documentation/templates/dataFlowTemplate.js.map +1 -0
- package/dist/generators/documentation/templates/developmentWorkflowTemplate.d.ts +2 -0
- package/dist/generators/documentation/templates/developmentWorkflowTemplate.d.ts.map +1 -0
- package/dist/generators/documentation/templates/developmentWorkflowTemplate.js +59 -0
- package/dist/generators/documentation/templates/developmentWorkflowTemplate.js.map +1 -0
- package/dist/generators/documentation/templates/frontMatter.d.ts +11 -0
- package/dist/generators/documentation/templates/frontMatter.d.ts.map +1 -0
- package/dist/generators/documentation/templates/frontMatter.js +29 -0
- package/dist/generators/documentation/templates/frontMatter.js.map +1 -0
- package/dist/generators/documentation/templates/glossaryTemplate.d.ts +3 -0
- package/dist/generators/documentation/templates/glossaryTemplate.d.ts.map +1 -0
- package/dist/generators/documentation/templates/glossaryTemplate.js +55 -0
- package/dist/generators/documentation/templates/glossaryTemplate.js.map +1 -0
- package/dist/generators/documentation/templates/index.d.ts +11 -0
- package/dist/generators/documentation/templates/index.d.ts.map +1 -0
- package/dist/generators/documentation/templates/index.js +22 -0
- package/dist/generators/documentation/templates/index.js.map +1 -0
- package/dist/generators/documentation/templates/indexTemplate.d.ts +3 -0
- package/dist/generators/documentation/templates/indexTemplate.d.ts.map +1 -0
- package/dist/generators/documentation/templates/indexTemplate.js +56 -0
- package/dist/generators/documentation/templates/indexTemplate.js.map +1 -0
- package/dist/generators/documentation/templates/projectOverviewTemplate.d.ts +3 -0
- package/dist/generators/documentation/templates/projectOverviewTemplate.d.ts.map +1 -0
- package/dist/generators/documentation/templates/projectOverviewTemplate.js +68 -0
- package/dist/generators/documentation/templates/projectOverviewTemplate.js.map +1 -0
- package/dist/generators/documentation/templates/securityTemplate.d.ts +2 -0
- package/dist/generators/documentation/templates/securityTemplate.d.ts.map +1 -0
- package/dist/generators/documentation/templates/securityTemplate.js +53 -0
- package/dist/generators/documentation/templates/securityTemplate.js.map +1 -0
- package/dist/generators/documentation/templates/testingTemplate.d.ts +2 -0
- package/dist/generators/documentation/templates/testingTemplate.d.ts.map +1 -0
- package/dist/generators/documentation/templates/testingTemplate.js +59 -0
- package/dist/generators/documentation/templates/testingTemplate.js.map +1 -0
- package/dist/generators/documentation/templates/toolingTemplate.d.ts +2 -0
- package/dist/generators/documentation/templates/toolingTemplate.d.ts.map +1 -0
- package/dist/generators/documentation/templates/toolingTemplate.js +56 -0
- package/dist/generators/documentation/templates/toolingTemplate.js.map +1 -0
- package/dist/generators/documentation/templates/types.d.ts +23 -0
- package/dist/generators/documentation/templates/types.d.ts.map +1 -0
- package/dist/generators/documentation/templates/types.js +3 -0
- package/dist/generators/documentation/templates/types.js.map +1 -0
- package/dist/generators/documentation/templates.d.ts +31 -0
- package/dist/generators/documentation/templates.d.ts.map +1 -0
- package/dist/generators/documentation/templates.js +566 -0
- package/dist/generators/documentation/templates.js.map +1 -0
- package/dist/generators/plans/index.d.ts +2 -0
- package/dist/generators/plans/index.d.ts.map +1 -0
- package/dist/generators/plans/index.js +6 -0
- package/dist/generators/plans/index.js.map +1 -0
- package/dist/generators/plans/planGenerator.d.ts +22 -0
- package/dist/generators/plans/planGenerator.d.ts.map +1 -0
- package/dist/generators/plans/planGenerator.js +109 -0
- package/dist/generators/plans/planGenerator.js.map +1 -0
- package/dist/generators/plans/templates/indexTemplate.d.ts +3 -0
- package/dist/generators/plans/templates/indexTemplate.d.ts.map +1 -0
- package/dist/generators/plans/templates/indexTemplate.js +36 -0
- package/dist/generators/plans/templates/indexTemplate.js.map +1 -0
- package/dist/generators/plans/templates/planTemplate.d.ts +3 -0
- package/dist/generators/plans/templates/planTemplate.d.ts.map +1 -0
- package/dist/generators/plans/templates/planTemplate.js +83 -0
- package/dist/generators/plans/templates/planTemplate.js.map +1 -0
- package/dist/generators/plans/templates/types.d.ts +19 -0
- package/dist/generators/plans/templates/types.d.ts.map +1 -0
- package/dist/generators/plans/templates/types.js +3 -0
- package/dist/generators/plans/templates/types.js.map +1 -0
- package/dist/generators/shared/contextGenerator.d.ts +2 -7
- package/dist/generators/shared/contextGenerator.d.ts.map +1 -1
- package/dist/generators/shared/contextGenerator.js +2 -98
- package/dist/generators/shared/contextGenerator.js.map +1 -1
- package/dist/generators/shared/directoryTemplateHelpers.d.ts +2 -0
- package/dist/generators/shared/directoryTemplateHelpers.d.ts.map +1 -0
- package/dist/generators/shared/directoryTemplateHelpers.js +12 -0
- package/dist/generators/shared/directoryTemplateHelpers.js.map +1 -0
- package/dist/generators/shared/index.d.ts +1 -0
- package/dist/generators/shared/index.d.ts.map +1 -1
- package/dist/generators/shared/index.js +3 -1
- package/dist/generators/shared/index.js.map +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1300 -609
- package/dist/index.js.map +1 -1
- package/dist/utils/cliUI.d.ts +6 -4
- package/dist/utils/cliUI.d.ts.map +1 -1
- package/dist/utils/cliUI.js +71 -56
- package/dist/utils/cliUI.js.map +1 -1
- package/dist/utils/i18n.d.ts +181 -0
- package/dist/utils/i18n.d.ts.map +1 -0
- package/dist/utils/i18n.js +401 -0
- package/dist/utils/i18n.js.map +1 -0
- package/package.json +26 -23
- package/prompts/update_plan_prompt.md +42 -0
- package/prompts/update_scaffold_prompt.md +48 -0
- package/dist/generators/agentGenerator.d.ts +0 -23
- package/dist/generators/agentGenerator.d.ts.map +0 -1
- package/dist/generators/agentGenerator.js +0 -357
- package/dist/generators/agentGenerator.js.map +0 -1
- package/dist/generators/documentation/enhancedDocumentationGenerator.d.ts +0 -21
- package/dist/generators/documentation/enhancedDocumentationGenerator.d.ts.map +0 -1
- package/dist/generators/documentation/enhancedDocumentationGenerator.js +0 -216
- package/dist/generators/documentation/enhancedDocumentationGenerator.js.map +0 -1
- package/dist/generators/documentation/newDocumentationTemplates.d.ts +0 -19
- package/dist/generators/documentation/newDocumentationTemplates.d.ts.map +0 -1
- package/dist/generators/documentation/newDocumentationTemplates.js +0 -307
- package/dist/generators/documentation/newDocumentationTemplates.js.map +0 -1
- package/dist/generators/documentationGenerator.d.ts +0 -22
- package/dist/generators/documentationGenerator.d.ts.map +0 -1
- package/dist/generators/documentationGenerator.js +0 -235
- package/dist/generators/documentationGenerator.js.map +0 -1
- package/dist/generators/documentationTemplates.d.ts +0 -16
- package/dist/generators/documentationTemplates.d.ts.map +0 -1
- package/dist/generators/documentationTemplates.js +0 -326
- package/dist/generators/documentationTemplates.js.map +0 -1
- package/dist/generators/documentationUtils.d.ts +0 -7
- package/dist/generators/documentationUtils.d.ts.map +0 -1
- package/dist/generators/documentationUtils.js +0 -38
- package/dist/generators/documentationUtils.js.map +0 -1
- package/dist/generators/incrementalDocumentationGenerator.d.ts +0 -33
- package/dist/generators/incrementalDocumentationGenerator.d.ts.map +0 -1
- package/dist/generators/incrementalDocumentationGenerator.js +0 -400
- package/dist/generators/incrementalDocumentationGenerator.js.map +0 -1
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.EnhancedDocumentationGenerator = void 0;
|
|
37
|
-
const path = __importStar(require("path"));
|
|
38
|
-
const moduleGrouper_1 = require("../moduleGrouper");
|
|
39
|
-
const shared_1 = require("../shared");
|
|
40
|
-
const newDocumentationTemplates_1 = require("./newDocumentationTemplates");
|
|
41
|
-
const documentationTemplates_1 = require("./documentationTemplates");
|
|
42
|
-
const documentationTypes_1 = require("./documentationTypes");
|
|
43
|
-
class EnhancedDocumentationGenerator {
|
|
44
|
-
constructor(fileMapper, llmClient) {
|
|
45
|
-
this.fileMapper = fileMapper;
|
|
46
|
-
this.llmClient = llmClient;
|
|
47
|
-
this.moduleGrouper = new moduleGrouper_1.ModuleGrouper(fileMapper);
|
|
48
|
-
this.newTemplates = new newDocumentationTemplates_1.NewDocumentationTemplates(llmClient, fileMapper);
|
|
49
|
-
this.legacyTemplates = new documentationTemplates_1.DocumentationTemplates(llmClient);
|
|
50
|
-
}
|
|
51
|
-
async generateDocumentation(repoStructure, outputDir, config = {}, verbose = false) {
|
|
52
|
-
const fullConfig = {
|
|
53
|
-
enableLegacyDocs: false,
|
|
54
|
-
enableNewDocs: true,
|
|
55
|
-
focusAreas: [],
|
|
56
|
-
maxContentLength: 2000,
|
|
57
|
-
includeExamples: true,
|
|
58
|
-
...config
|
|
59
|
-
};
|
|
60
|
-
const docsDir = path.join(outputDir, 'docs');
|
|
61
|
-
await shared_1.GeneratorUtils.ensureDirectoryAndLog(docsDir, verbose, '📚 Generating enhanced documentation in');
|
|
62
|
-
const moduleGroups = this.moduleGrouper.getModuleGroups(repoStructure);
|
|
63
|
-
if (fullConfig.enableNewDocs) {
|
|
64
|
-
await this.generateNewStyleDocumentation(repoStructure, moduleGroups, docsDir, verbose);
|
|
65
|
-
}
|
|
66
|
-
if (fullConfig.enableLegacyDocs) {
|
|
67
|
-
await this.generateLegacyDocumentation(repoStructure, moduleGroups, docsDir, verbose);
|
|
68
|
-
}
|
|
69
|
-
// Generate combined index
|
|
70
|
-
await this.generateMainIndex(docsDir, fullConfig, verbose);
|
|
71
|
-
}
|
|
72
|
-
async generateNewStyleDocumentation(repoStructure, moduleGroups, docsDir, verbose) {
|
|
73
|
-
shared_1.GeneratorUtils.logProgress('🧠 Generating high-level conceptual documentation...', verbose);
|
|
74
|
-
const generators = {
|
|
75
|
-
'mental-model': () => this.newTemplates.createMentalModel(repoStructure, moduleGroups),
|
|
76
|
-
'architecture-decisions': () => this.newTemplates.createArchitectureDecisions(repoStructure, moduleGroups),
|
|
77
|
-
'code-organization': () => this.newTemplates.createCodeOrganization(repoStructure, moduleGroups),
|
|
78
|
-
'development-patterns': () => this.newTemplates.createDevelopmentPatterns(repoStructure, moduleGroups),
|
|
79
|
-
'ai-guidelines': () => this.newTemplates.createAIGuidelines(repoStructure, moduleGroups),
|
|
80
|
-
'contributing-workflows': () => this.newTemplates.createContributingWorkflows(repoStructure, moduleGroups),
|
|
81
|
-
'domain-context': () => this.newTemplates.createDomainContext(repoStructure, moduleGroups)
|
|
82
|
-
};
|
|
83
|
-
for (const docType of documentationTypes_1.NEW_DOCUMENTATION_TYPES) {
|
|
84
|
-
try {
|
|
85
|
-
const content = await generators[docType]();
|
|
86
|
-
const fileName = `${docType}.md`;
|
|
87
|
-
const filePath = path.join(docsDir, fileName);
|
|
88
|
-
await shared_1.GeneratorUtils.writeFileWithLogging(filePath, content, verbose, `Generated ${shared_1.GeneratorUtils.formatTitle(docType)}`);
|
|
89
|
-
}
|
|
90
|
-
catch (error) {
|
|
91
|
-
shared_1.GeneratorUtils.logError(`Error generating ${docType}`, error, verbose);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
async generateLegacyDocumentation(repoStructure, moduleGroups, docsDir, verbose) {
|
|
96
|
-
shared_1.GeneratorUtils.logProgress('📁 Generating legacy detailed documentation...', verbose);
|
|
97
|
-
// Create legacy subdirectory
|
|
98
|
-
const legacyDir = path.join(docsDir, 'legacy');
|
|
99
|
-
await shared_1.GeneratorUtils.ensureDirectoryAndLog(legacyDir, verbose, 'Creating legacy docs directory');
|
|
100
|
-
// Generate legacy documentation types
|
|
101
|
-
const legacyGenerators = [
|
|
102
|
-
{ name: 'overview.md', generator: () => this.legacyTemplates.createEnhancedProjectOverview(repoStructure) },
|
|
103
|
-
{ name: 'architecture.md', generator: () => this.legacyTemplates.createArchitectureDocumentation(repoStructure, moduleGroups) },
|
|
104
|
-
{ name: 'api-reference.md', generator: () => this.legacyTemplates.createAPIReference(repoStructure, moduleGroups) },
|
|
105
|
-
{ name: 'configuration.md', generator: () => this.legacyTemplates.createConfigurationGuide(repoStructure) },
|
|
106
|
-
{ name: 'development.md', generator: () => this.legacyTemplates.createDevelopmentGuide(repoStructure, moduleGroups) },
|
|
107
|
-
{ name: 'deployment.md', generator: () => this.legacyTemplates.createDeploymentGuide(repoStructure) },
|
|
108
|
-
{ name: 'troubleshooting.md', generator: () => this.legacyTemplates.createTroubleshootingGuide(repoStructure, moduleGroups) }
|
|
109
|
-
];
|
|
110
|
-
for (const { name, generator } of legacyGenerators) {
|
|
111
|
-
try {
|
|
112
|
-
const content = await generator();
|
|
113
|
-
const filePath = path.join(legacyDir, name);
|
|
114
|
-
await shared_1.GeneratorUtils.writeFileWithLogging(filePath, content, verbose, `Generated legacy ${name}`);
|
|
115
|
-
}
|
|
116
|
-
catch (error) {
|
|
117
|
-
shared_1.GeneratorUtils.logError(`Error generating legacy ${name}`, error, verbose);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
async generateMainIndex(docsDir, config, verbose) {
|
|
122
|
-
let indexContent;
|
|
123
|
-
if (config.enableNewDocs && config.enableLegacyDocs) {
|
|
124
|
-
// Both enabled - create combined index
|
|
125
|
-
indexContent = this.createCombinedIndex();
|
|
126
|
-
}
|
|
127
|
-
else if (config.enableNewDocs) {
|
|
128
|
-
// Only new docs
|
|
129
|
-
indexContent = this.newTemplates.createNewDocumentationIndex(documentationTypes_1.NEW_DOCUMENTATION_TYPES);
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
// Only legacy docs
|
|
133
|
-
indexContent = this.createLegacyOnlyIndex();
|
|
134
|
-
}
|
|
135
|
-
const indexPath = path.join(docsDir, 'README.md');
|
|
136
|
-
await shared_1.GeneratorUtils.writeFileWithLogging(indexPath, indexContent, verbose, 'Generated documentation index');
|
|
137
|
-
}
|
|
138
|
-
createCombinedIndex() {
|
|
139
|
-
return `# Documentation Hub
|
|
140
|
-
|
|
141
|
-
This project provides two styles of documentation to meet different needs:
|
|
142
|
-
|
|
143
|
-
## 🧠 High-Level Documentation (Recommended)
|
|
144
|
-
|
|
145
|
-
**Focus**: Understanding concepts, patterns, and how to work with the codebase
|
|
146
|
-
|
|
147
|
-
- [**Mental Model**](./mental-model.md) - Core concepts and metaphors
|
|
148
|
-
- [**Architecture Decisions**](./architecture-decisions.md) - Key design choices and rationale
|
|
149
|
-
- [**Code Organization**](./code-organization.md) - Structure and organization logic
|
|
150
|
-
- [**Development Patterns**](./development-patterns.md) - How to work effectively in this codebase
|
|
151
|
-
- [**AI Guidelines**](./ai-guidelines.md) - Guidance for AI agents
|
|
152
|
-
- [**Contributing Workflows**](./contributing-workflows.md) - Processes and procedures
|
|
153
|
-
- [**Domain Context**](./domain-context.md) - Business and domain knowledge
|
|
154
|
-
|
|
155
|
-
## 📁 Detailed Documentation (Legacy)
|
|
156
|
-
|
|
157
|
-
**Focus**: Comprehensive technical details and implementation specifics
|
|
158
|
-
|
|
159
|
-
- [**Overview**](./legacy/overview.md) - Project statistics and structure
|
|
160
|
-
- [**Architecture**](./legacy/architecture.md) - Technical architecture details
|
|
161
|
-
- [**API Reference**](./legacy/api-reference.md) - Complete API documentation
|
|
162
|
-
- [**Configuration**](./legacy/configuration.md) - Setup and configuration guides
|
|
163
|
-
- [**Development**](./legacy/development.md) - Development environment setup
|
|
164
|
-
- [**Deployment**](./legacy/deployment.md) - Deployment procedures
|
|
165
|
-
- [**Troubleshooting**](./legacy/troubleshooting.md) - Common issues and solutions
|
|
166
|
-
|
|
167
|
-
## Recommended Reading Order
|
|
168
|
-
|
|
169
|
-
**For New Team Members:**
|
|
170
|
-
1. Mental Model → Architecture Decisions → Code Organization → Development Patterns
|
|
171
|
-
|
|
172
|
-
**For AI Agents:**
|
|
173
|
-
1. Mental Model → AI Guidelines → Development Patterns → Code Organization
|
|
174
|
-
|
|
175
|
-
**For Detailed Reference:**
|
|
176
|
-
Legacy documentation provides comprehensive technical details when needed.
|
|
177
|
-
|
|
178
|
-
${shared_1.GeneratorUtils.createGeneratedByFooter('Documentation Hub')}`;
|
|
179
|
-
}
|
|
180
|
-
createLegacyOnlyIndex() {
|
|
181
|
-
return `# Documentation Index
|
|
182
|
-
|
|
183
|
-
This documentation provides comprehensive technical details about the project.
|
|
184
|
-
|
|
185
|
-
## Available Documentation
|
|
186
|
-
|
|
187
|
-
- [**Overview**](./legacy/overview.md) - Project statistics and structure
|
|
188
|
-
- [**Architecture**](./legacy/architecture.md) - Technical architecture details
|
|
189
|
-
- [**API Reference**](./legacy/api-reference.md) - Complete API documentation
|
|
190
|
-
- [**Configuration**](./legacy/configuration.md) - Setup and configuration guides
|
|
191
|
-
- [**Development**](./legacy/development.md) - Development environment setup
|
|
192
|
-
- [**Deployment**](./legacy/deployment.md) - Deployment procedures
|
|
193
|
-
- [**Troubleshooting**](./legacy/troubleshooting.md) - Common issues and solutions
|
|
194
|
-
|
|
195
|
-
${shared_1.GeneratorUtils.createGeneratedByFooter('Legacy Documentation Index')}`;
|
|
196
|
-
}
|
|
197
|
-
// Convenience methods for specific documentation types
|
|
198
|
-
async generateMentalModelOnly(repoStructure, outputDir, verbose = false) {
|
|
199
|
-
const docsDir = path.join(outputDir, 'docs');
|
|
200
|
-
await shared_1.GeneratorUtils.ensureDirectoryAndLog(docsDir, verbose, '🧠 Generating mental model documentation');
|
|
201
|
-
const moduleGroups = this.moduleGrouper.getModuleGroups(repoStructure);
|
|
202
|
-
const content = await this.newTemplates.createMentalModel(repoStructure, moduleGroups);
|
|
203
|
-
const filePath = path.join(docsDir, 'mental-model.md');
|
|
204
|
-
await shared_1.GeneratorUtils.writeFileWithLogging(filePath, content, verbose, 'Generated Mental Model');
|
|
205
|
-
}
|
|
206
|
-
async generateAIGuidelinesOnly(repoStructure, outputDir, verbose = false) {
|
|
207
|
-
const docsDir = path.join(outputDir, 'docs');
|
|
208
|
-
await shared_1.GeneratorUtils.ensureDirectoryAndLog(docsDir, verbose, '🤖 Generating AI guidelines documentation');
|
|
209
|
-
const moduleGroups = this.moduleGrouper.getModuleGroups(repoStructure);
|
|
210
|
-
const content = await this.newTemplates.createAIGuidelines(repoStructure, moduleGroups);
|
|
211
|
-
const filePath = path.join(docsDir, 'ai-guidelines.md');
|
|
212
|
-
await shared_1.GeneratorUtils.writeFileWithLogging(filePath, content, verbose, 'Generated AI Guidelines');
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
exports.EnhancedDocumentationGenerator = EnhancedDocumentationGenerator;
|
|
216
|
-
//# sourceMappingURL=enhancedDocumentationGenerator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enhancedDocumentationGenerator.js","sourceRoot":"","sources":["../../../src/generators/documentation/enhancedDocumentationGenerator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAI7B,oDAA8D;AAC9D,sCAA2C;AAC3C,2EAAwE;AACxE,qEAAkE;AAClE,6DAK8B;AAE9B,MAAa,8BAA8B;IAKzC,YACU,UAAsB,EACtB,SAAwB;QADxB,eAAU,GAAV,UAAU,CAAY;QACtB,cAAS,GAAT,SAAS,CAAe;QAEhC,IAAI,CAAC,aAAa,GAAG,IAAI,6BAAa,CAAC,UAAU,CAAC,CAAC;QACnD,IAAI,CAAC,YAAY,GAAG,IAAI,qDAAyB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QACzE,IAAI,CAAC,eAAe,GAAG,IAAI,+CAAsB,CAAC,SAAS,CAAC,CAAC;IAC/D,CAAC;IAED,KAAK,CAAC,qBAAqB,CACzB,aAA4B,EAC5B,SAAiB,EACjB,SAAuC,EAAE,EACzC,UAAmB,KAAK;QAExB,MAAM,UAAU,GAAwB;YACtC,gBAAgB,EAAE,KAAK;YACvB,aAAa,EAAE,IAAI;YACnB,UAAU,EAAE,EAAE;YACd,gBAAgB,EAAE,IAAI;YACtB,eAAe,EAAE,IAAI;YACrB,GAAG,M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|
|
2
|
-
import { BaseLLMClient } from '../../services/baseLLMClient';
|
|
3
|
-
import { ModuleGroup } from '../moduleGrouper';
|
|
4
|
-
import { NewDocumentationType } from './documentationTypes';
|
|
5
|
-
export declare class NewDocumentationTemplates {
|
|
6
|
-
private llmClient;
|
|
7
|
-
private analyzer;
|
|
8
|
-
constructor(llmClient: BaseLLMClient, fileMapper?: any);
|
|
9
|
-
createMentalModel(repoStructure: RepoStructure, moduleGroups: ModuleGroup[]): Promise<string>;
|
|
10
|
-
createArchitectureDecisions(repoStructure: RepoStructure, moduleGroups: ModuleGroup[]): Promise<string>;
|
|
11
|
-
createCodeOrganization(repoStructure: RepoStructure, moduleGroups: ModuleGroup[]): Promise<string>;
|
|
12
|
-
createDevelopmentPatterns(repoStructure: RepoStructure, moduleGroups: ModuleGroup[]): Promise<string>;
|
|
13
|
-
createAIGuidelines(repoStructure: RepoStructure, moduleGroups: ModuleGroup[]): Promise<string>;
|
|
14
|
-
createContributingWorkflows(repoStructure: RepoStructure, moduleGroups: ModuleGroup[]): Promise<string>;
|
|
15
|
-
createDomainContext(repoStructure: RepoStructure, moduleGroups: ModuleGroup[]): Promise<string>;
|
|
16
|
-
createNewDocumentationIndex(enabledTypes: NewDocumentationType[]): string;
|
|
17
|
-
private buildRepoContext;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=newDocumentationTemplates.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"newDocumentationTemplates.d.ts","sourceRoot":"","sources":["../../../src/generators/documentation/newDocumentationTemplates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG5D,qBAAa,yBAAyB;IAGxB,OAAO,CAAC,SAAS;IAF7B,OAAO,CAAC,QAAQ,CAAmB;gBAEf,SAAS,EAAE,aAAa,EAAE,UAAU,CAAC,EAAE,GAAG;IAIxD,iBAAiB,CAAC,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IA0B7F,2BAA2B,CAAC,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAgDvG,sBAAsB,CAAC,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAgDlG,yBAAyB,CAAC,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IA4CrG,kBAAkB,CAAC,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IA8B9F,2BAA2B,CAAC,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IA+BvG,mBAAmB,CAAC,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IA8BrG,2BAA2B,CAAC,YAAY,EAAE,oBAAoB,EAAE,GAAG,MAAM;IA6DzE,OAAO,CAAC,gBAAgB;CA2BzB"}
|
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NewDocumentationTemplates = void 0;
|
|
4
|
-
const shared_1 = require("../shared");
|
|
5
|
-
const codebaseAnalyzer_1 = require("../analyzers/codebaseAnalyzer");
|
|
6
|
-
class NewDocumentationTemplates {
|
|
7
|
-
constructor(llmClient, fileMapper) {
|
|
8
|
-
this.llmClient = llmClient;
|
|
9
|
-
this.analyzer = new codebaseAnalyzer_1.CodebaseAnalyzer(fileMapper);
|
|
10
|
-
}
|
|
11
|
-
async createMentalModel(repoStructure, moduleGroups) {
|
|
12
|
-
const context = this.buildRepoContext(repoStructure, moduleGroups);
|
|
13
|
-
const content = await this.llmClient.generateText(`Create a "Mental Model" document that helps developers and AI agents understand this codebase conceptually.
|
|
14
|
-
|
|
15
|
-
Include:
|
|
16
|
-
1. **Core Metaphor**: A real-world analogy that explains what this system does
|
|
17
|
-
2. **Key Abstractions**: The main concepts and how they relate (3-5 core abstractions max)
|
|
18
|
-
3. **Data Flow**: How information moves through the system
|
|
19
|
-
4. **Boundary Definitions**: What this codebase does vs what it doesn't do
|
|
20
|
-
5. **Success Metrics**: How to measure if the system is working well
|
|
21
|
-
|
|
22
|
-
Focus on "how to think about this codebase" rather than implementation details.
|
|
23
|
-
Use clear, concrete language and avoid jargon.
|
|
24
|
-
Keep it under 1500 words.`, context);
|
|
25
|
-
return `# Codebase Mental Model
|
|
26
|
-
|
|
27
|
-
${content}
|
|
28
|
-
|
|
29
|
-
${shared_1.GeneratorUtils.createGeneratedByFooter('Mental Model Documentation')}`;
|
|
30
|
-
}
|
|
31
|
-
async createArchitectureDecisions(repoStructure, moduleGroups) {
|
|
32
|
-
const context = this.buildRepoContext(repoStructure, moduleGroups);
|
|
33
|
-
// Enhance context with architectural analysis
|
|
34
|
-
let enhancedContext = context;
|
|
35
|
-
if (this.analyzer) {
|
|
36
|
-
try {
|
|
37
|
-
const architecturalPatterns = await this.analyzer.analyzeArchitecturalPatterns(repoStructure, moduleGroups);
|
|
38
|
-
const dependencyFlow = this.analyzer.analyzeDependencyFlow(repoStructure, moduleGroups);
|
|
39
|
-
enhancedContext += `\n\nArchitectural Patterns Detected:
|
|
40
|
-
${architecturalPatterns.map(p => `- ${p.name}: ${p.description} (confidence: ${p.confidence})`).join('\n')}
|
|
41
|
-
|
|
42
|
-
Dependency Flow Analysis:
|
|
43
|
-
${dependencyFlow.slice(0, 5).map(d => `- ${d.from} → ${d.to} (strength: ${d.strength.toFixed(2)})`).join('\n')}`;
|
|
44
|
-
}
|
|
45
|
-
catch (error) {
|
|
46
|
-
// Continue without enhanced analysis if it fails
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
const content = await this.llmClient.generateText(`Create an "Architecture Decisions" document that explains the key design choices in this codebase.
|
|
50
|
-
|
|
51
|
-
For each major decision, include:
|
|
52
|
-
1. **Context**: What problem was being solved?
|
|
53
|
-
2. **Decision**: What approach was chosen?
|
|
54
|
-
3. **Rationale**: Why this approach over alternatives?
|
|
55
|
-
4. **Consequences**: What are the trade-offs?
|
|
56
|
-
|
|
57
|
-
Focus on decisions that would help new developers or AI agents understand:
|
|
58
|
-
- Technology choices (languages, frameworks, libraries)
|
|
59
|
-
- Architectural patterns (how modules interact)
|
|
60
|
-
- Design constraints (what limitations shaped decisions)
|
|
61
|
-
- Code organization principles
|
|
62
|
-
|
|
63
|
-
Use the detected architectural patterns and dependency analysis to inform your decisions.
|
|
64
|
-
Limit to 5-7 most important decisions.
|
|
65
|
-
Keep explanations concise but complete.`, enhancedContext);
|
|
66
|
-
return `# Architecture Decision Records
|
|
67
|
-
|
|
68
|
-
${content}
|
|
69
|
-
|
|
70
|
-
${shared_1.GeneratorUtils.createGeneratedByFooter('Architecture Decisions Documentation')}`;
|
|
71
|
-
}
|
|
72
|
-
async createCodeOrganization(repoStructure, moduleGroups) {
|
|
73
|
-
const context = this.buildRepoContext(repoStructure, moduleGroups);
|
|
74
|
-
// Enhance with extension point analysis
|
|
75
|
-
let enhancedContext = context;
|
|
76
|
-
if (this.analyzer) {
|
|
77
|
-
try {
|
|
78
|
-
const extensionPoints = this.analyzer.identifyExtensionPoints(repoStructure);
|
|
79
|
-
const dependencyFlow = this.analyzer.analyzeDependencyFlow(repoStructure, moduleGroups);
|
|
80
|
-
enhancedContext += `\n\nExtension Points Identified:
|
|
81
|
-
${extensionPoints.map(ep => `- ${ep}`).join('\n')}
|
|
82
|
-
|
|
83
|
-
Module Dependencies:
|
|
84
|
-
${dependencyFlow.slice(0, 8).map(d => `- ${d.from} depends on ${d.to}`).join('\n')}`;
|
|
85
|
-
}
|
|
86
|
-
catch (error) {
|
|
87
|
-
// Continue without enhanced analysis if it fails
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
const content = await this.llmClient.generateText(`Create a "Code Organization Guide" that explains the logic behind this codebase's structure.
|
|
91
|
-
|
|
92
|
-
Include:
|
|
93
|
-
1. **Directory Structure Logic**: Why directories are organized this way
|
|
94
|
-
2. **Module Boundaries**: What belongs in each module and why
|
|
95
|
-
3. **Naming Conventions**: Patterns in file/folder/variable names
|
|
96
|
-
4. **Dependency Flow**: How modules depend on each other
|
|
97
|
-
5. **Extension Points**: Where/how to add new functionality
|
|
98
|
-
|
|
99
|
-
Make it practical - focus on helping someone understand:
|
|
100
|
-
- Where to find specific types of code
|
|
101
|
-
- Where to add new features
|
|
102
|
-
- How pieces fit together
|
|
103
|
-
- What patterns to follow
|
|
104
|
-
|
|
105
|
-
Use the identified extension points and dependency analysis to provide concrete guidance.
|
|
106
|
-
Avoid listing every file - focus on the organizing principles.`, enhancedContext);
|
|
107
|
-
return `# Code Organization Guide
|
|
108
|
-
|
|
109
|
-
${content}
|
|
110
|
-
|
|
111
|
-
${shared_1.GeneratorUtils.createGeneratedByFooter('Code Organization Documentation')}`;
|
|
112
|
-
}
|
|
113
|
-
async createDevelopmentPatterns(repoStructure, moduleGroups) {
|
|
114
|
-
const context = this.buildRepoContext(repoStructure, moduleGroups);
|
|
115
|
-
// Enhance with code pattern analysis
|
|
116
|
-
let enhancedContext = context;
|
|
117
|
-
if (this.analyzer) {
|
|
118
|
-
try {
|
|
119
|
-
const codePatterns = await this.analyzer.analyzeCodePatterns(repoStructure);
|
|
120
|
-
enhancedContext += `\n\nCode Patterns Detected:
|
|
121
|
-
${codePatterns.slice(0, 10).map(p => `- ${p.pattern} (${p.type}): ${p.description} - used ${p.frequency} times`).join('\n')}`;
|
|
122
|
-
}
|
|
123
|
-
catch (error) {
|
|
124
|
-
// Continue without enhanced analysis if it fails
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
const content = await this.llmClient.generateText(`Create a "Development Patterns" guide that teaches how to work effectively in this codebase.
|
|
128
|
-
|
|
129
|
-
Include:
|
|
130
|
-
1. **Common Workflows**: How to add features, fix bugs, make changes
|
|
131
|
-
2. **Code Patterns**: Established patterns to follow (with examples)
|
|
132
|
-
3. **Testing Strategy**: How testing is approached in this codebase
|
|
133
|
-
4. **Error Handling**: How errors are handled and reported
|
|
134
|
-
5. **Performance Considerations**: What to keep in mind for performance
|
|
135
|
-
|
|
136
|
-
Focus on actionable guidance:
|
|
137
|
-
- "When you need to X, do Y"
|
|
138
|
-
- "This codebase prefers pattern A over pattern B because..."
|
|
139
|
-
- "Always/never do X when..."
|
|
140
|
-
|
|
141
|
-
Use the detected code patterns to provide specific guidance about what patterns are already established.
|
|
142
|
-
Include concrete examples where helpful.
|
|
143
|
-
Target both human developers and AI agents.`, enhancedContext);
|
|
144
|
-
return `# Development Patterns
|
|
145
|
-
|
|
146
|
-
${content}
|
|
147
|
-
|
|
148
|
-
${shared_1.GeneratorUtils.createGeneratedByFooter('Development Patterns Documentation')}`;
|
|
149
|
-
}
|
|
150
|
-
async createAIGuidelines(repoStructure, moduleGroups) {
|
|
151
|
-
const context = this.buildRepoContext(repoStructure, moduleGroups);
|
|
152
|
-
const content = await this.llmClient.generateText(`Create "AI Agent Guidelines" specifically for AI assistants working on this codebase.
|
|
153
|
-
|
|
154
|
-
Include:
|
|
155
|
-
1. **Code Style Preferences**: Specific formatting and style rules
|
|
156
|
-
2. **Decision Frameworks**: How to make common technical choices
|
|
157
|
-
3. **Risk Areas**: Parts of the code that need extra careful attention
|
|
158
|
-
4. **Validation Steps**: Checks to perform before suggesting changes
|
|
159
|
-
5. **Context Clues**: How to understand the intent behind existing code
|
|
160
|
-
|
|
161
|
-
Format as clear, actionable rules:
|
|
162
|
-
- "When modifying X, always check Y"
|
|
163
|
-
- "Prefer approach A over B in this codebase"
|
|
164
|
-
- "Before changing Z, validate that..."
|
|
165
|
-
|
|
166
|
-
Make it specific to this codebase's patterns and conventions.
|
|
167
|
-
Focus on preventing common mistakes and maintaining consistency.`, context);
|
|
168
|
-
return `# AI Agent Guidelines
|
|
169
|
-
|
|
170
|
-
${content}
|
|
171
|
-
|
|
172
|
-
${shared_1.GeneratorUtils.createGeneratedByFooter('AI Guidelines Documentation')}`;
|
|
173
|
-
}
|
|
174
|
-
async createContributingWorkflows(repoStructure, moduleGroups) {
|
|
175
|
-
const context = this.buildRepoContext(repoStructure, moduleGroups);
|
|
176
|
-
const content = await this.llmClient.generateText(`Create a "Contributing Workflows" guide that explains the processes for working on this codebase.
|
|
177
|
-
|
|
178
|
-
Include:
|
|
179
|
-
1. **Development Lifecycle**: From idea to deployment
|
|
180
|
-
2. **Code Review Process**: What gets reviewed and how
|
|
181
|
-
3. **Testing Requirements**: What testing is expected
|
|
182
|
-
4. **Release Process**: How changes get deployed
|
|
183
|
-
5. **Communication**: How team members coordinate
|
|
184
|
-
|
|
185
|
-
Focus on:
|
|
186
|
-
- Step-by-step workflows
|
|
187
|
-
- Quality gates and checkpoints
|
|
188
|
-
- Tools and automation used
|
|
189
|
-
- Standards and expectations
|
|
190
|
-
|
|
191
|
-
Make it practical for both new and experienced contributors.
|
|
192
|
-
Explain not just what to do, but why these processes exist.`, context);
|
|
193
|
-
return `# Contributing Workflows
|
|
194
|
-
|
|
195
|
-
${content}
|
|
196
|
-
|
|
197
|
-
${shared_1.GeneratorUtils.createGeneratedByFooter('Contributing Workflows Documentation')}`;
|
|
198
|
-
}
|
|
199
|
-
async createDomainContext(repoStructure, moduleGroups) {
|
|
200
|
-
const context = this.buildRepoContext(repoStructure, moduleGroups);
|
|
201
|
-
const content = await this.llmClient.generateText(`Create a "Domain Context" guide that explains the business/domain knowledge needed to work on this codebase.
|
|
202
|
-
|
|
203
|
-
Include:
|
|
204
|
-
1. **Problem Domain**: What real-world problem this software solves
|
|
205
|
-
2. **User Personas**: Who uses this software and how
|
|
206
|
-
3. **Business Rules**: Important constraints and requirements
|
|
207
|
-
4. **Domain Terminology**: Key terms and their meanings
|
|
208
|
-
5. **Success Criteria**: How to measure if the software is successful
|
|
209
|
-
|
|
210
|
-
Focus on knowledge that would help someone:
|
|
211
|
-
- Understand why certain features exist
|
|
212
|
-
- Make good decisions about new features
|
|
213
|
-
- Recognize when something doesn't fit the domain
|
|
214
|
-
- Communicate effectively with stakeholders
|
|
215
|
-
|
|
216
|
-
Avoid deep technical details - focus on the "why" behind the code.`, context);
|
|
217
|
-
return `# Domain Context
|
|
218
|
-
|
|
219
|
-
${content}
|
|
220
|
-
|
|
221
|
-
${shared_1.GeneratorUtils.createGeneratedByFooter('Domain Context Documentation')}`;
|
|
222
|
-
}
|
|
223
|
-
createNewDocumentationIndex(enabledTypes) {
|
|
224
|
-
const docDescriptions = {
|
|
225
|
-
'mental-model': {
|
|
226
|
-
title: 'Mental Model',
|
|
227
|
-
description: 'Core concepts and metaphors for understanding this codebase'
|
|
228
|
-
},
|
|
229
|
-
'architecture-decisions': {
|
|
230
|
-
title: 'Architecture Decisions',
|
|
231
|
-
description: 'Key design choices and their rationale'
|
|
232
|
-
},
|
|
233
|
-
'code-organization': {
|
|
234
|
-
title: 'Code Organization',
|
|
235
|
-
description: 'Logic behind the codebase structure and patterns'
|
|
236
|
-
},
|
|
237
|
-
'development-patterns': {
|
|
238
|
-
title: 'Development Patterns',
|
|
239
|
-
description: 'How to work effectively in this codebase'
|
|
240
|
-
},
|
|
241
|
-
'ai-guidelines': {
|
|
242
|
-
title: 'AI Guidelines',
|
|
243
|
-
description: 'Specific guidance for AI agents working on this code'
|
|
244
|
-
},
|
|
245
|
-
'contributing-workflows': {
|
|
246
|
-
title: 'Contributing Workflows',
|
|
247
|
-
description: 'Processes and procedures for contributing'
|
|
248
|
-
},
|
|
249
|
-
'domain-context': {
|
|
250
|
-
title: 'Domain Context',
|
|
251
|
-
description: 'Business and domain knowledge for this project'
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
const sections = enabledTypes.map(type => {
|
|
255
|
-
const { title, description } = docDescriptions[type];
|
|
256
|
-
return `### [${title}](./${type}.md)
|
|
257
|
-
${description}`;
|
|
258
|
-
}).join('\n\n');
|
|
259
|
-
return `# High-Level Documentation
|
|
260
|
-
|
|
261
|
-
This documentation focuses on helping you understand and work with this codebase effectively, rather than documenting every implementation detail.
|
|
262
|
-
|
|
263
|
-
## Documentation Sections
|
|
264
|
-
|
|
265
|
-
${sections}
|
|
266
|
-
|
|
267
|
-
## How to Use This Documentation
|
|
268
|
-
|
|
269
|
-
1. **Start with Mental Model** - Build the right conceptual framework
|
|
270
|
-
2. **Review Architecture Decisions** - Understand key design choices
|
|
271
|
-
3. **Study Code Organization** - Learn how the code is structured
|
|
272
|
-
4. **Follow Development Patterns** - Work effectively within established patterns
|
|
273
|
-
5. **Reference AI Guidelines** - (For AI agents) Follow codebase-specific guidance
|
|
274
|
-
|
|
275
|
-
## Philosophy
|
|
276
|
-
|
|
277
|
-
This documentation teaches "how to think about this codebase" rather than "what every file does." The goal is to help both humans and AI agents make good decisions when working with the code.
|
|
278
|
-
|
|
279
|
-
${shared_1.GeneratorUtils.createGeneratedByFooter('High-Level Documentation Index')}`;
|
|
280
|
-
}
|
|
281
|
-
buildRepoContext(repoStructure, moduleGroups) {
|
|
282
|
-
const topExtensions = shared_1.GeneratorUtils.getTopFileExtensions(repoStructure, 5);
|
|
283
|
-
return `Repository Analysis:
|
|
284
|
-
- Root Path: ${repoStructure.rootPath}
|
|
285
|
-
- Total Files: ${repoStructure.totalFiles}
|
|
286
|
-
- Total Size: ${shared_1.GeneratorUtils.formatBytes(repoStructure.totalSize)}
|
|
287
|
-
- Primary Languages: ${topExtensions.map(([ext, count]) => `${ext} (${count} files)`).join(', ')}
|
|
288
|
-
|
|
289
|
-
Module Structure:
|
|
290
|
-
${moduleGroups.slice(0, 10).map(m => `- ${m.name}: ${m.description} (${m.files.length} files)`).join('\n')}
|
|
291
|
-
|
|
292
|
-
Key Directories:
|
|
293
|
-
${[...new Set(repoStructure.files.map(f => f.relativePath.split('/')[0]))]
|
|
294
|
-
.filter(dir => !dir.includes('.'))
|
|
295
|
-
.slice(0, 10)
|
|
296
|
-
.map(dir => `- ${dir}/`)
|
|
297
|
-
.join('\n')}
|
|
298
|
-
|
|
299
|
-
Configuration Files:
|
|
300
|
-
${repoStructure.files
|
|
301
|
-
.filter(f => ['package.json', 'tsconfig.json', '.env', 'README.md'].some(config => f.relativePath.includes(config)))
|
|
302
|
-
.map(f => `- ${f.relativePath}`)
|
|
303
|
-
.join('\n')}`;
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
exports.NewDocumentationTemplates = NewDocumentationTemplates;
|
|
307
|
-
//# sourceMappingURL=newDocumentationTemplates.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"newDocumentationTemplates.js","sourceRoot":"","sources":["../../../src/generators/documentation/newDocumentationTemplates.ts"],"names":[],"mappings":";;;AAGA,sCAA2C;AAE3C,oEAAiE;AAEjE,MAAa,yBAAyB;IAGpC,YAAoB,SAAwB,EAAE,UAAgB;QAA1C,cAAS,GAAT,SAAS,CAAe;QAC1C,IAAI,CAAC,QAAQ,GAAG,IAAI,mCAAgB,CAAC,UAAU,CAAC,CAAC;IACnD,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,aAA4B,EAAE,YAA2B;QAC/E,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;QAEnE,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,YAAY,CAC/C;;;;;;;;;;;0BAWoB,EACpB,OAAO,CACR,CAAC;QAEF,OAAO;;EAET,OAAO;;EAEP,uBAAc,CAAC,uBAAuB,CAAC,4BAA4B,CAAC,EAAE,CAAC;IACvE,CAAC;IAED,KAAK,CAAC,2BAA2B,CAAC,aAA4B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;aACvB,IAAI,CAAC,IAAI,CAAC;;;EAGX,aAAa,CAAC,KAAK;aAClB,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,cAAc,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;aACnH,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,YAAY,EAAE,CAAC;aAC/B,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IACd,CAAC;CACF;AAhWD,8DAgWC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { RepoStructure } from '../types';
|
|
2
|
-
import { FileMapper } from '../utils/fileMapper';
|
|
3
|
-
import { BaseLLMClient } from '../services/baseLLMClient';
|
|
4
|
-
export declare class DocumentationGenerator {
|
|
5
|
-
private fileMapper;
|
|
6
|
-
private llmClient;
|
|
7
|
-
private moduleGrouper;
|
|
8
|
-
private templates;
|
|
9
|
-
constructor(fileMapper: FileMapper, llmClient: BaseLLMClient);
|
|
10
|
-
generateDocumentation(repoStructure: RepoStructure, outputDir: string, verbose?: boolean): Promise<void>;
|
|
11
|
-
private generateMainIndex;
|
|
12
|
-
private generateOverview;
|
|
13
|
-
private generateArchitectureDoc;
|
|
14
|
-
private generateModuleDocumentation;
|
|
15
|
-
private generateAPIReference;
|
|
16
|
-
private generateConfigurationGuide;
|
|
17
|
-
private generateDevelopmentGuide;
|
|
18
|
-
private generateDeploymentGuide;
|
|
19
|
-
private generateTroubleshootingGuide;
|
|
20
|
-
private createModuleDocumentation;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=documentationGenerator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"documentationGenerator.d.ts","sourceRoot":"","sources":["../../src/generators/documentationGenerator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,aAAa,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAM1D,qBAAa,sBAAsB;IAK/B,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,SAAS;IALnB,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,SAAS,CAAyB;gBAGhC,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,aAAa;IAM5B,qBAAqB,CACzB,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,OAAe,GACvB,OAAO,CAAC,IAAI,CAAC;YAoCF,iBAAiB;YAqBjB,gBAAgB;YAmBhB,uBAAuB;YAoBvB,2BAA2B;YA+B3B,oBAAoB;YAmBpB,0BAA0B;YAkB1B,wBAAwB;YAoBxB,uBAAuB;YAmBvB,4BAA4B;YAoB5B,yBAAyB;CA2CxC"}
|