[CLAUDE] Docs: H-15 v3 memory-budget full-parity (lead 220K/sub 60K/wf 50K) + spawn-fill-to-budget

anh owner-directive: full AI_INFRA parity, supersede S82 self-shrink (AI under-shrinking forbidden by mark RC-...01-58-01). New spawn_fill_directive: fill sub context to budget via RICH spawn prompt (MEMORY.md byte-cap = 1 slice only, prompt fills rest). engine +G.5 + adopt-delta S83, ACTIVE-MARKS H-15 v3-delta RC-pqhuy1987-22-06-2026-16-35-37, agents/README retire <=8K-brief. Detector 26 baseline (0 new), A7 217/217.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-06-22 17:06:34 +07:00
parent dfde1acbd0
commit 2c7fd635b9
4 changed files with 28 additions and 13 deletions

View File

@ -50,13 +50,18 @@
"_note": "Harness-15-v2 (S82, 2026-06-21): UPDATED by delta broadcast 2026-06-20-Governance-harness-15-v2-hot-feed-update (supersedes_scope = tier-1-sizing + L2/L3-caps ONLY; rest of H15 unchanged). TWO CHANGES vs S81: (1) Tier-1 = HOT-FEED LARGE per-role (was flat 12K -- too thin, caused lead to forget work across sessions); (2) L2/L3 caps REMOVED (on-demand, no artificial tier-limit, bounded only by model context window). Still the SECOND governor (token) ORTHOGONAL to the BYTE governor (tiers/archive_gate above) -- keep BOTH (B(e)); byte measures file-size-on-disk, token measures context-loaded; VN text ~3.0-3.5 byte/tok so byte/4 = upper bound => real headroom LARGER. Budget = MINIMUM-to-USE floor (FILL Tier-1 with real work-state up to the number; under-fill ONLY when high-value content exhausted; NEVER garbage-stuff -- token-saving = forgetting work).",
"role_boundary_note": "v2 §6 ROLE BOUNDARY (🔴): the budget numbers (Tier-1 per-role cap + per-bucket allocation) are ANH's (project-owner / chu-du-an) RIGHT to set -- NOT the AI-lead's. em-main's job is exactly two parts: (1) EXECUTE the config faithfully (load Tier-1 to the number, no-truncate, pull each bucket to target) + (2) REPORT %-composition at session-start (§2.1.6) and session-end (§L.b(c)) so anh decides. em-main self-measures + proposes numbers; em-main does NOT auto-tune them down. This corrects the S81 'LEAD-AUTHORITY' framing which conflated AI-lead with project-owner.",
"tier1_hotfeed_tokens": {
"_note": "Tier-1 always-loaded HOT-FEED, PER-ROLE (v2: large/generous, do NOT keep thin). FILL with the 4 work buckets: (1) WIP work-state, (2) recurring-bugs/anti-patterns/gotcha (value_protect, kept regardless of age), (3) backlog, (4) pending-decisions. Numbers below = SE self-measured-ESTIMATE per SE scale (Opus 4.8 1M context window + multi-module ERP workload); %-print at the two session ends shows the REAL composition. AI_INFRA reference (lead 220K / mem-sub 60K / wf-sub 50K) is THEIR measure on THEIR model+federation-scale -- NOT hard-applied; SE numbers are SMALLER (single project; sub MEMORY.md byte-capped at 30720B by design).",
"lead_tokens": 60000,
"lead_note": "em-main hot-feed: STATUS current-state + 4-bucket work-state block + ACTIVE-MARKS + recent-3-session HANDOFF slice + roster-slice + task-relevant gotchas. Opus 4.8 1M window => ample headroom above this. anh-adjustable.",
"memory_sub_tokens": 20000,
"memory_sub_note": "memory-bearing sub: own MEMORY.md (<=30720B ~9.3K tok) + archive _INDEX map (<=20480B ~6.2K tok) + work-state slice (~3-4K). Upper-bounded by the BYTE soft-cap on MEMORY.md.",
"workflow_sub_tokens": 16000,
"workflow_sub_note": "agent-in-workflow: MEMORY-PACK slice (hmw.js:124 args inject) + task context."
"_note": "Tier-1 always-loaded HOT-FEED, PER-ROLE (v3 S83 2026-06-22: FULL AI_INFRA parity, owner-set). FILL with the 4 work buckets: (1) WIP work-state, (2) recurring-bugs/anti-patterns/gotcha (value_protect, kept regardless of age), (3) backlog, (4) pending-decisions. anh-set: lead 220K / mem-sub 60K / wf-sub 50K = EXACT AI_INFRA parity. This SUPERSEDES the S82 'SE numbers are SMALLER (lead 60K; subs stay 20K/16K because the byte-cap binds first)' self-justification -- that was the AI under-shrinking, forbidden by role_boundary_note + mark RC-...01-58-01 (token-saving = forgetting work). KEY CORRECTION on subs: the sub MEMORY.md byte-cap (30720B ~9.3K tok) is ONLY ONE SLICE of a sub's Tier-1 -- the SPAWN PROMPT (relevant gotchas + state + full task-context + related docs/memory, written by em-main) fills the REST up to the token budget. So 60K/50K is NOT 'unusable headroom'; it is the target em-main fills via a RICH spawn prompt (see spawn_fill_directive). %-print at the two session ends shows the REAL composition.",
"lead_tokens": 220000,
"lead_note": "ANH-SET 220K (S83 2026-06-22 owner-directive, full AI_INFRA parity; raised from the 200K interim earlier in S83 and the 60K S82 self-shrink). DO NOT auto-reduce (role_boundary_note + mark RC-...01-58-01). Hot-feed = STATUS full current-state + 4-bucket work-state block + ACTIVE-MARKS + recent-3-session HANDOFF + active roadmap (migration-todos) + roster-slice + task-relevant gotchas + active-task files + task-relevant docs/code -- read GENEROUSLY ('dau phien nap them tier1_lead cho du'), NOT 'on-demand-deferred', but HIGHEST-VALUE distilled only, NEVER garbage-stuff. Opus 4.8 1M window => 220K is ~22% of window, ample. anh-adjustable (owner authority).",
"memory_sub_tokens": 60000,
"memory_sub_note": "memory-bearing sub (agent-chinh), anh-set 60K (S83 full parity): own MEMORY.md (<=30720B ~9.3K tok auto-inject) + archive _INDEX map + work-state slice + THE RICH SPAWN PROMPT em-main writes (relevant gotchas + current state + full task-context + related docs/memory) = fills toward 60K. The byte-cap on MEMORY.md is NOT the binding limit on the sub's Tier-1; the spawn prompt is. em-main MUST write a context-rich brief, NOT a thin 8K brief (that old anti-truncation heuristic guarded RETURN-truncation #53, mitigated by lean memoryDelta RETURN -- not by starving INPUT).",
"workflow_sub_tokens": 50000,
"workflow_sub_note": "agent-in-workflow, anh-set 50K (S83 full parity): MEMORY-PACK slice (hmw.js:124 args inject) + RICH task context (relevant gotchas + state + full task-context + related docs/memory passed via the workflow agent() prompt). Same rule: fill to budget with high-value content, lean structured return."
},
"spawn_fill_directive": {
"_note": "Harness-15-v3 (S83 2026-06-22 owner-directive): when em-main SPAWNS any sub-agent or workflow-agent, FILL its context toward its token budget (mem-sub 60K / wf-sub 50K) via a RICH prompt -- relevant gotchas + current state + full task-context + related docs/memory. The sub's MEMORY.md byte-cap is only one slice; the spawn prompt supplies the rest. RULE: highest-value distilled content ONLY (the hot-load tokens must be the most valuable, filtered through many stages), never garbage-stuff to hit the number. RECONCILES the agents/README anti-truncation '<=8K brief' heuristic: that guarded against RETURN-truncation (#53), now mitigated by return-delta-only (memoryDelta) + em-main recover-disk -- so the INPUT prompt is no longer starved; it is filled rich.",
"applies_to": ["Agent tool spawn", "Workflow hmw.js agent() calls"],
"quality_gate": "highest-value distilled, NOT padding"
},
"l2_ondemand": "NO-CAP (v2: removed the 6K cap). On-demand: archive verbatim/gist sections + skill sections; pulled per-need, no artificial tier-limit; bounded only by model context window. On-demand => no permanent context-cost when unused.",
"l3_rag": "NO-CAP (v2: removed the 4K cap). On-demand: RAG search_memory/search_code per query; bounded only by model context window.",

View File

@ -62,7 +62,7 @@
**Em main solo CHỈ khi:** schema/UX/architecture decision · cross-stack tight coupling · bug fix reasoning chain · gotcha #53 fallback (spawn truncate/529 → em main solo reliable, proven S37 BE 700 LOC + FE 4 file).
**Anti-truncation rules (gotcha #53 — 5× occurrence S35-S37):**
- Brief WRITE agent ≤ 8K (heavy spec ~10K → truncate risk). FE tight brief proven 0 truncation S36.
- **Spawn prompt = RICH, fill-to-budget (H15-v3 S83 — supersedes old "≤8K brief"):** nạp INPUT tới token-budget của sub (mem-sub **60K** / wf-sub **50K** per `memory-budget.json:spawn_fill_directive`) bằng context GIÁ-TRỊ cao (relevant gotchas + state + full task-context + docs/memory liên-quan) — KHÔNG padding. Truncation #53 = rủi-ro RETURN của agent (vá bằng lean `memoryDelta` return + em-main recover-disk), **KHÔNG** vá bằng starve INPUT. *(Heuristic "≤8K brief" cũ = guard thời context-nhỏ S36, nay nghỉ.)*
- Tiered Memory v1: L1 HOT soft-cap ~30KB + L2 archive on-demand + L3 RAG just-in-time (per AI_INFRA policy). Investigator 32KB S37 truncate = lesson; soft-cap ~30KB tránh tái diễn.
- Agent keep entry ≤ 1.5K chars (frontmatter rule mỗi agent).
- Em main grep verify manual nếu agent return truncated mid-task.

View File

@ -15,7 +15,7 @@
| `RC-pqhuy1987-20-06-2026-10-29-09` | `rules.md §6.6` + `engine §E.4` (≙ §F4.2) | Quyết-định kiến-trúc/chức-năng = tiêu-chí KHÁCH-QUAN (điểm-đau · khối-lượng · chất-lượng) **KHÔNG quy-mô-đội**; "overkill/quá-mức-solo-dev/cảm-tính" = **BÁC**; thẩm-quyền cần-vs-thừa = AI_INFRA cross-project; AI = neo lý-tính | **pain:** lập-luận "quá mức solo-dev" đã khiến 1 dự-án từ-chối chức-năng chống-lách-engine (sự-cố thật) — SE = solo-dev, đúng đối-tượng · **volume:** 6 dự-án federated + SE 11-agent cần neo nhất-quán · **quality:** quyết-định-cảm-tính trôi chất-lượng âm-thầm; neo-lý-tính giữ rigor | null | 🔖 **Active-High** (anh-confirm S79 · P4 DACI report-before-stamp) |
| `RC-pqhuy1987-20-06-2026-10-29-10` | `engine §E` (≙ §P) | Codify **User-Mark + chữ-ký RC** (Harness-12/13) — chữ-ký quyết-định governance + 4 cấp + no-cảm-tính deterministic + report-before-stamp | **pain:** quyết-định governance bị quên / giảm-bằng-cảm-tính (không chữ-ký+tier) · **volume:** SE tích-lũy Harness 1-14 cần audit-trail nhất-quán · **quality:** RC-sig = minh-oan + tranh-luận-bằng-bằng-chứng + trách-nhiệm-2-chiều | null | 🔖 **Active-High** (anh-confirm S79 · P4 dogfood: invest-wf→review-wf→báo-cáo→confirm→stamp) |
| `RC-pqhuy1987-20-06-2026-10-29-11` | `rules.md §6.6 DM-time/age` (≙ §F4.2-ext / H-14) | **Mở-rộng mark-1** — time/age/recency-decay = **false-proxy** (cùng-họ team-size); kiến-trúc KHÔNG dựa cũ / lâu-chưa-dùng / auto-decay; trần budget=(dung-lượng÷tốc-độ-thay-mới) KHÔNG núm-decay-tuổi, drift=đường-nền-cuộn KHÔNG cửa-sổ-tuổi; **additive** (mark-1 GIỮ) | **pain:** cap∝chunk_count = Goodhart-vanity + age-window drift = alarm-spam (sự-cố thật H-14); SE memory-budget từng dễ mắc "giảm-theo-độ-cũ" · **volume:** 6 dự-án áp budget/drift/eval + SE L1/L2/L3 + archive-gate · **quality:** age-decay cắt memory-tốt = false-economy (DM-004 Goodhart §6.6) | null (additive) | 🔖 **Active-High** (anh-confirm S79 via `/user-mark-active-high` · P4 DACI · supersedes:null) |
| `RC-pqhuy1987-20-06-2026-23-07-37` | `harness-11-engine.md §G` + `memory-budget.json` + `rules.md §6.6` (≙ AI_INFRA H-15) | **H-15 memory-budget per-agent (token-based):** token-governor (**v2 §G.4 S82:** Tầng-1 hot-feed-LỚN per-role lead~60K/sub~20K/wf~16K + L2/L3 **bỏ-trần** on-demand; con-số = **quyền CHỦ-DỰ-ÁN/anh** + AI thực-thi-đúng-số + báo-% 2-đầu-phiên — refine framing "lead-hard-cap" S81) + **value-gated archival** (giữ recurring-bug/anti-pattern/gotcha bất-kể tuổi) + fill-L1-full (budget = sàn-tận-dụng KHÔNG trần-tiết-kiệm) + work-state-block @session-start + %-print 2-đầu-phiên + 2-governor (byte⟂token) | **pain:** tiết-kiệm-token → quên-việc/rơi-trạng-thái giữa phiên (sự-cố thật — Tầng-1 mỏng = lead quên việc nhiều phiên, bằng-chứng v2); SE keep-floor age-based có thể archive gotcha cũ ra khỏi L1 — value-gate FLAG đã bắt thật (test-specialist gotcha#/guard) · **volume:** 11-agent × (SÀN 30K + Tầng-1 hot-feed per-role lead 60K/sub 20K/wf 16K, v2 §G.4) always-load/spawn + L2 archive ~240KB (cicd 194KB) cần value-protect · **quality:** quên-việc → làm-lại → tốn-hơn (Goodhart); giữ hard-won lessons | null (additive — mark `…11` GIỮ; H-15 mở-rộng value-axis xuống tầng-bộ-nhớ) | 🔖 **Active-High** (anh-confirm S81 · **v2-delta anh-confirm S82** `RC-pqhuy1987-21-06-2026-01-58-01` — hot-feed-lớn/bỏ-trần/anh-authority, P4 DACI report-before-stamp ✓) |
| `RC-pqhuy1987-20-06-2026-23-07-37` | `harness-11-engine.md §G` + `memory-budget.json` + `rules.md §6.6` (≙ AI_INFRA H-15) | **H-15 memory-budget per-agent (token-based):** token-governor (**v3 §G.5 S83:** Tầng-1 hot-feed per-role **lead 220K/mem-sub 60K/wf-sub 50K** full AI_INFRA parity (sửa self-shrink S82) + **spawn-fill-to-budget** (sub Tầng-1 = MEMORY.md byte-cap + spawn-prompt giàu, `spawn_fill_directive`); **v2 §G.4 S82:** L2/L3 **bỏ-trần** on-demand + báo-% 2-đầu-phiên; con-số = **quyền CHỦ-DỰ-ÁN/anh** + AI thực-thi-đúng-số + báo-%) + **value-gated archival** (giữ recurring-bug/anti-pattern/gotcha bất-kể tuổi) + fill-L1-full (budget = sàn-tận-dụng KHÔNG trần-tiết-kiệm) + work-state-block @session-start + %-print 2-đầu-phiên + 2-governor (byte⟂token) | **pain:** tiết-kiệm-token → quên-việc/rơi-trạng-thái giữa phiên (sự-cố thật — Tầng-1 mỏng = lead quên việc nhiều phiên, bằng-chứng v2); SE keep-floor age-based có thể archive gotcha cũ ra khỏi L1 — value-gate FLAG đã bắt thật (test-specialist gotcha#/guard) · **volume:** 11-agent × (SÀN 30K + Tầng-1 hot-feed per-role lead 220K/mem-sub 60K/wf-sub 50K, v3 §G.5 full-parity) always-load/spawn + L2 archive ~240KB (cicd 194KB) cần value-protect · **quality:** quên-việc → làm-lại → tốn-hơn (Goodhart); giữ hard-won lessons | null (additive — mark `…11` GIỮ; H-15 mở-rộng value-axis xuống tầng-bộ-nhớ) | 🔖 **Active-High** (anh-confirm S81 · **v2-delta anh-confirm S82** `RC-pqhuy1987-21-06-2026-01-58-01` — hot-feed-lớn/bỏ-trần/anh-authority · **v3-delta anh-directed S83** `RC-pqhuy1987-22-06-2026-16-35-37` — full-parity 220/60/50 + spawn-fill-to-budget, P4 DACI report-before-stamp ✓) |
## 🟢 ACTIVE (follow + nhắc-lại xuyên-suốt — HIỆN @session)
_(trống)_

View File

@ -20,7 +20,7 @@
| PHẦN D — orchestration | doc này (3-tier + 1-direction) + `session-start.md`/`session-end.md`/`ultra-on.md` cadence + `hmw.js` checkpoint | mix mechanized + convention |
| PHẦN E — User-Mark (H-12/13, canonical §P) + RC-signature | doc này §E (cơ-chế P1-P10) + `.claude/governance/ACTIVE-MARKS.md` (sổ-cái + display) + 4 lệnh `/user-mark-*` (interface) + `session-start §2.1.4`/`session-end §L.b(h)` (display) | convention (report-trước-đóng-dấu P4) + mechanized (display gắn-lệnh-phiên + tool-deny settings P9) |
| PHẦN F — Harness-14 Eval/Budget/Outcome | doc này §F (3-mức maturity + method) + `eval/` golden-set harness (F.2) + `memory-budget.json`/`measure-agent-memory.ps1` (F.3 = PHẦN A) | eval = executed-file + convention (manual) · budget = mechanized ALIGNED · outcome-correlation/hit-rate = Mức-2 tool-pending-data |
| PHẦN G — Harness-15 memory-budget per-agent (token) **+v2 §G.4** | doc này §G (SÀN floor + 3-tầng token + **§G.4 hot-feed-lớn / L2-L3-bỏ-trần / %-print / ranh-giới-vai-trò**) + `memory-budget.json` (`harness_floor` + `token_governor` v2 + `archive_gate.value_protect`) + `session-start §2.1.5`+**§2.1.6** + **`session-end §L.b(c)`** | 2-governor mechanized (byte ⟂ token config) + 5/6 sàn-chức-năng = convention; **v2 (1)(2)=config · (3)(4)=convention** |
| PHẦN G — Harness-15 memory-budget per-agent (token) **+v2 §G.4 +v3 §G.5** | doc này §G (SÀN floor + 3-tầng token + **§G.4 hot-feed-lớn / L2-L3-bỏ-trần / %-print / ranh-giới-vai-trò** + **§G.5 full-parity 220/60/50 + spawn-fill-to-budget**) + `memory-budget.json` (`harness_floor` + `token_governor` v3 + `spawn_fill_directive` + `archive_gate.value_protect`) + `session-start §2.1.5`+**§2.1.6** + **`session-end §L.b(c)`** | 2-governor mechanized (byte ⟂ token config) + sàn-chức-năng = convention; **v3 (1)=config · (2)(3)=convention** |
| Canonical state (nguồn-chuẩn) | `docs/STATUS.md` CURRENT STATE table | — |
---
@ -158,18 +158,20 @@ SE đã có RAG golden-set harness (KHÔNG phải gap): `eval/golden-set-solutio
---
## PHẦN G — Harness-15: Ngân-sách bộ-nhớ per-agent (token-based) — SÀN + 3 tầng, BẮT BUỘC dùng đủ (🔴 FUNCTION-FLOOR + 🟡 number TAILORED)
## PHẦN G — Harness-15: Ngân-sách bộ-nhớ per-agent (token-based) — SÀN + 3 tầng, BẮT BUỘC dùng đủ (🔴 FUNCTION-FLOOR + 🟡 number anh-owner) **+v2 §G.4 +v3 §G.5**
> **Adopt S81 (2026-06-20)** — AI_INFRA `2026-06-20-Governance-harness-15-memory-budget` + checklist-15 (inbox `broadcasts/inbox/ai_infra/`). Áp qua 2-process (IMPLEMENT em-main single-writer D9 + REVIEW workflow) per mandate §6. adap-report → `docs/governance/adap-reports/2026-06-20-Governance-harness-15-memory-budget.md`.
>
> **Adopt-delta S82 (2026-06-21)** — AI_INFRA `2026-06-20-Governance-harness-15-v2-hot-feed-update` (type: update · supersedes_scope = tier-1-sizing + L2/L3-caps ONLY). Re-verify CHỈ phần đổi → **§G.4** (Tầng-1 hot-feed-lớn + L2/L3 bỏ-trần + %-print 2-đầu-phiên + ranh-giới-vai-trò). Phần sàn-chức-năng gốc (§G.1-G.3) **KHÔNG đổi**. adap-report → `2026-06-21-Governance-harness-15-v2-hot-feed-update.md`.
>
> **Adopt-delta S83 (2026-06-22)** — **anh owner-directive trực-tiếp** (KHÔNG broadcast): full AI_INFRA parity (lead 220K · mem-sub 60K · wf-sub 50K) + **spawn-fill-to-budget** (sub Tầng-1 = MEMORY.md byte-cap + spawn-prompt giàu) → **§G.5**. Sửa self-shrink S82. Mark H-15 v3-delta (`ACTIVE-MARKS.md`).
>
> 🔑 **Cốt-lõi:** ngân-sách bộ-nhớ = **mức TẬN-DỤNG-TỐI-THIỂU phải đạt, KHÔNG phải trần để dè-xẻn.** Tiết-kiệm-token = **quên-việc** (rơi trạng-thái giữa phiên) = KHÔNG tiết-kiệm thật (làm-lại tốn HƠN — cùng họ Goodhart §F.4/§6.6). Khoảng-trống quan-sát hay rơi đúng vào **chính LEAD** (lead tự-nạp kiến-trúc/luật nhưng bỏ quên trạng-thái-công-việc) → §G.2(c) vá đúng chỗ đó.
### G.1 — Mô-hình = SÀN cố-định + 3 tầng được-quản-lý (A1/A2/A3)
- **SÀN-harness (A1, đo-được):** phần cố-định mỗi spawn = tool-schema + framing + persona/role + lead-pasted base-doc-slice + prompt. **SE TỰ đo (KHÔNG mượn số AI_INFRA):** persona đo-thật `.claude/agents/*.md` (4.3KB13.3KB ≈ 1.3K4.0K tok /3.3); tool-schema+framing harness-injected **SE ước-lượng-riêng** (trùng AI_INFRA ~21K vì **cùng-họ-toolset** Read/Write/Edit/Bash/Grep/Glob/Skill/RAG, **KHÔNG mượn-số**) → **floor ≈ 21K measured-estimate → round-up 30K (cap RIÊNG SE)** (`memory-budget.json:harness_floor`). Honest: persona = đo-thật-byte; phần harness-injected = ƯỚC-LƯỢNG (không byte-count cục-bộ được).
- **A3 tách-nhà chống-đếm-trùng:** persona + lead-docs thuộc **SÀN**, KHÔNG đếm vào L1-managed. L1-managed = own agent-memory + archive `_INDEX` + work-state block (`memory-budget.json:harness_floor._note`).
- **3 tầng managed (A2 — cập-nhật v2 §G.4):** Tầng-1 = **HOT-FEED LỚN per-role** (lead ~60K · agent-ký-ức ~20K · agent-workflow ~16K — SE tự-đo-estimate, **KHÔNG** mượn số AI_INFRA 220/60/50; nạp đầy 4 bucket WIP·lỗi-lặp·tồn-đọng·quyết-định-chờ) · L2/L3 **BỎ TRẦN** (on-demand, no artificial tier-cap, chỉ chặn bởi cửa-sổ-ngữ-cảnh model). 🔴 con-số = **quyền CHỦ-DỰ-ÁN (anh)** — em-main THỰC-THI-đúng-số + BÁO-% (KHÔNG tự-tinh-chỉnh), xem §G.4 (`token_governor`).
- **3 tầng managed (A2 — cập-nhật v3 §G.5):** Tầng-1 = **HOT-FEED LỚN per-role** (lead **220K** · agent-ký-ức **60K** · agent-workflow **50K****anh-set FULL AI_INFRA parity S83 v3**, supersede self-shrink S82; nạp đầy 4 bucket WIP·lỗi-lặp·tồn-đọng·quyết-định-chờ) · L2/L3 **BỎ TRẦN** (on-demand, no artificial tier-cap, chỉ chặn bởi cửa-sổ-ngữ-cảnh model). 🔴 con-số = **quyền CHỦ-DỰ-ÁN (anh)** — em-main THỰC-THI-đúng-số + BÁO-% (KHÔNG tự-tinh-chỉnh), xem §G.4/§G.5 (`token_governor`).
### G.2 — 6 sàn-CHỨC-NĂNG bắt-buộc (🔴 — map onto SE, honest mechanized-vs-convention)
| Sàn | SE map | Nấc | Cơ-chế-hóa vs quy-ước |
@ -189,12 +191,20 @@ SE đã có RAG golden-set harness (KHÔNG phải gap): `eval/golden-set-solutio
### G.4 — Harness-15-v2 delta (S82): Tầng-1 hot-feed LỚN + L2/L3 bỏ-trần + %-print + ranh-giới vai-trò
> Delta chồng lên §G.1-G.3 (gốc KHÔNG đổi). Re-verify CHỈ 2 phần đổi + 1 tool mới. Broadcast `2026-06-20-Governance-harness-15-v2-hot-feed-update` (`supersedes_scope = tier-1-sizing + L2/L3-caps ONLY`).
- **(1) Tầng-1 = HOT-FEED LỚN (🔴 SÀN-kiến-trúc):** phần luôn-nạp phải DÀY (đừng để mỏng) — nạp đầy **4 bucket nội-dung-công-việc**: WIP work-state · lỗi-lặp/anti-pattern/gotcha (`value_protect` §G.2(b), giữ bất-kể tuổi) · tồn-đọng · quyết-định-chờ. Bằng-chứng nền: Tầng-1 mỏng → lead **bỏ quên việc nhiều phiên liên-tiếp** (đúng bệnh H15 chữa). SE tự-đo per-role: lead ~60K · agent-ký-ức ~20K · agent-workflow ~16K (`token_governor.tier1_hotfeed_tokens`) — **estimate, KHÔNG mượn 220/60/50 AI_INFRA** (model+scale khác).
- **(1) Tầng-1 = HOT-FEED LỚN (🔴 SÀN-kiến-trúc):** phần luôn-nạp phải DÀY (đừng để mỏng) — nạp đầy **4 bucket nội-dung-công-việc**: WIP work-state · lỗi-lặp/anti-pattern/gotcha (`value_protect` §G.2(b), giữ bất-kể tuổi) · tồn-đọng · quyết-định-chờ. Bằng-chứng nền: Tầng-1 mỏng → lead **bỏ quên việc nhiều phiên liên-tiếp** (đúng bệnh H15 chữa). Per-role: lead **220K** · agent-ký-ức **60K** · agent-workflow **50K** (`token_governor.tier1_hotfeed_tokens`) — **anh-set FULL AI_INFRA parity (S83 v3 §G.5)**, supersede S82 self-shrink.
- **(2) L2/L3 BỎ TRẦN (🔴 SÀN-kiến-trúc):** gỡ cap cứng L2=6K/L3=4K → on-demand kéo-về tự-do, **không hạn-mức-tầng nhân-tạo**, chỉ chặn bởi cửa-sổ-ngữ-cảnh model. on-demand nên KHÔNG chiếm-chỗ thường-trực (no always-cost).
- **(3) %-print 2 đầu-phiên (🔴 tool mới):** `session-start §2.1.6` (composition Tầng-1 theo %/bucket) + `session-end §L.b(c)` (% sau-nạp + Headroom). Ước-lượng-tỉ-lệ đủ. **Headroom > 0 mà CÒN nội-dung giá-trị-cao = under-fill (SAI)** → nạp tiếp; Headroom = cờ-báo, KHÔNG phải đích-tiết-kiệm.
- **(4) Ranh-giới vai-trò (🔴 governance):** con-số budget = **quyền CHỦ-DỰ-ÁN (anh)**, KHÔNG phải AI-lead. em-main = (i) thực-thi đúng-số (no-truncate, kéo từng bucket tới target) + (ii) báo-% 2-đầu-phiên cho anh quyết. Sửa framing S81 "lead-authority" (nhầm AI-lead ↔ chủ-dự-án). Cùng tinh-thần mark `RC-…10-29-09` (AI = neo-lý-tính, anh quyết) + report-before-stamp.
- **Honest đánh-đổi (v2 §5):** Tầng-1 lớn = rot CAO HƠN trên phần always-loaded — **chấp-nhận có-chủ-đích** (quên-việc tệ hơn rot), KHÔNG phải "rot biến mất". SÀN = **kiến-trúc** (hot-feed lớn + L2/L3 on-demand), KHÔNG phải con-số. Nấc honest: (1)(2) = config mechanized (`token_governor`) · (3)(4) = **convention** (kỷ-luật người+AI: nạp-đủ + báo-% + anh-quyết-số).
### G.5 — Harness-15-v3 delta (S83 2026-06-22): full AI_INFRA parity + spawn-fill-to-budget (anh owner-directive)
> Delta chồng lên §G.4 (gốc KHÔNG đổi). **anh owner-directive trực-tiếp** (KHÔNG qua broadcast AI_INFRA) — con-số = quyền chủ-dự-án (§G.4 (4)). Mark = `ACTIVE-MARKS.md` H-15 v3-delta.
- **(1) FULL AI_INFRA parity (🔴 anh-set):** lead **220K** · mem-sub **60K** · wf-sub **50K** (`token_governor.tier1_hotfeed_tokens`). SUPERSEDE S82 self-estimate (lead 60K / sub 20K-16K "vì SE nhỏ hơn / byte-cap binds") — đó là AI **tự-co-nhỏ**, đúng cái mark `RC-…01-58-01` cấm. anh: *"Giờ là 220k → đầu phiên nạp thêm tier1_lead cho đủ."*
- **(2) Sub Tầng-1 = MEMORY.md (byte-cap) + SPAWN-PROMPT (🔴 sửa hiểu-nhầm S82):** byte-cap MEMORY.md (30720B ~9.3K tok) CHỈ LÀ 1 LÁT của Tầng-1 sub — **prompt-spawn em-main viết** (relevant gotcha + state + full task-context + docs/memory liên-quan) nạp PHẦN CÒN LẠI tới token-budget. ⇒ 60K/50K KHÔNG phải "headroom vô-dụng" (bác lập-luận S82 "byte-cap binds first"); nó là **target em-main NẠP-ĐẦY qua prompt giàu** (`spawn_fill_directive`).
- **(3) Spawn-fill discipline (🔴 convention):** khi SPAWN bất-kỳ sub/workflow-agent → nạp context tới budget bằng **prompt GIÀU giá-trị-công-việc** (gotcha + state + task-context + docs/memory), KHÔNG nạp rác. Hot-load token đầu = token **GIÁ-TRỊ-NHẤT** (chắt-lọc qua nhiều giai-đoạn). RECONCILE `agents/README` "≤8K brief": heuristic cũ gác RETURN-truncation #53 (nay vá bằng memoryDelta return + recover-disk) → INPUT KHÔNG starve nữa, nạp giàu.
- **Honest nấc:** (1) = config mechanized (`token_governor` số mới). (2)(3) = **convention** (kỷ-luật em-main viết-prompt-giàu mỗi spawn — KHÔNG tool-ép; cùng họ §G.2 "5/6 convention"). value-gate (highest-value, no-garbage) = judge em-main, không auto-enforce.
---
## CAVEAT (trung-thực — đọc trước khi tự nhận "đã tự-bảo-trì")