From a1e2416f37ad929e3fc22ae9955866100d1494b9 Mon Sep 17 00:00:00 2001 From: pqhuy1987 Date: Wed, 22 Jul 2026 14:05:48 +0700 Subject: [PATCH] =?UTF-8?q?[CLAUDE]=20Docs:=20S143=20closeout=20=E2=80=94?= =?UTF-8?q?=20=C2=A7L.a=20E-012/AS-16=20+=20v=C3=A1=204=20drift=20H1=20+?= =?UTF-8?q?=20harvest=20GATE-PASS-5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit §L.a RCA: - E-012 + AS-16 NEW "bằng-chứng-tự-huỷ-sau-squash": outward artifact cite sha chưa-push / stamp trước khi git status sạch. Root = tiêu-chí verify chọn theo cái MÌNH đo được, không theo cái NGƯỜI NHẬN sẽ đo (cùng lớp E-010). Đối chứng: wave trước cite commit đích -> sống hết. §L.b: - (c) memory-triple: do exit 0 · de-xuat A7 251/251 · kiem reviewer FAIL 1C/4M/4m/1nit · do-record TOTAL 47 + nhip-no 4-vế. sleep-check 4d < 7d -> không INFORM. - (d)(f) harvest-curator GATE-PASS-5, 5-trục PASS, Fidelity on-behalf PASS STRONG 0-fabrication, C5 dạng-1 đủ, orphan 0/40, Sàn-5 khớp. Spawn-record 5 sub. - (g) tooling-auditor DRIFT-FOUND(4) -> vá hết: F-A doc "3-vế" vs script 4-vế (7 site prescriptive; giữ 15 file frozen) · F-B ghost-enum HIGH (mở enum 10->11 mà quên chính vai dùng nó + 2 site số) · F-C lead-model pin chưa ghi sổ (thêm dòng Lead row S143; cell canonical để owner quyết) · F-D marketplace. - (j) H24: class_repeat cập theo 2 vai · last_audit light/deep = 17 · history +S143 (khai rõ force-fire SỚM 1 nhịp theo lệnh owner, KHÔNG tới-hạn tự-nhiên). - (k) trio SKIP có vết (cần restart CLI) -> ghi CẢ session-log vì §6.4 reset WAL. Sửa-một-phía bắt được 4 lần trong phiên (tool-grant · enum · sổ đếm garble · _note counter) -> bài: đổi một con số thì grep con số đó repo-wide trước khi đóng. #53: 5/5 sub garble, 0 mất dữ-liệu nhờ ghi-đĩa. Tally ×20 -> ×25, +path-4 lead-on-behalf khi resume không cứu được diary. Test 528 kế-thừa (0 file src/fe/tests bị đụng, verify bằng diff). Bundle FROZEN. Co-Authored-By: Claude Opus 4.8 --- .claude/WAL.md | 2 +- .../agent-memory/harvest-curator/MEMORY.md | 1 + .claude/agent-memory/memory-budget.json | 2 +- .../agent-memory/tooling-auditor/MEMORY.md | 3 +- .claude/agents/lead-omission-auditor.md | 5 +- .claude/auto-memory/MEMORY.md | 2 +- .../feedback_agent_return_garble_recover.md | 3 +- .claude/commands/pause.md | 2 +- .claude/commands/session-end.md | 6 +- .claude/commands/session-start.md | 2 +- .claude/commands/tiep.md | 2 +- .claude/governance/.session-counter.json | 128 +++++++++--------- .claude/workflows/hmw.js | 2 +- .../sub-harvest-3.md | 103 ++++++++++++++ .../sub-tooling-4.md | 116 ++++++++++++++++ docs/HANDOFF.md | 2 +- docs/STATUS.md | 4 +- ...22-1455-S143-tiep-closeout-audit-errata.md | 76 +++++++++++ docs/governance/error-ledger.md | 10 ++ docs/governance/session-model-se-draft.md | 2 +- 20 files changed, 394 insertions(+), 79 deletions(-) create mode 100644 .claude/workflows/runs/2026-07-22-S143-closeout-audit/sub-harvest-3.md create mode 100644 .claude/workflows/runs/2026-07-22-S143-closeout-audit/sub-tooling-4.md create mode 100644 docs/changelog/sessions/2026-07-22-1455-S143-tiep-closeout-audit-errata.md diff --git a/.claude/WAL.md b/.claude/WAL.md index d232192..bd101b0 100644 --- a/.claude/WAL.md +++ b/.claude/WAL.md @@ -1,4 +1,5 @@ # WAL — auto-generated, không sửa tay +closing: S143 @2026-07-22T14:55+07 updated: 2026-07-22T14:30+07 | session: S143 | branch: main goal: Adap wave đợt-9/10 hub (7 thư verify 2-tuyến 7/7) — trio harness-{eval,refine,audit} + contract-v2 dangling-head + stamp-decode + annex phép-8 + sweep roster lên 17. IMPLEMENT + VERIFY + closeout OUTWARD XONG @S143 (anh gật). Còn: trio first-run cần restart CLI + 2 phát hiện chờ anh quyết. @@ -24,7 +25,6 @@ chain: V1-V3 view-residual-asym: `STATUS.md:450` + `agents/README.md:190` còn "NO Write/Edit / chặn-bằng-thiếu-tool" · `agents/README.md:27` "Roster THẬT" liệt 14 vai thiếu 3 trio (sweep wave bỏ sót — AC4 grep bắt SỐ, không bắt LIỆT-KÊ-THIẾU) O1 gap-carry-dropped: HANDOFF khối carry khai 13, đúng phải 14 — `[carry:session-model-adopt]` rơi ĐÚNG LÚC còn chờ mỗi chữ ký anh (2/3 tiền-đề vừa mở khoá); adap-report lại VIỆN DẪN chính carry đó làm cổng biện minh "cố ý chưa wire" O2 gap-decision-sunk: 3 mục "Chờ-anh" ở spec:68 chìm 2 nhãn phiên (grep 9 token × 4 bề mặt = 0 hit) — ranh refine⟂lead-omission Đà WIRE `harness-refine.md:22-30` TRƯỚC khi ratify · `session_ctx_kb`/Q4 van-ngưỡng 0 hit · consent-form trio dài hạn -[ ] trio first-run spawn-probe 3/3 — cần RESTART CLI + anh consent (nấc = executed-file/verified-pending-restart) [ ] INFORM-3: sub xin anh MỞ ENUM thêm class `gap-incident-unrecorded` (nó KHÔNG tự bịa) — 3/3 garble phiên này 0 hit mọi sổ trong khi bề mặt quảng-cáo "0-garble" (nói về S142); sổ đếm `feedback_agent_return_garble_recover` dừng "×20 qua S118", 8 nhãn phiên không cập. +carry #13 gọi `b9ef5ede` "4 câu" vs report+email "5 câu". +diary `lead-view-auditor` CHƯA ghi (garble ×2) → lead harvest on-behalf sau VERIFY (B3) next: chờ anh quyết cách vá M1/M2/V1-V3/O1/O2 (em đã dựng sẵn 4 bước, chưa chạm file) + trio cần anh restart CLI. Deep-audit Đà chạy sớm 1 nhịp (17/18) theo lệnh anh — KHÔNG phải tới hạn tự nhiên. diff --git a/.claude/agent-memory/harvest-curator/MEMORY.md b/.claude/agent-memory/harvest-curator/MEMORY.md index 1012c46..5d1bb16 100644 --- a/.claude/agent-memory/harvest-curator/MEMORY.md +++ b/.claude/agent-memory/harvest-curator/MEMORY.md @@ -50,3 +50,4 @@ H2 harvest-MD-integrity auditor **SOLUTION_ERP-self**. Read-only + **propose-onl > **S123→S125 (2 entry @start RE-REPORT) verbatim → `archive/2026-07.md`** — self-compact 2026-07-18 @S140-gate HOOK-directed (SELF 19.7KB>17.1 read-limit; block-md5 `cbcd17aba6461d57a5fbb34e9be0e301` 7427B moved-not-cut byte-identical, file-order verbatim, anchor 2×{L1=0·ARC=1}). Digest: S123 @start MOSTLY-CLEAN 0-orphan/26 (m#12 mẫu-số-25-vs-26 · dạng-3 dead-code · doc-stale-at-birth pe-neg-quote · reviewer-coverage-gap-5spawn · 2 H24-dir-no-seed + stray-S54 → ALL CLOSED @S132) · S125 @start FLAGS 0-orphan/27 (2 H24-firstrun-no-diary HIGH · stray-S54-still → CLOSED @S132). m#12/#13 preserved in Methods §⭐. - **S126 (2026-07-16) session-end GATE [opus-worker, em-main VERIFY+APPEND]:** **PASS 5/5 trục** · orphan **0/29** run.md-folder (2 folder phiên này: S125→`spec-execution-synthesis.md` dạng-1 · S126→2 synthesis dạng-1) · Sàn-5 **0 lệch** (S126 born-in-session có `run=` marker session-log; S125 first-commit 13:29:43 = 77s PRE-session → ngoài scope birth-criterion) · corruption 0 (U+FFFD 0/4 + iconv VALID 4/4) · moved-not-cut 2 archive `@S126 hook-curate batch` VERIFIED khớp digest-pointer L1. Learned: grep `Ã|ư|â€` = **FALSE-POSITIVE generator trên VN UTF-8** (m#6 pattern MỚI — byte ư/ơ trùng-prefix + literal "mojibake" trong RCA-quote = m#9 self-quote); signal THẬT = U+FFFD-count + iconv round-trip. Coverage khi `wf_*` transcript KHÔNG git-tracked = **triangulation 3-nguồn** (session-log[wf+timing] ⋂ synthesis[cite-jsonl per-lane] ⋂ harvest-entry[name lane]). Surprise: Sàn-5 marker phải grep SESSION-LOG (`run=` prefix) KHÔNG phải WAL (path-form cite — 2 doc khác convention). Tag `[s126-end, gate-pass-5truc, 0orphan29, san5-0lech, m6-new-pattern-vn-utf8]`. - **S140 (2026-07-18) session-end GATE [opus-worker, self-write diary lượt-GATE — KHÁC lượt GATHER 0-ghi]:** **GATE PASS 5/5** · **8/8 invocation có vết** = reviewer 1-spawn/3-task (S140 fidelity-gate + S140b outward-gate; probe-5-nhãn 17s agentId `a56dcf6d` folded Vòng5 + cross-ref lead-view:15) · lead-view S140 1-FLAG-LOW `view-stale-status` · lead-omission S140 1-FLAG-MED `gap-owner-specifics`+2-INFORM+META (**S137-backfill CLOSED in-session** = GAP-3 tự-vá) · harvest ×5 GATHER → 5 gist committed `aa88d01` (5 file .gist.md verify-exist). **Coverage PASS** · Completeness 4-field đủ · **Placement PASS** (0 stray-S54 · 0 empty-dir m#13 · 0 role-thiếu-MEMORY · porcelain agent-memory 0 mồ-côi — S119-stray+2 H24-dir đã seed/rmdir từ S132, KHÔNG tái). **Corruption PASS** (FFFD 0/4 diary+archive · iconv VALID 3/3 · reviewer curate **moved-not-cut** S139+S134b verbatim `archive:81-82` + BATCH-marker`:79`; em-main +7/−0, tao verify 2-entry-verbatim). **Fidelity STRONG:** reviewer FIDELITY-FAIL inv-cb (2 recon-cluster `:28`/`:31` + AREA-2 anchor DROPPED, "Drop-thấp:0"=claim FALSIFIABLE-FALSE) → **re-distill LANDED verbatim** `## CỤM 11 [BỔ SUNG Fidelity-gate S140]` + honest-disclose "'0 drop' chỉ đúng từ bản này" ⇒ **FAIL→fix loop CLOSED traceable** (KHÁC propose-suông); lead-view/omission FLAG khớp `.session-counter.json _note` S140 EXACT. **Close-gate C5:** 0 run-folder SINH S140 (toàn Agent-tool mode-A ephemeral, latest=S138) ⇒ Sàn-5 0-marker-cần vacuous PASS · orphan-scan DUAL-ACCEPT **0/37**. GỘP 5-GATHER: đọc 5 verbatim→5 gist propose-only (≈183KB→69KB FROZEN), 4-PASS+1-FAIL(inv-cb)→re-distill +CUM11, 0-ghi by-design (prompt cấm cả diary). Chore: SELF 19.3KB>17.1 target → self-compact S123/S125/S126-block due (defer — no cut-mid-gate). Learned: FIDELITY-gate có RĂNG khi bắt "Drop-thấp:0" falsifiable + đòi re-distill verbatim đóng loop, KHÁC gate tick-nhị-phân; moved-not-cut chèn-TRƯỚC-stub same-source-string = byte-id by-construction. Surprise: cùng phiên FAIL→fix LANDED trọn (gist committed CÓ CỤM11 :28/:31) = harvest-integrity self-healing trong-phiên, hiếm. Tag `[s140-gate, gate-pass-5truc, 8of8-invocation, inv-cb-fidelity-fail-redistill-closed, s137-meta-backfill-closed, 0runfolder-modeA, orphan-0of37, moved-not-cut-verified]` +- **S143 (2026-07-22) session-end GATE `[opus-worker · #53 GARBLE lượt-1 → resume; em-main VERIFY+APPEND on-behalf]`** — **VERDICT GATE-PASS-5.** Phiên `/tiep` nối S142, owner gật 2 lượt, 5 sub spawn. **5-trục:** Coverage PASS (5/5 invocation có vết — brief nói 3 lane, đĩa có thêm `sub-tooling-4` + của tao ⇒ **đếm từ ĐĨA, đừng đếm từ brief**) · Completeness PASS · Placement PASS (`porcelain agent-memory`=0, 0 empty-dir) · Corruption PASS (U+FFFD 0/3 · iconv 3/3 · **moved-not-cut 16/16 byte-identical**) · **Fidelity PASS STRONG 0-fabrication**. C5 DUAL-ACCEPT: dạng-1 phẳng `audit-synthesis.md` 6717B ⇒ ĐỦ; orphan repo-wide **0/40**. Sàn-5 độc-lập: WAL=0 · session-log=1 ⇒ **KHỚP** (marker sống ở SỔ CÁI, không ở WAL — đúng thiết-kế). 🔴 **Ca FIDELITY on-behalf lần đầu chấm sâu:** `lead-view-auditor` garble ×2 ⇒ diary do LEAD ghi thay; tao đối-chiếu **từng mệnh-đề** vs `sub-lead-view-1.md` ⇒ 7 KHỚP · 1 TƯƠNG-ĐƯƠNG(paraphrase) · 3 BEYOND-SOURCE **nhưng truy được về đĩa** (lane khác cùng run-folder / commit thật) + quy-thuộc minh-bạch ("reviewer bắt") + tự-khai on-behalf ở đầu entry ⇒ **KHÔNG bịa**. **Bài:** beyond-source ≠ fabrication — tiêu-chí là *truy được về đĩa nào* + *có khai nguồn không*. **3 FLAG propose:** F1 MED counter-claim-vs-đĩa (diary khai `class_repeat` đã đổi mà `.session-counter.json` chưa — lead vá trong closeout) · F2 LOW stray git-MÙ `broadcasts/.claude/...` rỗng untracked lọt 2 closeout (lớp S54, `porcelain --ignored` IM với dir rỗng) · F3 MED **index nâng ×23 mà topic-file vẫn ×20** = sửa-một-phía (lead vá → ×25). **2 method mới:** **m#14** — chính tao dính bẫy m#5: `grep -v "^[+-][+-]"` **nuốt** dòng `+- [Title](…)` ⇒ suýt kết "diff rỗng"; đúng = `grep "^[+-]" | grep -v "^+++\|^---"`. **m#15** — moved-not-cut phải tách **dòng-nội-dung** vs **stub-trỏ-archive**, không tách ⇒ dương-giả "cut-not-moved" 4/20. Tag `[s143, gate-pass-5, fidelity-on-behalf-strong, beyond-source-≠-fabrication, dem-tu-dia-khong-tu-brief, m14-diff-filter, m15-stub-vs-content, san5-so-cai]` diff --git a/.claude/agent-memory/memory-budget.json b/.claude/agent-memory/memory-budget.json index 0bdca26..53fb74b 100644 --- a/.claude/agent-memory/memory-budget.json +++ b/.claude/agent-memory/memory-budget.json @@ -124,7 +124,7 @@ "jump_on_class_repeat": 3 }, "lead_self_audit": { - "_note": "Harness-24 (S121, 2026-07-15, wave adap-6-broadcast W2) CLOSED enum of flag classes for the 2 monitor roles lead-view-auditor + lead-omission-auditor. CLOSED = a monitor may NOT invent a class; an unclassifiable finding is reported verbatim + escalated to the owner to extend this list. Rationale (spec v2 M4): v1 required 'class in a CLOSED enum' but never listed the enum nor named the config key, so the enum lived only in one lane's head -- workers never see it, invent their own classes, and the statistics dilute. That is exactly what H24 §2(1) forbids. 5 view-* + 5 gap-* mirrors the 5+5 signals in H24 §2(1). S143 EXTENSION (2026-07-22, owner-approved): +1 class 'gap-incident-unrecorded' => now 5 view-* + 6 gap-*. Trigger that earned it: 3/3 subagents garbled (#53) in one session and the event left 0 trace on WAL/HANDOFF/STATUS/error-ledger while those surfaces were advertising '0-garble' (true, but about the PRIOR session); the running tally in .claude/auto-memory/feedback_agent_return_garble_recover.md had also been frozen at 'x20 through S118' for 8 session labels. lead-omission-auditor correctly REFUSED to invent the class and escalated verbatim per the CLOSED-enum rule above -- this entry is the owner extending the list, which is exactly the escape hatch that rule prescribes. Scope: an operational incident that happened and was verifiably not written to any durable ledger; NOT for a stale number (view-*) and NOT for a dropped carry (gap-carry-dropped).", + "_note": "Harness-24 (S121, 2026-07-15, wave adap-6-broadcast W2) CLOSED enum of flag classes for the 2 monitor roles lead-view-auditor + lead-omission-auditor. CLOSED = a monitor may NOT invent a class; an unclassifiable finding is reported verbatim + escalated to the owner to extend this list. Rationale (spec v2 M4): v1 required 'class in a CLOSED enum' but never listed the enum nor named the config key, so the enum lived only in one lane's head -- workers never see it, invent their own classes, and the statistics dilute. That is exactly what H24 §2(1) forbids. ORIGINAL SHAPE (S121): five view-* classes and five gap-* classes, mirroring the ten signals in H24 §2(1). S143 EXTENSION (2026-07-22, owner-approved): +1 class 'gap-incident-unrecorded' => now 5 view-* + 6 gap-*. Trigger that earned it: 3/3 subagents garbled (#53) in one session and the event left 0 trace on WAL/HANDOFF/STATUS/error-ledger while those surfaces were advertising '0-garble' (true, but about the PRIOR session); the running tally in .claude/auto-memory/feedback_agent_return_garble_recover.md had also been frozen at 'x20 through S118' for 8 session labels. lead-omission-auditor correctly REFUSED to invent the class and escalated verbatim per the CLOSED-enum rule above -- this entry is the owner extending the list, which is exactly the escape hatch that rule prescribes. Scope: an operational incident that happened and was verifiably not written to any durable ledger; NOT for a stale number (view-*) and NOT for a dropped carry (gap-carry-dropped).", "_vocab_guard": "'view' / 'omission' chosen DELIBERATELY to avoid collisions: scripts/governance-detectors.ps1:15 already owns 'derived-staleness' (so no class may be named *-stale-role or vai-STALE), and the bare word 'GAP' is overloaded elsewhere (session-end.md 'build-gap vs floor-rot'; scripts/memory-selfimprove-audit.ps1 'CRITERIA+GAP'). A colliding name would make two different detectors answer to the same word.", "flag_classes": [ "view-stale-count", diff --git a/.claude/agent-memory/tooling-auditor/MEMORY.md b/.claude/agent-memory/tooling-auditor/MEMORY.md index 0b8872d..a5421cb 100644 --- a/.claude/agent-memory/tooling-auditor/MEMORY.md +++ b/.claude/agent-memory/tooling-auditor/MEMORY.md @@ -49,4 +49,5 @@ H1 tooling-freshness auditor **SOLUTION_ERP-self**. Read-only + **propose-only** - **2026-07-15 (S123 @start) → `archive/2026-07.md` verbatim (compact S140, byte-verified +4329B):** ALL-4 PASS + 1 MED (G-015 overclaim 2-vai-H24, Bash residual) + 2 LOW; FP-census lane tôi 17/19 DƯƠNG-GIẢ · status6-stale-header 4th-recur (H24-1 mù) · measured{} 12/14 · perm-matrix silent-watch-loss. Lessons hoisted → user-memory `feedback_citation_trap_selfreference` + `feedback_goodhart_leave_measurement_set`. - **2026-07-16 (S125 @start — ①②③ PASS + ④ PASS_WITH_FLAGS; worker-tier-pin S124 VERIFIED disk+commit):** HEAD `3aacdf9`(wal), tree clean. **②ROSTER PASS** 14 persona; **14/14 `model:opus`@:5+`effort:max`@:6** on-disk+committed (`git show HEAD:tooling-auditor.md`✓); agents/ last-touch `23bbe97`(S124), 0-since. **①SKILL PASS** 6+23+18 identical S123; contract-wf/ef-core count-stale=monthly(08-01). **③PLUGIN PASS** 18/15/3 IDENTICAL; `claude-fable-5[1m]`:11 lead default UNCHANGED (pin=SUBS-only). **R6 ✓** project `settings.json:2` `autoMemoryDirectory`=`.claude/auto-memory`; my ctx-inject FROM that path ⇒ relocate WORKS; authority ③ user-global. **④ 5 RESIDUAL — worker-tier-pin doc-sync NOT finished:** HIGH `STATUS:25` row "all-inherit/TOÀN roster `model:inherit`" + stale "cả **12** lên top-tier"/"**10** product"(roster 14) · HIGH `agents/README:5` "TOÀN BỘ sub `model:inherit`" CONTRADICTS same-file :38 worker-tier-pin · MED `fable-real-runbook.md` **≥2 FALSE CITATION** `:227`/`:563` cite `investigator-codebase.md:5`/`reviewer.md:5`=`inherit` but disk=`opus` (fix NON-trivial: hmw.js alias-vs-frontmatter "chưa test") · MED `fable-real.md:37` · LOW `fable-clone.md:43`(corrected :57). 🔴 **ROOT:** `STATUS:41-42` blurb CLAIMS "doc-sync **Đà vá**" but 5-spot prove INCOMPLETE = tick-no-evidence → NOT-DONE. Ack machine-fired: STATUS:6 header H24-3; harness-11:57 vocab-seed +worker-tier-pin(D7). **Method:** frontmatter tier-flip→grep MỌI doc citing agent `:5`=inherit. Model self **Opus 4.8**. ⚠️L1 carry S126. `[s125-start, worker-tier-pin-verified, doc-sync-incomplete-5spot, false-citation-runbook, da-va-but-incomplete, mem-gap-s124]` - **S126 (2026-07-16) session-end CHỐT [opus-worker, em-main VERIFY+APPEND]:** 3/4 PASS-clean (① SKILL 6-project 0-diff — task gọi "check-email/send-email skill" thực-ra = **COMMANDS** `.claude/commands/`, 6 skill thật 0-đổi · ② ROSTER 14/14 `opus`@:5 + `max`@:6 disk-verified; README:5 + STATUS:25 flip worker-tier-pin ⇒ **S125-HIGH "README:5 contradicts :38" RESOLVED** · ③ PLUGIN 18/15/3 + `fable-5[1m]`/xhigh IDENTICAL) + ④ DOCS PASS_WITH_FLAGS: 🎯 bắt **5 dòng "H23-precedence CHƯA test" SÓT ở 3 command-file** (`session-start.md:50/:52` canonical BƯỚC 0.6 đọc MỖI phiên · `fable-clone.md:63/:65` cross-ref "hmw.js:44-52 mang cùng ghi-chú" ĐẢO/GÃY sau khi hmw.js vá · `ultra-on.md:35`) trong khi 7 file khác đã "ĐO S126" — **same-class-miss ×2 trong CÙNG PHIÊN đang vá class đó**; em-main vá NGAY 5/5 + LOW STATUS:25 "10+2"→"10+4". Learned: fact-runtime chốt ⇒ grep MỌI file mang claim cũ GỒM lớp **command-doc** (sweep-synthesis liệt consumer thiếu lớp ⇒ miss tái-sinh; commands/*.md blind-spot khớp S57/S99 method-mine). Tag `[s126-end, 5spot-h23-stale-caught, commands-layer-blindspot, s125-high-resolved]`. -- **S140 (2026-07-18) session-end CHỐT [opus-worker] — governance-only (0 code/mig/FE); diff `0b0285c..HEAD`:** **①SKILL PASS** 6-proj+23-standalone 0-diff (skills git-diff rỗng) · **NOTE** "183KB/5-file un-gisted baseline" ở 3 command-file (`session-start.md:131`·`session-end.md:56`·`sleep-recovery-memory-l2.md:52`) NAY stale-as-live: sleep-compress `aa88d01` gist 5/5 archive 2026-07 ⇒ un-gisted=0 (5/5 GIST-EXISTS verified). Display đo LIVE `(Get-Item).Length` KHÔNG consume số ⇒ 0 wiring-bug, chỉ misread-risk. Rec: coi ví-dụ-lịch-sử (đã dated 17-07). **②ROSTER PASS 14=14=14=14** (disk · STATUS:450 `**14**` · agents/README:3 B1-pointer-0-số · hmw.js:22-36 VALID_ROLES) + 0 agents-diff. **③PLUGIN PASS** 18/15/3 IDENTICAL (disabled pr-review·code-mod·hookify); settings user-global 0-touch. **④DOCS PASS_WITH_FLAGS:** (a) `session-model-se-draft.md` NEW anchored auto-memory `project_session_model_direction:14`+WAL:12+email — NOT orphan; HANDOFF-carry PENDING @closeout (WATCH) · (b) adap `624c378d` Vòng-5 verified-pending→executed-runtime self-contained (§2+§5 consistent) + checklist row-8 phép-8 + _index +1 email-row; NO further sync (_index=email-layer, lead-view S140) · (c) HANDOFF stamp S138-S139: NEXT (5)DP-5-sleep+(6)force-fire-H24+(8)phép-8 Đà actioned → closeout reconcile + refresh "183.054B chưa-gist". **NEW-ALLOC:** 5 gist = per-agent L2 own-dir (archive-flow auto-covers) ⇒ 0 alloc-action. Boundary: STATUS-header-stale = lead-view H24, KHÔNG double-touch. Model Opus 4.8. Tag `[s140-end, 3-mặt-pass-docs-flags, sleep-183kb-now-historical, draft-anchored-carry-pending, adap-vong5-executed-runtime, 5-gist-L2-autocover, L1-compact-s123]` \ No newline at end of file +- **S140 (2026-07-18) session-end CHỐT [opus-worker] — governance-only (0 code/mig/FE); diff `0b0285c..HEAD`:** **①SKILL PASS** 6-proj+23-standalone 0-diff (skills git-diff rỗng) · **NOTE** "183KB/5-file un-gisted baseline" ở 3 command-file (`session-start.md:131`·`session-end.md:56`·`sleep-recovery-memory-l2.md:52`) NAY stale-as-live: sleep-compress `aa88d01` gist 5/5 archive 2026-07 ⇒ un-gisted=0 (5/5 GIST-EXISTS verified). Display đo LIVE `(Get-Item).Length` KHÔNG consume số ⇒ 0 wiring-bug, chỉ misread-risk. Rec: coi ví-dụ-lịch-sử (đã dated 17-07). **②ROSTER PASS 14=14=14=14** (disk · STATUS:450 `**14**` · agents/README:3 B1-pointer-0-số · hmw.js:22-36 VALID_ROLES) + 0 agents-diff. **③PLUGIN PASS** 18/15/3 IDENTICAL (disabled pr-review·code-mod·hookify); settings user-global 0-touch. **④DOCS PASS_WITH_FLAGS:** (a) `session-model-se-draft.md` NEW anchored auto-memory `project_session_model_direction:14`+WAL:12+email — NOT orphan; HANDOFF-carry PENDING @closeout (WATCH) · (b) adap `624c378d` Vòng-5 verified-pending→executed-runtime self-contained (§2+§5 consistent) + checklist row-8 phép-8 + _index +1 email-row; NO further sync (_index=email-layer, lead-view S140) · (c) HANDOFF stamp S138-S139: NEXT (5)DP-5-sleep+(6)force-fire-H24+(8)phép-8 Đà actioned → closeout reconcile + refresh "183.054B chưa-gist". **NEW-ALLOC:** 5 gist = per-agent L2 own-dir (archive-flow auto-covers) ⇒ 0 alloc-action. Boundary: STATUS-header-stale = lead-view H24, KHÔNG double-touch. Model Opus 4.8. Tag `[s140-end, 3-mặt-pass-docs-flags, sleep-183kb-now-historical, draft-anchored-carry-pending, adap-vong5-executed-runtime, 5-gist-L2-autocover, L1-compact-s123]` +- **S143 (2026-07-22) session-end CHỐT `[opus-worker · #53 GARBLE lượt-1 → resume; em-main VERIFY+APPEND on-behalf]`** — **VERDICT DRIFT-FOUND (4).** 4 mặt: ① skill PASS · ② roster PASS (17=17=17=17: đĩa · `STATUS:450` · `hmw.js` VALID_ROLES · 17 folder agent-memory) · ③ plugin PASS-nhưng-2-delta-config · ④ docs DRIFT-2. **F-A — script đi trước doc:** `nhip-no-probe.ps1` nâng **3-vế → 4-vế** (`pull-cach`) nhưng 7 site PRESCRIPTIVE còn khai "3-vế" (`pause` · `session-end` ×3 · `session-start` · `tiep` · `session-model-se-draft`). 🔴 **Cách tách đúng:** site **prescriptive** (mô-tả hành-vi SỐNG) = DRIFT phải vá · site **frozen-in-time** (run-folder · adap-report · session-log · Prev-block STATUS/HANDOFF) = **record lịch-sử, sửa = giả-mạo**. Lead vá 7 site prescriptive, giữ 15 file frozen. **F-B HIGH — ghost-enum, ca đắt nhất:** enum `flag_classes` mở 10→11 (+`gap-incident-unrecorded`) nhưng `36cefcc` **KHÔNG đụng `lead-omission-auditor.md`** — ĐÚNG cái vai phải DÙNG class đó: heading "5 class", bảng 5 row, class mới **0 hit toàn `.claude/agents/`**. Vai bị luật "CẤM tự chế class" ⇒ lần tới gặp ca sẽ **escalate lại đúng thứ vừa được duyệt**. 🔴 **Bảng-cục-bộ (có cột ngữ-nghĩa + nơi-soi) THẮNG con-trỏ canonical trong thực dụng** — vai đọc bảng, không đọc con-trỏ. Kèm 2 site số (`STATUS:450` "10 class = 5+5" · `hmw.js:33`). 🔴 **Và phải biết chỗ KHÔNG sửa:** `lead-view-auditor.md` "5 class" **VẪN ĐÚNG** (nhánh view-* không đổi) — sửa thành 11 là **sai**. **F-C MED** lead-model pin flip `settings.json` → `claude-opus-4-8[1m]` không ghi sổ: `STATUS:462` là row session **DUY NHẤT** thiếu dòng `Lead `; `STATUS:450` còn "Fable 5"; `session-start.md:43` outage-recipe bảo đổi sang **đúng cái đang pin** ⇒ recipe hồi-phục thành **no-op**. Nhãn flip = quyền owner, không tự đoán. **F-D LOW** marketplace 35→37: tự soi — chính tao @S140 kết "PLUGIN PASS IDENTICAL" mà **chỉ đo lớp registered**; **marketplace-inventory là LỚP ĐO RIÊNG**, bỏ sót ≥5 ngày. **new-alloc:** 0 skill/plugin mới ⇒ 0 action; chỉ `security-guidance` đáng cân-nhắc (gán `reviewer`) nhưng nó mang **hook Stop + edit-time warning** đụng `settings.json` hooks ⇒ **owner quyết, không tự bật**. Tag `[s143, drift-found-4, prescriptive-vs-frozen, ghost-enum-bang-cuc-bo-thang-con-tro, biet-cho-khong-sua, layer-do-rieng-marketplace, model-pin-flip-unlogged]` \ No newline at end of file diff --git a/.claude/agents/lead-omission-auditor.md b/.claude/agents/lead-omission-auditor.md index 409560f..e2160e5 100644 --- a/.claude/agents/lead-omission-auditor.md +++ b/.claude/agents/lead-omission-auditor.md @@ -26,7 +26,7 @@ Máy **im là ĐÚNG** ở trục này: `governance-detectors.ps1` so *cái đan - `lead-view-auditor` soi **cái CÓ nhưng LỆCH** ⟂ mày soi **cái KHÔNG CÓ**. - `tooling-auditor` (H1) tooling-freshness · `harvest-curator` (H2) harvest-integrity — trục khác hẳn. -## 5 class của mày — enum ĐÓNG +## 6 class của mày — enum ĐÓNG 🔴 Đọc `.claude/agent-memory/memory-budget.json` → `lead_self_audit.flag_classes`. **CẤM tự chế class.** @@ -36,9 +36,10 @@ Máy **im là ĐÚNG** ở trục này: `governance-detectors.ps1` so *cái đan | `gap-carry-aged` | carry **quá-già** (sống qua ≥M dòng-carry liên-tiếp) | detector `H24-2` in streak/M — mày đọc, KHÔNG tính lại | | `gap-owner-specifics` | yêu-cầu owner ghi **chung-chung**, **không chép lại SPECIFICS** | `.claude/governance/ACTIVE-MARKS.md` · `owner-decisions-*.md` vs cách lead diễn-đạt lại | | `gap-decision-sunk` | **quyết-định-đang-treo** không được surface lại ⇒ **chìm luôn** | mục `⚪ chờ` / `CHƯA VERIFY` trong spec + owner-decisions — treo bao lâu rồi, phiên gần nhất có nhắc không? | +| `gap-incident-unrecorded` **(+S143, owner duyệt)** | **sự-cố vận-hành Đà XẢY RA nhưng không được ghi vào bất-kỳ sổ bền nào** — và bề-mặt vẫn đang quảng-cáo trạng-thái tốt của kỳ TRƯỚC | `.claude/WAL.md` · `docs/HANDOFF.md` · `docs/STATUS.md` · `docs/governance/error-ledger.md` · sổ đếm trong `.claude/auto-memory/` — sự-cố có vết ở transcript/run-folder mà **0 hit** trên các sổ này. 🔴 Ranh: KHÔNG dùng cho số-cũ (đó là `view-*`) hay carry-rớt (đó là `gap-carry-dropped`). *Ca sinh ra nó: S143 — 3/3 sub garble #53, cả 3 phải resume, 0 hit mọi sổ, trong khi WAL/HANDOFF đang khai "0-garble" (đúng, nhưng về phiên TRƯỚC); sổ đếm class đứng yên 8 nhãn phiên. Chính mày phát-hiện, **từ chối tự chế class**, escalate đúng luật ⇒ owner mở enum.* | | `gap-underfill` | **memory nạp DƯỚI hạn-mức** đã đặt | `memory-budget.json` → `token_governor` / `measured` vs thực-nạp | -🔸 **KHAI THẬT về ánh-xạ (đừng giả-vờ 1:1):** broadcast liệt **5 dấu-hiệu**, enum có **5 class**, nhưng KHÔNG khớp 1:1 — dấu-hiệu *"carry rớt hẳn **hoặc** quá-già"* **tách** thành 2 class (`dropped`/`aged`, vì 2 phép đo khác nhau: vắng-mặt vs độ-dài-chuỗi), còn *"việc rớt khỏi work-state"* **gộp** vào `gap-carry-dropped` (cùng bản-chất: cam-kết bị bỏ rơi). Gặp thứ không xếp được ⇒ báo nguyên-văn + đề-nghị anh mở-rộng enum, **CẤM bịa class**. +🔸 **KHAI THẬT về ánh-xạ (đừng giả-vờ 1:1):** broadcast liệt **5 dấu-hiệu**, enum nay có **6 class** (+`gap-incident-unrecorded` @S143 — class này **KHÔNG** đến từ broadcast mà từ ca thật của SE, owner mở), nhưng KHÔNG khớp 1:1 — dấu-hiệu *"carry rớt hẳn **hoặc** quá-già"* **tách** thành 2 class (`dropped`/`aged`, vì 2 phép đo khác nhau: vắng-mặt vs độ-dài-chuỗi), còn *"việc rớt khỏi work-state"* **gộp** vào `gap-carry-dropped` (cùng bản-chất: cam-kết bị bỏ rơi). Gặp thứ không xếp được ⇒ báo nguyên-văn + đề-nghị anh mở-rộng enum, **CẤM bịa class**. ## Nhịp diff --git a/.claude/auto-memory/MEMORY.md b/.claude/auto-memory/MEMORY.md index c725e95..90863c9 100644 --- a/.claude/auto-memory/MEMORY.md +++ b/.claude/auto-memory/MEMORY.md @@ -31,7 +31,7 @@ - [Prod config: inspect-before-change](feedback_prod_config_inspect_before_change.md) — đổi config prod = inspect LIVE trước (runbook STALE); backup→apply→verify-LIVE→commit; replicate mọi rule cũ + delta (S88) - [Wipe durability — check re-seed](feedback_wipe_durability_check_reseed.md) — sau prod-wipe audit seeder: ungated per-code seed RE-ADD mỗi restart; gate sau env-flag + verify-by-restart-THẬT (S91, #75/#76) - [Verify deployed artifact byte-level](feedback_verify_deployed_artifact_byte_level.md) — UAT "fix chưa ăn" sau deploy → curl-grep bundle prod byte-level (cache≠deploy); incognito=golden-test (S96, #77) -- [Agent return-garble recover](feedback_agent_return_garble_recover.md) — sub trả wrong-slice-of-transcript thay verdict (#53, **×23 qua S143** — S143 ×3, 3/3 sub cùng phiên) → recover: **(0) WRITE-lane→disk-truth (git+build+test) · VERIFY-lane→em-main-re-curl+sqlcmd (2-nguồn-khớp)** → (1) diary → (2) SendMessage-resume in-session → (3) em-main solo; garble ∝ reasoning-lane; **WRITE-lane garble≠mất-code** (S114 ×5); cicd tái-phạm dai + tự-dán "CLEAN-return" sai (harvest-curator bắt S118) +- [Agent return-garble recover](feedback_agent_return_garble_recover.md) — sub trả wrong-slice-of-transcript thay verdict (#53, **×25 qua S143** — S143 ×5, **5/5 sub cùng phiên**; +path-4 lead-on-behalf khi resume không cứu được diary) → recover: **(0) WRITE-lane→disk-truth (git+build+test) · VERIFY-lane→em-main-re-curl+sqlcmd (2-nguồn-khớp)** → (1) diary → (2) SendMessage-resume in-session → (3) em-main solo; garble ∝ reasoning-lane; **WRITE-lane garble≠mất-code** (S114 ×5); cicd tái-phạm dai + tự-dán "CLEAN-return" sai (harvest-curator bắt S118) - [H18 ghost-wire + stamp-integrity](feedback_h18_ghostwire_stamp_integrity.md) — hash-verify TRƯỚC khi áp broadcast (bắt stamp-then-edit THẬT → HELD + re-stamp); ghost-wire 2 class (cron-claim CronList=0 · config-key defined-but-unread); KHÔNG stamp run-id chưa chạy (S100) - [Resume premise re-verify](feedback_resume_premise_reverify.md) — re-verify tiền-đề từ ĐĨA trước execute (header+git-date, match NỘI-DUNG KHÔNG tên-file 1:1); **S121: bảng-kế-hoạch ≠ đĩa — "không-ai-được-giao" ≠ "chưa-làm"; khẳng-định trạng-thái-đĩa = phải chạm đĩa 1 lệnh**; +bẫy `grep -c` (dòng) vs `-o|wc -l` (occurrence) trên mega-line; +bẫy Get-Content-no-Encoding no-BOM = ANSI đếm ×2-3 → báo-số-sai-owner, đính-chính-ngay (S130 E-010/AS-14); +acceptance literal tự-lão-hoá (S109/S121) - [Permission grant = 2 layers](feedback_permission_grant_two_layers.md) — cấp/verify quyền = display-layer (menu CanRead) ⟂ API-authz-layer (controller `[Authorize(Policy)]`) 2 tầng ĐỘC-LẬP; grep authz controller đích TRƯỚC khi tin grant (menu-ẩn ≠ API-đóng; `[Authorize]` trần = lỗ hổng); reviewer-adversarial bắt, em-main-solo sót (S118, #82) diff --git a/.claude/auto-memory/feedback_agent_return_garble_recover.md b/.claude/auto-memory/feedback_agent_return_garble_recover.md index 0d7b5a2..a12c313 100644 --- a/.claude/auto-memory/feedback_agent_return_garble_recover.md +++ b/.claude/auto-memory/feedback_agent_return_garble_recover.md @@ -5,10 +5,11 @@ metadata: node_type: memory type: feedback originSessionId: 67157d21-1ead-475d-9a50-cf7f07468583 + modified: 2026-07-22T07:02:24.261Z --- Sub-agent đôi khi trả về message CUỐI = text bước memory-curation của nó ("Still 18KB, let me trim...", "Memory updated, splice correct...") THAY VÌ verdict/findings của task (#53 return-channel garble). Nhưng WORK + agent-memory diary VẪN ĐÚNG (nó làm task xong, ghi diary chuẩn, chỉ return nhầm text bước cuối). **Recover: đọc `agent-memory//MEMORY.md` recent-entry lấy verdict thật — KHÔNG re-spawn** (tốn + có thể garble tiếp; hoặc em-main re-do solo cho task cần chắc). Instruction-fix spawn-prompt "🔴 message CUỐI PHẢI là verdict, KHÔNG phải memory-note" GIẢM garble nhưng KHÔNG 100%. -**Why:** S96 ×3 + **S97 ×3 = ×6 tổng** (cicd-monitor = 5/6 = kẻ tái phạm dai). S96: investigator-codebase 1× + cicd-monitor 2×. **S97: cicd-monitor ×3** (#481 "18.7KB above" + #482 "18.1KB trim S79/S93" + #484 "DATA-SEED-PASS keys merge") — ĐỀU garble text trim-memory **DÙ spawn-prompt explicit "return verdict NOT memory-curation"** → instruction-fix **KHÔNG reliable** (bác claim S96 "lần-3 fixed"); recover verdict từ diary (Run #481 + #482 đủ chi tiết: Mig 60 applied + EF-ternary 200-live + bundle) KHÔNG re-spawn. **🔴 Root-cause structural (mới S97):** cicd-monitor MEMORY.md tự đặt target ~17.1KB, mỗi return CHẠM cap → curate-at-return, và "thinking" bước curate = message CUỐI = return value. Fix bền = **giảm áp lực curate** (archive cicd sớm để return KHÔNG trùng curate-step) HOẶC hook tách verdict-return khỏi memory-step — KHÔNG phải instruction. **Chốt:** recover-from-diary = net ROBUST; instruction "return-verdict" chỉ giảm tần suất (persona memory-curation stochastic — giống AS-10 self-write S95). **+ schema-param KHÔNG chặn return-fail (S97 review-workflow):** 2/4 lane (reviewer+investigator) FAIL StructuredOutput DÙ có `schema` ép-call → return-reliability rộng hơn curate-garble; recover từ diary (reviewer) + em-main tự-cover (grep). → lane QUAN-TRỌNG luôn cần fallback recover-diary/em-main-solo, đừng tin schema chặn được 100%. **+ S103 ×3 = ×9 tổng** (investigator recon + 2 review-lane, DÙ schema+nudge). 🔴 **NEW correlation task-shape (S103):** build-workflow lane NARROW-scoped ("viết script X + return schema") **3/3 CLEAN** vs review-workflow lane OPEN-reasoning ("cố phá + phán-xử") **1/3** → **garble ∝ open-ended-reasoning-task, KHÔNG narrow-build** (cùng schema/nudge/model). Lane-B garble-return NHƯNG full-review Ở DIARY → recover-from-diary hoàn-chỉnh (verdict PASS + 2-CONCERN). → **mitigation = N-lane-redundancy (1 survivor phủ redundant core-concern) + narrow-scoped-schema-lane + em-main-recover-partial** (SE adap-request lên AI_INFRA S103). **+ S105 ×2 = ×11 tổng** (tooling-auditor @bootstrap trả NOTE-DỞ-DANG mid-work + investigator BVAAU trả CÂU MỞ ĐẦU — cả 2 reasoning-lane khớp correlation S103; class RỘNG hơn curate-text: return = wrong-slice-of-transcript bất kỳ, kể cả dòng đầu). 🔴 **NEW recover-path (S105): diary TRỐNG (sub chưa kịp ghi entry cho task đó) → SendMessage-RESUME chính agentId trong-session** (context 150K còn sống) với yêu cầu "nhả verdict theo format, KHÔNG investigate thêm" → verdict đầy đủ chất-lượng-cao lần 2 (investigator BVAAU 3-Q RCA hoàn chỉnh, ~3'). Thứ tự recover: **(1) diary → (2) SendMessage-resume in-session → (3) em-main re-do solo.** **+ S110 ×2 = ×13 tổng** (invest + reviewer — CẢ 2 lane Fable-deep-pass engine-đắt, khớp correlation reasoning-lane; return = 1 câu status giữa-chừng). Cả 2 diary TRỐNG → **SendMessage-resume 2/2 SẠCH → path-2 lifetime 3/3** (S105 + S110×2) — resume re-emit verdict đầy-đủ chất-lượng-cao, 0 investigate lại. Path-2 = default khi diary trống, robust hơn dự đoán. (+monitor-return transcript-LOST khác class: S109 cicd + S110 lượt-sáng 2 monitor — work+diary XONG nhưng return không tới context; disk-diary cứu — WATCH tần suất riêng.) **+ S114 ×5 = ×18 tổng** (review-lane + BE + FE + test + cicd — HMW implement + verify workflow, lead=Opus). 🔴 **NEW class WRITE-lane-garble (S114 quan-trọng):** lane GHI CODE (implementer-backend/frontend/test) garble return → recover KHÔNG từ diary (write-lane không có verdict-diary) mà từ **DISK: `git status`/`git diff` + `dotnet build`/`dotnet test`** ([[feedback_agent_kill_recovery]]). BE-lane 6-file+mig verify-diff-đúng+compile-sạch; FE-lane garble GIỮA mirror → chỉ fe-admin xong (git-status thiếu fe-user) → em-main `cp fe-admin→fe-user` + SHA-verify; test-lane 7-file → `dotnet test` 482 xanh. **Workflow-tool teeth (chốt):** stage-1 `await agent()` TRỰC-TIẾP → 1 garble throw **giết cả workflow** (FE+test stage-2 không chạy); dùng **`parallel()` = thunk-garble→null, workflow SỐNG** → verify-từ-disk bất-kể return. Với WRITE-lane, **return chỉ nice-to-have, DISK = ground-truth**. cicd-lane ×5/6-tổng tái phạm dai → em-main-solo curl-verify (bundle-rotate + byte-verify + smoke). Path recover mở-rộng: **(0) WRITE-lane → disk-truth (git+build+test) → (1) diary → (2) SendMessage-resume → (3) em-main solo.** **+ S118 ×2 = ×20 tổng** (cicd-monitor ×2 — CẢ 2 verify-lane deploy-durability garble return memory-curation ["#388 entry compress prior" + "older stubs archived, tighten longest"], khớp correlation reasoning-lane + cicd tái-phạm dai nhất). 🔴 **VERIFY-lane recover (S118) = READ-lane biến-thể của WRITE-lane disk-truth:** cicd verify-deploy garble → **em-main-solo re-verify từ prod ĐỘC-LẬP** (curl health/401/bundle + `ssh sqlcmd` Serilog/permission-state) → **2 nguồn ĐỘC-LẬP khớp** = verdict chắc. verify-lane garble ≠ mất-việc (verify là READ prod, em tự làm lại được, KHÔNG cần agent). **Serilog log-line = bằng-chứng mạnh nhất** ("Revoked 9"→"Seeded 9 upgraded" 44ms = seeder-thắng-revoke durable, mạnh hơn end-state-DB đơn-thuần). Chốt tổng: WRITE→disk · VERIFY→em-main-re-curl+query · REASONING→diary/resume. +**Why:** S96 ×3 + **S97 ×3 = ×6 tổng** (cicd-monitor = 5/6 = kẻ tái phạm dai). S96: investigator-codebase 1× + cicd-monitor 2×. **S97: cicd-monitor ×3** (#481 "18.7KB above" + #482 "18.1KB trim S79/S93" + #484 "DATA-SEED-PASS keys merge") — ĐỀU garble text trim-memory **DÙ spawn-prompt explicit "return verdict NOT memory-curation"** → instruction-fix **KHÔNG reliable** (bác claim S96 "lần-3 fixed"); recover verdict từ diary (Run #481 + #482 đủ chi tiết: Mig 60 applied + EF-ternary 200-live + bundle) KHÔNG re-spawn. **🔴 Root-cause structural (mới S97):** cicd-monitor MEMORY.md tự đặt target ~17.1KB, mỗi return CHẠM cap → curate-at-return, và "thinking" bước curate = message CUỐI = return value. Fix bền = **giảm áp lực curate** (archive cicd sớm để return KHÔNG trùng curate-step) HOẶC hook tách verdict-return khỏi memory-step — KHÔNG phải instruction. **Chốt:** recover-from-diary = net ROBUST; instruction "return-verdict" chỉ giảm tần suất (persona memory-curation stochastic — giống AS-10 self-write S95). **+ schema-param KHÔNG chặn return-fail (S97 review-workflow):** 2/4 lane (reviewer+investigator) FAIL StructuredOutput DÙ có `schema` ép-call → return-reliability rộng hơn curate-garble; recover từ diary (reviewer) + em-main tự-cover (grep). → lane QUAN-TRỌNG luôn cần fallback recover-diary/em-main-solo, đừng tin schema chặn được 100%. **+ S103 ×3 = ×9 tổng** (investigator recon + 2 review-lane, DÙ schema+nudge). 🔴 **NEW correlation task-shape (S103):** build-workflow lane NARROW-scoped ("viết script X + return schema") **3/3 CLEAN** vs review-workflow lane OPEN-reasoning ("cố phá + phán-xử") **1/3** → **garble ∝ open-ended-reasoning-task, KHÔNG narrow-build** (cùng schema/nudge/model). Lane-B garble-return NHƯNG full-review Ở DIARY → recover-from-diary hoàn-chỉnh (verdict PASS + 2-CONCERN). → **mitigation = N-lane-redundancy (1 survivor phủ redundant core-concern) + narrow-scoped-schema-lane + em-main-recover-partial** (SE adap-request lên AI_INFRA S103). **+ S105 ×2 = ×11 tổng** (tooling-auditor @bootstrap trả NOTE-DỞ-DANG mid-work + investigator BVAAU trả CÂU MỞ ĐẦU — cả 2 reasoning-lane khớp correlation S103; class RỘNG hơn curate-text: return = wrong-slice-of-transcript bất kỳ, kể cả dòng đầu). 🔴 **NEW recover-path (S105): diary TRỐNG (sub chưa kịp ghi entry cho task đó) → SendMessage-RESUME chính agentId trong-session** (context 150K còn sống) với yêu cầu "nhả verdict theo format, KHÔNG investigate thêm" → verdict đầy đủ chất-lượng-cao lần 2 (investigator BVAAU 3-Q RCA hoàn chỉnh, ~3'). Thứ tự recover: **(1) diary → (2) SendMessage-resume in-session → (3) em-main re-do solo.** **+ S110 ×2 = ×13 tổng** (invest + reviewer — CẢ 2 lane Fable-deep-pass engine-đắt, khớp correlation reasoning-lane; return = 1 câu status giữa-chừng). Cả 2 diary TRỐNG → **SendMessage-resume 2/2 SẠCH → path-2 lifetime 3/3** (S105 + S110×2) — resume re-emit verdict đầy-đủ chất-lượng-cao, 0 investigate lại. Path-2 = default khi diary trống, robust hơn dự đoán. (+monitor-return transcript-LOST khác class: S109 cicd + S110 lượt-sáng 2 monitor — work+diary XONG nhưng return không tới context; disk-diary cứu — WATCH tần suất riêng.) **+ S114 ×5 = ×18 tổng** (review-lane + BE + FE + test + cicd — HMW implement + verify workflow, lead=Opus). 🔴 **NEW class WRITE-lane-garble (S114 quan-trọng):** lane GHI CODE (implementer-backend/frontend/test) garble return → recover KHÔNG từ diary (write-lane không có verdict-diary) mà từ **DISK: `git status`/`git diff` + `dotnet build`/`dotnet test`** ([[feedback_agent_kill_recovery]]). BE-lane 6-file+mig verify-diff-đúng+compile-sạch; FE-lane garble GIỮA mirror → chỉ fe-admin xong (git-status thiếu fe-user) → em-main `cp fe-admin→fe-user` + SHA-verify; test-lane 7-file → `dotnet test` 482 xanh. **Workflow-tool teeth (chốt):** stage-1 `await agent()` TRỰC-TIẾP → 1 garble throw **giết cả workflow** (FE+test stage-2 không chạy); dùng **`parallel()` = thunk-garble→null, workflow SỐNG** → verify-từ-disk bất-kể return. Với WRITE-lane, **return chỉ nice-to-have, DISK = ground-truth**. cicd-lane ×5/6-tổng tái phạm dai → em-main-solo curl-verify (bundle-rotate + byte-verify + smoke). Path recover mở-rộng: **(0) WRITE-lane → disk-truth (git+build+test) → (1) diary → (2) SendMessage-resume → (3) em-main solo.** **+ S118 ×2 = ×20 tổng** (cicd-monitor ×2 — CẢ 2 verify-lane deploy-durability garble return memory-curation ["#388 entry compress prior" + "older stubs archived, tighten longest"], khớp correlation reasoning-lane + cicd tái-phạm dai nhất). 🔴 **VERIFY-lane recover (S118) = READ-lane biến-thể của WRITE-lane disk-truth:** cicd verify-deploy garble → **em-main-solo re-verify từ prod ĐỘC-LẬP** (curl health/401/bundle + `ssh sqlcmd` Serilog/permission-state) → **2 nguồn ĐỘC-LẬP khớp** = verdict chắc. verify-lane garble ≠ mất-việc (verify là READ prod, em tự làm lại được, KHÔNG cần agent). **Serilog log-line = bằng-chứng mạnh nhất** ("Revoked 9"→"Seeded 9 upgraded" 44ms = seeder-thắng-revoke durable, mạnh hơn end-state-DB đơn-thuần). Chốt tổng: WRITE→disk · VERIFY→em-main-re-curl+query · REASONING→diary/resume. **+ S143 ×5 = ×25 tổng** — 🔴 **kỷ-lục 1 phiên: 5/5 sub garble** (reviewer ×2-lần · lead-view · lead-omission · tooling-auditor · harvest-curator), TẤT CẢ đều reasoning-lane, khớp correlation S103. 🔴 **3 data-point MỚI:** **(a) prompt-đúng-từ-đầu KHÔNG chặn được — lần thứ 3 liên tiếp xác nhận:** spawn-prompt của cả 5 vai đã cấm bẫy "trả verdict trước, làm sau" + ép "GHI ĐĨA TRƯỚC, RETURN SAU" NGAY từ lượt đầu ⇒ vẫn 5/5 garble. Thứ **thật sự cứu** = chính câu ép-ghi-đĩa đó: **0 dữ-liệu mất**, mỗi lần garble đều vớt trọn từ `runs//sub-*.md`. Chống #53 là **thiết-kế artifact**, KHÔNG phải thiết-kế prompt. **(b) recover-path THỨ 4 — resume KHÔNG cứu được diary:** `lead-view-auditor` garble ×2, sau resume nó ghi tiếp sub-file nhưng **KHÔNG ghi diary** (mtime đứng nguyên) ⇒ path-2 (SendMessage-resume) **thất bại ở trục diary** lần đầu ⇒ phải **lead APPEND on-behalf sau VERIFY từ sub-file** (B3, tiền-lệ retro-harvest S132); harvest-curator chấm Fidelity ca này **PASS STRONG 0-fabrication** với 2 nit nhãn-nguồn. ⇒ path đầy-đủ nay: **(0) WRITE→disk · (1) diary · (2) resume · (3) lead-on-behalf-từ-sub-file · (4) em-main solo.** **(c) tally tự nó là bẫy:** lead nâng sổ giữa phiên khi mới 3 sub garble (ghi "×23") rồi 2 sub nữa garble ⇒ số sai ngay trong cùng phiên ⇒ **cập-nhật tally ở CUỐI phiên, đừng giữa phiên**; và sổ này từng đứng yên 8 nhãn phiên (×20 từ S118) trong khi class vẫn fire — chính là ca đẻ ra class `gap-incident-unrecorded` (@S143 owner mở enum). **How to apply:** sub return text lạ (memory-curation/off-topic) → ĐỪNG tin nó fail/vô-dụng; đọc diary lấy kết-quả. Task-cần-chắc (bug-reasoning) → em-main re-do solo (reliable). Liên [[feedback_agent_kill_recovery]] · [[feedback_workflow_fanout_reliability]]. diff --git a/.claude/commands/pause.md b/.claude/commands/pause.md index 905c34c..e2387ce 100644 --- a/.claude/commands/pause.md +++ b/.claude/commands/pause.md @@ -41,7 +41,7 @@ Báo đúng sáu ý: 2. **mục `[!]` đầu-tiên** — bước dở gần nhất. 3. **workflow bỏ lại** (nếu có) — dòng `wf:` đã ghi. 4. "**an-toàn để thoát, đổi acc, hoặc tắt máy**". -5. **dòng-nợ (Item 2 S135):** gọi `powershell.exe -ExecutionPolicy Bypass -File scripts/nhip-no-probe.ps1` in dòng-nợ 3-vế (nhịp-kiểm đọc post-tick bước 3.5). 🔴 **probe KHÔNG chặn điểm dừng**: lỗi → in `probe-loi (khong chan)` → đi tiếp, VẪN tuyên-bố "an-toàn để thoát". +5. **dòng-nợ (Item 2 S135):** gọi `powershell.exe -ExecutionPolicy Bypass -File scripts/nhip-no-probe.ps1` in dòng-nợ 4-vế (nhịp-kiểm đọc post-tick bước 3.5). 🔴 **probe KHÔNG chặn điểm dừng**: lỗi → in `probe-loi (khong chan)` → đi tiếp, VẪN tuyên-bố "an-toàn để thoát". 6. **🧾 MASTER-CHECKLIST rút-gọn (S138):** derive từ WAL vừa ghi (bước 3) + HANDOFF — in **Tầng-1** mỗi arc 1 dòng `{đóng · đang · chưa}` + **đếm 4-nhóm** (`xong` / `đang-dở` / `chờ-anh` / `chưa-làm`) + **liệt nhóm chờ-anh — 🔢 BẮT BUỘC ĐÁNH SỐ** (anh trả lời bằng số). 🔴 **Checklist = VIEW derive tươi — CẤM tạo file checklist nguồn-đôi (sàn-3).** Rồi **DỪNG HẲN**, KHÔNG nhận việc mới. diff --git a/.claude/commands/session-end.md b/.claude/commands/session-end.md index 7ea77df..829460a 100644 --- a/.claude/commands/session-end.md +++ b/.claude/commands/session-end.md @@ -54,13 +54,13 @@ Em main PHẢI echo **TOÀN BỘ nội dung command body này** (đầy đủ Ph - **(a) summary-index** += 1 dòng/session vào `STATUS.md` Recently Done (pointer, KHÔNG full-log). - **(b) Active-Guards** (error-ledger): promote guard **2-strike** (episodic→procedural) · mark `verified` nếu held qua session · retire theo **net-effect** (hại>lợi → gỡ). - **(c) chore-flag:** 🔒 **Đóng-băng bề-mặt-đo (C1 — 2 câu, S138):** "Từ lúc chạy script đo đầu-tiên của khối (c) tới verdict cuối: KHÔNG ghi vào **bề-mặt-đo** = `.claude/agent-memory/**` + `.claude/governance/{.session-counter.json, ACTIVE-MARKS.md}` + `docs/{STATUS,HANDOFF,gotchas}.md` + `docs/governance/error-ledger.md` + `docs/changelog/migration-todos.md` + `.claude/agents/*.md` + `runs/*/run.md`; việc ghi phát sinh giữa chừng → xếp hàng SAU verdict. Ngoại-lệ: `.claude/WAL.md` (ngoài vùng đọc cả 5 script đo) + state-write của chính bộ-đo (`.mfe-state.json`)." · agent L1 >~30KB → archive L2 · error-ledger open-entry quá ngưỡng · **0-byte memory check (AS-8)** · **🌙 sleep-check (Harness-10b, S72):** `last_sleep_at` null hoặc ≥7d (`memory-budget.json`) → INFORM gợi-ý `/sleep-recovery-memory-l2` (KHÔNG auto-run) **+ byte-display (Item 8/M-10 S135):** khi INFORM fire → in kèm **tổng byte `agent-memory/*/archive/.md` CHƯA có `.gist.md`** (match PREFIX kỳ, đo TƯƠI `(Get-Item).Length` — 🔴 CẤM `Get-Content`-đếm, bẫy encoding E-010; baseline 17-07 kỳ `2026-07` ≈183KB/5 file [ví-dụ-lịch-sử — kỳ 2026-07 đã gist @S140→chưa-gist ~0]) → anh đặt ngưỡng byte sau, 🔴 **KHÔNG bịa số** (giữ INFORM 7-ngày — DP-5 quyền owner cục-bộ) · **🗜️ Harness-11 A/D2 (S75):** chạy `powershell.exe -ExecutionPolicy Bypass -File scripts/memory-archive-gate.ps1` (DRY-RUN) → đề-xuất dồn-archive sub over-cap (A4 hysteresis 0.85 + A5 keep-floor 5 + A6 2-strike) + A7 NO-API L1-eval (pointer-resolve + byte-0-loss). Engine → [`docs/governance/harness-11-engine.md`](../../docs/governance/harness-11-engine.md). DRY-RUN báo kế-hoạch; MOVE thật do em-main (D5 AUTO semantic-null sau khi xem). · **📊 Hot-feed %-print CUỐI phiên (Harness-15-v2 §G.4, S82):** in composition Tầng-1 theo **%/4-bucket** SAU khi đã nạp/tăng trong phiên + **Headroom còn-trống** so cap role (`token_governor.tier1_hotfeed_tokens`). Đối-xứng `session-start §2.1.6` (đầu phiên). Mục-đích: anh thấy Tầng-1 phình/teo ra sao + còn trống bao nhiêu → quyết chỉnh cap. 🔴 con-số = quyền anh (chủ-dự-án); em-main chỉ báo-%, KHÔNG tự-chỉnh. · **📊 Bảng-số ngân-sách + run-loop 2-tầng (M.B/M.C — Harness-20 adap S103, [`engine §M`](../../docs/governance/harness-11-engine.md)):** chạy `powershell.exe -ExecutionPolicy Bypass -File scripts/crystallized-backfill.ps1` → in BẢNG số THẬT (cap/hotload-bytes/tok-RANGE/headroom/target/backfill, live 0-hardcode) cạnh %-print. **Tầng-1 ĐO** (deterministic scripts) mỗi end = khối-số tươi (chống "khai-chạy-mà-không-chạy"); **Tầng-2 TINH-CHỈNH on-signal** (gap-mới/drift-vs-last/orphan-TĂNG/coverage-tụt → **cảnh-báo ĐỎ** + refine-in-session HOẶC carry-hi-prio nếu đứt-phiên) — KHÔNG nuốt tín-hiệu; weekly full-refine backstop. backfill default 0=OFF (owner). 🟡 M.C largely-already-met (H17-loop + %-print đã có ở dưới), khối-số = formalize. · **🧪 MFE retention opt-in (Harness-16 §H):** lệnh kèm `eval` → chạy `scripts/mfe-eval.ps1` cuối-phiên (retention; chênh vs baseline §2.1.6 = rot trong-phiên) → quyết-định 2-ca: **thiếu-chỗ→TĂNG budget** (anh quyết) / **rot→SẮP-XẾP-LẠI** (ưu-tiên-giá-trị). READS budget, KHÔNG ghi/auto-tune. · **🔁 H17 loop-REFINE (§I, S95 — [`harness-11-engine.md §I`](../../docs/governance/harness-11-engine.md)):** lệnh kèm `eval` → chạy thêm `scripts/memory-selfimprove-audit.ps1` (spec-audit CRITERIA+GAP) → áp bảng B1 **tín-hiệu→hành-động**: floor-rot→**reinject-verbatim** (ghi [`reinject-ledger.md`](../governance/reinject-ledger.md) CG-1 ≤1/N=3; đo-lại vẫn thiếu→**escalate anh** KHÔNG tự-reinject-lần-2) · repeat≥2→promote · old+valueless→archive-gate · raw→distill (`/sleep-recovery-memory-l2`). Phân-loại B3 (build-gap vs floor-rot) TRƯỚC reinject. em-main single-writer D9; loop CHỈ đề-xuất (D6). Light→skip. - - **🧬 memory-triple artifact (Item 3-bis S135 — B2 vòng-3 lên CHỨC-NĂNG; 0 vai mới, 0 script mới):** khi chạy khối (c) memory-maintenance ở trên, ghi **các dòng artifact tuần-tự** (prefix `memory-triple` — đếm từ khối dưới, KHÔNG chép số vào nhãn per B1 dòng-đầu §L.b) vào session-log (`docs/changelog/sessions/`) — run-record: **3-stage** đo→đề-xuất→kiểm **+ do-record** (governance-detectors TOTAL · nhịp-nợ 3-vế, +S138): + - **🧬 memory-triple artifact (Item 3-bis S135 — B2 vòng-3 lên CHỨC-NĂNG; 0 vai mới, 0 script mới):** khi chạy khối (c) memory-maintenance ở trên, ghi **các dòng artifact tuần-tự** (prefix `memory-triple` — đếm từ khối dưới, KHÔNG chép số vào nhãn per B1 dòng-đầu §L.b) vào session-log (`docs/changelog/sessions/`) — run-record: **3-stage** đo→đề-xuất→kiểm **+ do-record** (governance-detectors TOTAL · nhịp-nợ 4-vế, +S138): ``` memory-triple: do= memory-triple: de-xuat= memory-triple: kiem= memory-triple: do-record= - memory-triple: do-record= + memory-triple: do-record= ``` - **(d) flush agent-memory** mỗi sub đã spawn session này — **spawn-record 4-field** `{agent · task · nấc(agreed/executed/verified) · evidence}`. (0 sub spawn → "n-a".) → **⬜ harvest-curator (H2) HỖ TRỢ:** spawn → propose spawn-record cho mọi sub đã chạy → em main single-writer VERIFY → APPEND (B3 no-overwrite-unverified). - **(e) pending-request audit:** request anh CHƯA-thực-thi đã log SPECIFICS chưa (KHÔNG placeholder). @@ -98,7 +98,7 @@ Em main PHẢI echo **TOÀN BỘ nội dung command body này** (đầy đủ Ph **Acceptance:** chênh-lệch **0**, HOẶC in được danh-sách lệch. 🔸 *Sàn-5 là **informational** — chính vì thế nó **an-toàn để sai**, và cái sai đó đã trả giá bằng việc tự lộ 2 bug ở lần chạy đầu. Nếu nó là cổng-chặn thì 9 dương-giả kia đã chặn cả phiên.* - **(j) 🔷🔶 H24 lead-self-audit — counter + spawn theo NHỊP (adopt S122; đối-xứng `session-start §2.1.8`):** - - **(i) BÁO dòng-nợ 3-vế (nâng dòng H24 cũ — Item 2 S135):** gọi `powershell.exe -ExecutionPolicy Bypass -File scripts/nhip-no-probe.ps1` → in **1 dòng** `NHIP-NO: kiem light a/e deep b/f | tran-bo-nho x over-cap | run-chua-gom y` (vế-1 nhịp-kiểm THAY dòng `counter=… light … deep … OVERDUE` cũ, đọc `.session-counter.json` + `h24_cadence`). 🔴 **probe KHÔNG chặn**: lỗi → in `probe-loi (khong chan)` → đi tiếp. 🔴 **Nhịp ĐỌC từ config, CẤM hardcode ở đây** (detector `governance-detectors.ps1` H24-2 **fail-loud** nếu key thiếu — **không** giả-định default). + - **(i) BÁO dòng-nợ 4-vế (nâng dòng H24 cũ — Item 2 S135):** gọi `powershell.exe -ExecutionPolicy Bypass -File scripts/nhip-no-probe.ps1` → in **1 dòng** `NHIP-NO: kiem light a/e deep b/f | tran-bo-nho x over-cap | run-chua-gom y` (vế-1 nhịp-kiểm THAY dòng `counter=… light … deep … OVERDUE` cũ, đọc `.session-counter.json` + `h24_cadence`). 🔴 **probe KHÔNG chặn**: lỗi → in `probe-loi (khong chan)` → đi tiếp. 🔴 **Nhịp ĐỌC từ config, CẤM hardcode ở đây** (detector `governance-detectors.ps1` H24-2 **fail-loud** nếu key thiếu — **không** giả-định default). - **(ii) OVERDUE** → **INFORM anh** + đề-xuất spawn vai H24 tương-ứng. 🔴 **KHÔNG auto-run** (anh consent mới chạy, giống sleep-check (c)). Chạy xong → cập-nhật `last_audit.{light,deep}_at_counter` = counter hiện-tại. **Lead = single-writer.** - **(iii) Flag → class:** mỗi FLAG của 2 vai **PHẢI** thuộc **enum ĐÓNG** `lead_self_audit.flag_classes`. Vai **KHÔNG tự chế class** — finding không phân-loại được ⇒ báo **verbatim** + **escalate anh** để mở rộng enum. Cập-nhật `class_repeat.counts`; class nào lặp **≥ `jump_on_class_repeat`** ⇒ **kéo audit tới sớm**. - **(iv) 🔴 Nghi-thức RE-STAMP carry (GAP THẬT, vá @S122):** khi ghi segment `HANDOFF` mới, **ĐÓNG DẤU LẠI `[carry:]` cho MỌI carry còn mở** — không chỉ lần đầu. diff --git a/.claude/commands/session-start.md b/.claude/commands/session-start.md index d955852..7183a2f 100644 --- a/.claude/commands/session-start.md +++ b/.claude/commands/session-start.md @@ -210,7 +210,7 @@ ngược lại → counter += 1 ; last_ticked_session = S ; last_ticked_head **(d) JUMP:** một class trong `lead_self_audit.flag_classes` lặp **≥ `jump_on_class_repeat`** lần → **kéo audit tới sớm**, bất-kể counter. -**(e) BÁO dòng-nợ 3-vế (nâng dòng H24 cũ — Item 2 S135):** gọi `powershell.exe -ExecutionPolicy Bypass -File scripts/nhip-no-probe.ps1` → in **1 dòng** `NHIP-NO: kiem light a/e deep b/f | tran-bo-nho x over-cap | run-chua-gom y` (vế-1 nhịp-kiểm = `counter/light/deep/OVERDUE` thay dòng H24 cũ). 🔴 **probe KHÔNG chặn**: lỗi → in `probe-loi (khong chan)` → đi tiếp. OVERDUE(light|deep) → **INFORM anh** + đề-xuất spawn vai H24 tương-ứng. 🔴 **KHÔNG auto-run** — anh consent mới chạy (giống sleep-check §2.1.2). +**(e) BÁO dòng-nợ 4-vế (nâng dòng H24 cũ — Item 2 S135):** gọi `powershell.exe -ExecutionPolicy Bypass -File scripts/nhip-no-probe.ps1` → in **1 dòng** `NHIP-NO: kiem light a/e deep b/f | tran-bo-nho x over-cap | run-chua-gom y` (vế-1 nhịp-kiểm = `counter/light/deep/OVERDUE` thay dòng H24 cũ). 🔴 **probe KHÔNG chặn**: lỗi → in `probe-loi (khong chan)` → đi tiếp. OVERDUE(light|deep) → **INFORM anh** + đề-xuất spawn vai H24 tương-ứng. 🔴 **KHÔNG auto-run** — anh consent mới chạy (giống sleep-check §2.1.2). 🔴 **Số nhịp = quyền anh.** Bước này **ĐỌC** `h24_cadence`, **KHÔNG** ghi. **CẤM hardcode nhịp ở đây** — copy số vào doc dẫn-xuất chính là drift mà single-source sinh ra để chặn (detector `governance-detectors.ps1` H24-2 **fail-loud** nếu key thiếu, **không** giả-định default). > 🟡 **Honest-caveat mang theo khi báo hub:** hub nói rõ *"số của các em = config của các em; ĐỪNG chép 3 số này"*. SE chọn **cùng 6/15/3** là **điểm khởi-đầu anh CỐ Ý chọn**, KHÔNG phải chép vô-thức. **Chỉnh lại sau chu-kỳ-2 CỦA SE** (deep-audit lần 2, xem .session-counter.json last_audit). Hub đã GỠ counter (bookend 07-15, sha 85bf89ca) → ví-dụ 6/15/3 "ở nguồn" = lịch-sử, KHÔNG còn mốc hub để so; delta hub hứa từ run-2 KHÔNG BAO GIỜ có (hub gỡ trước run-2) — **chưa ai được bán câu "đã chứng minh hiệu-quả"**. ✅ **Ratified 2026-07-17:** anh mark cổng reply `e50a4bd0` (2026-07-16-ai_infra-to-se-reply-adap); canonical = `memory-budget.json → h24_cadence._owner_ratified` (B1 — wording sống ở đó, đừng chép lại đây). diff --git a/.claude/commands/tiep.md b/.claude/commands/tiep.md index 76919ea..b3ba1a7 100644 --- a/.claude/commands/tiep.md +++ b/.claude/commands/tiep.md @@ -109,7 +109,7 @@ Tín-hiệu **YẾU NHẤT**, dùng cuối. 🔴 **`porcelain` rỗng KHÔNG ph ## 2.5 TICK counter + dòng-nợ (H24 — TICK TRƯỚC, dòng-nợ SAU; Item 1(b)+2 S135) - **TICK** `.claude/governance/.session-counter.json` **theo contract** (idempotent — NO-OP nếu cùng nhãn-phiên/cùng HEAD) — 🔴 **CON-TRỎ `session-start.md §2.1.8`, CẤM chép logic tick** (B1 canonical). Nhãn `/tiep` = **nhãn-phiên MỚI** (label-convention §2.1.8) ⇒ tick fire NGAY cửa vào, OVERDUE @9 hiện tại đây thay vì đợi cuối phiên. -- **Dòng-nợ (SAU tick — n-3):** gọi `powershell.exe -ExecutionPolicy Bypass -File scripts/nhip-no-probe.ps1` in dòng-nợ 3-vế (vế-1 nhịp-kiểm đọc post-tick). 🔴 **probe KHÔNG chặn điểm dừng**: lỗi → in `probe-loi (khong chan)` → đi tiếp. +- **Dòng-nợ (SAU tick — n-3):** gọi `powershell.exe -ExecutionPolicy Bypass -File scripts/nhip-no-probe.ps1` in dòng-nợ 4-vế (vế-1 nhịp-kiểm đọc post-tick). 🔴 **probe KHÔNG chặn điểm dừng**: lỗi → in `probe-loi (khong chan)` → đi tiếp. ## 3. Ground-truth thắng WAL - **LỆCH** (kết-quả `verify:` / `git status` mâu-thuẫn `chain:`) → **TIN GROUND-TRUTH**: sửa WAL cho khớp thực-tế, **báo chỗ lệch** cho user, RỒI MỚI chạy tiếp. KHÔNG mù-quáng chạy theo chain sai. diff --git a/.claude/governance/.session-counter.json b/.claude/governance/.session-counter.json index 2d3eb98..7a5b752 100644 --- a/.claude/governance/.session-counter.json +++ b/.claude/governance/.session-counter.json @@ -1,62 +1,68 @@ { - "_note": "Harness-24 (S121, 2026-07-15, wave adap-6-broadcast W2) session counter for lead-self-audit cadence. THIS FILE HOLDS STATE ONLY - every cadence NUMBER lives in .claude/agent-memory/memory-budget.json -\u003e h24_cadence (single-source, H24 section 2(3)). Never copy the digits here.", - "_why_content_based_not_blind_increment": "Owner-decisions-15-07-2026 Q2, trap found by lane E: the Stop-hook .claude/hooks/wal-flush.ps1 auto-commits on EVERY turn-boundary. A blind counter++ would therefore tick many times per real session and the cadence would be meaningless. So a tick is CONTENT-ADDRESSED: it is keyed on the repo HEAD sha at tick time. Ticking twice on the same HEAD is a NO-OP, which is what makes running /session-start twice in a row safe (acceptance: 2x /session-start on the same HEAD =\u003e +1, not +2).", - "_why_this_path": "Deliberately .claude/governance/ and NOT .claude/agent-memory/. The hook covers exactly 3 paths (.claude/WAL.md, agent-memory/, workflows/runs/); .claude/governance/ is OUTSIDE all three, so this file is never swept into a \u0027wal:\u0027 commit as a side effect. Compare .claude/agent-memory/.mfe-state.json, which IS inside the hook\u0027s reach - a counter must not live there.", - "_contract": { - "tick": "tick(session, head): if head == last_ticked_head OR session == last_ticked_session -\u003e NO-OP (idempotent per HEAD AND per session-label). The Stop-hook wal-flush.ps1 moves HEAD mid-session (auto-commit every turn-boundary), so the head-clause alone would let a single real session tick more than once; the session-label clause pins ONE session-label to exactly +1, not +2. This closes the +2/cycle trap: a /pause commit changes HEAD, but the same session-label still NO-OPs. Else counter = counter + 1, last_ticked_session = session, last_ticked_head = head, last_ticked_at = date.", - "fail_loud_on_regress": "Two triggers, two verdicts (contract v2 - hub template 58e28bae C-1, adopted S141). (1) counter REGRESSION: an incoming counter LOWER than the stored counter => FAIL-LOUD, report to owner, DO NOT silently reset (a backwards counter means the file was rolled back or hand-edited; a silent reset would hide the cadence gap). (2) last_ticked_head NOT reachable from HEAD => classify BEFORE alarming: if the object still EXISTS in the repo (git cat-file -t = commit) AND the counter did not regress, this is SQUASH-BENIGN - the tick pointed at a wal:/session commit that the closeout squash lifted out of history; append ONE trace entry to history[] with event-class squash-benign and CONTINUE (no owner alarm; the intact prior session-label corroborates - a benign squash keeps it, tamper does not). Only if the object is MISSING (cat-file fails) OR the counter regressed => FAIL-LOUD as before (anti-tamper layer unchanged). Rationale: every closeout squashes the session wal: commits, so the head captured at the previous tick routinely becomes unreachable-but-present - expected drift, not tampering (3 historical false-FAIL-LOUD cases S127/S133/S139 all reclassify to squash-benign under this contract).", - "overdue": "OVERDUE(light) when (counter - last_audit.light_at_counter) \u003e= h24_cadence.light_every. Same shape for deep_every. Skipping sessions does NOT lose the debt - the gap is measured from the counter, not from wall-clock, so a missed session surfaces as OVERDUE rather than vanishing.", - "jump": "jump_on_class_repeat (h24_cadence): if ONE flag class from lead_self_audit.flag_classes repeats N times, pull the next audit forward regardless of the counter.", - "writer": "Lead is single-writer. Wired at /session-start (W3 owns the ritual; W2 owns this file + its shape)." - }, - "_tick_invariant_note": "Tick invariant (hub dede7ec5 Delta-1, verbatim): moi LAN-CHOT +1; mot cap dung-noi tang DUNG +1, khong +2, khong +0. SE form = tick-at-entry-gate idempotent-per-label (hub Delta-2 recovery-gate +1 = permitted form) - NET +1/session-label EQUIV hub +1/cap on CLOSED pairs; an OPEN pair is transiently +0 until its entry gate fires (hub blessed, 9a35405b block-1 phep dung-noi). Guard song-con = label-convention (session-start 2.1.8: new conversation = new S label, NEVER reuse). history[] is append-unbounded BY DESIGN => absence of a marker = never-happened (safe semantics); IF a FIFO cap is ever added, eviction MUST be handled explicitly (absence-vi-bi-day != absence-vi-chua-xay-ra - log-BOUNDED design-note dede7ec5).", - "_seed_honesty": "Seeded UNTICKED on purpose. counter=0 and last_ticked_* = null mean \u0027no tick has ever happened\u0027, which is the truth at S121 - the ritual that performs the tick lands in W3. Seeding a fake first tick here would make the very first cadence reading a lie, and H24 exists to catch exactly that kind of invented number.", - "counter": 17, - "last_ticked_session": "S143", - "last_ticked_head": "1a0fa59de2e876d4b4f354070d290782fe95053f", - "last_ticked_at": "2026-07-22", - "last_audit": { - "light_at_counter": 14, - "deep_at_counter": 3, - "_note": "Counter value at which the last light/deep self-audit actually ran. S140 (2026-07-18): light-audit #3 at counter=14 = FORCE-FIRE DEBT PAID (closeout S139 gop P=3 pause =\u003e OVERDUE(light) INFORM; owner direction S140 \u0027dong du 5 vong\u0027 = consent DP-3 =\u003e lead spawn ca CAP H24 dau phien). 2-vai coverage 0-garble, diary ghi TRONG luc lam (anti-#53). lead-view: 1 FLAG LOW view-stale-status (HANDOFF:8 NEXT-em con treo \u0027624c378d verified-pending-\u003eexecuted\u0027 nhu to-do trong khi da executed-runtime @S140 sang) - xu @closeout re-stamp + 2 INFORM clean (model-flip S140 Fable = owner-choice KHONG can re-stamp canonical per anti-churn S106; 3 surface frozen dung). lead-omission: 1 FLAG MED gap-owner-specifics (direction session-model S140 VANG tracker - da xu TRONG PHIEN: draft session-model-se-draft.md + email hub + closeout them carry) + INFORM gap-carry-aged non-vacuous LAN DAU (hook-vs-budget-cap streak 9\u003e=M6, owner-held) + INFORM route-H1 (cum 7-carry S117/S118 VO HINH voi carry-age detector - chi age carry re-tag trong NEXT segment; aging-measurement bo sot) + META diary lead-omission thieu entry S137 (GAP-3 tai) -\u003e backfill @closeout. Prior: light #2 at counter=11 (S137, OVERDUE 8/6 paid). Next light ~ counter 20; deep ~ counter 18 (deep_at_counter=3 + 15)." - }, - "class_repeat": { - "_note": "Rolling tally per flag class from lead_self_audit.flag_classes (memory-budget.json). Key = class name, value = consecutive-audit repeat count. S124 first audit = SEED (fired-once), not repeats yet (per lead-view-auditor honest-note). jump_on_class_repeat=3.", - "counts": { - "view-residual-asym": 0, - "view-stale-count": 0, - "gap-carry-dropped": 0, - "gap-decision-sunk": 0, - "view-stale-status": 2, - "gap-owner-specifics": 1, - "gap-carry-aged": 1 - } - }, - "history": [ - { - "at": "2026-07-16", - "session": "S127", - "event": "ancestor-check FAIL-LOUD (dung contract): last_ticked_head f9fa77d6 la dangling commit - object ton tai (cat-file -t = commit) nhung 0 nhanh chua no. Root-cause: closeout S126 SQUASH cac wal:-commit (session-end squash-\u003ecount-\u003epush) nen head luc tick bi squash khoi lich su. KHONG phai tamper: counter khong lui, file khong sua tay. Xu ly: tick tiep 5-\u003e6 CO VET (entry nay) + bao anh trong turn S127. KE THIET KE ghi nhan: moi phien dau-sau-closeout-squash se fail ancestor-check gia; candidate fix = chap nhan dangling-object-exists lam bang-chung yeu khi counter khong lui (cho anh/hub quyet, chua doi contract)." - }, - { - "at": "2026-07-17", - "session": "S133", - "event": "ancestor-check FAIL-LOUD lan 2 (cung class S127, dung contract): last_ticked_head 882e0d7 (tick @S131) la dangling commit - object ton tai (cat-file -t = commit) nhung khong reachable tu HEAD. Root-cause: closeout S131-S132 SQUASH wal:-commit (squash-\u003ecount-\u003epush) nen head luc tick bi squash khoi lich su. KHONG phai tamper: counter khong lui (7), file khong sua tay. Xu ly: tick tiep 7-\u003e8 CO VET (entry nay) + bao anh trong turn S133. Candidate fix VAN treo cho anh/hub quyet (chua doi contract): chap nhan dangling-object-exists lam bang-chung yeu khi counter khong lui." - }, - { - "at": "2026-07-17", - "session": "S139", - "event": "ancestor-check FAIL-LOUD lan 3 (cung class S127/S133, dung contract): last_ticked_head 36e79da (tick @S138 session-start) la dangling commit - object ton tai (cat-file -t = commit) nhung khong reachable tu HEAD 8202374. Root-cause quen thuoc: closeout-S137 chay TRONG phien S138 SAU tick -\u003e squash wal:-commit khien head-luc-tick roi khoi lich su. KHONG phai tamper: counter khong lui (12), file khong sua tay. Xu ly: tick tiep 12-\u003e13 CO VET (entry nay) + bao anh trong turn S139 (/tiep resume S138 wave adap-3-ban). Candidate fix [carry:dangling-head] van treo cho anh/hub quyet (da thanh carry named @closeout S137)." - }, - { - "at": "2026-07-17", - "session": "S137", - "event": "light-audit #2 RAN at counter=11 (OVERDUE 8/6 paid; consent-gate DP-3 exercised lan dau post-wire: probe in OVERDUE:light ngay cua /tiep -\u003e anh gat -\u003e cap H24 spawn nen). Verdicts 0-garble; evidence runs/2026-07-17-S137-h24-light-audit/. lead-view 2 FLAG view-stale-status (STATUS roster-cell H24 + HANDOFF de-xuat S131) - ca hai FIXED cung phien. lead-omission 1 FLAG MED gap-decision-sunk repeat-2 (dangling-head candidate-fix chi song trong history file nay, chua thanh carry named -\u003e closeout S137 tach [carry:dangling-head]) + INFORM cum 7-carry dong-tuoi + INFORM closeout re-stamp tu HANDOFF-S134. class_repeat: gap-decision-sunk 1-\u003e2 (jump@3 chua cham), view-stale-status seed 1, 3 class S124 khong tai-hien -\u003e reset 0 (consecutive semantics)." - }, - { - "at": "2026-07-18", - "session": "S140", - "event": "light-audit #3 RAN at counter=14 (force-fire debt S139 paid; consent = owner direction \u0027dong du 5 vong\u0027). lead-view 1-FLAG LOW view-stale-status (HANDOFF:8 NEXT-em stale to-do) + 2-INFORM clean; lead-omission 1-FLAG MED gap-owner-specifics (session-model tracker vang - xu trong phien bang draft+email) + 2-INFORM (carry-age non-vacuous lan dau: hook streak 9; route-H1 cum 7-carry vo hinh voi detector) + META diary thieu S137 entry. class_repeat: view-stale-status 1-\u003e2 (jump@3 chua cham), gap-decision-sunk 2-\u003e0 reset (khong tai-hien, lead-omission co y thuc chon gap-owner-specifics thay vi gap-decision-sunk - khai ro trong return, khong ne-jump), +gap-owner-specifics 1, +gap-carry-aged 1." - } - ] -} + "_note": "Harness-24 (S121, 2026-07-15, wave adap-6-broadcast W2) session counter for lead-self-audit cadence. THIS FILE HOLDS STATE ONLY - every cadence NUMBER lives in .claude/agent-memory/memory-budget.json -> h24_cadence (single-source, H24 section 2(3)). Never copy the digits here.", + "_why_content_based_not_blind_increment": "Owner-decisions-15-07-2026 Q2, trap found by lane E: the Stop-hook .claude/hooks/wal-flush.ps1 auto-commits on EVERY turn-boundary. A blind counter++ would therefore tick many times per real session and the cadence would be meaningless. So a tick is CONTENT-ADDRESSED: it is keyed on the repo HEAD sha at tick time. Ticking twice on the same HEAD is a NO-OP, which is what makes running /session-start twice in a row safe (acceptance: 2x /session-start on the same HEAD => +1, not +2).", + "_why_this_path": "Deliberately .claude/governance/ and NOT .claude/agent-memory/. The hook covers exactly 3 paths (.claude/WAL.md, agent-memory/, workflows/runs/); .claude/governance/ is OUTSIDE all three, so this file is never swept into a 'wal:' commit as a side effect. Compare .claude/agent-memory/.mfe-state.json, which IS inside the hook's reach - a counter must not live there.", + "_contract": { + "tick": "tick(session, head): if head == last_ticked_head OR session == last_ticked_session -> NO-OP (idempotent per HEAD AND per session-label). The Stop-hook wal-flush.ps1 moves HEAD mid-session (auto-commit every turn-boundary), so the head-clause alone would let a single real session tick more than once; the session-label clause pins ONE session-label to exactly +1, not +2. This closes the +2/cycle trap: a /pause commit changes HEAD, but the same session-label still NO-OPs. Else counter = counter + 1, last_ticked_session = session, last_ticked_head = head, last_ticked_at = date.", + "fail_loud_on_regress": "Two triggers, two verdicts (contract v2 - hub template 58e28bae C-1, adopted S141). (1) counter REGRESSION: an incoming counter LOWER than the stored counter => FAIL-LOUD, report to owner, DO NOT silently reset (a backwards counter means the file was rolled back or hand-edited; a silent reset would hide the cadence gap). (2) last_ticked_head NOT reachable from HEAD => classify BEFORE alarming: if the object still EXISTS in the repo (git cat-file -t = commit) AND the counter did not regress, this is SQUASH-BENIGN - the tick pointed at a wal:/session commit that the closeout squash lifted out of history; append ONE trace entry to history[] with event-class squash-benign and CONTINUE (no owner alarm; the intact prior session-label corroborates - a benign squash keeps it, tamper does not). Only if the object is MISSING (cat-file fails) OR the counter regressed => FAIL-LOUD as before (anti-tamper layer unchanged). Rationale: every closeout squashes the session wal: commits, so the head captured at the previous tick routinely becomes unreachable-but-present - expected drift, not tampering (3 historical false-FAIL-LOUD cases S127/S133/S139 all reclassify to squash-benign under this contract).", + "overdue": "OVERDUE(light) when (counter - last_audit.light_at_counter) >= h24_cadence.light_every. Same shape for deep_every. Skipping sessions does NOT lose the debt - the gap is measured from the counter, not from wall-clock, so a missed session surfaces as OVERDUE rather than vanishing.", + "jump": "jump_on_class_repeat (h24_cadence): if ONE flag class from lead_self_audit.flag_classes repeats N times, pull the next audit forward regardless of the counter.", + "writer": "Lead is single-writer. Wired at /session-start (W3 owns the ritual; W2 owns this file + its shape)." + }, + "_tick_invariant_note": "Tick invariant (hub dede7ec5 Delta-1, verbatim): moi LAN-CHOT +1; mot cap dung-noi tang DUNG +1, khong +2, khong +0. SE form = tick-at-entry-gate idempotent-per-label (hub Delta-2 recovery-gate +1 = permitted form) - NET +1/session-label EQUIV hub +1/cap on CLOSED pairs; an OPEN pair is transiently +0 until its entry gate fires (hub blessed, 9a35405b block-1 phep dung-noi). Guard song-con = label-convention (session-start 2.1.8: new conversation = new S label, NEVER reuse). history[] is append-unbounded BY DESIGN => absence of a marker = never-happened (safe semantics); IF a FIFO cap is ever added, eviction MUST be handled explicitly (absence-vi-bi-day != absence-vi-chua-xay-ra - log-BOUNDED design-note dede7ec5).", + "_seed_honesty": "Seeded UNTICKED on purpose. counter=0 and last_ticked_* = null mean 'no tick has ever happened', which is the truth at S121 - the ritual that performs the tick lands in W3. Seeding a fake first tick here would make the very first cadence reading a lie, and H24 exists to catch exactly that kind of invented number.", + "counter": 17, + "last_ticked_session": "S143", + "last_ticked_head": "1a0fa59de2e876d4b4f354070d290782fe95053f", + "last_ticked_at": "2026-07-22", + "last_audit": { + "light_at_counter": 17, + "deep_at_counter": 17, + "_note": "Counter value at which the last light/deep self-audit actually ran. S140 (2026-07-18): light-audit #3 at counter=14 = FORCE-FIRE DEBT PAID (closeout S139 gop P=3 pause => OVERDUE(light) INFORM; owner direction S140 'dong du 5 vong' = consent DP-3 => lead spawn ca CAP H24 dau phien). 2-vai coverage 0-garble, diary ghi TRONG luc lam (anti-#53). lead-view: 1 FLAG LOW view-stale-status (HANDOFF:8 NEXT-em con treo '624c378d verified-pending->executed' nhu to-do trong khi da executed-runtime @S140 sang) - xu @closeout re-stamp + 2 INFORM clean (model-flip S140 Fable = owner-choice KHONG can re-stamp canonical per anti-churn S106; 3 surface frozen dung). lead-omission: 1 FLAG MED gap-owner-specifics (direction session-model S140 VANG tracker - da xu TRONG PHIEN: draft session-model-se-draft.md + email hub + closeout them carry) + INFORM gap-carry-aged non-vacuous LAN DAU (hook-vs-budget-cap streak 9>=M6, owner-held) + INFORM route-H1 (cum 7-carry S117/S118 VO HINH voi carry-age detector - chi age carry re-tag trong NEXT segment; aging-measurement bo sot) + META diary lead-omission thieu entry S137 (GAP-3 tai) -> backfill @closeout. Prior: light #2 at counter=11 (S137, OVERDUE 8/6 paid). S143 (2026-07-22): DEEP-audit RAN at counter=17 - FORCE-FIRE SOM 1 NHIP theo direction owner (nguong tu-nhien la 18 = 3+15), KHONG phai toi-han tu-nhien. Deep bao ham light => set CA HAI light_at=deep_at=17 (tranh no ao phien sau). Chi tiet FLAG/class_repeat: xem history[] entry S143. Moc ke tiep tinh tu 17: light ~ counter 23; deep ~ counter 32." + }, + "class_repeat": { + "_note": "Rolling tally per flag class from lead_self_audit.flag_classes (memory-budget.json). Key = class name, value = consecutive-audit repeat count. S124 first audit = SEED (fired-once), not repeats yet (per lead-view-auditor honest-note). jump_on_class_repeat=3.", + "counts": { + "view-residual-asym": 1, + "view-stale-count": 0, + "gap-carry-dropped": 1, + "gap-decision-sunk": 1, + "view-stale-status": 0, + "gap-owner-specifics": 2, + "gap-carry-aged": 1, + "gap-incident-unrecorded": 0 + } + }, + "history": [ + { + "at": "2026-07-16", + "session": "S127", + "event": "ancestor-check FAIL-LOUD (dung contract): last_ticked_head f9fa77d6 la dangling commit - object ton tai (cat-file -t = commit) nhung 0 nhanh chua no. Root-cause: closeout S126 SQUASH cac wal:-commit (session-end squash->count->push) nen head luc tick bi squash khoi lich su. KHONG phai tamper: counter khong lui, file khong sua tay. Xu ly: tick tiep 5->6 CO VET (entry nay) + bao anh trong turn S127. KE THIET KE ghi nhan: moi phien dau-sau-closeout-squash se fail ancestor-check gia; candidate fix = chap nhan dangling-object-exists lam bang-chung yeu khi counter khong lui (cho anh/hub quyet, chua doi contract)." + }, + { + "at": "2026-07-17", + "session": "S133", + "event": "ancestor-check FAIL-LOUD lan 2 (cung class S127, dung contract): last_ticked_head 882e0d7 (tick @S131) la dangling commit - object ton tai (cat-file -t = commit) nhung khong reachable tu HEAD. Root-cause: closeout S131-S132 SQUASH wal:-commit (squash->count->push) nen head luc tick bi squash khoi lich su. KHONG phai tamper: counter khong lui (7), file khong sua tay. Xu ly: tick tiep 7->8 CO VET (entry nay) + bao anh trong turn S133. Candidate fix VAN treo cho anh/hub quyet (chua doi contract): chap nhan dangling-object-exists lam bang-chung yeu khi counter khong lui." + }, + { + "at": "2026-07-17", + "session": "S139", + "event": "ancestor-check FAIL-LOUD lan 3 (cung class S127/S133, dung contract): last_ticked_head 36e79da (tick @S138 session-start) la dangling commit - object ton tai (cat-file -t = commit) nhung khong reachable tu HEAD 8202374. Root-cause quen thuoc: closeout-S137 chay TRONG phien S138 SAU tick -> squash wal:-commit khien head-luc-tick roi khoi lich su. KHONG phai tamper: counter khong lui (12), file khong sua tay. Xu ly: tick tiep 12->13 CO VET (entry nay) + bao anh trong turn S139 (/tiep resume S138 wave adap-3-ban). Candidate fix [carry:dangling-head] van treo cho anh/hub quyet (da thanh carry named @closeout S137)." + }, + { + "at": "2026-07-17", + "session": "S137", + "event": "light-audit #2 RAN at counter=11 (OVERDUE 8/6 paid; consent-gate DP-3 exercised lan dau post-wire: probe in OVERDUE:light ngay cua /tiep -> anh gat -> cap H24 spawn nen). Verdicts 0-garble; evidence runs/2026-07-17-S137-h24-light-audit/. lead-view 2 FLAG view-stale-status (STATUS roster-cell H24 + HANDOFF de-xuat S131) - ca hai FIXED cung phien. lead-omission 1 FLAG MED gap-decision-sunk repeat-2 (dangling-head candidate-fix chi song trong history file nay, chua thanh carry named -> closeout S137 tach [carry:dangling-head]) + INFORM cum 7-carry dong-tuoi + INFORM closeout re-stamp tu HANDOFF-S134. class_repeat: gap-decision-sunk 1->2 (jump@3 chua cham), view-stale-status seed 1, 3 class S124 khong tai-hien -> reset 0 (consecutive semantics)." + }, + { + "at": "2026-07-18", + "session": "S140", + "event": "light-audit #3 RAN at counter=14 (force-fire debt S139 paid; consent = owner direction 'dong du 5 vong'). lead-view 1-FLAG LOW view-stale-status (HANDOFF:8 NEXT-em stale to-do) + 2-INFORM clean; lead-omission 1-FLAG MED gap-owner-specifics (session-model tracker vang - xu trong phien bang draft+email) + 2-INFORM (carry-age non-vacuous lan dau: hook streak 9; route-H1 cum 7-carry vo hinh voi detector) + META diary thieu S137 entry. class_repeat: view-stale-status 1->2 (jump@3 chua cham), gap-decision-sunk 2->0 reset (khong tai-hien, lead-omission co y thuc chon gap-owner-specifics thay vi gap-decision-sunk - khai ro trong return, khong ne-jump), +gap-owner-specifics 1, +gap-carry-aged 1." + }, + { + "at": "2026-07-22", + "session": "S143", + "event": "DEEP-audit RAN at counter=17 - FORCE-FIRE SOM 1 NHIP (nguong deep = deep_at_counter 3 + deep_every 15 = 18; chay som theo direction owner 'OK lam het di', KHONG phai toi-han tu-nhien - ghi ro de lan sau doc so khong tuong nham cadence tu keu). Consent = owner gat truc-tiep. Ca 2 vai H24 chay 1 luot; deep bao ham light nen set CA HAI light_at/deep_at = 17 (tranh no ao o phien sau). lead-view 3 FLAG deu view-residual-asym MED (STATUS:450 + agents/README:190 con khai 'NO Write/Edit' nhu co-che chan; agents/README:27 'Roster THAT' liet 14 vai thieu 3 trio) - reviewer bat them site-4 cung lop (:225 VALID_ROLES tu xung 'DU roster' con 14 + '4 monitor'); CA 4 VA @36cefcc. Nguyen nhan lot ca wave: acceptance AC4 grep theo CON SO ('roster 14|14/14|...') trong khi 2 site liet-ke TEN, khong chua so nao => 0 hit doc thanh 'sweep sach'. lead-omission 3 FLAG (gap-carry-dropped: khai 13 carry, union dung = 14, TONG KHONG DOI nen trong nhu dung - session-model-adopt roi dung luc chi con cho chu ky owner; gap-decision-sunk: 3 muc 'Cho-anh' spec:68 chim 2 nhan phien, grep 9 token x 4 be-mat = 0 hit, dung don-bay ca-song-sinh pull_warn_days de chung la BO SOT chu khong phai owner-giu; gap-owner-specifics: WAL khong chep luot gat 2 - DA VA trong phien) + 3 INFORM. INFORM-3 = su-co khong xep duoc vao enum DONG: vai TU CHOI tu che class va escalate dung luat => owner mo them 'gap-incident-unrecorded' (10->11). Ca 3 vai + 2 monitor closeout deu GARBLE #53 (5/5 trong 1 phien) - vot tron tu sub-*.md nho ghi-dia-trong-luc-lam, 0 mat du-lieu. class_repeat: view-residual-asym 0->1, gap-carry-dropped 0->1, gap-decision-sunk 0->1, gap-owner-specifics 1->2, view-stale-status 2->0 (khong tai-hien, consecutive semantics), gap-carry-aged giu 1 (INFORM khong tinh). jump_on_class_repeat=3 - KHONG class nao cham jump." + } + ] +} \ No newline at end of file diff --git a/.claude/workflows/hmw.js b/.claude/workflows/hmw.js index 594f738..8db5b7c 100644 --- a/.claude/workflows/hmw.js +++ b/.claude/workflows/hmw.js @@ -30,7 +30,7 @@ const VALID_ROLES = [ 'lead-view-auditor', 'lead-omission-auditor', // +S121 W2 (H24 lead-self-audit) — 2 monitor MỚI, INFORM-only propose-only. // 🔴 KHÔNG gộp vào tooling-auditor(H1)/harvest-curator(H2): H24 §2(1) soi LEAD (view-* = lead nhìn sai / gap-* = // lead bỏ sót), khác trục H1 (tooling-freshness) và H2 (harvest-integrity). Class-flag = enum ĐÓNG ở - // memory-budget.json → lead_self_audit.flag_classes (10 class: 5 view-* + 5 gap-*) — vai KHÔNG tự chế class. + // memory-budget.json → lead_self_audit.flag_classes (11 class: 5 view-* + 6 gap-*) — vai KHÔNG tự chế class. // Từ-vựng "view"/"omission" chọn CÓ CHỦ-ĐÍCH tránh va-chạm: governance-detectors.ps1:15 đã sở-hữu // "derived-staleness" ⇒ cấm tên *-stale-role; "GAP" quá-tải (session-end build-gap · memory-selfimprove CRITERIA+GAP). 'harness-eval', 'harness-refine', 'harness-audit', // +S141 bộ-ba đồng-kiểm memory-system (adopt AI_INFRA 2026-07-18 khuôn 5-câu) read-only INFORM-only propose-only; diff --git a/.claude/workflows/runs/2026-07-22-S143-closeout-audit/sub-harvest-3.md b/.claude/workflows/runs/2026-07-22-S143-closeout-audit/sub-harvest-3.md new file mode 100644 index 0000000..f9e6f07 --- /dev/null +++ b/.claude/workflows/runs/2026-07-22-S143-closeout-audit/sub-harvest-3.md @@ -0,0 +1,103 @@ +# sub-harvest-3 — harvest-curator @ S143 closeout GATE (§L.b d+f) + +> Read-only · propose-only. Lead = single-writer. Ghi-đĩa-TRONG-lúc-làm (3/3 sub phiên này garble #53). +> Run: `.claude/workflows/runs/2026-07-22-S143-closeout-audit/` +> Started: 2026-07-22 + +## 0. Baseline đo được (raw, chưa verdict) + +- Run-folder S143: 5 file — `run.md` 2132B · `sub-reviewer-0.md` 18205B · `sub-lead-view-1.md` 5744B · `sub-lead-omission-2.md` 10027B · `audit-synthesis.md` 6717B (dạng-1 PHẲNG). +- Tổng run-dir toàn repo: **42**. +- agent-memory role-dir: **17** (find -mindepth 1 -maxdepth 1 -type d — m#11 guard áp dụng, KHÔNG dùng cut -f3). +- MEMORY.md mtime 2026-07-22 (3 file, khớp 3 sub spawn): + - `lead-omission-auditor/MEMORY.md` 13:10:21 9680B (self-write, sau sub-file 13:09) + - `reviewer/MEMORY.md` 13:15:36 17784B (self-write, sau sub-file 13:12) + - `lead-view-auditor/MEMORY.md` 13:44:24 6610B (**on-behalf by lead** — sub-file 13:05, gap 39') + +## 1. WIP log (append khi tiến) + +### FIDELITY — ca on-behalf `lead-view-auditor` S143 (soi kỹ theo lệnh) +Đối-chiếu entry diary vs nguồn `sub-lead-view-1.md` (5744B, 58 dòng): + +| Mệnh-đề trong diary | Có trong sub-file? | Verdict | +|---|---|---| +| counter 17 · ngưỡng 18 · FORCE-FIRE SỚM 1 NHỊP, KHÔNG tới-hạn tự-nhiên | :4 verbatim | ✅ KHỚP | +| Machine baseline TOTAL **47** | :11 "TOTAL FLAGS: 47" | ✅ KHỚP | +| "45→46→47; +1 sau closeout S143" | sub-file CHỈ nói "45 → **+2**" (:12). Mốc 46 đến từ LANE KHÁC (`sub-reviewer-0.md`:99 "45 → 46 (không ai giải trình) → 47 (nay)" + `audit-synthesis.md`:27) | ⚠️ BEYOND-SOURCE (traceable, cùng run-folder) | +| 3 FLAG, cả 3 `view-residual-asym` | F1/F2/F3 :40/:46/:53 | ✅ KHỚP | +| F1 `STATUS.md:450` vs `:462` + `3f4310f` vá memory quên ô canonical | :41-44 | ✅ KHỚP | +| F2 `agents/README.md:190` "NO Write/Edit" như sự-thật tool-grant | :47-49 | ✅ KHỚP | +| F3 `:27` "Roster THẬT" 14 vai thiếu 3 trio | :54-56 | ✅ KHỚP | +| "`git show 2757e41` = **0 hunk** chạm dòng này" | sub-file :56 nói "4 hunk … **bỏ sót hunk :27**" | ✅ TƯƠNG-ĐƯƠNG (paraphrase, không mâu-thuẫn) | +| "(reviewer bắt thêm site thứ 4 `:225` cùng lớp)" | KHÔNG có trong sub-file — có trong `sub-reviewer-0.md`:73/75/78/171/250 | ✅ ĐÚNG + **quy-thuộc đúng lane** (lead ghi rõ "reviewer bắt") | +| Lesson "acceptance grep theo CON SỐ → 0 hit ⇒ tuyên bố sạch; site liệt-kê TÊN lọt lưới" | KHÔNG trong sub-file; land trên đĩa `agents/README.md` (36cefcc) | ⚠️ BEYOND-SOURCE (lead-authored synthesis) | +| "Cả 4 site đã vá `36cefcc`" | commit TỒN-TẠI, đúng message | (verify site-by-site bên dưới) | +| "class_repeat view-residual-asym 0→1 … view-stale-status reset 0" | KHÔNG trong sub-file | ⚠️ **MÂU-THUẪN ĐĨA** — xem FLAG-1 | + +⇒ **KHÔNG có bịa.** Mọi mệnh-đề beyond-source đều truy được về đĩa (lane khác cùng run-folder / commit thật) và phần mượn-lane có quy-thuộc minh-bạch. Entry lại tự-khai on-behalf ở đầu. **Fidelity = PASS (STRONG, 0 fabrication)** — chỉ 2 nit nhãn-nguồn (xem đề-xuất). + +--- + +## 2. (d) SPAWN-RECORD 4-field đề-xuất — lead APPEND (propose-only) + +**Nấc dùng chung:** `audit-synthesis.md:7` — *"Tất cả finding dưới đây lead Đà TỰ RE-ĐO — không cái nào chỉ dựa vào lời sub"* ⇒ cả 3 lane đạt **verified**, KHÔNG dừng ở executed. + +### R1 · `reviewer` +- **agent:** `reviewer` (lane 0) +- **task:** Gate OUTWARD wave đợt-9/10 — chấm email hub Đà GỬI (`6c94873f72e0`, tự-khai self-gate chưa qua reviewer) + 7 adap-report: overclaim G-015 · nấc G-011 có đúng bằng-chứng · số/sha khớp đĩa. +- **nấc:** **verified** — lead tự re-đo, `audit-synthesis.md:21-31` cột "Lead tự đo lại" = XÁC NHẬN 8/8 finding kiểm được. +- **evidence:** `sub-reviewer-0.md` (18205B) · VERDICT **FAIL 1C/4M/4m/1nit** — F9 CRITICAL (`nhip-no-probe.ps1` sửa chưa commit + vế-4 đang chạy làm SAI một câu trong thư Đà STAMP) · F1 5 sha `wal:` dangling sau squash (`is-ancestor` exit 1 cả 5) · F2 `is-ancestor 96ab2679` lật exit 0→1 cùng phiên · F3 `README:225` enum tự-xưng-mirror = 14, thiếu 3 trio · F4 TOTAL 46-khai vs 45-baseline-repo vs 47-live · F8 GROUNDED (chính reviewer = nhân-chứng frontmatter-0-Write nhưng Write+Edit thật). 3 LUẬT rút ra (cite phải sống-sau-squash · `porcelain` là bước ĐẦU outward-gate · số tuyệt-đối phải neo commit). Diary `agent-memory/reviewer/MEMORY.md` @`36cefcc`. + +### R2 · `lead-view-auditor` 🔴 on-behalf +- **agent:** `lead-view-auditor` (lane 1) — **#53 garble ×2, vai KHÔNG tự ghi được** +- **task:** H24 §2(1) trục VIEW LỆCH SOURCE trên bề-mặt lead vừa re-stamp; DEEP-audit **force-fire SỚM 1 nhịp** (counter 17, ngưỡng tự-nhiên 18) theo direction owner. +- **nấc:** **verified** — `audit-synthesis.md:41-45` lead XÁC NHẬN 3/3 site; 4/4 site đã vá `36cefcc`. +- **evidence:** `sub-lead-view-1.md` (5744B) · 3 FLAG đều `view-residual-asym` MED (`STATUS.md:450` · `agents/README.md:190` · `agents/README.md:27` "Roster THẬT"=14 thiếu 3 trio) · +site-4 `:225` do **reviewer** bắt · machine-baseline TOTAL 47. Diary APPEND **on-behalf bởi lead sau VERIFY** @`c4903dd` (commit-message tự khai "harvest on-behalf diary lead-view") — **Fidelity soi kỹ = PASS STRONG, 0 bịa** (bảng §1). + +### R3 · `lead-omission-auditor` +- **agent:** `lead-omission-auditor` (lane 2) +- **task:** H24 §2(1) trục CÁI BỊ THIẾU — carry rớt/quá-già · yêu-cầu owner mất SPECIFICS · quyết-định treo bị chìm. +- **nấc:** **verified** — `audit-synthesis.md:51-56` lead XÁC NHẬN; số-học carry 13-vs-14 lead re-derive độc-lập. +- **evidence:** `sub-lead-omission-2.md` (10027B) · 3 FLAG — `gap-carry-dropped` MED-HIGH (khối carry khai **13**, union distinct = **14**; `[carry:session-model-adopt]` rơi mà TỔNG KHÔNG ĐỔI nên trông như đúng; máy H24-2 corroborate MÙ) · `gap-decision-sunk` MED-HIGH (3 mục "Chờ-anh" `spec:68` chìm 2 nhãn phiên, grep 9 token × 4 bề-mặt = **0/0/0/0**; đòn bẩy ca-song-sinh `pull_warn_days` được-cấp vs `session_ctx_kb` 0/0 ⇒ bỏ-sót KHÔNG phải owner-giữ) · `gap-owner-specifics` MED (WAL không chép lượt gật 2 — **Đà VÁ trong phiên**) · +3 INFORM, trong đó INFORM-3 xin **mở enum** `gap-incident-unrecorded` (CẤM tự chế class) — **đã land** `memory-budget.json` 10→11 class. Diary @`36cefcc`. + +### R4/R5 · 2 monitor closeout — **CHƯA có diary, propose để lead APPEND** +Run-folder có vết `sub-harvest-3.md` (tao) + `sub-tooling-4.md` (13896B, H1) nhưng cả 2 diary mtime vẫn **2026-07-18** ⇒ chưa ghi phiên này. Đúng thiết kế propose-only (lead single-writer), KHÔNG phải silent-miss vì vết run-folder đủ. + +--- + +## 3. (f) GATE 5-TRỤC + +| Trục | Verdict | Bằng chứng | +|---|---|---| +| **Coverage** | ✅ PASS | **5/5 invocation có vết** run-folder (`sub-reviewer-0` · `sub-lead-view-1` · `sub-lead-omission-2` · `sub-harvest-3` · `sub-tooling-4`). 3/3 lane việc có diary; 2 monitor pending by-design. **0 silent-miss.** | +| **Completeness** | ✅ PASS | 3 entry đủ 4-field-tương-đương {task-scope · verdict · lesson · tag}: reviewer 3-LUẬT+tag · lead-view lesson "0 hit ≠ hết drift"+tag · lead-omission honest-zero+class_repeat+tag. Nhãn văn-xuôi thay `Task:` literal = đúng style hiện-hành. | +| **Placement** | ✅ PASS (3 FLAG kèm) | 3 delta ĐÚNG nhà `agent-memory//`; `porcelain agent-memory` = **0** (đã commit hết, 0 mồ-côi); 0 empty-dir dưới `.claude`. FLAG-1/2/3 dưới KHÔNG phải delta lạc nhà. | +| **Corruption** | ✅ PASS (1 nit) | U+FFFD **0/3** diary; `iconv` VALID **3/3**. **Moved-not-cut VERIFIED** cho curate reviewer @`36cefcc`: **16/16 dòng gỡ khỏi L1 byte-identical trong `archive/2026-07.md`** + 4 dòng còn lại là **stub-nén** (verbatim đã archive từ batch S134/S140 — xác nhận 5/5 bằng nội-dung đặc-trưng). Batch-marker `archive:84`. | +| **Fidelity** | ✅ PASS (STRONG) | Bảng §1: 0 bịa; beyond-source đều truy được về đĩa + quy-thuộc đúng lane. 1 điều-kiện: xem FLAG-1. | + +### close-gate C5 Layer3 — DUAL-ACCEPT (chỉ VERIFY, 0 re-APPEND) +- Run-folder S143: **dạng-1 PHẲNG** `audit-synthesis.md` **6717B > 0** ✅ ĐỦ. +- Orphan-scan repo-wide dual-accept: **0 orphan / 40 folder có `run.md`** (42 dir − 2 S117 spec-only by-design, khớp baseline S132). + +### Sàn-5 hậu-kiểm CỜ vs NỘI-DUNG — verify độc-lập +`grep -c … || true`: WAL hit=**0** · session-log hit=**1** (`2026-07-22-1455-S143-tiep-closeout-audit-errata.md:10` = `wf: audit-3-lane run=2026-07-22-S143-closeout-audit`) · **TỔNG=1** ⇒ **KHỚP self-measure của lead, 0 lệch.** Khớp convention S126 (session-log giữ `run=`, WAL dùng path-form — WAL:21 có cite path-form + "3/3 GARBLE"). + +--- + +## 4. FLAG cho lead (propose-only) + +- **FLAG-1 MED `counter-file claim-vs-disk`** *(lead Đà xác nhận, sẽ xử sau khối c)* — 2 diary H24 khai class_repeat + nhịp mà `.claude/governance/.session-counter.json` chưa đổi: `deep_at_counter` vẫn **3** (⇒ counter 18 phiên sau sẽ báo OVERDUE deep và **chạy lại đúng cái vừa chạy**), `class_repeat` chưa cập, `history[]` **0 entry S143** (S137/S140 đều có tiền-lệ). Khác finding F7 của reviewer (F7 = nợ entry `squash-benign`) — **bổ sung, không trùng**. +- **FLAG-2 LOW `stray cwd-relative dir` (m#13 git-MÙ)** — `broadcasts/.claude/agent-memory/investigator-codebase/` **RỖNG**, untracked, `porcelain --ignored` = 0 dòng, mtime **2026-07-20 17:35** ⇒ residue **S141**, lọt qua 2 closeout S141/S142. Lớp S54 cwd-relative mis-land. **0 nội-dung mất** (rỗng). Đề-xuất: `rmdir` 3 tầng `broadcasts/.claude/agent-memory/investigator-codebase` → `…/agent-memory` → `…/.claude`. +- **FLAG-3 MED `incident-detail unrecorded` (đúng class vừa mở)** — `auto-memory/MEMORY.md` index Đà nâng "**×23 qua S143** — S143 ×3, 3/3 sub cùng phiên" (@`c4903dd`) NHƯNG topic-file `feedback_agent_return_garble_recover.md` vẫn dừng "**×20 tổng**", **grep "S143" = 0**. Index↔detail lệch. Mất luôn 2 data-point mới đáng giá: (a) **3/3 sub 1 phiên** = kỷ lục, và prompt Đà cấm bẫy từ đầu vẫn garble (khẳng định S123: prompt-đúng không chặn được #53); (b) **recover-path MỚI**: lead-view resume KHÔNG cứu được diary ⇒ phải **on-behalf từ `sub-*.md` ghi-trong-lúc-làm** — nhánh thứ 4, khác path-1 diary. Chính là `gap-incident-unrecorded` mà lead-omission vừa xin mở enum. + +## 5. Nit (không chặn gate) +- **N1** — batch-marker `reviewer/archive/2026-07.md:84` khai *"hook 26.5KB→**<17.1KB**"* nhưng L1 thật = **17784B (17.4KB)**, 100 dòng (head-200 = trọn file) ⇒ claim falsifiable-**FALSE** ~274B. Vẫn dưới read-limit 24.4KB + cap 25.6KB ⇒ **không cần curate thêm**, chỉ sửa con số trong marker. +- **N2** — entry on-behalf lead-view nên tách nhãn nguồn 1 câu: phần `:225` + lesson "grep-theo-SỐ" là **lead-authored/reviewer-lane**, không phải sub tự tìm (hiện đã ghi "reviewer bắt thêm" — đủ minh-bạch, nhưng "45→46→47" thì chưa nói rõ mốc 46 đến từ `sub-reviewer-0.md:99`). +- **N3 (không phải turf tao — route H24/lead-view)** — `memory-budget.json` `lead_self_audit._note` vẫn tả enum là *"5 view-* + 5 gap-*"* trong khi array nay **11** (5+6) sau khi mở `gap-incident-unrecorded`. Narrative-vs-data drift ngay tại file vừa sửa. +- **VERIFIED-CLEAN (chống false-alarm):** (a) `audit-synthesis.md:64` "CHƯA áp một cái nào" = **frozen-at-13:18 đúng thời-điểm**, sau đó `36cefcc` mới áp — trap#3 frozen-narrative, **KHÔNG flag**; (b) U+FFFD trong diary CỦA TAO = 1, là self-quote `"24.1KB"` trong entry S132 — m#9 quoted-evidence cố-ý, **benign**; (c) 2 dir thiếu `run.md` = 2 S117 spec-only by-design, khớp baseline S132. + +## 6. Method mới (đúc phiên này) +- **m#14 — `git show | grep -v "^[+-][+-]"` NUỐT dòng index kiểu `+- [Title](file.md)`:** tao tự dính bẫy m#5 của chính mình lượt này (diff `auto-memory/MEMORY.md` ra RỖNG ⇒ suýt kết luận "không đổi"). Filter đúng: `grep "^[+-]" | grep -v "^+++\|^---"`. m#5 nay có ca thật lần 2 ⇒ nâng thành phản-xạ mặc-định, KHÔNG chỉ ghi nhớ. +- **m#15 — moved-not-cut phải phân-biệt DÒNG-NỘI-DUNG vs STUB-TRỎ-ARCHIVE:** curate đời-sau nén stub cũ (`[→ archive @S140] …`) làm chúng "mất" khỏi archive-grep ⇒ dương-giả "cut-not-moved" 4/20. Test đúng = với stub, grep **nội-dung đặc-trưng của entry gốc** trong archive, KHÔNG grep chuỗi stub. + + diff --git a/.claude/workflows/runs/2026-07-22-S143-closeout-audit/sub-tooling-4.md b/.claude/workflows/runs/2026-07-22-S143-closeout-audit/sub-tooling-4.md new file mode 100644 index 0000000..5594088 --- /dev/null +++ b/.claude/workflows/runs/2026-07-22-S143-closeout-audit/sub-tooling-4.md @@ -0,0 +1,116 @@ +# sub-tooling-4 — H1 tooling/docs freshness CHỐT @session-end S143 (2026-07-22) + +> Ghi-đĩa TRONG-lúc-làm (chống #53). Propose-only. Lead = single-writer. +> HEAD `c4903dd`. Wave S143 = 5 commit `2757e41 3f4310f 36cefcc 39cc060 c4903dd` (base `b146e2b`). + +## Ground-truth disk (đo lúc chạy) +- `.claude/agents/*.md` = **18 file** = **17 persona + README.md** ✓ (roster 17 khớp yêu-cầu "giữ 17 vai") + - cicd-monitor · database-agent · frontend-designer · harness-audit · harness-eval · harness-refine · harvest-curator · implementer-backend · implementer-frontend · investigator-api · investigator-codebase · lead-omission-auditor · lead-view-auditor · office-document · reviewer · test-specialist · tooling-auditor +- `.claude/skills/` = 6 project skill + README.md (0 đổi; `git log -- .claude/skills/` last-touch = `a09dcae`, TRƯỚC wave S143) +- `~/.claude/skills/` = 23 standalone +- `.claude/commands/*.md` = 18 + +## VERDICT: DRIFT-FOUND (4) — ①PASS(+1 LOW carry) · ②PASS · ③DELTA-2 · ④DRIFT-2 + +| Mặt | Trạng-thái | Cần-update | +|---|---|---| +| ① skill | **PASS** | 0 đổi S143. 1 LOW carry monthly-lane (ef-core `:307` Mig-66→67) | +| ② sub-role | **PASS** | 0 — 17=17=17=17 khớp 4 nguồn, 4 site vá S143 verified-landed | +| ③ plugin/config | **DELTA-2** | F-C settings model pin flip chưa ghi sổ · F-D marketplace 35→37 | +| ④ docs | **DRIFT-2** | F-A dòng-nợ 3→4 vế (7 site) · F-B enum 10→11 (3 site, 1 FUNCTIONAL) | + +## ① SKILL — PASS +- `.claude/skills/` **6 project** (contract-workflow · form-engine · permission-matrix · dependency-audit-erp · ef-core-migration · iis-deploy-runbook) + README.md. `git diff b146e2b..HEAD -- .claude/skills/` = **RỖNG** ⇒ 0 skill đụng trong wave S143. +- SKILL.md mtime: contract-workflow 24452B (05-08) · dependency-audit-erp 5551B (06-18) · ef-core-migration 32914B (07-14) · form-engine 5450B (04-30) · iis-deploy-runbook 14688B (06-25) · permission-matrix 7864B (07-15). +- `~/.claude/skills/` = **23 standalone** (algorithmic-art…xlsx) — IDENTICAL baseline S140, 0 mới. +- Map-vai: `agents/README.md:179-185` skill-matrix có **đủ 17 row** (vá S143 `2757e41` "skill-matrix 15→17" — verified: 3 row trio `:183-185` + 2 row H24 `:181-182` present) ✓ +- 🔸 LOW (carry, monthly-lane): `.claude/skills/ef-core-migration/SKILL.md:307` còn "§16+ **Mig 27-66** detail pending" trong khi canonical = **Mig 67** (S133, 2026-07-17). Owner = audit đầu-tháng `CLAUDE.md:113` **2026-08-01**, KHÔNG phải drift-mới của S143. + +## ② SUB-ROLE — PASS (17 khớp 4/4 nguồn) +| Nguồn | Số | Bằng-chứng | +|---|---|---| +| disk | 17 | `ls .claude/agents/*.md` = 18 file − README.md | +| `docs/STATUS.md:450` | **17** | cột giữa row `Sub-agents` (canonical B1) | +| `hmw.js:22-40` VALID_ROLES | 17 | 17 chuỗi role, +3 trio `:36` | +| `.claude/agent-memory/` | 17 folder | 18 entry − `memory-budget.json`; khớp `README:237` "17 folder" | +- 4 site vá S143 **VERIFIED-LANDED**: `README:27` (Roster THẬT nay liệt đủ 12 tên + trỏ canonical, KHÔNG số) · `README:225` (VALID_ROLES + "7 monitor") · `README:190` + `STATUS:450` (đã reword "NO Write/Edit" = **tuyên-bố ý-định**, containment thật = single-writer + git-diff) ✓ +- Trio frontmatter đồng-nhất `model: opus` + `effort: max` + `memory: project` + `maxTurns: 18` + 8 tool read-only (3/3 file `:5-9`) — khớp mô-tả `STATUS:450`. +- Nấc trio: `STATUS:450` + `HANDOFF:5` + `:7(1)` đều khai **"CHƯA spawn lần nào / verified-pending-restart"** — **KHÔNG có site nào lỡ khai đã-chạy/verified-runtime** (grep `verified-runtime|đã chạy|spawn-probe` trên commands/ + agents/README + STATUS + HANDOFF: 0 hit gán cho trio) ✓ +- 0 vai thừa/idle/scope-drift: 7 monitor đều có ranh khai tường-minh (H1⟂H2⟂H24×2⟂trio×3) `README:227` + `:129-133`. + +## ③ PLUGIN/CONFIG — 18/15/3 PASS nhưng **2 DELTA config chưa ghi sổ** +- `~/.claude/settings.json` `enabledPlugins` = **18 registered / 15 enabled / 3 disabled** (`pr-review-toolkit` · `code-modernization` · `hookify`) — **IDENTICAL** baseline S125→S140, 0 đổi. +- Nấc báo đúng: installed 18 → enabled 15 → assigned (bảng `README:199` + skill-matrix) → used (per-session). KHÔNG conflate. +- `pull_warn_days` **KHÔNG ghost-wire** ✓: script `:187-192` ĐỌC key (`$cad.pull_warn_days`), key CỐ Ý vắng trong `memory-budget.json` ⇒ degrade INFORM đúng thiết kế; khớp `HANDOFF:7(2)` carry chờ anh đặt số. +- → xem **F-C** (model pin) + **F-D** (marketplace 35→37). + +## ④ DOCS — DRIFT-2 (F-A + F-B), phần còn lại PASS +- `CLAUDE.md:105/:113/:136` "6 skill" + audit kế 2026-08-01 ✓ khớp disk. +- `STATUS.md:462` + `HANDOFF.md:5` (row S141–S143) mô-tả wave: roster 14→17 ✓ · vế-4 `pull-cach` ✓ · `flag_classes` 10→11 ✓ · trio chưa-spawn ✓ · 5 commit ✓ — **phản-ánh ĐÚNG + KỊP**. +- `agents/README.md:190/:225` G-015 wording ✓ (đã hạ "read-only enforced" xuống "ý-định"). +- Drift còn lại = F-A (dòng-nợ) + F-B (enum) dưới. + +## FINDING sống (cập-nhật dần) +### F-A [dòng-nợ 3-vế → 4-vế] — script đã 4 vế, doc prescriptive còn "3-vế" +Script `scripts/nhip-no-probe.ps1:201` in **4 đoạn**: +`NHIP-NO: kiem {0} | {1} | {2} | {3}` với vế-4 = `pull-cach N ngay` (`:162-198`), header `:22` khai đủ 4 vế. +Site PRESCRIPTIVE (mô-tả hành-vi SỐNG) còn "3-vế" — ứng-viên DRIFT: +- `.claude/commands/pause.md:44` +- `.claude/commands/session-end.md:57`, `:63` (khuôn do-record), `:101` +- `.claude/commands/session-start.md:213` +- `.claude/commands/tiep.md:112` +- `docs/governance/session-model-se-draft.md:34` (bảng "NHIP-NO probe 3-vế") +Site FROZEN-IN-TIME (KHÔNG drift — record lịch-sử): `runs/2026-07-17-*`, `spec-adap-*`, `adap-reports/*`, `docs/changelog/sessions/*`, `STATUS.md:482` (mục lịch-sử S135-S136), `HANDOFF.md:13` (Prev-block). +- error-ledger carve-out `:49` nói "dòng-nợ read-only vẫn IN ở MỌI điểm dừng" — KHÔNG khai số vế ⇒ **KHÔNG stale** ✓ +- `docs/governance/harness-11-engine.md` — grep `nhip-no|dòng-nợ|vế` = **0 match** ⇒ KHÔNG stale ✓ + +### F-B [enum `flag_classes` 10→11] — doc-sync CHƯA xong, 1 site FUNCTIONAL 🔴 HIGH +Live: `memory-budget.json:129` = **11 class** = 5 `view-*` + **6** `gap-*` (`view-stale-count/status/header/role-desc` · `view-residual-asym` · `gap-carry-dropped/aged/owner-specifics/decision-sunk/underfill` · **`gap-incident-unrecorded`** mới). +`git show --stat 36cefcc` (commit MỞ enum) đụng `memory-budget.json` + `agents/README.md` + STATUS + HANDOFF — **KHÔNG đụng `.claude/agents/lead-omission-auditor.md`**. + +🔴 **B-1 FUNCTIONAL (HIGH) — `.claude/agents/lead-omission-auditor.md`** = ĐÚNG cái vai phải DÙNG class mới, mà bản-sao-cục-bộ của enum vẫn 5: +- `:29` heading `## 5 class của mày — enum ĐÓNG` +- `:35-39` bảng **chỉ 5 row** — `gap-incident-unrecorded` **VẮNG MẶT hoàn toàn** (grep tên class trên toàn `.claude/agents/`: 0 hit) +- `:41` "broadcast liệt 5 dấu-hiệu, **enum có 5 class**" +⇒ **ghost-enum kiểu H18 "defined-but-unread"**: class có trong JSON nhưng consumer duy-nhất không thấy. Vai lại bị luật "CẤM tự chế class" ⇒ lần tới gặp ca incident-unrecorded nó sẽ **escalate lại đúng thứ vừa được duyệt**, hoặc ép vào class sai. Bản-sao-cục-bộ (có cột ngữ-nghĩa + cột nơi-soi) THẮNG con-trỏ `:31` trong thực-dụng — nên đây KHÔNG phải nit trình-bày. +- ⚠️ ăn thẳng vào chính vụ vừa xảy ra: `WAL:29` INFORM-3 ghi "sub xin anh MỞ ENUM… nó KHÔNG tự bịa" — cơ-chế escalate chạy đúng, nhưng vòng lặp chưa khép vì bước ghi-lại-vào-persona bị bỏ. + +**B-2 (MED) `docs/STATUS.md:450`** — 2 chỗ trong CÙNG row canonical: +- "`lead-omission-auditor` = cái BỊ THIẾU (**5 class** `gap-*`)" → phải 6 +- "flag_classes … (**10 class = 5+5**, vai CẤM tự chế)" → phải 11 = 5+6 + +**B-3 (MED) `.claude/workflows/hmw.js:33`** (comment cạnh VALID_ROLES) — "flag_classes (**10 class: 5 view-\* + 5 gap-\***)". + +**Sạch ✓ (đã trỏ key, KHÔNG chép số — B1 đúng):** `session-start.md:117` · `:211` · `session-end.md:103` · `ultra-on.md:25` · `agents/README.md:227` · `docs/governance/harness-11-engine.md` (0 match) · `scripts/*.ps1` (0 match) · `lead-view-auditor.md:39/:41` ("5 class" vẫn **ĐÚNG** — nhánh `view-*` không đổi; **KHÔNG được "sửa" thành 11**, nó chỉ nói phần của nó). + +### F-C [lead-model pin flip KHÔNG ghi sổ] — MED, mặt ③→④ +- `~/.claude/settings.json:11` = **`"model": "claude-opus-4-8[1m]"`** (`:37` `effortLevel: xhigh` giữ). mtime = **2026-07-20 13:38:37**, size 1615B. Baseline mọi phiên trước (S125→S140 diary + `STATUS:345` + `STATUS:374`) = `claude-fable-5[1m]`. +- ⇒ pin **owner-choice**, KHÔNG outage: `.claude/WAL.md:9` phiên này `wf: fable-real gate … model=claude-fable-5` ⇒ Fable VẪN resolve được qua spawn-param. Đúng khuôn MTv3 "owner-chọn-hạng-hai ≠ outage → 0 caveat / 0 revert". +- 🔴 Nhưng **nghĩa-vụ ghi-sổ chưa làm** (`session-start.md:39` "đổi giữa phiên OK, **ghi 1 dòng session-record**" + `:47` "Flip-record gắn nhãn {owner-choice|outage}"): + - `STATUS.md:462` row S141–S143 = **row DUY NHẤT không có dòng `Lead `** — so `:468` (S140 "Lead Fable 5 (owner-choice flip mới, MTv3 0-caveat)") · `:489` · `:503` · `:515` · `:532` · `:543` · `:554` đều có. + - `STATUS:450` canonical §Sub-agents còn câu hiện-hành *"Lead = frontier-class owner-choice per-session: **em main Fable 5 (1M) Max**"* — mâu-thuẫn settings hiện-tại. + - `session-start.md:43` outage-path còn hardcode lỗi `"Model isn't available — claude-fable-5[1m]"` → fallback **`/model claude-opus-4-8[1m]`** = **bảo đổi sang đúng cái đang pin** ⇒ recipe hồi-phục thành no-op. +- Đề-xuất (quyền anh): (a) +1 dòng flip-record vào row S141–S143 `{owner-choice}` — nhãn nào là quyền anh, đừng đoán; (b) `STATUS:450` đổi câu hiện-hành thành trỏ-runtime-probe thay vì tên model cứng; (c) `session-start.md:43` viết outage-path **đối-xứng 2 chiều** (down model nào → sang model kia) thay vì cứng 1 hướng. + +### F-D [marketplace 35 → 37] — LOW, lớp-đo bị bỏ sót +- `~/.claude/plugins/marketplaces/claude-plugins-official/plugins` = **37 dir** (baseline diary S125 = 35). 18 registered ⊂ 37 (`REGISTERED-NOT-IN-MK` = **rỗng** ⇒ 0 plugin mồ-côi). +- 19 available-not-registered: `agent-sdk-dev` `clangd-lsp` `code-simplifier` `cwc-makers` `example-plugin` `gopls-lsp` `jdtls-lsp` `kotlin-lsp` `lua-lsp` `math-olympiad` `mcp-tunnels` `php-lsp` `project-artifact` `pyright-lsp` `ralph-loop` `ruby-lsp` `rust-analyzer-lsp` `security-guidance` `swift-lsp`. +- KHÔNG quy được "2 cái nào mới": **toàn bộ 37 dir cùng mtime `2026-07-17 13:51:45`** = refresh/re-clone cả cây ⇒ mtime mất giá-trị phân-biệt. +- 🔴 Tự-soi: các phiên trước (gồm chính tôi @S140 "③PLUGIN PASS 18/15/3 IDENTICAL") chỉ đo **lớp registered/enabled**, KHÔNG đo **lớp marketplace-inventory** ⇒ +2 sống ≥5 ngày không ai thấy. Cùng họ với bài `commands/*.md` blind-spot (S57/S99/S126): sweep liệt consumer thiếu MỘT LỚP thì miss tái-sinh. + +## 🔌 NEW-ALLOC audit (skill/plugin mới chưa phân-bổ) +- **Skill: 0 mới** (6 project + 23 standalone identical) ⇒ 0 alloc-action. +- **Plugin enabled: 0 mới** (18/15/3 identical) ⇒ 0 alloc-action trên lớp enabled. +- **Marketplace available (F-D) — 3 ứng-viên đáng cân-nhắc, 16 SKIP:** + | Plugin | Đề-xuất | Lý-do | + |---|---|---| + | `security-guidance` | **CÂN-NHẮC** — gán `reviewer` (+ `cicd-monitor` lớp commit) | "injection, XSS, SSRF, hardcoded secrets" — trùng lane authz/secret mà S118 #82 (`feedback_permission_grant_two_layers`) vừa cho thấy em-main-solo hay sót; ⚠️ nó có **hook Stop + edit-time warning** ⇒ đụng `.claude/settings.json` hooks (đang chỉ có `wal-flush.ps1`) ⇒ **anh quyết**, KHÔNG tự bật | + | `code-simplifier` | **SKIP (yếu)** | trùng lane `reviewer` + `implementer-*`; SE đã có luật rules.md, thêm agent = phình roster (floor H3 "gộp-vai KHÔNG phình") | + | `project-artifact` | **SKIP** | status-page generator — SE đã có `STATUS.md`/`HANDOFF.md` + `session-report` plugin đang enabled | + | 16 còn lại | **SKIP** | 9 LSP ngôn-ngữ ngoài stack (.NET/TS đã có `csharp-lsp`+`typescript-lsp` enabled) · `example-plugin`/`math-olympiad`/`cwc-makers`/`ralph-loop`/`mcp-tunnels`/`agent-sdk-dev` = ngoài lãnh-địa SE | +- 3 vai trio `harness-{eval,refine,audit}`: skill-matrix `README:183-185` đã gán ref-only đúng (đọc output `measure-agent-memory`/`mfe-eval`/`memory-archive-gate`/`crystallized-backfill`/`nhip-no-probe`) ⇒ **0 alloc-gap**. + +## 📌 Method-note (cho lần sau) +1. **Đổi 1 giá-trị trong file-CONFIG ⇒ grep MỌI bản-sao-cục-bộ của enum đó trong PERSONA**, không chỉ doc-tóm-tắt. Enum đóng có 2 bản: JSON (authoritative) + bảng-trong-persona (thứ vai thật-sự đọc). Sync 1 nửa = mở enum trên giấy. +2. **Marketplace-inventory là lớp ĐO RIÊNG** với enabledPlugins — từ nay đếm cả 2 (`ls …/marketplaces/*/plugins | wc -l` + settings) mới được kết "③ PASS". +3. Prescriptive ⟂ frozen-in-time: chỉ vá nhóm prescriptive; sửa record lịch-sử = giả-mạo (lead đã xác nhận cách tách này đúng @S143). diff --git a/docs/HANDOFF.md b/docs/HANDOFF.md index a44cec4..02cf7f4 100644 --- a/docs/HANDOFF.md +++ b/docs/HANDOFF.md @@ -2,7 +2,7 @@ > **Tiering rule (S40):** giữ **2-3 session gần nhất**. Cũ hơn → `docs/changelog/sessions/`. Full brief history pre-S40 → `docs/_archive/HANDOFF-preS40-fullhistory.md`. -**Last updated:** 2026-07-22 (S141–S143 — **Wave adap đợt-9/10 ĐÓNG TRỌN (7 thư) + closeout OUTWARD đã push `2757e41`/`3f4310f` — governance-only: 0 prod-code/0 mig, test 528 giữ, bundle FROZEN. Roster 14→17.** S141 vòng-1 `wf_3e1ade40-704` CHẾT giữa chừng → reconcile-từ-ĐĨA + đóng orphan partial-honest 5/13; S142 vòng-2 CẮT-GỌT `wf_1e936b16-30c` 2/2 lane 0-garble land trio `harness-{eval,refine,audit}` + contract-v2 ①a + stamp-decode + annex phép-8 + sweep 13 site; **S143 `/tiep` closeout OUTWARD anh gật**: adap-report 7/7 · email hub `6c94873f72e0` selftest exit 0 · STAGE-2 0-pending cross-check 2 chiều · squash K=8 push 0-`wal:`-lọt (12==12) · vá skill-matrix 15→17 · **+vế-4 `pull-cach`** cho `nhip-no-probe` (fault-inject 7 ca 2 chiều). **Contract v2 chạy runtime LẦN ĐẦU** (tick 16→17, `OK-reachable`). 🔴 **Nấc = `executed-file/verified-pending-restart` — trio CHƯA spawn lần nào.**) +**Last updated:** 2026-07-22 (S141–S143 — **Wave adap đợt-9/10 ĐÓNG TRỌN (7 thư) + closeout OUTWARD đã push `2757e41`/`3f4310f` — governance-only: 0 prod-code/0 mig, test 528 giữ, bundle FROZEN. Roster 14→17.** S141 vòng-1 `wf_3e1ade40-704` CHẾT giữa chừng → reconcile-từ-ĐĨA + đóng orphan partial-honest 5/13; S142 vòng-2 CẮT-GỌT `wf_1e936b16-30c` 2/2 lane 0-garble land trio `harness-{eval,refine,audit}` + contract-v2 ①a + stamp-decode + annex phép-8 + sweep 13 site; **S143 `/tiep` closeout OUTWARD anh gật**: adap-report 7/7 · email hub `6c94873f72e0` selftest exit 0 · STAGE-2 0-pending cross-check 2 chiều · squash K=8 push 0-`wal:`-lọt (12==12) · vá skill-matrix 15→17 · **+vế-4 `pull-cach`** cho `nhip-no-probe` (fault-inject 7 ca 2 chiều). **Contract v2 chạy runtime LẦN ĐẦU** — và trong CÙNG phiên chạy **cả 2 nhánh lành**: `OK-reachable` (tick 16→17) rồi `squash-benign` (sau closeout). 🔴 **Nấc = `executed-file/verified-pending-restart` — trio CHƯA spawn lần nào.** **Vòng audit anh gật "làm hết": `reviewer` FAIL 1C/4M/4m/1nit + `lead-view` 3 FLAG + `lead-omission` 3 FLAG/3 INFORM → lead re-đo độc-lập từng cái, vá 9/9.** CRITICAL = **E-012/AS-16 `bằng-chứng-tự-huỷ-sau-squash`**: 7 report + email neo sha `wal:` chưa-push, squash phá đúng sha đó ⇒ re-anchor `2757e41` + **errata `e43484cef10f`** gửi hub. Kèm: "TRIPLE" chọn enum DỄ (2 site liệt-kê-TÊN lọt AC4 grep-theo-SỐ) · `TOTAL 46 "==baseline"` sai (ghi=45, live=47) · 4 site khai "NO Write/Edit" như cơ-chế chặn → sửa (nay có **nhân-chứng first-person**: `reviewer` frontmatter 0 Write/Edit mà **đã Write+Edit thật**; **9 vai** không phải 6). **3/3 sub garble #53** cả 3 resume, 0 mất dữ-liệu nhờ ghi-đĩa (sổ đếm ×20/S118 → **×23/S143**). `flag_classes` **10→11** (+`gap-incident-unrecorded` anh duyệt). Test **528 kế-thừa** (0 file `src/`·`fe-*`·`tests/` bị đụng cả 5 commit — verify bằng diff, KHÔNG khai từ trí-nhớ), bundle FROZEN. 5 commit: `2757e41`·`3f4310f`·`36cefcc`·`39cc060`·`c4903dd`.) **Carry MỞ re-stamp (14):** (1) carry-age design-question `[carry:carry-age-vacuous]` — vacuous-GỐC đã chết @S140, anh xem đóng? (2) hook-vs-budget-cap — **S143 đo tươi: `investigator-codebase` 26.624B vượt soft-cap** (`l1_over_30kb=false`, chưa chạm trần auto-inject); probe đếm `tran-bo-nho 1 over-cap` `[carry:hook-vs-budget-cap]` (3) UAT S117 incognito `[carry:uat-s117]` (4) PE phân-quyền số-phiếu+user `[carry:pe-phanquyen]` (5) BVAAU `[carry:bvaau]` (6) quyết-định Bình/Lê `[carry:binh-le-decision]` (7) Trà/Bùi re-login `[carry:tra-bui-relogin]` (8) account trùng `[carry:account-trung]` (9) UAT freeze-NS S133 `[carry:uat-s133-budget-freeze]` (10) UAT lũy-kế tạm-tính S134 `[carry:uat-s134-luyke]` (11) 🆕 **tools-whitelist KHÔNG chặn ghi runtime** — 6 vai read-only bị append `Write/Edit`; cơ-chế CHƯA kiểm; đã báo hub §3(b), chờ hub xác nhận + anh quyết có hardening không `[carry:tools-whitelist-no-teeth]` (12) 🆕 **ngưỡng `pull_warn_days`** — vế-4 đang INFORM trần, em CỐ Ý không tự đặt số (quyền anh) `[carry:pull-warn-threshold]` (13) 🔁 **session-model adopt** — draft `docs/governance/session-model-se-draft.md`; (a) hub phát mẫu ✅ + (b) khuôn bộ-ba SUB ✅ **đã mở khoá trong wave này**, chỉ còn **(c) anh duyệt bảng VC-1/2/3**; CẤM wire trước (c) `[carry:session-model-adopt]` — 🔴 **carry này BỊ RƠI khỏi khối S143 bản đầu** (khai 13 trong khi đúng là 14; lead-omission-auditor bắt @S143 class `gap-carry-dropped`), nay trả về (14) chờ-HUB reply: `b9ef5ede` (session-model **5 câu**) + `6c94873f` (báo-nấc wave 9/10) + errata `[carry:hub-review-wave-1807]`. ✅ **ĐÓNG @S143 (1):** `[carry:dangling-head]` — hub APPROVE khuôn ①a (`58e28bae`), SE land contract v2 + chạy runtime 1 lần nhánh `OK-reachable`; 3 ca lịch-sử S127/S133/S139 reclassify đúng `squash-benign`. **🔴 NEXT anh (đánh số — trả lời bằng số):** (1) ⚑ **trio first-run** — cần anh **restart CLI** rồi gật, em chạy spawn-probe 3/3 TUẦN TỰ (đây là thứ duy nhất chặn nấc lên `verified-runtime`); (2) ⚑ ngưỡng `pull_warn_days` — đặt số hay giữ INFORM trần `[carry:pull-warn-threshold]`; (3) ⚑ tools-whitelist no-teeth — chờ hub xác nhận cơ-chế, anh có muốn em thử hardening (hook chặn sub-write path tracked) không `[carry:tools-whitelist-no-teeth]`; (4) UAT lũy-kế tạm-tính S134 `[carry:uat-s134-luyke]`; (5) UAT freeze-NS S133 `[carry:uat-s133-budget-freeze]`; (6) ⚑ D1 nháp-không-cộng-tiền — gật giữ hay đổi (1 predicate); (7) hook-vs-budget-cap — chốt hướng (S143: inv-cb 26.6K over-cap) `[carry:hook-vs-budget-cap]`; (8) session-model — duyệt bảng VC-1/2/3 `[carry:session-model-adopt]`; (9) close-sweep cụm 7-carry đồng-tuổi S117/S118; **⬇️ 3 mục dưới CHÌM từ `spec:68` suốt S141→S143 (0 hit trên cả 4 bề mặt owner — `gap-decision-sunk` @S143), nay kéo lên:** (10) ⚑ **ratify ranh `refine ⟂ lead-omission`** — 🔴 ranh này **đã wire** vào `harness-refine.md:22-30` TRƯỚC khi được anh/hub ratify; anh gật giữ hay sửa ranh; (11) ⚑ **5 câu session-model** (mới mang 1/5 lên bảng): `session_ctx_kb`=64? · map N↔L + folder-form (`sessions/session-` hub vs `S` SE) · VC từng dòng · hook 3→4-path? · prereq unblock — 🔴 `session_ctx_kb` **0 hit** mọi bề mặt dù em khai "❌ treo"; (12) ⚑ **consent-form trio dài hạn** — mỗi phiên gật hay thành luật đứng (hub `58e28bae` Câu-3 đá về SE, câu hỏi còn nguyên cho anh). **NEXT em (phiên kế):** 🔴 **KHÔNG watch `broadcasts/inbox` nữa** — inbox chỉ có thư Đà kéo nên nó mù với thư chưa kéo (đúng lỗi S143); thay bằng **đọc vế-4 `pull-cach` trong dòng-nợ** rồi `/check-email` khi số tăng bất thường. Trio first-run ngay sau anh restart+gật; **H24 deep tới hạn** (S143 đã chạy sớm 1 nhịp theo direction anh — xem kết-quả trong log phiên); monthly combined audit **2026-08-01** (kèm full re-sync measured-block); MFE GOODHART-WARN strikes 21→23 theo dõi; nếu anh đổi D1 → predicate `ComputePendingAsync` + test C3 flip + deploy. diff --git a/docs/STATUS.md b/docs/STATUS.md index 99bb2ae..5608657 100644 --- a/docs/STATUS.md +++ b/docs/STATUS.md @@ -447,7 +447,7 @@ monthly re-tier mega-line + ef-core SKILL Mig→59 + 3 vocab-fork (2026-07-01 du | Gotchas | **83** | **+S133 #81-EXT** (instance 2 indirect-assignment, KHÔNG số mới: snapshot-NS-at-DaDuyet hook đặt ở finalize choke-point NHƯNG 2 site gán Phase TRỰC TIẾP bypass — admin-override `PurchaseEvaluationWorkflowService.cs:308` `= targetPhase` + seeder `DbInitializer:1323` `= current` → phiếu vào DaDuyet qua 2 đường này KHÔNG snapshot [frozen=0, display rơi về live = đúng bug đang vá]; reviewer adversarial bắt pre-commit, em-main + 3 invocation implement đều sót — cùng bài enumeration-writer #81; meta: field-đích có hook/derive/snapshot ⇒ grep MỌI assignment-site kể cả override/seeder). +1 S126 (**#83** số AGGREGATE session-cumulative tự-lão-hoá — audit COUNTS đổi bởi CHÍNH spawn review sau đó [2/2/0→4/4/0]; outward mời-reproduce = bảng per-lane theo run-id, KHÔNG số tổng; reviewer-gate bắt, em-main-solo sót). +1 S118 (**#82** menu-flag grant ≠ quyền API thật: display-layer [Permission `CanRead`→`GetMyMenuTree` FE-menu] ⟂ API-authz-layer [controller `[Authorize(Policy=)]`] = 2 tầng ĐỘC-LẬP; grant `Suppliers` R+C+U cho PRO nhưng `PUT/DELETE /suppliers` gate `[Authorize(Roles="Admin,CatalogManager")]` → PRO vẫn 403 sửa/xóa NCC [chỉ Publish/Import theo `Suppliers.Update` là ăn]; ngược lại `ReportsController` `[Authorize]` trần → mọi authed-user đọc `dashboard` tài-chính-HĐ ngược S92; fix gate `[Authorize(Policy="Reports.Read")]` per-method + grep controller authz TRƯỚC khi tin hiệu-lực grant; reviewer adversarial bắt, em-main-solo tin menu-flag=quyền thì sót; liên-quan #44). +1 S114 (**#81** derived-invariant re-derive ở write/select NHƯNG SÓT DELETE writer [DeleteQuote/DeleteDetail cascade] → xóa quote-selected cuối của NCC → `Supplier.IsWinner` kẹt stale [Any(IsSelected)=false] → `CreateContract Where(IsWinner)` gom NCC phantom → **HĐ giaTri=0**; fix helper `PeWinnerInvariant.ReSyncAfterQuoteRemovalAsync` gọi sau SaveChanges 2 handler; **enumeration-writer-trong-spec KHÔNG đáng tin** → grep MỌI `.Remove(`/`.Add(`/`=field` chạm entity chứa field-nguồn; chỉ **verify-adversarial-refute** bắt [invest/review/implement đều sót]; cardinality S87/S88 lên tầng mutation-path). +1 S113 (**#80** null-forgiving `!` che NRE trên external-parsed data: `SupplierExcelImportService.NewSupplier` gán `Code = r.Code!.Trim()` → NullReferenceException khi parser trả `null` cho ô cột-4 rỗng [ĐÚNG path R4 "thiếu Mã NCC → nháp"] → confirm nổ 500 CẢ batch dù preview classify New-draft KHÔNG lỗi; sibling `IsPublic=!IsNullOrWhiteSpace(row.Code)` null-safe nhưng NewSupplier thì KHÔNG; empty-string `""` chạy OK nhưng FE round-trip blank→JSON `null` → nổ. Fix `(r.Code ?? "").Trim()`. **Build 0/0 KHÔNG bắt** [`!` tắt nullable-warning]; chỉ test-before-critical bắt. Lesson: `!` null-forgiving trên dữ-liệu-parse-ngoài = mìn, dùng `?? default`). +1 S97 (**#79** backfill soi NHẦM bảng — transition-marker "[Duyệt KẾT THÚC]" nằm ở `PurchaseEvaluationChangelogs.ContextNote` KHÔNG phải `PurchaseEvaluationApprovals` → Mig 60 backfill match 0, phiếu finalize-CCM giữ flag=0 hiện sai "Đã được CEO duyệt"; fix Mig 61 query đúng bảng. PE 2 bảng lịch-sử tách vai [Approvals=ai-duyệt record :745 · Changelogs=chuyển-phase+marker LogTransition :1073]; verify marker-count prod trước khi tin backfill). +1 S97 (**#78** display-flag suy CONFIG thay RUNTIME → nói dối khi instance lệch config: `endsBeforeCeo` từ "workflow CÓ cấp finalize" thay "phiếu NÀY finalize" → phiếu lên CEO báo sai "không qua CEO"; nặng sau S97 default-flip opt-in; fix field runtime `EndedByLevelFinalize` Mig 60. Flag = "instance Đà làm-gì" KHÔNG "config CÓ THỂ"). +1 S96 (**#77** SPA deploy bundle cache-lag: team thấy UI CŨ dù đã deploy + Ctrl+F5 — index.html no-cache ĐÚNG-chuẩn + JS hash-immutable nhưng browser giữ tab-SPA-mở/cache-local → verify bundle prod **BYTE-LEVEL** (curl + grep string-fix trong `/assets/index-.js`) phân-biệt cache-vs-deploy; **incognito = golden-test**; no-service-worker nên clear-site-data đủ). +2 S91 (**#76** deploy render config từ `.example` KHÔNG phải file-gitignored → prod thiếu setting tới khi điền tay · **#75** seed ungated per-code RESURRECT data đã-wipe mỗi restart → gate sau env-flag `DemoSeed:Disabled` + verify-by-restart-thật). +1 S90 (**#74** Chrome-MCP screenshot kẹt SPA-SignalR `document_idle` → PowerShell `CopyFromScreen` + Win32 lọc-process-`chrome.exe`). +2 S85 (**#72** lệch giờ +7h — DateTime lưu UTC nhưng serialize thiếu 'Z' → FE `new Date()`=local → `UtcDateTimeJsonConverter` global ép UTC-with-Z · **#73** UpdateDraft absolute-set CLEAR field SÓT khỏi pattern null-safe = bug-class S42 → guard `if (request.X is not null)`). +1 S78 **#71** (thêm enum value vào entity DÙNG-CHUNG → pollute UI/guard phân-loại theo PROXY-predicate `supplierId===null` thay vì enum tường minh; file-khi-duyệt purpose=5 lẫn "Bảng so sánh" + false-pass submit-guard → grep mọi field-proxy predicate loại value mới + build-verify TỪNG app; em-main grep no-leak bắt trước deploy). +1 S76 **#70** (FE absolute-set echo field anh-em từ server-snapshot + `invalidate()` fire-and-forget → cửa-sổ stale-echo mất-dữ-liệu khi lưu 2 ô liên-tiếp; guard `useIsFetching` gate nút Lưu tới khi refetch land; reviewer workflow bắt, impl self-review sót). +1 S72 **#69** FE bundle-hash non-deterministic + `deploy.yml` rebuild-FE-unconditional → bundle rotate kể cả commit governance (SPA-fallback-200 trap; cicd Run #312). +2 S69: **#67** Tailwind v4 accent palette thiếu stop (teal/violet/amberx/greenx chỉ 50/100/500/600/700; dùng -300 → teal/violet rơi DEFAULT Tailwind sai-hệ, amberx/greenx drop hẳn — build PASS, phải soi dist CSS) · **#68** IDE TS diagnostic giữa background-agent/workflow = snapshot dở-dang (TS server bắn mỗi save), chỉ tin build SẠCH sau-cùng (2× session này: re-skin + PE-FE đều false-alarm). Prev +1 S68 **#66** Tailwind v4 rule element thô `h1-h4{color:#0b1220}` viết NGOÀI `@layer` thắng utility `text-white` → heading render đen; fix ĐIỂM `text-white!` (important, grep dist confirm), KHÔNG move `@layer` (load-bearing ~30+ heading toàn app). Prev +1 S65 **#65** build csproj con (vd `SolutionErp.Api.csproj`) ≠ `dotnet build SolutionErp.slnx` (gồm tests) → miss test-compile khi đổi chữ ký record command (CreateDepartmentCommand +ParentId) → CI CS7036 FAIL-gated Run #291 (deploy chặn, prod nguyên — test-gate làm đúng việc). Fix: build full slnx trước push BE signature-change. Prev +2 S61: **#63** EF scaffold tự sinh `RenameColumn` SAI-semantics khi drop+add cùng type (test xanh không bắt — SQLite EnsureCreated không replay migration) · **#64** `dotnet ef database update` áp Design-DB 0-rows ≠ Dev-DB → data-migrate `Sql()` chạy thật lần đầu trên prod. Prev +2 S59 (#61 sqlcmd `-f 65001` · #62 rename natural-key UPDATE trước deploy) | | User memory | **31** | +S84 `feedback_derived_flush_execution` (derived→canonical flush = em-main execution KHÔNG gate user-confirm; monitor INFORM-only ≠ cần-anh-duyệt; chỉ ĐỔI-con-số/policy = quyền anh). +S79 `feedback_canonical_spec_over_broadcast` (adap pull canonical-command/§P đừng phỏng-theo broadcast + report-before-stamp dogfood + residual own-diary OK). +S75 `feedback_harness11_engine` (engine governance tự-bảo-trì + gotcha #30-via-Edit + multi-workflow-verify + git-add-specific lesson). re-ground S71 (H1 disk-count: 25 `feedback_*` + 3 `project_*`; STATUS "21" stale từ S64). +S71 `feedback_harness10_run_trace` (run-trace + 3 lesson). Prev +1 S64 `feedback_harness7_outward_writing_quality`; re-grounded S54 base 19 | | Skills | 6 | 3 domain + 3 ops | -| Sub-agents | **17** | **+S141/S142 🧪🧭🧮 `harness-eval` + `harness-refine` + `harness-audit` (15th–17th sub — bộ-ba đồng-kiểm HỆ MEMORY, adopt AI_INFRA khuôn 5-câu `58e28bae` khối B, wave adap đợt-9/10; land S141 persona+seed+`hmw.js` VALID_ROLES 14→17, wiring nghi-thức S142 vòng-2 sau khi vòng-1 chết giữa chừng). Read-only INFORM-only propose-only, frontmatter **không khai Write/Edit** — 🔴 nhưng đo S143: **runtime VẪN cấp** (append cuối tool-list, 9/9 vai read-only; nhân-chứng `reviewer` đã Write+Edit thật) ⇒ đây là **tuyên-bố ý-định**, KHÔNG phải chặn-bằng-thiếu-tool; containment thật = single-writer + git-diff commit-gate · `model: opus`+`effort: max`+`memory: project`+`maxTurns: 18`. Trục = **CHÍNH HỆ MEMORY**, chạy **TUẦN TỰ** eval→refine→audit (🔴 CẤM `parallel()` — con KIỂM chạy song song sẽ chấm bản CŨ ⇒ verdict vô-nghĩa): `harness-eval` = con **ĐO** (chỉ trả số nguyên-văn từ instrument, CẤM số-từ-trí-nhớ) ⟂ `harness-refine` = con **ĐỀ-XUẤT** (4 lớp reinject/promote/archive/distill, bắt buộc có mục "đã cân-nhắc→BÁC") ⟂ `harness-audit` = con **KIỂM** (verdict ĐẠT/TRƯỢT per-claim + re-chạy ≥2 số load-bearing; PIN run-folder đích-danh, CẤM tự tìm "run mới nhất"). 🔴 **KHÔNG gộp** với H1 tooling-freshness / H2 harvest-integrity / H24 lead-surface / reviewer diff-code — 4 trục khác nhau. Nghi-thức 2-đầu-phiên **consent-gated** (`session-start §2.1.9` + `session-end §L.b(k)`): em-main IN đề-xuất, KHÔNG auto-run, anh gật mới chạy; skip → ghi vết WAL `trio: skipped S` (vết-2-lớp, chuỗi skip nhìn thấy được). Budget seed đo TƯƠI `measure-agent-memory.ps1`: eval 1547B · refine 1616B · audit 1513B (l2_*=0 = SEED-STATE đúng, chưa chạy lần nào). 🔸 **Nấc trung-thực = executed-file / verified-pending-restart** — 3 vai CHƯA spawn-probe lần nào (cần restart CLI + anh consent; KHÔNG được đọc thành verified-runtime).** **+S121 👁 `lead-view-auditor` + `lead-omission-auditor` (13th+14th sub — H24 lead-self-audit, adopt broadcast `2026-07-14-Governance-harness-24`, anh chốt S119 `owner-decisions-15-07-2026`, land S121 wave-W2 `hmw.js` VALID_ROLES 12→14 CÙNG COMMIT roster+STATUS [R3-M2: lệch landing ⇒ C2/B3 flag mọi derived ghi "14" là stale-vs-12 ⇒ detector BÃO trên chính thay đổi của H24]). 2 monitor INFORM-only propose-only, cookie-cutter frontmatter monitor sẵn (`model: inherit` lúc-land [S124 re-pin → `opus`+`effort:max` cùng toàn roster] · `memory: project` · `maxTurns: 18` · 8 tool read-only, **NO Write/Edit**). Trục: `lead-view-auditor` = **view LỆCH source** (5 class `view-*`) ⟂ `lead-omission-auditor` = **cái BỊ THIẾU** (5 class `gap-*`) — 🔴 **KHÔNG gộp** vào tooling-auditor(H1 tooling-freshness)/harvest-curator(H2 harvest-integrity): H24 §2(1) *"gộp là mất tiêu-điểm; cái ta cần là cặp mắt CHỈ dành cho lead"*. Class-flag = **enum ĐÓNG** `lead_self_audit.flag_classes` ở `.claude/agent-memory/memory-budget.json` (10 class = 5+5, vai CẤM tự chế). Nhịp = `h24_cadence` {light 6/deep 15/jump 3} cùng file (single-source H24 §2(3) — doc TRỎ key, KHÔNG chép số); counter `.claude/governance/.session-counter.json` (content-based `last_ticked_head`, KHÔNG blind-increment — hook `wal-flush.ps1` auto-commit `agent-memory/` mỗi turn sẽ làm hỏng đếm mù; đặt ngoài 3 path hook CÓ CHỦ-ĐÍCH). ✅ **verified-runtime S122** (spawn-probe toàn-roster-KHI-ĐÓ SỐNG post-restart — **N=14 tại thời-điểm S122**, chứng runtime, §Recently-Done S122; 🔸 +3 trio S141 CHƯA nằm trong phép đo này) **+ chạy THẬT S124** (dogfood 2-vai đầu-tiên, owner-triggered @counter 3) **+ S137** (light-audit consent OVERDUE 8/6 → 2 FLAG view-stale-status + 1 FLAG gap-decision-sunk). 🔸 Residual THẬT giữ: đường `hmw.js→agentType` cho 2 vai H24 chưa exercise (Agent-tool path đã chứng; workflow-path chưa) [S137 view-audit lật ⚠️→✅ khớp source, giữ residual]. 🔸 Từ-vựng "view"/"omission" chọn có chủ-đích tránh va-chạm: `governance-detectors.ps1:15` đã sở-hữu `derived-staleness`, và "GAP" quá-tải (`session-end` build-gap · `memory-selfimprove-audit.ps1` CRITERIA+GAP).** **+S107 📄 `office-document` (12th sub — Office document WRITE specialist: docx·xlsx·pptx·pdf + form-engine; floor OD1–OD10; VALID_ROLES hmw.js 9→10; anh giao trực tiếp S107 "Sub chính" Office; ✅ **verified-runtime S107 CÙNG PHIÊN** — registry hot-reload agent MỚI giữa phiên [S27 lesson thu hẹp còn EDIT-agent/command] + spawn-test PASS OD1/OD4/OD5 template thật, model self-report `claude-fable-5` [data-point #5 flip-8]; finding: 2 template `wwwroot/templates` 0-placeholder mẫu-blank).** **worker-tier-pin (owner-decision S124 2026-07-15 — thay all-inherit H8 S66, trước nữa two-tier H4; sub TOÀN-ROSTER pin cứng KHÔNG theo lead; H23-precedence ĐO S126: spawn-param THẮNG hard-pin ⇒ `/fable-real` SỐNG). Lead = frontier-class owner-choice per-session:** em main Fable 5 (1M) Max (✅ **Fable RESTORED S98 2026-07-02** — lead self-report `claude-fable-5` + settings `claude-fable-5[1m]`; fallback-Opus H5 S62→S97 kết thúc, H5.6 hoàn tất) ⚠️ **S101 2026-07-03: runtime lead = Opus 4.8** (lead + 2 monitor + WF2 reviewer inherit đều self-report `claude-opus-4-8`; settings vẫn pin `claude-fable-5[1m]` → **Fable unavailable phiên này → H5-fallback tự-kích, revert-free, KHÔNG sửa frontmatter**; "Fable RESTORED S98" = point-in-time KHÔNG phải steady-state — inherit-chain resolve theo availability runtime; ✅ **S102 2026-07-06: Fable VỀ LẠI runtime** — lead + 2 monitor inherit self-report `claude-fable-5` → H5-fallback S101 kết thúc, pattern availability per-session xác nhận [S98 Fable → S101 Opus → S102 Fable → **S103 Opus** → **S104 Opus** (2026-07-06 Fable outage tiếp — S104 lead + 2 monitor spawn self-report `claude-opus-4-8` ×3, H5-fallback revert-free) → ✅ **S105 Fable** (2026-07-07 Fable VỀ lần 3 — lead + 2 monitor self-report `claude-fable-5` ×3, runtime-verified) → ⚠️ **S106 Opus** (2026-07-07 Fable outage lại — lead runtime self-report `claude-opus-4-8`, H5-fallback revert-free; flip-7) → ✅ **S107 Fable** (2026-07-10 Fable VỀ lần 4 — lead + 2 monitor self-report `claude-fable-5` ×3, runtime-verified; flip-8)], BƯỚC 0.6 probe mỗi phiên; per-session KHÔNG steady-state. 🔴 **[§Sub-agents = CANONICAL single-owner flip-chain — S106 gộp per anh-confirm; derived `agents/README:3` · `session-start:37` · `session-end:113` trỏ về đây, KHÔNG tự enumerate mỗi flip → chống churn 4-file/flip]**) · **TOÀN roster `model: opus` + `effort: max`** (worker-tier-pin S124; **A2 đo S126:** lane no-tier resolve `claude-opus-4-8` DÙ lead=Fable ⇒ pin ăn runtime, hết inherit-lead; số vai = cột giữa của chính row này — KHÔNG chép lại vào narrative, đó là cách row-14 và narrative-12 lệch nhau từ S121 tới S122; lineage: 7 demoted flip S66 → all-inherit S66–S123 [office-document S107 inherit-born] → pin S124) · effort Max. 10 product/quality + monitor INFORM-only (H1 · H2 · 2×H24 S121 · 3×trio-memory S141) — **liệt-kê NHÓM, số vai = cột giữa của chính row này**. Nấc H8 = **runtime-verified S98 (2026-07-02)** — spawn-test inherit-chain ×2 monitor self-report `claude-fable-5` (cả đội tự lên Fable khi lead restore, 0 sửa frontmatter — đúng thiết kế all-inherit). Prev two-tier H4 runtime-verified S57bis (spawn-test 2 chiều). | +| Sub-agents | **17** | **+S141/S142 🧪🧭🧮 `harness-eval` + `harness-refine` + `harness-audit` (15th–17th sub — bộ-ba đồng-kiểm HỆ MEMORY, adopt AI_INFRA khuôn 5-câu `58e28bae` khối B, wave adap đợt-9/10; land S141 persona+seed+`hmw.js` VALID_ROLES 14→17, wiring nghi-thức S142 vòng-2 sau khi vòng-1 chết giữa chừng). Read-only INFORM-only propose-only, frontmatter **không khai Write/Edit** — 🔴 nhưng đo S143: **runtime VẪN cấp** (append cuối tool-list, 9/9 vai read-only; nhân-chứng `reviewer` đã Write+Edit thật) ⇒ đây là **tuyên-bố ý-định**, KHÔNG phải chặn-bằng-thiếu-tool; containment thật = single-writer + git-diff commit-gate · `model: opus`+`effort: max`+`memory: project`+`maxTurns: 18`. Trục = **CHÍNH HỆ MEMORY**, chạy **TUẦN TỰ** eval→refine→audit (🔴 CẤM `parallel()` — con KIỂM chạy song song sẽ chấm bản CŨ ⇒ verdict vô-nghĩa): `harness-eval` = con **ĐO** (chỉ trả số nguyên-văn từ instrument, CẤM số-từ-trí-nhớ) ⟂ `harness-refine` = con **ĐỀ-XUẤT** (4 lớp reinject/promote/archive/distill, bắt buộc có mục "đã cân-nhắc→BÁC") ⟂ `harness-audit` = con **KIỂM** (verdict ĐẠT/TRƯỢT per-claim + re-chạy ≥2 số load-bearing; PIN run-folder đích-danh, CẤM tự tìm "run mới nhất"). 🔴 **KHÔNG gộp** với H1 tooling-freshness / H2 harvest-integrity / H24 lead-surface / reviewer diff-code — 4 trục khác nhau. Nghi-thức 2-đầu-phiên **consent-gated** (`session-start §2.1.9` + `session-end §L.b(k)`): em-main IN đề-xuất, KHÔNG auto-run, anh gật mới chạy; skip → ghi vết WAL `trio: skipped S` (vết-2-lớp, chuỗi skip nhìn thấy được). Budget seed đo TƯƠI `measure-agent-memory.ps1`: eval 1547B · refine 1616B · audit 1513B (l2_*=0 = SEED-STATE đúng, chưa chạy lần nào). 🔸 **Nấc trung-thực = executed-file / verified-pending-restart** — 3 vai CHƯA spawn-probe lần nào (cần restart CLI + anh consent; KHÔNG được đọc thành verified-runtime).** **+S121 👁 `lead-view-auditor` + `lead-omission-auditor` (13th+14th sub — H24 lead-self-audit, adopt broadcast `2026-07-14-Governance-harness-24`, anh chốt S119 `owner-decisions-15-07-2026`, land S121 wave-W2 `hmw.js` VALID_ROLES 12→14 CÙNG COMMIT roster+STATUS [R3-M2: lệch landing ⇒ C2/B3 flag mọi derived ghi "14" là stale-vs-12 ⇒ detector BÃO trên chính thay đổi của H24]). 2 monitor INFORM-only propose-only, cookie-cutter frontmatter monitor sẵn (`model: inherit` lúc-land [S124 re-pin → `opus`+`effort:max` cùng toàn roster] · `memory: project` · `maxTurns: 18` · 8 tool read-only, **NO Write/Edit**). Trục: `lead-view-auditor` = **view LỆCH source** (5 class `view-*`) ⟂ `lead-omission-auditor` = **cái BỊ THIẾU** (6 class `gap-*` — +`gap-incident-unrecorded` @S143 owner-duyệt) — 🔴 **KHÔNG gộp** vào tooling-auditor(H1 tooling-freshness)/harvest-curator(H2 harvest-integrity): H24 §2(1) *"gộp là mất tiêu-điểm; cái ta cần là cặp mắt CHỈ dành cho lead"*. Class-flag = **enum ĐÓNG** `lead_self_audit.flag_classes` ở `.claude/agent-memory/memory-budget.json` (11 class = 5+6, vai CẤM tự chế — mở enum là quyền owner). Nhịp = `h24_cadence` {light 6/deep 15/jump 3} cùng file (single-source H24 §2(3) — doc TRỎ key, KHÔNG chép số); counter `.claude/governance/.session-counter.json` (content-based `last_ticked_head`, KHÔNG blind-increment — hook `wal-flush.ps1` auto-commit `agent-memory/` mỗi turn sẽ làm hỏng đếm mù; đặt ngoài 3 path hook CÓ CHỦ-ĐÍCH). ✅ **verified-runtime S122** (spawn-probe toàn-roster-KHI-ĐÓ SỐNG post-restart — **N=14 tại thời-điểm S122**, chứng runtime, §Recently-Done S122; 🔸 +3 trio S141 CHƯA nằm trong phép đo này) **+ chạy THẬT S124** (dogfood 2-vai đầu-tiên, owner-triggered @counter 3) **+ S137** (light-audit consent OVERDUE 8/6 → 2 FLAG view-stale-status + 1 FLAG gap-decision-sunk). 🔸 Residual THẬT giữ: đường `hmw.js→agentType` cho 2 vai H24 chưa exercise (Agent-tool path đã chứng; workflow-path chưa) [S137 view-audit lật ⚠️→✅ khớp source, giữ residual]. 🔸 Từ-vựng "view"/"omission" chọn có chủ-đích tránh va-chạm: `governance-detectors.ps1:15` đã sở-hữu `derived-staleness`, và "GAP" quá-tải (`session-end` build-gap · `memory-selfimprove-audit.ps1` CRITERIA+GAP).** **+S107 📄 `office-document` (12th sub — Office document WRITE specialist: docx·xlsx·pptx·pdf + form-engine; floor OD1–OD10; VALID_ROLES hmw.js 9→10; anh giao trực tiếp S107 "Sub chính" Office; ✅ **verified-runtime S107 CÙNG PHIÊN** — registry hot-reload agent MỚI giữa phiên [S27 lesson thu hẹp còn EDIT-agent/command] + spawn-test PASS OD1/OD4/OD5 template thật, model self-report `claude-fable-5` [data-point #5 flip-8]; finding: 2 template `wwwroot/templates` 0-placeholder mẫu-blank).** **worker-tier-pin (owner-decision S124 2026-07-15 — thay all-inherit H8 S66, trước nữa two-tier H4; sub TOÀN-ROSTER pin cứng KHÔNG theo lead; H23-precedence ĐO S126: spawn-param THẮNG hard-pin ⇒ `/fable-real` SỐNG). Lead = frontier-class owner-choice per-session:** em main Fable 5 (1M) Max (✅ **Fable RESTORED S98 2026-07-02** — lead self-report `claude-fable-5` + settings `claude-fable-5[1m]`; fallback-Opus H5 S62→S97 kết thúc, H5.6 hoàn tất) ⚠️ **S101 2026-07-03: runtime lead = Opus 4.8** (lead + 2 monitor + WF2 reviewer inherit đều self-report `claude-opus-4-8`; settings vẫn pin `claude-fable-5[1m]` → **Fable unavailable phiên này → H5-fallback tự-kích, revert-free, KHÔNG sửa frontmatter**; "Fable RESTORED S98" = point-in-time KHÔNG phải steady-state — inherit-chain resolve theo availability runtime; ✅ **S102 2026-07-06: Fable VỀ LẠI runtime** — lead + 2 monitor inherit self-report `claude-fable-5` → H5-fallback S101 kết thúc, pattern availability per-session xác nhận [S98 Fable → S101 Opus → S102 Fable → **S103 Opus** → **S104 Opus** (2026-07-06 Fable outage tiếp — S104 lead + 2 monitor spawn self-report `claude-opus-4-8` ×3, H5-fallback revert-free) → ✅ **S105 Fable** (2026-07-07 Fable VỀ lần 3 — lead + 2 monitor self-report `claude-fable-5` ×3, runtime-verified) → ⚠️ **S106 Opus** (2026-07-07 Fable outage lại — lead runtime self-report `claude-opus-4-8`, H5-fallback revert-free; flip-7) → ✅ **S107 Fable** (2026-07-10 Fable VỀ lần 4 — lead + 2 monitor self-report `claude-fable-5` ×3, runtime-verified; flip-8)], BƯỚC 0.6 probe mỗi phiên; per-session KHÔNG steady-state. 🔴 **[§Sub-agents = CANONICAL single-owner flip-chain — S106 gộp per anh-confirm; derived `agents/README:3` · `session-start:37` · `session-end:113` trỏ về đây, KHÔNG tự enumerate mỗi flip → chống churn 4-file/flip]**) · **TOÀN roster `model: opus` + `effort: max`** (worker-tier-pin S124; **A2 đo S126:** lane no-tier resolve `claude-opus-4-8` DÙ lead=Fable ⇒ pin ăn runtime, hết inherit-lead; số vai = cột giữa của chính row này — KHÔNG chép lại vào narrative, đó là cách row-14 và narrative-12 lệch nhau từ S121 tới S122; lineage: 7 demoted flip S66 → all-inherit S66–S123 [office-document S107 inherit-born] → pin S124) · effort Max. 10 product/quality + monitor INFORM-only (H1 · H2 · 2×H24 S121 · 3×trio-memory S141) — **liệt-kê NHÓM, số vai = cột giữa của chính row này**. Nấc H8 = **runtime-verified S98 (2026-07-02)** — spawn-test inherit-chain ×2 monitor self-report `claude-fable-5` (cả đội tự lên Fable khi lead restore, 0 sửa frontmatter — đúng thiết kế all-inherit). Prev two-tier H4 runtime-verified S57bis (spawn-test 2 chiều). | | RAG chunks | **2441** | re-verify S126 (`list_projects` — alive, +12 vs S80's 2429; rerank 0.92 top-hit check OK). Stale `last_indexed 05-29` (store_memory stopgap; full re-index = AI_INFRA op cần VOYAGE_API_KEY). | **Bundle hash live (prod):** admin **`BVCukFP5`** · user **`DoxyEOxh`** (S134 — **`6664a61`** PE lũy kế TẠM TÍNH vs CHÍNH XÁC [0 mig — `ComputePendingAsync` complementary + DTO 5-field + FE sub-dòng amber + banner màn duyệt + D4 audit-note]; **Run #399** GO 5/5 5m27s gate-**528**-EXACT-từ-log rotate ×2 admin js `3NCdyODe`→**`BVCukFP5`** css `B--dUHcm`→**`CBzUlgOA`** / eoffice js `CKsoiNCI`→**`DoxyEOxh`** css `BuntB63r`→**`BHsBUA8e`** [FE-src đổi thật 6 file ⇒ rotate expected; CSS rotate = amber badge utilities, benign #69]; real-size 1.659.037/1.565.367B + LM 14:31:34/14:32:28+07 in-window; **byte-verify #77** `pendingPriorPes`=2 + `Tạm tính`=3 + `phiếu trước cùng gói thầu CHƯA duyệt`=2 PRESENT cả 2 js [control old-hash 900B text/html 0-hit — ct=text/html là discriminator sạch hơn size-919b]; Mig 67 top FROZEN + 89 bảng [0-mig by-construction]; smoke 4×200 + PE 401; lead spot-check độc-lập post-verdict: 4/4 hash khớp + marker PRESENT). **Prev S133** — admin **`3NCdyODe`** · user **`CKsoiNCI`** (S133 — **`d4fbced`** PE freeze NS phiếu DaDuyet [Mig 67 snapshot 11 cột + backfill 18/18 + FE 2-app badge 🔒 SHA-mirror `5534addb` + display-gate `budgetFrozen`]; **Run #398** GO 5/5 gate-520 rotate ×2 admin →**`3NCdyODe`** [CSS `B--dUHcm`] / user →**`CKsoiNCI`** [CSS `BuntB63r`] — prev `yCkX-2Bp`/`DKSD4p9k` @Run #397 S131-S132 [dòng-live lag S117→S133, hoist per precedent S104/S107]; **CSS cũng rotate** = badge sinh utility-class mới, benign #69; **byte-verify #77** `budgetFrozen`=1 + VN-string 🔒=1 PRESENT [old-control 0]; Mig 67 prod history-top + 11 cột + backfill 18/18 chua=0 + sys.tables **89**; smoke 4×200 + PE 401; `/tiep` S134 re-verify độc-lập 4/4: mig-top + health-200 + bundle-hash ×2 + filter 11/11). **Prev S117** — admin **`cFI7ih4a`** · user **`MxgooVZw`** (S117 — **`316a82f`** PE endsBeforeCeo pointer-aware [display-fix BE-only, phiếu chờ CEO hết báo "Kết thúc" sai] + duyệt-theo-khoảng Min–Max [Mig 66 + FE 2-app ProMinMax radio thứ 5]; **Run #387** PASS 5m36s rotate ×2 admin `Dd55jBpj`→`cFI7ih4a` / user `DVDr1UQ4`→`MxgooVZw` CSS-frozen [logic-only fingerprint]; **byte-verify #77** `ProMinMax`/`duyệt theo khoảng`/`cả Min và Max`/`Min–Max` PRESENT [bundle-cũ=0]; Mig 66 prod col decimal(18,2) + `__EFMigrationsHistory`-top + sys.tables **89**; smoke 200×3 · PE 401-secured; **#53-garble ×2** [invest-lane-1 + cicd-monitor] → SendMessage-resume + em-main curl cross-verify khớp). **Prev S116** — admin **`Dd55jBpj`** · user **`DVDr1UQ4`** (S116 — **`88368fd`** PE cho nhập giá ÂM ô báo giá [FE 2-app nút ± toggle + submit-gate `>0`→`!==0` + helper `hasRealSelectedQuote` 2-mirror `:201`/`:235`; BE submit-guard `:206` `Sum()<=0`→`All(==0)`; +9 test 486→495; **NO migration**]; **Run 386** PASS 5m28s rotate ×2 admin `D51OYyGV`→`Dd55jBpj` / user `BVdssm5S`→`DVDr1UQ4` CSS-frozen [logic-only fingerprint]; **byte-verify #77** `Đã nhập giá chào thầu`/`hoàn tiền NCC`/`phát sinh giảm`/`Đơn vị được chọn chưa có giá chào thầu` PRESENT [bundle-cũ=0]; smoke 200×3 · PE 401-secured · 89 bảng; cicd bắt bẫy snapshot-while-CI-running→poll-success TRƯỚC re-snapshot). **Prev S114** — admin **`D51OYyGV`** · user **`BVdssm5S`** (S114 — **`d436af2`** PE multi-NCC per hạng mục [Mig 65 backfill 2-chiều + BE re-key 5 financial→IsSelected + FE per-cell grid Detail×NCC 2-app SHA `ae3788e9`]; bundle rotate ×2 admin `acprMqfB`→`D51OYyGV` / user `Ck3BTDdA`→`BVdssm5S`; **byte-verify** `detailId`+`select-winner`+`hạng mục` PRESENT [bundle 1.65MB real-size]; smoke health/admin/eoffice 3/3 200 + endpoint POST select-winner bogus-401-live; **cicd garble #53 ×5 → em-main-solo curl-verify**; mig applied [API-healthy=migrations-ran-startup]). **Prev S113** — admin **`acprMqfB`** · user **`Ck3BTDdA`** (S113 — **Run #497** `5fa11b5` Supplier import v2 [Mig 64 publish/draft + dedup-MST + template + file mẫu] FE 2-app real-src rotate; JS admin `Cixlt_MA`→`acprMqfB` / user `BhBOG1dn`→`Ck3BTDdA` + CSS admin `Ds-E5neu`→`CfunQHbd` / user `Beb0Bb1h`→`DGqqHQXS`; ship-proof real-size 1.66/1.56MB + LM-in-window + **byte-verify** `Tải file mẫu`×1/`Đã công bố`×3/`Nháp (ẩn)`×4/`import/template`×1/`published`×5 PRESENT; Mig 64 prod 37/37-backfill sys.tables **89**; smoke health/admin/eoffice 200 + `import/template`-401-live + `suppliers?published=true`-401-live bogus-404-control). **Prev S112** — admin **`Cixlt_MA`** · user **`BhBOG1dn`** (S112 — **Run #496** `e100ef0` Supplier Excel-import Phase B FE 2-app [`SupplierImportDialog` NEW cả fe-admin+fe-user] + PE sign-off code-only; **real fe-src rotate — kết thúc #489→#495 non-determinism-freeze**; JS admin `BVyH-FY7`→`Cixlt_MA` / user `EDsZebvn`→`BhBOG1dn` + CSS admin `Bbtesa6B`→`Ds-E5neu` / user `BmuPz_Dy`→`Beb0Bb1h`; ship-proof real-size + Last-Modified-in-window + `"Database NCC"` marker PRESENT ×1; Mig 63 prod 2/2-col sys.tables **89**; smoke health/admin/eoffice 200 + PE-endpoint 200 + import-route preview-415/confirm-401-live bogus-404). **Prev S107** — admin **`BVyH-FY7`** · user **`EDsZebvn`** (S107 — **Run #489** `21387cd` +office-document 12th sub governance-only; **rotate benign #69-two-mode** [0 fe-src — Vite non-determinism], CSS frozen `Bbtesa6B`/`BmuPz_Dy`, real-size 1.64/1.55MB + Last-Modified-in-window 09:32/09:33 = ship-proof, Mig 62/89 frozen, smoke 200×3; hoist @S107-closeout per H1 flag D-BUNDLE-lặp — ⚠️ closeout-push kế có non-md sẽ rotate tiếp → Run #490 record nằm ở cicd MEMORY [authoritative], hoist ở bundle đầu phiên sau per precedent S99-#485). **Prev S104** — admin **`ChSNAJBK`** · user **`Bn2w1znH`** (S104 — **Run #488** `778fc98` Mig 62 Supplier expand 30-field; real-src-rotate FE 2-app SHA-mirror [form 4-section + Status select + `PathLink` 3 NAS-link], **sys.tables 89 pre==post no-new-table**, prod-verified marker grep-HIT, smoke 200×3; S104-shipped nhưng dòng-live `:27` lag tới S106 → hoist per H1 flag D-BUNDLE). **Prev S97** — admin **`mEGqlNWc`** · user **`Dnrp4PU1`** (S97 — **Run #484** `fb2dfa9` Mig 61 data-fix backfill; bundle rebuild **#69-benign** [0 FE-src change, review-workflow cicd re-snapshot LIVE → `CeTA7Z82`/`CGaAyXen` #483 đã bị #484 rebuild rotate]; backfill A/005/A/008 flag 0→1 prod-verified). **Prev #483** — admin **`CeTA7Z82`** · user **`CGaAyXen`** (S97 — **Run #483** `9e12e80` badge "✅ Đã được CEO duyệt" phiếu đi-hết-lên-CEO [PeFinalizeChip single-source + 6 call-site 2-app, đối xứng chip "⚑ Kết thúc·X"]; FE-only tận-dụng endsBeforeCeo runtime, no BE/mig; JS rotate CSS-frozen #69; byte-#77 "Đã được CEO duyệt" PRESENT cả 2 app + prev-badge additive no-regression; Mig 60 frozen; smoke 200×3 + PE-list 200). **Prev #482** — admin **`DR9q2VUy`** · user **`Bgz8u4E5`** (S97 — **Run #482** `8037fa0` endsBeforeCeo config→RUNTIME [Mig 60 `EndedByLevelFinalize`]: **Mig 60 applied prod** (history-top + col-default-0 EXISTS + backfill=0 UAT-no-marker + sys.tables **89** pre==post); **EF-ternary SQL-Server LIVE-confirmed** GET /purchase-evaluations 200 items=9 + PE-detail `31faef0d` 200 **endsBeforeCeo=False phase=7** = runtime-path chạy = **bug fixed LIVE** (NOT 500); JS rotate 2-app PeWorkflowPanel gate-diff, CSS frozen #69-REFINE; byte-#77 `endsBeforeCeo` PRESENT in-bundle; smoke 200×3. reviewer PASS 0-issue + test 440. **Prev #481** — admin **`Cf0o8dx8`** · user **`x8rppRAK`** (S97 — **Run #481** `1c8fb6a` PE finalize 2-fix [badge "không trình tới"→"Kết thúc tại {cấp}" + đảo default checkbox opt-in]; JS rotate real-FE 2-app `PeWorkflowPanel` diff, CSS frozen `Bbtesa6B`/`BmuPz_Dy` #69-REFINE logic-only; **byte-level #77** NEW `Kết thúc tại`+helper PRESENT / OLD `không trình tới`+`Đã BỎ tick` ABSENT; real-size 1.64/1.54MB; Mig 59/88-table frozen; smoke 200×3. FE-only mirror SHA `bcf812fd`, 0 BE/mig/test). **Prev S96** — admin **`COYAX-yQ`** · user **`0MU-kb4N`** (S96 — **Run #480** `0c2f9f6` price-lock; chuỗi 3 PE deploy #478 `e657faa` checkbox-opt-out → #479 `36cbf8b` chuông-stale-clear (BE-only) → #480 `0c2f9f6` khóa-giá-sau-duyệt, cicd PASS each ~5m; **FE JS rotate THẬT** (PeWorkflowPanel #478 + PeDetailTabs #480, 2-app) real-size 1.64/1.54MB vs 919b SPA-trap, CSS frozen #69-REFINE; Mig 59 frozen 0-mig; +Run #477 `ba4b8e0` NCC seed no-mig prod 21 NCC. **Verify byte-level:** prod `0MU-kb4N` CHỨA checkbox-fix ("BỎ tick"/"Đã BỎ tick") + "✅-static" cũ MẤT → checkbox "ko-được" = browser-cache KHÔNG deploy-fail). **Prev S95** — admin **`0T6vVJST`** · user **`BGXEVZO6`** (S95 — **Run #476** `18a17f5` H17 governance-only deploy; bundle rotate benign #69 CSS-frozen, prod 200×3, Mig 59 unchanged; cicd re-snapshot LIVE — pre-deploy `CkZ1MjC1`/`_-gpX7_Y`, mega-line S93 `CDn40vpV`/`CoPmPBg7` đã bị deploy trung-gian rotate từ S94). **Prev S85** — admin **`aKuNip19`** · user **`BUsL0HeQ`** (S85 — **Run #341** `49ac086` lệch-giờ TZ serialize UTC-with-Z; FE frozen #339+#341 BE-only. Chuỗi ~10 deploy #334→#341 buổi UAT anh Kiệt CV PRO: #334 `5a61254` batch CV PRO 6-fix → #335-#338 6 vòng UAT → #339 `1263c0d` workflow-preserve bug-class S42 → #341 `49ac086` TZ; #342 `d4f6021` docs+cicd BE-frozen, bundle giữ-nguyên gotcha #69-REFINE). **Prev S78** — admin **`CsJetgZH`** · user **`BVS0ApIm`** (S78 — **Run #330** `7886fd0` PE attach-file khi duyệt; bundle ROTATE từ S77 `BqKD3Y23`/`Cn-i349D` dù NO migration enum-only — gotcha #69 non-determ rebuild; cicd ship-proof byte-stable + fake-hash control). **Prev S77** — admin **`BqKD3Y23`** · user **`Cn-i349D`** (S77 — **Run #329** `e823694` banner Trả-lại; cuối chuỗi 10 deploy #320→#329 cùng ngày, cicd PASS each: #320 pill `DsSg6RRz`-era → #321 focus → #322 revert → #323 Mig57+notes `CPm4LTqm`/`BWJUAqEI` → #324 số-âm-đỏ `C6fx-0ea`/`N3sW4Div` → #325 indent `BhnNMucS`/`B1VebpXc` → #326 cờ-gấp-asymmetric `DwXqn37C`/`COXMCv7E` → #327 decouple `B0gboSAg`/`DbDg7pM-` → #328 notify (BE-only, FE frozen) → #329 banner **`BqKD3Y23`**/**`Cn-i349D`**). **Prev S76** — admin **`jOqxW4-p`** · user **`DbsznVvR`** (S76 — **Run #319** `21d1f4e` bảng lưới `` ngân sách viền-ô; chuỗi S76 cùng ngày: #318 `e33481e` feature ma-trận-3-cột + badge quyền-NS `BhFDF9IJ`/`BAkuRl3C` → #319 **`jOqxW4-p`**/**`DbsznVvR`**, cicd PASS each, smoke 3×200, Mig 56 applied prod #318). **Prev S74** — admin **`BYF5vIMJ`** · user **`CB-tiRxd`** (S74 — **Run #315** `8655ebf` Mig 55 CcmNote, cicd PASS ~4m54s: Mig 55 applied prod CcmNote nvarchar(1000) nullable · sys.tables 88 · smoke 4×200 · 0 regression). **Prev S73** — admin **`Bv3jUCNo`** · user **`BWlMBQz6`** (Run #314 `6aa4dcb` FE empty-candidates guard fix; chuỗi 2 deploy: #313 `1d86abc` feature `OlNyG9OD`/`DSzSLVtL` → #314 **`Bv3jUCNo`**/**`BWlMBQz6`**, cicd PASS each). **Prev S72** — admin **`fc_xkNpJ`** · user **`DP-tBcg0`** (Run #312 governance commit `18fced6`; bundle ROTATE do **non-deterministic hash + deploy rebuild-FE-unconditional** (gotcha #69) — 0 FE source change, prod state/DB GIỮ NGUYÊN). **Prev S69** — admin **`BgNCjwsG`** · user **`CBvh0vtf`** (Run #308 PE cờ gấp + ngưỡng CCM; chuỗi 4 deploy session: #305 Văn phòng số foundation → #306 re-skin 10 page → #307 Office golive (BE-only) `Wt54PHYl`/`B99fMU6X` → #308 **`BgNCjwsG`**/**`CBvh0vtf`**). **Prev S68** — admin **`CNUv1jxY`** · user **`CpOskeS1`** (S68 — Run #304 `37752eb` fix tên đen→trắng; chuỗi #303 `6983609` `D532XZKG`/`CuFaBoWt` → #304 **`CNUv1jxY`**/**`CpOskeS1`**, cicd PASS each). **Prev S67** — admin `CcrZqfht`/user `DniDFUB_` (S67 — 6 deploy Run #297→#302; admin rotate chuỗi #298`xkSz9BfE`→#300`PxiZQkaw`→#301`I1fpLeYw`→#302**`CcrZqfht`** · user #297`BumgrwCJ`→#300`B36hGoKd`→#301`DrQYkzh0`→#302**`DniDFUB_`**; #299 tests BE-only cả 2 frozen, cicd PASS each). **Prev S65** — admin `BDwV5d0X`/user `DbVv6rsf` (Run #293-295). Prev S62 admin `0xKYGhhf`/user `C81ZdG9G` (Run #286). **Prev S59:** admin `B1DtNT9C` · user `D6uF3Mln` (Run **#282** `792c030` FINAL — bỏ nút Thêm hạng mục; ships kèm `80b64dd` gỡ Điều khoản TT, #281 cancelled-benign ancestor-verified). Chuỗi S59 cùng ngày: #280 `69997da` (`BKy_8OO9`/`XcZ6PRyA`, ships kèm `f21c55d` table-fixed #279-cancelled) · #278 `9c330d2` self-approve+quick-add-NCC (`BSh2fG2X`/`D22KfpPc`, authz probe 4/4) · #277 `faed59f` SearchableSelect (`ex7Tc92G`/`DzUeSk96`) · #276 `c869d26` rename 71 PMH (`BBA0KSWu`/`DzdTI18G`) · #275 `bbd1554` dọn demo WorkItems (FROZEN BE-only) · #274 `0eafcd3` tree 4 tầng (`DuU7OTym`/`DWyeTzf3`) · #273 `56882ac` wipe + tree v1 (`R9uGRxvw`/`DikfX1RD`). Prev S58: Run #386 `3ebaf84` admin `DMm9rtNA`/user `BUkOMn_Y` (chi tiết session log S58). @@ -459,7 +459,7 @@ monthly re-tier mega-line + ef-core SKILL Mig→59 + 3 vocab-fork (2026-07-01 du ## ✅ Recently Done (S141–S143 — 2026-07-20 → 07-22) -**S141–S143 — Wave adap đợt-9/10 ĐÓNG TRỌN (7 thư) + closeout OUTWARD — governance-only: 0 prod-code, 0 mig, test 528 giữ, bundle FROZEN `BVCukFP5`/`DoxyEOxh`. Roster 14 → 17.** **S141 vòng-1** `wf_3e1ade40-704` **CHẾT giữa chừng** → reconcile ground-truth-từ-ĐĨA, đóng orphan partial-honest 5/13. **S142 vòng-2 CẮT-GỌT** `wf_1e936b16-30c` (đúng `tiep.md §4` relaunch-đã-cắt-gọt, KHÔNG chạy lại từ đầu): 2/2 lane, 0 error/0 garble, 424.755 tok; AC1–AC13 lead verify độc-lập. Land: **bộ-ba `harness-{eval,refine,audit}`** (3 persona + 3 diary + `§2.1.9`/`§L.b(k)` consent-gated TUẦN-TỰ) · **contract v2 dangling-head** khuôn ①a (3-điều-kiện `squash-benign`, giữ FAIL-LOUD cho counter-lùi ∧ object-missing) + detector H24-5 INFORM-sink · **stamp-decode** khoan-dung 3 dạng + port `scripts/stamp_verify.py` · **annex phép-8** + `_tick_invariant_note` · **sweep roster 13 site** · draft session-model prereq (a)+(b) — **0 wire** (chờ owner duyệt VC). **S143 `/tiep` closeout OUTWARD** (anh gật): adap-report **7/7** đủ 5-trường · email hub `6c94873f72e0` selftest exit 0 · STAGE-2 7 thư → `inbox/ai_infra/` 0-pending cross-check 2 chiều · squash K=8 → push `2757e41` (0 `wal:` lọt remote, 12==12) · vá drift **skill-matrix 15→17 row** (thiếu 2 vai H24 từ S121). **Contract v2 chạy runtime LẦN ĐẦU** @S143: tick 16→17, nhánh `OK-reachable`. **+vế-4 `pull-cach` cho `nhip-no-probe.ps1`** (fault-inject 7 ca 2-chiều: isolation · anti-Goodhart OUTBOUND · FLAG khi ngưỡng≤N · IM khi ngưỡng>N; ngưỡng CỐ Ý để trống = quyền anh). 🔴 **2 phát hiện khai theo G-015:** (a) **whitelist `tools:` KHÔNG chặn ghi ở runtime** — 6 vai read-only không khai `Write/Edit` nhưng roster runtime vẫn cấp, **append ở cuối** (tell = vị-trí; `implementer-backend` giữ đúng thứ-tự file) ⇒ "chặn-bằng-thiếu-tool" là **tuyên-bố ý-định**, backstop thật = git-diff commit-gate; cơ-chế **chưa kiểm** · (b) **pull-lag do canh nhầm chỗ** — "watch `broadcasts/inbox`" không bao giờ thấy thư CHƯA kéo. 🔴 **Nấc cao nhất khai được = `executed-file / verified-pending-restart` — trio CHƯA spawn lần nào.** State GIỮ NGUYÊN: **Mig 67 · 89 bảng · 528 test · gotcha 83 · menu 54 · prod 37 NCC/17 user.** +**S141–S143 — Wave adap đợt-9/10 ĐÓNG TRỌN (7 thư) + closeout OUTWARD — governance-only: 0 prod-code, 0 mig, test 528 giữ, bundle FROZEN `BVCukFP5`/`DoxyEOxh`. Roster 14 → 17.** **S141 vòng-1** `wf_3e1ade40-704` **CHẾT giữa chừng** → reconcile ground-truth-từ-ĐĨA, đóng orphan partial-honest 5/13. **S142 vòng-2 CẮT-GỌT** `wf_1e936b16-30c` (đúng `tiep.md §4` relaunch-đã-cắt-gọt, KHÔNG chạy lại từ đầu): 2/2 lane, 0 error/0 garble, 424.755 tok; AC1–AC13 lead verify độc-lập. Land: **bộ-ba `harness-{eval,refine,audit}`** (3 persona + 3 diary + `§2.1.9`/`§L.b(k)` consent-gated TUẦN-TỰ) · **contract v2 dangling-head** khuôn ①a (3-điều-kiện `squash-benign`, giữ FAIL-LOUD cho counter-lùi ∧ object-missing) + detector H24-5 INFORM-sink · **stamp-decode** khoan-dung 3 dạng + port `scripts/stamp_verify.py` · **annex phép-8** + `_tick_invariant_note` · **sweep roster 13 site** · draft session-model prereq (a)+(b) — **0 wire** (chờ owner duyệt VC). **S143 `/tiep` closeout OUTWARD** (anh gật): adap-report **7/7** đủ 5-trường · email hub `6c94873f72e0` selftest exit 0 · STAGE-2 7 thư → `inbox/ai_infra/` 0-pending cross-check 2 chiều · squash K=8 → push `2757e41` (0 `wal:` lọt remote, 12==12) · vá drift **skill-matrix 15→17 row** (thiếu 2 vai H24 từ S121). **Contract v2 chạy runtime LẦN ĐẦU** @S143: tick 16→17, nhánh `OK-reachable`. **+vế-4 `pull-cach` cho `nhip-no-probe.ps1`** (fault-inject 7 ca 2-chiều: isolation · anti-Goodhart OUTBOUND · FLAG khi ngưỡng≤N · IM khi ngưỡng>N; ngưỡng CỐ Ý để trống = quyền anh). 🔴 **2 phát hiện khai theo G-015:** (a) **whitelist `tools:` KHÔNG chặn ghi ở runtime** — 6 vai read-only không khai `Write/Edit` nhưng roster runtime vẫn cấp, **append ở cuối** (tell = vị-trí; `implementer-backend` giữ đúng thứ-tự file) ⇒ "chặn-bằng-thiếu-tool" là **tuyên-bố ý-định**, backstop thật = git-diff commit-gate; cơ-chế **chưa kiểm** · (b) **pull-lag do canh nhầm chỗ** — "watch `broadcasts/inbox`" không bao giờ thấy thư CHƯA kéo. 🔴 **Nấc cao nhất khai được = `executed-file / verified-pending-restart` — trio CHƯA spawn lần nào.** **Vòng audit S143 (anh gật "làm hết"): 3 lane — `reviewer` FAIL 1C/4M/4m/1nit + 19 số tự re-đo · `lead-view` 3 FLAG · `lead-omission` 3 FLAG/3 INFORM; lead re-đo ĐỘC-LẬP từng finding trước khi vá, 9/9 vá xong.** 🔴 **CRITICAL = E-012/AS-16 `bằng-chứng-tự-huỷ-sau-squash`** (7 report + email neo sha `wal:` chưa-push → squash phá đúng sha đó → re-anchor `2757e41` + **errata `e43484cef10f`** gửi hub, CẤM sửa bản đã stamp). MAJOR khác: "TRIPLE 17/17/17" **chọn enum DỄ** (`README:225` tự xưng "ĐỦ roster" còn 14 + "4 monitor"; `:27` "Roster THẬT" còn 14 — **lọt vì AC4 grep theo SỐ mà 2 site liệt-kê TÊN**) · `TOTAL 46 "== baseline"` sai (baseline ghi = **45**; số đi 45→46→47) · 4 site còn khai "NO Write/Edit" như cơ-chế chặn. 🔴 **Tool-grant nay có NHÂN-CHỨNG first-person:** `reviewer` (frontmatter **0** Write/Edit) **đã Write+Edit thật** — đếm lại **9 vai** read-only cùng hình dạng (bản đầu khai 6 = under-count). **3/3 sub garble #53, cả 3 resume, 0 mất dữ-liệu nhờ ghi-đĩa-trong-lúc-làm** (sổ đếm ×20 qua S118 → **×23 qua S143**). +vế-4 `pull-cach` cho `nhip-no-probe` (fault-inject **7 ca 2 chiều**, ngưỡng để trống = quyền anh) · `flag_classes` **10→11** (+`gap-incident-unrecorded`, anh duyệt — vai lead-omission **từ chối tự chế class** và escalate đúng luật CLOSED-enum). State GIỮ NGUYÊN: **Mig 67 · 89 bảng · 528 test · gotcha 83 · menu 54 · prod 37 NCC/17 user.** **Lead Opus 4.8.** *(H1 @S143 bắt: đây là row session DUY NHẤT từng thiếu dòng `Lead ` — nay bổ sung. 🔴 Còn CHỜ ANH: `settings.json` pin nay = `claude-opus-4-8[1m]` từ 2026-07-20 trong khi ô canonical §Sub-agents còn ghi "Fable 5", và `session-start.md:43` outage-recipe bảo đổi sang **đúng cái đang pin** ⇒ recipe hồi-phục thành no-op. Nhãn flip = quyền anh, em không tự đoán.)* --- diff --git a/docs/changelog/sessions/2026-07-22-1455-S143-tiep-closeout-audit-errata.md b/docs/changelog/sessions/2026-07-22-1455-S143-tiep-closeout-audit-errata.md new file mode 100644 index 0000000..628dc80 --- /dev/null +++ b/docs/changelog/sessions/2026-07-22-1455-S143-tiep-closeout-audit-errata.md @@ -0,0 +1,76 @@ +# S143 — 2026-07-22 · `/tiep` nối S142 → closeout OUTWARD → audit 3 lane → vá 9 finding → errata hub + +**Nhãn:** S143 (conversation MỚI vào bằng `/tiep`, nhãn mới per label-convention — CẤM reuse S142) +**Lead:** Claude Opus 4.8 · **Loại:** governance-only — **0 prod-code · 0 migration · 0 file `src/`·`fe-*`·`tests/`** (verify bằng `git diff --name-only b146e2b..HEAD`) +**Test:** **528 kế-thừa** (không chạy lại; căn-cứ = 0 file test/prod bị đụng, KHÔNG khai từ trí-nhớ) · **bundle FROZEN** `BVCukFP5`/`DoxyEOxh` +**Commit (5, đã push):** `2757e41` · `3f4310f` · `36cefcc` · `39cc060` · `c4903dd` — tổng **68 file, +3042/−89** + +## wf run-id (Sàn-5 marker — sổ cái hậu-kiểm) + +- `wf: audit-3-lane run=2026-07-22-S143-closeout-audit` — 3 lane (`reviewer` + `lead-view-auditor` + `lead-omission-auditor`), 🔴 **3/3 garble #53, cả 3 resume**, đóng dạng-1 `audit-synthesis.md`. +- *(Kế thừa từ S142, không sinh phiên này: `2026-07-22-S142-adap-9-10-vong-2` · `2026-07-20-S141-adap-dot-9-10-bo-ba-sub`.)* + +## memory-triple artifact (§L.b(c) — run-record 3-stage + do-record) + +``` +memory-triple: do=scripts/measure-agent-memory.ps1 · exit 0 +memory-triple: de-xuat=scripts/memory-archive-gate.ps1 DRY · exit 0 · A7 GATE PASS 251/251 pointer resolved, 0 failed +memory-triple: kiem=reviewer · verdict FAIL 1C/4M/4m/1nit (9 finding, lead re-đo độc-lập 9/9, vá hết) +memory-triple: do-record=governance-detectors TOTAL=47 (đỉnh 48 khi WAL chạm 41 dòng → trim → 47) +memory-triple: do-record=nhip-no 4-vế → kiem light 0/6 deep 0/15 ok | tran-bo-nho 1 over-cap | run-chua-gom 0 | pull-cach 2 ngay +``` + +*(lệnh `/session-end` KHÔNG kèm `eval` ⇒ skip `mfe-eval.ps1` + `memory-selfimprove-audit.ps1` đúng luật; `kiem` lấy từ reviewer-gate đã chạy trong phiên.)* +*(sleep-check: `last_sleep_at` = 2026-07-18, **4 ngày** < ngưỡng 7d ⇒ KHÔNG INFORM, không đề-xuất `/sleep-recovery-memory-l2`.)* + +## trio-memory §L.b(k) — vết SKIP + +``` +trio: skipped S143 (khong-the-chay: 3 persona harness-{eval,refine,audit} chua tung spawn; + agent .md khong hot-reload => BUOC restart CLI + owner consent. Nac giu executed-file/verified-pending-restart) +``` + +🔴 **Gap phát hiện khi ghi vết này:** M4 quy-định ghi vết skip vào `.claude/WAL.md`, nhưng **§6.4 reset WAL về template rỗng ở cuối phiên** ⇒ vết chết ngay trong phiên sinh ra nó, không bao giờ tạo được **chuỗi** skip nhìn-thấy-được qua nhiều phiên. **Cùng class với bug-2 của Sàn-5** (soi WAL để tìm dấu vốn được thiết-kế để xoá). ⇒ vết được ghi **CẢ ở đây** (session-log = append-only, sổ cái). Đề-xuất sửa M4: vết skip → session-log, WAL chỉ giữ bản tạm trong phiên. + +## Diễn biến + +**1. `/tiep` — Sàn-3 + nối mạch.** ① orphan 0 · ② non-`wal:` 0 · ③ `closing:` không · ④ wal-commit đụng `runs/` **CÓ** ⇒ có mạch thật. Ground-truth **KHỚP** chain S142; 1 lệch literal vô hại (verify đếm 8 vì `README.md` lọt glob, thư thật 7). TICK **16→17**, 3-điều-kiện `OK-reachable`. + +**2. Owner gật lượt-1 "OK làm đi" = 6 mục** → adap-report 7/7 (5 trường LOCK) · email hub `6c94873f72e0` selftest exit 0 · STAGE-2 7 thư → `inbox/ai_infra/` (0 pending, cross-check 2 chiều) · squash K=8 → push (0 `wal:` lọt remote, 12==12) · vá skill-matrix 15→17 row · *(mục trio first-run KHÔNG làm được — cần restart CLI)*. + +**3. Owner gật lượt-2 "OK làm hết đi" = 4 mục** → reviewer-gate độc-lập · re-stamp STATUS/HANDOFF · deep-audit H24 (force-fire **sớm 1 nhịp** 17/18 theo lệnh owner, KHÔNG tới-hạn tự-nhiên) · **+vế-4 `pull-cach`** cho `nhip-no-probe.ps1` (fault-inject **7 ca 2 chiều**; ngưỡng CỐ Ý để trống = quyền owner). + +**4. Audit trả về 9 finding — lead re-đo ĐỘC-LẬP từng cái trước khi vá.** + +| Vai | Verdict | +|---|---| +| `reviewer` | **FAIL 1C/4M/4m/1nit** + 19 số tự re-đo (15/17 khớp) | +| `lead-view-auditor` | **3 FLAG** — cả 3 `view-residual-asym` | +| `lead-omission-auditor` | **3 FLAG / 3 INFORM** + honest-zero | + +**5. Vá 9/9 + errata.** Chi tiết nấc → `docs/governance/adap-reports/` (7 file) + errata `e43484cef10f`. + +## 🔴 Bài học chính + +**E-012 / AS-16 `bằng-chứng-tự-huỷ-sau-squash` (CRITICAL).** 7 report + email neo sha `wal:` **chưa push**; closeout `reset --soft HEAD~8` phá đúng những sha đó ⇒ `is-ancestor origin/main` = exit 1 cho cả 5 ⇒ **hub clone về không resolve nổi**, dù nội dung nguyên vẹn trong `2757e41`. +**Root (5-why):** tiêu-chí verify được chọn theo **cái mình đo được** (máy lead còn reflog ⇒ `cat-file` xanh), không theo **cái người nhận sẽ đo**. Cùng class E-010. +**Đối chứng chứng minh là CLASS:** wave trước cite `7760cdf`/`da349fc` (commit đích) → sống hết. Khác đúng một điểm: **thời-điểm viết report so với thời-điểm push**. +⇒ 3 luật: cite outward = **commit sống sau squash** · `git status` là bước **ĐẦU** outward-gate · tách **claim-DELTA** (bền) khỏi **claim-TUYỆT-ĐỐI** (phải neo commit+thời-điểm). + +**"0 hit" ≠ sạch.** AC4 của wave grep theo **CON SỐ** (`roster 14|14/14|…`) → 0 hit → tuyên bố sweep sạch. Nhưng 2 site tự xưng là bản gốc về roster (`README:27` "Roster THẬT" · `:225` "VALID_ROLES … ĐỦ roster") **liệt kê TÊN, không chứa số nào** ⇒ lọt nguyên wave, giữ 14 vai. ⇒ acceptance phải **ĐẾM PHẦN TỬ rồi so canonical**, đừng so hình-dạng chuỗi. + +**Tool-grant: whitelist ≠ enforcement — nay có nhân-chứng first-person.** 9 vai read-only (không phải 6 như bản đầu khai) không khai `Write/Edit` trong frontmatter, runtime vẫn cấp (append cuối tool-list). Nhân chứng: **`reviewer` đã Write+Edit thật**. Backstop THẬT = git-diff commit-gate + single-writer. + +**#53 lần thứ 3 liên tiếp: prompt KHÔNG chặn được, ghi-đĩa mới cứu.** 3/3 sub garble dù prompt đã cấm bẫy "trả verdict trước, làm sau" ngay từ đầu cho cả 3. Vớt trọn từ `sub-*.md`. Sổ đếm ×20/S118 → **×23/S143**. + +**Enum mở đúng luật.** `lead-omission-auditor` gặp sự-cố không xếp được vào enum ĐÓNG, **từ chối tự chế class**, escalate → owner duyệt `gap-incident-unrecorded` (10→11). Escape-hatch của CLOSED-enum vận hành đúng thiết kế. + +**Blanket-replace làm sai NGHĨA (lead tự bắt).** `sed` toàn-file đổi sha an toàn khi mọi lần xuất hiện **cùng vai trò**; một chỗ sha mang vai "commit pause đã dời HEAD" bị đổi thành commit closeout ⇒ sai nghĩa, không lỗi cú pháp, chỉ đọc lại mới thấy. + +**Citation-trap tái hiện.** Câu vá *(thay câu "Unpushed lúc ghi"…)* chứa chính literal vừa gỡ ⇒ detector grep sẽ bắt đúng bản vá. Chữa bằng **bỏ literal**, không thêm ngoại lệ. + +## Trạng thái cuối + +- **Còn chặn:** trio first-run spawn-probe 3/3 — **cần owner RESTART CLI** + consent. Nấc giữ `executed-file / verified-pending-restart`. +- **Nhịp:** light 3/6 · **deep 14/15** (phiên sau OVERDUE thật) · tràn-bộ-nhớ 1 over-cap (`investigator-codebase` 26.624B) · run-chưa-gom 0 · pull-cách 2 ngày. +- **Carry:** 14 mở (1 đóng: `[carry:dangling-head]`), `NEXT anh` **12 mục** (3 mục mới kéo lên từ chỗ chìm 2 nhãn phiên). diff --git a/docs/governance/error-ledger.md b/docs/governance/error-ledger.md index 9af0cd7..89e7896 100644 --- a/docs/governance/error-ledger.md +++ b/docs/governance/error-ledger.md @@ -34,6 +34,7 @@ Detect by **action-signature** (NOT "AI tự phán có vi phạm không"). Scan | AS-13 | **custom Workflow script (≠ hmw.js DEFAULT-mode)** chạy parallel **same-role** agents giữ Write → agents tự-ghi shared `agent-memory//MEMORY.md` → "file modified since read" race + verbose-append over-cap | E-009 — hmw.js DEFAULT có return-delta-guard, custom script KHÔNG kế-thừa | RCA + curate L1→L2 + custom workflow PHẢI copy return-delta-guard HOẶC file-disjoint 1-sub/file | | AS-14 | phép ĐO text (length/char-count/so-sánh) qua `Get-Content`/console-pipe **KHÔNG ép encoding** trên file **no-BOM** (PS5.1 default = ANSI → ký-tự Việt đếm ×2-3) | đo-phải-chạm-đĩa-ĐÚNG-CÁCH (E-010; anh em với bẫy `grep -c` — `feedback_resume_premise_reverify`) | RCA + re-đo `[System.Text.UTF8Encoding]` tường-minh; số đã báo owner → đính-chính NGAY | | AS-15 | **điểm-đóng-thật** (chốt-đợt commit+push HOẶC session-end) **KHÔNG kèm** delta diary monitor (H1/H2) **và KHÔNG** dòng counter §L.b(j) | session-end §L.b "(a)→(j) đủ HẾT, KHÔNG skip" (E-011 — nghi-thức chạy tắt; máy mù lớp "nghi-thức có chạy không") | RCA + spawn DỒN H1+H2 re-report phủ khoảng bị bỏ + harvest hồi-tố + đọc counter bù | +| **AS-16** | artifact **OUTWARD** (adap-report · email hub · broadcast) **cite sha CHƯA-push**, HOẶC được **stamp trước khi `git status --porcelain` sạch** | E-012 — closeout-squash phá đúng sha vừa cite ⇒ con-trỏ chết với người ngoài; và file sửa sau khi stamp làm câu trong bản đã-niêm thành sai. **Cite outward = commit SẼ SỐNG sau squash.** `git status` là bước **ĐẦU** của outward-gate, không phải bước cuối | RCA + re-anchor sang commit đã-push + **errata rời** (CẤM sửa file đã stamp — vỡ hash) | ## 🛡️ Active-Guards index (2-strike promote: episodic → procedural) @@ -83,6 +84,15 @@ Detect by **action-signature** (NOT "AI tự phán có vi phạm không"). Scan > Format: `E-NNN | date | rule | what | 5-why root | fix (prod-bug = 2-fix: code + guard) | prevention | tags[TYPE/ACTOR/COMPONENT]` +### E-012 — AS-16 bằng-chứng-tự-huỷ-sau-squash: 7 adap-report + 1 email hub neo vào sha `wal:` chưa-push, closeout-squash phá đúng sha đó (S143, reviewer-gate độc-lập bắt SAU khi thư đã gửi) +- **rule (AS-16 NEW):** artifact OUTWARD phải cite **commit SẼ SỐNG sau squash**, và phải qua `git status --porcelain` **TRƯỚC** khi stamp. Vi-phạm nền: `/adap-report` §3 *"evidence: commit-sha · file path · byte/dòng (đo THẬT)"* — đo thật nhưng **neo vào con-trỏ sắp chết**; và `/send-email` 6c selftest-stamp chỉ kiểm **hash khớp thân-thư**, KHÔNG kiểm **thân-thư có còn đúng sự-thật** lúc phát. +- **what:** (1) 7 adap-report cite `1a0fa59`/`a458102`/`96ab2679`/`c3708e9`/`b1d92b9` (đều `wal:`-commit local). Closeout §5.0 `reset --soft HEAD~8` gộp chúng vào `2757e41` ⇒ cả 5 thành **dangling**: `cat-file -t` = `commit` (sống nhờ reflog LOCAL) nhưng `merge-base --is-ancestor origin/main` = **exit 1** ⇒ hub clone repo về `git show 1a0fa59` = **object missing**. Nội-dung nguyên vẹn trong `2757e41` ⇒ **chết con-trỏ, không chết việc**. (2) Cùng gốc: report + email khai `is-ancestor 96ab2679 HEAD = exit 0 → OK-reachable` làm bằng-chứng "contract v2 chạy runtime" — squash **cùng phiên** lật nó thành `exit 1`/`SQUASH-BENIGN` ⇒ **phép đo tự huỷ trong chính phiên phát-biểu nó**. (3) Biến-thể thứ ba: email `:47` khai *"vế pull-age **chưa làm**, chờ owner"* — owner gật ngay sau đó, lead làm, `scripts/nhip-no-probe.ps1` sửa **sau** khi thư đã stamp ⇒ bản đã-niêm khai sai hiện-trạng, và **không sửa được** (sửa = vỡ hash). +- **5-why root:** (1) vì sao sha chết? — squash rewrite history. (2) vì sao squash sau khi cite? — report viết **trước** push, đúng thứ-tự tự-nhiên của việc ("làm xong thì ghi lại"). (3) vì sao thứ-tự đó sai? — vì với artifact OUTWARD, *người đọc ở repo KHÁC*, nên tham-chiếu chỉ có nghĩa nếu nó tồn tại **trên remote**, không phải trên đĩa mình. (4) vì sao không ai bắt lúc viết? — mọi phép verify của lead chạy **trên máy lead**, nơi reflog còn giữ sha ⇒ `cat-file -t` xanh ⇒ **kiểm bằng góc nhìn người-trong-nhà cho một artifact gửi người-ngoài**. (5) 🔴 **root:** *tiêu-chí verify được chọn theo cái mình đo được, không theo cái người nhận sẽ đo.* Cùng class với E-010 (đo bằng công-cụ tiện tay) và với "TRIPLE chọn enum DỄ" cũng bắt trong phiên này. +- **fix (KHÔNG prod-bug — artifact-only, vẫn 2 lớp):** *(a) lớp artifact:* re-anchor toàn bộ 7 report sang `2757e41` + thêm caveat ghi rõ sha cũ chỉ còn giá-trị local; phát **errata rời** `e43484cef10f` cho hub (CẤM sửa bản đã stamp). *(b) lớp luật:* AS-16 + 3 luật đọc-được ghi vào report/errata — **cite outward = commit sống sau squash** · **`git status` là bước ĐẦU của outward-gate** · **tách claim-DELTA (bền) khỏi claim-TUYỆT-ĐỐI (phải neo commit+thời-điểm)**. +- **prevention/guard:** *episodic → chờ strike-2.* Guard đề-xuất khi tái: chèn vào `/send-email` bước 6c một phép **`git status --porcelain` = rỗng** + **`merge-base --is-ancestor origin/main`** trước khi stamp; fail ⇒ ABORT. 🔴 **Chưa wire** — vì guard này cần định-nghĩa "sha cite" (parse thân-thư) và có thể dương-giả với sha của repo KHÁC (hub sha như `58e28bae` KHÔNG nằm trong repo SE). Ghi làm nợ, không tự dựng cổng nửa vời. +- **Đối chứng (chứng đây là class, không phải xui):** wave TRƯỚC (S138–S139) cite `7760cdf`/`da349fc` = commit **đích** sau squash → **sống hết tới nay**. Cùng người, cùng nghi-thức, khác đúng một điểm: thời-điểm viết report so với thời-điểm push. +- **tags:** `[GOVERNANCE/lead/outward-artifact · evidence-self-destruct-squash · cite-post-squash-commit · git-status-first · verify-tu-goc-nhin-nguoi-nhan]` + ### E-011 — AS-15 nghi-thức chạy tắt: 3 closeout liên-tiếp S128-S130 KHÔNG spawn monitor H1/H2 + bỏ §L.b(j) — máy im suốt, lộ nhờ 1 câu hỏi của anh (S131 phát-hiện, S132 xử) - **rule (AS-15 NEW):** session-end §L.b (session-end.md:52) *"auto-maintain (a)→(j) đủ HẾT, KHÔNG skip — thiếu = ledger thối"*; (d)(f) = H2 harvest-curator · (g) = H1 tooling-auditor · (j) = đọc counter/OVERDUE. **Điểm-đóng-thật** (chốt-đợt + push) đi qua mà nghi-thức không chạy = closeout chạy tắt, dù phiên kết thúc bằng `/pause` chứ không phải `/session-end`. - **what:** 3 closeout liên-tiếp — S128 `289ba96` 20:57 · S129 `295c70c` 23:16 · S130 `71757fc` 00:26 — commit + push xong mà KHÔNG spawn H1/H2 (mtime diary 2 monitor đứng 2026-07-16 15:18; commit cuối chạm diary = `e9124fc` 15:19; S130 Recently-Done còn tự ghi *"0 sub spawn"*) + bỏ luôn §L.b(j) — cả lớp ĐỌC counter cuối phiên không chạy. Không detector nào đo lớp "nghi-thức có chạy không" → im lặng trông y hệt sạch; chỉ lộ khi anh hỏi *"sao không thấy lead-view/lead-omission/harvest chạy?"*. Họ-hàng cùng đợt (GAP-1, email `e46863c8`): mạch pause→`/tiep` không tick counter H24 → S128·S129·S130 không tick → counter dưới-đếm ~37% trên cửa-sổ 8 nhãn (5 tick/3 không). diff --git a/docs/governance/session-model-se-draft.md b/docs/governance/session-model-se-draft.md index c537362..3414f4b 100644 --- a/docs/governance/session-model-se-draft.md +++ b/docs/governance/session-model-se-draft.md @@ -31,7 +31,7 @@ Luật hiện hành: *"mỗi conversation MỚI = một nhãn-phiên `S` M | Phase 1 READ full read-set | mỗi `/session-start` | **per-L** (1 lần đầu phiên-logic) | | Monitor re-report H1/H2 | đầu phiên (skip được) | **per-L** mở + đóng | | H24 tick counter | mỗi cửa (mỗi S) | **GIỮ per-S** (content-addressed — đo nhịp thật) | -| NHIP-NO probe 3-vế | 4 điểm lệnh | GIỮ per-điểm-dừng (per-S) | +| NHIP-NO probe 4-vế | 4 điểm lệnh | GIỮ per-điểm-dừng (per-S) | | Sàn-3 WAL-check | mỗi `/tiep` + `/session-start` | GIỮ per-cửa (an toàn nối mạch) | | governance-detectors + H17 + M.B | mỗi `/session-start` (skip light) | **per-L** mở (giữa phiên chỉ khi nghi drift) | | Master-checklist 2-tầng | 4 cửa (in @mỗi cửa) | GIỮ per-cửa (rẻ, chống rơi việc) |