Files
solution-erp/.claude/auto-memory/feedback_harness11_engine.md
pqhuy1987 23bbe97f39
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m26s
[CLAUDE] Docs: S124 adap-wave AI_INFRA + owner worker-tier-pin (14 agent opus+effort:max) + user-memory relocate R6 + H24 dogfood
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 23:17:45 +07:00

24 lines
3.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
name: harness11-engine-adopt
description: "Harness-11 engine governance tự-bảo-trì adopted S75 — detector + archive-gate scripts là canon; + meta-lessons (gotcha#30-via-Edit, multi-workflow-verify, git-add-specific)"
metadata:
node_type: memory
type: feedback
originSessionId: a1c216f6-0ca0-44f4-b933-8fbcf97e8b29
---
**Harness-11 (engine bộ-nhớ-và-governance TỰ-BẢO-TRÌ) adopted S75 (2026-06-18).** Canonical spec = `docs/governance/harness-11-engine.md`. Hai artifact MỚI chạy được: `scripts/governance-detectors.ps1` (C1 broken-pointer + C2/B3 derived-staleness + C3 vocab-fork + C4 self-exclusion + C5 resolve-condition — NO-API, DÒ+FLAG-only, chạy @session-start §2.1.3) + `scripts/memory-archive-gate.ps1` (PHẦN A hot-mem dồn-archive: hysteresis 0.85 / keep-floor 5 / 2-strike / A7 NO-API L1-eval pointer-resolve — chạy @session-end §L.b(c)). completeness-gate H11 = B+C+D function-floor phải đủ-trọn; A 🟡 tailorable.
**Why:** engine "tự-bảo-trì" = luôn-TỰ-BIẾT khi có drift (detector tự-động báo cờ) CHỨ KHÔNG tự-viết-lại; single-writer (em-main) là bar-không-hạ; auto-WRITE luật CỐ Ý chưa làm. B1 (derived doc TRỎ canonical `docs/STATUS.md` thay COPY count) gỡ nguồn drift #1 — root CLAUDE.md đã kẹt Mig 53 suốt S70-S74 vì copy-count.
**How to apply:**
- Chạy `powershell.exe -ExecutionPolicy Bypass -File scripts/governance-detectors.ps1` khi nghi doc-drift / con-trỏ-gãy / một-khái-niệm-nhiều-tên — nó DÒ+FLAG, em-main sửa (gated, KHÔNG auto-fix).
- Khi thêm count vào tài-liệu-dẫn-xuất → TRỎ `docs/STATUS.md` thay vì chép số (B1).
- **gotcha #30 reinforced (mới):** KHÔNG đưa box-glyph (├└─) hay literal tiếng-Việt vào file `.ps1` chạy `powershell.exe -File` — PS5.1 decode ANSI → mojibake → regex mù. Build token Việt từ Unicode code-point runtime. **KỂ CẢ qua Edit tool** — nó render-normalize `\u` escape thành ký-tự thật. Detector giữ pure-ASCII (verify bằng Python non-ASCII scan).
- **Multi-workflow-verify pattern (proven S75):** task governance hệ-trọng → audit→implement→review→(double-check)→(checklist-verify). Review-workflow RIÊNG bắt lỗi IMPLEMENT tự-chấm sót (S75: C2 FP 89% + "71 flag" hardcoded). Raw-Workflow schema-force flaky (~3/15 lane fail no-StructuredOutput) → em-main self-gate ground-truth từ disk khi lane chết (recovery-pattern, vd inject fake-drift test).
- **git add file cụ-thể** (KHÔNG `git add -A`) — read-only sub vẫn ghi scratch qua Bash (residual), `-A` quét vào commit. Xem [[feedback_rag_mcp_recovery_concurrency]].
- **Curate khi archive-gate báo "keep-floor-hit cannot auto-drain" (S80):** nghĩa là newest-5 entry CHÍNH LÀ bulk (A5 cấm auto-drop newest) → KHÔNG drain-tự-động được. Em-main **manual condense-with-archive**: move full verbatim entry → `archive/<period>.md` byte-exact (`sed -n 'A,Bp' >> archive`, KHÔNG hand-copy = 0 sai-byte), giữ summary + `_INDEX` pointer ở L1. Verify `git numstat` archive = **+N 0** (additive, 0 byte-loss) + A7 GATE PASS sau curate. Proven S80: reviewer/inv-codebase/cicd 45/40/39KB → 10/10/12KB.
- **`_INDEX` substring pointer MUST quote-free (S80):** A7 gate quote-parser cắt substring tại `"` ĐẦU-TIÊN → escaped-quote pointer (`substring:"…\"PURO\"…"`) resolve FAIL dù `grep -F` literal vẫn match (self-grep GIẤU defect, gate độc-lập BẮT — A7 FAIL 1/214). Fix = chọn unique phrase không có dấu nháy (`PURO = UI design-language/skin`). Bài học rộng: independent-gate > self-check.
Liên quan: [[feedback_harness10_run_trace]] (run-trace FLAT) · [[feedback_workflow_fanout_reliability]] (fan-out reliability) · [[feedback_agent_kill_recovery]] (self-gate khi reviewer chết).