agent-enderun 0.8.7 → 0.9.0
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.md → .enderun/ENDERUN.md} +5 -3
- package/.enderun/PROJECT_MEMORY.md +12 -53
- package/.enderun/STATUS.md +7 -8
- package/.enderun/agents/agent_army_schema.json +28 -6
- package/.enderun/agents/analyst.md +9 -18
- package/.enderun/agents/backend.md +22 -52
- package/.enderun/agents/devops.md +9 -19
- package/.enderun/agents/explorer.md +7 -16
- package/.enderun/agents/frontend.md +82 -84
- package/.enderun/agents/git.md +7 -16
- package/.enderun/agents/manager.md +34 -40
- package/.enderun/agents/mobile.md +7 -16
- package/.enderun/agents/native.md +7 -16
- package/.enderun/agents/orchestrator.md +16 -25
- package/.enderun/agents/qa.md +12 -24
- package/.enderun/agents/schema/agent-lifecycle-schema.json +29 -8
- package/.enderun/agents/security.md +9 -18
- package/.enderun/config.json +1 -1
- package/.enderun/knowledge/SHIM_TEMPLATE.md +25 -0
- package/.enderun/knowledge/eslint-standards.md +63 -0
- package/.enderun/knowledge/hermes_protocol.md +1 -1
- package/.enderun/knowledge/token_economy_and_memory.md +129 -0
- package/.enderun/mcp_config.json +9 -0
- package/.enderun/memory-graph/agent-contexts/analyst.json +1 -1
- 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 -1
- package/.enderun/memory-graph/agent-contexts/orchestrator.json +1 -1
- package/.enderun/memory-graph/agent-contexts/qa.json +1 -1
- package/.enderun/memory-graph/agent-contexts/security.json +1 -1
- package/.enderun/memory-graph/graph.json +123 -16
- package/.enderun/memory-graph/shared-facts.json +26 -32
- package/README.md +93 -295
- package/agent.md +25 -0
- package/bin/cli.js +9 -9
- package/bin/update-contract.js +34 -37
- package/bin/validate-agent-army.js +38 -13
- package/claude.md +14 -8
- package/docs/README.md +35 -16
- package/docs/roadmap.md +1 -1
- package/docs/tech-stack.md +30 -0
- package/eslint.config.js +68 -0
- package/framework-mcp/dist/index.js +184 -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/mcp.json +2 -2
- package/package.json +12 -6
- package/panda.config.ts +86 -86
- package/tsconfig.json +9 -0
- package/.enderun/claude.md +0 -19
- package/.enderun/cursor.md +0 -19
- package/.enderun/gemini.md +0 -19
- 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/.env.example +0 -10
- package/cursor.md +0 -19
- package/framework-mcp/README.md +0 -55
- package/framework-mcp/dist/schemas.js +0 -118
- 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 -196
- 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 -200
- 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 -368
- 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 -192
- 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
- package/src/cli/index.ts +0 -2188
|
@@ -3,25 +3,16 @@ name: orchestrator
|
|
|
3
3
|
description: "Task Queue & Parallel Execution Specialist Agent for Agent Enderun"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# @orchestrator —
|
|
7
|
-
|
|
8
|
-
- **Name:** orchestrator
|
|
9
|
-
- **Capability:** 9.0
|
|
10
|
-
- **Role:** orchestrator
|
|
11
|
-
- **State Machine:** `../schema/agent-lifecycle-schema.json`
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# @orchestrator — Task Queue & Parallel Execution
|
|
6
|
+
# @orchestrator — Task Queue & Parallel Execution
|
|
16
7
|
|
|
17
8
|
- **Name:** @orchestrator
|
|
18
9
|
- **Capability:** 9.8
|
|
19
10
|
- **Role:** Task Queue & Parallel Execution Engine
|
|
20
11
|
- **Specialization:** Dependency resolution, task DAG construction, capability-based assignment, parallel execution enforcement, lifecycle monitoring
|
|
21
12
|
- **Permitted Directories:**
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
13
|
+
- `.enderun/`
|
|
14
|
+
- `.enderun/queue/`
|
|
15
|
+
- `.enderun/memory-graph/`
|
|
25
16
|
- **Hermes Channels:**
|
|
26
17
|
- `@orchestrator->*`
|
|
27
18
|
- `@orchestrator->@manager`
|
|
@@ -37,7 +28,7 @@ description: "Task Queue & Parallel Execution Specialist Agent for Agent Enderun
|
|
|
37
28
|
- BLOCKED escalation: If an agent is in BLOCKED state for more than 5 minutes, @orchestrator automatically escalates to @manager via Hermes.
|
|
38
29
|
- WAITING timeout: If an agent is in WAITING state for more than 60 minutes, @orchestrator escalates to @manager — the dependency may be stale or unresolvable.
|
|
39
30
|
- @orchestrator NEVER makes architectural or code decisions. It only coordinates who does what and when.
|
|
40
|
-
- All orchestration actions must be logged to
|
|
31
|
+
- All orchestration actions must be logged to .enderun/logs/orchestrator.json with Trace ID and timestamp.
|
|
41
32
|
|
|
42
33
|
## Checklists
|
|
43
34
|
### beforeAssigningTask
|
|
@@ -48,9 +39,9 @@ description: "Task Queue & Parallel Execution Specialist Agent for Agent Enderun
|
|
|
48
39
|
- Verify target agent is in IDLE or DONE state before assigning
|
|
49
40
|
### afterEveryAssignment
|
|
50
41
|
- Update STATUS.md: agent state → BRIEFED
|
|
51
|
-
- Write task to
|
|
52
|
-
- Log assignment to
|
|
53
|
-
- Log escalation to
|
|
42
|
+
- Write task to .enderun/queue/pending/{traceId}.json
|
|
43
|
+
- Log assignment to .enderun/logs/orchestrator.json
|
|
44
|
+
- Log escalation to .enderun/logs/orchestrator.json
|
|
54
45
|
### armyStatusCheck
|
|
55
46
|
- Read STATUS.md for all agent states
|
|
56
47
|
- Identify any WAITING agents whose dependencies are now resolved
|
|
@@ -60,7 +51,7 @@ description: "Task Queue & Parallel Execution Specialist Agent for Agent Enderun
|
|
|
60
51
|
|
|
61
52
|
---
|
|
62
53
|
|
|
63
|
-
# @orchestrator — Task Queue & Parallel Execution Engine
|
|
54
|
+
# @orchestrator — Task Queue & Parallel Execution Engine —
|
|
64
55
|
|
|
65
56
|
## Identity & Mission
|
|
66
57
|
|
|
@@ -96,7 +87,7 @@ Parallel opportunities: T002 and T003 can start simultaneously after T001.
|
|
|
96
87
|
T004 can start simultaneously with T002 and T003.
|
|
97
88
|
```
|
|
98
89
|
|
|
99
|
-
JSON representation stored in
|
|
90
|
+
JSON representation stored in `.enderun/queue/`:
|
|
100
91
|
```json
|
|
101
92
|
{
|
|
102
93
|
"traceId": "ENR-ARMY-001",
|
|
@@ -171,11 +162,11 @@ STEPS:
|
|
|
171
162
|
4. Score and assign agents to each task
|
|
172
163
|
5. Broadcast assignments via Hermes to each agent
|
|
173
164
|
6. Update STATUS.md (all assigned agents: IDLE → BRIEFED)
|
|
174
|
-
7. Write DAG to
|
|
175
|
-
10. Final: all tasks DONE → write to
|
|
176
|
-
6. Generate snapshot and log to
|
|
177
|
-
5. Log broadcast to
|
|
178
|
-
6. Log resolution to
|
|
179
|
-
- ❌ Writing to any directory outside
|
|
165
|
+
7. Write DAG to .enderun/queue/pending/{traceId}.json
|
|
166
|
+
10. Final: all tasks DONE → write to .enderun/queue/completed/
|
|
167
|
+
6. Generate snapshot and log to .enderun/logs/orchestrator.json
|
|
168
|
+
5. Log broadcast to .enderun/logs/orchestrator.json
|
|
169
|
+
6. Log resolution to .enderun/logs/orchestrator.json
|
|
170
|
+
- ❌ Writing to any directory outside `.enderun/` and `.enderun/queue/`
|
|
180
171
|
```
|
|
181
172
|
---
|
package/.enderun/agents/qa.md
CHANGED
|
@@ -3,16 +3,7 @@ name: qa
|
|
|
3
3
|
description: "Quality Assurance & Test Specialist Agent for Agent Enderun"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# @qa —
|
|
7
|
-
|
|
8
|
-
- **Name:** qa
|
|
9
|
-
- **Capability:** 9.0
|
|
10
|
-
- **Role:** qa
|
|
11
|
-
- **State Machine:** `../schema/agent-lifecycle-schema.json`
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# @qa — Quality Assurance & Test
|
|
6
|
+
# @qa — Quality Assurance & Test
|
|
16
7
|
|
|
17
8
|
- **Name:** @qa
|
|
18
9
|
- **Capability:** 9.1
|
|
@@ -23,7 +14,7 @@ description: "Quality Assurance & Test Specialist Agent for Agent Enderun"
|
|
|
23
14
|
- `apps/web/src/__tests__/`
|
|
24
15
|
- `apps/backend/src/`
|
|
25
16
|
- `framework-mcp/src/__tests__/`
|
|
26
|
-
-
|
|
17
|
+
- `.enderun/logs/`
|
|
27
18
|
- `docs/`
|
|
28
19
|
- **Hermes Channels:**
|
|
29
20
|
- `@qa->@manager`
|
|
@@ -38,8 +29,8 @@ description: "Quality Assurance & Test Specialist Agent for Agent Enderun"
|
|
|
38
29
|
- NEVER write production application code. Your scope is exclusively test code and quality reports.
|
|
39
30
|
- Zero Mock Test Policy: Integration tests must use real database or service-compatible test backends. Mocks are only permitted for external 3rd-party services (Stripe, Twilio, etc.).
|
|
40
31
|
- QA Gate is non-negotiable: No deploy proceeds without @qa sign-off. Not even @manager can override this gate.
|
|
41
|
-
-
|
|
42
|
-
- Every failing test must have a Trace ID and be logged to
|
|
32
|
+
- Coverage thresholds are project-defined and must be read from the project's vitest/jest config — never self-imposed.
|
|
33
|
+
- Every failing test must have a Trace ID and be logged to .enderun/logs/qa.json.
|
|
43
34
|
- Regression tests must be run after every @backend contract change (Phase Rollback triggers automatic QA re-run).
|
|
44
35
|
- Test plans must be written before implementation starts (TDD-first mindset when requested).
|
|
45
36
|
- Never delete or skip a test without @manager explicit written approval. Skipped tests must have a documented reason.
|
|
@@ -47,25 +38,24 @@ description: "Quality Assurance & Test Specialist Agent for Agent Enderun"
|
|
|
47
38
|
## Checklists
|
|
48
39
|
### beforeWritingTests
|
|
49
40
|
- Read API contract (apps/backend/contract.version.json) to understand current type surface
|
|
50
|
-
- Identify which functions/endpoints need unit vs integration
|
|
41
|
+
- Identify which functions/endpoints need unit vs integration tests
|
|
51
42
|
- Confirm test database or service mock availability
|
|
52
43
|
- Check existing test coverage to avoid duplication
|
|
53
44
|
### deployGate
|
|
54
45
|
- All unit tests pass (vitest/jest)
|
|
55
46
|
- Integration tests pass against real test DB
|
|
56
|
-
-
|
|
57
|
-
- Code coverage meets the **minimum 80% threshold** on modified and core domain paths
|
|
47
|
+
- Coverage meets configured threshold
|
|
58
48
|
- No skipped tests without documented reason
|
|
59
49
|
- Sign off to @devops and @manager
|
|
60
50
|
### afterEveryTestRun
|
|
61
|
-
- Write results summary to
|
|
51
|
+
- Write results summary to .enderun/logs/qa.json with Trace ID
|
|
62
52
|
- Update STATUS.md HealthScore for relevant agents
|
|
63
53
|
- Escalate any NEW failing tests to @manager immediately
|
|
64
54
|
- log_agent_action via MCP
|
|
65
55
|
|
|
66
56
|
---
|
|
67
57
|
|
|
68
|
-
# @qa — Quality Assurance & Test Engineering
|
|
58
|
+
# @qa — Quality Assurance & Test Engineering —
|
|
69
59
|
|
|
70
60
|
## Identity & Mission
|
|
71
61
|
|
|
@@ -91,10 +81,10 @@ Design the right test type for the right situation:
|
|
|
91
81
|
|
|
92
82
|
### 2. Coverage Analysis
|
|
93
83
|
- Read coverage thresholds from `vitest.config.ts` or `jest.config.*` — never self-impose numbers
|
|
94
|
-
- Flag files below threshold as `COVERAGE_DEBT` in
|
|
95
|
-
7. Log results to
|
|
84
|
+
- Flag files below threshold as `COVERAGE_DEBT` in `.enderun/logs/qa.json`
|
|
85
|
+
7. Log results to .enderun/logs/qa.json
|
|
96
86
|
|
|
97
|
-
## Log Format (
|
|
87
|
+
## Log Format (`.enderun/logs/qa.json`)
|
|
98
88
|
|
|
99
89
|
```json
|
|
100
90
|
{
|
|
@@ -126,8 +116,6 @@ Design the right test type for the right situation:
|
|
|
126
116
|
- ❌ Writing production application code
|
|
127
117
|
- ❌ Deleting or permanently skipping tests without @manager approval
|
|
128
118
|
- ❌ Using mocks for database persistence in integration tests
|
|
129
|
-
- ❌ Overriding coverage thresholds
|
|
119
|
+
- ❌ Overriding coverage thresholds without @manager written approval
|
|
130
120
|
- ❌ Allowing a deploy to proceed when the gate is failed — even under pressure
|
|
131
|
-
- ❌ Skipping regression tests on hotfixes or production releases
|
|
132
|
-
- ❌ Deploying to production without automated Playwright E2E verification on critical user flows
|
|
133
121
|
---
|
|
@@ -6,19 +6,33 @@
|
|
|
6
6
|
"states": {
|
|
7
7
|
"IDLE": {
|
|
8
8
|
"description": "Agent is available and waiting for a briefing.",
|
|
9
|
-
"allowedTransitions": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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
|
+
}
|
|
@@ -3,23 +3,14 @@ name: security
|
|
|
3
3
|
description: "Security & Compliance Specialist Agent for Agent Enderun"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# @security —
|
|
7
|
-
|
|
8
|
-
- **Name:** security
|
|
9
|
-
- **Capability:** 9.0
|
|
10
|
-
- **Role:** security
|
|
11
|
-
- **State Machine:** `../schema/agent-lifecycle-schema.json`
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# @security — Security & Compliance
|
|
6
|
+
# @security — Security & Compliance
|
|
16
7
|
|
|
17
8
|
- **Name:** @security
|
|
18
9
|
- **Capability:** 9.3
|
|
19
10
|
- **Role:** Security Auditor & Compliance Officer
|
|
20
11
|
- **Specialization:** Static code auditing, AST vulnerability scanning, OWASP Top-10 compliance audits, hardcoded secret detection, dependency risk analysis
|
|
21
12
|
- **Permitted Directories:**
|
|
22
|
-
-
|
|
13
|
+
- `.enderun/`
|
|
23
14
|
- `apps/backend/src/`
|
|
24
15
|
- `apps/web/`
|
|
25
16
|
- `framework-mcp/src/`
|
|
@@ -37,7 +28,7 @@ description: "Security & Compliance Specialist Agent for Agent Enderun"
|
|
|
37
28
|
- Run security_audit_scan before every merge/deploy gate. A failing scan is a hard BLOCK — no exceptions.
|
|
38
29
|
- All findings must be categorized by severity: CRITICAL, HIGH, MEDIUM, LOW. Only CRITICAL and HIGH require immediate escalation to @manager.
|
|
39
30
|
- Never expose secrets, credentials, or PII in your reports — redact all sensitive values.
|
|
40
|
-
- Maintain a running security findings log in
|
|
31
|
+
- Maintain a running security findings log in .enderun/logs/security.json. Every scan appends — never overwrites.
|
|
41
32
|
- Constitution compliance (analyze_constitution_compliance) must be run on every full session, not just on deploys.
|
|
42
33
|
- Dependency vulnerability scans must reference a real package manifest (package.json, requirements.txt, etc.) — never fabricate CVE data.
|
|
43
34
|
- All penetration test scenarios must be tagged with the OWASP category they target.
|
|
@@ -46,10 +37,10 @@ description: "Security & Compliance Specialist Agent for Agent Enderun"
|
|
|
46
37
|
### beforeEveryAudit
|
|
47
38
|
- Confirm scope: which directories/files are in scope for this audit?
|
|
48
39
|
- Verify security_audit_scan tool is available via MCP
|
|
49
|
-
- Check
|
|
40
|
+
- Check .enderun/logs/security.json for previous findings to track regressions
|
|
50
41
|
- Confirm no real secrets will appear in the report output
|
|
51
42
|
### afterEveryAudit
|
|
52
|
-
- Write all findings to
|
|
43
|
+
- Write all findings to .enderun/logs/security.json with Trace ID
|
|
53
44
|
- Escalate CRITICAL/HIGH findings to @manager via Hermes immediately
|
|
54
45
|
- Update STATUS.md with current security health
|
|
55
46
|
- Log audit action via log_agent_action MCP tool
|
|
@@ -61,7 +52,7 @@ description: "Security & Compliance Specialist Agent for Agent Enderun"
|
|
|
61
52
|
|
|
62
53
|
---
|
|
63
54
|
|
|
64
|
-
# @security — Security Auditor & Compliance Officer
|
|
55
|
+
# @security — Security Auditor & Compliance Officer —
|
|
65
56
|
|
|
66
57
|
## Identity & Mission
|
|
67
58
|
|
|
@@ -126,7 +117,7 @@ STEPS:
|
|
|
126
117
|
4. Classify all findings (CRITICAL / HIGH / MEDIUM / LOW)
|
|
127
118
|
5. If CRITICAL/HIGH found → BLOCK merge, escalate to @manager via Hermes
|
|
128
119
|
6. If only MEDIUM/LOW → document findings, allow merge with advisory
|
|
129
|
-
7. Write findings to
|
|
120
|
+
7. Write findings to .enderun/logs/security.json
|
|
130
121
|
8. log_agent_action via MCP
|
|
131
122
|
9. Transition state to DONE
|
|
132
123
|
```
|
|
@@ -140,7 +131,7 @@ STEPS:
|
|
|
140
131
|
2. Run relevant MCP tools for the targeted area
|
|
141
132
|
3. Generate structured findings report (see Report Format below)
|
|
142
133
|
4. Send report to @manager via Hermes
|
|
143
|
-
5. Write to
|
|
134
|
+
5. Write to .enderun/logs/security.json
|
|
144
135
|
6. log_agent_action
|
|
145
136
|
```
|
|
146
137
|
|
|
@@ -203,7 +194,7 @@ GATE: BLOCKED | PASSED | CONDITIONAL_PASS
|
|
|
203
194
|
## Forbidden Actions
|
|
204
195
|
|
|
205
196
|
- ❌ Writing application code or suggesting code implementations (guidance only)
|
|
206
|
-
- ❌ Accessing
|
|
197
|
+
- ❌ Accessing `.enderun/agents/` or framework source files (when working in a user project)
|
|
207
198
|
- ❌ Modifying any file outside `permittedDirectories`
|
|
208
199
|
- ❌ Fabricating CVE data or vulnerability reports
|
|
209
200
|
- ❌ Bypassing the deploy gate — even under time pressure from @manager
|
package/.enderun/config.json
CHANGED
|
@@ -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,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.**
|
|
@@ -48,7 +48,7 @@ Every message sent via `send_agent_message` must follow this conceptual structur
|
|
|
48
48
|
1. **Dispatch:** Agent calls `send_agent_message`. Message is saved in `.enderun/messages/recipient.json`.
|
|
49
49
|
2. **Notification:** The recipient agent checks their inbox during their turn via `read_agent_messages`.
|
|
50
50
|
3. **Acknowledgment:** For `ACTION` or `DELEGATION`, the recipient should send an `INFO` message back once started or completed.
|
|
51
|
-
4. **Logging:** All critical communications must be summarized in the agent's
|
|
51
|
+
4. **Logging:** All critical communications must be summarized in the agent's log file (`.enderun/logs/agent.json`).
|
|
52
52
|
|
|
53
53
|
---
|
|
54
54
|
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Token Economy & Agent Memory
|
|
2
|
+
|
|
3
|
+
This document defines the operating rules for managing token consumption while preserving full agent capabilities and maintaining a usable, persistent memory across sessions.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
- Reduce prompt cost and improve response speed by delivering only the relevant context to each agent.
|
|
8
|
+
- Preserve a persistent project memory and per-agent private context so agents can recall prior actions and decisions without re-reading the entire codebase.
|
|
9
|
+
- Keep all agents fully capable: do not shrink agent roles or rules to save tokens.
|
|
10
|
+
- Use memory as a structured retrieval layer, not as a replacement for agent intelligence.
|
|
11
|
+
|
|
12
|
+
## Key Principles
|
|
13
|
+
|
|
14
|
+
### 1. Memory First, Not Memory Only
|
|
15
|
+
|
|
16
|
+
- Agents must always start by checking the persistent project memory and agent context before taking action.
|
|
17
|
+
- If the required information is already stored, the agent should use the stored summary instead of reading the full history or code again.
|
|
18
|
+
- Memory retrieval reduces repeated context, but agents still keep their full capability set intact.
|
|
19
|
+
|
|
20
|
+
### 2. Separate Persistent Memory from Live Context
|
|
21
|
+
|
|
22
|
+
- `PROJECT_MEMORY.md` is the shared project brain: phase, active tasks, decisions, release tracking.
|
|
23
|
+
- `memory-graph/shared-facts.json` is the shared facts store: tech stack, policy roster, contract location, active policies.
|
|
24
|
+
- `memory-graph/agent-contexts/{agent}.json` is private context for each agent.
|
|
25
|
+
- Use `get_agent_context` and `update_agent_context` for agent-specific memory.
|
|
26
|
+
- Use `read_project_memory` and `get_memory_insights` for project-wide state.
|
|
27
|
+
|
|
28
|
+
### 3. Keep Memory Summaries Short and Relevant
|
|
29
|
+
|
|
30
|
+
- Store only the essence of what changed, why it changed, and what remains pending.
|
|
31
|
+
- Do not duplicate entire logs or every code snippet.
|
|
32
|
+
- For long histories, preserve the last 3–5 key decisions in active memory and archive older details in a separate file if needed.
|
|
33
|
+
|
|
34
|
+
### 4. Use Tools, Not Manual Copying
|
|
35
|
+
|
|
36
|
+
- The available tools are the only safe way to read or write memory:
|
|
37
|
+
- `read_project_memory`
|
|
38
|
+
- `update_project_memory`
|
|
39
|
+
- `get_agent_context`
|
|
40
|
+
- `update_agent_context`
|
|
41
|
+
- `get_memory_insights`
|
|
42
|
+
- `update_shared_facts`
|
|
43
|
+
- Do not bypass them with raw file reads or writes.
|
|
44
|
+
|
|
45
|
+
### 5. Token Economy Rules
|
|
46
|
+
|
|
47
|
+
- Always `search_codebase` or `get_project_gaps` before reading large files.
|
|
48
|
+
- Prefer summaries over raw content.
|
|
49
|
+
- Only include the minimum relevant file snippets in prompts.
|
|
50
|
+
- Do not resend the same context multiple times in one session.
|
|
51
|
+
- Use `get_memory_insights` to extract the latest active tasks and decisions rather than reading the full `PROJECT_MEMORY.md` every time.
|
|
52
|
+
|
|
53
|
+
## Memory and Token Flow
|
|
54
|
+
|
|
55
|
+
### Session Startup
|
|
56
|
+
|
|
57
|
+
1. `read_project_memory` to restore the active phase, trace, tasks, and history.
|
|
58
|
+
2. `get_agent_context` for the current agent.
|
|
59
|
+
3. `get_memory_insights` for a compact summary of recent activity.
|
|
60
|
+
4. If the previous session is not fresh, use the agent context summary instead of reloading full histories.
|
|
61
|
+
|
|
62
|
+
### During Work
|
|
63
|
+
|
|
64
|
+
- When a user asks a question, first determine whether the answer depends on:
|
|
65
|
+
- current project status,
|
|
66
|
+
- active trace,
|
|
67
|
+
- recent decisions,
|
|
68
|
+
- per-agent execution state.
|
|
69
|
+
- If yes, retrieve the appropriate memory object and include only the relevant summary.
|
|
70
|
+
- If code context is needed, fetch only the directly impacted file or function.
|
|
71
|
+
|
|
72
|
+
### End of Session
|
|
73
|
+
|
|
74
|
+
- `update_project_memory` for `HISTORY` and `ACTIVE TASKS`.
|
|
75
|
+
- `update_agent_context` with a short summary of the work performed and the current agent state.
|
|
76
|
+
- Optionally `update_shared_facts` if the change affects shared policies, tech stack, or contract status.
|
|
77
|
+
|
|
78
|
+
## Agent Context Format
|
|
79
|
+
|
|
80
|
+
Agents should keep their private context small and specific.
|
|
81
|
+
|
|
82
|
+
Example file: `.enderun/memory-graph/agent-contexts/manager.json`
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"lastSession": "2026-05-28T12:00:00Z",
|
|
87
|
+
"lastTraceId": "01H7G8K5TJ5S6MF9Z7H8N4C2P",
|
|
88
|
+
"recentDecisions": [
|
|
89
|
+
"Release 0.8.8 metadata synchronization",
|
|
90
|
+
"Do not reduce agent capability for token economy"
|
|
91
|
+
],
|
|
92
|
+
"pendingReview": [
|
|
93
|
+
"Token economy memory protocol draft",
|
|
94
|
+
"Project phase transition strategy"
|
|
95
|
+
],
|
|
96
|
+
"updatedAt": "2026-05-28T12:00:00Z"
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Memory Usage Guidelines
|
|
101
|
+
|
|
102
|
+
- `@manager`: stores strategic decisions, active task summaries, and phase transitions.
|
|
103
|
+
- `@orchestrator`: stores DAG state, task dependencies, and agent handoff summaries.
|
|
104
|
+
- `@analyst`: stores verification findings, rejected issues, and quality gate status.
|
|
105
|
+
- `@frontend`, `@backend`, `@security`, `@qa`: store recent implementation context, verification outcomes, and compliance notes.
|
|
106
|
+
|
|
107
|
+
## Avoiding Token Inefficiency
|
|
108
|
+
|
|
109
|
+
- Do not send the whole `PROJECT_MEMORY.md` in every prompt.
|
|
110
|
+
- Only include the relevant `ACTIVE TASKS`, `CRITICAL DECISIONS`, and the current trace if necessary.
|
|
111
|
+
- Use `get_memory_insights` to get a compact summary rather than full data.
|
|
112
|
+
- Avoid attaching full file contents unless the task requires precise code changes.
|
|
113
|
+
|
|
114
|
+
## When to Archive History
|
|
115
|
+
|
|
116
|
+
- If `PROJECT_MEMORY.md` history grows beyond 10 entries, move older entries into `.enderun/memory-graph/archive/`.
|
|
117
|
+
- Keep the active history list focused on recent strategic changes and release-critical decisions.
|
|
118
|
+
- The archive is still part of the project brain, but not part of every prompt.
|
|
119
|
+
|
|
120
|
+
## Summary
|
|
121
|
+
|
|
122
|
+
Token economy in Agent Enderun is not about limiting agent power.
|
|
123
|
+
It is about using structured memory, summaries, and retrieval tools so every agent can remember prior work and still operate at full capability.
|
|
124
|
+
|
|
125
|
+
- Keep agent rules intact.
|
|
126
|
+
- Use `PROJECT_MEMORY.md` for shared state.
|
|
127
|
+
- Use `agent-contexts` for private agent memory.
|
|
128
|
+
- Use the memory tools to read and update memory.
|
|
129
|
+
- Only include what is relevant in prompts.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{
|
|
1
|
+
{"agent": "analyst", "version": "0.9.0", "lastUpdated": "2026-05-29T15:41:37Z", "sessionHistory": [], "notes": "Initial clean state."}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{
|
|
1
|
+
{"agent": "backend", "version": "0.9.0", "lastUpdated": "2026-05-29T15:41:37Z", "sessionHistory": [], "notes": "Initial clean state."}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{
|
|
1
|
+
{"agent": "devops", "version": "0.9.0", "lastUpdated": "2026-05-29T15:41:37Z", "sessionHistory": [], "notes": "Initial clean state."}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{
|
|
1
|
+
{"agent": "explorer", "version": "0.9.0", "lastUpdated": "2026-05-29T15:41:37Z", "sessionHistory": [], "notes": "Initial clean state."}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{
|
|
1
|
+
{"agent": "frontend", "version": "0.9.0", "lastUpdated": "2026-05-29T15:41:37Z", "sessionHistory": [], "notes": "Initial clean state."}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{
|
|
1
|
+
{"agent": "git", "version": "0.9.0", "lastUpdated": "2026-05-29T15:41:37Z", "sessionHistory": [], "notes": "Initial clean state."}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{
|
|
1
|
+
{"agent": "manager", "version": "0.9.0", "lastUpdated": "2026-05-29T15:41:37Z", "sessionHistory": [], "notes": "Initial clean state."}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{
|
|
1
|
+
{"agent": "mobile", "version": "0.9.0", "lastUpdated": "2026-05-29T15:41:37Z", "sessionHistory": [], "notes": "Initial clean state."}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{
|
|
1
|
+
{"agent": "native", "version": "0.9.0", "lastUpdated": "2026-05-29T15:41:37Z", "sessionHistory": [], "notes": "Initial clean state."}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{
|
|
1
|
+
{"agent": "orchestrator", "version": "0.9.0", "lastUpdated": "2026-05-29T15:41:37Z", "sessionHistory": [], "notes": "Initial clean state."}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{
|
|
1
|
+
{"agent": "qa", "version": "0.9.0", "lastUpdated": "2026-05-29T15:41:37Z", "sessionHistory": [], "notes": "Initial clean state."}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{
|
|
1
|
+
{"agent": "security", "version": "0.9.0", "lastUpdated": "2026-05-29T15:41:37Z", "sessionHistory": [], "notes": "Initial clean state."}
|