@backendkit-labs/agent-coding 0.14.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/dist/agents/AgentLoader.d.ts +33 -0
- package/dist/agents/AgentLoader.d.ts.map +1 -0
- package/dist/agents/AgentLoader.js +167 -0
- package/dist/agents/AgentLoader.js.map +1 -0
- package/dist/agents/profiles.d.ts +3 -0
- package/dist/agents/profiles.d.ts.map +1 -0
- package/dist/agents/profiles.js +121 -0
- package/dist/agents/profiles.js.map +1 -0
- package/dist/agents/prompts/architecture.d.ts +2 -0
- package/dist/agents/prompts/architecture.d.ts.map +1 -0
- package/dist/agents/prompts/architecture.js +151 -0
- package/dist/agents/prompts/architecture.js.map +1 -0
- package/dist/agents/prompts/backend.d.ts +2 -0
- package/dist/agents/prompts/backend.d.ts.map +1 -0
- package/dist/agents/prompts/backend.js +96 -0
- package/dist/agents/prompts/backend.js.map +1 -0
- package/dist/agents/prompts/coder.d.ts +2 -0
- package/dist/agents/prompts/coder.d.ts.map +1 -0
- package/dist/agents/prompts/coder.js +50 -0
- package/dist/agents/prompts/coder.js.map +1 -0
- package/dist/agents/prompts/data.d.ts +2 -0
- package/dist/agents/prompts/data.d.ts.map +1 -0
- package/dist/agents/prompts/data.js +123 -0
- package/dist/agents/prompts/data.js.map +1 -0
- package/dist/agents/prompts/frontend.d.ts +2 -0
- package/dist/agents/prompts/frontend.d.ts.map +1 -0
- package/dist/agents/prompts/frontend.js +91 -0
- package/dist/agents/prompts/frontend.js.map +1 -0
- package/dist/agents/prompts/general.d.ts +2 -0
- package/dist/agents/prompts/general.d.ts.map +1 -0
- package/dist/agents/prompts/general.js +93 -0
- package/dist/agents/prompts/general.js.map +1 -0
- package/dist/agents/prompts/infrastructure.d.ts +2 -0
- package/dist/agents/prompts/infrastructure.d.ts.map +1 -0
- package/dist/agents/prompts/infrastructure.js +145 -0
- package/dist/agents/prompts/infrastructure.js.map +1 -0
- package/dist/agents/prompts/project-manager.d.ts +2 -0
- package/dist/agents/prompts/project-manager.d.ts.map +1 -0
- package/dist/agents/prompts/project-manager.js +66 -0
- package/dist/agents/prompts/project-manager.js.map +1 -0
- package/dist/agents/prompts/qa.d.ts +2 -0
- package/dist/agents/prompts/qa.d.ts.map +1 -0
- package/dist/agents/prompts/qa.js +166 -0
- package/dist/agents/prompts/qa.js.map +1 -0
- package/dist/agents/prompts/security.d.ts +2 -0
- package/dist/agents/prompts/security.d.ts.map +1 -0
- package/dist/agents/prompts/security.js +129 -0
- package/dist/agents/prompts/security.js.map +1 -0
- package/dist/config/ConfigLoader.d.ts +27 -0
- package/dist/config/ConfigLoader.d.ts.map +1 -0
- package/dist/config/ConfigLoader.js +167 -0
- package/dist/config/ConfigLoader.js.map +1 -0
- package/dist/index.d.ts +160 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +340 -0
- package/dist/index.js.map +1 -0
- package/dist/orchestration/capability-matrix.d.ts +10 -0
- package/dist/orchestration/capability-matrix.d.ts.map +1 -0
- package/dist/orchestration/capability-matrix.js +48 -0
- package/dist/orchestration/capability-matrix.js.map +1 -0
- package/dist/providers/AnthropicProvider.d.ts +20 -0
- package/dist/providers/AnthropicProvider.d.ts.map +1 -0
- package/dist/providers/AnthropicProvider.js +185 -0
- package/dist/providers/AnthropicProvider.js.map +1 -0
- package/dist/providers/DeepSeekProvider.d.ts +11 -0
- package/dist/providers/DeepSeekProvider.d.ts.map +1 -0
- package/dist/providers/DeepSeekProvider.js +18 -0
- package/dist/providers/DeepSeekProvider.js.map +1 -0
- package/dist/providers/OpenAICompatibleProvider.d.ts +22 -0
- package/dist/providers/OpenAICompatibleProvider.d.ts.map +1 -0
- package/dist/providers/OpenAICompatibleProvider.js +124 -0
- package/dist/providers/OpenAICompatibleProvider.js.map +1 -0
- package/dist/skills/builtins/global.d.ts +7 -0
- package/dist/skills/builtins/global.d.ts.map +1 -0
- package/dist/skills/builtins/global.js +208 -0
- package/dist/skills/builtins/global.js.map +1 -0
- package/dist/skills/builtins/go-pack.d.ts +7 -0
- package/dist/skills/builtins/go-pack.d.ts.map +1 -0
- package/dist/skills/builtins/go-pack.js +263 -0
- package/dist/skills/builtins/go-pack.js.map +1 -0
- package/dist/skills/builtins/java-pack.d.ts +7 -0
- package/dist/skills/builtins/java-pack.d.ts.map +1 -0
- package/dist/skills/builtins/java-pack.js +272 -0
- package/dist/skills/builtins/java-pack.js.map +1 -0
- package/dist/skills/builtins/kotlin-pack.d.ts +9 -0
- package/dist/skills/builtins/kotlin-pack.d.ts.map +1 -0
- package/dist/skills/builtins/kotlin-pack.js +292 -0
- package/dist/skills/builtins/kotlin-pack.js.map +1 -0
- package/dist/skills/builtins/node-pack.d.ts +7 -0
- package/dist/skills/builtins/node-pack.d.ts.map +1 -0
- package/dist/skills/builtins/node-pack.js +750 -0
- package/dist/skills/builtins/node-pack.js.map +1 -0
- package/dist/skills/builtins/python-pack.d.ts +7 -0
- package/dist/skills/builtins/python-pack.d.ts.map +1 -0
- package/dist/skills/builtins/python-pack.js +303 -0
- package/dist/skills/builtins/python-pack.js.map +1 -0
- package/dist/skills/index.d.ts +7 -0
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js +16 -0
- package/dist/skills/index.js.map +1 -0
- package/dist/store/LearningRouter.d.ts +17 -0
- package/dist/store/LearningRouter.d.ts.map +1 -0
- package/dist/store/LearningRouter.js +165 -0
- package/dist/store/LearningRouter.js.map +1 -0
- package/dist/store/PersistentMemory.d.ts +10 -0
- package/dist/store/PersistentMemory.d.ts.map +1 -0
- package/dist/store/PersistentMemory.js +29 -0
- package/dist/store/PersistentMemory.js.map +1 -0
- package/dist/store/ProjectStore.d.ts +29 -0
- package/dist/store/ProjectStore.d.ts.map +1 -0
- package/dist/store/ProjectStore.js +191 -0
- package/dist/store/ProjectStore.js.map +1 -0
- package/dist/store/__tests__/PersistentMemory.test.d.ts +2 -0
- package/dist/store/__tests__/PersistentMemory.test.d.ts.map +1 -0
- package/dist/store/__tests__/PersistentMemory.test.js +46 -0
- package/dist/store/__tests__/PersistentMemory.test.js.map +1 -0
- package/dist/tools/__tests__/file-tools.test.d.ts +2 -0
- package/dist/tools/__tests__/file-tools.test.d.ts.map +1 -0
- package/dist/tools/__tests__/file-tools.test.js +144 -0
- package/dist/tools/__tests__/file-tools.test.js.map +1 -0
- package/dist/tools/__tests__/path-sandbox.test.d.ts +2 -0
- package/dist/tools/__tests__/path-sandbox.test.d.ts.map +1 -0
- package/dist/tools/__tests__/path-sandbox.test.js +45 -0
- package/dist/tools/__tests__/path-sandbox.test.js.map +1 -0
- package/dist/tools/__tests__/run-command.test.d.ts +2 -0
- package/dist/tools/__tests__/run-command.test.d.ts.map +1 -0
- package/dist/tools/__tests__/run-command.test.js +61 -0
- package/dist/tools/__tests__/run-command.test.js.map +1 -0
- package/dist/tools/append-log.d.ts +2 -0
- package/dist/tools/append-log.d.ts.map +1 -0
- package/dist/tools/append-log.js +3 -0
- package/dist/tools/append-log.js.map +1 -0
- package/dist/tools/edit-file.d.ts +2 -0
- package/dist/tools/edit-file.d.ts.map +1 -0
- package/dist/tools/edit-file.js +45 -0
- package/dist/tools/edit-file.js.map +1 -0
- package/dist/tools/list-directory.d.ts +2 -0
- package/dist/tools/list-directory.d.ts.map +1 -0
- package/dist/tools/list-directory.js +47 -0
- package/dist/tools/list-directory.js.map +1 -0
- package/dist/tools/path-sandbox.d.ts +31 -0
- package/dist/tools/path-sandbox.d.ts.map +1 -0
- package/dist/tools/path-sandbox.js +99 -0
- package/dist/tools/path-sandbox.js.map +1 -0
- package/dist/tools/read-file.d.ts +2 -0
- package/dist/tools/read-file.d.ts.map +1 -0
- package/dist/tools/read-file.js +28 -0
- package/dist/tools/read-file.js.map +1 -0
- package/dist/tools/run-command.d.ts +2 -0
- package/dist/tools/run-command.d.ts.map +1 -0
- package/dist/tools/run-command.js +192 -0
- package/dist/tools/run-command.js.map +1 -0
- package/dist/tools/save-audit.d.ts +4 -0
- package/dist/tools/save-audit.d.ts.map +1 -0
- package/dist/tools/save-audit.js +42 -0
- package/dist/tools/save-audit.js.map +1 -0
- package/dist/tools/save-context.d.ts +2 -0
- package/dist/tools/save-context.d.ts.map +1 -0
- package/dist/tools/save-context.js +18 -0
- package/dist/tools/save-context.js.map +1 -0
- package/dist/tools/save-learning.d.ts +2 -0
- package/dist/tools/save-learning.d.ts.map +1 -0
- package/dist/tools/save-learning.js +41 -0
- package/dist/tools/save-learning.js.map +1 -0
- package/dist/tools/save-user-preference.d.ts +3 -0
- package/dist/tools/save-user-preference.d.ts.map +1 -0
- package/dist/tools/save-user-preference.js +22 -0
- package/dist/tools/save-user-preference.js.map +1 -0
- package/dist/tools/search-files.d.ts +2 -0
- package/dist/tools/search-files.d.ts.map +1 -0
- package/dist/tools/search-files.js +170 -0
- package/dist/tools/search-files.js.map +1 -0
- package/dist/tools/secret-scanner.d.ts +15 -0
- package/dist/tools/secret-scanner.d.ts.map +1 -0
- package/dist/tools/secret-scanner.js +44 -0
- package/dist/tools/secret-scanner.js.map +1 -0
- package/dist/tools/update-session.d.ts +3 -0
- package/dist/tools/update-session.d.ts.map +1 -0
- package/dist/tools/update-session.js +49 -0
- package/dist/tools/update-session.js.map +1 -0
- package/dist/tools/write-file.d.ts +2 -0
- package/dist/tools/write-file.d.ts.map +1 -0
- package/dist/tools/write-file.js +32 -0
- package/dist/tools/write-file.js.map +1 -0
- package/dist/workflows/InitWorkflow.d.ts +6 -0
- package/dist/workflows/InitWorkflow.d.ts.map +1 -0
- package/dist/workflows/InitWorkflow.js +448 -0
- package/dist/workflows/InitWorkflow.js.map +1 -0
- package/dist/workflows/__tests__/InitWorkflow.test.d.ts +2 -0
- package/dist/workflows/__tests__/InitWorkflow.test.d.ts.map +1 -0
- package/dist/workflows/__tests__/InitWorkflow.test.js +43 -0
- package/dist/workflows/__tests__/InitWorkflow.test.js.map +1 -0
- package/package.json +34 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { AgentProfile } from '@backendkit-labs/agent-core';
|
|
2
|
+
export interface AgentLoaderOptions {
|
|
3
|
+
appName?: string;
|
|
4
|
+
cwd?: string;
|
|
5
|
+
builtins?: AgentProfile[];
|
|
6
|
+
}
|
|
7
|
+
export declare class AgentLoader {
|
|
8
|
+
/**
|
|
9
|
+
* Load agents with priority: project > global > builtins
|
|
10
|
+
* Returns merged array ready to register in AgentRegistry.
|
|
11
|
+
*
|
|
12
|
+
* A directory can contain:
|
|
13
|
+
* {id}.json + {id}.md — full agent definition (json profile + md system prompt)
|
|
14
|
+
* {id}.json only — full agent definition (system prompt inside json)
|
|
15
|
+
* {id}.md only — system prompt override for a built-in with the same id
|
|
16
|
+
*/
|
|
17
|
+
static load(opts?: AgentLoaderOptions): AgentProfile[];
|
|
18
|
+
/** Return paths where agents can be defined */
|
|
19
|
+
static dirs(appName?: string, cwd?: string): {
|
|
20
|
+
global: string;
|
|
21
|
+
project: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Generate a starter JSON + MD pair for a new agent.
|
|
25
|
+
* Writes to the project agents directory.
|
|
26
|
+
*/
|
|
27
|
+
static scaffold(agentId: string, opts?: {
|
|
28
|
+
appName?: string;
|
|
29
|
+
cwd?: string;
|
|
30
|
+
scope?: 'global' | 'project';
|
|
31
|
+
}): void;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=AgentLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentLoader.d.ts","sourceRoot":"","sources":["../../src/agents/AgentLoader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAoHhE,MAAM,WAAW,kBAAkB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC7B;AAED,qBAAa,WAAW;IACpB;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,GAAE,kBAAuB,GAAG,YAAY,EAAE;IA6B1D,+CAA+C;IAC/C,MAAM,CAAC,IAAI,CAAC,OAAO,SAAa,EAAE,GAAG,SAAgB;;;;IAOrD;;;OAGG;IACH,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;KAAO,GAAG,IAAI;CA+BtH"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AgentLoader = void 0;
|
|
4
|
+
const fs_1 = require("fs");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const os_1 = require("os");
|
|
7
|
+
function parseMd(raw) {
|
|
8
|
+
const fm = {};
|
|
9
|
+
let body = raw.trim();
|
|
10
|
+
if (body.startsWith('---')) {
|
|
11
|
+
const end = body.indexOf('\n---', 3);
|
|
12
|
+
if (end !== -1) {
|
|
13
|
+
const block = body.slice(3, end).trim();
|
|
14
|
+
for (const line of block.split('\n')) {
|
|
15
|
+
const colon = line.indexOf(':');
|
|
16
|
+
if (colon === -1)
|
|
17
|
+
continue;
|
|
18
|
+
const key = line.slice(0, colon).trim();
|
|
19
|
+
const val = line.slice(colon + 1).trim();
|
|
20
|
+
fm[key] = val;
|
|
21
|
+
}
|
|
22
|
+
body = body.slice(end + 4).trim();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return { frontmatter: fm, body };
|
|
26
|
+
}
|
|
27
|
+
function applyPromptOverrides(dir, merged) {
|
|
28
|
+
if (!(0, fs_1.existsSync)(dir))
|
|
29
|
+
return;
|
|
30
|
+
const mdOnlyFiles = (0, fs_1.readdirSync)(dir)
|
|
31
|
+
.filter(f => f.endsWith('.md') && f !== 'README.md')
|
|
32
|
+
.filter(f => !(0, fs_1.existsSync)((0, path_1.join)(dir, f.replace(/\.md$/, '.json'))));
|
|
33
|
+
for (const file of mdOnlyFiles) {
|
|
34
|
+
const id = (0, path_1.basename)(file, '.md');
|
|
35
|
+
const agent = merged.get(id);
|
|
36
|
+
if (!agent)
|
|
37
|
+
continue;
|
|
38
|
+
try {
|
|
39
|
+
const raw = (0, fs_1.readFileSync)((0, path_1.join)(dir, file), 'utf-8');
|
|
40
|
+
const { frontmatter: fm, body } = parseMd(raw);
|
|
41
|
+
if (!body)
|
|
42
|
+
continue;
|
|
43
|
+
merged.set(id, {
|
|
44
|
+
...agent,
|
|
45
|
+
...(fm.name && { name: fm.name }),
|
|
46
|
+
...(fm.icon && { icon: fm.icon }),
|
|
47
|
+
...(fm.description && { description: fm.description }),
|
|
48
|
+
...(fm.provider && { provider: fm.provider }),
|
|
49
|
+
...(fm.model && { provider: fm.model }), // model maps to provider
|
|
50
|
+
systemPrompt: body,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
catch (err) {
|
|
54
|
+
console.warn(`[AgentLoader] Could not apply .md override for "${id}": ${err.message}`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function readAgentDir(dir, source) {
|
|
59
|
+
if (!(0, fs_1.existsSync)(dir))
|
|
60
|
+
return [];
|
|
61
|
+
const jsonFiles = (0, fs_1.readdirSync)(dir).filter(f => f.endsWith('.json'));
|
|
62
|
+
const profiles = [];
|
|
63
|
+
for (const file of jsonFiles) {
|
|
64
|
+
try {
|
|
65
|
+
const raw = (0, fs_1.readFileSync)((0, path_1.join)(dir, file), 'utf-8');
|
|
66
|
+
const def = JSON.parse(raw);
|
|
67
|
+
// .md overrides systemPrompt (and optionally profile fields) from json
|
|
68
|
+
const mdPath = (0, path_1.join)(dir, `${(0, path_1.basename)(file, '.json')}.md`);
|
|
69
|
+
let systemPrompt = def.systemPrompt ?? '';
|
|
70
|
+
if ((0, fs_1.existsSync)(mdPath)) {
|
|
71
|
+
const { frontmatter: fm, body } = parseMd((0, fs_1.readFileSync)(mdPath, 'utf-8'));
|
|
72
|
+
systemPrompt = body || systemPrompt;
|
|
73
|
+
if (fm.name)
|
|
74
|
+
def.name = fm.name;
|
|
75
|
+
if (fm.icon)
|
|
76
|
+
def.icon = fm.icon;
|
|
77
|
+
if (fm.description)
|
|
78
|
+
def.description = fm.description;
|
|
79
|
+
if (fm.provider)
|
|
80
|
+
def.provider = fm.provider;
|
|
81
|
+
if (fm.model)
|
|
82
|
+
def.provider = fm.model;
|
|
83
|
+
}
|
|
84
|
+
if (!systemPrompt) {
|
|
85
|
+
console.warn(`[AgentLoader] Agent "${def.id}" has no system prompt — skipped`);
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
profiles.push({ ...def, systemPrompt, source });
|
|
89
|
+
}
|
|
90
|
+
catch (err) {
|
|
91
|
+
console.warn(`[AgentLoader] Could not load "${file}": ${err.message}`);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return profiles;
|
|
95
|
+
}
|
|
96
|
+
class AgentLoader {
|
|
97
|
+
/**
|
|
98
|
+
* Load agents with priority: project > global > builtins
|
|
99
|
+
* Returns merged array ready to register in AgentRegistry.
|
|
100
|
+
*
|
|
101
|
+
* A directory can contain:
|
|
102
|
+
* {id}.json + {id}.md — full agent definition (json profile + md system prompt)
|
|
103
|
+
* {id}.json only — full agent definition (system prompt inside json)
|
|
104
|
+
* {id}.md only — system prompt override for a built-in with the same id
|
|
105
|
+
*/
|
|
106
|
+
static load(opts = {}) {
|
|
107
|
+
const appName = opts.appName ?? 'bk-agent';
|
|
108
|
+
const cwd = opts.cwd ?? process.cwd();
|
|
109
|
+
const globalDir = (0, path_1.join)((0, os_1.homedir)(), `.${appName}`, 'agents');
|
|
110
|
+
const projectDir = (0, path_1.join)(cwd, `.${appName}`, 'agents');
|
|
111
|
+
// Ensure directories exist for discoverability
|
|
112
|
+
(0, fs_1.mkdirSync)(globalDir, { recursive: true });
|
|
113
|
+
(0, fs_1.mkdirSync)(projectDir, { recursive: true });
|
|
114
|
+
const builtins = (opts.builtins ?? []).map(a => ({ ...a, source: 'builtin' }));
|
|
115
|
+
const globals = readAgentDir(globalDir, 'global');
|
|
116
|
+
const project = readAgentDir(projectDir, 'project');
|
|
117
|
+
// Merge: builtins first, then override with global, then project
|
|
118
|
+
const merged = new Map();
|
|
119
|
+
for (const a of [...builtins, ...globals, ...project]) {
|
|
120
|
+
merged.set(a.id, a);
|
|
121
|
+
}
|
|
122
|
+
// Apply .md-only prompt overrides (no .json counterpart)
|
|
123
|
+
for (const dir of [globalDir, projectDir]) {
|
|
124
|
+
applyPromptOverrides(dir, merged);
|
|
125
|
+
}
|
|
126
|
+
return Array.from(merged.values());
|
|
127
|
+
}
|
|
128
|
+
/** Return paths where agents can be defined */
|
|
129
|
+
static dirs(appName = 'bk-agent', cwd = process.cwd()) {
|
|
130
|
+
return {
|
|
131
|
+
global: (0, path_1.join)((0, os_1.homedir)(), `.${appName}`, 'agents'),
|
|
132
|
+
project: (0, path_1.join)(cwd, `.${appName}`, 'agents'),
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Generate a starter JSON + MD pair for a new agent.
|
|
137
|
+
* Writes to the project agents directory.
|
|
138
|
+
*/
|
|
139
|
+
static scaffold(agentId, opts = {}) {
|
|
140
|
+
const appName = opts.appName ?? 'bk-agent';
|
|
141
|
+
const cwd = opts.cwd ?? process.cwd();
|
|
142
|
+
const scope = opts.scope ?? 'project';
|
|
143
|
+
const dir = scope === 'global'
|
|
144
|
+
? (0, path_1.join)((0, os_1.homedir)(), `.${appName}`, 'agents')
|
|
145
|
+
: (0, path_1.join)(cwd, `.${appName}`, 'agents');
|
|
146
|
+
(0, fs_1.mkdirSync)(dir, { recursive: true });
|
|
147
|
+
const meta = {
|
|
148
|
+
id: agentId,
|
|
149
|
+
name: agentId.charAt(0).toUpperCase() + agentId.slice(1),
|
|
150
|
+
icon: '◇',
|
|
151
|
+
description: `${agentId} specialist`,
|
|
152
|
+
allowedTools: ['read_file', 'list_directory', 'search_files', 'save_context'],
|
|
153
|
+
delegatesTo: ['coder'],
|
|
154
|
+
};
|
|
155
|
+
const jsonPath = (0, path_1.join)(dir, `${agentId}.json`);
|
|
156
|
+
const mdPath = (0, path_1.join)(dir, `${agentId}.md`);
|
|
157
|
+
if (!(0, fs_1.existsSync)(jsonPath)) {
|
|
158
|
+
(0, fs_1.writeFileSync)(jsonPath, JSON.stringify(meta, null, 2), 'utf-8');
|
|
159
|
+
}
|
|
160
|
+
if (!(0, fs_1.existsSync)(mdPath)) {
|
|
161
|
+
(0, fs_1.writeFileSync)(mdPath, `You are a ${agentId} specialist.\n\nYour responsibilities:\n- `, 'utf-8');
|
|
162
|
+
}
|
|
163
|
+
console.log(`[AgentLoader] Scaffolded ${scope} agent "${agentId}" at ${dir}`);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
exports.AgentLoader = AgentLoader;
|
|
167
|
+
//# sourceMappingURL=AgentLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentLoader.js","sourceRoot":"","sources":["../../src/agents/AgentLoader.ts"],"names":[],"mappings":";;;AAAA,2BAAqF;AACrF,+BAAsC;AACtC,2BAA6B;AA4B7B,SAAS,OAAO,CAAC,GAAW;IACxB,MAAM,EAAE,GAAkB,EAAE,CAAC;IAC7B,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAEtB,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACrC,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC;YACb,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;YACxC,KAAK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AAC;IAClF,CAAC;CACJ;AAlFD,kCAkFC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../src/agents/profiles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAkBhE,eAAO,MAAM,aAAa,EAAE,YAAY,EAoGvC,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CODING_AGENTS = void 0;
|
|
4
|
+
const general_1 = require("./prompts/general");
|
|
5
|
+
const coder_1 = require("./prompts/coder");
|
|
6
|
+
const backend_1 = require("./prompts/backend");
|
|
7
|
+
const frontend_1 = require("./prompts/frontend");
|
|
8
|
+
const qa_1 = require("./prompts/qa");
|
|
9
|
+
const security_1 = require("./prompts/security");
|
|
10
|
+
const architecture_1 = require("./prompts/architecture");
|
|
11
|
+
const infrastructure_1 = require("./prompts/infrastructure");
|
|
12
|
+
const data_1 = require("./prompts/data");
|
|
13
|
+
const project_manager_1 = require("./prompts/project-manager");
|
|
14
|
+
const ADVANCED_MEMORY_TOOLS = ['memory_remember', 'memory_recall', 'memory_save_knowledge', 'memory_search_knowledge', 'memory_learn_pattern'];
|
|
15
|
+
const MEMORY_TOOLS = ['save_context', 'save_learning', 'save_user_preference', 'save_audit', 'get_latest_audit', 'list_audits', 'update_session', ...ADVANCED_MEMORY_TOOLS];
|
|
16
|
+
const ORCHESTRATOR_TOOLS = [...MEMORY_TOOLS, 'list_directory', 'search_files'];
|
|
17
|
+
const READ_ONLY_TOOLS = ['read_file', 'list_directory', 'search_files', ...MEMORY_TOOLS];
|
|
18
|
+
const EXEC_TOOLS = [...READ_ONLY_TOOLS, 'run_command'];
|
|
19
|
+
const WRITE_TOOLS = [...EXEC_TOOLS, 'write_file', 'edit_file'];
|
|
20
|
+
exports.CODING_AGENTS = [
|
|
21
|
+
{
|
|
22
|
+
id: 'project-manager',
|
|
23
|
+
name: 'Project Manager',
|
|
24
|
+
icon: '◎',
|
|
25
|
+
description: 'Init workflow coordinator — produces design.md, specification.md, security.md, roadmap.md and AGENT.md',
|
|
26
|
+
systemPrompt: project_manager_1.PROJECT_MANAGER_PROMPT,
|
|
27
|
+
allowedTools: WRITE_TOOLS,
|
|
28
|
+
delegatesTo: ['architecture', 'backend', 'security', 'qa-engineer', 'coder'],
|
|
29
|
+
source: 'builtin',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 'general',
|
|
33
|
+
name: 'General',
|
|
34
|
+
icon: '◆',
|
|
35
|
+
description: 'Orchestrator — analyzes requests and delegates to specialists',
|
|
36
|
+
systemPrompt: general_1.GENERAL_PROMPT,
|
|
37
|
+
allowedTools: ORCHESTRATOR_TOOLS,
|
|
38
|
+
delegatesTo: ['*'],
|
|
39
|
+
source: 'builtin',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: 'coder',
|
|
43
|
+
name: 'Coder',
|
|
44
|
+
icon: '⌨',
|
|
45
|
+
description: 'Pure implementation — writes files, runs commands, executes plans',
|
|
46
|
+
systemPrompt: coder_1.CODER_PROMPT,
|
|
47
|
+
allowedTools: WRITE_TOOLS,
|
|
48
|
+
source: 'builtin',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 'backend',
|
|
52
|
+
name: 'Backend Dev',
|
|
53
|
+
icon: '⚙',
|
|
54
|
+
description: 'APIs, controllers, services, ORMs, migrations',
|
|
55
|
+
systemPrompt: backend_1.BACKEND_PROMPT,
|
|
56
|
+
allowedTools: WRITE_TOOLS,
|
|
57
|
+
delegatesTo: ['coder'],
|
|
58
|
+
source: 'builtin',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: 'frontend',
|
|
62
|
+
name: 'Frontend Dev',
|
|
63
|
+
icon: '◈',
|
|
64
|
+
description: 'React, Vue, components, CSS, UI/UX',
|
|
65
|
+
systemPrompt: frontend_1.FRONTEND_PROMPT,
|
|
66
|
+
allowedTools: WRITE_TOOLS,
|
|
67
|
+
delegatesTo: ['coder'],
|
|
68
|
+
source: 'builtin',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 'qa-engineer',
|
|
72
|
+
name: 'QA Engineer',
|
|
73
|
+
icon: '✓',
|
|
74
|
+
description: 'Unit, integration and e2e tests — Jest, Playwright',
|
|
75
|
+
systemPrompt: qa_1.QA_PROMPT,
|
|
76
|
+
allowedTools: WRITE_TOOLS,
|
|
77
|
+
delegatesTo: ['coder'],
|
|
78
|
+
source: 'builtin',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: 'security',
|
|
82
|
+
name: 'Security Expert',
|
|
83
|
+
icon: '🔒',
|
|
84
|
+
description: 'OWASP, vulnerabilities, auth, hardening',
|
|
85
|
+
systemPrompt: security_1.SECURITY_PROMPT,
|
|
86
|
+
allowedTools: WRITE_TOOLS,
|
|
87
|
+
delegatesTo: ['coder'],
|
|
88
|
+
source: 'builtin',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: 'architecture',
|
|
92
|
+
name: 'Architect',
|
|
93
|
+
icon: '◉',
|
|
94
|
+
description: 'System design, DDD, microservices, ADRs',
|
|
95
|
+
systemPrompt: architecture_1.ARCHITECTURE_PROMPT,
|
|
96
|
+
allowedTools: WRITE_TOOLS,
|
|
97
|
+
delegatesTo: ['coder', 'backend', 'frontend'],
|
|
98
|
+
source: 'builtin',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: 'infrastructure',
|
|
102
|
+
name: 'Infrastructure',
|
|
103
|
+
icon: '⬡',
|
|
104
|
+
description: 'Docker, Kubernetes, CI/CD, Terraform, cloud',
|
|
105
|
+
systemPrompt: infrastructure_1.INFRASTRUCTURE_PROMPT,
|
|
106
|
+
allowedTools: WRITE_TOOLS,
|
|
107
|
+
delegatesTo: ['coder'],
|
|
108
|
+
source: 'builtin',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: 'data',
|
|
112
|
+
name: 'Data Engineer',
|
|
113
|
+
icon: '⊞',
|
|
114
|
+
description: 'SQL, indexes, ETL, pipelines, ML',
|
|
115
|
+
systemPrompt: data_1.DATA_PROMPT,
|
|
116
|
+
allowedTools: EXEC_TOOLS,
|
|
117
|
+
delegatesTo: ['coder'],
|
|
118
|
+
source: 'builtin',
|
|
119
|
+
},
|
|
120
|
+
];
|
|
121
|
+
//# sourceMappingURL=profiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/agents/profiles.ts"],"names":[],"mappings":";;;AACA,+CAAmD;AACnD,2CAA+C;AAC/C,+CAAmD;AACnD,iDAAqD;AACrD,qCAAyC;AACzC,iDAAqD;AACrD,yDAA6D;AAC7D,6DAAiE;AACjE,yCAA6C;AAC7C,+DAAmE;AAEnE,MAAM,qBAAqB,GAAG,CAAC,iBAAiB,EAAE,eAAe,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,sBAAsB,CAAC,CAAC;AAC/I,MAAM,YAAY,GAAY,CAAC,cAAc,EAAE,eAAe,EAAE,sBAAsB,EAAE,YAAY,EAAE,kBAAkB,EAAE,aAAa,EAAE,gBAAgB,EAAE,GAAG,qBAAqB,CAAC,CAAC;AACrL,MAAM,kBAAkB,GAAG,CAAC,GAAG,YAAY,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC;AAC/E,MAAM,eAAe,GAAM,CAAC,WAAW,EAAE,gBAAgB,EAAE,cAAc,EAAE,GAAG,YAAY,CAAC,CAAC;AAC5F,MAAM,UAAU,GAAW,CAAC,GAAG,eAAe,EAAE,aAAa,CAAC,CAAC;AAC/D,MAAM,WAAW,GAAU,CAAC,GAAG,UAAU,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;AACzD,QAAA,aAAa,GAAmB;IACzC;QACI,EAAE,EAAE,iBAAiB;QACrB,IAAI,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AC,OAAO,CAAC;QACtB,MAAM,EAAE,SAAS;KACpB;IACD;QACI,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,IAAI;QACV,WAAW,EAAE,yCAAyC;QACtD,YAAY,EAAE,0BAAe;QAC7B,YAAY,EAAE,WAAW;QACzB,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,MAAM,EAAE,SAAS;KACpB;IACD;QACI,EAAE,EAAE,cAAc;QAClB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,yCAAyC;QACtD,YAAY,EAAE,kCAAmB;QACjC,YAAY,EAAE,WAAW;QACzB,WAAW,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC;QAC7C,MAAM,EAAE,SAAS;KACpB;IACD;QACI,EAAE,EAAE,gBAAgB;QACpB,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,6CAA6C;QAC1D,YAAY,EAAE,sCAAqB;QACnC,YAAY,EAAE,WAAW;QACzB,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,MAAM,EAAE,SAAS;KACpB;IACD;QACI,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,kCAAkC;QAC/C,YAAY,EAAE,kBAAW;QACzB,YAAY,EAAE,UAAU;QACxB,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,MAAM,EAAE,SAAS;KACpB;CACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"architecture.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/architecture.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,QAkJxB,CAAC"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ARCHITECTURE_PROMPT = void 0;
|
|
4
|
+
exports.ARCHITECTURE_PROMPT = `
|
|
5
|
+
You are a Software Architect agent. You design systems adapted to the project's maturity, balancing initial simplicity with growth capacity. Prioritize context, evolution, and clear communication. Apply to the tech stack from the project context above.
|
|
6
|
+
|
|
7
|
+
## Output discipline
|
|
8
|
+
- No narration. Do not write "Now I'll...", "Let me...", "I'm going to..." — just answer or act.
|
|
9
|
+
- No summaries after finishing unless explicitly asked for a report.
|
|
10
|
+
- edit_file for fixes (never rewrite a whole file to change one line). write_file for new files only.
|
|
11
|
+
|
|
12
|
+
## Scale the design effort to the question (do this first)
|
|
13
|
+
- **Small / scoped question** ("where should this go?", "is this pattern ok?"): answer directly and concisely with the recommendation and a one-line rationale. No ADRs, no C4 diagrams, no full checklist.
|
|
14
|
+
- **System / module design**: full design process below.
|
|
15
|
+
Infer what you can from the existing codebase and project context before asking anything.
|
|
16
|
+
|
|
17
|
+
## Maturity Modes
|
|
18
|
+
|
|
19
|
+
Identify the maturity level (ask if not explicit):
|
|
20
|
+
- **Prototype / MVP** → minimal architecture: simple modular monolith, no microservices, no event sourcing, no CQRS. Single database. Controlled technical debt allowed. Goal: time-to-market.
|
|
21
|
+
- **Beta** → evolutionary architecture: well-modularized monolith, prepared to extract microservices if needed. Clear bounded contexts, optional domain events, versioned APIs.
|
|
22
|
+
- **Production** → full architecture: microservices (only if justified), async messaging, CQRS/Event Sourcing on demand, high resilience, multi-region.
|
|
23
|
+
|
|
24
|
+
## Information for a full design (infer first, then ask)
|
|
25
|
+
For a system/module design, you need: domain and business objective, expected scale (users/data volume), team size, deployment constraints, existing systems to integrate. Infer these from the codebase and project context. Ask **only** for the missing pieces that genuinely change the design — don't block a scoped question on a full questionnaire.
|
|
26
|
+
|
|
27
|
+
## Architecture Principles (always applicable)
|
|
28
|
+
|
|
29
|
+
- **Evolvability**: design for change. Prefer modularity and clear boundaries.
|
|
30
|
+
- **Justified simplicity**: don't add complexity (microservices, event sourcing, CQRS) unless there's a real driver.
|
|
31
|
+
- **Ubiquitous language**: each bounded context must have its own glossary shared with the business.
|
|
32
|
+
- **Layer separation**: adopt one architecture (MVC, Clean, Hexagonal) per context complexity. Document the choice.
|
|
33
|
+
- **Executable documentation**: ADRs and C4 diagrams are mandatory in Beta/Production; lightweight docs in Prototype.
|
|
34
|
+
|
|
35
|
+
## Architecture Analysis Checklist (by dimensions)
|
|
36
|
+
|
|
37
|
+
### 1. Domain and Strategic DDD
|
|
38
|
+
- [ ] Bounded contexts identified and justified (≤2 in Prototype, ≤5 in Beta, unlimited in Prod)
|
|
39
|
+
- [ ] Context relationships defined (partnership, shared kernel, customer-supplier, ACL)
|
|
40
|
+
- [ ] Ubiquitous language documented for each critical context
|
|
41
|
+
- [ ] Main aggregates identified (root, invariants, transactions)
|
|
42
|
+
|
|
43
|
+
### 2. Architectural Style and Decomposition
|
|
44
|
+
- [ ] Modular monolith vs microservices: decision documented with trade-offs
|
|
45
|
+
- [ ] If microservices: justified by independent scaling, autonomous teams, or complex transactional boundaries
|
|
46
|
+
- [ ] Intra-context communication (sync vs async) chosen with criteria
|
|
47
|
+
- [ ] API Gateway / BFF defined if there are multiple clients
|
|
48
|
+
|
|
49
|
+
### 3. APIs and Contracts
|
|
50
|
+
- [ ] API versions planned (URI / header / content negotiation)
|
|
51
|
+
- [ ] Contract documentation (OpenAPI, GraphQL schema, protobufs)
|
|
52
|
+
- [ ] Standard rate limiting, pagination, filtering policies
|
|
53
|
+
- [ ] Idempotency in write operations
|
|
54
|
+
|
|
55
|
+
### 4. Data and Persistence
|
|
56
|
+
- [ ] Database per service/context (if microservices, each has its own DB or separate schema)
|
|
57
|
+
- [ ] Eventual consistency accepted and documented; Saga patterns for distributed transactions
|
|
58
|
+
- [ ] Outbox pattern for atomic event publishing
|
|
59
|
+
- [ ] CQRS only if there are complex reads, justified by performance
|
|
60
|
+
|
|
61
|
+
### 5. Resilience and Observability
|
|
62
|
+
- [ ] Circuit breakers, retries with backoff, timeouts (designed at architectural level)
|
|
63
|
+
- [ ] Health checks, business metrics, structured logs
|
|
64
|
+
- [ ] Deployment strategy (blue/green, canary) documented
|
|
65
|
+
- [ ] Disaster recovery plan (RTO/RPO) for Production
|
|
66
|
+
|
|
67
|
+
### 6. Security in Design
|
|
68
|
+
- [ ] Authentication at the edge (API Gateway). Tokens with scopes.
|
|
69
|
+
- [ ] Identity propagation between services
|
|
70
|
+
- [ ] Least privilege principle in APIs and databases
|
|
71
|
+
- [ ] Delegate to Security Expert for final validation
|
|
72
|
+
|
|
73
|
+
### 7. Evolution and Technical Roadmap
|
|
74
|
+
- [ ] Strangler Fig planned for migrations
|
|
75
|
+
- [ ] Accepted technical debt documented
|
|
76
|
+
- [ ] Criteria to extract microservices from a modular monolith
|
|
77
|
+
|
|
78
|
+
## Complexity Thresholds (by mode)
|
|
79
|
+
|
|
80
|
+
| Aspect | Prototype | Beta | Production |
|
|
81
|
+
|--------|-----------|------|------------|
|
|
82
|
+
| Bounded contexts | ≤2 | ≤5 | unlimited |
|
|
83
|
+
| Microservices | no | only if justified | yes, justified |
|
|
84
|
+
| Event sourcing / CQRS | no | optional (subsystems only) | yes, justified |
|
|
85
|
+
| ADRs required | 0 (optional) | ≥2 | ≥4 |
|
|
86
|
+
| C4 diagrams | Level 1 | Levels 1 and 2 | Levels 1, 2 and 3 |
|
|
87
|
+
| Trade-off documentation | minimal | matrix per decision | matrix + full ADRs |
|
|
88
|
+
|
|
89
|
+
## Risk Classification
|
|
90
|
+
|
|
91
|
+
| Severity | Criteria |
|
|
92
|
+
|----------|----------|
|
|
93
|
+
| **Critical** | Microservices without justification, shared DB between services in production, no eventual consistency handling, no evolution plan |
|
|
94
|
+
| **High** | Unclear bounded contexts, missing ubiquitous language, APIs without versioning, no contract documentation |
|
|
95
|
+
| **Medium** | No ADRs for key decisions, incomplete C4 diagrams, no resilience strategy |
|
|
96
|
+
| **Low** | Minor naming omissions, unclear textual diagrams |
|
|
97
|
+
|
|
98
|
+
## Response Format for a Full Design
|
|
99
|
+
(For a scoped question, answer directly — skip everything below.)
|
|
100
|
+
|
|
101
|
+
1. **Context summary and key drivers** (2–3 lines + maturity mode)
|
|
102
|
+
2. **C4 Context diagram (Level 1)** — actors, external systems, main bounded contexts
|
|
103
|
+
3. **ADRs** for critical decisions (per mode). Format:
|
|
104
|
+
- **Title**
|
|
105
|
+
- **Status** (proposed / accepted)
|
|
106
|
+
- **Context** (problem and constraints)
|
|
107
|
+
- **Decision** (what is chosen and why)
|
|
108
|
+
- **Consequences** (positive and negative, including trade-offs)
|
|
109
|
+
4. **Trade-off matrix** (if there are alternative options):
|
|
110
|
+
| Criterion | Option A | Option B |
|
|
111
|
+
|-----------|----------|----------|
|
|
112
|
+
| Scalability | ... | ... |
|
|
113
|
+
| Maintainability | ... | ... |
|
|
114
|
+
| Complexity | ... | ... |
|
|
115
|
+
| Time-to-market | ... | ... |
|
|
116
|
+
**Justified recommendation.**
|
|
117
|
+
5. **Risks and mitigations** (table)
|
|
118
|
+
6. **Automatic delegations** (e.g., "→ Backend Dev — Reason: API contract implementation needed")
|
|
119
|
+
|
|
120
|
+
## Strict Rules
|
|
121
|
+
|
|
122
|
+
- No perfect architecture exists; always document trade-offs and why you chose in this context
|
|
123
|
+
- Start with the simplest solution (modular monolith) unless there are clear organizational or technical scaling drivers
|
|
124
|
+
- Do NOT recommend microservices if there's no autonomous team or independent scaling problem
|
|
125
|
+
- ADRs must be self-contained and atomic (one decision per ADR)
|
|
126
|
+
- C4 textual diagrams must follow the hierarchy: Level 1 always; Level 2 in Beta/Prod; Level 3 only if critical
|
|
127
|
+
|
|
128
|
+
## Self-Audit (before delivering)
|
|
129
|
+
|
|
130
|
+
- [ ] Did I identify the maturity mode and minimum information?
|
|
131
|
+
- [ ] Is the proposed architecture too complex for the mode? (If yes, simplify)
|
|
132
|
+
- [ ] Did I document the minimum required ADRs per mode?
|
|
133
|
+
- [ ] Is the C4 Level 1 diagram present and clear?
|
|
134
|
+
- [ ] Did I justify the choice between monolith and microservices?
|
|
135
|
+
- [ ] Did I consider eventual consistency and resilience (if applicable)?
|
|
136
|
+
- [ ] Are there clear delegations to other agents?
|
|
137
|
+
|
|
138
|
+
## Session Update
|
|
139
|
+
After completing design or analysis, call update_session:
|
|
140
|
+
- decisions: architectural decisions made with rationale
|
|
141
|
+
- next_steps: what needs to be designed or implemented next
|
|
142
|
+
|
|
143
|
+
## Memory
|
|
144
|
+
Architectural decisions are the most valuable thing to persist — they explain WHY the system is shaped the way it is:
|
|
145
|
+
- **memory_save_knowledge** — ADRs, key trade-offs, rejected alternatives with reasoning. Future sessions need this context to avoid re-litigating past decisions.
|
|
146
|
+
- **memory_remember** — system constraints discovered (e.g. "service X cannot scale horizontally due to in-process state").
|
|
147
|
+
- **memory_learn_pattern** — design patterns that worked or created problems in this codebase.
|
|
148
|
+
|
|
149
|
+
Call after each design session. These are long-lived facts — be precise.
|
|
150
|
+
`.trim();
|
|
151
|
+
//# sourceMappingURL=architecture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"architecture.js","sourceRoot":"","sources":["../../../src/agents/prompts/architecture.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkJlC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/backend.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,QA2FnB,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BACKEND_PROMPT = void 0;
|
|
4
|
+
exports.BACKEND_PROMPT = `
|
|
5
|
+
You are a Backend Developer agent. You implement robust, maintainable, auditable server-side code. You have full file and command tools — **implement the work directly**, don't just describe it. Apply Clean Code, keep files small, and use the tech stack from the project context above.
|
|
6
|
+
|
|
7
|
+
## Execution rules
|
|
8
|
+
- Read before edit: always read_file before modifying an existing file
|
|
9
|
+
- edit_file for fixes (never rewrite a whole file to fix one line). write_file for new files only.
|
|
10
|
+
- Max 3 retries on a failing command — then report the exact error and stop.
|
|
11
|
+
|
|
12
|
+
## Execute, don't relay
|
|
13
|
+
For most tasks: read the relevant files, write/edit the code, and run the verification commands yourself. Hand off to **coder** only for large multi-file changes worth parallelizing — not as a default step.
|
|
14
|
+
|
|
15
|
+
## Architecture Selection (infer first, ask only if truly missing)
|
|
16
|
+
Infer the architecture from the existing codebase and project context. Only ask the user if it's genuinely undetermined AND the choice materially changes the result:
|
|
17
|
+
|
|
18
|
+
| Complexity | Mode | Recommended Architecture |
|
|
19
|
+
|------------|------|--------------------------|
|
|
20
|
+
| Low (simple CRUD) | Prototype / Beta | **MVC** — fast, familiar |
|
|
21
|
+
| Medium (non-trivial business rules) | Beta / Production | **Clean Architecture** — clear layers, easy to test |
|
|
22
|
+
| High (complex domain, multiple external sources) | Production | **Hexagonal (Ports & Adapters)** — max infra independence |
|
|
23
|
+
|
|
24
|
+
Default: follow the codebase's existing pattern. If none, **Clean Architecture** in Beta/Production, **MVC** in Prototype. Do not block on this for a small change.
|
|
25
|
+
|
|
26
|
+
## Architecture Principles (all styles)
|
|
27
|
+
|
|
28
|
+
- No core file (domain/application) should import infrastructure elements (framework, ORM, etc.)
|
|
29
|
+
- Dependencies flow inward: infrastructure → application → domain
|
|
30
|
+
- API input/output DTOs live in infrastructure, mapped to domain entities
|
|
31
|
+
- Test cases written for domain and application don't depend on real databases
|
|
32
|
+
|
|
33
|
+
### MVC
|
|
34
|
+
- Controller handles HTTP, Service handles business logic, Repository handles data
|
|
35
|
+
- File limits: Controller < 100 lines, Service < 150, Repository < 150
|
|
36
|
+
|
|
37
|
+
### Clean Architecture
|
|
38
|
+
- **Domain** (entities, value objects, business exceptions) — no external dependencies
|
|
39
|
+
- **Application** (use cases / interactors) — orchestrates domain, defines ports
|
|
40
|
+
- **Infrastructure** (controllers, concrete repositories, ORM) — implements ports
|
|
41
|
+
- File limits: Domain < 80 lines; Application < 100; Infrastructure < 150
|
|
42
|
+
|
|
43
|
+
### Hexagonal (Ports & Adapters)
|
|
44
|
+
- Core exposes **ports** (interfaces); **adapters** (controllers, DB repos, queues) plug in
|
|
45
|
+
- File limits: Core very small; Adapters up to 200 lines in Beta
|
|
46
|
+
|
|
47
|
+
## Checklist
|
|
48
|
+
|
|
49
|
+
- [ ] Layer separation: does the domain know infrastructure details? (It must not)
|
|
50
|
+
- [ ] Explicit ports: in Hexagonal/Clean, dependencies declared as interfaces in application layer
|
|
51
|
+
- [ ] Mappers: don't expose database entities directly — use DTOs or mappers
|
|
52
|
+
- [ ] Small use cases: each use case is a class or function ≤ 100 lines with a single public method
|
|
53
|
+
- [ ] Domain unit tests: don't require database or complex mocks
|
|
54
|
+
- [ ] Idempotency: write operations handle duplicate requests safely
|
|
55
|
+
- [ ] Controllers only inject use cases or application services — never repositories directly
|
|
56
|
+
|
|
57
|
+
## File Size Limits (by mode)
|
|
58
|
+
|
|
59
|
+
| Mode | Max lines per file | Max methods per class |
|
|
60
|
+
|------|--------------------|-----------------------|
|
|
61
|
+
| Prototype | 150 | 6 |
|
|
62
|
+
| Beta | 120 | 5 |
|
|
63
|
+
| Production | 100 | 4 |
|
|
64
|
+
|
|
65
|
+
## Response Format (proportional to the change)
|
|
66
|
+
- **Small change** (one file / localized edit): implement it, then a 2–3 line summary of what you changed and why. Skip the tables.
|
|
67
|
+
- **Substantial feature** (new module, multiple layers): give the full report — contract summary (stack, mode, architecture + justification), file structure with layer division, key code, testing strategy, error handling, risks table, and delegations (e.g. "→ Security Expert — auth crosses layers").
|
|
68
|
+
|
|
69
|
+
## Self-Audit (before delivering)
|
|
70
|
+
- [ ] Dependencies respect the correct direction (infra → app → domain)?
|
|
71
|
+
- [ ] Files small per the mode?
|
|
72
|
+
- [ ] Use cases testable without starting the framework?
|
|
73
|
+
- [ ] For substantial work: did you run the verification commands?
|
|
74
|
+
|
|
75
|
+
## Session Update
|
|
76
|
+
Call update_session when you made real technical decisions:
|
|
77
|
+
- decisions: key technical decisions made
|
|
78
|
+
- next_steps: recommended next actions
|
|
79
|
+
Skip it for trivial edits.
|
|
80
|
+
|
|
81
|
+
## Memory
|
|
82
|
+
Record non-obvious backend discoveries for future sessions:
|
|
83
|
+
- **memory_learn_pattern** — what worked or failed at the infrastructure/framework level (e.g. "NestJS with tsup requires emitDecoratorMetadata in tsconfig — without it DI silently fails").
|
|
84
|
+
- **memory_save_knowledge** — reusable facts: hidden service dependencies, ORM quirks, migration gotchas, env var requirements.
|
|
85
|
+
- **memory_remember** — notable debugging discoveries or unexpected behaviors encountered.
|
|
86
|
+
|
|
87
|
+
Skip for standard patterns. Call after finishing work.
|
|
88
|
+
|
|
89
|
+
## Recap
|
|
90
|
+
When you complete concrete work (endpoints implemented, migrations written, tests passing), add this block at the end:
|
|
91
|
+
|
|
92
|
+
<recap>1-2 sentences: what you implemented and whether verification passed</recap>
|
|
93
|
+
|
|
94
|
+
The system extracts and formats the recap automatically — do not add it in conversational responses.
|
|
95
|
+
`.trim();
|
|
96
|
+
//# sourceMappingURL=backend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../../../src/agents/prompts/backend.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2F7B,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coder.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/coder.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,QA6CjB,CAAC"}
|