update doc and optimize

This commit is contained in:
thanhnv
2026-07-06 17:47:12 +09:00
parent ace442da0e
commit 4419cd9eae
95 changed files with 2951 additions and 1353 deletions
@@ -1,6 +1,12 @@
# KẾ HOẠCH 04 — Khép vòng tự cải tiến (`casan improve`)
> Hôm nay: ngưỡng tự canh (cost-spike/circuit) [có] + báo cáo KPI/drift [có] + hành động cải tiến cần người [chưa tự động]. Kế hoạch: thêm lệnh `casan improve` **đề xuất** cải tiến tự động, **người duyệt** rồi mới áp, mọi thay đổi vào audit. Task-level, chưa thực thi.
> Status 2026-07-06: **🟡 core implemented + tested (harness-owned).**
> `.specify/scripts/bash/self-improve.py`: `propose` đọc telemetry (metrics.jsonl +
> drift.json) → sinh proposal **dry-run (không ghi)**; `apply` **bắt buộc approval**
> (đề xuất ≠ áp dụng), áp qua **governed store** (`control-plane-settings.py` → audit),
> proposal security-sensitive/loosen luôn cần duyệt. Test `phase-selfimprove-tests.sh`
> **7/0 (WSL)**, nối CI. Còn: bộ luật đề xuất phong phú hơn (corpus/model escalation),
> báo cáo xu hướng qua nhiều run, chạy định kỳ trong CI (Plan-05).
>
> Phụ thuộc: **01** (CLI/config), **05** (CI để chạy định kỳ). Không tự retrain model.