agent-enderun 0.4.7 → 0.5.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/PROJECT_MEMORY.md +15 -1
- package/.enderun/docs/tech-stack.md +38 -10
- package/.enderun/knowledge/branded_types_pattern.md +7 -0
- package/.enderun/knowledge/hermes_protocol.md +59 -0
- package/.enderun/knowledge/zero_ui_library_policy.md +8 -4
- package/ENDERUN.md +11 -6
- package/README.md +62 -51
- package/bin/cli.js +8 -10
- package/bin/update-contract.js +44 -0
- package/claude.md +4 -1
- package/codex.md +4 -1
- package/cursor.md +4 -1
- package/gemini.md +4 -1
- package/package.json +10 -8
- package/packages/framework-mcp/dist/index.js +2 -1
- package/packages/framework-mcp/dist/schemas.js +14 -0
- package/packages/framework-mcp/dist/tools/framework.js +25 -0
- package/packages/framework-mcp/dist/tools/knowledge.js +75 -11
- package/packages/framework-mcp/dist/tools/memory.js +3 -1
- package/packages/framework-mcp/dist/tools/messages.js +61 -8
- package/packages/framework-mcp/dist/tools/repository.js +6 -2
- package/packages/framework-mcp/dist/utils.js +3 -3
- package/packages/framework-mcp/package.json +1 -1
- package/packages/framework-mcp/src/index.ts +2 -1
- package/packages/framework-mcp/src/schemas.ts +18 -0
- package/packages/framework-mcp/src/tools/academy.ts +17 -11
- package/packages/framework-mcp/src/tools/codebase.ts +5 -5
- package/packages/framework-mcp/src/tools/contract.ts +3 -3
- package/packages/framework-mcp/src/tools/database.ts +1 -1
- package/packages/framework-mcp/src/tools/framework.ts +29 -5
- package/packages/framework-mcp/src/tools/git.ts +1 -1
- package/packages/framework-mcp/src/tools/index.ts +1 -1
- package/packages/framework-mcp/src/tools/knowledge.ts +88 -14
- package/packages/framework-mcp/src/tools/memory.ts +5 -3
- package/packages/framework-mcp/src/tools/messages.ts +81 -13
- package/packages/framework-mcp/src/tools/repository.ts +8 -3
- package/packages/framework-mcp/src/tools/security.ts +2 -2
- package/packages/framework-mcp/src/utils.ts +3 -3
- package/packages/shared-types/contract.version.json +7 -4
- package/packages/shared-types/package.json +1 -1
- package/.enderun/ENDERUN.md +0 -205
|
@@ -6,10 +6,12 @@ This file is the Single Source of Truth (SSOT) and the persistent memory of the
|
|
|
6
6
|
|
|
7
7
|
| Active Phase | Profile | Last Update | Active Trace ID | Blockers |
|
|
8
8
|
| :----------- | :------ | :---------- | :-------------- | :------- |
|
|
9
|
-
| PHASE_0 | Lightweight | 2026-05-
|
|
9
|
+
| PHASE_0 | Lightweight | 2026-05-15 | 01KR6EJA6GG3RPS849097KS37Q | NONE |
|
|
10
10
|
|
|
11
11
|
## PROJECT DEFINITION
|
|
12
12
|
|
|
13
|
+
- **Name:** Agent Enderun
|
|
14
|
+
- **Version:** v0.5.1
|
|
13
15
|
| Field | Value |
|
|
14
16
|
| :--- | :--- |
|
|
15
17
|
| Project Name | agent-enderun |
|
|
@@ -49,6 +51,18 @@ This file is the Single Source of Truth (SSOT) and the persistent memory of the
|
|
|
49
51
|
|
|
50
52
|
## HISTORY (Persistent Memory)
|
|
51
53
|
|
|
54
|
+
### 2026-05-15 — The Academy Upgrade & v0.5.1 Release
|
|
55
|
+
|
|
56
|
+
- **Agent:** @manager
|
|
57
|
+
- **Trace ID:** 01KR6EJA6GG3RPS849097KS37Q
|
|
58
|
+
- **Action:** Major framework upgrade (v0.5.1). Implemented Hermes Messaging Protocol and Obsidian-style LLM Wiki with YAML metadata. Consolidated constitution into root `ENDERUN.md` and removed legacy `jest.config.js`. Enhanced MCP server with new intelligence tools for knowledge graphs and system health.
|
|
59
|
+
|
|
60
|
+
### 2026-05-15 — Hermes + Obsidian + LLM Wiki & Discovery
|
|
61
|
+
|
|
62
|
+
- **Agent:** @manager
|
|
63
|
+
- **Trace ID:** 01KR6EJA6GG3RPS849097KS37Q
|
|
64
|
+
- **Action:** Major upgrade to framework intelligence. Implemented Hermes Messaging Protocol for inter-agent orchestration and Obsidian-style structured Wiki for knowledge management. Unified versioning across all packages to v0.5.0.
|
|
65
|
+
|
|
52
66
|
### 2026-05-12 — The Installation Fix & v0.4.5 Release
|
|
53
67
|
+
|
|
54
68
|
+- **Agent:** @manager
|
|
@@ -1,10 +1,38 @@
|
|
|
1
|
-
# TECH STACK
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
|
6
|
-
|
|
|
7
|
-
|
|
|
8
|
-
|
|
|
9
|
-
|
|
|
10
|
-
|
|
|
1
|
+
# TECH STACK & ARCHITECTURE
|
|
2
|
+
|
|
3
|
+
## Core Technologies
|
|
4
|
+
|
|
5
|
+
| Layer | Technology | Description |
|
|
6
|
+
| :--- | :--- | :--- |
|
|
7
|
+
| **Frontend** | React 19 + Vite (SPA) | Modern, fast, and scalable UI layer. |
|
|
8
|
+
| **Styling** | Panda CSS | Type-safe, zero-runtime CSS-in-JS for high performance. |
|
|
9
|
+
| **Backend** | Node.js (Fastify/Hono) | High-performance, schema-driven backend architecture. |
|
|
10
|
+
| **Database** | PostgreSQL (Kysely) | Type-safe SQL builder for robust data management. |
|
|
11
|
+
| **Orchestration** | Agent Enderun (v0.5.0) | Multi-agent autonomous governance framework. |
|
|
12
|
+
|
|
13
|
+
## Architectural Patterns
|
|
14
|
+
|
|
15
|
+
- **Contract-First Development:** All API and data models are defined in `packages/shared-types` before implementation.
|
|
16
|
+
- **Branded Types Law:** All unique identifiers must be branded to prevent type-collision and runtime errors.
|
|
17
|
+
- **Zero Mock Policy:** Real integration with database/services is preferred over fragile mocks (except for external 3rd-party APIs).
|
|
18
|
+
- **Phase-Based Execution:** Development follows a strict state machine (Discovery → Architecture → Core → Integration → Optimization).
|
|
19
|
+
|
|
20
|
+
## MCP Framework Intelligence
|
|
21
|
+
|
|
22
|
+
The project uses a modular Model Context Protocol (MCP) server for agent tooling:
|
|
23
|
+
- **Codebase:** Intelligence, dependency graphs, and AST-based search.
|
|
24
|
+
- **Security:** Automated audits and constitution compliance scanning.
|
|
25
|
+
- **Academy:** Strategic briefing, performance metrics, and agent memory.
|
|
26
|
+
- **Hermes:** Standardized inter-agent messaging protocol.
|
|
27
|
+
- **Knowledge:** Structured Obsidian-style Wiki for persistent technical context.
|
|
28
|
+
|
|
29
|
+
## Monorepo Structure
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
/
|
|
33
|
+
├── apps/ # Production applications (web, backend, etc.)
|
|
34
|
+
├── packages/ # Shared libraries
|
|
35
|
+
│ ├── shared-types/ # Single source of truth for types
|
|
36
|
+
│ └── framework-mcp/ # Core MCP tools and logic
|
|
37
|
+
└── .enderun/ # Governance, memory, and logs
|
|
38
|
+
```
|
|
@@ -1 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Branded Types Pattern
|
|
3
|
+
tags: [architecture, typescript, security]
|
|
4
|
+
related: [api_design_rules]
|
|
5
|
+
last_updated: 2026-05-15
|
|
6
|
+
---
|
|
7
|
+
|
|
1
8
|
To ensure type safety, use Branded Types for all IDs. Example: export type UserID = Brand<string, 'UserID'>. This prevents using a raw string where a specific ID is expected.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# 📡 Hermes Messaging Protocol
|
|
2
|
+
|
|
3
|
+
The Hermes protocol defines the standardized way for Agent Enderun specialized agents to communicate, delegate tasks, and share state updates.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🏗️ Message Structure
|
|
8
|
+
|
|
9
|
+
Every message sent via `send_agent_message` must follow this conceptual structure (enforced by the MCP tool):
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"timestamp": "ISO-8601",
|
|
14
|
+
"from": "@agent_name",
|
|
15
|
+
"to": "@agent_name",
|
|
16
|
+
"category": "ACTION | DELEGATION | INFO | ALERT",
|
|
17
|
+
"priority": "LOW | MEDIUM | HIGH | URGENT",
|
|
18
|
+
"traceId": "ULID",
|
|
19
|
+
"content": "Message content",
|
|
20
|
+
"status": "PENDING | READ | ACKNOWLEDGED | COMPLETED"
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 📂 Message Categories
|
|
27
|
+
|
|
28
|
+
| Category | Usage | Expectation |
|
|
29
|
+
| :--- | :--- | :--- |
|
|
30
|
+
| **ACTION** | Requesting a specific action (e.g., "Run security scan"). | Must be acknowledged and logged in `STATUS.md`. |
|
|
31
|
+
| **DELEGATION** | Handing off a sub-task (e.g., "@backend, create the schema"). | Becomes the primary task for the recipient. |
|
|
32
|
+
| **INFO** | Sharing architectural decisions or updates. | No direct action required, but must be read. |
|
|
33
|
+
| **ALERT** | Critical blockers or security violations. | Immediate attention required by `@manager`. |
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 🚦 Priority Levels
|
|
38
|
+
|
|
39
|
+
- **URGENT:** Must be handled in the current turn.
|
|
40
|
+
- **HIGH:** Top of the queue for the next turn.
|
|
41
|
+
- **MEDIUM:** Standard task priority (Default).
|
|
42
|
+
- **LOW:** Non-critical background updates.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 🔄 Lifecycle Protocol
|
|
47
|
+
|
|
48
|
+
1. **Dispatch:** Agent calls `send_agent_message`. Message is saved in `{{FRAMEWORK_DIR}}/messages/recipient.json`.
|
|
49
|
+
2. **Notification:** The recipient agent checks their inbox during their turn via `read_agent_messages`.
|
|
50
|
+
3. **Acknowledgment:** For `ACTION` or `DELEGATION`, the recipient should send an `INFO` message back once started or completed.
|
|
51
|
+
4. **Logging:** All critical communications must be summarized in the agent's log file (`{{FRAMEWORK_DIR}}/logs/agent.json`).
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 🛡️ Hermes Safety Rules
|
|
56
|
+
|
|
57
|
+
- **No circular delegation:** Agent A cannot delegate X to Agent B if B delegated Y (a dependency of X) to A.
|
|
58
|
+
- **Trace ID Integrity:** Every message MUST include a valid `traceId` from `PROJECT_MEMORY.md`.
|
|
59
|
+
- **Atomic Content:** One message per specific intent. Avoid monolithic "do everything" messages.
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
title: Zero UI Library Policy
|
|
3
|
+
tags: [design, security, compliance]
|
|
4
|
+
related: [responsive_design_standards]
|
|
5
|
+
last_updated: 2026-05-15
|
|
6
|
+
---
|
|
2
7
|
|
|
3
|
-
|
|
8
|
+
The project strictly follows the Zero UI Library Policy. Importing external UI frameworks like shadcn/ui, MUI, or Chakra UI is forbidden. All styling must be implemented using Panda CSS to ensure zero-runtime overhead and complete control over the design system.
|
|
4
9
|
|
|
5
10
|
## Rationale
|
|
6
11
|
- **Performance:** Zero-runtime CSS extraction.
|
|
7
12
|
- **Type Safety:** Type-safe styles and tokens.
|
|
8
|
-
- **Originality:** Unique and premium aesthetics without "library look".
|
|
9
|
-
- **Control:** Full control over responsiveness and accessibility.
|
|
13
|
+
- **Originality:** Unique and premium aesthetics without "library look".
|
package/ENDERUN.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Agent Enderun (v0.
|
|
1
|
+
# Agent Enderun (v0.5.1)
|
|
2
2
|
# Place in project root. This file is the single source of truth for Base Project AI Extensions.
|
|
3
3
|
|
|
4
4
|
## 🎖️ AGENT CHECKLIST (MANDATORY BEFORE RESPONSE)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
> - [ ] **Zero Mock:** Did you use fake data or placeholders? (Strictly Forbidden)
|
|
7
7
|
> - [ ] **Contract First:** Are `shared-types` and `contract.version.json` up to date?
|
|
8
8
|
> - [ ] **Audit Log:** Did you log this action in `{{FRAMEWORK_DIR}}/logs/[agent].json`?
|
|
9
|
-
> - [ ] **CLI Orchestration:** Does the action comply with `
|
|
9
|
+
> - [ ] **CLI Orchestration:** Does the action comply with `{{ADAPTER}} cli` rules?
|
|
10
10
|
> - [ ] **No "..." allowed:** Did you write the code completely without omitting parts?
|
|
11
11
|
|
|
12
12
|
---
|
|
@@ -22,20 +22,25 @@ This file (`./{{ADAPTER}}.md`) and the `{{FRAMEWORK_DIR}}/docs/` folder represen
|
|
|
22
22
|
2. **Check `{{FRAMEWORK_DIR}}/docs/` Folder:** Verify the existence of the `{{FRAMEWORK_DIR}}/docs/` folder (located within the framework directory).
|
|
23
23
|
3. **Absorb Context:** Read `{{FRAMEWORK_DIR}}/docs/tech-stack.md`. If it is empty, ask the user to fill it before proceeding.
|
|
24
24
|
4. **Demand Context:** If the `{{FRAMEWORK_DIR}}/docs/` folder does not exist, ask the user for project context and target audience information before writing any code.
|
|
25
|
-
5.
|
|
25
|
+
5. **Automatic @manager Mode:** You are ALWAYS operating as `@manager` (Team-Lead). You do NOT need to be called with `@manager` — this role is your default identity. You analyze, delegate, and orchestrate on EVERY turn without exception.
|
|
26
26
|
|
|
27
|
-
**NEVER SKIP THIS STEP.** Do not assume context; read first, then act.
|
|
27
|
+
**NEVER SKIP THIS STEP.** Do not assume context; read first, then act as @manager.
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
31
|
## CORE PRINCIPLES
|
|
32
32
|
|
|
33
|
-
- **
|
|
34
|
-
- **
|
|
33
|
+
- **Permanent @manager Identity:** The AI assistant is ALWAYS the `@manager` (Team-Lead) by default — on every turn, every message, without exception. The user does NOT need to type `@manager` to trigger this role. Explicitly typing a different agent (e.g. `@backend`) overrides this and activates that specialist directly.
|
|
34
|
+
- **Team-Lead MANDATORY Orchestration:** Every user request MUST first be handled by the `@manager` (Team-Lead) agent. The `@manager` is responsible for analyzing intent, updating `PROJECT_MEMORY.md`, and delegating tasks to specialists. Agents are FORBIDDEN from acting on a general request without `@manager` delegation.
|
|
35
|
+
- **Zero-Request Logging Policy:** Agents MUST log every action and update `PROJECT_MEMORY.md` automatically at the end of every turn, without waiting for a user directive. This is the "Operating Mode" of the framework.
|
|
36
|
+
- **Immediate Memory Sync:** Every state change, decision, or improved capability must be reflected in the memory files immediately.
|
|
37
|
+
- **Contract-First Agent Evolution:** Tools and SOPs used by agents must be defined via schemas and contracts first.
|
|
35
38
|
- **Zero Mock Policy:** The use of fake (mock) data or placeholders is strictly forbidden. Every line of code must connect to a real endpoint or a typed contract. (Exception: Controlled mock usage is allowed for external 3rd party services like Stripe, Twilio).
|
|
36
39
|
- **Branded Types Law:** All IDs (UserID, ProjectID, etc.) must be in the "Branded Types" format defined under `packages/shared-types`. Using plain strings or numbers is forbidden.
|
|
37
40
|
- **CLI-First Policy:** Due to the AI CLI Assistant focus, all outputs must be user-friendly (using Chalk, Clack, etc.) and stream-based. All commands must support the `--output json` flag and produce machine-readable output.
|
|
38
41
|
- **Audit Logging Necessity:** Every critical action must be logged traceably under the `{{FRAMEWORK_DIR}}/logs/` folder.
|
|
42
|
+
- **Design Continuity & Response Policy:** All UI changes MUST be responsive (Mobile-First + Fluid) and surgical. Unnecessary overhauls of existing layouts are strictly forbidden.
|
|
43
|
+
- **Shared Component First Policy:** Defining common UI elements (Button, Input, Card, etc.) inside page files is FORBIDDEN. All atomic UI components must be created in a shared directory (e.g., `apps/web/src/components/ui/`) and reused across the project.
|
|
39
44
|
- **File Ownership Rule:** Each file is the responsibility of a single agent.
|
|
40
45
|
- **CLI Command Mapping:** All CLI commands in the project must be defined in the `{{FRAMEWORK_DIR}}/cli-commands.json` file and assigned to the relevant agent.
|
|
41
46
|
- **Exit Code Standard:** Standard exit codes (e.g., 64: User Error, 70: Internal Error) must be used in error situations.
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# 🏛️ Agent Enderun
|
|
1
|
+
# 🏛️ Agent Enderun (v0.5.1) — The Supreme AI Governance Framework
|
|
2
2
|
|
|
3
3
|
**The Supreme AI Governance & Orchestration Framework for Enterprise Development**
|
|
4
4
|
|
|
@@ -10,6 +10,17 @@
|
|
|
10
10
|
|
|
11
11
|
## Executive Summary
|
|
12
12
|
|
|
13
|
+
Agent Enderun, yazılım ekipleri için tasarlanmış, **Anayasal Yönetişim (Constitutional Governance)** ve **Çoklu Ajan Orkestrasyonu (Multi-Agent Orchestration)** sağlayan kurumsal düzeyde bir framework'tür.
|
|
14
|
+
|
|
15
|
+
### 🚀 v0.5.1: The Academy & Hermes Upgrade
|
|
16
|
+
|
|
17
|
+
Bu sürümle birlikte Agent Enderun, basit bir yönetişim aracından otonom bir **Ajan Akademisi**'ne dönüşmüştür:
|
|
18
|
+
|
|
19
|
+
- **📡 Hermes Messaging Protocol:** Ajanlar arası kategorize edilmiş (Action/Delegation/Info) ve önceliklendirilmiş iletişim bus'ı.
|
|
20
|
+
- **📚 Obsidian-Style LLM Wiki:** YAML metadata destekli, ilişkisel ve graf tabanlı teknik bilgi bankası yönetimi.
|
|
21
|
+
- **🛡️ Contract-First Automation:** API ve tip kontratlarının SHA-256 ile otomatik doğrulanması.
|
|
22
|
+
- **🤖 MCP Intelligence:** Bilgi grafiği üretme, inbox istatistikleri ve anlık sistem sağlığı denetimi sağlayan gelişmiş MCP araçları.
|
|
23
|
+
|
|
13
24
|
Agent Enderun is a **production-grade AI governance framework** designed for engineering teams that must maintain control, traceability, and discipline when using AI assistants for code generation. It transforms chaotic AI output into structured, auditable, enterprise-ready deliverables through:
|
|
14
25
|
|
|
15
26
|
- **Agent-Led Orchestration**: 8 specialized AI agent roles with defined responsibilities
|
|
@@ -37,7 +48,7 @@ git clone https://github.com/ybekar/agent-enderun.git
|
|
|
37
48
|
cd agent-enderun
|
|
38
49
|
|
|
39
50
|
# Option B: Or use as npm package (when published)
|
|
40
|
-
npx agent
|
|
51
|
+
npx agent{{FRAMEWORK_DIR}} init gemini
|
|
41
52
|
```
|
|
42
53
|
|
|
43
54
|
#### Step 2: Install Dependencies
|
|
@@ -52,7 +63,7 @@ npm run enderun:build
|
|
|
52
63
|
|
|
53
64
|
#### Step 4: Verify Setup
|
|
54
65
|
```bash
|
|
55
|
-
agent
|
|
66
|
+
agent{{FRAMEWORK_DIR}} check
|
|
56
67
|
```
|
|
57
68
|
|
|
58
69
|
Expected output:
|
|
@@ -70,38 +81,38 @@ Expected output:
|
|
|
70
81
|
|
|
71
82
|
### Initialize Your Project
|
|
72
83
|
```bash
|
|
73
|
-
# Creates
|
|
74
|
-
npx agent
|
|
84
|
+
# Creates {{FRAMEWORK_DIR}}/ directory with governance files
|
|
85
|
+
npx agent{{FRAMEWORK_DIR}} init gemini
|
|
75
86
|
```
|
|
76
87
|
|
|
77
88
|
### Check Project Health
|
|
78
89
|
```bash
|
|
79
90
|
# Runs security audit, compliance check, and dependency analysis
|
|
80
|
-
agent
|
|
91
|
+
agent{{FRAMEWORK_DIR}} check
|
|
81
92
|
|
|
82
93
|
# Just security
|
|
83
|
-
agent
|
|
94
|
+
agent{{FRAMEWORK_DIR}} check:security
|
|
84
95
|
|
|
85
96
|
# Just compliance
|
|
86
|
-
agent
|
|
97
|
+
agent{{FRAMEWORK_DIR}} check:compliance
|
|
87
98
|
```
|
|
88
99
|
|
|
89
100
|
### View Project Status
|
|
90
101
|
```bash
|
|
91
102
|
# Shows current phase, active agents, and blockers
|
|
92
|
-
agent
|
|
103
|
+
agent{{FRAMEWORK_DIR}} status
|
|
93
104
|
```
|
|
94
105
|
|
|
95
106
|
### Create a New Task
|
|
96
107
|
```bash
|
|
97
108
|
# Creates a ULID-based trace for a new feature
|
|
98
|
-
agent
|
|
109
|
+
agent{{FRAMEWORK_DIR}} trace:new "Implement User Authentication" backend P1
|
|
99
110
|
```
|
|
100
111
|
|
|
101
112
|
### Verify API Contracts
|
|
102
113
|
```bash
|
|
103
114
|
# Ensures shared-types and API docs are synchronized
|
|
104
|
-
agent
|
|
115
|
+
agent{{FRAMEWORK_DIR}} verify-contract
|
|
105
116
|
```
|
|
106
117
|
|
|
107
118
|
---
|
|
@@ -110,9 +121,9 @@ agent-enderun verify-contract
|
|
|
110
121
|
|
|
111
122
|
Agent Enderun consists of **4 integrated layers**:
|
|
112
123
|
|
|
113
|
-
### Layer 1: Governance (
|
|
124
|
+
### Layer 1: Governance ({{FRAMEWORK_DIR}}/)
|
|
114
125
|
```
|
|
115
|
-
|
|
126
|
+
{{FRAMEWORK_DIR}}/
|
|
116
127
|
├── ENDERUN.md ← The "Supreme Law" (read this first!)
|
|
117
128
|
├── PROJECT_MEMORY.md ← Single source of truth for state
|
|
118
129
|
├── STATUS.md ← Agent status dashboard
|
|
@@ -237,8 +248,8 @@ Agents use the `search_knowledge_base` tool to find answers to common questions.
|
|
|
237
248
|
- [ ] **npm 9+** installed (`npm --version`)
|
|
238
249
|
- [ ] **Git** initialized (`git init`)
|
|
239
250
|
- [ ] **Framework installed** (`npm install && npm run enderun:build`)
|
|
240
|
-
- [ ] **Health check passed** (`agent
|
|
241
|
-
- [ ] **First task created** (`agent
|
|
251
|
+
- [ ] **Health check passed** (`agent{{FRAMEWORK_DIR}} check` shows ✅)
|
|
252
|
+
- [ ] **First task created** (`agent{{FRAMEWORK_DIR}} trace:new "Your task" backend P1`)
|
|
242
253
|
- [ ] **Docs created** (add files to `docs/` for agents to read)
|
|
243
254
|
- [ ] **MCP connected** (agents can now use tools)
|
|
244
255
|
|
|
@@ -259,7 +270,7 @@ Implement JWT-based authentication with refresh tokens.
|
|
|
259
270
|
" > docs/requirements.md
|
|
260
271
|
|
|
261
272
|
# Step 2: Create a task
|
|
262
|
-
agent
|
|
273
|
+
agent{{FRAMEWORK_DIR}} trace:new "Implement Auth Module" backend P1
|
|
263
274
|
|
|
264
275
|
# Step 3: Agents read requirements and build
|
|
265
276
|
# (They will automatically read docs/requirements.md)
|
|
@@ -270,7 +281,7 @@ agent-enderun trace:new "Implement Auth Module" backend P1
|
|
|
270
281
|
## 📁 Project Structure
|
|
271
282
|
|
|
272
283
|
```
|
|
273
|
-
agent
|
|
284
|
+
agent{{FRAMEWORK_DIR}}/
|
|
274
285
|
├── README.md ← This file
|
|
275
286
|
├── package.json ← Root npm config
|
|
276
287
|
├── bin/
|
|
@@ -298,7 +309,7 @@ agent-enderun/
|
|
|
298
309
|
├── apps/ ← Your applications (start here)
|
|
299
310
|
│ ├── backend/ ← (you create this)
|
|
300
311
|
│ └── web/ ← (you create this)
|
|
301
|
-
└──
|
|
312
|
+
└── {{FRAMEWORK_DIR}}/ ← Framework governance
|
|
302
313
|
├── ENDERUN.md ← Constitution (MANDATORY READ)
|
|
303
314
|
├── PROJECT_MEMORY.md ← State machine
|
|
304
315
|
├── STATUS.md ← Agent dashboard
|
|
@@ -349,9 +360,9 @@ agent-enderun/
|
|
|
349
360
|
### Q: Do agents actually understand all this?
|
|
350
361
|
**A:** Yes. Before every action, agents read:
|
|
351
362
|
1. `ENDERUN.md` (the constitution)
|
|
352
|
-
2.
|
|
363
|
+
2. `{{FRAMEWORK_DIR}}/PROJECT_MEMORY.md` (project state)
|
|
353
364
|
3. `docs/` files (your requirements)
|
|
354
|
-
4.
|
|
365
|
+
4. `{{FRAMEWORK_DIR}}/knowledge/` (technical guidelines)
|
|
355
366
|
|
|
356
367
|
### Q: What if I don't use an AI adapter?
|
|
357
368
|
**A:** The framework still works as a **collaborative development platform**. You and your team use it to enforce:
|
|
@@ -364,7 +375,7 @@ agent-enderun/
|
|
|
364
375
|
**A:** Yes. Add new tool files in `packages/framework-mcp/src/tools/`, define the schema, and export the handler. The CLI will automatically discover them.
|
|
365
376
|
|
|
366
377
|
### Q: How do I add my own agents?
|
|
367
|
-
**A:** Create a markdown file in
|
|
378
|
+
**A:** Create a markdown file in `{{FRAMEWORK_DIR}}/agents/your-agent.md`, define the SOP, and add a CLI mapping in `{{FRAMEWORK_DIR}}/cli-commands.json`.
|
|
368
379
|
|
|
369
380
|
### Q: Is this production-ready?
|
|
370
381
|
**A:** The **framework** is production-ready. Individual features (like `apps/`) depend on what you build. Start with `apps/backend` or `apps/web`.
|
|
@@ -373,8 +384,8 @@ agent-enderun/
|
|
|
373
384
|
|
|
374
385
|
## 🔗 Key Files to Read First
|
|
375
386
|
|
|
376
|
-
1.
|
|
377
|
-
2.
|
|
387
|
+
1. **`{{FRAMEWORK_DIR}}/ENDERUN.md`** — The constitution (rules all agents must follow)
|
|
388
|
+
2. **`{{FRAMEWORK_DIR}}/PROJECT_MEMORY.md`** — Current project state and history
|
|
378
389
|
3. **`docs/tech-stack.md`** — Technology decisions
|
|
379
390
|
4. **`packages/shared-types/src/index.ts`** — The contract (types)
|
|
380
391
|
5. **`README.md`** (this file) — How to use the framework
|
|
@@ -387,7 +398,7 @@ agent-enderun/
|
|
|
387
398
|
File issues with clear reproduction steps and framework version.
|
|
388
399
|
|
|
389
400
|
### Contribute
|
|
390
|
-
1. Read
|
|
401
|
+
1. Read `{{FRAMEWORK_DIR}}/ENDERUN.md`
|
|
391
402
|
2. Follow the agent role guidelines
|
|
392
403
|
3. Submit PRs with semantic commit messages
|
|
393
404
|
4. Ensure tests pass: `npm run enderun:build`
|
|
@@ -428,7 +439,7 @@ git clone https://github.com/ybekar/agent-enderun.git
|
|
|
428
439
|
cd agent-enderun
|
|
429
440
|
|
|
430
441
|
# Seçenek B: veya npm paketi olarak kullan
|
|
431
|
-
npx agent
|
|
442
|
+
npx agent{{FRAMEWORK_DIR}} init gemini
|
|
432
443
|
```
|
|
433
444
|
|
|
434
445
|
#### Adım 2: Bağımlılıkları Yükle
|
|
@@ -443,7 +454,7 @@ npm run enderun:build
|
|
|
443
454
|
|
|
444
455
|
#### Adım 4: Kurulumu Doğrula
|
|
445
456
|
```bash
|
|
446
|
-
agent
|
|
457
|
+
agent{{FRAMEWORK_DIR}} check
|
|
447
458
|
```
|
|
448
459
|
|
|
449
460
|
Beklenen çıktı:
|
|
@@ -461,29 +472,29 @@ Beklenen çıktı:
|
|
|
461
472
|
|
|
462
473
|
### Projeyi Başlat
|
|
463
474
|
```bash
|
|
464
|
-
npx agent
|
|
475
|
+
npx agent{{FRAMEWORK_DIR}} init gemini
|
|
465
476
|
```
|
|
466
477
|
|
|
467
478
|
### Sağlık Durumunu Kontrol Et
|
|
468
479
|
```bash
|
|
469
|
-
agent
|
|
470
|
-
agent
|
|
471
|
-
agent
|
|
480
|
+
agent{{FRAMEWORK_DIR}} check # Tam kontrol
|
|
481
|
+
agent{{FRAMEWORK_DIR}} check:security # Sadece güvenlik
|
|
482
|
+
agent{{FRAMEWORK_DIR}} check:compliance # Sadece uyum
|
|
472
483
|
```
|
|
473
484
|
|
|
474
485
|
### Proje Durumunu Görüntüle
|
|
475
486
|
```bash
|
|
476
|
-
agent
|
|
487
|
+
agent{{FRAMEWORK_DIR}} status
|
|
477
488
|
```
|
|
478
489
|
|
|
479
490
|
### Yeni Görev Oluştur
|
|
480
491
|
```bash
|
|
481
|
-
agent
|
|
492
|
+
agent{{FRAMEWORK_DIR}} trace:new "Kullanıcı Doğrulama Uygulaması" backend P1
|
|
482
493
|
```
|
|
483
494
|
|
|
484
495
|
### API Kontratlarını Doğrula
|
|
485
496
|
```bash
|
|
486
|
-
agent
|
|
497
|
+
agent{{FRAMEWORK_DIR}} verify-contract
|
|
487
498
|
```
|
|
488
499
|
|
|
489
500
|
---
|
|
@@ -492,7 +503,7 @@ agent-enderun verify-contract
|
|
|
492
503
|
|
|
493
504
|
Agent Enderun **4 entegre katmandan** oluşur:
|
|
494
505
|
|
|
495
|
-
### Katman 1: Yönetişim (
|
|
506
|
+
### Katman 1: Yönetişim ({{FRAMEWORK_DIR}}/)
|
|
496
507
|
- `ENDERUN.md` — Anayasa (bunu ilk oku!)
|
|
497
508
|
- `PROJECT_MEMORY.md` — Proje durumu
|
|
498
509
|
- `agents/` — 8 ajan rolü tanımları
|
|
@@ -537,8 +548,8 @@ Agent Enderun **4 entegre katmandan** oluşur:
|
|
|
537
548
|
- [ ] **npm 9+** yüklü (`npm --version`)
|
|
538
549
|
- [ ] **Git** başlatılmış (`git init`)
|
|
539
550
|
- [ ] **Framework yüklü** (`npm install && npm run enderun:build`)
|
|
540
|
-
- [ ] **Sağlık kontrolü geçti** (`agent
|
|
541
|
-
- [ ] **İlk görev oluşturuldu** (`agent
|
|
551
|
+
- [ ] **Sağlık kontrolü geçti** (`agent{{FRAMEWORK_DIR}} check` ✅ gösteriyor)
|
|
552
|
+
- [ ] **İlk görev oluşturuldu** (`agent{{FRAMEWORK_DIR}} trace:new "Görev" backend P1`)
|
|
542
553
|
- [ ] **Doklar oluşturuldu** (`docs/` klasörüne dosya ekledim)
|
|
543
554
|
- [ ] **MCP bağlandı** (ajanlar araçları kullanabiliyor)
|
|
544
555
|
|
|
@@ -559,7 +570,7 @@ JWT tabanlı kimlik doğrulama sistemi kurun.
|
|
|
559
570
|
" > docs/requirements.md
|
|
560
571
|
|
|
561
572
|
# Adım 2: Görev oluşturun
|
|
562
|
-
agent
|
|
573
|
+
agent{{FRAMEWORK_DIR}} trace:new "Auth Modülü Uygula" backend P1
|
|
563
574
|
|
|
564
575
|
# Adım 3: Ajanlar sizin için çalışır
|
|
565
576
|
# (Otomatik olarak docs/requirements.md okurlar)
|
|
@@ -570,13 +581,13 @@ agent-enderun trace:new "Auth Modülü Uygula" backend P1
|
|
|
570
581
|
## 📁 Proje Yapısı
|
|
571
582
|
|
|
572
583
|
```
|
|
573
|
-
agent
|
|
584
|
+
agent{{FRAMEWORK_DIR}}/
|
|
574
585
|
├── docs/ ← Ajanların okuyacağı dokümantasyon
|
|
575
586
|
├── packages/
|
|
576
587
|
│ ├── shared-types/ ← Paylaşılan türler (sözleşme)
|
|
577
588
|
│ └── framework-mcp/ ← MCP sunucusu (40+ araç)
|
|
578
589
|
├── apps/ ← Uygulamalarınız (siz oluşturun)
|
|
579
|
-
├──
|
|
590
|
+
├── {{FRAMEWORK_DIR}}/ ← Yönetişim dosyaları
|
|
580
591
|
│ ├── ENDERUN.md ← Anayasa (OKUNMALI)
|
|
581
592
|
│ ├── PROJECT_MEMORY.md ← Proje durumu
|
|
582
593
|
│ ├── agents/ ← 8 ajan tanımı
|
|
@@ -597,9 +608,9 @@ agent-enderun/
|
|
|
597
608
|
### S: Ajanlar bütün bunları anlıyor mu?
|
|
598
609
|
**C:** Evet. Her işlem öncesi şunları okurlar:
|
|
599
610
|
1. `ENDERUN.md` (anayasa)
|
|
600
|
-
2.
|
|
611
|
+
2. `{{FRAMEWORK_DIR}}/PROJECT_MEMORY.md` (proje durumu)
|
|
601
612
|
3. `docs/` dosyaları (gereksinimler)
|
|
602
|
-
4.
|
|
613
|
+
4. `{{FRAMEWORK_DIR}}/knowledge/` (teknik rehberler)
|
|
603
614
|
|
|
604
615
|
### S: AI adaptörü kullanmak zorunlu mu?
|
|
605
616
|
**C:** Hayır. Framework, AI'sız da işlev görür. Faz ilerleme, denetim kaydı ve tür disiplini zorunludur.
|
|
@@ -608,7 +619,7 @@ agent-enderun/
|
|
|
608
619
|
**C:** Evet. `packages/framework-mcp/src/tools/` klasörüne yeni dosya ekleyin.
|
|
609
620
|
|
|
610
621
|
### S: Kendi ajanlarımı ekleyebilir miyim?
|
|
611
|
-
**C:** Evet.
|
|
622
|
+
**C:** Evet. `{{FRAMEWORK_DIR}}/agents/` klasörüne `.md` dosyası oluşturun ve CLI mapping'ini güncelleyin.
|
|
612
623
|
|
|
613
624
|
### S: Üretim için hazır mı?
|
|
614
625
|
**C:** Framework hazır. `apps/` klasörü tamamen sizin.
|
|
@@ -617,8 +628,8 @@ agent-enderun/
|
|
|
617
628
|
|
|
618
629
|
## 🔗 Önce Okumanız Gereken Dosyalar
|
|
619
630
|
|
|
620
|
-
1.
|
|
621
|
-
2.
|
|
631
|
+
1. **`{{FRAMEWORK_DIR}}/ENDERUN.md`** — Anayasa
|
|
632
|
+
2. **`{{FRAMEWORK_DIR}}/PROJECT_MEMORY.md`** — Proje durumu
|
|
622
633
|
3. **`docs/tech-stack.md`** — Teknoloji kararları
|
|
623
634
|
4. **`packages/shared-types/src/index.ts`** — Sözleşme (türler)
|
|
624
635
|
5. **`README.md`** — Bu dosya
|
|
@@ -631,7 +642,7 @@ agent-enderun/
|
|
|
631
642
|
Net adımlarla ve versiyon numarası ile sorun bildir.
|
|
632
643
|
|
|
633
644
|
### Katkıda Bulun
|
|
634
|
-
1.
|
|
645
|
+
1. `{{FRAMEWORK_DIR}}/ENDERUN.md` oku
|
|
635
646
|
2. Agent rolü yönergelerine uyun
|
|
636
647
|
3. Semantik commit'ler gönder
|
|
637
648
|
4. Testleri geç: `npm run enderun:build`
|
|
@@ -639,30 +650,30 @@ Net adımlarla ve versiyon numarası ile sorun bildir.
|
|
|
639
650
|
### Lisans
|
|
640
651
|
MIT © 2026 Yusuf BEKAR
|
|
641
652
|
```bash
|
|
642
|
-
agent
|
|
653
|
+
agent{{FRAMEWORK_DIR}} status
|
|
643
654
|
```
|
|
644
655
|
|
|
645
656
|
### 4. Advanced Intelligence Commands
|
|
646
657
|
```bash
|
|
647
658
|
# Run Security Audit
|
|
648
|
-
agent
|
|
659
|
+
agent{{FRAMEWORK_DIR}} check:security
|
|
649
660
|
|
|
650
661
|
# Generate Dependency Graph
|
|
651
|
-
agent
|
|
662
|
+
agent{{FRAMEWORK_DIR}} explorer:graph
|
|
652
663
|
|
|
653
664
|
# Get Commit Suggestion
|
|
654
|
-
agent
|
|
665
|
+
agent{{FRAMEWORK_DIR}} git:commit [TRACE-ID]
|
|
655
666
|
```
|
|
656
667
|
|
|
657
668
|
---
|
|
658
669
|
|
|
659
|
-
## 📂 Consolidated Framework Structure (
|
|
670
|
+
## 📂 Consolidated Framework Structure (`{{FRAMEWORK_DIR}}/`)
|
|
660
671
|
|
|
661
672
|
All governance and engineering assets are consolidated under the framework directory for a clean project root.
|
|
662
673
|
|
|
663
674
|
```text
|
|
664
675
|
.
|
|
665
|
-
├──
|
|
676
|
+
├── {{FRAMEWORK_DIR}}/
|
|
666
677
|
│ ├── ENDERUN.md # Supreme Law (Constitution)
|
|
667
678
|
│ ├── PROJECT_MEMORY.md # Working Memory & History
|
|
668
679
|
│ ├── BRAIN_DASHBOARD.md # Intelligence & Performance Stats
|
package/bin/cli.js
CHANGED
|
@@ -197,16 +197,8 @@ function mergePackageJson(targetPath, sourcePath) {
|
|
|
197
197
|
function updateGitIgnore(targetPath, frameworkDir = ".enderun") {
|
|
198
198
|
const IGNORE_LINES = [
|
|
199
199
|
"# AI-Enderun",
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
".cursor/logs/*.json",
|
|
203
|
-
".codex/logs/*.json",
|
|
204
|
-
".enderun/logs/*.json",
|
|
205
|
-
".enderun/*.lock",
|
|
206
|
-
".claude/*.lock",
|
|
207
|
-
".cursor/*.lock",
|
|
208
|
-
".codex/*.lock",
|
|
209
|
-
".enderun/*.lock",
|
|
200
|
+
`${frameworkDir}/logs/*.json`,
|
|
201
|
+
`${frameworkDir}/*.lock`,
|
|
210
202
|
".env",
|
|
211
203
|
".DS_Store"
|
|
212
204
|
];
|
|
@@ -533,6 +525,12 @@ async function initCommand(selectedAdapter) {
|
|
|
533
525
|
const buildCmd = pkgMgr === "npm" ? "npm run enderun:build" : `${pkgMgr} run enderun:build`;
|
|
534
526
|
|
|
535
527
|
console.log(`\n✨ Framework scaffolded! (v${FRAMEWORK_VERSION})`);
|
|
528
|
+
|
|
529
|
+
// Allow skipping install in test/CI environments
|
|
530
|
+
if (process.env.ENDERUN_SKIP_INSTALL === "1") {
|
|
531
|
+
console.log("\n⏭️ Skipping install steps (ENDERUN_SKIP_INSTALL=1).");
|
|
532
|
+
return;
|
|
533
|
+
}
|
|
536
534
|
|
|
537
535
|
try {
|
|
538
536
|
const { execSync } = await import("child_process");
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs from "fs";
|
|
4
|
+
import path from "path";
|
|
5
|
+
import crypto from "crypto";
|
|
6
|
+
import { fileURLToPath } from "url";
|
|
7
|
+
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
+
const __dirname = path.dirname(__filename);
|
|
10
|
+
const projectRoot = path.join(__dirname, "..");
|
|
11
|
+
|
|
12
|
+
const contractPath = path.join(projectRoot, "packages/shared-types/contract.version.json");
|
|
13
|
+
const sharedTypesDir = path.join(projectRoot, "packages/shared-types/src");
|
|
14
|
+
|
|
15
|
+
function calculateHash(dir) {
|
|
16
|
+
const hash = crypto.createHash("sha256");
|
|
17
|
+
const files = fs.readdirSync(dir).filter(f => f.endsWith(".ts") || f.endsWith(".json")).sort();
|
|
18
|
+
|
|
19
|
+
files.forEach(file => {
|
|
20
|
+
const content = fs.readFileSync(path.join(dir, file));
|
|
21
|
+
hash.update(content);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
return hash.digest("hex");
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
console.log("🔍 Calculating shared-types contract hash...");
|
|
29
|
+
const newHash = calculateHash(sharedTypesDir);
|
|
30
|
+
|
|
31
|
+
const contract = JSON.parse(fs.readFileSync(contractPath, "utf-8"));
|
|
32
|
+
|
|
33
|
+
if (contract.contract_hash === newHash) {
|
|
34
|
+
console.log("✅ Contract hash is already up to date.");
|
|
35
|
+
} else {
|
|
36
|
+
contract.contract_hash = newHash;
|
|
37
|
+
contract.last_updated = new Date().toISOString();
|
|
38
|
+
fs.writeFileSync(contractPath, JSON.stringify(contract, null, 2));
|
|
39
|
+
console.log(`🚀 Contract updated with new hash: ${newHash.slice(0, 10)}...`);
|
|
40
|
+
}
|
|
41
|
+
} catch (error) {
|
|
42
|
+
console.error("❌ Failed to update contract hash:", error.message);
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
package/claude.md
CHANGED
|
@@ -4,4 +4,7 @@ This file is the entry point for Claude. The project's "Supreme Law" and all ins
|
|
|
4
4
|
|
|
5
5
|
👉 **[{{FRAMEWORK_DIR}}/ENDERUN.md]({{FRAMEWORK_DIR}}/ENDERUN.md)**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### 🤖 AGENT DIRECTIVE
|
|
8
|
+
You are ALWAYS operating as `@manager` (Team-Lead) by default — on every message, every turn. The user does NOT need to type `@manager`. Typing a specific agent (e.g. `@backend`) explicitly will override this and activate that specialist role directly. You are responsible for analysis and delegation.
|
|
9
|
+
|
|
10
|
+
Please read the Supreme Law thoroughly before taking any action.
|