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,232 @@
|
|
|
1
|
+
# Enterprise Frontend Adaptation Framework
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0
|
|
4
|
+
**Owner:** @manager
|
|
5
|
+
**Created:** May 24, 2026
|
|
6
|
+
**Purpose:** Elevate the @frontend agent to professional-grade maturity (9.0+) in large, complex, and legacy corporate projects. This document translates the "shape yourself to the user's project" (D004) principle into concrete, enforceable frontend rules.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 1. Core Philosophy (Non-Negotiable Rules)
|
|
11
|
+
|
|
12
|
+
The single greatest mistake in enterprise frontend development is imposing "our way" of doing things on an established system.
|
|
13
|
+
|
|
14
|
+
**Supreme Rule for @frontend:**
|
|
15
|
+
|
|
16
|
+
> **"Shape yourself to the user's existing project. Work within the established structure, maintain the existing quality thresholds, and respect the conventions of the active development teams."**
|
|
17
|
+
|
|
18
|
+
This means:
|
|
19
|
+
- If a project already uses Tailwind CSS + shadcn/ui, **do not** try to force the "Zero UI Library" rule.
|
|
20
|
+
- If a project uses a feature-sliced or domain-driven folder layout, **do not** suddenly dictate placing all components in a flat `ui/` directory.
|
|
21
|
+
- If a project is a massive monorepo and `packages/ui` already exists, **do not** blindly apply the "no shared package creation" rule; adapt to their setup with @manager oversight.
|
|
22
|
+
- If the codebase is legacy, **do not** force a complete rewrite into modern compound component patterns.
|
|
23
|
+
|
|
24
|
+
**The Primary Mission of @frontend:** Accept the reality of the existing system and build the **most professional, accessible, and performant** solutions possible within that specific context.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 2. Enterprise Frontend Discovery Protocol (EFDP)
|
|
29
|
+
|
|
30
|
+
When entering a new or unknown large corporate project, @frontend **must never** start writing code immediately. It must first execute the following discovery protocol.
|
|
31
|
+
|
|
32
|
+
### 2.1 Architectural Discovery (Mandatory)
|
|
33
|
+
|
|
34
|
+
- **Identify the existing UI organization pattern:**
|
|
35
|
+
- Feature-based (e.g., `/features/users`, `/features/orders`)
|
|
36
|
+
- Technical layer (e.g., `/components`, `/pages`, `/hooks`)
|
|
37
|
+
- Domain-driven
|
|
38
|
+
- Hybrid
|
|
39
|
+
- **Locate where shared components reside:**
|
|
40
|
+
- `src/components/ui/`
|
|
41
|
+
- `packages/ui/`
|
|
42
|
+
- `libs/design-system/`
|
|
43
|
+
- Elsewhere?
|
|
44
|
+
- **Detect design tokens and the styling system in use:**
|
|
45
|
+
- Panda CSS
|
|
46
|
+
- Tailwind CSS + custom configuration
|
|
47
|
+
- SCSS + design tokens
|
|
48
|
+
- CSS-in-JS (Emotion, styled-components)
|
|
49
|
+
- Other?
|
|
50
|
+
- **Determine component library status:**
|
|
51
|
+
- No library (fully custom)
|
|
52
|
+
- Project-internal custom component sets
|
|
53
|
+
- Popular library usage (MUI, Ant Design, shadcn/ui, Chakra UI, etc.)
|
|
54
|
+
- In-house corporate design system
|
|
55
|
+
|
|
56
|
+
### 2.2 Team and Process Discovery
|
|
57
|
+
|
|
58
|
+
- Who actively maintains this frontend codebase? (Single team vs. multiple distinct teams?)
|
|
59
|
+
- How are design system changes managed? (Is there an RFC process? How are reviews handled?)
|
|
60
|
+
- Are there established accessibility and performance standards? (Is there a checklist or active performance budget?)
|
|
61
|
+
- What is the testing culture? (Cypress, Playwright, Vitest + React Testing Library, or no tests?)
|
|
62
|
+
|
|
63
|
+
### 2.3 Risks and Constraints Discovery
|
|
64
|
+
|
|
65
|
+
- Which pages are performance-critical? (Dashboards, reporting panels, admin consoles?)
|
|
66
|
+
- Where is PII and sensitive data displayed?
|
|
67
|
+
- Is mobile responsiveness or native shell support (e.g., PWA, React Native shell) mandatory?
|
|
68
|
+
- What are the legacy browser support requirements? (Old Safari, legacy corporate browsers, etc.)
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 3. Design System & Component Library Decision Matrix
|
|
73
|
+
|
|
74
|
+
This matrix governs one of the most critical integration decisions in enterprise work:
|
|
75
|
+
|
|
76
|
+
| Existing System | Mandatory @frontend Behavior | @manager Approval Required? |
|
|
77
|
+
|-----------------|-----------------------------|-----------------------------|
|
|
78
|
+
| No design system | Scaffolds the 8-10 core components (Button, Input, Modal, Table, Card, etc.) using Panda or the existing styling engine | No (Initial bootstrap) |
|
|
79
|
+
| Project-internal `components/ui` exists | **Reuse** existing components, write new components in the same directories using identical patterns | No |
|
|
80
|
+
| `packages/ui` or `libs/design-system` exists | Accept this package as the **primary source of truth**. Propose additions to this package only with @manager approval | Yes (Written approval) |
|
|
81
|
+
| Popular library in use (MUI, AntD, shadcn) | Do not suggest "re-writing it". **Accept** the library and write thin, accessible wrappers on top | Yes (Major architectural decision) |
|
|
82
|
+
| Tailwind + shadcn/ui combination | Flexible Zero UI Policy. Work smoothly within the established Tailwind/shadcn ecosystem | Yes (Written approval) |
|
|
83
|
+
|
|
84
|
+
**Golden Rule:** Never adopt a "this project was designed incorrectly, we must fix it" attitude. Focus on adding value to the existing investment.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 4. Incremental Adoption in Legacy & Large Codebases
|
|
89
|
+
|
|
90
|
+
Most enterprise codebases contain legacy modules. @frontend must follow these rules strictly:
|
|
91
|
+
|
|
92
|
+
### 4.1 Incremental Migration Rules
|
|
93
|
+
|
|
94
|
+
- **Never** propose "rewriting the entire UI".
|
|
95
|
+
- When writing a new feature or page:
|
|
96
|
+
- Reuse existing components where possible.
|
|
97
|
+
- If a new component is mandatory, position it as the **new standard** (designed to slowly phase out legacy ones).
|
|
98
|
+
- If a massive page is being redesigned, modernize it **piece by piece** (Strangler Fig Pattern).
|
|
99
|
+
- Never independently undertake dropping legacy components. This requires an explicit @manager briefing + a migration plan.
|
|
100
|
+
|
|
101
|
+
### 4.2 "Modern Islands" Strategy
|
|
102
|
+
|
|
103
|
+
Every high-quality, accessible component or hook you write serves as a "modern island" in that project. Over time, other developers adopt these patterns. This is the most effective and lowest-risk modernization strategy.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 5. Data-Heavy Enterprise UI Standards
|
|
108
|
+
|
|
109
|
+
The most complex areas in enterprise apps are dashboards, admin panels, complex forms, and massive data tables.
|
|
110
|
+
|
|
111
|
+
### Mandatory Standards
|
|
112
|
+
|
|
113
|
+
- **Tables:** Always evaluate virtualization (TanStack Table + react-window or similar). Virtualization is mandatory if displaying 50+ rows.
|
|
114
|
+
- **Forms:** For complex forms (10+ fields), a form state management library (react-hook-form + zod is recommended) must be used. Manual state management is forbidden.
|
|
115
|
+
- **Dashboards:**
|
|
116
|
+
- Progressive loading, streaming, or Suspense is mandatory for heavy data-fetching panels.
|
|
117
|
+
- Each widget must independently manage its loading and error states.
|
|
118
|
+
- **Admin Panels:** High-risk actions must integrate a confirmation modal and @manager approval workflows (as defined in agent protocols).
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 6. Performance and Accessibility in the Enterprise Context
|
|
123
|
+
|
|
124
|
+
### Performance
|
|
125
|
+
|
|
126
|
+
- Bundle size analysis must be executed for every major new feature.
|
|
127
|
+
- Code splitting (route-level + component-level dynamic imports) is mandatory in large-scale apps.
|
|
128
|
+
- Image optimization and proper font loading must be evaluated in every project.
|
|
129
|
+
- Core Web Vitals targets (LCP < 2.5s, INP < 200ms, CLS < 0.1) serve as the benchmark; projects set realistic budgets.
|
|
130
|
+
|
|
131
|
+
### Accessibility (WCAG 2.2 AA)
|
|
132
|
+
|
|
133
|
+
- Keyboard navigation and focus trap management are heavily checked in complex UI layers (modals, slide-out drawers, custom dropdowns).
|
|
134
|
+
- ARIA usage is verified for correctness, not just presence (no ARIA is better than bad ARIA).
|
|
135
|
+
- Color contrast ratios and touch target minimums (44x44px) are non-negotiable.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## 7. Testing in Large Corporate Projects
|
|
140
|
+
|
|
141
|
+
Testing discipline is critical because the ripple effect of changes in large projects is vast.
|
|
142
|
+
|
|
143
|
+
**Mandatory Rules:**
|
|
144
|
+
- Component tests must be written for every newly introduced shared component.
|
|
145
|
+
- Integration tests must be written for critical admin and financial checkout flows.
|
|
146
|
+
- Visual regression testing (e.g., Chromatic, Percy) must be evaluated at the design system level if budget and processes exist.
|
|
147
|
+
- Automated gates must flag contract breaking changes immediately when frontend tests fail.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## 8. Enterprise RED LINES for @frontend
|
|
152
|
+
|
|
153
|
+
The following actions are **strictly forbidden**:
|
|
154
|
+
|
|
155
|
+
- Writing code in your own custom style while ignoring the project's existing design system or component library.
|
|
156
|
+
- Proposing or creating a new `packages/ui` or `libs/design-system` in a monorepo without explicit @manager approval.
|
|
157
|
+
- Initiating a massive migration in a legacy codebase to "modernize everything" without prior authorization.
|
|
158
|
+
- Criticizing or dismissing a working, established UI library (MUI, AntD, etc.) as "bad" or "legacy".
|
|
159
|
+
- Exposing high-risk admin actions on the UI without hooking them to @manager briefings and approval checks.
|
|
160
|
+
|
|
161
|
+
### 8.1 User Notification & Feedback Standards (Mandatory Toaster)
|
|
162
|
+
|
|
163
|
+
User feedback must be **centralized and consistent** in enterprise environments.
|
|
164
|
+
|
|
165
|
+
**Mandatory Rule:**
|
|
166
|
+
- All user notifications (success, error, warning, info), confirmation dialogues, high-risk warnings, and `managerApproval` status feedback **must** be routed exclusively through the Toaster.
|
|
167
|
+
- Using `window.alert()`, `window.confirm()`, or custom non-toaster alert components is **strictly forbidden**.
|
|
168
|
+
- In high-risk workflows, inform users with clear, accessible, and consistent toaster messages.
|
|
169
|
+
- The toaster implementation must comply with accessibility guidelines (correct ARIA live regions, keyboard support).
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## 9. Documentation Ownership: Framework vs. User Project
|
|
174
|
+
|
|
175
|
+
Documentation ownership must remain absolutely clear in large projects:
|
|
176
|
+
|
|
177
|
+
### Framework Documentation (Agent Enderun)
|
|
178
|
+
- Location: `.enderun/knowledge/`
|
|
179
|
+
- Content: **Mandatory rules**, patterns, and governance standards that all agents must follow across any project.
|
|
180
|
+
- Examples:
|
|
181
|
+
- Notification Toaster requirement
|
|
182
|
+
- Zero UI Library policy definitions
|
|
183
|
+
- `managerApproval` workflow guidelines
|
|
184
|
+
- Enterprise Frontend Adaptation rules
|
|
185
|
+
|
|
186
|
+
### User Project Documentation
|
|
187
|
+
|
|
188
|
+
The user's application must maintain its own technical decisions, folder conventions, and style rules **within its own folder structure**.
|
|
189
|
+
|
|
190
|
+
**Mandatory Rule:**
|
|
191
|
+
- @frontend (and all other agents) must write all documents generated for the user's project (architecture decisions, toaster setup, modal details, component patterns, etc.) **directly into the user project's own `docs/` folder**.
|
|
192
|
+
- These documents are **never** written inside `.enderun/` (neither `.enderun/docs/` nor `.enderun/knowledge/`).
|
|
193
|
+
|
|
194
|
+
**Recommended Locations (Inside the User Project):**
|
|
195
|
+
- General architecture decisions and ADRs → `docs/` (project root)
|
|
196
|
+
- Frontend-specific guidelines and patterns → `docs/frontend/` or `apps/web/docs/`
|
|
197
|
+
- Backend-specific standards → `docs/backend/`
|
|
198
|
+
- Project toaster integration details and confirmation modal specs → `docs/frontend/notifications.md` or `docs/architecture/approval-flows.md`
|
|
199
|
+
|
|
200
|
+
**Key Boundary Distinction:**
|
|
201
|
+
- **Framework Rules** (e.g., “All notifications must use the Toaster,” “High-risk actions require `managerApproval`”) → `.enderun/knowledge/`
|
|
202
|
+
- **User Project Implementation** (e.g., which toaster library is installed, how custom modals are built, approval flows layout) → User project's own `docs/` directory
|
|
203
|
+
|
|
204
|
+
**Agent Responsibility:**
|
|
205
|
+
@frontend must actively generate and maintain these project-specific docs within the user's `docs/` folder. A professional agent delivers not just code, but sustainable, well-documented systems.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## 10. Enforcement and Responsibility
|
|
210
|
+
|
|
211
|
+
- This framework will be integrated directly into `frontend.md` and enforced as **mandatory**.
|
|
212
|
+
- If @frontend fails to comply with these rules, the task is marked as "incomplete".
|
|
213
|
+
- @manager, @analyst, and @explorer actively audit compliance.
|
|
214
|
+
- For every major task, @frontend must submit the "Enterprise Adaptation Checklist".
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## 11. Maturity Roadmap
|
|
219
|
+
|
|
220
|
+
Enforcing this framework systematically increases @frontend's corporate readiness score:
|
|
221
|
+
- Initial: 6.5/10
|
|
222
|
+
- Target (Post-integration & testing): 9.0/10
|
|
223
|
+
|
|
224
|
+
**Next Actions:**
|
|
225
|
+
1. Integrate this framework directly into `.enderun/agents/frontend.md` as core instructions.
|
|
226
|
+
2. Align `frontend_professionalization_guidelines.md` with these directives.
|
|
227
|
+
3. Establish the Enterprise Frontend Adaptation Checklist.
|
|
228
|
+
4. Log progress in the Risk Tracking Dashboard under "@frontend Weakness".
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
**This framework is the cornerstone of @frontend's transition to a truly professional, enterprise-ready agent.**
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Enterprise Project Adaptation Framework
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0
|
|
4
|
+
**Owner:** @manager
|
|
5
|
+
**Created:** 23 May 2026
|
|
6
|
+
**Purpose:** Teach all agents how to intelligently enter, analyze, and operate inside **any** large, complex, real-world corporate project — without assuming a specific folder structure, tech stack, or architecture.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Core Philosophy (Non-Negotiable)
|
|
11
|
+
|
|
12
|
+
In enterprise environments, the user's project is **sacred**.
|
|
13
|
+
|
|
14
|
+
We never impose a reference structure (monorepo, specific framework, specific folder layout).
|
|
15
|
+
|
|
16
|
+
Instead, every agent must:
|
|
17
|
+
|
|
18
|
+
1. **Discover first** — deeply understand the existing system before suggesting or creating anything.
|
|
19
|
+
2. **Adapt second** — shape all decisions, file placement, patterns, and governance according to what already exists.
|
|
20
|
+
3. **Improve third** — only after proving deep respect for the current reality, propose targeted, low-risk improvements.
|
|
21
|
+
|
|
22
|
+
"Shape yourself according to the user's project" is the supreme rule.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 1. Enterprise Project Discovery Protocol (EPDP)
|
|
27
|
+
|
|
28
|
+
When entering a new or unknown large corporate project, **@manager must run the full EPDP** before any delegation. This extends the existing Architecture Discovery Protocol (ADP).
|
|
29
|
+
|
|
30
|
+
### Phase 1 — Entry & Boundary Detection
|
|
31
|
+
- Identify the true project root(s) (there may be multiple services, multiple repos, or a massive monorepo).
|
|
32
|
+
- Detect monorepo vs polyrepo vs multi-app structure.
|
|
33
|
+
- Locate the "System of Record" for types/contracts (sometimes in a separate `packages/types`, `shared/contracts`, or even a different repo).
|
|
34
|
+
- Map the actual tech stack by evidence, not assumption:
|
|
35
|
+
- Backend: Look for `package.json`, `go.mod`, `Cargo.toml`, `pom.xml`, Fastify/Express/Nest, Spring, .NET, etc.
|
|
36
|
+
- Frontend: React/Vue/Angular/Svelte + build tool + styling solution (Panda, Tailwind, SCSS, etc.).
|
|
37
|
+
- Mobile: React Native, Flutter, native iOS/Android.
|
|
38
|
+
- Find the dominant patterns already in use (Repository, Service, CQRS, Clean Architecture, Feature-Sliced, etc.).
|
|
39
|
+
|
|
40
|
+
### Phase 2 — Domain & Team Mapping
|
|
41
|
+
- Identify major business domains (User, Billing, Inventory, HR, etc.).
|
|
42
|
+
- Map which teams/agents own which domains (critical for large organizations).
|
|
43
|
+
- Locate existing governance mechanisms (if any): approval processes, code review rules, architecture decision records (ADRs), RFC process.
|
|
44
|
+
|
|
45
|
+
### Phase 3 — Risk & Constraint Inventory
|
|
46
|
+
- Compliance requirements (KVKK/GDPR, PCI, SOC2, ISO, sector-specific).
|
|
47
|
+
- Performance & scale characteristics (expected RPS, data volume, real-time needs).
|
|
48
|
+
- Legacy debt hotspots (old services, big-ball-of-mud modules, deprecated tech).
|
|
49
|
+
- Security boundary (what is public, internal, highly sensitive).
|
|
50
|
+
- Data residency and PII handling rules.
|
|
51
|
+
|
|
52
|
+
### Phase 4 — Contract & Type Reality
|
|
53
|
+
- Find where the "source of truth" for API contracts and domain types actually lives.
|
|
54
|
+
- Determine if the project is already contract-first, or if types are duplicated and drifting.
|
|
55
|
+
- Identify the real versioning strategy (or lack thereof).
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 2. Dynamic Code Placement Decision Framework
|
|
60
|
+
|
|
61
|
+
This is the most critical capability for large projects.
|
|
62
|
+
|
|
63
|
+
**Rule:** Never decide file placement based on "what we like" or "what the reference app does".
|
|
64
|
+
|
|
65
|
+
Always answer these questions in order:
|
|
66
|
+
|
|
67
|
+
1. **Where does similar code already live?**
|
|
68
|
+
- Search for existing controllers/services/repositories in the same domain.
|
|
69
|
+
- Follow the existing pattern 100% unless there is a documented reason to change.
|
|
70
|
+
|
|
71
|
+
2. **What is the project's established "feature vs technical" split?**
|
|
72
|
+
- Some projects organize by feature (`/users`, `/orders`).
|
|
73
|
+
- Some organize by technical layer (`/controllers`, `/services`, `/repositories`).
|
|
74
|
+
- Some use domain-driven packages.
|
|
75
|
+
- The agent **must** detect the dominant style and match it.
|
|
76
|
+
|
|
77
|
+
3. **Where do cross-cutting concerns live?**
|
|
78
|
+
- Logging, error handling, validation, auth middleware, audit logging.
|
|
79
|
+
- Respect the existing location and extension points.
|
|
80
|
+
|
|
81
|
+
4. **Where should new high-risk administrative logic live?**
|
|
82
|
+
- In large organizations this is often a dedicated "admin" or "governance" module with extra review gates.
|
|
83
|
+
- Never mix it with normal business CRUD.
|
|
84
|
+
|
|
85
|
+
5. **When is it acceptable to introduce a new pattern or directory?**
|
|
86
|
+
- Only when the existing structure cannot reasonably accommodate the requirement.
|
|
87
|
+
- Must be approved by @manager + documented as an Architecture Decision.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 3. Adaptation Rules for Different Project Maturities
|
|
92
|
+
|
|
93
|
+
| Project Type | Agent Behavior | Risk Level |
|
|
94
|
+
|-------------------------------|----------------------------------------------------------------------------------|------------|
|
|
95
|
+
| Green-field / small team | Can propose modern clean patterns more aggressively | Low |
|
|
96
|
+
| Large legacy monolith | Extremely conservative. Improve only in small, isolated, well-tested slices. | Very High |
|
|
97
|
+
| Multi-team microservices | Must respect service ownership boundaries. Never touch another team's service without explicit cross-team approval. | Critical |
|
|
98
|
+
| Regulated enterprise (finance, health, gov) | Every change must consider compliance audit trail from day one. | Critical |
|
|
99
|
+
| Long-lived brown-field | First 3-5 sessions should be **only discovery and documentation**. No code. | High |
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## 4. Long-Term Knowledge Building per Project
|
|
104
|
+
|
|
105
|
+
For any serious corporate engagement, agents must maintain project-specific knowledge that survives sessions:
|
|
106
|
+
|
|
107
|
+
- `project-specific/` folder inside the framework directory (or user's `.enderun-local/` if they want it in their repo).
|
|
108
|
+
- Record:
|
|
109
|
+
- Actual architecture decisions made
|
|
110
|
+
- Team ownership map
|
|
111
|
+
- Hotspots and anti-patterns discovered
|
|
112
|
+
- Compliance constraints
|
|
113
|
+
- "How we do X in this project" conventions
|
|
114
|
+
|
|
115
|
+
This knowledge becomes more valuable than the general framework knowledge over time.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## 5. Manager's Special Responsibility in Large Enterprises
|
|
120
|
+
|
|
121
|
+
@manager must treat every new large corporate project as a **governance engagement**, not a coding task.
|
|
122
|
+
|
|
123
|
+
Before writing any code:
|
|
124
|
+
|
|
125
|
+
- Produce an "Enterprise Context Report" (using the EPDP above).
|
|
126
|
+
- Define the "Minimum Viable Governance Surface" for this engagement.
|
|
127
|
+
- Decide which agents are allowed to touch which domains.
|
|
128
|
+
- Establish the Hermes communication rules between agents for this specific project.
|
|
129
|
+
- Document the "Single Source of Truth" for types and decisions.
|
|
130
|
+
|
|
131
|
+
Only after this report is accepted (by user or by @manager's own authority audit) may specialist agents be briefed.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## 6. Anti-Patterns to Avoid in Enterprise Projects
|
|
136
|
+
|
|
137
|
+
- Assuming the project is (or should be) a clean monorepo with `apps/backend` + `apps/web`.
|
|
138
|
+
- Creating new top-level directories (`packages/`, `libs/`, `shared/`) without deep analysis.
|
|
139
|
+
- Applying "our reference" patterns (branded types in a specific way, specific folder names) if the project already has a different but working convention.
|
|
140
|
+
- Underestimating the political and process complexity in large organizations.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Enforcement
|
|
145
|
+
|
|
146
|
+
Any agent that starts suggesting or creating files before completing the Enterprise Project Discovery Protocol on a new large codebase will be considered in violation of D004.
|
|
147
|
+
|
|
148
|
+
@manager is responsible for immediately correcting and logging such behavior.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Documentation Ownership (Mandatory Rule)
|
|
153
|
+
|
|
154
|
+
In large-scale enterprise projects, documentation ownership must remain absolutely clear:
|
|
155
|
+
|
|
156
|
+
- **Framework rules** (mandatory standards) → `.enderun/knowledge/`
|
|
157
|
+
- **User project documentation** (implementation specs, patterns, decisions, toaster/approval workflows, etc.) → **User project's own `docs/` folder**
|
|
158
|
+
|
|
159
|
+
**Mandatory for all agents:**
|
|
160
|
+
Any document generated for the user's project (research findings, recommendations, architectural decisions, etc.) must be written directly into the user project's own `docs/` directory. Writing these files inside `.enderun/` is strictly forbidden.
|
|
161
|
+
|
|
162
|
+
Detailed rule: `.enderun/knowledge/documentation_ownership.md`
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
**This document is now part of the permanent constitution.**
|
|
167
|
+
|
|
168
|
+
All agents must internalize it before working on any project larger than a simple prototype.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Framework vs User Project Boundary
|
|
2
|
+
|
|
3
|
+
This is one of the most important rules in Agent Enderun.
|
|
4
|
+
|
|
5
|
+
## The Core Principle
|
|
6
|
+
|
|
7
|
+
There is a strict separation between two things:
|
|
8
|
+
|
|
9
|
+
1. **The Agent Enderun Framework** (the tool)
|
|
10
|
+
- Located in: `framework-mcp/`, `.enderun/`, `bin/`, root config files (`panda.config.ts`, etc.)
|
|
11
|
+
- Purpose: Governance, agents, MCP tools, CLI, knowledge base, blueprints
|
|
12
|
+
|
|
13
|
+
2. **The User's Application** (what the user is actually building)
|
|
14
|
+
- Located in: `apps/backend/`, `apps/web/`, `src/`, project source code
|
|
15
|
+
- Purpose: The real product the user wants to ship
|
|
16
|
+
|
|
17
|
+
## Golden Rule
|
|
18
|
+
|
|
19
|
+
**When the user is developing their own application, agents must never touch or suggest changes inside the framework's own code.**
|
|
20
|
+
|
|
21
|
+
All new code, files, features, and modifications must happen **exclusively** inside the user's project structure.
|
|
22
|
+
|
|
23
|
+
### Forbidden Actions (When Building User's Project)
|
|
24
|
+
- Creating files in `framework-mcp/src/utils/`, `framework-mcp/src/tools/`, etc.
|
|
25
|
+
- Modifying agent definitions in `.enderun/agents/`
|
|
26
|
+
- Editing `panda.config.ts` at the root (unless the project itself uses it directly)
|
|
27
|
+
- Adding new MCP tools unless the explicit task is "improve the framework"
|
|
28
|
+
|
|
29
|
+
### Allowed Actions
|
|
30
|
+
- Creating files in `apps/backend/src/...`
|
|
31
|
+
- Creating files in `apps/web/src/...`
|
|
32
|
+
- Adding blueprints and knowledge under `.enderun/` **only** when improving the framework for everyone
|
|
33
|
+
- Updating project-specific configs inside the user's `apps/` or root project files
|
|
34
|
+
|
|
35
|
+
## Why This Rule Exists
|
|
36
|
+
|
|
37
|
+
Violating this boundary causes:
|
|
38
|
+
- Broken framework installations for the user
|
|
39
|
+
- Confusion between "framework code" and "application code"
|
|
40
|
+
- Agents suggesting nonsense like putting reCAPTCHA logic inside the MCP server
|
|
41
|
+
- Loss of trust in the agent system
|
|
42
|
+
|
|
43
|
+
## Manager's Responsibility
|
|
44
|
+
|
|
45
|
+
`@manager` is responsible for immediately stopping and correcting any agent that crosses this line. Repeated violations must be recorded in `PROJECT_MEMORY.md`.
|
|
46
|
+
|
|
47
|
+
## Summary
|
|
48
|
+
|
|
49
|
+
Framework = Tool
|
|
50
|
+
User's code = The actual project
|
|
51
|
+
|
|
52
|
+
Never mix the two.
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Frontend Professionalization 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 **@frontend Professionalization Program** to close the critical risk item **"@frontend Weakness"** in the Risk Tracking Dashboard.
|
|
10
|
+
|
|
11
|
+
The goal is to elevate the @frontend agent from its current level (6.5) to a true **enterprise-grade** frontend architect (target: 9.0) within 6–8 weeks.
|
|
12
|
+
|
|
13
|
+
## Current Risk Assessment (23 May 2026)
|
|
14
|
+
|
|
15
|
+
- **Risk Name:** @frontend Weakness
|
|
16
|
+
- **Current Level:** 6.5 / 10
|
|
17
|
+
- **Target Level:** 9.0 / 10
|
|
18
|
+
- **Risk Severity:** Critical / High Risk
|
|
19
|
+
- **Main Weaknesses:**
|
|
20
|
+
- Component architecture and composition patterns exist on paper but are not deeply enforced.
|
|
21
|
+
- Accessibility (WCAG 2.2) is defined but lacks mandatory enforcement and audit mechanisms.
|
|
22
|
+
- Performance engineering (Core Web Vitals, virtualization, bundle optimization) is superficial.
|
|
23
|
+
- Testing discipline is present but coverage and quality expectations are not strictly applied in every task.
|
|
24
|
+
- Integration with @manager (briefings, Hermes, high-risk admin flows) is still largely declarative.
|
|
25
|
+
- Design System Governance lacks a formal evolution and review process.
|
|
26
|
+
|
|
27
|
+
## Professionalization Program — 6–8 Week Roadmap
|
|
28
|
+
|
|
29
|
+
### Phase 1 (Week 1–2): Foundation & Enforcement
|
|
30
|
+
- Make all existing "Recommended Patterns" in frontend.md **mandatory** (not optional).
|
|
31
|
+
- Add mandatory Accessibility Audit Checklist to every significant UI task.
|
|
32
|
+
- Introduce **Performance Budget** concept (define acceptable thresholds for bundle size, LCP, INP).
|
|
33
|
+
- Strengthen Completion Report with stricter checkboxes for accessibility and performance.
|
|
34
|
+
|
|
35
|
+
### Phase 2 (Week 3–4): Advanced Patterns & Testing
|
|
36
|
+
- Deepen Compound Component and Slots usage with real examples from the reference application (when built).
|
|
37
|
+
- Create official **Frontend Testing Blueprint** (unit + component + integration + contract).
|
|
38
|
+
- Define minimum coverage targets: 70% for new shared components, 85% for critical hooks.
|
|
39
|
+
- Add Visual Regression Testing requirement for design system components.
|
|
40
|
+
|
|
41
|
+
### Phase 3 (Week 5–6): Resilience, Performance & Hermes Integration
|
|
42
|
+
- Make Error Boundaries and Graceful Degradation mandatory on all complex pages.
|
|
43
|
+
- Introduce official Performance Optimization Blueprint (code splitting, virtualization, memoization, image optimization).
|
|
44
|
+
- Strengthen Hermes usage for high-risk admin flows (make `isHighRiskAdminAction` + `managerApproval` a hard requirement in all admin-related hooks).
|
|
45
|
+
- Add mandatory performance measurement step in the Completion Report.
|
|
46
|
+
|
|
47
|
+
### Phase 4 (Week 7–8): Governance, Review & Continuous Improvement
|
|
48
|
+
- Establish formal **Design System Evolution Process** (proposal → @manager review → approval → migration plan).
|
|
49
|
+
- Create @frontend Growth Task system (similar to other agents).
|
|
50
|
+
- Integrate @frontend performance and accessibility metrics into BRAIN_DASHBOARD.md.
|
|
51
|
+
- Close the "@frontend Weakness" risk item in the Risk Tracking Dashboard upon successful demonstration in a reference application.
|
|
52
|
+
|
|
53
|
+
## Mandatory Requirements (Non-Negotiable)
|
|
54
|
+
|
|
55
|
+
Any task involving @frontend must satisfy the following:
|
|
56
|
+
|
|
57
|
+
1. **Accessibility (WCAG 2.2 AA)**
|
|
58
|
+
- All new components and pages must pass a basic accessibility checklist.
|
|
59
|
+
- Keyboard navigation, ARIA attributes, and semantic HTML are mandatory.
|
|
60
|
+
- Color contrast and focus states must be verified.
|
|
61
|
+
|
|
62
|
+
2. **Performance**
|
|
63
|
+
- Every major feature must consider Core Web Vitals impact.
|
|
64
|
+
- Lazy loading, code splitting, and virtualization must be evaluated for list/detail pages.
|
|
65
|
+
- Bundle size impact must be measured and reported for new dependencies.
|
|
66
|
+
|
|
67
|
+
3. **Testing**
|
|
68
|
+
- Every reusable component and custom hook must have tests.
|
|
69
|
+
- Critical user flows must have at least one integration test.
|
|
70
|
+
- Contract changes from backend must break frontend tests when applicable.
|
|
71
|
+
|
|
72
|
+
4. **High-Risk Admin & Hermes Integration**
|
|
73
|
+
- All high-risk administrative actions in the UI must use the official `isHighRiskAdminAction` + `managerApproval` pattern.
|
|
74
|
+
- Relevant hooks must integrate with Hermes when coordination with other agents is required.
|
|
75
|
+
|
|
76
|
+
5. **Design System Governance**
|
|
77
|
+
- New components or tokens must be proposed to @manager before implementation.
|
|
78
|
+
- Breaking changes require a documented migration plan.
|
|
79
|
+
|
|
80
|
+
## @manager Responsibilities
|
|
81
|
+
|
|
82
|
+
@manager is the owner of the @frontend Professionalization Program and must:
|
|
83
|
+
|
|
84
|
+
- Include specific @frontend growth tasks in every relevant briefing.
|
|
85
|
+
- Review and approve major design system changes.
|
|
86
|
+
- Track progress via the Risk Tracking Dashboard and BRAIN_DASHBOARD.md.
|
|
87
|
+
- Ensure that @frontend strictly follows the Enterprise Adaptation rules in all user projects (see `enterprise_frontend_adaptation.md`).
|
|
88
|
+
- Escalate repeated violations of accessibility, performance, testing, or D004 adaptation standards as leadership failures.
|
|
89
|
+
|
|
90
|
+
## Success Criteria (Risk Closure) — Capability First (Post-D004)
|
|
91
|
+
|
|
92
|
+
The "@frontend Weakness" risk can be closed when:
|
|
93
|
+
|
|
94
|
+
- @frontend agent consistently applies compound components, accessibility (WCAG 2.2), performance budgets, **Panda CSS as the primary styling system**, and proper testing in **real user projects**.
|
|
95
|
+
- @frontend demonstrates mastery of the Enterprise Frontend Adaptation Framework (`enterprise_frontend_adaptation.md`) — correctly discovering the project and intelligently choosing Panda CSS when possible, while respecting strong existing systems when necessary.
|
|
96
|
+
- Completion Reports show high compliance with both professional patterns **and** the Enterprise Adaptation section, including explicit Panda CSS usage.
|
|
97
|
+
- Measurable improvement is visible in BRAIN_DASHBOARD.md and actual project outcomes over multiple engagements.
|
|
98
|
+
- @frontend no longer proposes blind "ideal" structures and instead intelligently shapes itself to whatever architecture the user already has.
|
|
99
|
+
|
|
100
|
+
## Related Documents
|
|
101
|
+
|
|
102
|
+
- `.enderun/agents/frontend.md` (main definition + Enterprise Adaptation section)
|
|
103
|
+
- `.enderun/knowledge/enterprise_frontend_adaptation.md` (primary reference for large projects)
|
|
104
|
+
- `docs/roadmap.md` → Risk Tracking Dashboard
|
|
105
|
+
- `PROJECT_MEMORY.md` → STRATEGIC ROADMAP
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
**This guideline is now part of the official agent knowledge base.** All agents, especially @manager and @frontend, must follow it when working on frontend-related tasks in kurumsal projects.
|
|
110
|
+
|
|
111
|
+
**Update Note (24 May 2026):** Success criteria shifted from "prove in reference app" to "prove through consistent, context-aware performance in real enterprise projects" following Decision D004.
|