Adds: - Critic Engine (critic.js): Validates output against correction store - Auto-detection: Identifies uncorrected patterns (quantitative without proof, vague quantification, etc.) - Auto-storage: New patterns immediately stored as corrections - NocoDB Schema: Tables for corrections, preferences, episodes, decisions, validation - Memory Service (memory-service.js): NocoDB integration layer - Response Generator (response-generator.js): End-to-end pipeline with critic - Correction Store: JSON-based with README documentation Behavior: - ALL output validated before delivery - Quantitative claims without evidence → auto-corrected - Corrections immediately block future occurrences - System learns from its own mistakes Test: node architecture/test-critic.js
1.4 KiB
1.4 KiB
Self-Correcting Memory - Correction Store
What This Is
This directory contains corrections - patterns that identify mistakes and enforce quality.
How It Works
- Critic Engine validates ALL output before delivery
- If violation found → Output blocked, user notified
- If new pattern detected → Auto-stored as correction
- Future occurrences → Immediately blocked
Correction Format
{
"id": "correction_<timestamp>_<random>",
"pattern": "regex pattern to match",
"excludePattern": "regex that exempts match",
"severity": "error|warning|auto-correct",
"message": "What to tell user",
"suggestion": "How to fix",
"blocking": true,
"autoDetected": true,
"hitCount": 0,
"createdAt": "2026-07-04T..."
}
Active Patterns
| ID | Pattern | Severity | Action |
|---|---|---|---|
| quantitative_without_proof | \d+\s*(%|percent|times) |
auto-correct | Block + require evidence |
| vague_quantification | \b(many|few|several|some)\b |
auto-correct | Block + require specificity |
| unverified_done | \b(done|complete|finished)\b |
error | Block + require verification |
Files
_index.json- All corrections (master list)correction_*.json- Individual correction filesREADME.md- This file
Learning
The system learns from its own mistakes:
- Every uncorrected pattern → Becomes a correction
- No manual intervention required
- Immediate enforcement