[CLAUDE] Infra: W2 GOP-1-COMMIT - San-1 gate + PA-2a + roster 12->14 (2 monitor H24) + h24_cadence + counter + STATUS 2 row

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>
This commit is contained in:
pqhuy1987
2026-07-15 13:04:21 +07:00
parent d07bbb98c5
commit 00a1c67e55
9 changed files with 296 additions and 14 deletions

View File

@ -118,6 +118,29 @@
},
"honest_caveat": "v2 §5: large Tier-1 = HIGHER context-rot on the always-loaded part -- an accepted, deliberate trade-off (forgetting-work judged worse than rot), NOT 'rot disappears'. Small-context-window / light-workload projects may optimally pick a SMALLER Tier-1 -- the FLOOR is the ARCHITECTURE (hot-feed large + L2/L3 on-demand no-cap), not the numbers. 'No-cap' L2/L3 = no artificial tier-limit, still within the model context window."
},
"h24_cadence": {
"_note": "Harness-24 (S121, 2026-07-15, wave adap-6-broadcast W2) lead-self-audit cadence. SINGLE-SOURCE per H24 §2(3): every cadence number is READ FROM HERE; docs/persona POINT TO THIS KEY and must NOT copy the digits. Consumer: scripts/governance-detectors.ps1 detector H24-2 carry-age (reads light_every as M). MISSING KEY => the consumer FAILS LOUD and measures nothing -- it must NEVER assume a default, because a hardcoded cadence would silently re-create the very drift single-source exists to prevent.",
"_owner_ratified": "owner-decisions-15-07-2026 Q2 -- anh chot 6/15/3, 'tuong tu Hub'. HONEST-CAVEAT to carry when reporting to hub: hub explicitly said 'your numbers = your config; do NOT copy these three'. SE picked the same 6/15/3 as a DELIBERATE STARTING POINT chosen by the owner, NOT an unconscious copy. Re-tune after cycle-2 (H24 caveat (c): the real delta only appears from run-2; n=1 at the hub is mocc-0, so nobody may sell 'proven effective' yet).",
"light_every": 6,
"deep_every": 15,
"jump_on_class_repeat": 3
},
"lead_self_audit": {
"_note": "Harness-24 (S121, 2026-07-15, wave adap-6-broadcast W2) CLOSED enum of flag classes for the 2 monitor roles lead-view-auditor + lead-omission-auditor. CLOSED = a monitor may NOT invent a class; an unclassifiable finding is reported verbatim + escalated to the owner to extend this list. Rationale (spec v2 M4): v1 required 'class in a CLOSED enum' but never listed the enum nor named the config key, so the enum lived only in one lane's head -- workers never see it, invent their own classes, and the statistics dilute. That is exactly what H24 §2(1) forbids. 5 view-* + 5 gap-* mirrors the 5+5 signals in H24 §2(1).",
"_vocab_guard": "'view' / 'omission' chosen DELIBERATELY to avoid collisions: scripts/governance-detectors.ps1:15 already owns 'derived-staleness' (so no class may be named *-stale-role or vai-STALE), and the bare word 'GAP' is overloaded elsewhere (session-end.md 'build-gap vs floor-rot'; scripts/memory-selfimprove-audit.ps1 'CRITERIA+GAP'). A colliding name would make two different detectors answer to the same word.",
"flag_classes": [
"view-stale-count",
"view-stale-status",
"view-stale-header",
"view-stale-role-desc",
"view-residual-asym",
"gap-carry-dropped",
"gap-carry-aged",
"gap-owner-specifics",
"gap-decision-sunk",
"gap-underfill"
]
},
"measured": {
"_note": "S107 2026-07-10 FRESH re-measure (scripts/measure-agent-memory.ps1) post +office-document 12th sub (roster 11->12). Supersedes S98 snapshot (deltas S99-S107 transcribed: cicd +#489 run-record, tooling S106 self-compact 19.7->16.9KB L1 + 30.3KB archive, harvest 18.1KB over self-target 17.1K [self-compact next session], inv-cb/reviewer archive growth). byte-governor snapshot (l1_hot = file-size-on-disk); cross-check token_governor for the orthogonal token-thread. WATCH: cicd l2_index 18774/20480 (~92% cap) -> when nears cap, gist-of-index or split, do NOT drop markers.",
"cicd-monitor": { "l1_hot": 20180, "l2_verbatim": 209666, "l2_index": 18774, "l2_gist": 29737, "rollout": "done (S107 +Run#489 record + #69 two-mode amend; L1 20.2KB — curate candidate next closeout)" },