TOOLING-CLOSE-S168: PASS_WITH_FLAGS-7 — ①skill/②roster/③plugin SO deu PASS (23=23=23=23, plugin 0-delta 18/15/3), nhung ④docs DRIFT-FOUND: HANDOFF tre 1 cua-so + con hoi cau owner DA chot va DA ship, luat fixture-TEST moi 0 be-mat ben, va 1 vá-doi-duong-dan sot 6 site cung-lop.

# H1 tooling-freshness @close S168 (2026-08-01)

Repo: D:\Dropbox\CONG_VIEC\SOLUTION\SOLUTION_ERP
Vao bang /tiep (window-6 phien-LOGIC L9) — KHONG co bookend @open ⇒ diff-vs-last lay moc = S162 @close (entry L1 gan nhat cua vai nay) + S167 commit.
HEAD tai luc spawn: 2255766 (wal: flush 20260801T1823). Tree: 1 file M = .claude/WAL.md.

## Trinh tu do
1. skill  2. roster  3. plugin  4. docs  5. new-alloc

---

## RAW LOG (do-den-dau-do-den-day, chong #53)

### [2] ROSTER — do dia (mat ②, phan SO)
- `.claude/agents/*.md` = **24 file** → tru `README.md` = **23 persona** (bay glob AP-1: dung dem 24).
- `hmw.js` VALID_ROLES (parse anchor `^\]`, dong 22→43): dem PHAN-TU = **23** (2+2+4+1+1+2+2+3+1+2+1+2).
- `.claude/agent-memory/*/` = **23 dir** (memory-budget.json la FILE, khong tinh).
- `docs/STATUS.md:476` row canonical = **23**.
- `.claude/agents/README.md` = B1-pointer, KHONG chep tong-so (dung luat) — chi liet-ke NHOM.
⇒ **4 be-mat so + 1 pointer KHOP: 23. ROSTER PASS 0-delta vs S162.**

### [4a] DOCS — so canonical sau S168
- `docs/gotchas.md` `grep -c '^### '` = **86**; entry cuoi `:1389` = "### 86 ... (Session 167)". STATUS:473 row Gotchas = **86**. KHOP.
  - ⚠ nhan phien trong tieu-de #86 ghi **(Session 167)** trong khi STATUS:473 va lead brief khai **+S168 #86**. → xem F-x duoi.
- STATUS:472 row Tests = **644 PASS** (45D+599I) + lineage 639/622. KHOP brief.
- STATUS:479 Bundle = do LIVE @S168 boi cicd #444 (admin DLRf9TeA / user C7TGA4Kn) + 🧊 K7 #442. KHOP.
- STATUS:6 CURRENT = Mig 71 · 97 bang · 644 test · gotcha 86 · counter 42 · roster 23 · 8/8 wave. KHOP.

## FINDING F-1 (MED — docs, mau thuan NOI-KHOI CURRENT)
`docs/STATUS.md:8` (khoi ② window-4 S162, VAN nam trong khoi **CURRENT S161→S168**) con ghi:
  "🔴 **CON NO: trang GD3 chua lam** (owner noi "CA", lead giao 3/4 — lead-gap FLAG-3)"
NGUOC `docs/STATUS.md:6` cung khoi: "@S168 owner chot (63)(b)=D+"mo rong": **GD3-D SHIP `081557b`** (3 trang Panel-3...)".
Bang chung: `git show --stat 081557b` = 3 trang Panel-3 ×2 app.
⇒ mon no DA DONG @S168 nhung dong no-treo con nguyen ⇒ nguoi doc muc ② mang no chet. De-xuat: gach/annotate "✅ DONG @S168 `081557b`" ngay tai `:8` (GIU cau goc lam lineage, khong xoa — luat frozen).

### [1] SKILL — mat ① (do dia)
Tap-do: `.claude/skills/*/` (6 project) + `~/.claude/skills/` (23 standalone) + `.claude/commands/*.md` (19).
- 6 skill project GIU NGUYEN, 0 them/bot vs S162: contract-workflow · dependency-audit-erp · ef-core-migration · form-engine · iis-deploy-runbook · permission-matrix. STATUS row Skills = 6 KHOP.
- `~/.claude/skills/` = **23** standalone (0-delta vs baseline S99..S162): algorithmic-art, brand-guidelines, canvas-design, claude-api, code-reviewer, codebase-onboarding, doc-coauthoring, docx, focused-fix, frontend-design, git-worktree-manager, internal-comms, mcp-builder, pdf, pptx, senior-frontend, skill-creator, slack-gif-creator, sql-database-assistant, theme-factory, web-artifacts-builder, webapp-testing, xlsx.
- `.claude/commands/*.md` = **19** (S153 khai 18 → +1; KHONG phai delta S168, mocc cu).
- last-touch per skill (`git log -1 --date=short`): contract-workflow `e5123ff` 07-30 · dependency-audit-erp `e70c046` 06-18 · **ef-core-migration `0779f2d` 07-31** · form-engine `2abbc1d` 04-30 · iis-deploy-runbook `d085436` 06-25 · permission-matrix `bd68f71` 07-31.
⇒ **S168 ship 0 migration moi (Mig van 71) ⇒ ef-core-migration KHONG stale-boi-S168.** permission-matrix: S168 them route `PUT /contract-signing-plans/{id}/lines/{lineId}` dung policy `KeHoachKyKet.Update` — **0 key moi** (Menu keys 113 giu) ⇒ ma-tran key/policy KHONG doi ⇒ **PASS**.

## FINDING F-2 (LOW-MED — skill `ef-core-migration`, ban do KHONG stale-boi-S168 ma stale-ton-dong)
`.claude/skills/ef-core-migration/SKILL.md` bang migration co row cuoi = **`| **69** | AddContractSigningPlans |`** (`:91`).
**Mig 70 + Mig 71 KHONG co row**, chi nam trong cau prose `:93` ("Total: 97 bang ... last schema-changing **Mig 70** ... — Mig 71 ... 0 CreateTable").
Bang chung chu-dich: `git show 0779f2d -- .claude/skills/ef-core-migration/SKILL.md` = lead THEM row 68+69 va SUA Total len 70/71 trong CUNG commit ⇒ 2 row moi nhat bi bo lai co-y-hay-vo-y, nhung tap-do "bang tra migration" ho dung 2 dong CUOI.
⇒ KHONG phai claim SAI (prose dung), la **THIEU** o be-mat nguoi doc tra dau tien. De-xuat: +2 row 70/71 (cau chu da co san o `:93` va CLAUDE.md).
🔴 Doi-chung tu-soi: S159 tao tung BAC lead vi "dung row 67 la dung thiet ke" — lan nay KHAC: commit `0779f2d` chung minh lead VAN dang bao-tri bang theo row (them 68/69), nen dung o 69 la **ton-dong**, khong phai thiet ke.

## FINDING F-3 (MED — cung-lop vá-1-cho-sot-6, mat ①+④, do S168 sinh ra)
S168 vá `scripts/backup-sql.ps1` default `D:\` → `C:\` (ly do ghi ngay trong file `:12-13`: "VPS prod KHONG co o D — do that mkdir D:\ fail 'Cannot find drive'").
**Nhung 6 site cung-lop van day D:\** (tap-do = repo tru `.claude/workflows/runs/`, mo bang `Backups.SolutionErp`):
- `scripts/backup-sql.ps1:5` — CHINH FILE VUA VA: dong Usage van vi-du `-BackupDir "D:\Backups\SolutionErp"` (mau-thuan noi-file voi default `:14` = C:\)
- `docs/guides/runbook.md:53` — lenh backup thu cong `-BackupDir "D:\Backups\SolutionErp-manual"`
- `docs/guides/runbook.md:62` — RESTORE `FROM DISK = N'D:\Backups\SolutionErp\...bak'`
- `docs/database/database-guide.md:413` / `:421` / `:429` — BACKUP full / BACKUP log / RESTORE deu `D:\Backups\...`
⇒ nguoi lam theo runbook tren VPS se an dung loi vua duoc vá. Skill `iis-deploy-runbook` **SACH** (`:308`/`:313`/`:364` chi tro `C:\inetpub\...\scripts\backup-sql.ps1`, khong nhac D:\) ⇒ khong phai vá skill, la vá 2 doc guides + 1 comment script.
De-xuat: doi 6 site → `C:\Backups\...` (hoac ghi ro "duong dan tuy may; VPS prod = C:\").

### [3] PLUGIN — mat ③ (4 nac, KHONG conflate)
Nguon authority: `~/.claude/settings.json` (user-global). Project `.claude/settings.json` van KHONG override plugin/model (chi hooks) — dung baseline S111.
- **installed/registered:** 18 khoa trong `enabledPlugins`.
- **enabled (=true):** 15 — claude-code-setup, feature-dev, skill-creator, playground, mcp-server-dev, frontend-design, learning-output-style, plugin-dev, code-review, claude-md-management, commit-commands, explanatory-output-style, csharp-lsp, typescript-lsp, session-report.
- **disabled (=false):** 3 — pr-review-toolkit, code-modernization, hookify.
- **marketplace** `~/.claude/plugins/marketplaces/claude-plugins-official/plugins` = **37 muc**.
- settings khac: `model: claude-opus-5[1m]` · `effortLevel: xhigh` · `defaultMode: bypassPermissions` · `skipWorkflowUsageWarning: true`.
⇒ **0-DELTA tuyet doi vs S162/S153 (18/15/3 + marketplace 37). PLUGIN PASS.**
🔴 nac *assigned*/*used*: KHONG do duoc trong luot nay ngoai skill-matrix `agents/README` (xem new-alloc duoi) — khong doc "enabled" thanh "dang dung".

### [2b] ROSTER — mat ② phan NOI-DUNG persona (F-9 verify + sweep cung-lop)
**F-9 `cicd-monitor` = DA SACH, verified 5/5 site** (`git show a2b37dc -- .claude/agents/cicd-monitor.md`):
- `:4` description (literal trong frontmatter) · `:170` row test_domain `(58 baseline)` → `(baseline → STATUS row Tests)` · `:171` test_infra `(23 baseline)` → same · `:233` "Tests baseline: 111/111 (58 Domain + 53 Infra)" → tro STATUS row Tests · `:234` "Migrations: 33 (latest Mig 33 S29)" → tro STATUS row Migrations.
- Re-grep file hien tai: 0 literal test/mig con lai. Ghi chu vá con **khai ca ly do tu-mau-thuan noi-file** (`:4`/`:171` noi Infra 23 vs `:233` noi 53) = bang chung tot, GIU.
- 🔴 Nac: vá o DIA. Persona **khong hot-reload** ⇒ an tu **restart CLI** (dung nhu commit-msg khai "an tu restart"). Luot nay KHONG do duoc runtime.

**SWEEP cung-lop 22 persona con lai** (tap-do = `.claude/agents/*.md` tru `README.md` = 22 file; mo bang literal live-count: Mig NN · NNN test · NN bang · policy/menu-key · roster-count):
- 🔴 **1 HIT THAT** → F-4 duoi.
- 21/22 file con lai: **0 literal live-count**. Cac so xuat hien deu la **neo lich-su/on-dinh**, KHONG phai count song: `gotcha #25/#37/#39/#41` (ID gotcha, khong lao) · `Mig 27 menus/{key} pattern` (`cicd-monitor:129`, `reviewer.md:86` — vien-dan PATTERN) · `database-agent:36` "8 mau standard" (bang mau CLI) · so-hieu vai/floor (OD1-OD10, DB1-DB11) · `implementer-backend:59` "4 skill" + `test-specialist:52` "2 skill" (so skill INJECT cho vai do, khong phai tong 6 — do lai dung).
- ⚠️ **2 ca use⟂mention — CO Y GIU, CAM vá** (bay citation-trap, luat da hoc S123): `lead-stale-auditor.md:45` vi-du class `view-stale-count` ("CLAUDE.md ghi ~60 menu key khi canonical 54") va `:48` vi-du `view-stale-role-desc` ("agents/README ghi 12 sub khi roster = 14"). Day la **VI DU MINH HOA cua chinh detector**, khong phai claim ve trang-thai hien tai. Sua chung = doi hinh-dang thu dang bi do (Goodhart) va lam hong vi du. **INFORM, khong phai FLAG.**

## FINDING F-4 (MED — persona con literal live-count, dung lop F-9)
`.claude/agents/investigator-codebase.md:81` — "**40 migration hiện tại (Mig 34-40 Phase 10 G-* port)**".
Doi chieu canonical `docs/STATUS.md` row Migrations / `:6` = **Mig 71**. So 40 chet tu Phase 10 (~S45) ⇒ **lech 31 mig**, gia hon so 33 cua cicd-monitor vua bi bo o F-9.
⇒ Dung nghiem-thuc F-9 (B1: bo literal, tro `docs/STATUS.md`). De-xuat 1 dong: "→ số migration hiện tại: `docs/STATUS.md` row Migrations (B1)" + giu cum "(Mig 34-40 Phase 10 G-* port)" vi do la **pham-vi lich-su**, dung.
🔴 Pham-vi da khai: sweep nay do **22 persona** (khong ke README), theo **1 lop = literal live-count**. Nhom-7 lead nhac "21/23 con no" la lop KHAC/rong hon (chua do duoc trong luot nay) ⇒ so F-4 = **SAN cho lop nay**, KHONG doc thanh "chi con 1 no".

### [4b] DOCS — mat ④ (CLOSED-verified truoc, roi FLAG)
**DA VA — verify DAT (khong tick suong, co bang chung):**
- ✅ `CLAUDE.md:62` da mang **Mig 70/71** ("+S164/S165 Mig 70 `AddCon...") + `:70` module-row KHKK = "**69, 71**" ⇒ H24-DEEP F-4 CLOSED. *(Luu y: ban CLAUDE.md bom vao context spawn cua tao la SNAPSHOT CU — con ghi "+S161 Mig 69"; da re-Read dia moi ket luan, dung luat "system-reminder = pre-session snapshot".)*
- ✅ `docs/governance/README.md:5` nhan LAT: "Active trial week 1-4" → "Adopted — trial ... **DA DONG**; RAG delegation dang phuc-vu thuong-truc" ⇒ H24-DEEP F-11 CLOSED. **Day cung la no cu CUA TAO** (S153 F-7 LOW-MED "governance/README stale" · S162 carry) ⇒ **DONG SAU 4 PHIEN**.
- ✅ F-9 pointer-integrity **2/2 KHONG treo**: cicd-monitor tro "STATUS row Tests" → ton tai `:472` (644 PASS) · "STATUS row Migrations" → ton tai `:465` (71). Vá B1 khong tao con-tro chet.
- ✅ STATUS `:6` + bang canonical `:465-:477` TUOI toan bo so S168: Mig **71** · **97** bang · Tests **644** (45D+599I) · Gotchas **86** · Sub-agents **23** · Skills **6** · bundle `:479` do LIVE @S168 boi cicd **#444** (admin `DLRf9TeA` 1.767.413B / user `C7TGA4Kn` 1.685.160B).
- ✅ `docs/gotchas.md` `grep -c '^### '` = **86**, entry cuoi `:1389` = #86 Gitea auto-CANCEL. KHOP STATUS:473.

## FINDING F-5 (MED — HANDOFF tre DUNG 1 CUA-SO so voi STATUS)
`docs/HANDOFF.md:5` (Last updated 2026-08-01 chiều) con ghi **"K1→K7 SHIP 7/8 wave"** + **"suite 639/0"**.
Doi chieu `docs/STATUS.md:6` (commit sau, `b41f002` ~17:3x): **"TRON 8/8 wave"** + **"644 test PASS"**.
Nguyen nhan co-hoc: HANDOFF last-touch = `a2b37dc` **16:12**; GD3-D `081557b` + Lines-editor `0bfadc2` + STATUS-update `b41f002` deu SAU do.
Grep chung 0-hit tren HANDOFF cho: `644` · `8/8 wave` · `081557b` · `0bfadc2` · `#444` · `GĐ3-D` (control-duong: `ZZTEST` co 1 hit trong STATUS ⇒ grep chay that, khong phai phep-trich-rong).
⇒ CLAUDE.md bao phien sau doc HANDOFF thu **2**; doc thu-2 dang ke thieu ca window-6. De-xuat: bo-sung 1 cau window-6 (GD3-D + Lines-editor + K8 dry-run + 644/#444/8-8).

## FINDING F-6 (MED-HIGH — HANDOFF con HOI cau owner DA TRA LOI + da SHIP)
`docs/HANDOFF.md` muc **"🔴 CHỜ ANH @S168 — ĐÁNH SỐ"** van liet:
  "**(63) 🔴🔴 BLOCKER MẠCH CHÍNH — GĐ3 cây-4-folder ĐỒNG-NHẤT, 2 quyết** ... **(a)** ap trang nao (hay ca 3)? **(b)** phuong-an A/B/**C (lane + lead NGHIENG C)**/D"
Su that @S168: owner chot **(a) = "mo rong" ca 3 trang** + **(b) = D** (nguoc han huong "lead nghieng C" ghi trong slot), va **DA SHIP `081557b`** (3 trang Panel-3, gate PWF-10/0-blocker) + cicd #444 PASS.
⇒ Nang hon F-5: khong chi tre so ma **con-quay chi sai huong** — phien sau doc HANDOFF se (i) hoi lai owner cau da tra loi, (ii) tuong phuong-an C con song. De-xuat: danh dau (63) **ĐÓNG @S168 — owner chốt (a)=cả-3-trang + (b)=D, ship `081557b`**, giu nguyen van cau hoi lam lineage.

## FINDING F-7 (MED — luat owner MOI song duy nhat trong run-artifact, 0 be-mat ben)
2 commit cuoi phien ghi bo fixture TEST + **luat owner "cấm dùng master thật / test chỉ trên fixture TEST"**:
- `dd7db21` — 1 file doi: `.claude/workflows/runs/2026-07-31-S164-4gd-khkk-fanout/sub-k8-dryrun.md` (+27 dong)
- `6918fa9` — cung 1 file (+15 dong)
Grep 4 be-mat ben (`docs/STATUS.md` · `docs/HANDOFF.md` · `CLAUDE.md` · `docs/rules.md`) cho `fixture TEST` · `ADMIN_TEST` · `test.drafter` · `master thật` = **0 hit** (control-duong nhu F-5).
⇒ Luat dung-quy-trinh MOI (ap cho moi lan test prod ve sau) chi nam trong 1 run-folder cua 1 wave da dong ⇒ phien sau khong doc trung. Nha tu nhien: `CLAUDE.md` §Tests (canh "Quy tac timing test") hoac `docs/rules.md §7`.
⚠️ Ranh: lop "quyet-dinh chim" cung cham san `gap-decision-sunk` cua `lead-gap-auditor` (H24). Tao khai o goc **docs-freshness** (doc KHONG phan-anh trang-thai THAT) va **khong** doi so voi vai kia — neu H24 cung bat, day la 1 su-viec 2 goc nhin, KHONG phai 2 phat hien.

## INFORM (khong tinh finding)
- i1. `docs/gotchas.md:1389` tieu-de #86 ghi **"(Session 167)"** trong khi STATUS:473 khai "+S168 #86". KHONG phai lech: su-co xay ra o S167 (`aaed699` + `628132c`), duoc GHI o S168 — quy-uoc tieu-de = phien SU-CO (giong #85 S162, #84 S159). Neu ai doc "so phien ghi so" thi day la bay, nen INFORM chu khong FLAG.
- i2. `agents/README:229-230` (csharp-lsp/typescript-lsp "Windows no-op / defer") — **nac *used*, KHONG phai *enabled***: ca 2 dang `true` trong settings. Da phan-xu @S153 (H1 F-1 vs ring1), giu nguyen, KHONG re-flag.
- i3. `.claude/commands/*.md` = 19 (baseline diary tao ghi 18) — moc cu, khong phai delta S168; da re-ground.

### [5] NEW-ALLOC audit (skill/plugin MOI chua phan-bo vai)
- Skill project 6 = 0 moi · skill standalone 23 = 0 moi · plugin 18/15/3 = 0 moi · marketplace 37 = 0 moi.
⇒ **0-ACTION.** Khong co vat moi de gan cho em main hay 23 sub. `agents/README:174` (Skill assignment 6 skill) + `:212` (External skill/plugin mapping, so 18 KHOP dia) van phu du.

---

## CHOT 4-MAT (bang freshness)
| Mat | Trang-thai | Can-update |
|---|---|---|
| ① skill | **PASS** (6 project + 23 standalone + 19 command, 0 them/bot; permission-matrix khong can doi vi 0 key moi; ef-core khong stale-boi-S168 vi 0 mig moi) | F-2 (+2 row Mig 70/71) · F-3 (6 site D:\ cung lop backup) |
| ② roster | **PASS 0-delta** — 23 khop **4 be-mat so + 1 pointer**: dia 24-1=23 · `hmw.js` VALID_ROLES dem-phan-tu 23 · `agent-memory/*/` 23 dir · `STATUS:476` 23 · `agents/README` B1-pointer khong chep so | F-4 (1 persona con literal live-count) · F-9 an-tu-restart (khong do runtime duoc luot nay) |
| ③ plugin | **PASS 0-delta** — 18 installed / 15 enabled / 3 disabled / marketplace 37; 4 nac khai rieng, khong conflate | — |
| ④ docs | **DRIFT-FOUND** — STATUS+CLAUDE+gotchas+governance TUOI & CLOSED-verified; **HANDOFF la khau yeu** | F-1 · F-5 · F-6 · F-7 |

## TOTAL = 7 finding (SAN, khong phai tong)
- **MED-HIGH 1:** F-6 HANDOFF con hoi slot (63) da chot+da ship (con-quay chi sai huong C).
- **MED 5:** F-1 STATUS:8 no-GD3 chet trong chinh khoi CURRENT · F-3 vá backup D:\→C:\ sot 6 site cung-lop · F-4 `investigator-codebase:81` "40 migration hiện tại" (that = 71) · F-5 HANDOFF tre 1 cua-so (7/8 wave · 639) · F-7 luat fixture-TEST 0 be-mat ben. *(dem lai tung ten: 5 — ban nhap dau ghi "MED 4" la dem-nham, sua tai cho; tong 1+5+1 = 7 KHOP dong-1)*
- **LOW-MED 1:** F-2 bang migration skill dung o row 69.
- CLOSED-verified 4 (CLAUDE Mig70/71 · governance nhan lat [no CUA TAO tu S153] · F-9 cicd-monitor 5/5 site + pointer 2/2 · STATUS canonical 6 so).
- INFORM 3 (i1 nhan phien gotcha 86 · i2 nac used≠enabled · i3 command 19).
- New-alloc: **0-ACTION**.

## PHAM-VI DA KHAI (chong bay "so khong noi tap-do")
- Sweep persona = **22 file** (`.claude/agents/*.md` tru README), **1 lop = literal live-count**. Nhom-7 "21/23 con no" ma lead nhac la lop RONG HON, **chua do luot nay** ⇒ F-4 = san cua lop hep.
- Sweep D:\ = repo tru `.claude/workflows/runs/`, mo bang `Backups.SolutionErp` (2 lan mo, 2 pattern khac nhau — lan dau `D:\Backups` **0-hit gia** roi Read tay thay `:5` co that ⇒ da doi pattern; ghi lai de khong ai tin phep-trich-rong).
- Nac ② F-9: **file-land, chua verified-runtime** (persona khong hot-reload).
- KHONG do duoc: nac *assigned/used* cua plugin ngoai giay to; runtime persona post-restart.

END sub-tooling-auditor-close-S168 — VERDICT=PASS_WITH_FLAGS-7 — TOTAL=7 finding — COVERAGE=4/4 mặt
