[CLAUDE] Docs: S53 H1-gate residual fixes — ef-core Mig 44-47 table rows + count stragglers + database-agent verified-runtime flip

Session-end H1 tooling-chốt (formal monitor gate on /session-end re-trigger) caught 4 residuals em-main self-check missed:
- ef-core-migration/SKILL.md: added Mig 44/45/46/47 table rows + totals 91->92 bang / last Mig 43->47 (header said 47 but body stopped at 43 — internal contradiction).
- dependency-audit-erp/SKILL.md:153 gotcha 56->57.
- agents/README.md:155 'All 10 agent'->11 (RAG-MCP grant line straggler).
- database-agent.md: SELF-CHECK [x] verified-runtime S53 + nac reword (honest: DB1/DB10 exercised, DB2-DB11 per-task).

H2 harvest gate PASS 5/5 (separate run). Tree was clean before this; this closes the H1 residual loop.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-06-08 15:34:02 +07:00
parent d8cd111532
commit 18d397f095
4 changed files with 10 additions and 6 deletions

View File

@ -152,7 +152,7 @@
## 🔧 Tool grant (S39 — +3 RAG MCP per agent)
All 10 agent có **4 RAG-READ MCP**: `search_memory` + `search_code` (BM25, prefer over Read full file — tiết kiệm token) + `cross_project_search` + `list_projects`. Base tools per role (READ: Read/Grep/Glob/Bash [+WebFetch/Search cho api] · WRITE: +Edit/Write/Skill).
All 11 agent có **4 RAG-READ MCP**: `search_memory` + `search_code` (BM25, prefer over Read full file — tiết kiệm token) + `cross_project_search` + `list_projects`. Base tools per role (READ: Read/Grep/Glob/Bash [+WebFetch/Search cho api] · WRITE: +Edit/Write/Skill).
> **2 monitor sub (tooling-auditor H1 + harvest-curator H2 — 2026-06-07):** read-only toolset = `[Read, Grep, Glob, Bash, +4 RAG-read]`, **NO `store_memory`, NO Write/Edit** (mirror investigator read-set). INFORM-only — propose → em main single-writer VERIFY→APPEND (B3). 🔴 **G-015 accuracy:** đây KHÔNG = "read-only enforced" — sub vẫn giữ `Bash` (write-channel mở qua shell/curl). Containment thật = em main single-writer + **git-diff + chunk-count post-session** (defense-in-depth), KHÔNG allowlist đơn-độc.

View File

@ -46,11 +46,11 @@ maxTurns: 25
- [x] frontmatter `model: inherit` — KHÔNG `...[1m]` (gotcha #37).
- [x] `description` dùng block scalar `|` (parse-safe, no colon-space break).
- [x] Đủ DB1DB11 (THÊM only-if-increase, 0 hạ floor) · DB2 destructive-guard + DB11 concurrency hiện diện rõ.
- [ ] Skill `sql-database-assistant` + `ef-core-migration` verify-present + active (session-end tooling-auditor H1 confirm).
- [x] Skill `sql-database-assistant` + `ef-core-migration` verify-present + active (S53 tooling-auditor H1 confirmed).
- [x] `store_memory` KHÔNG có trong `tools:` (adap #1) · 4 RAG-read giữ.
- [ ] **Restart Claude Code** (agent no hot-reload) → spawn-test 1 task DB nhỏ (đọc schema 1 bảng `sys.tables` / introspect ItTicket) kiểm chạy thật → upgrade executed-file → verified-runtime.
- [x] **VERIFIED-RUNTIME (S53 2026-06-08)** — CLI restarted, spawn-test ran live (LocalDB Dev+Design: `__EFMigrationsHistory` read + ItTickets introspect + caught Mig 46-unapplied-local drift). executed-file → verified-runtime DONE.
## Accuracy (G-015 — KHÔNG overclaim)
- Schema/perf-claim đo qua introspection + query-plan THẬT (`sqlcmd`/`dotnet ef`), KHÔNG narrative trí-nhớ.
- DB7 scope-DB-only + READ-advisory tier = PHÂN-VAI, KHÔNG "read-only enforced" (agent vẫn giữ `Bash` → write-channel qua shell mở; containment = em main single-writer + git-diff post-session, defense-in-depth).
- Nấc đúng: **executed-file** (floor DB1DB11 trong .md này) vs **verified-runtime** (spawn-test sau anh restart CLI) — KHÔNG claim runtime trước restart (§C5/§G-011).
- Nấc: **verified-runtime (S53)** — spawn-test confirmed agent loads + DB1/DB10 introspection chạy thật (LocalDB connect + schema read). KHÔNG overclaim: DB2DB11 floor (vd DB11 RowVersion concurrency) là in-file, exercised per-task khi phát sinh — chỉ DB1/DB10 ran lần spawn đầu.

View File

@ -150,6 +150,6 @@ Lưu vào `docs/changelog/deps-audit-{YYYY-MM-DD}.md` nếu có action.
## Related
- `docs/gotchas.md` — 56 bẫy package compat / CI / IIS / Identity / per-NV refactor / SQLite tie-break đã gặp
- `docs/gotchas.md` — 57 bẫy package compat / CI / IIS / Identity / per-NV refactor / SQLite tie-break đã gặp
- `docs/changelog/migration-todos.md` Phase 5.1 — checklist deps scan CI
- `SolutionErp.slnx` + `global.json` — .NET version pin

View File

@ -63,8 +63,12 @@ when-to-use:
| **41** | **`WireWorkflowAppsApprovalV2`** | **🎯 Phase 11 P11-A (S42) — +4 `{Leave,Ot,Travel,Vehicle}LevelOpinions` (UNIQUE composite + Cascade/Restrict) + `WorkflowAppCodeSequences` (atomic MaDonTu) + 4 ALTER `RejectedFromStatus` + enum `TravelRequest=9`.** |
| **42** | **`AddLeaveBalances`** | **🎯 Phase 11 P11-B (S43) — 1 bảng `LeaveBalances` (User×LeaveType×Year + Entitled/Used/Adjustment, UNIQUE composite + FK LeaveTypes Restrict). Trừ phép tự động khi đơn nghỉ duyệt cuối.** |
| **43** | **`FilterHolidayUniqueIndexByIsDeleted`** | **🎯 S45 — DropIndex + CreateIndex `IX_Holidays_Year_Date` UNIQUE filtered `WHERE [IsDeleted]=0` (was unfiltered). Fix reachable 500 khi recreate ngày lễ trên slot soft-deleted. Không bảng mới (table vẫn 91). gotcha #57 — soft-delete UNIQUE phải filter.** |
| **44** | **`AddVehicleAndDriverCatalogs`** | **🎯 Phase 11 P11-C (S51) — 2 catalog `Vehicles` + `Drivers` (`AuditableEntity`, filtered-unique Code day-1). Extend HrmConfigs declarative. Tables 91→92.** |
| **45** | **`FilterHrmCatalogUniqueIndexesByIsDeleted`** | **🎯 S51 — LeaveType + ShiftPattern + OtPolicy Code UNIQUE filtered `WHERE [IsDeleted]=0` (3 HRM catalog, gotcha #57 EXT). Index-only.** |
| **46** | **`AddSlaFieldsToItTicket`** | **🎯 Phase 11 P11-D (S52) — ItTickets +SlaDueAt/SlaWarnedSent/SlaBreached (SLA timer). Column-only, no new table.** |
| **47** | **`FilterMasterCatalogUniqueIndexesByIsDeleted`** | **🎯 S53 — Department + Supplier + Project Code UNIQUE filtered `WHERE [IsDeleted]=0` (gotcha #57 EXT Master, 6× cumulative). Index-only.** |
Total: **91 bảng** dbo + `__EFMigrationsHistory` (last Mig 43 FilterHolidayUniqueIndexByIsDeleted, index-only). Xem `docs/database/schema-diagram.md` migration table + §11-15 module ERD (§16+ Mig 27-42 chi tiết pending).
Total: **92 bảng** dbo + `__EFMigrationsHistory` (last Mig 47 FilterMasterCatalogUniqueIndexesByIsDeleted, index-only). Xem `docs/database/schema-diagram.md` migration table + §11-15 module ERD (§16+ Mig 27-47 chi tiết pending).
## N-stage workflow pattern (Mig 18-20 — Session 12-13)