agent-enderun 0.0.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.
package/ENDERUN.md ADDED
@@ -0,0 +1,72 @@
1
+ # Agent Enderun Constitution — v0.0.1
2
+
3
+ # Place in project root. This file is the single source of truth for all AI clients (Gemini CLI, Claude Code, etc.).
4
+
5
+ ## 🎖️ I. Git Discipline Protocol (The Law of Origin)
6
+
7
+ - **Atomic Commits:** Each commit must represent a single, logical unit of change. No "fix" or "wip" commits allowed.
8
+ - **Commit Message Format:** `[Type](Scope): Description` (e.g., `feat(api): add auth header validation`).
9
+ - **Phase Snapshots:** Every transition between `STATE MACHINE` phases must be marked with a git tag corresponding to the phase name (e.g., `git tag -a v0.1.5-phase1`).
10
+ - **Branching:** Use `feature/trace-id-short-description` for all task-based work.
11
+
12
+ ---
13
+
14
+ ## 🧠 II. Procedural Continuity (The Law of Style)
15
+
16
+ - **Style Inheritance:** Agents MUST read and follow existing code patterns and stylistic standards. NEVER impose a new style (e.g., changing from Arrow Functions to Function Declarations) unless explicitly asked.
17
+ - **Proactive Engineering:** Autonomously implement professional standards (Pagination, Search, Validation, Loading States, Error UI) without waiting for explicit user instructions.
18
+ - **Search-Before-Reading:** Always use `search_codebase` or `analyze_dependencies` before opening files to minimize token usage and maximize context accuracy.
19
+
20
+ ---
21
+
22
+ ## ⚖️ III. State Machine (The Law of Phase)
23
+
24
+ ### PHASE 0: Discovery & Setup
25
+ - **DoD:** `tech-stack.md` defined, `project-docs.md` updated, `shared-types` initialized.
26
+
27
+ ### PHASE 1: Architecture & Contract
28
+ - **DoD:** All API endpoints documented in `{{FRAMEWORK_DIR}}/docs/api/`, shared-types match the contract hash.
29
+
30
+ ### PHASE 2: Core Implementation
31
+ - **DoD:** Backend logic complete, unit tests passing, mobile/web scaffolded.
32
+
33
+ ### PHASE 3: Integration & UI
34
+ - **DoD:** Frontend linked to backend, E2E tests passing, mobile features verified.
35
+
36
+ ### PHASE 4: Hardening & Launch
37
+ - **DoD:** Security audit passed, performance optimized, project tagged for release.
38
+
39
+ ---
40
+
41
+ ## 👥 IV. The 8 Specialist Protocol
42
+
43
+ All agent interactions are governed by 8 specialized roles found in `{{FRAMEWORK_DIR}}/agents/`:
44
+
45
+ 1. **@manager:** CTO & Controller. Orchestrates the team and manages memory.
46
+ 2. **@analyst:** QA & Memory Gate. Audits DoD and generates walkthroughs.
47
+ 3. **@backend:** Backend Architect. Master of Contracts, DB, and Type Safety.
48
+ 4. **@frontend:** UI/UX Architect. Enforcer of "Zero UI Library" and Panda CSS.
49
+ 5. **@explorer:** Investigator. Scans codebase and maps dependencies.
50
+ 6. **@mobile:** App Specialist. Expert in React Native and Expo.
51
+ 7. **@native:** Desktop Architect. Expert in Tauri and Electron.
52
+ 8. **@git:** Version Control Specialist. Guardian of atomic commits and snapshots.
53
+
54
+ ---
55
+
56
+ ## 💾 V. Memory Management (The Law of Truth)
57
+
58
+ - **PROJECT_MEMORY.md:** The SINGLE SOURCE OF TRUTH. Agents MUST read this file at the start of every session.
59
+ - **CURRENT STATUS Update:** Update the `Active Phase`, `Last Update`, and `Active Trace ID` fields in the `CURRENT STATUS` table at the end of every session.
60
+ - **Trace ID Protocol:** Generate a ULID for every new task chain. All agents working on the same feature use the same Trace ID.
61
+
62
+ ---
63
+
64
+ ## 🎨 VI. Design Philosophy (The Law of Aesthetics)
65
+
66
+ - **Zero UI Library Policy:** Forbidden to use `shadcn/ui`, `MUI`, `Tailwind` or other generic libraries.
67
+ - **Panda CSS Standard:** All styling must use Panda CSS tokens and original components.
68
+ - **Premium Aesthetics:** Every interface must feel premium, state-of-the-art, and characterful. Avoid MVP-level simplicity.
69
+
70
+ ---
71
+
72
+ _Generated by Agent Enderun Framework v0.0.1_
package/README.md ADDED
@@ -0,0 +1,293 @@
1
+ # Agent Enderun (v0.0.1)
2
+
3
+ [English](#english) | [Türkçe](#türkçe)
4
+
5
+ ---
6
+
7
+ # English
8
+
9
+ Agent Enderun is a purpose-built, enterprise-grade AI orchestration framework for software teams who want to use AI inside a repository without losing engineering discipline. It turns AI assistants into specialized collaborators by enforcing rules, preserving context, and coordinating multi-agent workflows.
10
+
11
+ ## Why Agent Enderun exists
12
+
13
+ Most AI assistants are powerful but inconsistent in code repositories. Agent Enderun solves this by making the repository itself the source of truth:
14
+
15
+ - Enforce a single architecture and style guide.
16
+ - Keep every decision recorded in persistent project memory.
17
+ - Separate AI guidance from production code with hidden adapter directories.
18
+ - Prevent backend/frontend contract drift using shared types and API documentation.
19
+ - Enable engineers to work with AI without giving up traceability, auditability, or quality.
20
+
21
+ ## Core Concepts
22
+
23
+ ### Constitution — `ENDERUN.md`
24
+ A built-in lawbook for your AI helpers. Every agent must read it first and follow its rules, including phase gates, code style policies, and forbidden actions.
25
+
26
+ ### Project Memory — `PROJECT_MEMORY.md`
27
+ A persistent project brain that records active phase, trace IDs, decisions, and history. It keeps the project state machine coherent across sessions and agents.
28
+
29
+ ### Agent Academy
30
+ A team of specialized agents, each with a strict SOP and a unique domain:
31
+
32
+ - `@manager`: orchestration, phase gating, trace IDs
33
+ - `@analyst`: QA, documentation, memory auditing
34
+ - `@backend`: backend architecture, contracts, security
35
+ - `@frontend`: UI/UX, Panda CSS, frontend continuity
36
+ - `@explorer`: codebase research, dependency mapping
37
+ - `@mobile`: mobile strategy and performance
38
+ - `@native`: desktop integration and OS constraints
39
+ - `@git`: git hygiene, atomic commits, traceable history
40
+
41
+ ### Clean Root Policy
42
+ All AI-specific logic, agent instructions, and memory live in adapter directories such as `.gemini/`, `.claude/`, `.cursor/`, or `.codex/`. Your repository root stays clean for production assets, docs, and source code.
43
+
44
+ ### Contract-First Architecture
45
+ Backend and frontend communicate through `packages/shared-types` and documented API contracts in `{{FRAMEWORK_DIR}}/docs/api/`. This prevents mismatched expectations and ensures both sides implement the same contract.
46
+
47
+ ### Zero UI Library Policy
48
+ The frontend must use Panda CSS and no third-party UI kits. This gives you original visuals, better performance, and zero runtime UI dependencies.
49
+
50
+ ## What makes Agent Enderun different
51
+
52
+ - Persistent, audited project memory for every decision.
53
+ - Multi-agent orchestration instead of a single general-purpose assistant.
54
+ - Strict phase transitions from discovery to delivery.
55
+ - Built-in contract verification and shared typed APIs.
56
+ - Hidden adapter directories to keep CI-friendly repository roots.
57
+ - Explicit package manager intelligence in the CLI.
58
+
59
+ ## Project structure
60
+
61
+ ```
62
+ /README.md
63
+ /CHANGELOG.md
64
+ /.enderun/
65
+ /.gemini/ or /.claude/
66
+ /apps/backend/
67
+ /apps/web/
68
+ /packages/framework-mcp/
69
+ /packages/shared-types/
70
+ /docs/
71
+ ```
72
+
73
+ ### Key folders
74
+
75
+ - `apps/backend/` — server implementation and business logic.
76
+ - `apps/web/` — frontend interface and Panda CSS UI.
77
+ - `packages/shared-types/` — shared contract types for all agents.
78
+ - `packages/framework-mcp/` — MCP server tools for AI-assisted workflows.
79
+ - `.enderun/` — framework rules, memory, agent SOPs, and hidden configuration.
80
+
81
+ ## Installation and setup
82
+
83
+ Agent Enderun detects the package manager automatically, but you can also force it using an environment variable:
84
+
85
+ ```bash
86
+ AGENT_ENDERUN_PACKAGE_MANAGER=npm npx agent-enderun init gemini
87
+ AGENT_ENDERUN_PACKAGE_MANAGER=yarn npx agent-enderun init gemini
88
+ AGENT_ENDERUN_PACKAGE_MANAGER=pnpm npx agent-enderun init gemini
89
+ ```
90
+
91
+ > Legacy environment variables `AI_ENDERUN_PACKAGE_MANAGER` and `AGENT_ENDERUN_PM` are still accepted for compatibility.
92
+
93
+ ### Recommended install flow
94
+
95
+ ```bash
96
+ npx agent-enderun init gemini
97
+ npm install && npm run enderun:build
98
+ agent-enderun check
99
+ ```
100
+
101
+ If you already use `pnpm` or `yarn`, the CLI will prefer the correct lockfile and runtime environment.
102
+
103
+ ## CLI Quick Reference
104
+
105
+ | Command | Purpose |
106
+ | --- | --- |
107
+ | `npx agent-enderun init <adapter>` | Scaffold the framework and hidden adapter files |
108
+ | `agent-enderun check` | Validate framework health, memory, contracts and build artifacts |
109
+ | `agent-enderun trace:new "desc"` | Create a new task Trace ID |
110
+ | `agent-enderun verify-contract` | Verify shared type contract hash |
111
+ | `npm run enderun:build` | Build shared-types and framework-mcp packages |
112
+
113
+ ## Typical workflow
114
+
115
+ 1. Initialize with `npx agent-enderun init gemini`.
116
+ 2. Add project requirements in `docs/project-docs.md`.
117
+ 3. Confirm stack and architecture in `docs/tech-stack.md`.
118
+ 4. Use `agent-enderun trace:new` to start a new task.
119
+ 5. Let the manager agent delegate work to specialized agents.
120
+ 6. Keep every change logged in `.enderun/PROJECT_MEMORY.md`.
121
+
122
+ ## Onboarding new engineers
123
+
124
+ Share these project truths:
125
+
126
+ - Always read `ENDERUN.md` before editing.
127
+ - Every task belongs to a trace ID.
128
+ - Use `shared-types` instead of hand-writing API types.
129
+ - No third-party UI libraries in the frontend.
130
+ - Keep AI adapter config hidden under `.gemini/`, `.claude/`, `.cursor/`, or `.codex/`.
131
+
132
+ ## Troubleshooting
133
+
134
+ - If `agent-enderun init` fails during install, rerun with the correct package manager override.
135
+ - If `agent-enderun check` reports missing build artifacts, run `npm run enderun:build`.
136
+ - If contract hashes drift, run `npm run verify-contract` and update `packages/shared-types/contract.version.json`.
137
+
138
+ ## Contribution and extension
139
+
140
+ Agent Enderun is designed to be extended through:
141
+
142
+ - new adapter directories (`.gemini/`, `.claude/`, `.cursor/`, `.codex/`)
143
+ - additional agent SOPs under `.enderun/agents`
144
+ - new project-specific API contracts in `.enderun/docs/api/`
145
+ - shared type expansions in `packages/shared-types/src`
146
+
147
+ If you add a new capability, document it in `CHANGELOG.md` and preserve the existing version header.
148
+
149
+ ---
150
+
151
+ # Türkçe
152
+
153
+ Agent Enderun, kod deposunda AI kullanırken mühendislik disiplini ve izlenebilirliği korumak isteyen ekipler için tasarlanmış bir AI orkestrasyon çerçevesidir. Yapay zeka yardımcılarını, profesyonel bir mühendis ekibinin parçası gibi çalışacak şekilde yapılandırır.
154
+
155
+ ## Neden Agent Enderun?
156
+
157
+ Çoğu AI asistanı güçlü olsa da kod tabanlarında tutarlı davranmayabilir. Agent Enderun bu sorunu şu şekilde çözer:
158
+
159
+ - Tek mimari ve stil rehberi uygular.
160
+ - Her kararı kalıcı proje hafızasına kaydeder.
161
+ - AI talimatlarını üretim kodundan gizli dizinlerde tutar.
162
+ - Backend ve frontend sözleşmelerinin uyumunu `shared-types` ile sağlar.
163
+ - AI ile çalışırken izlenebilirlik ve kalite kaybını engeller.
164
+
165
+ ## Temel Kavramlar
166
+
167
+ ### Anayasa — `ENDERUN.md`
168
+ Tüm AI ajanlarının okumak ve uymak zorunda olduğu kural kitabı. Faz geçişleri, kod politikaları ve yasaklı hareketler burada tanımlanır.
169
+
170
+ ### Proje Hafızası — `PROJECT_MEMORY.md`
171
+ Aktif fazı, trace ID'leri, kararları ve tarihsel kayıtları saklayan kalıcı beyin.
172
+
173
+ ### Ajan Akademisi
174
+ Her biri kendi uzmanlık alanı ve SOP'u olan bir ajan takımı:
175
+
176
+ - `@manager`: orkestrasyon, faz kapıları, trace ID yönetimi
177
+ - `@analyst`: kalite, dokümantasyon, hafıza denetimi
178
+ - `@backend`: backend mimarisi, sözleşmeler, güvenlik
179
+ - `@frontend`: UI/UX, Panda CSS, frontend sürekliliği
180
+ - `@explorer`: kod tabanı araştırması, bağımlılık haritalama
181
+ - `@mobile`: mobil strateji ve performans
182
+ - `@native`: masaüstü entegrasyonu ve işletim sistemi kısıtları
183
+ - `@git`: git hijyeni, atomik commit'ler, izlenebilir tarihçe
184
+
185
+ ### Temiz Kök Politikası
186
+ Tüm AI spesifik yapı `.gemini/`, `.claude/`, `.cursor/` veya `.codex/` gibi gizli dizinlerde saklanır. Depo kökü sadece üretim kodu, doküman ve yapılandırma için temiz kalır.
187
+
188
+ ### Sözleşme Öncelikli Mimari
189
+ Backend ve frontend, `packages/shared-types` ve `{{FRAMEWORK_DIR}}/docs/api/` belgeleri üzerinden eşleşir. Bu, taraflar arasında yanlış anlaşılma ihtimalini azaltır.
190
+
191
+ ### Sıfır UI Kütüphanesi Politikası
192
+ Frontend, Panda CSS kullanmalı ve üçüncü taraf UI kitleri yasaklanmalıdır. Böylece performans, özgünlük ve sıfır runtime bağımlılığı sağlanır.
193
+
194
+ ## Agent Enderun’u Öne Çıkaranlar
195
+
196
+ - Kalıcı, denetlenebilir proje hafızası.
197
+ - Tek bir genel asistan yerine uzman ajan orkestrasyonu.
198
+ - Keşiften teslimata kadar sıkı faz geçişleri.
199
+ - Paylaşılan tipler ve API sözleşme doğrulaması.
200
+ - Gizli adaptör dizinleriyle temiz depo kökü.
201
+ - CLI içinde paket yöneticisi akıllılığı.
202
+
203
+ ## Proje Yapısı
204
+
205
+ ```
206
+ /README.md
207
+ /CHANGELOG.md
208
+ /.enderun/
209
+ /.gemini/ veya /.claude/
210
+ /apps/backend/
211
+ /apps/web/
212
+ /packages/framework-mcp/
213
+ /packages/shared-types/
214
+ /docs/
215
+ ```
216
+
217
+ ### Ana klasörler
218
+
219
+ - `apps/backend/` — sunucu uygulaması ve iş mantığı.
220
+ - `apps/web/` — frontend UI ve Panda CSS bileşenleri.
221
+ - `packages/shared-types/` — ortak sözleşme tipleri.
222
+ - `packages/framework-mcp/` — AI destekli MCP sunucu araçları.
223
+ - `.enderun/` — çerçeve kuralları, hafıza, ajan SOP'ları ve gizli yapılandırma.
224
+
225
+ ## Kurulum ve Hazırlık
226
+
227
+ Agent Enderun, paket yöneticisini otomatik algılar; ancak aşağıdaki değişken ile zorlayabilirsiniz:
228
+
229
+ ```bash
230
+ AGENT_ENDERUN_PACKAGE_MANAGER=npm npx agent-enderun init gemini
231
+ AGENT_ENDERUN_PACKAGE_MANAGER=yarn npx agent-enderun init gemini
232
+ AGENT_ENDERUN_PACKAGE_MANAGER=pnpm npx agent-enderun init gemini
233
+ ```
234
+
235
+ ### Önerilen kurulum akışı
236
+
237
+ ```bash
238
+ npx agent-enderun init gemini
239
+ npm install && npm run enderun:build
240
+ agent-enderun check
241
+ ```
242
+
243
+ ## CLI Hızlı Referans
244
+
245
+ | Komut | Amaç |
246
+ | --- | --- |
247
+ | `npx agent-enderun init <adapter>` | Çerçeveyi ve gizli adaptör dosyalarını kurar |
248
+ | `agent-enderun check` | Çerçeve sağlığını, hafızayı, kontratları ve build çıktısını doğrular |
249
+ | `agent-enderun trace:new "desc"` | Yeni bir görev Trace ID'si oluşturur |
250
+ | `agent-enderun verify-contract` | paylaşılan tip hash'ini doğrular |
251
+ | `npm run enderun:build` | shared-types ve framework-mcp paketlerini derler |
252
+
253
+ ## Tipik iş akışı
254
+
255
+ 1. `npx agent-enderun init gemini` ile başlatın.
256
+ 2. `docs/project-docs.md` içinde gereksinimleri yazın.
257
+ 3. `docs/tech-stack.md` içinde teknoloji ve mimariyi doğrulayın.
258
+ 4. `agent-enderun trace:new` ile görev başlatın.
259
+ 5. `manager` ajanın işleri ilgili uzman ajanlara yönlendirmesini bekleyin.
260
+ 6. Her değişikliği `.enderun/PROJECT_MEMORY.md` içinde kaydedin.
261
+
262
+ ## Yeni gelenler için
263
+
264
+ Her yazılımcıya şunu iletin:
265
+
266
+ - Önce `ENDERUN.md` okuyun.
267
+ - Her görev bir Trace ID gerektirir.
268
+ - API veri tiplerini elle yazmayın; `shared-types` kullanın.
269
+ - Frontend’de üçüncü taraf UI kütüphaneleri kullanmayın.
270
+ - AI adaptör yapılandırmaları gizli dizinlerde tutulur.
271
+
272
+ ## Sorun giderme
273
+
274
+ - `agent-enderun init` kurulum sırasında hata veriyorsa doğru paket yöneticisi ile yeniden çalıştırın.
275
+ - `agent-enderun check` build artefaktları eksik diyorsa `npm run enderun:build` çalıştırın.
276
+ - Kontrat hash'leri uyuşmuyorsa `npm run verify-contract` çalıştırın ve `packages/shared-types/contract.version.json` güncelleyin.
277
+
278
+ ## Katkıda bulunma ve genişletme
279
+
280
+ Agent Enderun şu yollarla genişletilebilir:
281
+
282
+ - yeni adaptör dizinleri ekleyerek (`.gemini/`, `.claude/`, `.cursor/`, `.codex/`)
283
+ - `.enderun/agents` altına yeni ajan SOP'ları ekleyerek
284
+ - `.enderun/docs/api/` altına yeni API sözleşmeleri ekleyerek
285
+ - `packages/shared-types/src` içindeki paylaşılan tipleri genişleterek
286
+
287
+ Yeni bir özellik ekliyorsanız, bunu `CHANGELOG.md` içinde belgeleyin ve mevcut sürüm başlığını koruyun.
288
+
289
+ ---
290
+
291
+ ## License
292
+
293
+ MIT - (c) 2026 Yusuf BEKAR