agent-enderun 1.0.4 → 1.0.6
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/ENDERUN.md +15 -8
- package/.enderun/agents/analyst.md +6 -0
- package/.enderun/agents/backend.md +6 -0
- package/.enderun/agents/database.md +6 -0
- package/.enderun/agents/devops.md +6 -0
- package/.enderun/agents/explorer.md +6 -0
- package/.enderun/agents/frontend.md +6 -0
- package/.enderun/agents/git.md +6 -0
- package/.enderun/agents/manager.md +14 -13
- package/.enderun/agents/mobile.md +6 -0
- package/.enderun/agents/native.md +6 -0
- package/.enderun/agents/quality.md +6 -0
- package/.enderun/agents/security.md +6 -0
- package/.enderun/cli-commands.json +8 -6
- package/.enderun/knowledge/evaluation_engine.md +15 -0
- package/.enderun/knowledge/router_logic.md +29 -0
- package/.enderun/logs/manager.json +34 -6
- package/.enderun/memory/BUSINESS_CONTEXT.md +17 -0
- package/.enderun/memory/DECISIONS.md +24 -0
- package/.enderun/memory/LESSONS_LEARNED.md +12 -0
- package/.enderun/memory/PATTERNS.md +17 -0
- package/.enderun/memory/PROJECT_MEMORY.md +34 -0
- package/.enderun/observability/AUDIT_LOG.md +9 -0
- package/.enderun/observability/METRICS.md +10 -0
- package/.enderun/observability/TRACE_LOG.md +10 -0
- package/.enderun/registry/agents.yaml +69 -0
- package/GEMINI.md +20 -0
- package/GROK.md +20 -0
- package/README.md +49 -8
- package/bin/validate-agent-army.js +111 -36
- package/docs/getting-started.md +9 -0
- package/framework-mcp/package.json +1 -1
- package/package.json +2 -2
- package/src/cli/adapters.ts +22 -3
- package/src/cli/commands/check.ts +25 -5
- package/src/cli/commands/init.ts +211 -114
- package/src/cli/commands/orchestrate.ts +16 -4
- package/src/cli/index.ts +19 -7
- package/src/cli/utils/memory.ts +10 -2
- package/.enderun/PROJECT_MEMORY.md +0 -23
- package/claude.md +0 -25
- package/gemini.md +0 -31
- package/grok.md +0 -25
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# 🏛️ Agent Enderun — Enterprise AI Governance & Autonomous Orchestration Framework
|
|
2
2
|
|
|
3
|
-
> **Stable Release:** v1.0.
|
|
4
|
-
> **Author:** Yusuf BEKAR
|
|
5
|
-
> **Trace ID:** `01HGT8J5E2N0W0W0W0W0W0W0W5`
|
|
3
|
+
> **Stable Release:** v1.0.6 (AL Enterprise Compliance)
|
|
4
|
+
> **Author:** Yusuf BEKAR
|
|
5
|
+
> **Trace ID:** `01HGT8J5E2N0W0W0W0W0W0W0W5`
|
|
6
6
|
> **System Status:** 🟢 All Systems Operational | Build Compile: Clean | Type-Safety: 100% Verified
|
|
7
7
|
|
|
8
8
|
---
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
**Agent Enderun**, sıradan bir kod şablon üreteci veya basit bir AI asistanı değildir; karmaşık, ölçeklenebilir ve kurumsal (enterprise) düzeydeki yazılım projeleri için özel olarak tasarlanmış bir **Yapay Zeka Yönetişimi ve Otonom Ordu Komuta Sistemidir**.
|
|
13
13
|
|
|
14
|
-
Sürüm **v1.0.
|
|
14
|
+
Sürüm **v1.0.6** itibarıyla sistem; kendi hafızasını yönetebilen, monorepo proje yollarını dinamik olarak haritalayan, tüm ajan seanslarını güvenli şekilde günlükleyen, farklı yapay zeka ekosistemlerini anayasal bir disiplin altında birleştiren, **Agent Lifecycle (AL) tam uyumlu init ve ordu validasyonunu** otomatikleştiren ve **macOS & Windows çapraz platform standartlarına tam uyum sağlayan** yaşayan bir mühendislik organizmasıdır.
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
@@ -27,6 +27,25 @@ Yapay zeka kodlama yardımcıları (Claude Code, Gemini CLI, Grok Build vb.) gel
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
+
### 🚀 Sürüm v1.0.5 Universal AI Synergy Kararlı Sürüm Devrimsel Özellikleri
|
|
31
|
+
|
|
32
|
+
1. **🛸 Antigravity Custom Agent, CLI & IDE Entegrasyonu:**
|
|
33
|
+
* `.agents/` dizini altında `skills`, `rules` ve `workflows` dizinleri ile yerel `mcp_config.json` dosyasının otonom oluşturulması sağlandı. Kök dizine global `AGENTS.md` dosyasının otomatik yazılması eklenerek Antigravity CLI (`agy`) ve IDE'sinin özel agent'ları pürüzsüz tanıması sağlandı.
|
|
34
|
+
2. **🚀 Cursor IDE `.cursorrules` Desteği:**
|
|
35
|
+
* Kök dizinde `.cursorrules` dosyası otomatik oluşturularak Cursor AI asistanının (Chat & Composer) Agent Enderun anayasası ve bellek sistemlerine tam uyumlu çalışması sağlandı.
|
|
36
|
+
3. **🩺 Akıllı Framework Dizin Çözümlemesi:**
|
|
37
|
+
* `.agents/` konfigürasyon dizini ile ana framework çalışma dizinlerinin (`.enderun` vb.) çakışmasını önleyen ve `check` taramasını 100% başarılı kılan dizin çözümleme düzeltmesi uygulandı.
|
|
38
|
+
|
|
39
|
+
### 🚀 Sürüm v1.0.6 AL Enterprise Compliance Kararlı Sürüm Devrimsel Özellikleri
|
|
40
|
+
|
|
41
|
+
1. **🛡️ Agent Lifecycle (AL) Tam Otomatik Init & Validasyon:**
|
|
42
|
+
* `init` komutu artık scaffolding, build ve check adımlarından sonra **otomatik dedicated AL Army Validation** (`node bin/validate-agent-army.js`) çalıştırır. Tüm ajanlar `stateMachine` + `tags` ile AL şemasına (IDLE → BRIEFED → EXECUTING → DONE/BLOCKED vb.) zorunlu olarak uymaktadır.
|
|
43
|
+
2. **🔧 Yeni CLI Komutları (Validate & AL Odaklı):** `validate`, `validate-army` ve `check:al` komutları eklendi. `check` komutu artık otomatik olarak AL validation'ı içermektedir. `.enderun/cli-commands.json` ve yardım metinleri güncellendi.
|
|
44
|
+
3. **🔍 Cross-Adapter AL Detection İyileştirmesi:**
|
|
45
|
+
* `getFrameworkDir` ve `bin/validate-agent-army.js` artık `agents/`, `skills/` (antigravity), `plugins/` (grok) klasörlerini akıllıca tespit eder. `init antigravity` sonrası kurulumlar da %100 AL uyumlu olarak doğrulanır.
|
|
46
|
+
4. **📚 Dokümantasyon ve Init Deneyimi:**
|
|
47
|
+
* `docs/getting-started.md`'ye AL & Init Compatibility bölümü eklendi. `init` çıktısına AL uyumluluk notu ve otomatik doğrulama adımı entegre edildi.
|
|
48
|
+
|
|
30
49
|
### 🚀 Sürüm v1.0.4 Singularity Kararlı Sürüm Devrimsel Özellikleri
|
|
31
50
|
|
|
32
51
|
1. **🧠 Pürüzsüz ve Klasör Kalabalığından Arındırılmış Birleşik Beyin Mimarisi (Unified Brain):**
|
|
@@ -137,9 +156,10 @@ npx agent-enderun init antigravity
|
|
|
137
156
|
|
|
138
157
|
Enderun CLI, `agent-enderun` (veya `npx agent-enderun`) komutu ile yönetilir.
|
|
139
158
|
|
|
140
|
-
* **`init [adapter] [--unified]`**: Seçilen adaptörü kurar. `--unified` kullanılırsa tüm asistan şimleri doğrudan `.enderun` altında birleşir; klasör kalabalığı sıfırlanır.
|
|
159
|
+
* **`init [adapter] [--unified]`**: Seçilen adaptörü kurar. `--unified` kullanılırsa tüm asistan şimleri doğrudan `.enderun` altında birleşir; klasör kalabalığı sıfırlanır. Init sonrası **otomatik AL (Agent Lifecycle) validation** çalıştırılır.
|
|
141
160
|
* **`status`**: Projenin aktif fazını (Phase 0 - 4), aktif Trace ID'sini ve uzman ajanların durumlarını listeler.
|
|
142
|
-
* **`check`**: Anayasal uyumluluk denetimlerini
|
|
161
|
+
* **`check`**: Anayasal uyumluluk denetimlerini + **otomatik AL Army Validation** (stateMachine + tags) gerçekleştirir.
|
|
162
|
+
* **`validate` / `validate-army` / `check:al`**: Bağımsız Agent Lifecycle (AL) ordu validasyonu çalıştırır (`bin/validate-agent-army.js`).
|
|
143
163
|
* **`trace:new [description]`**: Belirli bir geliştirme zinciri için yeni bir Trace ID (ULID) tetikler.
|
|
144
164
|
* **`orchestrate` / `loop`**: Hermes Message Broker asenkron event-driven ajanlar arası iletişim döngüsünü canlı olarak başlatır.
|
|
145
165
|
* **`verify-contract`**: Frontend ve backend katmanları arasındaki tip bütünlüğünü denetler.
|
|
@@ -177,7 +197,7 @@ npx agent-enderun init gemini --unified
|
|
|
177
197
|
|
|
178
198
|
**Agent Enderun** is not a generic boilerplate generator or a simple AI wrapper; it is an elite, state-of-the-art **AI Governance and Autonomous Army Command System** designed for complex, scalable, and highly auditable enterprise software projects.
|
|
179
199
|
|
|
180
|
-
As of **v1.0.
|
|
200
|
+
As of **v1.0.6**, the system operates as a **"Living Engineering Organism"** capable of managing its own persistent memory, dynamically mapping project directory scopes, secure-logging expert agent activities, **automatically enforcing Agent Lifecycle (AL) compliance on every init**, and **fully complying with cross-platform (macOS & Windows) scripting and standard setups**.
|
|
181
201
|
|
|
182
202
|
---
|
|
183
203
|
|
|
@@ -193,6 +213,25 @@ As AI coding assistants (Claude Code, Gemini CLI, Grok Build, etc.) become incre
|
|
|
193
213
|
|
|
194
214
|
---
|
|
195
215
|
|
|
216
|
+
### 🚀 Key Improvements in Version v1.0.5 (Universal AI Synergy) Stable Release
|
|
217
|
+
|
|
218
|
+
1. **🛸 Antigravity Custom Agent, CLI & IDE Integration:**
|
|
219
|
+
* Autonomously scaffolds `.agents/skills`, `.agents/rules`, and `.agents/workflows` directories along with local `mcp_config.json`. Generates the root `AGENTS.md` file automatically, ensuring full cross-platform compatibility and seamless custom agent discovery in the Antigravity CLI (`agy`) and IDE.
|
|
220
|
+
2. **🚀 Cursor IDE `.cursorrules` Support:**
|
|
221
|
+
* Automatically scaffolds the root `.cursorrules` file to direct Cursor's AI Chat and Composer to comply fully with the Agent Enderun Constitution (`ENDERUN.md`) and persistant memory patterns.
|
|
222
|
+
3. **🩺 Smart Framework Directory Resolution:**
|
|
223
|
+
* Fixed framework resolution candidates to dynamically prevent folder name collisions between the Antigravity config `.agents` and framework directories, ensuring `check` audits are 100% green.
|
|
224
|
+
|
|
225
|
+
### 🚀 Key Improvements in Version v1.0.6 (AL Enterprise Compliance) Stable Release
|
|
226
|
+
|
|
227
|
+
1. **🛡️ Agent Lifecycle (AL) Fully Automated Init & Validation:**
|
|
228
|
+
* The `init` command now automatically executes a **dedicated post-init AL Army Validation** (`node bin/validate-agent-army.js`) after scaffolding, build and `check`. All 12 agents strictly comply with the official lifecycle schema (`stateMachine` + `tags`): IDLE → BRIEFED → EXECUTING → DONE / BLOCKED / WAITING / ERROR.
|
|
229
|
+
2. **🔧 New CLI Commands (Validate & AL-Focused):** Added `validate`, `validate-army` and `check:al`. The existing `check` command now automatically includes full AL validation. Updated `cli-commands.json` and built-in help text.
|
|
230
|
+
3. **🔍 Cross-Adapter AL Detection Hardening:**
|
|
231
|
+
* `getFrameworkDir` and `bin/validate-agent-army.js` now intelligently detect `agents/`, `skills/` (antigravity adapter), `plugins/` (grok adapter) folders. Setups created with `init antigravity` are now 100% AL-compliant and verifiable.
|
|
232
|
+
4. **📚 Documentation & Improved Init Experience:**
|
|
233
|
+
* Added "AL & Init Compatibility" section to `docs/getting-started.md`. `init` now prints an explicit AL note and runs the validation step automatically.
|
|
234
|
+
|
|
196
235
|
### 🚀 Key Improvements in Version v1.0.4 Stable Release
|
|
197
236
|
|
|
198
237
|
1. **🧠 Clutter-Free Unified Brain Architecture:**
|
|
@@ -301,6 +340,8 @@ npx agent-enderun init antigravity
|
|
|
301
340
|
|
|
302
341
|
### 🕹️ CLI Command Reference
|
|
303
342
|
|
|
343
|
+
> **New in v1.0.6:** `validate`, `validate-army`, `check:al` for dedicated Agent Lifecycle (AL) validation. `check` and `init` now automatically enforce AL compliance.
|
|
344
|
+
|
|
304
345
|
Execute commands via `agent-enderun` (or `npx agent-enderun`):
|
|
305
346
|
|
|
306
347
|
* **`init [adapter] [--unified]`**: Scaffold framework directories and register local/global MCP server instances.
|
|
@@ -338,4 +379,4 @@ npx agent-enderun init gemini --unified
|
|
|
338
379
|
|
|
339
380
|
---
|
|
340
381
|
|
|
341
|
-
Developed with absolute discipline | Developer **Yusuf BEKAR** | Framework Version **v1.0.
|
|
382
|
+
Developed with absolute discipline | Developer **Yusuf BEKAR** | Framework Version **v1.0.6**
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
import fs from "fs";
|
|
4
4
|
import path from "path";
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* AL-compatible agent folder names across all adapters (after init).
|
|
8
|
+
* - .enderun/agents/ or .agent/skills/ or .grok/plugins/ etc.
|
|
9
|
+
*/
|
|
10
|
+
const AGENT_FOLDER_NAMES = ["agents", "skills", "plugins"];
|
|
11
|
+
|
|
6
12
|
const FRAMEWORK_CANDIDATES = [
|
|
7
13
|
".gemini/antigravity",
|
|
8
14
|
".gemini/antigravity-cli",
|
|
@@ -11,38 +17,87 @@ const FRAMEWORK_CANDIDATES = [
|
|
|
11
17
|
".grok",
|
|
12
18
|
".agent",
|
|
13
19
|
".enderun",
|
|
20
|
+
".agents",
|
|
21
|
+
".cursor",
|
|
14
22
|
];
|
|
15
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Robust detection that works no matter which adapter was used with `init`.
|
|
26
|
+
* Returns the actual location of the army .md files + the army schema.
|
|
27
|
+
*/
|
|
16
28
|
function detectFrameworkDir() {
|
|
17
29
|
for (const dir of FRAMEWORK_CANDIDATES) {
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
30
|
+
const dirPath = path.resolve(dir);
|
|
31
|
+
if (!fs.existsSync(dirPath)) continue;
|
|
32
|
+
|
|
33
|
+
for (const folderName of AGENT_FOLDER_NAMES) {
|
|
34
|
+
const agentsPath = path.join(dirPath, folderName);
|
|
35
|
+
if (!fs.existsSync(agentsPath)) continue;
|
|
36
|
+
|
|
37
|
+
// Find schema (support both flat and schema/ subdir layouts)
|
|
38
|
+
let schemaPath = path.join(agentsPath, "agent_army_schema.json");
|
|
39
|
+
if (!fs.existsSync(schemaPath)) {
|
|
40
|
+
const alt1 = path.join(dirPath, "agents", "agent_army_schema.json");
|
|
41
|
+
if (fs.existsSync(alt1)) schemaPath = alt1;
|
|
42
|
+
else {
|
|
43
|
+
const alt2 = path.join(agentsPath, "schema", "agent_army_schema.json");
|
|
44
|
+
if (fs.existsSync(alt2)) schemaPath = alt2;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (!fs.existsSync(schemaPath)) {
|
|
48
|
+
const found = findSchemaRecursive(dirPath);
|
|
49
|
+
if (found) schemaPath = found;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (fs.existsSync(schemaPath)) {
|
|
53
|
+
return { frameworkDir: dir, agentsDir: agentsPath, schemaPath };
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Rare: .md files directly in the framework root
|
|
58
|
+
const directMds = fs.readdirSync(dirPath).filter(f => f.endsWith(".md") && !f.startsWith("AGENTS"));
|
|
59
|
+
if (directMds.length > 0) {
|
|
60
|
+
const schemaPath = path.join(dirPath, "agent_army_schema.json");
|
|
61
|
+
if (fs.existsSync(schemaPath)) {
|
|
62
|
+
return { frameworkDir: dir, agentsDir: dirPath, schemaPath };
|
|
63
|
+
}
|
|
22
64
|
}
|
|
23
65
|
}
|
|
24
66
|
return null;
|
|
25
67
|
}
|
|
26
68
|
|
|
69
|
+
function findSchemaRecursive(startDir) {
|
|
70
|
+
try {
|
|
71
|
+
const entries = fs.readdirSync(startDir, { withFileTypes: true });
|
|
72
|
+
for (const entry of entries) {
|
|
73
|
+
const full = path.join(startDir, entry.name);
|
|
74
|
+
if (entry.isDirectory()) {
|
|
75
|
+
if (entry.name === "node_modules" || entry.name === "dist") continue;
|
|
76
|
+
const found = findSchemaRecursive(full);
|
|
77
|
+
if (found) return found;
|
|
78
|
+
} else if (entry.name === "agent_army_schema.json") {
|
|
79
|
+
return full;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
} catch {}
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
|
|
27
86
|
const detected = detectFrameworkDir();
|
|
28
87
|
if (!detected) {
|
|
29
|
-
console.error("❌ No framework agents/
|
|
30
|
-
console.error(` Looked for: ${FRAMEWORK_CANDIDATES.map((d) => `${d}/agents`).join(", ")}`);
|
|
88
|
+
console.error("❌ No framework agents/ (skills/plugins) dir with AL schema found. Run: agent-enderun init <adapter>");
|
|
31
89
|
process.exit(1);
|
|
32
90
|
}
|
|
33
91
|
|
|
34
92
|
const { frameworkDir, agentsDir, schemaPath } = detected;
|
|
35
93
|
|
|
36
94
|
console.log(`🛡️ STARTING AUTOMATED AGENT ARMY VALIDATION (${frameworkDir})...`);
|
|
95
|
+
console.log(` Agents: ${agentsDir}`);
|
|
96
|
+
console.log(` Schema: ${schemaPath}`);
|
|
37
97
|
|
|
38
98
|
try {
|
|
39
|
-
if (!fs.existsSync(schemaPath)) {
|
|
40
|
-
console.error(`❌ Schema missing: ${schemaPath}`);
|
|
41
|
-
process.exit(1);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
99
|
const schema = JSON.parse(fs.readFileSync(schemaPath, "utf8"));
|
|
45
|
-
const requiredKeys = schema.required;
|
|
100
|
+
const requiredKeys = schema.required || ["name", "description"];
|
|
46
101
|
const files = fs.readdirSync(agentsDir);
|
|
47
102
|
let totalFailed = 0;
|
|
48
103
|
|
|
@@ -67,45 +122,65 @@ try {
|
|
|
67
122
|
yamlContent.split("\n").forEach((line) => {
|
|
68
123
|
const [key, ...valParts] = line.split(":");
|
|
69
124
|
if (key && valParts.length > 0) {
|
|
125
|
+
const k = key.trim();
|
|
70
126
|
let val = valParts.join(":").trim();
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
127
|
+
if (val.startsWith("[") && val.endsWith("]")) {
|
|
128
|
+
try { val = JSON.parse(val.replace(/'/g, "\"")); } catch { /* ignore */ }
|
|
129
|
+
} else if (val === "") {
|
|
130
|
+
val = {};
|
|
131
|
+
}
|
|
132
|
+
if (typeof val === "string" && !isNaN(val) && val !== "") {
|
|
133
|
+
agent[k] = Number(val);
|
|
74
134
|
} else {
|
|
75
|
-
agent[
|
|
135
|
+
agent[k] = val;
|
|
76
136
|
}
|
|
77
137
|
}
|
|
78
138
|
});
|
|
79
139
|
|
|
80
|
-
//
|
|
81
|
-
if (
|
|
82
|
-
const
|
|
83
|
-
if (
|
|
84
|
-
agent.
|
|
85
|
-
} else {
|
|
86
|
-
agent.capability = 9; // Clean fallback
|
|
140
|
+
// AL fields (stateMachine + tags) – the key part of this validator
|
|
141
|
+
if (yamlContent.includes("stateMachine:") && yamlContent.includes("schemaRef:")) {
|
|
142
|
+
const schemaMatch = yamlContent.match(/schemaRef:\s*"(.*)"/);
|
|
143
|
+
if (schemaMatch) {
|
|
144
|
+
agent.stateMachine = { schemaRef: schemaMatch[1] };
|
|
87
145
|
}
|
|
88
146
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
147
|
+
|
|
148
|
+
if (typeof agent.tags === "string" && agent.tags.startsWith("[")) {
|
|
149
|
+
try { agent.tags = JSON.parse(agent.tags.replace(/'/g, "\"")); } catch { /* ignore */ }
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (agent.name === undefined) {
|
|
153
|
+
const nameMatch = yamlContent.match(/name:\s*(.*)/);
|
|
154
|
+
if (nameMatch) agent.name = nameMatch[1].trim().replace(/^['"]|['"]$/g, "");
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Registry cross-check (optional but nice)
|
|
158
|
+
const registryPath = path.resolve(frameworkDir, "registry/agents.yaml");
|
|
159
|
+
let registryApproved = true;
|
|
160
|
+
if (fs.existsSync(registryPath)) {
|
|
161
|
+
const registry = fs.readFileSync(registryPath, "utf8");
|
|
162
|
+
if (!registry.includes(`name: ${agent.name}`)) {
|
|
163
|
+
registryApproved = false;
|
|
95
164
|
}
|
|
96
165
|
}
|
|
97
166
|
|
|
98
167
|
const missing = requiredKeys.filter((k) => agent[k] === undefined);
|
|
168
|
+
if (!registryApproved) missing.push("Registry (not found)");
|
|
169
|
+
|
|
170
|
+
if (agent.stateMachine && typeof agent.stateMachine !== "object") {
|
|
171
|
+
missing.push("stateMachine (invalid)");
|
|
172
|
+
}
|
|
173
|
+
if (!agent.tags || !Array.isArray(agent.tags)) {
|
|
174
|
+
missing.push("tags (missing)");
|
|
175
|
+
}
|
|
99
176
|
|
|
100
177
|
if (missing.length > 0) {
|
|
101
|
-
console.log(
|
|
102
|
-
`| ${fileName.replace(".md", "").padEnd(9)} | ❌ FAILED | ----- | ${`Missing: ${missing.join(",")}`.slice(0, 16)} |`,
|
|
103
|
-
);
|
|
178
|
+
console.log(`| ${fileName.replace(".md", "").padEnd(9)} | ❌ FAILED | ----- | ${missing.join(",").slice(0, 16)} |`);
|
|
104
179
|
totalFailed++;
|
|
105
180
|
} else {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
);
|
|
181
|
+
const displayCap = agent.capability || "-";
|
|
182
|
+
const displayRole = (agent.role || agent.name || "").substring(0, 14);
|
|
183
|
+
console.log(`| ${agent.name.padEnd(9)} | ✅ PASSED | ${String(displayCap).padEnd(5)} | ${displayRole.padEnd(14)} |`);
|
|
109
184
|
}
|
|
110
185
|
}
|
|
111
186
|
|
|
@@ -114,7 +189,7 @@ try {
|
|
|
114
189
|
console.error(`❌ Validation failed! Detected ${totalFailed} invalid agent configurations.`);
|
|
115
190
|
process.exit(1);
|
|
116
191
|
} else {
|
|
117
|
-
console.log("🎉 SUCCESS: All core agents comply with the Master Agent Army Schema!");
|
|
192
|
+
console.log("🎉 SUCCESS: All core agents comply with the Master Agent Army Schema (AL ready)!");
|
|
118
193
|
}
|
|
119
194
|
} catch (e) {
|
|
120
195
|
console.error("❌ Critical error during schema validation:", e);
|
package/docs/getting-started.md
CHANGED
|
@@ -11,3 +11,12 @@ This guide is prepared for developers who want to set up Agent Enderun in a new
|
|
|
11
11
|
- `@manager` manages the project automatically in every session.
|
|
12
12
|
|
|
13
13
|
**Congratulations!** You can now start developing professional software with Agent Enderun.
|
|
14
|
+
|
|
15
|
+
### 🛡️ Agent Lifecycle (AL) & Init Compatibility
|
|
16
|
+
After running `init`, your agent army definitions are automatically set up with full **Agent Lifecycle (AL)** support (stateMachine + tags).
|
|
17
|
+
|
|
18
|
+
- The `agent-enderun check` command now **automatically runs AL validation** (via `bin/validate-agent-army.js`).
|
|
19
|
+
- This ensures that no matter which adapter you used (`antigravity`, `grok`, `gemini`, etc.), the agents are compliant with the lifecycle states (IDLE → BRIEFED → EXECUTING → DONE/BLOCKED etc.).
|
|
20
|
+
- You can also run manually: `node bin/validate-agent-army.js`
|
|
21
|
+
|
|
22
|
+
> **Tip:** Always run `agent-enderun check` after init or major changes to verify AL compliance.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-enderun",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
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.6",
|
|
86
86
|
"initializedAt": "2026-05-31T09:58:25.773Z"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {}
|
package/src/cli/adapters.ts
CHANGED
|
@@ -4,7 +4,7 @@ import fs from "fs";
|
|
|
4
4
|
import { findClaudeConfigPath, addMcpServerToClaude } from "./utils/claude.js";
|
|
5
5
|
import { writeJsonFile, writeTextFile } from "./utils/fs.js";
|
|
6
6
|
|
|
7
|
-
export const ADAPTER_IDS = ["gemini", "claude", "grok", "antigravity", "antigravity-cli"] as const;
|
|
7
|
+
export const ADAPTER_IDS = ["gemini", "claude", "grok", "cursor", "codex", "antigravity", "antigravity-cli"] as const;
|
|
8
8
|
export type AdapterId = (typeof ADAPTER_IDS)[number];
|
|
9
9
|
|
|
10
10
|
export interface AdapterConfig {
|
|
@@ -30,7 +30,21 @@ export const ADAPTERS: Record<AdapterId, AdapterConfig> = {
|
|
|
30
30
|
claude: {
|
|
31
31
|
id: "claude",
|
|
32
32
|
frameworkDir: ".claude",
|
|
33
|
-
shimFile: "
|
|
33
|
+
shimFile: "CLAUDE.md",
|
|
34
|
+
templateDir: ".enderun",
|
|
35
|
+
nestedDirs: ["agents", "skills", "knowledge"],
|
|
36
|
+
},
|
|
37
|
+
cursor: {
|
|
38
|
+
id: "cursor",
|
|
39
|
+
frameworkDir: ".enderun",
|
|
40
|
+
shimFile: ".cursor/rules/global.mdc",
|
|
41
|
+
templateDir: ".enderun",
|
|
42
|
+
nestedDirs: ["agents", "skills", "knowledge"],
|
|
43
|
+
},
|
|
44
|
+
codex: {
|
|
45
|
+
id: "codex",
|
|
46
|
+
frameworkDir: ".enderun",
|
|
47
|
+
shimFile: ".github/copilot-instructions.md",
|
|
34
48
|
templateDir: ".enderun",
|
|
35
49
|
nestedDirs: ["agents", "skills", "knowledge"],
|
|
36
50
|
},
|
|
@@ -61,13 +75,18 @@ export const ADAPTERS: Record<AdapterId, AdapterConfig> = {
|
|
|
61
75
|
* All framework runtime directories (for discovery).
|
|
62
76
|
* Verified against 2026 industry standards.
|
|
63
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* All framework runtime directories (for discovery).
|
|
80
|
+
* Verified against 2026 industry standards.
|
|
81
|
+
* Includes .agent for direct antigravity adapter installs.
|
|
82
|
+
*/
|
|
64
83
|
export const FRAMEWORK_DIR_CANDIDATES = [
|
|
65
|
-
".agent",
|
|
66
84
|
".agents",
|
|
67
85
|
".gemini",
|
|
68
86
|
".claude",
|
|
69
87
|
".grok",
|
|
70
88
|
".enderun",
|
|
89
|
+
".agent", // direct antigravity installs (agents live under skills/)
|
|
71
90
|
] as const;
|
|
72
91
|
|
|
73
92
|
const SHIM_FILES = ADAPTER_IDS.map((id) => ADAPTERS[id].shimFile);
|
|
@@ -2,13 +2,15 @@ import fs from "fs";
|
|
|
2
2
|
import path from "path";
|
|
3
3
|
import { execSync } from "child_process";
|
|
4
4
|
|
|
5
|
-
import { getFrameworkDir, getConfiguredPaths } from "../utils/memory.js";
|
|
5
|
+
import { getFrameworkDir, getConfiguredPaths, getMemoryPath } from "../utils/memory.js";
|
|
6
6
|
import { getPackageVersion } from "../utils/pkg.js"; // To get FRAMEWORK_VERSION
|
|
7
7
|
|
|
8
8
|
const FRAMEWORK_VERSION = getPackageVersion();
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Check framework health and MCP status.
|
|
12
|
+
* Now also runs full AL (Agent Lifecycle) army validation so that
|
|
13
|
+
* `agent-enderun check` guarantees that init setups are AL-compliant.
|
|
12
14
|
*/
|
|
13
15
|
export function checkCommand() {
|
|
14
16
|
console.warn(`🔍 Checking Agent Enderun Health (v${FRAMEWORK_VERSION})...`);
|
|
@@ -16,20 +18,23 @@ export function checkCommand() {
|
|
|
16
18
|
|
|
17
19
|
const frameworkDir = getFrameworkDir();
|
|
18
20
|
const pathsMap = getConfiguredPaths();
|
|
21
|
+
const memoryPath = getMemoryPath();
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
console.warn(` Using framework dir: ${frameworkDir} (AL cross-adapter aware)`);
|
|
24
|
+
|
|
25
|
+
// Determine folder names based on adapter detection (AL + cross-adapter support)
|
|
21
26
|
let knowledgeDir = "knowledge";
|
|
22
|
-
if (frameworkDir === ".agent") {
|
|
27
|
+
if (frameworkDir === ".agents" || frameworkDir === ".agent") {
|
|
23
28
|
knowledgeDir = "rules";
|
|
24
29
|
}
|
|
25
|
-
|
|
30
|
+
|
|
26
31
|
const constitutionPath = fs.existsSync(path.join(process.cwd(), "ENDERUN.md"))
|
|
27
32
|
? "ENDERUN.md"
|
|
28
33
|
: path.join(frameworkDir, "ENDERUN.md");
|
|
29
34
|
|
|
30
35
|
const checks = [
|
|
31
36
|
{ name: "Constitution (ENDERUN.md)", path: constitutionPath },
|
|
32
|
-
{ name: "Memory (PROJECT_MEMORY.md)", path: path.
|
|
37
|
+
{ name: "Memory (PROJECT_MEMORY.md)", path: path.relative(process.cwd(), memoryPath) },
|
|
33
38
|
{ name: "Command Map (cli-commands.json)", path: path.join(frameworkDir, "cli-commands.json") },
|
|
34
39
|
{ name: "Framework Config (config.json)", path: path.join(frameworkDir, "config.json") },
|
|
35
40
|
{ name: "Agent Status (STATUS.md)", path: path.join(frameworkDir, "STATUS.md") },
|
|
@@ -83,6 +88,21 @@ export function checkCommand() {
|
|
|
83
88
|
}
|
|
84
89
|
}
|
|
85
90
|
|
|
91
|
+
// === AL (Agent Lifecycle) Army Validation ===
|
|
92
|
+
// This makes `agent-enderun check` also enforce that init'ed agents are AL-compliant
|
|
93
|
+
// (stateMachine + tags present and parseable). Works across adapters (skills/plugins/agents).
|
|
94
|
+
console.warn("\n🛡️ Running Agent Army AL Compliance (validate-agent-army)...");
|
|
95
|
+
try {
|
|
96
|
+
execSync("node bin/validate-agent-army.js", { stdio: "pipe" });
|
|
97
|
+
console.warn("✅ Agent Army AL validation PASSED (all agents have stateMachine + tags).");
|
|
98
|
+
} catch (err) {
|
|
99
|
+
console.warn("❌ Agent Army AL validation FAILED.");
|
|
100
|
+
console.warn(" Run manually: node bin/validate-agent-army.js");
|
|
101
|
+
console.warn(" This usually means your init used an adapter that remapped agents (e.g. antigravity → skills).");
|
|
102
|
+
console.warn(" The core .md definitions should still be correct; the standalone validator just couldn't locate them.");
|
|
103
|
+
issues++;
|
|
104
|
+
}
|
|
105
|
+
|
|
86
106
|
if (issues === 0) {
|
|
87
107
|
console.warn("\n🚀 All systems green! Agent Enderun is ready for orchestration.");
|
|
88
108
|
} else {
|