[CLAUDE] Skill: doi STYLE 3 vai — production-la-chuan (anh chot S176)

Anh giao truc tiep, ly do do duoc: "may cu lam di lam lai hoai".
Luat loi anh dat: "cac tinh nang da deploy thanh production roi thi se la
chuan, tru khi tao co dieu chinh lai lan nua".

Ca THAT lam anh neu — S176 vong-4b: lead dung thung rac KHKK thieu banner do
+ thieu dau "xoa ~", trong khi man thung rac Duyet NCC DA CHAY PROD co du ca
hai. Anh phai tu chup man PE gui sang bao "anh chi la mau". Mot luot lam lai
dang le khong can, vi ban chuan da nam san trong repo.

3 vai (khong phai 4 — anh neu 4 roi tu chot lai 3: "3 con tao nham" +
"chot theo y may"). Con clean-code-reviewer-style bi bo vi no phu chong ca 3
con kia nen KHONG viet noi cau scope-roi ma roster nay bat buoc; truc
clean-code (dat ten, trung lap, mat-do comment, pattern drift) gop vao tung
con trong dia phan cua no.

- front-end-reviewer-style : fe-admin/src/** + fe-user/src/**
- back-end-reviewer-style  : src/Backend/** TRU Persistence/**
- database-reviewer-style  : Persistence/** + ten bang/cot/index

Thiet ke:
- "Production = chuan" DO DUOC, khong phai khau hieu: repo auto-deploy main
  => `git diff origin/main...HEAD` = phan MOI; phan con lai tren origin/main
  = da production = chuan. Moi vai phai DI TIM ANH EM DA CHAY THAT roi doi
  chieu, va bao cao PHAI neu file:line cua ban chuan do.
- Ve "tru khi tao dieu chinh lai" = MIEN-TRU co dieu kien: bang chung owner
  phai CHI DUOC RA (prompt / _context FLOW dong "> anh:" / commit / WAL),
  KHONG duoc suy. Khong thay => van FLAG kem "(chua thay bang-chung owner)".
  Sai ve phia hoi thua, khong ve phia im lang de lot.
- Truc DONG-NHAT (giong ban da chay khong) VUONG GOC truc DUNG-SAI cua
  `reviewer` (co bug khong) => chay SONG SONG duoc, khong giam nhau.
- Luat style TRO docs/rules.md, CAM chep vao persona (B1) — chep la de nguon
  su-that thu hai roi drift.
- Bai S176 dua thang vao persona: "be mau thi be HINH, dung be LOI KHAI"
  (banner PE co cau "khong con tinh vao luy ke"; grep luy ke trong KHKK = 0
  hit => be nguyen la dan mot khang-dinh chua chung minh len man nguoi dung).
- May truoc, vai sau: FE co ESLint chay truoc. BE do duoc la 0 may style nao
  gac (0 .editorconfig, 0 analyzer, 0 dotnet format trong CI) nen con BE phai
  ganh ca lop co-hoc — da khai thang trong persona kem ghi chu: cam duoc may
  vao CI thi PHAI cap nhat lai persona do.
- Moi vai bat buoc co dong thach-CLEAN khi tra DAT: "DAT" suong khong phan
  biet duoc voi "chua soi".

Wiring: hmw.js VALID_ROLES 23->26 + writeGuard liet 3 vai vao nhanh read-only
(khong the de chung roi nham nhanh Bash-write MD, rui ro mojibake G-009) ·
agents/README bang Skill-assignment + RULE BAT BUOC (goi theo glob diff cham
dau; diff khong cham => KHONG goi, khong phai bo sot) · STATUS Sub-agents
23->26.

🔸 Nac trung-thuc: executed-file / verified-pending-restart — 3 vai CHUA
spawn-probe lan nao.
⚠️ roster 26 > hmw_width.cap 20 => full-roster-sweep LOUD-skip rong hon truoc;
so cap = quyen anh (O-7 van treo).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-08-06 10:07:21 +07:00
parent c301249561
commit 090ab1cdfd
6 changed files with 338 additions and 3 deletions

View File

@ -40,6 +40,14 @@ const VALID_ROLES = [
'ring2-audit', 'ring4-audit', // +S145 C4/C4b vai #2/3 + #3/3 round-KIỂM (owner-decision [2] TÁCH mỗi-vòng-1-con). ring2-audit = KIỂM vòng soi-lead (đọc OUTPUT lead-stale+lead-gap, no-self-exempt ≠ chúng, KHÔNG soi lead trực-tiếp) · ring4-audit = KIỂM vòng nén-ngủ (đọc /sleep-recovery gist+Fidelity, tự đo byte). AUTO fire-after-measure, propose-only, NO-OP nếu vòng không đo.
'ctx-audit', // +S153 ctx soft-memory 0df10df4 — vai-3 vòng Ctx: SOI-CHUỖI 2 đầu phiên, INFORM-only (🔄 OWNER-VETO @S153: (38)(a) 1-vai → hub-form 3-vai, anh chốt trực tiếp)
'ctx-curator', 'ctx-verifier', // +S153 OWNER-VETO hub-form 3-vai — vai-1 KIỂM nháp @mỗi-pause (carve-out pause §1) · vai-2 ĐỐI-CHIẾU+NẠP @mỗi-tiep; cả 2 INFORM-only trả-văn-bản
'front-end-reviewer-style', 'back-end-reviewer-style', 'database-reviewer-style', // +S176 ĐỘI STYLE (anh chốt trực-tiếp).
// 🔴 Trục = ĐỒNG-NHẤT style, ⟂ `reviewer` (ĐÚNG-SAI logic) ⇒ chạy SONG SONG được, không giẫm nhau.
// Luật lõi anh giao: "tính năng đã deploy production = CHUẨN, trừ khi tao điều chỉnh lại lần nữa" —
// lý do sinh đội: "mày cứ làm đi làm lại hoài" (ca thật S176 vòng-4b: thùng rác KHKK thiếu banner+dấu xoá
// mà màn Duyệt NCC ĐÃ chạy prod có đủ ⇒ anh phải chụp màn gửi làm mẫu — một lượt làm lại đáng lẽ không cần).
// Địa-phận RỜI theo glob diff: fe-*/src/** · src/Backend/** trừ Persistence/** · Persistence/**.
// 🧊 Anh nêu ban đầu 4 con (có clean-code-reviewer-style) rồi tự chốt lại 3 ("3 con tao nhầm" + "chốt theo ý mày"):
// clean-code phủ chồng cả 3 nên KHÔNG viết nổi câu scope-rời mà roster này bắt buộc ⇒ gộp trục đó vào từng con.
]
// ─── PA-2a — hằng-số kỳ-vọng model tier-2 (H23 model-at-spawn, owner-chốt O1 @S121 W2) ──
@ -226,14 +234,15 @@ const results = await parallel(A.taskList.map((t, i) => () => {
const subMd = wave ? `${wave.dir}/sub-${role || 'task'}-${i}.md` : null // Harness-10 FLAT (h10-refine 2026-06-18): sub-<role>-<i>.md phẳng cùng cấp dưới runs/<run-id>/ — KHÔNG sub-md/ subdir
// Write-guard TOOL-AWARE theo MODE (B6 isolation). SE read-only sub (KHÔNG Write tool): investigator-codebase/api,
// reviewer, cicd-monitor (+ monitor tooling-auditor/harvest-curator) (+S153 bộ-ba Ctx: ctx-audit, ctx-curator, ctx-verifier — lớp mềm _mind, tools: KHÔNG Write/Edit).
// reviewer, cicd-monitor (+ monitor tooling-auditor/harvest-curator) (+S153 bộ-ba Ctx: ctx-audit, ctx-curator, ctx-verifier — lớp mềm _mind, tools: KHÔNG Write/Edit)
// (+S176 đội STYLE: front-end/back-end/database-reviewer-style — tools: KHÔNG Write/Edit, propose-only).
// Write sub: implementer-backend/frontend, test-specialist, frontend-designer.
const writeGuard = wave
? [
`## ✍️ RUN-TRACE ghi sub-<role>-<i>.md FLAT (Harness-10 h10-refine, supersedes subfolder sub-md/) — TOOL-AWARE (chống mojibake G-009):`,
`- Full-detail công-việc của mày → ĐÚNG 1 file: \`${subMd}\` (folder đã scaffold sẵn — KHÔNG tạo folder).`,
` • NẾU mày CÓ Write/Edit tool (implementer-backend/frontend, test-specialist, frontend-designer): GHI TRỰC TIẾP via Write/Edit. 🔴 KHÔNG Bash-write MD ($-expansion/mojibake).`,
` • NẾU mày CHỈ có Bash (read-only sub: investigator-codebase/api, reviewer, cicd-monitor, tooling-auditor, harvest-curator, lead-stale-auditor, lead-gap-auditor, harness-eval, harness-refine, harness-audit, ctx-audit, ctx-curator, ctx-verifier — KHÔNG Write tool): 🔴 TUYỆT ĐỐI KHÔNG Bash-write MD → để full-detail trong "findings" + đặt subMdPath="${subMd}"; EM MAIN scribe @P3 (single-writer Write-tool, no-corruption).`,
` • NẾU mày CHỈ có Bash (read-only sub: investigator-codebase/api, reviewer, cicd-monitor, tooling-auditor, harvest-curator, lead-stale-auditor, lead-gap-auditor, harness-eval, harness-refine, harness-audit, ctx-audit, ctx-curator, ctx-verifier, front-end-reviewer-style, back-end-reviewer-style, database-reviewer-style — KHÔNG Write tool): 🔴 TUYỆT ĐỐI KHÔNG Bash-write MD → để full-detail trong "findings" + đặt subMdPath="${subMd}"; EM MAIN scribe @P3 (single-writer Write-tool, no-corruption).`,
`- 🔴 ISOLATION (B6→Harness-10, AUDIT): CHỈ ghi \`${subMd}\` (+ code-file-disjoint nếu task giao). TUYỆT ĐỐI KHÔNG ghi/sửa: agent-memory/* (MEMORY.md BẤT KỲ sub) · MD canonical (CLAUDE/README/STATUS/agents) · sub-MD agent khác. Em main git-status/diff audit sau P2 — tracked-file đổi NGOÀI run-folder (runs/<run-id>/) + code-disjoint = vi-phạm (run-folder TRACKED → HIỆN trong diff).`,
`- LUÔN return: findings (FULL) + checklistEvidence + memoryDelta (4-field) + subMdPath="${subMd}". Harvest per-turn primary (C4); H2 gom @session-end = backstop verify-idempotent → agent-memory/${role || 'sub'}.`,
`- 🔴 KHÔNG store_memory/RAG-write · KHÔNG Bash curl/HTTP Qdrant (:6333 = git-diff MÙ, chỉ chunk-count bắt) · KHÔNG ghi file NGOÀI repo/run-folder. RAG single-writer=em main; containment = git-diff(in-repo)+chunk-count(RAG) [G-015].`,