- error-ledger: AS-12 NEW (identifier-based prod op phải dump env-đích) + E-008 RCA lock NO-OP 2 tầng (population Dev-only + password 11<12 silent CreateAsync-fail; Why-0 RAG-archaeology: từng phát hiện S22 nhưng const không fix — lesson "discovery phải thành code-fix/guard ngay") + Active-Guard episodic mới (1 strike, verified Run #382). - Session log S58 NEW: 5 đợt việc / 7 commit / Run #382-#386 (4 PASS + #385 cancelled-supersede-benign) / 11 spawn / lessons / bundle final DMm9rtNA/BUkOMn_Y. - STATUS/HANDOFF: bundle line final + In-Progress refresh (ops anh: tzutil · chuong.phan typo · 5 staff password · lock IT users sau gán người thật) + S58-chiều section đủ 5 đợt + chore-flag H2-đo (cicd 41.1KB + inv 32.9KB). - Harvest (H2 GATE PASS 5/5): cicd #386 supersede-chain entry + #383 mark "VỊ TRÍ LẠC" chống curate-sweep nhầm (P2) + investigator tag normalize s58 (P5) + tooling-auditor H1-end on-behalf (return-cut partial — finding salvaged: docs verified-flushed) + harvest-curator H2-end entry. - RAG: +1 chunk S58 key facts (1153b74b, rerank 0.898 retrievable). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
34 lines
11 KiB
Markdown
34 lines
11 KiB
Markdown
# Harvest-Curator 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 soft-cap ~30KB · L2 `archive/` on-demand · L3 RAG `search_memory` just-in-time. Keep entry ≤ 1.5K chars.
|
||
> **NEW agent 2026-06-07** (adopt AI_INFRA Harness 1 — H2 harvest-integrity; TÁCH khỏi tooling-auditor H1 per anh-mandate "H1/H2 hay quên+nhầm → riêng-biệt").
|
||
|
||
---
|
||
|
||
## 🎯 Role baseline
|
||
H2 harvest-MD-integrity auditor **SOLUTION_ERP-self**. Read-only + **propose-only** (em main = single-writer, VERIFY→APPEND B3). Tools: Read/Grep/Glob/Bash + 4 RAG-read. NO `store_memory`, NO Write/Edit. Verify HARVEST mỗi session ĐỦ+ĐÚNG **5-trục**: Coverage · Completeness · Fidelity-FLAG · Placement · Corruption. @session-end GATE trước đóng + gom wave-folder (Harness 2 B5); @session-start báo harvest mới + delta mồ-côi.
|
||
|
||
## 🚫 Split boundary
|
||
- ✅ MINE: harvest-memory integrity (5-trục) + spawn-record 4-field + wave-folder gom (B5) + delta mồ-côi — SOLUTION_ERP-self
|
||
- ❌ NOT: tooling/skill/plugin/docs-freshness → **tooling-auditor** (H1) · corpus/RAG/deploy → cicd-monitor · Fidelity tự-phán "bịa" → escalate **reviewer** · write/decide → em main
|
||
|
||
## 📋 Baseline state (2026-06-07 seed)
|
||
- **Nền H2 đã có 1 phần:** `session-end.md` Phase 1.5 §L.b(d) spawn-record 4-field + (f) double-check moved-not-cut + (c) 0-byte AS-8 = **3/5 trục** (Coverage+Completeness+Corruption). Sub này NÂNG +Fidelity-escalate +Placement = đủ 5.
|
||
- **Spawn-record 4-field SE:** `{task · verdict · learned · surprise}` (memoryDelta R1 contract HMW).
|
||
- **agent-memory:** 10 folder `.claude/agent-memory/<role>/MEMORY.md` (placement target).
|
||
- **Wave-folder (Harness 2):** `.claude/workflows/wave-<tên>/sub-*.md` (gitignored) — gom @B5.
|
||
|
||
## ⚠️ Anti-patterns
|
||
❌ Tự ghi/overwrite memory (propose→em main APPEND) · ❌ tự phán Fidelity "bịa" (→ reviewer) · ❌ tick "đã flush?" nhị-phân (phải đủ 5-trục) · ❌ đụng tooling-freshness (đó là tooling-auditor) · ❌ G-015 overclaim "read-only enforced".
|
||
|
||
## 📅 Recent activity (FIFO — older → archive/git)
|
||
- **2026-06-07 (CREATED):** Seeded H2 harvest-curator (adopt AI_INFRA Harness 1, anh giao). Tailored SE: 4 RAG-read · `model:inherit` · omit color · Fidelity-escalate → SE `reviewer` (KHÔNG AI_INFRA-specific). Wired @session-end §L.b GATE (nâng 3/5→5/5 trục) + @session-start RE-REPORT harvest-mới (Phase 2.1.1) + Harness 2 B5 wave-gom. Nấc: **executed-file, verified-runtime PENDING** CLI restart + first spawn smoke. Tag [created, harness-1, h2].
|
||
- **2026-06-07 (S50 FIRST REAL RUN — verified-runtime ✅):** Spawned @session-start (harvest RE-REPORT) + @session-end (5-trục GATE + B5 wave-gom). Load OK → **verified-runtime CONFIRMED**. @start: harvest 🟢 clean. @end: **GATE PASS 5/5** (Coverage 4 subs · Completeness 4-field · Placement correct homes · Corruption 0-byte/mojibake=0 · Fidelity no-flag — independently re-verified inv-codebase `.gitignore:93` claim). **B5 wave-gom executed:** 2 wave sub-MDs → propose APPEND agent-memory/{investigator-codebase,test-specialist} (em main wrote). B6 re-verify HELD (git diff agent-memory EMPTY). **Method-learning (⭐):** chunk-count CANNOT verify via Bash `curl localhost:6333` — RAG MCP points at DIFFERENT Qdrant host → collection 'not found' false-negative. Use **RAG MCP channel** (`list_projects`) for chunk-count, NOT shell probe; em main (single RAG-writer) = authoritative (confirmed 2415). Tag [first-run, verified-runtime, gate-pass, chunk-via-mcp].
|
||
- **2026-06-08 (S51 `/session-end` 5-trục GATE — DIRECT spawns, RAG down):** Verified 6 product subs · nấc=**verified-runtime** (on-disk ground-truth, **0 file written**, git-diff agent-memory clean = E-006 backstop ✅) · evidence=**GATE PASS 5/5** (Coverage 6/6 S51 entries · Completeness 4-field · Placement correct · Corruption 0-byte=0 + investigator-killed file intact 92L terminates-clean + mojibake/shell-bake=0 · Fidelity reviewer-proxy honestly-marked + "1 MAJOR" claim ground-truthed `HrmConfigsPage.tsx:132-134`). B5 wave-gom **n-a** (DIRECT spawns, no `wave-*/`). 3 non-block flags → em main: (1) test 185→186 honest RED→GREEN (raw 174 attrs→runtime 186) (2) cicd self-tag [s50]→should-be-s51 cosmetic (3) Mig 45→92 tables, CLAUDE.md stale 43→91. **Method-learning ⭐:** killed-mid-write sub → verify file **terminates cleanly** (`wc -l`+tail+closing-Tag), NOT just `-size 0` (partial-write = truncated tail not 0-byte). Tag [s51, gate-pass, killed-sub-verify, direct-spawns].
|
||
- **2026-06-10 (S57-interrupted @session-start RE-REPORT):** Verdict VÀNG — orphan delta investigator-codebase 3 entry S57 uncommitted (agent DUY NHẤT có delta post-S56; so mtime vs closeout-commit timestamp `a62e797` 20:20:51 = phương pháp detect interrupted-session). 4-field PASS ×3 · fidelity spot-check: flag "master-write-open" → fix `Roles="Admin,CatalogManager"` ×3 controller đã apply working-tree (recon khớp việc-thật — đọc memory khi resume đừng tưởng còn hở) · wave/stray/0-byte = 0 · flags: investigator 33.5KB>cap archive-L2, entry-3 tag s56→s57, double-blank-line nit. 0 file written (em main append B3). Tag [s57-orphan, mtime-vs-closeout-method, gate-na-start].
|
||
- **2026-06-10 (S57-RESUME @start RE-REPORT):** Verdict 🟢 — 3 delta agent-memory uncommitted (harvest-curator +1 · investigator +3-entry · tooling +1+baseline-reground) ALL SANE, attribution nhất quán **em main proxy-append B3** (mtime 2 đợt: investigator 10:56 S57-work → harvest/tooling 11:55-57 resume-attempt; style/nội-dung khớp em-main, KHÔNG dấu hiệu sub tự ghi — G-015 honest "no evidence" ≠ "impossible"). 5-trục: Corruption 0-byte=0 (11/11 ≥4.4KB, tail terminate sạch, mojibake=0) · Wave/stray=0 (7 vị-trí check, S54-pattern không tái) · Fidelity **sample 8/8 deep-verify PASS** (authz ×3 controller · hmw.js:26=9 · README:192/:201 · gotcha-58 ×2 skill · ef-core 93/48 · roster 11=11 folder · catalog.manager:1608 · GetMyMenuTree:96 exact) · Completeness 4-field đủ ×5 entry · Coverage 🟡→resolved: 8 file code KHÔNG có delta implementer-* vì evidence nghiêng **em-main-direct implement** (mtime implementer pre-closeout + diff nhỏ + comment [S57] style em-main + investigator entry viết "Flag em-main" như brief) → không phải Coverage-miss. **2 nit em main FIXED in-session:** investigator entry-3 tag s56→s57 + double-blank-line ×2 gộp 1. Chore còn: investigator 33.5KB>30KB cap → curate L2 @closeout/monthly. Nhắc P1: commit 16 file PHẢI kèm docs-closeout (STATUS/HANDOFF/log) tránh "code committed, docs mù". Tag [s57-resume, gate-start-pass, mtime-attribution, coverage-resolved].
|
||
- **2026-06-11 (S57bis @start RE-REPORT + spawn-test post-restart ✅):** Self-report `claude-fable-5[1m]` → **promote-tier `inherit` GIỮ Fable 5 runtime-VERIFIED** (H4.3c). Verdict 🟢 **KEEP-ALL-5** — 5 agent-memory delta uncommitted (harvest+2 · impl-backend+1 · investigator+3 · reviewer+1 · tooling+baseline-reground+3) ALL dated 06-10 S57/S57-resume, em-main-proxy-append B3, attribution mtime-cluster 21:52–22:28 nhất quán, commit AS-IS. Corruption: 11/11 ≥4.4KB, 0-byte=0, tail sạch, mojibake=0. Wave-folder=0 tồn (S56 2 workflow harvest sạch). 3 untracked = em-main governance docs (KHÔNG phải harvest-MD) → vào commit bundle. Chore giữ: investigator-codebase 33.5KB>30KB cap → L2 @closeout/monthly (reviewer 29.6KB + cicd 29.2KB sát cap, watch). Tag [s57bis, spawn-test-verified, keep-all-5, promote-inherit-proof].
|
||
- **2026-06-11 (post-S57bis @start RE-REPORT — rushed-closeout 4 Coverage-MISS):** S57bis đóng vội (commit 12:12-13 → post-commit ghi 12:23-25 rồi dừng, KHÔNG end-GATE). Verdict 🟡: **Coverage 4 MISS / 9 role spawned** — implementer-backend+frontend (CẢ 2 return-truncated #53) · database-agent (Mig-49 design DELIVERED mà 0 delta — miss đau nhất) · reviewer (**die-0-byte ×2** resume-kill → em main self-gate) → propose 4 spawn-record on-behalf. 5 record có sẵn (inv-codebase·test-spec·tooling·harvest·cicd-dirty) 4-field PASS, fidelity ground-truthed (Mig 49 file `Persistence/Migrations/20260611044424` exists + count 240 consistent ×4 nguồn). **Method ⭐: commit-stat "có append" ≠ "có fanout-record"** — impl-backend/reviewer append trong 17b23a4 = carry 06-10 S57-resume (mtime 06-10 22:21-28); classify bằng grep tag `57bis` + mtime, KHÔNG tin stat. Mồ-côi ×2 sane (cicd +Run#381 PASS+1PARTIAL — escalation lock-14-user prod NO-OP email-stale · gotchas #59 PS5.1 quote→`-F`) → commit bundle; cicd entry chứa bundle-hash CP4CB1ym/BmZ3VHnm = resolve flag "unverified" của tooling. Wave=0 · stray=0 · 0-byte=0 (find -size 0 empty). Chore: cicd 32.3KB + inv-codebase 32.1KB ĐỀU >30KB (inv vừa curate 11:30 vẫn over). Wrote OWN diary only (em main explicit). Tag [post-s57bis, coverage-4-miss, carry-vs-fanout-classify, die-0-byte].
|
||
- **2026-06-11 (S58 `/session-end` 5-trục GATE — chiều, 8 spawn):** **GATE PASS 5/5** — Coverage 9 record/8 spawn (H1+H2 start · inv recon `:73` · cicd #382/#383/#384 + **#385→#386 supersede-chain UNCOMMITTED mtime 14:20 — run-cuối 3ebaf84 đã về có record, nhắc commit bundle** · designer proxy `:39`) · Completeness 4-field 8/8 · Placement đúng nhà, stray=0, **NIT: cicd #383 nằm `:89` GIỮA khu archived (dưới #377, trên Run #232) thay vì slot FIFO :72-73 → propose MOVE trước curate kẻo archive nhầm entry 1-ngày-tuổi** · Corruption 0-byte=0 cả repo + user-memory, last-byte 11/11 `0a`, 9/9 entry mới close-Tag sạch, mojibake 1 hit = quoted-evidence `C<>ng` cicd:79 (#377 sqlcmd lesson, cố ý) · Fidelity 5 on-behalf/proxy marked tường minh ("on-behalf em main ghi hộ, H2-proposed" ×4 + designer "[em main proxy — truncated #53, 2nd consecutive]") + reviewer honest "KHÔNG DELIVER die-0-byte ×2", spot `git merge-base --is-ancestor ea793a4 3ebaf84`=YES khớp claim #386 → no-escalate. Wave=0 confirm (workflows chỉ README+hmw.js). **Chore: cicd 41.1KB (sáng 32.2 → +4 entry siêu dài/ngày!) + inv-codebase 32.9KB ĐỀU over-cap → curate-L2 P1 next session; reviewer 29.6KB + impl-be 27.9KB watch.** Method ⭐: diff-filter `grep -v "^[+-][+-]"` NUỐT dòng `+- **…` bullet-append → suýt false-MISS investigator; extract added-bullet phải dùng `grep "^+-"`. Trend: self-tag session-drift lần 3 (inv `:73` tag s57bis cho spawn S58; trước: cicd s50→s51, inv s56→s57). 12-vs-8 spawn-count để em main reconcile. Wrote OWN diary only. Tag [s58-end, gate-pass-5/5, 383-misplaced, cicd-41kb].
|