galaxy-code 0.1.5 → 0.1.7
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 +149 -600
- package/dist/cli.bundle.js +588 -0
- package/package.json +14 -12
- package/dist/app.d.ts +0 -7
- package/dist/app.js +0 -597
- package/dist/auto-updater.d.ts +0 -21
- package/dist/auto-updater.js +0 -144
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +0 -159
- package/dist/connections/claude.d.ts +0 -71
- package/dist/connections/claude.js +0 -303
- package/dist/connections/gemini.d.ts +0 -40
- package/dist/connections/gemini.js +0 -232
- package/dist/connections/index.d.ts +0 -11
- package/dist/connections/index.js +0 -11
- package/dist/connections/ollama.d.ts +0 -37
- package/dist/connections/ollama.js +0 -73
- package/dist/connections/types.d.ts +0 -22
- package/dist/connections/types.js +0 -7
- package/dist/env.d.ts +0 -1
- package/dist/env.js +0 -29
- package/dist/node_modules/@workspace/agent-core/connections/claude.d.ts +0 -72
- package/dist/node_modules/@workspace/agent-core/connections/claude.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/claude.js +0 -270
- package/dist/node_modules/@workspace/agent-core/connections/claude.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/gemini.d.ts +0 -41
- package/dist/node_modules/@workspace/agent-core/connections/gemini.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/gemini.js +0 -203
- package/dist/node_modules/@workspace/agent-core/connections/gemini.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/index.d.ts +0 -12
- package/dist/node_modules/@workspace/agent-core/connections/index.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/index.js +0 -12
- package/dist/node_modules/@workspace/agent-core/connections/index.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/ollama.d.ts +0 -38
- package/dist/node_modules/@workspace/agent-core/connections/ollama.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/ollama.js +0 -64
- package/dist/node_modules/@workspace/agent-core/connections/ollama.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/types.d.ts +0 -23
- package/dist/node_modules/@workspace/agent-core/connections/types.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/types.js +0 -8
- package/dist/node_modules/@workspace/agent-core/connections/types.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/index.d.ts +0 -13
- package/dist/node_modules/@workspace/agent-core/index.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/index.js +0 -22
- package/dist/node_modules/@workspace/agent-core/index.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/package.json +0 -53
- package/dist/node_modules/@workspace/agent-core/prompts/ba-it-analyzer.d.ts +0 -2
- package/dist/node_modules/@workspace/agent-core/prompts/ba-it-analyzer.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/ba-it-analyzer.js +0 -144
- package/dist/node_modules/@workspace/agent-core/prompts/ba-it-analyzer.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/index.d.ts +0 -12
- package/dist/node_modules/@workspace/agent-core/prompts/index.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/index.js +0 -12
- package/dist/node_modules/@workspace/agent-core/prompts/index.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/orchestrator.d.ts +0 -9
- package/dist/node_modules/@workspace/agent-core/prompts/orchestrator.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/orchestrator.js +0 -89
- package/dist/node_modules/@workspace/agent-core/prompts/orchestrator.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/planning-agent.d.ts +0 -9
- package/dist/node_modules/@workspace/agent-core/prompts/planning-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/planning-agent.js +0 -196
- package/dist/node_modules/@workspace/agent-core/prompts/planning-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/universal-agent.d.ts +0 -8
- package/dist/node_modules/@workspace/agent-core/prompts/universal-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/universal-agent.js +0 -112
- package/dist/node_modules/@workspace/agent-core/prompts/universal-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/agent-selector.d.ts +0 -30
- package/dist/node_modules/@workspace/agent-core/providers/agent-selector.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/agent-selector.js +0 -76
- package/dist/node_modules/@workspace/agent-core/providers/agent-selector.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/claude-agent.d.ts +0 -30
- package/dist/node_modules/@workspace/agent-core/providers/claude-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/claude-agent.js +0 -107
- package/dist/node_modules/@workspace/agent-core/providers/claude-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/gemini-agent.d.ts +0 -37
- package/dist/node_modules/@workspace/agent-core/providers/gemini-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/gemini-agent.js +0 -144
- package/dist/node_modules/@workspace/agent-core/providers/gemini-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/index.d.ts +0 -13
- package/dist/node_modules/@workspace/agent-core/providers/index.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/index.js +0 -13
- package/dist/node_modules/@workspace/agent-core/providers/index.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/ollama-agent.d.ts +0 -54
- package/dist/node_modules/@workspace/agent-core/providers/ollama-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/ollama-agent.js +0 -247
- package/dist/node_modules/@workspace/agent-core/providers/ollama-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/orchestrator.d.ts +0 -17
- package/dist/node_modules/@workspace/agent-core/providers/orchestrator.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/orchestrator.js +0 -62
- package/dist/node_modules/@workspace/agent-core/providers/orchestrator.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/ba-it-analyzer.d.ts +0 -67
- package/dist/node_modules/@workspace/agent-core/tools/ba-it-analyzer.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/ba-it-analyzer.js +0 -81
- package/dist/node_modules/@workspace/agent-core/tools/ba-it-analyzer.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/code-generate-agent.d.ts +0 -52
- package/dist/node_modules/@workspace/agent-core/tools/code-generate-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/code-generate-agent.js +0 -150
- package/dist/node_modules/@workspace/agent-core/tools/code-generate-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/command-runner.d.ts +0 -15
- package/dist/node_modules/@workspace/agent-core/tools/command-runner.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/command-runner.js +0 -121
- package/dist/node_modules/@workspace/agent-core/tools/command-runner.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/document-parser.d.ts +0 -12
- package/dist/node_modules/@workspace/agent-core/tools/document-parser.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/document-parser.js +0 -84
- package/dist/node_modules/@workspace/agent-core/tools/document-parser.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/file-operations.d.ts +0 -18
- package/dist/node_modules/@workspace/agent-core/tools/file-operations.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/file-operations.js +0 -126
- package/dist/node_modules/@workspace/agent-core/tools/file-operations.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/galaxy-ui-integration.d.ts +0 -95
- package/dist/node_modules/@workspace/agent-core/tools/galaxy-ui-integration.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/galaxy-ui-integration.js +0 -245
- package/dist/node_modules/@workspace/agent-core/tools/galaxy-ui-integration.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/git-operations.d.ts +0 -12
- package/dist/node_modules/@workspace/agent-core/tools/git-operations.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/git-operations.js +0 -115
- package/dist/node_modules/@workspace/agent-core/tools/git-operations.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/index.d.ts +0 -11
- package/dist/node_modules/@workspace/agent-core/tools/index.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/index.js +0 -11
- package/dist/node_modules/@workspace/agent-core/tools/index.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/planning-agent.d.ts +0 -30
- package/dist/node_modules/@workspace/agent-core/tools/planning-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/planning-agent.js +0 -125
- package/dist/node_modules/@workspace/agent-core/tools/planning-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/progress-reporter.d.ts +0 -20
- package/dist/node_modules/@workspace/agent-core/tools/progress-reporter.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/progress-reporter.js +0 -46
- package/dist/node_modules/@workspace/agent-core/tools/progress-reporter.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/registry.d.ts +0 -22
- package/dist/node_modules/@workspace/agent-core/tools/registry.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/registry.js +0 -651
- package/dist/node_modules/@workspace/agent-core/tools/registry.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/tool-event-emitter.d.ts +0 -25
- package/dist/node_modules/@workspace/agent-core/tools/tool-event-emitter.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/tool-event-emitter.js +0 -26
- package/dist/node_modules/@workspace/agent-core/tools/tool-event-emitter.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/types.d.ts +0 -32
- package/dist/node_modules/@workspace/agent-core/tools/types.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/types.js +0 -2
- package/dist/node_modules/@workspace/agent-core/tools/types.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/types.d.ts +0 -40
- package/dist/node_modules/@workspace/agent-core/types.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/types.js +0 -9
- package/dist/node_modules/@workspace/agent-core/types.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/config-manager.d.ts +0 -103
- package/dist/node_modules/@workspace/agent-core/utils/config-manager.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/config-manager.js +0 -307
- package/dist/node_modules/@workspace/agent-core/utils/config-manager.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/devtools.d.ts +0 -22
- package/dist/node_modules/@workspace/agent-core/utils/devtools.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/devtools.js +0 -62
- package/dist/node_modules/@workspace/agent-core/utils/devtools.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/message-formatters.d.ts +0 -33
- package/dist/node_modules/@workspace/agent-core/utils/message-formatters.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/message-formatters.js +0 -591
- package/dist/node_modules/@workspace/agent-core/utils/message-formatters.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/progress-tracker.d.ts +0 -60
- package/dist/node_modules/@workspace/agent-core/utils/progress-tracker.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/progress-tracker.js +0 -204
- package/dist/node_modules/@workspace/agent-core/utils/progress-tracker.js.map +0 -1
- package/dist/prompts/ba-it-analyzer.d.ts +0 -1
- package/dist/prompts/ba-it-analyzer.js +0 -143
- package/dist/prompts/index.d.ts +0 -11
- package/dist/prompts/index.js +0 -11
- package/dist/prompts/orchestrator.d.ts +0 -8
- package/dist/prompts/orchestrator.js +0 -88
- package/dist/prompts/planning-agent.d.ts +0 -8
- package/dist/prompts/planning-agent.js +0 -195
- package/dist/prompts/universal-agent.d.ts +0 -7
- package/dist/prompts/universal-agent.js +0 -111
- package/dist/providers/agent-selector.d.ts +0 -29
- package/dist/providers/agent-selector.js +0 -84
- package/dist/providers/claude-agent.d.ts +0 -29
- package/dist/providers/claude-agent.js +0 -121
- package/dist/providers/gemini-agent.d.ts +0 -36
- package/dist/providers/gemini-agent.js +0 -168
- package/dist/providers/index.d.ts +0 -12
- package/dist/providers/index.js +0 -12
- package/dist/providers/ollama-agent.d.ts +0 -53
- package/dist/providers/ollama-agent.js +0 -276
- package/dist/providers/orchestrator.d.ts +0 -16
- package/dist/providers/orchestrator.js +0 -76
- package/dist/tools/ba-it-analyzer.d.ts +0 -66
- package/dist/tools/ba-it-analyzer.js +0 -90
- package/dist/tools/code-generate-agent.d.ts +0 -51
- package/dist/tools/code-generate-agent.js +0 -159
- package/dist/tools/command-runner.d.ts +0 -14
- package/dist/tools/command-runner.js +0 -120
- package/dist/tools/document-parser.d.ts +0 -11
- package/dist/tools/document-parser.js +0 -83
- package/dist/tools/file-operations.d.ts +0 -17
- package/dist/tools/file-operations.js +0 -127
- package/dist/tools/galaxy-ui-integration.d.ts +0 -94
- package/dist/tools/galaxy-ui-integration.js +0 -244
- package/dist/tools/git-operations.d.ts +0 -11
- package/dist/tools/git-operations.js +0 -114
- package/dist/tools/index.d.ts +0 -10
- package/dist/tools/index.js +0 -10
- package/dist/tools/planning-agent.d.ts +0 -29
- package/dist/tools/planning-agent.js +0 -134
- package/dist/tools/progress-reporter.d.ts +0 -19
- package/dist/tools/progress-reporter.js +0 -52
- package/dist/tools/registry.d.ts +0 -21
- package/dist/tools/registry.js +0 -695
- package/dist/tools/tool-event-emitter.d.ts +0 -24
- package/dist/tools/tool-event-emitter.js +0 -25
- package/dist/tools/types.d.ts +0 -31
- package/dist/tools/types.js +0 -1
- package/dist/types.d.ts +0 -39
- package/dist/types.js +0 -8
- package/dist/update-checker.d.ts +0 -22
- package/dist/update-checker.js +0 -85
- package/dist/utils/config-manager.d.ts +0 -102
- package/dist/utils/config-manager.js +0 -326
- package/dist/utils/devtools.d.ts +0 -21
- package/dist/utils/devtools.js +0 -61
- package/dist/utils/message-formatters.d.ts +0 -32
- package/dist/utils/message-formatters.js +0 -590
- package/dist/utils/progress-tracker.d.ts +0 -59
- package/dist/utils/progress-tracker.js +0 -213
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
export interface ProgressStep {
|
|
2
|
-
step: number;
|
|
3
|
-
action: string;
|
|
4
|
-
status: 'pending' | 'in-progress' | 'completed' | 'failed';
|
|
5
|
-
startTime?: Date;
|
|
6
|
-
endTime?: Date;
|
|
7
|
-
error?: string;
|
|
8
|
-
filesCreated?: string[];
|
|
9
|
-
}
|
|
10
|
-
export interface ProjectProgress {
|
|
11
|
-
projectName: string;
|
|
12
|
-
startTime: Date;
|
|
13
|
-
lastUpdated: Date;
|
|
14
|
-
currentStep: number;
|
|
15
|
-
totalSteps: number;
|
|
16
|
-
steps: ProgressStep[];
|
|
17
|
-
}
|
|
18
|
-
export declare class ProgressTracker {
|
|
19
|
-
private progressFilePath;
|
|
20
|
-
private progress;
|
|
21
|
-
constructor(workingDir?: string);
|
|
22
|
-
/**
|
|
23
|
-
* Initialize new progress tracking
|
|
24
|
-
*/
|
|
25
|
-
initializeProgress(projectName: string, steps: ProgressStep[]): void;
|
|
26
|
-
/**
|
|
27
|
-
* Load existing progress
|
|
28
|
-
*/
|
|
29
|
-
loadProgress(): ProjectProgress | null;
|
|
30
|
-
/**
|
|
31
|
-
* Update step status
|
|
32
|
-
*/
|
|
33
|
-
updateStepStatus(stepNum: number, status: ProgressStep['status'], error?: string, filesCreated?: string[]): void;
|
|
34
|
-
/**
|
|
35
|
-
* Generate markdown content
|
|
36
|
-
*/
|
|
37
|
-
private generateMarkdown;
|
|
38
|
-
/**
|
|
39
|
-
* Save progress to markdown file
|
|
40
|
-
*/
|
|
41
|
-
saveProgress(): void;
|
|
42
|
-
/**
|
|
43
|
-
* Get current progress
|
|
44
|
-
*/
|
|
45
|
-
getProgress(): ProjectProgress | null;
|
|
46
|
-
/**
|
|
47
|
-
* Check if progress file exists
|
|
48
|
-
*/
|
|
49
|
-
hasProgress(): boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Clear progress (delete file)
|
|
52
|
-
*/
|
|
53
|
-
clearProgress(): void;
|
|
54
|
-
/**
|
|
55
|
-
* Get progress file path
|
|
56
|
-
*/
|
|
57
|
-
getProgressFilePath(): string;
|
|
58
|
-
}
|
|
59
|
-
export declare const progressTracker: ProgressTracker;
|
|
60
|
-
//# sourceMappingURL=progress-tracker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"progress-tracker.d.ts","sourceRoot":"","sources":["../../src/utils/progress-tracker.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,QAAQ,CAAC;IAC3D,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,eAAe;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,IAAI,CAAC;IAChB,WAAW,EAAE,IAAI,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,YAAY,EAAE,CAAC;CACtB;AAED,qBAAa,eAAe;IAC3B,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAgC;gBAEpC,UAAU,GAAE,MAAsB;IAI9C;;OAEG;IACH,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,IAAI;IAgBpE;;OAEG;IACH,YAAY,IAAI,eAAe,GAAG,IAAI;IA2BtC;;OAEG;IACH,gBAAgB,CACf,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,EAC9B,KAAK,CAAC,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,MAAM,EAAE,GACrB,IAAI;IAsCP;;OAEG;IACH,OAAO,CAAC,gBAAgB;IA6ExB;;OAEG;IACH,YAAY,IAAI,IAAI;IAcpB;;OAEG;IACH,WAAW,IAAI,eAAe,GAAG,IAAI;IAIrC;;OAEG;IACH,WAAW,IAAI,OAAO;IAItB;;OAEG;IACH,aAAa,IAAI,IAAI;IAcrB;;OAEG;IACH,mBAAmB,IAAI,MAAM;CAG7B;AAGD,eAAO,MAAM,eAAe,iBAAwB,CAAC"}
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Bùi Trọng Hiếu
|
|
3
|
-
* @email kevinbui210191@gmail.com
|
|
4
|
-
* @create 2024-10-13
|
|
5
|
-
* @modify 2024-10-13
|
|
6
|
-
* @desc Progress tracker for Galaxy CLI
|
|
7
|
-
*/
|
|
8
|
-
import fs from 'node:fs';
|
|
9
|
-
import path from 'node:path';
|
|
10
|
-
export class ProgressTracker {
|
|
11
|
-
progressFilePath;
|
|
12
|
-
progress = null;
|
|
13
|
-
constructor(workingDir = process.cwd()) {
|
|
14
|
-
this.progressFilePath = path.join(workingDir, 'Improgress.md');
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Initialize new progress tracking
|
|
18
|
-
*/
|
|
19
|
-
initializeProgress(projectName, steps) {
|
|
20
|
-
this.progress = {
|
|
21
|
-
projectName,
|
|
22
|
-
startTime: new Date(),
|
|
23
|
-
lastUpdated: new Date(),
|
|
24
|
-
currentStep: 1,
|
|
25
|
-
totalSteps: steps.length,
|
|
26
|
-
steps: steps.map((step, index) => ({
|
|
27
|
-
...step,
|
|
28
|
-
status: index === 0 ? 'in-progress' : 'pending',
|
|
29
|
-
})),
|
|
30
|
-
};
|
|
31
|
-
this.saveProgress();
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Load existing progress
|
|
35
|
-
*/
|
|
36
|
-
loadProgress() {
|
|
37
|
-
try {
|
|
38
|
-
if (!fs.existsSync(this.progressFilePath)) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
const content = fs.readFileSync(this.progressFilePath, 'utf-8');
|
|
42
|
-
// Parse markdown to extract progress data
|
|
43
|
-
// For simplicity, we'll store JSON in a comment at the end
|
|
44
|
-
const jsonMatch = content.match(/<!-- PROGRESS_DATA\n([\s\S]*?)\n-->/);
|
|
45
|
-
if (jsonMatch && jsonMatch[1]) {
|
|
46
|
-
this.progress = JSON.parse(jsonMatch[1]);
|
|
47
|
-
return this.progress;
|
|
48
|
-
}
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
catch (error) {
|
|
52
|
-
console.warn('⚠️ Failed to load progress:', error instanceof Error ? error.message : String(error));
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Update step status
|
|
58
|
-
*/
|
|
59
|
-
updateStepStatus(stepNum, status, error, filesCreated) {
|
|
60
|
-
if (!this.progress)
|
|
61
|
-
return;
|
|
62
|
-
const stepIndex = this.progress.steps.findIndex(s => s.step === stepNum);
|
|
63
|
-
if (stepIndex === -1)
|
|
64
|
-
return;
|
|
65
|
-
const now = new Date();
|
|
66
|
-
const currentStep = this.progress.steps[stepIndex];
|
|
67
|
-
if (!currentStep)
|
|
68
|
-
return;
|
|
69
|
-
// Update current step
|
|
70
|
-
this.progress.steps[stepIndex] = {
|
|
71
|
-
step: currentStep.step,
|
|
72
|
-
action: currentStep.action,
|
|
73
|
-
status,
|
|
74
|
-
startTime: currentStep.startTime,
|
|
75
|
-
endTime: status === 'completed' || status === 'failed' ? now : undefined,
|
|
76
|
-
error,
|
|
77
|
-
filesCreated,
|
|
78
|
-
};
|
|
79
|
-
// Update progress metadata
|
|
80
|
-
this.progress.lastUpdated = now;
|
|
81
|
-
if (status === 'completed' && stepNum < this.progress.totalSteps) {
|
|
82
|
-
this.progress.currentStep = stepNum + 1;
|
|
83
|
-
// Mark next step as in-progress
|
|
84
|
-
const nextStep = this.progress.steps[stepIndex + 1];
|
|
85
|
-
if (nextStep) {
|
|
86
|
-
nextStep.status = 'in-progress';
|
|
87
|
-
nextStep.startTime = now;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
this.saveProgress();
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Generate markdown content
|
|
94
|
-
*/
|
|
95
|
-
generateMarkdown() {
|
|
96
|
-
if (!this.progress)
|
|
97
|
-
return '';
|
|
98
|
-
const { projectName, startTime, lastUpdated, currentStep, totalSteps, steps } = this.progress;
|
|
99
|
-
let md = `# 🚀 ${projectName} - Implementation Progress\n\n`;
|
|
100
|
-
// Metadata
|
|
101
|
-
md += `**Started**: ${startTime.toLocaleString()}\n`;
|
|
102
|
-
md += `**Last Updated**: ${lastUpdated.toLocaleString()}\n`;
|
|
103
|
-
md += `**Progress**: ${currentStep - 1}/${totalSteps} steps completed\n\n`;
|
|
104
|
-
// Progress bar
|
|
105
|
-
const completed = steps.filter(s => s.status === 'completed').length;
|
|
106
|
-
const percentage = Math.round((completed / totalSteps) * 100);
|
|
107
|
-
const barLength = 30;
|
|
108
|
-
const filled = Math.round((completed / totalSteps) * barLength);
|
|
109
|
-
const bar = '█'.repeat(filled) + '░'.repeat(barLength - filled);
|
|
110
|
-
md += `\`\`\`\n[${bar}] ${percentage}%\n\`\`\`\n\n`;
|
|
111
|
-
// Steps
|
|
112
|
-
md += `## 📋 Implementation Steps\n\n`;
|
|
113
|
-
for (const step of steps) {
|
|
114
|
-
const icon = step.status === 'completed'
|
|
115
|
-
? '✅'
|
|
116
|
-
: step.status === 'in-progress'
|
|
117
|
-
? '🔄'
|
|
118
|
-
: step.status === 'failed'
|
|
119
|
-
? '❌'
|
|
120
|
-
: '⏳';
|
|
121
|
-
md += `### ${icon} Step ${step.step}: ${step.action}\n\n`;
|
|
122
|
-
md += `**Status**: ${step.status.toUpperCase()}\n`;
|
|
123
|
-
if (step.startTime) {
|
|
124
|
-
md += `**Started**: ${step.startTime.toLocaleString()}\n`;
|
|
125
|
-
}
|
|
126
|
-
if (step.endTime) {
|
|
127
|
-
md += `**Completed**: ${step.endTime.toLocaleString()}\n`;
|
|
128
|
-
if (step.startTime) {
|
|
129
|
-
const duration = step.endTime.getTime() - step.startTime.getTime();
|
|
130
|
-
md += `**Duration**: ${Math.round(duration / 1000)}s\n`;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
if (step.filesCreated && step.filesCreated.length > 0) {
|
|
134
|
-
md += `\n**Files Created**:\n`;
|
|
135
|
-
for (const file of step.filesCreated) {
|
|
136
|
-
md += `- \`${file}\`\n`;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
if (step.error) {
|
|
140
|
-
md += `\n**Error**: \`\`\`\n${step.error}\n\`\`\`\n`;
|
|
141
|
-
}
|
|
142
|
-
md += '\n';
|
|
143
|
-
}
|
|
144
|
-
// Summary
|
|
145
|
-
md += `## 📊 Summary\n\n`;
|
|
146
|
-
md += `- Total Steps: ${totalSteps}\n`;
|
|
147
|
-
md += `- Completed: ${steps.filter(s => s.status === 'completed').length}\n`;
|
|
148
|
-
md += `- In Progress: ${steps.filter(s => s.status === 'in-progress').length}\n`;
|
|
149
|
-
md += `- Pending: ${steps.filter(s => s.status === 'pending').length}\n`;
|
|
150
|
-
md += `- Failed: ${steps.filter(s => s.status === 'failed').length}\n\n`;
|
|
151
|
-
// Add JSON data as HTML comment for parsing
|
|
152
|
-
md += `<!-- PROGRESS_DATA\n${JSON.stringify(this.progress, null, 2)}\n-->\n`;
|
|
153
|
-
return md;
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Save progress to markdown file
|
|
157
|
-
*/
|
|
158
|
-
saveProgress() {
|
|
159
|
-
if (!this.progress)
|
|
160
|
-
return;
|
|
161
|
-
try {
|
|
162
|
-
const markdown = this.generateMarkdown();
|
|
163
|
-
fs.writeFileSync(this.progressFilePath, markdown, 'utf-8');
|
|
164
|
-
}
|
|
165
|
-
catch (error) {
|
|
166
|
-
console.error('❌ Failed to save progress:', error instanceof Error ? error.message : String(error));
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Get current progress
|
|
171
|
-
*/
|
|
172
|
-
getProgress() {
|
|
173
|
-
return this.progress;
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Check if progress file exists
|
|
177
|
-
*/
|
|
178
|
-
hasProgress() {
|
|
179
|
-
return fs.existsSync(this.progressFilePath);
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Clear progress (delete file)
|
|
183
|
-
*/
|
|
184
|
-
clearProgress() {
|
|
185
|
-
try {
|
|
186
|
-
if (fs.existsSync(this.progressFilePath)) {
|
|
187
|
-
fs.unlinkSync(this.progressFilePath);
|
|
188
|
-
}
|
|
189
|
-
this.progress = null;
|
|
190
|
-
}
|
|
191
|
-
catch (error) {
|
|
192
|
-
console.error('❌ Failed to clear progress:', error instanceof Error ? error.message : String(error));
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Get progress file path
|
|
197
|
-
*/
|
|
198
|
-
getProgressFilePath() {
|
|
199
|
-
return this.progressFilePath;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
// Create instance
|
|
203
|
-
export const progressTracker = new ProgressTracker();
|
|
204
|
-
//# sourceMappingURL=progress-tracker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"progress-tracker.js","sourceRoot":"","sources":["../../src/utils/progress-tracker.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAqB7B,MAAM,O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
1
|
-
export declare const systemBAITAnalyzerPrompt = "You are an EXPERT BUSINESS ANALYST for IT projects.\n\n# Your Role:\nAnalyze user requests and create COMPREHENSIVE project specifications including:\n1. Type: create_project (new) or update_project (add feature to existing)\n2. Core Features (must-have vs nice-to-have)\n3. Technical Stack recommendations\n4. User Stories with acceptance criteria\n5. Data Model (entities, attributes, relationships)\n6. API endpoints for backend systems\n7. Complexity + time estimate\n8. Best practices & recommendations\n9. Clarification questions\n\n# Language Rule:\n**ALWAYS respond in ENGLISH** regardless of user's input language.\n- All field values (descriptions, names, recommendations, etc.) MUST be in English\n- This ensures consistent output format for downstream tools (planning, code generation)\n\n# Output Format (VALID JSON - ALL content in English):\n{\n \"type\": \"create_project | update_project\",\n \"projectName\": \"Project name\",\n \"projectType\": \"web-app | mobile-app | api | full-stack | desktop-app\",\n \"description\": \"Brief summary\",\n \"coreFeatures\": [\n {\n \"name\": \"Feature name\",\n \"description\": \"Description\",\n \"priority\": \"must-have | should-have | nice-to-have\",\n \"userStory\": \"As a [user], I want [feature] so that [benefit]\",\n \"acceptanceCriteria\": [\"Criterion 1\", \"Criterion 2\"]\n }\n ],\n \"technicalStack\": {\n \"frontend\": [\"React\", \"TypeScript\"],\n \"backend\": [\"Node.js\", \"Express\"],\n \"database\": [\"PostgreSQL\"],\n \"thirdParty\": [\"Stripe\"]\n },\n \"userStories\": [\n {\n \"as\": \"role\",\n \"iWant\": \"feature\",\n \"soThat\": \"benefit\",\n \"acceptanceCriteria\": [\"Given [context], when [action], then [result]\"]\n }\n ],\n \"dataModel\": [\n {\n \"name\": \"Entity\",\n \"description\": \"Purpose\",\n \"attributes\": [\"id\", \"name\", \"createdAt\"],\n \"relationships\": [\"User has many Orders\"]\n }\n ],\n \"apiEndpoints\": [\n {\n \"method\": \"GET | POST | PUT | DELETE\",\n \"path\": \"/api/resource\",\n \"description\": \"Purpose\",\n \"response\": \"{ data: [] }\"\n }\n ],\n \"estimatedComplexity\": \"simple | medium | complex\",\n \"estimatedTime\": \"1-2 weeks | 2-4 weeks | 1-3 months\",\n \"recommendations\": [\"Recommendation with reasoning\"],\n \"questionsForUser\": [\"Clarification question\"]\n}\n\n# Example:\n\nUser: \"Create an online phone store\"\n\n{\n \"type\": \"create_project\",\n \"projectName\": \"Phone Store E-Commerce\",\n \"projectType\": \"full-stack\",\n \"description\": \"E-commerce platform for selling phones with product catalog, cart, checkout, and order management\",\n \"coreFeatures\": [\n {\n \"name\": \"Product Catalog\",\n \"description\": \"Display phones with images, prices, specs. Filter by brand, price, features. Search by name.\",\n \"priority\": \"must-have\",\n \"userStory\": \"As a customer, I want to browse phones with filters to find suitable products\",\n \"acceptanceCriteria\": [\"Grid/list view\", \"Filter by brand/price\", \"Real-time search\", \"Pagination\"]\n },\n {\n \"name\": \"Shopping Cart\",\n \"description\": \"Add products, update quantity, remove items, calculate total\",\n \"priority\": \"must-have\",\n \"userStory\": \"As a customer, I want to manage my cart to buy multiple products\",\n \"acceptanceCriteria\": [\"Add to cart\", \"Update quantity\", \"Remove items\", \"Calculate total\"]\n }\n ],\n \"technicalStack\": {\n \"frontend\": [\"Next.js\", \"TypeScript\", \"Tailwind\"],\n \"backend\": [\"Node.js\", \"Express\"],\n \"database\": [\"PostgreSQL\", \"Redis\"],\n \"thirdParty\": [\"Stripe\"]\n },\n \"userStories\": [\n {\n \"as\": \"customer\",\n \"iWant\": \"filter products by brand\",\n \"soThat\": \"find phones quickly\",\n \"acceptanceCriteria\": [\"Given home page, when filter 'Samsung', then show Samsung phones\"]\n }\n ],\n \"dataModel\": [\n {\n \"name\": \"Product\",\n \"description\": \"Phone product\",\n \"attributes\": [\"id\", \"name\", \"brand\", \"price\", \"stock\"],\n \"relationships\": [\"Product has many OrderItems\"]\n }\n ],\n \"apiEndpoints\": [\n {\n \"method\": \"GET\",\n \"path\": \"/api/products\",\n \"description\": \"Get product list\",\n \"response\": \"{ products: Product[] }\"\n }\n ],\n \"estimatedComplexity\": \"complex\",\n \"estimatedTime\": \"2-4 weeks\",\n \"recommendations\": [\n \"Use Next.js App Router for SSR and SEO\",\n \"Implement Redis caching for product listing\"\n ],\n \"questionsForUser\": [\n \"Online payment (Stripe) or COD only?\",\n \"Multi-language support needed?\"\n ]\n}\n\nCRITICAL:\n- VALID JSON ONLY (no markdown)\n- COMPREHENSIVE MVP features\n- Use user's language throughout\n- SPECIFIC technical recommendations\n- Realistic feature prioritization";
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
export const systemBAITAnalyzerPrompt = `You are an EXPERT BUSINESS ANALYST for IT projects.
|
|
2
|
-
|
|
3
|
-
# Your Role:
|
|
4
|
-
Analyze user requests and create COMPREHENSIVE project specifications including:
|
|
5
|
-
1. Type: create_project (new) or update_project (add feature to existing)
|
|
6
|
-
2. Core Features (must-have vs nice-to-have)
|
|
7
|
-
3. Technical Stack recommendations
|
|
8
|
-
4. User Stories with acceptance criteria
|
|
9
|
-
5. Data Model (entities, attributes, relationships)
|
|
10
|
-
6. API endpoints for backend systems
|
|
11
|
-
7. Complexity + time estimate
|
|
12
|
-
8. Best practices & recommendations
|
|
13
|
-
9. Clarification questions
|
|
14
|
-
|
|
15
|
-
# Language Rule:
|
|
16
|
-
**ALWAYS respond in ENGLISH** regardless of user's input language.
|
|
17
|
-
- All field values (descriptions, names, recommendations, etc.) MUST be in English
|
|
18
|
-
- This ensures consistent output format for downstream tools (planning, code generation)
|
|
19
|
-
|
|
20
|
-
# Output Format (VALID JSON - ALL content in English):
|
|
21
|
-
{
|
|
22
|
-
"type": "create_project | update_project",
|
|
23
|
-
"projectName": "Project name",
|
|
24
|
-
"projectType": "web-app | mobile-app | api | full-stack | desktop-app",
|
|
25
|
-
"description": "Brief summary",
|
|
26
|
-
"coreFeatures": [
|
|
27
|
-
{
|
|
28
|
-
"name": "Feature name",
|
|
29
|
-
"description": "Description",
|
|
30
|
-
"priority": "must-have | should-have | nice-to-have",
|
|
31
|
-
"userStory": "As a [user], I want [feature] so that [benefit]",
|
|
32
|
-
"acceptanceCriteria": ["Criterion 1", "Criterion 2"]
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
"technicalStack": {
|
|
36
|
-
"frontend": ["React", "TypeScript"],
|
|
37
|
-
"backend": ["Node.js", "Express"],
|
|
38
|
-
"database": ["PostgreSQL"],
|
|
39
|
-
"thirdParty": ["Stripe"]
|
|
40
|
-
},
|
|
41
|
-
"userStories": [
|
|
42
|
-
{
|
|
43
|
-
"as": "role",
|
|
44
|
-
"iWant": "feature",
|
|
45
|
-
"soThat": "benefit",
|
|
46
|
-
"acceptanceCriteria": ["Given [context], when [action], then [result]"]
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
"dataModel": [
|
|
50
|
-
{
|
|
51
|
-
"name": "Entity",
|
|
52
|
-
"description": "Purpose",
|
|
53
|
-
"attributes": ["id", "name", "createdAt"],
|
|
54
|
-
"relationships": ["User has many Orders"]
|
|
55
|
-
}
|
|
56
|
-
],
|
|
57
|
-
"apiEndpoints": [
|
|
58
|
-
{
|
|
59
|
-
"method": "GET | POST | PUT | DELETE",
|
|
60
|
-
"path": "/api/resource",
|
|
61
|
-
"description": "Purpose",
|
|
62
|
-
"response": "{ data: [] }"
|
|
63
|
-
}
|
|
64
|
-
],
|
|
65
|
-
"estimatedComplexity": "simple | medium | complex",
|
|
66
|
-
"estimatedTime": "1-2 weeks | 2-4 weeks | 1-3 months",
|
|
67
|
-
"recommendations": ["Recommendation with reasoning"],
|
|
68
|
-
"questionsForUser": ["Clarification question"]
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
# Example:
|
|
72
|
-
|
|
73
|
-
User: "Create an online phone store"
|
|
74
|
-
|
|
75
|
-
{
|
|
76
|
-
"type": "create_project",
|
|
77
|
-
"projectName": "Phone Store E-Commerce",
|
|
78
|
-
"projectType": "full-stack",
|
|
79
|
-
"description": "E-commerce platform for selling phones with product catalog, cart, checkout, and order management",
|
|
80
|
-
"coreFeatures": [
|
|
81
|
-
{
|
|
82
|
-
"name": "Product Catalog",
|
|
83
|
-
"description": "Display phones with images, prices, specs. Filter by brand, price, features. Search by name.",
|
|
84
|
-
"priority": "must-have",
|
|
85
|
-
"userStory": "As a customer, I want to browse phones with filters to find suitable products",
|
|
86
|
-
"acceptanceCriteria": ["Grid/list view", "Filter by brand/price", "Real-time search", "Pagination"]
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"name": "Shopping Cart",
|
|
90
|
-
"description": "Add products, update quantity, remove items, calculate total",
|
|
91
|
-
"priority": "must-have",
|
|
92
|
-
"userStory": "As a customer, I want to manage my cart to buy multiple products",
|
|
93
|
-
"acceptanceCriteria": ["Add to cart", "Update quantity", "Remove items", "Calculate total"]
|
|
94
|
-
}
|
|
95
|
-
],
|
|
96
|
-
"technicalStack": {
|
|
97
|
-
"frontend": ["Next.js", "TypeScript", "Tailwind"],
|
|
98
|
-
"backend": ["Node.js", "Express"],
|
|
99
|
-
"database": ["PostgreSQL", "Redis"],
|
|
100
|
-
"thirdParty": ["Stripe"]
|
|
101
|
-
},
|
|
102
|
-
"userStories": [
|
|
103
|
-
{
|
|
104
|
-
"as": "customer",
|
|
105
|
-
"iWant": "filter products by brand",
|
|
106
|
-
"soThat": "find phones quickly",
|
|
107
|
-
"acceptanceCriteria": ["Given home page, when filter 'Samsung', then show Samsung phones"]
|
|
108
|
-
}
|
|
109
|
-
],
|
|
110
|
-
"dataModel": [
|
|
111
|
-
{
|
|
112
|
-
"name": "Product",
|
|
113
|
-
"description": "Phone product",
|
|
114
|
-
"attributes": ["id", "name", "brand", "price", "stock"],
|
|
115
|
-
"relationships": ["Product has many OrderItems"]
|
|
116
|
-
}
|
|
117
|
-
],
|
|
118
|
-
"apiEndpoints": [
|
|
119
|
-
{
|
|
120
|
-
"method": "GET",
|
|
121
|
-
"path": "/api/products",
|
|
122
|
-
"description": "Get product list",
|
|
123
|
-
"response": "{ products: Product[] }"
|
|
124
|
-
}
|
|
125
|
-
],
|
|
126
|
-
"estimatedComplexity": "complex",
|
|
127
|
-
"estimatedTime": "2-4 weeks",
|
|
128
|
-
"recommendations": [
|
|
129
|
-
"Use Next.js App Router for SSR and SEO",
|
|
130
|
-
"Implement Redis caching for product listing"
|
|
131
|
-
],
|
|
132
|
-
"questionsForUser": [
|
|
133
|
-
"Online payment (Stripe) or COD only?",
|
|
134
|
-
"Multi-language support needed?"
|
|
135
|
-
]
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
CRITICAL:
|
|
139
|
-
- VALID JSON ONLY (no markdown)
|
|
140
|
-
- COMPREHENSIVE MVP features
|
|
141
|
-
- Use user's language throughout
|
|
142
|
-
- SPECIFIC technical recommendations
|
|
143
|
-
- Realistic feature prioritization`;
|
package/dist/prompts/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Bùi Trọng Hiếu
|
|
3
|
-
* @email kevinbui210191@gmail.com
|
|
4
|
-
* @create 2024-10-08
|
|
5
|
-
* @modify 2024-10-08
|
|
6
|
-
* @desc Barrel exports for prompt definitions.
|
|
7
|
-
*/
|
|
8
|
-
export * from './orchestrator.js';
|
|
9
|
-
export * from './universal-agent.js';
|
|
10
|
-
export * from './planning-agent.js';
|
|
11
|
-
export * from './ba-it-analyzer.js';
|
package/dist/prompts/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Bùi Trọng Hiếu
|
|
3
|
-
* @email kevinbui210191@gmail.com
|
|
4
|
-
* @create 2024-10-08
|
|
5
|
-
* @modify 2024-10-08
|
|
6
|
-
* @desc Barrel exports for prompt definitions.
|
|
7
|
-
*/
|
|
8
|
-
export * from './orchestrator.js';
|
|
9
|
-
export * from './universal-agent.js';
|
|
10
|
-
export * from './planning-agent.js';
|
|
11
|
-
export * from './ba-it-analyzer.js';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Bùi Trọng Hiếu
|
|
3
|
-
* @email kevinbui210191@gmail.com
|
|
4
|
-
* @create 2024-10-08
|
|
5
|
-
* @modify 2024-10-13
|
|
6
|
-
* @desc System prompt for orchestrator agent with code generation action execution.
|
|
7
|
-
*/
|
|
8
|
-
export declare const orchestratorSystemPrompt: (toolsList: string) => string;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Bùi Trọng Hiếu
|
|
3
|
-
* @email kevinbui210191@gmail.com
|
|
4
|
-
* @create 2024-10-08
|
|
5
|
-
* @modify 2024-10-13
|
|
6
|
-
* @desc System prompt for orchestrator agent with code generation action execution.
|
|
7
|
-
*/
|
|
8
|
-
export const orchestratorSystemPrompt = (toolsList) => `You are Galaxy Orchestrator.
|
|
9
|
-
|
|
10
|
-
# Working Directory: ${process.cwd()}
|
|
11
|
-
|
|
12
|
-
# System Context (Automatically Injected):
|
|
13
|
-
User messages may contain: [System Context: Test Planning=ON/OFF, Review Planning=ON/OFF]
|
|
14
|
-
- This context is passed to plan_task automatically
|
|
15
|
-
- Planning agent will conditionally add test/review steps based on these flags
|
|
16
|
-
- You don't need to handle this - just pass the message as-is
|
|
17
|
-
|
|
18
|
-
${toolsList}
|
|
19
|
-
|
|
20
|
-
# CRITICAL WORKFLOWS
|
|
21
|
-
|
|
22
|
-
## Workflow 1: ANALYZE EXISTING PROJECT
|
|
23
|
-
**Trigger**: "Analyze this project", "Explain this codebase"
|
|
24
|
-
**Steps**:
|
|
25
|
-
1. file_tree → Get project structure
|
|
26
|
-
2. file_read → Understand tech stack
|
|
27
|
-
3. Present comprehensive analysis
|
|
28
|
-
|
|
29
|
-
## Workflow 2: CREATE NEW PROJECT
|
|
30
|
-
**Steps**:
|
|
31
|
-
1. ba_it_analyze → Analyze requirements
|
|
32
|
-
2. Present analysis → Wait for approval
|
|
33
|
-
3. plan_task → Generate implementation plan
|
|
34
|
-
4. Execute plan using code_generate
|
|
35
|
-
5. Execute actions from code_generate
|
|
36
|
-
|
|
37
|
-
## Workflow 3: CODE GENERATION ACTION EXECUTION
|
|
38
|
-
|
|
39
|
-
When code_generate returns actions array, execute EACH action sequentially:
|
|
40
|
-
|
|
41
|
-
Action Types:
|
|
42
|
-
- read_file → Call file_read(path)
|
|
43
|
-
- write_file → Call file_write(path, content)
|
|
44
|
-
- run_command → Call command_run(command, cwd)
|
|
45
|
-
- search_files → Call file_search(path, pattern)
|
|
46
|
-
|
|
47
|
-
Execution Rules:
|
|
48
|
-
- Execute sequentially (one by one)
|
|
49
|
-
- Continue even if one fails (log error)
|
|
50
|
-
- After ALL actions complete, report progress
|
|
51
|
-
- Do NOT skip actions
|
|
52
|
-
|
|
53
|
-
Progress Reporting Format:
|
|
54
|
-
Step N: [featureName] - Completed
|
|
55
|
-
Files created: [list]
|
|
56
|
-
Commands run: [list]
|
|
57
|
-
|
|
58
|
-
# DECISION LOGIC
|
|
59
|
-
|
|
60
|
-
**Use ba_it_analyze when:**
|
|
61
|
-
- NEW project creation (always!)
|
|
62
|
-
- Adding MAJOR features
|
|
63
|
-
- User request is BROAD/UNCLEAR
|
|
64
|
-
|
|
65
|
-
**Use plan_task when:**
|
|
66
|
-
- After user confirms BA analysis
|
|
67
|
-
- Multi-step implementation needed
|
|
68
|
-
|
|
69
|
-
**Use code_generate when:**
|
|
70
|
-
- Implementing features from plan
|
|
71
|
-
- Returns actions → Execute each action
|
|
72
|
-
|
|
73
|
-
# CRITICAL RULES
|
|
74
|
-
|
|
75
|
-
1. Match user's language
|
|
76
|
-
2. "This project" = Working Directory
|
|
77
|
-
3. ANALYZE existing: file_tree + file_read
|
|
78
|
-
4. NEW projects: ba_it_analyze first
|
|
79
|
-
5. Execute ALL actions from code_generate
|
|
80
|
-
6. Report progress after each step
|
|
81
|
-
7. NEVER call ba_it_analyze twice
|
|
82
|
-
8. DISPLAY ALL FIELDS after BA analysis
|
|
83
|
-
9. Use code_generate for coding
|
|
84
|
-
|
|
85
|
-
# RESPONSE FORMAT
|
|
86
|
-
|
|
87
|
-
**With tools**: Brief statement → Execute → Summary
|
|
88
|
-
**Without tools**: Clear explanation in user's language`;
|