e27d877172
[CLAUDE] Infra: adopt AI_INFRA Harness 1/2/3 — monitor subs (roster 8->10) + wave-folder isolation + email channel (S49)
...
Harness 1 (Self-observability): NEW tooling-auditor (H1 tooling/docs-freshness 4-faceted) + harvest-curator (H2 harvest-integrity 5-axis) INFORM-only monitor subs, TACH BIET per anh-mandate -> roster 8->10. Wire session-start Phase 2.1.1 RE-REPORT + session-end L.b 6->7-step (H2 5-axis GATE + H1 chot + B5 wave-gom). H3 plugin/skill = gop-vai doc, 0 new agent.
Harness 2 (wave-folder isolation): hmw.js WAVE-MODE (subMdPath + tool-aware writeGuard) + .gitignore wave-*/ + agent-teams/ (B6 git-check-ignore verified) + NEW workflows/README convention. Harness 3 (email channel): broadcasts/ (6+6 folder + 13 .gitkeep + _index + inbox/README, committed) + send/check-email cmd (self=se) + adap-apply base-path fix outbox/all/.
HMW-mode ON: recon fan-out 4 read-only agent -> em main single-writer WRITE -> reviewer PASS all 3. Containment: git-diff 1 benign self-MEMORY + chunk-count 2414=2414 (0 RAG-write). Nac executed-file, verified-runtime PENDING CLI restart. 3 adap-reports + session log. Test 181 unchanged (no product code). CI runs (hmw.js/.gitignore/.gitkeep not path-ignored) but no bundle/migration change.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-07 23:18:43 +07:00
cf908f5276
[CLAUDE] Infra: adopt AI_INFRA HMW-governance broadcast — ultra-on/off toggle + hmw.js checkpoint-gate + memory-safety (S49)
...
adap-apply 2026-06-03-Agent-ultracode-hmw-mem-governance (reviewer_gate PASS).
PROJECT-FIT=ADOPT tailored: SE 8-agent roster. nac=executed-file (verified-pending restart+spawn-test).
- T1/T2 toggle: .claude/commands/ultra-on.md + ultra-off.md; marker .claude/hmw-mode.on gitignored (T2 non-negotiable).
- T3: session-start BUOC 0.5 reads marker -> reports ON/OFF.
- S2/S3/S4: .claude/workflows/hmw.js P2 fan-out — checkpointApproved throw (mechanized), args JSON.parse-guard, role-whitelist fail-soft, VALID_ROLES=8 SE agents, sub-no-spawn-sub, return schema findings+memoryDelta 4-field (R1).
- M1-M5: B1 slice-inject / M2 return-delta-only / B3 single-writer append-only / B2 harvest-lien / M5 store_memory-strip re-verified intact (0 tools-grant).
- agents/README.md +HMW governance section (VALID_ROLES source-of-truth) + adap-report 5-field LOCK.
Test 181 unchanged (no .cs/.tsx). CI-skip (all .md/.js/.gitignore).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-03 13:15:03 +07:00
72bbfa56a5
[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 >
2026-06-02 23:34:07 +07:00
9f10764b06
[CLAUDE] Docs: S40 finish bulletin MUC 2+4 gaps (tiered agent-def + rag.json path fix + archive dirs)
...
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m5s
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) <noreply@anthropic.com >
2026-05-29 18:59:02 +07:00
6f08d1f0eb
[CLAUDE] Docs: S40 adopt AI_INFRA Tiered Memory Policy v1 (bulletin MUC 2)
...
- README Memory discipline -> tiered L1 HOT (soft-cap ~30KB) / L2 archive on-demand / L3 RAG just-in-time (thay hard >25KB)
- 7 agent MEMORY.md header -> tiered framing
- Anti-truncation rule soft-cap ~30KB
- Adopt per AI_INFRA Cross-Project Bulletin 2026-05-29; SE 7-agent in scope
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-29 16:58:39 +07:00
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
1bc6b708fc
[CLAUDE] Docs: patch CLAUDE.md+docs/CLAUDE.md+implementer.md drift S19→S32
...
Reviewer S33 startup audit verdict SEVERE drift CLAUDE.md baseline header
(emain context first-load file misleads sub-agent spawns post-S19).
Patches (10 line cross 3 file):
- CLAUDE.md mig count 26→33 + bảng 59→60 (Mig 32+33 Plan B Contract V2 S29)
- CLAUDE.md test count 81→111 × 2 sites
- CLAUDE.md gotcha count 26→52 (cumulative S22-S32 +26 entries)
- CLAUDE.md schema-diagram table 52→60 + +§14 Contract V2 LevelOpinions
- CLAUDE.md audit next cycle 2026-05-01→2026-06-01 (cron next due 6 ngày)
- CLAUDE.md Contract V2 wire status "chưa wire" → "ĐÃ WIRE (Mig 32+33 Plan B)"
- docs/CLAUDE.md gotchas table 38→52 pitfall
- implementer.md test baseline 81→111 × 2 (verify command + report format)
Drift defer 2026-06-01 batch (Reviewer recommend):
- investigator.md + reviewer.md gotcha 44→52 cosmetic
- docs/gotchas.md #50/#51 renumber order (non-functional)
Smart Friend independence note: Reviewer NOT softened verdict — em main
patched S29 sub-agent cicd-monitor.md baseline but MISSED CLAUDE.md root
cùng pass. Pattern reinforced: khi update mig count phải bundle CLAUDE.md.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-26 18:16:41 +07:00
f938bf57f5
[CLAUDE] Docs: patch cicd-monitor.md stale test+mig numbers (S31)
...
- Tests baseline: 81/81 → 111/111 PASS (58 Domain + 53 Infra)
- Migrations: 27 → 33 (latest Mig 33 AddPeLevelOpinionsForV2 S29)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-26 13:43:24 +07:00
b51fc94ca6
[CLAUDE] Skill: Add MCP RAG tools cho 4 sub-agent definitions
...
Add mcp__rag-unified__search_memory + mcp__rag-unified__cross_project_search
vào tools list 4 agents (Investigator + Implementer + Reviewer + CICD Monitor).
Tại sao:
- Sub-agent spawn KHÔNG inherit MCP server access từ parent session
- 4 agents previously CHỈ có Read/Grep/Glob/Bash → re-read MD files manually
- Plan B pre-flight Investigator phải Read PE Mig 22-26 thủ công thay vì 1 RAG query
- Plan CA Reviewer Cat 1 wire claim verify KHÔNG retrieve historical gotcha cross-session
- Plan CA Hotfix 1 silent sidebar drop nếu Implementer có RAG → catch Pattern 16-bis trước commit
Trade-off accepted (anh chốt full 4 agents):
- Token cost spawn cao hơn (~5-10K extra per RAG query)
- Risk noise dilute focus → mitigate by skill-specific prompt focus
Pitfall #1 reinforced (S27 multi-agent setup):
- Session đang chạy KHÔNG hot-reload registry
- Anh restart Claude Code CLI để spawn S30+ pick up MCP RAG tools
- Plan B Chunk D Implementer đang chạy dùng config CŨ (no MCP) — KHÔNG affect
Verify post-restart (Anh):
- Spawn test Investigator → call mcp__rag-unified__search_memory thử
- Pass = MCP tools loaded; Fail = YAML syntax issue (fallback wildcard mcp__rag-unified__*)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 12:32:58 +07:00
eb106f20a0
[CLAUDE] Docs: S22 chốt v2 — Directive Thứ 9 BẮT BUỘC delegate sub-agent + Plan B preview pre-allocated
...
Bro re-emphasize prompt setup với rule Thứ 9 mới:
"Các task bất kỳ, BẮT BUỘC phải phân việc đầy đủ cho các Sub Agent đúng
vai trò, vị trí đã được chỉ định"
Retrospective S22: em main solo 6/10 task lẽ ra delegate được (vi phạm):
- Plan D F2 toggle UI → Implementer Case 2 (cookie-cutter mirror UsersPage)
- Plan C task 4 reflection regression test → Implementer Case 3
- Plan C task 1-3 14 service test catch-up → Implementer Case 3
- S22+2 seed 20 user script → Implementer Case 1 (mass deterministic)
- S22+3 rename users SQL transaction → Implementer Case 1
- Plan F pre-flight prod sqlcmd → Investigator (read-only audit)
Em main solo ĐÚNG 4/10 task:
- Plan E phân quyền strict V2 (security cross-stack)
- S22+1 disable 3 button bug fix (reasoning chain)
- S22+4 attachment view + Section adjust (UX + schema decision)
- S22+5 Mig 30 per-NV (cross-stack schema refactor)
Forward S23+ rule enforcement:
1. .claude/agents/README.md +banner "🚨 RULE BẮT BUỘC (Thứ 9)" trên top
invocation tree + retrospective S22 lesson + workflow forward
2. docs/HANDOFF.md S22 chốt v2 Last updated với note S23+ forward
3. Plan B Contract V2 wire pre-allocated 5 chunk sub-agent role table:
- Pre-flight Contract V1 state → Investigator
- Chunk A Mig 31 schema → Implementer Case 2
- Chunk B Service ApproveV2Async → Em main Solo (cross-stack)
- Chunk C Mig 32 LevelOpinions + service hook → Implementer Case 2
- Chunk D FE ContractCreate Workspace V2 → Implementer Case 2
- Chunk E FE ContractDetail Section 5 V2 → Implementer Case 2
- Pre-commit each chunk → Reviewer
- Post-deploy → CICD Monitor
Em main solo CHỈ khi: schema/UX/architecture decision + cross-stack tight
coupling + bug fix reasoning chain.
KHÔNG cắt narrative cũ — append rule banner ở top + Plan B section trước
Session 21 timeline.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-14 21:47:58 +07:00
f1c61c9af6
[CLAUDE] Skill: Add cicd-monitor (4th sub-agent — post-deploy verify Gitea + bundle hash)
...
Path A chốt sau pre-flight Plan G Trial Week 1 (Session 21 turn 1). Con thứ 4 cicd-monitor green READ tier — poll Gitea Actions API + curl bundle hash 2 app + sqlcmd migration verify prod + endpoint smoke. ~150K spawn cost extra, trade-off để catch deploy ship fail tự động không phụ thuộc em main nhớ verify thủ công (recurring blind spot S20).
Files added:
- .claude/agents/cicd-monitor.md (~7KB) — system prompt + 8-step workflow + 5-stage report + gotcha #25/#39/#40/#41/#44 cross-ref + skill iis-deploy-runbook/dependency-audit-erp/ef-core-migration preload
- .claude/agent-memory/cicd-monitor/MEMORY.md (~5KB seed) — recurring CI bug patterns + 5-stage checklist + baseline build/bundle metrics
Files updated:
- .claude/agents/README.md — 4-agent architecture diagram (green slot) + decision tree (after push + prod issue diagnose branches) + memory routine 4 SendMessage + skills preload 4 agents + cost reality ~750K spawn / ~1.35M heavy / ~700K optimized + trial workflow Week 1-3 CI/CD Monitor spawn integrated + pass criteria + catch ≥1 deploy ship fail
Trade-off rationale:
- 4× solo → 6.5× solo per heavy session (vs 3 agents 6× solo) — Max 20× plan absorbs
- Post-deploy ship verification = recurring blind spot (Em main solo quên verify ~30% push S20)
- Bundle hash unchanged + mig drift prod = silent fail signal (no exception, just user UAT confusion)
CI skip per path filter (all 3 files .md match `**/*.md` paths-ignore).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-12 00:47:09 +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