[CLAUDE] Docs: S124 adap-wave AI_INFRA + owner worker-tier-pin (14 agent opus+effort:max) + user-memory relocate R6 + H24 dogfood
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m26s

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-07-15 23:17:45 +07:00
parent b764ac791a
commit 23bbe97f39
92 changed files with 2221 additions and 89 deletions

View File

@ -0,0 +1,23 @@
---
name: status-handoff-tiering
description: STATUS.md/HANDOFF.md phải lean (current + 2-3 session); archive verbatim trước khi rewrite — chúng bloat nếu append full paragraph mỗi session
metadata:
node_type: memory
type: feedback
originSessionId: 826389df-9366-4091-aa33-78a7a36d2845
---
S40 (2026-05-29): STATUS.md (170KB) + HANDOFF.md (224KB) đã phình tới **393KB** vì mỗi session append 1 đoạn verbatim/TL;DR đầy đủ mà KHÔNG bao giờ archive — trùng lặp nặng giữa 2 file VÀ với per-session logs trong `docs/changelog/sessions/`. Consolidate xuống 9KB (97.7%), zero info loss.
**Why:** Over-context — mỗi session-init phải truncate-read 393KB (2 file đều vượt cap 25K token đọc 1 lần). Vi phạm quy tắc consolidate của anh main ("xóa double, phân tầng, KO cắt nội dung quan trọng").
**How to apply:**
- Giữ STATUS/HANDOFF ở **state hiện tại + 2-3 session gần nhất**. Cũ hơn → `docs/changelog/sessions/` (per-session), reference bằng pointer.
- Trước big-rewrite: **archive full file verbatim → `docs/_archive/<FILE>-preSNN-fullhistory.md`** (zero-loss insurance) RỒI mới Write lean. Bài học: S36-S39 combined log chỉ 5.3KB summary + KHÔNG có S32 log → nếu xóa thẳng đoạn cũ sẽ mất detail.
- **Re-ground count định kỳ từ code** (drift upward do per-session increment optimistic). Tables = `.ToTable()` trong ModelSnapshot (gồm 7 Identity), KHÔNG phải DbSet count (sai 7). Endpoints = đếm `[HttpVerb]`. FE pages = `*Page.tsx` mỗi app.
- Liên quan: [[implementer-truncation-mitigation]] (agent-MEMORY >25KB cũng cần curate cùng nguyên tắc).
**S94 (2026-06-29) — re-tier mechanics + budget⟂Read-limit orthogonality:**
- **2 khóa ĐỘC-LẬP (đừng lẫn):** trần hot-feed budget (`memory-budget.json:token_governor`, anh chỉnh được) ⟂ harness **Read-tool 25K-token/call** (cứng, KHÔNG chỉnh bằng budget). Nâng cap budget (S94: anh-directive 220K→380K) KHÔNG unblock được Read mega-line — 2 vấn-đề khác nhau. mega-line (1 dòng >25K-token) KHÔNG phân-trang-theo-dòng → Read/Edit chỉ thấy 25K đầu, phần sau kẹt.
- **mega-LINE vs mega-FILE (ưu-tiên khác nhau):** mega-LINE (STATUS:6 59.6K-char + HANDOFF:5 43.9K-char, blurb dồn 1 dòng) = **tooling-breaker** (Read OOM · detector D1 · Edit fail) → ưu-tiên fix. mega-FILE nhiều-dòng (migration-todos 807 dòng) = chỉ tốn-token, paginate OK → fix khi rảnh.
- **Re-tier AN-TOÀN (PowerShell vì Read kẹt mega-line):** (1) backup `git show HEAD:` + scratchpad; (2) split mega-line tại session-boundary `· **Prev SNN**`, **assert head+tail==original** (0 split-loss); (3) **archive-KHÔNG-cắt**`docs/_archive/<file>-tier-SNN.md` (append, no-retrofit audit-trail); (4) verify conservation `new-live + archive == orig + pointer-overhead` (S94 +995B = 0 nội-dung mất); (5) re-run detector confirm canonical-count vẫn detect + 0-broken-pointer. S94: 332KB→34KB live (90%), 0 byte-loss. Sau re-tier mega-line về <25K Read/Edit/prepend-blurb bình-thường lại.