Files
solution-erp/.claude/agent-memory/tooling-auditor/MEMORY.md
2026-08-10 01:55:15 +07:00

59 lines
15 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
- [Máy mồ-côi + addendum lệch vế](method_orphan_machine_audit.md) — 2 lớp drift tái phát mặt ③/④; 3 phép đo nhà-khai + control dương (mở @S185)
- **S185 (2026-08-09/10) @close bookend L13 — `TOOLING: PASS_WITH_FLAGS — 6` (+2 INFORM) `[LEAD SEED ON-BEHALF]`:** ①②③-số PASS (skill 6+23+19 · roster **28 khớp 5/5** · plugin 18/15/3 **0-delta phiên 5**); ③máy+④docs DRIFT. F-2 HIGH = máy mồ-côi **thứ 3** ngay phiên sau khi `(k-ter)` dựng để diệt bệnh đó. F-3 addendum đóng 4.2 bỏ 4.4. F-6: run.md tick 0/11 ⇒ luật ONE-SHOT vừa land **mất la-bàn ngay lượt đầu**. Nguồn `runs/2026-08-09-S185-bookend-close/sub-tooling-auditor.md`.
- **S181 (2026-08-07) @close`TOOLING: PASS_WITH_FLAGS — 6 flag` `[LEAD SEED ON-BEHALF]`:** 🔴 **Cứu một con số ĐÃ ĐÓNG DẤU RC.** Return bị #53 cắt, nhưng **mẩu garble chứa finding**: *"New agents show `model: opus` but no `effort:` line"*. Lead đo lại: 28 vai · 28 `model: opus` · chỉ **26** `effort: max`, thiếu đúng 2 vai W4b. Mà bảng gốc TC-03 **vừa ký RC** ghi *"26/26 pin effort"***con số khẳng định phủ-đủ trong khi thủng 2**. Vá cả persona lẫn số. ⇒ **Bài: đọc mẩu garble TRƯỚC khi resume** — nó có thể là bằng chứng duy nhất chống lại một artifact đã ký. F-1/F-4 cùng một lượt sinh vai sót **2 khoá** (`effort` + `memory: project`), không phải 1. F-1 HIGH đắt nhất về cấu trúc: `STATUS:478` là ô canonical mà **5 con-trỏ B1 cùng trỏ vào** ⇒ 1 ô sai = 5 con-trỏ resolve ra số sai. 🔸 Tự bác 2 ứng-viên flag: `naming-baseline.json "vai": 29` KHÔNG stale (tập-đo của `naming-scan` **kể cả README**, khác tập roster) · dòng *"roster is 20 as of S145"***bản ghi đông-lạnh có neo thời-điểm**, sửa = giả mạo phép đo cũ. Tag `[s181, garble-chua-finding, cuu-so-da-ky-RC, 1-luot-sinh-vai-sot-2-khoa, o-canonical-5-con-tro]`
- **S179 (2026-08-07) drift-audit THÁNG quá hạn 6 ngày — `TOOLING: PASS_WITH_FLAGS — 8` `[LEAD SEED ON-BEHALF]`:** **3 mặt PASS có số**: roster **26** khớp 4 bề-mặt (đĩa 27 file **trừ README** = 26 — bẫy glob, đừng đếm 27) · skill-map **26/26 vai** (`comm -23` rỗng), 3 vai STYLE trỏ skill tồn tại thật · plugin **18 registered / 15 enabled / 3 disabled**, khớp `README:229`. **R-1 = same-class residue, site THỨ 6** của lớp "claim chép nhiều site": `README:234` ghi `frontend-design (KHÔNG enable plugin trùng)` trong khi `~/.claude/settings.json` = `"frontend-design@claude-plugins-official": true` — lead verify đĩa **CONFIRMED**, vá vị-từ thành *"plugin trùng ĐANG enabled, cố ý KHÔNG dùng"*. Đây là lần **thứ 3** lớp này tái phát trong cùng file (S153 → S172 → nay). **F-6** bắt đúng bẫy tự-sinh: `CLAUDE.md:121` hardcode `Lần kế 2026-08-01`*"đóng audit mà quên lật ô này thì chính lượt đóng lại đẻ neo thối mới"* — lead lật ô + đóng **cả cụm 3 dòng** HANDOFF (không chỉ 1 dòng, đúng bài R-1). **CÒN 6 chưa vá, đã vào WAL:** F-2 `permission-matrix` cây thiếu **5 root** đang sống · F-3 nó tự cấm chép số rồi chép `12 root` · F-4 dải `§16+` **4 giá-trị khác nhau/4 surface** · F-5 `PROJECT-MAP` (file #3 trong 5-file-đọc-trước) **0 hit** 4 module sống, control dương `contract`=31 · F-7 skill-mig dừng Mig 71 · F-8 schema-diagram "91 bảng" vs canonical 97. 🔴 #53 garble, resume vớt trọn. 🔸 3 item **"đã cân nhắc rồi BÁC"** đều đúng (Mig 71/72 = 0 `CreateTable` nên câu "last schema-changing Mig 70" VẪN đúng theo từ-vựng chính file). Tag `[s179, drift-audit-thang, same-class-residue-site-6, dong-audit-de-neo-thoi, roster-26-bay-glob, con-6-chua-va]`
- **S173 (2026-08-05) @open bookend L11-w1 — `TOOLING: PASS_WITH_FLAGS — 10 finding` (3 HIGH/2 MED/2 LOW/3 INFORM) `[LEAD SEED ON-BEHALF — vai INFORM-only, single-writer = lead (B3 VERIFY->APPEND)]; nguon `runs/2026-08-05-S173-bookend-open/sub-tooling-auditor-open-S173.md` 26.838 B`:** ① skill 6+23+19 **0-delta** · ② roster **23/23 khop CA 5 be-mat** · ③ plugin 18/15/3 **0-delta 3 phien**; ④ docs DRIFT. 🔴 **F-1** `STATUS:473` `Gotchas | 86` SAI — ground-truth `gotchas.md` = **87** (87 anchor, max `:1389` #87 @S172); `STATUS:6` DUNG. O `:473` la **dau chuoi B1** (CLAUDE.md + skills/README tro ve) ⇒ **3 be-mat sai theo**. 🔴 **F-2** commit `6730eb4` land 5 slot ratify (68·69·70·71·72) ma **KHONG cham `docs/HANDOFF.md`** (`grep -c HANDOFF` = **0**) ⇒ ca 5 con nguyen duoi `🔴 CHO ANH @S172`, 0 gach. **Ca that: da LUA CHINH LEAD** — lead bao owner "5 slot cho anh" roi phai dinh chinh giua phien. 🔴 **F-3** enum mo 11→12 ma `hmw.js:33` con "11 class", `lead-stale-auditor.md:39/:41/:45-49` con "5 class" — **`ring1` bat SOT be-mat LIVE thu 6** (`agent-memory/ring2-audit/MEMORY.md:25`, duoi `## 🎯 Role baseline` = **nap moi spawn**) ⇒ F-3 that = **3 file / 5 site**, khong phai 2/4. **Probe-1** slot (72) het hieu-luc CA 3 ve (`session-end.md:68-70` da go nac "khai chet" · owner da OK · so nay 12/13=92% khong phai 11/13). **Probe-2** monthly drift-audit **CHUA CHAY** — lan cuoi `881783c` 2026-07-01. 🔴 **TRUOT rieng (ring1 bat):** so "20 commit" **khong tai-dung duoc** (that: 89 total / 21 non-wal) vi `git log --since=` **PRUNE IM LANG 22 commit**, trong do **3 cai la `[CLAUDE]` that****cam dung `--since` lam nguon dem**; ket-luan van song vi ring1 quet lai tren tap day du. Tag `[s173, f2-land-may-khong-land-so, dau-chuoi-b1-3-be-mat, since-prune-im-lang, enum-3-file-5-site]`
- **L2 archive `archive/2026-08.md` (compact @S185, byte-verified VERBATIM):** S168 · S172 · S153 · S150 · S151 · S152 · S159 · S162 · FIFO 2026-06/07 · S123/S125 · pointer S126/S140/S143. Nghe rut ra da hoisted len Method/Anti-pattern — doc archive khi can chi tiet phep do cu.
> **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,2026-07,2026-08}.md` verbatim on-demand · L3 RAG `search_memory`. Keep entry ≤ 1.5K chars.
> 🔸 Compact **S185 2026-08-10**: 31.696 B → **14.852 B**, 11 khoi → `archive/2026-08.md` (move-not-cut, verify `block in archive` = True TRUOC khi xoa khoi L1).
> **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) · S109 2026-07-10 @start (17.2→~13KB, S105-end+S106-start → archive md5×2) · S111 2026-07-12 @start+@end (18.35→16.9→~16.4KB, S107×2+S108-end [@start ×2-pass] + S109-start [@end pass-3] → archive fragment+size-verified) · S116 2026-07-13 @end (17.06→13.5→~15.4KB, S110 @start+@end → `archive/2026-07.md` verbatim sed-append +3643B-verified) · S118 2026-07-14 @start (15.7→~15.4KB, 7 pointer-entry S98→S106 gộp 1-digest — verbatim ĐÃ ở archive từ compact trước, 0 move mới) · S125 2026-07-16 @start (21.6→15.8KB, S118-end + S119 @start+META → `archive/2026-07.md` verbatim sed-move +6212B-verified).
---
## 🎯 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-08-09 S185** — VERIFY moi session, dung tin so cu)
- **Roster:** **28 vai** — dia `ls .claude/agents/*.md` = 29 **tru `README.md`** (🔸 bay glob). Khop 5/5 be-mat: dia · `VALID_ROLES` (hmw.js, parse neo `^\]`) · `agent-memory/*/` 28 dir · `STATUS.md:478` · `agents/README.md:27`. Be-mat thu 6 = skill-matrix `agents/README:190-231` **con 26** (F-1 ho tu S182).
- **Skills:** 6 project (`.claude/skills/`) + 23 standalone (`~/.claude/skills/`) + **19 command** (`.claude/commands/`). `hmw` = script `workflows/hmw.js`, KHONG phai slash-command.
- **Plugins:** **18 registered / 15 enabled / 3 disabled** (`pr-review-toolkit` · `code-modernization` · `hookify`) user-global `~/.claude/settings.json`; marketplace **37**. Lead model o file do = `claude-opus-5[1m]` + `effortLevel: xhigh`. ⚠️ project `.claude/settings.json` chi co hooks.Stop `wal-flush.ps1` — authority ③ VAN la user-global (dung conflate 2 file settings).
- **May:** `scripts/*.ps1` = **36**. Sub pin `model: opus` + `effort: max` (worker-tier-pin S124).
- **Docs canonical:** `CLAUDE.md` (root+docs) · `docs/STATUS.md` (so 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.
- **May MOI sinh trong phien = ung-vien mo-coi so 1** — grep ten may o `.claude/commands/` VA `docs/`, **kem control duong** (`naming-scan` ~9 file). Chi tiet + lop anh em *addendum lech ve* → [`method_orphan_machine_audit.md`](method_orphan_machine_audit.md).
- **Grep-tool brace-glob `{a,b}/**` match 0-FILE → sweep VOID tưởng clean** (S105) — re-run per-dir; phân-biệt "0-match" vs "0-file-searched".
## 📅 Recent activity (FIFO — older → `archive/2026-06.md` verbatim)
- **S180 (2026-08-07) @open L12 — `PASS_WITH_FLAGS — 9`** `[LEAD SEED ON-BEHALF]`: **6/9 là nợ S179 chưa vá**; **2 drift MỚI sinh SAU S179** — lớp S179 vừa đóng ở site khác **lại nở ra site mới**. **BÁC-1 ĐÚNG:** bảng canonical `STATUS:463-479` **TƯƠI**, chỗ stale là mega-line `:8` (bác đúng tiền-đề brief lead). **BÁC-2 ĐÚNG:** `§16+`**4 SITE / 3 GIÁ-TRỊ**. 🔴 **BÁC-3 SAI — bài đắt nhất:** dẫn **diary của chính mình + `hmw.js:39`** làm 2 nhân chứng, nhưng **cả hai là bản sao CHƯA-CẬP-NHẬT của cùng một trạng thái cũ**, không phải 2 quan sát độc lập; 3 vai khác đều phán ngược. 🔴 `ring1` còn bác vế "5 bề-mặt ĐỘC-LẬP": 3/5 **đồng-biến cơ-học** ⇒ độc-lập thật chỉ **2**; số 26 đúng nhưng **độ mạnh bằng chứng bị khai vống**. Tag `[s180, pwf-9, bac-3-sai, 2-ban-sao-khong-phai-2-nhan-chung]`
- **S182 @open (lead-seed on-behalf, C2 /pause):** `PASS_WITH_FLAGS — 4` — matrix `agents/README:190-219` phủ 26/28 (thiếu 2 vai score W4b, control-dương 0-row-ma) · `STATUS:478` "roster 23" sai-SỐ-đúng-KẾT-LUẬN · `skills/README:20` residue câu đã xoá @S181 (lớp claim-chép-nhiều-site lần 4) · `permission-matrix:3` "12 root" hoá ra ĐÚNG SỐ (ring1 chốt 12) — chỗ sai là CÂY `:44-77` vẽ 8. #53 garble, resume cứu trọn. → `runs/2026-08-07-S182-bookend-open/sub-tooling-auditor.md`
- **S169 (08-01) @open L10-w1 — `PASS_WITH_FLAGS — 10 finding` `[LEAD SEED ON-BEHALF — nguồn `runs/2026-08-01-S169-bookend-open/sub-tooling-auditor-open-S169.md` 23.236 B]`:** 4 mặt CÓ và nhất-quán ở lớp canonical (roster 23 khớp **5 bề-mặt** · plugin 0-delta · 6/6 skill + 2 skill bị nghi đều SẠCH · `CLAUDE.md` mig đủ 70+71) — **nhưng 10 finding stale tích-tụ + monthly-audit quá hạn ĐÚNG HÔM ĐÓ**. 🔴 **Nấc plugin phải khai đủ 4 bậc** — installed 18 (mkt 37) → enabled 15 → assigned (`agents/README:216-228`) → **`used` KHÔNG đo được từ repo ⇒ KHÔNG khai**. Khai phạm-vi tập-đo: persona sweep = 2 mẫu grep count-class trên 23/23 file; **CHƯA soi** số dạng LOC/%/ms/byte-cap và trọn `.claude/commands/*.md` (19 file). G-015: `store_memory` strip nhưng **`Bash` còn = write-channel mở ⇒ KHÔNG tuyên "read-only enforced"**. Tag `[s169, pass-with-flags-10, plugin-4-bac, used-khong-do-duoc, khai-pham-vi-tap-do]`