§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 <noreply@anthropic.com>
Audit 3 lane (reviewer FAIL 1C/4M/4m/1nit + 2 vai H24 = 6 FLAG), lead tự
re-đo từng finding trước khi vá.
CRITICAL/MAJOR:
- Re-anchor 5 adap-report: sha wal: tiền-closeout (1a0fa59/a458102/96ab2679)
dangling sau squash -> hub clone không resolve nổi. Đổi sang 2757e41.
LUẬT: cite outward = commit SẼ SỐNG sau squash, không bao giờ wal:.
- Đính chính claim OK-reachable: phép đo tự huỷ trong cùng phiên (squash lật
sang squash-benign). Sự thật mạnh hơn: cả 2 nhánh lành đã chạy runtime.
- TRIPLE 17/17/17 chọn enum dễ: README:225 (tự xưng "ĐỦ roster") còn 14 +
"4 monitor"; README:27 ("Roster THẬT") còn 14. Cả 2 vá -> 17/7.
- TOTAL 46 "== baseline" sai: baseline ghi trong repo là 45. Tách claim-DELTA
(bền) khỏi claim-TUYỆT-ĐỐI (phải neo commit+thời-điểm).
FLAG view-residual-asym: STATUS:450 + README:190 còn khai "NO Write/Edit" như
cơ-chế chặn -> sửa thành tuyên-bố ý-định (runtime vẫn cấp, 9/9 vai; nhân-chứng
reviewer đã Write+Edit thật).
FLAG gap-carry-dropped: HANDOFF carry 13 -> 14, trả [carry:session-model-adopt].
FLAG gap-decision-sunk: 3 mục "Chờ-anh" chìm 2 nhãn phiên -> lên NEXT anh (10)(11)(12).
Enum 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.
Bài học acceptance: AC4 grep theo SỐ nên 2 site liệt-kê-TÊN lọt lưới.
Lần sau đếm PHẦN TỬ rồi so canonical, đừng so hình-dạng chuỗi.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
FILE 4 fable-clone.md -- GAP#6: lane ensemble PHAI mang tier:'opus'.
Thieu => inherit lead => lead=Fable thanh N x Fable = dot quota gap N lan VA pha dung
ly-do lenh ton tai (ensemble RE de THAY 1 luot Fable dat). lead=Opus thi tier:'opus'
≡ inherit => loi VO HINH, chi lo khi Fable UP (dung loi reviewer bat @S108).
+ khai CHUA VERIFY precedence spawn-param vs frontmatter (H23 §2(2)) => DEFER phien lead=Fable.
+ grep tier:'opus' = DIEU-KIEN CAN, KHONG DU (do CHU trong file, Goodhart-able 100%).
FILE 5 agents/README.md -- bo SO khoi 8 cho (khong doi so: doi thi roster ke lai stale).
File nay chinh la VI-DU minh-hoa cho class view-stale-role-desc trong lead-view-auditor.md:47.
+ canh-bao bay glob: `ls .claude/agents/*.md` bat LUON README.md => thua 1 (R2-C1).
+ khai: doi roster = doi 2 BE-MAT DOC-LAP (agents/*.md -> registry | VALID_ROLES -> agentType).
FILE 6 fable-real-runbook.md -- 14 hit (lead bao 8 = SAI, xem duoi). + hmw.js:22-30 -> :22-36 (stale line-ref).
FILE 7 sleep-recovery-memory-l2.md -- `all` tu hardcode 9 -> DAN-XUAT TU DIA (do ra 10).
Danh-sach cung 9 da ROT office-document (them S107) suot tu do. Tro-treu: chinh doc do
da ghi "luon quet dia that" cho con-so 4/9 ngay duoi, nhung hardcode roster phia tren.
FILE 8 workflows/README.md -- TRI-ACCEPT vao ORPHAN-AUTHORITY (:19-20) + B1 pointer.
FILE 9 ACTIVE-MARKS.md -- chu-thich cho mark RC-...20-42-01 (anh CHOT: giu ban ky nguyen ven,
them chu-thich; P4/P8). "roster 12" trong than mark = anh chup luc ky, KHONG phai gioi-han.
+ STATUS.md:25 -- STALE THAT trong chinh file CANONICAL: row ghi | Sub-agents | 14 | nhung
narrative CUNG DONG ghi "ca 12 sub model: inherit" (W2 sua row, bo sot narrative).
Bay mega-line TAI HIEN: grep -c = 1 vs grep -o|wc -l = 2.
+ spec v3-PATCH -- SUA ACCEPTANCE FIX#6 (ban goc BAT-KHA-THI, tien-le WAL:29):
"0 hit song" do CA phan CO Y khop => implementation DUNG van truot. Lan thu BA cung ho
R2-C1 (ls=14) + R3-M3 (TOTAL>=46). Acceptance moi = disposition TUNG DONG theo 6 nhom.
Sweep that sau W3: 14 hit song, 0 cai la stale-can-va (vi-du co chu-dich / trich lich-su /
ban da ky / so tam / W5 chua toi luot / canonical history-delta).
LEAD TU BAT 2 LOI DEM (deu o truc dem-ve-viec-minh, -> adap-report):
(a) bao "fable-real-runbook 8 hit" -- that la 14; lay output `head -40` DA BI CAT lam so tong.
(b) bao "do lai tai-hien CHINH XAC du-bao FIX#4" roi lay trung-khop lam cho dua, trong khi
CA FIX#4 LAN LEAD deu dang do TEN FILE. Con-so dung, huong do sai.
=> khop feedback_meta_count_selfcoverage_blindspot: lead DO tot, lead DEM VE MINH thi sai.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Wave adap-6-broadcast W2 = 1 OWNER / 1 COMMIT co chu dich. Cac manh phu-thuoc nhau, tach ra la vo
duong dang chay (R2-C3): gate o W2 ma co o W3 => moi /fable-clone >=3 lane THROW ngay truoc khi W3 kip va.
(1) hmw.js - 1 EDIT, 4 viec
- SAN-1 GATE co-khi-hoa: taskList>=3 && !args.run => THROW STOP-HARD.
Truoc S121 san nay chi la CHU trong doc ("script no-fs KHONG tu ep") => phu thuoc lead NHO.
Do that @S119: git grep args.run .claude/commands/ = 0 hit => 4/4 wrapper KHONG co => san danh-nghia.
Vi sao >=3: chet giua run dai ma khong co runs/<run-id>/ => per-turn returns mat theo phien,
CHI file tren dia song sot => /tiep §4 khong co vat-lieu cat-got => chay lai TU DAU (S118
raw-Agent 7-spawn => 0 run-folder). THROW chu khong fail-soft (fail-soft = dut am-tham).
- VALID_ROLES 12->14 (+lead-view-auditor +lead-omission-auditor).
- PA-2a: TIER2_EXPECTED_FULL_ID = 'claude-opus-4-8'. La HANG-SO KHAI-BAO, KHONG phai co-che neo
(neo-tai-spawn bat-kha-thi: param chi nhan alias; SE 0 full-id vi H8 all-inherit). Doc boi
scripts/spawn-model-audit.ps1 (W1b) - thieu hang-so => script FAIL-LOUD.
- H23 note CHUA-VERIFY giu nguyen nac: precedence spawn-param vs frontmatter khi CA HAI hien-dien
= CHUA TUNG TEST; phan-biet duoc CHI o phien lead=Fable => DEFER, khong ban qua nac. + fix#8a chua thu.
(2) 4 co wrapper CUNG COMMIT voi gate (San-1 (c))
fable-clone.md / fable-real.md / ultra-on.md => args.run: 0 -> 3 hit.
Wrapper thu 4 = raw-invoke em-main: KHONG co file de gan co => duoc GATE chan truc tiep
(chinh cu fault-inject duoi day di duong do). Khai that: gate chi phu hmw.js; nguong "hoac uoc
>5 phut" KHONG co-khi-hoa duoc (script khong do truoc thoi-luong) => van la ky-luat lead;
raw Workflow/Agent tool = ke CON-LAI khong gate duoc.
+ go so roster stale (view-stale-role-desc): "roster 12"/"12 sub"/"8-agent"/"9-agent" -> tro
canonical docs/STATUS.md §Sub-agents (B1). session-start.md con "roster 12" = W3 so-huu, KHONG dung.
(3) 2 vai MOI - H24 §2(1), cookie-cutter frontmatter monitor san
lead-view-auditor = view LECH source (5 class view-*)
lead-omission-auditor = cai BI THIEU (5 class gap-*)
model:inherit / memory:project / maxTurns:18 / 8 tool read-only / NO Write-Edit / propose-only.
KHONG gop vao tooling-auditor(H1)/harvest-curator(H2): H24 "gop la mat tieu-diem; can cap mat
CHI danh cho lead". Tu-vung view/omission chon tranh va-cham (detectors:15 da so-huu
derived-staleness; GAP qua-tai). 2 file 0-CR + block-scalar (giu ': ' N/A).
(4) memory-budget.json - single-source H24 §2(3)
h24_cadence { light_every:6, deep_every:15, jump_on_class_repeat:3 } (anh chot Q2).
lead_self_audit.flag_classes = enum DONG 10 class (5 view-* + 5 gap-*) - vai CAM tu che class
(v2 M4: enum song trong dau 1 lane => worker khong bao gio thay => tu che => loang thong-ke).
Honest-caveat giu de bao hub: hub dan "dung chep 3 con-so nay"; SE chon trung 6/15/3 = anh chot
CO CHU-DICH lam khoi-diem, KHONG phai chep vo-thuc; re-tune sau chu-ky-2.
(5) .claude/governance/.session-counter.json (NEW) - seed UNTICKED trung thuc
Content-based (idempotent-key = HEAD sha), KHONG blind-increment: hook wal-flush auto-commit
agent-memory/ MOI TURN => dem mu se vo nghia. Dat o .claude/governance/ CO CHU-DICH = ngoai
3 path hook (.claude/WAL.md, agent-memory/, workflows/runs/) => khong bi quet vao commit wal:.
counter=0 + last_ticked_*=null = SU THAT tai S121 (nghi-thuc tick land o W3); seed tick gia
se lam phep do cadence dau tien noi doi - dung thu H24 sinh ra de bat.
(6) STATUS.md 2 row - CUNG LANDING roster (R3-M2: lech => detector BAO tren chinh thay doi cua H24)
| Sub-agents | 12 -> 14 |
| Policies | 216 | ROW MOI - GAP-3 can no de resolve token 'policy'.
216 GROUND TU MA NGUON, khong chep tu spec: |MenuKeys.All| x |MenuKeys.Actions| = 54 x 4
(Program.cs:82-89 AddPolicy loop; MenuKeys.cs:167 Actions=[Read,Create,Update,Delete]).
=> Policies la DERIVED = Menu keys x 4 => 2 row BUOC doi cung nhau (ghi thang vao row).
VERIFY LEAD TU DO (khong tin return):
14/14/14 (roster / VALID_ROLES / agents-*.md tru README) = acceptance ② EOL.
Glob tho = 15 => xac nhan R2-C1: acceptance CU "ls agents/*.md = 14" se FAIL tren impl DUNG.
Hop-dong cheo W1<->W2 khep CA HAI chieu, do bang chinh script W1:
detector H24-2: "h24_cadence missing" -> "M = h24_cadence.light_every = 6 (read from config)"
spawn-model-audit: "expected constant missing" -> "[OK] expected = claude-opus-4-8 = owner-ratified"
GAP-3 policy: MISSING -> 216, va BAT NGAY permission-matrix/SKILL.md:3 "writes 240 policy but
canonical=216" (+:81 "writes 48") => TOTAL 49->50 (-1 fail-loud cadence, +2 policy) = so cong khop.
eol-check tu nhan 2 vai moi: scoped 37->39 (dem bang glob, khong hardcode).
FAULT-INJECT SAN-1 2 CHIEU (bai hoc W0.3: chi test 1 chieu thi dieu-kien viet nham van PASS):
(b) 3 task + KHONG args.run -> THROW, agent_count=0, subagent_tokens=0, 14ms (chan TRUOC spawn)
(a) 2 task + KHONG args.run -> gate IM, workflow launch binh thuong => khong over-fire, nguong
dung la >=3. Neu viet nham `if (!wave)` thieu nguong thi /fable-real 1-lane se chet oan.
CHUA VERIFY (khai that, KHONG gia vo):
14/14 spawn-probe SONG = PHAI chay SAU RESTART (registry = anh-chup khoi-phien; S120+S121 da do
2 lan xac nhan KHONG hot-reload agent MOI). Static-check KHONG du (broadcast ④d).
=> 2 vai moi hom nay moi chi TON TAI tren dia + trong VALID_ROLES, chua chung duoc SPAWN duoc.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add mcp__rag-unified__search_memory + mcp__rag-unified__cross_project_search
vào tools list 4 agents (Investigator + Implementer + Reviewer + CICD Monitor).
Tại sao:
- Sub-agent spawn KHÔNG inherit MCP server access từ parent session
- 4 agents previously CHỈ có Read/Grep/Glob/Bash → re-read MD files manually
- Plan B pre-flight Investigator phải Read PE Mig 22-26 thủ công thay vì 1 RAG query
- Plan CA Reviewer Cat 1 wire claim verify KHÔNG retrieve historical gotcha cross-session
- Plan CA Hotfix 1 silent sidebar drop nếu Implementer có RAG → catch Pattern 16-bis trước commit
Trade-off accepted (anh chốt full 4 agents):
- Token cost spawn cao hơn (~5-10K extra per RAG query)
- Risk noise dilute focus → mitigate by skill-specific prompt focus
Pitfall #1 reinforced (S27 multi-agent setup):
- Session đang chạy KHÔNG hot-reload registry
- Anh restart Claude Code CLI để spawn S30+ pick up MCP RAG tools
- Plan B Chunk D Implementer đang chạy dùng config CŨ (no MCP) — KHÔNG affect
Verify post-restart (Anh):
- Spawn test Investigator → call mcp__rag-unified__search_memory thử
- Pass = MCP tools loaded; Fail = YAML syntax issue (fallback wildcard mcp__rag-unified__*)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Bro re-emphasize prompt setup với rule Thứ 9 mới:
"Các task bất kỳ, BẮT BUỘC phải phân việc đầy đủ cho các Sub Agent đúng
vai trò, vị trí đã được chỉ định"
Retrospective S22: em main solo 6/10 task lẽ ra delegate được (vi phạm):
- Plan D F2 toggle UI → Implementer Case 2 (cookie-cutter mirror UsersPage)
- Plan C task 4 reflection regression test → Implementer Case 3
- Plan C task 1-3 14 service test catch-up → Implementer Case 3
- S22+2 seed 20 user script → Implementer Case 1 (mass deterministic)
- S22+3 rename users SQL transaction → Implementer Case 1
- Plan F pre-flight prod sqlcmd → Investigator (read-only audit)
Em main solo ĐÚNG 4/10 task:
- Plan E phân quyền strict V2 (security cross-stack)
- S22+1 disable 3 button bug fix (reasoning chain)
- S22+4 attachment view + Section adjust (UX + schema decision)
- S22+5 Mig 30 per-NV (cross-stack schema refactor)
Forward S23+ rule enforcement:
1. .claude/agents/README.md +banner "🚨 RULE BẮT BUỘC (Thứ 9)" trên top
invocation tree + retrospective S22 lesson + workflow forward
2. docs/HANDOFF.md S22 chốt v2 Last updated với note S23+ forward
3. Plan B Contract V2 wire pre-allocated 5 chunk sub-agent role table:
- Pre-flight Contract V1 state → Investigator
- Chunk A Mig 31 schema → Implementer Case 2
- Chunk B Service ApproveV2Async → Em main Solo (cross-stack)
- Chunk C Mig 32 LevelOpinions + service hook → Implementer Case 2
- Chunk D FE ContractCreate Workspace V2 → Implementer Case 2
- Chunk E FE ContractDetail Section 5 V2 → Implementer Case 2
- Pre-commit each chunk → Reviewer
- Post-deploy → CICD Monitor
Em main solo CHỈ khi: schema/UX/architecture decision + cross-stack tight
coupling + bug fix reasoning chain.
KHÔNG cắt narrative cũ — append rule banner ở top + Plan B section trước
Session 21 timeline.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>