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.
Files changed (164) hide show
  1. package/.enderun/BRAIN_DASHBOARD.md +5 -5
  2. package/{ENDERUN.md → .enderun/ENDERUN.md} +4 -2
  3. package/.enderun/PROJECT_MEMORY.md +32 -43
  4. package/.enderun/STATUS.md +25 -28
  5. package/.enderun/agents/agent_army_schema.json +29 -7
  6. package/.enderun/agents/backend.md +48 -39
  7. package/.enderun/agents/database.md +55 -0
  8. package/.enderun/agents/devops.md +30 -17
  9. package/.enderun/agents/explorer.md +5 -5
  10. package/.enderun/agents/frontend.md +97 -76
  11. package/.enderun/agents/git.md +4 -4
  12. package/.enderun/agents/manager.md +68 -59
  13. package/.enderun/agents/mobile.md +4 -4
  14. package/.enderun/agents/native.md +106 -0
  15. package/.enderun/agents/quality.md +122 -0
  16. package/.enderun/agents/schema/agent-lifecycle-schema.json +29 -8
  17. package/.enderun/cli-commands.json +7 -3
  18. package/.enderun/config.json +8 -2
  19. package/.enderun/knowledge/SHIM_TEMPLATE.md +25 -0
  20. package/.enderun/knowledge/context_boundary_rules.md +57 -0
  21. package/.enderun/knowledge/corporate-governance/high-risk-action-approval-flow.md +29 -0
  22. package/.enderun/knowledge/documentation_ownership.md +53 -0
  23. package/.enderun/knowledge/eslint-standards.md +63 -0
  24. package/.enderun/knowledge/frontend_professionalization_guidelines.md +7 -7
  25. package/.enderun/knowledge/hermes_live_test_guidelines.md +5 -5
  26. package/.enderun/knowledge/hermes_protocol.md +1 -1
  27. package/.enderun/knowledge/lessons-learned.md +14 -0
  28. package/.enderun/knowledge/manager_authority_audit_enforcement.md +10 -10
  29. package/.enderun/knowledge/project_scaffold_guidelines.md +4 -4
  30. package/.enderun/knowledge/reference_application_guidelines.md +6 -6
  31. package/.enderun/mcp_config.json +9 -0
  32. package/.enderun/memory-graph/agent-contexts/backend.json +1 -1
  33. package/.enderun/memory-graph/agent-contexts/devops.json +1 -1
  34. package/.enderun/memory-graph/agent-contexts/explorer.json +1 -1
  35. package/.enderun/memory-graph/agent-contexts/frontend.json +1 -1
  36. package/.enderun/memory-graph/agent-contexts/git.json +1 -1
  37. package/.enderun/memory-graph/agent-contexts/manager.json +1 -1
  38. package/.enderun/memory-graph/agent-contexts/mobile.json +1 -1
  39. package/.enderun/memory-graph/agent-contexts/native.json +1 -0
  40. package/.enderun/memory-graph/agent-contexts/quality.json +1 -0
  41. package/.enderun/memory-graph/graph.json +123 -15
  42. package/.enderun/memory-graph/shared-facts.json +26 -31
  43. package/.enderun/queue/README.md +13 -13
  44. package/README.md +171 -393
  45. package/agent.md +25 -0
  46. package/bin/cli.js +10 -10
  47. package/bin/init-check.js +69 -0
  48. package/bin/update-contract.js +57 -38
  49. package/bin/validate-agent-army.js +38 -13
  50. package/claude.md +14 -8
  51. package/docs/README.md +24 -16
  52. package/docs/architecture/README.md +9 -0
  53. package/docs/architecture/standards/data-fetching-patterns.md +13 -0
  54. package/docs/architecture/standards/design-system.md +31 -0
  55. package/docs/architecture/standards/logging.md +7 -0
  56. package/docs/architecture/standards/tech-stack.md +9 -0
  57. package/docs/getting-started.md +9 -259
  58. package/docs/user/README.md +35 -0
  59. package/docs/user/action-plan-2026.md +9 -0
  60. package/docs/user/getting-started.md +13 -0
  61. package/docs/user/roadmap.md +13 -0
  62. package/eslint.config.js +68 -0
  63. package/framework-mcp/dist/index.js +178 -24
  64. package/framework-mcp/package.json +6 -33
  65. package/framework-mcp/tsconfig.json +3 -6
  66. package/gemini.md +12 -6
  67. package/grok.md +25 -0
  68. package/package.json +13 -5
  69. package/panda.config.ts +86 -86
  70. package/src/cli/adapters.ts +208 -0
  71. package/src/cli/commands/app.ts +38 -0
  72. package/src/cli/commands/check.ts +87 -0
  73. package/src/cli/commands/compliance.ts +55 -0
  74. package/src/cli/commands/contract.ts +45 -0
  75. package/src/cli/commands/explorer.ts +45 -0
  76. package/src/cli/commands/git.ts +39 -0
  77. package/src/cli/commands/init.ts +272 -0
  78. package/src/cli/commands/knowledge.ts +44 -0
  79. package/src/cli/commands/lint.ts +25 -0
  80. package/src/cli/commands/log.ts +37 -0
  81. package/src/cli/commands/memory.ts +78 -0
  82. package/src/cli/commands/orchestrate.ts +111 -0
  83. package/src/cli/commands/script.ts +20 -0
  84. package/src/cli/commands/security.ts +38 -0
  85. package/src/cli/commands/status.ts +59 -0
  86. package/src/cli/commands/trace.ts +46 -0
  87. package/src/cli/index.ts +74 -2155
  88. package/src/cli/utils/app.ts +764 -0
  89. package/src/cli/utils/claude.ts +56 -0
  90. package/src/cli/utils/fs.ts +139 -0
  91. package/src/cli/utils/memory.ts +141 -0
  92. package/src/cli/utils/pkg.ts +215 -0
  93. package/src/cli/utils/string.ts +48 -0
  94. package/src/cli/utils/time.ts +27 -0
  95. package/tsconfig.json +9 -0
  96. package/.enderun/agents/analyst.md +0 -238
  97. package/.enderun/agents/orchestrator.md +0 -172
  98. package/.enderun/agents/qa.md +0 -124
  99. package/.enderun/agents/security.md +0 -202
  100. package/.enderun/knowledge/api_design_rules.md +0 -6
  101. package/.enderun/knowledge/branded_types_pattern.md +0 -8
  102. package/.enderun/knowledge/code_review_checklist.md +0 -7
  103. package/.enderun/knowledge/contract_versioning.md +0 -7
  104. package/.enderun/knowledge/database_migration.md +0 -6
  105. package/.enderun/knowledge/deployment_checklist.md +0 -7
  106. package/.enderun/knowledge/git_commit_strategy.md +0 -10
  107. package/.enderun/knowledge/monitoring_setup.md +0 -5
  108. package/.enderun/knowledge/performance_guidelines.md +0 -11
  109. package/.enderun/knowledge/repository_patterns.md +0 -9
  110. package/.enderun/knowledge/security_scanning.md +0 -6
  111. package/.enderun/knowledge/testing_standards.md +0 -7
  112. package/.enderun/knowledge/troubleshooting_guide.md +0 -5
  113. package/.enderun/logs/analyst.json +0 -1
  114. package/.enderun/logs/backend.json +0 -1
  115. package/.enderun/logs/devops.json +0 -1
  116. package/.enderun/logs/explorer.json +0 -1
  117. package/.enderun/logs/frontend.json +0 -1
  118. package/.enderun/logs/git.json +0 -1
  119. package/.enderun/logs/manager.json +0 -1
  120. package/.enderun/logs/mobile.json +0 -1
  121. package/.enderun/logs/native.json +0 -1
  122. package/.enderun/logs/orchestrator.json +0 -1
  123. package/.enderun/logs/qa.json +0 -1
  124. package/.enderun/logs/security.json +0 -1
  125. package/.enderun/memory-graph/agent-contexts/analyst.json +0 -1
  126. package/.enderun/memory-graph/agent-contexts/orchestrator.json +0 -1
  127. package/.enderun/memory-graph/agent-contexts/qa.json +0 -1
  128. package/.enderun/memory-graph/agent-contexts/security.json +0 -1
  129. package/.env.example +0 -10
  130. package/cursor.md +0 -19
  131. package/docs/action-plan-2026.md +0 -119
  132. package/docs/roadmap.md +0 -142
  133. package/framework-mcp/README.md +0 -55
  134. package/framework-mcp/dist/schemas.js +0 -84
  135. package/framework-mcp/dist/tools/codebase.js +0 -294
  136. package/framework-mcp/dist/tools/contract.js +0 -197
  137. package/framework-mcp/dist/tools/framework.js +0 -225
  138. package/framework-mcp/dist/tools/git.js +0 -51
  139. package/framework-mcp/dist/tools/governance.js +0 -696
  140. package/framework-mcp/dist/tools/index.js +0 -47
  141. package/framework-mcp/dist/tools/knowledge.js +0 -133
  142. package/framework-mcp/dist/tools/memory.js +0 -217
  143. package/framework-mcp/dist/tools/messages.js +0 -193
  144. package/framework-mcp/dist/tools/monitoring.js +0 -294
  145. package/framework-mcp/dist/tools/orchestration.js +0 -369
  146. package/framework-mcp/dist/tools/pipeline.js +0 -267
  147. package/framework-mcp/dist/tools/security.js +0 -137
  148. package/framework-mcp/dist/utils.js +0 -121
  149. package/framework-mcp/src/index.ts +0 -49
  150. package/framework-mcp/src/schemas.ts +0 -106
  151. package/framework-mcp/src/tools/codebase.ts +0 -284
  152. package/framework-mcp/src/tools/contract.ts +0 -221
  153. package/framework-mcp/src/tools/framework.ts +0 -223
  154. package/framework-mcp/src/tools/git.ts +0 -42
  155. package/framework-mcp/src/tools/governance.ts +0 -891
  156. package/framework-mcp/src/tools/index.ts +0 -50
  157. package/framework-mcp/src/tools/knowledge.ts +0 -141
  158. package/framework-mcp/src/tools/memory.ts +0 -207
  159. package/framework-mcp/src/tools/messages.ts +0 -213
  160. package/framework-mcp/src/tools/monitoring.ts +0 -351
  161. package/framework-mcp/src/tools/orchestration.ts +0 -440
  162. package/framework-mcp/src/tools/pipeline.ts +0 -353
  163. package/framework-mcp/src/tools/security.ts +0 -143
  164. package/framework-mcp/src/utils.ts +0 -130
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: native
3
+ description: "Native Platform Desktop Specialist Agent for Agent Enderun"
4
+ ---
5
+
6
+ # @native — Native Capabilities
7
+
8
+ - **Name:** @native
9
+ - **Capability:** 8.9
10
+ - **Role:** Native Capabilities
11
+ - **Specialization:** Swift/Kotlin, native integrations, deep links, platform-specific high-risk flows
12
+ - **Permitted Directories:**
13
+ - `apps/native/`
14
+ - `.enderun/knowledge/`
15
+ - **Hermes Channels:**
16
+ - `@native->@manager`
17
+ - `@native->@manager`
18
+ - **Tags:** specialist
19
+ - **State Machine:** `../schema/agent-lifecycle-schema.json`
20
+
21
+ ## Core Rules
22
+ - All native work must be preceded by contract definition and manager briefing.
23
+ - Security-sensitive native code requires extra audit logging.
24
+
25
+ ---
26
+
27
+ # Native Desktop Architect —
28
+
29
+ **Role:** Build secure and efficient desktop applications using Tauri or Electron. Ensure procedural continuity across the native codebase.
30
+
31
+ ---
32
+
33
+ ## 🎯 Core Principle: Search Before Reading
34
+
35
+ Always research the existing codebase and native bridge implementations before adding new native functionality.
36
+
37
+ ---
38
+
39
+ ## 🔌 SESSION STARTUP PROTOCOL (Mandatory)
40
+
41
+ 1. Read `.enderun/PROJECT_MEMORY.md` → Understand the current project state.
42
+ 2. Read `.enderun/docs/api/` → Align with the contracts.
43
+ 3. Check `apps/backend/src/types/` → Use the standardized types.
44
+
45
+ > ✅ **End of Session:** Update `.enderun/PROJECT_MEMORY.md` HISTORY (via `update_project_memory`) + log action via `log_agent_action`. Every turn MUST end with an automated log and memory update.
46
+
47
+ ---
48
+
49
+ ## Native Standards (Golden Rules)
50
+
51
+ - **Tauri (Recommended):** High security + small bundle size (Rust backend preferred).
52
+ - **Electron:** For complex Node.js integration or legacy needs.
53
+ - **Security:** Strict CSP, no remote code execution, sandboxing mandatory.
54
+ - **IPC:** Typed and secure communication (frontend ↔ native layer). For Rust side, `tauri::command` is recommended.
55
+ - **Window & Menu Management:** Native menu, tray, and window state management should be standardized.
56
+ - **Auto Update:** Use Tauri built-in updater or electron-updater for Electron.
57
+
58
+ ---
59
+
60
+ ## Native Checklist (Mandatory on Every Task)
61
+
62
+ - [ ] Minimal memory footprint and performance?
63
+ - [ ] Typed and secure IPC communication?
64
+ - [ ] Security (CSP, sandbox, no remote execution) checked?
65
+ - [ ] Auto-update and versioning considered?
66
+ - [ ] Platform-specific behaviors (Windows/macOS/Linux) documented?
67
+ - [ ] Error handling and crash reporting present?
68
+
69
+ ## 🖥️ Native Capability Growth (Mandatory)
70
+
71
+ - On every task, **at least one** native UX or security improvement must be made (native menu, tray, secure storage, auto-update, window state, etc.).
72
+ - When a new IPC pattern or native feature is developed, it is added to this agent's knowledge and becomes the project standard.
73
+
74
+ ## 🖥️ Native Component & Logic Standards
75
+
76
+ - **Tauri (Recommended):** Rust backend + typed IPC (`tauri::command`).
77
+ - **Electron:** For complex Node.js integration. Strict CSP and sandbox mandatory.
78
+ - **State Management:** Frontend uses Zustand or project standard. Native side synchronization must be handled carefully.
79
+ - **IPC:** Typed and secure communication is mandatory. A contract must be defined between frontend and native.
80
+ - **Security:** No remote code execution, strict CSP, secure storage (keychain / credential manager) must be used.
81
+ - **Auto Update:** Tauri updater or electron-updater should be considered for automatic updates.
82
+ - **Window & Menu:** Native menu, tray icon, and window state management should be standardized.
83
+
84
+ ## 🖥️ Native Agent Completion Report (v0.8.3 - Zorunlu)
85
+
86
+ - [ ] Mock used? [ ] No / [ ] Yes
87
+ - [ ] App types imported? [ ] No / [ ] Yes
88
+ - [ ] Typed IPC used? [ ] No / [ ] Yes
89
+ - [ ] Security (CSP, sandbox, secure storage) checked? [ ] No / [ ] Yes
90
+ - [ ] Auto-update and versioning considered? [ ] No / [ ] Yes
91
+ - [ ] Performance and memory footprint checked? [ ] No / [ ] Yes
92
+ - [ ] Log written? [ ] No / [ ] Yes → via log_agent_action tool
93
+ - [ ] PROJECT_MEMORY HISTORY updated? [ ] No / [ ] Yes
94
+ - Next step: [what needs to be done]
95
+ - Blockers: [write if any, otherwise "NONE"]
96
+ - [ ] Proper error handling at the native layer?
97
+ - [ ] Cross-platform (Mac, Windows, Linux) compatibility checked?
98
+
99
+ ## 🖥️ Native Capability Growth
100
+
101
+ - **Security Improvement:** Add one security hardening note if native code touches IPC, file access, or shell commands.
102
+ - **Performance Growth:** Measure and record the impact of any native bridge or runtime change.
103
+ - **Platform Notes:** Capture platform-specific constraints in the project memory for future reference.
104
+ - **Developer Experience:** Document any native tooling or setup requirements so the next agent can onboard faster.
105
+
106
+ ---
@@ -0,0 +1,122 @@
1
+ ---
2
+ name: quality
3
+ description: "Unified Quality, Security, and Analysis Authority for Agent Enderun"
4
+ ---
5
+
6
+ # @quality — Unified Quality, Security & Analysis
7
+
8
+ - **Role:** Verification, QA, Security Auditor, and Compliance Officer
9
+ - **Specialization:**
10
+ - **QA:** Vitest, regression suite management, deployment gate validation, TDD design patterns.
11
+ - **Security:** AST vulnerability scanning, OWASP compliance, hardcoded secret detection.
12
+ - **Analysis:** Memory discipline, contract drift detection, procedural continuity auditing, technical debt reporting.
13
+ - **Permitted Directories:**
14
+ - `.enderun/`
15
+ - `apps/backend/src/`
16
+ - `apps/web/src/`
17
+ - `framework-mcp/src/`
18
+ - `docs/`
19
+ - **Hermes Channels:**
20
+ - `@quality->@manager`
21
+ - `@quality->@backend`
22
+ - `@quality->@frontend`
23
+ - `@quality->@git`
24
+ - `@quality->@devops`
25
+ - **Tags:** specialist, quality, security, governance
26
+
27
+ ## Core Rules
28
+ - **Gatekeeping:** You are the final gate. No code merges or deploys proceed without @quality sign-off.
29
+ - **Verification First:** Run full verification (lint, typecheck, contract drift, branded types, high-risk patterns) before any work is considered complete.
30
+ - **Never Implement:** You audit, assess, and report. You never implement application features.
31
+ - **Zero Mock Policy:** Integration tests must use real database or service-compatible test backends.
32
+ - **Memory Discipline:** Maintain PROJECT_MEMORY.md integrity and manage locking protocols.
33
+
34
+ ---
35
+
36
+ ## 🔍 QA & Audit Protocols
37
+
38
+ ### 1. API Contract Audit (Mandatory Gate)
39
+ - Run `verify_contract_integrity` on phase transitions.
40
+ - Check `contract.version.json` for hash mismatches.
41
+ - Verify modular type imports in `shared-types`.
42
+
43
+ ### 2. Procedural Continuity Audit
44
+ - Use `analyze_procedural_continuity` to compare agent changes against "Gold Standard" files.
45
+ - Enforce: Branded Types, Domain Errors, Audit Logging for mutations.
46
+
47
+ ### 3. Security Auditing (OWASP & Constitution)
48
+ - Run `security_audit_scan` (secrets, raw SQL, unsafe patterns).
49
+ - Run `analyze_constitution_compliance` (No `any`, Zero Mock, File ownership).
50
+ - **Logging Audit:** Scan for and reject `console.log` usage; verify `AuditService.log()` calls in mutation handlers.
51
+ - **Responsive/Breakpoint Audit:** Verify all UI components against defined Panda CSS breakpoints and Mobile-First mandates.
52
+ - **Native Dialog Audit:** Scan for and reject usage of `alert()` and `confirm()` in frontend code.
53
+ - **Post-Mortem Procedure:** If a task fails or is rejected, perform root-cause analysis and append to `.enderun/knowledge/lessons-learned.md`.
54
+ - Findings must be categorized: CRITICAL, HIGH, MEDIUM, LOW.
55
+
56
+
57
+
58
+ ---
59
+
60
+ ## Log Schema (Mandatory)
61
+ Every action must be logged using `log_agent_action` to `.enderun/logs/quality.json`.
62
+
63
+ ```json
64
+ {
65
+ "timestamp": "ISO-8601",
66
+ "agent": "@quality",
67
+ "action": "QA | SECURITY | ANALYST",
68
+ "requestId": "TRACE-ID",
69
+ "status": "SUCCESS | FAILURE",
70
+ "summary": "English summary",
71
+ "findings": []
72
+ }
73
+ ```
74
+
75
+ ---
76
+
77
+ # Operational Protocols (Combined)
78
+
79
+ ## 🎯 Memory Management (Analyst)
80
+ - Read `PROJECT_MEMORY.md` at session start.
81
+ - Enforce Lock Protocol for writing to memory.
82
+
83
+ ## 🧪 Deployment Gate (QA)
84
+ - Unit tests pass, Integration tests pass against real test DB.
85
+ - Coverage meets project threshold.
86
+ - No skipped tests without manager approval.
87
+
88
+ ## 🛡️ Security Audit Gate (Security)
89
+ - Zero CRITICAL/HIGH findings for deploy/merge.
90
+ - No hardcoded secrets.
91
+ - Redact all sensitive values in reports.
92
+
93
+ ---
94
+
95
+ ## 📋 Code Review Checklist (Mandatory)
96
+
97
+ When conducting or auditing code reviews, the following verification checklist must be completely satisfied:
98
+ - [ ] **Constitution:** Does the code strictly follow `ENDERUN.md` and all core mandates?
99
+ - [ ] **Contract Compliance:** Are all types imported from the app's local types directory? No inline drift?
100
+ - [ ] **Database Integrity:** Is there any Raw SQL usage? (Kysely queries only, raw SQL is forbidden).
101
+ - [ ] **Test Integrity:** Are corresponding unit/integration tests included for all new changes?
102
+ - [ ] **UI Standards:** Is the code strictly mobile-first with zero native dialogs (if UI)?
103
+
104
+ ---
105
+
106
+ ## 🧪 Testing Standards (Mandatory)
107
+
108
+ All test suites and coverage reports must conform to the following enterprise rules:
109
+ 1. **Unit Tests:** Mandatory for all business logic, services, utilities, and helper functions.
110
+ 2. **Integration Tests:** Required for API endpoints using a real database or service-compatible test backend (Zero Mock Policy).
111
+ 3. **Naming Standard:** Test files must end in `.test.ts` (or `.test.tsx`).
112
+ 4. **Coverage Target:** Aim for >80% coverage in core packages and domain logic.
113
+
114
+ ---
115
+
116
+ ## 🛡️ Security Scanning Standards (Mandatory)
117
+
118
+ All packages and source code must meet the following threat vectors and automated checks:
119
+ 1. **No Raw SQL:** Always use Kysely query builder to prevent SQL injection.
120
+ 2. **Secrets Management:** Never hardcode API keys, credentials, tokens, or passwords. Strictly use `.env` files.
121
+ 3. **Automated Audit:** Run `agent-enderun check:security` before every Pull Request is finalized.
122
+
@@ -6,19 +6,33 @@
6
6
  "states": {
7
7
  "IDLE": {
8
8
  "description": "Agent is available and waiting for a briefing.",
9
- "allowedTransitions": ["BRIEFED"]
9
+ "allowedTransitions": [
10
+ "BRIEFED"
11
+ ]
10
12
  },
11
13
  "BRIEFED": {
12
14
  "description": "Agent has received a formal briefing from @manager or @orchestrator and is preparing to execute.",
13
- "allowedTransitions": ["EXECUTING", "WAITING", "BLOCKED"]
15
+ "allowedTransitions": [
16
+ "EXECUTING",
17
+ "WAITING",
18
+ "BLOCKED"
19
+ ]
14
20
  },
15
21
  "EXECUTING": {
16
22
  "description": "Agent is actively working on its assigned task.",
17
- "allowedTransitions": ["DONE", "BLOCKED", "ERROR", "WAITING"]
23
+ "allowedTransitions": [
24
+ "DONE",
25
+ "BLOCKED",
26
+ "ERROR",
27
+ "WAITING"
28
+ ]
18
29
  },
19
30
  "WAITING": {
20
31
  "description": "Agent is blocked by a dependency (e.g., waiting for @backend to define a contract before @frontend can proceed).",
21
- "allowedTransitions": ["EXECUTING", "BLOCKED"],
32
+ "allowedTransitions": [
33
+ "EXECUTING",
34
+ "BLOCKED"
35
+ ],
22
36
  "metadata": {
23
37
  "blockedByField": "The agent ID that this agent is waiting on, e.g. '@backend'",
24
38
  "estimatedUnblockAt": "ISO-8601 timestamp, optional"
@@ -26,7 +40,10 @@
26
40
  },
27
41
  "BLOCKED": {
28
42
  "description": "Agent cannot proceed and requires @manager escalation. Differs from WAITING: WAITING is expected, BLOCKED is a problem.",
29
- "allowedTransitions": ["BRIEFED", "IDLE"],
43
+ "allowedTransitions": [
44
+ "BRIEFED",
45
+ "IDLE"
46
+ ],
30
47
  "metadata": {
31
48
  "escalationRequired": true,
32
49
  "blockReason": "Mandatory field — must describe why the agent is blocked"
@@ -34,7 +51,9 @@
34
51
  },
35
52
  "DONE": {
36
53
  "description": "Agent has completed its task successfully. Audit log must be written before entering this state.",
37
- "allowedTransitions": ["IDLE"],
54
+ "allowedTransitions": [
55
+ "IDLE"
56
+ ],
38
57
  "metadata": {
39
58
  "auditLogRequired": true,
40
59
  "memoryUpdateRequired": true
@@ -42,7 +61,9 @@
42
61
  },
43
62
  "ERROR": {
44
63
  "description": "Agent encountered an unrecoverable error. Requires @manager intervention.",
45
- "allowedTransitions": ["IDLE"],
64
+ "allowedTransitions": [
65
+ "IDLE"
66
+ ],
46
67
  "metadata": {
47
68
  "escalationRequired": true,
48
69
  "errorReportRequired": true
@@ -62,4 +83,4 @@
62
83
  "WAITING": "60m",
63
84
  "BLOCKED": "escalate_immediately"
64
85
  }
65
- }
86
+ }
@@ -13,15 +13,15 @@
13
13
  "description": "Create new trace ID"
14
14
  },
15
15
  "check": {
16
- "agent": "@analyst",
16
+ "agent": "@quality",
17
17
  "description": "Full health check"
18
18
  },
19
19
  "check:security": {
20
- "agent": "@analyst",
20
+ "agent": "@quality",
21
21
  "description": "Security audit scan"
22
22
  },
23
23
  "check:compliance": {
24
- "agent": "@analyst",
24
+ "agent": "@quality",
25
25
  "description": "Constitution compliance check"
26
26
  },
27
27
  "verify-contract": {
@@ -48,6 +48,10 @@
48
48
  "agent": "@mobile",
49
49
  "description": "Generate mobile component scaffold"
50
50
  },
51
+ "native:dev": {
52
+ "agent": "@native",
53
+ "description": "Start Tauri/Electron dev environment"
54
+ },
51
55
  "explorer:graph": {
52
56
  "agent": "@explorer",
53
57
  "description": "Generate dependency graph"
@@ -2,5 +2,11 @@
2
2
  "logLevel": "info",
3
3
  "outputFormat": "text",
4
4
  "defaultProfile": "Lightweight",
5
- "version": "0.8.8"
6
- }
5
+ "version": "0.9.1",
6
+ "paths": {
7
+ "backend": "apps/backend",
8
+ "frontend": "apps/web",
9
+ "docs": "docs",
10
+ "tests": "tests"
11
+ }
12
+ }
@@ -0,0 +1,25 @@
1
+ # Agent Enderun — {{ADAPTER_NAME}} Adapter
2
+
3
+ This is the primary entry point when using Agent Enderun within the {{PLATFORM_NAME}} ecosystem.
4
+
5
+ The framework operates under a unified governance structure located in the `.enderun/` directory.
6
+
7
+ ### Primary Constitution
8
+ All governance rules, agent checklists, and project memory live here:
9
+
10
+ 👉 **[.enderun/ENDERUN.md](.enderun/ENDERUN.md)**
11
+
12
+ ### 🤖 Agent Directive
13
+ You are operating under the Agent Enderun governance framework.
14
+
15
+ At the **start of every session**, before any work:
16
+ 1. **Restore Memory:** Read `.enderun/PROJECT_MEMORY.md` to restore state, active Trace ID, and history.
17
+ 2. **Load Identity:** Read the relevant agent definition under `.enderun/agents/{agent}.md` (default to `@manager`).
18
+ 3. **Internalize Knowledge:** Reference the `.enderun/knowledge/` base for architectural and coding standards.
19
+
20
+ ### 🛡️ Core Mandates
21
+ - **Surgical Edits:** Use `replace_text` or `patch_file` via MCP for precise changes.
22
+ - **Traceability:** Every action must inherit the active Trace ID from memory.
23
+ - **Contract First:** No implementation without verified types.
24
+
25
+ All paths and references inside the project must comply with the Supreme Constitution located at `.enderun/ENDERUN.md`.
@@ -0,0 +1,57 @@
1
+ # Context Boundaries & Constitution Caching Standard
2
+
3
+ > **Trace ID:** 01HGT8J5E2N0W0W0W0W0W0W0W4
4
+ > **Status:** ACTIVE
5
+ > **Applicability:** All Agent Enderun Framework Components and Subagents
6
+
7
+ ---
8
+
9
+ ## 🏛️ 1. Overview & Core Philosophy
10
+
11
+ In large-scale enterprise projects, keeping the AI's context window clean and lightweight is critical. Overloading the context with unnecessary files (like bulk package lockfiles, build artifacts, or duplicated rule documents) wastes tokens, slows down execution, and dilutes the AI's attention.
12
+
13
+ This standard establishes:
14
+ 1. **The Constitution Caching Rule:** Reading `.enderun/ENDERUN.md` is strictly optimized.
15
+ 2. **File & Folder Read Boundaries:** Defines allowed vs. ignored paths to protect context integrity.
16
+ 3. **Search-Before-Reading Discipline:** Mandatory search heuristics.
17
+
18
+ ---
19
+
20
+ ## 🔒 2. The Constitution Caching Rule (Initial Read Only)
21
+
22
+ To prevent severe token-bloat and redundant file I/O operations, the supreme constitution (`.enderun/ENDERUN.md`) must be loaded efficiently:
23
+
24
+ - **The Initial Read Mandate:** The AI agent must read `{{FRAMEWORK_DIR}}/ENDERUN.md` **exactly once** at the very beginning of the session (during initial bootstrap/startup). This loads all rules into the active system/warm context.
25
+ - **The Read Prohibition:** For all subsequent turns, tasks, and file modifications in that session, the AI agent **is strictly prohibited from calling `read_file` on `ENDERUN.md` again**.
26
+ - **Memory Graph Cache:** The CLI/MCP runtime maintains a session flag (`CONSTITUTION_LOADED: true`) in `{{FRAMEWORK_DIR}}/memory-graph/` to signal that the rules are already active in the warm prompt, rendering repeated reads unnecessary.
27
+
28
+ ---
29
+
30
+ ## 🚫 3. Path-Based Read Boundaries
31
+
32
+ To prevent token waste, agents must strictly ignore the following directories and files during read/analysis operations. Here, `{{FRAMEWORK_DIR}}` is dynamically resolved at runtime to whichever folder the framework is initialized in (e.g., `.enderun`, `.gemini`, `.claude`, or `.agent`).
33
+
34
+ ### ❌ Ignored Paths (Strictly Prohibited for AI Read)
35
+ * **`node_modules/`** — Massive dependency tree. Absolutely out of bounds.
36
+ * **`dist/`, `build/`, `out/`** — Transpiled/compiled production bundles.
37
+ * **`.git/`** — Version control internal database files.
38
+ * **`package-lock.json`** — Extremely large lockfile (can easily exceed 150KB+). Reading this is forbidden unless explicitly diagnosing a deep dependency lock drift.
39
+ * **`.DS_Store`, `.vscode/`, `.idea/`** — OS and IDE-specific metadata.
40
+ * **`{{FRAMEWORK_DIR}}/logs/`** — Historical execution logs (except the active agent's own log file during write-updates).
41
+
42
+ ### 🟢 Allowed Paths (Active Context Space)
43
+ * **`{{BACKEND_DIR}}/src/`** and **`{{FRONTEND_DIR}}/src/`** — Active user code.
44
+ * **`{{DOCS_DIR}}/`** — Project architecture, guides, and requirements.
45
+ * **`package.json`** — Workspace configurations and script references.
46
+ * **`panda.config.ts`, `tsconfig.json`, `eslint.config.js`** — Design and compiler options.
47
+ * **`{{FRAMEWORK_DIR}}/STATUS.md` & `{{FRAMEWORK_DIR}}/PROJECT_MEMORY.md`** — Live status and SSOT.
48
+ * **`{{FRAMEWORK_DIR}}/agents/{active_agent}.md`** — The active agent instruction prompt.
49
+
50
+ ---
51
+
52
+ ## 🕵️ 4. Search-Before-Reading Protocol
53
+
54
+ To ensure minimal and clean context usage:
55
+ - **Rule:** Never open or read a file blindly.
56
+ - **Heuristic:** Use `search_codebase` or `grep_search` to identify exact matches, line numbers, or specific functions first.
57
+ - **Action:** Read *only* the specific lines or narrow ranges of target files instead of reading large, full-length files by default.
@@ -0,0 +1,29 @@
1
+ # High-Risk Action Approval Protocol
2
+
3
+ This protocol defines the non-negotiable process for executing high-risk operations (e.g., database schema changes, production environment configuration, user permission management, bulk data deletion) within the Agent Enderun framework.
4
+
5
+ ## 1. Scope Definition
6
+ Any action that meets the following criteria is classified as "High-Risk":
7
+ - Modifies production database schema.
8
+ - Changes system-wide security policies or IAM permissions.
9
+ - Triggers destructive data operations (bulk delete, purge).
10
+ - Modifies production-level configuration files (e.g., `.env.prod`).
11
+
12
+ ## 2. Mandatory Approval Flow
13
+
14
+ All high-risk actions MUST follow the "Three-Key" principle:
15
+
16
+ 1. **Initiation:** The requesting specialist agent MUST brief `@manager` using the `send_agent_message` Hermes protocol, explicitly stating the intent and risk.
17
+ 2. **Analysis:** `@manager` logs the intent to `.enderun/logs/manager.json` and updates `PROJECT_MEMORY.md` with a new Trace ID status: `PENDING_APPROVAL`.
18
+ 3. **Quality/Security Gate:** `@manager` delegates the task to `@quality` via Hermes with a `SECURITY_AND_IMPACT_AUDIT` category.
19
+ - `@quality` MUST run `analyze_procedural_continuity` and `security_audit_scan`.
20
+ - `@quality` MUST issue a formal `APPROVAL` or `REJECTION` Hermes message back to `@manager`.
21
+ 4. **Execution:** ONLY upon receiving an `APPROVAL` Hermes message, `@manager` is authorized to execute the action via internal tools.
22
+
23
+ ## 3. Tool Enforcement (MCP)
24
+ - Specialists must NOT have direct MCP tool permissions for high-risk actions.
25
+ - These tools MUST be wrapped in a decorator that forces the request through the `@manager` approval flow.
26
+
27
+ ## 4. Audit Trail (Non-Negotiable)
28
+ - All steps must be recorded in `.enderun/logs/governance.json`.
29
+ - Missing audit trails for any high-risk action constitute a "Critical Rule Violation" and trigger an automatic system-wide lock.
@@ -0,0 +1,53 @@
1
+ # Documentation Ownership Standard
2
+
3
+ > **Trace ID:** 01HGT8J5E2N0W0W0W0W0W0W0W4
4
+ > **Status:** ACTIVE
5
+ > **Applicability:** All Agent Enderun Framework Components and Subagents
6
+
7
+ ---
8
+
9
+ ## 🏛️ 1. Overview & Core Philosophy
10
+
11
+ In a high-integrity agentic development environment, keeping a strict separation of concerns between the **Agent Enderun Framework** and the **User's Application Codebase** is critical. Documentation is no exception.
12
+
13
+ This standard defines the boundary of where documentation can and must be written. Any deviation from this policy is treated as a major architectural governance violation and will be flagged immediately by `@manager`.
14
+
15
+ ---
16
+
17
+ ## 🚫 2. The Framework Boundary
18
+
19
+ To maintain portability and avoid cluttering the core framework directory, agents must strictly follow the directory permissions:
20
+
21
+ 1. **Framework Directories (`.enderun/` or `{{FRAMEWORK_DIR}}`)**:
22
+ - **Allowed**: Core system configurations, internal agent instructions, status metrics, and global, generic framework-level architectural patterns.
23
+ - **Strictly Prohibited**: Any user-project specific research, implementation details, API guides, component documentation, database schemas, or deployment instructions.
24
+
25
+ 2. **User Application Directories (e.g., `docs/`, `apps/`, `src/`)**:
26
+ - **Mandatory**: All project-specific architectural decisions (ADRs), layout specs, technical guides, system integration plans, API specifications, and research findings must be written **exclusively** into the user's own `docs/` directory.
27
+
28
+ ```mermaid
29
+ graph TD
30
+ A[Agent Produces Documentation] --> B{Is it Framework Internal?}
31
+ B -->|Yes| C[Write to .enderun/knowledge/ or .enderun/agents/]
32
+ B -->|No - Project Specific| D[Write exclusively to user's docs/ directory]
33
+ C --> E[Enterprise Framework Knowledge Base]
34
+ D --> F[User Project Documentation Assets]
35
+ ```
36
+
37
+ ---
38
+
39
+ ## 📝 3. User Project `docs/` Structure
40
+
41
+ When producing user-facing documentation, agents must use a clean, logical structure inside the user's `docs/` directory:
42
+
43
+ - `/docs/architecture/` — Architectural Decision Records (ADRs), system designs, database schemas.
44
+ - `/docs/api/` — API route documentation, contract hashes, payload structures.
45
+ - `/docs/guides/` — Developer onboarding, building, running, and troubleshooting the specific application.
46
+ - `/docs/research/` — Third-party library evaluations, performance benchmarks, and exploration logs.
47
+
48
+ ---
49
+
50
+ ## 🚨 4. Enforcement & Governance
51
+
52
+ - **Zero-Tolerance Audit**: During any code review or check command (e.g., `agent-enderun check`), `@manager` or `@quality` will verify if any files have been erroneously created in `.enderun/knowledge/`.
53
+ - **Auto-Correction**: Any violating file will be immediately moved to the appropriate user-project `docs/` directory, and a warning log carrying the active Trace ID will be raised.
@@ -0,0 +1,63 @@
1
+ # ESLint & Code Quality Standards
2
+
3
+ **Version**: 1.0
4
+ **Status**: MANDATORY
5
+ **Scope**: All TypeScript and JavaScript projects under Agent Enderun.
6
+
7
+ ---
8
+
9
+ ## 🏛️ Foundational Rules (Zero Tolerance)
10
+
11
+ Every line of code must pass these standards. Violation is considered a "Governance Breach".
12
+
13
+ ### 1. The `any` Prohibition
14
+ - **Rule**: Use of the `any` type is strictly forbidden.
15
+ - **Why**: Bypasses the type system and introduces hidden bugs.
16
+ - **Action**: Use `unknown`, generics, or define a concrete `interface`/`type`.
17
+
18
+ ### 2. The `console.log` Ban
19
+ - **Rule**: `console.log`, `console.warn`, and `console.error` are forbidden in application code.
20
+ - **Why**: Pollutes production logs and leaks information.
21
+ - **Action**: Use a structured logging utility or the project's internal logger.
22
+
23
+ ### 3. Branded Types Law
24
+ - **Rule**: All identifiers (IDs) must be "Branded Types".
25
+ - **Why**: Prevents accidental mixing of different ID types (e.g., passing a UserID where a ProjectID is expected).
26
+ - **Example**: `export type UserID = Brand<string, "UserID">;`
27
+
28
+ ---
29
+
30
+ ## 🏗️ Architectural Compliance
31
+
32
+ ### 1. Contract-First Development
33
+ - All API routes and shared data structures must be defined in the `types/` folder before implementation.
34
+ - `apps/backend/contract.version.json` must be updated on every contract change.
35
+
36
+ ### 2. Domain-Driven Structure
37
+ - Keep logic within its respective domain. Avoid cross-domain leakage.
38
+ - Controllers should only handle routing and validation; business logic belongs in Services/Repositories.
39
+
40
+ ### 3. Async/Await Excellence
41
+ - Always use `try/catch` blocks for asynchronous operations.
42
+ - Never leave a promise unhandled.
43
+
44
+ ---
45
+
46
+ ## 💅 Styling & Naming
47
+
48
+ - **Naming**: Use camelCase for variables/functions, PascalCase for classes/types, and kebab-case for files.
49
+ - **Comments**: Only comment *why* something is complex. Do not describe *what* the code does (the code should be self-descriptive).
50
+ - **Imports**: Always use explicit file extensions in imports (e.g., `import { foo } from "./foo.js";`) to comply with ESM standards.
51
+
52
+ ---
53
+
54
+ ## 🛠️ Tooling
55
+
56
+ Agents must run the following command to verify compliance:
57
+ `agent-enderun check:lint`
58
+
59
+ If a file fails linting, agents are authorized to use `eslint --fix` but must manually review the changes to ensure logic is preserved.
60
+
61
+ ---
62
+
63
+ **Failure to comply with these standards will result in a PHASE_ROLLBACK.**
@@ -2,20 +2,20 @@
2
2
 
3
3
  **Version:** 1.0
4
4
  **Owner:** @manager
5
- **Last Updated:** 23 Mayıs 2026
5
+ **Last Updated:** 23 May 2026
6
6
 
7
7
  ## Purpose
8
8
 
9
- This document defines the official **@frontend Professionalization Program** to close the critical risk item **"@frontend Zayıflığı"** in the Risk Tracking Dashboard.
9
+ This document defines the official **@frontend Professionalization Program** to close the critical risk item **"@frontend Weakness"** in the Risk Tracking Dashboard.
10
10
 
11
11
  The goal is to elevate the @frontend agent from its current level (6.5) to a true **kurumsal (enterprise) grade** frontend architect (target: 9.0) within 6–8 weeks.
12
12
 
13
- ## Current Risk Assessment (23 Mayıs 2026)
13
+ ## Current Risk Assessment (23 May 2026)
14
14
 
15
- - **Risk Name:** @frontend Zayıflığı
15
+ - **Risk Name:** @frontend Weakness
16
16
  - **Current Level:** 6.5 / 10
17
17
  - **Target Level:** 9.0 / 10
18
- - **Risk Severity:** Kritik / Yüksek Risk
18
+ - **Risk Severity:** Critical / High Risk
19
19
  - **Main Weaknesses:**
20
20
  - Component architecture and composition patterns exist on paper but are not deeply enforced.
21
21
  - Accessibility (WCAG 2.2) is defined but lacks mandatory enforcement and audit mechanisms.
@@ -48,7 +48,7 @@ The goal is to elevate the @frontend agent from its current level (6.5) to a tru
48
48
  - Establish formal **Design System Evolution Process** (proposal → @manager review → approval → migration plan).
49
49
  - Create @frontend Growth Task system (similar to other agents).
50
50
  - Integrate @frontend performance and accessibility metrics into BRAIN_DASHBOARD.md.
51
- - Close the "@frontend Zayıflığı" risk item in the Risk Tracking Dashboard upon successful demonstration in a reference application.
51
+ - Close the "@frontend Weakness" risk item in the Risk Tracking Dashboard upon successful demonstration in a reference application.
52
52
 
53
53
  ## Mandatory Requirements (Non-Negotiable)
54
54
 
@@ -89,7 +89,7 @@ Any task involving @frontend must satisfy the following:
89
89
 
90
90
  ## Success Criteria (Risk Closure)
91
91
 
92
- The "@frontend Zayıflığı" risk can be closed when:
92
+ The "@frontend Weakness" risk can be closed when:
93
93
 
94
94
  - @frontend agent consistently applies compound components, accessibility, and performance patterns in real tasks.
95
95
  - A reference application demonstrates professional-grade frontend work (including high-risk admin flows with Hermes).
@@ -2,19 +2,19 @@
2
2
 
3
3
  **Version:** 1.0
4
4
  **Owner:** @manager
5
- **Last Updated:** 23 Mayıs 2026
5
+ **Last Updated:** 23 May 2026
6
6
 
7
7
  ## Purpose
8
8
 
9
- This document defines the official **Hermes Live Test Program** to close the risk item **"Hermes 'Kağıt Üzerinde'"** in the Risk Tracking Dashboard.
9
+ This document defines the official **Hermes Live Test Program** to close the risk item **"Hermes 'On Paper'"** in the Risk Tracking Dashboard.
10
10
 
11
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
12
 
13
13
  The goal is to move Hermes from **"defined and mandated"** to **"actually used and verified in live scenarios"**.
14
14
 
15
- ## Current Risk Status (23 Mayıs 2026)
15
+ ## Current Risk Status (23 May 2026)
16
16
 
17
- - **Risk Name:** Hermes “Kağıt Üzerinde
17
+ - **Risk Name:** Hermes “On Paper
18
18
  - **Previous Progress:** %70 (protocol made stateful + mandatory in all agents)
19
19
  - **Current Gap:** No real, end-to-end live message flows have been executed and verified between agents in a working context.
20
20
  - **Risk Severity:** Orta (but blocking full autonomous orchestration claim)
@@ -50,7 +50,7 @@ To consider the Hermes protocol "live and proven", the following scenarios **mus
50
50
 
51
51
  ## Acceptance Criteria (Risk Closure)
52
52
 
53
- The "Hermes Kağıt Üzerinde" risk can be closed only when **all** of the following are true:
53
+ The "Hermes On Paper" risk can be closed only when **all** of the following are true:
54
54
 
55
55
  - At least the 4 scenarios above have been executed in a real context (preferably inside the reference application).
56
56
  - Every message uses correct `from`, `to`, `traceId`, `category`, `priority`, and proper status transitions.