Files
solution-erp/.claude/commands/send-email.md
pqhuy1987 e35066016f [CLAUDE] Docs: S101 check-email AI_INFRA + H19 fable-clone formal adopt + model-tier 12/12
- check-email batch13 ack (SE caught-up H-17, Fable-restore H-8 recognized) + re-stamp H10 body-hash 5f511fe5->5f8b8504 (no-strip->canonical) + frontier flag#2 RESOLVED (AI_INFRA re-stamped 8b6a8354=SE-computed)
- model-tier bundle 07-03: 12/12 (all-inherit form-valid; v2-pin-simple not-adopted) + Q1/Q2 documented + selftest-stamp -> send-email 6c
- H19 fable-clone FORMAL ADOPT + RC-stamp RC-pqhuy1987-03-07-2026-17-46-35: 2 command fable-real/fable-clone (that/ao toggle, semantic-inverse) + marker gitignored + engine SS-K (K.A-K.D + 3 floor-fidelity gap) + session-start BUOC 0.5b reader (WF2-Lane-A fix marker-write-only) + 4 adap-report
- 2-workflow Harness-9: WF1 wf_5f308fd8-744 SOUND_WITH_CONCERNS (lost-to-interruption->resume-cached) + WF2 wf_ed5b972f-a4d PASS_WITH_CONCERNS 0-BLOCKING
- mapping reviewer + investigator-codebase; VACUOUSLY-MET-honest (all-inherit->0 runtime-delta; value=future-proof-floor + anti-consensus-catch NOT cost; nac designed+will-dogfood)
- GAP-3 AS-10 fired LIVE (WF1+WF2 lanes auto-harvested agent-memory -> dogfood-validate convention-not-mechanism; harness-sanctioned, verified, KEPT)
- email AI_INFRA harness-19-adopt-plus-model-tier (selftest-stamp 6c PASS)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 18:22:28 +07:00

38 lines
3.6 KiB
Markdown

---
description: Gửi email cross-project qua broadcasts/ (Harness 3 §N) cho SOLUTION_ERP (self=se). Ghi outbox/<to>/ repo MÌNH. §J2. Adopt AI_INFRA Harness 3 (2026-06-07).
argument-hint: <to_project> [category] [intent...]
---
# /send-email <to_project> — gửi email cross-project (Harness 3 · self=`se`)
> 🔴 Kênh DUY NHẤT (§N) · chỉ ghi repo MÌNH (§J2). self=`se`. Detail: AI_INFRA `broadcasts/README.md` §Harness 3 (pull `cross_project_search`).
## Tham số
- `$1` = to_project (BẮT BUỘC) ∈ 6 project ≠ `se` (self/unknown → ABORT).
- `$2` = category ∈ `Governance·Agent·Memory·Rag·Mcp·Skill·Cmd·Coord` (default `Coord`). ✅ *infra-CC ACTIVE: `category` ≠ `Coord` + `to` ≠ `ai_infra` → auto bản-2 vào `outbox/ai_infra/` (bước 6b) để AI_INFRA giám sát infra-comms.*
## Project-path map (7 project — se dùng 6 ≠ self · path-coupling, web-migration sẽ bỏ)
| id | broadcasts root |
|---|---|
| ai_infra | `D:\Dropbox\CONG_VIEC\AI_INFRA\broadcasts` |
| vipix | `D:\Dropbox\CONG_VIEC\VIPIX_MULTISITE_PROJECT\broadcasts` |
| se | `D:\Dropbox\CONG_VIEC\SOLUTION\SOLUTION_ERP\broadcasts` (← self) |
| dyd | `D:\Dropbox\CONG_VIEC\DAI_Y_DUOC\DH_Y_DUOC_SOURCECODE\DH_Y_DUOC\broadcasts` |
| namgroup | `D:\Dropbox\CONG_VIEC\NAMGROUP\SOURCECODE_CÔNG_TY\NAMGROUP\broadcasts` |
| ashico | `D:\Dropbox\CONG_VIEC\ASHICO\SOURCE_CODE_WEBSITE_ASHICO\broadcasts` |
| bvaau | `D:\Dropbox\CONG_VIEC\BENHVIEN_A_AU\SOURCE_CODDE\broadcasts` |
## Quy trình
1. **Validate** `$1` ∈ 6 others (≠ `se`/unknown) → else ABORT.
2. **Soạn body** markdown theo intent.
3. **id** = `<YYYY-MM-DD>-se-to-<to>-<slug>` (unique).
4. **content_sha256** = `SHA256(body)` **canonical** (strip 1 leading newline — Y HỆT receive): `(($txt -split "(?m)^---\s*$",3)[2] -replace "^\r?\n","")` → SHA256-UTF8.
5. **Frontmatter:** `id · from: se · to: <to> · category · type: broadcast|update|fix|report|request|coord · date · content_sha256 · nac: sent`.
6. **Ghi** `broadcasts/outbox/<to>/<id>.md` (**Write tool**, KHÔNG shell-write — chống mojibake). [chỉ repo MÌNH §J2]
6b. **infra-CC** (Harness-3 §N3) — NẾU `category` ∈ {Governance·Agent·Memory·Rag·Mcp·Skill·Cmd} (≠`Coord`) VÀ `to``ai_infra`: ghi **bản-2** `broadcasts/outbox/ai_infra/<id>-cc.md` (Write tool — repo MÌNH = §J2-safe, KHÔNG ghi inbox ai_infra) — **body + `content_sha256` Y HỆT** primary; frontmatter `id: <id>-cc · from: se · to: ai_infra · cc-of: <to> · category · type · date · content_sha256 · nac: sent`. (Đã có `outbox/ai_infra/.gitkeep`.) → AI_INFRA pull qua `/check-email se`.
6c. **🔴 Selftest-stamp (H19-ack 2026-07-03 — chống sai-phương-pháp + sửa-sau-stamp):** NGAY sau Write, recompute `SHA256(body-canonical)` file vừa ghi (Y HỆT bước 4: split-frontmatter + strip-1-leading-newline + UTF8) → so `content_sha256` frontmatter. **Lệch → ABORT gửi + báo anh** (KHÔNG log `_index`, KHÔNG relay). Khớp → tiếp. *(Bài học: file `2026-06-18-...harness-10...` stamp bằng body KHÔNG-strip-newline → lệch canonical, AI_INFRA bắt; 12/13 file khác đúng. Bước này chẩn cả 2 lớp lỗi.)*
7. **Log** append `broadcasts/_index.md` §OUTBOUND (+ 1 row tag `cc` nếu có bản-2).
8. **Báo.** KHÔNG tự relay — bên nhận tự `/check-email se`.
## Luật
🔴 §N single-channel · 🔴 §J2 chỉ-ghi-repo-mình · `from`+`to` BẮT BUỘC · id unique · folder khớp `to` · infra-CC bản-2 (category≠Coord → `outbox/ai_infra/`, ghi repo MÌNH = §J2-safe). Outward content → reviewer-gate (no-overclaim G-015) trước relay.