ai-enderun 0.0.6 → 0.0.7

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.
@@ -15,7 +15,7 @@ This file is the Single Source of Truth (SSOT) and the persistent memory of the
15
15
  | Project Name | AI-Enderun |
16
16
  | Platform | Agent skill sandbox / orchestration framework |
17
17
  | Frontend | React 19 + Vite + Zustand + Panda CSS |
18
- | Backend | Node.js 20+ + Fastify |
18
+ | Backend | Node.js 20+ + Fastify + Kysely |
19
19
  | DB | PostgreSQL |
20
20
  | Auth | Not yet defined |
21
21
  | Deploy | Not yet defined |
@@ -57,11 +57,74 @@ This file is the Single Source of Truth (SSOT) and the persistent memory of the
57
57
  | Trace ID | Task | Agent | Priority | Status |
58
58
  | :--- | :--- | :--- | :--- | :--- |
59
59
  | 01KR44729Z08BQQ4FCDAVNC148 | Documentation Overhaul & Agent Evangelism | @manager | P1 | COMPLETED |
60
+ | 01KR45N4S0XW6F7G6T1W8F9D2V | Smart Init System Implementation | @manager | P1 | COMPLETED |
61
+ | 01KR45Q8N1V7Z7H9R2M3W9X4Y1 | Robust Access Law & Tool Failure Resolution | @manager | P1 | COMPLETED |
62
+ | 01KR45W2Z91Y5K8M2T3V4X9N7R | Documentation Path Alignment (Root docs/ Fix) | @manager | P1 | COMPLETED |
63
+ | 01KR45Y0M2X3V1B7D9N4Z2K8L5 | README Quick Start Guide Addition | @manager | P2 | COMPLETED |
64
+ | 01KR460M3N1B5V9X2D4Z8L7K1R | Tech-Stack.md Relocation (Root docs/ Fix) | @manager | P1 | COMPLETED |
65
+ | 01KR463F8N1V7W2Z9M3D4G7H5K | Version Bump to v0.0.7 & Health Check | @manager | P1 | COMPLETED |
66
+ | 01KR4666M2X9R1T4V8D7Z2L5K1 | @manager SOP Hardening (MCP Health Check) | @manager | P1 | COMPLETED |
60
67
  | 01KR444BM94P5W3ERVJ3YJ9T01 | Agent Report Version Synchronization (v0.0.6) | @manager | P1 | COMPLETED |
61
68
  | 01KR442W6MP3GXHF7TD32GJG1V | Agent SOP Hardening & Continuity Alignment | @manager | P1 | COMPLETED |
62
69
 
63
70
  ## HISTORY (Persistent Memory)
64
71
 
72
+ ### 2026-05-08 — @manager SOP Hardening (MCP Health Check)
73
+
74
+ - **Agent:** @manager
75
+ - **Trace ID:** 01KR4666M2X9R1T4V8D7Z2L5K1
76
+ - **Action:** Hardened the `@manager` SOP by adding a mandatory MCP health check to the startup protocol. The manager must now verify connectivity at the beginning of every session and warn the user if tools are unresponsive.
77
+ - **Decision:** Shifted some health monitoring responsibility to the agent level to ensure the orchestration environment is always valid during active sessions.
78
+ - **Next Step:** Observe agent behavior during startup and verify they correctly report MCP issues.
79
+
80
+ ### 2026-05-08 — Version Bump to v0.0.7 & Health Check
81
+
82
+ - **Agent:** @manager
83
+ - **Trace ID:** 01KR463F8N1V7W2Z9M3D4G7H5K
84
+ - **Action:** Bumped framework version to `v0.0.7`. Implemented `ai-enderun check` command to verify framework health, directory existence, and MCP server readiness. Added automated warnings for missing dependencies and builds during `init`.
85
+ - **Decision:** Prioritized user experience by providing a verification tool to ensure the complex multi-component framework is correctly set up before starting orchestration.
86
+ - **Next Step:** Encourage users to run `ai-enderun check` as part of their initial setup.
87
+
88
+ ### 2026-05-08 — Tech-Stack.md Relocation (Root docs/ Fix)
89
+
90
+ - **Agent:** @manager
91
+ - **Trace ID:** 01KR460M3N1B5V9X2D4Z8L7K1R
92
+ - **Action:** Relocated `tech-stack.md` from `.enderun/docs/` to the root `docs/` directory. Updated `ENDERUN.md`, `README.md`, Agent SOPs, and MCP gap detection logic to reflect this change.
93
+ - **Decision:** Centralized all project-specific "What" and "How" documentation in the root `docs/` folder to improve visibility and clarify the separation between project requirements and framework internals.
94
+ - **Next Step:** Verify that agents are correctly auditing both requirements and tech stack from the root `docs/` folder.
95
+
96
+ ### 2026-05-08 — README Quick Start Guide Addition
97
+
98
+ - **Agent:** @manager
99
+ - **Trace ID:** 01KR45Y0M2X3V1B7D9N4Z2K8L5
100
+ - **Action:** Added a bilingual "Getting Started / Başlangıç Rehberi" section to the root `README.md`. Outlined the 5 critical steps for users to take after framework initialization to begin their orchestration journey.
101
+ - **Decision:** Improved user onboarding by providing clear, actionable post-install instructions directly in the main project entry point.
102
+ - **Next Step:** Maintain documentation clarity as new features are added.
103
+
104
+ ### 2026-05-08 — Documentation Path Alignment (Root docs/ Fix)
105
+
106
+ - **Agent:** @manager
107
+ - **Trace ID:** 01KR45W2Z91Y5K8M2T3V4X9N7R
108
+ - **Action:** Corrected outdated path references in `ENDERUN.md` and `framework-mcp`. Ensured that agents look for project requirements in root `docs/` and technical API contracts in `.enderun/docs/api`.
109
+ - **Decision:** Fully aligned all framework logic with the decoupled documentation model to eliminate agent confusion.
110
+ - **Next Step:** Verify that agents are now correctly identifying project requirements in the root `docs/` folder.
111
+
112
+ ### 2026-05-08 — Robust Access Law & Tool Failure Resolution
113
+
114
+ - **Agent:** @manager
115
+ - **Trace ID:** 01KR45Q8N1V7Z7H9R2M3W9X4Y1
116
+ - **Action:** Resolved agent failures regarding `Shell date` and direct `ReadFile` of `.enderun/PROJECT_MEMORY.md`. Implemented `get_system_time` and `read_project_memory` MCP tools. Established the "Robust Access Law" in `ENDERUN.md` and updated all Agent SOPs to mandate these tools.
117
+ - **Decision:** Mandated MCP tools for sensitive operations to bypass shell environment inconsistencies and restricted file access in certain agent environments.
118
+ - **Next Step:** Monitor agent stability and ensure all clients correctly utilize the new tools.
119
+
120
+ ### 2026-05-08 — Smart Init System Implementation
121
+
122
+ - **Agent:** @manager
123
+ - **Trace ID:** 01KR45N4S0XW6F7G6T1W8F9D2V
124
+ - **Action:** Upgraded the `ai-enderun init` command to a "Smart Init" system. Refactored `bin/cli.js` to support `package.json` merging, `.gitignore` updates, and automated `PROJECT_MEMORY.md` initialization. Excluded project-specific state files from the initial framework copy.
125
+ - **Decision:** Shifted from simple file copying to a non-destructive, project-aware initialization process to improve user experience and framework adoption.
126
+ - **Next Step:** Monitor user feedback and refine adapter-specific smart setup logic.
127
+
65
128
  ### 2026-05-08 — Documentation Overhaul & Agent Evangelism
66
129
 
67
130
  - **Agent:** @manager
@@ -3,7 +3,7 @@ name: analyst
3
3
  description: "Project memory, QA gate, and documentation specialist. Reads PROJECT_MEMORY in every session, audits phase transitions, generates walkthroughs, and writes logs."
4
4
  ---
5
5
 
6
- # Project Analyst & QA Gate — v0.0.6 Master
6
+ # Project Analyst & QA Gate — v0.0.7 Master
7
7
 
8
8
  **Role:** Maintain project memory, serve as a quality gate, and manage documentation. The following protocols are automatically applied in every task.
9
9
 
@@ -17,7 +17,7 @@ When analyzing or preparing documentation, never read the content of a file just
17
17
 
18
18
  ## 🧠 Memory Management (Mandatory in Every Session)
19
19
 
20
- `.enderun/PROJECT_MEMORY.md` is read at the beginning of every session:
20
+ `.enderun/PROJECT_MEMORY.md` is read at the beginning of every session using the `read_project_memory` tool:
21
21
 
22
22
  - What is the active phase?
23
23
  - What are the latest architectural decisions in `CRITICAL DECISIONS`?
@@ -28,11 +28,11 @@ When analyzing or preparing documentation, never read the content of a file just
28
28
  ### Writing — Lock Protocol
29
29
 
30
30
  ```
31
- 1. Is .enderun/PROJECT_MEMORY.lock present?
31
+ 1. Is .enderun/PROJECT_MEMORY.lock present? (Check via list_dir or file check)
32
32
  └─ If yes: Wait 1s, retry (max 5 attempts)
33
33
  └─ After 5 attempts: Report "BLOCKED — Memory Lock Timeout"
34
34
  2. Create lock
35
- 3. Write to PROJECT_MEMORY.md (Prefer using update_project_memory tool)
35
+ 3. Write to PROJECT_MEMORY.md (MUST use update_project_memory tool)
36
36
  4. Delete lock
37
37
  ```
38
38
 
@@ -169,7 +169,7 @@ Use the `log_agent_action` tool to record your activities securely.
169
169
 
170
170
  ---
171
171
 
172
- **Agent Completion Report** (v0.0.6)
172
+ **Agent Completion Report** (v0.0.7)
173
173
 
174
174
  - Mock used? [ ] No / [ ] Yes
175
175
  - shared-types changed? [ ] No / [ ] Yes
@@ -3,7 +3,7 @@ name: backend
3
3
  description: "Backend Architect. Expert in Node.js, Fastify, Kysely, and PostgreSQL. Leader of Contract and Database. Automatically applies backend-architecture standards in every task."
4
4
  ---
5
5
 
6
- # Backend Architect — v0.0.6 Master
6
+ # Backend Architect — v0.0.7 Master
7
7
 
8
8
  **Role:** Build a secure, high-performance, and consistent server architecture. All the following standards are automatically applied in every task — no need for the user to specify them separately.
9
9
 
@@ -219,7 +219,7 @@ When `shared-types` changes:
219
219
 
220
220
  ---
221
221
 
222
- **Agent Completion Report** (v0.0.6)
222
+ **Agent Completion Report** (v0.0.7)
223
223
  - Mock used? [ ] No / [ ] Yes
224
224
  - shared-types changed? [ ] No / [ ] Yes → contract.version updated
225
225
  - **API contract written? [ ] No / [ ] Yes → .enderun/docs/api/[domain].md**
@@ -3,7 +3,7 @@ name: explorer
3
3
  description: "Codebase Research & Dependency Specialist. Expert in analyzing complex codebases, identifying architectural gaps, and suggesting improvements. Automatically provides context in every research task."
4
4
  ---
5
5
 
6
- # Codebase Explorer — v0.0.6 Master
6
+ # Codebase Explorer — v0.0.7 Master
7
7
 
8
8
  **Role:** Analyze the codebase, map architectures, and understand system-wide dependencies. Your primary duty is to provide context to other agents.
9
9
 
@@ -17,7 +17,7 @@ Never suggest a change without understanding the current state of the codebase.
17
17
 
18
18
  ## 🔌 SESSION STARTUP PROTOCOL (Mandatory)
19
19
 
20
- 1. Read `.enderun/PROJECT_MEMORY.md` → Understand the current state and latest `CRITICAL DECISIONS`.
20
+ 1. Read `.enderun/PROJECT_MEMORY.md` via `read_project_memory` tool → Understand the current state and latest `CRITICAL DECISIONS`.
21
21
  2. Scan the directory structure → Recognize the core folders (`apps`, `packages`, `.enderun`).
22
22
  3. Identify the main configuration files (`package.json`, `tsconfig.json`, `ENDERUN.md`).
23
23
 
@@ -79,7 +79,7 @@ Every research report must include:
79
79
 
80
80
  ---
81
81
 
82
- **Agent Completion Report** (v0.0.6)
82
+ **Agent Completion Report** (v0.0.7)
83
83
 
84
84
  - Mock used? [ ] No / [ ] Yes
85
85
  - Codebase searched? [ ] No / [ ] Yes
@@ -3,7 +3,7 @@ name: frontend
3
3
  description: "UI/UX & Frontend Architect. Expert in React 19, Vite, Zustand, and Panda CSS. Fluid & Modern design specialist. Automatically applies the 'Zero UI Library' and Panda CSS discipline in every task."
4
4
  ---
5
5
 
6
- # Frontend Architect — v0.0.6 Master
6
+ # Frontend Architect — v0.0.7 Master
7
7
 
8
8
  **Role:** Build original, high-performance, and responsive user interfaces. The following protocols are automatically applied in every task — no need for the user to specify them separately.
9
9
 
@@ -125,7 +125,7 @@ Frontend never creates its own types for backend data.
125
125
 
126
126
  ---
127
127
 
128
- **Agent Completion Report** (v0.0.6)
128
+ **Agent Completion Report** (v0.0.7)
129
129
  - Mock used? [ ] No / [ ] Yes
130
130
  - shared-types imported? [ ] No / [ ] Yes
131
131
  - **API contract read? [ ] No / [ ] Yes → .enderun/docs/api/**
@@ -3,7 +3,7 @@ name: manager
3
3
  description: "CTO & Controller. Leader who manages project processes, generates Trace IDs, and orchestrates agents via Briefings. Reads ENDERUN.md and PROJECT_MEMORY in every session, validates the phase, and assigns agents."
4
4
  ---
5
5
 
6
- # Manager (CTO & Controller) — v0.0.6 Master
6
+ # Manager (CTO & Controller) — v0.0.7 Master
7
7
 
8
8
  **Role:** Enforce all framework rules without compromise and direct agents to the correct tasks. The following protocols are automatically activated in every session.
9
9
 
@@ -20,15 +20,18 @@ description: "CTO & Controller. Leader who manages project processes, generates
20
20
  ## 🔌 Session Startup Protocol (Mandatory — Every Session, Cannot Be Skipped)
21
21
 
22
22
  1. Read `ENDERUN.md` — internalize all rules and the Continuity Principle.
23
- 2. Read `.enderun/PROJECT_MEMORY.md` and extract the following:
23
+ 2. Read `.enderun/PROJECT_MEMORY.md` (via `read_project_memory` tool) and extract the following:
24
24
  - `CURRENT STATUS` → Which phase are we in? Is there an active Trace ID?
25
25
  - `CRITICAL DECISIONS` → What was decided in previous sessions? **MUST COMPLY.**
26
26
  - `ACTIVE TASKS` → Are there any ongoing tasks? Has agent assignment been made?
27
27
  - `HISTORY` → Read the last 3 entries to understand previous work.
28
28
  3. Check `.enderun/docs/api/README.md` → Which endpoints exist? Are there missing contracts?
29
- 4. Check `.enderun/docs/tech-stack.md` — if missing, **STOP and ASK**.
29
+ 4. Check root `docs/tech-stack.md` — if missing, **STOP and ASK**.
30
30
  5. Check root `docs/` — identify user project requirements/stories.
31
- 6. Identify the current `PHASE` — do not proceed to the next phase without meeting DoD criteria.
31
+ 6. **Framework Health Check:** Try to call a simple MCP tool (e.g., `get_framework_status`).
32
+ - **If it fails:** Warn the user: "⚠️ MCP Server might be down. Please run `ai-enderun check` to verify."
33
+ - **If it succeeds:** Proceed normally.
34
+ 7. Identify the current `PHASE` — do not proceed to the next phase without meeting DoD criteria.
32
35
 
33
36
  > ✅ **End of Session Requirement:** Add a summary to `.enderun/PROJECT_MEMORY.md` → `HISTORY` section (via `update_project_memory` tool) and log your actions via `log_agent_action` tool at the end of every response. This step cannot be skipped.
34
37
 
@@ -54,7 +57,7 @@ Trace ID: 01H... (26-character ULID)
54
57
 
55
58
  ---
56
59
 
57
- ## Briefing Template v0.0.6 (Mandatory in Every Agent Directive)
60
+ ## Briefing Template v0.0.7 (Mandatory in Every Agent Directive)
58
61
 
59
62
  ```
60
63
  ## Agent Directive
@@ -142,7 +145,7 @@ graph TD
142
145
 
143
146
  ---
144
147
 
145
- **Agent Completion Report** (v0.0.6)
148
+ **Agent Completion Report** (v0.0.7)
146
149
 
147
150
  - Mock used? [ ] No / [ ] Yes
148
151
  - shared-types changed? [ ] No / [ ] Yes
@@ -3,7 +3,7 @@ name: mobile
3
3
  description: "Mobile Application Expert. Specialist in React Native and Expo. Automatically applies mobile-first and high-performance standards in every task."
4
4
  ---
5
5
 
6
- # Mobile Architect — v0.0.6 Master
6
+ # Mobile Architect — v0.0.7 Master
7
7
 
8
8
  **Role:** Build high-performance mobile applications using React Native. Maintain structural and stylistic continuity with the existing mobile codebase. All the following standards are automatically applied in every task.
9
9
 
@@ -44,7 +44,7 @@ Never start coding before understanding the current state of the components and
44
44
 
45
45
  ---
46
46
 
47
- **Agent Completion Report** (v0.0.6)
47
+ **Agent Completion Report** (v0.0.7)
48
48
 
49
49
  - Mock used? [ ] No / [ ] Yes
50
50
  - shared-types imported? [ ] No / [ ] Yes
@@ -3,7 +3,7 @@ name: native
3
3
  description: "Native Application Expert. Specialist in Rust, Tauri, and Electron. Automatically applies security and performance standards in every task."
4
4
  ---
5
5
 
6
- # Native Desktop Architect — v0.0.6 Master
6
+ # Native Desktop Architect — v0.0.7 Master
7
7
 
8
8
  **Role:** Build secure and efficient desktop applications using Tauri or Electron. Ensure procedural continuity across the native codebase.
9
9
 
@@ -43,7 +43,7 @@ Always research the existing codebase and native bridge implementations before a
43
43
 
44
44
  ---
45
45
 
46
- **Agent Completion Report** (v0.0.6)
46
+ **Agent Completion Report** (v0.0.7)
47
47
 
48
48
  - Mock used? [ ] No / [ ] Yes
49
49
  - shared-types imported? [ ] No / [ ] Yes
package/CLAUDE.md CHANGED
@@ -1,4 +1,4 @@
1
- # AI-Enderun — Claude Code Adapter (v0.0.6)
1
+ # AI-Enderun — Claude Code Adapter (v0.0.7)
2
2
 
3
3
  This file is the Claude Code adapter layer.
4
4
  Core framework rules and agent capabilities are defined in `./ENDERUN.md`.
package/CODEX.md CHANGED
@@ -1,4 +1,4 @@
1
- # AI-Enderun — Codex Adapter (v0.0.6)
1
+ # AI-Enderun — Codex Adapter (v0.0.7)
2
2
 
3
3
  This file is the Codex adapter layer.
4
4
  Core framework rules and agent capabilities are defined in `./ENDERUN.md`.
package/CURSOR.md CHANGED
@@ -1,4 +1,4 @@
1
- # AI-Enderun — Cursor Adapter (v0.0.6)
1
+ # AI-Enderun — Cursor Adapter (v0.0.7)
2
2
 
3
3
  This file is the Cursor adapter layer.
4
4
  Core framework rules and agent capabilities are defined in `./ENDERUN.md`.
package/ENDERUN.md CHANGED
@@ -1,4 +1,4 @@
1
- # AI-Enderun — Supreme Performance AI Orchestration (v0.0.6)
1
+ # AI-Enderun — Supreme Performance AI Orchestration (v0.0.7)
2
2
 
3
3
  # Place in project root. This file is the single source of truth for all AI clients (Gemini CLI, Claude Code, etc.).
4
4
 
@@ -34,7 +34,7 @@ This project is an "Agent Development School" designed to maximize the professio
34
34
  - `PROJECT DEFINITION` and `DOD STATUS` sections → Is the architectural framework and phase quality clear?
35
35
  - `HISTORY` section → Read the last 3 entries to understand previous work.
36
36
 
37
- 3. **Check `.enderun/docs/` Folder:** Verify if `tech-stack.md` and `project-docs.md` exist.
37
+ 3. **Check Documentation:** Verify if root `docs/tech-stack.md` and root `docs/project-docs.md` exist.
38
38
 
39
39
  4. **Default Stack:**
40
40
  - **Frontend:** React 19 + Vite (SPA) + Zustand + Panda CSS.
@@ -121,6 +121,7 @@ Trace ID: 01H... (26-character ULID)
121
121
  - **Exception 2:** Unit Tests → Mocks allowed for external dependencies.
122
122
  - **Branded Types Law:** All IDs must be Branded Types (`packages/shared-types`).
123
123
  - **Search Before Reading:** No agent should read a file blindly; first scan the context with `search_codebase`, `analyze_dependencies`, `get_memory_insights`, and `get_project_gaps`. Legacy prompt compatibility aliases like `codebase_search`, `codebase_graph_query`, `codebase_context`, `codebase_context_search`, and `codebase_status` are also supported.
124
+ - **Robust Access Law:** Agents MUST use MCP tools for system time (`get_system_time`) and memory reading (`read_project_memory`). Using Shell `date` or direct `ReadFile` on `.enderun/PROJECT_MEMORY.md` is strictly forbidden to ensure cross-platform stability.
124
125
  - **Procedural Continuity:** Agents MUST maintain consistency with existing code patterns. Before editing any file, analyze its current style, library usage, and architectural approach. Finish a task using the same standards it was started with. If a pattern change is required, it must be approved by @manager and recorded in `CRITICAL DECISIONS`.
125
126
  - **Full-Spectrum Responsive:** Every component starts mobile-first (320px) and must remain fluid using `clamp()` and `aspect-ratio` up to ultra-wide screens (1920px+).
126
127
  - **Supreme Frontend Aesthetics:** @frontend must avoid "AI slop" aesthetics; design original, characterful, and production-quality interfaces. **Zero UI Library Policy:** Agents never use ready-made component libraries like `shadcn/ui`, `MUI`, or `Chakra UI`. All UI components (Button, Modal, Input, etc.) must be built from scratch using Panda CSS, unique to the project.
@@ -288,7 +289,7 @@ _Logs are stored as a **JSON Array**. Every turn appends a new object to the arr
288
289
 
289
290
  ---
290
291
 
291
- **Agent Completion Report** (v1.0.6)
292
+ **Agent Completion Report** (v1.0.7)
292
293
 
293
294
  - Mock used? [ ] No / [ ] Yes
294
295
  - shared-types changed? [ ] No / [ ] Yes
package/GEMINI.md CHANGED
@@ -1,4 +1,4 @@
1
- # AI-Enderun — General Agent Adapter (v0.0.6)
1
+ # AI-Enderun — General Agent Adapter (v0.0.7)
2
2
 
3
3
  This file is the general adapter layer for AI agents (Gemini, GPT-4o, etc.).
4
4
  Core framework rules and agent capabilities are defined in `./ENDERUN.md`.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # AI-Enderun v0.0.6
1
+ # AI-Enderun v0.0.7
2
2
 
3
3
  English | [Turkce](#turkce)
4
4
 
@@ -19,6 +19,14 @@ AI-Enderun provides a structured operating model for AI-driven software delivery
19
19
  - `packages/framework-mcp` exposes the MCP server and framework tools.
20
20
  - `bin/cli.js` provides the `ai-enderun` CLI.
21
21
 
22
+ ### 🚀 Getting Started
23
+
24
+ 1. **Initialize:** Run `npx ai-enderun init gemini` (or `claude`, `cursor`, `codex`).
25
+ 2. **Define Stack:** Fill in your project's technology stack in `docs/tech-stack.md`.
26
+ 3. **Define Requirements:** Place your project goals and user stories in the root `docs/project-docs.md` file.
27
+ 4. **Start Orchestration:** Generate your first Trace ID (ULID): `ai-enderun trace:new "Initial project setup"`
28
+ 5. **Collaborate:** Talk to your AI assistant. It will automatically detect the `ENDERUN.md` constitution and follow the specialized SOPs in `.enderun/agents/`.
29
+
22
30
  ### Directory Model
23
31
 
24
32
  ```text
@@ -26,14 +34,14 @@ AI-Enderun provides a structured operating model for AI-driven software delivery
26
34
  |-- .enderun/
27
35
  | |-- agents/ # Agent SOP (Standard Operating Procedure) files
28
36
  | |-- docs/ # Framework-specific technical documentation
29
- | | |-- tech-stack.md
30
37
  | | |-- ARCHITECTURE.md
31
38
  | | `-- api/ # API Contracts (OpenAPI/Shared-types)
32
39
  | |-- logs/ # Structured JSON logs of agent actions
33
40
  | |-- PROJECT_MEMORY.md # Single Source of Truth for project state
34
41
  | `-- config.json
35
42
  |-- docs/ # User project requirements (The "What" to build)
36
- | `-- project-docs.md
43
+ | |-- project-docs.md
44
+ | `-- tech-stack.md
37
45
  |-- packages/
38
46
  | |-- framework-mcp/ # Core MCP server tools
39
47
  | `-- shared-types/ # Contract-first type definitions
@@ -108,7 +116,15 @@ ai-enderun trace:new <desc> # Yeni bir gorev zinciri (ULID) baslatir
108
116
  ai-enderun verify-contract # Kontrat uyumunu kontrol eder
109
117
  ```
110
118
 
111
- ### v0.0.6 Yenilikleri
119
+ ### 🚀 Başlangıç Rehberi
120
+
121
+ 1. **Kurulum:** `npx ai-enderun init gemini` (veya `claude`, `cursor`, `codex`) komutunu çalıştırın.
122
+ 2. **Teknoloji Yığınını Belirleyin:** `docs/tech-stack.md` dosyasını projenize göre doldurun.
123
+ 3. **Gereksinimleri Ekleyin:** Proje hedeflerinizi ve kullanıcı hikayelerinizi kök dizindeki `docs/project-docs.md` dosyasına yerleştirin.
124
+ 4. **Görevi Başlatın:** İlk görev zincirini (ULID) oluşturun: `ai-enderun trace:new "Proje iskeletini oluştur"`
125
+ 5. **Ajanlarla Çalışın:** Yapay zeka yardımcınızla konuşun. Artık projenizdeki `ENDERUN.md` anayasasını ve `.enderun/agents/` içindeki uzman rollerini tanıyarak disiplinli bir şekilde çalışacaktır.
126
+
127
+ ### v0.0.7 Yenilikleri
112
128
 
113
129
  - **Akilli Kurulum:** Gemini icin otomatik symlink, Claude icin otomatik MCP kurulum yardimcisi.
114
130
  - **Süreklilik İlkesi:** Ajanlarin mevcut kod yazim tarzina ve mimari kararlara sadik kalma zorunlulugu.
package/bin/cli.js CHANGED
@@ -10,6 +10,9 @@ const __dirname = path.dirname(__filename);
10
10
  const sourceDir = path.join(__dirname, "..");
11
11
  const targetDir = process.cwd();
12
12
 
13
+ // --- CONSTANTS ---
14
+ const FRAMEWORK_VERSION = "0.0.7";
15
+
13
16
  // --- HELPER FUNCTIONS ---
14
17
 
15
18
  function getPackageVersion() {
@@ -89,6 +92,138 @@ function normalizePriority(priority) {
89
92
  return /^P[0-3]$/.test(normalized) ? normalized : "P2";
90
93
  }
91
94
 
95
+ function mergePackageJson(targetPath, sourcePath) {
96
+ let targetPkg = {};
97
+ if (fs.existsSync(targetPath)) {
98
+ try {
99
+ targetPkg = JSON.parse(fs.readFileSync(targetPath, "utf8"));
100
+ } catch (e) {
101
+ console.warn("⚠️ Could not parse existing package.json, creating a new one.");
102
+ }
103
+ }
104
+
105
+ const sourcePkg = JSON.parse(fs.readFileSync(sourcePath, "utf8"));
106
+
107
+ // Merge scripts
108
+ targetPkg.scripts = {
109
+ ...targetPkg.scripts,
110
+ "enderun:status": "ai-enderun status",
111
+ "enderun:trace": "ai-enderun trace:new",
112
+ "enderun:verify": "ai-enderun verify-contract",
113
+ };
114
+
115
+ // Ensure basic fields
116
+ if (!targetPkg.name) targetPkg.name = path.basename(process.cwd());
117
+ if (!targetPkg.version) targetPkg.version = "0.1.0";
118
+ if (!targetPkg.type) targetPkg.type = "module";
119
+
120
+ // Add metadata
121
+ targetPkg.enderun = {
122
+ version: sourcePkg.version,
123
+ initializedAt: new Date().toISOString(),
124
+ };
125
+
126
+ fs.writeFileSync(targetPath, JSON.stringify(targetPkg, null, 2));
127
+ console.log("✅ package.json updated with Enderun scripts.");
128
+ }
129
+
130
+ function updateGitIgnore(targetPath) {
131
+ const IGNORE_LINES = [
132
+ ".enderun/*.lock",
133
+ ".enderun/logs/*.json",
134
+ "node_modules",
135
+ ".DS_Store",
136
+ ".env",
137
+ ];
138
+
139
+ let content = "";
140
+ if (fs.existsSync(targetPath)) {
141
+ content = fs.readFileSync(targetPath, "utf8");
142
+ }
143
+
144
+ const lines = content.split("\n").map((l) => l.trim());
145
+ let added = false;
146
+
147
+ for (const line of IGNORE_LINES) {
148
+ if (!lines.includes(line)) {
149
+ content += (content.endsWith("\n") || content === "" ? "" : "\n") + line + "\n";
150
+ added = true;
151
+ }
152
+ }
153
+
154
+ if (added) {
155
+ fs.writeFileSync(targetPath, content);
156
+ console.log("✅ .gitignore updated.");
157
+ }
158
+ }
159
+
160
+ function initializeMemory(memoryPath) {
161
+ if (fs.existsSync(memoryPath)) return;
162
+
163
+ const traceId = generateULID();
164
+ const date = new Date().toISOString().split("T")[0];
165
+ const template = `# PROJECT MEMORY — AI-Enderun
166
+
167
+ This file is the Single Source of Truth (SSOT) and the persistent memory of the project.
168
+
169
+ ## CURRENT STATUS
170
+
171
+ | Active Phase | Profile | Last Update | Active Trace ID | Blockers |
172
+ | :----------- | :------ | :---------- | :-------------- | :------- |
173
+ | PHASE_0 | Lightweight | ${date} | ${traceId} | NONE |
174
+
175
+ ## PROJECT DEFINITION
176
+
177
+ | Field | Value |
178
+ | :--- | :--- |
179
+ | Project Name | ${path.basename(process.cwd())} |
180
+ | Platform | Not defined |
181
+ | Frontend | React 19 + Vite + Panda CSS |
182
+ | Backend | Node.js 20+ + Fastify |
183
+ | DB | PostgreSQL |
184
+
185
+ ## DOD STATUS
186
+
187
+ | Phase | Status | Note |
188
+ | :--- | :--- | :--- |
189
+ | PHASE_0 | IN_PROGRESS | Initializing project structure |
190
+ | PHASE_1 | PENDING | |
191
+ | PHASE_2 | PENDING | |
192
+ | PHASE_3 | PENDING | |
193
+ | PHASE_4 | PENDING | |
194
+
195
+ ## CRITICAL DECISIONS
196
+
197
+ | Date | Decision | Rationale | Agent |
198
+ | :--- | :--- | :--- | :--- |
199
+ | ${date} | Project Initialized | Framework setup via CLI | @manager |
200
+
201
+ ## DELIVERABLES
202
+
203
+ | Module | Status | Agent | Date |
204
+ | :--- | :--- | :--- | :--- |
205
+
206
+ ## ACTIVE TASKS
207
+
208
+ | Trace ID | Task | Agent | Priority | Status |
209
+ | :--- | :--- | :--- | :--- | :--- |
210
+ | ${traceId} | Framework setup and architecture alignment | @manager | P1 | IN_PROGRESS |
211
+
212
+ ## HISTORY (Persistent Memory)
213
+
214
+ ### ${date} — Framework Initialization
215
+
216
+ - **Agent:** @manager
217
+ - **Trace ID:** ${traceId}
218
+ - **Action:** Initialized AI-Enderun framework and project structure.
219
+ - **Decision:** Starting with Lightweight profile.
220
+ - **Next Step:** Define user requirements in docs/project-docs.md.
221
+ `;
222
+
223
+ fs.writeFileSync(memoryPath, template);
224
+ console.log("✅ PROJECT_MEMORY.md initialized.");
225
+ }
226
+
92
227
  // --- COMMANDS ---
93
228
 
94
229
  /**
@@ -108,38 +243,71 @@ async function initCommand(selectedAdapter) {
108
243
  "mcp.json",
109
244
  "ENDERUN.md",
110
245
  "README.md",
111
- "package.json",
112
246
  "packages/framework-mcp",
113
247
  "packages/shared-types",
114
248
  ];
115
249
 
116
- console.log("🚀 Installing AI Agent Framework...");
117
-
118
- let filesToCopy = [...CORE_FILES];
250
+ const DIRS_TO_CREATE = [
251
+ ".enderun/agents",
252
+ ".enderun/docs/api",
253
+ ".enderun/logs",
254
+ "apps/web",
255
+ "apps/backend",
256
+ "docs",
257
+ "packages/shared-types",
258
+ "packages/framework-mcp",
259
+ ];
260
+
261
+ console.log("🚀 Installing AI-Enderun (Smart Mode)...");
262
+
263
+ // Create directories
264
+ for (const dir of DIRS_TO_CREATE) {
265
+ const fullPath = path.join(targetDir, dir);
266
+ if (!fs.existsSync(fullPath)) {
267
+ fs.mkdirSync(fullPath, { recursive: true });
268
+ console.log(`📂 Created directory: ${dir}`);
269
+ }
270
+ }
271
+
272
+ let filesToProcess = [...CORE_FILES];
119
273
 
120
274
  if (selectedAdapter) {
121
275
  if (!ADAPTERS[selectedAdapter]) {
122
276
  console.error(`❌ Invalid adapter: ${selectedAdapter}. Available: gemini, claude, cursor, codex`);
123
277
  process.exit(1);
124
278
  }
125
- filesToCopy = [...CORE_FILES, ...ADAPTERS[selectedAdapter]];
279
+ filesToProcess = [...CORE_FILES, ...ADAPTERS[selectedAdapter]];
126
280
  } else {
127
- Object.values(ADAPTERS).forEach(list => filesToCopy.push(...list));
281
+ Object.values(ADAPTERS).forEach(list => filesToProcess.push(...list));
128
282
  }
129
283
 
130
- for (const item of filesToCopy) {
284
+ for (const item of filesToProcess) {
131
285
  const src = path.join(sourceDir, item);
132
286
  const dest = path.join(targetDir, item);
133
287
  if (fs.existsSync(src)) {
134
288
  if (fs.lstatSync(src).isDirectory()) {
135
- copyDir(src, dest);
289
+ // When copying .enderun, skip logs and project-specific state
290
+ const skipFiles = item === ".enderun" ? ["logs", "PROJECT_MEMORY.md", "BRAIN_DASHBOARD.md", "PROJECT_MEMORY.lock"] : [];
291
+ copyDir(src, dest, new Set(skipFiles));
136
292
  } else {
293
+ // Special files handling
294
+ if (item === "package.json") continue;
295
+ if (item === "ENDERUN.md" && fs.existsSync(dest)) {
296
+ console.log(`ℹ️ Skipping ENDERUN.md (already exists).`);
297
+ continue;
298
+ }
299
+
137
300
  fs.copyFileSync(src, dest);
138
301
  }
139
- console.log(`✅ ${item} created.`);
302
+ console.log(`✅ ${item} processed.`);
140
303
  }
141
304
  }
142
305
 
306
+ // Smart setup
307
+ mergePackageJson(path.join(targetDir, "package.json"), path.join(sourceDir, "package.json"));
308
+ updateGitIgnore(path.join(targetDir, ".gitignore"));
309
+ initializeMemory(getMemoryPath());
310
+
143
311
  // --- Post-Install Hooks (Smart Setup) ---
144
312
 
145
313
  console.log("\n🛠️ Running smart configuration for adapters...");
@@ -170,23 +338,83 @@ async function initCommand(selectedAdapter) {
170
338
  }
171
339
 
172
340
  if (selectedAdapter === "cursor" || !selectedAdapter) {
173
- // Add cursor-specific rules or settings if needed
174
- console.log("✨ Cursor: Adapter CLAUDE.md is ready to guide your AI.");
341
+ console.log("✨ Cursor: Adapter CLAUDE.md and ENDERUN.md are ready to guide your AI.");
342
+ }
343
+
344
+ console.log("\n✨ Framework successfully installed! (v" + FRAMEWORK_VERSION + ")");
345
+ console.log("\n⚠️ IMPORTANT: Run 'npm install && npm run build' to prepare the framework.");
346
+ console.log("👉 Then run 'ai-enderun check' to verify the installation.");
347
+ }
348
+
349
+ /**
350
+ * Check framework health and MCP status.
351
+ */
352
+ function checkCommand() {
353
+ console.log(`🔍 Checking AI-Enderun Health (v${FRAMEWORK_VERSION})...`);
354
+ let issues = 0;
355
+
356
+ const checks = [
357
+ { name: "Constitution (ENDERUN.md)", path: "ENDERUN.md" },
358
+ { name: "Memory (PROJECT_MEMORY.md)", path: ".enderun/PROJECT_MEMORY.md" },
359
+ { name: "Shared Types", path: "packages/shared-types/package.json" },
360
+ { name: "MCP Server", path: "packages/framework-mcp/package.json" },
361
+ { name: "Tech Stack", path: "docs/tech-stack.md" },
362
+ { name: "Requirements", path: "docs/project-docs.md" },
363
+ ];
364
+
365
+ for (const check of checks) {
366
+ if (fs.existsSync(path.join(process.cwd(), check.path))) {
367
+ console.log(`✅ ${check.name} found.`);
368
+ } else {
369
+ console.log(`❌ ${check.name} MISSING! (${check.path})`);
370
+ issues++;
371
+ }
175
372
  }
176
373
 
177
- console.log("\n✨ Framework successfully installed! (v" + getPackageVersion() + ")");
374
+ // Dependency Check
375
+ const mcpNodeModules = path.join(process.cwd(), "packages/framework-mcp/node_modules");
376
+ if (!fs.existsSync(mcpNodeModules)) {
377
+ console.log("❌ Dependencies MISSING! (Run 'npm install')");
378
+ issues++;
379
+ } else {
380
+ console.log("✅ Dependencies found.");
381
+ }
382
+
383
+ // MCP Build Check
384
+ const mcpPath = path.join(process.cwd(), "packages/framework-mcp/dist/index.js");
385
+ if (!fs.existsSync(mcpPath)) {
386
+ console.log("❌ MCP Build MISSING! (Run 'npm run build')");
387
+ issues++;
388
+ } else {
389
+ console.log("✅ MCP Build found.");
390
+ console.log("⏳ Testing MCP Server syntax...");
391
+ try {
392
+ execSync(`node --check ${mcpPath}`, { stdio: "pipe" });
393
+ console.log("✅ MCP Server syntax valid.");
394
+ } catch (e) {
395
+ // If --check fails on ESM, we might skip it or use a better check
396
+ console.log("⚠️ MCP Syntax check skipped (ESM/Environment).");
397
+ }
398
+ }
399
+
400
+ if (issues === 0) {
401
+ console.log("\n🚀 All systems green! AI-Enderun is ready for orchestration.");
402
+ } else {
403
+ console.log(`\n⚠️ Found ${issues} issues. Please fix them before starting.`);
404
+ }
178
405
  }
179
406
 
180
- function copyDir(src, dest) {
181
- const SKIP_NAMES = new Set(["node_modules", ".git", ".DS_Store"]);
407
+ function copyDir(src, dest, skipSet = new Set()) {
408
+ const DEFAULT_SKIP = new Set(["node_modules", ".git", ".DS_Store"]);
409
+ const actualSkip = new Set([...DEFAULT_SKIP, ...skipSet]);
182
410
 
183
411
  fs.mkdirSync(dest, { recursive: true });
184
412
  fs.readdirSync(src, { withFileTypes: true }).forEach(entry => {
185
- if (SKIP_NAMES.has(entry.name)) return;
413
+ if (actualSkip.has(entry.name)) return;
186
414
 
187
415
  const srcPath = path.join(src, entry.name);
188
416
  const destPath = path.join(dest, entry.name);
189
- entry.isDirectory() ? copyDir(srcPath, destPath) : fs.copyFileSync(srcPath, destPath);
417
+ entry.isDirectory() ? copyDir(srcPath, destPath, skipSet) : fs.copyFileSync(srcPath, destPath);
190
418
  });
191
419
  }
192
420
 
@@ -319,17 +547,21 @@ async function main() {
319
547
  case "verify-contract":
320
548
  verifyContractCommand();
321
549
  break;
550
+ case "check":
551
+ checkCommand();
552
+ break;
322
553
  case "version":
323
554
  case "-v":
324
555
  case "--version":
325
- console.log(`v${getPackageVersion()}`);
556
+ console.log(`v${FRAMEWORK_VERSION}`);
326
557
  break;
327
558
  default:
328
559
  console.log(`
329
- 🤖 AI-Enderun CLI (v${getPackageVersion()})
560
+ 🤖 AI-Enderun CLI (v${FRAMEWORK_VERSION})
330
561
 
331
562
  Available Commands:
332
563
  init [adapter] Initialize the framework (gemini, claude, cursor, codex)
564
+ check Verify framework health and MCP server status
333
565
  status Show current phase and task status
334
566
  trace:new <desc> Generate a new Trace ID and add the task to memory
335
567
  verify-contract Check if shared types match the stored hash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-enderun",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Supreme AI Orchestration Framework — Senior Discipline & Ottoman Wisdom",
5
5
  "author": "Yusuf BEKAR <ybekar@msn.com>",
6
6
  "repository": {
@@ -1,4 +1,4 @@
1
- # AI-Enderun MCP Server v0.0.6
1
+ # AI-Enderun MCP Server v0.0.7
2
2
 
3
3
  English | [Turkce](#turkce)
4
4
 
@@ -8,7 +8,7 @@ import crypto from "crypto";
8
8
  import { Project, SyntaxKind } from "ts-morph";
9
9
  const server = new Server({
10
10
  name: "ai-enderun-mcp",
11
- version: "0.0.6",
11
+ version: "0.0.7",
12
12
  }, {
13
13
  capabilities: {
14
14
  tools: {},
@@ -40,7 +40,7 @@ const LOG_AGENT_ACTION_ARGS_SCHEMA = z.object({
40
40
  summary: z.string().min(1),
41
41
  details: z.record(z.any()).default({}),
42
42
  });
43
- const FRAMEWORK_VERSION = "0.0.6";
43
+ const FRAMEWORK_VERSION = "0.0.7";
44
44
  function resolveSafePath(projectRoot, targetPath) {
45
45
  const resolved = path.resolve(projectRoot, targetPath);
46
46
  const relative = path.relative(projectRoot, resolved);
@@ -303,6 +303,16 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
303
303
  required: ["agent", "action", "requestId", "status", "summary"],
304
304
  },
305
305
  },
306
+ {
307
+ name: "get_system_time",
308
+ description: "Get the current system time in ISO-8601 format (UTC). Use this instead of Shell 'date' commands.",
309
+ inputSchema: { type: "object", properties: {} },
310
+ },
311
+ {
312
+ name: "read_project_memory",
313
+ description: "Read the entire content of .enderun/PROJECT_MEMORY.md safely. Use this instead of direct ReadFile tools to ensure framework compatibility.",
314
+ inputSchema: { type: "object", properties: {} },
315
+ },
306
316
  ],
307
317
  };
308
318
  });
@@ -509,11 +519,13 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
509
519
  const checkPaths = [
510
520
  { path: "apps", type: "folder", optional: true },
511
521
  { path: "packages/shared-types/src", type: "folder" },
512
- { path: "docs/api", type: "folder", optional: true },
522
+ { path: ".enderun/docs/api", type: "folder", optional: true },
513
523
  { path: ".env", type: "file", optional: true },
514
524
  { path: ".env.example", type: "file" },
515
525
  { path: ".enderun/PROJECT_MEMORY.md", type: "file" },
516
526
  { path: ".enderun/BRAIN_DASHBOARD.md", type: "file" },
527
+ { path: "docs/tech-stack.md", type: "file" },
528
+ { path: "docs/project-docs.md", type: "file" },
517
529
  ];
518
530
  for (const item of checkPaths) {
519
531
  const fullPath = path.join(projectRoot, item.path);
@@ -915,6 +927,24 @@ Contract is invalid or out of date!
915
927
  };
916
928
  }
917
929
  }
930
+ case "get_system_time": {
931
+ return {
932
+ content: [{ type: "text", text: new Date().toISOString() }],
933
+ };
934
+ }
935
+ case "read_project_memory": {
936
+ try {
937
+ const memoryPath = path.join(projectRoot, ".enderun", "PROJECT_MEMORY.md");
938
+ if (!fs.existsSync(memoryPath)) {
939
+ return { content: [{ type: "text", text: "ERROR: PROJECT_MEMORY.md not found." }] };
940
+ }
941
+ const content = fs.readFileSync(memoryPath, "utf-8");
942
+ return { content: [{ type: "text", text: content }] };
943
+ }
944
+ catch (error) {
945
+ return { content: [{ type: "text", text: "ERROR: Failed to read PROJECT_MEMORY.md" }] };
946
+ }
947
+ }
918
948
  default:
919
949
  throw new Error(`Tool not found: ${name}`);
920
950
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-enderun-mcp",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Enterprise-grade MCP Server for AI Agent Framework — Memory, Security & AST Intelligence",
5
5
  "author": "Yusuf BEKAR <ybekar@msn.com>",
6
6
  "repository": {
@@ -1,4 +1,4 @@
1
- # AI-Enderun Shared Types v0.0.6
1
+ # AI-Enderun Shared Types v0.0.7
2
2
 
3
3
  English | [Turkce](#turkce)
4
4
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Shared Types — AI-Enderun v0.0.6
2
+ * Shared Types — AI-Enderun v0.0.7
3
3
  * Bu paketteki tüm tipler backend ve frontend arasındaki kontratı tanımlar.
4
4
  * Sadece @backend düzenler, @frontend okur/import eder.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Shared Types — AI-Enderun v0.0.6
2
+ * Shared Types — AI-Enderun v0.0.7
3
3
  * Bu paketteki tüm tipler backend ve frontend arasındaki kontratı tanımlar.
4
4
  * Sadece @backend düzenler, @frontend okur/import eder.
5
5
  */
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-enderun-shared-types",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Shared TypeScript types for AI-Enderun Framework. Ensures Contract-First synchronization between agents.",
5
5
  "author": "Yusuf BEKAR <ybekar@msn.com>",
6
6
  "repository": {
File without changes