fd0554a585
[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 >
2026-05-29 10:42:05 +07:00
ae1814cdba
[CLAUDE] Skill: Setup multi-agent infrastructure (Investigator + Implementer + Reviewer)
...
Session 20 turn 12: User paste self-contained template setup multi-agent từ
NAMGROUP s41-s43 trial (empirical-grounded Anthropic Building Effective
Agents + Cognition "writes single-threaded"). Pre-flight decision gate 6/6
pass → proceed setup.
### Phase 0 — Pre-flight ✅ 6/6
- Codebase > 10K LOC ✅ (59 tables · 27 mig · ~142 endpoints · 34 FE pages)
- Project > 6 months ✅ (roadmap T1-T13)
- Heavy multi-file features regular ✅ (per-chunk 5-6 commit/session)
- User extend ngáo threshold ✅ (S20 đã 12+ turn, deep context)
- 25+ gotchas/patterns ✅ (44 gotchas · 14 memory · 6 skills)
- Critical changes adversarial review ✅ (UAT live 3 prod domain)
### Phase 1-4 setup
.claude/
├── agents/
│ ├── README.md (master coordination guide ~9.7KB)
│ ├── investigator.md (READ — research + audit + WebFetch ~7.3KB)
│ ├── implementer.md (WRITE conditional Case 1+2+3+5 ~8.4KB)
│ └── reviewer.md (READ adversarial pre-commit + live curl ~9.6KB)
└── agent-memory/
├── investigator/MEMORY.md (seed ~5.9KB)
├── implementer/MEMORY.md (seed ~6.9KB)
└── reviewer/MEMORY.md (seed ~6.5KB)
### Customizations per SOLUTION_ERP
- Stack: .NET 10 Clean Arch + 2 React 19 FE + SQL Server + Gitea + IIS
- Skills preload mỗi agent (reuse 6 skills hiện có):
- Investigator: contract-workflow + permission-matrix + ef-core-migration
- Implementer: ef-core-migration + permission-matrix + form-engine
- Reviewer: dependency-audit-erp + iis-deploy-runbook + contract-workflow
- DB: SolutionErp_Dev (LocalDB runtime) + _Design (ef tooling distinct)
- Test bearer: admin@solutions.com.vn / Admin@123456 (full) +
nv.test@solutions.com.vn / TestUser@123456 (Drafter UAT scope)
- Prod UAT: api/admin/eoffice.solutions.com.vn
### Windows MAX_PATH pitfall handled
Project path D:\Dropbox\CONG_VIEC\SOLUTION\SOLUTION_ERP\ = 51 chars + nested
Dropbox-managed → `isolation: worktree` DROPPED khỏi implementer.md frontmatter
per template Pitfall 1. Em main reviews diff before commit (compensate).
### Memory baseline seeded
3 MEMORY.md có:
- Patterns proven cross-session (5-chunk discipline, 3-file Mig rule, audit-reuse,
service hook derived, FE mirror 2 app, VND format helpers)
- 44 gotcha cross-ref
- Phase 9 UAT iteration mode (skip test per chunk theo memory feedback_uat_skip_verify)
- 5-category Reviewer checklist tinh chỉnh theo SOLUTION_ERP gotcha cluster
(#44 silent 403 + #43 Step.Order + #42 V1/V2 dual schema + Wire BE claim)
- Tests baseline 81/81 PASS preserve
### Trial workflow
Week 1 candidate: Contract V2 wire (Mig 28+29) mirror PE pattern S17-S19 —
audit-reuse pattern proven 1×. ~600+ LOC, 2 mig + Service + Controller + FE
× 2 app. Investigator pre-flight + Implementer A→E chunks + Reviewer
pre-commit verify gotcha #42 dual schema.
Em main spawn first time qua /agents command. Pattern tracking ROI 4 tuần
trial (week 4 evaluate keep / tune / archive).
### Acceptance criteria 7/7 ✅
- 4 agent .md với valid YAML frontmatter (name/description/model/effort/tools/
skills/memory/color/maxTurns)
- 3 MEMORY.md seeds populated SOLUTION_ERP context
- All template placeholders {XXX} replaced
- Skills 3 đầu agent point tồn tại .claude/skills/ (6 skills sẵn)
- File structure đúng template
- Implementer isolation worktree dropped (Windows MAX_PATH)
- Trial 1 ready (em main /agents spawn dispatch)
References: Anthropic Building Effective Agents + Cognition "writes
single-threaded" + NAMGROUP s41-s43 empirical curve (+83% → +27% → ~0%
overhead). Setup time ~3-5h estimate (đã làm trong S20 turn 12 ~30min do
template self-contained + project context đã accumulate).
Path filter CI sẽ skip (.claude/skills/** trong paths-ignore, mirror cho
.claude/agents/** + .claude/agent-memory/** thực tế cũng docs-class).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-11 21:09:46 +07:00