[CLAUDE] Docs: S111 adopt H22 WAL session-continuity — sổ WAL ≤40 + Stop-hook wal-flush.ps1 persist-only VERIFIED-RUNTIME ×2 (12071c5/67be443 hot-reload ENV-DEPENDENT) + /pause·/tiep 1-đường + BƯỚC 0.7/§5.0/§6.4 + FLIP run-trace ≥3-task + engine PHẦN N + detector C5 + mark RC-…12-07-2026-11-43-45 + D10 paths-ignore anh-directed + email 9cdcda2f3c83 (invest/reviewer Fable per-invocation 0-garble · WF wf_5ba3daf6-fe0 3-Opus RUN-TRACE · reviewer PASS_WITH_FIXES 8/8-fix · squash §5.0 dogfood-THẬT K=2)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m11s

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-07-12 11:45:14 +07:00
parent 318a271930
commit 8aa3869637
30 changed files with 767 additions and 5 deletions

View File

@ -23,12 +23,13 @@ Phân biệt RAW (prefix `sub-`) vs VERIFIED (suffix `-synthesis.md`) bằng **T
| | DEFAULT return-delta-only (§J4) | RUN-TRACE mode (§J6) |
|---|---|---|
| Khi dùng | fan-out NH (~2-3 phút, read/analyze — vd recon) | workflow DÀI / sinh nhiều detail / cần audit-trail |
| Khi dùng | fan-out NH (<3 task **VÀ** ước 5 phút; read/analyze vd recon) | workflow DÀI / sinh nhiều detail / cần audit-trail |
| Bắt buộc? (sàn H22 S111) | mode-A hợp lệ cho fan-out NHỎ | **BẮT BUỘC khi run ≥3 task HOẶC ước chạy >5 phút** (`args.run` per-agent-file `sub-<role>-<i>.md`) |
| Sub ghi file? | KHÔNG chỉ return `memoryDelta` + `findings` | write-sub GHI full-detail vào `runs/<run-id>/sub-<role>-<i>.md` (phẳng); read-only sub `findings` + `subMdPath` em main scribe |
| Lead làm | VERIFY + APPEND @P3 (B3) | đọc `sub-<role>-<i>.md` on-demand + ghi `<stage>-synthesis.md` per-turn (C4) + H2 gom @session-end (B5, backstop) |
| Rủi ro mất detail | (delta lossy) chấp nhận cho việc nhẹ | KHÔNG (full-detail giữ trong run-folder tracked) |
> Mặc định DEFAULT. RUN-TRACE chỉ bật khi workflow dài/nhiều detail/cần dấu-vết (set `args.run = {name, dir}`). KHÔNG bắt mọi fan-out tạo run-folder.
> **Sàn H22 (S111) — FLIP policy:** mode-A return-delta-only VẪN hợp lệ cho fan-out NHỎ, NHƯNG **run ≥3 task HOẶC ước chạy >5 phút = BẮT BUỘC RUN-TRACE mode** (`args.run` → per-agent-file `sub-<role>-<i>.md` trong run-folder). Lý-do: chết giữa run vẫn còn vật-liệu trên đĩa để `/tiep` nối lại — **per-TURN ≠ per-TASK: returns mất khi chết giữa turn, nhưng file trên disk còn**. Fan-out NHỎ dưới ngưỡng → DEFAULT return-delta-only vẫn OK (KHÔNG bắt MỌI fan-out tạo run-folder).
## Quy trình RUN-TRACE (B1B6)
1. **B3 SCAFFOLD TRƯỚC (em main @P1):** tạo `runs/<run-id>/` + `run.md` (FLAT KHÔNG cần `sub-md/`/`harvest/` subfolder hay `.gitkeep`; file `sub-*`/`*-synthesis.md` sinh phẳng cùng cấp khi fan-out chạy). *(🧊 bước "ghi OPEN-beat vào `runs/_ledger.md`" retired H18-B S100 — orphan-authority = folder-scan.)* `hmw.js` chạy JS-sandbox **no-filesystem** KHÔNG tự tạo folder; **em main Write @P1** TRƯỚC khi invoke Workflow. (Đây fragile-point quên scaffold = run mất dấu-vết âm-thầm; xem `runs/README.md` §C7.)