Files
solution-erp/.claude/agent-memory/tooling-auditor/MEMORY.md

49 lines
16 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Tooling-Auditor Agent — Persistent Memory
> **Persistent diary cross-session.** Auto-injected first ~200 lines at spawn (L1 HOT).
> Update BEFORE every stop. Tiered Memory v1: L1 HOT (hook hard-limit <17KB) · L2 `archive/2026-06.md` verbatim on-demand · L3 RAG `search_memory`. Keep entry ≤ 1.5K chars.
> **NEW agent 2026-06-07** (adopt AI_INFRA Harness 1 — H1 tooling-freshness; TÁCH khỏi harvest-curator H2 per anh-mandate "H1/H2 hay quên+nhầm → riêng-biệt"). Compacted S99 2026-07-02 (19.6KB→~9KB, 12 entry 06-xx → archive NGUYÊN VĂN) · S105 2026-07-07 (19.4→~16KB, S98-S100 → `archive/2026-07.md`) · S106 2026-07-07 (19.7→14.9KB, S102-S104 @start → `archive/2026-07.md`; byte-verified md5×3 @S107) · S107 2026-07-10 @end (17.8→**16.2KB**, S101+S105 @start → archive md5×2).
---
## 🎯 Role baseline
H1 tooling-freshness auditor **SOLUTION_ERP-self**. Read-only + **propose-only** (em main = single-writer; NGOẠI LỆ duy nhất: diary/archive của chính mình). Tools: Read/Grep/Glob/Bash + 4 RAG-read. NO `store_memory`. Audit **4-mặt** mỗi session: skill · sub-role · plugin · docs — đầy-đủ + kịp-thời. @session-start báo state + diff-vs-last; @session-end chốt + new-alloc audit. 🔴 Final message = VERDICT trực tiếp, KHÔNG narrative memory-curation (#53 return-garble ×4).
## 🚫 Split boundary
- ✅ MINE: tooling/docs freshness (4-mặt) + roster-drift + skill/plugin new-alloc — SOLUTION_ERP-self
- ❌ NOT: harvest-memory/5-trục → **harvest-curator** (H2) · corpus/RAG/deploy → cicd-monitor · code/SQL audit → investigator-codebase · write/decide → em main
## 📋 Baseline state (re-ground 2026-07-02 S99 — VERIFY mỗi session, đừng tin số cũ)
- **Roster:** 12 sub (S107 +office-document 📄 Office WRITE, anh giao), **12/12 `model: inherit`** (Harness-8 all-inherit, runtime-verified S98 — Fable 5 RESTORED, inherit-chain self-report `claude-fable-5`). 10 product/quality (investigator-codebase/api · implementer-backend/frontend · test-specialist · reviewer · cicd-monitor · frontend-designer · database-agent read-advisory · office-document Office S107 ✅ verified-runtime cùng-phiên [hot-reload agent-MỚI ăn thật — S27 lesson chỉ còn EDIT-agent/command]) + 2 monitor INFORM-only (tooling-auditor · harvest-curator). VALID_ROLES hmw.js = 10 product-only by-design.
- **Skills:** 6 project (`.claude/skills/`) + 23 standalone (`~/.claude/skills/`) + 16 command-file (S101 +fable-real/clone) (`.claude/commands/` — hmw = script `workflows/hmw.js`, KHÔNG phải slash-command).
- **Plugins:** 18 registered (15 enabled / 3 disabled: pr-review-toolkit · code-modernization · hookify) user-global `~/.claude/settings.json:17-35` · marketplace 35 · settings `model: claude-fable-5[1m]` + `effortLevel: xhigh`.
- **Docs canonical:** `CLAUDE.md` (root+docs) · `docs/STATUS.md` (số canonical B1) · `docs/HANDOFF.md` · `.claude/agents/README.md` · `docs/governance/`.
## ⚠️ Anti-patterns
❌ Tự sửa config/doc/enable-plugin (propose-only) · ❌ conflate plugin "enabled"="used" (installed≠enabled≠assigned≠used) · ❌ tick-checkbox no-evidence · ❌ đụng harvest-memory (harvest-curator) · ❌ G-015 overclaim "read-only enforced" (Bash residual = write-channel mở).
## 🧭 Method distilled (S50-S98 — chi tiết verbatim `archive/2026-06.md`)
- **Ground-truth MỌI count từ disk:** `settings.json enabledPlugins` = authoritative plugin# · `skills/README.md` ≠ SKILL.md frontmatter (drift độc lập) · Migrations ở `Infrastructure/Persistence/Migrations` (KHÔNG `Infrastructure/Migrations`).
- **Test count:** KHÔNG attr-count `[Fact]/[Theory]` (Theory expand runtime) — tin session-log/test-run/STATUS.
- **Bundle-hash:** KHÔNG tin 1-source — triangulate (cicd-MEMORY = provenance giàu nhất Run#+sha+rotate); anh-cite chưa verify được → flag "unverified", KHÔNG copy.
- **gotcha format:** entry = `### N.` KHÔNG `#N` — verify format trước khi claim missing.
- **commands/*.md + ultra-on.md = trong radar:** roster-grep (S57 catch) + count-grep (S99 catch "(68)") — lớp file hay bị monthly-audit bỏ sót; index/README files cũng vậy (S50).
- **Drift born-SAU-monthly-CÙNG-NGÀY** = lớp riêng (S97/S98) — per-session monitor bù lớp monthly không thấy.
- **system-reminder claudeMd header = pre-session snapshot** → re-Read line thật trên disk, KHÔNG tin context-injection. Brief "chưa flush" cũng = snapshot lúc spawn → re-ground disk hiện tại (S58).
- **Backlog/coords trong HANDOFF phải re-verify** trước khi tin (stale-contradiction S57-resume).
- **Model spawn-test:** frontmatter no hot-reload — pin/inherit ăn SAU restart CLI; self-report nguyên văn = bằng chứng runtime (H4 S57bis · H8 S98).
- **Tool-gotchas:** Bash nuốt `$` PS-inline → `powershell -NoProfile -Command` escape `\$` · PS `Get-Content -Raw`+`-TotalCount` mutually exclusive → dùng Grep tool `^model:`.
- **Return-cut giữa emit** (S58) = finding chính vẫn salvageable từ partial return; emit finding chính SỚM trong report.
## 📅 Recent activity (FIFO — older → `archive/2026-06.md` verbatim)
- **2026-06 (12 entry S50→S66 → archive):** CREATED+first-run verified-runtime (S50 3-drift: plugin 15→18 · ef-core 31→43 · gotcha 49→57) · S51 new-alloc database-agent STRONG-FIT/codebase-agent SKIP · S57×2 (ultra-on+session-start roster catch; VALID_ROLES 9) · H4 demote spawn-test ×2 (pin ăn post-restart, demote-watch #1 OK) · post-S57bis count-drift top-5 · S58 return-cut-partial · S59×2 ALL-FRESH (bundle triangulate 4-src; SearchableSelect=code KHÔNG skill) · S63 H5 opus-collapse confirm + ef-residual · S66 H8 all-inherit flip (7 pin→inherit). → `archive/2026-06.md`.
- **2026-07-02 (3 entry S98/S99/S100 → `archive/2026-07.md` verbatim, compact S105):** S98 Fable-restore-evidence + ef-core stuck-59 + post-audit-drift (archive giữ bản verbatim-superset pre-curate) · S99 F1 s98-flip-miss + F2 SendMessage-stale + F3 command-count-catch "(68)" · S100 ALL-PASS F1/F3 fixed-verified + method `git log -- .claude/skills/` last-touch shortcut.
- **2026-07-03 (S101 @start`archive/2026-07.md` verbatim, compact S107):** ALL-4 PASS + 🔴 MODEL-DRIFT first-catch (inherit-chain data-point #4 DIVERGENT Opus, H5-fallback tự-kích) — lesson gốc “inherit-chain self-report = per-session availability probe, đừng tin last-session model claim”.
- **2026-07-03 (S101 @closeout`archive/2026-07.md` verbatim, compact S105):** command **14→16** (+fable-real/clone H19 = COMMAND-tier ≠ skill, đừng conflate; 0 catalog-drift) · data-point #5 Opus DIVERGENT · new-alloc 0 · F-H19a LOW DEFER (note khi Fable-về) · F-H19b em-main fixed.
- **2026-07-06 (S102/S103/S104 @start`archive/2026-07.md` verbatim, compact S106):** S102 ALL-PASS Fable-restore-2nd (data-point #6) + model-note-reconcile-3 propose · S103 ①②③ PASS, ④ FLAG-M-LOW model-note S102-Fable thiếu S103-O data-point (#7 divergent) · **S104 = Mig-62 ship docs-lag** (product commit `778fc98` chưa reconcile): D1-HIGH STATUS:14 Mig 61→62 + D2-skill ef-core header/row-lag + D3-MED closeout-blurb-missing + D4-LOW migration-todos-tick; ⚠️ **table 89 GIỮ (18 AddColumn/0 CreateTable count-invariant)**; method `git show --stat` = xác-nhận-nhanh commit-scope (#8 divergent Opus).
- **2026-07-07 (S105 @start`archive/2026-07.md` verbatim, compact S107):** ①②③ PASS ④ 2-flag LOW (skills/README:20 Mig-61-stale [fixed S105-end] + model-note 2-of-3 lag [FLAG-M closed S105-end]); Fable-về lần 3 flip-6 data-point #9; L1 compact S105 19.4→16KB md5-verified.
- **2026-07-07 (S105 @closeout CHỐT — ALL-4 PASS, 0 sót):** 4 patch em-main LANDED verify direct-Read (skills/README:20 Mig62/S104 · agents/README:3 + session-start:37 chain→**S105-Fable** flip-6 · session-end:113 trailer Fable 5). Residual-sweep skills+commands+agents: 3 hit = valid-history (SKILL:82 xref "xem Mig 61" · ss:123/se:48 "adap S103" provenance), 0 stale. **FLAG-M CLOSED 3/3** (STATUS:24 +S105 grep-hit). ②11=11=11 inherit ③18/15/3+m35+cmd16 identical, new-alloc 0. ④STATUS/HANDOFF dirty mid-audit = em-main flush S105 concurrent (HEAD vẫn `95f5555`; STATUS:34 In-Progress S105 · HANDOFF:5 S105-Fable). 🔴 **Method-gotcha: Grep tool brace-glob `{a,b}/**` trên setup này match 0-FILE → sweep VOID tưởng clean** — re-run per-dir path; luôn phân-biệt "0-match" vs "0-file-searched". ERD root/docs CLAUDE "…-61" known-debt giữ (SKILL:86 đã 62). Tag `[s105-end, all-pass, flag-m-closed, brace-glob-void]`.
- **2026-07-07 (S106 @start RE-REPORT — ①②③ PASS, ④ 2-FLAG [1 bundle-hash-live-stale MED + 1 model-note-flip LOW]; FABLE OUTAGE lại → flip-7 Opus, inherit-chain data-point #10 DIVERGENT):** HEAD **`41f8061`** (KHÔNG phải S105-closeout `0f16c00` như brief-baseline gợi — **2 commit SAU closeout: `54a2c72` S105-harvest + `41f8061` S105-refine-all**; `git show --stat` cả 2 = **memory/docs-only, 0 skill/agent/plugin/product** → ①②③ baseline vẫn == S105-end; ⚠️ `41f8061` touch CHÍNH diary tao +2 dòng → in-context copy tao STALE-dài, disk-file thật = 48 dòng compacted). tree CLEAN. **Model: spawn self-report `claude-opus-4-8`** (brief env-confirm) = Fable OUTAGE (chuỗi S98F→S101O→S102F→S103O→S104O→**S105F→S106O**, flip-**7**, per-session probe tái-xác-nhận — "Fable VỀ S105" = point-in-time KHÔNG steady-state, đúng lesson S101). ①SKILL PASS 6+23+16 identical; last-touch skills/ = `0f16c00` **S105** (skills/README:20 flush Mig62 ✓ LANDED-verified); ef-core SKILL `:3`/`:19`/`:84`-row-62/`:86` "Mig 51-62"/§16+ 27-62 tất khớp Mig 62 disk; residual-sweep Mig-61-straggler = **1 hit `:82` = valid xref** (Mig 60 "xem Mig 61" — KHÔNG stale). ②ROSTER PASS 11 file(README)=11=11, **11/11 `model: inherit`** line-5 (grep-verified), README header "11-agent"/"11 sub", VALID_ROLES 9 product-by-design; last-touch agents/ = `0f16c00` S105 docs-flush, 0 agent THÊM/XÓA. ③PLUGIN PASS **18/15/3** (3 disabled pr-review-toolkit/code-modernization/hookify, settings:17-35) + marketplace 35 + xhigh + `claude-fable-5[1m]`:11 identical, 0 new-alloc. ④DOCS 2-FLAG: 🔴 **(D-BUNDLE MED, on-behalf APPEND — đây LÀ bundle-hash-question brief hỏi):** `STATUS:27` "**Bundle hash live (prod):** admin `mEGqlNWc`/user `Dnrp4PU1` **Run #484**" = **STALE 4-run** — cicd MEMORY:55+:73 authoritative = live thật **`ChSNAJBK`/`Bn2w1znH` Run #488 Mig 62** (S104-ship, rotate-real-src `mEGqlNWc`#488, marker `officeAddress`/`legalRepresentative` grep-HIT prod-verified). ⚠️ **NUANCE: STATUS:14 [Mig row] ĐÃ carry đúng `ChSNAJBK`/`Bn2w1znH` #488** → data tồn tại in-doc, chỉ **con-trỏ "live" chuyên-dụng :27 thiếu-hoist** (1 deploy-chain behind). → em-main hoist :27 lên #488 hashes + prepend prev-chain (giữ #484 làm history). 🔴 **(D-MODEL LOW, on-behalf APPEND):** 3 model-note (STATUS:24 · agents/README:3 · session-start:37 BƯỚC 0.6) + trailer session-end:113 tất carry **S105-Fable = latest** nhưng phiên này **S106-Opus** → stale-by-one-flip (KHÔNG drift-sai: đúng-tại-S105 + note-self "per-session KHÔNG steady-state"; chỉ thiếu data-point S106-O). Brief đã lường "flip-churn inherent BƯỚC-0.6 probe mỗi phiên" → đề xuất APPEND S106-O caveat SAU em-main confirm lead-runtime (G-015 1-spawn probe, chưa xác nhận sub khác). ⚠️ **Cân-nhắc CADENCE (không tự-quyết): model-note-flush mỗi flip = churn 7-lần/8-phiên** — có thể đề xuất anh: giữ chain-tóm-tắt 1 dòng + "runtime probe mỗi phiên KHÔNG steady-state" thay vì append-từng-flip (giảm derived-touch). Counts khớp disk: Mig 62 · gotcha 79 (grep `^### N.`) · menu 54 (`MenuKeys.cs` const) · 89 bảng (STATUS:15 đúng — Mig 62 = 18 AddColumn/0 CreateTable count-invariant, cicd:73 sys.tables=89 confirm) · test 440. ERD-range root CLAUDE:131 "32-61" + docs/CLAUDE:70 "27-61" chưa nới→62 (SKILL:86 đã) = known-ERD-debt LOW carry (KHÔNG new). **Method S106:** (a) **ĐỪNG tin brief-baseline HEAD**`git log` disk thật bắt 2 post-closeout commit brief bỏ sót → luôn re-ground HEAD + `git show --stat` mỗi commit-mới; (b) bundle-hash "live" phải triangulate cicd-MEMORY (provenance giàu nhất Run#+sha+rotate+marker) KHÔNG tin STATUS-line đơn-độc — STATUS:14 vs :27 lệch nhau = 2-source-trong-cùng-doc cũng cần cross-check. Tag `[s106-start, 4-mat, flip-7-opus, data-point-10-divergent, d-bundle-live-stale-run484, d-model-note-flip, head-past-closeout-2commit]`.
- **2026-07-10 (S107 @start RE-REPORT — ALL-4 PASS, 0 flag mới; FABLE VỀ lần 4 = flip-8, data-point #11; self-compact-S106 byte-verified):** HEAD `41f8061` + tree **7-M uncommitted** = ĐÚNG brief-list S106 micro-session 7/7 file, 0 file lạ (em-main commit reconcile S107). **Model: spawn self-report `claude-fable-5`** (chuỗi …S105F→S106O→**S107F**, flip-8). ①SKILL PASS 6+23+16 identical, last-touch skills/ `0f16c00` S105, README:20 fresh Mig62/S104. ②ROSTER PASS 11=11=11, 11/11 `^model: inherit` grep, README:3 gộp-pointer→canonical. ③PLUGIN PASS 18/15/3 + m35 + xhigh + fable[1m]:11 identical, 0 new-alloc. ④DOCS PASS: **D-BUNDLE FIXED-verified** (STATUS:27 hoisted `ChSNAJBK`/`Bn2w1znH` #488 + lag-note) · **D-MODEL FIXED-verified** (STATUS:24 +S106-O flip-7 + 🔴 stamp "§Sub-agents = CANONICAL single-owner flip-chain, S106 gộp per anh-confirm"; 3 derived agents/README:3 + ss:37 + se:113 = pointer-only; residual-enumerate sweep agents/+commands/+docs/ = 0 stale [chỉ canonical :6/:24 + 1 session-log history]) · **CADENCE-proposal S106 tao = ADOPTED** (anh-confirm gộp 1-chain, chống churn 4-file/flip) · counts khớp Mig62/89/440/79/54 · ERD-debt carry (root:131 "32-61" + docs:70 "27-61", KHÔNG mới) · HANDOFF:5 S105 = expected micro-session. **Self-compact-S106 verify (tự-kiểm): PASS byte-level** — md5×3 identical HEAD-blob-L1 vs archive (S102 `1760f27a` · S103 `a6c8c75f` · S104 `e12e5377` = moved-not-cut LOSSLESS), L1 14.9KB<17KB, FIFO :43 đúng, archive :13 compact-header FROZEN-additive; self-fix header :5 +compact-S106 note (sót lúc compact). Tag `[s107-start, 4-mat, all-pass, flip-8-fable, self-compact-byte-verified, d-bundle-d-model-closed, cadence-adopted]`.
- **2026-07-10 (S107 @end CHỐT ①③ PASS · PASS-DELTA roster 12 · 1-FLAG D-BUNDLE lặp; new-alloc PASS; residual 0-sót):** HEAD `86a34d5` tree CLEAN (7-M S106 committed `1eea51b`). 11→**12** +office-document 📄 OD1-OD10 `model: inherit`:5, 3 commit `1eea51b/21387cd/86a34d5` **VERIFIED-RUNTIME CÙNG-PHIÊN** (registry hot-reload agent-MỚI; S27 lesson thu-hẹp còn EDIT-agent/command). **New-alloc 5-skill PASS ×3-chỗ:** agent §SKILL:27-32 (docx/xlsx/pptx/pdf standalone + form-engine project, verify-present :52) · README matrix-row :165 · VALID_ROLES 10 (hmw.js:27 + README:208); skills/README no-agent-column by-design KHÔNG thiếu; budget.json:132 seeded 3323B. **Residual-grep độc-lập 0-sót:** live-claims đều 12/10 (README:3/:24/:217 · STATUS:24/:39 · ss:56 · se:83); hits còn = history-valid (README:12/:16 upgrade-log S66/S79 · ACTIVE-MARKS:15/:18 stamped-S79 FROZEN · README:247 S38-snapshot); STATUS:112 11/11 tools: = point-in-time S100, OD tools invariant giữ (INFO). Wire = `git show 21387cd --stat` đúng 14-file. 🔴 **D-BUNDLE-LẶP (MED):** STATUS:27 live-pointer kẹt #488 `ChSNAJBK`/`Bn2w1znH` nhưng cicd:55/:73 = live thật **#489 `BVyH-FY7`/`EDsZebvn`** (JS rotate-benign governance-only 0-fe-src, #69 two-mode, ship-proof LM-in-window + real-size; STATUS:39 đã carry đúng chỉ :27 lag 1-run đúng pattern S106) propose hoist :27 #489 + prepend #488 prev-chain; cân-nhắc cadence :27 nếu benign-rotate lặp thường. Diary: :17 em-main flushed 12-sub · self-fix :18 1416 cmd · compact S101@startarchive md5 `12612234` ✓. Tag `[s107-end, roster-12, new-alloc-pass, d-bundle-489-repeat, residual-0]`.