agent-enderun 0.9.0 → 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 (93) hide show
  1. package/.enderun/BRAIN_DASHBOARD.md +2 -2
  2. package/.enderun/PROJECT_MEMORY.md +26 -4
  3. package/.enderun/STATUS.md +24 -28
  4. package/.enderun/agents/backend.md +37 -8
  5. package/.enderun/agents/database.md +55 -0
  6. package/.enderun/agents/devops.md +28 -14
  7. package/.enderun/agents/explorer.md +1 -1
  8. package/.enderun/agents/frontend.md +21 -7
  9. package/.enderun/agents/git.md +1 -1
  10. package/.enderun/agents/manager.md +41 -20
  11. package/.enderun/agents/mobile.md +1 -1
  12. package/.enderun/agents/native.md +1 -1
  13. package/.enderun/agents/quality.md +122 -0
  14. package/.enderun/cli-commands.json +3 -3
  15. package/.enderun/config.json +7 -1
  16. package/.enderun/knowledge/context_boundary_rules.md +57 -0
  17. package/.enderun/knowledge/corporate-governance/high-risk-action-approval-flow.md +29 -0
  18. package/.enderun/knowledge/documentation_ownership.md +53 -0
  19. package/.enderun/knowledge/frontend_professionalization_guidelines.md +7 -7
  20. package/.enderun/knowledge/hermes_live_test_guidelines.md +5 -5
  21. package/.enderun/knowledge/lessons-learned.md +14 -0
  22. package/.enderun/knowledge/manager_authority_audit_enforcement.md +8 -8
  23. package/.enderun/knowledge/project_scaffold_guidelines.md +4 -4
  24. package/.enderun/knowledge/reference_application_guidelines.md +6 -6
  25. package/.enderun/memory-graph/agent-contexts/quality.json +1 -0
  26. package/.enderun/queue/README.md +13 -13
  27. package/README.md +204 -102
  28. package/bin/cli.js +1 -1
  29. package/bin/init-check.js +69 -0
  30. package/bin/update-contract.js +24 -2
  31. package/docs/README.md +21 -32
  32. package/docs/architecture/README.md +9 -0
  33. package/docs/architecture/standards/data-fetching-patterns.md +13 -0
  34. package/docs/architecture/standards/design-system.md +31 -0
  35. package/docs/architecture/standards/logging.md +7 -0
  36. package/docs/architecture/standards/tech-stack.md +9 -0
  37. package/docs/getting-started.md +9 -259
  38. package/docs/user/README.md +35 -0
  39. package/docs/user/action-plan-2026.md +9 -0
  40. package/docs/user/getting-started.md +13 -0
  41. package/docs/user/roadmap.md +13 -0
  42. package/eslint.config.js +1 -1
  43. package/framework-mcp/dist/index.js +7 -13
  44. package/package.json +3 -1
  45. package/src/cli/adapters.ts +208 -0
  46. package/src/cli/commands/app.ts +38 -0
  47. package/src/cli/commands/check.ts +87 -0
  48. package/src/cli/commands/compliance.ts +55 -0
  49. package/src/cli/commands/contract.ts +45 -0
  50. package/src/cli/commands/explorer.ts +45 -0
  51. package/src/cli/commands/git.ts +39 -0
  52. package/src/cli/commands/init.ts +272 -0
  53. package/src/cli/commands/knowledge.ts +44 -0
  54. package/src/cli/commands/lint.ts +25 -0
  55. package/src/cli/commands/log.ts +37 -0
  56. package/src/cli/commands/memory.ts +78 -0
  57. package/src/cli/commands/orchestrate.ts +111 -0
  58. package/src/cli/commands/script.ts +20 -0
  59. package/src/cli/commands/security.ts +38 -0
  60. package/src/cli/commands/status.ts +59 -0
  61. package/src/cli/commands/trace.ts +46 -0
  62. package/src/cli/index.ts +107 -0
  63. package/src/cli/utils/app.ts +764 -0
  64. package/src/cli/utils/claude.ts +56 -0
  65. package/src/cli/utils/fs.ts +139 -0
  66. package/src/cli/utils/memory.ts +141 -0
  67. package/src/cli/utils/pkg.ts +215 -0
  68. package/src/cli/utils/string.ts +48 -0
  69. package/src/cli/utils/time.ts +27 -0
  70. package/.enderun/agents/analyst.md +0 -236
  71. package/.enderun/agents/orchestrator.md +0 -172
  72. package/.enderun/agents/qa.md +0 -121
  73. package/.enderun/agents/security.md +0 -202
  74. package/.enderun/knowledge/api_design_rules.md +0 -6
  75. package/.enderun/knowledge/branded_types_pattern.md +0 -8
  76. package/.enderun/knowledge/code_review_checklist.md +0 -7
  77. package/.enderun/knowledge/contract_versioning.md +0 -7
  78. package/.enderun/knowledge/database_migration.md +0 -6
  79. package/.enderun/knowledge/deployment_checklist.md +0 -7
  80. package/.enderun/knowledge/git_commit_strategy.md +0 -10
  81. package/.enderun/knowledge/monitoring_setup.md +0 -5
  82. package/.enderun/knowledge/performance_guidelines.md +0 -11
  83. package/.enderun/knowledge/repository_patterns.md +0 -9
  84. package/.enderun/knowledge/security_scanning.md +0 -6
  85. package/.enderun/knowledge/testing_standards.md +0 -7
  86. package/.enderun/knowledge/troubleshooting_guide.md +0 -5
  87. package/.enderun/memory-graph/agent-contexts/analyst.json +0 -1
  88. package/.enderun/memory-graph/agent-contexts/orchestrator.json +0 -1
  89. package/.enderun/memory-graph/agent-contexts/qa.json +0 -1
  90. package/.enderun/memory-graph/agent-contexts/security.json +0 -1
  91. package/docs/action-plan-2026.md +0 -119
  92. package/docs/roadmap.md +0 -142
  93. package/docs/tech-stack.md +0 -30
package/README.md CHANGED
@@ -1,143 +1,245 @@
1
- # 🏛️ Agent Enderun — Supreme Enterprise AI Governance Framework (v0.9.0)
1
+ # 🏛️ Agent Enderun — Enterprise AI Governance & Autonomous Orchestration Framework
2
2
 
3
- [English](#english) | [Türkçe](#türkçe)
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
4
7
 
5
8
  ---
6
9
 
7
- # English
10
+ ## 🇹🇷 TÜRKÇE — Proje Tanıtımı & Dokümantasyonu
8
11
 
9
- **Agent Enderun** is not just a code generator; it is a high-discipline **AI Governance & Autonomous Command System** designed for complex, scalable, and fully auditable enterprise software projects.
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**.
10
13
 
11
- With v0.9.0, the framework has evolved into a **"Living Engineering Organism"** that manages its own memory, performs surgical codebase modifications, and unifies diverse AI ecosystems under a single constitutional discipline.
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.
12
15
 
13
- ## 💎 Strategic Platform Synergy (The Core Four)
16
+ ---
17
+
18
+ ### 🚀 Sürüm v0.9.1 İle Gelen Devrimsel Yenilikler
19
+
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.
23
+
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.
36
+
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.
40
+
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ı.
45
+
46
+ ---
47
+
48
+ ### 💎 Stratejik Platform Sinerjisi (Dört Büyük Güç)
14
49
 
15
- Agent Enderun integrates the world's most powerful AI ecosystems, mapping each to a specific strategic role within the project:
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.
16
55
 
17
- 1. **🚀 Claude Code (Operational Surgery):** The project's **Field Engineer**. With unrivaled file-system speed and the `patch_file` tool, it manages autonomous code edits with surgical precision.
18
- 2. **♊ Gemini & Vertex AI (Strategic Brain):** The **Command Center**. Utilizing a 2M+ token context window, it analyzes the entire project history and architectural map simultaneously to make high-level decisions.
19
- 3. **🛸 Antigravity (Internal Discipline):** The **Military Academy**. A high-discipline, isolated environment designed to enforce internal project standards and rigorous AI training.
20
- 4. **🤖 Grok / X.ai (Reconnaissance Unit):** The **Autonomous Vision**. Used for testing futuristic agent protocols and pushing the boundaries of AI-native development.
56
+ ---
57
+
58
+ ### 🪖 Konsolide Edilmiş 10 Ajanlık Ordu Yapısı
21
59
 
22
- ## 🛡️ The Five Pillars of Enderun Discipline
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:
23
61
 
24
- 1. **Absolute Traceability (Trace ID):** Every decision, commit, and line of code is stamped with a ULID-based Trace ID. Full enterprise auditability is achieved in seconds.
25
- 2. **Contract-First Law:** No implementation is permitted without verified type contracts. Type safety between `@backend` and `@frontend` is the project's supreme law.
26
- 3. **Surgical Edit Standard:** Overwriting entire files is prohibited. The system mandates `replace_text` and `patch_file` via MCP for precise, non-destructive modifications.
27
- 4. **Autonomous Memory Pruning:** `PROJECT_MEMORY.md` never bloats. Histories exceeding 10 entries are auto-archived to keep the context window fresh and cost-efficient.
28
- 5. **Constitutional SSOT:** All platforms (Claude, Gemini, etc.) are 100% loyal to a single source of truth: the `.enderun/ENDERUN.md` constitution.
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ı. |
29
74
 
30
- ## 🛠️ Installation & Deployment
75
+ ---
31
76
 
32
- Initialize the framework for your preferred platform with a single command:
77
+ ### 🛡️ Enderun Disiplininin 5 Temel Direği
33
78
 
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.
84
+
85
+ ---
86
+
87
+ ### 🛠️ CLI Komut Referansı
88
+
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. |
98
+
99
+ ---
100
+
101
+ ### 📦 npmjs Yayınlama & Prepublish Otomasyonu
102
+
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.
106
+
107
+ Yerel projenizi test etmek veya npm link üzerinden kurmak için:
34
108
  ```bash
35
- # For Gemini CLI and Antigravity (Standard)
36
- agent-enderun init gemini
109
+ # Bağımlılıkları kurun ve MCP sunucusunu derleyin
110
+ npm install
111
+ npm run enderun:build
37
112
 
38
- # For Claude Code (CLI & Desktop) — Optimized for Surgery
39
- agent-enderun init claude
113
+ # Paketi yerel NPM havuzunuza linkleyin
114
+ npm link
40
115
 
41
- # For Antigravity IDE/CLI Independent Setup
42
- agent-enderun init antigravity
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
43
120
 
44
- # For Grok Build / X.ai Autonomous Agents
45
- agent-enderun init grok
121
+ # Adaptörü başlatın
122
+ npx agent-enderun init gemini
46
123
  ```
47
124
 
48
- ## 📋 CLI Command Registry
49
-
50
- | Command | Description |
51
- | :--- | :--- |
52
- | `status` | Shows the active phase, Trace ID, and real-time agent health scores. |
53
- | `check` | Audits system health, MCP connectivity, and constitutional integrity. |
54
- | `trace:new` | Starts a new task chain with a unique ID and briefs the Army. |
55
- | `create-app` | Generates an enterprise monorepo (Fastify/React) from natural language. |
56
- | `verify-contract` | Seals the type alignment between backend and frontend modules. |
57
-
58
- ## 📂 Architecture Map
59
-
60
- ```text
61
- ├── .enderun/ <-- The Framework Brain
62
- │ ├── agents/ <-- 12 Specialist Directives (Manager, Architect, QA...)
63
- │ ├── knowledge/ <-- Enterprise Standards (ESLint, API, Security)
64
- │ ├── memory-graph/ <-- Shared Facts & Agent Private Contexts
65
- │ ├── queue/ <-- Hermes Messaging & Task Queue
66
- │ └── ENDERUN.md <-- The Supreme Constitution
67
- ├── apps/ <-- Enterprise Application Space
68
- ├── docs/ <-- Project Architectural Portal (ADRs, Tech-Stack)
69
- └── framework-mcp/ <-- Autonomous Operations Server
70
- ```
125
+ ---
126
+ ---
127
+
128
+ ## 🇺🇸 ENGLISH Project Showcase & Documentation
129
+
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.
131
+
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.
71
133
 
72
134
  ---
73
135
 
74
- # Türkçe
136
+ ### 🚀 Key Improvements in Version v0.9.1
137
+
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.
141
+
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.
154
+
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.
158
+
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.
75
163
 
76
- **Agent Enderun**, sıradan bir kod üreticisi değil; karmaşık, ölçeklenebilir ve mutlak denetlenebilir kurumsal yazılım projeleri için tasarlanmış bir **Yapay Zeka Yönetişim ve Otonom Ordu Komuta Sistemidir**.
164
+ ---
77
165
 
78
- v0.9.0 sürümüyle birlikte sistem; kendi hafızasını yönetebilen, kod tabanına cerrahi müdahaleler yapabilen ve farklı YZ ekosistemlerini tek bir anayasal disiplin altında birleştiren **"Yaşayan bir Mühendislik Organizması"** haline gelmiştir.
166
+ ### 💎 Strategic Platform Synergy (The Four Powers)
79
167
 
80
- ## 💎 Stratejik Platform Sinerjisi (Dörtlü Güç)
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.
81
173
 
82
- Agent Enderun, sektördeki en güçlü YZ ekosistemlerini bir araya getirerek her birini proje içinde stratejik bir rolle görevlendirir:
174
+ ---
175
+
176
+ ### 🪖 The Consolidated 10-Agent Army
83
177
 
84
- 1. **🚀 Claude Code (Operasyonel Cerrahi):** Projenin **Saha Mühendisi**dir. Dosya sistemi üzerindeki rakipsiz hızı ve `patch_file` aracıyla otonom kod düzenlemelerini cerrahi hassasiyetle yönetir.
85
- 2. **♊ Gemini & Vertex AI (Stratejik Akıl):** Sistemin **Komuta Merkezi**dir. 2M+ token bağlam kapasitesiyle projenin tüm geçmişini ve mimari yapısını aynı anda analiz ederek üst düzey kararlar alır.
86
- 3. **🛸 Antigravity (İç Disiplin):** Projenin **Askeri Akademisi**dir. İç standartlarımızı korumak için tasarlanmış, dış dünyadan izole ve yüksek disiplinli geliştirme ortamıdır.
87
- 4. **🤖 Grok / X.ai (Keşif Birliği):** Projenin **Otonom Vizyonu**dur. Gelecek odaklı ajan protokollerini test etmek ve YZ tabanlı geliştirme sınırlarını zorlamak için kullanılır.
178
+ All workspace operations are divided among 10 specialized expert agents connected via the Hermes protocol:
88
179
 
89
- ## 🛡️ Enderun Disiplininin Beş Sarsılmaz Sütunu
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. |
90
192
 
91
- 1. **Mutlak İzlenebilirlik (Trace ID):** Her karar, her commit ve her kod satırı ULID tabanlı bir Trace ID ile damgalanır. Kurumsal denetim (audit) saniyeler içinde yapılabilir.
92
- 2. **Önce Sözleşme (Contract-First):** Backend ve Frontend arasındaki veri kontratları mühürlenmeden kod yazılamaz. Tip güvenliği projenin kutsal yasasıdır.
93
- 3. **Cerrahi Düzenleme Standardı:** Dosyaların tamamını üzerine yazmak yasaktır. Sistem, sadece değişen satırları güncelleyen `replace_text` ve `patch_file` araçlarını zorunlu kılar.
94
- 4. **Otonom Hafıza Arşivleme (Auto-Prune):** `PROJECT_MEMORY.md` asla şişmez. 10 kayıt sınırını geçen tarihçeler otomatik arşivlenir; sistem her zaman taze ve ekonomik kalır.
95
- 5. **Anayasal SSOT:** Tüm platformlar (Claude, Gemini vb.) tek bir üst otoriteye, `.enderun/ENDERUN.md` anayasasına %100 sadakatle bağlıdır.
193
+ ---
96
194
 
97
- ## 🛠️ Kurulum ve Dağıtım
195
+ ### 🛡️ Five Pillars of Enderun Discipline
98
196
 
99
- Kullandığınız platforma göre tek komutla Agent Enderun'u başlatın:
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`.
100
202
 
101
- ```bash
102
- # Gemini CLI ve Antigravity için (Standart)
103
- agent-enderun init gemini
203
+ ---
104
204
 
105
- # Claude Code (CLI & Desktop) için — Cerrahi Odaklı
106
- agent-enderun init claude
205
+ ### 🛠️ CLI Command Map
107
206
 
108
- # Antigravity IDE/CLI Bağımsız Kurulumu
109
- agent-enderun init antigravity
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. |
110
216
 
111
- # Grok Build / X.ai Otonom Ajanları İçin
112
- agent-enderun init grok
113
- ```
217
+ ---
218
+
219
+ ### 📦 npmjs Publication & Prepublish Automation
220
+
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.
224
+
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
230
+
231
+ # Create a global npm link
232
+ npm link
233
+
234
+ # Create a test folder and link package
235
+ mkdir test-project && cd test-project
236
+ npm init -y
237
+ npm link agent-enderun
114
238
 
115
- ## 📋 CLI Komut Rehberi
116
-
117
- | Komut | Açıklama |
118
- | :--- | :--- |
119
- | `status` | Aktif fazı, Trace ID'yi ve ajanların anlık sağlık skorlarını gösterir. |
120
- | `check` | Sistemin anayasal sağlığını ve dosya bütünlüğünü denetler. |
121
- | `trace:new` | Yeni bir görev zinciri başlatır ve orduyu görevlendirir. |
122
- | `create-app` | Doğal dilden kurumsal monorepo (Fastify/React) üretir. |
123
- | `verify-contract` | Backend ve Frontend arasındaki tip uyumluluğunu mühürler. |
124
-
125
- ## 📂 Sistem Mimarisi
126
-
127
- ```text
128
- ├── .enderun/ <-- Sistemin Beyni
129
- │ ├── agents/ <-- 12 Uzman Ajan Direktifi (Manager, Architect, QA...)
130
- │ ├── knowledge/ <-- Kurumsal Akıl (ESLint, API, Güvenlik Standartları)
131
- │ ├── memory-graph/ <-- Ortak Hafıza ve Ajan Bağlamları
132
- │ ├── queue/ <-- Hermes Mesajlaşma ve Görev Kuyruğu
133
- │ └── ENDERUN.md <-- Proje Anayasası (Üst Yasa)
134
- ├── apps/ <-- Kurumsal Uygulama Alanı
135
- ├── docs/ <-- Proje Mimari Portalı (ADRs, Tech-Stack)
136
- └── framework-mcp/ <-- Otonom Operasyon Sunucusu
239
+ # Boot the adapter scaffolding
240
+ npx agent-enderun init gemini
137
241
  ```
138
242
 
139
243
  ---
140
244
 
141
- **Geliştiren / Developed by:** Yusuf BEKAR
142
- **Sürüm / Version:** v0.9.0
143
- **Lisans / License:** MIT
245
+ Developed with absolute discipline | Developer **Yusuf BEKAR** | Framework Version **v0.9.1**
package/bin/cli.js CHANGED
@@ -8,7 +8,7 @@ const __dirname = dirname(__filename);
8
8
 
9
9
  const cliPath = join(__dirname, "../src/cli/index.ts");
10
10
 
11
- // shell: false kullanarak argümanların (tırnakların) bozulmasını önle
11
+ // use shell: false to prevent argument (quote) corruption
12
12
  const child = spawn("npx", ["tsx", cliPath, ...process.argv.slice(2)], {
13
13
  stdio: "inherit",
14
14
  shell: false
@@ -0,0 +1,69 @@
1
+ #!/usr/bin/env node
2
+
3
+ import fs from "fs";
4
+ import path from "path";
5
+
6
+ const targetDir = process.cwd();
7
+
8
+ const candidates = [".gemini", ".claude", ".agent", ".enderun"];
9
+ let frameworkDir = ".enderun";
10
+ for (const dir of candidates) {
11
+ if (fs.existsSync(path.join(targetDir, dir))) {
12
+ frameworkDir = dir;
13
+ break;
14
+ }
15
+ }
16
+
17
+ let backend = "apps/backend";
18
+ let docs = "docs";
19
+
20
+ try {
21
+ const configPath = path.join(targetDir, frameworkDir, "config.json");
22
+ if (fs.existsSync(configPath)) {
23
+ const config = JSON.parse(fs.readFileSync(configPath, "utf8"));
24
+ if (config.paths) {
25
+ if (config.paths.backend) backend = config.paths.backend;
26
+ if (config.paths.docs) docs = config.paths.docs;
27
+ }
28
+ }
29
+ } catch (e) {
30
+ // ignore
31
+ }
32
+
33
+ const CRITICAL_STRUCTURE = [
34
+ `${frameworkDir}/agents`,
35
+ `${frameworkDir}/knowledge`,
36
+ `${frameworkDir}/memory-graph/agent-contexts`,
37
+ `${frameworkDir}/logs`,
38
+ `${frameworkDir}/queue`,
39
+ `${frameworkDir}/PROJECT_MEMORY.md`,
40
+ `${docs}/architecture/standards`,
41
+ `${backend}/src/database`,
42
+ `${backend}/src/seeds`,
43
+ `${backend}/migrations`
44
+ ];
45
+
46
+ function checkIntegrity() {
47
+ console.warn("🔍 Running Agent Enderun Framework Integrity Check...");
48
+ let isHealthy = true;
49
+
50
+ for (const item of CRITICAL_STRUCTURE) {
51
+ const fullPath = path.join(targetDir, item);
52
+ if (!fs.existsSync(fullPath)) {
53
+ console.error(`❌ Missing critical component: ${item}`);
54
+ isHealthy = false;
55
+ } else {
56
+ console.warn(`✅ Verified: ${item}`);
57
+ }
58
+ }
59
+
60
+ if (isHealthy) {
61
+ console.warn("\n✨ Framework integrity verified. System is healthy.");
62
+ process.exit(0);
63
+ } else {
64
+ console.error("\n❌ Framework integrity check FAILED. Some components are missing.");
65
+ process.exit(1);
66
+ }
67
+ }
68
+
69
+ checkIntegrity();
@@ -9,8 +9,30 @@ const __filename = fileURLToPath(import.meta.url);
9
9
  const __dirname = path.dirname(__filename);
10
10
  const projectRoot = path.join(__dirname, "..");
11
11
 
12
- const contractPath = path.join(projectRoot, "apps/backend/contract.version.json");
13
- const sharedTypesDir = path.join(projectRoot, "apps/backend/src/types");
12
+ const candidates = [".gemini", ".claude", ".agent", ".enderun"];
13
+ let frameworkDir = ".enderun";
14
+ for (const dir of candidates) {
15
+ if (fs.existsSync(path.join(projectRoot, dir))) {
16
+ frameworkDir = dir;
17
+ break;
18
+ }
19
+ }
20
+
21
+ let backend = "apps/backend";
22
+ try {
23
+ const configPath = path.join(projectRoot, frameworkDir, "config.json");
24
+ if (fs.existsSync(configPath)) {
25
+ const config = JSON.parse(fs.readFileSync(configPath, "utf8"));
26
+ if (config.paths && config.paths.backend) {
27
+ backend = config.paths.backend;
28
+ }
29
+ }
30
+ } catch (e) {
31
+ // ignore
32
+ }
33
+
34
+ const contractPath = path.join(projectRoot, backend, "contract.version.json");
35
+ const sharedTypesDir = path.join(projectRoot, backend, "src/types");
14
36
 
15
37
  function collectTypeFiles(dir) {
16
38
  const entries = fs.readdirSync(dir, { withFileTypes: true });
package/docs/README.md CHANGED
@@ -1,45 +1,34 @@
1
- # 🏛️ Agent Enderun — Kurumsal Mimari ve Yönetişim Portalı
1
+ # Agent Enderun — Governance and Architecture Portal
2
2
 
3
- Bu portal, Agent Enderun framework'ü altında geliştirilen kurumsal projelerin **Merkezi Bilgi Kaynağıdır**. Projenin mimari kararları, standartları ve yönetişim protokolleri burada mühürlenmiştir.
3
+ This portal is the **Central Knowledge Source** for enterprise projects developed under the Agent Enderun framework. The project's architectural decisions, standards, and governance protocols are sealed here.
4
4
 
5
- ---
6
-
7
- ## 🏗️ Mimari Felsefemiz: "Disiplinli Otonomi"
5
+ Unlike ordinary projects, Agent Enderun projects are built on a structure where AI agents operate autonomously but are bound by a rigid, human-authored constitution. This documentation is the **Immutable Guide** for both AI agents (Army) and human developers.
8
6
 
9
- Sıradan projelerin aksine, Agent Enderun projeleri yapay zeka ajanlarının otonom çalıştığı ancak insan eliyle yazılmış katı bir anayasaya bağlı kaldığı bir yapıdır. Bu dökümantasyon, hem AI ajanları (Army) hem de insan geliştiriciler için **Değişmez Rehberdir**.
7
+ ---
10
8
 
11
- ### 📋 Dokümantasyon Rehberi
9
+ ### 📋 Documentation Guide
12
10
 
13
- #### [1. Mimari ve Yönetişim (Architecture & Governance)](architecture/)
14
- * **[Mimari Karar Kayıtları (ADRs)](architecture/decisions/)**: Projenin kritik dönüm noktalarında alınan kararların "Neden" ve "Nasıl" sorularına verilen cevaplardır.
15
- * **[Onay ve Yüksek Riskli İş akışları](architecture/approval-flows.md)**: `managerApproval` token'larının nasıl üretildiği, denetlendiği ve yüksek riskli işlemlerin (örn: veritabanı silme, yetki yükseltme) nasıl mühürlendiği anlatılır.
16
- * **[Bildirim Stratejisi](architecture/notification-strategy.md)**: Kullanıcı deneyimini kesintiye uğratmayan, dinamik ve kurumsal bildirim desenleri.
11
+ #### [1. Architecture & Governance](architecture/)
12
+ * **[Approval & High-Risk Workflows](architecture/approval-flows.md)**: Explains how tokens are generated, audited, and how high-risk actions (e.g., database deletion, privilege escalation) are sealed.
17
13
 
18
- #### [2. Frontend Standartları (Frontend)](frontend/)
19
- * **[Bileşen Desenleri (Component Patterns)](frontend/component-patterns.md)**: **Zero-UI-Library** politikamız gereği, tüm bileşenlerin Panda CSS ile nasıl "el yapımı" ve tip-güvenli olarak inşa edileceği rehberi.
20
- * **[Form Doğrulamaları](frontend/forms.md)**: Zod ve React hooks ile yönetilen, hata payı sıfır form yönetim sistemleri.
21
- * **[Toaster Yapılandırması](frontend/notifications.md)**: Sonner ve benzeri araçların kurumsal tema ile entegrasyonu.
14
+ #### [2. Frontend Standards](frontend/)
15
+ * **[Component Patterns](frontend/component-patterns.md)**: Zero-UI-Library policy, guide on how all components are hand-crafted and type-safe using Panda CSS.
22
16
 
23
- #### [3. Backend Standartları (Backend)](backend/)
24
- * **[Hata Yönetimi (Error Handling)](backend/error-handling.md)**: `DomainError` sınıfları üzerinden, front-end'e sızmayan ve loglarda izlenebilen profesyonel hata yönetim hiyerarşisi.
25
- * **[Denetim Günlükleri (Audit Logging)](backend/audit-logging.md)**: Her işlemin bir `Trace ID` ile veritabanına kalıcı olarak nasıl işleneceğinin kontratları.
17
+ #### [3. Backend Standards](backend/)
18
+ * **[Error Handling](backend/error-handling.md)**: Professional error management hierarchy that does not leak to the front-end and is traceable in logs.
26
19
 
27
20
  ---
28
21
 
29
- ## 🛰️ Faz Bazlı Geliştirme Döngüsü (Life Cycle)
22
+ ## 🛰️ Phase-Based Development Life Cycle
23
+ All projects must pass the following 5 phases sequentially and completely:
30
24
 
31
- Tüm projeler aşağıdaki 5 fazı sırasıyla ve eksiksiz geçmek zorundadır:
32
-
33
- 1. **PHASE_0 (Keşif):** Teknoloji yığını (`tech-stack.md`) mühürlenir, risk analizi yapılır.
34
- 2. **PHASE_1 (Mimari & Kontrat):** Önce tipler ve API sözleşmeleri yazılır. Tek satır uygulama kodu yazılmadan kontratlar onaylanmalıdır.
35
- 3. **PHASE_2 (Çekirdek Geliştirme):** Backend ve Frontend paralel olarak inşa edilir. `Branded Types` kullanımı zorunludur.
36
- 4. **PHASE_3 (Entegrasyon & Test):** `@qa` ajanı devreye girer. **%80 Test Coverage** barajı geçilmeden bir sonraki faza geçilemez.
37
- 5. **PHASE_4 (Optimizasyon & Dağıtım):** Güvenlik taramaları (`check:security`) ve performans testleri tamamlanır.
38
-
39
- ---
25
+ 1. **PHASE_0 (Discovery):** Tech-stack (`tech-stack.md`) sealed, risk analysis performed.
26
+ 2. **PHASE_1 (Architecture & Contract):** First, types and API contracts are written. Contracts must be approved before a single line of application code is written.
27
+ 3. **PHASE_2 (Core Development):** Backend and Frontend are built in parallel. Branded Types usage is mandatory.
28
+ 4. **PHASE_3 (Integration & Test):** @quality agent takes over. 80% Test Coverage threshold must be met before proceeding to the next phase.
29
+ 5. **PHASE_4 (Optimization & Deployment):** Security scans and performance tests are completed.
40
30
 
41
- > [!IMPORTANT]
42
- > **Ajan Talimatı:** Bu klasör altındaki dökümanlar, ajanların operasyonel sınırlarını çizer. Bir ajan, burada tanımlanan bir kuralın dışına çıkamaz. Eğer bir kuralın güncellenmesi gerekiyorsa, bu ancak `@manager` onayıyla ve ADR kaydıyla yapılabilir.
31
+ > **Agent Directive:** The documents under this folder define the operational boundaries of the agents. An agent cannot deviate from a rule defined here. If a rule needs to be updated, this can only be done with @manager approval and ADR registration.
43
32
 
44
- **Sürüm:** v0.8.8
45
- **Durum:** Aktif Yönetişim
33
+ **Version:** v0.9.1
34
+ **Status:** Active Governance
@@ -0,0 +1,9 @@
1
+ # Architecture Patterns — Agent Enderun
2
+
3
+ This directory contains the non-negotiable technical standards and architectural patterns for the Agent Enderun framework.
4
+
5
+ ## Directory Structure
6
+ - `standards/`: Technical SOPs, design systems, and compliance mandates.
7
+
8
+ ## Core Mandate
9
+ All agents MUST read and adhere to these documents before initiating any implementation task.
@@ -0,0 +1,13 @@
1
+ # Architecture Patterns & Data Fetching
2
+
3
+ ## 1. UI Layout & Component Structure
4
+ - **Shared UI:** All atomic components (Button, Input, etc.) must be created in `apps/web/src/components/ui/` using **Panda CSS**.
5
+ - **Layouts:** Use wrapper layouts (`Shell`, `Workspace`) in `apps/web/src/components/layout/`. Every page must utilize these layouts to maintain consistency.
6
+ - **Procedural Continuity:** Never re-create an existing component. Search the `components/ui/` directory first.
7
+
8
+ ## 2. Data Fetching & API (CRUD) Patterns
9
+ - **Repository Pattern:** Backend logic must be separated into service/repository layers. No direct DB calls in controllers.
10
+ - **Contract-First:** All API endpoints must use types imported from `apps/backend/src/types/`.
11
+ - **API Layer:** Frontend must use typed fetcher functions located in `apps/web/src/api/`.
12
+ - **Validation:** Use `zod` for request validation on the backend and response validation on the frontend.
13
+ - **Audit Logging:** Every mutation (POST/PUT/PATCH/DELETE) MUST trigger an audit log service call with the current Trace ID.
@@ -0,0 +1,31 @@
1
+ # Design System — Agent Enderun (Enterprise)
2
+
3
+ ## 1. Design Philosophy
4
+ The Agent Enderun Design System focuses on **"Enterprise Clarity"**. Our interfaces are professional, minimalist tools designed to maximize data comprehension and operational speed.
5
+
6
+ - **Clarity:** Every pixel must serve a purpose. If it doesn't aid understanding or action, remove it.
7
+ - **Consistency:** Uniform visual language across all applications.
8
+ - **Responsiveness:** Fluid adaptation to any screen size, from mobile to ultra-wide monitors.
9
+
10
+ ## 2. Technical Requirements
11
+ - **Styling:** Panda CSS is MANDATORY. Tailwind, CSS-in-JS, and raw CSS modules are FORBIDDEN.
12
+ - **Zero UI Library:** No external components (MUI, AntD, Shadcn). All UI components must be built from scratch in `apps/web/src/components/ui/`.
13
+ - **Tokenization:** All values (colors, spacing, typography) MUST use `panda.config.ts` tokens. NO hardcoded pixels.
14
+ - **Responsiveness:** Mobile-First design is MANDATORY.
15
+
16
+ ## 3. Responsive Mandate (Mobile-First)
17
+ - **Design Strategy:** Design for 320px width first.
18
+ - **Breakpoints:**
19
+ - `sm`: 640px
20
+ - `md`: 768px
21
+ - `lg`: 1024px
22
+ - `xl`: 1280px
23
+ - `2xl`: 1536px
24
+ - **Layouts:** Use Flexbox and Grid. Fixed widths are FORBIDDEN. Use `clamp()` for fluid typography and spacing where applicable.
25
+ - **Reflow:** Content MUST gracefully wrap, stack, or collapse based on screen width without horizontal scrollbars.
26
+
27
+ ## 4. UI/UX Interaction Standards
28
+ - **Interactions:** Hover, Active, and Disabled states are MANDATORY for all interactive elements.
29
+ - **Feedback:** Async operations MUST show Loading states and Toast notifications on completion/error.
30
+ - **Blocking Dialogues:** Native `alert()` and `confirm()` functions are **FORBIDDEN**. Use project-integrated `Modal` components for blocking user interactions and `Toaster` for non-blocking feedback.
31
+ - **Focus:** All interactive elements must have a visible `focus` state for accessibility.
@@ -0,0 +1,7 @@
1
+ # Logging & Audit Standard
2
+
3
+ - **No Console.log:** Production code MUST NOT use `console.log`, `console.warn`, or `console.error`. These are FORBIDDEN in the codebase.
4
+ - **Structured Logging:** All logging MUST go through the centralized `Logger` service (`apps/backend/src/services/logger.ts`). Logs must be produced in JSON format.
5
+ - **Traceability:** Every log entry MUST include the active `traceId` context to ensure cross-agent and cross-service traceability.
6
+ - **Audit Logging:** Every state-mutating operation (POST, PUT, PATCH, DELETE) MUST trigger an `AuditService.log()` call, linking the action to the responsible agent, Trace ID, and entity ID.
7
+ - **Log Persistence:** Logs must be persisted in an structured manner suitable for downstream ingestion by log management systems.
@@ -0,0 +1,9 @@
1
+ # Tech Stack — Agent Enderun (Enterprise)
2
+
3
+ - **Execution Profile:** Full (Enterprise)
4
+ - **Frontend:** React (Vite), Panda CSS (Zero UI Library)
5
+ - **Backend:** Fastify API, Kysely (Query Builder)
6
+ - **Database:** PostgreSQL
7
+ - **Testing:** Vitest (Integration + Unit)
8
+ - **Auth:** Contract-first (Type definitions)
9
+ - **Versioning:** API-path versioning (/api/v1/...)