Files
solution-erp/.claude/commands/fable-clone.md

41 lines
4.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
description: /fable-clone <vai> <đề-bài> — ENGINE-ĐẮT LỆNH-B per-invocation (H21): vai anh GÁN chạy ENSEMBLE tier-2-mạnh-nhất (N lane đa-lăng-kính CÙNG 1 VAI qua hmw.js parallel + em-main refute+synthesize) cho đề-bài đó — KHÔNG marker, KHÔNG mode persist. Thiếu/sai vai → em main hỏi lại anh 1 dòng, KHÔNG tự chọn. Cặp /fable-real.
argument-hint: <vai roster 12> <đề-bài phán-quyết> — vd "reviewer rà commit X" · "investigator-codebase truy bug Y"
---
# /fable-clone — ENGINE-ĐẮT LỆNH-B: 1 vai × ENSEMBLE tier-2 (per-invocation, H21)
> Cặp **`/fable-real`** (lệnh-A single top-model). 🔴 restart Claude Code sau khi tạo/sửa (no hot-reload).
> **Adopt H21 S110 (2026-07-11)** — supersede semantics **toggle-marker H19 (S101)**. KHÔNG còn mode-ảo mặc-định để "về", KHÔNG còn marker: cả 2 lệnh giờ = engine-đắt **per-invocation**, chỉ SỐNG trong lượt anh gõ.
> 📘 **Runbook:** [`docs/governance/fable-real-runbook.md`](../../docs/governance/fable-real-runbook.md) · 🔧 **Guard §K:** [`docs/governance/harness-11-engine.md`](../../docs/governance/harness-11-engine.md) §K (engine).
**Vai + đề-bài lượt này:** $ARGUMENTS
## 🔴 Semantics per-invocation (H21 ①/②)
- **`/fable-clone <vai> <đề-bài>`** = vai anh gán chạy **ENSEMBLE tier-2-mạnh-nhất** = **N lane đa-lăng-kính CÙNG 1 VAI** (qua HMW `parallel`) + em-main **refute + synthesize** (P3/P4) = "bản sao Fable". Rẻ quota top-model, giữ tầng phản-biện chống-đồng-thuận-sai.
- **Hiệu-lực CHỈ lượt đó** — **KHÔNG còn "về mặc-định"**, KHÔNG marker, KHÔNG persist (H19 mode thật/ảo đã retired H21). Lượt sau muốn ensemble = gõ lại lệnh.
## 🔴 Vai BẮT BUỘC ∈ roster 12 (H21 ②)
`investigator-codebase` · `investigator-api` · `implementer-backend` · `implementer-frontend` · `frontend-designer` · `database-agent` · `office-document` · `test-specialist` · `reviewer` · `cicd-monitor` · `tooling-auditor` · `harvest-curator`.
- **Thiếu `<vai>` HOẶC vai ngoài roster** → em main **hỏi lại anh 1 dòng**, **KHÔNG tự chọn vai**.
-**VALID_ROLES đủ roster 12 (S110 anh-directed):** 2 monitor `tooling-auditor` · `harvest-curator` đã bổ sung vào `hmw.js` VALID_ROLES (10→12) — lệnh-B dùng được trọn roster. *(🧊 limitation cũ 10-vai + H6-design "monitor ngoài workflow" superseded điểm này; monitor vẫn INFORM-only, lane RETURN-only.)*
- 🔒 **Honest-note (a/b):** bảo-đảm = **owner-gated tầng lệnh + kỷ-luật lead**, **KHÔNG code-enforced**; lệnh/alias = cách anh **gán vai nhanh**, hệ **KHÔNG tự chọn vai**.
## 🔴 Spec-file 3-mục BẮT BUỘC mỗi run (H21 ①)
Mỗi lần chạy engine-đắt PHẢI kết-tinh 1 spec theo pipeline **propose → verify → ghi → thực-thi**:
1. **Engine propose-only** — vai chạy ensemble đề-xuất [đề-bài · cách làm · checklist]. Engine KHÔNG tự ghi.
2. **Lead verify** — lead soi + chỉnh (P3/P4 refute + synthesize N lane).
3. **Lead ghi** file `.claude/workflows/runs/<run-id>/spec-<tên-tính-năng>-<dd-mm-yyyy>.md`**3 heading cố-định:** ① Tính-năng/đề-bài · ② Cách implement · ③ Checklist (vai + deliverable + acceptance **ĐO ĐƯỢC**).
4. **Worker thực-thi THEO spec** — spec bơm **QUA ARGS/prompt** (worker KHÔNG tự Read file).
- 🔒 **Honest-note (c):** file spec do **LEAD ghi SAU khi verify** — engine KHÔNG tự ghi.
- 🔒 **Honest-note (d):** run **chấm/verify CŨNG sinh spec-file** (kế-hoạch xử issue = "cách làm" cần kết-tinh).
## 🔴 Guard ensemble (§K engine — 3 floor-fidelity)
- **ảo-ensemble = N lane CÙNG 1 vai phán-quyết** (multi-lens trên 1 vai), **KHÔNG** mixed-roster fan-out (`hmw.js` VALID_ROLES = **12 vai** đủ roster từ S110; KHÔNG gate vai — all-inherit **che** leak tới khi Fable về + phân-tầng).
- **N lane RETURN-only**; em-main **single-writer** (B3) ghi **1 MEMORY entry** đúng vai đó + **gắn nhãn engine đã dùng** (hmw SCHEMA `memoryDelta` KHÔNG field engine → em-main stamp @P3 harvest).
- **Một vai = một trí-nhớ** dù N lane (chống AS-10 fragment N-lane).
## 🔴 Floor model-tier v3 + lead-discipline
- **Lead = frontier-class do ANH chọn per-session** {Fable 5 | Opus 4.8 — **1M MAX**}; **CẤM Sonnet/Haiku-class ghế lead**. Engine-đắt per-invocation = đường DUY NHẤT nâng 1 vai lên hạng-nhất.
- ⚠️ **Lead KHÔNG tự ý gọi engine-đắt****kể cả khi HMW-mode ON**; chỉ chạy khi anh gõ lệnh.