agent-enderun 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.enderun/BRAIN_DASHBOARD.md +2 -2
- package/.enderun/PROJECT_MEMORY.md +26 -4
- package/.enderun/STATUS.md +24 -28
- package/.enderun/agents/backend.md +37 -8
- package/.enderun/agents/database.md +55 -0
- package/.enderun/agents/devops.md +28 -14
- package/.enderun/agents/explorer.md +1 -1
- package/.enderun/agents/frontend.md +21 -7
- package/.enderun/agents/git.md +1 -1
- package/.enderun/agents/manager.md +41 -20
- package/.enderun/agents/mobile.md +1 -1
- package/.enderun/agents/native.md +1 -1
- package/.enderun/agents/quality.md +122 -0
- package/.enderun/cli-commands.json +3 -3
- package/.enderun/config.json +7 -1
- package/.enderun/knowledge/context_boundary_rules.md +57 -0
- package/.enderun/knowledge/corporate-governance/high-risk-action-approval-flow.md +29 -0
- package/.enderun/knowledge/documentation_ownership.md +53 -0
- package/.enderun/knowledge/frontend_professionalization_guidelines.md +7 -7
- package/.enderun/knowledge/hermes_live_test_guidelines.md +5 -5
- package/.enderun/knowledge/lessons-learned.md +14 -0
- package/.enderun/knowledge/manager_authority_audit_enforcement.md +8 -8
- package/.enderun/knowledge/project_scaffold_guidelines.md +4 -4
- package/.enderun/knowledge/reference_application_guidelines.md +6 -6
- package/.enderun/memory-graph/agent-contexts/quality.json +1 -0
- package/.enderun/queue/README.md +13 -13
- package/README.md +204 -102
- package/bin/cli.js +1 -1
- package/bin/init-check.js +69 -0
- package/bin/update-contract.js +24 -2
- package/docs/README.md +21 -32
- package/docs/architecture/README.md +9 -0
- package/docs/architecture/standards/data-fetching-patterns.md +13 -0
- package/docs/architecture/standards/design-system.md +31 -0
- package/docs/architecture/standards/logging.md +7 -0
- package/docs/architecture/standards/tech-stack.md +9 -0
- package/docs/getting-started.md +9 -259
- package/docs/user/README.md +35 -0
- package/docs/user/action-plan-2026.md +9 -0
- package/docs/user/getting-started.md +13 -0
- package/docs/user/roadmap.md +13 -0
- package/eslint.config.js +1 -1
- package/framework-mcp/dist/index.js +7 -13
- package/package.json +3 -1
- package/src/cli/adapters.ts +208 -0
- package/src/cli/commands/app.ts +38 -0
- package/src/cli/commands/check.ts +87 -0
- package/src/cli/commands/compliance.ts +55 -0
- package/src/cli/commands/contract.ts +45 -0
- package/src/cli/commands/explorer.ts +45 -0
- package/src/cli/commands/git.ts +39 -0
- package/src/cli/commands/init.ts +272 -0
- package/src/cli/commands/knowledge.ts +44 -0
- package/src/cli/commands/lint.ts +25 -0
- package/src/cli/commands/log.ts +37 -0
- package/src/cli/commands/memory.ts +78 -0
- package/src/cli/commands/orchestrate.ts +111 -0
- package/src/cli/commands/script.ts +20 -0
- package/src/cli/commands/security.ts +38 -0
- package/src/cli/commands/status.ts +59 -0
- package/src/cli/commands/trace.ts +46 -0
- package/src/cli/index.ts +107 -0
- package/src/cli/utils/app.ts +764 -0
- package/src/cli/utils/claude.ts +56 -0
- package/src/cli/utils/fs.ts +139 -0
- package/src/cli/utils/memory.ts +141 -0
- package/src/cli/utils/pkg.ts +215 -0
- package/src/cli/utils/string.ts +48 -0
- package/src/cli/utils/time.ts +27 -0
- package/.enderun/agents/analyst.md +0 -236
- package/.enderun/agents/orchestrator.md +0 -172
- package/.enderun/agents/qa.md +0 -121
- package/.enderun/agents/security.md +0 -202
- package/.enderun/knowledge/api_design_rules.md +0 -6
- package/.enderun/knowledge/branded_types_pattern.md +0 -8
- package/.enderun/knowledge/code_review_checklist.md +0 -7
- package/.enderun/knowledge/contract_versioning.md +0 -7
- package/.enderun/knowledge/database_migration.md +0 -6
- package/.enderun/knowledge/deployment_checklist.md +0 -7
- package/.enderun/knowledge/git_commit_strategy.md +0 -10
- package/.enderun/knowledge/monitoring_setup.md +0 -5
- package/.enderun/knowledge/performance_guidelines.md +0 -11
- package/.enderun/knowledge/repository_patterns.md +0 -9
- package/.enderun/knowledge/security_scanning.md +0 -6
- package/.enderun/knowledge/testing_standards.md +0 -7
- package/.enderun/knowledge/troubleshooting_guide.md +0 -5
- package/.enderun/memory-graph/agent-contexts/analyst.json +0 -1
- package/.enderun/memory-graph/agent-contexts/orchestrator.json +0 -1
- package/.enderun/memory-graph/agent-contexts/qa.json +0 -1
- package/.enderun/memory-graph/agent-contexts/security.json +0 -1
- package/docs/action-plan-2026.md +0 -119
- package/docs/roadmap.md +0 -142
- package/docs/tech-stack.md +0 -30
package/docs/getting-started.md
CHANGED
|
@@ -1,263 +1,13 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Quickstart Guide for New Agent Enderun Projects
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This guide is prepared for developers who want to set up Agent Enderun in a new project from scratch.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> **As of v0.9.1, the primary initialization command is:** `npx agent-enderun init`
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### Installation Steps
|
|
8
|
+
- Initialize the framework with `npx agent-enderun init`.
|
|
9
|
+
- Fill in the `docs/tech-stack.md` and `docs/project-docs.md` files.
|
|
10
|
+
- Create the first task with `npx agent-enderun trace:new`.
|
|
11
|
+
- `@manager` manages the project automatically in every session.
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
> **Primary recommended installation command from v0.6.6:** **`npx agent-enderun init` (generic framework setup)**
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## 1. Introduction
|
|
16
|
-
|
|
17
|
-
Agent Enderun is a yapay zeka/AI governance framework that provides **control, discipline, and traceability** in software development processes.
|
|
18
|
-
|
|
19
|
-
By completing this guide, you will:
|
|
20
|
-
- Install the framework in your project
|
|
21
|
-
- Configure the basic components and environment
|
|
22
|
-
- Create your first tracked task and start working with specialist agents
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## 2. Prerequisites
|
|
27
|
-
|
|
28
|
-
- **Node.js** 20+ (LTS recommended)
|
|
29
|
-
- **npm** 9+
|
|
30
|
-
- **Git** (must be initialized in the project directory)
|
|
31
|
-
|
|
32
|
-
To check your local environment:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
node --version
|
|
36
|
-
npm --version
|
|
37
|
-
git --version
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## 3. Step-by-Step Installation
|
|
43
|
-
|
|
44
|
-
### Step 1: Create a New Project Directory
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
mkdir my-new-project
|
|
48
|
-
cd my-new-project
|
|
49
|
-
git init
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Step 2: Initialize the Framework
|
|
53
|
-
|
|
54
|
-
To initialize the core framework cleanly (without hardcoding any AI/adapter-specific files before installation):
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
npx agent-enderun init
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
This command:
|
|
61
|
-
- Creates the `.enderun/` directory by default
|
|
62
|
-
- Installs all core governance files (`ENDERUN.md`, `PROJECT_MEMORY.md`, agents, knowledge, etc.)
|
|
63
|
-
- Adds the default framework configuration files
|
|
64
|
-
|
|
65
|
-
#### 💡 Gemini Adapter (Only Supported Path)
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
npx agent-enderun init
|
|
69
|
-
# or explicitly
|
|
70
|
-
npx agent-enderun init gemini
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
This creates the `.enderun/` runtime folder + `gemini.md` shim at the root for Gemini CLI users.
|
|
74
|
-
|
|
75
|
-
Other legacy adapters (`claude`, `cursor`, `codex`) may still work for editor-specific workflows.
|
|
76
|
-
|
|
77
|
-
---
|
|
78
|
-
|
|
79
|
-
### Step 3: Install Dependencies and Build
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
npm install
|
|
83
|
-
npm run enderun:build
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### Step 4: Verify the Installation
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
npx agent-enderun check
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Expected output:
|
|
93
|
-
|
|
94
|
-
```
|
|
95
|
-
✅ Framework active (v0.6.6)
|
|
96
|
-
✅ MCP Server ready
|
|
97
|
-
✅ Shared types compiled
|
|
98
|
-
✅ Agent logs initialized
|
|
99
|
-
✅ PROJECT_MEMORY.md found
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
|
|
104
|
-
## 4. Basic Configuration (Most Critical Step)
|
|
105
|
-
|
|
106
|
-
Once initialized, you **must** update the following files to describe your project. Ajanlar (agents) learn your technology stack and target domain from here.
|
|
107
|
-
|
|
108
|
-
### 4.1 `docs/tech-stack.md`
|
|
109
|
-
|
|
110
|
-
This file is **mandatory**. Agents rely on it to make technical decisions.
|
|
111
|
-
|
|
112
|
-
Example:
|
|
113
|
-
|
|
114
|
-
```markdown
|
|
115
|
-
# TECH STACK
|
|
116
|
-
|
|
117
|
-
## Platform
|
|
118
|
-
- Web (React + Vite)
|
|
119
|
-
- Backend (Node.js + Fastify)
|
|
120
|
-
|
|
121
|
-
## Database
|
|
122
|
-
- PostgreSQL + Kysely
|
|
123
|
-
|
|
124
|
-
## Auth
|
|
125
|
-
- JWT + Refresh Token
|
|
126
|
-
|
|
127
|
-
## Deployment
|
|
128
|
-
- Vercel (Frontend) + Railway (Backend)
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
> **Warning:** If this file is empty, the agents will not be able to operate.
|
|
132
|
-
|
|
133
|
-
### 4.2 `docs/project-docs.md`
|
|
134
|
-
|
|
135
|
-
Write your project's goals, business requirements, and primary features here.
|
|
136
|
-
|
|
137
|
-
### 4.3 `.enderun/PROJECT_MEMORY.md`
|
|
138
|
-
|
|
139
|
-
Automatically created during initial setup inside `.enderun/PROJECT_MEMORY.md`. The Gemini adapter uses the `.enderun/` runtime folder.
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
## 5. Creating Your First Task
|
|
144
|
-
|
|
145
|
-
You are now ready to create your first real task:
|
|
146
|
-
|
|
147
|
-
```bash
|
|
148
|
-
npx agent-enderun trace:new "User Registration and Login System" backend P1
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
This command:
|
|
152
|
-
- Generates a unique Trace ID
|
|
153
|
-
- Updates the **ACTIVE TASKS** section in `PROJECT_MEMORY.md`
|
|
154
|
-
- Assigns the `@manager` agent to lead the task
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
## 6. Basics of Working with Agents
|
|
159
|
-
|
|
160
|
-
### Automatic @manager Behavior
|
|
161
|
-
|
|
162
|
-
At the start of every session (when a conversation begins), agents will automatically:
|
|
163
|
-
|
|
164
|
-
1. Read `ENDERUN.md`
|
|
165
|
-
2. Read `PROJECT_MEMORY.md`
|
|
166
|
-
3. Load the active phase and current Trace ID
|
|
167
|
-
|
|
168
|
-
### How to Direct Specialist Agents
|
|
169
|
-
|
|
170
|
-
- Normally, **`@manager`** coordinates the process.
|
|
171
|
-
- If you need to address a specialist agent directly, include their tag:
|
|
172
|
-
|
|
173
|
-
```markdown
|
|
174
|
-
@backend Implement the user model and auth services using Kysely.
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
### Critical Rules
|
|
178
|
-
|
|
179
|
-
- Keep `docs/tech-stack.md` updated at all times.
|
|
180
|
-
- When new key decisions are made, update the **CRITICAL DECISIONS** table in `PROJECT_MEMORY.md`.
|
|
181
|
-
- Use a unique Trace ID for every task.
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
## 7. First Real-World Scenario Example
|
|
186
|
-
|
|
187
|
-
Try this quick workflow:
|
|
188
|
-
|
|
189
|
-
1. Populate `docs/tech-stack.md`
|
|
190
|
-
2. Write a simple requirement in `docs/project-docs.md`
|
|
191
|
-
3. Run the following command:
|
|
192
|
-
|
|
193
|
-
```bash
|
|
194
|
-
npx agent-enderun trace:new "User Registration and Login" backend P1
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
4. Then write to the assistant:
|
|
198
|
-
|
|
199
|
-
> @manager Please analyze this requirement and propose the backend architecture.
|
|
200
|
-
|
|
201
|
-
The agents will automatically:
|
|
202
|
-
- Scan your codebase
|
|
203
|
-
- Propose type contracts
|
|
204
|
-
- Scaffold code using blueprints if necessary
|
|
205
|
-
|
|
206
|
-
---
|
|
207
|
-
|
|
208
|
-
## 8. Common Mistakes and Tips
|
|
209
|
-
|
|
210
|
-
| Mistake | Consequence | Solution |
|
|
211
|
-
| :--- | :--- | :--- |
|
|
212
|
-
| Leaving `docs/tech-stack.md` empty | Agents will not know how to proceed | Ensure it is populated immediately |
|
|
213
|
-
| Prompting for direct code generation | Messy and unmonitored code | Always have `@manager` plan first |
|
|
214
|
-
| Not using Trace ID | Chaos and lost traceability | Use `trace:new` for every new feature |
|
|
215
|
-
| Not updating `PROJECT_MEMORY.md` | Agents remember old state | Update memory with every key decision |
|
|
216
|
-
|
|
217
|
-
---
|
|
218
|
-
|
|
219
|
-
## 9. Next Steps
|
|
220
|
-
|
|
221
|
-
After completing the guide, explore:
|
|
222
|
-
|
|
223
|
-
- **Contract-First Development** → Check `apps/backend/src/types`
|
|
224
|
-
- **Blueprint Scaffolding** → Look inside `.enderun/blueprints/`
|
|
225
|
-
- **Security & Compliance** → Run `npx agent-enderun check:security`
|
|
226
|
-
- **Inter-Agent Communication** → Hermes protocol (`messages/` directory)
|
|
227
|
-
|
|
228
|
-
---
|
|
229
|
-
|
|
230
|
-
## 10. Help and Support
|
|
231
|
-
|
|
232
|
-
If you encounter issues:
|
|
233
|
-
|
|
234
|
-
1. Run `npx agent-enderun status`
|
|
235
|
-
2. Check `PROJECT_MEMORY.md`
|
|
236
|
-
3. Inspect the error logs and the last 3 HISTORY entries
|
|
237
|
-
|
|
238
|
-
---
|
|
239
|
-
|
|
240
|
-
**Congratulations!** You can now develop software with discipline, structure, and governance using Agent Enderun.
|
|
241
|
-
|
|
242
|
-
As a next step, we recommend defining **the core contracts of your first real project**.
|
|
243
|
-
|
|
244
|
-
---
|
|
245
|
-
|
|
246
|
-
# Türkçe
|
|
247
|
-
|
|
248
|
-
Bu rehber, Agent Enderun'u **sıfırdan** yeni bir projeye kurmak isteyen geliştiriciler için hazırlanmıştır.
|
|
249
|
-
|
|
250
|
-
> **v0.6.6 itibarıyla önerilen birincil başlatma komutu:** `npx agent-enderun init`
|
|
251
|
-
|
|
252
|
-
Tüm teknik adımlar, ön gereksinimler, yapılandırma ve ajanlarla çalışma kuralları **İngilizce bölümde** detaylı olarak açıklanmıştır.
|
|
253
|
-
|
|
254
|
-
Türkçe kısa özet:
|
|
255
|
-
|
|
256
|
-
- `npx agent-enderun init` ile framework'ü kurun.
|
|
257
|
-
- `docs/tech-stack.md` ve `docs/project-docs.md` dosyalarını doldurun.
|
|
258
|
-
- `npx agent-enderun trace:new` ile ilk görevi oluşturun.
|
|
259
|
-
- Her oturumda @manager otomatik olarak yönetir.
|
|
260
|
-
|
|
261
|
-
Detaylı kurulum adımları, adaptör seçenekleri, hata önleme ipuçları ve örnek akışlar için lütfen İngilizce bölümü okuyun.
|
|
262
|
-
|
|
263
|
-
**Tebrikler!** Artık Agent Enderun ile disiplinli yazılım geliştirmeye başlayabilirsiniz.
|
|
13
|
+
**Congratulations!** You can now start developing professional software with Agent Enderun.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Agent Enderun — Governance and Architecture Portal
|
|
2
|
+
|
|
3
|
+
This portal is the **Central Knowledge Source** for enterprise projects developed under the Agent Enderun framework. The project's architectural decisions, standards, and governance protocols are sealed here.
|
|
4
|
+
|
|
5
|
+
Unlike ordinary projects, Agent Enderun projects are built on a structure where AI agents operate autonomously but are bound by a rigid, human-authored constitution. This documentation is the **Immutable Guide** for both AI agents (Army) and human developers.
|
|
6
|
+
|
|
7
|
+
### 📋 Documentation Guide
|
|
8
|
+
|
|
9
|
+
#### [1. Architecture & Governance](architecture/)
|
|
10
|
+
* **[Architecture Decision Records (ADRs)](architecture/decisions/)**: Answers to "Why" and "How" questions at critical project milestones.
|
|
11
|
+
* **[Approval & High-Risk Workflows](architecture/approval-flows.md)**: Explains how tokens are generated, audited, and how high-risk actions (e.g., database deletion, privilege escalation) are sealed.
|
|
12
|
+
* **[Notification Strategy](architecture/notification-strategy.md)**: Dynamic and corporate notification patterns that do not disrupt the user experience.
|
|
13
|
+
|
|
14
|
+
#### [2. Frontend Standards](frontend/)
|
|
15
|
+
* **[Component Patterns](frontend/component-patterns.md)**: Zero-UI-Library policy, guide on how all components are hand-crafted and type-safe using Panda CSS.
|
|
16
|
+
* **[Form Validations](frontend/forms.md)**: Zero-error form management systems managed with Zod and React hooks.
|
|
17
|
+
* **[Toaster Configuration](frontend/notifications.md)**: Integration of tools like Sonner with the corporate theme.
|
|
18
|
+
|
|
19
|
+
#### [3. Backend Standards](backend/)
|
|
20
|
+
* **[Error Handling](backend/error-handling.md)**: Professional error management hierarchy that does not leak to the front-end and is traceable in logs.
|
|
21
|
+
* **[Audit Logging](backend/audit-logging.md)**: Contracts for how every operation is permanently processed into the database with a Trace ID.
|
|
22
|
+
|
|
23
|
+
## 🛰️ Phase-Based Development Life Cycle
|
|
24
|
+
All projects must pass the following 5 phases sequentially and completely:
|
|
25
|
+
|
|
26
|
+
1. **PHASE_0 (Discovery):** Tech-stack (`tech-stack.md`) sealed, risk analysis performed.
|
|
27
|
+
2. **PHASE_1 (Architecture & Contract):** First, types and API contracts are written. Contracts must be approved before a single line of application code is written.
|
|
28
|
+
3. **PHASE_2 (Core Development):** Backend and Frontend are built in parallel. Branded Types usage is mandatory.
|
|
29
|
+
4. **PHASE_3 (Integration & Test):** @quality agent takes over. 80% Test Coverage threshold must be met before proceeding to the next phase.
|
|
30
|
+
5. **PHASE_4 (Optimization & Deployment):** Security scans and performance tests are completed.
|
|
31
|
+
|
|
32
|
+
> **Agent Directive:** The documents under this folder define the operational boundaries of the agents. An agent cannot deviate from a rule defined here. If a rule needs to be updated, this can only be done with @manager approval and ADR registration.
|
|
33
|
+
|
|
34
|
+
**Version:** v0.9.0
|
|
35
|
+
**Status:** Active Governance
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Action Plan 2026 - Agent Enderun (v0.6.6+)
|
|
2
|
+
|
|
3
|
+
This strategic document contains the concrete weekly action plan prepared to close critical gaps identified in the v0.6.6 Gap Analysis.
|
|
4
|
+
|
|
5
|
+
**Summary:**
|
|
6
|
+
- Phase 1: Reference application + Corporate CRUD Governance + Hermes proof.
|
|
7
|
+
- Phase 3: @frontend and @backend professionalization + quality gates.
|
|
8
|
+
|
|
9
|
+
Detailed plan and technical scope are provided in this document.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Quickstart Guide for New Agent Enderun Projects
|
|
2
|
+
|
|
3
|
+
This guide is prepared for developers who want to set up Agent Enderun in a new project from scratch.
|
|
4
|
+
|
|
5
|
+
> **As of v0.6.6, the primary initialization command is:** `npx agent-enderun init`
|
|
6
|
+
|
|
7
|
+
### Installation Steps
|
|
8
|
+
- Initialize the framework with `npx agent-enderun init`.
|
|
9
|
+
- Fill in the `docs/tech-stack.md` and `docs/project-docs.md` files.
|
|
10
|
+
- Create the first task with `npx agent-enderun trace:new`.
|
|
11
|
+
- @manager manages the project automatically in every session.
|
|
12
|
+
|
|
13
|
+
**Congratulations!** You can now start developing professional software with Agent Enderun.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Agent Enderun — Development Roadmap (v0.6.6+)
|
|
2
|
+
|
|
3
|
+
**Last Updated:** May 23, 2026
|
|
4
|
+
|
|
5
|
+
This document contains the development roadmap for the Agent Enderun framework post-v0.6.6.
|
|
6
|
+
|
|
7
|
+
- **System Health:** 🟢 GREEN (build and test infrastructure under repair)
|
|
8
|
+
- **v0.6.6 Focus:** Translating the entire framework to professional English and analyzing governance gaps honestly.
|
|
9
|
+
|
|
10
|
+
## Summary
|
|
11
|
+
The Agent Maturity Program is ongoing. @frontend continues to be the highest-risk agent. Live testing of the Hermes protocol and producing a reference application are the main goals for the coming period.
|
|
12
|
+
|
|
13
|
+
Detailed plan and risk tracking are provided in this document.
|
package/eslint.config.js
CHANGED
|
@@ -81,15 +81,9 @@ const TOOLS = [
|
|
|
81
81
|
},
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
|
-
name: "
|
|
85
|
-
description: "
|
|
86
|
-
inputSchema: {
|
|
87
|
-
type: "object",
|
|
88
|
-
properties: {
|
|
89
|
-
idea: { type: "string", description: "The application idea or requirements" },
|
|
90
|
-
},
|
|
91
|
-
required: ["idea"],
|
|
92
|
-
},
|
|
84
|
+
name: "orchestrate_loop",
|
|
85
|
+
description: "Process the pending Hermes messages and trigger dynamic state transitions.",
|
|
86
|
+
inputSchema: { type: "object", properties: {} },
|
|
93
87
|
},
|
|
94
88
|
{
|
|
95
89
|
name: "send_agent_message",
|
|
@@ -161,9 +155,8 @@ server.onRequest(CallToolRequestSchema, async (request) => {
|
|
|
161
155
|
execSync(`npx agent-enderun update_project_memory "${section}" "${safeContent}"`);
|
|
162
156
|
return { content: [{ type: "text", text: `✅ Section ${section} updated.` }] };
|
|
163
157
|
}
|
|
164
|
-
case "
|
|
165
|
-
const
|
|
166
|
-
const output = execSync(`npx agent-enderun create-app "${idea.replace(/"/g, "\\\"")}"`).toString();
|
|
158
|
+
case "orchestrate_loop": {
|
|
159
|
+
const output = execSync("npx agent-enderun orchestrate").toString();
|
|
167
160
|
return { content: [{ type: "text", text: output }] };
|
|
168
161
|
}
|
|
169
162
|
case "send_agent_message": {
|
|
@@ -188,9 +181,10 @@ server.onRequest(CallToolRequestSchema, async (request) => {
|
|
|
188
181
|
}
|
|
189
182
|
}
|
|
190
183
|
catch (error) {
|
|
184
|
+
const message = error instanceof Error ? error.message : "Unknown error occurred";
|
|
191
185
|
return {
|
|
192
186
|
isError: true,
|
|
193
|
-
content: [{ type: "text", text:
|
|
187
|
+
content: [{ type: "text", text: message }],
|
|
194
188
|
};
|
|
195
189
|
}
|
|
196
190
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-enderun",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "The Supreme AI Governance & Orchestration Framework for Enterprise Development",
|
|
5
5
|
"author": "Yusuf BEKAR",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
34
|
"bin",
|
|
35
|
+
"src",
|
|
35
36
|
"dist",
|
|
36
37
|
"framework-mcp/dist",
|
|
37
38
|
"framework-mcp/package.json",
|
|
@@ -59,6 +60,7 @@
|
|
|
59
60
|
"enderun:check": "agent-enderun check",
|
|
60
61
|
"enderun:lint": "eslint .",
|
|
61
62
|
"lint": "eslint .",
|
|
63
|
+
"prepublishOnly": "npm run enderun:build",
|
|
62
64
|
"clean": "rm -rf node_modules apps/*/node_modules framework-mcp/node_modules apps/*/dist framework-mcp/dist"
|
|
63
65
|
},
|
|
64
66
|
"publishConfig": {
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import path from "path";
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
|
|
4
|
+
import { findClaudeConfigPath, addMcpServerToClaude } from "./utils/claude.js";
|
|
5
|
+
import { writeJsonFile, writeTextFile } from "./utils/fs.js";
|
|
6
|
+
|
|
7
|
+
export const ADAPTER_IDS = ["gemini", "claude", "grok", "antigravity", "antigravity-cli"] as const;
|
|
8
|
+
export type AdapterId = (typeof ADAPTER_IDS)[number];
|
|
9
|
+
|
|
10
|
+
export interface AdapterConfig {
|
|
11
|
+
id: AdapterId;
|
|
12
|
+
/** Runtime framework directory created by init */
|
|
13
|
+
frameworkDir: string;
|
|
14
|
+
/** Root shim file (e.g. gemini.md) */
|
|
15
|
+
shimFile: string;
|
|
16
|
+
/** Package template copied into frameworkDir */
|
|
17
|
+
templateDir: ".enderun";
|
|
18
|
+
/** Extra directories under frameworkDir (gemini only for nested auto-scaffold) */
|
|
19
|
+
nestedDirs?: string[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const ADAPTERS: Record<AdapterId, AdapterConfig> = {
|
|
23
|
+
gemini: {
|
|
24
|
+
id: "gemini",
|
|
25
|
+
frameworkDir: ".gemini",
|
|
26
|
+
shimFile: "gemini.md",
|
|
27
|
+
templateDir: ".enderun",
|
|
28
|
+
nestedDirs: ["antigravity", "antigravity-cli"],
|
|
29
|
+
},
|
|
30
|
+
claude: {
|
|
31
|
+
id: "claude",
|
|
32
|
+
frameworkDir: ".claude",
|
|
33
|
+
shimFile: "claude.md",
|
|
34
|
+
templateDir: ".enderun",
|
|
35
|
+
},
|
|
36
|
+
grok: {
|
|
37
|
+
id: "grok",
|
|
38
|
+
frameworkDir: ".agent", // Future-proof agent-centric directory for Grok/X.ai
|
|
39
|
+
shimFile: "grok.md",
|
|
40
|
+
templateDir: ".enderun",
|
|
41
|
+
},
|
|
42
|
+
antigravity: {
|
|
43
|
+
id: "antigravity",
|
|
44
|
+
frameworkDir: ".gemini/antigravity",
|
|
45
|
+
shimFile: "agent.md",
|
|
46
|
+
templateDir: ".enderun",
|
|
47
|
+
},
|
|
48
|
+
"antigravity-cli": {
|
|
49
|
+
id: "antigravity-cli",
|
|
50
|
+
frameworkDir: ".gemini/antigravity-cli",
|
|
51
|
+
shimFile: "agent.md",
|
|
52
|
+
templateDir: ".enderun",
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* All framework runtime directories (for discovery).
|
|
58
|
+
* Verified against 2026 industry standards for Claude Code (.claude/)
|
|
59
|
+
* and internal standards for Antigravity (.gemini/antigravity/).
|
|
60
|
+
*/
|
|
61
|
+
export const FRAMEWORK_DIR_CANDIDATES = [
|
|
62
|
+
".gemini",
|
|
63
|
+
".claude",
|
|
64
|
+
".agent",
|
|
65
|
+
".enderun",
|
|
66
|
+
] as const;
|
|
67
|
+
|
|
68
|
+
const SHIM_FILES = ADAPTER_IDS.map((id) => ADAPTERS[id].shimFile);
|
|
69
|
+
|
|
70
|
+
export function resolveAdapter(input?: string): AdapterConfig {
|
|
71
|
+
const normalized = (input || "gemini").toLowerCase() as AdapterId;
|
|
72
|
+
if (ADAPTER_IDS.includes(normalized)) {
|
|
73
|
+
return ADAPTERS[normalized];
|
|
74
|
+
}
|
|
75
|
+
console.warn(`⚠️ Unknown adapter "${input}". Falling back to gemini (.gemini/).`);
|
|
76
|
+
return ADAPTERS.gemini;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function isAdapterShimFile(fileName: string): boolean {
|
|
80
|
+
return SHIM_FILES.includes(fileName);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function remapFrameworkContent(
|
|
84
|
+
content: string,
|
|
85
|
+
frameworkDir: string,
|
|
86
|
+
adapterId: AdapterId,
|
|
87
|
+
): string {
|
|
88
|
+
let result = content;
|
|
89
|
+
result = result.replace(/\{\{FRAMEWORK_DIR\}\}/g, frameworkDir);
|
|
90
|
+
result = result.replace(/\{\{ADAPTER\}\}/g, adapterId);
|
|
91
|
+
result = result.replace(/\.enderun\//g, `${frameworkDir}/`);
|
|
92
|
+
result = result.replace(/`\.enderun`/g, `\`${frameworkDir}\``);
|
|
93
|
+
result = result.replace(/\.enderun(?![\w/-])/g, frameworkDir);
|
|
94
|
+
|
|
95
|
+
// Read config paths dynamically to map directory tokens
|
|
96
|
+
let backend = "apps/backend";
|
|
97
|
+
let frontend = "apps/web";
|
|
98
|
+
let docs = "docs";
|
|
99
|
+
let tests = "tests";
|
|
100
|
+
try {
|
|
101
|
+
const configPath = path.join(process.cwd(), frameworkDir, "config.json");
|
|
102
|
+
if (fs.existsSync(configPath)) {
|
|
103
|
+
const config = JSON.parse(fs.readFileSync(configPath, "utf8"));
|
|
104
|
+
if (config.paths) {
|
|
105
|
+
if (config.paths.backend) backend = config.paths.backend;
|
|
106
|
+
if (config.paths.frontend) frontend = config.paths.frontend;
|
|
107
|
+
if (config.paths.docs) docs = config.paths.docs;
|
|
108
|
+
if (config.paths.tests) tests = config.paths.tests;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
} catch {
|
|
112
|
+
// ignore
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
result = result.replace(/\{\{BACKEND_DIR\}\}/g, backend);
|
|
116
|
+
result = result.replace(/\{\{FRONTEND_DIR\}\}/g, frontend);
|
|
117
|
+
result = result.replace(/\{\{DOCS_DIR\}\}/g, docs);
|
|
118
|
+
result = result.replace(/\{\{TESTS_DIR\}\}/g, tests);
|
|
119
|
+
|
|
120
|
+
return result;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function buildMcpServerEntry(projectRoot: string) {
|
|
124
|
+
return {
|
|
125
|
+
command: "node",
|
|
126
|
+
args: [path.join(projectRoot, "framework-mcp/dist/index.js")],
|
|
127
|
+
env: {},
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function writeAntigravityScaffold(frameworkDirPath: string): void {
|
|
132
|
+
const antigravityReadme = `# Antigravity IDE — Agent Enderun
|
|
133
|
+
|
|
134
|
+
Antigravity IDE integration for the Gemini adapter.
|
|
135
|
+
|
|
136
|
+
- Framework root: \`${path.basename(frameworkDirPath)}/\`
|
|
137
|
+
- Nested path: \`antigravity/\`
|
|
138
|
+
- Use the parent \`mcp_config.json\` and \`gemini.md\` entrypoint at the project root.
|
|
139
|
+
`;
|
|
140
|
+
|
|
141
|
+
const antigravityCliReadme = `# Antigravity CLI — Agent Enderun
|
|
142
|
+
|
|
143
|
+
Antigravity CLI integration for the Gemini adapter.
|
|
144
|
+
|
|
145
|
+
- Framework root: \`${path.basename(frameworkDirPath)}/\`
|
|
146
|
+
- Nested path: \`antigravity-cli/\`
|
|
147
|
+
- Register MCP from the project root \`mcp.json\` or \`.gemini/mcp_config.json\`.
|
|
148
|
+
`;
|
|
149
|
+
|
|
150
|
+
writeTextFile(path.join(frameworkDirPath, "antigravity/README.md"), antigravityReadme);
|
|
151
|
+
writeTextFile(path.join(frameworkDirPath, "antigravity-cli/README.md"), antigravityCliReadme);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Adapter-specific MCP and IDE hooks after scaffold.
|
|
156
|
+
*/
|
|
157
|
+
export function runAdapterPostInit(adapter: AdapterConfig, projectRoot: string): void {
|
|
158
|
+
const mcpEntry = buildMcpServerEntry(projectRoot);
|
|
159
|
+
const mcpBlock = { mcpServers: { "agent-enderun": mcpEntry } };
|
|
160
|
+
|
|
161
|
+
switch (adapter.id) {
|
|
162
|
+
case "gemini": {
|
|
163
|
+
writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
|
|
164
|
+
writeAntigravityScaffold(path.join(projectRoot, adapter.frameworkDir));
|
|
165
|
+
console.warn(`✅ Gemini MCP → ${adapter.frameworkDir}/mcp_config.json`);
|
|
166
|
+
console.warn(`✅ Antigravity → ${adapter.frameworkDir}/antigravity/ & antigravity-cli/`);
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
case "antigravity": {
|
|
170
|
+
writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
|
|
171
|
+
console.warn(`✅ Antigravity IDE MCP → ${adapter.frameworkDir}/mcp_config.json`);
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
case "antigravity-cli": {
|
|
175
|
+
writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
|
|
176
|
+
console.warn(`✅ Antigravity CLI MCP → ${adapter.frameworkDir}/mcp_config.json`);
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
case "grok": {
|
|
180
|
+
writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
|
|
181
|
+
console.warn(`✅ Grok MCP → ${adapter.frameworkDir}/mcp_config.json`);
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
case "claude": {
|
|
185
|
+
const configPath = findClaudeConfigPath();
|
|
186
|
+
if (configPath) {
|
|
187
|
+
const ok = addMcpServerToClaude(configPath, "agent-enderun", mcpEntry);
|
|
188
|
+
if (ok) {
|
|
189
|
+
console.warn(`✅ Claude MCP registered → ${configPath}`);
|
|
190
|
+
} else {
|
|
191
|
+
console.warn("⚠️ Could not patch Claude config automatically.");
|
|
192
|
+
}
|
|
193
|
+
} else {
|
|
194
|
+
console.warn("⚠️ Claude config not found. Add MCP manually (see README).");
|
|
195
|
+
}
|
|
196
|
+
writeJsonFile(path.join(projectRoot, adapter.frameworkDir, "mcp_config.json"), mcpBlock);
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
default:
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Keep root mcp.json in sync when missing or empty
|
|
204
|
+
const rootMcpPath = path.join(projectRoot, "mcp.json");
|
|
205
|
+
if (!fs.existsSync(rootMcpPath)) {
|
|
206
|
+
writeJsonFile(rootMcpPath, mcpBlock);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
|
|
3
|
+
import { updateMemoryForGeneratedApp, collectCreateAppDescription, inferAppSpec, createBackendFiles, createWebFiles, updateProjectDocs } from "../utils/app.js";
|
|
4
|
+
import { traceNewCommand } from "./trace.js";
|
|
5
|
+
import { getMemoryPath } from "../utils/memory.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Generate a new application based on natural language input.
|
|
9
|
+
*/
|
|
10
|
+
export async function createAppCommand(args: string[]) {
|
|
11
|
+
const description = await collectCreateAppDescription(args);
|
|
12
|
+
const spec = inferAppSpec(description);
|
|
13
|
+
|
|
14
|
+
console.warn(`🚀 Generating Enterprise App: ${spec.title}...`);
|
|
15
|
+
|
|
16
|
+
createBackendFiles(spec);
|
|
17
|
+
createWebFiles(spec);
|
|
18
|
+
updateProjectDocs(spec);
|
|
19
|
+
|
|
20
|
+
const memoryPath = getMemoryPath();
|
|
21
|
+
let traceId = "01HGT8J5E2N0W0W0W0W0W0W0W0"; // default fallback
|
|
22
|
+
|
|
23
|
+
if (fs.existsSync(memoryPath)) {
|
|
24
|
+
const memory = fs.readFileSync(memoryPath, "utf8");
|
|
25
|
+
const match = memory.match(/- Trace ID: (.*)/);
|
|
26
|
+
if (match) traceId = match[1].trim();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const activeTraceId = traceNewCommand(`Generate ${spec.title} from natural language request`, "manager", "P1") || traceId;
|
|
30
|
+
updateMemoryForGeneratedApp(spec, activeTraceId);
|
|
31
|
+
|
|
32
|
+
console.warn("\n✨ Application scaffolded successfully!");
|
|
33
|
+
console.warn("📜 Updated project docs and app-local types contract");
|
|
34
|
+
console.warn("\nNext commands:");
|
|
35
|
+
console.warn(" npm install");
|
|
36
|
+
console.warn(" npm run enderun:build");
|
|
37
|
+
console.warn(" agent-enderun frontend:dev\n");
|
|
38
|
+
}
|