agent-enderun 0.6.1 → 0.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.enderun/BRAIN_DASHBOARD.md +12 -12
- package/.enderun/PROJECT_MEMORY.md +17 -17
- package/.enderun/STATUS.md +11 -11
- package/.enderun/agents/README.md +40 -0
- package/.enderun/agents/analyst.md +238 -31
- package/.enderun/agents/backend.md +428 -18
- package/.enderun/agents/explorer.md +169 -31
- package/.enderun/agents/frontend.md +604 -76
- package/.enderun/agents/git.md +153 -62
- package/.enderun/agents/manager.md +433 -46
- package/.enderun/agents/mobile.md +143 -29
- package/.enderun/agents/native.md +191 -28
- package/.enderun/blueprints/README.md +82 -0
- package/.enderun/blueprints/backend/errors/config/meta.json +11 -0
- package/.enderun/blueprints/backend/errors/domain-error.ts +34 -55
- package/.enderun/docs/README.md +50 -0
- package/.enderun/docs/phase1-reference-app-execution-plan.md +177 -0
- package/.enderun/docs/structure-audit-2026-05-24.md +72 -0
- package/.enderun/knowledge/README.md +22 -0
- package/.enderun/knowledge/database_governance_guidelines.md +118 -0
- package/.enderun/knowledge/deployment_checklist.md +132 -6
- package/.enderun/knowledge/documentation_ownership.md +122 -0
- package/.enderun/knowledge/documentation_ownership_status.md +122 -0
- package/.enderun/knowledge/enterprise_capabilities_reference.md +149 -0
- package/.enderun/knowledge/enterprise_frontend_adaptation.md +232 -0
- package/.enderun/knowledge/enterprise_project_adaptation.md +168 -0
- package/.enderun/knowledge/framework_vs_user_project_boundary.md +52 -0
- package/.enderun/knowledge/frontend_professionalization_guidelines.md +111 -0
- package/.enderun/knowledge/frontend_real_battle_test_protocol.md +162 -0
- package/.enderun/knowledge/hermes_live_test_guidelines.md +90 -0
- package/.enderun/knowledge/manager_authority_audit_enforcement.md +104 -0
- package/.enderun/knowledge/project_scaffold_guidelines.md +99 -0
- package/.enderun/knowledge/reference_application_guidelines.md +90 -0
- package/ENDERUN.md +19 -5
- package/README.md +132 -657
- package/antigravity.md +15 -0
- package/bin/cli.js +92 -27
- package/bin/hermes-sandbox.js +136 -0
- package/docs/README.md +33 -3
- package/docs/action-plan-2026.md +119 -0
- package/docs/getting-started.md +271 -0
- package/docs/roadmap.md +142 -0
- package/framework-mcp/README.md +1 -1
- package/framework-mcp/dist/index.js +0 -0
- package/framework-mcp/dist/schemas.js +6 -0
- package/framework-mcp/dist/tools/academy.js +6 -8
- package/framework-mcp/dist/tools/codebase.js +6 -6
- package/framework-mcp/dist/tools/contract.js +94 -4
- package/framework-mcp/dist/tools/database.js +8 -3
- package/framework-mcp/dist/tools/framework.js +7 -11
- package/framework-mcp/dist/tools/git.js +2 -2
- package/framework-mcp/dist/tools/knowledge.js +5 -5
- package/framework-mcp/dist/tools/memory.js +5 -7
- package/framework-mcp/dist/tools/messages.js +76 -16
- package/framework-mcp/dist/tools/repository.js +4 -4
- package/framework-mcp/dist/tools/scaffold.js +6 -3
- package/framework-mcp/dist/tools/security.js +4 -4
- package/framework-mcp/dist/utils.js +2 -2
- package/framework-mcp/package.json +1 -1
- package/framework-mcp/src/schemas.ts +7 -0
- package/framework-mcp/src/tools/academy.ts +5 -9
- package/framework-mcp/src/tools/codebase.ts +6 -6
- package/framework-mcp/src/tools/contract.ts +114 -4
- package/framework-mcp/src/tools/database.ts +8 -3
- package/framework-mcp/src/tools/framework.ts +8 -11
- package/framework-mcp/src/tools/git.ts +2 -2
- package/framework-mcp/src/tools/knowledge.ts +6 -7
- package/framework-mcp/src/tools/memory.ts +5 -6
- package/framework-mcp/src/tools/messages.ts +94 -28
- package/framework-mcp/src/tools/repository.ts +5 -6
- package/framework-mcp/src/tools/scaffold.ts +9 -6
- package/framework-mcp/src/tools/security.ts +4 -4
- package/framework-mcp/src/utils.ts +19 -2
- package/framework-mcp/tsconfig.json +1 -1
- package/gemini.md +4 -4
- package/package.json +11 -7
- package/panda.config.ts +3 -1
- package/.enderun/benchmarks/.gitkeep +0 -0
- package/.enderun/blueprints/backend/middleware/error-handler.ts +0 -24
- package/.enderun/blueprints/backend/types/api.ts +0 -20
- package/.enderun/blueprints/backend/types/brands.ts +0 -12
- package/.enderun/blueprints/backend/types/constants.ts +0 -34
- package/.enderun/blueprints/backend/types/index.ts +0 -49
- package/.enderun/blueprints/backend/types/logs.ts +0 -16
- package/.enderun/blueprints/backend/types/models.ts +0 -65
- package/.enderun/blueprints/frontend/ui/Button.tsx +0 -60
- package/.enderun/blueprints/frontend/ui/Input.tsx +0 -43
- package/.enderun/monitoring/.gitkeep +0 -0
- package/gemini-extension.json +0 -13
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# @frontend Real Battle Test Protocol
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0
|
|
4
|
+
**Owner:** @manager
|
|
5
|
+
**Created:** May 24, 2026
|
|
6
|
+
**Purpose:** Test, measure, and mature the @frontend agent's new Enterprise Adaptation + Panda CSS rules in real-world corporate projects.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 1. Goal and Scope
|
|
11
|
+
|
|
12
|
+
This protocol is designed to validate the @frontend agent's theoretical improvements (defined in `enterprise_frontend_adaptation.md` and `frontend.md` updates) in **real battle conditions**.
|
|
13
|
+
|
|
14
|
+
**Objectives:**
|
|
15
|
+
- Move @frontend from a theoretical 8.0 maturity level to a battle-tested 9.0+ level.
|
|
16
|
+
- Measure how well the agent adapts to diverse corporate contexts.
|
|
17
|
+
- Rapidly identify weaknesses and refine agent prompts and knowledge bases.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 2. Core Principles (Mandatory During Testing)
|
|
22
|
+
|
|
23
|
+
The following principles **must** be enforced during every real battle test:
|
|
24
|
+
|
|
25
|
+
1. **D004 - Shaped by User Project Structure** is the supreme priority rule.
|
|
26
|
+
2. **Panda CSS** is the **non-negotiable** styling standard *only for new greenfield developments and isolated components where it does not clash with the host project*.
|
|
27
|
+
- **Critical Exception Logic:** Under D004 precedence, if a project already has a powerful established styling system (e.g., Tailwind CSS, MUI, styled-components) and setting up Panda CSS would cause build-time complexities, duplicate bundle size overhead, or runtime conflicts, the agent **must not** force Panda CSS. Respect the existing styling patterns.
|
|
28
|
+
3. **Enterprise Frontend Discovery Protocol (EFDP)** must be executed before writing any code.
|
|
29
|
+
4. **Automated Validation Gates:** Do not rely on static "gut-feel" for accessibility or performance.
|
|
30
|
+
- For accessibility (WCAG 2.2 AA), use static analysis (`eslint-plugin-jsx-a11y`) or component unit tests via `axe-core`.
|
|
31
|
+
- For performance, verify bundle size impact and prevent unnecessary re-renders using proper state dependency hooks (`useMemo`, `useCallback`, `React.memo`).
|
|
32
|
+
5. **No Self-Assessment Bias:** While @frontend proposes its self-evaluation score (1-10), the final score and approval **must** be audited, adjusted, and validated by `@analyst` (QA) and `@manager` (CTO) to prevent over-optimism.
|
|
33
|
+
6. **Documentation Ownership Compliance:**
|
|
34
|
+
- Any agent-level general learnings and capability updates belong in `.enderun/knowledge/` or prompt files.
|
|
35
|
+
- Any project-specific decisions, component architecture documentation, and styling conventions **must** be written directly into the **user project's own `docs/` folder** (never in `.enderun/`), strictly adhering to `documentation_ownership.md`.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## 3. Test Categories (Real Battle Scenarios)
|
|
40
|
+
|
|
41
|
+
Testing must be executed across at least **4 different** scenarios selected from the following categories:
|
|
42
|
+
|
|
43
|
+
| # | Test Category | Description | Mandatory Panda CSS? | Mandatory EFDP? | Priority |
|
|
44
|
+
|---|---|---|---|---|---|
|
|
45
|
+
| 1 | Greenfield / New Project | Starting from scratch or very minimal existing code. | Yes | Yes | High |
|
|
46
|
+
| 2 | Mid-Large Monorepo (Panda) | Large corporate project already using Panda CSS. | Yes | Yes | High |
|
|
47
|
+
| 3 | Legacy + Different Styling | Tailwind, shadcn/ui, MUI, or custom CSS established. | No (Use Matrix) | Yes | High |
|
|
48
|
+
| 4 | Data-Heavy Dashboard / Admin | Complex tables, forms, high-frequency data streams. | Case-by-case | Yes | High |
|
|
49
|
+
| 5 | Design System Integration | Integrating into a user's pre-existing, strong design system. | No (Use Matrix) | Yes | Medium |
|
|
50
|
+
| 6 | Incremental Migration | Adding new modern components to an old legacy codebase. | Yes (only new parts) | Yes | Medium |
|
|
51
|
+
| 7 | Multi-Team Corporate | Multiple frontend teams with strict file/module ownership. | Case-by-case | Yes | Medium |
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 4. Mandatory Process Per Test Session
|
|
56
|
+
|
|
57
|
+
Each test session must follow these steps in sequential order:
|
|
58
|
+
|
|
59
|
+
1. **Discovery Phase**
|
|
60
|
+
- Run the complete EFDP (architecture, design system, component organization, team rules, risks).
|
|
61
|
+
- Log discovery findings in `PROJECT_MEMORY.md` or a dedicated local project doc.
|
|
62
|
+
2. **Decision Phase**
|
|
63
|
+
- Apply the Design System Decision Matrix.
|
|
64
|
+
- Explicitly document the choice: Panda CSS or existing project styling (with solid rationales).
|
|
65
|
+
3. **Implementation Phase**
|
|
66
|
+
- Strictly follow composition patterns (compound components, render props), accessibility guidelines, performance budgets, and high-risk administrative approval rules.
|
|
67
|
+
4. **Automated Verification Phase**
|
|
68
|
+
- Execute tests, linter checks, accessibility tests, and inspect bundle sizes.
|
|
69
|
+
5. **Evaluation Phase**
|
|
70
|
+
- @frontend proposes its own self-evaluation score (1-10) using the rubric below.
|
|
71
|
+
- `@analyst` performs a strict QA audit, reviews automated test outcomes, and determines the final score.
|
|
72
|
+
6. **Knowledge Extraction & Documentation**
|
|
73
|
+
- Write general agent capability improvements to `.enderun/knowledge/` (e.g., updates to `enterprise_frontend_adaptation.md`).
|
|
74
|
+
- Write project-specific styling and component implementation docs directly to the user's `docs/` folder.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## 5. Evaluation Framework
|
|
79
|
+
|
|
80
|
+
Self-evaluation and @analyst audits are scored on a 1-10 scale based on three key pillars:
|
|
81
|
+
|
|
82
|
+
### Technical Quality (40%)
|
|
83
|
+
- Component Architecture & Composition
|
|
84
|
+
- Accessibility (WCAG 2.2 AA) backed by Axe-core/ESLint
|
|
85
|
+
- Performance & bundle budget compliance
|
|
86
|
+
- Testing quality and coverage
|
|
87
|
+
- Error handling & resilience
|
|
88
|
+
|
|
89
|
+
### Enterprise Adaptation (40%)
|
|
90
|
+
- Accuracy and depth of initial EFDP discovery
|
|
91
|
+
- Soundness of Design System Matrix decisions (especially concerning Panda CSS exception logic)
|
|
92
|
+
- Strict compliance with legacy patterns and styling conventions
|
|
93
|
+
- Respect for team ownership and boundaries
|
|
94
|
+
|
|
95
|
+
### Process & Governance (20%)
|
|
96
|
+
- Completion Report quality and objective truthfulness
|
|
97
|
+
- Precise knowledge extraction and adherence to the Documentation Ownership rule
|
|
98
|
+
- Compliance with @manager briefings and high-risk approval workflows
|
|
99
|
+
- General professionalism and communication
|
|
100
|
+
|
|
101
|
+
**Total Score = Technical (40%) + Adaptation (40%) + Process (20%)**
|
|
102
|
+
|
|
103
|
+
### Evaluation Thresholds
|
|
104
|
+
|
|
105
|
+
| Total Score | Outcome | Action Required |
|
|
106
|
+
|-------------|---------|-----------------|
|
|
107
|
+
| 9.0+ | Perfect Fit | Keep rules and prompts as-is. |
|
|
108
|
+
| 8.0 - 8.9 | Good (Minor Gaps) | Suggest small prompt/knowledge tweaks. |
|
|
109
|
+
| 7.0 - 7.9 | Acceptable but Needs Improvement | Plan significant upgrades to capability files. |
|
|
110
|
+
| < 7.0 | Weak | Halt further tests; immediately revise agent prompts and knowledge. |
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 6. Documentation Requirements
|
|
115
|
+
|
|
116
|
+
Each test session must be documented with the following information:
|
|
117
|
+
|
|
118
|
+
- Project category and size.
|
|
119
|
+
- Core discovery findings (EFDP).
|
|
120
|
+
- Styling decisions and justification.
|
|
121
|
+
- Complete and audited Completion Report.
|
|
122
|
+
- Initial self-score vs. final `@analyst` audited score (with rationale).
|
|
123
|
+
- Challenges encountered and how they were resolved.
|
|
124
|
+
- Actionable recommendations for improving the @frontend agent.
|
|
125
|
+
|
|
126
|
+
These records must be maintained in `PROJECT_MEMORY.md` and/or a dedicated `frontend_battle_log.md` inside the user project's `docs/` directory.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## 7. Success Criteria (Risk Closure)
|
|
131
|
+
|
|
132
|
+
The "@frontend Weakness" risk item in the Risk Tracking Dashboard can be officially closed only when:
|
|
133
|
+
|
|
134
|
+
- At least **4 different categories** of real battle tests are executed and documented.
|
|
135
|
+
- The average final audited score across all tests is **8.5+** (with at least 3 tests scoring 8.5 or higher).
|
|
136
|
+
- Zero instances of "Self-Assessment Bias" go uncorrected by `@analyst`.
|
|
137
|
+
- Demonstrated real-world value is added to the user's project (not just theoretical correctness).
|
|
138
|
+
- Explicit approval is given by both `@analyst` and `@manager`.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## 8. Continuous Improvement Loop
|
|
143
|
+
|
|
144
|
+
Every 2-3 test runs:
|
|
145
|
+
1. Identify recurring agent weaknesses and gaps.
|
|
146
|
+
2. Update `.enderun/knowledge/enterprise_frontend_adaptation.md` and/or `.enderun/agents/frontend.md`.
|
|
147
|
+
3. Test updated instructions in subsequent test sessions.
|
|
148
|
+
4. Record progress in the Risk Tracking Dashboard and `PROJECT_MEMORY.md`.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## 9. Responsibilities
|
|
153
|
+
|
|
154
|
+
- **@frontend:** Strictly follow all protocols, propose objective scores, and document implementation.
|
|
155
|
+
- **@analyst:** Audit completion reports, verify metrical performance/accessibility, and issue the final score.
|
|
156
|
+
- **@manager:** Orchestrate tests, manage risk dashboards, and sign off on agent maturity upgrades.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
**This protocol is the official "battlefield" validation matrix for Agent Enderun's @frontend capability.**
|
|
161
|
+
|
|
162
|
+
*Ready for execution upon manager approval.*
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Hermes Live Test Guidelines
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0
|
|
4
|
+
**Owner:** @manager
|
|
5
|
+
**Last Updated:** 23 May 2026
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
This document defines the official **Hermes Live Test Program** to close the risk item **"Hermes 'Defined on Paper'"** in the Risk Tracking Dashboard.
|
|
10
|
+
|
|
11
|
+
Although the Hermes protocol is now technically stateful and mandatory on paper (send_agent_message, read_agent_messages, update_agent_message_status, proper lifecycle), it has not yet been proven in real inter-agent communication cycles.
|
|
12
|
+
|
|
13
|
+
The goal is to move Hermes from **"defined and mandated"** to **"actually used and verified in live scenarios"**.
|
|
14
|
+
|
|
15
|
+
## Current Risk Status (23 May 2026)
|
|
16
|
+
|
|
17
|
+
- **Risk Name:** Hermes “Defined on Paper”
|
|
18
|
+
- **Previous Progress:** %70 (protocol made stateful + mandatory in all agents)
|
|
19
|
+
- **Current Gap:** No real, end-to-end live message flows have been executed and verified between agents in a working context.
|
|
20
|
+
- **Risk Severity:** Orta (but blocking full autonomous orchestration claim)
|
|
21
|
+
|
|
22
|
+
## Minimum Required Live Test Scenarios
|
|
23
|
+
|
|
24
|
+
To consider the Hermes protocol "live and proven", the following scenarios **must** be successfully executed and documented:
|
|
25
|
+
|
|
26
|
+
### 1. Basic Delegation Flow (Manager → Specialist)
|
|
27
|
+
- @manager sends a DELEGATION message to @backend (or @frontend) with a clear task.
|
|
28
|
+
- Recipient agent reads the message via `read_agent_messages`.
|
|
29
|
+
- Recipient performs the work.
|
|
30
|
+
- Recipient calls `update_agent_message_status` to mark it as `ACKNOWLEDGED` then `COMPLETED`.
|
|
31
|
+
- @manager verifies the status update.
|
|
32
|
+
|
|
33
|
+
### 2. High-Risk Administrative Action Coordination
|
|
34
|
+
- A high-risk admin action (e.g., user role change) is triggered.
|
|
35
|
+
- @manager sends a Hermes message containing `managerApproval` object to the relevant agent (@backend or @frontend).
|
|
36
|
+
- The receiving agent only proceeds after confirming the message and approval.
|
|
37
|
+
- After execution, the agent sends a completion message back to @manager (or @analyst) with audit summary.
|
|
38
|
+
- Full lifecycle is used: PENDING → READ → ACKNOWLEDGED → COMPLETED.
|
|
39
|
+
|
|
40
|
+
### 3. Conflict Resolution / Negotiation Flow
|
|
41
|
+
- @analyst rejects a task from @frontend or @backend.
|
|
42
|
+
- @manager intercepts and initiates negotiation using `send_agent_message` (category: ACTION or DELEGATION).
|
|
43
|
+
- The implementing agent justifies the deviation.
|
|
44
|
+
- @analyst responds via Hermes.
|
|
45
|
+
- If resolved, status is updated to COMPLETED. If not, escalation to user is triggered after max 3 rejections.
|
|
46
|
+
|
|
47
|
+
### 4. Cross-Agent Information Sharing (Explorer / Analyst → Others)
|
|
48
|
+
- @explorer finishes a research task and proactively sends findings (especially high-risk areas) to @manager and/or @backend via Hermes.
|
|
49
|
+
- Recipients acknowledge receipt and act on the information (e.g., update plans or create growth tasks).
|
|
50
|
+
|
|
51
|
+
## Acceptance Criteria (Risk Closure)
|
|
52
|
+
|
|
53
|
+
The "Hermes Defined on Paper" risk can be closed only when **all** of the following are true:
|
|
54
|
+
|
|
55
|
+
- At least the 4 scenarios above have been executed in a real context (preferably inside the reference application).
|
|
56
|
+
- Every message uses correct `from`, `to`, `traceId`, `category`, `priority`, and proper status transitions.
|
|
57
|
+
- `update_agent_message_status` is called by the recipient after action.
|
|
58
|
+
- All flows are logged in HISTORY and visible in PROJECT_MEMORY.md.
|
|
59
|
+
- @manager can demonstrate during a session that Hermes is actively used instead of direct text instructions.
|
|
60
|
+
- The pattern is documented with real message examples in the knowledge base.
|
|
61
|
+
|
|
62
|
+
## @manager Responsibilities
|
|
63
|
+
|
|
64
|
+
@manager is the owner of the Hermes Live Test Program and must:
|
|
65
|
+
|
|
66
|
+
- Plan and orchestrate the live test scenarios (especially during reference application development).
|
|
67
|
+
- Ensure every briefing that involves inter-agent work includes Hermes usage instructions.
|
|
68
|
+
- Verify that agents are actually calling `send_agent_message` and `update_agent_message_status` instead of bypassing the protocol.
|
|
69
|
+
- Record successful live flows in the Risk Tracking Dashboard and HISTORY.
|
|
70
|
+
- Treat repeated Hermes bypass as a serious process violation.
|
|
71
|
+
|
|
72
|
+
## Recommended Execution Order
|
|
73
|
+
|
|
74
|
+
1. Implement the 4 core scenarios during the creation of the reference application.
|
|
75
|
+
2. Use the reference app as the first real proving ground.
|
|
76
|
+
3. Document at least one complete example of each scenario with actual message content.
|
|
77
|
+
4. Once all scenarios pass, update the Risk Tracking Dashboard to "Closed".
|
|
78
|
+
|
|
79
|
+
## Related Documents
|
|
80
|
+
|
|
81
|
+
- `.enderun/knowledge/hermes_protocol.md` (original protocol definition)
|
|
82
|
+
- `.enderun/agents/manager.md` → Hermes Communication Mandate section
|
|
83
|
+
- `.enderun/knowledge/frontend_professionalization_guidelines.md`
|
|
84
|
+
- `.enderun/knowledge/reference_application_guidelines.md`
|
|
85
|
+
- `docs/roadmap.md` → Risk Tracking Dashboard
|
|
86
|
+
- `PROJECT_MEMORY.md` → STRATEGIC ROADMAP
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
**This guideline is now part of the official agent knowledge base.** All agents must treat Hermes live testing as a mandatory step before claiming full autonomous orchestration capability.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Manager Authority Audit & Enforcement Guidelines
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0
|
|
4
|
+
**Owner:** @manager
|
|
5
|
+
**Last Updated:** 23 May 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 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 "Single Entry Point" and "Zero Tolerance" 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
|
+
- No Production-Grade Reference Application
|
|
81
|
+
- @frontend Weakness
|
|
82
|
+
- Hermes “Defined on Paper”
|
|
83
|
+
- Lack of Real Usage Data
|
|
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` → @manager Mandatory Behavior Rules for Enterprise Projects + 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 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 **"No Production-Grade Reference Application"** as a top-priority open risk.
|
|
18
|
+
- The team needs a concrete starting point to validate governance rules (especially Corporate CRUD Governance 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 "No Production-Grade Reference Application".
|
|
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 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 **"No Production-Grade Reference Application"** as a top-priority open risk.
|
|
18
|
+
- The team needs to validate that new governance rules (especially Corporate CRUD Governance 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. **Corporate Governance 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 "No Production-Grade Reference Application" 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 "No Production-Grade Reference Application" 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.
|
package/ENDERUN.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Agent Enderun (v0.6.
|
|
1
|
+
# Agent Enderun (v0.6.6)
|
|
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`)
|
|
64
|
-
- **Team-Lead MANDATORY Orchestration:** Every user request MUST first be
|
|
64
|
+
- **Permanent @manager Identity (Enterprise Standard):** 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 (Enterprise Project Rule):** 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 (Enterprise Standard):** 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` → “Corporate CRUD and Administrative Operation Governance”.
|
|
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.
|
|
@@ -71,13 +73,25 @@ This file (`./{{ADAPTER}}.md`) and the `{{FRAMEWORK_DIR}}/docs/` folder represen
|
|
|
71
73
|
- **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.
|
|
72
74
|
- **Audit Logging Necessity:** Every critical action must be logged traceably under the `{{FRAMEWORK_DIR}}/logs/` folder.
|
|
73
75
|
- **Design Continuity & Response Policy:** All UI changes MUST be responsive (Mobile-First + Fluid) and surgical. Unnecessary overhauls of existing layouts are strictly forbidden.
|
|
74
|
-
- **Shared Component First Policy:** Defining common UI elements (Button, Input, Card, etc.) inside page files is FORBIDDEN. All atomic UI components must be created
|
|
76
|
+
- **Shared Component First Policy (Zero Tolerance):** Defining common UI elements (Button, Input, Card, etc.) inside page files is FORBIDDEN. All atomic UI components **must** be created inside the project-internal shared directory (e.g. `apps/web/src/components/ui/`).
|
|
77
|
+
Creating any top-level shared UI package under `packages/`, `libs/`, `ui-components/`, or similar structures is **strictly prohibited** unless @manager has given explicit written approval for a very large multi-app monorepo after formal risk assessment. Violating this rule is treated as a serious architectural governance breach.
|
|
75
78
|
- **File Ownership Rule:** Each file is the responsibility of a single agent.
|
|
76
79
|
- **CLI Command Mapping:** All CLI commands in the project must be defined in the `{{FRAMEWORK_DIR}}/cli-commands.json` file and assigned to the relevant agent.
|
|
77
80
|
- **Exit Code Standard:** Standard exit codes (e.g., 64: User Error, 70: Internal Error) must be used in error situations.
|
|
78
81
|
- **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
82
|
- **CLI-Driven Orchestration:** All agent interactions and task delegations must be traceable via `{{ADAPTER}} cli`.
|
|
80
83
|
- **Monorepo Discipline:** Commands must always be run from the monorepo root directory using npm workspaces (e.g., `npm run dev --workspace=web`).
|
|
84
|
+
- **Framework vs User Project Boundary (Critical Rule):**
|
|
85
|
+
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.).
|
|
86
|
+
All development must happen exclusively inside the user's project structure (`apps/backend/src/`, `apps/web/src/`, `src/`, etc.).
|
|
87
|
+
The only exception is when the **explicit goal** of the session is to improve or extend the Agent Enderun framework itself.
|
|
88
|
+
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.
|
|
89
|
+
|
|
90
|
+
- **Documentation Ownership Rule (Enterprise Standard — Zero Tolerance):**
|
|
91
|
+
Agents are **mandatory** to write all documentation they produce for the user's project (architectural decisions, patterns, implementation details, toaster/approval flow documents, research findings, etc.) **exclusively into the user's own `docs/` folder**.
|
|
92
|
+
These documents must **never** be written into `.enderun/knowledge/`, `.enderun/docs/`, `.enderun/agents/`, or any framework folder.
|
|
93
|
+
Violation is considered a serious rule breach and is corrected by @manager.
|
|
94
|
+
The detailed and binding rule is defined in `.enderun/knowledge/documentation_ownership.md`.
|
|
81
95
|
|
|
82
96
|
---
|
|
83
97
|
|
|
@@ -127,7 +141,7 @@ Every agent must use the **Mandatory Output Flow** defined in their specific `.m
|
|
|
127
141
|
|
|
128
142
|
- **`any` Type is Forbidden:** The use of `any` is strictly forbidden in TypeScript projects.
|
|
129
143
|
- **`console.log` is Forbidden:** `console.log` cannot be present in production code.
|
|
130
|
-
- **Mock Data is Forbidden:**
|
|
144
|
+
- **Mock Data is Forbidden:** 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).
|
|
131
145
|
- **File Ownership Violation:** Making unauthorized changes in files outside your scope is forbidden.
|
|
132
146
|
- **Security Rule Violation:** Violating security protocols is strictly forbidden.
|
|
133
147
|
- **Hardcoded Secrets:** Embedding API keys or env variables inside the code is forbidden.
|