Added
- **Post-validation audit** — `post_validation.py`: FactCrossVerifier, ConsistencyChecker,
SafetyComplianceFilter. Re-scans stored knowledge for contradictions, PII leaks, and
dangerous patterns. Triggered by low confidence (<0.7), high-risk topics, or age (>7d).
- **Meta-learning** — `meta_learner.py`: Extracts user correction signals from conversation,
creates knowledge entries and negative memory anchors from feedback. Learns from repeated
questions by adding new learning directions.
- **Expert plugin registry** — `experts/__init__.py`: `register_expert()` / `discover_experts()`
/ `register` decorator. New experts auto-discover without orchestrator changes.
- **Task-based expert routing** — `experts/router.py`: TaskClassifier + RouteSelector selects
2-4 relevant experts per query instead of all 6. Supports code/analysis/chat/security/
creative/planning task types.
- **Sub-process expert isolation** — `experts/sub_agent.py`: SubAgentManager runs each expert
in an isolated subprocess with timeout protection. Single expert crash does not affect others.
- **Cross-expert shared context** — Experts can see each other's conclusions via a shared temp
directory. Safety/ethics block signals cause other experts to skip automatically.
- **Memory fusion with inverted index** — `memory/fusion.py`: Token-based inverted index search
with layer priority (procedural > semantic > episodic > working). Configurable via calibration.
- **Feedback extraction** — `chat_monitor.py:extract_feedback_signals()`: Rule-based detection
of user corrections ("不是A而是B") and repeat questions.
- **All docstrings in English** — meta_learner.py, fusion.py, chat_monitor.py (append),
calibration.py (25 Chinese comments translated to English).
Changed
- `routes.py` split: 1552 lines → 6 files (routes_chat/memory/config/task/system.py) + service_chat.py
(1096 lines business logic). Total 1711 lines, all route files <170 lines each.
- `experts/orchestrator.py`: Dynamic expert discovery from registry, route-based selection,
sub-process execution with timeout, auto-fallback to serial in-process.
- `experts/__init__.py`: Now auto-imports all expert modules for `register` decorator to fire.
- `calibration.py`: `fusion` and `meta_learn` config sections added. All Chinese comments
translated to English.
- `learner.py`: Post-validation audit and meta-learning tick added to idle loop.
- `server/__init__.py`: Sub-routers merged into main router.
Fixed
- `experts/logic.py`, `ethics.py`, `emotion.py`: Rewritten due to docstring patching corruption
(identical logic, fixed structure).
- `experts/router.py`: Chinese keyword ordering for TaskClassifier — code/security/planning
routes now checked before creative/chat to prevent "write python code" being classified as chat.