Deterministic external-evidence web validation workflow for Sanguo ETL/RAG. USE FOR: 外部證據網站檢查、來源健康度、allowlist 驗證、來源 seed 覆蓋、3kweb-check、external evidence source health、fetch/parse/hash first、LLM reviewer second。
日本語の概要は準備中です。原文の説明を表示しています。
計算型閘門 SKILL — Harness Engineering 的確定性驗證核心。在 Agent 每次完成代碼修改後自動執行一組計算型感測器(Computational Sensors),產生 Agent 友善的錯誤修正提示。USE FOR: 任何代碼修改後的自動品質驗證。
DO NOT USE FOR: 僅文件修改、純美術資產生成(無 TypeScript 改動)。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
把「代碼寫完」升級為「計算型確認通過」的品質閘門技能。
設計原則(來自 Martin Fowler Harness Engineering):
核心原則:任何任務修改的範圍不超過 3 個檔案。閘門每步驗收一次,讓 1.5B 小模型也能穩定執行大型任務。
# 1. 先掃描現有問題,了解起始狀態
node tools_node/compute-gate.js --profile quick --agent-feedback --no-stop
# 2. 若是大型功能,先拆成原子任務卡再執行
node tools_node/task-decomposer.js --feature "<功能名稱>" --type <system|ui|data|doc>
# 修改 TypeScript 後立刻驗證
node tools_node/compute-gate.js --gates ts-syntax eslint-rules
# 修改 UI JSON 後立刻驗證
node tools_node/compute-gate.js --gates ui-spec-contract
# 新增 import 後立刻驗證
node tools_node/compute-gate.js --gates import-boundary
# 標準閘門全量驗收
node tools_node/compute-gate.js --profile standard --agent-feedback
1. 執行閘門 → 2. 讀取失敗訊息 → 3. 修正對應檔案 → 4. 重新執行閘門
↑_____________________________|(最多重試 3 次,仍失敗則升級任務)
| Profile | 適用時機 | 閘門 | 速度 |
|---|---|---|---|
quick | 每次代碼修改後 | TS語法 + 編碼 + ESLint | ~3s |
standard | 任務卡完成時 | quick + UI規格 + GeneralDetail + 模組邊界 | ~10s |
full | 階段性交付時 | standard + 武將資料 + Skin + CrossRef + Fixture | ~30s |
# 快速驗證(每次改完代碼)
node tools_node/compute-gate.js --profile quick
# 標準驗證(任務卡完成)
node tools_node/compute-gate.js --profile standard
# 完整驗證(交付前)
node tools_node/compute-gate.js --profile full
# 產生 Agent 修正提示(無停止,輸出所有問題)
node tools_node/compute-gate.js --profile standard --agent-feedback --no-stop
# 只跑 TypeScript 語法掃描
node tools_node/compute-gate.js --gates ts-syntax
# 跑 TS + ESLint
node tools_node/compute-gate.js --gates ts-syntax eslint-rules
# 跑模組邊界守衛
node tools_node/compute-gate.js --gates import-boundary
node tools_node/compute-gate.js --profile standard --json
當閘門失敗時,錯誤訊息格式如下(直接可當作下一輪 prompt):
[計算型閘門失敗] ESLint 關鍵規則掃描 (eslint-rules)
說明:禁裸 console.log / no-var / no-debugger / eqeqeq 規則掃描
失敗動作:阻擋(必須修正)
錯誤摘要:
❌ [RULE-01] assets/scripts/ 中禁止裸 console.log()
assets/scripts/battle/BattleScene.ts:132
修正指引:請根據上述錯誤訊息修正對應的檔案,然後重新執行此 gate。
在任務卡的 VALIDATION_CMD 欄位使用:
## VALIDATION_CMD(計算型驗證)
node tools_node/compute-gate.js --profile quick
prepare-high-risk-edit 確認影響範圍ui-runtime-verify 做截圖驗收gate:full 確認所有閘門node -e "const c=require('./tools_node/compute-gate-config.json'); c.gates.forEach(g=>console.log(g.id.padEnd(20), g.description))"
CG-001: 閘門失敗時,不得直接提交代碼。CG-002: 錯誤修正後必須重新執行閘門,確認通過。CG-003: 不得以「這次先跳過」方式繞過阻擋(block)級別的閘門。CG-004: quick profile 最多重試 3 次;若 3 次仍失敗,升級為 standard 診斷。まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Deterministic external-evidence web validation workflow for Sanguo ETL/RAG. USE FOR: 外部證據網站檢查、來源健康度、allowlist 驗證、來源 seed 覆蓋、3kweb-check、external evidence source health、fetch/parse/hash first、LLM reviewer second。
日本語の概要は準備中です。原文の説明を表示しています。
Use when the user asks to switch AI role/mode/persona or uses role-trigger words such as Captain, Coordinator, 寫文章, 寫文章模式, 文章模式, 技術文章, 部落格, 出版, 預覽. Routes the request to Project Captain, Publishing Director, or Article Writing Mode, loads the matching keep memory when available, and applies the role's workflow without excessive roleplay.
日本語の概要は準備中です。原文の説明を表示しています。
Write or revise AI-learning-notes article pages in "寫文章模式" when the user asks for articles, technical articles, blog posts, bilingual versions, article formatting consistency, shared article-base alignment, responsive layout, summary/TOC decisions, contrast, or publishing-flow compatibility.
日本語の概要は準備中です。原文の説明を表示しています。
Plan ATM framework refactors by preserving atom/map semantics before splitting large governance modules.
日本語の概要は準備中です。原文の説明を表示しています。
Captain 派工規範與決策手冊。當 AI 進入隊長模式或進行派工/派任務語境時,遵照這套標準,產出可供人類直接轉貼、高度結構化、符合 token 經濟且能動態適應可用 Roster 的派工單。
日本語の概要は準備中です。原文の説明を表示しています。
Create and register an atom through the provisioning facade.
日本語の概要は準備中です。原文の説明を表示しています。