agent-enderun 1.0.3 ā 1.0.5
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/.enderun/PROJECT_MEMORY.md +8 -0
- package/.enderun/skills/multi_agent_coordination.md +1 -1
- package/.enderun/skills/subagent_lifecycle.md +1 -1
- package/README.md +24 -6
- package/docs/api-referans.md +1137 -0
- package/docs/is_akislari.md +902 -0
- package/docs/mimari.md +926 -0
- package/docs/moduller.md +294 -0
- package/docs/proje.md +521 -0
- package/docs/yap/304/261.md +2150 -0
- package/framework-mcp/package.json +1 -1
- package/gemini.md +1 -1
- package/package.json +2 -2
- package/src/cli/adapters.ts +8 -7
- package/src/cli/commands/init.ts +192 -109
- package/src/cli/utils/fs.ts +1 -0
package/gemini.md
CHANGED
|
@@ -19,7 +19,7 @@ At the **start of every session**, before any work:
|
|
|
19
19
|
|
|
20
20
|
### š¾ Memory Tiers
|
|
21
21
|
- **Project Memory (Shared):** `.enderun/PROJECT_MEMORY.md` is the source of truth for task history, Trace IDs, and architectural decisions. **Update this at the end of every turn.**
|
|
22
|
-
- **Private Memory (User-Specific):** Use the
|
|
22
|
+
- **Private Memory (User-Specific):** Use the local `.gitignored` memory directory (e.g. `.enderun/memory/`) for personal workflows or user-specific notes that should not be committed to Git. Never use the system's `/tmp` directory.
|
|
23
23
|
- **Project Instructions:** This `gemini.md` file contains the "Supreme Law" and coding standards.
|
|
24
24
|
|
|
25
25
|
### š”ļø Core Mandates
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-enderun",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "The Supreme AI Governance & Orchestration Framework for Enterprise Development",
|
|
5
5
|
"author": "Yusuf BEKAR",
|
|
6
6
|
"license": "MIT",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"zod": "^3.24.2"
|
|
83
83
|
},
|
|
84
84
|
"enderun": {
|
|
85
|
-
"version": "1.0.
|
|
85
|
+
"version": "1.0.5",
|
|
86
86
|
"initializedAt": "2026-05-31T09:58:25.773Z"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {}
|
package/src/cli/adapters.ts
CHANGED
|
@@ -63,7 +63,6 @@ export const ADAPTERS: Record<AdapterId, AdapterConfig> = {
|
|
|
63
63
|
*/
|
|
64
64
|
export const FRAMEWORK_DIR_CANDIDATES = [
|
|
65
65
|
".agent",
|
|
66
|
-
".agents",
|
|
67
66
|
".gemini",
|
|
68
67
|
".claude",
|
|
69
68
|
".grok",
|
|
@@ -124,15 +123,17 @@ export function remapFrameworkContent(
|
|
|
124
123
|
): string {
|
|
125
124
|
let result = content;
|
|
126
125
|
|
|
127
|
-
// 1. Dynamic Agent Folder Mapping based on adapter
|
|
126
|
+
// 1. Dynamic Agent Folder Mapping based on adapter (Only remap if NOT in unified .enderun mode)
|
|
128
127
|
let agentFolder = "agents";
|
|
129
128
|
let knowledgeFolder = "knowledge";
|
|
130
129
|
|
|
131
|
-
if (
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
130
|
+
if (frameworkDir !== ".enderun") {
|
|
131
|
+
if (adapterId === "antigravity") {
|
|
132
|
+
agentFolder = "skills";
|
|
133
|
+
knowledgeFolder = "rules";
|
|
134
|
+
} else if (adapterId === "grok") {
|
|
135
|
+
agentFolder = "plugins";
|
|
136
|
+
}
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
// 2. Replacements
|
package/src/cli/commands/init.ts
CHANGED
|
@@ -287,6 +287,45 @@ describe("Initial Setup", () => {
|
|
|
287
287
|
);
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
+
const cursorRulesPath = path.join(targetDir, ".cursorrules");
|
|
291
|
+
if (!fs.existsSync(cursorRulesPath)) {
|
|
292
|
+
writeTextFile(
|
|
293
|
+
cursorRulesPath,
|
|
294
|
+
`# Agent Enderun ā Cursor IDE Rules
|
|
295
|
+
|
|
296
|
+
This is the primary entry point when using Agent Enderun within the Cursor IDE (Chat & Composer).
|
|
297
|
+
|
|
298
|
+
The framework operates under a unified governance structure located in the ${frameworkDir}/ directory.
|
|
299
|
+
|
|
300
|
+
### Primary Constitution
|
|
301
|
+
All governance rules, agent checklists, and project memory live here:
|
|
302
|
+
|
|
303
|
+
š **[${frameworkDir}/ENDERUN.md](${frameworkDir}/ENDERUN.md)**
|
|
304
|
+
|
|
305
|
+
### š¤ Agent Directive
|
|
306
|
+
You are operating under the Agent Enderun governance framework.
|
|
307
|
+
|
|
308
|
+
At the **start of every session**, before any work:
|
|
309
|
+
1. **Restore Memory:** Read ${frameworkDir}/PROJECT_MEMORY.md to restore state, active Trace ID, and history.
|
|
310
|
+
2. **Load Identity:** Read the relevant agent definition under ${frameworkDir}/agents/{agent}.md (default to @manager).
|
|
311
|
+
3. **Internalize Knowledge:** Reference the ${frameworkDir}/knowledge/ base for architectural and coding standards.
|
|
312
|
+
|
|
313
|
+
### š¾ Memory Tiers
|
|
314
|
+
- **Project Memory (Shared):** ${frameworkDir}/PROJECT_MEMORY.md is the source of truth for task history, Trace IDs, and architectural decisions. **Update this at the end of every turn.**
|
|
315
|
+
- **Private Memory (User-Specific):** Use the local .gitignored memory directory (e.g. ${frameworkDir}/memory/) for personal workflows or user-specific notes that should not be committed to Git. Never use the system's /tmp directory.
|
|
316
|
+
- **Project Instructions:** This .cursorrules file contains the "Supreme Law" and coding standards.
|
|
317
|
+
|
|
318
|
+
### š”ļø Core Mandates
|
|
319
|
+
- **Surgical Edits:** Use replace_text or patch_file via MCP for precise changes.
|
|
320
|
+
- **Traceability:** Every action must inherit the active Trace ID from memory.
|
|
321
|
+
- **Contract First:** No implementation without verified types.
|
|
322
|
+
- **NEVER FORGET:** @manager MUST update ${frameworkDir}/PROJECT_MEMORY.md at the end of EVERY session without exception. This is a non-negotiable process integrity rule.
|
|
323
|
+
|
|
324
|
+
All paths and references inside the project must comply with the Supreme Constitution located at ${frameworkDir}/ENDERUN.md`.trim() + "\n",
|
|
325
|
+
dryRun,
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
|
|
290
329
|
if (!fs.existsSync(path.join(targetDir, ".git"))) {
|
|
291
330
|
try {
|
|
292
331
|
if (dryRun) {
|
|
@@ -308,131 +347,175 @@ describe("Initial Setup", () => {
|
|
|
308
347
|
}
|
|
309
348
|
|
|
310
349
|
// Always scaffold Antigravity (.agents/) workspace directory for cross-compatibility with agy CLI
|
|
311
|
-
if (adapter.id === "antigravity" || adapter.id === "antigravity-cli") {
|
|
350
|
+
if (adapter.id === "antigravity" || adapter.id === "antigravity-cli" || adapter.id === "gemini") {
|
|
312
351
|
const agentsFrameworkDir = path.join(targetDir, ".agents");
|
|
313
352
|
if (!dryRun) {
|
|
314
353
|
try {
|
|
315
354
|
fs.mkdirSync(agentsFrameworkDir, { recursive: true });
|
|
316
355
|
const agentsSubdir = path.join(agentsFrameworkDir, "agents");
|
|
317
356
|
fs.mkdirSync(agentsSubdir, { recursive: true });
|
|
318
|
-
|
|
319
|
-
// Write the 12 agent folders and agent.json files
|
|
320
|
-
const allAgents = [
|
|
321
|
-
{
|
|
322
|
-
name: "manager",
|
|
323
|
-
displayName: "Orchestration & Governance (Team-Lead)",
|
|
324
|
-
description: "CTO, Lead Architect, and Orchestrator for Agent Enderun.",
|
|
325
|
-
instructions: "You are the manager agent. Orchestrate workspace tasks, manage DAG dependency graphs, handle phase transitions, and enforce architectural standards.\n\nš NON-NEGOTIABLE CORE RULES:\n- Single Point of Authority: You are the sole entry point. No specialist acts without your briefing.\n- Traceability: Every action MUST inherit the active Trace ID.\n- Memory Discipline: MUST update PROJECT_MEMORY.md and log actions at the end of EVERY turn."
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
name: "backend",
|
|
329
|
-
displayName: "Domain Logic & Databases Specialist",
|
|
330
|
-
description: "Responsible for core business logic, database migrations, security standards, API contracts, and server architecture.",
|
|
331
|
-
instructions: "You are the backend agent. Build secure, high-performance, and consistent server architecture.\n\nš NON-NEGOTIABLE CORE RULES:\n- No UI: Never implement UI or frontend logic.\n- Contract-First: Define shared contracts/branded types BEFORE any consumer code.\n- Branded Types Law: ALL IDs must use branded types (e.g., UserID). Plain strings are forbidden.\n- Zero Mock Policy: Use real endpoints/contracts only.\n- Surgical Edits: Use replace_text for all code changes."
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
name: "frontend",
|
|
335
|
-
displayName: "Fluid Responsive UI Specialist",
|
|
336
|
-
description: "Builds responsive fluid user interfaces, manages styling tokens with Panda CSS, and implements state machines.",
|
|
337
|
-
instructions: "You are the frontend agent. Build original, high-performance, and responsive user interfaces.\n\nš NON-NEGOTIABLE CORE RULES:\n- Responsive-First: Mobile-First (320px) is mandatory. Fixed-width is forbidden.\n- Zero UI Library Policy: No shadcn/ui, MUI, etc. Build everything with Panda CSS.\n- Zero Mock Policy: Use real endpoints/contracts only.\n- Contract-First: Use branded types from apps/backend/src/types.\n- No Native Alerts: Use integrated Toaster/Modal components."
|
|
338
|
-
},
|
|
339
|
-
{
|
|
340
|
-
name: "quality",
|
|
341
|
-
displayName: "Automated Testing & Quality Specialist",
|
|
342
|
-
description: "Verifies test coverage, audits compliance with the constitution, conducts AST scanning, and verifies CI/CD status.",
|
|
343
|
-
instructions: "You are the quality agent. Ensure no code is merged or deployed without meeting standards.\n\nš NON-NEGOTIABLE CORE RULES:\n- Final Gate: No code merges or deploys proceed without quality sign-off.\n- Verification-First: Audit lint, typecheck, contract drift, and branded types before sign-off.\n- Never Implement: Audit and assess only. Never write application features.\n- Zero Mock Policy: Integration tests must use real/service-compatible backends.\n- Coverage Gate: Reject approvals if coverage falls below >80% threshold in core."
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
name: "database",
|
|
347
|
-
displayName: "Database Migrations & Tuning Specialist",
|
|
348
|
-
description: "Designs SQL schemas, manages migration scripts via Kysely, optimizes queries, indexes, and seeding logic.",
|
|
349
|
-
instructions: "You are the database agent. Build secure, optimized, and scalable data layers.\n\nš NON-NEGOTIABLE CORE RULES:\n- Self-Contained DB: Every backend application MUST manage its own schema/migrations/seeds in its own src/database/ directory.\n- Contract-First: All schemas MUST be derived from branded types.\n- Kysely Standard: Use Kysely for application queries. Raw SQL is forbidden.\n- Zero Mock Policy: Realistic, contract-aware seed data only.\n- Surgical Edits: Use replace_text for all schema/migration changes."
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
name: "devops",
|
|
353
|
-
displayName: "Infrastructure & CI/CD Specialist",
|
|
354
|
-
description: "Handles deployment pipelines, environment variables, system containerization, logging & telemetry integrations.",
|
|
355
|
-
instructions: "You are the devops agent. Ensure reliable execution in every environment with strict quality gates.\n\nš NON-NEGOTIABLE CORE RULES:\n- Gate Approvals: NEVER deploy to production without quality gate approval.\n- No Docker Policy: Prefer native Node.js unless explicitly overridden by manager.\n- Environment Parity: Identical configs across dev/staging/prod (except secrets).\n- Secrets Security: NEVER hardcode secrets. Use environment variables.\n- Rollback First: Deployment is BLOCKED if no documented rollback plan exists."
|
|
356
|
-
},
|
|
357
|
-
{
|
|
358
|
-
name: "explorer",
|
|
359
|
-
displayName: "Codebase Discovery Specialist",
|
|
360
|
-
description: "Maps code dependencies, performs project scans, identifies architectural gaps, and supports legacy onboarding.",
|
|
361
|
-
instructions: "You are the explorer agent. Map project structure and provide deep context to other agents.\n\nš NON-NEGOTIABLE CORE RULES:\n- Read-Only: Never write production code. Only discover, map, and report.\n- Search-First: Always use search_codebase before reading large files.\n- Surgical Discovery: Focus on entry points and core domain logic.\n- Zero Mock Policy: Analyze real system state only.\n- Traceability: All findings must be linked to a Trace ID."
|
|
362
|
-
},
|
|
363
|
-
{
|
|
364
|
-
name: "git",
|
|
365
|
-
displayName: "Version Control Specialist",
|
|
366
|
-
description: "Manages commit histories, branches, Trace ID alignment, semantic tagging, and merge conflicts.",
|
|
367
|
-
instructions: "You are the git agent. Ensure a clean, atomic, and traceable repository history.\n\nš NON-NEGOTIABLE CORE RULES:\n- Trace ID Tagging: EVERY commit must include the active Trace ID in the message.\n- Atomic Integrity: Every commit must represent exactly one logical change.\n- Health-First: Never commit code that fails build or basic tests.\n- No Push: Do not run git push without explicit USER approval.\n- No Force: Never use git push --force on public branches."
|
|
368
|
-
},
|
|
369
|
-
{
|
|
370
|
-
name: "mobile",
|
|
371
|
-
displayName: "Mobile App Specialist",
|
|
372
|
-
description: "Develops cross-platform mobile apps using React Native and Expo with clean component states.",
|
|
373
|
-
instructions: "You are the mobile agent. Build high-performance, responsive mobile apps (React Native/Expo).\n\nš NON-NEGOTIABLE CORE RULES:\n- Zero UI Library: Same discipline as web. Build UI from scratch.\n- Contract-First: Use shared types from apps/backend/src/types.\n- Responsive-First: Mobile-First approach is mandatory.\n- Safe Area: Handle iOS/Android safe area insets on every screen.\n- Performance: Target 60 FPS."
|
|
374
|
-
},
|
|
375
|
-
{
|
|
376
|
-
name: "native",
|
|
377
|
-
displayName: "Native OS Integration Specialist",
|
|
378
|
-
description: "Builds lightweight desktop wrappers and system integrations using Tauri or Electron.",
|
|
379
|
-
instructions: "You are the native agent. Build secure, efficient desktop apps (Tauri/Electron).\n\nš NON-NEGOTIABLE CORE RULES:\n- Security-First: No remote code execution. Mandatory sandboxing and strict CSP.\n- Secure Storage: Use Keychain/Credential Manager for sensitive data.\n- IPC Contract: All communication between frontend and native MUST be typed.\n- Contract-First: Define IPC and data contracts before implementation.\n- Surgical Edits: Use replace_text for all code changes."
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
name: "security",
|
|
383
|
-
displayName: "Security & Cryptography Specialist",
|
|
384
|
-
description: "Enforces authentication flows, CSP policies, credential rotation, RLS constraints, and cryptographic safety.",
|
|
385
|
-
instructions: "You are the security agent. Ensure all endpoints, database connections, and authentication flows satisfy strict enterprise compliance policies.\n\nš NON-NEGOTIABLE CORE RULES:\n- Sandboxed Security First: Enforce Row Level Security (RLS) on all database tables.\n- Credential Rotation Policy: Credentials, keys, and tokens must never be hardcoded. Use vault/env variables.\n- CSP & CORS Strictness: Never open wildcards (*) for CORS or CSP policies.\n- Surgical Edits: Use replace_text for all security patches."
|
|
386
|
-
},
|
|
387
|
-
{
|
|
388
|
-
name: "analyst",
|
|
389
|
-
displayName: "Contract Verification & Business Analyst",
|
|
390
|
-
description: "Validates business specifications, tests database contract integrity, and audits constitutional compliance.",
|
|
391
|
-
instructions: "You are the analyst agent. Independently verify compliance with contracts and specifications between frontend, backend, and the constitution.\n\nš NON-NEGOTIABLE CORE RULES:\n- Independent Stance: Act as an objective verification gate.\n- Contract-First Law: Ensure contract.version.json perfectly matches types.\n- Escalation Priority: Report all contract drift to manager immediately.\n- Surgical Edits: Use replace_text for all document updates."
|
|
392
|
-
}
|
|
393
|
-
];
|
|
394
357
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
fs.mkdirSync(
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
content: ag.instructions
|
|
410
|
-
}
|
|
411
|
-
],
|
|
412
|
-
toolNames: [
|
|
413
|
-
"view_file",
|
|
414
|
-
"replace_file_content",
|
|
415
|
-
"write_to_file",
|
|
416
|
-
"run_command",
|
|
417
|
-
"grep_search",
|
|
418
|
-
"list_dir"
|
|
419
|
-
]
|
|
358
|
+
// Create other standard Antigravity directories for custom workspace customizations
|
|
359
|
+
fs.mkdirSync(path.join(agentsFrameworkDir, "skills"), { recursive: true });
|
|
360
|
+
fs.mkdirSync(path.join(agentsFrameworkDir, "rules"), { recursive: true });
|
|
361
|
+
fs.mkdirSync(path.join(agentsFrameworkDir, "workflows"), { recursive: true });
|
|
362
|
+
|
|
363
|
+
// Write workspace-specific MCP config
|
|
364
|
+
const mcpBlock = {
|
|
365
|
+
mcpServers: {
|
|
366
|
+
"agent-enderun": {
|
|
367
|
+
command: "node",
|
|
368
|
+
args: [path.join(targetDir, "framework-mcp/dist/index.js")],
|
|
369
|
+
env: {
|
|
370
|
+
"ENDERUN_PROJECT_ROOT": targetDir
|
|
371
|
+
}
|
|
420
372
|
}
|
|
421
373
|
}
|
|
422
374
|
};
|
|
423
|
-
|
|
424
375
|
fs.writeFileSync(
|
|
425
|
-
path.join(
|
|
426
|
-
JSON.stringify(
|
|
376
|
+
path.join(agentsFrameworkDir, "mcp_config.json"),
|
|
377
|
+
JSON.stringify(mcpBlock, null, 2),
|
|
427
378
|
"utf8"
|
|
428
379
|
);
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
380
|
+
|
|
381
|
+
// Write AGENTS.md at the project root for prepended global rules
|
|
382
|
+
const agentsMdPath = path.join(targetDir, "AGENTS.md");
|
|
383
|
+
if (!fs.existsSync(agentsMdPath)) {
|
|
384
|
+
fs.writeFileSync(
|
|
385
|
+
agentsMdPath,
|
|
386
|
+
`# Agent Enderun Workspace Instructions
|
|
387
|
+
|
|
388
|
+
You are operating under the Agent Enderun AI governance and orchestration framework.
|
|
389
|
+
|
|
390
|
+
### š”ļø Critical Guidelines
|
|
391
|
+
1. **Traceability First:** Every action or execution MUST inherit the active Trace ID from \`${frameworkDir}/PROJECT_MEMORY.md\`.
|
|
392
|
+
2. **Surgical Operations:** Use precise file replacements or patches. NEVER rewrite entire source files unnecessarily.
|
|
393
|
+
3. **Contract-First Design:** Backend models and type contracts must be locked and verified before frontend components are created.
|
|
394
|
+
4. **Memory Synchronization:** All agent runs must update the project memory logs before concluding the session.
|
|
395
|
+
|
|
396
|
+
All rules and constraints defined in \`${frameworkDir}/ENDERUN.md\` are strictly binding.
|
|
397
|
+
`.trim() + "\n",
|
|
398
|
+
"utf8"
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// Write the 12 agent folders and agent.json files
|
|
403
|
+
const allAgents = [
|
|
404
|
+
{
|
|
405
|
+
name: "manager",
|
|
406
|
+
displayName: "Orchestration & Governance (Team-Lead)",
|
|
407
|
+
description: "CTO, Lead Architect, and Orchestrator for Agent Enderun.",
|
|
408
|
+
instructions: "You are the manager agent. Orchestrate workspace tasks, manage DAG dependency graphs, handle phase transitions, and enforce architectural standards.\n\nš NON-NEGOTIABLE CORE RULES:\n- Single Point of Authority: You are the sole entry point. No specialist acts without your briefing.\n- Traceability: Every action MUST inherit the active Trace ID.\n- Memory Discipline: MUST update PROJECT_MEMORY.md and log actions at the end of EVERY turn."
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
name: "backend",
|
|
412
|
+
displayName: "Domain Logic & Databases Specialist",
|
|
413
|
+
description: "Responsible for core business logic, database migrations, security standards, API contracts, and server architecture.",
|
|
414
|
+
instructions: "You are the backend agent. Build secure, high-performance, and consistent server architecture.\n\nš NON-NEGOTIABLE CORE RULES:\n- No UI: Never implement UI or frontend logic.\n- Contract-First: Define shared contracts/branded types BEFORE any consumer code.\n- Branded Types Law: ALL IDs must use branded types (e.g., UserID). Plain strings are forbidden.\n- Zero Mock Policy: Use real endpoints/contracts only.\n- Surgical Edits: Use replace_text for all code changes."
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
name: "frontend",
|
|
418
|
+
displayName: "Fluid Responsive UI Specialist",
|
|
419
|
+
description: "Builds responsive fluid user interfaces, manages styling tokens with Panda CSS, and implements state machines.",
|
|
420
|
+
instructions: "You are the frontend agent. Build original, high-performance, and responsive user interfaces.\n\nš NON-NEGOTIABLE CORE RULES:\n- Responsive-First: Mobile-First (320px) is mandatory. Fixed-width is forbidden.\n- Zero UI Library Policy: No shadcn/ui, MUI, etc. Build everything with Panda CSS.\n- Zero Mock Policy: Use real endpoints/contracts only.\n- Contract-First: Use branded types from apps/backend/src/types.\n- No Native Alerts: Use integrated Toaster/Modal components."
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
name: "quality",
|
|
424
|
+
displayName: "Automated Testing & Quality Specialist",
|
|
425
|
+
description: "Verifies test coverage, audits compliance with the constitution, conducts AST scanning, and verifies CI/CD status.",
|
|
426
|
+
instructions: "You are the quality agent. Ensure no code is merged or deployed without meeting standards.\n\nš NON-NEGOTIABLE CORE RULES:\n- Final Gate: No code merges or deploys proceed without quality sign-off.\n- Verification-First: Audit lint, typecheck, contract drift, and branded types before sign-off.\n- Never Implement: Audit and assess only. Never write application features.\n- Zero Mock Policy: Integration tests must use real/service-compatible backends.\n- Coverage Gate: Reject approvals if coverage falls below >80% threshold in core."
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
name: "database",
|
|
430
|
+
displayName: "Database Migrations & Tuning Specialist",
|
|
431
|
+
description: "Designs SQL schemas, manages migration scripts via Kysely, optimizes queries, indexes, and seeding logic.",
|
|
432
|
+
instructions: "You are the database agent. Build secure, optimized, and scalable data layers.\n\nš NON-NEGOTIABLE CORE RULES:\n- Self-Contained DB: Every backend application MUST manage its own schema/migrations/seeds in its own src/database/ directory.\n- Contract-First: All schemas MUST be derived from branded types.\n- Kysely Standard: Use Kysely for application queries. Raw SQL is forbidden.\n- Zero Mock Policy: Realistic, contract-aware seed data only.\n- Surgical Edits: Use replace_text for all schema/migration changes."
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
name: "devops",
|
|
436
|
+
displayName: "Infrastructure & CI/CD Specialist",
|
|
437
|
+
description: "Handles deployment pipelines, environment variables, system containerization, logging & telemetry integrations.",
|
|
438
|
+
instructions: "You are the devops agent. Ensure reliable execution in every environment with strict quality gates.\n\nš NON-NEGOTIABLE CORE RULES:\n- Gate Approvals: NEVER deploy to production without quality gate approval.\n- No Docker Policy: Prefer native Node.js unless explicitly overridden by manager.\n- Environment Parity: Identical configs across dev/staging/prod (except secrets).\n- Secrets Security: NEVER hardcode secrets. Use environment variables.\n- Rollback First: Deployment is BLOCKED if no documented rollback plan exists."
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
name: "explorer",
|
|
442
|
+
displayName: "Codebase Discovery Specialist",
|
|
443
|
+
description: "Maps code dependencies, performs project scans, identifies architectural gaps, and supports legacy onboarding.",
|
|
444
|
+
instructions: "You are the explorer agent. Map project structure and provide deep context to other agents.\n\nš NON-NEGOTIABLE CORE RULES:\n- Read-Only: Never write production code. Only discover, map, and report.\n- Search-First: Always use search_codebase before reading large files.\n- Surgical Discovery: Focus on entry points and core domain logic.\n- Zero Mock Policy: Analyze real system state only.\n- Traceability: All findings must be linked to a Trace ID."
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
name: "git",
|
|
448
|
+
displayName: "Version Control Specialist",
|
|
449
|
+
description: "Manages commit histories, branches, Trace ID alignment, semantic tagging, and merge conflicts.",
|
|
450
|
+
instructions: "You are the git agent. Ensure a clean, atomic, and traceable repository history.\n\nš NON-NEGOTIABLE CORE RULES:\n- Trace ID Tagging: EVERY commit must include the active Trace ID in the message.\n- Atomic Integrity: Every commit must represent exactly one logical change.\n- Health-First: Never commit code that fails build or basic tests.\n- No Push: Do not run git push without explicit USER approval.\n- No Force: Never use git push --force on public branches."
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
name: "mobile",
|
|
454
|
+
displayName: "Mobile App Specialist",
|
|
455
|
+
description: "Develops cross-platform mobile apps using React Native and Expo with clean component states.",
|
|
456
|
+
instructions: "You are the mobile agent. Build high-performance, responsive mobile apps (React Native/Expo).\n\nš NON-NEGOTIABLE CORE RULES:\n- Zero UI Library: Same discipline as web. Build UI from scratch.\n- Contract-First: Use shared types from apps/backend/src/types.\n- Responsive-First: Mobile-First approach is mandatory.\n- Safe Area: Handle iOS/Android safe area insets on every screen.\n- Performance: Target 60 FPS."
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
name: "native",
|
|
460
|
+
displayName: "Native OS Integration Specialist",
|
|
461
|
+
description: "Builds lightweight desktop wrappers and system integrations using Tauri or Electron.",
|
|
462
|
+
instructions: "You are the native agent. Build secure, efficient desktop apps (Tauri/Electron).\n\nš NON-NEGOTIABLE CORE RULES:\n- Security-First: No remote code execution. Mandatory sandboxing and strict CSP.\n- Secure Storage: Use Keychain/Credential Manager for sensitive data.\n- IPC Contract: All communication between frontend and native MUST be typed.\n- Contract-First: Define IPC and data contracts before implementation.\n- Surgical Edits: Use replace_text for all code changes."
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
name: "security",
|
|
466
|
+
displayName: "Security & Cryptography Specialist",
|
|
467
|
+
description: "Enforces authentication flows, CSP policies, credential rotation, RLS constraints, and cryptographic safety.",
|
|
468
|
+
instructions: "You are the security agent. Ensure all endpoints, database connections, and authentication flows satisfy strict enterprise compliance policies.\n\nš NON-NEGOTIABLE CORE RULES:\n- Sandboxed Security First: Enforce Row Level Security (RLS) on all database tables.\n- Credential Rotation Policy: Credentials, keys, and tokens must never be hardcoded. Use vault/env variables.\n- CSP & CORS Strictness: Never open wildcards (*) for CORS or CSP policies.\n- Surgical Edits: Use replace_text for all security patches."
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
name: "analyst",
|
|
472
|
+
displayName: "Contract Verification & Business Analyst",
|
|
473
|
+
description: "Validates business specifications, tests database contract integrity, and audits constitutional compliance.",
|
|
474
|
+
instructions: "You are the analyst agent. Independently verify compliance with contracts and specifications between frontend, backend, and the constitution.\n\nš NON-NEGOTIABLE CORE RULES:\n- Independent Stance: Act as an objective verification gate.\n- Contract-First Law: Ensure contract.version.json perfectly matches types.\n- Escalation Priority: Report all contract drift to manager immediately.\n- Surgical Edits: Use replace_text for all document updates."
|
|
475
|
+
}
|
|
476
|
+
];
|
|
477
|
+
|
|
478
|
+
for (const ag of allAgents) {
|
|
479
|
+
const agentDir = path.join(agentsSubdir, ag.name);
|
|
480
|
+
fs.mkdirSync(agentDir, { recursive: true });
|
|
481
|
+
|
|
482
|
+
const payload = {
|
|
483
|
+
name: ag.name,
|
|
484
|
+
displayName: ag.displayName,
|
|
485
|
+
description: ag.description,
|
|
486
|
+
hidden: false,
|
|
487
|
+
customAgentSpec: {
|
|
488
|
+
customAgent: {
|
|
489
|
+
systemPromptSections: [
|
|
490
|
+
{
|
|
491
|
+
title: "Instructions",
|
|
492
|
+
content: ag.instructions
|
|
493
|
+
}
|
|
494
|
+
],
|
|
495
|
+
toolNames: [
|
|
496
|
+
"view_file",
|
|
497
|
+
"replace_file_content",
|
|
498
|
+
"write_to_file",
|
|
499
|
+
"run_command",
|
|
500
|
+
"grep_search",
|
|
501
|
+
"list_dir"
|
|
502
|
+
]
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
};
|
|
506
|
+
|
|
507
|
+
fs.writeFileSync(
|
|
508
|
+
path.join(agentDir, "agent.json"),
|
|
509
|
+
JSON.stringify(payload, null, 2),
|
|
510
|
+
"utf8"
|
|
511
|
+
);
|
|
512
|
+
}
|
|
513
|
+
console.warn(`ā
Scaffolding ${allAgents.length} Antigravity agents under .agents/agents/...`);
|
|
514
|
+
} catch {
|
|
432
515
|
// fallback
|
|
516
|
+
}
|
|
433
517
|
}
|
|
434
518
|
}
|
|
435
|
-
}
|
|
436
519
|
|
|
437
520
|
console.warn(`\nā ${adapter.id.toUpperCase()}: Setup complete.`);
|
|
438
521
|
console.warn(` ⢠Framework runtime: ${frameworkDir}/`);
|