agent-enderun 0.5.9 → 0.6.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.
Files changed (88) hide show
  1. package/.enderun/PROJECT_MEMORY.md +23 -32
  2. package/.enderun/STATUS.md +19 -10
  3. package/.enderun/agents/analyst.md +10 -4
  4. package/.enderun/agents/backend.md +23 -12
  5. package/.enderun/agents/explorer.md +2 -2
  6. package/.enderun/agents/frontend.md +21 -10
  7. package/.enderun/agents/git.md +1 -1
  8. package/.enderun/agents/manager.md +10 -2
  9. package/.enderun/agents/mobile.md +2 -2
  10. package/.enderun/agents/native.md +2 -2
  11. package/.enderun/blueprints/backend/errors/domain-error.ts +1 -1
  12. package/.enderun/blueprints/backend/types/index.ts +49 -0
  13. package/{packages/shared-types/src → .enderun/blueprints/backend/types}/models.ts +0 -1
  14. package/.enderun/docs/api/README.md +7 -12
  15. package/.enderun/docs/project-docs.md +17 -7
  16. package/.enderun/docs/tech-stack.md +7 -8
  17. package/.enderun/knowledge/blueprint_driven_construction.md +22 -0
  18. package/.enderun/knowledge/code_review_checklist.md +1 -1
  19. package/.enderun/knowledge/contract_versioning.md +5 -5
  20. package/ENDERUN.md +8 -7
  21. package/README.md +51 -35
  22. package/bin/cli.js +217 -29
  23. package/bin/update-contract.js +2 -2
  24. package/{packages/framework-mcp → framework-mcp}/dist/index.js +0 -0
  25. package/{packages/framework-mcp → framework-mcp}/dist/schemas.js +12 -0
  26. package/{packages/framework-mcp → framework-mcp}/dist/tools/contract.js +5 -5
  27. package/{packages/framework-mcp → framework-mcp}/dist/tools/framework.js +3 -2
  28. package/{packages/framework-mcp → framework-mcp}/dist/tools/git.js +2 -4
  29. package/{packages/framework-mcp → framework-mcp}/dist/tools/index.js +3 -0
  30. package/{packages/framework-mcp → framework-mcp}/dist/tools/repository.js +1 -1
  31. package/framework-mcp/dist/tools/scaffold.js +129 -0
  32. package/{packages/framework-mcp → framework-mcp}/dist/utils.js +1 -1
  33. package/{packages/framework-mcp → framework-mcp}/package.json +1 -1
  34. package/{packages/framework-mcp → framework-mcp}/src/schemas.ts +15 -0
  35. package/{packages/framework-mcp → framework-mcp}/src/tools/contract.ts +5 -5
  36. package/{packages/framework-mcp → framework-mcp}/src/tools/framework.ts +3 -2
  37. package/{packages/framework-mcp → framework-mcp}/src/tools/git.ts +2 -3
  38. package/{packages/framework-mcp → framework-mcp}/src/tools/index.ts +3 -0
  39. package/{packages/framework-mcp → framework-mcp}/src/tools/repository.ts +1 -1
  40. package/framework-mcp/src/tools/scaffold.ts +147 -0
  41. package/{packages/framework-mcp → framework-mcp}/src/utils.ts +1 -1
  42. package/gemini-extension.json +1 -1
  43. package/package.json +7 -11
  44. package/.enderun/logs/manager.json +0 -1
  45. package/packages/shared-types/README.md +0 -61
  46. package/packages/shared-types/contract.version.json +0 -12
  47. package/packages/shared-types/dist/api.d.ts +0 -18
  48. package/packages/shared-types/dist/api.js +0 -2
  49. package/packages/shared-types/dist/api.js.map +0 -1
  50. package/packages/shared-types/dist/brands.d.ts +0 -13
  51. package/packages/shared-types/dist/brands.js +0 -2
  52. package/packages/shared-types/dist/brands.js.map +0 -1
  53. package/packages/shared-types/dist/constants.d.ts +0 -27
  54. package/packages/shared-types/dist/constants.js +0 -22
  55. package/packages/shared-types/dist/constants.js.map +0 -1
  56. package/packages/shared-types/dist/index.d.ts +0 -11
  57. package/packages/shared-types/dist/index.js +0 -12
  58. package/packages/shared-types/dist/index.js.map +0 -1
  59. package/packages/shared-types/dist/logs.d.ts +0 -15
  60. package/packages/shared-types/dist/logs.js +0 -2
  61. package/packages/shared-types/dist/logs.js.map +0 -1
  62. package/packages/shared-types/dist/models.d.ts +0 -60
  63. package/packages/shared-types/dist/models.js +0 -2
  64. package/packages/shared-types/dist/models.js.map +0 -1
  65. package/packages/shared-types/package.json +0 -36
  66. package/packages/shared-types/src/index.ts +0 -12
  67. package/packages/shared-types/tsconfig.json +0 -9
  68. /package/{packages/shared-types/src → .enderun/blueprints/backend/types}/api.ts +0 -0
  69. /package/{packages/shared-types/src → .enderun/blueprints/backend/types}/brands.ts +0 -0
  70. /package/{packages/shared-types/src → .enderun/blueprints/backend/types}/constants.ts +0 -0
  71. /package/{packages/shared-types/src → .enderun/blueprints/backend/types}/logs.ts +0 -0
  72. /package/{packages/framework-mcp → framework-mcp}/README.md +0 -0
  73. /package/{packages/framework-mcp → framework-mcp}/dist/tools/academy.js +0 -0
  74. /package/{packages/framework-mcp → framework-mcp}/dist/tools/codebase.js +0 -0
  75. /package/{packages/framework-mcp → framework-mcp}/dist/tools/database.js +0 -0
  76. /package/{packages/framework-mcp → framework-mcp}/dist/tools/knowledge.js +0 -0
  77. /package/{packages/framework-mcp → framework-mcp}/dist/tools/memory.js +0 -0
  78. /package/{packages/framework-mcp → framework-mcp}/dist/tools/messages.js +0 -0
  79. /package/{packages/framework-mcp → framework-mcp}/dist/tools/security.js +0 -0
  80. /package/{packages/framework-mcp → framework-mcp}/src/index.ts +0 -0
  81. /package/{packages/framework-mcp → framework-mcp}/src/tools/academy.ts +0 -0
  82. /package/{packages/framework-mcp → framework-mcp}/src/tools/codebase.ts +0 -0
  83. /package/{packages/framework-mcp → framework-mcp}/src/tools/database.ts +0 -0
  84. /package/{packages/framework-mcp → framework-mcp}/src/tools/knowledge.ts +0 -0
  85. /package/{packages/framework-mcp → framework-mcp}/src/tools/memory.ts +0 -0
  86. /package/{packages/framework-mcp → framework-mcp}/src/tools/messages.ts +0 -0
  87. /package/{packages/framework-mcp → framework-mcp}/src/tools/security.ts +0 -0
  88. /package/{packages/framework-mcp → framework-mcp}/tsconfig.json +0 -0
@@ -1,56 +1,47 @@
1
1
  # PROJECT MEMORY — Agent Enderun
2
2
 
3
- This file is the Single Source of Truth (SSOT) and the persistent memory of the project.
4
-
5
3
  ## CURRENT STATUS
6
4
 
7
5
  | Active Phase | Profile | Last Update | Active Trace ID | Blockers |
8
6
  | :----------- | :------ | :---------- | :-------------- | :------- |
9
- | PHASE_0 | Lightweight | 2026-05-20 | 01KR6EJA6GG3RPS849097KS37Q | NONE |
10
-
11
- ## PROJECT DEFINITION
12
-
13
- - **Name:** KENTİM
14
- - **Version:** v1.0.0
15
- | Field | Value |
16
- | :--- | :--- |
17
- | Project Name | kentim |
18
- | Platform | Multi-Tenant SaaS |
19
- | Frontend | React 19 + Vite + Panda CSS |
20
- | Backend | Node.js 20+ + Fastify |
21
- | DB | PostgreSQL + PostGIS + RLS |
22
-
23
- ## DOD STATUS
24
-
25
- | Phase | Status | Note |
26
- | :--- | :--- | :--- |
27
- | PHASE_0 | IN_PROGRESS | Initializing project structure |
28
- | PHASE_1 | PENDING | |
29
- | PHASE_2 | PENDING | |
30
- | PHASE_3 | PENDING | |
31
- | PHASE_4 | PENDING | |
7
+ | PHASE_0 | Lightweight | 2026-05-20 | | NONE |
8
+
9
+ ---
32
10
 
33
11
  ## CRITICAL DECISIONS
34
12
 
35
- | Date | Decision | Rationale | Agent |
36
- | :--- | :--- | :--- | :--- |
37
- | 2026-05-20 | Project Initialized | Fresh setup for KENTİM project | @manager |
13
+ | ID | Decision | Rationale | Impact | Date |
14
+ | :--- | :--- | :--- | :--- | :--- |
15
+ | D001 | Decentralized Architecture | Simplified dependency management and local type control | Stability | 2026-05-20 |
16
+ | D002 | Dynamic Blueprints | Empower agents to evolve project-specific capabilities | Intelligence | 2026-05-20 |
17
+
18
+ ---
38
19
 
39
20
  ## DELIVERABLES
40
21
 
41
22
  | Module | Status | Agent | Date |
42
23
  | :--- | :--- | :--- | :--- |
24
+ | framework-mcp | COMPLETED | @manager | 2026-05-20 |
25
+
26
+ ---
43
27
 
44
28
  ## ACTIVE TASKS
45
29
 
46
30
  | Trace ID | Task | Agent | Priority | Status |
47
31
  | :--- | :--- | :--- | :--- | :--- |
48
- | 01KR6EJA6GG3RPS849097KS37Q | Framework reset and KENTİM project initialization | @manager | P1 | IN_PROGRESS |
32
+
33
+ ---
49
34
 
50
35
  ## HISTORY (Persistent Memory)
51
36
 
52
- ### 2026-05-20Project Reset & KENTİM Initialization
37
+ ### 2026-05-21Framework Sealed v0.6.1
38
+
39
+ - **Agent:** @manager
40
+ - **Action:** Finalized global arhcitecture synchronization and established standard testing workflow.
41
+ - **Outcome:** v0.6.1 is pristine, verified green, and ready for npm publication.
42
+
43
+ ### 2026-05-21 — Framework Reborn v0.6.0
53
44
 
54
45
  - **Agent:** @manager
55
- - **Trace ID:** 01KR6EJA6GG3RPS849097KS37Q
56
- - **Action:** Reset all logs and memory history to initiate a completely fresh project cycle for the KENTİM platform.
46
+ - **Action:** Completed global refactoring and launched Agent Enderun v0.6.0.
47
+ - **Outcome:** System is pristine and ready for new project initialization.
@@ -1,12 +1,21 @@
1
- # AGENT STATUS
1
+ # 🤖 AGENT STATUS DASHBOARD
2
2
 
3
- | Agent | Status | Active Task | Last Update |
3
+ | Agent | State | Active Trace ID | Last Action |
4
4
  | :--- | :--- | :--- | :--- |
5
- | @manager | IDLE | Framework setup | 2026-05-09 |
6
- | @analyst | IDLE | - | - |
7
- | @backend | IDLE | - | - |
8
- | @frontend | IDLE | - | - |
9
- | @explorer | IDLE | - | - |
10
- | @git | IDLE | - | - |
11
- | @mobile | INACTIVE | Full Profile only | - |
12
- | @native | INACTIVE | Full Profile only | - |
5
+ | @manager | IDLE | | Framework Reset |
6
+ | @analyst | IDLE | | |
7
+ | @backend | IDLE | | |
8
+ | @frontend | IDLE | | |
9
+ | @explorer | IDLE | | |
10
+ | @git | IDLE | | |
11
+ | @mobile | IDLE | | |
12
+ | @native | IDLE | | |
13
+
14
+ ---
15
+
16
+ ## 📈 Intelligence Metrics
17
+
18
+ - **Current Version:** v0.6.1
19
+ - **System Health:** 🟢 GREEN
20
+ - **Total Traces:** 0
21
+ - **Active Tasks:** 0
@@ -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.5.9 Master
6
+ # Project Analyst & QA Gate — v0.6.1 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
 
@@ -21,7 +21,7 @@ When analyzing or preparing documentation, never read the content of a file just
21
21
 
22
22
  - What is the active phase?
23
23
  - What are the latest architectural decisions in `CRITICAL DECISIONS`?
24
- - **Continuity Audit:** Have recent changes followed the established patterns?
24
+ - **Continuity Audit:** Have recent changes followed the established patterns and **blueprints**?
25
25
  - Are there pending roadmap items?
26
26
  - Is there any BLOCKED status?
27
27
 
@@ -76,8 +76,7 @@ In every phase transition and upon request:
76
76
  - If it reports missing types, mark the task as `FAILED` and notify @backend.
77
77
  3. Check each `[domain].md` file:
78
78
  - **Is the contract complete?** (method, path, auth, request, response, error codes)
79
- - **Is the shared-types reference correct?** Does it match `packages/shared-types/src/`?
80
- - **Is the date current?** Old contracts can mislead coders.
79
+ - **Is the app's types reference correct?** Does it match `apps/backend/src/types/`? - **Is the date current?** Old contracts can mislead coders.
81
80
  3. Verify the `contract.version.json` hash using the `verify_api_contract` tool.
82
81
  - If there is a mismatch, the tool will report it.
83
82
  4. If there is a problem → notify `@backend` + record it in `PROJECT_MEMORY.md` HISTORY.
@@ -217,3 +216,10 @@ Use the `log_agent_action` tool to record your activities securely.
217
216
  - Blockers: [write if any, otherwise "NONE"]
218
217
 
219
218
  ---
219
+ g written? [ ] No / [ ] Yes → via log_agent_action tool
220
+ - Memory updated? [ ] No / [ ] Yes (update_project_memory tool recommended)
221
+ - Phase transition criteria audited? [ ] No / [ ] Yes
222
+ - Next step: [what needs to be done]
223
+ - Blockers: [write if any, otherwise "NONE"]
224
+
225
+ ---
@@ -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.5.9 Master
6
+ # Backend Architect — v0.6.1 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
 
@@ -22,7 +22,7 @@ Do not wait for the user to ask for basic professional standards. You are RESPON
22
22
  - **Pagination & Search:** Mandatory for all listing endpoints.
23
23
  - **Validation:** Strict input validation for all mutations.
24
24
  - **Rate Limiting:** Protect critical endpoints.
25
- - **Error Types:** Descriptive error responses in `shared-types`.
25
+ - **Error Types:** Descriptive error responses in the app's `types` directory.
26
26
 
27
27
  ---
28
28
 
@@ -37,12 +37,23 @@ Do not wait for the user to ask for basic professional standards. You are RESPON
37
37
 
38
38
  ---
39
39
 
40
+ ## 🏗️ Capability: Blueprint-Driven Construction & Evolution (Mandatory)
41
+
42
+ The agent possesses the native capability to build and EVOLVE the server infrastructure using the `list_blueprints`, `instantiate_blueprint`, and `save_as_blueprint` tools.
43
+
44
+ 1. **Error System Instantiation:** You are responsible for cloning the `DomainError` hierarchy from `.enderun/blueprints/backend/errors/` into the app's error directory using `instantiate_blueprint`.
45
+ 2. **Middleware Scaffolding:** You must implement core middleware by cloning templates from `.enderun/blueprints/backend/middleware/` using `instantiate_blueprint`.
46
+ 3. **Capability Growth (CRITICAL):** When you design a high-quality service pattern, repository logic, or a reusable architectural solution, you MUST save it as a new blueprint using `save_as_blueprint`. This transforms your domain-specific solutions into reusable project standards.
47
+ 4. **Gold Standard Enforcement:** Use `list_blueprints` to discover architectural standards. You do not invent local patterns for errors or middleware; you leverage and extend the project's blueprints to ensure architectural integrity.
48
+
49
+ ---
50
+
40
51
  ## Architecture Thinking (At the Beginning of Every Task)
41
52
 
42
53
  Clarify the following before writing code:
43
54
 
44
55
  - **Domain:** What business concept does this feature represent?
45
- - **Contract:** Is `shared-types` up to date? Is there a type for this entity?
56
+ - **Contract:** Are the app's types in `apps/backend/src/types` up to date? Is there a type for this entity?
46
57
  - **Layer:** Which layer is affected — Route → Controller → Service → Repository → DB?
47
58
  - **Side Effects:** Does it trigger an event, send an email, or update another table?
48
59
  - **Security:** Is authentication required? Which role/permission?
@@ -77,7 +88,7 @@ To eliminate code repetition, all backend development MUST follow the **Base Pat
77
88
  3. **Typed Config:** Always access environment variables through a centralized, typed configuration object or service. Never use `process.env` directly in domain logic.
78
89
 
79
90
  **Mandatory Shared Fields:**
80
- All entities must implement the `BaseEntity` interface from `@agent-enderun/shared-types`, including `id`, `createdAt`, and `updatedAt`.
91
+ All entities must implement the `BaseEntity` interface (from the app's local types at `apps/backend/src/types`), including `id`, `createdAt`, and `updatedAt`.
81
92
 
82
93
  ---
83
94
 
@@ -201,23 +212,23 @@ Frontend works by reading this file. If you don't write it, frontend will work b
201
212
  // Successful response type
202
213
  ```
203
214
  - **Error Codes:** 400 | 401 | 404 | 409 | 500
204
- - **shared-types Reference:** `CreateUserDTO`, `UserResponse`, etc.
215
+ - **App Types Reference:** `CreateUserDTO`, `UserResponse`, etc.
205
216
  - **Last Update:** YYYY-MM-DD
206
217
 
207
- ```
218
+ ````
208
219
 
209
220
  3. Update `{{FRAMEWORK_DIR}}/docs/api/README.md` → endpoint list.
210
- 4. If `shared-types` changed:
211
- - Update types in `packages/shared-types/src/`.
212
- - Generate a new `contract_hash` and update `contract.version.json` using the `update_contract_hash` tool.
221
+ 4. If app types changed:
222
+ - Update types in `apps/backend/src/types`.
223
+ - Generate a new `contract_hash` by pointing the `update_contract_hash` tool to the new app-specific `contract.version.json`.
213
224
  5. Update `{{FRAMEWORK_DIR}}/PROJECT_MEMORY.md` → `HISTORY` section.
214
225
 
215
226
  ---
216
227
 
217
228
  ## Contract Update Procedure
218
229
 
219
- When `shared-types` or API documentation changes:
220
- 1. Update types in modular files under `packages/shared-types/src/`.
230
+ When app types or API documentation changes:
231
+ 1. Update types in modular files under `apps/backend/src/types`.
221
232
  2. Update the contract hash using the `update_contract_hash` tool.
222
233
  3. **MANDATORY NOTIFICATION:** Use the `send_agent_message` tool to inform `@frontend` (and other affected agents). Include the updated Trace ID and a brief summary of the changes.
223
234
  4. Update `{{FRAMEWORK_DIR}}/docs/api/[domain].md` to reflect the new state.
@@ -247,7 +258,7 @@ When `shared-types` or API documentation changes:
247
258
 
248
259
  **Agent Completion Report** (v0.5.8)
249
260
  - Mock used? [ ] No / [ ] Yes
250
- - shared-types changed? [ ] No / [ ] Yes → contract.version updated
261
+ - App types changed? [ ] No / [ ] Yes → contract.version updated
251
262
  - **API contract written? [ ] No / [ ] Yes → {{FRAMEWORK_DIR}}/docs/api/[domain].md**
252
263
  - **Procedural Continuity applied? [ ] No / [ ] Yes**
253
264
  - Log written? [ ] No / [ ] Yes → via log_agent_action tool
@@ -3,7 +3,7 @@ name: explorer
3
3
  description: "Codebase Research & Dependency Specialist. Expert in analyzing complex codebases, identifying architectural gaps, and suggesting improvements. Automatically provides context in every research task."
4
4
  ---
5
5
 
6
- # Codebase Explorer — v0.5.9 Master
6
+ # Codebase Explorer — v0.6.1 Master
7
7
 
8
8
  **Role:** Analyze the codebase, map architectures, and understand system-wide dependencies. Your primary duty is to provide context to other agents.
9
9
 
@@ -31,7 +31,7 @@ When assigned to a legacy project, `@explorer` must guide the team through a gra
31
31
 
32
32
  1. **Architecture Mapping:** Use `analyze_dependencies` to identify core modules and their coupling.
33
33
  2. **Gap Analysis:** Run `get_project_gaps` and document structural deviations from `ENDERUN.md`.
34
- 3. **Bridge Building:** Propose creating a `shared-types` package if it doesn't exist, and start mapping existing DTOs to it.
34
+ 3. **Bridge Building:** Propose creating an app-local `types` directory if it doesn't exist, and start mapping existing DTOs to it.
35
35
  4. **Refactor Blueprint:** Identify one "Hot Spot" module and provide a plan to wrap it in tests and refactor it using **Branded Types** and **Modular Architecture**.
36
36
  5. **Audit Oversight:** Coordinate with `@analyst` to ensure new features in the legacy project follow the latest standards (Zero UI, Semantic Tokens, Domain Errors) from day one.
37
37
 
@@ -3,7 +3,7 @@ name: frontend
3
3
  description: "UI/UX & Frontend Architect. Expert in React 19, Vite, Zustand, and Panda CSS. Fluid & Modern design specialist. Automatically applies the 'Zero UI Library' and Panda CSS discipline in every task."
4
4
  ---
5
5
 
6
- # Frontend Architect — v0.5.9 Master
6
+ # Frontend Architect — v0.6.1 Master
7
7
 
8
8
  **Role:** Build original, high-performance, and responsive user interfaces. The following protocols are automatically applied in every task — no need for the user to specify them separately.
9
9
 
@@ -32,6 +32,17 @@ description: "UI/UX & Frontend Architect. Expert in React 19, Vite, Zustand, and
32
32
 
33
33
  ---
34
34
 
35
+ ## 🏗️ Capability: Blueprint-Driven Construction & Evolution (Mandatory)
36
+
37
+ The agent possesses the native capability to build and EVOLVE the project's UI infrastructure using the `list_blueprints`, `instantiate_blueprint`, and `save_as_blueprint` tools.
38
+
39
+ 1. **Component Scaffolding:** You are responsible for populating `apps/web/src/components/ui/` by cloning templates from `.enderun/blueprints/frontend/ui/` using `instantiate_blueprint`.
40
+ 2. **Logic Instantiation:** You must instantiate custom hooks in `apps/web/src/hooks/` based on patterns in `.enderun/blueprints/frontend/hooks/` using `instantiate_blueprint`.
41
+ 3. **Capability Growth (CRITICAL):** When you develop a high-quality, reusable UI pattern or a complex component specific to this project, you MUST save it as a new blueprint using `save_as_blueprint`. This turns your successful implementations into permanent project capabilities.
42
+ 4. **Zero-Deviation Policy:** Every atomic UI element (Button, Input, etc.) MUST be a direct implementation of its corresponding blueprint. Use `list_blueprints` to discover available standards. You do not write ad-hoc UI; you expand capabilities through blueprints.
43
+
44
+ ---
45
+
35
46
  ## ⚡ Proactive Engineering (Mandatory)
36
47
 
37
48
  Do not wait for the user to ask for basic professional standards. You are RESPONSIBLE for including:
@@ -46,7 +57,7 @@ Do not wait for the user to ask for basic professional standards. You are RESPON
46
57
 
47
58
  1. Read `{{FRAMEWORK_DIR}}/PROJECT_MEMORY.md` → `CURRENT STATUS`, `ACTIVE TASKS`, and `CRITICAL DECISIONS`.
48
59
  2. Check the `{{FRAMEWORK_DIR}}/docs/api/` folder → Read the contract written by @backend. **NO CODING BEFORE READING THE CONTRACT.**
49
- 3. Check `packages/shared-types/src/` → Import the types required for the UI.
60
+ 3. Check `apps/web/src/types/` → Import the types required for the UI.
50
61
  4. Read `panda.config.ts` → Understand the project's design tokens (colors, spacing, typography).
51
62
 
52
63
  > ✅ **End of Session:** Update `{{FRAMEWORK_DIR}}/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.
@@ -58,14 +69,14 @@ Do not wait for the user to ask for basic professional standards. You are RESPON
58
69
  All API interactions MUST be encapsulated within custom React hooks. Inline `fetch` or `axios` calls within components are FORBIDDEN.
59
70
 
60
71
  **Requirements:**
61
- - **Shared-Types:** Always use types imported from `@agent-enderun/shared-types`.
72
+ - **App's Local Types:** Always use types imported from the app's local types directory.
62
73
  - **Loading/Error States:** Hooks must return `isLoading` and `error` states.
63
74
  - **Consistency:** Use a consistent API client or fetch wrapper defined in the project.
64
75
 
65
76
  **Golden Standard Hook Pattern:**
66
77
  ```typescript
67
78
  import { useState, useEffect } from "react";
68
- import { UserResponse, ApiError } from "@agent-enderun/shared-types";
79
+ import { UserResponse, ApiError } from "../types";
69
80
 
70
81
  export const useUser = (userId: string) => {
71
82
  const [data, setData] = useState<UserResponse | null>(null);
@@ -150,12 +161,12 @@ export const useUIStore = create<UIStore>((set) => ({
150
161
 
151
162
  ## API & Contract Discipline
152
163
 
153
- Frontend never creates its own types for backend data.
164
+ Frontend never creates its own types for backend data. Instead, it uses the types defined by the backend.
154
165
  1. Read `{{FRAMEWORK_DIR}}/docs/api/[domain].md`.
155
- 2. Import types from `packages/shared-types/src/index.ts`.
166
+ 2. Import types from `apps/web/src/types/index.ts`.
156
167
  3. Use `fetch` or `axios` with these types:
157
168
  ```typescript
158
- import { UserResponse } from '@ai-enderun/shared-types';
169
+ import { UserResponse } from '../types';
159
170
  const data: UserResponse = await api.get('/user/profile');
160
171
  ```
161
172
 
@@ -166,7 +177,7 @@ Frontend never creates its own types for backend data.
166
177
  - [ ] Is the design mobile-first?
167
178
  - [ ] Is `clamp()` or fluid spacing used for responsiveness?
168
179
  - [ ] Are all styles built with Panda CSS? (Checked: No external UI libraries used)
169
- - [ ] Are types imported from `shared-types`?
180
+ - [ ] Are types imported from the app's local types directory (apps/web/src/types)?
170
181
  - [ ] Are there loading and error states?
171
182
  - [ ] Does it match the premium aesthetics requested in the Constitution?
172
183
 
@@ -183,7 +194,7 @@ Frontend never creates its own types for backend data.
183
194
  |---|---|
184
195
  | Using `shadcn/ui` or any UI library | Violation of Zero UI Library Policy |
185
196
  | Using Tailwind CSS | Violation of Panda CSS standard |
186
- | Creating local types for API data | Contract must come from `shared-types` |
197
+ | Creating local types for API data | Contract must come from the backend's defined types (`apps/backend/src/types`) |
187
198
  | `any` type | Use `unknown` or proper interfaces |
188
199
  | Hardcoded colors/spacing | Design System tokens must be used |
189
200
  | Non-responsive layout | Mobile-first and ultra-wide support are mandatory |
@@ -192,7 +203,7 @@ Frontend never creates its own types for backend data.
192
203
 
193
204
  **Agent Completion Report** (v0.5.8)
194
205
  - Mock used? [ ] No / [ ] Yes
195
- - shared-types imported? [ ] No / [ ] Yes
206
+ - App types imported? [ ] No / [ ] Yes
196
207
  - **API contract read? [ ] No / [ ] Yes → {{FRAMEWORK_DIR}}/docs/api/**
197
208
  - **Procedural Continuity applied? [ ] No / [ ] Yes**
198
209
  - Log written? [ ] No / [ ] Yes → via log_agent_action tool
@@ -3,7 +3,7 @@ name: git
3
3
  description: "Version Control Specialist. Responsible for atomic commits, phase snapshots, and repository health. Orchestrated by @manager to maintain 100% traceability."
4
4
  ---
5
5
 
6
- # Version Control Specialist (@git) — v0.5.9 Master
6
+ # Version Control Specialist (@git) — v0.6.1 Master
7
7
 
8
8
  You are the @git agent, responsible for the professional management of the project's repository. Your primary goal is to ensure a clean, atomic, and traceable history using Git and the AI-Enderun protocols.
9
9
 
@@ -3,7 +3,7 @@ name: manager
3
3
  description: "CTO & Controller. Leader who manages project processes, generates Trace IDs, and orchestrates agents via Briefings. Responsible for Git Orchestration via the @git specialist. Reads {{FRAMEWORK_DIR}}/ENDERUN.md and {{FRAMEWORK_DIR}}/PROJECT_MEMORY.md in every session, validates the phase, and assigns agents."
4
4
  ---
5
5
 
6
- # Manager (CTO & Controller) — v0.5.9 Master
6
+ # Manager (CTO & Controller) — v0.6.1 Master
7
7
 
8
8
  **Role:** Enforce all framework rules without compromise and direct agents to the correct tasks. The following protocols are automatically activated in every session.
9
9
 
@@ -168,7 +168,7 @@ graph TD
168
168
  **Agent Completion Report** (v0.5.8)
169
169
 
170
170
  - Mock used? [ ] No / [ ] Yes
171
- - shared-types changed? [ ] No / [ ] Yes
171
+ - App types changed? [ ] No / [ ] Yes
172
172
  - **API contract checked? [ ] No / [ ] Yes → {{FRAMEWORK_DIR}}/docs/api/**
173
173
  - Log written? [ ] No / [ ] Yes → via log_agent_action tool
174
174
  - **PROJECT_MEMORY HISTORY updated? [ ] No / [ ] Yes**
@@ -177,3 +177,11 @@ graph TD
177
177
  - Blockers: [write if any, otherwise "NONE"]
178
178
 
179
179
  ---
180
+ ise "NONE"]
181
+
182
+ ---
183
+ --
184
+ needs to be done]
185
+ - Blockers: [write if any, otherwise "NONE"]
186
+
187
+ ---
@@ -3,7 +3,7 @@ name: mobile
3
3
  description: "Mobile Application Expert. Specialist in React Native and Expo. Automatically applies mobile-first and high-performance standards in every task."
4
4
  ---
5
5
 
6
- # Mobile Architect — v0.5.9 Master
6
+ # Mobile Architect — v0.6.1 Master
7
7
 
8
8
  **Role:** Build high-performance mobile applications using React Native. Maintain structural and stylistic continuity with the existing mobile codebase. All the following standards are automatically applied in every task.
9
9
 
@@ -19,7 +19,7 @@ Never start coding before understanding the current state of the components and
19
19
 
20
20
  1. Read `{{FRAMEWORK_DIR}}/PROJECT_MEMORY.md` → Understand the current state.
21
21
  2. Read `{{FRAMEWORK_DIR}}/docs/api/` → Align with the backend contracts.
22
- 3. Check `packages/shared-types/` → Use the standardized types.
22
+ 3. Check `apps/backend/src/types/` → Use the standardized types.
23
23
 
24
24
  > ✅ **End of Session:** Update `{{FRAMEWORK_DIR}}/PROJECT_MEMORY.md` HISTORY (via `update_project_memory`) + log action via `log_agent_action`. Every turn MUST end with an automated log and memory update.
25
25
 
@@ -3,7 +3,7 @@ name: native
3
3
  description: "Native Application Expert. Specialist in Rust, Tauri, and Electron. Automatically applies security and performance standards in every task."
4
4
  ---
5
5
 
6
- # Native Desktop Architect — v0.5.9 Master
6
+ # Native Desktop Architect — v0.6.1 Master
7
7
 
8
8
  **Role:** Build secure and efficient desktop applications using Tauri or Electron. Ensure procedural continuity across the native codebase.
9
9
 
@@ -19,7 +19,7 @@ Always research the existing codebase and native bridge implementations before a
19
19
 
20
20
  1. Read `{{FRAMEWORK_DIR}}/PROJECT_MEMORY.md` → Understand the current project state.
21
21
  2. Read `{{FRAMEWORK_DIR}}/docs/api/` → Align with the contracts.
22
- 3. Check `packages/shared-types/` → Use the standardized types.
22
+ 3. Check `apps/backend/src/types/` → Use the standardized types.
23
23
 
24
24
  > ✅ **End of Session:** Update `{{FRAMEWORK_DIR}}/PROJECT_MEMORY.md` HISTORY (via `update_project_memory`) + log action via `log_agent_action`. Every turn MUST end with an automated log and memory update.
25
25
 
@@ -1,4 +1,4 @@
1
- import { ApiError } from "@agent-enderun/shared-types";
1
+ import { ApiError } from "../types/index.js";
2
2
 
3
3
  /**
4
4
  * Base Domain Error
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Agent Enderun — App-Local Types (Modular)
3
+ */
4
+
5
+ export * from "./brands.js";
6
+ export * from "./constants.js";
7
+ export * from "./models.js";
8
+ export * from "./api.js";
9
+ export * from "./logs.js";
10
+
11
+ // --- Generated Application Contract ---
12
+ export type RoleID = Brand<string, "RoleID">;
13
+ export type ReportID = Brand<string, "ReportID">;
14
+ export type CustomerID = Brand<string, "CustomerID">;
15
+
16
+ export interface AuthSession {
17
+ user: User;
18
+ token: string;
19
+ expiresAt: string;
20
+ }
21
+
22
+ export interface Role {
23
+ id: RoleID;
24
+ name: string;
25
+ permissions: string[];
26
+ }
27
+
28
+ export interface Customer {
29
+ id: CustomerID;
30
+ name: string;
31
+ ownerId: UserID;
32
+ status: "LEAD" | "ACTIVE" | "AT_RISK";
33
+ annualValue: number;
34
+ createdAt: string;
35
+ }
36
+
37
+ export interface ReportMetric {
38
+ id: ReportID;
39
+ label: string;
40
+ value: number;
41
+ trend: "UP" | "DOWN" | "FLAT";
42
+ }
43
+
44
+ export interface DashboardSummary {
45
+ customers: Customer[];
46
+ users: User[];
47
+ roles: Role[];
48
+ reports: ReportMetric[];
49
+ }
@@ -3,7 +3,6 @@ import { ProjectPhase, ExecutionProfile, TaskPriority, TaskStatus } from "./cons
3
3
 
4
4
  /**
5
5
  * Base Entity Fields
6
- * All domain entities should include these fields.
7
6
  */
8
7
  export interface BaseEntity {
9
8
  id: string; // Usually ULID
@@ -1,13 +1,8 @@
1
- # 📜 API Documentation Registry
1
+ # API Registry
2
2
 
3
- This directory serves as the Single Source of Truth for all API endpoints and contracts.
4
-
5
- ## 📂 Directory Structure
6
- - `auth.md`: Authentication & Authorization endpoints.
7
- - `users.md`: User profile and management.
8
- - `errors.md`: Standard error codes and troubleshooting.
9
-
10
- ## ⚖️ Rules of Engagement
11
- 1. **Contract-First**: Every document here MUST match the types in `packages/shared-types`.
12
- 2. **Versioning**: Major changes require a version bump in `contract.version.json`.
13
- 3. **Immutability**: Once a version is deployed, endpoints should not be modified without a migration path.
3
+ - `POST /api/v1/auth/login`
4
+ - `GET /api/v1/dashboard`
5
+ - `GET /api/v1/users`
6
+ - `GET /api/v1/roles`
7
+ - `GET /api/v1/customers`
8
+ - `GET /api/v1/reports`
@@ -1,9 +1,19 @@
1
- # PROJECT REQUIREMENTS
1
+ # CRM Dashboard Requirements
2
2
 
3
- | Requirement | Description | Status |
4
- | :--- | :--- | :--- |
5
- | Feature A | [Description] | PENDING |
6
- | Feature B | [Description] | PENDING |
3
+ ## Request
7
4
 
8
- ## USER FEEDBACK & NOTES
9
- - Add any specific user requirements here.
5
+ A CRM dashboard
6
+
7
+ ## Generated Scope
8
+
9
+ - Domain: CRM
10
+ - Auth: yes
11
+ - Users: yes
12
+ - Roles: yes
13
+ - Reports: yes
14
+
15
+ ## Architecture
16
+
17
+ - `apps/backend`: Fastify API
18
+ - `apps/web`: React dashboard
19
+ - `apps/backend/src/types`: Contract-first backend TypeScript types
@@ -12,27 +12,26 @@
12
12
 
13
13
  ## Architectural Patterns
14
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.
15
+ - **Contract-First Development:** All API and data models are defined in the backend app's `types` directory before implementation.
16
+ - **Branded Types Law:** All unique identifiers must be branded types defined in the app-local types.
17
17
  - **Zero Mock Policy:** Real integration with database/services is preferred over fragile mocks (except for external 3rd-party APIs).
18
18
  - **Phase-Based Execution:** Development follows a strict state machine (Discovery → Architecture → Core → Integration → Optimization).
19
19
 
20
20
  ## MCP Framework Intelligence
21
21
 
22
22
  The project uses a modular Model Context Protocol (MCP) server for agent tooling:
23
+ - **Scaffolding:** Dynamic blueprint instantiation and capability growth.
23
24
  - **Codebase:** Intelligence, dependency graphs, and AST-based search.
24
25
  - **Security:** Automated audits and constitution compliance scanning.
25
26
  - **Academy:** Strategic briefing, performance metrics, and agent memory.
26
27
  - **Hermes:** Standardized inter-agent messaging protocol.
27
28
  - **Knowledge:** Structured Obsidian-style Wiki for persistent technical context.
28
29
 
29
- ## Monorepo Structure
30
+ ## Project Structure
30
31
 
31
32
  ```text
32
33
  /
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
- └── {{FRAMEWORK_DIR}}/ # Governance, memory, and logs
34
+ ├── apps/ # Production applications with app-local types
35
+ ├── framework-mcp/ # Core AI Intelligence and Scaffolding Engine
36
+ └── {{FRAMEWORK_DIR}}/ # Governance, memory, logs, and blueprints
38
37
  ```
@@ -0,0 +1,22 @@
1
+ # Blueprint-Driven Construction & Evolution
2
+
3
+ ## Overview
4
+ Blueprint-Driven Construction is the primary method for building and expanding the Agent Enderun ecosystem. It ensures that every new application or feature is built upon a "Gold Standard" foundation.
5
+
6
+ ## Core Mechanics
7
+
8
+ ### 1. Discovering Capabilities
9
+ Agents must use the `list_blueprints` tool to find existing architectural patterns, UI components, and logic hooks before writing any code.
10
+
11
+ ### 2. Instantiating Standards
12
+ Once a blueprint is identified, the `instantiate_blueprint` tool is used to clone the template into the target application directory.
13
+ - **Example:** Cloning `backend/errors` into `apps/backend/src/errors`.
14
+
15
+ ### 3. Dynamic Evolution (Capability Growth)
16
+ When an agent develops a high-quality, reusable solution (e.g., a complex data table or a specific auth service), they MUST save it as a new blueprint using the `save_as_blueprint` tool.
17
+ - **Goal:** The `blueprints/` directory is not static; it grows as the project tackles more complex challenges.
18
+
19
+ ## Guidelines for Agents
20
+ - **Consistency first:** Always check for a blueprint before building from scratch.
21
+ - **Refinement:** If an existing blueprint is outdated, update it via `save_as_blueprint` after a successful implementation.
22
+ - **Documentation:** Always provide a description when saving a new blueprint to help other agents understand its purpose.
@@ -1,7 +1,7 @@
1
1
  # Code Review Checklist
2
2
 
3
3
  - [ ] Does it follow ENDERUN.md?
4
- - [ ] Are types imported from shared-types?
4
+ - [ ] Are types imported from the app's local types directory?
5
5
  - [ ] Is there any Raw SQL usage?
6
6
  - [ ] Are unit tests included?
7
7
  - [ ] Is the code mobile-first (if UI)?
@@ -1,7 +1,7 @@
1
- # Contract Versioning (v0.2.0)
1
+ # Contract Versioning (v0.6.1)
2
2
 
3
3
  ## Workflow
4
- 1. **Change**: Modify `packages/shared-types`.
5
- 2. **Hash**: Generate new SHA-256 hash.
6
- 3. **Sync**: Update `contract.version.json`.
7
- 4. **Audit**: @analyst verifies the sync status.
4
+ 1. **Change**: Modify types in `apps/backend/src/types`.
5
+ 2. **Hash**: Generate new SHA-256 hash using the `update_contract_hash` tool.
6
+ 3. **Sync**: Update `apps/backend/contract.version.json`.
7
+ 4. **Audit**: @analyst verifies the sync status via the `verify_api_contract` tool.