From 9f10764b067a140ea1454981078e793737a963c1 Mon Sep 17 00:00:00 2001 From: pqhuy1987 Date: Fri, 29 May 2026 18:59:02 +0700 Subject: [PATCH] [CLAUDE] Docs: S40 finish bulletin MUC 2+4 gaps (tiered agent-def + rag.json path fix + archive dirs) MUC 2 (Tiered Memory) finish: - investigator-codebase.md: ">20KB force-read" + ">25KB suggest curate" -> tiered L1/L2/L3 (last agent-def with old policy wording; gotcha count 53->55) - archive/ created for 3 new seed agents (investigator-api/implementer-frontend/test-specialist) via .gitkeep MUC 4 (RAG v1.3) finish: - rag.json extra_corpus slug FIX: D--Dropbox-CONG-VIEC-SOLUTION -> ...-SOLUTION-SOLUTION-ERP (27 user-memory feedback entries were NOT indexed). Re-index = AI_INFRA op (flagged). - chunk_size 1500 deviation UNCHANGED (AI_INFRA mechanism decision, trial 2026-06-16). JSON valid verified. Co-Authored-By: Claude Opus 4.8 (1M context) --- .claude/agent-memory/implementer-frontend/archive/.gitkeep | 1 + .claude/agent-memory/investigator-api/archive/.gitkeep | 1 + .claude/agent-memory/test-specialist/archive/.gitkeep | 1 + .claude/agents/investigator-codebase.md | 4 ++-- .claude/rag.json | 6 ++++-- 5 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .claude/agent-memory/implementer-frontend/archive/.gitkeep create mode 100644 .claude/agent-memory/investigator-api/archive/.gitkeep create mode 100644 .claude/agent-memory/test-specialist/archive/.gitkeep diff --git a/.claude/agent-memory/implementer-frontend/archive/.gitkeep b/.claude/agent-memory/implementer-frontend/archive/.gitkeep new file mode 100644 index 0000000..d48e650 --- /dev/null +++ b/.claude/agent-memory/implementer-frontend/archive/.gitkeep @@ -0,0 +1 @@ +# L2 COLD archive (Tiered Memory v1) — archived MEMORY entries land here on curate (archive/.md). Created S40 2026-05-29. diff --git a/.claude/agent-memory/investigator-api/archive/.gitkeep b/.claude/agent-memory/investigator-api/archive/.gitkeep new file mode 100644 index 0000000..d48e650 --- /dev/null +++ b/.claude/agent-memory/investigator-api/archive/.gitkeep @@ -0,0 +1 @@ +# L2 COLD archive (Tiered Memory v1) — archived MEMORY entries land here on curate (archive/.md). Created S40 2026-05-29. diff --git a/.claude/agent-memory/test-specialist/archive/.gitkeep b/.claude/agent-memory/test-specialist/archive/.gitkeep new file mode 100644 index 0000000..d48e650 --- /dev/null +++ b/.claude/agent-memory/test-specialist/archive/.gitkeep @@ -0,0 +1 @@ +# L2 COLD archive (Tiered Memory v1) — archived MEMORY entries land here on curate (archive/.md). Created S40 2026-05-29. diff --git a/.claude/agents/investigator-codebase.md b/.claude/agents/investigator-codebase.md index 48533ef..7d419bf 100644 --- a/.claude/agents/investigator-codebase.md +++ b/.claude/agents/investigator-codebase.md @@ -32,7 +32,7 @@ You are an investigative read-only agent focused on **INTERNAL codebase + DB sch - Skills preload: `contract-workflow` + `permission-matrix` + `ef-core-migration` ### 2. Decide memory re-read -Force Read full MEMORY.md when: task touches schema/architecture/cross-stack · memory >20KB · first task new topic · PE V2 / Contract V2 / Proposal / workflow / permission gotchas. Otherwise trust auto-injected. +Tiered Memory v1: L1 auto-inject đủ cho routine. Read L2 `archive/` + search L3 RAG `search_memory` when: task touches schema/architecture/cross-stack · first task new topic · PE V2 / Contract V2 / Proposal / workflow / permission gotchas. (Bỏ ngưỡng cứng >20KB force-read.) ### 3. Investigate (INTERNAL) - Read/Grep/Glob scan codebase @@ -52,7 +52,7 @@ Token cost estimate: [tokens] ``` ### 5. Update MEMORY.md BEFORE stop (BẮT BUỘC) -Append "Recent activity" FIFO last 10: patterns / anti-patterns / gotchas new (cross-ref `docs/gotchas.md` 53 hiện tại) / schema findings. Skip duplicates. If >25KB → suggest curate em main. **Keep entry ≤ 1.5K chars** (gotcha #53 truncation mitigation — Investigator MEMORY hit 32KB S37). +Append "Recent activity" FIFO 5-8 entry gần nhất: patterns / anti-patterns / gotchas new (cross-ref `docs/gotchas.md` 55 hiện tại) / schema findings. Skip duplicates. Tiered Memory v1: L1 soft-cap ~30KB → nếu vượt suggest curate em main (archive cũ → L2 `archive/.md`). **Keep entry ≤ 1.5K chars** (gotcha #53 truncation mitigation — Investigator MEMORY hit 32KB S37). --- diff --git a/.claude/rag.json b/.claude/rag.json index 614e486..53c02ae 100644 --- a/.claude/rag.json +++ b/.claude/rag.json @@ -15,7 +15,7 @@ ".git/**" ], "extra_corpus": [ - "C:\\Users\\pqhuy\\.claude\\projects\\D--Dropbox-CONG-VIEC-SOLUTION\\memory\\*.md" + "C:\\Users\\pqhuy\\.claude\\projects\\D--Dropbox-CONG-VIEC-SOLUTION-SOLUTION-ERP\\memory\\*.md" ], "share_to_global": true, "search_scope_default": ["self", "shared_global"], @@ -39,6 +39,8 @@ "_notes": { "bootstrap_command": "python D:\\Dropbox\\CONG_VIEC\\AI_INFRA\\claude-rag\\bootstrap.py --project solution_erp", "cross_project_ai_infra_pointer": "AI Infra centralized at D:\\Dropbox\\CONG_VIEC\\AI_INFRA\\. Cross-project tooling (RAG/MCP/Governance) — single source of truth.", - "layer_c_mandate": "auto_reindex_mode=replace added 2026-05-23 broadcast per VIPIX commit c029ddb — gotcha #9 RAG corpus drift fix forward" + "layer_c_mandate": "auto_reindex_mode=replace added 2026-05-23 broadcast per VIPIX commit c029ddb — gotcha #9 RAG corpus drift fix forward", + "extra_corpus_path_fix_s40": "2026-05-29 S40 — corrected user-memory slug D--Dropbox-CONG-VIEC-SOLUTION -> D--Dropbox-CONG-VIEC-SOLUTION-SOLUTION-ERP (27 feedback entries were NOT indexed due to wrong slug). Re-index needed to take effect (AI_INFRA op, bootstrap.py). Flagged to AI_INFRA.", + "tiered_memory_v1_adopt": "2026-05-29 S40 — adopted AI_INFRA Tiered Memory Policy v1 (bulletin): L1 HOT ~30KB soft-cap / L2 archive on-demand / L3 RAG just-in-time. chunk_size 1500 deviation = AI_INFRA mechanism decision (trial 2026-06-16), NOT changed by team." } }