agent-enderun 0.8.8 → 0.9.1

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.
Files changed (164) hide show
  1. package/.enderun/BRAIN_DASHBOARD.md +5 -5
  2. package/{ENDERUN.md → .enderun/ENDERUN.md} +4 -2
  3. package/.enderun/PROJECT_MEMORY.md +32 -43
  4. package/.enderun/STATUS.md +25 -28
  5. package/.enderun/agents/agent_army_schema.json +29 -7
  6. package/.enderun/agents/backend.md +48 -39
  7. package/.enderun/agents/database.md +55 -0
  8. package/.enderun/agents/devops.md +30 -17
  9. package/.enderun/agents/explorer.md +5 -5
  10. package/.enderun/agents/frontend.md +97 -76
  11. package/.enderun/agents/git.md +4 -4
  12. package/.enderun/agents/manager.md +68 -59
  13. package/.enderun/agents/mobile.md +4 -4
  14. package/.enderun/agents/native.md +106 -0
  15. package/.enderun/agents/quality.md +122 -0
  16. package/.enderun/agents/schema/agent-lifecycle-schema.json +29 -8
  17. package/.enderun/cli-commands.json +7 -3
  18. package/.enderun/config.json +8 -2
  19. package/.enderun/knowledge/SHIM_TEMPLATE.md +25 -0
  20. package/.enderun/knowledge/context_boundary_rules.md +57 -0
  21. package/.enderun/knowledge/corporate-governance/high-risk-action-approval-flow.md +29 -0
  22. package/.enderun/knowledge/documentation_ownership.md +53 -0
  23. package/.enderun/knowledge/eslint-standards.md +63 -0
  24. package/.enderun/knowledge/frontend_professionalization_guidelines.md +7 -7
  25. package/.enderun/knowledge/hermes_live_test_guidelines.md +5 -5
  26. package/.enderun/knowledge/hermes_protocol.md +1 -1
  27. package/.enderun/knowledge/lessons-learned.md +14 -0
  28. package/.enderun/knowledge/manager_authority_audit_enforcement.md +10 -10
  29. package/.enderun/knowledge/project_scaffold_guidelines.md +4 -4
  30. package/.enderun/knowledge/reference_application_guidelines.md +6 -6
  31. package/.enderun/mcp_config.json +9 -0
  32. package/.enderun/memory-graph/agent-contexts/backend.json +1 -1
  33. package/.enderun/memory-graph/agent-contexts/devops.json +1 -1
  34. package/.enderun/memory-graph/agent-contexts/explorer.json +1 -1
  35. package/.enderun/memory-graph/agent-contexts/frontend.json +1 -1
  36. package/.enderun/memory-graph/agent-contexts/git.json +1 -1
  37. package/.enderun/memory-graph/agent-contexts/manager.json +1 -1
  38. package/.enderun/memory-graph/agent-contexts/mobile.json +1 -1
  39. package/.enderun/memory-graph/agent-contexts/native.json +1 -0
  40. package/.enderun/memory-graph/agent-contexts/quality.json +1 -0
  41. package/.enderun/memory-graph/graph.json +123 -15
  42. package/.enderun/memory-graph/shared-facts.json +26 -31
  43. package/.enderun/queue/README.md +13 -13
  44. package/README.md +171 -393
  45. package/agent.md +25 -0
  46. package/bin/cli.js +10 -10
  47. package/bin/init-check.js +69 -0
  48. package/bin/update-contract.js +57 -38
  49. package/bin/validate-agent-army.js +38 -13
  50. package/claude.md +14 -8
  51. package/docs/README.md +24 -16
  52. package/docs/architecture/README.md +9 -0
  53. package/docs/architecture/standards/data-fetching-patterns.md +13 -0
  54. package/docs/architecture/standards/design-system.md +31 -0
  55. package/docs/architecture/standards/logging.md +7 -0
  56. package/docs/architecture/standards/tech-stack.md +9 -0
  57. package/docs/getting-started.md +9 -259
  58. package/docs/user/README.md +35 -0
  59. package/docs/user/action-plan-2026.md +9 -0
  60. package/docs/user/getting-started.md +13 -0
  61. package/docs/user/roadmap.md +13 -0
  62. package/eslint.config.js +68 -0
  63. package/framework-mcp/dist/index.js +178 -24
  64. package/framework-mcp/package.json +6 -33
  65. package/framework-mcp/tsconfig.json +3 -6
  66. package/gemini.md +12 -6
  67. package/grok.md +25 -0
  68. package/package.json +13 -5
  69. package/panda.config.ts +86 -86
  70. package/src/cli/adapters.ts +208 -0
  71. package/src/cli/commands/app.ts +38 -0
  72. package/src/cli/commands/check.ts +87 -0
  73. package/src/cli/commands/compliance.ts +55 -0
  74. package/src/cli/commands/contract.ts +45 -0
  75. package/src/cli/commands/explorer.ts +45 -0
  76. package/src/cli/commands/git.ts +39 -0
  77. package/src/cli/commands/init.ts +272 -0
  78. package/src/cli/commands/knowledge.ts +44 -0
  79. package/src/cli/commands/lint.ts +25 -0
  80. package/src/cli/commands/log.ts +37 -0
  81. package/src/cli/commands/memory.ts +78 -0
  82. package/src/cli/commands/orchestrate.ts +111 -0
  83. package/src/cli/commands/script.ts +20 -0
  84. package/src/cli/commands/security.ts +38 -0
  85. package/src/cli/commands/status.ts +59 -0
  86. package/src/cli/commands/trace.ts +46 -0
  87. package/src/cli/index.ts +74 -2155
  88. package/src/cli/utils/app.ts +764 -0
  89. package/src/cli/utils/claude.ts +56 -0
  90. package/src/cli/utils/fs.ts +139 -0
  91. package/src/cli/utils/memory.ts +141 -0
  92. package/src/cli/utils/pkg.ts +215 -0
  93. package/src/cli/utils/string.ts +48 -0
  94. package/src/cli/utils/time.ts +27 -0
  95. package/tsconfig.json +9 -0
  96. package/.enderun/agents/analyst.md +0 -238
  97. package/.enderun/agents/orchestrator.md +0 -172
  98. package/.enderun/agents/qa.md +0 -124
  99. package/.enderun/agents/security.md +0 -202
  100. package/.enderun/knowledge/api_design_rules.md +0 -6
  101. package/.enderun/knowledge/branded_types_pattern.md +0 -8
  102. package/.enderun/knowledge/code_review_checklist.md +0 -7
  103. package/.enderun/knowledge/contract_versioning.md +0 -7
  104. package/.enderun/knowledge/database_migration.md +0 -6
  105. package/.enderun/knowledge/deployment_checklist.md +0 -7
  106. package/.enderun/knowledge/git_commit_strategy.md +0 -10
  107. package/.enderun/knowledge/monitoring_setup.md +0 -5
  108. package/.enderun/knowledge/performance_guidelines.md +0 -11
  109. package/.enderun/knowledge/repository_patterns.md +0 -9
  110. package/.enderun/knowledge/security_scanning.md +0 -6
  111. package/.enderun/knowledge/testing_standards.md +0 -7
  112. package/.enderun/knowledge/troubleshooting_guide.md +0 -5
  113. package/.enderun/logs/analyst.json +0 -1
  114. package/.enderun/logs/backend.json +0 -1
  115. package/.enderun/logs/devops.json +0 -1
  116. package/.enderun/logs/explorer.json +0 -1
  117. package/.enderun/logs/frontend.json +0 -1
  118. package/.enderun/logs/git.json +0 -1
  119. package/.enderun/logs/manager.json +0 -1
  120. package/.enderun/logs/mobile.json +0 -1
  121. package/.enderun/logs/native.json +0 -1
  122. package/.enderun/logs/orchestrator.json +0 -1
  123. package/.enderun/logs/qa.json +0 -1
  124. package/.enderun/logs/security.json +0 -1
  125. package/.enderun/memory-graph/agent-contexts/analyst.json +0 -1
  126. package/.enderun/memory-graph/agent-contexts/orchestrator.json +0 -1
  127. package/.enderun/memory-graph/agent-contexts/qa.json +0 -1
  128. package/.enderun/memory-graph/agent-contexts/security.json +0 -1
  129. package/.env.example +0 -10
  130. package/cursor.md +0 -19
  131. package/docs/action-plan-2026.md +0 -119
  132. package/docs/roadmap.md +0 -142
  133. package/framework-mcp/README.md +0 -55
  134. package/framework-mcp/dist/schemas.js +0 -84
  135. package/framework-mcp/dist/tools/codebase.js +0 -294
  136. package/framework-mcp/dist/tools/contract.js +0 -197
  137. package/framework-mcp/dist/tools/framework.js +0 -225
  138. package/framework-mcp/dist/tools/git.js +0 -51
  139. package/framework-mcp/dist/tools/governance.js +0 -696
  140. package/framework-mcp/dist/tools/index.js +0 -47
  141. package/framework-mcp/dist/tools/knowledge.js +0 -133
  142. package/framework-mcp/dist/tools/memory.js +0 -217
  143. package/framework-mcp/dist/tools/messages.js +0 -193
  144. package/framework-mcp/dist/tools/monitoring.js +0 -294
  145. package/framework-mcp/dist/tools/orchestration.js +0 -369
  146. package/framework-mcp/dist/tools/pipeline.js +0 -267
  147. package/framework-mcp/dist/tools/security.js +0 -137
  148. package/framework-mcp/dist/utils.js +0 -121
  149. package/framework-mcp/src/index.ts +0 -49
  150. package/framework-mcp/src/schemas.ts +0 -106
  151. package/framework-mcp/src/tools/codebase.ts +0 -284
  152. package/framework-mcp/src/tools/contract.ts +0 -221
  153. package/framework-mcp/src/tools/framework.ts +0 -223
  154. package/framework-mcp/src/tools/git.ts +0 -42
  155. package/framework-mcp/src/tools/governance.ts +0 -891
  156. package/framework-mcp/src/tools/index.ts +0 -50
  157. package/framework-mcp/src/tools/knowledge.ts +0 -141
  158. package/framework-mcp/src/tools/memory.ts +0 -207
  159. package/framework-mcp/src/tools/messages.ts +0 -213
  160. package/framework-mcp/src/tools/monitoring.ts +0 -351
  161. package/framework-mcp/src/tools/orchestration.ts +0 -440
  162. package/framework-mcp/src/tools/pipeline.ts +0 -353
  163. package/framework-mcp/src/tools/security.ts +0 -143
  164. package/framework-mcp/src/utils.ts +0 -130
package/README.md CHANGED
@@ -1,467 +1,245 @@
1
- # 🏛️ Agent Enderun — Supreme Enterprise AI Governance & Orchestration Framework
1
+ # 🏛️ Agent Enderun — Enterprise AI Governance & Autonomous Orchestration Framework
2
2
 
3
- **Agent Enderun** is a production-grade, highly-disciplined AI orchestration and process governance framework designed for building secure, scalable, and audit-ready enterprise software. It enforces contract-first development, zero-mock safety, static security scanning, and strict multi-agent coordination under a single source of truth.
4
-
5
- **Current Version:** `0.8.8`
6
- **Author:** Yusuf BEKAR
7
- **License:** MIT
3
+ > **Stable Release:** v0.9.1
4
+ > **Author:** Yusuf BEKAR
5
+ > **Trace ID:** `01HGT8J5E2N0W0W0W0W0W0W0W4`
6
+ > **System Status:** 🟢 All Systems Operational | Build Compile: Clean | Type-Safety: 100% Verified
8
7
 
9
8
  ---
10
9
 
11
- [English](#english) | [Türkçe](#türkçe)
10
+ ## 🇹🇷 TÜRKÇE — Proje Tanıtımı & Dokümantasyonu
12
11
 
13
- ---
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**.
14
13
 
15
- # English
16
-
17
- ## Table of Contents
18
- - [1. Introduction & Core Philosophy](#1-introduction--core-philosophy)
19
- - [2. Installation & Quickstart](#2-installation--quickstart)
20
- - [Prerequisites](#prerequisites)
21
- - [Step-by-Step Installation](#step-by-step-installation)
22
- - [Verification & Health Check](#verification--health-check)
23
- - [3. Adapters & Use Cases](#3-adapters--use-cases)
24
- - [Gemini Adapter (Standard & Recommended)](#gemini-adapter-standard--recommended)
25
- - [Claude & Cursor Adapters](#claude--cursor-adapters)
26
- - [Integrating with Claude Code / Claude Desktop](#integrating-with-claude-code--claude-desktop)
27
- - [4. Project Development Workflow & Best Practices](#4-project-development-workflow--best-practices)
28
- - [A. Phase-Based Lifecycle](#a-phase-based-lifecycle)
29
- - [B. Trace ID Protocol](#b-trace-id-protocol)
30
- - [C. Contract-First & Branded Types](#c-contract-first--branded-types)
31
- - [D. Zero Mock & Zero UI-Library Policy](#d-zero-mock--zero-ui-library-policy)
32
- - [E. Security & Compliance Scanning](#e-security--compliance-scanning)
33
- - [F. Hermes Messaging & Task Queues](#f-hermes-messaging--task-queues)
34
- - [5. CLI Reference Manual](#5-cli-reference-manual)
35
- - [6. Project Layout Directory Structure](#6-project-layout-directory-structure)
14
+ Sürüm **v0.9.1** itibarıyla sistem; kendi hafızasını yönetebilen, monorepo proje yollarını dinamik olarak haritalayan ve farklı yapay zeka ekosistemlerini anayasal bir disiplin altında birleştiren **"Yaşayan Bir Mühendislik Organizması"** haline getirilmiştir.
36
15
 
37
16
  ---
38
17
 
39
- ## 1. Introduction & Core Philosophy
40
-
41
- AI assistance in software development often introduces technical debt, code drift, and unstructured modifications. **Agent Enderun** solves this by establishing a **Structured Governance Framework**. Rather than acting as a loose code generator, AI assistants within this framework are treated as disciplined engineers under a unified command structure led by the `@manager` (Team-Lead) agent.
42
-
43
- ### The Five Pillars of Enderun
44
- 1. **Absolute Traceability:** Every action, commit, and state change is stamped with a unique ULID-based **Trace ID**.
45
- 2. **Katalyst Contracts:** Zero code is written until API contracts and **Branded Types** are defined and verified.
46
- 3. **Pristine Sandboxing:** Complete separation between the **User's Project** and the **Framework Internals**.
47
- 4. **Permanent Memory:** The AI's context and status live persistently inside your project, not in transient chat logs or the OS `/tmp` directory.
48
- 5. **Zero Mock Policy:** All analytical and operational screens must interact with actual, validated schemas and live endpoints.
18
+ ### 🚀 Sürüm v0.9.1 İle Gelen Devrimsel Yenilikler
49
19
 
50
- ---
20
+ 1. **Dinamik Framework Klasör Keşfi (Multi-Adapter Engine):**
21
+ * Artık `.enderun` klasörü sistemde katı olarak kodlanmış (hardcoded) tek dizin değildir.
22
+ * CLI aracı; çalışma anında projede aktif olan framework klasörünü `[.gemini, .claude, .agent, .enderun]` adayları arasından otomatik olarak keşfeder. Bu sayede her IDE veya yapay zeka ajanı (Claude Code, Gemini CLI, Grok) kendi izole klasöründe çakışma yaşamadan çalışabilir.
51
23
 
52
- ## 2. Installation & Quickstart
24
+ 2. **Yapılandırılabilir Klasör Haritalaması (Dynamic Paths Map):**
25
+ * Projede kullanılan `backend`, `frontend`, `docs` ve `tests` dizin yolları artık dinamik olarak yönetilir.
26
+ * Keşfedilen aktif framework klasöründeki `config.json` içerisinde yer alan `paths` bloğu projenin Single Source of Truth (SSOT) yol haritasıdır:
27
+ ```json
28
+ "paths": {
29
+ "backend": "apps/backend",
30
+ "frontend": "apps/web",
31
+ "docs": "docs",
32
+ "tests": "tests"
33
+ }
34
+ ```
35
+ * Tüm sözleşme doğrulama (`verify-contract`), sistem bütünlük denetimi (`check`) ve kod üreticileri bu yapılandırmayı tüketir.
53
36
 
54
- ### Prerequisites
55
- - **Node.js** v20.0.0 or higher (LTS recommended).
56
- - **npm** v9+ or **pnpm** v8+ or **yarn** v3+.
57
- - **Git** initialized in the project directory.
37
+ 3. **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ı.
39
+ * `agent-enderun orchestrate` komutu, kuyruktaki asenkron delege görevleri tarar, hedef ajanın durumunu ordu paneli üzerinde (`STATUS.md`) anlık olarak `EXECUTING` yapar ve görevi otonom olarak yönlendirir.
58
40
 
59
- ### Step-by-Step Installation
41
+ 4. **Mükemmel Tip Güvenliği & Linter Uyumluluğu:**
42
+ * Tüm CLI ve yardımcı betikler (`update-contract.js`, `init-check.js`) dinamik yol mimarisine entegre edildi.
43
+ * `npx tsc --noEmit` tip kontrolü sıfır hata ile %100 temiz çalışır.
44
+ * `eslint.config.js` kuralları, izole edilmiş çalışma anı ortamlarında (sandbox) oluşabilecek EPERM (erişim engellendi) hatalarını önlemek amacıyla gizli framework dizinlerini tamamen yoksayacak şekilde kusursuzlaştırıldı.
60
45
 
61
- #### Step 1: Initialize Git in your directory
62
- ```bash
63
- mkdir my-enterprise-app
64
- cd my-enterprise-app
65
- git init
66
- ```
46
+ ---
67
47
 
68
- #### Step 2: Run the Framework Initializer
69
- To scaffold the entire governance structure, run the command below. By default, it will detect your package manager and environment.
70
- ```bash
71
- npx agent-enderun init gemini
72
- ```
73
- *Note: If you do not specify an adapter, it will default to `gemini` and build the runtime within the `.enderun/` directory.*
48
+ ### 💎 Stratejik Platform Sinerjisi (Dört Büyük Güç)
74
49
 
75
- #### Step 3: Install Workspace Dependencies & Compile the MCP Server
76
- ```bash
77
- npm install
78
- npm run enderun:build
79
- ```
50
+ Agent Enderun, sektörün öncüsü olan yapay zeka ekosistemlerini bir araya getirerek her birine stratejik bir rol atar:
51
+ * **🚀 Claude Code (Operasyonel Cerrahi):** **Saha Mühendisi**. Kod tabanındaki otonom ve milimetrik cerrahi düzenlemeleri (Surgical Edits) gerçekleştirir.
52
+ * **♊ Gemini & Vertex AI (Komuta İstihbaratı):** **Stratejik Karar Merkezi**. Proje geçmişini, mimari kararları analiz eder ve yüksek seviyeli stratejik yönlendirmeler yapar.
53
+ * **🛸 Antigravity (İç Disiplin & Akademi):** **Askeri Akademi**. İç standartları, anayasal uyumu korumak amacıyla izole edilmiş, yüksek disiplinli geliştirme ve test ortamı sağlar.
54
+ * **🤖 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.
80
55
 
81
56
  ---
82
57
 
83
- ### Verification & Health Check
58
+ ### 🪖 Konsolide Edilmiş 10 Ajanlık Ordu Yapısı
84
59
 
85
- Always run the built-in health diagnostic after installation or after making major project transitions:
86
- ```bash
87
- npx agent-enderun check
88
- ```
60
+ Tüm operasyonlar, uzmanlık alanlarına göre ayrılmış ve Hermes protokolüyle birbirine bağlanmış 10 aktif ajan tarafından yönetilir:
89
61
 
90
- #### What does the Health Check validate?
91
- - **Constitution Integrity:** Verifies the existence and checksum of `ENDERUN.md`.
92
- - **Memory Connectivity:** Checks if `PROJECT_MEMORY.md` is active and writeable.
93
- - **Contract Parity:** Ensures `apps/backend/contract.version.json` exists.
94
- - **MCP compilation:** Confirms `framework-mcp/dist/index.js` is fully compiled and ready.
95
- - **Documentation Portals:** Ensures technical stack details are filled inside `docs/tech-stack.md`.
62
+ | Ajan | Uzmanlık Rolü | Temel Sorumluluğu |
63
+ | :--- | :--- | :--- |
64
+ | **`@manager`** | Komuta & Strateji | Görev dağılımı (DAG), hafıza yönetimi (`PROJECT_MEMORY.md`), anayasa koruyuculuğu. |
65
+ | **`@quality`** | Kalite, Güvenlik & Analiz | AST zafiyet taramaları, anayasal uyum denetimi, kod inceleme checklistleri, test standartları kapısı. |
66
+ | **`@database`** | Veritabanı Mimarisi | Veritabanı şemaları, migration kuralları, index optimizasyonları ve veri tohumlama (seeding). |
67
+ | **`@backend`** | İş Mantığı (Domain Logic) | API tasarımı, branded types, katmanlı mimari (Route -> Controller -> Service -> Repository). |
68
+ | **`@frontend`** | Akıcı Responsive UI | Panda CSS tasarımı, responsive-first (mobil-öncelikli) arayüzler, custom React kancaları. |
69
+ | **`@devops`** | Altyapı & Canlı Dağıtım | Native Node.js deploymentları, rollback planları, telemetri ve izleme (monitoring) kurulumları. |
70
+ | **`@explorer`** | Kod Analizi & Keşif | Kod tabanı analizi, bağımlılık grafikleri, legacy onboarding stratejileri. |
71
+ | **`@git`** | Sürüm Kontrolü | Trace ID uyumlu commit yönetimi, sürüm etiketleme ve dal (branch) hijyeni. |
72
+ | **`@mobile`** | Mobil Geliştirme | Expo ve React Native tabanlı mobil arayüz geliştirme otomasyonları. |
73
+ | **`@native`** | Native Masaüstü | Tauri ve Electron tabanlı yerel masaüstü uygulama entegrasyonları. |
96
74
 
97
75
  ---
98
76
 
99
- ## 3. Adapters & Use Cases
77
+ ### 🛡️ Enderun Disiplininin 5 Temel Direği
100
78
 
101
- Agent Enderun is designed to support the specific AI adapter that matches your IDE or CLI environment.
79
+ 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.
80
+ 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.
81
+ 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.
82
+ 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.
83
+ 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.
102
84
 
103
- ```text
104
- ┌───────────────────────┐
105
- │ agent-enderun │
106
- └───────────┬───────────┘
107
-
108
- ┌─────────────────┼─────────────────┐
109
- ▼ ▼ ▼
110
- .enderun/ .claude/ .cursor/
111
- (Gemini Adapter) (Claude Code) (Cursor IDE)
112
- ```
85
+ ---
113
86
 
114
- ### Gemini Adapter (Standard & Recommended)
115
- - **Folder:** `.enderun/`
116
- - **Target Use:** Gemini CLI, Google Vertex AI, and direct Gemini API environments.
117
- - **Shim File:** `gemini.md` (placed at the project root as the initial context instructions).
118
- - **Benefit:** Full Model Context Protocol (MCP) server hooks natively tuned for Gemini's large-context window.
119
-
120
- ### Claude & Cursor Adapters
121
- - **Claude Adapter (`init claude`):** Creates the `.claude/` directory and shims. Configures automated MCP access for **Claude Code CLI** and **Claude Desktop**.
122
- - **Cursor Adapter (`init cursor`):** Creates `.cursor/` directory containing `.cursorrules` to immediately guide the Cursor IDE agent with Enderun's strict coding boundaries.
123
-
124
- ### Integrating with Claude Code / Claude Desktop
125
-
126
- Agent Enderun provides a fully-functional **Model Context Protocol (MCP)** server. To connect it to your Claude environment, append the following block to your `claude_desktop_config.json` or global Claude CLI configuration:
127
-
128
- ```json
129
- {
130
- "mcpServers": {
131
- "agent-enderun-mcp": {
132
- "command": "node",
133
- "args": ["/absolute/path/to/your/project/framework-mcp/dist/index.js"]
134
- }
135
- }
136
- }
137
- ```
87
+ ### 🛠️ CLI Komut Referansı
138
88
 
139
- Once connected, your AI assistant will gain access to tools such as:
140
- - `search_codebase` (Surgical context parsing)
141
- - `read_project_memory` & `update_project_memory` (State machine updates)
142
- - `verify_api_contract` (TypeScript type validation)
143
- - `send_agent_message` (Hermes protocol queues)
89
+ | Komut | Yetkili Ajan | Açıklama |
90
+ | :--- | :--- | :--- |
91
+ | `init [adapter]` | `@manager` | Seçilen IDE/Agent adaptörünü (`gemini`, `claude`, `grok`, `antigravity`) yerel projenize kurar. |
92
+ | `status` | `@manager` | Aktif aşamayı, aktif Trace ID'yi ve ajanların anlık ordu durumlarını listeler. |
93
+ | `check` | `@quality` | Anayasal sağlık kontrolü, dosya bütünlüğü ve dizin doğrulaması yapar. |
94
+ | `trace:new [desc]` | `@manager` | Yeni bir Trace ID başlatarak görev zincirini ve izlenebilirliği tetikler. |
95
+ | `orchestrate` / `loop` | `@manager` | Canlı Hermes mesaj yönlendirici döngüsünü başlatarak asenkron ajan görevlerini yönlendirir. |
96
+ | `verify-contract` | `@backend` | Backend ile frontend arasındaki tip uyumluluğunu kilitler ve doğrular. |
97
+ | `create-app [idea]` | `@manager` | Doğal dildeki talep ve gereksinimlerden kurumsal monorepo uygulaması oluşturur. |
144
98
 
145
99
  ---
146
100
 
147
- ## 4. Project Development Workflow & Best Practices
148
-
149
- To successfully develop a project within the Agent Enderun framework, follow this rigid workflow.
150
-
151
- ### A. Phase-Based Lifecycle
152
- Development progresses sequentially through five states. Do not skip phases:
153
- 1. **`PHASE_0` - Discovery & Setup:** Fill out `docs/tech-stack.md` and select the execution profile (Lightweight MVP vs. Full Enterprise).
154
- 2. **`PHASE_1` - Architecture & Contracts:** Create your models and API definitions first. Establish contract hashes.
155
- 3. **`PHASE_2` - Core Development:** Develop features inside `apps/backend/` and `apps/web/` in parallel.
156
- 4. **`PHASE_3` - Integration & Testing:** Run end-to-end integration and reach the mandatory **80% test coverage gate** via `@qa`.
157
- 5. **`PHASE_4` - Optimization & Deployment:** Perform a final performance audit and deploy.
158
-
159
- ### B. Trace ID Protocol
160
- Never write code or commit files without an active task ULID.
161
- 1. Create a new task tracking chain:
162
- ```bash
163
- npx agent-enderun trace:new "Implement JWT Authentication" backend P1
164
- ```
165
- 2. This generates a ULID (e.g., `01H7G8K5TJ5S6MF9Z7H8N4C2P`) and appends it to the `ACTIVE TASKS` table in `PROJECT_MEMORY.md`.
166
- 3. Use the Trace ID prefix in your git commit messages:
167
- ```bash
168
- git commit -m "[01H7G8K5TJ5S6MF9Z7H8N4C2P] feat(auth): add JWT fastify plugins"
169
- ```
170
-
171
- ### C. Contract-First & Branded Types
172
- Under Agent Enderun, all ID types must use strict **Branded Types** to avoid type confusion:
173
- ```typescript
174
- // apps/backend/src/types/brands.ts
175
- export type Brand<T, K extends string> = T & { __brand: K };
176
-
177
- export type UserID = Brand<string, "UserID">;
178
- export type ProjectID = Brand<string, "ProjectID">;
179
- ```
180
- Ensure `@backend` compiles all types into a shared folder BEFORE `@frontend` starts any page implementation. Update the contract version in `apps/backend/contract.version.json`.
181
-
182
- ### D. Zero Mock & Zero UI-Library Policy
183
- - **No Mocking:** All developed user interfaces must pull data from actual verified backend endpoints or Kysely repositories (with exceptions only for 3rd-party platforms like Stripe or Twilio).
184
- - **Panda CSS & Custom UI:** External pre-styled components (e.g. TailwindCSS, MUI, Shadcn/UI) are forbidden in core workspaces unless explicitly authorized by `@manager`. Rely entirely on the type-safe token system of **Panda CSS** to construct custom, responsive interfaces.
185
-
186
- ### E. Security & Compliance Scanning
187
- Run static scanning checks locally on your codebase:
188
- * **Security Audit:** Searches for unsafe database strings, hardcoded keys, innerHTML assignments, and `any` types.
189
- ```bash
190
- npx agent-enderun check:security
191
- ```
192
- * **Constitution Compliance:** Inspects files for forbidden libraries, unbranded ID types, and missing error-handling parameters.
193
- ```bash
194
- npx agent-enderun check:compliance
195
- ```
196
-
197
- ### F. Hermes Messaging & Task Queues
198
- If working with multiple sub-agents in parallel, agents communicate via `messages/` under the Hermes Protocol. The files are locked via `.lock` tokens to ensure thread safety, and execution routes asynchronously through `.enderun/queue/`.
101
+ ### 📦 npmjs Yayınlama & Prepublish Otomasyonu
199
102
 
200
- ---
103
+ Agent Enderun, npmjs üzerinde paketlenmeye kusursuz şekilde hazırdır:
104
+ * **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.
105
+ * **CLI Kaynak Bütünlüğü:** Tüm TypeScript derleme kaynakları (`src/`) paket içeriğine dahil edilmiştir, böylece son kullanıcı yüklemelerinde çalışma anı çalışma çökmeleri önlenmiştir.
201
106
 
202
- ## 5. CLI Reference Manual
107
+ Yerel projenizi test etmek veya npm link üzerinden kurmak için:
108
+ ```bash
109
+ # Bağımlılıkları kurun ve MCP sunucusunu derleyin
110
+ npm install
111
+ npm run enderun:build
203
112
 
204
- | Command | Arguments | Description |
205
- | :--- | :--- | :--- |
206
- | `init` | `[adapter]` | Initializes the framework. Supported adapters: `gemini` (creates `.enderun/`), `claude` (`.claude/`), `cursor` (`.cursor/`). |
207
- | `check` | *None* | Performs full framework diagnostic and codebase health check. |
208
- | `status` | *None* | Displays current active Phase, Trace IDs, agent states, and blockers. |
209
- | `trace:new` | `<description> [agent] [priority]` | Generates a new ULID Trace ID and appends it to active tasks. |
210
- | `create-app` | `<idea>` | Generates a full-stack monorepo application template from natural language. |
211
- | `verify-contract` | *None* | Computes API hashes to verify type parity between backend and frontend. |
212
- | `check:security` | `[path]` | Runs static scan for SQL injections, secrets, and illegal variables. |
213
- | `check:compliance` | `[path]` | Audits compliance with Branded Types and forbidden UI libraries. |
214
- | `explorer:graph` | `[path]` | Generates a visual Mermaid TD dependency diagram of the local files. |
215
- | `explorer:audit` | `[path]` | Executes static analysis mapping files to corresponding agent owners. |
216
- | `git:commit` | `<trace-id>` | Inspects staged files and suggests a perfect semantic git commit message. |
217
- | `mcp` | *None* | Starts the Model Context Protocol stdio server. |
218
- | `version` | *None* | Prints the current framework release version. |
113
+ # Paketi yerel NPM havuzunuza linkleyin
114
+ npm link
219
115
 
220
- ---
116
+ # Test etmek istediğiniz boş bir klasöre gidin ve aracı bağlayın
117
+ mkdir test-projem && cd test-projem
118
+ npm init -y
119
+ npm link agent-enderun
221
120
 
222
- ## 6. Project Layout Directory Structure
223
-
224
- A fully-governed monorepo structured under Agent Enderun looks as follows:
225
-
226
- ```text
227
- ├── .enderun/ <-- Framework Runtime & Memory (v0.8.8)
228
- │ ├── agents/ <-- Specialist agent Blueprints & SOPs
229
- │ ├── knowledge/ <-- Rigid architecture patterns & rules
230
- │ ├── memory-graph/ <-- Global facts & private agent states
231
- │ ├── logs/ <-- Structured JSON audit trail
232
- │ ├── queue/ <-- Asynchronous task queues
233
- │ ├── PROJECT_MEMORY.md <-- Unified state brain (SSOT)
234
- │ └── STATUS.md <-- Agent army dashboard
235
- ├── apps/
236
- │ ├── backend/ <-- Fastify & Kysely backend workspace
237
- │ │ └── contract.json <-- API contract registry & hash metadata
238
- │ └── web/ <-- React & Panda CSS client workspace
239
- ├── docs/ <-- User's technical stack & requirements
240
- ├── framework-mcp/ <-- MCP Server source code & tools
241
- ├── bin/ <-- Executable CLI entrypoint binaries
242
- ├── ENDERUN.md <-- System Constitution (Supreme Law)
243
- └── package.json <-- Monorepo workspaces & shared actions
121
+ # Adaptörü başlatın
122
+ npx agent-enderun init gemini
244
123
  ```
245
124
 
246
125
  ---
247
126
  ---
248
127
 
249
- # Türkçe
250
-
251
- ## İçindekiler
252
- - [1. Giriş ve Temel Felsefe](#1-giriş-ve-temel-felsefe)
253
- - [2. Kurulum ve Hızlı Başlangıç](#2-kurulum-ve-hızlı-başlangıç)
254
- - [Ön Gereksinimler](#ön-gereksinimler)
255
- - [Adım Adım Kurulum](#adım-adım-kurulum)
256
- - [Sağlık ve Doğrulama Taraması](#sağlık-ve-doğrulama-taraması)
257
- - [3. Adaptörler ve Kullanım Senaryoları](#3-adaptörler-ve-kullanım-senaryoları)
258
- - [Gemini Adaptörü (Standart & Önerilen)](#gemini-adaptörü-standart--önerilen)
259
- - [Claude & Cursor Adaptörleri](#claude--cursor-adaptörleri)
260
- - [Claude Code / Claude Desktop Entegrasyonu](#claude-code--claude-desktop-entegrasyonu)
261
- - [4. Proje Geliştirme Akışları ve En İyi Pratikler](#4-proje-geliştirme-akışları-ve-en-iyi-pratikler)
262
- - [A. Aşama Tabanlı Yaşam Döngüsü](#a-aşama-tabanlı-yaşam-döngüsü)
263
- - [B. Trace ID Protokolü](#b-trace-id-protokolü)
264
- - [C. Kontrat Öncelikli Geliştirme & Branded Types](#c-kontrat-öncelikli-geliştirme--branded-types)
265
- - [D. Sıfır Sahte Veri (Zero-Mock) & Sıfır UI Kütüphanesi Kanunu](#d-sıfır-sahte-veri-zero-mock--sıfır-ui-kütüphanesi-kanunu)
266
- - [E. Güvenlik ve Uyumluluk Taramaları](#e-güvenlik-ve-uyumluluk-taramaları)
267
- - [F. Hermes Mesajlaşması & Görev Kuyrukları](#f-hermes-mesajlaşması--görev-kuyrukları)
268
- - [5. CLI Referans Klavuzu](#5-cli-referans-klavuzu)
269
- - [6. Proje Klasör Dizilim Mimarisi](#6-proje-klasör-dizilim-mimarisi)
128
+ ## 🇺🇸 ENGLISH — Project Showcase & Documentation
270
129
 
271
- ---
130
+ **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.
272
131
 
273
- ## 1. Giriş ve Temel Felsefe
132
+ As of **v0.9.1**, the system operates as a **"Living Engineering Organism"** capable of managing its own memory, dynamically mapping monorepo project subfolders, and uniting disparate AI ecosystems under a single constitutional discipline.
274
133
 
275
- Yazılım geliştirme süreçlerindeki yapay zeka yardımı genellikle plansız değişikliklere, teknik borç birikimine ve kontrolsüz kod sapmalarına neden olur. **Agent Enderun**, yapay zekayı basit bir kod üreteci olarak konumlandırmak yerine, onu `@manager` (Takım Lideri) ajanı komutasında çalışan, kurallara bağlı disiplinli bir mühendislik ordusu haline getiren **Kurumsal Yapay Zeka Yönetişim Framework'üdür**.
134
+ ---
276
135
 
277
- ### Enderun’un Beş Ana Sütunu
278
- 1. **Mutlak İzlenebilirlik:** Yapılan her işlem, commit ve durum değişikliği ULID tabanlı bir **Trace ID** ile damgalanır.
279
- 2. **Önce Sözleşme (Contract-First):** API rotaları ve veri tipleri (**Branded Types**) tanımlanıp onaylanmadan tek satır kod yazılamaz.
280
- 3. **Kalıcı Yerel Hafıza:** Yapay zekanın tüm bağlamı (context) ve projenin mevcut durumu, işletim sisteminin `/tmp` dizininde değil, doğrudan projenizin içinde saklanır.
281
- 4. **Sınırların Korunması (Pristine Sandboxing):** Framework çekirdeği ile sizin uygulama kodunuz arasında aşılmaz sınırlar çizilir.
282
- 5. **Gerçekçi Veri (Zero Mock Policy):** Tüm analiz ve operasyon ekranları sahte verilerle (mock) değil, onaylanmış canlı veritabanı şemalarıyla konuşur.
136
+ ### 🚀 Key Improvements in Version v0.9.1
283
137
 
284
- ---
138
+ 1. **Dynamic Framework Directory Discovery (Multi-Adapter Engine):**
139
+ * The `.enderun` folder is no longer hardcoded as the sole runtime path.
140
+ * The CLI dynamically discovers the active framework folder from a candidate list `[.gemini, .claude, .agent, .enderun]`. This allows different AI agents or adapters (Claude Code, Gemini CLI, Grok) to operate in isolated workspaces without folder conflicts.
285
141
 
286
- ## 2. Kurulum ve Hızlı Başlangıç
142
+ 2. **Configurable Path Mapping (Dynamic Paths Map):**
143
+ * Directories for `backend`, `frontend`, `docs`, and `tests` are fully dynamic and configurable.
144
+ * Path settings are read from the `paths` block inside the active framework's `config.json` as the Single Source of Truth (SSOT):
145
+ ```json
146
+ "paths": {
147
+ "backend": "apps/backend",
148
+ "frontend": "apps/web",
149
+ "docs": "docs",
150
+ "tests": "tests"
151
+ }
152
+ ```
153
+ * All validations (`verify-contract`), integrity checks (`check`), and scaffolding engines utilize this mapping.
287
154
 
288
- ### Ön Gereksinimler
289
- - **Node.js** v20.0.0 veya üzeri (LTS sürümü önerilir).
290
- - **npm** v9+ veya **pnpm** v8+ veya **yarn** v3+.
291
- - **Git** (proje dizininde başlatılmış olmalıdır).
155
+ 3. **Hermes Autonomous Orchestration Loop (`orchestrate` / `loop`):**
156
+ * Enabled the **Hermes Message Broker**—an event-driven asynchronous communication channel between expert AI agents.
157
+ * The `agent-enderun orchestrate` command scans pending message queues, dynamically locks the target agent's state to `EXECUTING` on the dashboard (`STATUS.md`), and routes tasks autonomously.
292
158
 
293
- ### Adım Adım Kurulum
159
+ 4. **Flawless Type-Safety & Linter Optimization:**
160
+ * All CLI commands and auxiliary binaries (`update-contract.js`, `init-check.js`) have been migrated to the dynamic paths registry.
161
+ * The type-checking command `npx tsc --noEmit` runs with **zero errors**.
162
+ * Upgraded `eslint.config.js` to completely ignore hidden framework files, preventing potential OS-level permission conflicts (`EPERM`) in sandboxed terminal environments.
294
163
 
295
- #### Adım 1: Proje dizininizi oluşturun ve Git'i başlatın
296
- ```bash
297
- mkdir benim-kurumsal-uygulamam
298
- cd benim-kurumsal-uygulamam
299
- git init
300
- ```
164
+ ---
301
165
 
302
- #### Adım 2: Framework'ü Başlatın
303
- Aşağıdaki komut, projenizi analiz ederek uygun adaptörü kurar ve yönetişim yapısını hazırlar:
304
- ```bash
305
- npx agent-enderun init gemini
306
- ```
307
- *Not: Bir adaptör belirtilmezse standart olarak `gemini` kurulur ve framework çalışma ortamı `.enderun/` dizininde oluşturulur.*
166
+ ### 💎 Strategic Platform Synergy (The Four Powers)
308
167
 
309
- #### Adım 3: Bağımlılıkları Yükleyin ve MCP Sunucusunu Derleyin
310
- ```bash
311
- npm install
312
- npm run enderun:build
313
- ```
168
+ Agent Enderun coordinates industry-leading AI environments by assigning each a specific strategic military role:
169
+ * **🚀 Claude Code (Operational Surgery):** The **Field Engineer**. Excels in executing precise, surgical, and autonomous codebase edits.
170
+ * **♊ Gemini & Vertex AI (Command Intelligence):** The **Command Center**. Analyzes project history, memory logs, and executes high-level strategic decisions.
171
+ * **🛸 Antigravity (Internal Discipline):** The **Military Academy**. Provides an isolated, high-discipline sandbox to preserve internal framework coding standards.
172
+ * **🤖 Grok / X.ai (Exploration Wing):** The **Autonomous Scouting**. Testing futuristic agent behaviors and pushing AI-driven developer limits.
314
173
 
315
174
  ---
316
175
 
317
- ### Sağlık ve Doğrulama Taraması
176
+ ### 🪖 The Consolidated 10-Agent Army
318
177
 
319
- Kurulum sonrasında veya büyük aşama geçişlerinde projenizin sağlık durumunu denetlemek için yerleşik tarayıcıyı çalıştırın:
320
- ```bash
321
- npx agent-enderun check
322
- ```
178
+ All workspace operations are divided among 10 specialized expert agents connected via the Hermes protocol:
323
179
 
324
- #### Bu tarama neleri doğrular?
325
- - **Anayasa Güvenliği:** `ENDERUN.md` dosyasının mevcudiyetini ve doğruluğunu kontrol eder.
326
- - **Bellek Erişimi:** `.enderun/PROJECT_MEMORY.md` dosyasının etkin ve yazılabilir olduğunu denetler.
327
- - **Sözleşme Bütünlüğü:** `apps/backend/contract.version.json` dosyasını denetler.
328
- - **MCP Derlemesi:** `framework-mcp/dist/index.js` dosyasının derlendiğini doğrular.
329
- - **Teknoloji Yığını:** Projenin mimari stack tanımının `docs/tech-stack.md` içine yazılıp yazılmadığını kontrol eder.
180
+ | Agent | Specialization Role | Core Responsibility |
181
+ | :--- | :--- | :--- |
182
+ | **`@manager`** | Command & Strategy | Task dependency graphs (DAG), memory pruning (`PROJECT_MEMORY.md`), constitution compliance. |
183
+ | **`@quality`** | Quality, Security & Analysis | AST vulnerability scanning, constitutional audits, code review checklists, test standard gates. |
184
+ | **`@database`** | Database Architecture | Database schemas, migration workflows, query optimization, and contract-aware seeding. |
185
+ | **`@backend`** | Domain Logic Specialist | API route design, branded types, layered architecture (Route -> Controller -> Service -> Repository). |
186
+ | **`@frontend`** | Fluid Responsive UI | Panda CSS design, responsive-first interfaces, customized React hooks. |
187
+ | **`@devops`** | Infrastructure Specialist | Native Node.js deployments, rollback plans, monitoring & logging setups. |
188
+ | **`@explorer`** | Codebase Intelligence | Project analysis, dependency graph generation, legacy conversion strategies. |
189
+ | **`@git`** | Version Control | Semantic Trace-ID-aligned commits, release tagging, branch hygiene. |
190
+ | **`@mobile`** | Mobile Development | React Native / Expo UI automation and native builds. |
191
+ | **`@native`** | Desktop Engineering | Tauri and Electron desktop app integrations. |
330
192
 
331
193
  ---
332
194
 
333
- ## 3. Adaptörler ve Kullanım Senaryoları
195
+ ### 🛡️ Five Pillars of Enderun Discipline
334
196
 
335
- Agent Enderun, kullandığınız editör veya yapay zeka aracına uygun adaptörü dinamik olarak etkinleştirir.
197
+ 1. **Absolute Traceability (Trace ID):** Every single decision is stamped with a unique 26-character ULID (Trace ID) for thorough auditing.
198
+ 2. **Contract-First:** Backend-frontend data contracts are defined and sealed before any user interface code is written.
199
+ 3. **Surgical Edit Standard:** Rewriting entire files is strictly prohibited. Only modified lines are changed using `replace_text` / `patch_file`.
200
+ 4. **Autonomous Memory Archiving:** `PROJECT_MEMORY.md` functions as a self-pruning Single Source of Truth (SSOT).
201
+ 5. **Constitutional SSOT:** All agents must adhere to the supreme constitutional law defined in `.enderun/ENDERUN.md`.
336
202
 
337
- ### Gemini Adaptörü (Standart & Önerilen)
338
- - **Dizin:** `.enderun/`
339
- - **Hedef:** Gemini CLI, Google Vertex AI ve doğrudan Gemini API ortamları.
340
- - **Tetikleyici:** Proje kökündeki `gemini.md` dosyası (yapay zeka ilk bu dosyayı okuyarak anayasayı yükler).
341
- - **Avantaj:** Gemini'ın devasa bağlam (context window) kapasitesine göre optimize edilmiş araç çağrıları.
342
-
343
- ### Claude & Cursor Adaptörleri
344
- - **Claude Adaptörü (`init claude`):** `.claude/` çalışma dizinini hazırlar. **Claude Code CLI** ve **Claude Desktop** için otomatik MCP bağlantılarını yapılandırır.
345
- - **Cursor Adaptörü (`init cursor`):** `.cursor/` klasörünü ve `.cursorrules` dosyasını oluşturarak Cursor IDE'nin kendi kod üretim sınırlarını Enderun kurallarına kilitler.
203
+ ---
346
204
 
347
- ### Claude Code / Claude Desktop Entegrasyonu
205
+ ### 🛠️ CLI Command Map
348
206
 
349
- Agent Enderun, tam teşekküllü bir **Model Context Protocol (MCP)** sunucusu içerir. Bunu Claude ortamınıza bağlamak için `claude_desktop_config.json` dosyanıza veya global Claude CLI ayarlarınıza şu bloğu eklemeniz yeterlidir:
207
+ | Command | Authoritative Agent | Description |
208
+ | :--- | :--- | :--- |
209
+ | `init [adapter]` | `@manager` | Initialize the framework for a selected adapter (`gemini`, `claude`, `grok`, `antigravity`). |
210
+ | `status` | `@manager` | Display active phase, Trace ID, and agent health scores. |
211
+ | `check` | `@quality` | Perform a constitutional health check, folder structure, and file integrity scan. |
212
+ | `trace:new [desc]` | `@manager` | Start a new task chain with a unique Trace ID. |
213
+ | `orchestrate` / `loop` | `@manager` | Spin up the live Hermes message-broker loop to route asynchronous agent actions. |
214
+ | `verify-contract` | `@backend` | Verify and seal type alignment between backend and frontend contracts. |
215
+ | `create-app [idea]` | `@manager` | Generate a corporate monorepo application from natural language requirements. |
350
216
 
351
- ```json
352
- {
353
- "mcpServers": {
354
- "agent-enderun-mcp": {
355
- "command": "node",
356
- "args": ["/absolute/path/to/your/project/framework-mcp/dist/index.js"]
357
- }
358
- }
359
- }
360
- ```
217
+ ---
361
218
 
362
- Bağlantı kurulduğunda, yapay zekanız şu araçları (tools) kullanma yeteneği kazanır:
363
- - `search_codebase` (Cerrahi kod arama)
364
- - `read_project_memory` & `update_project_memory` (Hafıza güncelleme)
365
- - `verify_api_contract` (Tip uyumluluk kontrolü)
366
- - `send_agent_message` (Ajanlar arası Hermes mesajlaşması)
219
+ ### 📦 npmjs Publication & Prepublish Automation
367
220
 
368
- ---
221
+ Agent Enderun is fully optimized for immediate publication to npmjs:
222
+ * **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.
223
+ * **CLI Source Bundle Inclusion:** Bundles the `"src"` folder in the published package, preventing downstream execution crashes on typescript-enabled runtime environments.
369
224
 
370
- ## 4. Proje Geliştirme Akışları ve En İyi Pratikler
371
-
372
- Agent Enderun framework'ü üzerinde başarılı bir geliştirme süreci yürütmek için aşağıdaki adımları takip etmeniz zorunludur:
373
-
374
- ### A. Aşama Tabanlı Yaşam Döngüsü
375
- Geliştirme süreci asla atlanamayacak 5 ardışık fazdan oluşur:
376
- 1. **`PHASE_0` - Keşif ve Yapılandırma:** `docs/tech-stack.md` doldurulur ve Lightweight (MVP) veya Full (Kurumsal) yürütme profili seçilir.
377
- 2. **`PHASE_1` - Mimari ve Sözleşmeler:** Veri modelleri, API rotaları ve tip sözleşmeleri kilitlenir.
378
- 3. **`PHASE_2` - Çekirdek Geliştirme:** `apps/backend` ve `apps/web` paralel olarak kodlanır.
379
- 4. **`PHASE_3` - Entegrasyon ve Test:** `@qa` ajanı denetiminde **en az %80 birim/entegrasyon test kapsamı** zorunlu kapı olarak geçilir.
380
- 5. **`PHASE_4` - Optimizasyon ve Dağıtım:** Performans denetimleri tamamlanarak uygulama canlıya alınır.
381
-
382
- ### B. Trace ID Protokolü
383
- Aktif bir iş ULID'si olmadan kod yazmak veya commit atmak yasaktır.
384
- 1. Yeni bir göreve başlarken terminalden yeni bir Trace oluşturun:
385
- ```bash
386
- npx agent-enderun trace:new "JWT Yetkilendirme Modülü" backend P1
387
- ```
388
- 2. Bu komut benzersiz bir ULID üretir (örn: `01H7G8K5TJ5S6MF9Z7H8N4C2P`) ve bunu `.enderun/PROJECT_MEMORY.md` içindeki aktif görevler tablosuna yazar.
389
- 3. Tüm Git commit mesajlarınızda bu Trace ID'yi ön ek olarak kullanın:
390
- ```bash
391
- git commit -m "[01H7G8K5TJ5S6MF9Z7H8N4C2P] feat(auth): add JWT fastify plugins"
392
- ```
393
-
394
- ### C. Kontrat Öncelikli Geliştirme & Branded Types
395
- Hatalı kimlik atamalarını ve tip belirsizliklerini önlemek için projedeki tüm benzersiz kimlikler (ID) **Branded Types** formatında markalanmalıdır:
396
- ```typescript
397
- // apps/backend/src/types/brands.ts
398
- export type Brand<T, K extends string> = T & { __brand: K };
399
-
400
- export type UserID = Brand<string, "UserID">;
401
- export type ProjectID = Brand<string, "ProjectID">;
402
- ```
403
- `@backend` ajanı tüm bu tipleri ortak sözleşmeye yazıp `apps/backend/contract.version.json` dosyasını güncellemeden, `@frontend` ajanı kullanıcı arayüzü tasarlamaya başlayamaz.
404
-
405
- ### D. Sıfır Sahte Veri (Zero-Mock) & Sıfır UI Kütüphanesi Kanunu
406
- * **Sahte Veri Yasağı:** Arayüzler doğrudan doğrulanmış Fastify uç noktalarından ve Kysely veritabanı depolarından beslenmelidir (Stripe, Twilio gibi dış servis entegrasyonları hariç).
407
- * **Panda CSS Kullanımı:** TailwindCSS, MUI veya Shadcn/UI gibi hazır stillendirilmiş kütüphaneler (aksine bir `@manager` izni yoksa) yasaktır. Tasarımlar tamamen tip-güvenli **Panda CSS** belirteçleri (tokens) ile el değerek oluşturulur.
408
-
409
- ### E. Güvenlik ve Uyumluluk Taramaları
410
- Kaynak kodunuzu yerel olarak statik analizlerden geçirin:
411
- * **Güvenlik Denetimi:** Güvensiz veritabanı sorgularını, açık parola tanımlarını ve `any` veri tipi ihlallerini yakalar:
412
- ```bash
413
- npx agent-enderun check:security
414
- ```
415
- * **Anayasa Uyumluluğu:** Markalanmamış kimlik kullanımlarını ve yasaklı harici UI kütüphane bağımlılıklarını denetler:
416
- ```bash
417
- npx agent-enderun check:compliance
418
- ```
419
-
420
- ### F. Hermes Mesajlaşması & Görev Kuyrukları
421
- Paralel çalışan alt ajanlar (sub-agents), birbirleriyle Hermes Protokolü (`messages/` klasörü) üzerinden asenkron olarak mesajlaşır. İşlemler `.lock` kilit dosyalarıyla güvenceye alınır ve asenkron kuyruklar `.enderun/queue/` altında güvenle sıraya konur.
225
+ To test the package locally via npm link:
226
+ ```bash
227
+ # Install root dependencies and build MCP
228
+ npm install
229
+ npm run enderun:build
422
230
 
423
- ---
231
+ # Create a global npm link
232
+ npm link
424
233
 
425
- ## 5. CLI Referans Klavuzu
234
+ # Create a test folder and link package
235
+ mkdir test-project && cd test-project
236
+ npm init -y
237
+ npm link agent-enderun
426
238
 
427
- | Komut | Parametreler | Açıklama |
428
- | :--- | :--- | :--- |
429
- | `init` | `[adapter]` | Framework'ü başlatır. Desteklenen adaptörler: `gemini` (`.enderun/`), `claude` (`.claude/`), `cursor` (`.cursor/`). |
430
- | `check` | *Yok* | Projenin genel sağlık ve anayasal uyumluluk durumunu denetler. |
431
- | `status` | *Yok* | Aktif aşamayı, Trace ID'lerini, aktif ajan durumlarını ve engelleri (blockers) gösterir. |
432
- | `trace:new` | `<açıklama> [ajan] [öncelik]` | Yeni bir ULID Trace ID'si oluşturarak proje hafızasındaki aktif görevlere ekler. |
433
- | `create-app` | `<fikir>` | Doğal dil ile girilen gereksinimlerden sıfırdan kurumsal monorepo uygulaması üretir. |
434
- | `verify-contract` | *Yok* | Sözleşme karma değerlerini (hash) hesaplayarak backend-frontend tip uyumluluğunu doğrular. |
435
- | `check:security` | `[yol]` | Ham SQL, açık anahtarlar, innerHTML ve `any` tipi için güvenlik taraması yapar. |
436
- | `check:compliance` | `[yol]` | Branded Types uyumluluğunu ve yasaklı arayüz kütüphanelerini denetler. |
437
- | `explorer:graph` | `[yol]` | Dosyalar arası bağımlılıkları analiz ederek görsel Mermaid TD şeması üretir. |
438
- | `explorer:audit` | `[yol]` | Kod dosyalarının hangi uzman ajanın mülkiyetinde olduğunu listeleyen statik analiz yapar. |
439
- | `git:commit` | `<trace-id>` | Commit aşamasındaki staged dosyaları inceleyerek Trace ID uyumlu semantik commit mesajı önerir. |
440
- | `mcp` | *Yok* | Model Context Protocol stdio sunucusunu başlatır. |
441
- | `version` | *Yok* | Framework'ün mevcut sürüm numarasını yazdırır. |
239
+ # Boot the adapter scaffolding
240
+ npx agent-enderun init gemini
241
+ ```
442
242
 
443
243
  ---
444
244
 
445
- ## 6. Proje Klasör Dizilim Mimarisi
446
-
447
- Agent Enderun altında yönetilen örnek bir kurumsal monorepo yapısı:
448
-
449
- ```text
450
- ├── .enderun/ <-- Çalışma Zamanı & Hafıza Klasörü (v0.8.8)
451
- │ ├── agents/ <-- Uzman Ajan Direktifleri ve SOP Belgeleri
452
- │ ├── knowledge/ <-- Mimari Desenler ve Kodlama Kuralları
453
- │ ├── memory-graph/ <-- Paylaşılan Gerçekler ve Ajan Durumları
454
- │ ├── logs/ <-- Denetlenebilir Yapılandırılmış JSON Logları
455
- │ ├── queue/ <-- Asenkron Görev Yönetim Kuyruğu
456
- │ ├── PROJECT_MEMORY.md <-- Projenin Tek Güvenilir Ortak Beyni (SSOT)
457
- │ └── STATUS.md <-- Ajan Ordusu Durum Gösterge Paneli
458
- ├── apps/
459
- │ ├── backend/ <-- Fastify ve Kysely tabanlı Backend Çalışma Alanı
460
- │ │ └── contract.json <-- API Sözleşmeleri ve Doğrulama Özetleri
461
- │ └── web/ <-- React ve Panda CSS tabanlı Client Çalışma Alanı
462
- ├── docs/ <-- Kullanıcının Mimari İstekleri ve Stack Bilgileri
463
- ├── framework-mcp/ <-- MCP Sunucu Kaynak Kodları ve Araçlar
464
- ├── bin/ <-- Çalıştırılabilir CLI Giriş Noktası Binaries
465
- ├── ENDERUN.md <-- Sistem Anayasası (Supreme Law)
466
- └── package.json <-- Monorepo Çalışma Alanı Tanımları & Betikler
467
- ```
245
+ Developed with absolute discipline | Developer **Yusuf BEKAR** | Framework Version **v0.9.1**