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

17 KiB
Raw Blame History

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) · 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).


🎯 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 = 12 đủ roster (+2 monitor S110 anh-directed; monitor vẫn INFORM-only, lane RETURN-only).
  • Skills: 6 project (.claude/skills/) + 23 standalone (~/.claude/skills/) + 18 command-file (S101 +fable-real/clone · S111 +pause/tiep H22) (.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 + :38 skipWorkflowUsageWarning (first-noted S111). ⚠️ S111 H22: project .claude/settings.json RA ĐỜI = hooks.Stop wal-flush.ps1 ONLY — KHÔNG plugin/model override → authority ③ VẪN user-global (đừng conflate 2 file settings).
  • 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 → archive/2026-07.md verbatim, compact S109): ALL-4 PASS 0-sót · 4 patch em-main LANDED verified · FLAG-M CLOSED 3/3 · 🔴 method-gotcha Grep-tool brace-glob {a,b}/** match 0-FILE → sweep VOID tưởng clean — re-run per-dir; phân-biệt "0-match" vs "0-file-searched".
  • 2026-07-07 (S106 @start → archive/2026-07.md verbatim, compact S109): ①②③ PASS ④ 2-FLAG (D-BUNDLE MED STATUS:27 live-pointer stale #484→#488 [pattern gốc] · D-MODEL LOW flip-note); flip-7 Opus data-point #10 · CADENCE-proposal born-here (adopted S107). Method: ĐỪNG tin brief-baseline HEAD — re-ground git log + git show --stat mỗi commit-mới · bundle-live triangulate cicd-MEMORY (2-source-cùng-doc cũng cross-check).
  • 2026-07-10 (S107 @start + @end → archive/2026-07.md verbatim, compact S111): @start ALL-4 PASS flip-8-Fable (data-point #11) + self-compact-S106 md5×3 LOSSLESS + D-BUNDLE/D-MODEL closed + CADENCE-proposal ADOPTED (STATUS:24 canonical 1-chain) · @end roster 11→12 +office-document VERIFIED-RUNTIME cùng-phiên (hot-reload agent-MỚI; S27 lesson thu-hẹp EDIT-only) + new-alloc 5-skill PASS ×3-chỗ + D-BUNDLE-lặp #489 (→ closed S108) + residual-grep 0-sót.
  • 2026-07-10 (S108 @end → archive/2026-07.md verbatim, compact S111): ①②③ 0-đổi PASS · ④ PASS +runbook 60KB · marker ON-not-committed ✓ (gitignore:92) · D-BUNDLE S107 CLOSED (STATUS:27 hoisted #489) · propose-LOW runbook-pointer ×2 (→ APPLIED S109 557642f).
  • 2026-07-10 (S109 @start → archive/2026-07.md verbatim, compact S111-end): ALL-4 PASS 0-flag · Fable streak-3 #12 · runbook-pointer propose-S108 APPLIED-verified 557642f · sleep-PAUSED resume-point nhất-quán budget.json · ⚠️ lesson marker-name: resolve tên THẬT từ source (fable-real:11/.gitignore:92) TRƯỚC khi flag absence (suýt false-alarm .fable-real-active).
  • 2026-07-11 (S110 @start RE-REPORT — ALL-4 PASS, 0 flag; Fable streak-4, data-point #13): HEAD 72a85bf CLEAN; 2 commit post-a9c3f1d (f5a5c3e sleep-compress P1 10-file agent-memory-only [2 gist 2026-06 tooling/harvest distill-gen:1 + reviewer curate + budget last_sleep_at=07-10] · 72a85bf S109 closeout [STATUS +15 dòng + HANDOFF 1-line + session-log + cicd #492]) — cả 2 = 0 skills/agents/settings → ①②③ identical S109-baseline. ①PASS 6+23+16, last-touch 0f16c00 S105. ②PASS 12=12=12 (README:3 · STATUS:24), 12/12 ^model: inherit, last-touch 86a34d5 S107. ③PASS 18/15/3 + m35 + fable[1m]:11 + xhigh:37, 0 new-alloc. ④PASS: STATUS:6 + HANDOFF:5 fresh S109 · counts Mig62/89/440/79/54 khớp · STATUS:27 BVyH-FY7/EDsZebvn VẪN ĐÚNG (frozen-streak ×3 #490→#492 per STATUS:40 — D-BUNDLE KHÔNG tái) · markers hmw.on 349B + fable-real.on 261B EXISTS = HANDOFF "VẪN ON" TRUE · In-Progress 3-row S109 done + PE-phân-quyền carry đúng chỗ. Method: grep pattern rộng trên STATUS mega-line nổ 115KB persisted-output → dùng Read offset/limit targeted dòng canonical (:14/:24/:27) thay grep cả file. Model: self-report claude-fable-5 (…S108F→S109F→S110F streak-4). Re-spawn lần-2 cùng-phiên (em-main premise "+1-dòng=S109-end" SAI): git-diff = +1 dòng/monitor = CHÍNH entry @S110-start lần-1 (cả harvest-curator cùng pattern) → commit-worthy closeout KHÔNG stray; re-verify độc-lập lần-2 identical ALL-PASS 0-flag; same-session re-spawn ≠ data-point mới. Method: STATUS Read limit=42 vẫn nổ 25K-tok (mega-line :6/:14/:27 đều trong 42 dòng đầu) → đọc khúc ≤20 dòng. Tag [s110-start, all-pass, fable-streak-4, sleep-p1-done-baseline, respawn-x2-premise-fix].
  • 2026-07-11 (S110 @end CHỐT — ①②③ 0-đổi PASS · ④ H21+MTv3 sweep 2-FLAG LOW; new-alloc 0; restart-note đủ): HEAD 38262d8 (5 commit 162f0b9→38262d8 31-file, 0 skills/settings → ①6+23+16 giữ [4 cmd = EDIT không mới: fable-real/clone REDESIGN per-invocation H21 + session-start 0.5b/0.6 + ultra-on] · ②roster 12 giữ; hmw.js:22-30 VALID_ROLES 10→12 +2 monitor :28 — CHÍNH EM vào whitelist anh-directed · ③18/15/3 giữ). ④ sweep "VALID_ROLES 10/10 vai/marker" glob !archive: ACTIVE đều 12/🧊 (hmw:22-30 · ultra-on:24-25 · fable-clone:21/:34 · wf/README:35 · agents/README:208 + ENV-DEPENDENT ×2 :18/:264 · engine:332 · runbook:94/:99/:147/:175 · marker XÓA thật ls-verified, gitignore:92 giữ phòng-hờ per spec-D3 · ACTIVE-MARKS:19 mark mới RC-…11-07-2026-20-42-01 AH + :31 H19→📦 · session-start:29 reader · HANDOFF:5 strike-through + restart-note ĐỦ-hành-động). 🟡 F1: persona 2 monitor stale "roster 10" — tooling-auditor.md:13/:22 (:22 = INSTRUCTION cứng) + harvest-curator.md:13 (adopt-note); pre-existing blind-spot persona-CHÍNH-MÌNH, propose → pointer README (EDIT-agent cần restart, gộp restart 4-cmd sẵn). 🟡 F2: runbook:148 stale-quote "engine §K.C:328 … 10 vai" (engine nay :332 = 12) — 1 sót/~30 point-edit. INFO: untracked runs/…h21-mtv3-adopt/implement-synthesis.md → gộp closeout (H10). STATUS:6/HANDOFF:5 header S109 = expected pre-closeout. Method: grep-hẹp count-cũ ("VALID_ROLES 10|roster 10|10 sub|10 vai") bắt lớp persona-self mà roster-grep README/STATUS bỏ sót. Tag [s110-end, h21-mtv3, valid-roles-12-self-in, 2-flag-low, persona-self-stale-catch].
  • 2026-07-12 (S111 @start RE-REPORT — ALL-4 PASS + 1-FLAG LOW STATUS:39 mark-row stale; Fable streak-5 data-point #14; L1-over-cap self-compact): HEAD 191532e CLEAN; 1 commit post-38262d8 = closeout 10-file (git show --stat: 2 persona F1 + runbook F2 + 3 diary + session-log 44L + run-synthesis committed [H10 ✓] + STATUS/HANDOFF). F1/F2 S110 FIXED-verified: persona tooling-auditor:13/:22 + harvest:13 = B1-pointer "đếm DISK/README" (persona MỚI load trong CHÍNH spawn này = restart ĂN, runtime-proof) · runbook:148 quote mới "§K.C:332 … 12 vai khớp hmw.js:22-30". ①PASS 6+23+16 identical, last-touch 0f16c00 S105; 4 cmd EDIT S110 loaded: ss:27-35 BƯỚC-0.5b per-invocation + fable-real:2/:9/:17 + fable-clone:2/:21 <vai> <đề-bài> + marker ABSENT ls-verified (engine:329 gitignore:92 giữ phòng-hờ). ②PASS 12=12=12 (README:1/:3 · STATUS:24) + VALID_ROLES 12 (hmw:22-30 = README:208) + 2 persona-edit re-verified inherit:5 (10 file còn lại untouched-since-S110-grep per git). ③PASS 18/15/3 + m35 + fable[1m]:11 + xhigh:37; INFO first-noted settings:38 skipWorkflowUsageWarning (ngoài git không date được, không phải plugin — vào baseline). ④1-FLAG LOW: STATUS:39 "Mark-proposal … pending anh confirm" STALE — mark ĐÃ stamped (ACTIVE-MARKS:19 Active-High anh-confirm-S110 + :31 H19→📦 + chính STATUS:38 🟢 done + HANDOFF:5 "stamped") → propose flip :39 → 🟢 done stamped-S110 RC-…20-42-01 (row thêm pre-stamp trong debe82f, quên flip @ac3f122/closeout). Còn lại PASS: engine §K.E:338 + :332 · ACTIVE-MARKS:19 row mới verbatim · STATUS:14 Mig62/:15 89 · STATUS:27 BVyH-FY7/EDsZebvn VẪN ĐÚNG (cicd:55 FROZEN ×5 #490→#494, D-BUNDLE không tái) · residual stale-10 sweep 4-dir ACTIVE = 0 (3 hit = run-trace + 2 adap-report history-frozen). Model: self-report claude-fable-5 (…S109F→S110F→S111F streak-5). Tag [s111-start, all-pass-1-low, mark-row-stale-catch, f1-f2-fixed-verified, self-compact-s111].
  • 2026-07-12 (S111 @end CHỐT — H22 WAL: ①CMD 16→18 · ②③ 0-đổi · ④ 1-FLAG LOW arch:377; new-alloc 0-external; FLAG-1 CLOSED): +2 commit (318a271 STATUS:39 flip LANDED · 8aa3869 H22 30-file) + tree 1-M WAL.md = hook-persist expected (squash §5.0 — ĐỪNG flag stray). ① /pause+/tiep = COMMAND-tier lead-only (sub không invoke slash → KHÔNG map vai). ③ TOOLING-MỚI: project .claude/settings.json FIRST-EVER = hooks.Stop wal-flush.ps1 ONLY · WAL.md TRACKED 15/40-dòng · hook VERIFIED-RUNTIME ×2 12071c5/67be443. ④ anchors đủ (chi-tiết → session-log S111 + return-text): ss:47-54 BƯỚC-0.7 · se:111/:143 · hmw:9/:19 ≥3-task/>5' · ACTIVE-MARKS:20 row-6 AH · engine N:401/:418 · rules:225 · CLAUDE:21 (docs/CLAUDE 0-hit by-design) · C5:412 · deploy.yml D10 +2 path → AS-6 class đổi — cicd-monitor lane. 🟡 FLAG LOW: docs/architecture.md:377 enumerate paths-ignore 3-entry CŨ thiếu 2 path D10 → propose +2 hoặc B1-pointer→deploy.yml (gotchas #41/#47 = narrative-history OK; migration-todos:154 generic OK). Tag [s111-end, h22-wal, cmd-18, settings-json-first, d10-cicd-handoff, arch-377-stale].