didev 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +378 -0
- package/dist/agents/analyst.d.ts +21 -0
- package/dist/agents/analyst.d.ts.map +1 -0
- package/dist/agents/analyst.js +69 -0
- package/dist/agents/analyst.js.map +1 -0
- package/dist/agents/architect.d.ts +21 -0
- package/dist/agents/architect.d.ts.map +1 -0
- package/dist/agents/architect.js +85 -0
- package/dist/agents/architect.js.map +1 -0
- package/dist/agents/base-agent.d.ts +56 -0
- package/dist/agents/base-agent.d.ts.map +1 -0
- package/dist/agents/base-agent.js +263 -0
- package/dist/agents/base-agent.js.map +1 -0
- package/dist/agents/developer.d.ts +21 -0
- package/dist/agents/developer.d.ts.map +1 -0
- package/dist/agents/developer.js +87 -0
- package/dist/agents/developer.js.map +1 -0
- package/dist/agents/orchestrator.d.ts +23 -0
- package/dist/agents/orchestrator.d.ts.map +1 -0
- package/dist/agents/orchestrator.js +287 -0
- package/dist/agents/orchestrator.js.map +1 -0
- package/dist/agents/reviewer.d.ts +15 -0
- package/dist/agents/reviewer.d.ts.map +1 -0
- package/dist/agents/reviewer.js +65 -0
- package/dist/agents/reviewer.js.map +1 -0
- package/dist/agents/tester.d.ts +15 -0
- package/dist/agents/tester.d.ts.map +1 -0
- package/dist/agents/tester.js +64 -0
- package/dist/agents/tester.js.map +1 -0
- package/dist/bmad/method.d.ts +6 -0
- package/dist/bmad/method.d.ts.map +1 -0
- package/dist/bmad/method.js +221 -0
- package/dist/bmad/method.js.map +1 -0
- package/dist/cli/commands/agent.d.ts +10 -0
- package/dist/cli/commands/agent.d.ts.map +1 -0
- package/dist/cli/commands/agent.js +28 -0
- package/dist/cli/commands/agent.js.map +1 -0
- package/dist/cli/commands/chat.d.ts +6 -0
- package/dist/cli/commands/chat.d.ts.map +1 -0
- package/dist/cli/commands/chat.js +556 -0
- package/dist/cli/commands/chat.js.map +1 -0
- package/dist/cli/commands/config.d.ts +3 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +65 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/init.d.ts +8 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +204 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/mcp.d.ts +5 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -0
- package/dist/cli/commands/mcp.js +836 -0
- package/dist/cli/commands/mcp.js.map +1 -0
- package/dist/cli/commands/refactor.d.ts +8 -0
- package/dist/cli/commands/refactor.d.ts.map +1 -0
- package/dist/cli/commands/refactor.js +161 -0
- package/dist/cli/commands/refactor.js.map +1 -0
- package/dist/cli/commands/review.d.ts +9 -0
- package/dist/cli/commands/review.d.ts.map +1 -0
- package/dist/cli/commands/review.js +138 -0
- package/dist/cli/commands/review.js.map +1 -0
- package/dist/core/api.d.ts +73 -0
- package/dist/core/api.d.ts.map +1 -0
- package/dist/core/api.js +206 -0
- package/dist/core/api.js.map +1 -0
- package/dist/core/config.d.ts +42 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +180 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/context.d.ts +33 -0
- package/dist/core/context.d.ts.map +1 -0
- package/dist/core/context.js +235 -0
- package/dist/core/context.js.map +1 -0
- package/dist/core/file-manager.d.ts +20 -0
- package/dist/core/file-manager.d.ts.map +1 -0
- package/dist/core/file-manager.js +133 -0
- package/dist/core/file-manager.js.map +1 -0
- package/dist/core/mcp.d.ts +31 -0
- package/dist/core/mcp.d.ts.map +1 -0
- package/dist/core/mcp.js +112 -0
- package/dist/core/mcp.js.map +1 -0
- package/dist/core/session.d.ts +16 -0
- package/dist/core/session.d.ts.map +1 -0
- package/dist/core/session.js +60 -0
- package/dist/core/session.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +237 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/banner.d.ts +2 -0
- package/dist/utils/banner.d.ts.map +1 -0
- package/dist/utils/banner.js +50 -0
- package/dist/utils/banner.js.map +1 -0
- package/dist/utils/git.d.ts +9 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +49 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/logger.d.ts +42 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +98 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/resilience.d.ts +17 -0
- package/dist/utils/resilience.d.ts.map +1 -0
- package/dist/utils/resilience.js +41 -0
- package/dist/utils/resilience.js.map +1 -0
- package/dist/utils/token-counter.d.ts +7 -0
- package/dist/utils/token-counter.d.ts.map +1 -0
- package/dist/utils/token-counter.js +20 -0
- package/dist/utils/token-counter.js.map +1 -0
- package/package.json +62 -0
- package/scripts/postinstall.mjs +54 -0
- package/scripts/setup-path.sh +42 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { readProjectFile, writeProjectFile } from '../core/file-manager.js';
|
|
3
|
+
import { logger } from '../utils/logger.js';
|
|
4
|
+
import { getMcpManager } from '../core/mcp.js';
|
|
5
|
+
import { getDiff } from '../utils/git.js';
|
|
6
|
+
import { glob } from 'glob';
|
|
7
|
+
import { readFile } from 'fs/promises';
|
|
8
|
+
import { join } from 'path';
|
|
9
|
+
export const AGENT_TOOLS = [
|
|
10
|
+
{
|
|
11
|
+
type: 'function',
|
|
12
|
+
function: {
|
|
13
|
+
name: 'read_file',
|
|
14
|
+
description: 'Read contents of a project file',
|
|
15
|
+
parameters: {
|
|
16
|
+
type: 'object',
|
|
17
|
+
properties: {
|
|
18
|
+
path: { type: 'string', description: 'Relative file path' },
|
|
19
|
+
},
|
|
20
|
+
required: ['path'],
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
type: 'function',
|
|
26
|
+
function: {
|
|
27
|
+
name: 'write_file',
|
|
28
|
+
description: 'Create or update a project file',
|
|
29
|
+
parameters: {
|
|
30
|
+
type: 'object',
|
|
31
|
+
properties: {
|
|
32
|
+
path: { type: 'string', description: 'Relative file path' },
|
|
33
|
+
content: { type: 'string', description: 'Complete file content' },
|
|
34
|
+
description: { type: 'string', description: 'What this file does' },
|
|
35
|
+
},
|
|
36
|
+
required: ['path', 'content'],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: 'function',
|
|
42
|
+
function: {
|
|
43
|
+
name: 'list_files',
|
|
44
|
+
description: 'List files matching a glob pattern',
|
|
45
|
+
parameters: {
|
|
46
|
+
type: 'object',
|
|
47
|
+
properties: {
|
|
48
|
+
pattern: { type: 'string', description: 'Glob pattern (e.g. src/**/*.ts)' },
|
|
49
|
+
},
|
|
50
|
+
required: ['pattern'],
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
type: 'function',
|
|
56
|
+
function: {
|
|
57
|
+
name: 'search_code',
|
|
58
|
+
description: 'Search for text across project files',
|
|
59
|
+
parameters: {
|
|
60
|
+
type: 'object',
|
|
61
|
+
properties: {
|
|
62
|
+
query: { type: 'string', description: 'Text to search for' },
|
|
63
|
+
pattern: { type: 'string', description: 'File pattern to search in' },
|
|
64
|
+
},
|
|
65
|
+
required: ['query'],
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
type: 'function',
|
|
71
|
+
function: {
|
|
72
|
+
name: 'git_diff',
|
|
73
|
+
description: 'Get git diff to see recent changes',
|
|
74
|
+
parameters: {
|
|
75
|
+
type: 'object',
|
|
76
|
+
properties: {
|
|
77
|
+
base: { type: 'string', description: 'Base ref (default: HEAD)' },
|
|
78
|
+
},
|
|
79
|
+
required: [],
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
];
|
|
84
|
+
export class BaseAgent {
|
|
85
|
+
pendingWrites = new Map();
|
|
86
|
+
async run(options) {
|
|
87
|
+
const start = Date.now();
|
|
88
|
+
const { client, model, projectContext, rootDir, task, previousResults, dryRun } = options;
|
|
89
|
+
logger.agentHeader(this.emoji + ' ' + this.name, this.role);
|
|
90
|
+
const spinner = logger.spinner({ text: chalk.gray('Working...'), color: 'magenta' }).start();
|
|
91
|
+
const systemPrompt = this.buildSystemPrompt(projectContext, task);
|
|
92
|
+
const userMessage = this.buildUserMessage(task, previousResults);
|
|
93
|
+
const messages = [
|
|
94
|
+
{ role: 'system', content: systemPrompt },
|
|
95
|
+
{ role: 'user', content: userMessage },
|
|
96
|
+
];
|
|
97
|
+
let output = '';
|
|
98
|
+
const fileChanges = [];
|
|
99
|
+
// In dry-run mode writes go here; otherwise they are applied immediately
|
|
100
|
+
const pendingWrites = new Map();
|
|
101
|
+
// Merge built-in agent tools with any connected MCP tools
|
|
102
|
+
const mcp = getMcpManager();
|
|
103
|
+
const allTools = [...AGENT_TOOLS, ...mcp.tools];
|
|
104
|
+
try {
|
|
105
|
+
const { messages: finalMsgs, finalContent } = await client.runToolLoop(messages, allTools, async (name, args) => {
|
|
106
|
+
if (mcp.isMcpTool(name))
|
|
107
|
+
return mcp.call(name, args);
|
|
108
|
+
return this.executeToolCall(name, args, rootDir, fileChanges, dryRun ? pendingWrites : undefined);
|
|
109
|
+
}, model, { temperature: 0.3 }, options.maxRounds ?? 10);
|
|
110
|
+
output = finalContent;
|
|
111
|
+
spinner.stop();
|
|
112
|
+
// Display output
|
|
113
|
+
logger.newline();
|
|
114
|
+
console.log(chalk.white(output));
|
|
115
|
+
logger.newline();
|
|
116
|
+
// Show file changes summary (written files)
|
|
117
|
+
if (fileChanges.length > 0) {
|
|
118
|
+
logger.dim(` Создано/изменено ${fileChanges.length} файл(ов):`);
|
|
119
|
+
for (const fc of fileChanges) {
|
|
120
|
+
logger.step('✓', chalk.green(` ${fc.path}`) + chalk.gray(fc.description ? ` — ${fc.description}` : ''));
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
// Show pending writes summary (dry-run mode)
|
|
124
|
+
if (pendingWrites.size > 0) {
|
|
125
|
+
logger.dim(` Ожидают записи (dry-run): ${pendingWrites.size} файл(ов)`);
|
|
126
|
+
for (const [path] of pendingWrites) {
|
|
127
|
+
logger.step('○', chalk.yellow(` ${path}`));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
void finalMsgs;
|
|
131
|
+
}
|
|
132
|
+
catch (e) {
|
|
133
|
+
spinner.fail(chalk.red(`${this.name} завершился с ошибкой: ${e.message}`));
|
|
134
|
+
throw e;
|
|
135
|
+
}
|
|
136
|
+
const artifacts = this.extractArtifacts(output);
|
|
137
|
+
return {
|
|
138
|
+
agentName: this.name,
|
|
139
|
+
role: this.role,
|
|
140
|
+
emoji: this.emoji,
|
|
141
|
+
output,
|
|
142
|
+
artifacts,
|
|
143
|
+
fileChanges,
|
|
144
|
+
pendingWrites,
|
|
145
|
+
duration: Date.now() - start,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
buildUserMessage(task, previousResults) {
|
|
149
|
+
let msg = `Task: ${task}`;
|
|
150
|
+
if (previousResults && previousResults.length > 0) {
|
|
151
|
+
msg += '\n\n## Previous Agent Outputs\n';
|
|
152
|
+
for (const r of previousResults) {
|
|
153
|
+
msg += `\n### ${r.agentName} (${r.role})\n${r.output.slice(0, 40_000)}\n`;
|
|
154
|
+
if (r.fileChanges.length > 0) {
|
|
155
|
+
msg += `\nFiles created: ${r.fileChanges.map(f => f.path).join(', ')}\n`;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return msg;
|
|
160
|
+
}
|
|
161
|
+
async executeToolCall(name, args, rootDir, fileChanges, pendingWrites) {
|
|
162
|
+
switch (name) {
|
|
163
|
+
case 'read_file': {
|
|
164
|
+
try {
|
|
165
|
+
const content = await readProjectFile(String(args['path']), rootDir);
|
|
166
|
+
return content.slice(0, 400_000);
|
|
167
|
+
}
|
|
168
|
+
catch (e) {
|
|
169
|
+
return `Error: ${e.message}`;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
case 'write_file': {
|
|
173
|
+
const path = String(args['path']);
|
|
174
|
+
const content = String(args['content']);
|
|
175
|
+
const description = args['description'] ? String(args['description']) : undefined;
|
|
176
|
+
if (pendingWrites) {
|
|
177
|
+
// Dry-run: queue for later confirmation
|
|
178
|
+
pendingWrites.set(path, { content, description });
|
|
179
|
+
return `File ${path} queued for writing (dry-run mode)`;
|
|
180
|
+
}
|
|
181
|
+
try {
|
|
182
|
+
await writeProjectFile(path, content, rootDir);
|
|
183
|
+
fileChanges.push({ path, content, description });
|
|
184
|
+
return `File ${path} written successfully`;
|
|
185
|
+
}
|
|
186
|
+
catch (e) {
|
|
187
|
+
return `Error writing ${path}: ${e.message}`;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
case 'list_files': {
|
|
191
|
+
try {
|
|
192
|
+
const pattern = String(args['pattern'] ?? '**/*');
|
|
193
|
+
const files = await glob(pattern, {
|
|
194
|
+
cwd: rootDir,
|
|
195
|
+
ignore: ['node_modules/**', 'dist/**', '.git/**'],
|
|
196
|
+
});
|
|
197
|
+
return files.slice(0, 100).join('\n') || 'No files found';
|
|
198
|
+
}
|
|
199
|
+
catch (e) {
|
|
200
|
+
return `Error: ${e.message}`;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
case 'search_code': {
|
|
204
|
+
const query = String(args['query']);
|
|
205
|
+
const filePattern = String(args['pattern'] ?? '**/*.{ts,tsx,js,jsx,py,go}');
|
|
206
|
+
try {
|
|
207
|
+
const files = await glob(filePattern, {
|
|
208
|
+
cwd: rootDir,
|
|
209
|
+
ignore: ['node_modules/**', 'dist/**', '.git/**'],
|
|
210
|
+
});
|
|
211
|
+
const results = [];
|
|
212
|
+
for (const f of files.slice(0, 50)) {
|
|
213
|
+
try {
|
|
214
|
+
const content = await readFile(join(rootDir, f), 'utf-8');
|
|
215
|
+
const lines = content.split('\n');
|
|
216
|
+
for (let i = 0; i < lines.length; i++) {
|
|
217
|
+
if (lines[i].includes(query)) {
|
|
218
|
+
results.push(`${f}:${i + 1}: ${lines[i].trim()}`);
|
|
219
|
+
if (results.length >= 50)
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
catch { /* skip */ }
|
|
225
|
+
}
|
|
226
|
+
return results.join('\n') || 'No matches found';
|
|
227
|
+
}
|
|
228
|
+
catch (e) {
|
|
229
|
+
return `Error: ${e.message}`;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
case 'git_diff': {
|
|
233
|
+
try {
|
|
234
|
+
const base = String(args['base'] ?? 'HEAD');
|
|
235
|
+
const diff = await getDiff(base, rootDir);
|
|
236
|
+
return diff.slice(0, 400_000) || 'No changes';
|
|
237
|
+
}
|
|
238
|
+
catch (e) {
|
|
239
|
+
return `Git not available or no changes: ${e.message}`;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
default:
|
|
243
|
+
return `Unknown tool: ${name}`;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
extractArtifacts(output) {
|
|
247
|
+
const artifacts = [];
|
|
248
|
+
// Extract markdown sections as artifacts
|
|
249
|
+
const sections = output.match(/#{1,3}\s+(.+)\n([\s\S]+?)(?=#{1,3}\s|$)/g) ?? [];
|
|
250
|
+
for (const section of sections.slice(0, 5)) {
|
|
251
|
+
const titleMatch = section.match(/#{1,3}\s+(.+)/);
|
|
252
|
+
if (titleMatch) {
|
|
253
|
+
artifacts.push({
|
|
254
|
+
type: 'analysis',
|
|
255
|
+
title: titleMatch[1].trim(),
|
|
256
|
+
content: section,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return artifacts;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
//# sourceMappingURL=base-agent.js.map
|
|
@@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;gBACE,OAAO,iBAAiB,IAAI,EAAE,CAAC;QACnC,CAAC;IACH,CAAC;IAES,gBAAgB,CAAC,MAAc;QACvC,MAAM,SAAS,GAAoB,EAAE,CAAC;QAEtC,yCAAyC;QACzC,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,0CAA0C,CAAC,IAAI,EAAE,CAAC;QAChF,KAAK,MAAM,OAAO,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;YAC3C,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YAClD,IAAI,UAAU,EAAE,CAAC;gBACf,SAAS,CAAC,IAAI,CAAC;oBACb,IAAI,EAAE,UAAU;oBAChB,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;oBAC3B,OAAO,EAAE,OAAO;iBACjB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseAgent } from './base-agent.js';
|
|
2
|
+
import type { ProjectContext } from '../core/context.js';
|
|
3
|
+
export declare class DeveloperAgent extends BaseAgent {
|
|
4
|
+
readonly name = "Developer";
|
|
5
|
+
readonly role = "Code Implementation";
|
|
6
|
+
readonly emoji = "\uD83D\uDCBB";
|
|
7
|
+
protected buildSystemPrompt(ctx: ProjectContext): string;
|
|
8
|
+
}
|
|
9
|
+
export declare class FrontendDeveloperAgent extends BaseAgent {
|
|
10
|
+
readonly name = "Frontend Developer";
|
|
11
|
+
readonly role = "Component & Feature Implementation";
|
|
12
|
+
readonly emoji = "\uD83D\uDCBB";
|
|
13
|
+
protected buildSystemPrompt(ctx: ProjectContext): string;
|
|
14
|
+
}
|
|
15
|
+
export declare class BackendDeveloperAgent extends BaseAgent {
|
|
16
|
+
readonly name = "Backend Developer";
|
|
17
|
+
readonly role = "API & Business Logic Implementation";
|
|
18
|
+
readonly emoji = "\uD83D\uDCBB";
|
|
19
|
+
protected buildSystemPrompt(ctx: ProjectContext): string;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=developer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"developer.d.ts","sourceRoot":"","sources":["../../src/agents/developer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGzD,qBAAa,cAAe,SAAQ,SAAS;IAC3C,QAAQ,CAAC,IAAI,eAAe;IAC5B,QAAQ,CAAC,IAAI,yBAAyB;IACtC,QAAQ,CAAC,KAAK,kBAAQ;IAEtB,SAAS,CAAC,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM;CAsBzD;AAED,qBAAa,sBAAuB,SAAQ,SAAS;IACnD,QAAQ,CAAC,IAAI,wBAAwB;IACrC,QAAQ,CAAC,IAAI,wCAAwC;IACrD,QAAQ,CAAC,KAAK,kBAAQ;IAEtB,SAAS,CAAC,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM;CAuBzD;AAED,qBAAa,qBAAsB,SAAQ,SAAS;IAClD,QAAQ,CAAC,IAAI,uBAAuB;IACpC,QAAQ,CAAC,IAAI,yCAAyC;IACtD,QAAQ,CAAC,KAAK,kBAAQ;IAEtB,SAAS,CAAC,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM;CAwBzD"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { BaseAgent } from './base-agent.js';
|
|
2
|
+
import { contextToSystemPrompt } from '../core/context.js';
|
|
3
|
+
export class DeveloperAgent extends BaseAgent {
|
|
4
|
+
name = 'Developer';
|
|
5
|
+
role = 'Code Implementation';
|
|
6
|
+
emoji = '💻';
|
|
7
|
+
buildSystemPrompt(ctx) {
|
|
8
|
+
return `You are an expert ${ctx.language} developer working on a ${ctx.type} project using ${ctx.framework}.
|
|
9
|
+
|
|
10
|
+
${contextToSystemPrompt(ctx)}
|
|
11
|
+
|
|
12
|
+
Your responsibilities:
|
|
13
|
+
1. Implement the code based on the architect's design
|
|
14
|
+
2. Follow the project's existing patterns and conventions
|
|
15
|
+
3. Write clean, type-safe, production-ready code
|
|
16
|
+
4. Add proper error handling and logging
|
|
17
|
+
5. Ensure all files integrate correctly with existing codebase
|
|
18
|
+
|
|
19
|
+
Rules:
|
|
20
|
+
- Use the write_file tool to actually create/modify files
|
|
21
|
+
- Read existing files before modifying them to understand current patterns
|
|
22
|
+
- Use TypeScript types properly (no 'any' unless absolutely necessary)
|
|
23
|
+
- Follow the existing file/folder naming conventions
|
|
24
|
+
- Add imports for all dependencies
|
|
25
|
+
- Do NOT add comments explaining what code does — only add comments for non-obvious WHY
|
|
26
|
+
|
|
27
|
+
Implement ALL files identified in the architecture. Use write_file for each file.`;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export class FrontendDeveloperAgent extends BaseAgent {
|
|
31
|
+
name = 'Frontend Developer';
|
|
32
|
+
role = 'Component & Feature Implementation';
|
|
33
|
+
emoji = '💻';
|
|
34
|
+
buildSystemPrompt(ctx) {
|
|
35
|
+
return `You are an expert Frontend Developer specializing in ${ctx.framework} and ${ctx.language}.
|
|
36
|
+
|
|
37
|
+
${contextToSystemPrompt(ctx)}
|
|
38
|
+
|
|
39
|
+
Your responsibilities:
|
|
40
|
+
1. Implement React/Vue/Svelte components
|
|
41
|
+
2. Implement custom hooks and utilities
|
|
42
|
+
3. Implement state management (Context, stores, etc.)
|
|
43
|
+
4. Add proper TypeScript types for all props and state
|
|
44
|
+
5. Implement responsive design with CSS/Tailwind
|
|
45
|
+
6. Handle loading states, error states, and edge cases
|
|
46
|
+
|
|
47
|
+
Rules:
|
|
48
|
+
- Use write_file to create ALL component files
|
|
49
|
+
- Read existing components to match the project's style
|
|
50
|
+
- Use the project's existing UI component library if present
|
|
51
|
+
- Follow accessibility best practices
|
|
52
|
+
- Keep components focused and composable
|
|
53
|
+
- Handle all edge cases (empty state, loading, error)
|
|
54
|
+
|
|
55
|
+
Create production-ready components that work immediately.`;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export class BackendDeveloperAgent extends BaseAgent {
|
|
59
|
+
name = 'Backend Developer';
|
|
60
|
+
role = 'API & Business Logic Implementation';
|
|
61
|
+
emoji = '💻';
|
|
62
|
+
buildSystemPrompt(ctx) {
|
|
63
|
+
return `You are an expert Backend Developer specializing in ${ctx.framework} and ${ctx.language}.
|
|
64
|
+
|
|
65
|
+
${contextToSystemPrompt(ctx)}
|
|
66
|
+
|
|
67
|
+
Your responsibilities:
|
|
68
|
+
1. Implement controllers/route handlers
|
|
69
|
+
2. Implement service layer with business logic
|
|
70
|
+
3. Implement data access layer (repositories, queries)
|
|
71
|
+
4. Implement input validation (Zod, Joi, class-validator)
|
|
72
|
+
5. Proper error handling with status codes
|
|
73
|
+
6. Implement middleware if needed
|
|
74
|
+
7. Write database migrations if applicable
|
|
75
|
+
|
|
76
|
+
Rules:
|
|
77
|
+
- Use write_file to create all implementation files
|
|
78
|
+
- Read existing code for patterns (how routes are registered, how errors are handled)
|
|
79
|
+
- Validate all inputs at the API boundary
|
|
80
|
+
- Use proper HTTP status codes
|
|
81
|
+
- Handle all error cases gracefully
|
|
82
|
+
- Return consistent response shapes
|
|
83
|
+
|
|
84
|
+
Create production-ready, secure backend code.`;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=developer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"developer.js","sourceRoot":"","sources":["../../src/agents/developer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,MAAM,OAAO,cAAe,SAAQ,SAAS;IAClC,IAAI,GAAG,WAAW,CAAC;IACnB,IAAI,GAAG,qBAAqB,CAAC;IAC7B,KAAK,GAAG,IAAI,CAAC;IAEZ,iBAAiB,CAAC,GAAmB;QAC7C,OAAO,qBAAqB,GAAG,CAAC,QAAQ,2BAA2B,GAAG,CAAC,IAAI,kBAAkB,GAAG,CAAC,SAAS;;EAE5G,qBAAqB,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;kFAiBsD,CAAC;IACjF,CAAC;CACF;AAED,MAAM,OAAO,sBAAuB,SAAQ,SAAS;IAC1C,IAAI,GAAG,oBAAoB,CAAC;IAC5B,IAAI,GAAG,oCAAoC,CAAC;IAC5C,KAAK,GAAG,IAAI,CAAC;IAEZ,iBAAiB,CAAC,GAAmB;QAC7C,OAAO,wDAAwD,GAAG,CAAC,SAAS,QAAQ,GAAG,CAAC,QAAQ;;EAElG,qBAAqB,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;0DAkB8B,CAAC;IACzD,CAAC;CACF;AAED,MAAM,OAAO,qBAAsB,SAAQ,SAAS;IACzC,IAAI,GAAG,mBAAmB,CAAC;IAC3B,IAAI,GAAG,qCAAqC,CAAC;IAC7C,KAAK,GAAG,IAAI,CAAC;IAEZ,iBAAiB,CAAC,GAAmB;QAC7C,OAAO,uDAAuD,GAAG,CAAC,SAAS,QAAQ,GAAG,CAAC,QAAQ;;EAEjG,qBAAqB,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;8CAmBkB,CAAC;IAC7C,CAAC;CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AgentResult } from './base-agent.js';
|
|
2
|
+
export type AgentFamily = 'frontend' | 'backend' | 'fullstack' | 'auto';
|
|
3
|
+
export type OrchestrationMode = 'full' | 'light' | 'developer-only';
|
|
4
|
+
export interface OrchestrationOptions {
|
|
5
|
+
task: string;
|
|
6
|
+
family?: AgentFamily;
|
|
7
|
+
mode?: OrchestrationMode;
|
|
8
|
+
model?: string;
|
|
9
|
+
rootDir?: string;
|
|
10
|
+
skipAgents?: string[];
|
|
11
|
+
/** When true, agents queue writes and ask for confirmation before applying (default: true) */
|
|
12
|
+
confirmWrites?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface OrchestrationResult {
|
|
15
|
+
task: string;
|
|
16
|
+
agentResults: AgentResult[];
|
|
17
|
+
totalDuration: number;
|
|
18
|
+
filesCreated: string[];
|
|
19
|
+
filesModified: string[];
|
|
20
|
+
summary: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function runOrchestration(options: OrchestrationOptions): Promise<OrchestrationResult>;
|
|
23
|
+
//# sourceMappingURL=orchestrator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/agents/orchestrator.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,iBAAiB,CAAC;AAWjE,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,CAAC;AACxE,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,OAAO,GAAG,gBAAgB,CAAC;AAKpE,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,8FAA8F;IAC9F,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB;AAoFD,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAqIlG"}
|