agent-enderun 0.8.7 → 0.8.8

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 (42) hide show
  1. package/.enderun/BRAIN_DASHBOARD.md +4 -4
  2. package/.enderun/PROJECT_MEMORY.md +7 -15
  3. package/.enderun/STATUS.md +3 -5
  4. package/.enderun/agents/agent_army_schema.json +1 -1
  5. package/.enderun/agents/analyst.md +8 -15
  6. package/.enderun/agents/backend.md +11 -21
  7. package/.enderun/agents/devops.md +7 -16
  8. package/.enderun/agents/explorer.md +4 -13
  9. package/.enderun/agents/frontend.md +6 -15
  10. package/.enderun/agents/git.md +4 -13
  11. package/.enderun/agents/manager.md +28 -22
  12. package/.enderun/agents/mobile.md +4 -13
  13. package/.enderun/agents/orchestrator.md +14 -23
  14. package/.enderun/agents/qa.md +7 -16
  15. package/.enderun/agents/security.md +7 -16
  16. package/.enderun/cli-commands.json +0 -4
  17. package/.enderun/config.json +2 -2
  18. package/.enderun/knowledge/manager_authority_audit_enforcement.md +2 -2
  19. package/.enderun/knowledge/token_economy_and_memory.md +129 -0
  20. package/.enderun/memory-graph/agent-contexts/manager.json +1 -1
  21. package/.enderun/memory-graph/graph.json +1 -2
  22. package/.enderun/memory-graph/shared-facts.json +1 -2
  23. package/ENDERUN.md +1 -1
  24. package/README.md +379 -257
  25. package/docs/roadmap.md +1 -1
  26. package/framework-mcp/dist/schemas.js +0 -34
  27. package/framework-mcp/dist/tools/framework.js +40 -11
  28. package/framework-mcp/dist/tools/governance.js +1 -1
  29. package/framework-mcp/dist/tools/memory.js +24 -7
  30. package/framework-mcp/dist/tools/monitoring.js +6 -6
  31. package/framework-mcp/dist/tools/orchestration.js +9 -8
  32. package/framework-mcp/dist/utils.js +2 -2
  33. package/framework-mcp/package.json +1 -1
  34. package/framework-mcp/src/tools/framework.ts +39 -8
  35. package/framework-mcp/src/utils.ts +2 -2
  36. package/mcp.json +2 -2
  37. package/package.json +1 -1
  38. package/.enderun/agents/native.md +0 -115
  39. package/.enderun/claude.md +0 -19
  40. package/.enderun/cursor.md +0 -19
  41. package/.enderun/gemini.md +0 -19
  42. package/.enderun/memory-graph/agent-contexts/native.json +0 -1
@@ -3,15 +3,6 @@ name: mobile
3
3
  description: "Cross-Platform Mobile Specialist Agent for Agent Enderun"
4
4
  ---
5
5
 
6
- # @mobile — mobile
7
-
8
- - **Name:** mobile
9
- - **Capability:** 9.0
10
- - **Role:** mobile
11
- - **State Machine:** `../schema/agent-lifecycle-schema.json`
12
-
13
- ---
14
-
15
6
  # @mobile — Cross-Platform Mobile
16
7
 
17
8
  - **Name:** @mobile
@@ -20,7 +11,7 @@ description: "Cross-Platform Mobile Specialist Agent for Agent Enderun"
20
11
  - **Specialization:** React Native/Expo, fluid responsive mobile design, shared logic with web
21
12
  - **Permitted Directories:**
22
13
  - `apps/mobile/`
23
- - `{{FRAMEWORK_DIR}}/knowledge/`
14
+ - `.enderun/knowledge/`
24
15
  - **Hermes Channels:**
25
16
  - `@mobile->@manager`
26
17
  - `@mobile->@orchestrator`
@@ -47,11 +38,11 @@ Never start coding before understanding the current state of the components and
47
38
 
48
39
  ## 🔌 SESSION STARTUP PROTOCOL (Mandatory)
49
40
 
50
- 1. Read `{{FRAMEWORK_DIR}}/PROJECT_MEMORY.md` → Understand the current state.
51
- 2. Read `{{FRAMEWORK_DIR}}/docs/api/` → Align with the backend contracts.
41
+ 1. Read `.enderun/PROJECT_MEMORY.md` → Understand the current state.
42
+ 2. Read `.enderun/docs/api/` → Align with the backend contracts.
52
43
  3. Check `apps/backend/src/types/` → Use the standardized types.
53
44
 
54
- > ✅ **End of Session:** Update `{{FRAMEWORK_DIR}}/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.
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.
55
46
 
56
47
  ---
57
48
 
@@ -3,15 +3,6 @@ name: orchestrator
3
3
  description: "Task Queue & Parallel Execution Specialist Agent for Agent Enderun"
4
4
  ---
5
5
 
6
- # @orchestrator — orchestrator
7
-
8
- - **Name:** orchestrator
9
- - **Capability:** 9.0
10
- - **Role:** orchestrator
11
- - **State Machine:** `../schema/agent-lifecycle-schema.json`
12
-
13
- ---
14
-
15
6
  # @orchestrator — Task Queue & Parallel Execution
16
7
 
17
8
  - **Name:** @orchestrator
@@ -19,9 +10,9 @@ description: "Task Queue & Parallel Execution Specialist Agent for Agent Enderun
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
- - `{{FRAMEWORK_DIR}}/`
23
- - `{{FRAMEWORK_DIR}}/queue/`
24
- - `{{FRAMEWORK_DIR}}/memory-graph/`
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 {{FRAMEWORK_DIR}}/logs/orchestrator.json with Trace ID and timestamp.
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 {{FRAMEWORK_DIR}}/queue/pending/{traceId}.json
52
- - Log assignment to {{FRAMEWORK_DIR}}/logs/orchestrator.json
53
- - Log escalation to {{FRAMEWORK_DIR}}/logs/orchestrator.json
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
@@ -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 `{{FRAMEWORK_DIR}}/queue/`:
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 {{FRAMEWORK_DIR}}/queue/pending/{traceId}.json
175
- 10. Final: all tasks DONE → write to {{FRAMEWORK_DIR}}/queue/completed/
176
- 6. Generate snapshot and log to {{FRAMEWORK_DIR}}/logs/orchestrator.json
177
- 5. Log broadcast to {{FRAMEWORK_DIR}}/logs/orchestrator.json
178
- 6. Log resolution to {{FRAMEWORK_DIR}}/logs/orchestrator.json
179
- - ❌ Writing to any directory outside `{{FRAMEWORK_DIR}}/` and `{{FRAMEWORK_DIR}}/queue/`
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
  ---
@@ -3,15 +3,6 @@ name: qa
3
3
  description: "Quality Assurance & Test Specialist Agent for Agent Enderun"
4
4
  ---
5
5
 
6
- # @qa — qa
7
-
8
- - **Name:** qa
9
- - **Capability:** 9.0
10
- - **Role:** qa
11
- - **State Machine:** `../schema/agent-lifecycle-schema.json`
12
-
13
- ---
14
-
15
6
  # @qa — Quality Assurance & Test
16
7
 
17
8
  - **Name:** @qa
@@ -23,14 +14,14 @@ 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
- - `{{FRAMEWORK_DIR}}/logs/`
17
+ - `.enderun/logs/`
27
18
  - `docs/`
28
19
  - **Hermes Channels:**
29
20
  - `@qa->@manager`
30
21
  - `@qa->@backend`
31
22
  - `@qa->@frontend`
32
23
  - `@qa->@devops`
33
- - `@orchestrator`
24
+ - `@qa->@orchestrator`
34
25
  - **Tags:** specialist, quality
35
26
  - **State Machine:** `../schema/agent-lifecycle-schema.json`
36
27
 
@@ -39,7 +30,7 @@ description: "Quality Assurance & Test Specialist Agent for Agent Enderun"
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
32
  - **Strict Coverage Quality Gate**: The non-negotiable coverage threshold for all core domain logic, repositories, and critical user paths is **at least 80%** (measured via Vitest/Jest). Deployments are strictly blocked if this target is not satisfied.
42
- - Every failing test must have a Trace ID and be logged to {{FRAMEWORK_DIR}}/logs/qa.json.
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.
@@ -58,7 +49,7 @@ description: "Quality Assurance & Test Specialist Agent for Agent Enderun"
58
49
  - No skipped tests without documented reason
59
50
  - Sign off to @devops and @manager
60
51
  ### afterEveryTestRun
61
- - Write results summary to {{FRAMEWORK_DIR}}/logs/qa.json with Trace ID
52
+ - Write results summary to .enderun/logs/qa.json with Trace ID
62
53
  - Update STATUS.md HealthScore for relevant agents
63
54
  - Escalate any NEW failing tests to @manager immediately
64
55
  - log_agent_action via MCP
@@ -91,10 +82,10 @@ Design the right test type for the right situation:
91
82
 
92
83
  ### 2. Coverage Analysis
93
84
  - Read coverage thresholds from `vitest.config.ts` or `jest.config.*` — never self-impose numbers
94
- - Flag files below threshold as `COVERAGE_DEBT` in `{{FRAMEWORK_DIR}}/logs/qa.json`
95
- 7. Log results to {{FRAMEWORK_DIR}}/logs/qa.json
85
+ - Flag files below threshold as `COVERAGE_DEBT` in `.enderun/logs/qa.json`
86
+ 7. Log results to .enderun/logs/qa.json
96
87
 
97
- ## Log Format (`{{FRAMEWORK_DIR}}/logs/qa.json`)
88
+ ## Log Format (`.enderun/logs/qa.json`)
98
89
 
99
90
  ```json
100
91
  {
@@ -3,15 +3,6 @@ name: security
3
3
  description: "Security & Compliance Specialist Agent for Agent Enderun"
4
4
  ---
5
5
 
6
- # @security — security
7
-
8
- - **Name:** security
9
- - **Capability:** 9.0
10
- - **Role:** security
11
- - **State Machine:** `../schema/agent-lifecycle-schema.json`
12
-
13
- ---
14
-
15
6
  # @security — Security & Compliance
16
7
 
17
8
  - **Name:** @security
@@ -19,7 +10,7 @@ description: "Security & Compliance Specialist Agent for Agent Enderun"
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
- - `{{FRAMEWORK_DIR}}/`
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 {{FRAMEWORK_DIR}}/logs/security.json. Every scan appends — never overwrites.
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 {{FRAMEWORK_DIR}}/logs/security.json for previous findings to track regressions
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 {{FRAMEWORK_DIR}}/logs/security.json with Trace ID
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
@@ -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 {{FRAMEWORK_DIR}}/logs/security.json
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 {{FRAMEWORK_DIR}}/logs/security.json
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 `{{FRAMEWORK_DIR}}/agents/` or framework source files (when working in a user project)
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
@@ -48,10 +48,6 @@
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
- },
55
51
  "explorer:graph": {
56
52
  "agent": "@explorer",
57
53
  "description": "Generate dependency graph"
@@ -2,5 +2,5 @@
2
2
  "logLevel": "info",
3
3
  "outputFormat": "text",
4
4
  "defaultProfile": "Lightweight",
5
- "version": "0.8.5"
6
- }
5
+ "version": "0.8.8"
6
+ }
@@ -15,7 +15,7 @@ Even though strong rules exist in individual agent files, without a systematic a
15
15
  From the agent control audit (23 Mayıs 2026):
16
16
 
17
17
  - @backend, @frontend, @analyst, and @explorer have partial governance rules, but enforcement is inconsistent.
18
- - @git, @mobile, and @native have almost no @manager control defined.
18
+ - @git and @mobile have almost no @manager control defined.
19
19
  - Hermes usage and High-Risk Admin compliance are still largely declarative in many agents.
20
20
  - Memory Discipline and briefing requirements are frequently bypassed in practice.
21
21
 
@@ -60,7 +60,7 @@ Without regular auditing and clear enforcement, the "Tek Giriş Noktası" and "S
60
60
  - [ ] @analyst: QA gate enforcement and escalation to @manager verified?
61
61
  - [ ] @explorer: Proactive risk reporting via Hermes verified?
62
62
  - [ ] @git: High-risk commits only with @manager approval?
63
- - [ ] @mobile / @native: Any work done without @manager briefing?
63
+ - [ ] @mobile: Any work done without @manager briefing?
64
64
 
65
65
  ## Enforcement Mechanisms
66
66
 
@@ -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
- { "agent": "@manager", "version": "1.0.0", "lastUpdated": "2026-05-25T17:00:00Z", "sessionHistory": [], "knownContracts": [], "recentDecisions": [], "watchedFiles": [], "pendingTasks": [], "notes": "Context initialized." }
1
+ { "agent": "@manager", "version": "1.0.0", "lastUpdated": "2026-05-28T12:00:00Z", "sessionHistory": ["Synchronized release metadata to 0.8.8", "Added token economy and persistent memory protocol"], "knownContracts": ["apps/backend/contract.version.json"], "recentDecisions": ["Implement token economy as smarter context selection, not capability reduction", "Preserve project memory in PROJECT_MEMORY.md and agent-contexts"], "watchedFiles": ["ENDERUN.md", ".enderun/PROJECT_MEMORY.md", ".enderun/memory-graph/shared-facts.json", ".enderun/agents/manager.md"], "pendingTasks": ["Finalize token economy memory protocol rollout", "Audit agent memory updates at session end"], "notes": "Manager memory context updated for persistent token economy and project memory discipline." }
@@ -14,8 +14,7 @@
14
14
  { "id": "@analyst", "state": "IDLE", "lastAction": null, "activeTrace": null, "healthScore": 9.6, "totalActionsThisSession": 0 },
15
15
  { "id": "@explorer", "state": "IDLE", "lastAction": null, "activeTrace": null, "healthScore": 9.4, "totalActionsThisSession": 0 },
16
16
  { "id": "@git", "state": "IDLE", "lastAction": null, "activeTrace": null, "healthScore": 9.1, "totalActionsThisSession": 0 },
17
- { "id": "@mobile", "state": "IDLE", "lastAction": null, "activeTrace": null, "healthScore": 8.8, "totalActionsThisSession": 0 },
18
- { "id": "@native", "state": "IDLE", "lastAction": null, "activeTrace": null, "healthScore": 8.9, "totalActionsThisSession": 0 }
17
+ { "id": "@mobile", "state": "IDLE", "lastAction": null, "activeTrace": null, "healthScore": 8.8, "totalActionsThisSession": 0 }
19
18
  ],
20
19
  "edges": [],
21
20
  "schema": {
@@ -44,9 +44,8 @@
44
44
  { "agent": "@qa", "capability": 9.1, "primaryDomain": "qa" },
45
45
  { "agent": "@frontend", "capability": 9.0, "primaryDomain": "frontend" },
46
46
  { "agent": "@devops", "capability": 9.0, "primaryDomain": "devops" },
47
- { "agent": "@native", "capability": 8.9, "primaryDomain": "native" },
48
47
  { "agent": "@mobile", "capability": 8.8, "primaryDomain": "mobile" }
49
48
  ],
50
- "frameworkVersion": "0.8.7",
49
+ "frameworkVersion": "0.8.8",
51
50
  "constitutionFile": "ENDERUN.md"
52
51
  }
package/ENDERUN.md CHANGED
@@ -1,4 +1,4 @@
1
- # Agent Enderun (v0.8.7)
1
+ # Agent Enderun (v0.8.8)
2
2
  # Place in project root. This file is the single source of truth for Base Project AI Extensions.
3
3
 
4
4
  ## 🎖️ AGENT CHECKLIST (MANDATORY BEFORE RESPONSE)