chore(openspec): drop 9 superseded proposals + 11 stub archive files

Drop 9 batch proposals that are superseded by the boocode-lift-analysis
(boocontext-audit, conductor upgrades, self-healing/verify-gate skills):
add-3tier-memory, import-llm-evaluator, import-pregel-engine, plugin-platform,
conductor-evolution, code-intelligence-upgrade, dev-workflow, ui-overhaul,
agent-reliability.

Delete 11 stub archive files (49-66B each, 'Status: Shipped. Archived.' only)
that provide zero documentation value over the existing CHANGELOG.md + git tags.
This commit is contained in:
2026-06-07 22:15:38 +00:00
parent 0d6e9a2413
commit c935687725
119 changed files with 4897 additions and 45 deletions

View File

@@ -0,0 +1,26 @@
## Context
BooCode agents are stateless — they lose all context between sessions. The 3-tier memory architecture (Context→Daily→Core) provides structured persistence. Context compression reduces token waste. Boulder state enables work tracking across sessions. System Context provides typed context lifecycle management.
## Goals / Non-Goals
**Goals:**
- Cross-session agent memory via 3-tier architecture
- Token-efficient context window management via summarization + compression
- Work-in-progress persistence across sessions via boulder state
- Typed context sources with epoch baselines
**Non-Goals:**
- Distributed memory storage (single-user SQLite is sufficient)
- Real-time memory syncing across users
## Decisions
- **Embedding strategy**: Use OpenAI text-embedding-3-small via BooCode's existing provider. Store as BLOB in SQLite.
- **Vector search**: In-process cosine similarity (mathjs) — no external vector DB needed
- **FTS5**: SQLite FTS5 for keyword search with trigram tokenizer for CJK support
- **Memory tiers**: ContextTier (in-memory, per-session, LRU) → DailyTier (files, ~30-90 days) → CoreTier (SQLite, permanent)
- **Deep Dream**: Background cron job (configurable). Uses LLM (configured model) for consolidation
- **Boulder state**: Stored in Postgres `plans` table as JSONB. Auto-resume on session start.
- **Context compression**: DCP-style. Range dedup (remove duplicate messages), purge errors (remove redundant error messages), turn protection (keep turn boundaries intact).
- **SWR caching**: In-memory Map with TTU-based revalidation. Cache key = (tool, params hash). Invalidate on project switch.

View File

@@ -0,0 +1,29 @@
## Why
BooCode agents lose all context between sessions and have no long-term memory. The 3-tier memory (Context→Daily→Core) provides cross-session persistence. Combined with context compression (DCP-style pruning) for tighter context windows, boulder state for work tracking across sessions, and a System Context model for typed context sources, this gives BooCode persistent agent intelligence.
## What Changes
- Port memory_engine 3-tier memory to TypeScript (ContextTier + DailyTier + CoreTier)
- Implement ContextTier: token-budget conversation summarization with RunningSummary
- Implement DailyTier: Markdown-file-based daily records with lazy creation
- Implement CoreTier: SQLite FTS5 + vector BLOB storage with hybrid search (vector 0.7 + keyword 0.3)
- Implement Deep Dream consolidation: overnight LLM rewrite of long-term memory
- Add manage-memory and search-memory tools for agents
- Add context compression from opencode-dynamic-context-pruning (range/message dedup, purge errors, turn protection)
- Add boulder state from oh-my-openagent (cross-session plan execution with auto-resumption)
- Add System Context model from opencode (typed context sources, immutable epoch baselines, reconciliation)
- Add SWR stale-while-revalidate caching for codecontext/boocontext tool results
## Capabilities
### New Capabilities
- `context-tier`: Token-budget conversation summarization
- `daily-tier`: Markdown-file-based daily memory records
- `core-tier`: SQLite FTS5 + vector hybrid search long-term memory
- `deep-dream`: Overnight LLM-based memory consolidation
- `memory-tools`: Agent-accessible manage/search memory tools
- `context-compression`: Range/message dedup, purge errors, turn protection
- `boulder-state`: Cross-session plan execution with auto-resumption
- `system-context`: Typed context sources with epoch baselines
- `swr-caching`: Stale-while-revalidate for MCP tool results

View File

@@ -0,0 +1,68 @@
## 1. Implement ContextTier
- [ ] 1.1 Create ContextTier class with token-budget summarization (max_tokens_before_summary: 16000)
- [ ] 1.2 Implement RunningSummary tracking
- [ ] 1.3 Add summary injection into system prompt on budget exceeded
- [ ] 1.4 Add configurable thresholds and token counter
## 2. Implement DailyTier
- [ ] 2.1 Create DailyTier class with Markdown file management
- [ ] 2.2 Implement lazy daily file creation (memory/YYYY-MM-DD.md)
- [ ] 2.3 Implement append() with timestamped entries
- [ ] 2.4 Add user-scoped variants (memory/users/{uid}/)
- [ ] 2.5 Implement get_main_memory_file() for MEMORY.md
## 3. Implement CoreTier
- [ ] 3.1 Set up better-sqlite3 with FTS5 extension
- [ ] 3.2 Create chunks table with vector BLOB column
- [ ] 3.3 Create chunks_fts virtual table for full-text search
- [ ] 3.4 Implement chunk storage with text chunker
- [ ] 3.5 Implement hybrid search (vector 0.7 + keyword 0.3 with temporal decay)
- [ ] 3.6 Implement fact storage with confidence scores
## 4. Implement Deep Dream consolidation
- [ ] 4.1 Create DeepDream class for overnight consolidation
- [ ] 4.2 Read daily + core → LLM summarizes → overwrite MEMORY.md
- [ ] 4.3 Implement dedup via content hashing
- [ ] 4.4 Write dream diary to memory/dreams/YYYY-MM-DD.md
- [ ] 4.5 Add cron scheduling
## 5. Add memory management tools
- [ ] 5.1 Implement manage-memory tool (create/update/delete)
- [ ] 5.2 Implement search-memory tool (hybrid search)
- [ ] 5.3 Register tools for agent use
## 6. Add context compression (DCP)
- [ ] 6.1 Implement range/message dedup
- [ ] 6.2 Implement purge errors
- [ ] 6.3 Implement turn protection
- [ ] 6.4 Wire into compaction pipeline
## 7. Add boulder state
- [ ] 7.1 Implement cross-session plan persistence in Postgres
- [ ] 7.2 Add automatic resumption on session start
## 8. Add System Context model
- [ ] 8.1 Implement typed context sources
- [ ] 8.2 Implement immutable epoch baselines
- [ ] 8.3 Add reconciliation on context change
## 9. Add SWR caching
- [ ] 9.1 Implement stale-while-revalidate for MCP tool results
- [ ] 9.2 Add TTU-based revalidation
- [ ] 9.3 Add cache invalidation on project switch
## 10. UI: Memory & context
- [ ] 10.1 Add memory browser UI
- [ ] 10.2 Add context composition breakdown
- [ ] 10.3 Add consolidation timeline
- [ ] 10.4 Add cross-session continuity indicator