feat: replace megamemory with markdown-based memory system

Remove the megamemory MCP knowledge graph and replace with plain
markdown files in .memory/ for tracking plans, research, knowledge,
and implementation state. This enables collaboration across people
and agentic coding tools (Claude Code, Copilot, Cursor, etc.).

Changes:
- Remove megamemory MCP from opencode.jsonc
- Delete tool/megamemory.ts and .megamemory/ database
- Rewrite all 25 config files to use .memory/ markdown files
- Add cross-tool instruction file awareness (AGENTS.md, CLAUDE.md,
  copilot-instructions.md, .cursorrules)
- Update save-memory, bootstrap-memory, status commands for md workflow
- Update all agent files, skills, and commands consistently
This commit is contained in:
2026-03-08 18:43:46 +00:00
parent 2acdb86e3d
commit 204bbb4c84
27 changed files with 289 additions and 365 deletions

View File

@@ -21,7 +21,7 @@ Purpose:
Tool restrictions:
- Allowed: `read`, `glob`, `grep`, and megamemory tools.
- Allowed: `read`, `glob`, and `grep`.
- Disallowed: file edits, shell commands, and web tools.
Roles:
@@ -42,7 +42,7 @@ Roles:
- During CRITIC-GATE, challenge stale assumptions from memory.
- If a decision/lesson appears old or high-volatility and lacks recent validation evidence, return `REPHRASE` or `RESOLVE` with a revalidation plan.
- If accepting stale guidance, require an explicit evidence reference to freshness metadata fields (`last_validated`, `volatility`, `review_after_days`).
- Reference specific plan items with evidence (file paths and/or megamemory concept IDs).
- Reference specific plan items with evidence (file paths and/or sections in `.memory/` files).
- **Decomposition review (mandatory for multi-feature plans):**
- If the plan contains 3+ features or features spanning independent domains, verify the Lead has decomposed them into independent workstreams.
- Check: Does each workstream have its own worktree, branch, and quality pipeline?
@@ -59,7 +59,7 @@ Roles:
Workflow:
1. Run `megamemory:understand` (`top_k=3`) to load prior decisions and related context when relevant concepts likely exist; skip when `list_roots` already showed no relevant concepts in this domain this session; never re-query concepts you just created.
1. Read relevant `.memory/*.md` files to load prior decisions and related context when relevant history likely exists; skip when this domain has no relevant `.memory/` entries this session.
2. Read relevant files and plan artifacts (`read`/`glob`/`grep`).
3. Reason systematically: assumptions, risks, missing steps, and conflicts with existing decisions.
4. Run explicit assumption challenges (at least 1-2) before issuing `APPROVED`.
@@ -75,9 +75,10 @@ DETAILS:
NEXT: <what lead should do>
```
Megamemory duty:
- After issuing a CRITIC-GATE verdict, record it as a `decision` concept in megamemory.
Memory file duty:
- After issuing a CRITIC-GATE verdict, record it in `.memory/decisions.md` as a markdown section.
- Summary must include the verdict and concise rationale.
- Add `file_refs` when specific files were evaluated.
- Add file references when specific files were evaluated, and cross-reference the active plan file when applicable.
- Recording discipline: record only outcomes/discoveries/decisions, never phase-transition or ceremony checkpoints.