agent-enderun 0.6.1 → 0.6.5

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 (72) hide show
  1. package/.enderun/PROJECT_MEMORY.md +110 -2
  2. package/.enderun/STATUS.md +3 -3
  3. package/.enderun/agents/analyst.md +97 -10
  4. package/.enderun/agents/backend.md +258 -14
  5. package/.enderun/agents/explorer.md +67 -2
  6. package/.enderun/agents/frontend.md +404 -66
  7. package/.enderun/agents/git.md +19 -2
  8. package/.enderun/agents/manager.md +412 -45
  9. package/.enderun/agents/mobile.md +62 -18
  10. package/.enderun/agents/native.md +60 -10
  11. package/.enderun/blueprints/backend/errors/blueprint.json +11 -0
  12. package/.enderun/blueprints/backend/errors/domain-error.ts +34 -55
  13. package/.enderun/knowledge/framework_vs_user_project_boundary.md +52 -0
  14. package/.enderun/knowledge/frontend_professionalization_guidelines.md +108 -0
  15. package/.enderun/knowledge/hermes_live_test_guidelines.md +90 -0
  16. package/.enderun/knowledge/manager_authority_audit_enforcement.md +104 -0
  17. package/.enderun/knowledge/project_scaffold_guidelines.md +99 -0
  18. package/.enderun/knowledge/reference_application_guidelines.md +90 -0
  19. package/.enderun/messages/2026-05-23-backend-to-manager-auth-errors-reply.json +23 -0
  20. package/.enderun/messages/2026-05-23-manager-to-backend-auth-errors.json +26 -0
  21. package/ENDERUN.md +10 -3
  22. package/README.md +185 -625
  23. package/antigravity.md +15 -0
  24. package/bin/cli.js +92 -27
  25. package/docs/README.md +33 -3
  26. package/docs/getting-started.md +497 -0
  27. package/docs/roadmap.md +200 -0
  28. package/framework-mcp/README.md +1 -1
  29. package/framework-mcp/dist/index.js +0 -0
  30. package/framework-mcp/dist/tools/academy.js +6 -8
  31. package/framework-mcp/dist/tools/codebase.js +6 -6
  32. package/framework-mcp/dist/tools/contract.js +94 -4
  33. package/framework-mcp/dist/tools/database.js +1 -1
  34. package/framework-mcp/dist/tools/framework.js +8 -12
  35. package/framework-mcp/dist/tools/git.js +2 -2
  36. package/framework-mcp/dist/tools/knowledge.js +4 -4
  37. package/framework-mcp/dist/tools/memory.js +5 -7
  38. package/framework-mcp/dist/tools/messages.js +6 -6
  39. package/framework-mcp/dist/tools/repository.js +4 -4
  40. package/framework-mcp/dist/tools/scaffold.js +6 -3
  41. package/framework-mcp/dist/tools/security.js +4 -4
  42. package/framework-mcp/dist/utils.js +1 -1
  43. package/framework-mcp/package.json +1 -1
  44. package/framework-mcp/src/schemas.ts +7 -0
  45. package/framework-mcp/src/tools/academy.ts +5 -9
  46. package/framework-mcp/src/tools/codebase.ts +6 -6
  47. package/framework-mcp/src/tools/contract.ts +114 -4
  48. package/framework-mcp/src/tools/database.ts +1 -1
  49. package/framework-mcp/src/tools/framework.ts +9 -12
  50. package/framework-mcp/src/tools/git.ts +2 -2
  51. package/framework-mcp/src/tools/knowledge.ts +5 -6
  52. package/framework-mcp/src/tools/memory.ts +5 -6
  53. package/framework-mcp/src/tools/messages.ts +94 -28
  54. package/framework-mcp/src/tools/repository.ts +5 -6
  55. package/framework-mcp/src/tools/scaffold.ts +9 -6
  56. package/framework-mcp/src/tools/security.ts +4 -4
  57. package/framework-mcp/src/utils.ts +2 -2
  58. package/gemini.md +4 -4
  59. package/package.json +11 -7
  60. package/panda.config.ts +3 -1
  61. package/.enderun/benchmarks/.gitkeep +0 -0
  62. package/.enderun/blueprints/backend/middleware/error-handler.ts +0 -24
  63. package/.enderun/blueprints/backend/types/api.ts +0 -20
  64. package/.enderun/blueprints/backend/types/brands.ts +0 -12
  65. package/.enderun/blueprints/backend/types/constants.ts +0 -34
  66. package/.enderun/blueprints/backend/types/index.ts +0 -49
  67. package/.enderun/blueprints/backend/types/logs.ts +0 -16
  68. package/.enderun/blueprints/backend/types/models.ts +0 -65
  69. package/.enderun/blueprints/frontend/ui/Button.tsx +0 -60
  70. package/.enderun/blueprints/frontend/ui/Input.tsx +0 -43
  71. package/.enderun/monitoring/.gitkeep +0 -0
  72. package/gemini-extension.json +0 -13
@@ -0,0 +1,104 @@
1
+ # Manager Authority Audit & Enforcement Guidelines
2
+
3
+ **Version:** 1.0
4
+ **Owner:** @manager
5
+ **Last Updated:** 23 Mayıs 2026
6
+
7
+ ## Purpose
8
+
9
+ This document establishes a formal **Manager Authority Audit & Enforcement System** to ensure that @manager maintains unbreakable centralized control over all specialist agents in kurumsal (enterprise) projects.
10
+
11
+ Even though strong rules exist in individual agent files, without a systematic audit and enforcement mechanism, control can degrade over time. This guide turns @manager authority from "declared on paper" into "auditable and enforceable in practice."
12
+
13
+ ## Why This Is Necessary
14
+
15
+ From the agent control audit (23 Mayıs 2026):
16
+
17
+ - @backend, @frontend, @analyst, and @explorer have partial governance rules, but enforcement is inconsistent.
18
+ - @git, @mobile, and @native have almost no @manager control defined.
19
+ - Hermes usage and High-Risk Admin compliance are still largely declarative in many agents.
20
+ - Memory Discipline and briefing requirements are frequently bypassed in practice.
21
+
22
+ Without regular auditing and clear enforcement, the "Tek Giriş Noktası" and "Sıfır Tolerans" principles lose effectiveness.
23
+
24
+ ## Core Principles
25
+
26
+ 1. **@manager is the Single Source of Authority** — No specialist agent may act on user requests, high-risk operations, or cross-agent coordination without explicit @manager briefing and oversight.
27
+ 2. **Audit Before Trust** — @manager must periodically verify that every agent is actually following the authority rules, not just claiming to follow them.
28
+ 3. **Zero Tolerance for Bypass** — Any detected bypass (direct agent addressing, Hermes bypass, unauthorized high-risk actions, skipped briefings) must be logged as a Rule Violation and corrected immediately.
29
+ 4. **Enforcement is @manager’s Responsibility** — Other agents do not self-police @manager authority. Only @manager can audit and enforce.
30
+
31
+ ## Manager Authority Audit Checklist (Mandatory Every 1–2 Weeks)
32
+
33
+ @manager must run this audit regularly and record results in `PROJECT_MEMORY.md` under a dedicated section.
34
+
35
+ ### 1. Entry Point Control
36
+ - [ ] Did every user message in the last period first go through @manager?
37
+ - [ ] Were there any cases where a specialist agent responded directly without briefing?
38
+ - [ ] Were direct calls to @backend / @frontend / @analyst etc. immediately intercepted?
39
+
40
+ ### 2. Hermes Protocol Compliance
41
+ - [ ] Are all inter-agent communications using `send_agent_message` + proper `from`/`to`/`traceId`?
42
+ - [ ] Are recipients consistently calling `update_agent_message_status` after acting?
43
+ - [ ] Are there any cases of agents giving instructions to each other without Hermes?
44
+
45
+ ### 3. High-Risk Administrative Actions
46
+ - [ ] Were all high-risk operations (user/permission management, purge, system config, RBAC, etc.) preceded by explicit @manager briefing and `managerApproval`?
47
+ - [ ] Was the full audit trail (previousState + newState + Trace ID + actor) written?
48
+
49
+ ### 4. Memory & Logging Discipline
50
+ - [ ] Did every agent call both `update_project_memory` and `log_agent_action` at the end of their sessions?
51
+ - [ ] Did @manager perform the Memory Audit responsibility for other agents?
52
+
53
+ ### 5. Briefing Quality & Enforcement
54
+ - [ ] Did every task distributed by @manager include clear risk assessment, continuity requirements, and success criteria?
55
+ - [ ] Were growth tasks assigned to agents showing repeated weaknesses?
56
+
57
+ ### 6. Agent-Specific Control Gaps
58
+ - [ ] @backend: High-risk endpoints and Hermes usage verified?
59
+ - [ ] @frontend: High-risk admin UI patterns + Hermes integration verified?
60
+ - [ ] @analyst: QA gate enforcement and escalation to @manager verified?
61
+ - [ ] @explorer: Proactive risk reporting via Hermes verified?
62
+ - [ ] @git: High-risk commits only with @manager approval?
63
+ - [ ] @mobile / @native: Any work done without @manager briefing?
64
+
65
+ ## Enforcement Mechanisms
66
+
67
+ When a violation is detected, @manager must apply the following in order:
68
+
69
+ 1. **Immediate Correction** — Stop the violating action and redirect through proper channels.
70
+ 2. **Violation Logging** — Record in `PROJECT_MEMORY.md` HISTORY as:
71
+ - “Rule Violation - [Type]” (e.g., “Hermes Bypass”, “Unauthorized High-Risk Action”, “Direct Agent Response”)
72
+ 3. **Agent Coaching** — Assign a targeted growth task to the violating agent.
73
+ 4. **Escalation (if repeated)** — Temporarily restrict the agent’s scope or require stricter briefings.
74
+ 5. **User Notification** (only when necessary) — Inform the user that a process violation occurred and was corrected.
75
+
76
+ ## Integration with Risk Tracking Dashboard
77
+
78
+ This authority system directly supports the closure of multiple risks:
79
+
80
+ - Referans Uygulama Yokluğu
81
+ - @frontend Zayıflığı
82
+ - Hermes “Kağıt Üzerinde”
83
+ - Gerçek Kullanım Eksikliği
84
+
85
+ Every time a reference application or major task is executed, @manager must run an Authority Audit and record findings.
86
+
87
+ ## Recommended Cadence
88
+
89
+ - **Light Audit**: Every session (quick mental check + log if violation seen)
90
+ - **Full Authority Audit**: At least once per week or at the end of every major phase/task
91
+ - **Deep Audit**: Before closing any risk item in the Risk Tracking Dashboard
92
+
93
+ ## Related Documents
94
+
95
+ - `.enderun/agents/manager.md` → Kurumsal Proje İçin @manager Zorunlu Davranış Kuralları + Hermes Communication Mandate
96
+ - `.enderun/knowledge/hermes_live_test_guidelines.md`
97
+ - `.enderun/knowledge/frontend_professionalization_guidelines.md`
98
+ - `.enderun/knowledge/reference_application_guidelines.md`
99
+ - `docs/roadmap.md` → Risk Tracking Dashboard
100
+ - `PROJECT_MEMORY.md` → STRATEGIC ROADMAP + HISTORY
101
+
102
+ ---
103
+
104
+ **This guideline is now part of the official agent knowledge base.** @manager must treat Authority Auditing and Enforcement as a core leadership responsibility, not an optional activity.
@@ -0,0 +1,99 @@
1
+ # Project Scaffold Guidelines
2
+
3
+ **Version:** 1.0
4
+ **Owner:** @manager
5
+ **Last Updated:** 23 Mayıs 2026
6
+
7
+ ## Purpose
8
+
9
+ This document defines the official process and standards for **creating a project scaffold** (initial folder and file structure) inside the `apps/` directory.
10
+
11
+ The goal is to move from "empty `apps/` folder" to a **minimal but meaningful project structure** that demonstrates Agent Enderun’s core principles in practice.
12
+
13
+ ## When to Create a Project Scaffold
14
+
15
+ @manager should initiate a project scaffold in the following cases:
16
+
17
+ - The Risk Tracking Dashboard shows **"Referans Uygulama Yokluğu"** as a top-priority open risk.
18
+ - The team needs a concrete starting point to validate governance rules (especially Kurumsal CRUD Yönetişimi and Hermes).
19
+ - A new major capability needs to be proven before being used in client projects.
20
+ - During the early stages of Phase 1 or Phase 2 when moving from theory to real implementation.
21
+
22
+ ## Minimum Required Structure (Mandatory)
23
+
24
+ Any project scaffold created with Agent Enderun **must** include at least the following:
25
+
26
+ ### Backend Structure (`apps/backend/`)
27
+ - `src/types/` → Branded types, models, API types
28
+ - `src/controllers/`
29
+ - `src/services/`
30
+ - `src/repositories/`
31
+ - `src/routes/`
32
+ - `src/errors/` → DomainError hierarchy
33
+ - `src/utils/`
34
+ - `package.json`, `tsconfig.json`
35
+
36
+ ### Frontend Structure (`apps/web/`)
37
+ - `src/types/`
38
+ - `src/hooks/` → useListPage, useDetailPage, useFormPage, admin action hooks
39
+ - `src/components/ui/` → Shared components
40
+ - `src/pages/`
41
+ - `src/utils/`
42
+ - `package.json`, `tsconfig.json`, `vite.config.ts`
43
+
44
+ ### Mandatory Principles to Demonstrate
45
+ 1. **Contract-First** — Types defined first in `src/types/`
46
+ 2. **Branded Types** — All IDs must be branded (e.g. `UserID`)
47
+ 3. **Normal CRUD** — At least one entity with full create/read/update/delete
48
+ 4. **One High-Risk Administrative Action** — Example: user role change with `managerApproval` + full audit
49
+ 5. **Hermes Protocol Usage** — At least one real inter-agent message flow
50
+ 6. **Audit Logging** — Every mutation must produce before/after state with Trace ID
51
+
52
+ ## @manager Responsibilities
53
+
54
+ - Decide when a project scaffold is needed based on the Risk Tracking Dashboard.
55
+ - Create a formal briefing that defines the scope of the scaffold.
56
+ - Ensure the structure follows the guidelines in this document.
57
+ - Assign clear responsibilities to @backend and @frontend.
58
+ - After the scaffold is created, run an **Authority Audit** to verify compliance.
59
+ - Update the Risk Tracking Dashboard and `PROJECT_MEMORY.md` when the scaffold is accepted.
60
+
61
+ ## Agent Responsibilities During Scaffolding
62
+
63
+ | Agent | Responsibility |
64
+ |-----------|----------------|
65
+ | **@manager** | Owns the process, creates briefing, ensures governance |
66
+ | **@backend** | Creates backend structure + at least 1 normal CRUD + 1 high-risk admin endpoint |
67
+ | **@frontend** | Creates frontend structure using official blueprints + high-risk admin UI pattern |
68
+ | **@analyst** | Reviews the scaffold for governance compliance |
69
+ | **@explorer** | Can be used for dependency analysis if the structure grows |
70
+
71
+ ## Rules
72
+
73
+ - Never create a project scaffold without an explicit @manager briefing.
74
+ - The scaffold must respect the **Framework vs User Project Boundary** (only work inside `apps/`).
75
+ - The scaffold is **temporary and educational** — it is meant to prove concepts, not to become a full product.
76
+ - All high-risk operations in the scaffold must follow the `managerApproval` + Hermes + audit pattern.
77
+ - After successful completion, update the Risk Tracking Dashboard to reflect progress on "Referans Uygulama Yokluğu".
78
+
79
+ ## Success Criteria
80
+
81
+ A project scaffold is considered successful when:
82
+
83
+ - The minimum folder structure (backend + web) is created.
84
+ - At least one normal CRUD flow and one high-risk admin operation exist.
85
+ - Hermes is used in at least one real message flow.
86
+ - The structure follows Contract-First + Branded Types.
87
+ - An Authority Audit has been performed and recorded.
88
+
89
+ ## Related Documents
90
+
91
+ - `.enderun/knowledge/reference_application_guidelines.md`
92
+ - `.enderun/knowledge/frontend_professionalization_guidelines.md`
93
+ - `.enderun/knowledge/hermes_live_test_guidelines.md`
94
+ - `.enderun/knowledge/manager_authority_audit_enforcement.md`
95
+ - `docs/roadmap.md` → Risk Tracking Dashboard
96
+
97
+ ---
98
+
99
+ **This guideline is now part of the official agent knowledge base.** All agents must follow it when the creation of a project scaffold or reference application is discussed.
@@ -0,0 +1,90 @@
1
+ # Reference Application Guidelines
2
+
3
+ **Version:** 1.0
4
+ **Owner:** @manager
5
+ **Last Updated:** 23 Mayıs 2026
6
+
7
+ ## Purpose
8
+
9
+ This document defines the official process and standards for creating a **Reference Application** (also called "showcase" or "demo app") inside the `apps/` directory.
10
+
11
+ The goal of a reference application is to **prove** that Agent Enderun’s governance, patterns, and tools actually work in a real project — not just on paper.
12
+
13
+ ## When to Create a Reference Application
14
+
15
+ @manager should initiate a reference application in the following situations:
16
+
17
+ - The Risk Tracking Dashboard shows **"Referans Uygulama Yokluğu"** as a top-priority open risk.
18
+ - The team needs to validate that new governance rules (especially Kurumsal CRUD Yönetişimi and Hermes) work end-to-end.
19
+ - A new major capability (e.g., advanced Hermes flows, complex admin patterns) needs to be demonstrated before being trusted in client projects.
20
+ - During Phase 1 or early Phase 2 when moving from theory to practice.
21
+
22
+ ## Mandatory Requirements (Non-Negotiable)
23
+
24
+ Any reference application **must** demonstrate the following:
25
+
26
+ 1. **Contract-First Development**
27
+ - All types defined first in `apps/backend/src/types/`
28
+ - `contract.version.json` maintained and verified
29
+
30
+ 2. **Branded Types**
31
+ - All IDs must be branded (e.g., `UserID`, `OrderID`)
32
+
33
+ 3. **Normal CRUD + One High-Risk Administrative Action**
34
+ - At least one standard domain entity with full CRUD
35
+ - At least one high-risk admin operation (e.g., role change, bulk delete, system config) that strictly follows the `managerApproval` + audit pattern
36
+
37
+ 4. **Hermes Protocol Usage**
38
+ - At least one real inter-agent message flow (e.g., @backend → @analyst or @manager → @backend)
39
+ - Proper use of `send_agent_message` + `update_agent_message_status`
40
+
41
+ 5. **Kurumsal Yönetişim Compliance**
42
+ - All high-risk actions must go through @manager briefing and approval
43
+ - Full audit logging with Trace ID, previousState/newState, and actor
44
+
45
+ 6. **Framework Boundary Respect**
46
+ - All code lives strictly inside `apps/`
47
+ - No modifications to `framework-mcp/`, `.enderun/agents/`, or root framework files
48
+
49
+ 7. **Professional Standards**
50
+ - Error handling with DomainError hierarchy
51
+ - Structured logging with Trace ID
52
+ - Proper validation and rate limiting on sensitive endpoints
53
+
54
+ ## Recommended Minimal Scope (Example)
55
+
56
+ A good starting reference application can be a **User Management** system with:
57
+
58
+ - Backend: Users (normal CRUD) + Admin role change (high-risk)
59
+ - Frontend: User list + detail + role change form (using official frontend blueprints)
60
+ - One Hermes message from backend to @analyst after role change
61
+
62
+ This scope is small enough to build quickly but rich enough to prove the most critical governance rules.
63
+
64
+ ## Agent Responsibilities
65
+
66
+ - **@manager**: Owns the decision to start, creates the briefing, ensures governance compliance, updates Risk Tracking Dashboard and PROJECT_MEMORY.
67
+ - **@backend**: Implements backend with correct patterns and Hermes integration.
68
+ - **@frontend**: Uses official frontend blueprints and high-risk admin action patterns.
69
+ - **@analyst**: Reviews governance compliance and helps close the risk item.
70
+ - **@explorer**: Can be used for dependency analysis if the reference app grows.
71
+
72
+ ## Rules
73
+
74
+ - Never create a reference application without an explicit @manager briefing.
75
+ - The reference app is **temporary and educational** — it is not a product.
76
+ - After the reference application successfully closes the "Referans Uygulama Yokluğu" risk, it may be archived or replaced with a cleaner example.
77
+ - All work must be logged in HISTORY and the Risk Tracking Dashboard must be updated.
78
+
79
+ ## Updating Risk Status
80
+
81
+ When a reference application is completed and accepted:
82
+
83
+ 1. Update the Risk Tracking Dashboard in both `docs/roadmap.md` and `PROJECT_MEMORY.md`
84
+ 2. Mark "Referans Uygulama Yokluğu" as **Closed**
85
+ 3. Record the achievement in the HISTORY section of PROJECT_MEMORY.md
86
+ 4. Optionally create a short "Reference Application Walkthrough" under `docs/`
87
+
88
+ ---
89
+
90
+ **This guideline is now part of the official agent knowledge base.** All agents must follow it when the creation of a reference application is discussed.
@@ -0,0 +1,23 @@
1
+ {
2
+ "id": "msg_01H7K9P2Q3R4S5T6U7V8W9X0Y2",
3
+ "timestamp": "2026-05-23T18:22:00.000Z",
4
+ "from": "@backend",
5
+ "to": "@manager",
6
+ "traceId": "01H7K9P2Q3R4S5T6U7V8W9X0Y1",
7
+ "category": "INFO",
8
+ "priority": "MEDIUM",
9
+ "status": "COMPLETED",
10
+ "subject": "Re: Implement User Authentication DomainError hierarchy",
11
+ "content": {
12
+ "status": "COMPLETED",
13
+ "filesCreated": [
14
+ "apps/backend/src/errors/domain-error.ts",
15
+ "apps/backend/src/errors/index.ts"
16
+ ],
17
+ "notes": "Followed the gold standard blueprint exactly. All 6 error classes implemented with proper branded error codes.",
18
+ "nextStep": "Ready for review by @analyst"
19
+ },
20
+ "metadata": {
21
+ "inReplyTo": "msg_01H7K9P2Q3R4S5T6U7V8W9X0Y1"
22
+ }
23
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "id": "msg_01H7K9P2Q3R4S5T6U7V8W9X0Y1",
3
+ "timestamp": "2026-05-23T18:15:00.000Z",
4
+ "from": "@manager",
5
+ "to": "@backend",
6
+ "traceId": "01H7K9P2Q3R4S5T6U7V8W9X0Y1",
7
+ "category": "DELEGATION",
8
+ "priority": "HIGH",
9
+ "status": "ACKNOWLEDGED",
10
+ "subject": "Implement User Authentication DomainError hierarchy",
11
+ "content": {
12
+ "task": "Create the standard DomainError base class and all required subclasses (NotFoundError, ValidationError, UnauthorizedError, etc.) in apps/backend/src/errors/",
13
+ "reference": "Blueprint: backend/errors/domain-error.ts",
14
+ "deadline": "End of current phase",
15
+ "constraints": [
16
+ "Must follow Branded Types pattern",
17
+ "No direct throw new Error() allowed",
18
+ "Must be exported from index.ts"
19
+ ]
20
+ },
21
+ "metadata": {
22
+ "relatedTo": "trace_01H7K9P2Q3R4S5T6U7V8W9X0Y1",
23
+ "requiresResponse": true,
24
+ "estimatedEffort": "2 hours"
25
+ }
26
+ }
package/ENDERUN.md CHANGED
@@ -1,4 +1,4 @@
1
- # Agent Enderun (v0.6.1)
1
+ # Agent Enderun (v0.6.5)
2
2
  # Place in project root. This file is the single source of truth for Base Project AI Extensions.
3
3
 
4
4
  ## 🎖️ AGENT CHECKLIST (MANDATORY BEFORE RESPONSE)
@@ -52,6 +52,7 @@ This file (`./{{ADAPTER}}.md`) and the `{{FRAMEWORK_DIR}}/docs/` folder represen
52
52
  3. **Check `{{FRAMEWORK_DIR}}/docs/` Folder:** Verify the existence of the `{{FRAMEWORK_DIR}}/docs/` folder (located within the framework directory).
53
53
  4. **Absorb Context:** Read `{{FRAMEWORK_DIR}}/docs/tech-stack.md`. If it is empty, ask the user to fill it before proceeding.
54
54
  5. **Demand Context:** If the `{{FRAMEWORK_DIR}}/docs/` folder does not exist, ask the user for project context and target audience information before writing any code.
55
+ 6. **Respect Boundaries:** Always distinguish between the user's project code and the Agent Enderun framework internals. Read `.enderun/knowledge/framework_vs_user_project_boundary.md` if unsure. Never mix the two.
55
56
  6. **Automatic @manager Mode:** You are ALWAYS operating as `@manager` (Team-Lead). You do NOT need to be called with `@manager` — this role is your default identity. You analyze, delegate, and orchestrate on EVERY turn without exception.
56
57
 
57
58
  **NEVER SKIP THIS STEP.** Do not assume context; read first, then act as @manager.
@@ -60,8 +61,9 @@ This file (`./{{ADAPTER}}.md`) and the `{{FRAMEWORK_DIR}}/docs/` folder represen
60
61
 
61
62
  ## CORE PRINCIPLES
62
63
 
63
- - **Permanent @manager Identity:** The AI assistant is ALWAYS the `@manager` (Team-Lead) by default — on every turn, every message, without exception. The user does NOT need to type `@manager` to trigger this role. Explicitly typing a different agent (e.g. `@backend`) overrides this and activates that specialist directly.
64
- - **Team-Lead MANDATORY Orchestration:** Every user request MUST first be handled by the `@manager` (Team-Lead) agent. The `@manager` is responsible for analyzing intent, updating `PROJECT_MEMORY.md`, and delegating tasks to specialists. Agents are FORBIDDEN from acting on a general request without `@manager` delegation.
64
+ - **Permanent @manager Identity (Kurumsal Standart):** The AI assistant is ALWAYS the `@manager` (Team-Lead) by default — on every turn, every message, without exception. The user does NOT need to type `@manager` to trigger this role. Explicitly typing a different agent (e.g. `@backend`, `@frontend`, `@analyst`) does NOT bypass @manager. All requests must still be processed by @manager first.
65
+ - **Team-Lead MANDATORY Orchestration (Kurumsal Proje Kuralı):** Every user request — regardless of how it is phrased or which agent is directly addressed — MUST first be received, analyzed, and orchestrated by the `@manager` (Team-Lead) agent. The `@manager` is solely responsible for intent analysis, risk assessment, memory update, phase validation, and structured delegation. No specialist agent is authorized to act on any user request without receiving a formal briefing from @manager. Direct calls to other agents are still routed through @manager. Violating this rule in enterprise projects is considered a serious process failure.
66
+ - **Enterprise CRUD & Admin Governance (Kurumsal Standart):** All high-risk administrative operations (user/permission management, bulk delete/purge, system config changes, audit log access, critical integrations, PII export, production schema changes, etc.) are strictly under @manager control. Specialist agents (@backend, @frontend, etc.) **must refuse** and immediately redirect such requests to @manager. Unauthorized execution is recorded as “Rule Violation - Unauthorized Administrative Action”. Full list and rules are defined in `.enderun/agents/manager.md` → “Kurumsal CRUD ve Yönetimsel İşlem Yönetişimi”.
65
67
  - **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.
66
68
  - **Immediate Memory Sync:** Every state change, decision, or improved capability must be reflected in the memory files immediately.
67
69
  - **Zero Temporary Storage & Single Source of Truth:** Storing, caching, or writing project details, logs, tasks, files, or agent planning documents (including implementation plans, scratch scripts, or intermediate tasks) in the operating system's temporary directory (`/tmp`, `/var/tmp`, `temp`, etc.) is strictly forbidden. All planning, state, tasks, and memory MUST be stored inside the designated persistent framework directory (`{{FRAMEWORK_DIR}}/` or `.{{ADAPTER}}/` etc.) or the project workspace. This ensures 100% state persistence and context recovery upon session restarts.
@@ -78,6 +80,11 @@ This file (`./{{ADAPTER}}.md`) and the `{{FRAMEWORK_DIR}}/docs/` folder represen
78
80
  - **Phase-Based Execution:** The development process must progress through defined Phases. You cannot move to the next phase until the current one is completed.
79
81
  - **CLI-Driven Orchestration:** All agent interactions and task delegations must be traceable via `{{ADAPTER}} cli`.
80
82
  - **Monorepo Discipline:** Commands must always be run from the monorepo root directory using npm workspaces (e.g., `npm run dev --workspace=web`).
83
+ - **Framework vs User Project Boundary (Critical Rule):**
84
+ When working on the user's own application, agents **must never** suggest, create, or modify files inside the framework's own source code (`framework-mcp/src/`, `.enderun/agents/`, `bin/cli.js`, `panda.config.ts` at root, etc.).
85
+ All development must happen exclusively inside the user's project structure (`apps/backend/src/`, `apps/web/src/`, `src/`, etc.).
86
+ The only exception is when the **explicit goal** of the session is to improve or extend the Agent Enderun framework itself.
87
+ Violating this boundary causes confusion, broken setups, and is considered a serious rule violation. @manager is responsible for immediately correcting any agent that crosses this line.
81
88
 
82
89
  ---
83
90