[CLAUDE] Docs: S105 closeout — STATUS/HANDOFF + session log + 4 derived-flush (flip-chain S104-O→S105-F ×3 vị-trí + skills/README Mig62 + trailer→Fable 5)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-07-07 14:43:05 +07:00
parent 54a2c72401
commit 0f16c00d40
7 changed files with 74 additions and 7 deletions

View File

@ -1,6 +1,6 @@
# Multi-agent SOLUTION_ERP — Master Coordination Guide (11-agent)
> **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 — ✅ **Fable 5 1M RESTORED, runtime-verified S98 2026-07-02**: 2 monitor spawn-test self-report `claude-fable-5`; giai đoạn fallback Opus H5 S62→S97 kết thúc; ⚠️ **S101 2026-07-03 runtime = Opus lại** — lead + 2 monitor + WF2-reviewer inherit self-report `claude-opus-4-8`, settings pin fable → Fable unavailable phiên này, H5-fallback revert-free [chi-tiết STATUS §Sub-agents]; ✅ **S102 2026-07-06 runtime = Fable trở lại** — self-report `claude-fable-5` ×3 [lead + 2 monitor], per-session availability · ⚠️ **S103 2026-07-06: runtime = Opus LẠI** (Fable outage lần nữa — lead + spawn-inherit self-report `claude-opus-4-8`, H5-fallback revert-free) → per-session flip S98→S101-Opus→S102-Fable→**S103-Opus**, BƯỚC 0.6 probe mỗi phiên) · 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.)*
> **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 — ✅ **Fable 5 1M RESTORED, runtime-verified S98 2026-07-02**: 2 monitor spawn-test self-report `claude-fable-5`; giai đoạn fallback Opus H5 S62→S97 kết thúc; ⚠️ **S101 2026-07-03 runtime = Opus lại** — lead + 2 monitor + WF2-reviewer inherit self-report `claude-opus-4-8`, settings pin fable → Fable unavailable phiên này, H5-fallback revert-free [chi-tiết STATUS §Sub-agents]; ✅ **S102 2026-07-06 runtime = Fable trở lại** — self-report `claude-fable-5` ×3 [lead + 2 monitor], per-session availability · ⚠️ **S103 2026-07-06: runtime = Opus LẠI** (Fable outage lần nữa — lead + spawn-inherit self-report `claude-opus-4-8`, H5-fallback revert-free) → per-session flip S98→S101-Opus→S102-Fable→S103-Opus→**S104-Opus** (2026-07-06 outage tiếp, ×3 self-report `claude-opus-4-8`) → ✅ **S105-Fable** (2026-07-07 Fable VỀ lần 3 — lead + 2 monitor self-report `claude-fable-5` ×3, runtime-verified), BƯỚC 0.6 probe mỗi phiên) · 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 DB1DB11)** — 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.

View File

@ -110,7 +110,7 @@ Plan cha: [tên]
### 5.1 Release + commit
- Kiểm tra release, commit task vừa hoàn thành. ⚠️ Update `SolutionErp.slnx` nếu có `.cs/.csproj` mới.
- Format: `[CLAUDE] <scope>: <imperative message>` + `Co-Authored-By: <lead model hiện tại> <noreply@anthropic.com>` (hiện = **Claude Opus 4.8** — S103 Fable-outage, H5-fallback; đổi theo BƯỚC 0.6 session-start — availability per-session)
- Format: `[CLAUDE] <scope>: <imperative message>` + `Co-Authored-By: <lead model hiện tại> <noreply@anthropic.com>` (hiện = **Claude Fable 5** — S105 Fable về lần 3, runtime-verified ×3 self-report; đổi theo BƯỚC 0.6 session-start — availability per-session)
- Scope: `Contract · PurchaseEvaluation · Budget · Form · Workflow · Supplier · Auth · Admin · Api · App · Domain · Infra · FE-Admin · FE-User · Tests · Docs · CICD · Scripts · Skill`
### 5.2 Push remote

View File

@ -34,7 +34,7 @@ Em main đọc `.claude/fable-real-mode.on` → **BÁO ngay** (mode phán-quyế
## 📋 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 RESTORED 2026-07-02 (S98)** — lead chạy `claude-fable-5[1m]` (settings.json:11) + spawn-test inherit ×2 monitor self-report `claude-fable-5` → H5.6 hoàn tất, caveat suspended-2026-06-12 (fallback Opus S62→S97) đã gỡ. Nếu DOWN lại → fallback theo quy trình trên. ⚠️ **S101 (2026-07-03): runtime = Opus LẠI** (Fable unavailable — lead + 3 spawn inherit-chain self-report `claude-opus-4-8`) → H5-fallback tự-kích, revert-free; "RESTORED S98" = point-in-time KHÔNG steady-state (chi-tiết STATUS §Sub-agents). ✅ **S102 (2026-07-06): Fable resolve lại bình thường** (lead + 2 monitor self-report `claude-fable-5`) → fallback-S101 đóng; giữ phản xạ probe mỗi phiên (availability = per-session, không tin note phiên trước). ⚠️ **S103 (2026-07-06): runtime = Opus LẠI** (Fable outage lần nữa — lead + spawn-inherit self-report `claude-opus-4-8`) → H5-fallback tự-kích lại, revert-free. Per-session flip xác-nhận: S98-Fable→S101-Opus→S102-Fable→**S103-Opus** (chính xác lý-do BƯỚC 0.6 probe MỖI phiên, KHÔNG steady-state).
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 RESTORED 2026-07-02 (S98)** — lead chạy `claude-fable-5[1m]` (settings.json:11) + spawn-test inherit ×2 monitor self-report `claude-fable-5` → H5.6 hoàn tất, caveat suspended-2026-06-12 (fallback Opus S62→S97) đã gỡ. Nếu DOWN lại → fallback theo quy trình trên. ⚠️ **S101 (2026-07-03): runtime = Opus LẠI** (Fable unavailable — lead + 3 spawn inherit-chain self-report `claude-opus-4-8`) → H5-fallback tự-kích, revert-free; "RESTORED S98" = point-in-time KHÔNG steady-state (chi-tiết STATUS §Sub-agents). ✅ **S102 (2026-07-06): Fable resolve lại bình thường** (lead + 2 monitor self-report `claude-fable-5`) → fallback-S101 đóng; giữ phản xạ probe mỗi phiên (availability = per-session, không tin note phiên trước). ⚠️ **S103 (2026-07-06): runtime = Opus LẠI** (Fable outage lần nữa — lead + spawn-inherit self-report `claude-opus-4-8`) → H5-fallback tự-kích lại, revert-free. ⚠️ **S104 (2026-07-06): Opus tiếp** (outage kéo dài trong ngày — lead + 2 monitor self-report `claude-opus-4-8` ×3). ✅ **S105 (2026-07-07): Fable VỀ lần 3** — lead + 2 monitor self-report `claude-fable-5` ×3, runtime-verified. Per-session flip xác-nhận: S98-Fable→S101-Opus→S102-Fable→S103-Opus→S104-Opus→**S105-Fable** (flip-6 — chính xác lý-do BƯỚC 0.6 probe MỖI phiên, KHÔNG steady-state).
## Phase 1 — READ (load context)

View File

@ -17,7 +17,7 @@ Skill này là tài liệu chuyên biệt để Claude (và developer khác) dù
| Skill | Mục đích | Trigger ví dụ | Trạng thái |
|---|---|---|---|
| `dependency-audit-erp` | Scan CVE NuGet + npm 2 FE, respect pin constraint (MediatR 12.4.1, Swashbuckle 6.9.0) | "npm audit", "dotnet vulnerable", "deps scan", "nâng cấp package" | ✅ New Tier 3 |
| `ef-core-migration` | Tạo/revert EF Core 10 migration, 3-file rule, DesignTimeDbContextFactory, migration history (mới nhất Mig 61; số → `docs/STATUS.md`) | "thêm migration", "EF migration", "schema update", "snapshot lỗi" | ✅ Updated S98 (Mig 60/61 PE EndedByLevelFinalize + backfill-fix; số → `docs/STATUS.md`) |
| `ef-core-migration` | Tạo/revert EF Core 10 migration, 3-file rule, DesignTimeDbContextFactory, migration history (mới nhất Mig 62; số → `docs/STATUS.md`) | "thêm migration", "EF migration", "schema update", "snapshot lỗi" | ✅ Updated S104 (Mig 62 ExpandSupplierFields Supplier 9→27 field; prev S98 Mig 60/61; số → `docs/STATUS.md`) |
| `iis-deploy-runbook` | 3 IIS site + win-acme cert + gitea-runner + LibreOffice + debug 500/502/SignalR prod + **G-084 IPv4/IPv6 hardening** | "prod 500", "IIS fail", "cert hết hạn", "restart app pool", "deploy IIS", "port hijack" | ✅ Updated (G-084) |
## Format chuẩn 1 skill

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,55 @@
# S105 — Bootstrap all-green + BVAAU cross-repo assist (favicon + auth-RCA) + closeout eval-all
> **2026-07-07** · em-main-led + 3 spawn (2 monitor + 1 investigator) + 2 monitor closeout · docs/memory-only 0 prod-code SE · runtime **Fable 5** (flip-6, runtime-verified ×3 self-report)
## 1. Session-start (all-green)
- Test **440 PASS** (45D+395I, ~23s) re-verified đầu phiên · 0 code-delta từ S104.
- Governance-detectors **36 flag 0-CRITICAL/HIGH** — đúng baseline benign S103 (S104 HIGH đã fix; canonical==disk mig 62 + gotcha 79): 15 LOW derived-stale module-local FP + 18 LOW wikilink fork + 3 MED vocab-fork alias-mapped S96.
- **H2 harvest-curator RE-REPORT:** 5-trục CLEAN + **tự-bắt mồ-côi spawn-record CHÍNH NÓ phiên S104** (verdict nằm session-log S104:19, MEMORY.md kẹt S102 — "self-record blind-spot của gate-agent": `9f9a78e` commit 3 cicd + tooling nhưng không ai append record H2). Em-main verify 2-nguồn → **retro-append 2 entry** (S104-retro + S105-start) theo B3. Orphan-run 0/14 · 0-byte 0/11.
- **H1 tooling-auditor RE-REPORT:** ①②③ PASS · **#53-garble lần-6** (trả note-dở-dang mid-work thay verdict) → **recover-from-diary** (nó đã self-write entry S105 đầy đủ trước khi return). 2 flag → em-main vá **4 derived-flush** (evidence ×3 self-report → `feedback_derived_flush_execution` không cần gate):
1. `.claude/skills/README.md:20` — ef-core row "Mig 61/Updated S98" → **Mig 62/Updated S104** (class "README≠SKILL drift độc-lập" — S104 sửa SKILL.md sót index).
2. `.claude/agents/README.md:3` — flip-chain +**S104-Opus → S105-Fable**.
3. `.claude/commands/session-start.md:37` — BƯỚC 0.6 flip-chain tương tự.
4. `.claude/commands/session-end.md:113` — trailer Co-Authored-By "Opus 4.8" → **Fable 5** (hot-reload CONFIRMED: body /session-end phiên này đã hiện bản vá).
- Spot-check tự-compact H1 (L1 19.4→16.3KB, S99/S100→`archive/2026-07.md`): grep marker → **moved-not-cut ✓**.
- **BƯỚC 0.5/0.5b/0.6:** HMW-mode ON · Fable-clone default (marker vắng) · **Fable VỀ lần 3** — flip-6: S98F→S101O→S102F→S103O→S104O→**S105F**, lead + H1 + H2 self-report `claude-fable-5` ×3 = runtime-verified (bar S98/S102). Restart-CLI carry S103/S104 xác nhận ĐÃ ăn.
- Budget-audit: sleep 5d<7 skip · 11/11 L1 dưới cap (WATCH: impl-be 93.6% đứng-im · cicd _INDEX ~90%) · RAG 2433 (+2) rerank 0.863 · marks 5 Active-High · reinject-ledger trống · M.B: hotload 304,759B = [76K..102K] tok / cap 380K, backfill 0=OFF.
## 2. BVAAU cross-repo assist (repo `BENHVIEN_A_AU/SOURCE_CODDE` — anh gửi 3 screenshot)
> ⚠️ Session BVAAU KHÁC đang live song song (dirty spec + user-marks + commit `51c69fb` 13:45 giữa lúc điều tra). Kỷ luật cross-repo: **chỉ đụng 1 file disjoint (favicon), điều tra read-only, không đụng file dở của họ.** Anh sau đó nói "Sorry tao nhầm" (khả năng nhầm cửa sổ) → giữ favicon (đúng yêu cầu "icon"), không làm gì thêm.
### 2a. Favicon Home (commit `0cc815b` pushed)
- Chẩn đoán: `Web.Home/public/favicon.svg` = **placeholder scaffold** teal gradient + dấu cộng y tế) chính icon lạ anh khoanh đỏ; svg LOAD bình thường (không phải thiếu file/cache).
- Thay theo hệ per-app S81 (Admin=amber+gear · CRM=navy+chat): **Home = nền TRẮNG + vũ công navy `#00249b` + pip ngôi-nhà vàng `#f9ca17`** (echo logo-chip trang chủ, brand S110 "navy+gold từ logo.svg chính chủ"); emblem paths reuse nguyên bản proven 16/32px; self-contained ids (G-200).
- **Prod-verify PENDING lúc đóng session:** curl favicon còn `0f766e` teal (CI run `0cc815b` chưa xong/cần check) NEXT verify `grep -c '00249b'` = 1.
### 2b. Auth RCA 3-Q (investigator deep-pass, read-only — verdict em-main verify first-hand)
- **#53-garble lần-7** (trả CÂU MỞ ĐẦU thay verdict, 32 tool-call/152K work THẬT) **recover-path MỚI: SendMessage-resume chính agentId** (diary trống khác lần 6 recover-diary) verdict đầy đủ lần 2. Ghi vào `feedback_agent_return_garble_recover` (×11 tổng; garble reasoning-lane; thứ tự recover: diary resume solo).
- **Q1 Home Google "vẫn bị đá ra ngoài": ROOT-CAUSE = FE session.** Hub-side OK TOÀN BỘ (state CSPRNG callback auto-provision Workspace user cookie `bvaau.auth` HttpOnly+Secure+Lax+`Domain=.benhvienaau.com` redirect returnUrl; 7 nghi vấn a-g đều KHÔNG: SameSite same-site, PublicBaseUrl fix 384d033 giữ, CORS+credentials , returnUrl safe, Google KHÔNG dính pending-lane, IIS rewrite can). Điểm gãy: bundle FE `API_BASE='/api'` **relative trên site TĨNH** (web.config loại `^/api/` khỏi SPA-fallback) `GET /api/auth/me` **404 live-verified** FE coi anonymous vĩnh viễn LoginSplit forever (PortalHome tồn tại nhưng unreachable). Đăng nhập server-side nhiều khả năng đã THÀNH CÔNG từ trước.
- **Fix = commit `51c69fb` 13:45 CỦA CHÍNH SESSION BVAAU** (race đẹp: HEAD dịch giữa lúc điều tra): API_BASE absolute + CRM1 ProtectedRoute redirect-home + authStore loading-fix. Em-main **byte-verify prod (#77): bundle mới Home `index-CtTKjYz2.js` chứa `apihub.benhvienaau.com/api` (1) + CRM1 `index-Cr8wJMpn.js` chứa `home.benhvienaau.com` (1) = FIX LIVE** · config hub `zalo:true` (nút Zalo hết "đang cấu hình").
- **Q2 CRM1:** trước đó **hở 2 tầng** (FE soft-gate pass-through + API `enforceCrmGate:false` whitelist anonymous data thật lộ). FE-redirect live theo 51c69fb. **Kín tầng API = flip secret `AUTH_ENFORCE_CRM_GATE=true` — CHỜ ANH QUYẾT** (đề nghị: bật SAU khi UAT login ổn, tránh CRM đứng nếu login còn trục trặc).
- **Q3 "User_ID" Zalo (đính chính của anh: trường anh Mỹ không dùng):** grep 3 FE app + hub = **KHÔNG có trường User_ID nào trong UI** (bảng duyệt crm1 5 cột; modal duyệt = StaffCode+Note). `ProviderUserId` (Zalo app-scoped id) backend-only = **identity-map bắt buộc GIỮ** (`ApprovePendingLogin.cs:114,141` chìa khóa nhận diện lần login sau + dedup). Kết luận: hệ ĐÃ đúng như anh Mỹ muốn; trường anh Mỹ thấy khả năng màn ngoài repo (Zalo console/app ) chờ anh gửi hình nếu cần truy tiếp.
- **Lesson class mới (ghi investigator diary):** "hub tập-trung + site tĩnh: relative `/api` sống dev (Vite proxy), chết im lặng prod" auth-hub call luôn absolute-host. + Bài #77 tái hiện dự án thứ 2: anh test TRƯỚC deploy-land + tab giữ bundle nhìn như "chưa fix".
### 2c. /fable-real
Anh `/fable-real invest kỹ...` rồi đính chính nhầm ×2 **HỦY trước khi tạo marker** mode giữ Fable-clone default, 0 thay đổi.
## 3. Closeout eval-all (§L)
- **§L.a AS-scan (AS-1..13): 0 hit** (add-specific · spawn background · no bypass · no 0-byte · BVAAU favicon commit = src-file CI-run intended, không phải docs-only-trigger).
- **§L.b(b) guards:** #53-recover guard **HELD 2/2** (lần 6 diary + lần 7 resume không sửa ledger, guard đã verified; recurrence-count cập nhật user-memory).
- **(c):** archive-gate DRY: **0 sub over-cap · A7 GATE PASS 226/226 pointer** · sleep-check skip · MFE (eval): LEAD denom **30 item FIT PASS** (span ~3.1-4.2K tok = 1.1% cap worst-case) · age-band 0 · Goodhart anchor strikes=21/RCA=9/AS=13 · SUB coverage đo-thật 85-100% (3 N/A by-design) **0 floor-rot, 0 refine-action, reinject-ledger giữ trống** · spec-audit: CRITERIA A1-B2 PASS, **GAPS none** · %-print + M.B báo cáo cuối.
- **(d) spawn-records:** tooling-auditor (self-wrote ✓) · harvest-curator (em-main on-behalf ×2 @start) · investigator-codebase BVAAU (em-main on-behalf @end garble ×2 đường recover khác nhau). H2 closeout GATE verify.
- **(e):** pending-request anh đều SPECIFICS trong HANDOFF NEXT-anh (4 mục). **(h):** 0 quyết-định governance mới n-a, marks 5 Active-High display-only. **(i) spot-check:** woven in-session 4 claim re-verified tươi bằng ground-truth (H2-mồ-côi 2-nguồn · H1 skills/README stale tự Read · 51c69fb git-show · bundle byte-curl ×2).
- **Model-note sweep 4-tầng (H20):** README:3 + session-start:37 + session-end:113 + STATUS:24 cả 4 đã +S104-O/+S105-F trong phiên (2 chỗ đầu @bootstrap, session-end@bootstrap, STATUS@closeout).
## 4. State sau S105
**Mig 62 · 89 bảng · 440 test · gotcha 79 · menu 54 · RAG 2433** · bundle SE prod GIỮ admin `ChSNAJBK`/user `Bn2w1znH` (Run #488, 0 deploy SE phiên này) · BVAAU: `51c69fb` live + `0cc815b` pending-CI.
## 5. Carry-forward
- **NEXT anh:** BVAAU incognito-test Home Google login + quyết `AUTH_ENFORCE_CRM_GATE=true` + carry S97 (UAT "8 MEP Sub Hệ thống solar" + số-phiếu/user PE phân quyền) + hình trường User_ID nếu muốn truy tiếp.
- **NEXT em:** verify favicon BVAAU prod (`curl grep 00249b`) · Supplier Phase B 🅿 PARKED (KHÔNG tự khởi động) · monthly next 2026-08-01.