[CLAUDE] Infra: adopt AI_INFRA adap-* channel + store_memory strip + frontend-designer (S47)

- Install 3 federated adoption slash-commands (/adap-apply|report|request) in .claude/commands/ (read AI_INFRA outbox read-only, apply own repo, write adap-report; AI_INFRA /adap-audit reads cross-repo)
- Broadcast #1 (Memory-store-memory-strip-global): strip store_memory from all 8 sub-agents -> lead = sole RAG-writer; 4 RAG-read retained; agents/README synced + G-015 note
- Broadcast #2 (Agent-frontend-designer-floor): frontend-designer 8th agent (pink) -- forked AI_INFRA canonical FD1-FD10 visual-verification floor, tailored SE stack + use-existing-DS + boundary vs implementer-frontend; memory seed; roster doc 7->8
- Broadcast #3 (Governance-gov-v2): already-applied S44 -- delta report (gap: no formal error-ledger/L.b checklist)
- 3 adap-reports (5-field LOCK) in docs/governance/adap-reports/ + adoption-ledger row
- All nac executed-file/verified-pending (restart + spawn-test). 0 agents spawned. No product code. Test gate 181 unchanged. CI-skip (all .md).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-06-02 23:34:07 +07:00
parent aecd96b1cd
commit 72bbfa56a5
20 changed files with 492 additions and 18 deletions

View File

@ -1,8 +1,9 @@
# Multi-agent SOLUTION_ERP — Master Coordination Guide (7-agent)
> **Architecture:** 7 sub-agents Opus 4.8 1M Max + em main coordinator.
> **Architecture:** 8 sub-agents Opus 4.8 1M Max + em main coordinator (7 core + frontend-designer pink, S47).
> Pattern: Anthropic Building Effective Agents orchestrator-workers + Cognition "writes single-threaded" hybrid + post-deploy automated watchdog.
> **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.
> **Upgrade S47 (2026-06-02):** **+frontend-designer (8th sub, pink)** — FD1FD10 visual-verification design floor (forked AI_INFRA canonical, broadcast `Agent-frontend-designer-floor`). + **`store_memory` STRIPPED khỏi MỌI sub → lead = sole RAG-writer** (broadcast `Memory-store-memory-strip-global`); sub ghi finding → MEMORY.md (file). adap-reports: `docs/governance/adap-reports/`.
---
@ -76,6 +77,11 @@
│ → implementer-frontend (orange) [Case 1/2]
│ → BE + FE parallel khi independent (em main chốt DTO shape first)
├── WRITE FE DESIGN/REDESIGN (đẹp thật / UX mới / greenfield visual — KHÔNG mechanical mirror)?
│ ✓ design-system-first + visual-verification loop (Playwright screenshot ≥2 viewport → rubric → fix)
│ → frontend-designer (pink) [FD1FD10 floor]
│ ⟂ vs implementer-frontend: đẹp/UX/thiết kế → frontend-designer · cookie-cutter SHA256 mirror theo spec → implementer-frontend (KHÔNG double-touch 1 file UI)
├── WRITE test (xUnit Domain policy / Infra handler / authz regression)?
│ → test-specialist (purple) [test-before bug/critical, test-after feature UAT]
@ -98,7 +104,8 @@
| Layer / File | Owner |
|---|---|
| `src/Backend/SolutionErp.{Domain,Application,Infrastructure,Api}/**` | **implementer-backend** |
| `fe-admin/src/**` + `fe-user/src/**` | **implementer-frontend** |
| `fe-admin/src/**` + `fe-user/src/**` (cookie-cutter mirror scaffold theo spec) | **implementer-frontend** |
| FE **design/UX/redesign** (aesthetic · new visual · design-system · a11y polish) | **frontend-designer** (self-gate rubric FD4 trước reviewer) |
| `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) |
@ -107,7 +114,7 @@
| Pre-commit verify | **reviewer** (NEVER write) |
| Post-deploy verify | **cicd-monitor** (NEVER write) |
**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.
**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 · **frontend-designer = design/UX/đẹp (FE-only, KHÔNG BE/DB) ⟂ implementer-frontend = mechanical mirror theo spec — KHÔNG double-touch cùng 1 file UI (chồng lấn → escalate em main).**
---
@ -122,16 +129,19 @@
| 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` |
| frontend-designer | `frontend-design` + `senior-frontend` + `brand-guidelines` + `theme-factory` + `webapp-testing` (FD2 loop) + `web-artifacts-builder` |
## 🔧 Tool grant (S39 — +3 RAG MCP per agent)
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).
All 7 agent có **4 RAG-READ MCP**: `search_memory` + `search_code` (BM25, prefer over Read full file — tiết kiệm token) + `cross_project_search` + `list_projects`. Base tools per role (READ: Read/Grep/Glob/Bash [+WebFetch/Search cho api] · WRITE: +Edit/Write/Skill).
> ⚠️ **`store_memory` GỠ khỏi MỌI sub (2026-06-02 — AI_INFRA broadcast `Memory-store-memory-strip-global`, adap-report cùng id).** → **lead (em main) = sole RAG-writer** (mechanized failure-safe: sub vật-lý không gọi được `store_memory`). Sub tìm thấy finding/pattern mới → ghi **MEMORY.md** (file); lead + re-index đưa vào RAG. *Accuracy (G-015): đây KHÔNG = sub "read-only" — sub vẫn giữ `Bash` (+ vai write giữ `Write/Edit`); containment thật = defense-in-depth git-diff + Qdrant chunk-count, chưa phải allowlist đơn độc.*
---
## 💾 Memory discipline
Each agent `.claude/agent-memory/<name>/MEMORY.md` persistent diary. Spawn auto-inject first 200 lines/25KB. Update BEFORE return (BẮT BUỘC, entry ≤ 1.5K chars). 7 folder: investigator-codebase · investigator-api · implementer-backend · implementer-frontend · test-specialist · reviewer · cicd-monitor.
Each agent `.claude/agent-memory/<name>/MEMORY.md` persistent diary. Spawn auto-inject first 200 lines/25KB. Update BEFORE return (BẮT BUỘC, entry ≤ 1.5K chars). 8 folder: investigator-codebase · investigator-api · implementer-backend · implementer-frontend · test-specialist · reviewer · cicd-monitor · frontend-designer.
**Tiered Memory Policy v1** (adopt AI_INFRA bulletin 2026-05-29 — thay ngưỡng cứng ">25KB archive" bằng tiered + just-in-time; size to ≠ chất lượng, context-rot):
- **L1 HOT** = `MEMORY.md` soft-cap **~30KB** (role + patterns + anti-patterns + 5-8 entry gần nhất) → auto-inject mỗi spawn