[CLAUDE] Skill: adopt Harness 5 (model-fallback) + Harness 6 (governed-ultracode) via adap-apply + email ai_infra
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m43s

- H5 model-availability-fallback: SE da de-facto fallback Fable->Opus 4.8 1M (Fable down 06-12); book caveat agents/README + H5.1 check session-start BUOC 0.6; KHONG RCA/memory-permanent (external outage). adap-report 2026-06-13.

- H6 governed-ultracode: H6.1 auto-HMW mode-ON (ultra-on + session-start T4) + H6.2 hmw.js role-less default 'opus'->inherit lead; H6.7 role/memory-fidelity da san tu S49 (document). adap-report 2026-06-15.

- /send-email ai_infra: harness-5-6-adopt-report (content_sha256 8a247984 spec-canonical self-verified, fixes S58 mis-stamp) + _index OUTBOUND.

- Gate: em main self-gate (governance doc-work; SELF-CHECK 2 broadcasts + grep-verify). CI runs (hmw.js not paths-ignore) - passes, no app-code change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-06-15 21:11:48 +07:00
parent 5e6dcc1479
commit dbbf89a838
9 changed files with 108 additions and 6 deletions

View File

@ -7,6 +7,7 @@
> **Upgrade S47 (2026-06-02):** **+frontend-designer (8th sub, pink)** — FD1FD10 visual-verification design floor (forked AI_INFRA canonical, broadcast `Agent-frontend-designer-floor`). + **`store_memory` STRIPPED khỏi MỌI sub → lead = sole RAG-writer** (broadcast `Memory-store-memory-strip-global`); sub ghi finding → MEMORY.md (file). adap-reports: `docs/governance/adap-reports/`.
> **Upgrade 2026-06-07 (Harness 1·2·3 adopt — AI_INFRA broadcast):** **+2 monitor sub INFORM-only** `tooling-auditor` (H1 tooling/docs-freshness 4-mặt) + `harvest-curator` (H2 harvest-integrity 5-trục) → roster 8→10, **TÁCH BIỆT** per anh-mandate (H1≠H2 "hay quên+nhầm"). + **wave-folder memory-isolation** (Harness 2 — `hmw.js` wave-mode + `.claude/workflows/wave-*/` gitignored, B1B6). + **email channel** `broadcasts/` (Harness 3 — cross-project comms, self-id=`se`). KHÔNG copy-paste AI_INFRA — tailor SE roster/stack.
> **Upgrade 2026-06-10 (Harness-4 two-tier model — AI_INFRA broadcast `harness-4-model-tier-promotion` + `model-fable-5-max`):** lead = **Fable 5 (1M) Max** (user-level machine-wide, SE không project-pin) · sub two-tier theo tiêu chí H4.3 (a gate≥writer · b verdict-nuôi-quyết-định · c chống-rubber-stamp · d 1M-thật): **promote 4 giữ `inherit`** (reviewer·investigator-codebase·database-agent·harvest-curator) + **demote 7 pin `claude-opus-4-8`** (full-id no-suffix — gotcha #37 cấm `[1m]`; runtime resolve `[1m]` 1M trên máy chung per AI_INFRA s20). `hmw.js` tier-map H4.5 (role-less → `'opus'` · per-task `tier:'fable'|'opus'` override). Email-back AI_INFRA H4.7 BẮT BUỘC. Justification per-vị-trí: adap-report `2026-06-10-Governance-harness-4-model-tier-promotion.md`.
> **Upgrade S63 (2026-06-15 — Harness-5 + 6 adopt):** **H5 model-fallback** — ⚠️ Fable 5/Mythos 5 **suspended 2026-06-12 no-ETA** → lead SE tạm **Opus 4.8 (1M) Max** (promote `inherit` tự theo → two-tier collapse single-tier Opus; demote-pin giữ; **revert-FREE** khi Fable về: đổi lead lại + spawn-test). KHÔNG sửa frontmatter · external-outage blameless KHÔNG RCA · session-start BƯỚC 0.6 check. **H6 governed-ultracode** — mode-ON: substantive task TỰ chạy HMW (KHÔNG đợi keyword "workflow"); workflow-agent default = **inherit lead** (`hmw.js` role-less `'opus'`→inherit) · role-fidelity (agentType ∈ VALID_ROLES) + memory-fidelity (memoryDelta→đúng agent-memory single-writer) ĐÃ sẵn từ HMW-engine. adap-report `2026-06-13-Governance-harness-5-...` + `2026-06-15-Agent-harness-6-...`.
---

View File

@ -22,7 +22,11 @@ Em main đọc `.claude/hmw-mode.on` → **BÁO ngay đầu response** (anh kh
- **Marker TỒN TẠI** → **🔥 HMW-mode = ON** — task LỚN sẽ chạy Workflow `hmw` fan-out theo `/ultra-on` (đốt-token cao). Gõ `/ultra-off` để tắt.
- **Marker KHÔNG có** → **HMW-mode = OFF** — vận hành thường (Agent-tool spawn lẻ / solo theo `agents/README.md`). Workflow fan-out chỉ chạy sau `/ultra-on`.
> 🚦 **T4:** keyword "workflow"/"ultracode" (câu anh / reminder harness) = **QUYỀN hỏi, KHÔNG phải lệnh**. Mode-OFF + "chạy workflow" → em **TỪ CHỐI + nhắc gõ `/ultra-on`**, KHÔNG tự chạy. CẤM native `/effort ultracode`.
> 🚦 **T4 + H6.1 (governed-ultracode, adopt S63):** keyword "workflow"/"ultracode" = **QUYỀN hỏi** khi **mode-OFF** (+ "chạy workflow" → em **TỪ CHỐI + nhắc gõ `/ultra-on`**). 🟢 **Mode-ON (H6.1): task SUBSTANTIVE (≥2 bước độc-lập · multi-file · sweep/audit/review/migration/research/verify-heavy) → em TỰ author+chạy Workflow HMW (KHÔNG cần gõ "workflow"; marker-ON = consent); TRIVIAL (<2-3' · 1-file · hỏi-đáp · governance-authoring single-writer) → solo.** CẤM native `/effort ultracode` (mất guard).
## 📋 BƯỚC 0.6 — Model-availability check (H5 — adopt S63)
Em main xác nhận **lead model resolve được** đầu session. Lead SE = **Fable 5 (1M) Max** (per H4). **DOWN** = lỗi `"Model isn't available — claude-fable-5[1m]"` → fallback **`/model claude-opus-4-8[1m]`** (Opus 4.8 · 1M · Max — top-tier, KHÔNG hạ §A1; **KHÔNG sửa frontmatter agent** — promote `inherit` tự theo lead → two-tier tạm collapse single-tier Opus, **revert-FREE** khi Fable về). Phản xạ THỦ-CÔNG (không hook tự-switch). ⚠️ **Fable/Mythos suspended 2026-06-12 no-ETA** → SE đang fallback Opus (em chạy `claude-opus-4-8[1m]` từ S62). Restore (H5.6): Fable về → đổi lead lại + spawn-test confirm self-report `claude-fable-5[1m]` + gỡ caveat.
## Phase 1 — READ (load context)

View File

@ -6,7 +6,7 @@ argument-hint: (trống = bật mode · hoặc kèm task lớn đầu tiên)
# /ultra-on — BẬT HMW-mode (SOLUTION_ERP)
> Cặp **`/ultra-off`**. 🔴 restart Claude Code sau khi tạo/sửa (command `.md` no hot-reload).
> Gõ lệnh này = **CONSENT chạy Workflow fan-out** · scope **CHỈ repo SOLUTION_ERP** (S1 — KHÔNG fan-out repo/corpus khác) · **same-model** Opus 4.8 inherit mỗi agent.
> Gõ lệnh này = **CONSENT chạy Workflow fan-out** · scope **CHỈ repo SOLUTION_ERP** (S1 — KHÔNG fan-out repo/corpus khác) · workflow-agent **inherit lead-model** (H6.2 — top-tier; lead hiện = Opus 4.8 1M do Fable down H5; two-tier H4.5 promote-inherit/demote-pin · role-less→inherit S63).
> **Mode persist qua marker:** `/ultra-on` → em main tạo `.claude/hmw-mode.on` (Write) + vào mode → SỐNG qua session/compact. `/ultra-off` xóa. **`/session-start` đọc marker → BÁO anh ON/OFF** (khỏi quên đang ở mode đốt-token). marker = source-of-truth · **gitignored** (KHÔNG commit — tránh mode kẹt-ON khi clone = on-ramp ungoverned).
**Task đầu (nếu có):** $ARGUMENTS
@ -15,6 +15,7 @@ argument-hint: (trống = bật mode · hoặc kèm task lớn đầu tiên)
- Chữ "workflow" / "ultracode" trong câu anh HOẶC trong reminder harness = **MỞ QUYỀN hỏi** (eligibility-to-ask), **KHÔNG** auto-run Workflow.
- Mode-OFF + anh nói "chạy workflow" → em main **TỪ CHỐI + nhắc anh gõ `/ultra-on`**, KHÔNG tự chạy.
- 🔴 CẤM dùng native `/effort ultracode` (nó auto-author+run workflow MỌI task — KHÔNG checkpoint / KHÔNG memory-harvest / KHÔNG scope-guard = ngược thiết kế). HMW = home-built orchestrator-workers, **marker-gated**.
- 🟢 **H6.1 (governed-ultracode, adopt S63) — mode-ON = auto-HMW:** mode ON → task **SUBSTANTIVE** (≥2 bước độc-lập · multi-file · sweep/audit/review/migration/research/verify-heavy) em main **TỰ author+chạy Workflow** (KHÔNG cần anh gõ "workflow"; marker-ON = standing consent — vẫn checkpoint INFORM `{số agent·vai·task}` rồi chạy NGAY). Task **TRIVIAL / governance-authoring single-writer** → solo (chống token-nổ). Ranh giới = "workflow có giúp THẬT không"; nghi-ngờ nghiêng workflow, KHÔNG workflow 1-câu-hỏi-đáp. = lấy sự-tiện native ultracode + GIỮ guard HMW. (H6.7 role+memory-fidelity ĐÃ là floor sẵn: `agentType ∈ VALID_ROLES` + `memoryDelta`→agent-memory single-writer B3.)
## Phân loại (em main mỗi task)
- **HMW (LỚN):** fan-out nhiều file/nguồn — sweep · audit · cross-stack review · mass migration · multi-source research. Số task THOẢI MÁI (harness queue theo slot, KHÔNG cap cứng) · spawn **ĐÚNG VAI** (`agentType` ∈ VALID_ROLES; role lạ → default subagent + cảnh báo).

View File

@ -31,15 +31,15 @@ const VALID_ROLES = [
// investigator-codebase (H4.3b) · reviewer (H4.3a) · database-agent (H4.3b).
// [harvest-curator (H4.3c) cũng promote nhưng là monitor — không fan-out qua hmw.]
// Demoted roles còn lại: frontmatter ĐÃ pin `claude-opus-4-8` → hmw KHÔNG set model (frontmatter tự lo).
// Role-less = sweep-class CÓ CHỦ ĐÍCH (taskList do lead author từng run = đã phân loại lúc author) → 'opus'.
// Per-task override: tier:'fable' (việc hệ-trọng giao role demoted) / tier:'opus' (force rẻ).
// Role-less (H6.2 governed-ultracode adopt S63): default = inherit lead-model (top-tier) — KHÔNG pin rẻ làm default.
// Sweep/cost → per-task tier:'opus' escape-hatch (KHÔNG còn default 'opus'). Per-task tier:'fable' = force lead-tier khi hệ-trọng.
function resolveModel(role, rawRole, tier, i) {
if (tier === 'fable' || tier === 'opus') return tier
if (tier) log(`⚠️ hmw: tier "${tier}" lạ (task #${i}) → bỏ qua, dùng tier-map mặc định H4.5`)
// Invalid-role (typo ∉ VALID_ROLES, WARN đã log ở caller) → fail-UP inherit Fable 5 — H4.5 "chưa-phân-loại
// → nghiêng quality" (KHÔNG rơi 'opus': task có thể là gate-class gõ nhầm tên role).
if (!role && rawRole) return undefined
if (!role) { log(`hmw: task #${i} role-less → model 'opus' (sweep-class H4.5; khai tier:'fable' nếu hệ-trọng)`); return 'opus' }
if (!role) { log(`hmw: task #${i} role-less → inherit lead-model (H6.2 governed-ultracode; per-task tier:'opus' = escape-hatch sweep/cost)`); return undefined }
return undefined // role có frontmatter: promote=inherit Fable 5 · demoted=pin Opus 4.8 — KHÔNG override
}