[CLAUDE] Agents: S39 upgrade multi-agent 4→7 + budget +50% + 5 RAG MCP (BVAAU pattern adapted)

Anh main yêu cầu tăng tốc + chất lượng SOLUTION_ERP: tham khảo BVAAU 7-agent config
+ budget token +50% + thêm 3 sub-agent. Adapted (NOT copied) — SOLUTION_ERP 2-FE-app
fit + giữ 6 skill proven battle-test 38 session.

Split 4→7 agent (anh main chốt via AskUserQuestion):
- investigator → SPLIT: investigator-codebase (cyan, internal SQL/EF/grep) +
  investigator-api (blue, external docs/CVE/lib/cross-project)
- implementer → SPLIT: implementer-backend (yellow, .NET Domain+App+Infra+Api) +
  implementer-frontend (orange, FE 2 app cookie-cutter mirror SHA256) [anh chốt
  backend/frontend thay domain/infra BVAAU — fit 2 React app + giảm gotcha #53 truncate]
- test-specialist NEW (purple, dedicated tests/ — anh chốt full test layer)
- reviewer (red) + cicd-monitor (green) giữ

Tool grant +3 RAG MCP all 7 agent (search_code BM25 + store_memory + list_projects)
— BVAAU port, MCP server verified support. Prior chỉ 2 (search_memory + cross_project).

Skill re-distribute 6 skill across 7 agent (xem README matrix).

Memory: rename investigator→investigator-codebase + implementer→implementer-backend
(giữ history) + seed 3 new MEMORY (investigator-api/implementer-frontend/test-specialist)
extract relevant patterns. Delete old investigator.md + implementer.md.

README rewrite: 7-agent architecture + decision tree split-routing + phân việc matrix
boundary + token budget +50% cost reality (~1.05M opt / ~2M heavy ceiling) +
anti-truncation rules (gotcha #53 5× mitigation: brief ≤8K + curate pre-spawn +
entry ≤1.5K + 529 fallback solo).

⚠️ Anh main RESTART Claude Code CLI để registry hot-reload 7 agent (per S27 lesson
model:inherit + new files). Verify post-restart: smoke spawn 3 new agent confirm load.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-05-29 10:42:05 +07:00
parent 49134f4f41
commit fd0554a585
23 changed files with 663 additions and 567 deletions

View File

@ -1,236 +1,173 @@
# Multi-agent SOLUTION_ERP — Master Coordination Guide
# Multi-agent SOLUTION_ERP — Master Coordination Guide (7-agent)
> **Architecture:** 4 sub-agents Opus 4.7 1M Max + em main coordinator.
> **Architecture:** 7 sub-agents Opus 4.8 1M Max + em main coordinator.
> Pattern: Anthropic Building Effective Agents orchestrator-workers + Cognition "writes single-threaded" hybrid + post-deploy automated watchdog.
> Setup: Session 20 turn 12 (2026-05-11) initial 3 agents + Session 21 turn 1 (2026-05-12) +cicd-monitor — empirical-grounded từ NAMGROUP s41-s43 trial curve.
> **Upgrade S39 (2026-05-29):** 4→7 agent (split investigator + implementer, +test-specialist) + budget +50% + 5 RAG MCP per agent. Reference BVAAU 7-agent config (adapted, NOT copied — SOLUTION_ERP 2-FE-app fit + 6 skill proven battle-test 38 session). Prior: S20t12 initial 3 + S21t1 +cicd-monitor.
---
## 🎯 Architecture
## 🎯 Architecture (7 agent)
```
┌─────────────────────────────────────────────────────────┐
│ EM (Main) — Opus 4.7 1M Max │
│ • Reasoning + write code (single-threaded principle) │
│ • User dialog + architectural decisions
│ • Coordinate 4 sub-agents via SendMessage
│ • Synthesize cross-agent findings end-of-session
└─────────────────────────────────────────────────────────┘
↓ spawn + keep-alive (Opus 4.7 1M Max each)
┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐
│Investigator│ │ Implementer│ │ Reviewer │ │ CI/CD │
│ │ │ │ │ │ │ Monitor │
READ only │ │ WRITE strict│ │ READ only │ │ READ only
│ │classification│ │ adversarial│ │ post-deploy
Research + │ │Cookie-cutter│ │ pre-commit │ │
Audit + │ + Multi-file│ │ + live │ │ Gitea poll
External │ │ independent│ │ verify │ │ + bundle
research │ │ ONLY │ │ │ │ hash +
│ │ │ │ prod smoke
└────────────┘ └────────────┘ └────────────┘ └────────────┘
cyan yellow red green
┌──────────────────────────────────────────────────────────────
│ EM (Main) — Opus 4.8 1M Max
│ • Reasoning + write code (single-threaded principle)
│ • Schema/UX/architecture decision + cross-stack tight coupling
│ • Coordinate 7 sub-agents via spawn + SendMessage │
│ • Synthesize cross-agent findings + commit/push (em main only)
│ • Fallback solo nếu spawn fail (gotcha #53 truncate / 529) │
└──────────────────────────────────────────────────────────────┘
↓ spawn + keep-alive (Opus 4.8 1M Max inherit each)
── RESEARCH (READ) ────────── ── IMPLEMENT (WRITE) ──────────── ── QUALITY ──────────
┌──────────────────┐ ┌───────┐ ┌─────────────────┐ ┌──────────┐ ┌────────┐ ┌─────────┐ ┌────────┐
investigator- │ │invest-│ │implementer- │ │implement-│ │test- │ │reviewer │ │cicd-
codebase │ │igator-│ │backend │ │er- │ │special-│ │ │ │monitor
│ │api │ │ │ │frontend │ │ist │ │ │ │
INTERNAL audit EXTERN-│ │ .NET Domain+App │ │ FE 2 app │ │ tests/ │ │adversa- │ │post-
SQL/EF/grep/ │ │AL docs│ │ +Infra+Api │ │cookie- │ │dedica- │ │rial pre-│ │deploy
│ reference mirror │ │CVE/lib│ │ entity/CQRS/Mig │ │cutter │ │ted │ │commit + │ │Gitea +
│ │/cross-│ │ /Controller│mirror │ │xUnit │ │live curl│ │bundle
│ │ │project│ │ │ │SHA256 │ │ │ │ │ │+ smoke │
└──────────────────┘ └───────┘ └─────────────────┘ └──────────┘ └────────┘ └─────────┘ └────────┘
cyan blue yellow orange purple red green
```
---
## 🚨 RULE BẮT BUỘC (S22 chốt cuối — directive Thứ 9)
## 🚨 RULE BẮT BUỘC (S39 updated)
**Em main BẮT BUỘC phân việc cho sub-agent đúng vai trò khi ACCEPT criteria match.**
**Em main BẮT BUỘC phân việc cho sub-agent đúng vai trò khi ACCEPT criteria match. Budget +50% → lean toward delegate + parallel, ít em main solo fallback.**
Retrospective S22 lesson: Em main solo 6/10 task lẽ ra delegate được (Plan D + Plan C task 1-4 + S22+2 + S22+3 + Plan F pre-flight). KHÔNG fail nhưng vi phạm directive. Token cost overhead + lose multi-agent ROI.
**Workflow forward S39+:**
- Trước mọi task → classify qua decision tree dưới
- Read-only research → **split**: internal codebase audit → `investigator-codebase` · external docs/CVE/lib → `investigator-api` (có thể spawn parallel cả 2)
- WRITE scaffold → **split**: .NET backend → `implementer-backend` · FE 2 app → `implementer-frontend` (parallel khi independent — vd BE entity + FE types cùng lúc)
- Test → **`test-specialist`** dedicated (KHÔNG để implementer kiêm)
- Deploy claim → `cicd-monitor` sau push (skip docs-only gotcha #41)
- Heavy diff / security / wire BE claim → `reviewer` pre-commit
**Workflow forward S23+:**
- Trước mọi task, classify qua decision tree dưới đây
- Nếu task qualify Implementer Case 1/2/3/5 → **BẮT BUỘC spawn**, KHÔNG em main solo
- Nếu task có pre-flight read-only → **BẮT BUỘC spawn Investigator** trước
- Nếu task có deploy claim → **BẮT BUỘC spawn CICD Monitor** sau push
- Nếu task có heavy diff / security-sensitive → **BẮT BUỘC spawn Reviewer** pre-commit
**Em main solo CHỈ khi:** schema/UX/architecture decision · cross-stack tight coupling · bug fix reasoning chain · gotcha #53 fallback (spawn truncate/529 → em main solo reliable, proven S37 BE 700 LOC + FE 4 file).
Em main solo chỉ khi: schema/UX/architecture decision + cross-stack tight coupling + bug fix reasoning chain.
**Anti-truncation rules (gotcha #53 — 5× occurrence S35-S37):**
- Brief WRITE agent ≤ 8K (heavy spec ~10K → truncate risk). FE tight brief proven 0 truncation S36.
- Curate MEMORY pre-spawn nếu > 25KB (Investigator 32KB S37 → truncate mid-MEMORY).
- Agent keep entry ≤ 1.5K chars (frontmatter rule mỗi agent).
- Em main grep verify manual nếu agent return truncated mid-task.
- 529 Overload transient → em main solo fallback (KHÔNG retry loop).
---
## 🔄 Invocation decision tree (em main apply)
Task input → classify task type:
```
├── Read-only research / audit / scan > 5 files / external fetch?
│ → Spawn Investigator (always safe)
├── Read-only INTERNAL audit (codebase/SQL/EF diff/grep > 5 files)?
│ → investigator-codebase (cyan)
├── Adversarial pre-commit verify / heavy diff / deploy claim?
│ → Spawn Reviewer (always before push critical)
├── Read-only EXTERNAL (official docs / NuGet-npm CVE / lib eval / cross-project ref)?
│ → investigator-api (blue)
│ → Cả 2 investigator parallel OK khi task cần both (vd "audit current + research best practice")
├── After push code commit (NOT docs-only — gotcha #41 path filter)?
Spawn CI/CD Monitor (poll Gitea Actions + bundle hash + prod smoke async)
│ → ~150K spawn cost — catch deploy fail tự động không phụ thuộc em main nhớ verify
├── WRITE .NET backend (entity/EF Config/Mig/CQRS/Controller/DbInit)?
Spec deterministic · pattern proven >1× · >30min · ≤2 layer
│ → implementer-backend (yellow) [Case 1/2/3/5]
├── User reports prod issue ("500", "không lên", "không thấy thay đổi")?
→ Spawn CI/CD Monitor diagnose first (logs + curl + sqlcmd evidence)
├── WRITE FE 2 app (page/types/component cookie-cutter mirror)?
✓ UX flow chốt by em main · spec deterministic
│ → implementer-frontend (orange) [Case 1/2]
│ → BE + FE parallel khi independent (em main chốt DTO shape first)
├── Cookie-cutter mechanical (N independent files same pattern, deterministic spec)?
✓ N >= 5 files
│ ✓ Spec deterministic (no implicit decisions)
│ ✓ Pattern proven > 1× prior
│ → Spawn Implementer (Case 1 Anthropic verified)
├── WRITE test (xUnit Domain policy / Infra handler / authz regression)?
→ test-specialist (purple) [test-before bug/critical, test-after feature UAT]
├── Multi-file independent changes (different modifications per file)?
✓ Each file verifiable independently
│ ✓ Files NOT cross-stack tight coupling
│ → Spawn Implementer (Case 2 orchestrator-workers)
├── After push code commit (NOT docs-only)?
→ cicd-monitor (green) — Gitea poll + bundle hash + Mig prod + smoke
├── Test generation for isolated methods?
│ → Spawn Implementer (Case 3 verified)
├── Adversarial pre-commit / heavy diff / wire BE claim / security?
│ → reviewer (red) — Smart Friend 5-category + live curl
├── Mass code migration (framework upgrade, per-file deterministic)?
│ → Spawn Implementer (Case 5 verified)
├── Quick task < 30 min? → Em solo direct
── Quick task < 30 min (overhead spawn không xứng)?
→ Em solo direct
├── Schema design / UX flow / architectural decision / cross-stack tight coupling?
│ → Em solo (Cognition "writes single-threaded")
│ → Investigator pre-flight optional
│ → Reviewer pre-commit always
└── Bug fix tightly coupled (cross BE/FE/DB, reasoning chain)?
→ Em solo (Anthropic warning: "tightly interdependent coding")
→ Investigator pre-flight optional
→ Reviewer pre-commit always
── Schema/UX/architecture/cross-stack tight/bug reasoning chain?
→ Em solo (Cognition) + investigator pre-flight optional + reviewer pre-commit
```
---
## 📋 Implementer task classification — CRITICAL rules
## 📋 Phân việc matrix — split boundary (CRITICAL)
**Em main MUST self-check before spawning Implementer:**
| Layer / File | Owner |
|---|---|
| `src/Backend/SolutionErp.{Domain,Application,Infrastructure,Api}/**` | **implementer-backend** |
| `fe-admin/src/**` + `fe-user/src/**` | **implementer-frontend** |
| `tests/**` | **test-specialist** |
| Mig design / FK strategy / discriminator / schema | **em main solo** (implementer-backend scaffold sau khi chốt) |
| UX flow (drawer/tab/modal) / page structure | **em main solo** (implementer-frontend scaffold sau khi chốt) |
| Internal SQL/EF/grep audit | **investigator-codebase** |
| External docs/CVE/lib/cross-project | **investigator-api** |
| Pre-commit verify | **reviewer** (NEVER write) |
| Post-deploy verify | **cicd-monitor** (NEVER write) |
### ✅ ACCEPT criteria (ALL must be true)
1. ✅ Spec deterministic (no implicit decisions left for agent)
2. ✅ Files independent (modifications don't depend on each other)
3. ✅ Pattern repeatable (proven > 1× prior session — reference memory entries)
4. ✅ Estimated effort > 30 min (overhead worth)
5. ✅ Max 2 layers cross-stack (NOT BE entity + DTO + FE wire 3-layer)
6. ✅ Each file output verifiable independently
### ❌ REFUSE criteria (ANY triggers refusal)
1. ❌ Schema design decisions needed
2. ❌ UX flow decisions needed
3. ❌ Cross-stack > 2 layers tight coupling
4. ❌ Bug fix involving reasoning chain
5. ❌ Integration testing involving multiple components
6.< 30 min trivial task
7. First time pattern (no prior precedent)
8. Spec ambiguity > 20%
**Implementer agent ALSO has self-check trong system prompt → auto-refuse out-of-scope.**
**Boundary dứt khoát:** implementer-backend KHÔNG touch FE · implementer-frontend KHÔNG touch BE (chỉ Read DTO shape) · cả 2 implementer KHÔNG viết test (→ test-specialist) · test-specialist reveal prod bug → REPORT em main KHÔNG fix.
---
## 💾 Memory consult discipline
## 🛠️ Skill assignment (6 skill, re-distributed S39)
Each agent has `.claude/agent-memory/<name>/MEMORY.md` persistent diary:
| Agent | Skills |
|---|---|
| investigator-codebase | `contract-workflow` + `permission-matrix` + `ef-core-migration` |
| investigator-api | `dependency-audit-erp` |
| implementer-backend | `ef-core-migration` + `permission-matrix` + `contract-workflow` + `form-engine` |
| implementer-frontend | `permission-matrix` |
| test-specialist | `contract-workflow` + `permission-matrix` |
| reviewer | `dependency-audit-erp` + `contract-workflow` + `permission-matrix` |
| cicd-monitor | `iis-deploy-runbook` + `dependency-audit-erp` + `ef-core-migration` |
- **Spawn:** Auto-inject first 200 lines / 25KB của MEMORY.md
- **During work:** Agent may Read full MEMORY.md if task complex
- **Before return:** Agent MUST update MEMORY.md với findings (BẮT BUỘC)
- **Cross-session:** MEMORY.md persists on disk
## 🔧 Tool grant (S39 — +3 RAG MCP per agent)
**Em main routine end-of-session:**
```
SendMessage Investigator: "Flush MEMORY.md với findings session này. Format:
1-2 sentences per finding. Categories: patterns / anti-patterns / gotchas
discovered / external research summary."
SendMessage Implementer: "Flush MEMORY.md với patterns applied + ambiguities
encountered + scope refusals."
SendMessage Reviewer: "Flush MEMORY.md với anti-patterns observed + gotcha
regressions caught + claim verification results."
SendMessage CI/CD Monitor: "Flush MEMORY.md với run failures observed + post-deploy
bundle hash trend + recurring CI bugs + deploy time delta vs baseline."
Em read 4 MEMORY.md updates → synthesize cross-agent learnings → integrate
vào project memory / session log.
Em proceed normal close-out: STATUS update + commit + push.
```
All 7 agent có 5 RAG MCP: `search_memory` + `search_code` (BM25, prefer over Read full file — tiết kiệm token) + `cross_project_search` + `store_memory` + `list_projects`. Base tools per role (READ: Read/Grep/Glob/Bash [+WebFetch/Search cho api] · WRITE: +Edit/Write/Skill).
---
## 🛠️ SendMessage discipline
## 💾 Memory discipline
**Cost optimization:**
- Within 5min cache TTL window khi possible (90% discount cached prefix)
- Compact prompts (~5K new content each) thay vì dump (~24K)
- Skip spawn cho task < 30min
Each agent `.claude/agent-memory/<name>/MEMORY.md` persistent diary. Spawn auto-inject 200 lines/25KB. Update BEFORE return (BẮT BUỘC, entry ≤ 1.5K chars). 7 folder: investigator-codebase (history từ investigator) · investigator-api (NEW seed) · implementer-backend (history từ implementer) · implementer-frontend (NEW seed) · test-specialist (NEW seed) · reviewer · cicd-monitor.
**Context discovery preservation:**
- Include explicit "Include surprising findings + edge cases discovered" trong spec
- Periodic checkpoint mỗi 1-2h heavy work: prompt agents flush MEMORY.md
- Session crash MEMORY.md preserved on disk, in-session context lost
**End-of-session:** em main SendMessage mỗi agent flush MEMORY → đọc 7 update → synthesize cross-agent → integrate project memory/session log → commit/push.
---
## 🎯 Project-specific tunings (SOLUTION_ERP)
**Stack:** .NET 10 Clean Architecture + CQRS MediatR + EF Core 10 + SQL Server + 2 React 19 Vite 8 FE (admin + user) + Gitea Actions CI + Windows IIS.
**Current state (Session 21 turn 1 — 2026-05-12):** 27 migrations · 59 DB tables · ~142 endpoints · 34 FE pages · 81 test pass · 44 gotchas · 16 memory entries · 6 skills · 30 demo user · 3 prod domain `*.solutions.com.vn` · **4 sub-agents (seeds-only post-cicd-monitor add)**.
**Skills preload mỗi sub-agent:**
- **Investigator:** `contract-workflow` + `permission-matrix` + `ef-core-migration` (research patterns + schema audit)
- **Implementer:** `ef-core-migration` + `permission-matrix` + `form-engine` (scaffold + 3-file rule + permission seed)
- **Reviewer:** `dependency-audit-erp` + `iis-deploy-runbook` + `contract-workflow` (security/deploy/workflow audit)
- **CI/CD Monitor:** `iis-deploy-runbook` + `dependency-audit-erp` + `ef-core-migration` (deploy runbook + dep pin verify + mig prod check)
**Context paste session start (em main responsibility):**
- `docs/STATUS.md` current state
- `docs/CLAUDE.md` root tech context
- Latest 2 session logs `docs/changelog/sessions/`
- Active gotchas `docs/gotchas.md`
- Memory entries `C:\Users\pqhuy\.claude\projects\D--Dropbox-CONG-VIEC-SOLUTION\memory\MEMORY.md`
Auto-inject baseline ~80-150K per agent. Plus task-specific Read on-demand.
**Windows MAX_PATH pitfall:** Project path `D:\Dropbox\CONG_VIEC\SOLUTION\SOLUTION_ERP\` đã nested 51 chars + Dropbox-managed. **Implementer frontmatter KHÔNG dùng `isolation: worktree`** (per Pitfall 1 template). Default branch isolation OK.
**UAT live mode (Phase 9 active):** Memory `feedback_uat_skip_verify` skip `dotnet test` mỗi chunk, vẫn `npm run build` × 2 app. Reviewer khi spawn pre-commit cần áp rule này (không yêu cầu test increment cho UAT iteration), VẪN verify wire BE + security + anti-fiddle.
---
## 📊 Cost reality
## 📊 Cost reality (budget +50% S39)
| Component | Effective tokens billed (after caching) |
|---|---|
| 4 sub-agents spawn setup | ~750K (4 × ~188K cache WRITE CI/CD Monitor +~150K) |
| 10 SendMessages each ~24K new | ~450K (10 × 45K equivalent với cache READ) |
| Em main session | ~200K |
| **Total per heavy session** | **~1.35M (~6.5× solo)** |
| **Optimized (compact + cache + skip trivial)** | **~700K (~3.5× solo)** |
| 7 sub-agents spawn setup | ~1.1M (7 × ~155K cache WRITE) |
| SendMessages cached | ~500K |
| Em main session | ~250K |
| **Total per heavy session** | **~1.85M (~9× solo)** |
| **Optimized (compact + cache + skip trivial + parallel)** | **~1.05M (~5× solo)** |
**Max 20× plan absorbs ~3.5× solo cost comfortable.**
**CI/CD Monitor +~150K trade-off:** catch deploy fail tự động KHÔNG phụ thuộc em main nhớ verify thủ công (recurring blind spot pattern).
**+50% budget** (vs prior ~700K opt / ~1.35M heavy → now ~1.05M opt / ~2M heavy ceiling). Max 20× plan absorbs ~5× comfortable. Trade-off justify: split nhẹ hơn mỗi spawn (giảm gotcha #53 truncate) + parallel BE+FE+test (giảm wall-clock) + test-specialist clear coverage gap backlog (quality).
---
## 🧪 Trial workflow (2-4 tuần evaluate)
## 🎯 Project tunings (SOLUTION_ERP)
- **Week 1:** Setup + Plan trial cookie-cutter (Case 1 verified). SOLUTION_ERP candidate: Contract V2 wire Mig 28+29 mirror PE pattern pattern proven 1× S17-S19 (PE V2). ~600+ LOC, 2 mig + Service + Controller + FE × 2 app. **CI/CD Monitor spawn sau mỗi push** verify Gitea Actions PASS + bundle hash 2 app changed + mig 28+29 applied prod.
- **Week 2-3:** Feature wire (Solo em + Inv pre-flight + Rev pre-commit + CI/CD Monitor post-push) phân quyền strict V2 + drop legacy V1.
- **Week 4:** Evaluate quality vs cost real numbers.
- Pass criteria: Rev catch 2 wire bugs trước commit + CI/CD Monitor catch 1 deploy ship fail (bundle hash unchanged / mig drift) + time saving 25% Case 1+2 + Max 20× quota comfortable
- Fail criteria: any of above unmet rollback solo, agents archived
**Stack:** .NET 10 Clean Arch + CQRS MediatR + EF Core 10 + SQL Server + 2 React 19 Vite 8 FE + Gitea CI + Windows IIS.
**State (S38 — 2026-05-28):** 40 mig · 84 tables · ~223 endpoints · 53 FE pages · 130 test PASS · 53 gotchas · 27 memory · 6 skills · **7 sub-agents** · Phase 10 COMPLETE 11/11 Plan G-*.
**Windows MAX_PATH:** project path nested + Dropbox-managed → implementer KHÔNG dùng `isolation: worktree`. Default branch OK.
**UAT live mode (Phase 9):** `feedback_uat_skip_verify` — skip `dotnet test` mỗi chunk, vẫn `npm run build` × 2. test-specialist test-after khi UAT confirm; test-before cho bug/critical algo.
---
## 🔗 References
- [Anthropic Building Effective Agents](https://www.anthropic.com/engineering/building-effective-agents)
- [Cognition "Multi-Agents Working"](https://cognition.ai/blog/dont-build-multi-agents)
- [Anthropic Sub-agents docs](https://docs.claude.com/en/docs/claude-code/sub-agents)
- Memory entries (`C:\Users\pqhuy\.claude\projects\D--Dropbox-CONG-VIEC-SOLUTION\memory\`):
- `feedback_per_chunk_commit.md` per-chunk discipline reference cho Implementer pattern
- `feedback_uat_skip_verify.md` Reviewer rule trong Phase 9
- `feedback_drastic_refactor_scope.md` Implementer refuse criteria reference
- `feedback_audit_reuse_before_clone.md` Investigator audit-first pattern
- [Cognition "Don't Build Multi-Agents"](https://cognition.ai/blog/dont-build-multi-agents)
- BVAAU 7-agent reference: `D:\Dropbox\CONG_VIEC\BENHVIEN_A_AU\SOURCE_CODDE\.claude\agents\` (adapted S39 — split trục + 5 RAG tool; SOLUTION_ERP giữ 6 skill + backend/frontend split thay domain/infra cho 2-FE-app fit)
- Memory: `feedback_per_chunk_commit` · `feedback_uat_skip_verify` · `feedback_audit_reuse_before_clone` · `feedback_implementer_truncation_mitigation` (gotcha #53)
## ⚠️ CLI restart required
Agent definition change (S39 split 4→7) → **anh main restart Claude Code CLI** để registry hot-reload (per S27 lesson — model:inherit + new agent files). Verify post-restart: spawn smoke test mỗi agent mới (investigator-api / implementer-frontend / test-specialist) confirm load OK.