[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>
This commit is contained in:
pqhuy1987
2026-06-07 23:18:43 +07:00
parent b8378148df
commit e27d877172
37 changed files with 626 additions and 23 deletions

20
broadcasts/_index.md Normal file
View File

@ -0,0 +1,20 @@
# broadcasts/ — _index (Harness 3 · single index) — SOLUTION_ERP (self=`se`)
> **1 INDEX DUY NHẤT** theo dõi MỌI message qua kênh email (in + out). Adopt AI_INFRA Harness 3 (anh 06-07).
> Mỗi message = 1 dòng. **Append-only.** Inbound: stick **đã-đọc** khi xử lý xong.
> **verify** = `SHA256(body)` bản copy == `content_sha256` (frontmatter) == bản `outbox` bên gửi (byte-identical) → ✓ · lệch = ✗ (tamper-flag, điều tra ngay).
> Folder map: `A/outbox/B/<id>` (A→B) ⇄ `B/inbox/A/<id>` (B kéo về). 6 folder mỗi chiều (trừ self=se).
> **Fan-out adap broadcast** (≠ email directed) → `outbox/all/` (pull `/adap-apply`), track ở COMMS-LEDGER OUT — KHÔNG ở index này (index = email mesh in/out).
> **infra-CC row (§N3):** message `<id>-cc` (`cc-of:<to>`) = bản-2 se gửi `ai_infra` giám sát infra-comms sister↔sister. Ghi rõ `cc-of` vào cell `from → to` — vd OUTBOUND `se → ai_infra (cc-of:vipix)` · INBOUND `vipix → ai_infra (cc-of:se)`. Cùng status/verify như message thường (whole-file + body-hash đối chứng).
## 📥 INBOUND (nhận — qua `/check-email <from>`)
> status: **pending** (ở `inbox/` root, chưa xử lý) → **processed** (đã MOVE vào `inbox/<from>/`).
| received | id | from → to | status | folder | sha256(12) | verify |
|---|---|---|---|---|---|---|
| _(chưa nhận message nào — H3 scaffold)_ | | | | | | |
## 📤 OUTBOUND (gửi — qua `/send-email <to>`)
| sent (ISO) | id | from → to | folder | sha256(12) |
|---|---|---|---|---|
| _(chưa gửi message nào — H3 scaffold)_ | | | | |

View File

@ -0,0 +1,16 @@
# inbox/ — Received-message archive (Harness 3 · 2-stage per-project) — SOLUTION_ERP (self=`se`)
> **Mục đích:** Lưu **BẢN COPY VERBATIM** message NHẬN → căn cứ đối chứng (anh 06-07). Index: [`../_index.md`](../_index.md). Protocol: AI_INFRA `broadcasts/README.md` §Harness 3 (pull cross_project_search).
## 2-stage (audit qua folder — anh chốt 06-07)
1. **Nhận** (`/check-email <from>`): COPY VERBATIM `<from>/outbox/se/*`**`inbox/<id>.md` (root) = PENDING** (chưa xử lý / xử lý sau). [ghi repo mình, §J2]
2. **Xử lý xong****MOVE** `inbox/<id>.md`**`inbox/<from>/<id>.md`** = PROCESSED (archive theo project gửi).
**Audit:** `inbox/*.md` (root) = backlog chưa xử lý (lộ ngay) · `inbox/<proj>/` = đã xử lý. "check folder biết làm ăn đàng hoàng."
## Per-project (6 folder, trừ self=se) = đã xử lý
`inbox/{ai_infra,vipix,dyd,namgroup,ashico,bvaau}/`. **Map:** `A/outbox/se/<id>` → (xử lý) → `inbox/A/<id>` (byte-identical, đối chứng).
## Luật
- **KHÔNG sửa** file copy (bằng chứng đông cứng) · **PHẢI committed** (khác wave-folder gitignored) · verify hash khi nhận (✗ = tamper → KHÔNG move, flag).
- 🔴 **Folder rỗng cần `.gitkeep` committed** — git KHÔNG track dir rỗng; thiếu → clone mất `inbox/<proj>/` → STAGE-2 MOVE vỡ (reviewer-gate H3 catch 06-07).

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File