agent-enderun 0.1.10 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/.enderun/BRAIN_DASHBOARD.md +43 -0
  2. package/.enderun/ENDERUN.md +203 -0
  3. package/.enderun/PROJECT_MEMORY.md +137 -36
  4. package/.enderun/agents/analyst.md +21 -10
  5. package/.enderun/agents/backend.md +12 -11
  6. package/.enderun/agents/explorer.md +10 -7
  7. package/.enderun/agents/frontend.md +9 -20
  8. package/.enderun/agents/git.md +16 -12
  9. package/.enderun/agents/manager.md +14 -15
  10. package/.enderun/agents/mobile.md +5 -5
  11. package/.enderun/agents/native.md +5 -5
  12. package/.enderun/benchmarks/.gitkeep +0 -0
  13. package/.enderun/cli-commands.json +13 -1
  14. package/.enderun/config.json +1 -1
  15. package/.enderun/docs/api/README.md +10 -9
  16. package/.enderun/docs/api/auth.md +11 -0
  17. package/.enderun/docs/api/errors.md +7 -0
  18. package/.enderun/docs/error-handling.md +12 -0
  19. package/.enderun/docs/privacy.md +3 -0
  20. package/.enderun/docs/security.md +12 -0
  21. package/.enderun/docs/tech-stack.md +1 -0
  22. package/.enderun/docs/troubleshooting.md +7 -0
  23. package/.enderun/knowledge/api_design_rules.md +6 -0
  24. package/.enderun/knowledge/async_error_handling.md +18 -0
  25. package/.enderun/knowledge/branded_types_pattern.md +1 -0
  26. package/.enderun/knowledge/code_review_checklist.md +7 -0
  27. package/.enderun/knowledge/contract_versioning.md +7 -0
  28. package/.enderun/knowledge/database_migration.md +6 -0
  29. package/.enderun/knowledge/deployment_checklist.md +7 -0
  30. package/.enderun/knowledge/git_commit_strategy.md +10 -0
  31. package/.enderun/knowledge/legacy_onboarding.md +7 -0
  32. package/.enderun/knowledge/monitoring_setup.md +5 -0
  33. package/.enderun/knowledge/performance_guidelines.md +11 -0
  34. package/.enderun/knowledge/repository_patterns.md +9 -0
  35. package/.enderun/knowledge/security_scanning.md +6 -0
  36. package/.enderun/knowledge/testing_standards.md +7 -0
  37. package/.enderun/knowledge/troubleshooting_guide.md +5 -0
  38. package/.enderun/knowledge/zero_ui_library_policy.md +1 -0
  39. package/.enderun/logs/analyst.json +1 -0
  40. package/.enderun/logs/backend.json +1 -0
  41. package/.enderun/logs/explorer.json +1 -0
  42. package/.enderun/logs/frontend.json +1 -0
  43. package/.enderun/logs/git.json +1 -0
  44. package/.enderun/logs/manager.json +363 -0
  45. package/.enderun/logs/mobile.json +1 -0
  46. package/.enderun/logs/native.json +1 -0
  47. package/.enderun/monitoring/.gitkeep +0 -0
  48. package/ENDERUN.md +8 -8
  49. package/LICENSE +21 -0
  50. package/README.md +595 -195
  51. package/bin/cli.js +306 -79
  52. package/package.json +35 -2
  53. package/packages/framework-mcp/README.md +47 -81
  54. package/packages/framework-mcp/dist/index.js +13 -971
  55. package/packages/framework-mcp/dist/schemas.js +84 -0
  56. package/packages/framework-mcp/dist/tools/academy.js +184 -0
  57. package/packages/framework-mcp/dist/tools/codebase.js +294 -0
  58. package/packages/framework-mcp/dist/tools/contract.js +95 -0
  59. package/packages/framework-mcp/dist/tools/database.js +52 -0
  60. package/packages/framework-mcp/dist/tools/framework.js +161 -0
  61. package/packages/framework-mcp/dist/tools/git.js +53 -0
  62. package/packages/framework-mcp/dist/tools/index.js +42 -0
  63. package/packages/framework-mcp/dist/tools/knowledge.js +69 -0
  64. package/packages/framework-mcp/dist/tools/memory.js +94 -0
  65. package/packages/framework-mcp/dist/tools/messages.js +71 -0
  66. package/packages/framework-mcp/dist/tools/repository.js +76 -0
  67. package/packages/framework-mcp/dist/tools/security.js +122 -0
  68. package/packages/framework-mcp/dist/utils.js +82 -0
  69. package/packages/framework-mcp/package-lock.json +1836 -0
  70. package/packages/framework-mcp/package.json +1 -1
  71. package/packages/framework-mcp/src/index.ts +20 -970
  72. package/packages/framework-mcp/src/schemas.ts +106 -0
  73. package/packages/framework-mcp/src/tools/academy.ts +178 -0
  74. package/packages/framework-mcp/src/tools/codebase.ts +284 -0
  75. package/packages/framework-mcp/src/tools/contract.ts +91 -0
  76. package/packages/framework-mcp/src/tools/database.ts +49 -0
  77. package/packages/framework-mcp/src/tools/framework.ts +157 -0
  78. package/packages/framework-mcp/src/tools/git.ts +43 -0
  79. package/packages/framework-mcp/src/tools/index.ts +45 -0
  80. package/packages/framework-mcp/src/tools/knowledge.ts +68 -0
  81. package/packages/framework-mcp/src/tools/memory.ts +88 -0
  82. package/packages/framework-mcp/src/tools/messages.ts +70 -0
  83. package/packages/framework-mcp/src/tools/repository.ts +76 -0
  84. package/packages/framework-mcp/src/tools/security.ts +122 -0
  85. package/packages/framework-mcp/src/utils.ts +90 -0
  86. package/packages/framework-mcp/tests/mcp-server.test.ts +6 -0
  87. package/packages/shared-types/README.md +28 -51
  88. package/packages/shared-types/contract.version.json +4 -4
  89. package/packages/shared-types/dist/index.d.ts +80 -48
  90. package/packages/shared-types/dist/index.d.ts.map +1 -1
  91. package/packages/shared-types/dist/index.js +5 -8
  92. package/packages/shared-types/dist/index.js.map +1 -1
  93. package/packages/shared-types/package.json +1 -1
  94. package/packages/shared-types/src/index.ts +79 -51
  95. package/CHANGELOG.md +0 -97
  96. package/CLAUDE.md +0 -7
  97. package/CODEX.md +0 -7
  98. package/CURSOR.md +0 -7
  99. package/GEMINI.md +0 -7
  100. package/docs/tech-stack.md +0 -10
  101. package/gemini-extension.json +0 -5
  102. package/panda.config.ts +0 -20
  103. /package/{docs → .enderun/docs}/project-docs.md +0 -0
@@ -0,0 +1,43 @@
1
+ # 🧠 Agent Academy Brain Dashboard
2
+
3
+ This dashboard provides a high-level overview of the Academy's performance, quality trends, and architectural health.
4
+
5
+ ---
6
+
7
+ ## 📊 Performance Metrics
8
+
9
+ | Metric | Current Value | Status |
10
+ | :--- | :--- | :--- |
11
+ | **Global Success Rate** | 0% | ⏳ Initializing |
12
+ | **Active Trace IDs** | 0 | ⚪ Idle |
13
+ | **Agent Velocity** | 0 tasks/day | ⚪ Idle |
14
+ | **Contract Integrity** | 100% | ✅ Valid |
15
+
16
+ ---
17
+
18
+ ## 🛡️ Quality & Security
19
+
20
+ - **Security Audit Status**: 🟢 Clean (Last scan: N/A)
21
+ - **Constitution Compliance**: 🔵 100% (Last audit: N/A)
22
+ - **Documentation Debt**: 🟠 Moderate (Missing JSDoc in some modules)
23
+
24
+ ---
25
+
26
+ ## 🏗️ Architectural Health
27
+
28
+ - **Dependency Cycles**: 0 detected.
29
+ - **Complexity Spikes**: 0 identified.
30
+ - **Database Migrations**: 0 pending.
31
+
32
+ ---
33
+
34
+ ## 📜 Contract Change Log
35
+
36
+ | Version | Date | Description | Hash |
37
+ | :--- | :--- | :--- | :--- |
38
+ | v0.2.0 | 2026-05-11 | Initial v0.2.0 Baseline | `sha256:current-baseline` |
39
+
40
+ ---
41
+
42
+ > [!NOTE]
43
+ > This dashboard is automatically updated by the `@analyst` agent via the `update_brain_dashboard` tool (simulated).
@@ -0,0 +1,203 @@
1
+ # Agent Enderun (v0.2.0)
2
+ # Place in project root. This file is the single source of truth for Base Project AI Extensions.
3
+
4
+ ## 🎖️ AGENT CHECKLIST (MANDATORY BEFORE RESPONSE)
5
+ > Check this list at the end of every response:
6
+ > - [ ] **Zero Mock:** Did you use fake data or placeholders? (Strictly Forbidden)
7
+ > - [ ] **Contract First:** Are `shared-types` and `contract.version.json` up to date?
8
+ > - [ ] **Audit Log:** Did you log this action in `.enderun/logs/[agent].json`?
9
+ > - [ ] **CLI Orchestration:** Does the action comply with `gemini cli` rules?
10
+ > - [ ] **No "..." allowed:** Did you write the code completely without omitting parts?
11
+
12
+ ---
13
+
14
+ ## Constitution Status
15
+ This file (`./gemini.md`) and the `.enderun/docs/` folder represent the "Supreme Law" of the project. All agents must read this file first in every session and strictly comply with its rules 100%.
16
+
17
+ ---
18
+
19
+ ## STEP 0 — STARTUP (EVERY SESSION, NON-NEGOTIABLE)
20
+
21
+ 1. **Read ./gemini.md First:** Read and fully understand this file before taking any action.
22
+ 2. **Check `.enderun/docs/` Folder:** Verify the existence of the `.enderun/docs/` folder in the project root.
23
+ 3. **Absorb Context:** Read `.enderun/docs/tech-stack.md`. If it is empty, ask the user to fill it before proceeding.
24
+ 4. **Demand Context:** If the `.enderun/docs/` folder does not exist, ask the user for project context and target audience information before writing any code.
25
+ 5. Default Frontend: React 19 + Vite (SPA) + react-router-dom (User Preference)
26
+
27
+ **NEVER SKIP THIS STEP.** Do not assume context; read first, then act.
28
+
29
+ ---
30
+
31
+ ## CORE PRINCIPLES
32
+
33
+ - **Agent Academy Focus:** This repository is dedicated to the development and evolution of AI Agents. All actions must aim to improve agent intelligence, autonomy, and procedural continuity.
34
+ - **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.
35
+ - **Immediate Memory Sync:** Every state change, decision, or improved capability must be reflected in the memory files immediately.
36
+ - **Contract-First Agent Evolution:** Tools and SOPs used by agents must be defined via schemas and contracts first.
37
+ - **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).
38
+ - **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.
39
+ - **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.
40
+ - **Audit Logging Necessity:** Every critical action must be logged traceably under the `.enderun/logs/` folder.
41
+ - **File Ownership Rule:** Each file is the responsibility of a single agent.
42
+ - **CLI Command Mapping:** All CLI commands in the project must be defined in the `.enderun/cli-commands.json` file and assigned to the relevant agent.
43
+ - **Exit Code Standard:** Standard exit codes (e.g., 64: User Error, 70: Internal Error) must be used in error situations.
44
+ - **Phase-Based Execution:** The development process must progress through defined Phases. You cannot move to the next phase until the current one is completed.
45
+ - **CLI-Driven Orchestration:** All agent interactions and task delegations must be traceable via `gemini cli`.
46
+ - **Monorepo Discipline:** Commands must always be run from the monorepo root directory using npm workspaces (e.g., `npm run dev --workspace=web`).
47
+
48
+ ---
49
+
50
+ ## STEP 1 — VALIDATE BEFORE ACTING
51
+
52
+ Before writing any code or design, check `.enderun/docs/tech-stack.md`:
53
+
54
+ | Unknown | Action |
55
+ |---|---|
56
+ | Target Audience | Ask — do not proceed |
57
+ | Platform (web / mobile / desktop / backend) | Ask — do not proceed |
58
+ | **Technology Stack** | **Check `.enderun/docs/tech-stack.md` → If missing → ASK** |
59
+ | **Execution Profile (Full / Lightweight)** | **Ask — do not proceed** |
60
+ | Database (MariaDB / SQLite / PostgreSQL) | Ask — do not proceed |
61
+ | Environment (prototype / production) | Ask — do not proceed |
62
+ | Auth required? | Ask — do not proceed |
63
+ | Monorepo or separate repos? | Ask — do not proceed |
64
+ | Deploy target (Vercel / Docker / Bare metal)? | Ask — do not proceed |
65
+ | i18n (multi-language) required? | Ask — do not proceed |
66
+ | API versioning strategy? | Ask — do not proceed |
67
+ | Accessibility level (WCAG AA / AAA)? | Default AA — ask if different |
68
+ | Scope too broad ("build the whole app") | Break into parts → confirm each part |
69
+
70
+ Small details (port, filename, folder name) → assume and state them.
71
+
72
+ Always write assumptions at the top of your response:
73
+ ```
74
+ Assumption: [what] — [why]
75
+ ```
76
+
77
+ ---
78
+
79
+ ## OUTPUT FLOWS (MANDATORY STANDARDS)
80
+
81
+ Every agent must use the **Mandatory Output Flow** defined in their specific `.md` file. However, the following sections are mandatory in all outputs:
82
+
83
+ - **Assumptions:** All assumptions made.
84
+ - **Problem:** What is being built and why (Max 2-3 sentences).
85
+ - **File Tree:** Complete folder and file structure.
86
+ - **Code:** Complete code content (using "..." is forbidden).
87
+ - **Audit Logging:** How the changes are logged.
88
+ - **Tests:** Test file for every service and utility.
89
+
90
+ ---
91
+
92
+ ## ABSOLUTE DON'TS — APPLIES TO EVERY RESPONSE
93
+
94
+ - **`any` Type is Forbidden:** The use of `any` is strictly forbidden in TypeScript projects.
95
+ - **`console.log` is Forbidden:** `console.log` cannot be present in production code.
96
+ - **Mock Data is Forbidden:** Sahte (mock) veri veya yer tutucu kullanımı kesinlikle yasaktır. Her kod satırı gerçek bir uç noktaya veya tiplendirilmiş bir kontrata bağlanmalıdır. (İstisna: Stripe, Twilio gibi harici 3. taraf servisler için kontrollü mock kullanımına izin verilir).
97
+ - **File Ownership Violation:** Making unauthorized changes in files outside your scope is forbidden.
98
+ - **Security Rule Violation:** Violating security protocols is strictly forbidden.
99
+ - **Hardcoded Secrets:** Embedding API keys or env variables inside the code is forbidden.
100
+ - **Raw SQL Strings:** Direct strings cannot be used for SQL queries; strictly use `Kysely`.
101
+ - **Direct DB call in a controller:** Database operations cannot be performed directly inside a Controller.
102
+ - **Missing try/catch on async operations:** Error handling (try/catch) is mandatory for asynchronous operations.
103
+
104
+ ---
105
+
106
+ ## LANGUAGE POLICY
107
+
108
+ - Code comments: English (Explain why it was done, not what it does).
109
+ - Variable / function / class / file names: English.
110
+ - User-facing UI text: English (Default).
111
+ - Communication: English by default (Global rule).
112
+
113
+ ---
114
+
115
+ ## EXECUTION PROFILES
116
+
117
+ Depending on the size and complexity of the project, there are two execution profiles. The Team Lead must determine this profile at the start of the project:
118
+
119
+ - **Lightweight Profile (MVP):** Only `team-lead`, `backend-architect`, `frontend-specialist`, and `design-specialist` are active. Mandatory for rapid prototyping, small projects, and low-budget work. Mobile, desktop, and test agents are bypassed.
120
+ - **Full Profile (Enterprise):** team-lead, backend-architect, frontend-specialist, design-specialist, test-engineer
121
+
122
+ ---
123
+
124
+ ## API & CONTRACT MANAGEMENT
125
+
126
+ ### 1. contract.version.json Standard
127
+ This file is the single source of truth for API stability. `@backend-architect` is responsible for its integrity.
128
+
129
+ ```json
130
+ {
131
+ "version": "MAJOR.MINOR",
132
+ "last_updated": "ISO-8601",
133
+ "contract_hash": "sha256-hash-of-shared-types",
134
+ "breaking_changes": [
135
+ { "version": "1.0", "description": "Initial stable release" }
136
+ ],
137
+ "deprecated_versions": []
138
+ }
139
+ ```
140
+ - **MAJOR:** Incremented on breaking changes (Phase Rollback required).
141
+ - **MINOR:** Incremented on additive changes (New fields/endpoints).
142
+
143
+ ---
144
+
145
+ ## STATE MACHINE & EXECUTION PHASES
146
+
147
+ The development process follows a strict State Machine. Transition to the next phase is prohibited until the "Success Criteria" of the current phase is met.
148
+
149
+ - **[STATE: PHASE_0] Discovery & Setup:** Profile selection (Lightweight/Full), requirement analysis, and validating `.enderun/docs/tech-stack.md`.
150
+ - **[STATE: PHASE_1] Architecture & Contracts:** Setup of data models, API schemas, and `packages/shared-types`. Cannot proceed until Frontend and Backend approve these schemas.
151
+ - **[STATE: PHASE_2] Core Development:** Active agents build core features in parallel based on the selected profile. (Under the apps/ folder)
152
+ - **[STATE: PHASE_3] Integration & Testing:** System integration.
153
+ - **[STATE: PHASE_4] Optimization & Deployment:** Performance audit and deployment.
154
+
155
+ **Rollback Rule:** If a missing field or error is detected in the API schema (`shared-types`) during Phase 2 or later, the system immediately transitions to `[STATE: ROLLBACK_PHASE_1]`. All relevant agents stop their processes, switch to `WAITING` state, and cannot return to Phase 2 until the `backend-architect` resolves the issues.
156
+
157
+ ---
158
+
159
+ ## AGENT TIMEOUT & ESCALATION
160
+
161
+ Every agent must produce a response for their assigned task within a maximum of 30 minutes (or the time defined per project). Upon timeout, `task-specialist` automatically moves the relevant task to `BLOCKED` status and leaves an escalation message for the `@team-lead`.
162
+
163
+ ---
164
+
165
+ ## CLI STANDARDS & CONFIGURATION
166
+
167
+ ### 1. CLI Command Map (`.enderun/cli-commands.json`)
168
+ All CLI commands are centrally managed in this file. Each command must have a designated owner agent.
169
+
170
+ ### 2. Configuration (`.enderun/config.json`)
171
+ CLI behaviors (logLevel, outputFormat, defaultProfile) are managed through this file.
172
+
173
+ **Priority Rule:** CLI Flags > `.enderun/config.json` > `.env` > Default Values.
174
+
175
+ ### 3. Exit Codes
176
+ - `0`: Success
177
+ - `64`: User Error (Invalid argument, missing parameter)
178
+ - `70`: Internal Error (Software error, crash)
179
+ - `71`: Connection/Network Error
180
+
181
+ ---
182
+
183
+ ## API VERSIONING STRATEGY
184
+
185
+ All APIs are versioned via the URL path (`/api/v1/...`). The `packages/shared-types/contract.version.json` file uses the MAJOR.MINOR format, and must be updated with every change. The `@backend-architect` is responsible for its accuracy. The MAJOR version is incremented for every breaking change. Old versions continue to be supported for at least 1 MAJOR release.
186
+
187
+ ---
188
+
189
+ ## PARALLEL EXECUTION & COORDINATION RULES
190
+
191
+ 1. **Shared-Types as Source of Truth:** All agents reference `packages/shared-types` and the `contract.version.json` file.
192
+ 2. **Commit-Level Logging:** Every agent must log every atomic change to the `.enderun/logs/[agent-name].json` file.
193
+ 3. **Implicit Dependency Lock:** If an agent's required output is not ready, it switches to `WAITING` state.
194
+ 4. **Ownership Enforcement:** Changes to files outside an agent's scope cannot be made without `@team-lead` approval.
195
+ 5. **No Blind Coding:** Agents must periodically read `.enderun/logs/` and `.enderun/STATUS.md`.
196
+ 6. **Agent Directives (Message Queue):** `.enderun/messages/` is used for inter-agent communication.
197
+ - **Message Queue Lock Protocol:** Before writing to a file, check for `.enderun/messages/.lock`.
198
+ - If it exists, wait 500ms and retry (max 3 retries).
199
+ - If lock persists after 3 retries, the agent MUST assume a **stale lock**, delete it, and notify `@team-lead` in their log.
200
+ - Delete `.lock` and the message file immediately after processing.
201
+ 7. **Phase Rollback Protocol:** If contracts are insufficient, return to Phase 1. All agents become `WAITING` and write `CONTRACT_CHANGED` to their log.
202
+ 8. **Next.js Ownership Rule:** `apps/web/api/` and `server/actions/` -> @backend-architect. `apps/web/(routes)/` and `components/` -> @frontend-specialist.
203
+ 9. **Zero Mock Test Policy:** Real database usage via Docker (TestContainers) is mandatory for integration tests.
@@ -1,80 +1,181 @@
1
- # PROJECT MEMORY — AI-Enderun
1
+ # PROJECT MEMORY — Agent Enderun
2
2
 
3
- This file is the Single Source of Truth (SSOT).
3
+ This file is the Single Source of Truth (SSOT) and the persistent memory of the project.
4
4
 
5
5
  ## CURRENT STATUS
6
6
 
7
7
  | Active Phase | Profile | Last Update | Active Trace ID | Blockers |
8
8
  | :----------- | :------ | :---------- | :-------------- | :------- |
9
- | PHASE_1 | Lightweight | 2026-05-10 | 01KR46D2M3X9V1T8Z4D7Z2L5K1 | NONE |
9
+ | PHASE_0 | Lightweight | 2026-05-09 | 01KR6EJA6GG3RPS849097KS37Q | NONE |
10
10
 
11
11
  ## PROJECT DEFINITION
12
12
 
13
13
  | Field | Value |
14
14
  | :--- | :--- |
15
- | Project Name | Agent Enderun |
16
- | Platform | Agent skill sandbox / orchestration framework |
17
- | Frontend | React 19 + Vite + Zustand + Panda CSS |
18
- | Backend | Node.js 20+ + Fastify + Kysely |
15
+ | Project Name | agent-enderun |
16
+ | Platform | Not defined |
17
+ | Frontend | React 19 + Vite + UnoCSS |
18
+ | Backend | Node.js 20+ + Fastify |
19
19
  | DB | PostgreSQL |
20
20
 
21
21
  ## DOD STATUS
22
22
 
23
23
  | Phase | Status | Note |
24
24
  | :--- | :--- | :--- |
25
- | PHASE_0 | COMPLETED | Framework baseline 0.0.5 set. |
26
- | PHASE_1 | IN_PROGRESS | Architecture and Contract alignment. |
25
+ | PHASE_0 | IN_PROGRESS | Initializing project structure |
26
+ | PHASE_1 | PENDING | |
27
27
  | PHASE_2 | PENDING | |
28
28
  | PHASE_3 | PENDING | |
29
29
  | PHASE_4 | PENDING | |
30
30
 
31
+ ## CRITICAL DECISIONS
32
+
33
+ | Date | Decision | Rationale | Agent |
34
+ | :--- | :--- | :--- | :--- |
35
+ | 2026-05-09 | Project Initialized | Framework setup via CLI | @manager |
36
+
37
+ ## DELIVERABLES
38
+
39
+ | Module | Status | Agent | Date |
40
+ | :--- | :--- | :--- | :--- |
41
+
31
42
  ## ACTIVE TASKS
32
43
 
33
44
  | Trace ID | Task | Agent | Priority | Status |
34
45
  | :--- | :--- | :--- | :--- | :--- |
35
- | 01KR6BWZT9VHAN8X801RVEX4VT | Testing Framework Trace and Memory Support | @manager | P1 | IN_PROGRESS |
36
- | 01KR46D2M3X9V1T8Z4D7Z2L5K1 | Framework stabilization & Beta launch | @manager | P1 | IN_PROGRESS |
46
+ | 01KRC3WPMGXW2G3A4B0FVABKX0 | Modular Refactoring and Documentation Overhaul | @analyst | P0 | COMPLETE |
47
+ | 01KR6EJA6GG3RPS849097KS37Q | Framework setup and architecture alignment | @manager | P1 | IN_PROGRESS |
37
48
 
38
- ## MILESTONES
49
+ ## HISTORY (Persistent Memory)
39
50
 
40
- | Milestone | Target Date | Status |
41
- | :--- | :--- | :--- |
42
- | PHASE_1 Completion | 2026-05-16 | PENDING |
51
+ ### 2026-05-11 Modular Architecture & Documentation Overhaul
52
+
53
+ - **Agent:** @analyst
54
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
55
+ - **Action:** Refactored the monolithic MCP server (2100+ lines) into a modular structure with dedicated tool categories (codebase, framework, security, memory, contract, academy, messages, git, database, knowledge, repository). Updated root and package READMEs to provide enterprise-grade documentation. Verified build integrity and contract synchronization. Prepared codebase for npm publication.
56
+
57
+ ### 2026-05-11 — Adapter-Specific Onboarding Enabled
58
+
59
+ - **Agent:** @manager
60
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
61
+ - **Action:** Refined 'init' command to support specialized setups for Gemini, Claude, Cursor, and Codex. Added automatic .cursorrules sync for Cursor and MCP instructions for Claude Code. Ensured cross-host compatibility via universal symlinks.
62
+
63
+ ### 2026-05-11 — Database Schema Mapper Activated
64
+
65
+ - **Agent:** @manager
66
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
67
+ - **Action:** Added 'analyze_database_schema' tool to MCP server. This tool autonomously scans backend migration files (e.g., Kysely) to generate Mermaid Entity-Relationship diagrams. This provides the Academy with a visual understanding of the data layer, accelerating legacy codebase onboarding.
68
+
69
+ ### 2026-05-11 — Legacy Codebase Onboarding Activated
43
70
 
44
- ## HISTORY (Recent)
71
+ - **Agent:** @manager
72
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
73
+ - **Action:** Added 'bootstrap_legacy_memory' tool to MCP server. This allows the framework to attach to an already written project, automatically scan the tech stack, directory structure, and dependencies, and bootstrap a detailed PROJECT_MEMORY.md file. Updated Manager and Explorer SOPs to trigger this automatically when memory is missing.
74
+
75
+ ### 2026-05-11 — Academy Strategic Briefing Activated
45
76
 
46
77
  - **Agent:** @manager
47
- - **Action:** Tested memory and logging systems (Success).
48
- - **Trace ID:** 01KR6BWZT9VHAN8X801RVEX4VT
78
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
79
+ - **Action:** Added 'generate_strategic_briefing' tool to MCP server. This tool synthesizes Academy performance, knowledge growth, and collaboration data into high-level reports for the User. Integrated into Analyst SOP as the final executive reporting step.
49
80
 
50
- - **Agent:** @manager\n- **Action:** Retained NPM 'workspace:' protocol sanitization in bin/cli.js to fix EUNSUPPORTEDPROTOCOL.\n- **Action:** Removed bin/enderun-workspace.sh as requested by the user.\n- **Trace ID:** 01KR46D2M3X9V1T8Z4D7Z2L5K1
81
+ ### 2026-05-11 Constitution Compliance Guard Activated
51
82
 
52
- - **Agent:** @manager\n- **Action:** Fixed NPM 'workspace:' protocol incompatibility by adding automatic sanitization in bin/cli.js.\n- **Action:** Implemented bin/enderun-workspace.sh and root 'npm run workspace' for monorepo orchestration.\n- **Trace ID:** 01KR46D2M3X9V1T8Z4D7Z2L5K1
83
+ - **Agent:** @manager
84
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
85
+ - **Action:** Added 'analyze_constitution_compliance' tool to MCP server. This tool enforces core framework rules (Zero UI, Branded Types, Logging Policy) by scanning code patterns. Updated Git agent SOP to mandate this compliance check before every commit, ensuring agents strictly follow the framework's Supreme Law.
53
86
 
54
- ### 2026-05-10Documentation Alignment
87
+ ### 2026-05-11Internal Knowledge Base Activated
55
88
 
56
89
  - **Agent:** @manager
57
- - **Action:** Standardized API documentation path to `.enderun/docs/api` and updated `ENDERUN.md` DoD references.
58
- - **Action:** Added API Registry verification to CLI health check.
59
- - **Trace ID:** 01KR46D2M3X9V1T8Z4D7Z2L5K1
90
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
91
+ - **Action:** Added 'search_knowledge_base' and 'update_knowledge_base' tools to MCP and CLI. Seeded the KB with core principles (Branded Types, Zero UI Library). Updated specialist SOPs to include KB searching in the startup protocol, enabling shared technical memory across the Academy.
60
92
 
61
- ### 2026-05-10Beta Baseline (v0.1.10)
93
+ ### 2026-05-11Visual Architecture Mapping Activated
62
94
 
63
95
  - **Agent:** @manager
64
- - **Action:** Reset project baseline for 0.0.5. Cleaned up history and optimized distribution.
65
- - **Action:** Fixed `npx tsc` conflicts by modernizing build scripts.
66
- - **Decision:** Starting fresh from this point for superior traceability.
67
- - **Action:** Fixed ESM resolution, cleaned up imports, and professionalized package configurations. (Agent: @backend)
68
- - **Trace ID:** 01KR46D2M3X9V1T8Z4D7Z2L5K1
96
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
97
+ - **Action:** Added 'generate_dependency_graph' tool to MCP server. This tool generates Mermaid graphs of module dependencies. Updated Explorer SOP to include visual architecture mapping as a standard research task.
69
98
 
70
- ### 2026-05-10Agent SOP Capability Update
99
+ ### 2026-05-11Automated Progress Reporting Activated
71
100
 
72
101
  - **Agent:** @manager
73
- - **Action:** Expanded agent SOPs with capability growth, self-improvement, and learning feedback guidance.
74
- - **Action:** Added explicit skill enhancement sections to manager, explorer, analyst, backend, frontend, git, mobile, and native agents.
75
- - **Trace ID:** 01KR46D2M3X9V1T8Z4D7Z2L5K1
102
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
103
+ - **Action:** Added 'generate_academy_progress_report' tool to MCP server. This tool provides a narrative overview of milestones, intelligence growth, and recommendations. Updated Analyst SOP to mandate periodic progress reporting, making the Academy self-documenting.
76
104
 
105
+ ### 2026-05-11 — Documentation Debt Scanner Activated
77
106
 
107
+ - **Agent:** @manager
108
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
109
+ - **Action:** Added 'analyze_documentation_debt' tool to MCP server. This tool identifies missing JSDoc, missing READMEs, and incomplete API documentation. Updated Analyst SOP to mandate documentation audits, ensuring high project auditability.
110
+
111
+ ### 2026-05-11 — Pre-Commit QA Guard Activated
112
+
113
+ - **Agent:** @manager
114
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
115
+ - **Action:** Added 'validate_repository_health' tool to MCP server. This tool enforces project-specific lint, test, and build checks before any commit. Updated Git agent SOP to mandate this validation step, ensuring only healthy code enters the history.
116
+
117
+ ### 2026-05-11 — Agent Collaboration System Activated
118
+
119
+ - **Agent:** @manager
120
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
121
+ - **Action:** Added 'send_agent_message' and 'read_agent_messages' tools to MCP server. This enables specialized agents to communicate, share briefings, and coordinate complex tasks autonomously. Updated agent SOPs to include inbox checking in the startup protocol.
122
+
123
+ ### 2026-05-11 — Contract Integrity Shield Activated
124
+
125
+ - **Agent:** @manager
126
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
127
+ - **Action:** Added 'verify_contract_integrity' tool to MCP server. This tool automates the validation of API documentation against shared TypeScript types. Updated Analyst SOP to enforce this check, ensuring zero-drift between docs and code.
78
128
 
79
- ---
80
- _Generated by AI-Enderun Framework v0.1.10 MASTER_
129
+ ### 2026-05-11 — Smart Commit Engine Activated
130
+
131
+ - **Agent:** @manager
132
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
133
+ - **Action:** Added 'generate_semantic_commit_message' tool to MCP server. This tool automates the creation of semantic commit messages by analyzing git diffs. Updated Git agent SOP to mandate its use.
134
+
135
+ ### 2026-05-11 — Codebase Intelligence Activated
136
+
137
+ - **Agent:** @manager
138
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
139
+ - **Action:** Added 'analyze_codebase_intelligence' tool to MCP server. Updated Explorer SOP to include periodic complexity and dead code scans. This allows agents to proactively suggest refactoring.
140
+
141
+ ### 2026-05-11 — Global Performance Auditing Enabled
142
+
143
+ - **Agent:** @manager
144
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
145
+ - **Action:** Added 'get_academy_performance' tool to MCP server. This allows for high-level monitoring of the entire Agent Academy, enabling data-driven SOP refinements and intelligence tracking.
146
+
147
+ ### 2026-05-11 — Automated Continuity Audits Enabled
148
+
149
+ - **Agent:** @manager
150
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
151
+ - **Action:** Added 'analyze_procedural_continuity' tool to MCP server. Updated Analyst SOP to mandate automated style comparison. This enhances the QA gate with structural validation.
152
+
153
+ ### 2026-05-11 — Framework Extension & SOP Synchronization
154
+
155
+ - **Agent:** @manager
156
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
157
+ - **Action:** Added 'get_agent_audit_report' tool to MCP server. Updated all specialist agent SOPs to enforce Zero-Request Logging. Verified framework health after build.
158
+
159
+ ### 2026-05-11 — Agent Academy Refocus
160
+
161
+ - **Agent:** @manager
162
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
163
+ - **Action:** Refocused the framework on agent development. Fixed Manager startup protocol to handle MCP offline status gracefully. Enforced Zero-Request Logging across all SOPs.
164
+
165
+ ### 2026-05-11 — Zero-Request Logging Mode Activated
166
+
167
+ - **Agent:** @manager (Orchestrator)
168
+ - **Trace ID:** 01KRC3WPMGXW2G3A4B0FVABKX0
169
+ - **Action:** Framework constitution updated to mandate automatic logging. Transitioned to PHASE_1 preparation.
170
+
171
+ ### 2026-05-11 — Framework Fix & MCP Activation
172
+
173
+ - **Agent:** @manager
174
+ - **Trace ID:** 01KR6EJA6GG3RPS849097KS37Q
175
+ - **Action:** Fixed MCP server STDOUT noise and missing 'mcp' command. Suppressed CLI header for tool calls to prevent recursion. Verified monorepo and shared-types synchronization. Framework is now healthy and logging is enabled.
176
+
177
+ ### 2026-05-09 — Framework Initialization
178
+
179
+ - **Agent:** @manager
180
+ - **Trace ID:** 01KR6EJA6GG3RPS849097KS37Q
181
+ - **Action:** Initialized Agent Enderun framework and project structure.
@@ -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.1.10 Master
6
+ # Project Analyst & QA Gate — v0.2.0 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
- `{{FRAMEWORK_DIR}}/PROJECT_MEMORY.md` is read at the beginning of every session using the `read_project_memory` tool:
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,7 +28,7 @@ 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 {{FRAMEWORK_DIR}}/PROJECT_MEMORY.lock present? (Check via list_dir or file check)
31
+ 1. Is .enderun/PROJECT_MEMORY.lock present? (Check via list_dir or file check)
32
32
  └─ If yes:
33
33
  a. Check lock age (timestamp).
34
34
  b. If age > 2 minutes: Delete stale lock (Auto-Override).
@@ -65,8 +65,16 @@ When analyzing or preparing documentation, never read the content of a file just
65
65
 
66
66
  In every phase transition and upon request:
67
67
 
68
- 1. Read `{{FRAMEWORK_DIR}}/docs/api/README.md` → Get the endpoint index.
69
- 2. Check each `[domain].md` file:
68
+ 1. Read `.enderun/docs/api/README.md` → Get the endpoint index.
69
+ 2. **Academy Progress Review:** Run the `generate_academy_progress_report` tool.
70
+ - Summarize the key achievements for the user.
71
+ 3. **Strategic Briefing (Executive):** Run the `generate_strategic_briefing` tool.
72
+ - Provide a high-level overview of the Academy's health and strategic direction to the User.
73
+ 4. **Documentation Debt Scan:** Run the `analyze_documentation_debt` tool.
74
+ - If debt is found (missing JSDoc, READMEs), log it as a `PENDING` task in `PROJECT_MEMORY.md`.
75
+ 3. **Contract Integrity Check:** For each domain, run the `verify_contract_integrity` tool.
76
+ - If it reports missing types, mark the task as `FAILED` and notify @backend.
77
+ 3. Check each `[domain].md` file:
70
78
  - **Is the contract complete?** (method, path, auth, request, response, error codes)
71
79
  - **Is the shared-types reference correct?** Does it match `packages/shared-types/src/`?
72
80
  - **Is the date current?** Old contracts can mislead coders.
@@ -78,8 +86,11 @@ In every phase transition and upon request:
78
86
 
79
87
  ## QA Gate Protocol
80
88
 
81
- ### Procedural Continuity Audit
82
- Before approving any task completion, @analyst must verify that the agent followed existing code patterns and did not introduce unnecessary stylistic deviations.
89
+ ### Procedural Continuity Audit (Automated)
90
+ Before approving any task completion, @analyst must verify that the agent followed existing code patterns.
91
+ 1. Identify a "Gold Standard" reference file for the current task's domain.
92
+ 2. Use the `analyze_procedural_continuity` tool to compare the agent's changes with the reference.
93
+ 3. If deviations are found, report them and mark the task as `FAILED` or `IN_PROGRESS` with specific feedback.
83
94
 
84
95
  ### Rejection Status (If Criteria Not Met)
85
96
 
@@ -109,7 +120,7 @@ Before approving any task completion, @analyst must verify that the agent follow
109
120
 
110
121
  - [ ] `shared-types` approved by all parties.
111
122
  - [ ] `contract.version.json` created and hash verified.
112
- - [ ] OpenAPI schema documented under `{{FRAMEWORK_DIR}}/docs/api/`.
123
+ - [ ] OpenAPI schema documented under `.enderun/docs/api/`.
113
124
 
114
125
  **PHASE_2 → PHASE_3:**
115
126
 
@@ -179,11 +190,11 @@ Use the `log_agent_action` tool to record your activities securely.
179
190
 
180
191
  ---
181
192
 
182
- **Agent Completion Report** (v0.1.10)
193
+ **Agent Completion Report** (v0.2.0)
183
194
 
184
195
  - Mock used? [ ] No / [ ] Yes
185
196
  - shared-types changed? [ ] No / [ ] Yes
186
- - **API contract audited? [ ] No / [ ] Yes → {{FRAMEWORK_DIR}}/docs/api/**
197
+ - **API contract audited? [ ] No / [ ] Yes → .enderun/docs/api/**
187
198
  - Log written? [ ] No / [ ] Yes → via log_agent_action tool
188
199
  - Memory updated? [ ] No / [ ] Yes (update_project_memory tool recommended)
189
200
  - Phase transition criteria audited? [ ] 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.1.10 Master
6
+ # Backend Architect — v0.2.0 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
 
@@ -28,11 +28,12 @@ Do not wait for the user to ask for basic professional standards. You are RESPON
28
28
 
29
29
  ## 🔌 SESSION STARTUP PROTOCOL (Mandatory)
30
30
 
31
- 1. Read `{{FRAMEWORK_DIR}}/PROJECT_MEMORY.md` → `CURRENT STATUS`, `ACTIVE TASKS`, and `CRITICAL DECISIONS`.
32
- 2. Check the `{{FRAMEWORK_DIR}}/docs/api/` folder Understand existing contracts, do not create conflicts.
33
- 3. Read `packages/shared-types/src/` Recognize existing types, do not redefine.
31
+ 1. Read `.enderun/PROJECT_MEMORY.md` → `CURRENT STATUS`, `ACTIVE TASKS`, and `CRITICAL DECISIONS`.
32
+ 2. Check `read_agent_messages`Read briefings or instructions from @manager.
33
+ 3. Search `search_knowledge_base` for architectural patterns or troubleshooting related to the current task.
34
+ 4. Check the `.enderun/docs/api/` folder → Understand existing contracts.
34
35
 
35
- > ✅ **End of Session:** Update `{{FRAMEWORK_DIR}}/PROJECT_MEMORY.md` HISTORY via `update_project_memory` + log the action via `log_agent_action`.
36
+ > ✅ **End of Session:** Update `.enderun/PROJECT_MEMORY.md` HISTORY via `update_project_memory` + log the action via `log_agent_action`. Every turn MUST end with an automated log and memory update.
36
37
 
37
38
  ---
38
39
 
@@ -173,12 +174,12 @@ export async function down(db: Kysely<unknown>): Promise<void> {
173
174
 
174
175
  ## 🚨 API CONTRACT WRITING REQUIREMENT (CRITICAL)
175
176
 
176
- **`{{FRAMEWORK_DIR}}/docs/api/` MUST be updated after every new endpoint or change.**
177
+ **`.enderun/docs/api/` MUST be updated after every new endpoint or change.**
177
178
  Frontend works by reading this file. If you don't write it, frontend will work blindly.
178
179
 
179
180
  ### Update Steps
180
181
 
181
- 1. Open `{{FRAMEWORK_DIR}}/docs/api/[domain].md` (create if it doesn't exist).
182
+ 1. Open `.enderun/docs/api/[domain].md` (create if it doesn't exist).
182
183
  2. Document the endpoint using the following template:
183
184
 
184
185
  ````markdown
@@ -202,11 +203,11 @@ Frontend works by reading this file. If you don't write it, frontend will work b
202
203
 
203
204
  ```
204
205
 
205
- 3. Update `{{FRAMEWORK_DIR}}/docs/api/README.md` → endpoint list.
206
+ 3. Update `.enderun/docs/api/README.md` → endpoint list.
206
207
  4. If `shared-types` changed:
207
208
  - Update types in `packages/shared-types/src/`.
208
209
  - Generate a new `contract_hash` and update `contract.version.json` using the `update_contract_hash` tool.
209
- 5. Update `{{FRAMEWORK_DIR}}/PROJECT_MEMORY.md` → `HISTORY` section.
210
+ 5. Update `.enderun/PROJECT_MEMORY.md` → `HISTORY` section.
210
211
 
211
212
  ---
212
213
 
@@ -240,10 +241,10 @@ When `shared-types` changes:
240
241
 
241
242
  ---
242
243
 
243
- **Agent Completion Report** (v0.1.10)
244
+ **Agent Completion Report** (v0.2.0)
244
245
  - Mock used? [ ] No / [ ] Yes
245
246
  - shared-types changed? [ ] No / [ ] Yes → contract.version updated
246
- - **API contract written? [ ] No / [ ] Yes → {{FRAMEWORK_DIR}}/docs/api/[domain].md**
247
+ - **API contract written? [ ] No / [ ] Yes → .enderun/docs/api/[domain].md**
247
248
  - **Procedural Continuity applied? [ ] No / [ ] Yes**
248
249
  - Log written? [ ] No / [ ] Yes → via log_agent_action tool
249
250
  - **PROJECT_MEMORY HISTORY updated? [ ] No / [ ] Yes**