atabey 0.0.2 → 0.0.4
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 +6 -3
- package/dist/framework-mcp/src/tools/definitions.js +1 -1
- package/dist/framework-mcp/src/tools/definitions.js.map +1 -1
- package/dist/framework-mcp/src/tools/framework/run_tests.js +5 -3
- package/dist/framework-mcp/src/tools/framework/run_tests.js.map +1 -1
- package/dist/framework-mcp/src/tools/quality/check_lint.js +7 -5
- package/dist/framework-mcp/src/tools/quality/check_lint.js.map +1 -1
- package/dist/framework-mcp/src/tools/shell/run_command.js +12 -2
- package/dist/framework-mcp/src/tools/shell/run_command.js.map +1 -1
- package/dist/framework-mcp/src/utils/cli.d.ts +14 -3
- package/dist/framework-mcp/src/utils/cli.js +51 -13
- package/dist/framework-mcp/src/utils/cli.js.map +1 -1
- package/dist/src/cli/adapters/core.js +34 -10
- package/dist/src/cli/adapters/core.js.map +1 -1
- package/dist/src/cli/adapters/scaffold.d.ts +1 -1
- package/dist/src/cli/adapters/scaffold.js +8 -8
- package/dist/src/cli/adapters/scaffold.js.map +1 -1
- package/dist/src/cli/commands/init/scaffold-core.d.ts +4 -1
- package/dist/src/cli/commands/init/scaffold-core.js +12 -5
- package/dist/src/cli/commands/init/scaffold-core.js.map +1 -1
- package/dist/src/cli/commands/init/scaffold-docs.d.ts +3 -0
- package/dist/src/cli/commands/init/scaffold-docs.js +37 -0
- package/dist/src/cli/commands/init/scaffold-docs.js.map +1 -0
- package/dist/src/cli/commands/init.js +41 -17
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/utils/i18n.d.ts +15 -0
- package/dist/src/cli/utils/i18n.js +29 -0
- package/dist/src/cli/utils/i18n.js.map +1 -0
- package/dist/src/modules/agents/definitions.d.ts +6 -6
- package/dist/src/modules/agents/definitions.js +30 -26
- package/dist/src/modules/agents/definitions.js.map +1 -1
- package/dist/src/modules/agents/registry/backend.js +5 -6
- package/dist/src/modules/agents/registry/backend.js.map +1 -1
- package/dist/src/modules/agents/registry/database.js +2 -2
- package/dist/src/modules/agents/registry/database.js.map +1 -1
- package/framework-mcp/dist/tools/definitions.js +1 -1
- package/framework-mcp/dist/tools/framework/run_tests.js +5 -3
- package/framework-mcp/dist/tools/quality/check_lint.js +7 -5
- package/framework-mcp/dist/tools/shell/run_command.js +12 -2
- package/framework-mcp/dist/utils/cli.js +51 -13
- package/framework-mcp/package.json +1 -1
- package/framework-mcp/src/tools/definitions.ts +1 -1
- package/framework-mcp/src/tools/framework/run_tests.ts +5 -3
- package/framework-mcp/src/tools/quality/check_lint.ts +8 -5
- package/framework-mcp/src/tools/shell/run_command.ts +12 -2
- package/framework-mcp/src/utils/cli.ts +45 -13
- package/package.json +2 -2
- package/src/cli/adapters/core.ts +36 -12
- package/src/cli/adapters/scaffold.ts +10 -8
- package/src/cli/commands/init/scaffold-core.ts +14 -6
- package/src/cli/commands/init/scaffold-docs.ts +44 -0
- package/src/cli/commands/init.ts +48 -18
- package/src/cli/utils/i18n.ts +44 -0
- package/src/modules/agents/definitions.ts +32 -26
- package/src/modules/agents/registry/backend.ts +5 -6
- package/src/modules/agents/registry/database.ts +2 -2
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type SupportedLanguage = "tr" | "en";
|
|
2
|
+
|
|
3
|
+
export interface Translations {
|
|
4
|
+
welcome: string;
|
|
5
|
+
select_backend: string;
|
|
6
|
+
select_language: string;
|
|
7
|
+
select_dirs: string;
|
|
8
|
+
select_agents: string;
|
|
9
|
+
select_palette: string;
|
|
10
|
+
init_success: string;
|
|
11
|
+
constitution_title: string;
|
|
12
|
+
status_title: string;
|
|
13
|
+
agent_ready: string;
|
|
14
|
+
next_steps: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const TRANSLATIONS: Record<SupportedLanguage, Translations> = {
|
|
18
|
+
tr: {
|
|
19
|
+
welcome: "Agent Atabey İnteraktif Kuruluma Hoş Geldiniz!",
|
|
20
|
+
select_backend: "Kurumsal Backend Dilini Seçin",
|
|
21
|
+
select_language: "Framework İletişim Dilini Seçin",
|
|
22
|
+
select_dirs: "Dahil edilecek framework dizinlerini seçin (örn: 1,2,3) veya HEPSİ için Enter:",
|
|
23
|
+
select_agents: "Dahil edilecek çekirdek ajanları seçin (örn: 1,2) veya HEPSİ için Enter:",
|
|
24
|
+
select_palette: "Renk paletini seçin (1-3) veya Enter (Modern Blue):",
|
|
25
|
+
init_success: "Agent Atabey başarıyla kuruldu!",
|
|
26
|
+
constitution_title: "Atabey Anayasası — Disiplin ve Nizam",
|
|
27
|
+
status_title: "Durum Çizelgesi",
|
|
28
|
+
agent_ready: "HAZIR",
|
|
29
|
+
next_steps: "Sonraki Adımlar:",
|
|
30
|
+
},
|
|
31
|
+
en: {
|
|
32
|
+
welcome: "Welcome to Agent Atabey Interactive Setup!",
|
|
33
|
+
select_backend: "Select Enterprise Backend Language",
|
|
34
|
+
select_language: "Select Framework Communication Language",
|
|
35
|
+
select_dirs: "Enter directory numbers to include (e.g. 1,2,3) or Enter for ALL:",
|
|
36
|
+
select_agents: "Enter agent numbers to include (e.g. 1,2) or Enter for ALL:",
|
|
37
|
+
select_palette: "Select palette (1-3) or Enter (Modern Blue):",
|
|
38
|
+
init_success: "Agent Atabey initialized successfully!",
|
|
39
|
+
constitution_title: "Atabey Constitution — Discipline and Order",
|
|
40
|
+
status_title: "Status Board",
|
|
41
|
+
agent_ready: "READY",
|
|
42
|
+
next_steps: "Next Steps:",
|
|
43
|
+
}
|
|
44
|
+
};
|
|
@@ -172,7 +172,8 @@ function buildSystemPrompt(
|
|
|
172
172
|
ag: AgentDefinition,
|
|
173
173
|
baseKnowledgeDir: string = path.join(getPackageRoot(), "templates/standards"),
|
|
174
174
|
stripMetaComments = false,
|
|
175
|
-
paths: Record<string, string> = { backend: "apps/backend", frontend: "apps/web", mobile: "apps/mobile", docs: "docs" }
|
|
175
|
+
paths: Record<string, string> = { backend: "apps/backend", frontend: "apps/web", mobile: "apps/mobile", docs: "docs" },
|
|
176
|
+
backendLanguage: string = "Node.js (TypeScript)"
|
|
176
177
|
): string {
|
|
177
178
|
const metaHeader = stripMetaComments ? [] : [
|
|
178
179
|
`<!-- name: ${ag.name} -->`,
|
|
@@ -194,11 +195,12 @@ function buildSystemPrompt(
|
|
|
194
195
|
`**Primary Role:** ${ag.role}`,
|
|
195
196
|
`**Authority Tier:** ${ag.tier} (Capability: ${ag.capability}/10)`,
|
|
196
197
|
"",
|
|
197
|
-
"## Project Structure",
|
|
198
|
-
"This project uses the following directory structure:",
|
|
199
|
-
`- **Backend:** \`${
|
|
200
|
-
`- **
|
|
201
|
-
`- **
|
|
198
|
+
"## Project Structure & Technology",
|
|
199
|
+
"This project uses the following stack and directory structure:",
|
|
200
|
+
`- **Backend Language:** \`${backendLanguage}\``,
|
|
201
|
+
`- **Backend Path:** \`${paths.backend}\``,
|
|
202
|
+
`- **Frontend Path:** \`${paths.frontend}\``,
|
|
203
|
+
`- **Mobile Path:** \`${paths.mobile}\``,
|
|
202
204
|
`- **Documentation:** \`${paths.docs}\``,
|
|
203
205
|
"",
|
|
204
206
|
"## Chain of Thought Protocol",
|
|
@@ -214,6 +216,7 @@ function buildSystemPrompt(
|
|
|
214
216
|
"## Enterprise Context",
|
|
215
217
|
"You are operating within a **multi-agent enterprise system** governed by the Agent Atabey framework.",
|
|
216
218
|
"All actions are traced, logged, and auditable. Every decision must be defensible and reversible.",
|
|
219
|
+
`- You are a specialist in **${backendLanguage}** development for backend tasks.`,
|
|
217
220
|
"- Always read PROJECT_MEMORY.md at session start for full context.",
|
|
218
221
|
"- Always pass the active **Trace ID** in all agent-to-agent messages.",
|
|
219
222
|
"- Never perform irreversible operations (schema drops, bulk deletes) without @manager approval.",
|
|
@@ -244,7 +247,7 @@ function buildSystemPrompt(
|
|
|
244
247
|
// Ref: https://docs.anthropic.com/en/docs/claude-code/sub-agents
|
|
245
248
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
246
249
|
|
|
247
|
-
export function toClaudeCodeMd(ag: AgentDefinition, baseKnowledgeDir?: string, paths?: Record<string, string
|
|
250
|
+
export function toClaudeCodeMd(ag: AgentDefinition, baseKnowledgeDir?: string, paths?: Record<string, string>, backendLanguage?: string): string {
|
|
248
251
|
const tools = [...new Set(ag.tools.map((t: string) => CLAUDE_TOOL_MAP[t] ?? t))];
|
|
249
252
|
const model = resolveModel(ag.capability, "claude-code");
|
|
250
253
|
const color = ag.tier === "supreme" ? "purple"
|
|
@@ -263,7 +266,7 @@ export function toClaudeCodeMd(ag: AgentDefinition, baseKnowledgeDir?: string, p
|
|
|
263
266
|
"---",
|
|
264
267
|
].join("\n");
|
|
265
268
|
|
|
266
|
-
return `${frontmatter}\n\n${buildSystemPrompt(ag, baseKnowledgeDir, false, paths)}`;
|
|
269
|
+
return `${frontmatter}\n\n${buildSystemPrompt(ag, baseKnowledgeDir, false, paths, backendLanguage)}`;
|
|
267
270
|
}
|
|
268
271
|
|
|
269
272
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -272,7 +275,7 @@ export function toClaudeCodeMd(ag: AgentDefinition, baseKnowledgeDir?: string, p
|
|
|
272
275
|
// Ref: https://ai.google.dev/gemini-api/docs/agents
|
|
273
276
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
274
277
|
|
|
275
|
-
export function toGeminiCliMd(ag: AgentDefinition, baseKnowledgeDir?: string, paths?: Record<string, string
|
|
278
|
+
export function toGeminiCliMd(ag: AgentDefinition, baseKnowledgeDir?: string, paths?: Record<string, string>, backendLanguage?: string): string {
|
|
276
279
|
const tools = [...new Set(ag.tools.map((t: string) => GEMINI_TOOL_MAP[t] ?? t))];
|
|
277
280
|
const model = resolveModel(ag.capability, "gemini-cli");
|
|
278
281
|
|
|
@@ -287,7 +290,7 @@ export function toGeminiCliMd(ag: AgentDefinition, baseKnowledgeDir?: string, pa
|
|
|
287
290
|
"---",
|
|
288
291
|
].join("\n");
|
|
289
292
|
|
|
290
|
-
const body = buildSystemPrompt(ag, baseKnowledgeDir, true, paths);
|
|
293
|
+
const body = buildSystemPrompt(ag, baseKnowledgeDir, true, paths, backendLanguage);
|
|
291
294
|
|
|
292
295
|
const metaFooter = [
|
|
293
296
|
"",
|
|
@@ -304,7 +307,7 @@ export function toGeminiCliMd(ag: AgentDefinition, baseKnowledgeDir?: string, pa
|
|
|
304
307
|
// Spec: Antigravity customAgentSpec JSON schema
|
|
305
308
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
306
309
|
|
|
307
|
-
export function toAntigravityJson(ag: AgentDefinition, baseKnowledgeDir?: string, paths?: Record<string, string
|
|
310
|
+
export function toAntigravityJson(ag: AgentDefinition, baseKnowledgeDir?: string, paths?: Record<string, string>, backendLanguage: string = "Node.js (TypeScript)"): string {
|
|
308
311
|
const knowledgeBase = baseKnowledgeDir ?? path.join(getPackageRoot(), "templates/standards");
|
|
309
312
|
|
|
310
313
|
// Embed actual file contents so the agent can read governance docs
|
|
@@ -329,12 +332,13 @@ export function toAntigravityJson(ag: AgentDefinition, baseKnowledgeDir?: string
|
|
|
329
332
|
content: `${ag.instructions.identity}\n\n**Mission:** ${ag.instructions.mission}`,
|
|
330
333
|
},
|
|
331
334
|
{
|
|
332
|
-
title: "Project Structure",
|
|
335
|
+
title: "Project Structure & Technology",
|
|
333
336
|
content: [
|
|
334
|
-
"This project uses the following directory structure:",
|
|
335
|
-
`- Backend: ${
|
|
336
|
-
`-
|
|
337
|
-
`-
|
|
337
|
+
"This project uses the following stack and directory structure:",
|
|
338
|
+
`- Backend Language: ${backendLanguage}`,
|
|
339
|
+
`- Backend Path: ${paths?.backend || "apps/backend"}`,
|
|
340
|
+
`- Frontend Path: ${paths?.frontend || "apps/web"}`,
|
|
341
|
+
`- Mobile Path: ${paths?.mobile || "apps/mobile"}`,
|
|
338
342
|
`- Documentation: ${paths?.docs || "docs"}`,
|
|
339
343
|
].join("\n"),
|
|
340
344
|
},
|
|
@@ -350,6 +354,7 @@ export function toAntigravityJson(ag: AgentDefinition, baseKnowledgeDir?: string
|
|
|
350
354
|
title: "Enterprise Context",
|
|
351
355
|
content: [
|
|
352
356
|
"You are part of a multi-agent enterprise governance system.",
|
|
357
|
+
`- You are a specialist in **${backendLanguage}** development for backend tasks.`,
|
|
353
358
|
"- Always include active Trace ID in all messages.",
|
|
354
359
|
"- Read PROJECT_MEMORY.md at session start.",
|
|
355
360
|
"- Prefer surgical edits over full file rewrites.",
|
|
@@ -374,7 +379,7 @@ export const buildAgentJson = toAntigravityJson;
|
|
|
374
379
|
// Valid fields: agent-type, display-name, when-to-use, model, allowed-tools
|
|
375
380
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
376
381
|
|
|
377
|
-
export function toCodexMd(ag: AgentDefinition, baseKnowledgeDir?: string, paths?: Record<string, string
|
|
382
|
+
export function toCodexMd(ag: AgentDefinition, baseKnowledgeDir?: string, paths?: Record<string, string>, backendLanguage?: string): string {
|
|
378
383
|
const model = resolveModel(ag.capability, "codex-cli");
|
|
379
384
|
const tools = [...new Set(ag.tools.map((t: string) => {
|
|
380
385
|
if (["read_file","view_file","list_dir","grep_search","get_memory_insights","read_project_memory","get_project_map","get_project_gaps","get_framework_status"].includes(t)) return "read";
|
|
@@ -393,7 +398,7 @@ export function toCodexMd(ag: AgentDefinition, baseKnowledgeDir?: string, paths?
|
|
|
393
398
|
"---",
|
|
394
399
|
].join("\n");
|
|
395
400
|
|
|
396
|
-
const body = buildSystemPrompt(ag, baseKnowledgeDir, true, paths);
|
|
401
|
+
const body = buildSystemPrompt(ag, baseKnowledgeDir, true, paths, backendLanguage);
|
|
397
402
|
|
|
398
403
|
const metaFooter = [
|
|
399
404
|
"",
|
|
@@ -411,7 +416,7 @@ export function toCodexMd(ag: AgentDefinition, baseKnowledgeDir?: string, paths?
|
|
|
411
416
|
// Ref: https://docs.cursor.com/context/rules
|
|
412
417
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
413
418
|
|
|
414
|
-
export function toCursorMdc(ag: AgentDefinition, baseKnowledgeDir?: string, paths?: Record<string, string
|
|
419
|
+
export function toCursorMdc(ag: AgentDefinition, baseKnowledgeDir?: string, paths?: Record<string, string>, backendLanguage?: string): string {
|
|
415
420
|
const glob = CURSOR_AGENT_GLOBS[ag.name] || "**/*";
|
|
416
421
|
// Only officially supported Cursor MDC frontmatter fields
|
|
417
422
|
const frontmatter = [
|
|
@@ -422,7 +427,7 @@ export function toCursorMdc(ag: AgentDefinition, baseKnowledgeDir?: string, path
|
|
|
422
427
|
"---",
|
|
423
428
|
].join("\n");
|
|
424
429
|
|
|
425
|
-
return `${frontmatter}\n\n${buildSystemPrompt(ag, baseKnowledgeDir, false, paths)}`;
|
|
430
|
+
return `${frontmatter}\n\n${buildSystemPrompt(ag, baseKnowledgeDir, false, paths, backendLanguage)}`;
|
|
426
431
|
}
|
|
427
432
|
|
|
428
433
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -436,19 +441,20 @@ export interface ExportedFile {
|
|
|
436
441
|
content: string;
|
|
437
442
|
}
|
|
438
443
|
|
|
439
|
-
export function exportAllAgents(target: ExportTarget, paths?: Record<string, string
|
|
444
|
+
export function exportAllAgents(target: ExportTarget, paths?: Record<string, string>, backendLanguage?: string): ExportedFile[] {
|
|
440
445
|
return ALL_AGENTS.map(ag => {
|
|
441
446
|
switch (target) {
|
|
442
447
|
case "claude-code":
|
|
443
|
-
return { path: `.claude/agents/${ag.name}.md`, content: toClaudeCodeMd(ag, undefined, paths) };
|
|
448
|
+
return { path: `.claude/agents/${ag.name}.md`, content: toClaudeCodeMd(ag, undefined, paths, backendLanguage) };
|
|
444
449
|
case "gemini-cli":
|
|
445
|
-
return { path: `.gemini/agents/${ag.name}.md`, content: toGeminiCliMd(ag, undefined, paths) };
|
|
450
|
+
return { path: `.gemini/agents/${ag.name}.md`, content: toGeminiCliMd(ag, undefined, paths, backendLanguage) };
|
|
446
451
|
case "antigravity":
|
|
447
|
-
return { path: `.agents/${ag.name}/agent.json`, content: toAntigravityJson(ag, undefined, paths) };
|
|
452
|
+
return { path: `.agents/${ag.name}/agent.json`, content: toAntigravityJson(ag, undefined, paths, backendLanguage) };
|
|
448
453
|
case "codex-cli":
|
|
449
|
-
return { path: `.agents/${ag.name}.md`, content: toCodexMd(ag, undefined, paths) };
|
|
454
|
+
return { path: `.agents/${ag.name}.md`, content: toCodexMd(ag, undefined, paths, backendLanguage) };
|
|
450
455
|
case "cursor":
|
|
451
|
-
return { path: `.cursor/rules/${ag.name}.mdc`, content: toCursorMdc(ag, undefined, paths) };
|
|
456
|
+
return { path: `.cursor/rules/${ag.name}.mdc`, content: toCursorMdc(ag, undefined, paths, backendLanguage) };
|
|
452
457
|
}
|
|
453
458
|
});
|
|
454
459
|
}
|
|
460
|
+
|
|
@@ -34,13 +34,12 @@ export const backend: AgentDefinition = {
|
|
|
34
34
|
"3. Plan: Break down the task into small, atomic, and verifiable steps.\n" +
|
|
35
35
|
"4. Execute: Perform the task using approved tools, adhering to quality and security constraints.",
|
|
36
36
|
rules: [
|
|
37
|
-
"ARCHITECTURAL PURITY: You MUST implement every feature using
|
|
38
|
-
"STRICT BRANDED TYPES: Absolute enforcement of branded types for ALL domain IDs (e.g., UserId, ProjectId). Raw
|
|
39
|
-
"
|
|
40
|
-
"ERROR HANDLING: Wrap all async logic in robust
|
|
37
|
+
"ARCHITECTURAL PURITY: You MUST implement every feature using a layered architecture (e.g., Controller-Service-Repository). Skipping any layer or mixing concerns (e.g., DB calls in Controller) is a Nizam violation.",
|
|
38
|
+
"STRICT BRANDED TYPES: Absolute enforcement of branded types or value objects for ALL domain IDs (e.g., UserId, ProjectId). Raw primitives for IDs are forbidden.",
|
|
39
|
+
"TYPE-SAFE DB ACCESS: All database access MUST use the project's designated type-safe query builder or ORM (e.g., Kysely for TS, GORM for Go, JPA for Java). Raw SQL strings are forbidden.",
|
|
40
|
+
"ERROR HANDLING: Wrap all async/io logic in robust error handling blocks with localized, typed error responses.",
|
|
41
41
|
"PII PROTECTION: Never log or store real user data. Use anonymized hashes for debugging tasks.",
|
|
42
|
-
"HIGH-RISK OPS: Refuse User/Role management, bulk deletes, schema alterations, and billing changes autonomously. "
|
|
43
|
-
"Return a standard refusal, send a managerApproval request to @manager, and shift to WAITING status.",
|
|
42
|
+
"HIGH-RISK OPS: Refuse User/Role management, bulk deletes, schema alterations, and billing changes autonomously. Send a managerApproval request to @manager.",
|
|
44
43
|
],
|
|
45
44
|
knowledgeFiles: ["crud-governance.md", "kysely-standards.md", "typeorm-standards.md", "auth-standards.md", "swagger-standards.md", "pino-standards.md"],
|
|
46
45
|
},
|
|
@@ -33,8 +33,8 @@ export const database: AgentDefinition = {
|
|
|
33
33
|
"3. Plan: Break down the task into small, atomic, and verifiable steps.\n" +
|
|
34
34
|
"4. Execute: Perform the task using approved tools, adhering to quality and security constraints.",
|
|
35
35
|
rules: [
|
|
36
|
-
"CONTRACT DRIVEN: All schemas must originate from and stay consistent with the type
|
|
37
|
-
"NO RAW SQL: Forbid raw SQL strings in the application layer —
|
|
36
|
+
"CONTRACT DRIVEN: All schemas must originate from and stay consistent with the project's type contracts.",
|
|
37
|
+
"NO RAW SQL: Forbid raw SQL strings in the application layer — use the project's designated type-safe query builder or ORM exclusively.",
|
|
38
38
|
"DETERMINISTIC MIGRATIONS: Every migration must be reversible and produce identical results across environments.",
|
|
39
39
|
"PERFORMANCE FIRST: Design indexes proactively — never retroactively after a performance incident.",
|
|
40
40
|
],
|