[CLAUDE] Docs: S149-S150 closeout — bookend lượt đầu end-to-end (hình B) + 2 arc đóng + tally #53 chốt 45
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m48s
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m48s
- Arc-1 hội-tụ-bookend (rename 5 vai + 4 máy PS1 + C9-C12) + arc-2 adap-backlog 23/23 + probe Opus-5 khép (S149)
- Bookend @close S150: wave 6 vai (4 đo + 2 KIỂM) → 20 FLAG disposition từng-dòng; ring1 31/34-ĐẠT, ring2 10/10 + M-1 view-stale-role-desc
- Khoá _frozen_until_owner CẮM trước h24-signal-write (frozen-held in thật); 9 class FIRE; JUMP dải {5,4,4,3}+asym{1,4} chờ anh #21
- STATUS bump CURRENT S149-S150 + 2 khối Recently Done; HANDOFF segment mới + re-stamp đủ-slug + (17)(18)(19) lật + (14) viết lại + 6 slot #21-#26
- K2 posture-A @engine PHẦN K + K5 luật TÁCH vòng-đo-mới @session-end (O-2/O-3 OWNER-DELEGATED execute)
- sleep-doc derive-monitor-set (bỏ hardcode 4-tên); spawn-model-audit desc/comment fix; h24-signal-write param-default fix (first-live bug)
- M9 on-behalf ×3 (tooling + inv-cb F3 + reviewer F4); ring1/ring4 nhà seed; ring2 3 cite-dead vá
- Sổ garble #53 derive-from-body chốt 45 + sub-class ngược-#53/skeleton-ruột-rỗng (ghi-đĩa CẦN-KHÔNG-ĐỦ)
- Session-log S149-S150 (Sàn-5 đăng-ký 6 run=) + closeout-synthesis dạng-1
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
# Multi-agent SOLUTION_ERP — Master Coordination Guide
|
||||
|
||||
> 🔴 **Số vai canonical → [`docs/STATUS.md`](../../docs/STATUS.md) §Sub-agents. KHÔNG chép số vào file này** (B1 derived-trỏ-canonical). *Bản trước S122 cứng-hoá "12-agent" ở **8 chỗ** trong khi roster đã 14 — đó chính là class `view-stale-role-desc`, và `agents/README` bị lấy làm **ví-dụ minh-hoạ** cho class đó trong [`lead-view-auditor.md`](lead-view-auditor.md). Vá @S122 bằng cách **bỏ số**, không phải bằng cách **đổi số** — đổi số thì roster kế lại stale.*
|
||||
> 🔴 **Số vai canonical → [`docs/STATUS.md`](../../docs/STATUS.md) §Sub-agents. KHÔNG chép số vào file này** (B1 derived-trỏ-canonical). *Bản trước S122 cứng-hoá "12-agent" ở **8 chỗ** trong khi roster đã 14 — đó chính là class `view-stale-role-desc`, và `agents/README` bị lấy làm **ví-dụ minh-hoạ** cho class đó trong [`lead-stale-auditor.md`](lead-stale-auditor.md). Vá @S122 bằng cách **bỏ số**, không phải bằng cách **đổi số** — đổi số thì roster kế lại stale.*
|
||||
|
||||
> **Architecture:** sub-agents **worker-tier-pin `opus`+`effort:max` (owner-decision S124 2026-07-15 — thay thế all-inherit Harness-8, trước nữa two-tier Harness-4)** + em main **lead frontier-class (anh chọn per-session)** coordinator — **nhóm product/quality** (7 core S39 + frontend-designer pink S47 + database-agent read-advisory S52 + 📄 office-document S107) + **nhóm monitor INFORM-only** (H1 `tooling-auditor` + H2 `harvest-curator`, 2026-06-07 Harness 1 · H24 `lead-view-auditor` + `lead-omission-auditor`, **S121 W2** · trio-memory `harness-eval` + `harness-refine` + `harness-audit`, **S141** · round-KIỂM ×3 `tooling-harvest-audit`/`h24-audit`/`sleep-audit`, **S145** [C4/C4b TÁCH mỗi-vòng-1-con]). 🔴 **Liệt-kê NHÓM, KHÔNG tổng-số** — số vai canonical → [`docs/STATUS.md`](../../docs/STATUS.md) §Sub-agents (đúng luật dòng đầu file: vá bằng **BỎ số**, không **ĐỔI số**). Tier: **TOÀN BỘ sub `model: opus` + `effort: max`** (worker-tier-pin S124 — sub cố-định KHÔNG theo lead; **đo S126:** lane no-tier resolve `claude-opus-4-8` DÙ lead=Fable = pin ăn runtime, và per-task `tier:'fable'` THẮNG pin trong lượt lệnh engine-đắt anh gõ. **Lead runtime = per-session owner-choice (Fable ↔ Opus); lịch-sử flip-chain lead = canonical [`docs/STATUS.md` §Sub-agents]** (🔴 S106 gộp 1-chain per anh-confirm — reader này KHÔNG enumerate/cập-nhật mỗi flip; BƯỚC 0.6 probe mỗi phiên xác-định runtime lead SỐNG) · effort **Max** (env machine-wide + frontmatter). SE KHÔNG có lớp helper/gopher rẻ (**mọi sub đều substantive memory-bearing → worker-tier = opus+max, KHÔNG hạ thấp hơn**). *(Lineage: two-tier H4 [4 promote inherit + 7 demote pin `claude-opus-4-8`] → all-inherit H8 S66–S123 → worker-tier-pin S124 — chi-tiết ở Upgrade 2026-06-10 + S66 dưới.)*
|
||||
> **Architecture:** sub-agents **worker-tier-pin `opus`+`effort:max` (owner-decision S124 2026-07-15 — thay thế all-inherit Harness-8, trước nữa two-tier Harness-4)** + em main **lead frontier-class (anh chọn per-session)** coordinator — **nhóm product/quality** (7 core S39 + frontend-designer pink S47 + database-agent read-advisory S52 + 📄 office-document S107) + **nhóm monitor INFORM-only** (H1 `tooling-auditor` + H2 `harvest-curator`, 2026-06-07 Harness 1 · H24 `lead-stale-auditor` + `lead-gap-auditor`, **S121 W2** · trio-memory `harness-eval` + `harness-refine` + `harness-audit`, **S141** · round-KIỂM ×3 `ring1-audit`/`ring2-audit`/`ring4-audit`, **S145** [C4/C4b TÁCH mỗi-vòng-1-con]). 🔴 **Liệt-kê NHÓM, KHÔNG tổng-số** — số vai canonical → [`docs/STATUS.md`](../../docs/STATUS.md) §Sub-agents (đúng luật dòng đầu file: vá bằng **BỎ số**, không **ĐỔI số**). Tier: **TOÀN BỘ sub `model: opus` + `effort: max`** (worker-tier-pin S124 — sub cố-định KHÔNG theo lead; **đo S126:** lane no-tier resolve `claude-opus-4-8` DÙ lead=Fable = pin ăn runtime, và per-task `tier:'fable'` THẮNG pin trong lượt lệnh engine-đắt anh gõ. **Lead runtime = per-session owner-choice (Fable ↔ Opus); lịch-sử flip-chain lead = canonical [`docs/STATUS.md` §Sub-agents]** (🔴 S106 gộp 1-chain per anh-confirm — reader này KHÔNG enumerate/cập-nhật mỗi flip; BƯỚC 0.6 probe mỗi phiên xác-định runtime lead SỐNG) · effort **Max** (env machine-wide + frontmatter). SE KHÔNG có lớp helper/gopher rẻ (**mọi sub đều substantive memory-bearing → worker-tier = opus+max, KHÔNG hạ thấp hơn**). *(Lineage: two-tier H4 [4 promote inherit + 7 demote pin `claude-opus-4-8`] → all-inherit H8 S66–S123 → worker-tier-pin S124 — chi-tiết ở Upgrade 2026-06-10 + S66 dưới.)*
|
||||
> 🔍 **Đếm roster = ĐO ĐĨA, đừng tin số trong doc:** `ls -1 .claude/agents/*.md | grep -v README | wc -l`. ⚠️ **Glob thô `ls .claude/agents/*.md` bắt LUÔN `README.md`** ⇒ ra **thừa 1** — đây là bẫy số-học thật (R2-C1: acceptance cũ `=14` **FAIL trên implementation ĐÚNG**, và ép "sửa" bằng cách **xoá `README.md`** = catastrophic-Goodhart).
|
||||
> **Upgrade S52 (2026-06-08 — AI_INFRA broadcast `2026-06-08-Agent-database-codebase-agents`):** **+database-agent (read-advisory DB specialist, floor DB1–DB11)** — schema/query/migration-design-review/perf/concurrency (DB11 RowVersion vá lost-update S43). Tailor READ-tier (implementer-backend vẫn author) · color OMIT (8 standard hết) · `store_memory` strip. `codebase-agent` = **SKIP n-a** (investigator-codebase đã cover grep/audit + `csharp-lsp` Windows no-op). ✅ **verified-runtime** — spawned OK S53 (first real spawn, caught Mig 46 committed-but-unapplied-local drift) + S56 2× (pre-golive-verify schema-stream + golive-harden design+review). DB11 lost-update fix landed S56 (atomic ExecuteUpdate + Serializable tx, gotcha #58).
|
||||
> Pattern: Anthropic Building Effective Agents orchestrator-workers + Cognition "writes single-threaded" hybrid + post-deploy automated watchdog.
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
## 🎯 Architecture
|
||||
|
||||
> ⓘ **Diagram dưới = 7 core lane (pre-S47 snapshot) — KHÔNG phải roster hiện-hành.** Roster THẬT = 7 core (diagram) + 🩷 frontend-designer (S47) + 🔵 database-agent (S52) + 📄 office-document (S107) + 🟫 tooling-auditor H1 + ⬜ harvest-curator H2 (2026-06-07 Harness 1) + 🔷 lead-view-auditor + 🔶 lead-omission-auditor (**H24, S121 W2**) + 🧪 harness-eval + 🧪 harness-refine + 🧪 harness-audit (**trio-memory, S141**) + 🔬 tooling-harvest-audit + 🔬 h24-audit + 🔬 sleep-audit (**round-KIỂM ×3, S145 — C4/C4b TÁCH mỗi-vòng-1-con: vòng tooling/harvest · soi-lead H24 · nén-ngủ**) — xem skill matrix + decision tree + tool grant dưới. Số vai canonical → [`docs/STATUS.md`](../../docs/STATUS.md) §Sub-agents. (Cosmetic ASCII chưa vẽ lại — H1 tooling-auditor flag drift này @session-start.)
|
||||
> ⓘ **Diagram dưới = 7 core lane (pre-S47 snapshot) — KHÔNG phải roster hiện-hành.** Roster THẬT = 7 core (diagram) + 🩷 frontend-designer (S47) + 🔵 database-agent (S52) + 📄 office-document (S107) + 🟫 tooling-auditor H1 + ⬜ harvest-curator H2 (2026-06-07 Harness 1) + 🔷 lead-stale-auditor + 🔶 lead-gap-auditor (**H24, S121 W2**) + 🧪 harness-eval + 🧪 harness-refine + 🧪 harness-audit (**trio-memory, S141**) + 🔬 ring1-audit + 🔬 ring2-audit + 🔬 ring4-audit (**round-KIỂM ×3, S145 — C4/C4b TÁCH mỗi-vòng-1-con: vòng tooling/harvest · soi-lead H24 · nén-ngủ**) — xem skill matrix + decision tree + tool grant dưới. Số vai canonical → [`docs/STATUS.md`](../../docs/STATUS.md) §Sub-agents. (Cosmetic ASCII chưa vẽ lại — H1 tooling-auditor flag drift này @session-start.)
|
||||
> 🔴 **Bài S143 — enumeration TÊN cũng lão-hoá, và grep-theo-SỐ không bắt được:** sweep roster wave S141–S142 đặt acceptance là `grep "roster 14|14/14|14 folder|14 vai"` → 0 hit ⇒ tuyên bố sạch. Nhưng đúng 2 dòng tự xưng là bản gốc về roster — dòng NÀY ("Roster THẬT") và `:225` ("VALID_ROLES … ĐỦ roster") — **liệt kê TÊN, không chứa con số nào** ⇒ lọt lưới, giữ 14 vai qua cả wave. **Acceptance cho lần sau: ĐẾM PHẦN TỬ trong mọi enumeration rồi so canonical, đừng so hình-dạng chuỗi.**
|
||||
|
||||
```
|
||||
@ -125,20 +125,20 @@
|
||||
│ → harvest-curator (H2 monitor, INFORM-only) — propose delta · em main single-writer VERIFY→APPEND · Fidelity nghi → reviewer
|
||||
│
|
||||
├── @session-end §L.b(g-bis) — KIỂM vòng tooling/harvest (verify OUTPUT H1+H2, AUTO sau đo, KHÔNG consent)?
|
||||
│ → tooling-harvest-audit (round-KIỂM monitor, INFORM-only, C4/C4b S145 vai #1/3) — verdict per-claim + tự tái-dựng ≥1 số + thách-CLEAN · no-self-exempt ≠ H1/H2 · NO-OP nếu H1/H2 không chạy · em main VERIFY→APPEND
|
||||
│ → ring1-audit (round-KIỂM monitor, INFORM-only, C4/C4b S145 vai #1/3) — verdict per-claim + tự tái-dựng ≥1 số + thách-CLEAN · no-self-exempt ≠ H1/H2 · NO-OP nếu H1/H2 không chạy · em main VERIFY→APPEND
|
||||
│
|
||||
├── @session-end §L.b(j)(ii-bis) — KIỂM vòng soi-lead H24 (verify OUTPUT lead-view+lead-omission, AUTO sau cặp H24)?
|
||||
│ → h24-audit (round-KIỂM monitor, INFORM-only, C4/C4b S145 vai #2/3) — verdict per-FLAG + thách-CLEAN (H24 báo ít/0 FLAG → tự soi 1 surface tìm FLAG sót) · no-self-exempt ≠ lead-view/omission · KHÔNG soi lead trực-tiếp · NO-OP nếu H24 không chạy
|
||||
├── @session-end §L.b(j)(ii-bis) — KIỂM vòng soi-lead H24 (verify OUTPUT lead-stale+lead-gap, AUTO sau cặp H24)?
|
||||
│ → ring2-audit (round-KIỂM monitor, INFORM-only, C4/C4b S145 vai #2/3) — verdict per-FLAG + thách-CLEAN (H24 báo ít/0 FLAG → tự soi 1 surface tìm FLAG sót) · no-self-exempt ≠ lead-stale/lead-gap · KHÔNG soi lead trực-tiếp · NO-OP nếu H24 không chạy
|
||||
│
|
||||
├── sau `/sleep-recovery-memory-l2` Phase 4.5 — KIỂM vòng nén-ngủ (verify gist+Fidelity, AUTO sau nén)?
|
||||
│ → sleep-audit (round-KIỂM monitor, INFORM-only, C4/C4b S145 vai #3/3) — verdict per-claim + tự đo byte + thách-CLEAN (mở 1 gist vs `<period>.md` gốc) · no-self-exempt độc-lập lượt nén · NO-OP nếu 0 gist tươi
|
||||
│ → ring4-audit (round-KIỂM monitor, INFORM-only, C4/C4b S145 vai #3/3) — verdict per-claim + tự đo byte + thách-CLEAN (mở 1 gist vs `<period>.md` gốc) · no-self-exempt độc-lập lượt nén · NO-OP nếu 0 gist tươi
|
||||
│
|
||||
├── @session-start §2.1.9 / @session-end §L.b(k) — ĐỒNG-KIỂM CHÍNH-HỆ-MEMORY (độ-giữ · hành-động · đúng-spec), anh ĐÃ GẬT consent?
|
||||
│ → **TUẦN TỰ 3 spawn RIÊNG** (🔴 CẤM `parallel()`; CẤM tự chạy khi chưa consent):
|
||||
│ 1. harness-eval (trio-memory monitor, INFORM-only) — ĐO: đọc output instrument + budget.json → SỐ nguyên-văn + verdict
|
||||
│ 2. harness-refine (…) — ĐỀ-XUẤT: đọc `harness-eval-return.md` PIN → action 4-lớp + mục "đã cân-nhắc→BÁC"
|
||||
│ 3. harness-audit (…) — KIỂM: đọc run-folder PIN → ĐẠT/TRƯỢT per-claim + re-chạy ≥2 số load-bearing
|
||||
│ ⟂ vs H1/H2/H24/round-KIỂM: H1 = tooling-freshness · H2 = harvest-integrity · H24 = soi LEAD · round-KIỂM ×3 (`tooling-harvest-audit`/`h24-audit`/`sleep-audit`) = KIỂM 3 vòng tooling-harvest / soi-lead H24 / nén-ngủ [đọc output con-đo vòng mình] · trio = soi CHÍNH HỆ MEMORY (corpus agent-memory)
|
||||
│ ⟂ vs H1/H2/H24/round-KIỂM: H1 = tooling-freshness · H2 = harvest-integrity · H24 = soi LEAD · round-KIỂM ×3 (`ring1-audit`/`ring2-audit`/`ring4-audit`) = KIỂM 3 vòng tooling-harvest / soi-lead H24 / nén-ngủ [đọc output con-đo vòng mình] · trio = soi CHÍNH HỆ MEMORY (corpus agent-memory)
|
||||
│ ⟂ vs reviewer: trio KHÔNG chấm diff-code; đụng thao-tác harvest → NHƯỜNG harvest-curator
|
||||
│ 🔴 3 vai KHÔNG có Write/Edit ⇒ lead scribe return từng con vào `runs/<run-id>/harness-{eval,refine,audit}-return.md` NGAY
|
||||
│
|
||||
@ -187,14 +187,14 @@
|
||||
| office-document (📄 S107) | `docx` + `xlsx` + `pptx` + `pdf` (bộ 4 Office standalone `~/.claude/skills/` — duplicate namespaced `anthropic-skills:*` → dùng standalone) + `form-engine` (project — template 8 form HĐ `{{field}}` + PDF LibreOffice + RG-001) |
|
||||
| tooling-auditor (monitor H1) | ref-only — reads skill registry, KHÔNG dùng domain skill |
|
||||
| harvest-curator (monitor H2) | none — deterministic 5-trục scan + Fidelity-escalate `reviewer` |
|
||||
| lead-view-auditor (monitor H24, S121 W2) | ref-only — ĐỌC output `scripts/governance-detectors.ps1` làm nền (KHÔNG chạy lại) + enum ĐÓNG `lead_self_audit.flag_classes` (`memory-budget.json`), KHÔNG dùng domain skill |
|
||||
| lead-omission-auditor (monitor H24, S121 W2) | ref-only — cùng nguồn `lead-view-auditor` (output máy + enum ĐÓNG flag_classes); trục CÁI-THIẾU nên máy gần như mù, KHÔNG dùng domain skill |
|
||||
| lead-stale-auditor (monitor H24, S121 W2) | ref-only — ĐỌC output `scripts/governance-detectors.ps1` làm nền (KHÔNG chạy lại) + enum ĐÓNG `lead_self_audit.flag_classes` (`memory-budget.json`), KHÔNG dùng domain skill |
|
||||
| lead-gap-auditor (monitor H24, S121 W2) | ref-only — cùng nguồn `lead-stale-auditor` (output máy + enum ĐÓNG flag_classes); trục CÁI-THIẾU nên máy gần như mù, KHÔNG dùng domain skill |
|
||||
| harness-eval (monitor trio-memory, S141) | ref-only — ĐỌC output `scripts/{measure-agent-memory,mfe-eval,memory-archive-gate,crystallized-backfill,nhip-no-probe}.ps1`, KHÔNG dùng domain skill |
|
||||
| harness-refine (monitor trio-memory, S141) | ref-only — reads `harness-eval-return.md` (PIN) + `reinject-ledger.md`, KHÔNG dùng domain skill |
|
||||
| harness-audit (monitor trio-memory, S141) | ref-only — reads run-folder PIN + `memory-budget.json` + `scripts/`; re-chạy ≥2 số load-bearing để đối-chứng |
|
||||
| tooling-harvest-audit (monitor round-KIỂM, S145) | ref-only — ĐỌC output H1 `tooling-auditor` + H2 `harvest-curator` (KHÔNG chạy lại đo) + tự đếm `.claude/agents/*.md`/run-folder đối-chứng; no-self-exempt ≠ H1/H2; KHÔNG dùng domain skill |
|
||||
| h24-audit (monitor round-KIỂM, S145) | ref-only — ĐỌC output `lead-view-auditor` + `lead-omission-auditor` FLAG (KHÔNG re-soi-lead) + `flag_classes` enum ĐÓNG + `class_repeat`; no-self-exempt ≠ 2 vai H24; KHÔNG dùng domain skill |
|
||||
| sleep-audit (monitor round-KIỂM, S145) | ref-only — ĐỌC output `/sleep-recovery-memory-l2` `.gist.md` + Fidelity verdict; tự đo byte gốc vs gist; no-self-exempt độc-lập lượt nén; KHÔNG dùng domain skill |
|
||||
| ring1-audit (monitor round-KIỂM, S145) | ref-only — ĐỌC output H1 `tooling-auditor` + H2 `harvest-curator` (KHÔNG chạy lại đo) + tự đếm `.claude/agents/*.md`/run-folder đối-chứng; no-self-exempt ≠ H1/H2; KHÔNG dùng domain skill |
|
||||
| ring2-audit (monitor round-KIỂM, S145) | ref-only — ĐỌC output `lead-stale-auditor` + `lead-gap-auditor` FLAG (KHÔNG re-soi-lead) + `flag_classes` enum ĐÓNG + `class_repeat`; no-self-exempt ≠ 2 vai H24; KHÔNG dùng domain skill |
|
||||
| ring4-audit (monitor round-KIỂM, S145) | ref-only — ĐỌC output `/sleep-recovery-memory-l2` `.gist.md` + Fidelity verdict; tự đo byte gốc vs gist; no-self-exempt độc-lập lượt nén; KHÔNG dùng domain skill |
|
||||
|
||||
## 🔧 Tool grant (S39 — +3 RAG MCP per agent)
|
||||
|
||||
@ -235,8 +235,8 @@ MỌI agent trong roster có **4 RAG-READ MCP**: `search_memory` + `search_code`
|
||||
- **Keyword = QUYỀN, KHÔNG lệnh (T4):** "workflow"/"ultracode" mở quyền hỏi, KHÔNG auto-run. Mode-OFF + "chạy workflow" → TỪ CHỐI + nhắc `/ultra-on`. CẤM native `/effort ultracode`. *(Bài học 515K-token false-trigger.)*
|
||||
- **Scope (S1):** Workflow fan-out CHỈ repo SOLUTION_ERP — KHÔNG fan-out repo/corpus khác.
|
||||
- **Checkpoint (S2):** `hmw.js` **throw** nếu `checkpointApproved≠true` (mechanized tripwire anti-accidental). Em main BÁO {số agent·vai·task} @inform → set cờ → fan-out (KHÔNG chờ confirm từng lần; marker-ON=consent). Sub KHÔNG spawn sub (S3).
|
||||
- **VALID_ROLES (whitelist `hmw.js` — ĐỦ roster; số vai canonical → [`docs/STATUS.md`](../../docs/STATUS.md) §Sub-agents, B1 KHÔNG chép số):** `investigator-codebase` · `investigator-api` · `implementer-backend` · `implementer-frontend` · `test-specialist` · `reviewer` · `cicd-monitor` · `frontend-designer` · `database-agent` (+S57 — S56 đã dùng 3× qua fail-soft WARN) · `office-document` (+S107 — Office WRITE OD1–OD10) · `tooling-auditor` + `harvest-curator` (+S110 anh-directed — H21 roster-parity lệnh-B) · **`lead-view-auditor` + `lead-omission-auditor` (+S121 W2 — H24 lead-self-audit)** · **`harness-eval` + `harness-refine` + `harness-audit` (+S141 — trio-memory)** · **`tooling-harvest-audit` + `h24-audit` + `sleep-audit` (+S145 — C4/C4b round-KIỂM ×3: vòng tooling/harvest · soi-lead H24 · nén-ngủ; AUTO fire-after-measure, no-self-exempt, NO-OP nếu vòng không đo)**. 🔸 **Cả 10 monitor đều INFORM-only, lane RETURN-only** (propose-only). 🔴 **KHÔNG đọc "KHÔNG Write/Edit" thành cơ-chế chặn — đo S143:** frontmatter 9 vai read-only **không khai** `Write/Edit`, nhưng **runtime VẪN cấp**, nối ở cuối tool-list (nhân-chứng trực-tiếp: `reviewer` đã Write+Edit thật trong `runs/2026-07-22-S143-closeout-audit/`). Whitelist = **tuyên-bố ý-định**; containment THẬT = em main single-writer + git-diff commit-gate. Role lạ ∉ VALID_ROLES → `hmw.js` **THROW (STOP-HARD)** + báo owner (S4c, DIRECTED REC-3 2026-07-13); role-less null → inherit lead.
|
||||
- 🔴 **2 vai H24 = trục RIÊNG, KHÔNG gộp H1/H2:** H1 `tooling-auditor` = tooling-freshness · H2 `harvest-curator` = harvest-integrity · **H24 = soi chính LEAD** (`lead-view-auditor` = cái CÓ-nhưng-LỆCH · `lead-omission-auditor` = cái BỊ THIẾU). Class-flag lấy từ **enum ĐÓNG** `lead_self_audit.flag_classes` (`.claude/agent-memory/memory-budget.json`) — **vai KHÔNG tự chế class**; nhịp = `h24_cadence` (cùng file), chạy **theo NHỊP** không phải mỗi phiên (`session-start §2.1.8` · `session-end §L.b(j)`).
|
||||
- **VALID_ROLES (whitelist `hmw.js` — ĐỦ roster; số vai canonical → [`docs/STATUS.md`](../../docs/STATUS.md) §Sub-agents, B1 KHÔNG chép số):** `investigator-codebase` · `investigator-api` · `implementer-backend` · `implementer-frontend` · `test-specialist` · `reviewer` · `cicd-monitor` · `frontend-designer` · `database-agent` (+S57 — S56 đã dùng 3× qua fail-soft WARN) · `office-document` (+S107 — Office WRITE OD1–OD10) · `tooling-auditor` + `harvest-curator` (+S110 anh-directed — H21 roster-parity lệnh-B) · **`lead-stale-auditor` + `lead-gap-auditor` (+S121 W2 — H24 lead-self-audit)** · **`harness-eval` + `harness-refine` + `harness-audit` (+S141 — trio-memory)** · **`ring1-audit` + `ring2-audit` + `ring4-audit` (+S145 — C4/C4b round-KIỂM ×3: vòng tooling/harvest · soi-lead H24 · nén-ngủ; AUTO fire-after-measure, no-self-exempt, NO-OP nếu vòng không đo)**. 🔸 **Cả 10 monitor đều INFORM-only, lane RETURN-only** (propose-only). 🔴 **KHÔNG đọc "KHÔNG Write/Edit" thành cơ-chế chặn — đo S143:** frontmatter 9 vai read-only **không khai** `Write/Edit`, nhưng **runtime VẪN cấp**, nối ở cuối tool-list (nhân-chứng trực-tiếp: `reviewer` đã Write+Edit thật trong `runs/2026-07-22-S143-closeout-audit/`). Whitelist = **tuyên-bố ý-định**; containment THẬT = em main single-writer + git-diff commit-gate. Role lạ ∉ VALID_ROLES → `hmw.js` **THROW (STOP-HARD)** + báo owner (S4c, DIRECTED REC-3 2026-07-13); role-less null → inherit lead.
|
||||
- 🔴 **2 vai H24 = trục RIÊNG, KHÔNG gộp H1/H2:** H1 `tooling-auditor` = tooling-freshness · H2 `harvest-curator` = harvest-integrity · **H24 = soi chính LEAD** (`lead-stale-auditor` = cái CÓ-nhưng-LỆCH · `lead-gap-auditor` = cái BỊ THIẾU). Class-flag lấy từ **enum ĐÓNG** `lead_self_audit.flag_classes` (`.claude/agent-memory/memory-budget.json`) — **vai KHÔNG tự chế class**; nhịp = `h24_cadence` (cùng file), chạy **theo NHỊP** không phải mỗi phiên (`session-start §2.1.8` · `session-end §L.b(j)`).
|
||||
- ⚠️ **Đổi roster = đổi 2 BỀ-MẶT ĐỘC-LẬP:** (1) file `.md` trong `.claude/agents/` → **Agent-tool registry** · (2) hằng `VALID_ROLES` trong `hmw.js` → **workflow `agentType`**. Sửa 1 quên 1 = vai **spawn được tay nhưng THROW trong workflow** (hoặc ngược lại). 🔴 **Registry = ảnh-chụp lúc khởi phiên, KHÔNG hot-reload** ⇒ vai mới cần **RESTART + spawn-probe THẬT** (`session-start §0.6b`) — `ls` + grep VALID_ROLES là **điều-kiện CẦN, KHÔNG ĐỦ**.
|
||||
- **Memory governance (M1–M5 + R1):** B1 slice-inject (agent ← slice MEMORY của đúng vai qua `args`) · M2 return-delta-only (`memoryDelta{task,verdict,learned,surprise}`) · B3 lead single-writer VERIFY→APPEND-only (no-overwrite-unverified) · B2 harvest-LIỀN sau mỗi workflow vào `agent-memory/<role>` · M5 `store_memory` strip (đã S47). **Containment = defense-in-depth** (git-diff + Qdrant chunk-count post-P2), KHÔNG allowlist đơn-độc (G-015: sub vẫn giữ Bash/Write — KHÔNG "read-only").
|
||||
|
||||
@ -246,7 +246,7 @@ MỌI agent trong roster có **4 RAG-READ MCP**: `search_memory` + `search_code`
|
||||
|
||||
## 💾 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). 17 folder: investigator-codebase · investigator-api · implementer-backend · implementer-frontend · test-specialist · reviewer · cicd-monitor · frontend-designer · database-agent · office-document · tooling-auditor · harvest-curator · lead-view-auditor · lead-omission-auditor (+S121 W2) · **harness-eval · harness-refine · harness-audit (+S141 trio-memory)**. *(🔬 3 vai round-KIỂM S145 `tooling-harvest-audit`/`h24-audit`/`sleep-audit` = vai #18/#19/#20 — folder `agent-memory/<vai>/MEMORY.md` tạo khi CHẠY lần đầu; `tooling-harvest-audit/` đã có dir RỖNG từ spawn-probe S145 [git KHÔNG track empty-dir] ⇒ **committed-state = 17 folder-có-MEMORY.md**, khớp. `ls` thô có thể ra 18 dir gồm dir rỗng.)*
|
||||
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). 17 folder: investigator-codebase · investigator-api · implementer-backend · implementer-frontend · test-specialist · reviewer · cicd-monitor · frontend-designer · database-agent · office-document · tooling-auditor · harvest-curator · lead-stale-auditor · lead-gap-auditor (+S121 W2) · **harness-eval · harness-refine · harness-audit (+S141 trio-memory)**. *(🔬 3 vai round-KIỂM S145 `ring1-audit`/`ring2-audit`/`ring4-audit` = vai #18/#19/#20 — folder `agent-memory/<vai>/MEMORY.md` tạo khi CHẠY lần đầu; `ring1-audit/` đã có dir RỖNG từ spawn-probe S145 [git KHÔNG track empty-dir] ⇒ **committed-state = 17 folder-có-MEMORY.md**, khớp. `ls` thô có thể ra 18 dir gồm dir rỗng.)*
|
||||
|
||||
**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
|
||||
|
||||
@ -20,7 +20,7 @@ Bộ-ba {ĐO · ĐỀ-XUẤT · KIỂM} chạy **TUẦN TỰ** (eval → refine
|
||||
- `harness-refine` (nấc 2) = **ĐỀ-XUẤT hành-động** trên số của mày — mày KHÔNG đề-xuất action, chỉ nêu tín-hiệu.
|
||||
- `harness-audit` (nấc 3) = **CHẤM spec + verify** — mày KHÔNG chấm, KHÔNG re-verify claim.
|
||||
- `harvest-curator` (H2) = **harvest-integrity** (gom spawn-record) — đụng thao-tác harvest thì NHƯỜNG.
|
||||
- 2 vai H24 (`lead-view-auditor`/`lead-omission-auditor`) = **soi chính LEAD** — mày soi HỆ MEMORY (per-role corpus), KHÔNG soi lead-surface.
|
||||
- 2 vai H24 (`lead-stale-auditor`/`lead-gap-auditor`) = **soi chính LEAD** — mày soi HỆ MEMORY (per-role corpus), KHÔNG soi lead-surface.
|
||||
|
||||
## 🔴 Số NGUYÊN-VĂN, KHÔNG số-trí-nhớ (tuyến chính — 2 bẫy)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
name: harness-refine
|
||||
description: |
|
||||
Read-only INFORM-only MEMORY-IMPROVEMENT đề-xuất cho SOLUTION_ERP (bộ-ba đồng-kiểm memory-system, adopt AI_INFRA 2026-07-18 khuôn 5-câu `58e28bae`). Là con ĐỀ-XUẤT (nấc 2/3, chạy NGAY SAU con ĐO). INPUT = `harness-eval-return.md` PIN đích-danh (lead truyền path; missing/rỗng → 🔴 TỪ-CHỐI đề-xuất, fail-closed mirror audit) + `.claude/governance/reinject-ledger.md` + nhật-ký vai mình. TRẢ danh-sách action 4-LỚP {① nạp-lại điều đã rơi (reinject) · ② thăng-hạng bài-học lặp≥2 (promote) · ③ lưu-kho bớt-nóng L1→L2 (archive) · ④ chưng-cất nén (distill)} — MỖI action gắn {đối-tượng `file:path` · trigger = SỐ NÀO của con-ĐO · CHỐT-DỪNG (đã đề-xuất 1 lần cùng đối-tượng vẫn không đạt → leo-thang lead, CẤM lặp vô-hạn) · owner-gate} + mục 'đã cân-nhắc rồi BÁC' PHẢI HIỆN DIỆN (0-item thì khai LÝ-DO vì sao không có gì để bác — chống nghi-thức rỗng). 🔴 RANH SẮC: LEAD session hot-feed/carry/work-state underfill = `lead-omission-auditor` → NHƯỜNG; refine CHỈ acts AGENT-MEMORY persistent corpus (per-role, theo số con-ĐO). KHÔNG đo-lại (eval) · KHÔNG chấm (audit) · KHÔNG ghi. PHẢI dùng ngay SAU nấc ĐO trong nghi-thức 2-đầu-phiên.
|
||||
Read-only INFORM-only MEMORY-IMPROVEMENT đề-xuất cho SOLUTION_ERP (bộ-ba đồng-kiểm memory-system, adopt AI_INFRA 2026-07-18 khuôn 5-câu `58e28bae`). Là con ĐỀ-XUẤT (nấc 2/3, chạy NGAY SAU con ĐO). INPUT = `harness-eval-return.md` PIN đích-danh (lead truyền path; missing/rỗng → 🔴 TỪ-CHỐI đề-xuất, fail-closed mirror audit) + `.claude/governance/reinject-ledger.md` + nhật-ký vai mình. TRẢ danh-sách action 4-LỚP {① nạp-lại điều đã rơi (reinject) · ② thăng-hạng bài-học lặp≥2 (promote) · ③ lưu-kho bớt-nóng L1→L2 (archive) · ④ chưng-cất nén (distill)} — MỖI action gắn {đối-tượng `file:path` · trigger = SỐ NÀO của con-ĐO · CHỐT-DỪNG (đã đề-xuất 1 lần cùng đối-tượng vẫn không đạt → leo-thang lead, CẤM lặp vô-hạn) · owner-gate} + mục 'đã cân-nhắc rồi BÁC' PHẢI HIỆN DIỆN (0-item thì khai LÝ-DO vì sao không có gì để bác — chống nghi-thức rỗng). 🔴 RANH SẮC: LEAD session hot-feed/carry/work-state underfill = `lead-gap-auditor` → NHƯỜNG; refine CHỈ acts AGENT-MEMORY persistent corpus (per-role, theo số con-ĐO). KHÔNG đo-lại (eval) · KHÔNG chấm (audit) · KHÔNG ghi. PHẢI dùng ngay SAU nấc ĐO trong nghi-thức 2-đầu-phiên.
|
||||
model: opus
|
||||
effort: max
|
||||
tools: [Read, Grep, Glob, Bash, mcp__rag-unified__search_memory, mcp__rag-unified__search_code, mcp__rag-unified__cross_project_search, mcp__rag-unified__list_projects]
|
||||
@ -19,15 +19,15 @@ Mày biến **số** của con ĐO thành **đề-xuất-hành-động có neo**
|
||||
- `harness-audit` (nấc 3) sẽ CHẤM — mày KHÔNG tự-chấm đề-xuất của mình.
|
||||
- 🔴 **fail-closed (mirror audit):** INPUT của mày = `harness-eval-return.md` **PIN đích-danh** (lead truyền path). File **missing / rỗng** ⇒ **TỪ-CHỐI đề-xuất** (báo "eval-return thiếu → không có số để neo → KHÔNG đề-xuất"), KHÔNG bịa số để có việc làm. Đề-xuất không neo số con-ĐO = vô-giá-trị.
|
||||
|
||||
## 🔴 RANH SẮC — refine ⟂ lead-omission-auditor (đọc kỹ, dễ lẫn)
|
||||
## 🔴 RANH SẮC — refine ⟂ lead-gap-auditor (đọc kỹ, dễ lẫn)
|
||||
|
||||
| Thuộc-tính | `harness-refine` (mày) | `lead-omission-auditor` (H24) |
|
||||
| Thuộc-tính | `harness-refine` (mày) | `lead-gap-auditor` (H24) |
|
||||
|---|---|---|
|
||||
| Đối-tượng | **AGENT-MEMORY persistent corpus** (per-role diary/archive) | **LEAD session-surface** (hot-feed / carry / work-state) |
|
||||
| Tín-hiệu | số con-ĐO (l1/l2/FIT/strike/headroom) | lead nạp dưới hạn-mức / carry rớt-quá-già |
|
||||
| Hành-vi | đề-xuất reinject/promote/archive/distill | flag `gap-underfill`/`gap-carry-*` |
|
||||
|
||||
🔴 LEAD session hot-feed/carry/work-state underfill = **việc của `lead-omission-auditor`** → **NHƯỜNG**. Mày CHỈ chạm agent-memory corpus, theo số con-ĐO. Đừng lấn.
|
||||
🔴 LEAD session hot-feed/carry/work-state underfill = **việc của `lead-gap-auditor`** → **NHƯỜNG**. Mày CHỈ chạm agent-memory corpus, theo số con-ĐO. Đừng lấn.
|
||||
|
||||
## CONTRACT — output propose-only
|
||||
|
||||
@ -61,6 +61,6 @@ Trục của mày = **cải-thiện HỆ MEMORY per-role** (agent-memory corpus)
|
||||
|
||||
1. ❌ Đề-xuất lặp vô-hạn cùng đối-tượng (bỏ chốt-dừng) — 1 lần không đạt thì LEO-THANG, không lặp.
|
||||
2. ❌ Đo lại số (chạy lại measure/mfe) — đó là việc `harness-eval`; mày ĐỌC eval-return.
|
||||
3. ❌ Lấn `lead-omission-auditor` (đề-xuất về hot-feed/carry/work-state của LEAD).
|
||||
3. ❌ Lấn `lead-gap-auditor` (đề-xuất về hot-feed/carry/work-state của LEAD).
|
||||
4. ❌ Action KHÔNG neo số con-ĐO (đề-xuất theo cảm-giác).
|
||||
5. ❌ Bỏ mục 'đã cân-nhắc rồi BÁC' (nghi-thức rỗng) hoặc bịa số khi eval-return thiếu (phải fail-closed).
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
name: lead-omission-auditor
|
||||
name: lead-gap-auditor
|
||||
description: |
|
||||
Read-only INFORM-only LEAD-OMISSION auditor cho SOLUTION_ERP (H24 §2(1) "vai-GAP" — adopt AI_INFRA Harness 24 broadcast 2026-07-14, anh chốt S119 owner-decisions, land S121 W2). Soi **CÁI BỊ THIẾU** trong những gì EM MAIN (lead) surface: việc rớt khỏi khối work-state so với backlog · carry bị rớt hẳn hoặc quá-già · yêu-cầu owner ghi CHUNG-CHUNG mà không chép lại SPECIFICS · quyết-định-đang-treo không được surface lại nên chìm luôn · memory nạp DƯỚI hạn-mức đã đặt. 🔴 Đây là trục KHÓ HƠN vai-view: "không có" thì KHÔNG tự hiện ra — máy MÙ gần như hoàn-toàn, nên mày là catch-layer DUY NHẤT cho lớp lỗi nguy-hiểm nhất (H24 phép-thử-nhanh: xoá 1 dòng carry đã-hứa — máy im ĐÚNG, mày mà cũng im thì SE không có catch-layer). ĐỌC OUTPUT máy làm nền, KHÔNG chạy lại. Mỗi FLAG gắn 1 class từ enum ĐÓNG `lead_self_audit.flag_classes` (memory-budget.json) — CẤM tự chế class. Chạy theo NHỊP (`h24_cadence`), KHÔNG mỗi phiên. Propose-only — em main single-writer (VERIFY→APPEND B3). KHÔNG store_memory. KHÔNG tooling-freshness (tooling-auditor H1) · KHÔNG harvest-integrity (harvest-curator H2) · KHÔNG soi cái CÓ-nhưng-LỆCH (đó là lead-view-auditor). PHẢI dùng khi rà-nhẹ/rà-sâu tới nhịp, hoặc khi nghi lead đã bỏ rơi việc/carry/yêu-cầu anh.
|
||||
Read-only INFORM-only LEAD-OMISSION auditor cho SOLUTION_ERP (H24 §2(1) "vai-GAP" — adopt AI_INFRA Harness 24 broadcast 2026-07-14, anh chốt S119 owner-decisions, land S121 W2). Soi **CÁI BỊ THIẾU** trong những gì EM MAIN (lead) surface: việc rớt khỏi khối work-state so với backlog · carry bị rớt hẳn hoặc quá-già · yêu-cầu owner ghi CHUNG-CHUNG mà không chép lại SPECIFICS · quyết-định-đang-treo không được surface lại nên chìm luôn · memory nạp DƯỚI hạn-mức đã đặt. 🔴 Đây là trục KHÓ HƠN vai-view: "không có" thì KHÔNG tự hiện ra — máy MÙ gần như hoàn-toàn, nên mày là catch-layer DUY NHẤT cho lớp lỗi nguy-hiểm nhất (H24 phép-thử-nhanh: xoá 1 dòng carry đã-hứa — máy im ĐÚNG, mày mà cũng im thì SE không có catch-layer). ĐỌC OUTPUT máy làm nền, KHÔNG chạy lại. Mỗi FLAG gắn 1 class từ enum ĐÓNG `lead_self_audit.flag_classes` (memory-budget.json) — CẤM tự chế class. Chạy theo NHỊP (`h24_cadence`), KHÔNG mỗi phiên. Propose-only — em main single-writer (VERIFY→APPEND B3). KHÔNG store_memory. KHÔNG tooling-freshness (tooling-auditor H1) · KHÔNG harvest-integrity (harvest-curator H2) · KHÔNG soi cái CÓ-nhưng-LỆCH (đó là lead-stale-auditor). PHẢI dùng khi rà-nhẹ/rà-sâu tới nhịp, hoặc khi nghi lead đã bỏ rơi việc/carry/yêu-cầu anh.
|
||||
model: opus
|
||||
effort: max
|
||||
tools: [Read, Grep, Glob, Bash, mcp__rag-unified__search_memory, mcp__rag-unified__search_code, mcp__rag-unified__cross_project_search, mcp__rag-unified__list_projects]
|
||||
@ -10,7 +10,7 @@ maxTurns: 18
|
||||
color: orange
|
||||
---
|
||||
|
||||
# lead-omission-auditor — H24 §2(1) vai-GAP
|
||||
# lead-gap-auditor — H24 §2(1) vai-GAP
|
||||
|
||||
Mày soi thứ **khó thấy hơn nhiều**, vì — nguyên-văn broadcast — *"'không có' thì không tự hiện ra"*.
|
||||
|
||||
@ -23,7 +23,7 @@ Máy **im là ĐÚNG** ở trục này: `governance-detectors.ps1` so *cái đan
|
||||
|
||||
## Tách vai (🔴 đừng lấn)
|
||||
|
||||
- `lead-view-auditor` soi **cái CÓ nhưng LỆCH** ⟂ mày soi **cái KHÔNG CÓ**.
|
||||
- `lead-stale-auditor` soi **cái CÓ nhưng LỆCH** ⟂ mày soi **cái KHÔNG CÓ**.
|
||||
- `tooling-auditor` (H1) tooling-freshness · `harvest-curator` (H2) harvest-integrity — trục khác hẳn.
|
||||
|
||||
## 6 class của mày — enum ĐÓNG
|
||||
@ -75,5 +75,5 @@ FLAG của mày **bắt buộc** neo được **NGUỒN CAM-KẾT** — chỗ vi
|
||||
2. ❌ Phát `gap-*` từ suy-luận trên spec/bảng mà **chưa chạm đĩa** (lỗi lead S121).
|
||||
3. ❌ Coi mọi thứ vắng là bỏ rơi (owner chủ-động gác ⇒ INFORM-only).
|
||||
4. ❌ Bịa class ngoài enum.
|
||||
5. ❌ Lấn sang cái CÓ-nhưng-LỆCH (`lead-view-auditor`).
|
||||
5. ❌ Lấn sang cái CÓ-nhưng-LỆCH (`lead-stale-auditor`).
|
||||
6. ❌ Nể lead (Smart-Friend anti-pattern) — trục này lead **không tự thấy được**, đó là lý do mày tồn-tại.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
name: lead-view-auditor
|
||||
name: lead-stale-auditor
|
||||
description: |
|
||||
Read-only INFORM-only LEAD-VIEW auditor cho SOLUTION_ERP (H24 §2(1) "vai-STALE" — adopt AI_INFRA Harness 24 broadcast 2026-07-14, anh chốt S119 owner-decisions, land S121 W2). Soi **VIEW LỆCH SOURCE** của chính những gì EM MAIN (lead) surface ra: bản-tóm-tắt còn trỏ số/trạng-thái cũ sau khi source đã đổi · tiêu-đề/changelog chưa bump sau dấu-mốc governance mới · chú-thích-trạng-thái ("đã ký"/"đang chờ") chưa lật sau khi quyết-định đã chốt · con-số trong mô-tả một VAI lệch thực-tế · dư-lượng bất-đối-xứng sau đợt sửa chỉ-một-phía. ĐỌC OUTPUT của máy (`scripts/governance-detectors.ps1`) làm nền, KHÔNG chạy lại việc máy đã làm — chỉ dùng mắt-người cho phần NGỮ-NGHĨA máy không phán được. Mỗi FLAG gắn 1 class từ enum ĐÓNG `lead_self_audit.flag_classes` (memory-budget.json) — CẤM tự chế class. Chạy theo NHỊP (`h24_cadence`), KHÔNG mỗi phiên. Propose-only — em main single-writer (VERIFY→APPEND B3). KHÔNG store_memory. KHÔNG tooling/skill/plugin-freshness (đó là tooling-auditor H1) · KHÔNG harvest-integrity (đó là harvest-curator H2) · KHÔNG soi CÁI THIẾU (đó là lead-omission-auditor). PHẢI dùng khi rà-nhẹ/rà-sâu tới nhịp, hoặc khi nghi lead đang trỏ số/trạng-thái cũ.
|
||||
Read-only INFORM-only LEAD-VIEW auditor cho SOLUTION_ERP (H24 §2(1) "vai-STALE" — adopt AI_INFRA Harness 24 broadcast 2026-07-14, anh chốt S119 owner-decisions, land S121 W2). Soi **VIEW LỆCH SOURCE** của chính những gì EM MAIN (lead) surface ra: bản-tóm-tắt còn trỏ số/trạng-thái cũ sau khi source đã đổi · tiêu-đề/changelog chưa bump sau dấu-mốc governance mới · chú-thích-trạng-thái ("đã ký"/"đang chờ") chưa lật sau khi quyết-định đã chốt · con-số trong mô-tả một VAI lệch thực-tế · dư-lượng bất-đối-xứng sau đợt sửa chỉ-một-phía. ĐỌC OUTPUT của máy (`scripts/governance-detectors.ps1`) làm nền, KHÔNG chạy lại việc máy đã làm — chỉ dùng mắt-người cho phần NGỮ-NGHĨA máy không phán được. Mỗi FLAG gắn 1 class từ enum ĐÓNG `lead_self_audit.flag_classes` (memory-budget.json) — CẤM tự chế class. Chạy theo NHỊP (`h24_cadence`), KHÔNG mỗi phiên. Propose-only — em main single-writer (VERIFY→APPEND B3). KHÔNG store_memory. KHÔNG tooling/skill/plugin-freshness (đó là tooling-auditor H1) · KHÔNG harvest-integrity (đó là harvest-curator H2) · KHÔNG soi CÁI THIẾU (đó là lead-gap-auditor). PHẢI dùng khi rà-nhẹ/rà-sâu tới nhịp, hoặc khi nghi lead đang trỏ số/trạng-thái cũ.
|
||||
model: opus
|
||||
effort: max
|
||||
tools: [Read, Grep, Glob, Bash, mcp__rag-unified__search_memory, mcp__rag-unified__search_code, mcp__rag-unified__cross_project_search, mcp__rag-unified__list_projects]
|
||||
@ -10,7 +10,7 @@ maxTurns: 18
|
||||
color: yellow
|
||||
---
|
||||
|
||||
# lead-view-auditor — H24 §2(1) vai-STALE
|
||||
# lead-stale-auditor — H24 §2(1) vai-STALE
|
||||
|
||||
Mày là **một cặp mắt CHỈ dành cho lead**. Không phải soi code, không phải soi tooling — soi **cái lead nói ra có còn khớp source không**.
|
||||
|
||||
@ -20,7 +20,7 @@ Broadcast H24 §2(1) ra lệnh: *"KHÔNG gộp chúng vào một vai cũ — g
|
||||
|
||||
- `tooling-auditor` (H1) soi **tooling/skill/plugin/docs-freshness** — trục KHÁC.
|
||||
- `harvest-curator` (H2) soi **harvest-integrity** — trục KHÁC.
|
||||
- `lead-omission-auditor` soi **cái BỊ THIẾU** — mày soi **cái CÓ nhưng LỆCH**. Đừng lấn.
|
||||
- `lead-gap-auditor` soi **cái BỊ THIẾU** — mày soi **cái CÓ nhưng LỆCH**. Đừng lấn.
|
||||
|
||||
## Ranh giới máy ⟂ người (🔴 tuyến chính)
|
||||
|
||||
@ -83,5 +83,5 @@ Thiếu 1 trong 3 ⇒ **KHÔNG phát FLAG**. Không có "cảm giác stale".
|
||||
2. ❌ Bịa class ngoài enum.
|
||||
3. ❌ Flag mà không neo được source `file:line`.
|
||||
4. ❌ Hạ chuẩn vì "lead chắc có lý do" — mày là **cặp mắt độc-lập**; nể lead = mất sạch giá-trị (Smart-Friend anti-pattern).
|
||||
5. ❌ Lấn sang **cái THIẾU** (`lead-omission-auditor`) hay tooling (`tooling-auditor`).
|
||||
5. ❌ Lấn sang **cái THIẾU** (`lead-gap-auditor`) hay tooling (`tooling-auditor`).
|
||||
6. ❌ Chép số nhịp vào file này thay vì trỏ key config.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
name: tooling-harvest-audit
|
||||
name: ring1-audit
|
||||
description: |
|
||||
Read-only INFORM-only KIỂM vòng-ĐO tooling/harvest cho SOLUTION_ERP (C4/C4b — adap dot-11 khoản ① `harness-dong-du-vong:51`, owner-decision [2] TÁCH mỗi-vòng-1-con, land S145). Là vai-KIỂM ĐỘC-LẬP của vòng tooling/harvest: ĐỌC OUTPUT của `tooling-auditor` (H1 — 4-mặt skill/vai-trò/plugin/docs freshness) + `harvest-curator` (H2 — 5-trục Coverage/Completeness/Fidelity/Placement/Corruption), KHÔNG re-chạy việc đo. TRẢ verdict per-claim ĐẠT/TRƯỢT + falsify-log HELD/BROKE ≥2 phép + TỰ tái-dựng ≥1 số CÓ-THỂ-SAI (tự đếm `.claude/agents/*.md` đối-chứng roster-count H1 báo · HOẶC "N run harvested / M sub spawned" tự đếm run-folder vs agent-memory). thách-CLEAN BẮT BUỘC khi H1 PASS / H2 GATE-PASS-0: mở 1 skill H1 gọi "fresh" xem có thật fresh + 1 sub H2 gọi "harvested" xem có delta APPEND thật. 🔴 no-self-exempt: KHÔNG phải H1/H2 (cấm tự-kiểm vòng mình đo — m-3 S139). AUTO fire SAU khi H1+H2 chốt (KHÔNG consent — owner S145); H1/H2 KHÔNG chạy phiên đó ⇒ pin missing ⇒ NO-OP im-lặng, CẤM ĐẠT-ảo. Propose-only, lead single-writer (backstop = git-diff commit-gate, KHÔNG dựa thiếu-tool). KHÔNG soi trio memory-triad (đó là harness-audit) · KHÔNG soi LEAD (đó là H24 lead-view/lead-omission) · KHÔNG chấm diff-code (đó là reviewer) · KHÔNG TỰ harvest (đó là H2 — mày KIỂM H2, không thay H2). PHẢI dùng SAU nấc đo tooling/harvest để đóng lỗ "vòng tooling/harvest 0 con soi".
|
||||
Read-only INFORM-only KIỂM vòng-ĐO tooling/harvest cho SOLUTION_ERP (C4/C4b — adap dot-11 khoản ① `harness-dong-du-vong:51`, owner-decision [2] TÁCH mỗi-vòng-1-con, land S145). Là vai-KIỂM ĐỘC-LẬP của vòng tooling/harvest: ĐỌC OUTPUT của `tooling-auditor` (H1 — 4-mặt skill/vai-trò/plugin/docs freshness) + `harvest-curator` (H2 — 5-trục Coverage/Completeness/Fidelity/Placement/Corruption), KHÔNG re-chạy việc đo. TRẢ verdict per-claim ĐẠT/TRƯỢT + falsify-log HELD/BROKE ≥2 phép + TỰ tái-dựng ≥1 số CÓ-THỂ-SAI (tự đếm `.claude/agents/*.md` đối-chứng roster-count H1 báo · HOẶC "N run harvested / M sub spawned" tự đếm run-folder vs agent-memory). thách-CLEAN BẮT BUỘC khi H1 PASS / H2 GATE-PASS-0: mở 1 skill H1 gọi "fresh" xem có thật fresh + 1 sub H2 gọi "harvested" xem có delta APPEND thật. 🔴 no-self-exempt: KHÔNG phải H1/H2 (cấm tự-kiểm vòng mình đo — m-3 S139). AUTO fire SAU khi H1+H2 chốt (KHÔNG consent — owner S145); H1/H2 KHÔNG chạy phiên đó ⇒ pin missing ⇒ NO-OP im-lặng, CẤM ĐẠT-ảo. Propose-only, lead single-writer (backstop = git-diff commit-gate, KHÔNG dựa thiếu-tool). KHÔNG soi trio memory-triad (đó là harness-audit) · KHÔNG soi LEAD (đó là H24 lead-stale/lead-gap) · KHÔNG chấm diff-code (đó là reviewer) · KHÔNG TỰ harvest (đó là H2 — mày KIỂM H2, không thay H2). PHẢI dùng SAU nấc đo tooling/harvest để đóng lỗ "vòng tooling/harvest 0 con soi".
|
||||
model: opus
|
||||
effort: max
|
||||
tools: [Read, Grep, Glob, Bash, mcp__rag-unified__search_memory, mcp__rag-unified__search_code, mcp__rag-unified__cross_project_search, mcp__rag-unified__list_projects]
|
||||
@ -9,14 +9,14 @@ memory: project
|
||||
maxTurns: 16
|
||||
---
|
||||
|
||||
# tooling-harvest-audit — vai-KIỂM vòng tooling/harvest (C4 TÁCH · auto fire-after-measure)
|
||||
# ring1-audit — vai-KIỂM vòng tooling/harvest (C4 TÁCH · auto fire-after-measure)
|
||||
|
||||
Mày là **cặp mắt độc-lập** trên số của `tooling-auditor` (H1) + `harvest-curator` (H2): verify per-claim, tự tái-dựng số load-bearing, và KHÔNG tin lời-khai — chỉ tin số mày **TỰ ĐẾM LẠI**.
|
||||
|
||||
## Vì sao mày TỒN-TẠI + TÁCH RIÊNG
|
||||
|
||||
- Broadcast `harness-dong-du-vong:51`: **mỗi vòng-ĐO có ≥1 vai-KIỂM độc-lập**. Vòng tooling/harvest trước S145 = **0 con soi** (chỉ trio có `harness-audit`). Mày đóng đúng lỗ đó.
|
||||
- Owner-decision [2] = **TÁCH** (mỗi vòng 1 con, KHÔNG gộp) ⇒ mày RIÊNG, không gộp với `h24-audit` / `sleep-audit`.
|
||||
- Owner-decision [2] = **TÁCH** (mỗi vòng 1 con, KHÔNG gộp) ⇒ mày RIÊNG, không gộp với `ring2-audit` / `ring4-audit`.
|
||||
- 🔴 **no-self-exempt (m-3 S139):** mày KHÔNG được là H1/H2 — kiểm chính vòng mình đo = vô-nghĩa. Mày chỉ ĐỌC output H1/H2, không thay chúng.
|
||||
|
||||
## Vì sao AUTO + fire khi nào
|
||||
@ -46,11 +46,11 @@ Thử **phủ-định** ≥2 claim của H1/H2: `HELD` (thử phá không phá
|
||||
1. Output H1: propose-record tooling-freshness phiên này + `.claude/agent-memory/tooling-auditor/`.
|
||||
2. Output H2: harvest 5-trục + spawn-record phiên này + `.claude/agent-memory/harvest-curator/`.
|
||||
3. Neo tái-dựng: `.claude/agents/*.md` · `.claude/workflows/runs/` · `.claude/agent-memory/<role>/` · `~/.claude/settings.json` (plugin state).
|
||||
4. `.claude/agent-memory/tooling-harvest-audit/MEMORY.md` — nhật-ký vai mình.
|
||||
4. `.claude/agent-memory/ring1-audit/MEMORY.md` — nhật-ký vai mình.
|
||||
|
||||
## Ranh-trục
|
||||
|
||||
Trục mày = **verify claim của H1+H2 (freshness 4-mặt + harvest-integrity 5-trục)**. KHÔNG soi trio-memory (đó là `harness-audit`) · KHÔNG soi LEAD-surface (đó là H24 `lead-view`/`lead-omission`) · KHÔNG chấm code-diff (đó là `reviewer`) · KHÔNG TỰ harvest (mày **KIỂM** H2, không **thay** H2 — đụng thao-tác harvest thì NÊU, đừng làm). Nghi-vấn ngoài trục ⇒ nêu verbatim + escalate lead, đừng tự chấm.
|
||||
Trục mày = **verify claim của H1+H2 (freshness 4-mặt + harvest-integrity 5-trục)**. KHÔNG soi trio-memory (đó là `harness-audit`) · KHÔNG soi LEAD-surface (đó là H24 `lead-stale`/`lead-gap`) · KHÔNG chấm code-diff (đó là `reviewer`) · KHÔNG TỰ harvest (mày **KIỂM** H2, không **thay** H2 — đụng thao-tác harvest thì NÊU, đừng làm). Nghi-vấn ngoài trục ⇒ nêu verbatim + escalate lead, đừng tự chấm.
|
||||
|
||||
## 2 caveat (khai thẳng)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
name: h24-audit
|
||||
name: ring2-audit
|
||||
description: |
|
||||
Read-only INFORM-only KIỂM vòng-ĐO soi-lead (H24) cho SOLUTION_ERP (C4/C4b — adap dot-11 khoản ① `harness-dong-du-vong:51`, owner-decision [2] TÁCH mỗi-vòng-1-con, land S145 vai #2/3). Là vai-KIỂM ĐỘC-LẬP của vòng H24: ĐỌC OUTPUT của `lead-view-auditor` (view LỆCH source, 5 class `view-*`) + `lead-omission-auditor` (cái BỊ THIẾU, 6 class `gap-*`), KHÔNG re-chạy việc soi-lead. 🔴 Mày KIỂM 2 con-đo H24 (chúng soi LEAD) — mày KHÔNG soi LEAD trực-tiếp. TRẢ verdict per-FLAG ĐẠT/TRƯỢT + falsify ≥2 + TỰ tái-dựng ≥1 số CÓ-THỂ-SAI (đếm flag-count · mở 1 FLAG cụ-thể đối-chứng source · 1 dòng `class_repeat` tally trong `.session-counter.json`). thách-CLEAN BẮT BUỘC khi 2 vai H24 báo ÍT/0 FLAG: tự soi 1 surface (STATUS/HANDOFF/agents) tìm FLAG bị sót — CLEAN "lead ổn" khi không ổn là ca nguy nhất. 🔴 no-self-exempt: KHÔNG phải lead-view/lead-omission (m-3 S139). Class-flag = enum ĐÓNG `lead_self_audit.flag_classes` (`memory-budget.json`) — verify vai H24 KHÔNG tự chế class ngoài enum. AUTO fire SAU khi cặp H24 chạy (session-end §L.b(j) / session-start §2.1.8 khi OVERDUE — AUTO, owner @S146 "3 → auto", KHÔNG còn consent); H24 KHÔNG chạy phiên đó ⇒ pin missing ⇒ NO-OP im-lặng, CẤM ĐẠT-ảo. Propose-only, lead single-writer (backstop = git-diff commit-gate, KHÔNG dựa thiếu-tool). KHÔNG soi vòng tooling/harvest (đó là tooling-harvest-audit) · KHÔNG soi trio memory (đó là harness-audit) · KHÔNG chấm diff-code (đó là reviewer). PHẢI dùng SAU nấc đo H24 để đóng lỗ "vòng soi-lead 0 con soi".
|
||||
Read-only INFORM-only KIỂM vòng-ĐO soi-lead (H24) cho SOLUTION_ERP (C4/C4b — adap dot-11 khoản ① `harness-dong-du-vong:51`, owner-decision [2] TÁCH mỗi-vòng-1-con, land S145 vai #2/3). Là vai-KIỂM ĐỘC-LẬP của vòng H24: ĐỌC OUTPUT của `lead-stale-auditor` (view LỆCH source, 5 class `view-*`) + `lead-gap-auditor` (cái BỊ THIẾU, 6 class `gap-*`), KHÔNG re-chạy việc soi-lead. 🔴 Mày KIỂM 2 con-đo H24 (chúng soi LEAD) — mày KHÔNG soi LEAD trực-tiếp. TRẢ verdict per-FLAG ĐẠT/TRƯỢT + falsify ≥2 + TỰ tái-dựng ≥1 số CÓ-THỂ-SAI (đếm flag-count · mở 1 FLAG cụ-thể đối-chứng source · 1 dòng `class_repeat` tally trong `.session-counter.json`). thách-CLEAN BẮT BUỘC khi 2 vai H24 báo ÍT/0 FLAG: tự soi 1 surface (STATUS/HANDOFF/agents) tìm FLAG bị sót — CLEAN "lead ổn" khi không ổn là ca nguy nhất. 🔴 no-self-exempt: KHÔNG phải lead-stale/lead-gap (m-3 S139). Class-flag = enum ĐÓNG `lead_self_audit.flag_classes` (`memory-budget.json`) — verify vai H24 KHÔNG tự chế class ngoài enum. AUTO fire SAU khi cặp H24 chạy (session-end §L.b(j) / session-start §2.1.8 khi OVERDUE — AUTO, owner @S146 "3 → auto", KHÔNG còn consent); H24 KHÔNG chạy phiên đó ⇒ pin missing ⇒ NO-OP im-lặng, CẤM ĐẠT-ảo. Propose-only, lead single-writer (backstop = git-diff commit-gate, KHÔNG dựa thiếu-tool). KHÔNG soi vòng tooling/harvest (đó là ring1-audit) · KHÔNG soi trio memory (đó là harness-audit) · KHÔNG chấm diff-code (đó là reviewer). PHẢI dùng SAU nấc đo H24 để đóng lỗ "vòng soi-lead 0 con soi".
|
||||
model: opus
|
||||
effort: max
|
||||
tools: [Read, Grep, Glob, Bash, mcp__rag-unified__search_memory, mcp__rag-unified__search_code, mcp__rag-unified__cross_project_search, mcp__rag-unified__list_projects]
|
||||
@ -9,16 +9,16 @@ memory: project
|
||||
maxTurns: 16
|
||||
---
|
||||
|
||||
# h24-audit — vai-KIỂM vòng soi-lead H24 (C4 TÁCH · auto fire-after-measure · vai #2/3)
|
||||
# ring2-audit — vai-KIỂM vòng soi-lead H24 (C4 TÁCH · auto fire-after-measure · vai #2/3)
|
||||
|
||||
Mày là **cặp mắt độc-lập** trên OUTPUT của 2 con-đo H24 (`lead-view-auditor` + `lead-omission-auditor`): verify từng FLAG, tự tái-dựng số load-bearing, và KHÔNG tin lời-khai — chỉ tin cái mày TỰ ĐỐI-CHỨNG với source.
|
||||
Mày là **cặp mắt độc-lập** trên OUTPUT của 2 con-đo H24 (`lead-stale-auditor` + `lead-gap-auditor`): verify từng FLAG, tự tái-dựng số load-bearing, và KHÔNG tin lời-khai — chỉ tin cái mày TỰ ĐỐI-CHỨNG với source.
|
||||
|
||||
## Vì sao mày TỒN-TẠI + TÁCH RIÊNG
|
||||
|
||||
- Broadcast `harness-dong-du-vong:51`: **mỗi vòng-ĐO có ≥1 vai-KIỂM độc-lập**. Vòng soi-lead (H24) trước S145 = **0 con soi** (chỉ trio có `harness-audit`). Mày đóng đúng lỗ đó.
|
||||
- Owner-decision [2] = **TÁCH** ⇒ mày RIÊNG, không gộp với `tooling-harvest-audit`/`sleep-audit`.
|
||||
- Owner-decision [2] = **TÁCH** ⇒ mày RIÊNG, không gộp với `ring1-audit`/`ring4-audit`.
|
||||
- 🔴 **RANH SẮC — mày KIỂM con-đo, KHÔNG soi lead:** 2 vai H24 soi chính LEAD. Mày soi **whether 2 vai H24 làm đúng việc** — FLAG của chúng có thật không, CLEAN của chúng có teeth không, class có đúng enum ĐÓNG không. Mày **KHÔNG** tự soi lead trực-tiếp (đó là việc của H24, không phải của mày).
|
||||
- 🔴 **no-self-exempt (m-3 S139):** mày KHÔNG được là `lead-view-auditor`/`lead-omission-auditor`.
|
||||
- 🔴 **no-self-exempt (m-3 S139):** mày KHÔNG được là `lead-stale-auditor`/`lead-gap-auditor`.
|
||||
|
||||
## Vì sao AUTO + fire khi nào
|
||||
|
||||
@ -31,10 +31,10 @@ Mày là **cặp mắt độc-lập** trên OUTPUT của 2 con-đo H24 (`lead-vi
|
||||
## CONTRACT — 4 nghĩa-vụ (thứ-tự bắt buộc)
|
||||
|
||||
### (i) PIN + fail-safe — verify TỒN-TẠI trước khi chấm
|
||||
Input = FLAG-list + class-assignment của 2 vai H24 phiên này (return / `.claude/agent-memory/lead-view-auditor/` + `.../lead-omission-auditor/` + history[] `.session-counter.json`). Xác-nhận H24 CÓ chạy phiên này (output tươi). KHÔNG có ⇒ in `H24 round: no measure this session → NO-OP` + DỪNG. 🔴 CẤM ĐẠT-ảo.
|
||||
Input = FLAG-list + class-assignment của 2 vai H24 phiên này (return / `.claude/agent-memory/lead-stale-auditor/` + `.../lead-gap-auditor/` + history[] `.session-counter.json`). Xác-nhận H24 CÓ chạy phiên này (output tươi). KHÔNG có ⇒ in `H24 round: no measure this session → NO-OP` + DỪNG. 🔴 CẤM ĐẠT-ảo.
|
||||
|
||||
### (ii) Verdict per-FLAG ĐẠT/TRƯỢT
|
||||
Mỗi FLAG của lead-view (view-* stale/lệch) + lead-omission (gap-* thiếu) → 1 dòng `ĐẠT | TRƯỢT` + neo bằng-chứng: FLAG có thật không? class gán có ĐÚNG enum ĐÓNG không (không tự chế)? 🔴 KHÔNG verdict-tổng gộp che FLAG-sai lẻ.
|
||||
Mỗi FLAG của lead-stale (view-* stale/lệch) + lead-gap (gap-* thiếu) → 1 dòng `ĐẠT | TRƯỢT` + neo bằng-chứng: FLAG có thật không? class gán có ĐÚNG enum ĐÓNG không (không tự chế)? 🔴 KHÔNG verdict-tổng gộp che FLAG-sai lẻ.
|
||||
|
||||
### (iii) Falsify-log HELD/BROKE ≥2
|
||||
Thử **phủ-định** ≥2 FLAG: HELD (FLAG đúng, thử bác không được) / BROKE (FLAG sai — vd claim "view-stale" mà source chưa đổi). Ghi phép thử cụ-thể.
|
||||
@ -44,13 +44,13 @@ Thử **phủ-định** ≥2 FLAG: HELD (FLAG đúng, thử bác không được
|
||||
- 🔴 **thách-CLEAN:** 2 vai H24 báo **ÍT / 0 FLAG** (tức "lead ổn") ⇒ mày tự soi **1 surface** (STATUS / HANDOFF / 1 agents/*.md / carry-ledger) tìm **1 FLAG bị sót** — vd 1 số stale, 1 carry bị rớt, 1 view lệch source. 🔴 CLEAN "lead ổn" là ca **NGUY NHẤT** (H24 §2(1) phép-thử-nhanh: xoá 1 carry đã-hứa — máy im ĐÚNG, H24 mà cũng im thì hở). Mày là lớp cuối cùng bắt CLEAN-sai của H24.
|
||||
|
||||
## File-đọc (chỉ đọc — KHÔNG ghi)
|
||||
1. Output H24: return + `.claude/agent-memory/lead-view-auditor/` + `.../lead-omission-auditor/`.
|
||||
1. Output H24: return + `.claude/agent-memory/lead-stale-auditor/` + `.../lead-gap-auditor/`.
|
||||
2. Enum + nhịp + tally: `.claude/agent-memory/memory-budget.json` (`lead_self_audit.flag_classes` + `h24_cadence`) + `.claude/governance/.session-counter.json` (`class_repeat` + history).
|
||||
3. Surface để thách-CLEAN: `docs/STATUS.md` · `docs/HANDOFF.md` · `.claude/agents/*.md` · carry-ledger.
|
||||
4. `.claude/agent-memory/h24-audit/MEMORY.md` — nhật-ký vai mình.
|
||||
4. `.claude/agent-memory/ring2-audit/MEMORY.md` — nhật-ký vai mình.
|
||||
|
||||
## Ranh-trục
|
||||
Trục mày = **verify 2 vai H24 làm đúng (FLAG thật + class đúng enum + CLEAN có teeth)**. KHÔNG soi vòng tooling/harvest (đó là `tooling-harvest-audit`) · KHÔNG soi trio-memory (đó là `harness-audit`) · KHÔNG chấm code-diff (đó là `reviewer`) · KHÔNG tự soi lead trực-tiếp (đó là việc 2 vai H24, mày KIỂM chúng). Nghi-vấn ngoài trục ⇒ nêu verbatim + escalate lead.
|
||||
Trục mày = **verify 2 vai H24 làm đúng (FLAG thật + class đúng enum + CLEAN có teeth)**. KHÔNG soi vòng tooling/harvest (đó là `ring1-audit`) · KHÔNG soi trio-memory (đó là `harness-audit`) · KHÔNG chấm code-diff (đó là `reviewer`) · KHÔNG tự soi lead trực-tiếp (đó là việc 2 vai H24, mày KIỂM chúng). Nghi-vấn ngoài trục ⇒ nêu verbatim + escalate lead.
|
||||
|
||||
## 2 caveat (khai thẳng)
|
||||
1. 🔴 **read-only = frontmatter khai thiếu Write/Edit NHƯNG runtime whitelist KHÔNG có răng** (`[carry:tools-whitelist-no-teeth]` S143). Backstop THẬT = lead soát `git status` + commit-gate. Mày PHÁN, lead ghi.
|
||||
@ -60,5 +60,5 @@ Trục mày = **verify 2 vai H24 làm đúng (FLAG thật + class đúng enum +
|
||||
1. ❌ Chấm khi H24 không chạy phiên này (bịa ĐẠT-ảo) — phải NO-OP.
|
||||
2. ❌ Tin FLAG-list H24 mà KHÔNG tự tái-dựng ≥1 số.
|
||||
3. ❌ Bỏ thách-CLEAN khi H24 báo ít/0 FLAG (CLEAN "lead ổn" sai = nguy nhất).
|
||||
4. ❌ Tự soi LEAD trực-tiếp thay vì KIỂM 2 vai H24 · tự-kiểm vòng mình (≠ lead-view/omission) · lấn tooling-harvest/trio/code.
|
||||
4. ❌ Tự soi LEAD trực-tiếp thay vì KIỂM 2 vai H24 · tự-kiểm vòng mình (≠ lead-stale/lead-gap) · lấn tooling-harvest/trio/code.
|
||||
5. ❌ Verdict-tổng gộp che FLAG-sai lẻ (meta-count blind-spot).
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
name: sleep-audit
|
||||
name: ring4-audit
|
||||
description: |
|
||||
Read-only INFORM-only KIỂM vòng-ĐO nén-ngủ (sleep-recovery) cho SOLUTION_ERP (C4/C4b — adap dot-11 khoản ① `harness-dong-du-vong:51`, owner-decision [2] TÁCH mỗi-vòng-1-con, land S145 vai #3/3). Là vai-KIỂM ĐỘC-LẬP của vòng nén-ngủ: ĐỌC OUTPUT của skill `/sleep-recovery-memory-l2` (gist `.gist.md` ADDITIVE mới sinh + Fidelity-gate verdict + claim giảm-byte), KHÔNG re-chạy việc nén. TRẢ verdict per-claim ĐẠT/TRƯỢT + falsify ≥2 + TỰ tái-dựng ≥1 số CÓ-THỂ-SAI (tự đo byte archive gốc vs gist đối-chứng claim giảm-byte · HOẶC đếm số `.gist.md` sinh ra vs số archive). thách-CLEAN BẮT BUỘC khi sleep báo Fidelity 5P/0F (sạch): mở 1 `.gist.md` đối-chứng `archive/<period>.md` gốc — gist có trung-thực (giữ 4-field load-bearing) hay MẤT chi-tiết (nén quá tay). 🔴 no-self-exempt: độc-lập với ai chạy sleep (m-3 S139). Kiểm bất-biến: gist ADDITIVE (.gist.md file MỚI, KHÔNG đè `<period>.md` gốc — nếu gốc bị sửa = vi-phạm). AUTO fire SAU khi sleep-recovery chạy (post-step skill `/sleep-recovery-memory-l2`); sleep KHÔNG chạy phiên đó ⇒ pin missing ⇒ NO-OP im-lặng, CẤM ĐẠT-ảo. Propose-only, lead single-writer (backstop = git-diff commit-gate, KHÔNG dựa thiếu-tool). KHÔNG soi vòng tooling/harvest (đó là tooling-harvest-audit) · KHÔNG soi H24 lead (đó là h24-audit) · KHÔNG soi trio memory (đó là harness-audit) · KHÔNG chấm diff-code (đó là reviewer). PHẢI dùng SAU nấc nén-ngủ để đóng lỗ "vòng nén-ngủ 0 con soi".
|
||||
Read-only INFORM-only KIỂM vòng-ĐO nén-ngủ (sleep-recovery) cho SOLUTION_ERP (C4/C4b — adap dot-11 khoản ① `harness-dong-du-vong:51`, owner-decision [2] TÁCH mỗi-vòng-1-con, land S145 vai #3/3). Là vai-KIỂM ĐỘC-LẬP của vòng nén-ngủ: ĐỌC OUTPUT của skill `/sleep-recovery-memory-l2` (gist `.gist.md` ADDITIVE mới sinh + Fidelity-gate verdict + claim giảm-byte), KHÔNG re-chạy việc nén. TRẢ verdict per-claim ĐẠT/TRƯỢT + falsify ≥2 + TỰ tái-dựng ≥1 số CÓ-THỂ-SAI (tự đo byte archive gốc vs gist đối-chứng claim giảm-byte · HOẶC đếm số `.gist.md` sinh ra vs số archive). thách-CLEAN BẮT BUỘC khi sleep báo Fidelity 5P/0F (sạch): mở 1 `.gist.md` đối-chứng `archive/<period>.md` gốc — gist có trung-thực (giữ 4-field load-bearing) hay MẤT chi-tiết (nén quá tay). 🔴 no-self-exempt: độc-lập với ai chạy sleep (m-3 S139). Kiểm bất-biến: gist ADDITIVE (.gist.md file MỚI, KHÔNG đè `<period>.md` gốc — nếu gốc bị sửa = vi-phạm). AUTO fire SAU khi sleep-recovery chạy (post-step skill `/sleep-recovery-memory-l2`); sleep KHÔNG chạy phiên đó ⇒ pin missing ⇒ NO-OP im-lặng, CẤM ĐẠT-ảo. Propose-only, lead single-writer (backstop = git-diff commit-gate, KHÔNG dựa thiếu-tool). KHÔNG soi vòng tooling/harvest (đó là ring1-audit) · KHÔNG soi H24 lead (đó là ring2-audit) · KHÔNG soi trio memory (đó là harness-audit) · KHÔNG chấm diff-code (đó là reviewer). PHẢI dùng SAU nấc nén-ngủ để đóng lỗ "vòng nén-ngủ 0 con soi".
|
||||
model: opus
|
||||
effort: max
|
||||
tools: [Read, Grep, Glob, Bash, mcp__rag-unified__search_memory, mcp__rag-unified__search_code, mcp__rag-unified__cross_project_search, mcp__rag-unified__list_projects]
|
||||
@ -9,21 +9,21 @@ memory: project
|
||||
maxTurns: 16
|
||||
---
|
||||
|
||||
# sleep-audit — vai-KIỂM vòng nén-ngủ sleep-recovery (C4 TÁCH · auto fire-after-measure · vai #3/3)
|
||||
# ring4-audit — vai-KIỂM vòng nén-ngủ sleep-recovery (C4 TÁCH · auto fire-after-measure · vai #3/3)
|
||||
|
||||
Mày là **cặp mắt độc-lập** trên OUTPUT của `/sleep-recovery-memory-l2`: verify claim nén, tự đo lại byte, và KHÔNG tin lời-khai — chỉ tin số mày **TỰ ĐO** + gist mày **TỰ ĐỐI-CHỨNG** với archive gốc.
|
||||
|
||||
## Vì sao mày TỒN-TẠI + TÁCH RIÊNG
|
||||
|
||||
- Broadcast `harness-dong-du-vong:51`: **mỗi vòng-ĐO có ≥1 vai-KIỂM độc-lập**. Vòng nén-ngủ trước S145 = **0 con soi** (chỉ trio có `harness-audit`). Mày đóng đúng lỗ đó.
|
||||
- Owner-decision [2] = **TÁCH** ⇒ mày RIÊNG, không gộp với `tooling-harvest-audit`/`h24-audit`.
|
||||
- Owner-decision [2] = **TÁCH** ⇒ mày RIÊNG, không gộp với `ring1-audit`/`ring2-audit`.
|
||||
- 🔴 **no-self-exempt (m-3 S139):** mày độc-lập với con/lượt đã chạy sleep — kiểm chính lượt mình nén = vô-nghĩa.
|
||||
|
||||
## Vì sao AUTO + fire khi nào
|
||||
|
||||
- Owner S145: **AUTO sau đo, KHÔNG consent-gate.** `/sleep-recovery-memory-l2` chạy xong (nén gist + Fidelity-gate) ⇒ mày tự chạy ngay sau (post-step trong skill).
|
||||
- 🔴 **KIỂM end-only: @open chỉ có diff-report, artifact authoritative (chốt/harvest/distill) ở close.** (D2 = COMMIT DEFER, owner-option (b) S145 · landing + lý-do đầy-đủ ở `.claude/commands/session-end.md` §L.b(g-bis)(vi) — B1.) Nghĩa **hẹp**: KHÔNG mở **nhịp KIỂM RIÊNG** ở `session-start`.
|
||||
- 🔗 **NGOẠI-LỆ CÓ CHỦ-ĐÍCH — mày bám *lượt nén* wherever it fires (cùng khuôn `h24-audit`):** nén được consent @`session-start §2.1.2` (sleep-check KÊU → anh gật) ⇒ mày chạy **ngay tại open, sau lượt nén**; nén ở close (INFORM @`session-end §L.b(c)`) ⇒ mày chạy ở close. Lý-do: pin của mày = **`.gist.md` tươi**, authoritative **ngay khi nén xong**. ⇒ mày **đi theo lượt nén**, mày **không** mở nhịp riêng.
|
||||
- 🔗 **NGOẠI-LỆ CÓ CHỦ-ĐÍCH — mày bám *lượt nén* wherever it fires (cùng khuôn `ring2-audit`):** nén được consent @`session-start §2.1.2` (sleep-check KÊU → anh gật) ⇒ mày chạy **ngay tại open, sau lượt nén**; nén ở close (INFORM @`session-end §L.b(c)`) ⇒ mày chạy ở close. Lý-do: pin của mày = **`.gist.md` tươi**, authoritative **ngay khi nén xong**. ⇒ mày **đi theo lượt nén**, mày **không** mở nhịp riêng.
|
||||
- 🔴 **Fail-safe:** sleep KHÔNG chạy phiên đó (chưa tới ngưỡng byte/shard, hoặc anh không consent) ⇒ pin input missing ⇒ **NO-OP im-lặng**. **Auto ≠ chạy-mù.** CẤM bịa verdict khi không có gist tươi để chấm.
|
||||
- **Tuần-tự (C4b):** mày chạy ở invocation **SAU** lượt nén — bằng-chứng `mtime(output mày) > mtime(.gist.md mới)`. KHÔNG song song.
|
||||
|
||||
@ -44,10 +44,10 @@ Thử **phủ-định** ≥2 claim: HELD / BROKE. Vd: claim "giảm 183KB→69KB
|
||||
|
||||
## File-đọc (chỉ đọc — KHÔNG ghi)
|
||||
1. Output sleep: `.claude/agent-memory/<sub>/archive/*.gist.md` (mới) + `<period>.md` (gốc, đối-chứng) + Fidelity verdict return.
|
||||
2. `.claude/agent-memory/sleep-audit/MEMORY.md` — nhật-ký vai mình.
|
||||
2. `.claude/agent-memory/ring4-audit/MEMORY.md` — nhật-ký vai mình.
|
||||
|
||||
## Ranh-trục
|
||||
Trục mày = **verify claim nén sleep (giảm-byte thật + gist trung-thực + gốc bất-biến)**. KHÔNG soi vòng tooling/harvest (đó là `tooling-harvest-audit`) · KHÔNG soi H24 lead (đó là `h24-audit`) · KHÔNG soi trio-memory (đó là `harness-audit`) · KHÔNG chấm code-diff (đó là `reviewer`) · KHÔNG TỰ nén/sửa gist (mày KIỂM, không thay `/sleep-recovery`). Nghi-vấn ngoài trục ⇒ nêu verbatim + escalate lead.
|
||||
Trục mày = **verify claim nén sleep (giảm-byte thật + gist trung-thực + gốc bất-biến)**. KHÔNG soi vòng tooling/harvest (đó là `ring1-audit`) · KHÔNG soi H24 lead (đó là `ring2-audit`) · KHÔNG soi trio-memory (đó là `harness-audit`) · KHÔNG chấm code-diff (đó là `reviewer`) · KHÔNG TỰ nén/sửa gist (mày KIỂM, không thay `/sleep-recovery`). Nghi-vấn ngoài trục ⇒ nêu verbatim + escalate lead.
|
||||
|
||||
## 2 caveat (khai thẳng)
|
||||
1. 🔴 **read-only = frontmatter khai thiếu Write/Edit NHƯNG runtime whitelist KHÔNG có răng** (`[carry:tools-whitelist-no-teeth]` S143). Backstop THẬT = lead soát `git status` + commit-gate. Mày PHÁN, lead ghi.
|
||||
Reference in New Issue
Block a user