agent-enderun 0.8.8 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.enderun/BRAIN_DASHBOARD.md +5 -5
- package/{ENDERUN.md → .enderun/ENDERUN.md} +4 -2
- package/.enderun/PROJECT_MEMORY.md +32 -43
- package/.enderun/STATUS.md +25 -28
- package/.enderun/agents/agent_army_schema.json +29 -7
- package/.enderun/agents/backend.md +48 -39
- package/.enderun/agents/database.md +55 -0
- package/.enderun/agents/devops.md +30 -17
- package/.enderun/agents/explorer.md +5 -5
- package/.enderun/agents/frontend.md +97 -76
- package/.enderun/agents/git.md +4 -4
- package/.enderun/agents/manager.md +68 -59
- package/.enderun/agents/mobile.md +4 -4
- package/.enderun/agents/native.md +106 -0
- package/.enderun/agents/quality.md +122 -0
- package/.enderun/agents/schema/agent-lifecycle-schema.json +29 -8
- package/.enderun/cli-commands.json +7 -3
- package/.enderun/config.json +8 -2
- package/.enderun/knowledge/SHIM_TEMPLATE.md +25 -0
- package/.enderun/knowledge/context_boundary_rules.md +57 -0
- package/.enderun/knowledge/corporate-governance/high-risk-action-approval-flow.md +29 -0
- package/.enderun/knowledge/documentation_ownership.md +53 -0
- package/.enderun/knowledge/eslint-standards.md +63 -0
- package/.enderun/knowledge/frontend_professionalization_guidelines.md +7 -7
- package/.enderun/knowledge/hermes_live_test_guidelines.md +5 -5
- package/.enderun/knowledge/hermes_protocol.md +1 -1
- package/.enderun/knowledge/lessons-learned.md +14 -0
- package/.enderun/knowledge/manager_authority_audit_enforcement.md +10 -10
- package/.enderun/knowledge/project_scaffold_guidelines.md +4 -4
- package/.enderun/knowledge/reference_application_guidelines.md +6 -6
- package/.enderun/mcp_config.json +9 -0
- package/.enderun/memory-graph/agent-contexts/backend.json +1 -1
- package/.enderun/memory-graph/agent-contexts/devops.json +1 -1
- package/.enderun/memory-graph/agent-contexts/explorer.json +1 -1
- package/.enderun/memory-graph/agent-contexts/frontend.json +1 -1
- package/.enderun/memory-graph/agent-contexts/git.json +1 -1
- package/.enderun/memory-graph/agent-contexts/manager.json +1 -1
- package/.enderun/memory-graph/agent-contexts/mobile.json +1 -1
- package/.enderun/memory-graph/agent-contexts/native.json +1 -0
- package/.enderun/memory-graph/agent-contexts/quality.json +1 -0
- package/.enderun/memory-graph/graph.json +123 -15
- package/.enderun/memory-graph/shared-facts.json +26 -31
- package/.enderun/queue/README.md +13 -13
- package/README.md +171 -393
- package/agent.md +25 -0
- package/bin/cli.js +10 -10
- package/bin/init-check.js +69 -0
- package/bin/update-contract.js +57 -38
- package/bin/validate-agent-army.js +38 -13
- package/claude.md +14 -8
- package/docs/README.md +24 -16
- package/docs/architecture/README.md +9 -0
- package/docs/architecture/standards/data-fetching-patterns.md +13 -0
- package/docs/architecture/standards/design-system.md +31 -0
- package/docs/architecture/standards/logging.md +7 -0
- package/docs/architecture/standards/tech-stack.md +9 -0
- package/docs/getting-started.md +9 -259
- package/docs/user/README.md +35 -0
- package/docs/user/action-plan-2026.md +9 -0
- package/docs/user/getting-started.md +13 -0
- package/docs/user/roadmap.md +13 -0
- package/eslint.config.js +68 -0
- package/framework-mcp/dist/index.js +178 -24
- package/framework-mcp/package.json +6 -33
- package/framework-mcp/tsconfig.json +3 -6
- package/gemini.md +12 -6
- package/grok.md +25 -0
- package/package.json +13 -5
- package/panda.config.ts +86 -86
- package/src/cli/adapters.ts +208 -0
- package/src/cli/commands/app.ts +38 -0
- package/src/cli/commands/check.ts +87 -0
- package/src/cli/commands/compliance.ts +55 -0
- package/src/cli/commands/contract.ts +45 -0
- package/src/cli/commands/explorer.ts +45 -0
- package/src/cli/commands/git.ts +39 -0
- package/src/cli/commands/init.ts +272 -0
- package/src/cli/commands/knowledge.ts +44 -0
- package/src/cli/commands/lint.ts +25 -0
- package/src/cli/commands/log.ts +37 -0
- package/src/cli/commands/memory.ts +78 -0
- package/src/cli/commands/orchestrate.ts +111 -0
- package/src/cli/commands/script.ts +20 -0
- package/src/cli/commands/security.ts +38 -0
- package/src/cli/commands/status.ts +59 -0
- package/src/cli/commands/trace.ts +46 -0
- package/src/cli/index.ts +74 -2155
- package/src/cli/utils/app.ts +764 -0
- package/src/cli/utils/claude.ts +56 -0
- package/src/cli/utils/fs.ts +139 -0
- package/src/cli/utils/memory.ts +141 -0
- package/src/cli/utils/pkg.ts +215 -0
- package/src/cli/utils/string.ts +48 -0
- package/src/cli/utils/time.ts +27 -0
- package/tsconfig.json +9 -0
- package/.enderun/agents/analyst.md +0 -238
- package/.enderun/agents/orchestrator.md +0 -172
- package/.enderun/agents/qa.md +0 -124
- package/.enderun/agents/security.md +0 -202
- package/.enderun/knowledge/api_design_rules.md +0 -6
- package/.enderun/knowledge/branded_types_pattern.md +0 -8
- package/.enderun/knowledge/code_review_checklist.md +0 -7
- package/.enderun/knowledge/contract_versioning.md +0 -7
- package/.enderun/knowledge/database_migration.md +0 -6
- package/.enderun/knowledge/deployment_checklist.md +0 -7
- package/.enderun/knowledge/git_commit_strategy.md +0 -10
- package/.enderun/knowledge/monitoring_setup.md +0 -5
- package/.enderun/knowledge/performance_guidelines.md +0 -11
- package/.enderun/knowledge/repository_patterns.md +0 -9
- package/.enderun/knowledge/security_scanning.md +0 -6
- package/.enderun/knowledge/testing_standards.md +0 -7
- package/.enderun/knowledge/troubleshooting_guide.md +0 -5
- package/.enderun/logs/analyst.json +0 -1
- package/.enderun/logs/backend.json +0 -1
- package/.enderun/logs/devops.json +0 -1
- package/.enderun/logs/explorer.json +0 -1
- package/.enderun/logs/frontend.json +0 -1
- package/.enderun/logs/git.json +0 -1
- package/.enderun/logs/manager.json +0 -1
- package/.enderun/logs/mobile.json +0 -1
- package/.enderun/logs/native.json +0 -1
- package/.enderun/logs/orchestrator.json +0 -1
- package/.enderun/logs/qa.json +0 -1
- package/.enderun/logs/security.json +0 -1
- package/.enderun/memory-graph/agent-contexts/analyst.json +0 -1
- package/.enderun/memory-graph/agent-contexts/orchestrator.json +0 -1
- package/.enderun/memory-graph/agent-contexts/qa.json +0 -1
- package/.enderun/memory-graph/agent-contexts/security.json +0 -1
- package/.env.example +0 -10
- package/cursor.md +0 -19
- package/docs/action-plan-2026.md +0 -119
- package/docs/roadmap.md +0 -142
- package/framework-mcp/README.md +0 -55
- package/framework-mcp/dist/schemas.js +0 -84
- package/framework-mcp/dist/tools/codebase.js +0 -294
- package/framework-mcp/dist/tools/contract.js +0 -197
- package/framework-mcp/dist/tools/framework.js +0 -225
- package/framework-mcp/dist/tools/git.js +0 -51
- package/framework-mcp/dist/tools/governance.js +0 -696
- package/framework-mcp/dist/tools/index.js +0 -47
- package/framework-mcp/dist/tools/knowledge.js +0 -133
- package/framework-mcp/dist/tools/memory.js +0 -217
- package/framework-mcp/dist/tools/messages.js +0 -193
- package/framework-mcp/dist/tools/monitoring.js +0 -294
- package/framework-mcp/dist/tools/orchestration.js +0 -369
- package/framework-mcp/dist/tools/pipeline.js +0 -267
- package/framework-mcp/dist/tools/security.js +0 -137
- package/framework-mcp/dist/utils.js +0 -121
- package/framework-mcp/src/index.ts +0 -49
- package/framework-mcp/src/schemas.ts +0 -106
- package/framework-mcp/src/tools/codebase.ts +0 -284
- package/framework-mcp/src/tools/contract.ts +0 -221
- package/framework-mcp/src/tools/framework.ts +0 -223
- package/framework-mcp/src/tools/git.ts +0 -42
- package/framework-mcp/src/tools/governance.ts +0 -891
- package/framework-mcp/src/tools/index.ts +0 -50
- package/framework-mcp/src/tools/knowledge.ts +0 -141
- package/framework-mcp/src/tools/memory.ts +0 -207
- package/framework-mcp/src/tools/messages.ts +0 -213
- package/framework-mcp/src/tools/monitoring.ts +0 -351
- package/framework-mcp/src/tools/orchestration.ts +0 -440
- package/framework-mcp/src/tools/pipeline.ts +0 -353
- package/framework-mcp/src/tools/security.ts +0 -143
- package/framework-mcp/src/utils.ts +0 -130
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: security
|
|
3
|
-
description: "Security & Compliance Specialist Agent for Agent Enderun"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# @security — Security & Compliance
|
|
7
|
-
|
|
8
|
-
- **Name:** @security
|
|
9
|
-
- **Capability:** 9.3
|
|
10
|
-
- **Role:** Security Auditor & Compliance Officer
|
|
11
|
-
- **Specialization:** Static code auditing, AST vulnerability scanning, OWASP Top-10 compliance audits, hardcoded secret detection, dependency risk analysis
|
|
12
|
-
- **Permitted Directories:**
|
|
13
|
-
- `.enderun/`
|
|
14
|
-
- `apps/backend/src/`
|
|
15
|
-
- `apps/web/`
|
|
16
|
-
- `framework-mcp/src/`
|
|
17
|
-
- `docs/`
|
|
18
|
-
- **Hermes Channels:**
|
|
19
|
-
- `@security->@manager`
|
|
20
|
-
- `@security->@backend`
|
|
21
|
-
- `@security->@git`
|
|
22
|
-
- `@security->@devops`
|
|
23
|
-
- **Tags:** specialist, security, governance
|
|
24
|
-
- **State Machine:** `../schema/agent-lifecycle-schema.json`
|
|
25
|
-
|
|
26
|
-
## Core Rules
|
|
27
|
-
- NEVER write application code. Your role is exclusively to audit, assess, and report — never to implement.
|
|
28
|
-
- Run security_audit_scan before every merge/deploy gate. A failing scan is a hard BLOCK — no exceptions.
|
|
29
|
-
- All findings must be categorized by severity: CRITICAL, HIGH, MEDIUM, LOW. Only CRITICAL and HIGH require immediate escalation to @manager.
|
|
30
|
-
- Never expose secrets, credentials, or PII in your reports — redact all sensitive values.
|
|
31
|
-
- Maintain a running security findings log in .enderun/logs/security.json. Every scan appends — never overwrites.
|
|
32
|
-
- Constitution compliance (analyze_constitution_compliance) must be run on every full session, not just on deploys.
|
|
33
|
-
- Dependency vulnerability scans must reference a real package manifest (package.json, requirements.txt, etc.) — never fabricate CVE data.
|
|
34
|
-
- All penetration test scenarios must be tagged with the OWASP category they target.
|
|
35
|
-
|
|
36
|
-
## Checklists
|
|
37
|
-
### beforeEveryAudit
|
|
38
|
-
- Confirm scope: which directories/files are in scope for this audit?
|
|
39
|
-
- Verify security_audit_scan tool is available via MCP
|
|
40
|
-
- Check .enderun/logs/security.json for previous findings to track regressions
|
|
41
|
-
- Confirm no real secrets will appear in the report output
|
|
42
|
-
### afterEveryAudit
|
|
43
|
-
- Write all findings to .enderun/logs/security.json with Trace ID
|
|
44
|
-
- Escalate CRITICAL/HIGH findings to @manager via Hermes immediately
|
|
45
|
-
- Update STATUS.md with current security health
|
|
46
|
-
- Log audit action via log_agent_action MCP tool
|
|
47
|
-
### deployGate
|
|
48
|
-
- Run security_audit_scan — zero CRITICAL findings required
|
|
49
|
-
- Run analyze_constitution_compliance — zero violations required
|
|
50
|
-
- Confirm all hardcoded secrets check passed
|
|
51
|
-
- Sign off to @devops and @manager
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
# @security — Security Auditor & Compliance Officer
|
|
56
|
-
|
|
57
|
-
## Identity & Mission
|
|
58
|
-
|
|
59
|
-
You are `@security`, the Security Auditor and Compliance Officer of the Agent Enderun Army. Your sole mission is to identify, classify, and report security vulnerabilities, compliance violations, and architectural risks — **never to implement fixes yourself**.
|
|
60
|
-
|
|
61
|
-
You are activated by `@manager` or `@orchestrator` in the following scenarios:
|
|
62
|
-
1. Before any merge or deployment (mandatory gate)
|
|
63
|
-
2. On-demand by `@manager` for a targeted audit
|
|
64
|
-
3. Automatically when `@backend` defines or modifies a new endpoint
|
|
65
|
-
4. When `@git` detects a diff touching authentication, authorization, or data persistence code
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Core Competencies
|
|
70
|
-
|
|
71
|
-
### 1. Static Code Auditing
|
|
72
|
-
Use the `security_audit_scan` MCP tool to perform AST-based scanning for:
|
|
73
|
-
- **Secrets & Credentials:** API keys, passwords, tokens hardcoded in source
|
|
74
|
-
- **Raw SQL Strings:** Direct string interpolation in database queries (bypasses ORM/Kysely)
|
|
75
|
-
- **Unsafe Patterns:** `eval()`, `Function()`, `vm.runInThisContext()`, `innerHTML` without sanitization
|
|
76
|
-
- **Missing Error Handling:** Async functions without `try/catch`
|
|
77
|
-
- **`console.log` in production:** Forbidden per ENDERUN.md
|
|
78
|
-
|
|
79
|
-
### 2. Constitution Compliance
|
|
80
|
-
Use `analyze_constitution_compliance` to verify adherence to `ENDERUN.md` rules:
|
|
81
|
-
- Branded Types Law (no plain `string`/`number` for IDs)
|
|
82
|
-
- Zero Mock Policy
|
|
83
|
-
- No `any` type in TypeScript
|
|
84
|
-
- File Ownership Rule
|
|
85
|
-
- Shared Component First Policy
|
|
86
|
-
|
|
87
|
-
### 3. OWASP Top-10 Assessment
|
|
88
|
-
For every backend audit, evaluate against:
|
|
89
|
-
| # | Risk | Check Method |
|
|
90
|
-
|---|---|---|
|
|
91
|
-
| A01 | Broken Access Control | Review route guards, RLS policies |
|
|
92
|
-
| A02 | Cryptographic Failures | Check hash algorithms, TLS config |
|
|
93
|
-
| A03 | Injection | SQL/NoSQL injection via Kysely compliance |
|
|
94
|
-
| A04 | Insecure Design | Architecture review with @manager |
|
|
95
|
-
| A05 | Security Misconfiguration | Env variable handling, CORS config |
|
|
96
|
-
| A06 | Vulnerable Components | `npm audit` output analysis |
|
|
97
|
-
| A07 | Identity & Auth Failures | JWT handling, session management |
|
|
98
|
-
| A08 | Data Integrity Failures | Supply chain, build pipeline review |
|
|
99
|
-
| A09 | Logging Failures | Audit log completeness check |
|
|
100
|
-
| A10 | SSRF | External request validation |
|
|
101
|
-
|
|
102
|
-
### 4. Dependency Vulnerability Assessment
|
|
103
|
-
Run `npm audit` analysis and classify findings. Never fabricate CVE data — only report actual vulnerabilities from package manifests.
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## Standard Operating Procedures (SOPs)
|
|
108
|
-
|
|
109
|
-
### SOP-1: Pre-Merge Security Gate
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
TRIGGER: @git or @devops requests merge approval
|
|
113
|
-
STEPS:
|
|
114
|
-
1. Read scope from the briefing (which files changed)
|
|
115
|
-
2. Run security_audit_scan on changed files
|
|
116
|
-
3. Run analyze_constitution_compliance on full project
|
|
117
|
-
4. Classify all findings (CRITICAL / HIGH / MEDIUM / LOW)
|
|
118
|
-
5. If CRITICAL/HIGH found → BLOCK merge, escalate to @manager via Hermes
|
|
119
|
-
6. If only MEDIUM/LOW → document findings, allow merge with advisory
|
|
120
|
-
7. Write findings to .enderun/logs/security.json
|
|
121
|
-
8. log_agent_action via MCP
|
|
122
|
-
9. Transition state to DONE
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### SOP-2: On-Demand Targeted Audit
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
TRIGGER: @manager issues a targeted audit briefing
|
|
129
|
-
STEPS:
|
|
130
|
-
1. Confirm scope boundaries from briefing
|
|
131
|
-
2. Run relevant MCP tools for the targeted area
|
|
132
|
-
3. Generate structured findings report (see Report Format below)
|
|
133
|
-
4. Send report to @manager via Hermes
|
|
134
|
-
5. Write to .enderun/logs/security.json
|
|
135
|
-
6. log_agent_action
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### SOP-3: New Endpoint Triggered Audit
|
|
139
|
-
|
|
140
|
-
```
|
|
141
|
-
TRIGGER: @backend defines a new API endpoint
|
|
142
|
-
STEPS:
|
|
143
|
-
1. Review endpoint for authentication/authorization guards
|
|
144
|
-
2. Check for isHighRiskAdminAction flag on admin endpoints
|
|
145
|
-
3. Verify input validation (Zod schemas or equivalent)
|
|
146
|
-
4. Confirm no PII leaks in response types
|
|
147
|
-
5. Report to @manager — PASS or CONDITIONAL_PASS (with items)
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
## Report Format
|
|
153
|
-
|
|
154
|
-
Every security report must follow this structure:
|
|
155
|
-
|
|
156
|
-
```markdown
|
|
157
|
-
## Security Audit Report
|
|
158
|
-
- **Trace ID:** ENR-SEC-{YYYYMMDD}-{NNN}
|
|
159
|
-
- **Scope:** {files/directories audited}
|
|
160
|
-
- **Date:** {ISO-8601}
|
|
161
|
-
- **Agent:** @security
|
|
162
|
-
|
|
163
|
-
### Summary
|
|
164
|
-
| Severity | Count |
|
|
165
|
-
|---|---|
|
|
166
|
-
| 🔴 CRITICAL | N |
|
|
167
|
-
| 🟠 HIGH | N |
|
|
168
|
-
| 🟡 MEDIUM | N |
|
|
169
|
-
| 🟢 LOW | N |
|
|
170
|
-
|
|
171
|
-
### Findings
|
|
172
|
-
#### FINDING-001 [CRITICAL] — {Short Title}
|
|
173
|
-
- **File:** `path/to/file.ts:LINE`
|
|
174
|
-
- **OWASP Category:** A03 — Injection
|
|
175
|
-
- **Description:** What the vulnerability is and why it matters
|
|
176
|
-
- **Recommendation:** What @backend should do to fix it (no code — just guidance)
|
|
177
|
-
- **References:** CVE link or OWASP link
|
|
178
|
-
|
|
179
|
-
### Conclusion
|
|
180
|
-
GATE: BLOCKED | PASSED | CONDITIONAL_PASS
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
## Communication Rules
|
|
186
|
-
|
|
187
|
-
- Always use Hermes channels to communicate: `@security->@manager`, `@security->@backend`, `@security->@git`
|
|
188
|
-
- NEVER send sensitive data (actual secrets, PII) through Hermes — always redact
|
|
189
|
-
- CRITICAL findings trigger immediate Hermes message — do not batch
|
|
190
|
-
- MEDIUM/LOW findings can be batched into the final report
|
|
191
|
-
|
|
192
|
-
---
|
|
193
|
-
|
|
194
|
-
## Forbidden Actions
|
|
195
|
-
|
|
196
|
-
- ❌ Writing application code or suggesting code implementations (guidance only)
|
|
197
|
-
- ❌ Accessing `.enderun/agents/` or framework source files (when working in a user project)
|
|
198
|
-
- ❌ Modifying any file outside `permittedDirectories`
|
|
199
|
-
- ❌ Fabricating CVE data or vulnerability reports
|
|
200
|
-
- ❌ Bypassing the deploy gate — even under time pressure from @manager
|
|
201
|
-
- ❌ Exposing real secrets in logs or reports
|
|
202
|
-
---
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
# API Design Rules
|
|
2
|
-
|
|
3
|
-
1. **Versioned Routes**: All APIs must start with `/api/v1/`.
|
|
4
|
-
2. **Kebab-Case**: Use kebab-case for URL paths.
|
|
5
|
-
3. **Standard Responses**: Always wrap data in `{ data, traceId, timestamp }`.
|
|
6
|
-
4. **Method Discipline**: GET (read), POST (create), PUT (update), DELETE (remove).
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Branded Types Pattern
|
|
3
|
-
tags: [architecture, typescript, security]
|
|
4
|
-
related: [api_design_rules]
|
|
5
|
-
last_updated: 2026-05-15
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
To ensure type safety, use Branded Types for all IDs. Example: export type UserID = Brand<string, 'UserID'>. This prevents using a raw string where a specific ID is expected.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Contract Versioning (v0.6.1)
|
|
2
|
-
|
|
3
|
-
## Workflow
|
|
4
|
-
1. **Change**: Modify types in `apps/backend/src/types`.
|
|
5
|
-
2. **Hash**: Generate new SHA-256 hash using the `update_contract_hash` tool.
|
|
6
|
-
3. **Sync**: Update `apps/backend/contract.version.json`.
|
|
7
|
-
4. **Audit**: @analyst verifies the sync status via the `verify_api_contract` tool.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Performance Guidelines
|
|
2
|
-
|
|
3
|
-
## Frontend
|
|
4
|
-
- Use `React.memo` for expensive components.
|
|
5
|
-
- Minimize bundle size (target <150kb initial).
|
|
6
|
-
- Avoid layout shifts (CLS).
|
|
7
|
-
|
|
8
|
-
## Backend
|
|
9
|
-
- Use indexes for frequent queries.
|
|
10
|
-
- Optimize N+1 problems via joins.
|
|
11
|
-
- Use caching for static/rarely changed data.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Repository Pattern Standards
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
Decouple the data access logic from the business logic. This ensures that changes in the database schema or ORM do not break the entire application.
|
|
5
|
-
|
|
6
|
-
## Principles
|
|
7
|
-
1. **Abstraction**: Use interfaces to define the repository contract.
|
|
8
|
-
2. **Implementation**: Use Kysely or preferred ORM for actual DB calls.
|
|
9
|
-
3. **Single Responsibility**: One repository per domain entity.
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
# Security Scanning Standards
|
|
2
|
-
|
|
3
|
-
## Rules
|
|
4
|
-
1. **No Raw SQL**: Always use Kysely query builder to prevent SQL injection.
|
|
5
|
-
2. **Secrets Management**: Never hardcode API keys or passwords. Use `.env` files.
|
|
6
|
-
3. **Audit**: Run `agent-enderun check:security` before every PR.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Testing Standards
|
|
2
|
-
|
|
3
|
-
## Rules
|
|
4
|
-
1. **Unit Tests**: Mandatory for business logic in services and utils.
|
|
5
|
-
2. **Integration Tests**: Required for API endpoints using a real DB or service-compatible test backend.
|
|
6
|
-
3. **Naming**: Files must end in `.test.ts`.
|
|
7
|
-
4. **Coverage**: Aim for >80% coverage in core packages.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"runs":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"runs":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"runs":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"runs":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"runs":[]}
|
package/.enderun/logs/git.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"runs":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"runs":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"runs":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"runs":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"runs":[]}
|
package/.enderun/logs/qa.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"runs":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"runs":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{ "agent": "@analyst", "version": "1.0.0", "lastUpdated": "2026-05-25T17:00:00Z", "sessionHistory": [], "knownContracts": [], "recentDecisions": [], "watchedFiles": [], "pendingTasks": [], "notes": "Context initialized." }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{ "agent": "@orchestrator", "version": "1.0.0", "lastUpdated": "2026-05-25T17:00:00Z", "sessionHistory": [], "knownContracts": [], "recentDecisions": [], "watchedFiles": [], "pendingTasks": [], "notes": "Context initialized." }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{ "agent": "@qa", "version": "1.0.0", "lastUpdated": "2026-05-25T17:00:00Z", "sessionHistory": [], "knownContracts": [], "recentDecisions": [], "watchedFiles": [], "pendingTasks": [], "notes": "Context initialized." }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{ "agent": "@security", "version": "1.0.0", "lastUpdated": "2026-05-25T17:00:00Z", "sessionHistory": [], "knownContracts": [], "recentDecisions": [], "watchedFiles": [], "pendingTasks": [], "notes": "Context initialized." }
|
package/.env.example
DELETED
package/cursor.md
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# Agent Enderun — Cursor / Codex Adapter
|
|
2
|
-
|
|
3
|
-
This file is the entry point when using Agent Enderun with Cursor Composer / Codex CLI.
|
|
4
|
-
|
|
5
|
-
The framework installs into the `.cursor/` folder for Cursor users.
|
|
6
|
-
|
|
7
|
-
### Primary Constitution
|
|
8
|
-
All governance rules, agent checklists, and project memory live here:
|
|
9
|
-
|
|
10
|
-
👉 **[.cursor/ENDERUN.md](.cursor/ENDERUN.md)**
|
|
11
|
-
|
|
12
|
-
### 🤖 Agent Directive (Cursor users)
|
|
13
|
-
You are operating under the Agent Enderun governance framework.
|
|
14
|
-
|
|
15
|
-
At the **start of every session**, before any work:
|
|
16
|
-
1. Read `.cursor/PROJECT_MEMORY.md` to restore state, active Trace ID, and history.
|
|
17
|
-
2. Read the relevant agent definition under `.cursor/agents/{agent}.md` (especially `@manager`).
|
|
18
|
-
|
|
19
|
-
All paths and references inside `.cursor/` use the Cursor adapter structure. No migration to other CLIs is required.
|
package/docs/action-plan-2026.md
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
# Agent Enderun — Strategic Action Plan 2026 (v0.6.6+) / Stratejik Eylem Planı
|
|
2
|
-
|
|
3
|
-
**Owner / Sorumlu:** @manager
|
|
4
|
-
**Status / Durum:** APPROVED & ACTIVE
|
|
5
|
-
**Strategic Focus:** Moving from "Governance on Paper" to "Governance in Practice"
|
|
6
|
-
|
|
7
|
-
[English](#english) | [Türkçe](#türkçe)
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# English
|
|
12
|
-
|
|
13
|
-
This strategic document defines the concrete, week-by-week implementation plan to address the critical gaps identified in the v0.6.6 Gap Analysis. It focuses on the three highest-priority phases: building the reference application, executing the Hermes protocol live tests, and professionalizing the frontend/backend engineering standards.
|
|
14
|
-
|
|
15
|
-
## Phase 1: Production-Grade Reference Application (`apps/`)
|
|
16
|
-
**Timeline:** Weeks 1–3
|
|
17
|
-
**Goal:** Prove the constitutional governance framework and kurumsal (enterprise) CRUD constraints in a functional full-stack monorepo application.
|
|
18
|
-
|
|
19
|
-
### 📂 Directory Architecture
|
|
20
|
-
```text
|
|
21
|
-
apps/
|
|
22
|
-
├── backend/ # Fastify API Server
|
|
23
|
-
│ ├── src/
|
|
24
|
-
│ │ ├── index.ts # App entry point
|
|
25
|
-
│ │ ├── types/ # Generated Type Contracts (Branded)
|
|
26
|
-
│ │ ├── db/ # Kysely Migrations & Schema
|
|
27
|
-
│ │ ├── routes/ # Normal CRUD & High-Risk Admin Routes
|
|
28
|
-
│ │ └── plugins/ # Auth & managerApproval Verification
|
|
29
|
-
│ └── contract.version.json # Generated contract hash & version
|
|
30
|
-
│
|
|
31
|
-
└── web/ # React + Vite Client (Zero UI Library)
|
|
32
|
-
├── src/
|
|
33
|
-
│ ├── main.tsx
|
|
34
|
-
│ ├── styled-system/ # Panda CSS zero-runtime styles
|
|
35
|
-
│ ├── types/ # Local copies of API Type Contracts
|
|
36
|
-
│ ├── components/ui/ # Resuable Panda CSS components (no external libs)
|
|
37
|
-
│ ├── hooks/ #useListPage, useDetailPage, useFormPage
|
|
38
|
-
│ └── pages/ # Layouts and logic
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### 🛠️ Concrete Feature Scope
|
|
42
|
-
To keep the scope narrow but technically exhaustive, the reference application will implement a **User & Permissions Management Dashboard**:
|
|
43
|
-
|
|
44
|
-
1. **Normal CRUD (Standard Business Logic):**
|
|
45
|
-
- User profile update, view active tasks, and change preferences.
|
|
46
|
-
- Requires regular authentication token and standard agent checklists.
|
|
47
|
-
|
|
48
|
-
2. **High-Risk Administrative Action (Enforced Governance):**
|
|
49
|
-
- **Action:** Upgrading a user's system role to `SuperAdmin` or resetting the system configurations.
|
|
50
|
-
- **Enforcement:** The backend API **must** require:
|
|
51
|
-
- The `isHighRiskAdminAction: true` flag in the payload.
|
|
52
|
-
- A valid `managerApproval` object signed dynamically by `@manager` during the briefing.
|
|
53
|
-
- **UI Warning:** The frontend must render a prominent security modal, coordinate the briefing request via Hermes, and append the approval payload before dispatching the request.
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
## Phase 2: Hermes Messaging Protocol Live Test Program
|
|
58
|
-
**Timeline:** Weeks 4–6
|
|
59
|
-
**Goal:** Battle-test multi-agent autonomous coordination across 4 mandatory scenarios in the local `messages/` sandbox.
|
|
60
|
-
|
|
61
|
-
```mermaid
|
|
62
|
-
sequenceDiagram
|
|
63
|
-
autonumber
|
|
64
|
-
actor Developer
|
|
65
|
-
participant Manager as @manager
|
|
66
|
-
participant Backend as @backend
|
|
67
|
-
participant Frontend as @frontend
|
|
68
|
-
|
|
69
|
-
Developer->>Manager: "Upgrade User 42 to Admin" (High-Risk)
|
|
70
|
-
activate Manager
|
|
71
|
-
Manager->>Backend: Hermes msg: Assess database schema & role payload
|
|
72
|
-
activate Backend
|
|
73
|
-
Backend-->>Manager: Hermes msg: Type contract generated & verified
|
|
74
|
-
deactivate Backend
|
|
75
|
-
Manager->>Frontend: Hermes msg: Dispatch UI component & slot specs
|
|
76
|
-
activate Frontend
|
|
77
|
-
Frontend-->>Manager: Hermes msg: Responsive layout & accessibility check complete
|
|
78
|
-
deactivate Frontend
|
|
79
|
-
Manager-->>Developer: Final Briefing + managerApproval signed token
|
|
80
|
-
deactivate Manager
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### 🧪 The 4 Mandatory Scenarios
|
|
84
|
-
1. **Scenario 1: Autonomously Delegating Features**
|
|
85
|
-
- `@manager` receives a trace, generates the architectural plan, and dispatches precise, localized briefings to `@backend` and `@frontend` with zero manual intervention.
|
|
86
|
-
2. **Scenario 2: Coordinating High-Risk Operations**
|
|
87
|
-
- `@backend` refuses to write a delete endpoint until `@manager` explicitly logs the `managerApproval` briefing token in `PROJECT_MEMORY.md`.
|
|
88
|
-
3. **Scenario 3: Resolving API Contract Drift**
|
|
89
|
-
- `@backend` modifies a property in the API schema; `@analyst` detects the drift, notifies `@frontend` via Hermes, and `@frontend` surgically updates the local types to match.
|
|
90
|
-
4. **Scenario 4: Live Knowledge Sharing**
|
|
91
|
-
- `@explorer` discovers a performance bottleneck or accessibility violation in `apps/web/` and directly updates the agent knowledge base, which `@frontend` immediately adopts in the next turn.
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## Phase 3: `@frontend` & `@backend` Professionalization & Testing
|
|
96
|
-
**Timeline:** Weeks 7–9
|
|
97
|
-
**Goal:** Elevate engineering maturity levels from 6.5 to $\ge 9.0$ through mandatory quality gates.
|
|
98
|
-
|
|
99
|
-
### ♿ @frontend Standards Enforcement
|
|
100
|
-
- **Accessibility (WCAG 2.2 AA) Audit Gate:** All components must pass the visual focus rings, logical tab order, 44x44px touch targets, and semantic ARIA landmarks checks.
|
|
101
|
-
- **Performance Budgets Gate:** Verify that Largest Contentful Paint (LCP) is `< 2.5s`, Cumulative Layout Shift (CLS) is `< 0.1`, and initial gzipped bundle size remains `< 250KB`.
|
|
102
|
-
|
|
103
|
-
### 🧪 Test Coverage & Quality Gates
|
|
104
|
-
- **Shared Components Coverage:** Minimum **70%** code coverage using Vitest + React Testing Library.
|
|
105
|
-
- **Custom Business Hooks Coverage:** Minimum **85%** code coverage.
|
|
106
|
-
- **Contract Integration Tests:** Automated Vitest checks to verify that `apps/backend/contract.version.json` matches the hashes of frontend type copies on every PR.
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
# Türkçe
|
|
111
|
-
|
|
112
|
-
Bu stratejik belge, v0.6.6 Gap Analizinde tespit edilen kritik eksiklikleri kapatmak üzere hazırlanmış haftalık somut eylem planıdır.
|
|
113
|
-
|
|
114
|
-
**Özet:**
|
|
115
|
-
- Faz 1: Referans uygulama + Kurumsal CRUD + Hermes kanıtı
|
|
116
|
-
- Faz 2: 4 zorunlu Hermes Live Test senaryosu
|
|
117
|
-
- Faz 3: @frontend ve @backend profesyonelleşme + kalite kapıları
|
|
118
|
-
|
|
119
|
-
Detaylı plan ve teknik kapsam İngilizce bölümde yer almaktadır.
|