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

6.4 KiB
Raw Blame History

description: /fable-real <đề-bài> — ENGINE-ĐẮT LỆNH-A per-invocation (H21): vai anh GÁN chạy 1 LẦN SINGLE top-model THẬT (Fable 5; outage → single-Opus-1M/run) deep-pass cho ĐÚNG đề-bài đó, hiệu-lực CHỈ lượt đó — 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-clone. argument-hint: <vai ∈ roster 14> <đề-bài phán-quyết> — vd "reviewer rà-soát commit X" · "investigator-codebase truy nguồn bug Y"

/fable-real — ENGINE-ĐẮT LỆNH-A: 1 vai × SINGLE top-model deep-pass (per-invocation, H21)

Cặp /fable-clone (lệnh-B ensemble). 🔴 restart Claude Code sau khi tạo/sửa (command .md no hot-reload). Adopt H21 S110 (2026-07-11) — supersede semantics toggle-marker H19 (S101). KHÔNG còn .claude/fable-real-mode.on, KHÔNG còn mode persist qua session/compact: engine-đắt CHỈ SỐNG trong lượt anh gõ lệnh này. 📘 Runbook vận-hành (hàm/biến/checklist per-invocation + AC + anti-patterns): docs/governance/fable-real-runbook.md. 🔧 Guard ensemble / single-writer: docs/governance/harness-11-engine.md §K (engine).

Vai + đề-bài lượt này: $ARGUMENTS

🔴 Semantics per-invocation (H21 ①/②)

  • /fable-real <vai> <đề-bài> = vai anh gán chạy 1 LẦN top-model THẬT (sâu nhất, đắt nhất) cho ĐÚNG đề-bài đó. Fable up = single-Fable; Fable outage (H5, lỗi "Model isn't available") = single-Opus-1M fallback theo từng lần chạy (KHÔNG mode toàn-cục).
  • Hiệu-lực CHỈ lượt đó — hết lượt là hết. KHÔNG marker, KHÔNG persist. Lượt sau muốn engine-đắt = gõ lại lệnh.

🔴 Vai BẮT BUỘC ∈ roster 14 (H21 ②)

investigator-codebase · investigator-api · implementer-backend · implementer-frontend · frontend-designer · database-agent · office-document · test-specialist · reviewer · cicd-monitor · tooling-auditor · harvest-curator · lead-view-auditor · lead-omission-auditor.

Số vai canonical → docs/STATUS.md §Sub-agents (B1 derived-trỏ-canonical). +2 @S121 W2 = 2 monitor H24 lead-self-audit.

  • Thiếu <vai> HOẶC vai ngoài roster → em main hỏi lại anh 1 dòng ("engine-đắt cần vai đích-danh — vai nào?"), KHÔNG tự chọn vai.
  • 🔒 Honest-note (a): "không tự chọn vai" = tầng KỶ-LUẬT owner-gated (anh phải gõ vai) — KHÔNG claim code-enforced.
  • 🔒 Honest-note (b): lệnh/alias = cách anh GÁN VAI NHANH, vẫn phải anh gõ — 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 top-model đề-xuất [đề-bài · cách làm · checklist]. Engine KHÔNG tự ghi.
  2. Lead verify — lead soi + chỉnh nội-dung propose.
  3. Lead ghi file .claude/workflows/runs/<run-id>/spec-<tên-tính-năng>-<dd-mm-yyyy>.md3 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 = CON-TRỎ file spec (runs/<id>/spec-*.md, bản lead-đã-verify) + digest ngắn / AC-ids; worker Read ĐÚNG file con-trỏ (B6 chốt-2 args-mỏng); CẤM tự lục spec/nguồn ngoài con-trỏ (file làm-việc của lane vẫn Read bình thường).
  • 🔒 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).

🔴 Floor model-tier v3 (broadcast 2026-07-11)

  • Lead = frontier-class do ANH chọn per-session {Fable 5 | Opus 4.8 — cả hai 1M MAX}. CẤM lớp model thấp (Sonnet/Haiku-class) ngồi ghế lead.
  • Engine-đắt per-invocation = đường DUY NHẤT nâng 1 vai lên hạng-nhất, chỉ trong lượt lệnh anh gõ. Ngoài lệnh, mọi vai giữ model roster mặc-định (worker-tier-pin S124 — role-có-frontmatter model: opus + effort: max, role-less inherit lead; supersede H8 all-inherit; số vai canonical → docs/STATUS.md §Sub-agents, B1 KHÔNG chép số ở đây).
  • ⚠️ Lead KHÔNG tự ý gọi engine-đắtkể cả khi HMW-mode ON. Engine-đắt chỉ chạy khi anh gõ /fable-real|/fable-clone <vai> <đề-bài>.

🔴 Cờ args.run — RUN-TRACE (Sàn-1 H22, cơ-khí-hoá S121 W2)

Lead PHẢI @P1 scaffold .claude/workflows/runs/<run-id>/ (TRACKED, kèm run.md + ## taskList snapshot) rồi truyền args.run = { name:'<run-id>', dir:'.claude/workflows/runs/<run-id>' } khi gọi Workflow hmw. 🔸 Khai thật — ở lệnh NÀY gate hiếm khi cắn: /fable-real = single deep-pass 1 lanetaskList.length = 1 < 3 ⇒ hmw.js KHÔNG throw. Nhưng cờ vẫn PHẢI truyền, vì §H21① buộc run này kết-tinh spec-file vào runs/<run-id>/ ⇒ cần run-folder làm dấu-vết artifact cho /tiep + harvest; và nếu có lúc lệnh này fan-out ≥3 thì gate cắn ngay. Đừng đọc "gate không cắn" thành "khỏi cần cờ".

🔴 LUẬT non-JSON-args (per 6c2eb2b1 — B6 chốt-3): args (kể cả args.run, args.taskList, args.spec) LUÔN là object JSON thật khi gọi Workflow hmw — lead KHÔNG tự JSON.stringify args. Dòng normalize trong hmw.js (typeof args === 'string' ? JSON.parse(args)) chỉ là LƯỚI-CUỐI đỡ ca tầng-máy tự stringify object, KHÔNG phải giấy phép để lead tự stringify args khi truyền.

🔴 Guard (§K engine — bất-biến)

  • Single deep-pass 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ù chạy thật/ảo/engine nào (chống AS-10 fragment). Guard ensemble N-lane đầy-đủ (khi cặp /fable-clone chạy) → §K.