[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

@ -108,6 +108,12 @@ Plan cha: [tên]
## Phase 5 — COMMIT (release)
### 5.0 Squash wal:-trailing chưa-push (H22 — TRƯỚC commit-chốt)
- Chạy `git log --format=%s origin/main..HEAD` → đếm **K** = số subject **LIÊN-TỤC** bắt đầu `wal:` tính từ HEAD xuống (DỪNG ngay khi gặp subject KHÁC). **K=0 → skip**; **K>0 → `git reset --soft HEAD~K`** gộp các wal-commit staged vào commit-chốt §5.1 (nội-dung đã ở index, chỉ gom lịch-sử — file không đổi).
- 🔒 **Phạm-vi = CHỈ commit CHƯA-push** (khoảng ahead-of-remote) → **KHÔNG BAO GIỜ rewrite commit đã-push**. wal: kẹp sâu hơn (sandwiched DƯỚI commit thường chưa-push) → **GIỮ NGUYÊN**, chấp-nhận noise (hard-safety đổi lấy không-rewrite-lịch-sử-đã-đẩy).
- **Biên push-chết-giữa-phiên-trước:** HEAD = commit-chốt cũ chưa-push → đếm DỪNG tại đó = chốt cũ KHÔNG bị fold, được push lần này (an-toàn, không mất commit).
- Squash xong = **điểm review-diff wal-paths** (AS-10 backstop dời về đây — hook đã commit local các residual-write nếu có; review diff các path WAL/agent-memory/runs TẠI ĐÂY trước khi chốt §5.1; push vẫn gated em-main).
### 5.1 Release + commit
- Kiểm tra release, commit task vừa hoàn thành. ⚠️ Update `SolutionErp.slnx` nếu có `.cs/.csproj` mới.
- Format: `[CLAUDE] <scope>: <imperative message>` + `Co-Authored-By: <lead model hiện tại> <noreply@anthropic.com>` (model = lead runtime phiên hiện-tại per BƯỚC 0.6 probe — KHÔNG hardcode; flip-chain canonical → `docs/STATUS.md` §Sub-agents)
@ -134,6 +140,10 @@ Plan cha: [tên]
- Surface report cho anh main relay AI_INFRA (1 lần báo = ACK+executed+evidence). Em main `/session-start` kế watch + double-check → cơ chế 2 chiều tự duy trì.
- Session KHÔNG adopt infra gì → ghi "N/A (no infra adoption this session)".
### 6.4 Reset WAL (H22 — bước CUỐI)
- Ghi-đè `.claude/WAL.md` về **template rỗng** (mạch dở phiên này đã đóng): `updated`/`session`/`branch` = `—` · `goal` = `(trống — không có mạch dở)` · `chain` = `(rỗng)` · `next`/`verify` = `(trống)`.
- 📝 Note: Stop-hook sẽ commit lần reset này thành **wal-commit trailing** sau turn cuối — **vô-hại**; phiên sau squash nó ở **§5.0**. (Đây là bước CUỐI, sau khi §5 đã commit/push xong — để WAL sạch cho `/session-start §0.7` phiên kế đọc.)
---
**Trigger sau Phase 6:** Session đóng. Working memory có thể `/clear` an toàn (persistent memory đã flush + commit + push).