@ai-coders/context 0.5.2 → 0.6.1
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 +247 -12
- package/dist/generators/agents/agentGenerator.d.ts +3 -0
- package/dist/generators/agents/agentGenerator.d.ts.map +1 -1
- package/dist/generators/agents/agentGenerator.js +13 -7
- package/dist/generators/agents/agentGenerator.js.map +1 -1
- package/dist/generators/agents/templates/playbookTemplate.d.ts.map +1 -1
- package/dist/generators/agents/templates/playbookTemplate.js +3 -1
- package/dist/generators/agents/templates/playbookTemplate.js.map +1 -1
- package/dist/generators/documentation/codebaseMapGenerator.d.ts +98 -0
- package/dist/generators/documentation/codebaseMapGenerator.d.ts.map +1 -0
- package/dist/generators/documentation/codebaseMapGenerator.js +247 -0
- package/dist/generators/documentation/codebaseMapGenerator.js.map +1 -0
- package/dist/generators/documentation/documentationGenerator.d.ts +2 -0
- package/dist/generators/documentation/documentationGenerator.d.ts.map +1 -1
- package/dist/generators/documentation/documentationGenerator.js +20 -1
- package/dist/generators/documentation/documentationGenerator.js.map +1 -1
- package/dist/generators/documentation/index.d.ts +2 -0
- package/dist/generators/documentation/index.d.ts.map +1 -1
- package/dist/generators/documentation/index.js +3 -1
- package/dist/generators/documentation/index.js.map +1 -1
- package/dist/generators/documentation/templates/architectureTemplate.d.ts.map +1 -1
- package/dist/generators/documentation/templates/architectureTemplate.js +2 -31
- package/dist/generators/documentation/templates/architectureTemplate.js.map +1 -1
- package/dist/generators/documentation/templates/common.d.ts +4 -1
- package/dist/generators/documentation/templates/common.d.ts.map +1 -1
- package/dist/generators/documentation/templates/common.js +4 -2
- package/dist/generators/documentation/templates/common.js.map +1 -1
- package/dist/generators/plans/templates/planTemplate.d.ts.map +1 -1
- package/dist/generators/plans/templates/planTemplate.js +46 -2
- package/dist/generators/plans/templates/planTemplate.js.map +1 -1
- package/dist/generators/skills/index.d.ts +7 -0
- package/dist/generators/skills/index.d.ts.map +1 -0
- package/dist/generators/skills/index.js +15 -0
- package/dist/generators/skills/index.js.map +1 -0
- package/dist/generators/skills/skillGenerator.d.ts +53 -0
- package/dist/generators/skills/skillGenerator.d.ts.map +1 -0
- package/dist/generators/skills/skillGenerator.js +149 -0
- package/dist/generators/skills/skillGenerator.js.map +1 -0
- package/dist/generators/skills/templates/indexTemplate.d.ts +13 -0
- package/dist/generators/skills/templates/indexTemplate.d.ts.map +1 -0
- package/dist/generators/skills/templates/indexTemplate.js +102 -0
- package/dist/generators/skills/templates/indexTemplate.js.map +1 -0
- package/dist/generators/skills/templates/skillTemplate.d.ts +20 -0
- package/dist/generators/skills/templates/skillTemplate.d.ts.map +1 -0
- package/dist/generators/skills/templates/skillTemplate.js +85 -0
- package/dist/generators/skills/templates/skillTemplate.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1315 -43
- package/dist/index.js.map +1 -1
- package/dist/services/ai/agentEvents.d.ts +1 -1
- package/dist/services/ai/agentEvents.d.ts.map +1 -1
- package/dist/services/ai/agents/index.d.ts +2 -0
- package/dist/services/ai/agents/index.d.ts.map +1 -1
- package/dist/services/ai/agents/index.js +3 -1
- package/dist/services/ai/agents/index.js.map +1 -1
- package/dist/services/ai/agents/skillAgent.d.ts +49 -0
- package/dist/services/ai/agents/skillAgent.d.ts.map +1 -0
- package/dist/services/ai/agents/skillAgent.js +179 -0
- package/dist/services/ai/agents/skillAgent.js.map +1 -0
- package/dist/services/ai/prompts/index.d.ts +1 -1
- package/dist/services/ai/prompts/index.d.ts.map +1 -1
- package/dist/services/ai/prompts/index.js +2 -1
- package/dist/services/ai/prompts/index.js.map +1 -1
- package/dist/services/ai/prompts/sharedPrompts.d.ts +4 -0
- package/dist/services/ai/prompts/sharedPrompts.d.ts.map +1 -1
- package/dist/services/ai/prompts/sharedPrompts.js +33 -0
- package/dist/services/ai/prompts/sharedPrompts.js.map +1 -1
- package/dist/services/ai/schemas.d.ts +98 -1
- package/dist/services/ai/schemas.d.ts.map +1 -1
- package/dist/services/ai/schemas.js +61 -3
- package/dist/services/ai/schemas.js.map +1 -1
- package/dist/services/ai/toolRegistry.d.ts.map +1 -1
- package/dist/services/ai/toolRegistry.js +17 -0
- package/dist/services/ai/toolRegistry.js.map +1 -1
- package/dist/services/ai/tools/fillScaffoldingTool.d.ts +21 -4
- package/dist/services/ai/tools/fillScaffoldingTool.d.ts.map +1 -1
- package/dist/services/ai/tools/fillScaffoldingTool.js +17 -0
- package/dist/services/ai/tools/fillScaffoldingTool.js.map +1 -1
- package/dist/services/ai/tools/getCodebaseMapTool.d.ts +17 -0
- package/dist/services/ai/tools/getCodebaseMapTool.d.ts.map +1 -0
- package/dist/services/ai/tools/getCodebaseMapTool.js +115 -0
- package/dist/services/ai/tools/getCodebaseMapTool.js.map +1 -0
- package/dist/services/ai/tools/index.d.ts +3 -2
- package/dist/services/ai/tools/index.d.ts.map +1 -1
- package/dist/services/ai/tools/index.js +12 -3
- package/dist/services/ai/tools/index.js.map +1 -1
- package/dist/services/ai/tools/initializeContextTool.d.ts +22 -4
- package/dist/services/ai/tools/initializeContextTool.d.ts.map +1 -1
- package/dist/services/ai/tools/initializeContextTool.js +201 -16
- package/dist/services/ai/tools/initializeContextTool.js.map +1 -1
- package/dist/services/ai/tools/scaffoldPlanTool.d.ts +11 -0
- package/dist/services/ai/tools/scaffoldPlanTool.d.ts.map +1 -1
- package/dist/services/ai/tools/scaffoldPlanTool.js +79 -7
- package/dist/services/ai/tools/scaffoldPlanTool.js.map +1 -1
- package/dist/services/export/exportRulesService.d.ts +62 -0
- package/dist/services/export/exportRulesService.d.ts.map +1 -0
- package/dist/services/export/exportRulesService.js +242 -0
- package/dist/services/export/exportRulesService.js.map +1 -0
- package/dist/services/export/index.d.ts +5 -0
- package/dist/services/export/index.d.ts.map +1 -0
- package/dist/services/export/index.js +10 -0
- package/dist/services/export/index.js.map +1 -0
- package/dist/services/export/skillExportService.d.ts +64 -0
- package/dist/services/export/skillExportService.d.ts.map +1 -0
- package/dist/services/export/skillExportService.js +238 -0
- package/dist/services/export/skillExportService.js.map +1 -0
- package/dist/services/fill/skillFillService.d.ts +50 -0
- package/dist/services/fill/skillFillService.d.ts.map +1 -0
- package/dist/services/fill/skillFillService.js +254 -0
- package/dist/services/fill/skillFillService.js.map +1 -0
- package/dist/services/import/agentsDetector.d.ts +12 -0
- package/dist/services/import/agentsDetector.d.ts.map +1 -0
- package/dist/services/import/agentsDetector.js +183 -0
- package/dist/services/import/agentsDetector.js.map +1 -0
- package/dist/services/import/importAgentsService.d.ts +14 -0
- package/dist/services/import/importAgentsService.d.ts.map +1 -0
- package/dist/services/import/importAgentsService.js +195 -0
- package/dist/services/import/importAgentsService.js.map +1 -0
- package/dist/services/import/importRulesService.d.ts +17 -0
- package/dist/services/import/importRulesService.d.ts.map +1 -0
- package/dist/services/import/importRulesService.js +222 -0
- package/dist/services/import/importRulesService.js.map +1 -0
- package/dist/services/import/index.d.ts +7 -0
- package/dist/services/import/index.d.ts.map +1 -0
- package/dist/services/import/index.js +28 -0
- package/dist/services/import/index.js.map +1 -0
- package/dist/services/import/presets.d.ts +8 -0
- package/dist/services/import/presets.d.ts.map +1 -0
- package/dist/services/import/presets.js +176 -0
- package/dist/services/import/presets.js.map +1 -0
- package/dist/services/import/rulesDetector.d.ts +16 -0
- package/dist/services/import/rulesDetector.d.ts.map +1 -0
- package/dist/services/import/rulesDetector.js +278 -0
- package/dist/services/import/rulesDetector.js.map +1 -0
- package/dist/services/import/types.d.ts +72 -0
- package/dist/services/import/types.d.ts.map +1 -0
- package/dist/services/import/types.js +3 -0
- package/dist/services/import/types.js.map +1 -0
- package/dist/services/mcp/mcpServer.d.ts +24 -0
- package/dist/services/mcp/mcpServer.d.ts.map +1 -1
- package/dist/services/mcp/mcpServer.js +1651 -7
- package/dist/services/mcp/mcpServer.js.map +1 -1
- package/dist/services/quickSync/index.d.ts +3 -0
- package/dist/services/quickSync/index.d.ts.map +1 -0
- package/dist/services/quickSync/index.js +7 -0
- package/dist/services/quickSync/index.js.map +1 -0
- package/dist/services/quickSync/quickSyncService.d.ts +72 -0
- package/dist/services/quickSync/quickSyncService.d.ts.map +1 -0
- package/dist/services/quickSync/quickSyncService.js +268 -0
- package/dist/services/quickSync/quickSyncService.js.map +1 -0
- package/dist/services/report/index.d.ts +3 -0
- package/dist/services/report/index.d.ts.map +1 -0
- package/dist/services/report/index.js +6 -0
- package/dist/services/report/index.js.map +1 -0
- package/dist/services/report/reportService.d.ts +131 -0
- package/dist/services/report/reportService.d.ts.map +1 -0
- package/dist/services/report/reportService.js +372 -0
- package/dist/services/report/reportService.js.map +1 -0
- package/dist/services/semantic/contextBuilder.d.ts +8 -1
- package/dist/services/semantic/contextBuilder.d.ts.map +1 -1
- package/dist/services/semantic/contextBuilder.js +107 -20
- package/dist/services/semantic/contextBuilder.js.map +1 -1
- package/dist/services/shared/globPatterns.d.ts +48 -0
- package/dist/services/shared/globPatterns.d.ts.map +1 -0
- package/dist/services/shared/globPatterns.js +110 -0
- package/dist/services/shared/globPatterns.js.map +1 -0
- package/dist/services/shared/index.d.ts +10 -0
- package/dist/services/shared/index.d.ts.map +1 -0
- package/dist/services/shared/index.js +46 -0
- package/dist/services/shared/index.js.map +1 -0
- package/dist/services/shared/pathHelpers.d.ts +71 -0
- package/dist/services/shared/pathHelpers.d.ts.map +1 -0
- package/dist/services/shared/pathHelpers.js +162 -0
- package/dist/services/shared/pathHelpers.js.map +1 -0
- package/dist/services/shared/types.d.ts +74 -0
- package/dist/services/shared/types.d.ts.map +1 -0
- package/dist/services/shared/types.js +44 -0
- package/dist/services/shared/types.js.map +1 -0
- package/dist/services/shared/uiHelpers.d.ts +70 -0
- package/dist/services/shared/uiHelpers.d.ts.map +1 -0
- package/dist/services/shared/uiHelpers.js +131 -0
- package/dist/services/shared/uiHelpers.js.map +1 -0
- package/dist/services/stack/index.d.ts +6 -0
- package/dist/services/stack/index.d.ts.map +1 -0
- package/dist/services/stack/index.js +25 -0
- package/dist/services/stack/index.js.map +1 -0
- package/dist/services/stack/projectTypeClassifier.d.ts +59 -0
- package/dist/services/stack/projectTypeClassifier.d.ts.map +1 -0
- package/dist/services/stack/projectTypeClassifier.js +242 -0
- package/dist/services/stack/projectTypeClassifier.js.map +1 -0
- package/dist/services/stack/scaffoldFilter.d.ts +75 -0
- package/dist/services/stack/scaffoldFilter.d.ts.map +1 -0
- package/dist/services/stack/scaffoldFilter.js +222 -0
- package/dist/services/stack/scaffoldFilter.js.map +1 -0
- package/dist/services/stack/stackDetector.d.ts +43 -0
- package/dist/services/stack/stackDetector.d.ts.map +1 -0
- package/dist/services/stack/stackDetector.js +406 -0
- package/dist/services/stack/stackDetector.js.map +1 -0
- package/dist/services/start/index.d.ts +3 -0
- package/dist/services/start/index.d.ts.map +1 -0
- package/dist/services/start/index.js +6 -0
- package/dist/services/start/index.js.map +1 -0
- package/dist/services/start/startService.d.ts +64 -0
- package/dist/services/start/startService.d.ts.map +1 -0
- package/dist/services/start/startService.js +180 -0
- package/dist/services/start/startService.js.map +1 -0
- package/dist/services/sync/presets.d.ts.map +1 -1
- package/dist/services/sync/presets.js +16 -1
- package/dist/services/sync/presets.js.map +1 -1
- package/dist/services/sync/types.d.ts +1 -1
- package/dist/services/sync/types.d.ts.map +1 -1
- package/dist/services/workflow/autoAdvance.d.ts +38 -0
- package/dist/services/workflow/autoAdvance.d.ts.map +1 -0
- package/dist/services/workflow/autoAdvance.js +219 -0
- package/dist/services/workflow/autoAdvance.js.map +1 -0
- package/dist/services/workflow/index.d.ts +6 -0
- package/dist/services/workflow/index.d.ts.map +1 -0
- package/dist/services/workflow/index.js +11 -0
- package/dist/services/workflow/index.js.map +1 -0
- package/dist/services/workflow/workflowService.d.ts +98 -0
- package/dist/services/workflow/workflowService.d.ts.map +1 -0
- package/dist/services/workflow/workflowService.js +210 -0
- package/dist/services/workflow/workflowService.js.map +1 -0
- package/dist/utils/cliUI.d.ts +4 -0
- package/dist/utils/cliUI.d.ts.map +1 -1
- package/dist/utils/cliUI.js +31 -1
- package/dist/utils/cliUI.js.map +1 -1
- package/dist/utils/i18n.d.ts +202 -0
- package/dist/utils/i18n.d.ts.map +1 -1
- package/dist/utils/i18n.js +438 -2
- package/dist/utils/i18n.js.map +1 -1
- package/dist/utils/theme.d.ts +1 -0
- package/dist/utils/theme.d.ts.map +1 -1
- package/dist/utils/theme.js +1 -0
- package/dist/utils/theme.js.map +1 -1
- package/dist/workflow/agents/agentRegistry.d.ts +82 -0
- package/dist/workflow/agents/agentRegistry.d.ts.map +1 -0
- package/dist/workflow/agents/agentRegistry.js +205 -0
- package/dist/workflow/agents/agentRegistry.js.map +1 -0
- package/dist/workflow/agents/index.d.ts +7 -0
- package/dist/workflow/agents/index.d.ts.map +1 -0
- package/dist/workflow/agents/index.js +14 -0
- package/dist/workflow/agents/index.js.map +1 -0
- package/dist/workflow/collaboration.d.ts +110 -0
- package/dist/workflow/collaboration.d.ts.map +1 -0
- package/dist/workflow/collaboration.js +301 -0
- package/dist/workflow/collaboration.js.map +1 -0
- package/dist/workflow/index.d.ts +25 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/index.js +124 -0
- package/dist/workflow/index.js.map +1 -0
- package/dist/workflow/orchestration/agentOrchestrator.d.ts +68 -0
- package/dist/workflow/orchestration/agentOrchestrator.d.ts.map +1 -0
- package/dist/workflow/orchestration/agentOrchestrator.js +280 -0
- package/dist/workflow/orchestration/agentOrchestrator.js.map +1 -0
- package/dist/workflow/orchestration/documentLinker.d.ts +100 -0
- package/dist/workflow/orchestration/documentLinker.d.ts.map +1 -0
- package/dist/workflow/orchestration/documentLinker.js +266 -0
- package/dist/workflow/orchestration/documentLinker.js.map +1 -0
- package/dist/workflow/orchestration/index.d.ts +9 -0
- package/dist/workflow/orchestration/index.d.ts.map +1 -0
- package/dist/workflow/orchestration/index.js +25 -0
- package/dist/workflow/orchestration/index.js.map +1 -0
- package/dist/workflow/orchestrator.d.ts +99 -0
- package/dist/workflow/orchestrator.d.ts.map +1 -0
- package/dist/workflow/orchestrator.js +217 -0
- package/dist/workflow/orchestrator.js.map +1 -0
- package/dist/workflow/phases.d.ts +64 -0
- package/dist/workflow/phases.d.ts.map +1 -0
- package/dist/workflow/phases.js +151 -0
- package/dist/workflow/phases.js.map +1 -0
- package/dist/workflow/plans/index.d.ts +8 -0
- package/dist/workflow/plans/index.d.ts.map +1 -0
- package/dist/workflow/plans/index.js +27 -0
- package/dist/workflow/plans/index.js.map +1 -0
- package/dist/workflow/plans/planLinker.d.ts +119 -0
- package/dist/workflow/plans/planLinker.d.ts.map +1 -0
- package/dist/workflow/plans/planLinker.js +499 -0
- package/dist/workflow/plans/planLinker.js.map +1 -0
- package/dist/workflow/plans/types.d.ts +167 -0
- package/dist/workflow/plans/types.d.ts.map +1 -0
- package/dist/workflow/plans/types.js +25 -0
- package/dist/workflow/plans/types.js.map +1 -0
- package/dist/workflow/prevcConfig.d.ts +27 -0
- package/dist/workflow/prevcConfig.d.ts.map +1 -0
- package/dist/workflow/prevcConfig.js +153 -0
- package/dist/workflow/prevcConfig.js.map +1 -0
- package/dist/workflow/roles.d.ts +44 -0
- package/dist/workflow/roles.d.ts.map +1 -0
- package/dist/workflow/roles.js +112 -0
- package/dist/workflow/roles.js.map +1 -0
- package/dist/workflow/scaling.d.ts +44 -0
- package/dist/workflow/scaling.d.ts.map +1 -0
- package/dist/workflow/scaling.js +224 -0
- package/dist/workflow/scaling.js.map +1 -0
- package/dist/workflow/skills/frontmatter.d.ts +23 -0
- package/dist/workflow/skills/frontmatter.d.ts.map +1 -0
- package/dist/workflow/skills/frontmatter.js +100 -0
- package/dist/workflow/skills/frontmatter.js.map +1 -0
- package/dist/workflow/skills/index.d.ts +10 -0
- package/dist/workflow/skills/index.d.ts.map +1 -0
- package/dist/workflow/skills/index.js +22 -0
- package/dist/workflow/skills/index.js.map +1 -0
- package/dist/workflow/skills/skillRegistry.d.ts +60 -0
- package/dist/workflow/skills/skillRegistry.d.ts.map +1 -0
- package/dist/workflow/skills/skillRegistry.js +257 -0
- package/dist/workflow/skills/skillRegistry.js.map +1 -0
- package/dist/workflow/skills/skillTemplates.d.ts +16 -0
- package/dist/workflow/skills/skillTemplates.d.ts.map +1 -0
- package/dist/workflow/skills/skillTemplates.js +610 -0
- package/dist/workflow/skills/skillTemplates.js.map +1 -0
- package/dist/workflow/skills/types.d.ts +72 -0
- package/dist/workflow/skills/types.d.ts.map +1 -0
- package/dist/workflow/skills/types.js +48 -0
- package/dist/workflow/skills/types.js.map +1 -0
- package/dist/workflow/status/statusManager.d.ts +84 -0
- package/dist/workflow/status/statusManager.d.ts.map +1 -0
- package/dist/workflow/status/statusManager.js +402 -0
- package/dist/workflow/status/statusManager.js.map +1 -0
- package/dist/workflow/status/templates.d.ts +40 -0
- package/dist/workflow/status/templates.d.ts.map +1 -0
- package/dist/workflow/status/templates.js +148 -0
- package/dist/workflow/status/templates.js.map +1 -0
- package/dist/workflow/types.d.ts +178 -0
- package/dist/workflow/types.d.ts.map +1 -0
- package/dist/workflow/types.js +25 -0
- package/dist/workflow/types.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get Codebase Map Tool
|
|
3
|
+
*
|
|
4
|
+
* Retrieves specific sections of the codebase-map.json file to allow
|
|
5
|
+
* LLMs to query only the parts they need, reducing token usage.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getCodebaseMapTool: import("ai").Tool<{
|
|
8
|
+
repoPath?: string | undefined;
|
|
9
|
+
section?: "stats" | "architecture" | "symbols" | "dependencies" | "stack" | "all" | "structure" | "symbols.classes" | "symbols.interfaces" | "symbols.functions" | "symbols.types" | "symbols.enums" | "publicAPI" | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
success: boolean;
|
|
12
|
+
section: string;
|
|
13
|
+
data?: unknown;
|
|
14
|
+
mapPath?: string | undefined;
|
|
15
|
+
error?: string | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
//# sourceMappingURL=getCodebaseMapTool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCodebaseMapTool.d.ts","sourceRoot":"","sources":["../../../../src/services/ai/tools/getCodebaseMapTool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,eAAO,MAAM,kBAAkB;;;;;;;;;EAmC7B,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Get Codebase Map Tool
|
|
4
|
+
*
|
|
5
|
+
* Retrieves specific sections of the codebase-map.json file to allow
|
|
6
|
+
* LLMs to query only the parts they need, reducing token usage.
|
|
7
|
+
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.getCodebaseMapTool = void 0;
|
|
43
|
+
const ai_1 = require("ai");
|
|
44
|
+
const fs = __importStar(require("fs-extra"));
|
|
45
|
+
const path = __importStar(require("path"));
|
|
46
|
+
const schemas_1 = require("../schemas");
|
|
47
|
+
exports.getCodebaseMapTool = (0, ai_1.tool)({
|
|
48
|
+
description: 'Get codebase map data (structure, symbols, architecture) from the pre-generated JSON. Use specific sections to reduce token usage.',
|
|
49
|
+
inputSchema: schemas_1.GetCodebaseMapInputSchema,
|
|
50
|
+
execute: async (input) => {
|
|
51
|
+
const repoPath = input.repoPath || process.cwd();
|
|
52
|
+
const section = input.section || 'all';
|
|
53
|
+
try {
|
|
54
|
+
const mapPath = path.join(repoPath, '.context', 'docs', 'codebase-map.json');
|
|
55
|
+
if (!await fs.pathExists(mapPath)) {
|
|
56
|
+
return {
|
|
57
|
+
success: false,
|
|
58
|
+
section,
|
|
59
|
+
error: `Codebase map not found at ${mapPath}. Run initialization with --semantic flag first.`
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
const codebaseMap = await fs.readJson(mapPath);
|
|
63
|
+
const data = extractSection(codebaseMap, section);
|
|
64
|
+
return {
|
|
65
|
+
success: true,
|
|
66
|
+
section,
|
|
67
|
+
data,
|
|
68
|
+
mapPath
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
return {
|
|
73
|
+
success: false,
|
|
74
|
+
section,
|
|
75
|
+
error: error instanceof Error ? error.message : String(error)
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
/**
|
|
81
|
+
* Extract a specific section from the codebase map
|
|
82
|
+
*/
|
|
83
|
+
function extractSection(map, section) {
|
|
84
|
+
switch (section) {
|
|
85
|
+
case 'all':
|
|
86
|
+
return map;
|
|
87
|
+
case 'stack':
|
|
88
|
+
return map.stack;
|
|
89
|
+
case 'structure':
|
|
90
|
+
return map.structure;
|
|
91
|
+
case 'architecture':
|
|
92
|
+
return map.architecture;
|
|
93
|
+
case 'symbols':
|
|
94
|
+
return map.symbols;
|
|
95
|
+
case 'symbols.classes':
|
|
96
|
+
return map.symbols.classes;
|
|
97
|
+
case 'symbols.interfaces':
|
|
98
|
+
return map.symbols.interfaces;
|
|
99
|
+
case 'symbols.functions':
|
|
100
|
+
return map.symbols.functions;
|
|
101
|
+
case 'symbols.types':
|
|
102
|
+
return map.symbols.types;
|
|
103
|
+
case 'symbols.enums':
|
|
104
|
+
return map.symbols.enums;
|
|
105
|
+
case 'publicAPI':
|
|
106
|
+
return map.publicAPI;
|
|
107
|
+
case 'dependencies':
|
|
108
|
+
return map.dependencies;
|
|
109
|
+
case 'stats':
|
|
110
|
+
return map.stats;
|
|
111
|
+
default:
|
|
112
|
+
return map;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=getCodebaseMapTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCodebaseMapTool.js","sourceRoot":"","sources":["../../../../src/services/ai/tools/getCodebaseMapTool.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,2BAA0B;AAC1B,6CAA+B;AAC/B,2CAA6B;AAC7B,wCAA4G;AAG/F,QAAA,kBAAkB,GAAG,IAAA,SAAI,EAAC;IACrC,WAAW,EAAE,oIAAoI;IACjJ,WAAW,EAAE,mCAAyB;IACtC,OAAO,EAAE,KAAK,EAAE,KAA0B,EAAiC,E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1B,KAAK,SAAS;YACZ,OAAO,GAAG,CAAC,OAAO,CAAC;QACrB,KAAK,iBAAiB;YACpB,OAAO,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC;QAC7B,KAAK,oBAAoB;YACvB,OAAO,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC;QAChC,KAAK,mBAAmB;YACtB,OAAO,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC;QAC/B,KAAK,eAAe;YAClB,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC;QAC3B,KAAK,eAAe;YAClB,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC;QAC3B,KAAK,WAAW;YACd,OAAO,GAAG,CAAC,SAAS,CAAC;QACvB,KAAK,cAAc;YACjB,OAAO,GAAG,CAAC,YAAY,CAAC;QAC1B,KAAK,OAAO;YACV,OAAO,GAAG,CAAC,KAAK,CAAC;QACnB;YACE,OAAO,GAAG,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -7,7 +7,8 @@ export { searchCodeTool } from './searchCodeTool';
|
|
|
7
7
|
export { checkScaffoldingTool } from './checkScaffoldingTool';
|
|
8
8
|
export { initializeContextTool } from './initializeContextTool';
|
|
9
9
|
export { scaffoldPlanTool } from './scaffoldPlanTool';
|
|
10
|
-
export { fillScaffoldingTool, listFilesToFillTool, fillSingleFileTool } from './fillScaffoldingTool';
|
|
10
|
+
export { fillScaffoldingTool, listFilesToFillTool, fillSingleFileTool, getOrBuildContext, generateDocContent, generateAgentContent, cleanupSharedContext } from './fillScaffoldingTool';
|
|
11
|
+
export { getCodebaseMapTool } from './getCodebaseMapTool';
|
|
11
12
|
/**
|
|
12
13
|
* Returns all code analysis tools as a ToolSet for use with AI SDK
|
|
13
14
|
*/
|
|
@@ -15,6 +16,6 @@ export declare function getCodeAnalysisTools(): ToolSet;
|
|
|
15
16
|
/**
|
|
16
17
|
* Tool names available for selective enabling
|
|
17
18
|
*/
|
|
18
|
-
export declare const TOOL_NAMES: readonly ["readFile", "listFiles", "analyzeSymbols", "getFileStructure", "searchCode", "checkScaffolding", "initializeContext", "scaffoldPlan", "fillScaffolding", "listFilesToFill", "fillSingleFile"];
|
|
19
|
+
export declare const TOOL_NAMES: readonly ["readFile", "listFiles", "analyzeSymbols", "getFileStructure", "searchCode", "checkScaffolding", "initializeContext", "scaffoldPlan", "fillScaffolding", "listFilesToFill", "fillSingleFile", "getCodebaseMap"];
|
|
19
20
|
export type ToolName = (typeof TOOL_NAMES)[number];
|
|
20
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/ai/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/ai/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAYlC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAe9C;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,2NAab,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TOOL_NAMES = exports.fillSingleFileTool = exports.listFilesToFillTool = exports.fillScaffoldingTool = exports.scaffoldPlanTool = exports.initializeContextTool = exports.checkScaffoldingTool = exports.searchCodeTool = exports.getFileStructureTool = exports.analyzeSymbolsTool = exports.listFilesTool = exports.readFileTool = void 0;
|
|
3
|
+
exports.TOOL_NAMES = exports.getCodebaseMapTool = exports.cleanupSharedContext = exports.generateAgentContent = exports.generateDocContent = exports.getOrBuildContext = exports.fillSingleFileTool = exports.listFilesToFillTool = exports.fillScaffoldingTool = exports.scaffoldPlanTool = exports.initializeContextTool = exports.checkScaffoldingTool = exports.searchCodeTool = exports.getFileStructureTool = exports.analyzeSymbolsTool = exports.listFilesTool = exports.readFileTool = void 0;
|
|
4
4
|
exports.getCodeAnalysisTools = getCodeAnalysisTools;
|
|
5
5
|
const readFileTool_1 = require("./readFileTool");
|
|
6
6
|
const listFilesTool_1 = require("./listFilesTool");
|
|
@@ -11,6 +11,7 @@ const checkScaffoldingTool_1 = require("./checkScaffoldingTool");
|
|
|
11
11
|
const initializeContextTool_1 = require("./initializeContextTool");
|
|
12
12
|
const scaffoldPlanTool_1 = require("./scaffoldPlanTool");
|
|
13
13
|
const fillScaffoldingTool_1 = require("./fillScaffoldingTool");
|
|
14
|
+
const getCodebaseMapTool_1 = require("./getCodebaseMapTool");
|
|
14
15
|
var readFileTool_2 = require("./readFileTool");
|
|
15
16
|
Object.defineProperty(exports, "readFileTool", { enumerable: true, get: function () { return readFileTool_2.readFileTool; } });
|
|
16
17
|
var listFilesTool_2 = require("./listFilesTool");
|
|
@@ -31,6 +32,12 @@ var fillScaffoldingTool_2 = require("./fillScaffoldingTool");
|
|
|
31
32
|
Object.defineProperty(exports, "fillScaffoldingTool", { enumerable: true, get: function () { return fillScaffoldingTool_2.fillScaffoldingTool; } });
|
|
32
33
|
Object.defineProperty(exports, "listFilesToFillTool", { enumerable: true, get: function () { return fillScaffoldingTool_2.listFilesToFillTool; } });
|
|
33
34
|
Object.defineProperty(exports, "fillSingleFileTool", { enumerable: true, get: function () { return fillScaffoldingTool_2.fillSingleFileTool; } });
|
|
35
|
+
Object.defineProperty(exports, "getOrBuildContext", { enumerable: true, get: function () { return fillScaffoldingTool_2.getOrBuildContext; } });
|
|
36
|
+
Object.defineProperty(exports, "generateDocContent", { enumerable: true, get: function () { return fillScaffoldingTool_2.generateDocContent; } });
|
|
37
|
+
Object.defineProperty(exports, "generateAgentContent", { enumerable: true, get: function () { return fillScaffoldingTool_2.generateAgentContent; } });
|
|
38
|
+
Object.defineProperty(exports, "cleanupSharedContext", { enumerable: true, get: function () { return fillScaffoldingTool_2.cleanupSharedContext; } });
|
|
39
|
+
var getCodebaseMapTool_2 = require("./getCodebaseMapTool");
|
|
40
|
+
Object.defineProperty(exports, "getCodebaseMapTool", { enumerable: true, get: function () { return getCodebaseMapTool_2.getCodebaseMapTool; } });
|
|
34
41
|
/**
|
|
35
42
|
* Returns all code analysis tools as a ToolSet for use with AI SDK
|
|
36
43
|
*/
|
|
@@ -46,7 +53,8 @@ function getCodeAnalysisTools() {
|
|
|
46
53
|
scaffoldPlan: scaffoldPlanTool_1.scaffoldPlanTool,
|
|
47
54
|
fillScaffolding: fillScaffoldingTool_1.fillScaffoldingTool,
|
|
48
55
|
listFilesToFill: fillScaffoldingTool_1.listFilesToFillTool,
|
|
49
|
-
fillSingleFile: fillScaffoldingTool_1.fillSingleFileTool
|
|
56
|
+
fillSingleFile: fillScaffoldingTool_1.fillSingleFileTool,
|
|
57
|
+
getCodebaseMap: getCodebaseMapTool_1.getCodebaseMapTool
|
|
50
58
|
};
|
|
51
59
|
}
|
|
52
60
|
/**
|
|
@@ -63,6 +71,7 @@ exports.TOOL_NAMES = [
|
|
|
63
71
|
'scaffoldPlan',
|
|
64
72
|
'fillScaffolding',
|
|
65
73
|
'listFilesToFill',
|
|
66
|
-
'fillSingleFile'
|
|
74
|
+
'fillSingleFile',
|
|
75
|
+
'getCodebaseMap'
|
|
67
76
|
];
|
|
68
77
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/ai/tools/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/ai/tools/index.ts"],"names":[],"mappings":";;;AAkCA,oDAeC;AAhDD,iDAA8C;AAC9C,mDAAgD;AAChD,6DAA0D;AAC1D,iEAA8D;AAC9D,qDAAkD;AAClD,iEAA8D;AAC9D,mEAAgE;AAChE,yDAAsD;AACtD,+DAAqG;AACrG,6DAA0D;AAE1D,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA;AAC9B,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,6DAQ+B;AAP7B,0HAAA,mBAAmB,OAAA;AACnB,0HAAA,mBAAmB,OAAA;AACnB,yHAAA,kBAAkB,OAAA;AAClB,wHAAA,iBAAiB,OAAA;AACjB,yHAAA,kBAAkB,OAAA;AAClB,2HAAA,oBAAoB,OAAA;AACpB,2HAAA,oBAAoB,OAAA;AAEtB,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAE3B;;GAEG;AACH,SAAgB,oBAAoB;IAClC,OAAO;QACL,QAAQ,EAAE,2BAAY;QACtB,SAAS,EAAE,6BAAa;QACxB,cAAc,EAAE,uCAAkB;QAClC,gBAAgB,EAAE,2CAAoB;QACtC,UAAU,EAAE,+BAAc;QAC1B,gBAAgB,EAAE,2CAAoB;QACtC,iBAAiB,EAAE,6CAAqB;QACxC,YAAY,EAAE,mCAAgB;QAC9B,eAAe,EAAE,yCAAmB;QACpC,eAAe,EAAE,yCAAmB;QACpC,cAAc,EAAE,wCAAkB;QAClC,cAAc,EAAE,uCAAkB;KACnC,CAAC;AACJ,CAAC;AAED;;GAEG;AACU,QAAA,UAAU,GAAG;IACxB,UAAU;IACV,WAAW;IACX,gBAAgB;IAChB,kBAAkB;IAClB,YAAY;IACZ,kBAAkB;IAClB,mBAAmB;IACnB,cAAc;IACd,iBAAiB;IACjB,iBAAiB;IACjB,gBAAgB;IAChB,gBAAgB;CACR,CAAC"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export declare const initializeContextTool: import("ai").Tool<{
|
|
2
2
|
repoPath: string;
|
|
3
|
-
type?: "
|
|
3
|
+
type?: "agents" | "docs" | "both" | undefined;
|
|
4
4
|
outputDir?: string | undefined;
|
|
5
5
|
semantic?: boolean | undefined;
|
|
6
6
|
include?: string[] | undefined;
|
|
7
7
|
exclude?: string[] | undefined;
|
|
8
|
+
projectType?: "unknown" | "cli" | "web-frontend" | "web-backend" | "full-stack" | "mobile" | "library" | "monorepo" | "desktop" | undefined;
|
|
9
|
+
disableFiltering?: boolean | undefined;
|
|
10
|
+
autoFill?: boolean | undefined;
|
|
8
11
|
}, {
|
|
9
12
|
success: boolean;
|
|
10
13
|
outputDir: string;
|
|
@@ -12,14 +15,29 @@ export declare const initializeContextTool: import("ai").Tool<{
|
|
|
12
15
|
docsGenerated?: undefined;
|
|
13
16
|
agentsGenerated?: undefined;
|
|
14
17
|
generatedFiles?: undefined;
|
|
15
|
-
|
|
18
|
+
classification?: undefined;
|
|
19
|
+
semanticContext?: undefined;
|
|
20
|
+
fillPrompt?: undefined;
|
|
21
|
+
instructions?: undefined;
|
|
16
22
|
} | {
|
|
17
23
|
success: boolean;
|
|
18
24
|
docsGenerated: number;
|
|
19
25
|
agentsGenerated: number;
|
|
20
26
|
outputDir: string;
|
|
21
|
-
generatedFiles:
|
|
22
|
-
|
|
27
|
+
generatedFiles: {
|
|
28
|
+
path: string;
|
|
29
|
+
relativePath: string;
|
|
30
|
+
type: "agent" | "doc";
|
|
31
|
+
fillInstructions: string;
|
|
32
|
+
}[];
|
|
33
|
+
classification: {
|
|
34
|
+
projectType: "unknown" | "cli" | "web-frontend" | "web-backend" | "full-stack" | "mobile" | "library" | "monorepo" | "desktop";
|
|
35
|
+
confidence: "high" | "medium" | "low";
|
|
36
|
+
reasoning: string[];
|
|
37
|
+
} | undefined;
|
|
38
|
+
semanticContext: string | undefined;
|
|
39
|
+
fillPrompt: string | undefined;
|
|
40
|
+
instructions: string;
|
|
23
41
|
error?: undefined;
|
|
24
42
|
}>;
|
|
25
43
|
//# sourceMappingURL=initializeContextTool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initializeContextTool.d.ts","sourceRoot":"","sources":["../../../../src/services/ai/tools/initializeContextTool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"initializeContextTool.d.ts","sourceRoot":"","sources":["../../../../src/services/ai/tools/initializeContextTool.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8KhC,CAAC"}
|
|
@@ -41,15 +41,15 @@ const schemas_1 = require("../schemas");
|
|
|
41
41
|
const fileMapper_1 = require("../../../utils/fileMapper");
|
|
42
42
|
const documentationGenerator_1 = require("../../../generators/documentation/documentationGenerator");
|
|
43
43
|
const agentGenerator_1 = require("../../../generators/agents/agentGenerator");
|
|
44
|
+
const stack_1 = require("../../stack");
|
|
45
|
+
const fillScaffoldingTool_1 = require("./fillScaffoldingTool");
|
|
44
46
|
exports.initializeContextTool = (0, ai_1.tool)({
|
|
45
47
|
description: `Initialize .context scaffolding and create template files.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
2. Read each generated template file
|
|
49
|
-
3. Write filled content to each file based on the codebase analysis`,
|
|
48
|
+
When autoFill is true (default), returns semantic context and detailed fill instructions for each file.
|
|
49
|
+
The AI agent MUST then fill each generated file using the provided context and instructions.`,
|
|
50
50
|
inputSchema: schemas_1.InitializeContextInputSchema,
|
|
51
51
|
execute: async (input) => {
|
|
52
|
-
const { repoPath, type = 'both', outputDir: customOutputDir, semantic = true, include, exclude = [] } = input;
|
|
52
|
+
const { repoPath, type = 'both', outputDir: customOutputDir, semantic = true, include, exclude = [], projectType: overrideProjectType, disableFiltering = false, autoFill = true, } = input;
|
|
53
53
|
const resolvedRepoPath = path.resolve(repoPath);
|
|
54
54
|
const outputDir = customOutputDir
|
|
55
55
|
? path.resolve(customOutputDir)
|
|
@@ -70,43 +70,104 @@ IMPORTANT: After scaffolding, you MUST fill the generated files with actual cont
|
|
|
70
70
|
// Map repository structure
|
|
71
71
|
const fileMapper = new fileMapper_1.FileMapper(exclude);
|
|
72
72
|
const repoStructure = await fileMapper.mapRepository(resolvedRepoPath, include);
|
|
73
|
+
// Detect stack and classify project type
|
|
74
|
+
let classification;
|
|
75
|
+
let projectType = 'unknown';
|
|
76
|
+
if (!disableFiltering) {
|
|
77
|
+
const stackDetector = new stack_1.StackDetector();
|
|
78
|
+
const stackInfo = await stackDetector.detect(resolvedRepoPath);
|
|
79
|
+
// Use override if provided, otherwise classify from stack
|
|
80
|
+
if (overrideProjectType) {
|
|
81
|
+
projectType = overrideProjectType;
|
|
82
|
+
classification = {
|
|
83
|
+
primaryType: overrideProjectType,
|
|
84
|
+
secondaryTypes: [],
|
|
85
|
+
confidence: 'high',
|
|
86
|
+
reasoning: ['Project type manually specified'],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
classification = (0, stack_1.classifyProject)(stackInfo);
|
|
91
|
+
projectType = classification.primaryType;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
// Get filtered agents and docs based on project type
|
|
95
|
+
const filteredAgents = disableFiltering ? undefined : (0, stack_1.getAgentsForProjectType)(projectType);
|
|
96
|
+
const filteredDocs = disableFiltering ? undefined : (0, stack_1.getDocsForProjectType)(projectType);
|
|
73
97
|
let docsGenerated = 0;
|
|
74
98
|
let agentsGenerated = 0;
|
|
75
99
|
// Generate documentation scaffolding
|
|
76
100
|
if (scaffoldDocs) {
|
|
77
101
|
const docGenerator = new documentationGenerator_1.DocumentationGenerator();
|
|
78
|
-
docsGenerated = await docGenerator.generateDocumentation(repoStructure, outputDir, { semantic }, false // verbose
|
|
102
|
+
docsGenerated = await docGenerator.generateDocumentation(repoStructure, outputDir, { semantic, filteredDocs }, false // verbose
|
|
79
103
|
);
|
|
80
104
|
}
|
|
81
105
|
// Generate agent scaffolding
|
|
82
106
|
if (scaffoldAgents) {
|
|
83
107
|
const agentGenerator = new agentGenerator_1.AgentGenerator();
|
|
84
|
-
agentsGenerated = await agentGenerator.generateAgentPrompts(repoStructure, outputDir, { semantic }, false // verbose
|
|
108
|
+
agentsGenerated = await agentGenerator.generateAgentPrompts(repoStructure, outputDir, { semantic, filteredAgents }, false // verbose
|
|
85
109
|
);
|
|
86
110
|
}
|
|
87
|
-
// Build list of generated files for the agent to fill
|
|
88
111
|
const generatedFiles = [];
|
|
89
112
|
if (scaffoldDocs) {
|
|
90
113
|
const docsDir = path.join(outputDir, 'docs');
|
|
91
114
|
const docFiles = await fs.readdir(docsDir);
|
|
92
|
-
|
|
115
|
+
for (const f of docFiles.filter(f => f.endsWith('.md') && f.toLowerCase() !== 'readme.md')) {
|
|
116
|
+
generatedFiles.push({
|
|
117
|
+
path: path.join(docsDir, f),
|
|
118
|
+
relativePath: `docs/${f}`,
|
|
119
|
+
type: 'doc',
|
|
120
|
+
fillInstructions: getDocFillInstructions(f),
|
|
121
|
+
});
|
|
122
|
+
}
|
|
93
123
|
}
|
|
94
124
|
if (scaffoldAgents) {
|
|
95
125
|
const agentsDir = path.join(outputDir, 'agents');
|
|
96
126
|
const agentFiles = await fs.readdir(agentsDir);
|
|
97
|
-
|
|
127
|
+
for (const f of agentFiles.filter(f => f.endsWith('.md') && f.toLowerCase() !== 'readme.md')) {
|
|
128
|
+
const agentType = path.basename(f, '.md');
|
|
129
|
+
generatedFiles.push({
|
|
130
|
+
path: path.join(agentsDir, f),
|
|
131
|
+
relativePath: `agents/${f}`,
|
|
132
|
+
type: 'agent',
|
|
133
|
+
fillInstructions: getAgentFillInstructions(agentType),
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
// Build semantic context if autoFill is enabled
|
|
138
|
+
let semanticContext;
|
|
139
|
+
if (autoFill && generatedFiles.length > 0) {
|
|
140
|
+
try {
|
|
141
|
+
semanticContext = await (0, fillScaffoldingTool_1.getOrBuildContext)(resolvedRepoPath);
|
|
142
|
+
}
|
|
143
|
+
catch (contextError) {
|
|
144
|
+
// Continue without semantic context if it fails
|
|
145
|
+
semanticContext = undefined;
|
|
146
|
+
}
|
|
98
147
|
}
|
|
148
|
+
// Build the response with fill instructions
|
|
149
|
+
const fillPrompt = autoFill ? buildFillPrompt(generatedFiles, semanticContext) : undefined;
|
|
99
150
|
return {
|
|
100
151
|
success: true,
|
|
101
152
|
docsGenerated,
|
|
102
153
|
agentsGenerated,
|
|
103
154
|
outputDir,
|
|
104
|
-
generatedFiles
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
155
|
+
generatedFiles: generatedFiles.map(f => ({
|
|
156
|
+
path: f.path,
|
|
157
|
+
relativePath: f.relativePath,
|
|
158
|
+
type: f.type,
|
|
159
|
+
fillInstructions: f.fillInstructions,
|
|
160
|
+
})),
|
|
161
|
+
classification: classification ? {
|
|
162
|
+
projectType: classification.primaryType,
|
|
163
|
+
confidence: classification.confidence,
|
|
164
|
+
reasoning: classification.reasoning,
|
|
165
|
+
} : undefined,
|
|
166
|
+
semanticContext: autoFill ? semanticContext : undefined,
|
|
167
|
+
fillPrompt,
|
|
168
|
+
instructions: autoFill
|
|
169
|
+
? 'IMPORTANT: You MUST now fill each generated file using the semantic context and fill instructions provided. Write the content to each file path.'
|
|
170
|
+
: 'Call fillScaffolding tool to get codebase-aware content for each file, then write the suggestedContent to each file.',
|
|
110
171
|
};
|
|
111
172
|
}
|
|
112
173
|
catch (error) {
|
|
@@ -118,4 +179,128 @@ IMPORTANT: After scaffolding, you MUST fill the generated files with actual cont
|
|
|
118
179
|
}
|
|
119
180
|
}
|
|
120
181
|
});
|
|
182
|
+
/**
|
|
183
|
+
* Get fill instructions for a documentation file based on its name
|
|
184
|
+
*/
|
|
185
|
+
function getDocFillInstructions(fileName) {
|
|
186
|
+
const name = fileName.toLowerCase();
|
|
187
|
+
if (name === 'architecture.md') {
|
|
188
|
+
return `Fill this file with:
|
|
189
|
+
- High-level architecture overview
|
|
190
|
+
- Key components and their responsibilities
|
|
191
|
+
- Data flow between components
|
|
192
|
+
- Design patterns used
|
|
193
|
+
- Technology stack decisions and rationale`;
|
|
194
|
+
}
|
|
195
|
+
if (name === 'project-overview.md') {
|
|
196
|
+
return `Fill this file with:
|
|
197
|
+
- Project purpose and goals
|
|
198
|
+
- Main features and capabilities
|
|
199
|
+
- Target users/audience
|
|
200
|
+
- Key dependencies and integrations
|
|
201
|
+
- Getting started guide`;
|
|
202
|
+
}
|
|
203
|
+
if (name === 'data-flow.md') {
|
|
204
|
+
return `Fill this file with:
|
|
205
|
+
- Data models and schemas
|
|
206
|
+
- API endpoints and their purposes
|
|
207
|
+
- Data transformation pipelines
|
|
208
|
+
- State management approach
|
|
209
|
+
- External data sources and sinks`;
|
|
210
|
+
}
|
|
211
|
+
if (name === 'conventions.md') {
|
|
212
|
+
return `Fill this file with:
|
|
213
|
+
- Code style and formatting rules
|
|
214
|
+
- Naming conventions
|
|
215
|
+
- File and folder organization
|
|
216
|
+
- Commit message format
|
|
217
|
+
- PR and review guidelines`;
|
|
218
|
+
}
|
|
219
|
+
return `Fill this documentation file with relevant content based on the codebase analysis. Focus on accuracy and usefulness for developers.`;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Get fill instructions for an agent playbook based on agent type
|
|
223
|
+
*/
|
|
224
|
+
function getAgentFillInstructions(agentType) {
|
|
225
|
+
const type = agentType.toLowerCase();
|
|
226
|
+
if (type.includes('code-reviewer')) {
|
|
227
|
+
return `Fill this agent playbook with:
|
|
228
|
+
- Code review checklist specific to this codebase
|
|
229
|
+
- Common patterns to look for
|
|
230
|
+
- Security considerations
|
|
231
|
+
- Performance best practices
|
|
232
|
+
- Testing requirements`;
|
|
233
|
+
}
|
|
234
|
+
if (type.includes('bug-fixer')) {
|
|
235
|
+
return `Fill this agent playbook with:
|
|
236
|
+
- Debugging workflow for this codebase
|
|
237
|
+
- Common bug patterns and fixes
|
|
238
|
+
- Logging and error handling conventions
|
|
239
|
+
- Test verification steps
|
|
240
|
+
- Rollback procedures`;
|
|
241
|
+
}
|
|
242
|
+
if (type.includes('feature-developer')) {
|
|
243
|
+
return `Fill this agent playbook with:
|
|
244
|
+
- Feature development workflow
|
|
245
|
+
- Code organization patterns
|
|
246
|
+
- Integration points for new features
|
|
247
|
+
- Testing requirements for new code
|
|
248
|
+
- Documentation expectations`;
|
|
249
|
+
}
|
|
250
|
+
if (type.includes('test-writer')) {
|
|
251
|
+
return `Fill this agent playbook with:
|
|
252
|
+
- Testing framework and conventions
|
|
253
|
+
- Test file organization
|
|
254
|
+
- Mocking strategies
|
|
255
|
+
- Coverage requirements
|
|
256
|
+
- CI/CD integration`;
|
|
257
|
+
}
|
|
258
|
+
return `Fill this agent playbook with:
|
|
259
|
+
- Role and responsibilities specific to this codebase
|
|
260
|
+
- Key files and components to understand
|
|
261
|
+
- Workflow steps for common tasks
|
|
262
|
+
- Best practices and conventions to follow
|
|
263
|
+
- Common pitfalls to avoid`;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Build a comprehensive fill prompt for the AI agent
|
|
267
|
+
*/
|
|
268
|
+
function buildFillPrompt(files, semanticContext) {
|
|
269
|
+
const lines = [];
|
|
270
|
+
lines.push('# Fill Instructions for Scaffolded Files');
|
|
271
|
+
lines.push('');
|
|
272
|
+
lines.push('You MUST fill each of the following files with appropriate content based on the codebase analysis.');
|
|
273
|
+
lines.push('');
|
|
274
|
+
if (semanticContext) {
|
|
275
|
+
lines.push('## Codebase Context');
|
|
276
|
+
lines.push('');
|
|
277
|
+
lines.push('Use this semantic context to understand the codebase structure:');
|
|
278
|
+
lines.push('');
|
|
279
|
+
lines.push('```');
|
|
280
|
+
// Limit context size to avoid overwhelming the response
|
|
281
|
+
lines.push(semanticContext.length > 8000 ? semanticContext.substring(0, 8000) + '\n...(truncated)' : semanticContext);
|
|
282
|
+
lines.push('```');
|
|
283
|
+
lines.push('');
|
|
284
|
+
}
|
|
285
|
+
lines.push('## Files to Fill');
|
|
286
|
+
lines.push('');
|
|
287
|
+
for (const file of files) {
|
|
288
|
+
lines.push(`### ${file.relativePath}`);
|
|
289
|
+
lines.push(`**Path:** \`${file.path}\``);
|
|
290
|
+
lines.push(`**Type:** ${file.type}`);
|
|
291
|
+
lines.push('');
|
|
292
|
+
lines.push('**Instructions:**');
|
|
293
|
+
lines.push(file.fillInstructions);
|
|
294
|
+
lines.push('');
|
|
295
|
+
}
|
|
296
|
+
lines.push('## Action Required');
|
|
297
|
+
lines.push('');
|
|
298
|
+
lines.push('For each file listed above:');
|
|
299
|
+
lines.push('1. Read the current template content');
|
|
300
|
+
lines.push('2. Generate appropriate content based on the instructions and codebase context');
|
|
301
|
+
lines.push('3. Write the filled content to the file');
|
|
302
|
+
lines.push('');
|
|
303
|
+
lines.push('DO NOT skip any files. Each file must be filled with meaningful, codebase-specific content.');
|
|
304
|
+
return lines.join('\n');
|
|
305
|
+
}
|
|
121
306
|
//# sourceMappingURL=initializeContextTool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initializeContextTool.js","sourceRoot":"","sources":["../../../../src/services/ai/tools/initializeContextTool.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA0B;AAC1B,2CAA6B;AAC7B,6CAA+B;AAC/B,wCAAuF;AACvF,0DAAuD;AACvD,qGAAkG;AAClG,8EAA2E;
|
|
1
|
+
{"version":3,"file":"initializeContextTool.js","sourceRoot":"","sources":["../../../../src/services/ai/tools/initializeContextTool.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA0B;AAC1B,2CAA6B;AAC7B,6CAA+B;AAC/B,wCAAuF;AACvF,0DAAuD;AACvD,qGAAkG;AAClG,8EAA2E;AAC3E,uCAOqB;AACrB,+DAAoG;AAEvF,QAAA,qBAAqB,GAAG,IAAA,SAAI,EAAC;IACxC,WAAW,EAAE;;6FAE8E;IAC3F,WAAW,EAAE,sCAA4B;IACzC,OAAO,EAAE,KAAK,EAAE,KAA6B,EAAE,EAAE;QAC/C,MAAM,EACJ,QAAQ,EACR,IAAI,GAAG,MAAM,EACb,SAAS,EAAE,eAAe,EAC1B,QAAQ,GAAG,IAAI,EACf,OAAO,EACP,OAAO,GAAG,EAAE,EACZ,WAAW,EAAE,mBAAmB,EAChC,gBAAgB,GAAG,KAAK,EACxB,QAAQ,GAAG,IAAI,GAChB,GAAG,KAAK,CAAC;QAEV,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAChD,MAAM,SAAS,GAAG,eAAe;YAC/B,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC;YAC/B,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,gBA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,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;IAC1C,KAAK,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;IACnD,KAAK,CAAC,IAAI,CAAC,gFAAgF,CAAC,CAAC;IAC7F,KAAK,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC;IACtD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,6FAA6F,CAAC,CAAC;IAE1G,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -5,15 +5,26 @@ export declare const scaffoldPlanTool: import("ai").Tool<{
|
|
|
5
5
|
title?: string | undefined;
|
|
6
6
|
summary?: string | undefined;
|
|
7
7
|
semantic?: boolean | undefined;
|
|
8
|
+
autoFill?: boolean | undefined;
|
|
8
9
|
}, {
|
|
9
10
|
success: boolean;
|
|
10
11
|
planPath: string;
|
|
11
12
|
planContent: string;
|
|
13
|
+
classification: {
|
|
14
|
+
projectType: "unknown" | "cli" | "web-frontend" | "web-backend" | "full-stack" | "mobile" | "library" | "monorepo" | "desktop";
|
|
15
|
+
confidence: "high" | "medium" | "low";
|
|
16
|
+
reasoning: string[];
|
|
17
|
+
};
|
|
18
|
+
fillInstructions: string | undefined;
|
|
19
|
+
instructions: string;
|
|
12
20
|
error?: undefined;
|
|
13
21
|
} | {
|
|
14
22
|
success: boolean;
|
|
15
23
|
error: string;
|
|
16
24
|
planPath?: undefined;
|
|
17
25
|
planContent?: undefined;
|
|
26
|
+
classification?: undefined;
|
|
27
|
+
fillInstructions?: undefined;
|
|
28
|
+
instructions?: undefined;
|
|
18
29
|
}>;
|
|
19
30
|
//# sourceMappingURL=scaffoldPlanTool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffoldPlanTool.d.ts","sourceRoot":"","sources":["../../../../src/services/ai/tools/scaffoldPlanTool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scaffoldPlanTool.d.ts","sourceRoot":"","sources":["../../../../src/services/ai/tools/scaffoldPlanTool.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4E3B,CAAC"}
|