From 4e09413fdb0af19df72059d82710b23e07066eb2 Mon Sep 17 00:00:00 2001 From: pqhuy1987 Date: Tue, 16 Jun 2026 12:48:37 +0700 Subject: [PATCH] [CLAUDE] Skill: adopt Harness-8 all-inherit (11 sub -> inherit, go two-tier H4) + email-back ai_infra AI_INFRA broadcast 2026-06-16 (BAT BUOC, PROJECT-FIT 6/6). Flip 7 demoted subs claude-opus-4-8 -> inherit (all 11 inherit; SE has no cheap helper/gopher); agents/README + hmw.js comments codify (resolveModel defers frontmatter). adap-report + email-back (content_sha256 fa7f690d round-trip MATCH). Nac executed-file VERIFIED-pending-restart (frontmatter no hot-reload). Runtime unchanged now (inherit=Opus 4.8 1M since Fable suspended H5); forward-looking + H5.6 restore simpler. Co-Authored-By: Claude Opus 4.8 (1M context) --- .claude/agents/README.md | 5 +- .claude/agents/cicd-monitor.md | 2 +- .claude/agents/frontend-designer.md | 2 +- .claude/agents/implementer-backend.md | 2 +- .claude/agents/implementer-frontend.md | 2 +- .claude/agents/investigator-api.md | 2 +- .claude/agents/test-specialist.md | 2 +- .claude/agents/tooling-auditor.md | 2 +- .claude/workflows/hmw.js | 22 +++--- broadcasts/_index.md | 1 + ...6-se-to-ai_infra-harness-8-adopt-status.md | 38 ++++++++++ ...-harness-8-all-inherit-workflow-fastest.md | 72 +++++++++++++++++++ 12 files changed, 132 insertions(+), 20 deletions(-) create mode 100644 broadcasts/outbox/ai_infra/2026-06-16-se-to-ai_infra-harness-8-adopt-status.md create mode 100644 docs/governance/adap-reports/2026-06-16-Governance-harness-8-all-inherit-workflow-fastest.md diff --git a/.claude/agents/README.md b/.claude/agents/README.md index 34e06de..db69793 100644 --- a/.claude/agents/README.md +++ b/.claude/agents/README.md @@ -1,6 +1,6 @@ # Multi-agent SOLUTION_ERP — Master Coordination Guide (11-agent) -> **Architecture:** 11 sub-agents **two-tier model (Harness-4 2026-06-10)** + em main **Fable 5 (1M) Max** coordinator — **9 product/quality** (7 core + frontend-designer pink S47 + database-agent read-advisory S52) + **2 monitor INFORM-only** (`tooling-auditor` H1 + `harvest-curator` H2, 2026-06-07 Harness 1). Tier: **4 promote `model: inherit` = Fable 5 1M** (reviewer H4.3a · investigator-codebase H4.3b · database-agent H4.3b · harvest-curator H4.3c) · **7 demote pin `claude-opus-4-8`** (2 implementer · test-specialist · cicd-monitor · investigator-api · frontend-designer · tooling-auditor) · effort **Max cả 2 tier** (env machine-wide). +> **Architecture:** 11 sub-agents **all-inherit top-tier (Harness-8 2026-06-16 — thay thế two-tier Harness-4)** + em main **Fable 5 (1M) Max** coordinator — **9 product/quality** (7 core + frontend-designer pink S47 + database-agent read-advisory S52) + **2 monitor INFORM-only** (`tooling-auditor` H1 + `harvest-curator` H2, 2026-06-07 Harness 1). Tier: **toàn bộ 11 sub `model: inherit`** (ăn top-tier model của lead — hiện Opus 4.8 1M do Fable suspended H5, tự lên Fable 5 khi về) · effort **Max** (env machine-wide). SE KHÔNG có lớp helper/gopher rẻ (cả 11 đều substantive memory-bearing → cả 11 lên inherit). *(Trước H8: 4 promote inherit + 7 demote pin `claude-opus-4-8` — lịch sử ở Upgrade 2026-06-10 + S66 dưới.)* > **Upgrade S52 (2026-06-08 — AI_INFRA broadcast `2026-06-08-Agent-database-codebase-agents`):** **+database-agent (read-advisory DB specialist, floor DB1–DB11)** — schema/query/migration-design-review/perf/concurrency (DB11 RowVersion vá lost-update S43). Tailor READ-tier (implementer-backend vẫn author) · color OMIT (8 standard hết) · `store_memory` strip. `codebase-agent` = **SKIP n-a** (investigator-codebase đã cover grep/audit + `csharp-lsp` Windows no-op). ✅ **verified-runtime** — spawned OK S53 (first real spawn, caught Mig 46 committed-but-unapplied-local drift) + S56 2× (pre-golive-verify schema-stream + golive-harden design+review). DB11 lost-update fix landed S56 (atomic ExecuteUpdate + Serializable tx, gotcha #58). > Pattern: Anthropic Building Effective Agents orchestrator-workers + Cognition "writes single-threaded" hybrid + post-deploy automated watchdog. > **Upgrade S39 (2026-05-29):** 4→7 agent (split investigator + implementer, +test-specialist) + budget +50% + 5 RAG MCP per agent. Reference BVAAU 7-agent config (adapted, NOT copied — SOLUTION_ERP 2-FE-app fit + 6 skill proven battle-test 38 session). Prior: S20t12 initial 3 + S21t1 +cicd-monitor. @@ -9,6 +9,7 @@ > **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-...`. > **Upgrade S64 (2026-06-15 — Harness-7 writing-quality adopt):** sàn chất lượng viết **hướng ra ngoài** (email · broadcast · adap-report · tài-liệu-sister · **câu trả lời lead cho anh**) phải tiếng Việt rõ nghĩa, câu hoàn chỉnh, đủ dấu câu, đúng ngữ pháp (O1); nội bộ giữ lối nén §6.4/§6.5 (O2 — bất đối xứng); reviewer +**Category 6** writing-quality (O3, verified-pending-restart). Rule canonical `docs/rules.md §1.1`. adap-report `2026-06-15-Governance-harness-7-writing-quality.md`. body-hash `a4580ea9…` verified-MATCH (lesson gotcha #61: verify body-hash PHẢI đọc UTF-8 tường minh, PS5.1 default mis-decode tiếng Việt → false-mismatch). +> **Upgrade S66 (2026-06-16 — Harness-8 all-inherit + workflow-fastest adopt):** 🔴 BẮT BUỘC (anh-chốt, mọi sister; chất lượng trên chi phí). **H8.1** — toàn bộ 11 sub-agent có memory → `model: inherit` (ăn top-tier lead), **GỠ cơ chế demote two-tier của Harness-4** (7 sub pin `claude-opus-4-8` đã flip `inherit`: 2 implementer · test-specialist · cicd-monitor · investigator-api · frontend-designer · tooling-auditor; 4 đã-inherit giữ nguyên reviewer·investigator-codebase·database-agent·harvest-curator). SE KHÔNG có helper/gopher rẻ để chừa → cả 11 lên inherit. Escape-hatch per-task `tier:'opus'` (hmw.js) GIỮ cho sweep/cost. **H8.2** — chạy workflow nhanh nhất: **song song tối đa + xuất nhanh + lead auto-HMW** cho task substantive (theo H6) — "nhanh" = parallelism, **KHÔNG phải hạ model**. **Caveat (trung thực):** runtime HIỆN KHÔNG đổi (inherit = Opus 4.8 1M vì Fable suspended H5 — trùng two-tier đã collapse); khác biệt thật khi Fable về (cả đội tự lên Fable 5 không sửa frontmatter) + H5.6 restore gọn hơn (chỉ đổi lead). Frontmatter no hot-reload → **executed-file, VERIFIED-pending-restart**. `[1m]` cấm trong frontmatter `model` (gotcha #37). adap-report `2026-06-16-Governance-harness-8-all-inherit-workflow-fastest.md`. --- @@ -25,7 +26,7 @@ │ • Synthesize cross-agent findings + commit/push (em main only)│ │ • Fallback solo nếu spawn fail (gotcha #53 truncate / 529) │ └──────────────────────────────────────────────────────────────┘ - ↓ spawn + keep-alive (two-tier H4: 4 promote inherit Fable 5 · 7 demote pin Opus 4.8 — Max cả 2) + ↓ spawn + keep-alive (Harness-8 all-inherit: cả 11 sub `model: inherit` = top-tier lead — Max; per-task tier:'opus' escape-hatch giữ) ── RESEARCH (READ) ────────── ── IMPLEMENT (WRITE) ──────────── ── QUALITY ────────── ┌──────────────────┐ ┌───────┐ ┌─────────────────┐ ┌──────────┐ ┌────────┐ ┌─────────┐ ┌────────┐ │investigator- │ │invest-│ │implementer- │ │implement-│ │test- │ │reviewer │ │cicd- │ diff --git a/.claude/agents/cicd-monitor.md b/.claude/agents/cicd-monitor.md index f73cb2b..26d0b48 100644 --- a/.claude/agents/cicd-monitor.md +++ b/.claude/agents/cicd-monitor.md @@ -2,7 +2,7 @@ name: cicd-monitor description: | CI/CD pipeline + post-deploy verification specialist for SOLUTION_ERP. Use proactively AFTER every push to main that triggers Gitea Actions deploy (code commits — skip docs-only per path-filter gotcha #41). Polls Gitea Actions run status via API, verifies test gate pass (Domain 58 + Infra 23 tests baseline), confirms deploy actually shipped (FE bundle hash change × 2 app + EF migrations applied prod), smoke tests prod endpoints (api/admin/eoffice.solutions.com.vn). NEVER writes code — produces PASS/FAIL verdict with concrete evidence from logs + curl + sqlcmd. Catches deploy fail tự động không phụ thuộc em main nhớ verify. -model: claude-opus-4-8 +model: inherit tools: [Read, Grep, Glob, Bash, WebFetch, mcp__rag-unified__search_memory, mcp__rag-unified__search_code, mcp__rag-unified__cross_project_search, mcp__rag-unified__list_projects] skills: - iis-deploy-runbook diff --git a/.claude/agents/frontend-designer.md b/.claude/agents/frontend-designer.md index 2b94485..efcf2bd 100644 --- a/.claude/agents/frontend-designer.md +++ b/.claude/agents/frontend-designer.md @@ -2,7 +2,7 @@ name: frontend-designer description: | Frontend DESIGN specialist cho 2 app SOLUTION_ERP (fe-admin :8082 + fe-user :8080 — React 19 + Vite 8 + TS 6 + shadcn/ui + Tailwind + TanStack Query). Sinh/redesign UI ĐẸP THẬT qua design-system-first + visual-verification loop (Playwright screenshot ≥2 viewport → rubric → fix → lặp) + anti-generic-aesthetic. Production-grade FE code + a11y WCAG-AA. Dùng khi build/redesign page/dashboard/component, "làm cho đẹp", thiết kế UX mới. Design-by-code KHÔNG Figma. KHÔNG đụng BE/DB/business-logic (đó là implementer-backend) · KHÔNG cookie-cutter mechanical mirror theo spec đã chốt (đó là implementer-frontend) — phân biệt bằng output contract: cần ĐẸP/UX → tôi; cần scaffold-theo-spec → implementer-frontend. -model: claude-opus-4-8 +model: inherit effort: max tools: [Read, Write, Edit, Bash, Grep, Glob, Skill, WebFetch, WebSearch, mcp__rag-unified__search_memory, mcp__rag-unified__search_code, mcp__rag-unified__cross_project_search, mcp__rag-unified__list_projects] memory: project diff --git a/.claude/agents/implementer-backend.md b/.claude/agents/implementer-backend.md index 70fdb76..6745f80 100644 --- a/.claude/agents/implementer-backend.md +++ b/.claude/agents/implementer-backend.md @@ -2,7 +2,7 @@ name: implementer-backend description: | WRITE specialist cho toàn bộ .NET backend SOLUTION_ERP (Domain + Application + Infrastructure + Api layer). Scaffold entity + enum + EF Configuration + Migration 3-file + DbInitializer seed + CQRS Command/Query/Validator/Handler + MediatR + Controller + DTO. Case 1+2+3+5 only (cookie-cutter mechanical scaffold, multi-file independent orchestrator-workers, isolated method test-gen handler, mass migration). DO NOT touch FE 2 app (đó là implementer-frontend). DO NOT write test assertions (đó là test-specialist). DO NOT schema design / UX decision / cross-stack bug fix reasoning (em main solo). Auto-refuses out-of-scope. -model: claude-opus-4-8 +model: inherit tools: [Read, Edit, Write, Bash, Skill, Grep, Glob, mcp__rag-unified__search_memory, mcp__rag-unified__search_code, mcp__rag-unified__cross_project_search, mcp__rag-unified__list_projects] skills: - ef-core-migration diff --git a/.claude/agents/implementer-frontend.md b/.claude/agents/implementer-frontend.md index a38c4c7..f9bdd57 100644 --- a/.claude/agents/implementer-frontend.md +++ b/.claude/agents/implementer-frontend.md @@ -2,7 +2,7 @@ name: implementer-frontend description: | WRITE specialist cho FE 2 app SOLUTION_ERP (fe-admin + fe-user React 19 + Vite 8 + TS 6 + shadcn/ui + TanStack Query). Cookie-cutter mirror page/types/component cross-app SHA256 IDENTICAL + Pattern 16-bis 4-place mirror (page + App.tsx route + menuKeys.ts + Layout.tsx staticMap) + declarative KIND_CONFIG Record + npm build × 2 verify. Case 1+2 only (cookie-cutter mirror cross-app, multi-file independent). DO NOT touch .NET backend (đó là implementer-backend). DO NOT schema/UX flow decision (em main solo). Auto-refuses out-of-scope. -model: claude-opus-4-8 +model: inherit tools: [Read, Edit, Write, Bash, Skill, Grep, Glob, mcp__rag-unified__search_memory, mcp__rag-unified__search_code, mcp__rag-unified__cross_project_search, mcp__rag-unified__list_projects] skills: - permission-matrix diff --git a/.claude/agents/investigator-api.md b/.claude/agents/investigator-api.md index 6599617..54839e4 100644 --- a/.claude/agents/investigator-api.md +++ b/.claude/agents/investigator-api.md @@ -2,7 +2,7 @@ name: investigator-api description: | Read-only EXTERNAL research specialist for SOLUTION_ERP. WebFetch/WebSearch official docs (Anthropic engineering, .NET 10 / EF Core 10 / ASP.NET, React 19 / Vite 8 / TanStack Query, shadcn/ui), NuGet + npm CVE/dependency eval, FE library evaluation (license + bundle size impact — vd FullCalendar v6 MIT verify), reference project pattern audit (NamGroup / DH_Y_DUOC / BVAAU cross-project), community sentiment research. EXTERNAL-focused — KHÔNG audit internal codebase or SQL schema (đó là investigator-codebase). NEVER writes code — only returns concise structured findings with source URLs. -model: claude-opus-4-8 +model: inherit tools: [Read, Bash, WebFetch, WebSearch, mcp__rag-unified__search_memory, mcp__rag-unified__search_code, mcp__rag-unified__cross_project_search, mcp__rag-unified__list_projects] skills: - dependency-audit-erp diff --git a/.claude/agents/test-specialist.md b/.claude/agents/test-specialist.md index bbb6da1..575824f 100644 --- a/.claude/agents/test-specialist.md +++ b/.claude/agents/test-specialist.md @@ -2,7 +2,7 @@ name: test-specialist description: | WRITE specialist DEDICATED test layer SOLUTION_ERP (tests/SolutionErp.Domain.Tests + Infrastructure.Tests). xUnit + FluentAssertions 7.2 + EF SQLite TestApplicationDbContext (nvarchar(max)→TEXT override) + IdentityFixture. Domain policy state machine test + Infra code generator + CQRS handler test + reflection-based Authorize policy regression + UNIQUE/Conflict/soft-delete invariant. Test-before BẮT BUỘC cho bug fix + critical algo (codegen/guard/financial/security). DO NOT touch production code (Domain/App/Infra/Api/FE — đó là 2 implementer). Auto-refuses out-of-scope. -model: claude-opus-4-8 +model: inherit tools: [Read, Edit, Write, Bash, Grep, Glob, mcp__rag-unified__search_memory, mcp__rag-unified__search_code, mcp__rag-unified__cross_project_search, mcp__rag-unified__list_projects] skills: - contract-workflow diff --git a/.claude/agents/tooling-auditor.md b/.claude/agents/tooling-auditor.md index 8e759de..a1f0501 100644 --- a/.claude/agents/tooling-auditor.md +++ b/.claude/agents/tooling-auditor.md @@ -2,7 +2,7 @@ name: tooling-auditor description: | Read-only INFORM-only TOOLING-FRESHNESS auditor cho SOLUTION_ERP (H1 — adopt AI_INFRA Harness 1, anh giao 2026-06-07; TÁCH BIỆT khỏi harvest-curator H2 vì 2 việc hay quên+nhầm khi gộp). Audit 4-MẶT mỗi session có cập-nhật ĐẦY-ĐỦ + KỊP-THỜI không: (1) skill (.claude/skills/ 6 project + ~/.claude/skills standalone — mới/đổi/stale/đã-map-vai chưa) · (2) vai-trò sub-agent (.claude/agents/ roster khớp README/CLAUDE.md/STATUS · thừa/idle/scope-drift) · (3) plugin (~/.claude/settings.json enabledPlugins user-global · installed/enabled/assigned/used) · (4) docs (CLAUDE.md·docs/STATUS·agents/README·governance phản-ánh trạng-thái THẬT · drift doc-vs-reality). Lifecycle: @session-start BÁO state + diff-vs-last (THÊM/ĐỔI/XÓA/stale); @session-end CHỐT freshness + AUDIT skill/plugin MỚI phân-bổ (new-alloc) cho em main + sub. Propose-only — em main single-writer (VERIFY→APPEND B3). KHÔNG harvest-memory (đó là harvest-curator). KHÔNG corpus/RAG/deploy (đó là cicd-monitor). KHÔNG store_memory. PHẢI dùng khi audit tooling/docs-freshness + skill/plugin-state + roster-drift đầu/cuối session. -model: claude-opus-4-8 +model: inherit tools: [Read, Grep, Glob, Bash, mcp__rag-unified__search_memory, mcp__rag-unified__search_code, mcp__rag-unified__cross_project_search, mcp__rag-unified__list_projects] memory: project maxTurns: 18 diff --git a/.claude/workflows/hmw.js b/.claude/workflows/hmw.js index d3c9675..0fa7944 100644 --- a/.claude/workflows/hmw.js +++ b/.claude/workflows/hmw.js @@ -26,21 +26,21 @@ const VALID_ROLES = [ 'database-agent', // +S57 — S56 dùng 3× qua fail-soft WARN; read-advisory DB lens (DB1-DB11) ] -// ─── H4.5 two-tier model (Harness-4 adopt 2026-06-10) ─────────────────────── -// Promote-list (gate/verdict-class — frontmatter `model: inherit` = ăn Fable 5 1M từ lead): -// 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 (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. +// ─── H8 all-inherit top-tier (Harness-8 adopt 2026-06-16 — thay thế two-tier H4.5) ── +// MỌI sub-agent có memory → frontmatter `model: inherit` = ăn top-tier lead (hiện Opus 4.8 1M do +// Fable suspended H5; tự lên Fable 5 khi về). KHÔNG còn demote-pin `claude-opus-4-8` (H4.5 đã gỡ). +// hmw KHÔNG set model cho role-có-frontmatter → return undefined, frontmatter (inherit) tự lo. +// Role-less (H6.2 governed-ultracode): default = inherit lead-model (top-tier) — KHÔNG pin rẻ làm default. +// H8.2 "workflow nhanh nhất" = song song tối đa + xuất nhanh, KHÔNG hạ model làm rẻ. +// Escape-hatch per-task tier:'opus' GIỮ cho sweep/cost (ngoại lệ có chủ đích); 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`) + if (tier) log(`⚠️ hmw: tier "${tier}" lạ (task #${i}) → bỏ qua, dùng mặc định H8 (inherit top-tier)`) // 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 → 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 + return undefined // role có frontmatter: tất cả `inherit` (H8 all-inherit top-tier) — KHÔNG override } const SCHEMA = { @@ -91,7 +91,7 @@ const wave = (A.wave && A.wave.dir) ? A.wave : null if (wave) log(`hmw: WAVE-MODE on → dir=${wave.dir} (sub ghi sub-MD isolated; em main scaffold @P1; H2 harvest-curator gom @session-end B5).`) phase('Execute') -log(`HMW P2: fan-out ${A.taskList.length} task (${wave ? 'WAVE-MODE' : 'return-delta-only'}, two-tier H4.5 promote-inherit/demoted-opus, memory-pack-injected, scope=SOLUTION_ERP repo only)`) +log(`HMW P2: fan-out ${A.taskList.length} task (${wave ? 'WAVE-MODE' : 'return-delta-only'}, H8 all-inherit top-tier, memory-pack-injected, scope=SOLUTION_ERP repo only)`) const results = await parallel(A.taskList.map((t, i) => () => { const raw = t && t.role @@ -137,7 +137,7 @@ const results = await parallel(A.taskList.map((t, i) => () => { agentType: role || undefined, schema: SCHEMA, label: (t && t.label) || `hmw:${role || 'task'}-${i}`, - model: resolveModel(role, raw, t && t.tier, i), // H4.5 two-tier (undefined = theo frontmatter/inherit) + model: resolveModel(role, raw, t && t.tier, i), // H8 all-inherit (undefined = theo frontmatter = inherit) }) })) diff --git a/broadcasts/_index.md b/broadcasts/_index.md index 284c0ae..7e68262 100644 --- a/broadcasts/_index.md +++ b/broadcasts/_index.md @@ -23,3 +23,4 @@ | 2026-06-11 | 2026-06-11-se-to-ai_infra-harness-4-runtime-verified | se → ai_infra | outbox/ai_infra | ecf1d58797af | | 2026-06-15 | 2026-06-15-se-to-ai_infra-harness-5-6-adopt-report | se → ai_infra | outbox/ai_infra | 8a247984df9f | | 2026-06-15 | 2026-06-15-se-to-ai_infra-harness-7-adopt-report | se → ai_infra | outbox/ai_infra | 7e4f91f1ff7f | +| 2026-06-16 | 2026-06-16-se-to-ai_infra-harness-8-adopt-status | se → ai_infra | outbox/ai_infra | fa7f690d9ce6 | diff --git a/broadcasts/outbox/ai_infra/2026-06-16-se-to-ai_infra-harness-8-adopt-status.md b/broadcasts/outbox/ai_infra/2026-06-16-se-to-ai_infra-harness-8-adopt-status.md new file mode 100644 index 0000000..775240b --- /dev/null +++ b/broadcasts/outbox/ai_infra/2026-06-16-se-to-ai_infra-harness-8-adopt-status.md @@ -0,0 +1,38 @@ +--- +id: 2026-06-16-se-to-ai_infra-harness-8-adopt-status +from: se +to: ai_infra +category: Governance +type: report +date: 2026-06-16 +content_sha256: fa7f690d9ce6b6dfba659069802ab31f6f3b5753d7d7f2181c064a978b749889 +nac: sent +--- + +# [se → ai_infra] Báo nấc adopt Harness-8 (all-inherit + workflow-fastest) + +Chào đội AI_INFRA, + +SOLUTION_ERP (sister `se`) đã áp broadcast `2026-06-16-Governance-harness-8-all-inherit-workflow-fastest`. Đây là báo cáo nấc trạng thái thật theo yêu cầu SELF-CHECK của broadcast. + +## Nấc: executed-file · VERIFIED-pending-restart + +Các file đã được đổi trên đĩa, nhưng frontmatter agent không nạp nóng giữa phiên, nên cần restart Claude Code CLI thì runtime mới có hiệu lực. Em chưa spawn-test, do đó không claim verified-runtime. + +## Đã làm (tailored theo roster thật 11 sub của SE) + +- **H8.1 — flip 7 sub demoted sang `inherit`:** trước H8, SE theo Harness-4 two-tier (4 sub promote `inherit` + 7 sub demote pin `claude-opus-4-8`). Em đã đổi frontmatter `model:` của đúng 7 sub bị pin sang `inherit`: implementer-backend, implementer-frontend, test-specialist, cicd-monitor, investigator-api, frontend-designer, tooling-auditor. Bốn sub vốn đã `inherit` (reviewer, investigator-codebase, database-agent, harvest-curator) giữ nguyên. Kết quả: cả 11/11 sub đều là `model: inherit`. Frontmatter dùng `inherit` thuần, không có hậu tố `[1m]` (giữ gotcha #37). +- **SE không có lớp helper/gopher rẻ:** cả 11 sub đều là vai substantive có memory, nên không có vai nào được chừa lại ở model rẻ — cả 11 lên top-tier. Ngoại lệ helper trong broadcast không có đối tượng áp dụng tại SE; đây là điều đã nêu rõ, không phải thiếu sót. +- **H8.2 — workflow fastest:** đã codify rule "song song tối đa + xuất nhanh + lead auto-HMW cho tác vụ đáng kể, KHÔNG hạ model làm rẻ". Cơ chế lead auto-HMW đã sẵn từ Harness-6 (governed-ultracode). Escape-hatch per-task `tier:'opus'` trong `hmw.js` được giữ cho nhu cầu sweep/cost. +- **Codify canonical:** `agents/README.md` (cập nhật header + thêm mục Upgrade S66 đánh dấu thay thế two-tier Harness-4 + chú thích sơ đồ) và cập nhật comment `hmw.js` (logic `resolveModel` vốn đã defer theo frontmatter, nên flip frontmatter sang `inherit` là tự lan, không cần đổi logic). + +## Caveat (trung thực, không nói quá) + +Runtime hiện tại chưa đổi: top-tier khả dụng lúc này là Opus 4.8 (1M) do Fable đang tạm ngưng theo Harness-5, nên `inherit` hiện thời chính là Opus 4.8 (1M), trùng đúng trạng thái two-tier đã collapse từ S63. Khác biệt thật (cả đội ăn Fable 5) chỉ xuất hiện khi Fable trở lại, lúc đó cả 11 sub tự lên Fable 5 mà không cần sửa lại frontmatter. Một điểm cộng kèm theo: việc khôi phục Fable theo H5.6 giờ gọn hơn — chỉ cần đổi lead về Fable 5, không phải sửa frontmatter từng sub nữa. + +## Tham chiếu + +adap-report đầy đủ ở repo SE: `docs/governance/adap-reports/2026-06-16-Governance-harness-8-all-inherit-workflow-fastest.md`. + +Trân trọng, +se (SOLUTION_ERP) diff --git a/docs/governance/adap-reports/2026-06-16-Governance-harness-8-all-inherit-workflow-fastest.md b/docs/governance/adap-reports/2026-06-16-Governance-harness-8-all-inherit-workflow-fastest.md new file mode 100644 index 0000000..8c53b6c --- /dev/null +++ b/docs/governance/adap-reports/2026-06-16-Governance-harness-8-all-inherit-workflow-fastest.md @@ -0,0 +1,72 @@ +--- +id: 2026-06-16-Governance-harness-8-all-inherit-workflow-fastest +from: ai_infra +applied_by: se (SOLUTION_ERP) +applied_date: 2026-06-16 +nac: executed-file · VERIFIED-pending-restart +project_fit: 6/6 (áp trọn — không skip phần nào) +source_content_sha256: cc1cedc06cd12c5daa8e2ca90fde55ba1216afeeecdc7a2137198d2100011d14 +--- + +# Adap-report — Harness-8 (all-inherit top-tier + workflow-fastest) + +> SOLUTION_ERP (sister `se`) áp broadcast `2026-06-16-Governance-harness-8-all-inherit-workflow-fastest` của AI_INFRA. Đây là luật BẮT BUỘC (anh-chốt, mọi sister). Báo cáo này ghi đúng nấc trạng thái thật, kèm bằng chứng file, phần tailor theo roster thật của SE, và caveat trung thực. + +## 1. Broadcast yêu cầu gì (FUNCTION-floor) + +- **H8.1** — Toàn bộ sub-agent có memory phải chuyển sang `model: inherit` để ăn model top-tier của lead; bỏ cơ chế hạ bậc (demote) two-tier của Harness-4. Ngoại lệ: lớp helper/gopher rẻ (read-only chỉ tra cứu file/web) giữ model rẻ. Escape-hatch per-task vẫn cho hạ bậc cho một tác vụ cụ thể. +- **H8.2** — Chạy workflow ở tốc độ nhanh nhất: song song tối đa, xuất nhanh, lead tự động chạy workflow cho tác vụ đáng kể (theo Harness-6). "Nhanh nhất" KHÔNG có nghĩa là hạ model — tốc độ đến từ song song, top-tier ở khắp nơi. + +## 2. PROJECT-FIT — 6/6, áp trọn + +SOLUTION_ERP dùng đầy đủ sub-agent (11 sub) và workflow (`hmw.js`), nên luật áp cho toàn bộ. SE **không có** lớp helper/gopher rẻ (roster 11 sub đều là vai substantive có memory: 7 core + frontend-designer + database-agent + 2 monitor) — do đó không có vai nào được chừa lại ở model rẻ; cả 11 đều lên `inherit`. + +## 3. SE đã làm gì (tailored theo roster thật 11 sub) + +### H8.1 — Flip 7 sub demoted → `inherit` +Trước H8 (theo Harness-4 two-tier): 4 sub promote `inherit` + 7 sub demote pin `claude-opus-4-8`. SE đã đổi frontmatter `model:` của **đúng 7 sub bị pin** sang `inherit`: + +| Sub-agent (flip) | File:line | Trước | Sau | +|---|---|---|---| +| implementer-backend | `.claude/agents/implementer-backend.md:5` | claude-opus-4-8 | inherit | +| implementer-frontend | `.claude/agents/implementer-frontend.md:5` | claude-opus-4-8 | inherit | +| test-specialist | `.claude/agents/test-specialist.md:5` | claude-opus-4-8 | inherit | +| cicd-monitor | `.claude/agents/cicd-monitor.md:5` | claude-opus-4-8 | inherit | +| investigator-api | `.claude/agents/investigator-api.md:5` | claude-opus-4-8 | inherit | +| frontend-designer | `.claude/agents/frontend-designer.md:5` | claude-opus-4-8 | inherit | +| tooling-auditor | `.claude/agents/tooling-auditor.md:5` | claude-opus-4-8 | inherit | + +4 sub vốn đã `inherit` (reviewer · investigator-codebase · database-agent · harvest-curator) giữ nguyên. **Kết quả: cả 11/11 sub = `model: inherit`** (verify bằng `grep ^model: .claude/agents/` → 11 dòng `inherit`, 0 dòng `claude-opus-4-8`). Frontmatter dùng `inherit` thuần, KHÔNG có hậu tố `[1m]` (giữ gotcha #37). + +### H8.2 — Workflow fastest +Codify rule "chạy workflow nhanh nhất = song song tối đa + xuất nhanh + lead auto-HMW cho task substantive, KHÔNG hạ model". Cơ chế lead auto-HMW đã sẵn từ Harness-6 (governed-ultracode, mode-ON). Escape-hatch per-task `tier:'opus'` trong `hmw.js` được GIỮ cho nhu cầu sweep/cost (ngoại lệ có chủ đích đúng tinh thần broadcast). + +### Codify canonical + đồng bộ engine +- **`.claude/agents/README.md`** — rule canonical model-tier của SE (rules.md không chứa mục model-tier): cập nhật header "two-tier" → "all-inherit top-tier (Harness-8, thay thế Harness-4)"; thêm mục "Upgrade S66 (Harness-8)" ghi rõ H8.1 + H8.2 + đánh dấu thay thế two-tier; cập nhật chú thích sơ đồ ASCII. Giữ nguyên các mục lịch sử Harness-4 (2026-06-10) và Harness-5 (S63) như dấu mốc đã-từng-đúng. +- **`.claude/workflows/hmw.js`** — cập nhật khối comment H4.5 → H8 all-inherit (logic `resolveModel` vốn đã `return undefined` cho role-có-frontmatter, tức tự suy theo frontmatter; flip frontmatter sang inherit là tự lan, không cần đổi logic). Cập nhật log-line + comment call-site. + +## 4. Nấc trạng thái (G-011) — trung thực + +**executed-file · VERIFIED-pending-restart.** Các file `.md` agent + `hmw.js` đã đổi trên đĩa (bằng chứng ở §3), nhưng frontmatter agent KHÔNG nạp nóng giữa phiên — phải **restart Claude Code CLI** thì runtime mới đọc `inherit` mới. Em CHƯA spawn-test nên KHÔNG claim "verified-runtime". Sau khi anh restart, một spawn-test bất kỳ (ví dụ self-report model của implementer-backend) sẽ nâng nấc lên verified-runtime. + +## 5. SELF-CHECK của broadcast + +- [x] Đã ghi luật Harness-8 vào nguồn rule canonical (`agents/README.md`), đánh dấu thay thế two-tier Harness-4. +- [x] Mọi sub-agent đang pin model rẻ (7 sub) đã đổi sang `model: inherit`. +- [x] Các vai vốn đã `inherit` (4 sub) giữ nguyên; SE không có helper/gopher rẻ nên không có vai nào cần chừa. +- [x] Hiểu đúng "workflow nhanh nhất" = song song tối đa + xuất nhanh, KHÔNG hạ model (đã ghi rõ trong rule + comment hmw.js). +- [x] Frontmatter `model` KHÔNG có hậu tố `[1m]` (gotcha #37) — dùng `inherit` thuần. +- [x] Gửi email-back báo nấc trạng thái thật (executed-file, pending-restart) — xem §7. + +## 6. Caveat (trung thực, không nói quá) + +- **Runtime hiện tại KHÔNG đổi.** Top-tier khả dụng lúc này là Opus 4.8 (1M) vì Fable 5 đang tạm ngưng (Harness-5). Do đó `inherit` hiện thời = Opus 4.8 (1M), trùng đúng trạng thái two-tier đã collapse từ S63. Khác biệt thật (cả đội ăn Fable 5) chỉ xuất hiện khi Fable trở lại — lúc đó cả 11 sub tự lên Fable 5 mà KHÔNG cần sửa lại frontmatter. +- **Bonus tương tác với H5.6:** việc khôi phục Fable (H5.6) giờ gọn hơn — chỉ cần đổi lead về Fable 5 + spawn-test; không phải sửa frontmatter từng sub nữa (cả đội inherit theo lead). +- **Chi phí:** với SE, vì Fable đang down, chi phí runtime chưa tăng (vẫn Opus 4.8). Khi Fable về, cả đội chạy Fable 5 sẽ tốn hơn two-tier cũ — đây là đánh đổi có chủ đích (chất lượng trên chi phí) mà SE chấp nhận theo luật. Nếu chi phí thành vấn đề thật, SE sẽ surface qua adap-request. +- **Phạm vi:** chỉ đổi file repo MÌNH (SE). Không đụng outbox AI_INFRA (read-only). + +## 7. Email-back +Đã gửi email-back cho AI_INFRA (`broadcasts/outbox/ai_infra/`) báo nấc executed-file + VERIFIED-pending-restart. (Xem `_index.md` §OUTBOUND.) + +## 8. Phản biện / đề xuất nâng cấp +Không có. Luật rõ ràng, viết roster-agnostic, áp thẳng vào SE không vướng. SE không có lớp helper/gopher rẻ nên ngoại lệ helper trong broadcast không có đối tượng áp dụng tại SE (đã nêu rõ ở §2, không phải thiếu sót).