Files
solution-erp/docs/governance/adap-reports/2026-06-07-Agent-harness-3.md
pqhuy1987 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

5.4 KiB

adap-report — 2026-06-07-Agent-harness-3

SISTER = SOLUTION_ERP (self-id=se). Report-format LOCK (5 trường). Generated 2026-06-07, apply by em main (HMW-mode ON). Command .md chưa runtime-live pre-restart (no hot-reload); handshake test pending.

1. id-broadcast

2026-06-07-Agent-harness-3 (category: Agent · reviewer_gate: PASS · nac: published · targets: all-fit · content_sha256 in frontmatter). Harness 3 = Email channel cross-project (per-project broadcasts/) — kênh comms CHUẨN + DUY NHẤT giữa 7 project (§N single-channel · §J2 pull-copy · 2-stage inbox · envelope SHA256 · infra-CC §N3 · adap=fan-out sub-mode).

2. nac G-011

executed-file (broadcasts/ tree 13-dir + 13 .gitkeep + _index + inbox/README + 2 command se-tailored + adap-apply base-path fix — all written/committed-pending) → VERIFIED-pending (cần (a) restart Claude Code để /send-email /check-email hot-reload, (b) 1 handshake round-trip /send-email ai_infra → AI_INFRA /check-email se prove 2-way byte-identical). PROJECT-FIT = Universal (KHÔNG n-a).

3. evidence

PROJECT-FIT = ADOPT (Universal). Mọi project cần kênh comms; SE scaffold để nhận được dù chưa active.

Files written (repo SOLUTION_ERP):

  • broadcasts/ treeoutbox/{ai_infra,vipix,dyd,namgroup,ashico,bvaau,all}/ (6 others + all fan-out) + inbox/{ai_infra,vipix,dyd,namgroup,ashico,bvaau}/ (6 processed) + inbox/ root (pending staging). 13 .gitkeep (6 outbox-others + outbox/all + 6 inbox-others; inbox-root kept bởi README.md, broadcasts-root bởi _index.md).
  • _index.md — single index 2-section (📥 INBOUND status pending→processed + 📤 OUTBOUND) + infra-CC row note, tailored self=se (seed placeholder rows).
  • inbox/README.md — 2-stage doc (root pending → MOVE inbox// processed) + per-project line {ai_infra,vipix,dyd,namgroup,ashico,bvaau} + .gitkeep mandate.
  • 2 command — NEW .claude/commands/send-email.md + check-email.md (se-tailored: →se, validate to≠se, 2-stage, infra-CC §N3, canonical content_sha256 formula GIỮ EXACT (($txt -split "(?m)^---\s*$",3)[2] -replace "^\r?\n","")).
  • adap-apply fix.claude/commands/adap-apply.md:1 base-path outbox\*.mdoutbox\all\*.md (Harness 3 §8 relocate 06-07 — latent bug recon caught, đóng luôn).

SELF-CHECK (broadcast H3):

  • 6+6 folder + _index.md committed (KHÔNG gitignore): git check-ignore broadcasts/... exit=1 (tracked). ✓
  • 2 lệnh thay đúng <SELF>=se, validate to≠self. ✓
  • envelope from+to + content_sha256 canonical (strip-1-leading-newline send=receive). ✓ (formula verbatim)
  • 2-stage inbox (root pending → sub processed). ✓ (check-email.md + inbox/README)
  • §N KHÔNG kênh khác cho cross-project comms. ✓ (process-rule)
  • infra-CC: send-email auto bản-2 outbox/ai_infra/<id>-cc.md cho category≠Coord, to≠ai_infra. ✓ (step 6b; outbox/ai_infra/.gitkeep sẵn)

commit-sha: pending (fill post-commit).

4. tailored-gì + skip-gì-vì-sao

  • FUNCTION-floor adopt FULLY: cấu trúc broadcasts/ · 2 lệnh · envelope+SHA256 · §N single-channel · §J2 pull-copy · 2-stage committed · infra-CC §N3 · adap=fan-out sub-mode — giữ đủ.
  • id-map AUTHORITATIVE (KHÔNG tự chế): self=se (KHÔNG solution_erp), 6 others=short-id {ai_infra,vipix,dyd,namgroup,ashico,bvaau} — verify từ AI_INFRA/broadcasts/sister-commands/send-email.md:13-22 (folder name = 2nd source-of-truth: project khác ghi vào outbox/se/, nếu SE dùng long-id thì cross-copy folder-match VỠ). Recon MEMORY-PACK ban đầu gợi long-id SAI → recon corrected.
  • FORM tailored: _index/inbox-README header → SOLUTION_ERP (se) perspective; infra-CC example → se → ai_infra (cc-of:<to>); per-project line → 6 others của se (include ai_infra, exclude se-self) thay AI_INFRA's (include se, exclude ai_infra-self).
  • adap-apply base-path fix = incidental latent-bug close (Harness 3 §8 relocate broadcast → outbox/all/; SE adap-apply.md đọc flat outbox/*.md stale từ trước — em main đã manually nav outbox/all/ khi chạy /adap-apply session này = bằng chứng bug).
  • KHÔNG skip (Universal, no n-a).

5. honest-caveat

  • 🔴 nấc honest: scaffold + commands = executed-file. CHƯA handshake — verified-runtime cần restart + 1 round-trip /send-email ai_infra "handshake" → AI_INFRA /check-email se prove byte-identical 2-way. Đừng claim "channel live/active".
  • G-015 accuracy (giữ verbatim broadcast): "đối chứng" = whole-file byte-identical 2 bản (outbox sender vs inbox receiver) = bằng chứng THẬT (primary). content_sha256 = self-check phụ — KHÔNG tamper-proof (kẻ sửa body recompute hash được); chỉ cross-copy-match. KHÔNG mô tả "tamper-proof/secure". §J2 = mỗi bên ghi repo MÌNH (KHÔNG "AI_INFRA ghi giúp").
  • path-coupling: 7 broadcasts root = abs Windows path 1 Dropbox (send-email.md:13-22). web-migration sau → sửa 1 chỗ id-map.
  • 2 command runtime-pending: send/check-email .md no hot-reload → CHƯA gọi được tới khi restart. (đã thấy trong skill registry = loaded, nhưng invoke-runtime cần restart confirm.)
  • Bash POSIX vs PowerShell: command .md reference PowerShell Get-FileHash/SHA256 (đúng win32 runtime nơi command chạy); scaffold .gitkeep/dir dùng Write/mkdir (KHÔNG shell-encoding ẩu, chống mojibake).