# Project Plan: DSCons ERP Mem0 Knowledge Base Reset & Ingestion

## Objectives
1. **Selective Cleanup (R1)**: Query Mem0 and delete all entries related to DSCons, ERP, AEC, Clean Architecture, Dark Slate, old Norms while strictly preserving other project data.
2. **Knowledge Extraction (R2)**: Deeply analyze and synthesize knowledge across 5 core areas:
   - Area 1: Root standards (`AGENTS.md`, `GEMINI.md`)
   - Area 2: Backend & DB standards (`backend-clean-architecture`, `backend-patterns`, `coding-standards`)
   - Area 3: Frontend standards (`enterprise-ui-darkslate`, `frontend-patterns`)
   - Area 4: Business domain standards (`aec-cad-takeoff`, `aec-pricing-norms`)
   - Area 5: Testing & Workflow standards (`tdd-workflow`, `workflow-plan-task-test-report`, `verification-loop`, `eval-harness`)
3. **Structured Ingestion (R3)**: Package synthesized knowledge into concise, high-value invariant facts and ingest into Mem0 via `mem0_add`.
4. **Verification & Acceptance**:
   - `mem0_get_all` covers all 5 domains.
   - `mem0_search` queries ("DSCons rule", "frontend theme", "backend architecture") return fresh standards without obsolete remnants.

## Roadmap & Milestones
- **Phase 0: Survey**
  - Explorer 1: Inspect current Mem0 entries, identify obsolete DSCons records vs records to preserve.
  - Explorer 2: Read and inventory 5 core documentation areas in DSCons repository.
  - Explorer 3: Design ingestion schema and verification query suite.
- **Milestone 1: Selective Cleanup**
  - Delete targeted obsolete records from Mem0 using `mem0_delete`.
  - Verify non-DSCons records remain untouched.
- **Milestone 2: Knowledge Extraction & Fact Formulation**
  - Extract structured, atomic, high-signal facts for each of the 5 areas.
  - Review facts against authoritative sources.
- **Milestone 3: Memory Ingestion**
  - Add approved facts into Mem0 via `mem0_add`.
- **Milestone 4: Verification & Gating**
  - Run verification searches and get-all inspect.
  - Audit clean state and report to Sentinel.
