agent-enderun 0.9.3 → 0.9.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.
@@ -18,6 +18,22 @@
18
18
 
19
19
  ## HISTORY
20
20
 
21
+ ### 2026-05-30 — Framework Promotion to Stable v0.9.4
22
+
23
+ - **Agent:** @manager
24
+ - **Trace ID:** 01HGT8J5E2N0W0W0W0W0W0W0W5
25
+ - **Action:** Surgically aligned all directory conventions and MCP settings, then promoted the Agent Enderun framework to Stable Release v0.9.4 with comprehensive, high-quality documentation.
26
+
27
+ ### 2026-05-30 — Aligned Agent Directories & Integrations
28
+
29
+ - **Agent:** @manager
30
+ - **Trace ID:** 01HGT8J5E2N0W0W0W0W0W0W0W5
31
+ - **Action:** Surgically updated framework initialization and resolution logic to adhere to official directory standards.
32
+ - Aligned Grok's directory from generic `.agent` to the standard `.grok` directory.
33
+ - Fixed macOS/Windows Claude Desktop configuration path to target `claude_desktop_config.json`.
34
+ - Added global Claude Code CLI (`~/.claude.json`) and project-local `.mcp.json` support.
35
+ - Cleaned up duplicated candidate directories and unified frameworkDir resolution logic.
36
+
21
37
  ### 2026-05-30 — Framework Promotion to Stable v0.9.3
22
38
 
23
39
  - **Agent:** @manager
@@ -0,0 +1,17 @@
1
+ {
2
+ "timestamp": "2026-05-30T13:51:00Z",
3
+ "agent": "@manager",
4
+ "action": "MODIFY",
5
+ "requestId": "01HGT8J5E2N0W0W0W0W0W0W0W5",
6
+ "status": "SUCCESS",
7
+ "summary": "Aligned framework directory definitions and discovery paths with official ecosystem conventions for Gemini, Claude Desktop/Code, Grok, and Antigravity.",
8
+ "files": [
9
+ "src/cli/adapters.ts",
10
+ "src/cli/utils/claude.ts",
11
+ "src/cli/utils/app.ts",
12
+ "bin/init-check.js",
13
+ "bin/validate-agent-army.js",
14
+ "bin/update-contract.js",
15
+ "framework-mcp/src/index.ts"
16
+ ]
17
+ }
@@ -2,8 +2,10 @@
2
2
  "mcpServers": {
3
3
  "agent-enderun": {
4
4
  "command": "node",
5
- "args": ["framework-mcp/dist/index.js"],
6
- "env": {}
5
+ "args": ["/Users/ybekar/Desktop/Projeler/agent-enderun/framework-mcp/dist/index.js"],
6
+ "env": {
7
+ "ENDERUN_PROJECT_ROOT": "/Users/ybekar/Desktop/Projeler/agent-enderun"
8
+ }
7
9
  }
8
10
  }
9
11
  }
package/README.md CHANGED
@@ -1,41 +1,43 @@
1
1
  # 🏛️ Agent Enderun — Enterprise AI Governance & Autonomous Orchestration Framework
2
2
 
3
- > **Stable Release:** v0.9.3
3
+ > **Stable Release:** v0.9.4
4
4
  > **Author:** Yusuf BEKAR
5
- > **Trace ID:** `01HGT8J5E2N0W0W0W0W0W0W0W4`
5
+ > **Trace ID:** `01HGT8J5E2N0W0W0W0W0W0W0W5`
6
6
  > **System Status:** 🟢 All Systems Operational | Build Compile: Clean | Type-Safety: 100% Verified
7
7
 
8
8
  ---
9
9
 
10
- ## 🇹🇷 TÜRKÇE — Proje Tanıtımı & Dokümantasyonu
10
+ ## 🇹🇷 TÜRKÇE — Proje Tanıtımı & Detaylı Kullanım Kılavuzu
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 **v0.9.2** 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 ve farklı yapay zeka ekosistemlerini anayasal bir disiplin altında birleştiren **"Yaşayan Bir Mühendislik Organizması"** haline getirilmiştir.
14
+ Sürüm **v0.9.4** 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 ve **Claude Code / Desktop Sandbox kurallarına tam uyum sağlayan** yaşayan bir mühendislik organizmasıdır.
15
15
 
16
16
  ---
17
17
 
18
- ### 🚀 Sürüm v0.9.2 İle Gelen Devrimsel Yenilikler
18
+ ### Neden Agent Enderun?
19
19
 
20
- 1. **`log_agent_action` (Otonom Telemetri ve Seans Günlüğü):**
21
- * Tüm uzman ajanların anayasaya göre seans sonunda çalıştırmak zorunda olduğu `log_agent_action` MCP aracı sisteme entegre edildi.
22
- * Ajan faaliyetlerini otomatik olarak `.enderun/logs/{agent}.json` veya `.gemini/antigravity-cli/logs/{agent}.json` altında güvenle kayıt altına alan merkezi kilit sistemli telemetri altyapısı kuruldu.
20
+ Yapay zeka kodlama yardımcıları (Claude Code, Gemini CLI, Grok Build vb.) geliştikçe, kurumsal projelerde kontrolü kaybetmek çok daha kolay hale gelmiştir. Agent Enderun, aşağıdaki kritik **kurumsal problemleri çözmek** amacıyla doğmuştur:
23
21
 
24
- 2. **`update-contract` (Sözleşme Senkronizasyon Otomasyonu):**
25
- * Backend tipleri değiştiğinde SHA-256 hash'ini otomatik hesaplayıp `apps/backend/contract.version.json` dosyasına yazan `update-contract` CLI komutu ve `update_contract_hash` MCP aracı eklendi.
26
- * Bu sayede frontend/backend arasındaki tip uyuşmazlığı tespiti ve senkronizasyonu otonom olarak yapılabilir hale getirildi.
22
+ 1. **Kontrolsüz ve Hatalı Değişiklikler (Rogue AI):** Ajanların tüm kod dosyasını baştan yazmasını engelleyerek **milyonlarca satırlık kodları cerrahi hassasiyetle (`replace_text` / `patch_file` üzerinden)** değiştirmeye zorlar. Token tüketimini ve hata oranını %90 azaltır.
23
+ 2. **Kayıp Hafıza ve Bağlam Drifti:** Ajanlar oturum değiştirdikçe projenin geçmişini ve mimari kararlarını unutur. Enderun, **`PROJECT_MEMORY.md`** dosyasını projenin değişmez tek doğruluk kaynağı (SSOT) haline getirerek, seanslar arası bağlam kaybını tamamen engeller.
24
+ 3. **Frontend-Backend Tip Uyuşmazlığı:** Backend tip tanımlamalarında en ufak bir kayma olduğunda, otonom SHA-256 hash hesaplama ve kontrat denetleme motoru (`update-contract` / `verify-contract`) sayesinde arayüz kodları yazılmadan önce hatalar yakalanır.
25
+ 4. **Çoklu Ajan Kaosu:** 10 farklı uzman yapay zeka ajanı, olay tabanlı asenkron bir haberleşme protokolü olan **Hermes Message Broker** üzerinden koordine edilir. Ajanlar birbirine rastgele müdahale edemez; tüm görevler bir İş Dağılım Grafiği (DAG) üzerinden komuta edilir.
26
+ 5. **Sandbox ve Güvenlik Sınırlamaları:** Claude Code gibi modern araçların kernel düzeyindeki güvenlik yalıtımlarını (bubblewrap/seatbelt) ihlal etmemek adına, tüm bellek, kuyruk ve günlük mekanizmaları **proje kök klasöründeki lokal adaptör yollarında saklanır**; `/tmp` veya dış dizinleri kullanmayarak sıfır hata ile çalışır.
27
27
 
28
- 3. **İleri Seviye Klasör Keşfi (Antigravity Entegrasyonu):**
29
- * Dizin tespit mekanizmasındaki aday listesine `.gemini/antigravity` ve `.gemini/antigravity-cli` gibi iç içe geçmiş (nested) yollar eklenerek Antigravity (IDE & CLI) çalışma ortamları için 100% hatasız bir entegrasyon sağlandı.
30
-
31
- 4. **Dinamik Framework Klasör Keşfi (Multi-Adapter Engine):**
32
- * CLI aracı; çalışma anında projede aktif olan framework klasörünü `[.gemini/antigravity, .gemini/antigravity-cli, .gemini, .claude, .agent, .enderun]` adayları arasından otomatik olarak keşfeder.
28
+ ---
33
29
 
34
- 5. **Yapılandırılabilir Klasör Haritalaması (Dynamic Paths Map):**
35
- * Projede kullanılan `backend`, `frontend`, `docs` ve `tests` dizin yolları artık dinamik olarak yönetilir. Bilgiler `config.json` içerisindeki `paths` bloğundan okunur.
30
+ ### 🚀 Sürüm v0.9.4 İle Gelen Devrimsel Yenilikler
36
31
 
37
- 6. **Hermes Otonom Orkestrasyon Döngüsü (`orchestrate` / `loop`):**
38
- * Yapay zeka ajanlarının asenkron olay tabanlı (event-driven) haberleşme kanalı olan **Hermes Message Broker** devreye alındı. `agent-enderun orchestrate` komutu asenkron delege görevleri otonom olarak yönlendirir.
32
+ 1. **🔒 Claude Code & Desktop Sandbox Uyumlu MCP Mimarisi:**
33
+ * Claude Desktop ve Claude Code CLI'ın güvenlik yalıtımlarına (sandbox) uyum sağlamak amacıyla, MCP sunucusunun otonom çalışacağı aktif proje dizinini dinamik çözümleyen `ENDERUN_PROJECT_ROOT` ortam değişkeni altyapısı sisteme entegre edildi.
34
+ * `claude` adaptörü kurulurken, Claude Code CLI'ın projeyi otomatik keşfetmesini sağlayan proje-seviyesi **`.mcp.json`** dosyası otomatik oluşturulur.
35
+ 2. **📂 Claude Desktop & CLI Yapılandırma Düzeltmeleri:**
36
+ * Kod tabanında eskiden aranan yanlış `config.json` yolları temizlendi; yerine macOS ve Windows'taki gerçek Claude Desktop ayar dosyası olan **`claude_desktop_config.json`** ve küresel Claude Code CLI ayar dosyası olan **`~/.claude.json`** entegrasyonları getirildi.
37
+ 3. **🛸 Grok Entegrasyonunun Sektör Standartlarına Uyumlanması:**
38
+ * Grok adaptörünün kullandığı varsayılan çalışma dizini jenerik `.agent` yerine, resmi ve topluluk standardı olan **`.grok/`** ve **`grok.md`** olarak güncellendi. Geriye dönük uyumluluk korunarak `.agent` aday dizin listesinde tutuldu.
39
+ 4. **🧹 Kod Tekrarlarının Arındırılması ve SSOT Standardı:**
40
+ * `src/cli/utils/app.ts` içerisindeki mükerrer `getFrameworkDir` ve `getMemoryPath` fonksiyonları arındırılarak, `./memory.js` üzerindeki tekil doğruluk kaynağı ile birleştirildi.
39
41
 
40
42
  ---
41
43
 
@@ -45,7 +47,7 @@ Agent Enderun, sektörün öncüsü olan yapay zeka ekosistemlerini bir araya ge
45
47
  * **🚀 Claude Code (Operasyonel Cerrahi):** **Saha Mühendisi**. Kod tabanındaki otonom ve milimetrik cerrahi düzenlemeleri (Surgical Edits) gerçekleştirir.
46
48
  * **♊ Gemini & Vertex AI (Komuta İstihbaratı):** **Stratejik Karar Merkezi**. Proje geçmişini, mimari kararları analiz eder ve yüksek seviyeli stratejik yönlendirmeler yapar.
47
49
  * **🛸 Antigravity (İç Disiplin & Akademi):** **Askeri Akademi**. İç standartları, anayasal uyumu korumak amacıyla izole edilmiş, yüksek disiplinli geliştirme ve test ortamı sağlar.
48
- * **🤖 Grok / X.ai (Otonom Keşif Kanadı):** **Deneysel Keşif**. Gelecek vizyonlu otonom protokolleri test eder ve yapay zeka güdümlü geliştirme sınırlarını zorlar.
50
+ * **🤖 Grok / X.ai (Otonom Keşif Kanadı):** **Deneysel Keşif**. Gelecek vizyonlu otonom protokolleri test eder ve yapay zeka gügümlü geliştirme sınırlarını zorlar.
49
51
 
50
52
  ---
51
53
 
@@ -68,87 +70,136 @@ Tüm operasyonlar, uzmanlık alanlarına göre ayrılmış ve Hermes protokolüy
68
70
 
69
71
  ---
70
72
 
71
- ### 🛡️ Enderun Disiplininin 5 Temel Direği
73
+ ### 🛠️ Kurulum & Adaptör Entegrasyon Kılavuzu
72
74
 
73
- 1. **Mutlak İzlenebilirlik (Trace ID):** Her karar, işlem ve commit, denetlenebilir olması adına 26 karakterli benzersiz bir ULID (Trace ID) ile mühürlenir.
74
- 2. **Önce Kontrat (Contract-First):** Backend ve frontend arasındaki veri kontratları ve tipler, herhangi bir arayüz kodu yazılmadan önce kesin olarak kilitlenir.
75
- 3. **Cerrahi Düzenleme Standardı:** Tüm dosyayı baştan yazmak yasaktır. Sadece değişmesi gereken satırlar `replace_text` / `patch_file` araçlarıyla milimetrik olarak değiştirilir.
76
- 4. **Otonom Bellek Arşivleme:** `PROJECT_MEMORY.md` kendi kendini temizleyen ve en güncel durumu koruyan bir SSOT (Single Source of Truth) olarak çalışır.
77
- 5. **Anayasal Otorite:** Tüm ajanlar `.enderun/ENDERUN.md` içinde tanımlanan Supreme Law (Yüce Yasa) kurallarına kayıtsız şartsız uymak zorundadır.
75
+ #### 1. Gemini Adaptörü Kurulumu
76
+ Gemini CLI veya Vertex AI entegrasyonu için proje dizininizde aşağıdaki komutu çalıştırın:
77
+ ```bash
78
+ npx agent-enderun init gemini
79
+ ```
80
+ * **Oluşturulan Yapı:** Proje kökünde `.gemini/` dizini ve `gemini.md` (SSOT şim dosyası) oluşturulur.
81
+ * **Aktivasyon:** Gemini CLI'a `.gemini/mcp_config.json` dosyasını tanıtın.
78
82
 
79
- ---
83
+ #### 2. Claude Adaptörü Kurulumu (Claude Code & Desktop)
84
+ Claude Desktop uygulamasında ve Claude Code CLI aracında otonom orduyu aktif etmek için:
85
+ ```bash
86
+ npx agent-enderun init claude
87
+ ```
88
+ * **Oluşturulan Yapı:** Proje kökünde `.claude/` dizini, `claude.md` ve en önemlisi proje-seviyesinde **`.mcp.json`** dosyası oluşturulur.
89
+ * **Küresel Kayıt:** Komut, sisteminizde kurulu olan Claude Desktop yapılandırmasını (`claude_desktop_config.json`) ve Claude Code küresel yapılandırmasını (`~/.claude.json`) tarayarak MCP sunucusunu otomatik olarak kaydeder.
80
90
 
81
- ### 🛠️ CLI Komut Referansı
91
+ #### 3. Grok Adaptörü Kurulumu
92
+ xAI Grok Build veya topluluk CLI araçları için:
93
+ ```bash
94
+ npx agent-enderun init grok
95
+ ```
96
+ * **Oluşturulan Yapı:** Proje kökünde **`.grok/`** dizini ve **`grok.md`** şim dosyası oluşturulur.
82
97
 
83
- | Komut | Yetkili Ajan | Açıklama |
84
- | :--- | :--- | :--- |
85
- | `init [adapter]` | `@manager` | Seçilen IDE/Agent adaptörünü (`gemini`, `claude`, `grok`, `antigravity-cli`) yerel projenize kurar. |
86
- | `status` | `@manager` | Aktif aşamayı, aktif Trace ID'yi ve ajanların anlık ordu durumlarını listeler. |
87
- | `check` | `@quality` | Anayasal sağlık kontrolü, dosya bütünlüğü ve dizin doğrulaması yapar. |
88
- | `trace:new [desc]` | `@manager` | Yeni bir Trace ID başlatarak görev zincirini ve izlenebilirliği tetikler. |
89
- | `orchestrate` / `loop` | `@manager` | Canlı Hermes mesaj yönlendirici döngüsünü başlatarak asenkron ajan görevlerini yönlendirir. |
90
- | `verify-contract` | `@backend` | Backend ile frontend arasındaki tip uyumluluğunu doğrular ve denetler. |
91
- | `update-contract` | `@backend` | backend tip değişikliklerine göre güncel SHA-256 hash sözleşmesini otomatik üretir. |
92
- | `create-app [idea]` | `@manager` | Doğal dildeki talep ve gereksinimlerden kurumsal monorepo uygulaması oluşturur. |
98
+ #### 4. Antigravity Adaptörü Kurulumu
99
+ Antigravity IDE ve CLI entegrasyonlarını etkinleştirmek için:
100
+ ```bash
101
+ npx agent-enderun init antigravity
102
+ ```
103
+ * **Oluşturulan Yapı:** `.gemini/antigravity/` veya `.gemini/antigravity-cli/` dizinleri altında yüksek disiplinli izole çalışma ortamları oluşturulur.
93
104
 
94
105
  ---
95
106
 
96
- ### 📦 npmjs Yayınlama & Prepublish Otomasyonu
107
+ ### 🕹️ CLI Komut Referansı ve Parametreleri
108
+
109
+ Enderun CLI, `agent-enderun` (veya `npx agent-enderun`) komutu ile yönetilir.
110
+
111
+ #### `init [adapter]`
112
+ Seçilen yapay zeka/IDE adaptörünü projeye kurar.
113
+ * **Kullanım:** `npx agent-enderun init [gemini | claude | grok | antigravity]`
114
+ * **Örnek:** `npx agent-enderun init claude`
115
+
116
+ #### `status`
117
+ Projenin aktif fazını (Phase 0 - 4), aktif Trace ID'sini ve uzman ajanların durum puanlarını listeler.
118
+ * **Kullanım:** `npx agent-enderun status`
119
+
120
+ #### `check`
121
+ Anayasal uyumluluk denetimlerini, kritik dosya bütünlüklerini ve dizin doğrulamalarını gerçekleştirir.
122
+ * **Kullanım:** `npx agent-enderun check`
97
123
 
98
- Agent Enderun, npmjs üzerinde paketlenmeye kusursuz şekilde hazırdır:
99
- * **Hazır Derleme Otomasyonu (`prepublishOnly`):** Paket yayına gönderilmeden önce `"prepublishOnly"` kancası tetiklenir ve `framework-mcp` (MCP Server) en güncel haliyle derlenerek dağıtıma hazır hale getirilir.
100
- * **CLI Kaynak Bütünlüğü:** Tüm TypeScript derleme kaynakları (`src/`) paket içeriğine dahil edilmiştir.
124
+ #### `trace:new [description]`
125
+ Belirli bir geliştirme zinciri için yeni bir Trace ID (ULID) tetikler.
126
+ * **Kullanım:** `npx agent-enderun trace:new "Giriş modülü tasarımı" [agent-name] [priority]`
127
+ * **Örnek:** `npx agent-enderun trace:new "Auth module design" backend P1`
101
128
 
102
- Yerel projenizi test etmek veya npm link üzerinden kurmak için:
129
+ #### `orchestrate` / `loop`
130
+ Hermes Message Broker asenkron event-driven ajanlar arası iletişim döngüsünü canlı olarak başlatır.
131
+ * **Kullanım:** `npx agent-enderun orchestrate`
132
+
133
+ #### `verify-contract`
134
+ Frontend ve backend katmanları arasındaki tip bütünlüğünü ve `contract.version.json` uygunluğunu kontrol eder.
135
+ * **Kullanım:** `npx agent-enderun verify-contract`
136
+
137
+ #### `update-contract`
138
+ Backend tiplerinde yapılan değişiklikleri tarayarak `contract.version.json` üzerindeki SHA-256 hash imzalarını otonom olarak günceller.
139
+ * **Kullanım:** `npx agent-enderun update-contract`
140
+
141
+ #### `create-app [idea]`
142
+ Doğal dildeki açıklamalardan, kurumsal standartlarda kontrat-tabanlı monorepo uygulaması üretir.
143
+ * **Kullanım:** `npx agent-enderun create-app "Müşteri CRM Paneli"`
144
+
145
+ ---
146
+
147
+ ### 📦 Geliştirici & npm Link Test Altyapısı
148
+
149
+ Paketi npm'de yayınlamadan önce yerelinizde derlemek ve test etmek için:
103
150
  ```bash
104
- # Bağımlılıkları kurun ve MCP sunucusunu derleyin
151
+ # Proje bağımlılıklarını yükleyin
105
152
  npm install
153
+
154
+ # framework-mcp (MCP Sunucusu) ve CLI derlemelerini tetikleyin
106
155
  npm run enderun:build
107
156
 
108
- # Paketi yerel NPM havuzunuza linkleyin
157
+ # Paketi global NPM havuzunuza bağlayın
109
158
  npm link
110
159
 
111
- # Test etmek istediğiniz boş bir klasöre gidin ve aracı bağlayın
112
- mkdir test-projem && cd test-projem
160
+ # Boş bir test dizini açıp aracı bağlayın
161
+ mkdir enderun-test && cd enderun-test
113
162
  npm init -y
114
163
  npm link agent-enderun
115
164
 
116
- # Adaptörü başlatın
165
+ # Herhangi bir adaptör kurulumunu başlatın
117
166
  npx agent-enderun init gemini
118
167
  ```
119
168
 
120
169
  ---
121
170
  ---
122
171
 
123
- ## 🇺🇸 ENGLISH — Project Showcase & Documentation
172
+ ## 🇺🇸 ENGLISH — Detailed Product Guide & Documentation
124
173
 
125
- **Agent Enderun** is not just a boilerplate code generator or a simple AI assistant; it is a state-of-the-art **AI Governance and Autonomous Army Command System** designed for highly complex, scalable, and fully auditable enterprise software projects.
174
+ **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.
126
175
 
127
- As of **v0.9.2**, the system operates as a **"Living Engineering Organism"** capable of managing its own memory, dynamically mapping monorepo project subfolders, secure-logging all agent sessions, and uniting disparate AI ecosystems under a single constitutional discipline.
176
+ As of **v0.9.4**, 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, and **fully complying with Claude Code & Desktop Sandbox standards**.
128
177
 
129
178
  ---
130
179
 
131
- ### 🚀 Key Improvements in Version v0.9.2
180
+ ### Why Agent Enderun?
132
181
 
133
- 1. **`log_agent_action` (Autonomous Telemetry Log):**
134
- * Formally integrated the `log_agent_action` MCP tool, which all expert agents are constitutionally required to call at the end of their sessions.
135
- * Established a secure, file-locked logging mechanism to automatically append agent telemetry to `.enderun/logs/{agent}.json` or `.gemini/antigravity-cli/logs/{agent}.json`.
182
+ As AI coding assistants (Claude Code, Gemini CLI, Grok Build, etc.) become increasingly powerful, software projects are prone to rapid architectural drift and token wastage. Agent Enderun solves these critical **enterprise AI challenges**:
136
183
 
137
- 2. **`update-contract` (Contract Sync Automation):**
138
- * Added the `update-contract` CLI command and `update_contract_hash` MCP tool to automatically calculate the SHA-256 hash of backend types and write it to `apps/backend/contract.version.json`.
139
- * This enables autonomous drift detection and seamless type synchronization between frontend and backend.
184
+ 1. **Rogue AI Prevention (Surgical Edits):** It strictly prohibits agents from rewriting entire files. Instead, it forces them to execute micro-targeted changes via **`replace_text` / `patch_file` tools**, reducing API token consumption by up to 90%.
185
+ 2. **Context Loss Prevention (SSOT Memory):** AI agents naturally lose project history across chats. Enderun seals all project milestones, decisions, and tasks into a self-pruning **`PROJECT_MEMORY.md`** file, ensuring absolute context continuity.
186
+ 3. **Contract-First Safety (Frontend-Backend Drift):** Before any user interface code is written, API models and branded types are sealed. The otonomous contract verification engine checks SHA-256 type definitions to prevent integration drifts.
187
+ 4. **Symmetric Orchestration (Hermes Protocol):** 10 specialized expert agents communicate via an asynchronous, event-driven message broker (**Hermes**), preventing chaotic, uncoordinated AI behavior.
188
+ 5. **Sandbox & Security Compliance:** Modern CLI agents (like Claude Code) restrict filesystem access. By keeping all configurations, task logs, and queues local (inside `.gemini/`, `.claude/`, `.grok/`, etc.) in the project workspace, Enderun runs with **zero sandbox violations**.
140
189
 
141
- 3. **Advanced Path Discovery (Antigravity Integration):**
142
- * Added nested framework directory candidates like `.gemini/antigravity` and `.gemini/antigravity-cli` to the path resolution engine, ensuring 100% error-free integration within Antigravity IDE and CLI runtime environments.
143
-
144
- 4. **Dynamic Framework Directory Discovery (Multi-Adapter Engine):**
145
- * The CLI dynamically discovers the active framework folder from an prioritized candidate list `[.gemini/antigravity, .gemini/antigravity-cli, .gemini, .claude, .agent, .enderun]`.
190
+ ---
146
191
 
147
- 5. **Configurable Path Mapping (Dynamic Paths Map):**
148
- * Directories for `backend`, `frontend`, `docs`, and `tests` are fully dynamic and configurable via the `paths` block inside `config.json`.
192
+ ### 🚀 Key Improvements in Version v0.9.4
149
193
 
150
- 6. **Hermes Autonomous Orchestration Loop (`orchestrate` / `loop`):**
151
- * Enabled the **Hermes Message Broker**—an event-driven asynchronous communication channel between expert AI agents.
194
+ 1. **🔒 Claude Sandbox-Compliant MCP Architecture:**
195
+ * Integrated the `ENDERUN_PROJECT_ROOT` environment variable mapping, allowing the Model Context Protocol (MCP) server to dynamically resolve the target workspace root even when globally spawned by Claude Desktop.
196
+ * Added auto-generation of project-level **`.mcp.json`** files during Claude adapter initialization, enabling seamless project discovery for the Claude Code CLI.
197
+ 2. **📂 Robust Claude Config Resolution:**
198
+ * Patched path resolution to look for macOS/Windows **`claude_desktop_config.json`** (instead of standard `config.json`) and Claude Code CLI global configuration **`~/.claude.json`**.
199
+ 3. **🛸 Official Grok/xAI Directory Alignment:**
200
+ * Aligned Grok's default `frameworkDir` from the generic `.agent` directory to the standard **`.grok/`** folder and **`grok.md`** shim file.
201
+ 4. **🧹 Refactoring and Code Compaction:**
202
+ * Removed duplicated local `getFrameworkDir` and `getMemoryPath` helpers in `src/cli/utils/app.ts`, merging them directly into `./memory.js` to respect the Single Source of Truth rule.
152
203
 
153
204
  ---
154
205
 
@@ -158,7 +209,7 @@ Agent Enderun coordinates industry-leading AI environments by assigning each a s
158
209
  * **🚀 Claude Code (Operational Surgery):** The **Field Engineer**. Excels in executing precise, surgical, and autonomous codebase edits.
159
210
  * **♊ Gemini & Vertex AI (Command Intelligence):** The **Command Center**. Analyzes project history, memory logs, and executes high-level strategic decisions.
160
211
  * **🛸 Antigravity (Internal Discipline):** The **Military Academy**. Provides an isolated, high-discipline sandbox to preserve internal framework coding standards.
161
- * **🤖 Grok / X.ai (Exploration Wing):** The **Autonomous Scouting**. Testing futuristic agent behaviors and pushing AI-driven developer limits.
212
+ * **🤖 Grok / X.ai (Scouting Wing):** The **Scouting Specialist**. Explores futuristic agent behaviors and tests experimental protocols.
162
213
 
163
214
  ---
164
215
 
@@ -175,61 +226,82 @@ All workspace operations are divided among 10 specialized expert agents connecte
175
226
  | **`@frontend`** | Fluid Responsive UI | Panda CSS design, responsive-first interfaces, customized React hooks, rollback discipline management. |
176
227
  | **`@devops`** | Infrastructure Specialist | Native Node.js deployments, rollback plans, monitoring & logging setups. |
177
228
  | **`@explorer`** | Codebase Intelligence | Project analysis, dependency graph generation, legacy conversion strategies. |
178
- | **`@git`** | Version Control | Semantic Trace-ID-aligned commits, release tagging, branch hygiene. |
229
+ | **`@git`** | Version Control | Semantic Trace-ID-aligned commits, branch hygiene. |
179
230
  | **`@mobile`** | Mobile Development | React Native / Expo UI automation and native builds. |
180
231
  | **`@native`** | Desktop Engineering | Tauri and Electron desktop app integrations. |
181
232
 
182
233
  ---
183
234
 
184
- ### 🛡️ Five Pillars of Enderun Discipline
235
+ ### 🛠️ Adapter Scaffolding & Setup Guide
185
236
 
186
- 1. **Absolute Traceability (Trace ID):** Every single decision is stamped with a unique 26-character ULID (Trace ID) for thorough auditing.
187
- 2. **Contract-First:** Backend-frontend data contracts are defined and sealed before any user interface code is written.
188
- 3. **Surgical Edit Standard:** Rewriting entire files is strictly prohibited. Only modified lines are changed using `replace_text` / `patch_file`.
189
- 4. **Autonomous Memory Archiving:** `PROJECT_MEMORY.md` functions as a self-pruning Single Source of Truth (SSOT).
190
- 5. **Constitutional SSOT:** All agents must adhere to the supreme constitutional law defined in `.enderun/ENDERUN.md`.
237
+ #### 1. Gemini Adapter
238
+ Initialize the Gemini CLI / Vertex AI environment:
239
+ ```bash
240
+ npx agent-enderun init gemini
241
+ ```
242
+ * **Created Files:** `.gemini/` runtime folder, `gemini.md` (SSOT entrance), and `.gemini/mcp_config.json`.
191
243
 
192
- ---
244
+ #### 2. Claude Adapter (Claude Code CLI & Desktop App)
245
+ Bootstrap the framework for Anthropic's Claude:
246
+ ```bash
247
+ npx agent-enderun init claude
248
+ ```
249
+ * **Created Files:** `.claude/` folder, `claude.md` shim, and project-level **`.mcp.json`** for Claude Code.
250
+ * **Global Registration:** Automatically discovers and registers the MCP server in Claude Desktop's `claude_desktop_config.json` and Claude Code's `~/.claude.json`.
193
251
 
194
- ### 🛠️ CLI Command Map
252
+ #### 3. Grok Adapter
253
+ Scaffold for xAI Grok Build:
254
+ ```bash
255
+ npx agent-enderun init grok
256
+ ```
257
+ * **Created Files:** **`.grok/`** folder and **`grok.md`** shim file.
195
258
 
196
- | Command | Authoritative Agent | Description |
197
- | :--- | :--- | :--- |
198
- | `init [adapter]` | `@manager` | Initialize the framework for a selected adapter (`gemini`, `claude`, `grok`, `antigravity-cli`). |
199
- | `status` | `@manager` | Display active phase, Trace ID, and agent health scores. |
200
- | `check` | `@quality` | Perform a constitutional health check, folder structure, and file integrity scan. |
201
- | `trace:new [desc]` | `@manager` | Start a new task chain with a unique Trace ID. |
202
- | `orchestrate` / `loop` | `@manager` | Spin up the live Hermes message-broker loop to route asynchronous agent actions. |
203
- | `verify-contract` | `@backend` | Verify and seal type alignment between backend and frontend contracts. |
204
- | `update-contract` | `@backend` | Automatically calculate and synchronize the backend contract SHA-256 hash. |
205
- | `create-app [idea]` | `@manager` | Generate a corporate monorepo application from natural language requirements. |
259
+ #### 4. Antigravity Adapter
260
+ Bootstrap the high-discipline sandbox for Antigravity IDE and CLI runtimes:
261
+ ```bash
262
+ npx agent-enderun init antigravity
263
+ ```
264
+ * **Created Files:** `.gemini/antigravity/` or `.gemini/antigravity-cli/` isolated paths.
206
265
 
207
266
  ---
208
267
 
209
- ### 📦 npmjs Publication & Prepublish Automation
268
+ ### 🕹️ CLI Command Reference
210
269
 
211
- Agent Enderun is fully optimized for immediate publication to npmjs:
212
- * **Prepublish Build Automation Hook (`prepublishOnly`):** Triggers `npm run enderun:build` before publishing, ensuring compiled Model Context Protocol (MCP) server binaries are always built and up-to-date.
213
- * **CLI Source Bundle Inclusion:** Bundles the `"src"` folder in the published package.
270
+ Execute commands via `agent-enderun` (or `npx agent-enderun`):
214
271
 
215
- To test the package locally via npm link:
272
+ * **`init [adapter]`**: Scaffold framework directories and register local/global MCP server instances.
273
+ * **`status`**: Output active Phase (0-4), current active Trace ID, and agent capability logs.
274
+ * **`check`**: Run a thorough framework integrity, folder alignment, and constitutional compliance check.
275
+ * **`trace:new [desc] [agent] [priority]`**: Launch a new traceable task chain stamped with a unique ULID.
276
+ * **`orchestrate` / `loop`**: Launch the Hermes live event-driven message-routing loop for asynchronous agent synchronization.
277
+ * **`verify-contract`**: Perform a contract audit to ensure frontend types match backend schemas.
278
+ * **`update-contract`**: Re-calculate type definitions and update `contract.version.json` with a new SHA-256 hash.
279
+ * **`create-app [idea]`**: Autonomously generate a full-stack monorepo project starter based on natural language inputs.
280
+
281
+ ---
282
+
283
+ ### 📦 Local Package Testing & Development
284
+
285
+ To compile and link the package locally for development:
216
286
  ```bash
217
- # Install root dependencies and build MCP
287
+ # Install package dependencies
218
288
  npm install
289
+
290
+ # Compile the Model Context Protocol (MCP) server and build assets
219
291
  npm run enderun:build
220
292
 
221
- # Create a global npm link
293
+ # Globally link package on your system
222
294
  npm link
223
295
 
224
- # Create a test folder and link package
225
- mkdir test-project && cd test-project
296
+ # Create a test folder and mount package
297
+ mkdir enderun-test && cd enderun-test
226
298
  npm init -y
227
299
  npm link agent-enderun
228
300
 
229
- # Boot the adapter scaffolding
301
+ # Bootstrap scaffolding
230
302
  npx agent-enderun init gemini
231
303
  ```
232
304
 
233
305
  ---
234
306
 
235
- Developed with absolute discipline | Developer **Yusuf BEKAR** | Framework Version **v0.9.3**
307
+ Developed with absolute discipline | Developer **Yusuf BEKAR** | Framework Version **v0.9.4**
package/bin/init-check.js CHANGED
@@ -5,7 +5,15 @@ import path from "path";
5
5
 
6
6
  const targetDir = process.cwd();
7
7
 
8
- const candidates = [".gemini", ".claude", ".agent", ".enderun"];
8
+ const candidates = [
9
+ ".gemini/antigravity",
10
+ ".gemini/antigravity-cli",
11
+ ".gemini",
12
+ ".claude",
13
+ ".grok",
14
+ ".agent",
15
+ ".enderun",
16
+ ];
9
17
  let frameworkDir = ".enderun";
10
18
  for (const dir of candidates) {
11
19
  if (fs.existsSync(path.join(targetDir, dir))) {
@@ -9,7 +9,15 @@ const __filename = fileURLToPath(import.meta.url);
9
9
  const __dirname = path.dirname(__filename);
10
10
  const projectRoot = path.join(__dirname, "..");
11
11
 
12
- const candidates = [".gemini", ".claude", ".agent", ".enderun"];
12
+ const candidates = [
13
+ ".gemini/antigravity",
14
+ ".gemini/antigravity-cli",
15
+ ".gemini",
16
+ ".claude",
17
+ ".grok",
18
+ ".agent",
19
+ ".enderun",
20
+ ];
13
21
  let frameworkDir = ".enderun";
14
22
  for (const dir of candidates) {
15
23
  if (fs.existsSync(path.join(projectRoot, dir))) {
@@ -3,7 +3,15 @@
3
3
  import fs from "fs";
4
4
  import path from "path";
5
5
 
6
- const FRAMEWORK_CANDIDATES = [".gemini", ".claude", ".agent", ".enderun"];
6
+ const FRAMEWORK_CANDIDATES = [
7
+ ".gemini/antigravity",
8
+ ".gemini/antigravity-cli",
9
+ ".gemini",
10
+ ".claude",
11
+ ".grok",
12
+ ".agent",
13
+ ".enderun",
14
+ ];
7
15
 
8
16
  function detectFrameworkDir() {
9
17
  for (const dir of FRAMEWORK_CANDIDATES) {
@@ -6,7 +6,7 @@ import path from "path";
6
6
  import { execSync } from "child_process";
7
7
  const server = new Server({
8
8
  name: "agent-enderun-mcp",
9
- version: "0.9.3",
9
+ version: "0.9.4",
10
10
  }, {
11
11
  capabilities: {
12
12
  tools: {},
@@ -182,7 +182,22 @@ server.onRequest(CallToolRequestSchema, async (request) => {
182
182
  }
183
183
  case "send_agent_message": {
184
184
  const { to, category, content, traceId } = args;
185
- const frameworkDir = fs.existsSync(path.join(projectRoot, ".enderun")) ? ".enderun" : ".gemini";
185
+ const candidates = [
186
+ ".gemini/antigravity",
187
+ ".gemini/antigravity-cli",
188
+ ".gemini",
189
+ ".claude",
190
+ ".grok",
191
+ ".agent",
192
+ ".enderun",
193
+ ];
194
+ let frameworkDir = ".gemini";
195
+ for (const c of candidates) {
196
+ if (fs.existsSync(path.join(projectRoot, c))) {
197
+ frameworkDir = c;
198
+ break;
199
+ }
200
+ }
186
201
  const messagePath = path.join(projectRoot, frameworkDir, "messages", `${to.replace("@", "")}.json`);
187
202
  const message = {
188
203
  timestamp: new Date().toISOString(),
@@ -204,6 +219,7 @@ server.onRequest(CallToolRequestSchema, async (request) => {
204
219
  ".gemini/antigravity-cli",
205
220
  ".gemini",
206
221
  ".claude",
222
+ ".grok",
207
223
  ".agent",
208
224
  ".enderun",
209
225
  ];
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-enderun/mcp",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "Agent Enderun Model Context Protocol (MCP) Server",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -11,7 +11,7 @@ import { execSync } from "child_process";
11
11
  const server = new Server(
12
12
  {
13
13
  name: "agent-enderun-mcp",
14
- version: "0.9.3",
14
+ version: "0.9.4",
15
15
  },
16
16
  {
17
17
  capabilities: {
@@ -210,7 +210,22 @@ server.onRequest(CallToolRequestSchema, async (request: any) => {
210
210
  traceId: string;
211
211
  }
212
212
  const { to, category, content, traceId } = args as any as SendAgentMessageArgs;
213
- const frameworkDir = fs.existsSync(path.join(projectRoot, ".enderun")) ? ".enderun" : ".gemini";
213
+ const candidates = [
214
+ ".gemini/antigravity",
215
+ ".gemini/antigravity-cli",
216
+ ".gemini",
217
+ ".claude",
218
+ ".grok",
219
+ ".agent",
220
+ ".enderun",
221
+ ];
222
+ let frameworkDir = ".gemini";
223
+ for (const c of candidates) {
224
+ if (fs.existsSync(path.join(projectRoot, c))) {
225
+ frameworkDir = c;
226
+ break;
227
+ }
228
+ }
214
229
  const messagePath = path.join(projectRoot, frameworkDir, "messages", `${to.replace("@", "")}.json`);
215
230
 
216
231
  const message = {
@@ -245,6 +260,7 @@ server.onRequest(CallToolRequestSchema, async (request: any) => {
245
260
  ".gemini/antigravity-cli",
246
261
  ".gemini",
247
262
  ".claude",
263
+ ".grok",
248
264
  ".agent",
249
265
  ".enderun",
250
266
  ];
package/mcp.json CHANGED
@@ -2,8 +2,10 @@
2
2
  "mcpServers": {
3
3
  "agent-enderun": {
4
4
  "command": "node",
5
- "args": ["framework-mcp/dist/index.js"],
5
+ "args": [
6
+ "framework-mcp/dist/index.js"
7
+ ],
6
8
  "env": {}
7
9
  }
8
10
  }
9
- }
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-enderun",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "The Supreme AI Governance & Orchestration Framework for Enterprise Development",
5
5
  "author": "Yusuf BEKAR",
6
6
  "license": "MIT",
@@ -35,7 +35,7 @@ export const ADAPTERS: Record<AdapterId, AdapterConfig> = {
35
35
  },
36
36
  grok: {
37
37
  id: "grok",
38
- frameworkDir: ".agent", // Future-proof agent-centric directory for Grok/X.ai
38
+ frameworkDir: ".grok", // Standard config directory for Grok/X.ai agent
39
39
  shimFile: "grok.md",
40
40
  templateDir: ".enderun",
41
41
  },
@@ -63,6 +63,7 @@ export const FRAMEWORK_DIR_CANDIDATES = [
63
63
  ".gemini/antigravity-cli",
64
64
  ".gemini",
65
65
  ".claude",
66
+ ".grok",
66
67
  ".agent",
67
68
  ".enderun",
68
69
  ] as const;
@@ -196,6 +197,8 @@ export function runAdapterPostInit(adapter: AdapterConfig, projectRoot: string):
196
197
  console.warn("⚠️ Claude config not found. Add MCP manually (see README).");
197
198
  }
198
199
  writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
200
+ writeJsonFile(path.join(projectRoot, ".mcp.json"), mcpBlock);
201
+ console.warn("✅ Claude Code Project MCP → .mcp.json");
199
202
  break;
200
203
  }
201
204
  default:
@@ -4,7 +4,7 @@ import crypto from "crypto";
4
4
  import { ensureDir, writeTextFile, writeJsonFile } from "../utils/fs.js";
5
5
  import { updateProjectMemoryCommand } from "../commands/memory.js";
6
6
  import { slugifyName, titleCase } from "../utils/string.js";
7
- import { getConfiguredPaths } from "./memory.js";
7
+ import { getConfiguredPaths, getFrameworkDir, getMemoryPath } from "./memory.js";
8
8
 
9
9
 
10
10
  const targetDir = process.cwd(); // Assuming targetDir is process.cwd() in the CLI context
@@ -752,13 +752,4 @@ export async function collectCreateAppDescription(args: string[]) {
752
752
  }
753
753
  }
754
754
 
755
- function getFrameworkDir(): string {
756
- for (const dir of [".gemini", ".claude", ".agent", ".enderun"]) {
757
- if (fs.existsSync(path.join(process.cwd(), dir))) return dir;
758
- }
759
- return ".gemini";
760
- }
761
755
 
762
- function getMemoryPath(): string {
763
- return path.join(process.cwd(), getFrameworkDir(), "PROJECT_MEMORY.md");
764
- }
@@ -9,11 +9,16 @@ export function findClaudeConfigPath(): string | null {
9
9
  if (!home) return null;
10
10
 
11
11
  const possiblePaths = [
12
+ // Claude Desktop
13
+ path.join(home, "Library", "Application Support", "Claude", "claude_desktop_config.json"), // macOS Claude Desktop
14
+ path.join(home, "AppData", "Roaming", "Claude", "claude_desktop_config.json"), // Windows Claude Desktop
15
+ // Claude Code CLI
16
+ path.join(home, ".claude.json"), // Global Claude Code CLI MCP config
17
+ // Legacy or system-specific paths
12
18
  path.join(home, ".config", "claude", "config.json"),
13
19
  path.join(home, ".claude", "config.json"),
14
- path.join(home, "Library", "Application Support", "Claude", "config.json"), // macOS Claude Desktop
15
- path.join(home, "Library", "Application Support", "Claude Code", "config.json"), // macOS Claude Code
16
- path.join(home, ".config", "Claude", "config.json"), // some Linux setups
20
+ path.join(home, "Library", "Application Support", "Claude Code", "config.json"),
21
+ path.join(home, ".config", "Claude", "config.json"),
17
22
  ];
18
23
 
19
24
  for (const p of possiblePaths) {