排除事項:未明確指定路徑一律詢問,並新增 --exclusions 參數

- 收緊措辭:預設檔名 .codereview.md 僅為詢問時的建議選項,
  未取得使用者明確指定前不可自行假設或直接採用
- 新增 slash 參數 --exclusions <路徑> 明確指定排除事項檔案,
  帶此旗標即視為明確指定、不再詢問
- SKILL.md / paladin.md / README 範例同步更新

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jeffery
2026-06-15 16:52:18 +08:00
co-authored by Claude Opus 4.8
parent 5a224932e2
commit 8e4f984925
3 changed files with 21 additions and 15 deletions
+11 -6
View File
@@ -37,7 +37,8 @@ description: 以 RPG 攻防對決方式審查 git diff 的程式碼審查 skill
### 2. 選擇角色
slash 參數格式:`/jsc:code-review <target> <source> [角色...]`(角色接在兩個分支之後)。
slash 參數格式:`/jsc:code-review <target> <source> [角色...] [--exclusions <排除事項檔案路徑>]`
(角色接在兩個分支之後;`--exclusions` 旗標可放在任意位置,指定排除事項檔案路徑)。
- **若已指定角色** → 直接採用。可接受:
- 單一面向:`bard` / `mage` / `rogue` / `assassin` / `paladin`
@@ -51,7 +52,10 @@ slash 參數格式:`/jsc:code-review <target> <source> [角色...]`(角色
排除事項設定檔位於**專案根目錄**(建議檔名 `.codereview.md`,列出已知技術債/團隊慣例/刻意取捨)。
- **若不知道排除事項檔案的位置 → 必須詢問使用者**(提供建議預設 `.codereview.md`
- **若 slash 參數帶了 `--exclusions <路徑>`** → 即為使用者明確指定,直接採用該路徑,**不需再問**
- **否則只要使用者沒有明確告知檔案路徑 → 一律先詢問**。預設檔名 `.codereview.md` 僅作為詢問時的**建議選項**
**不可**在未取得使用者明確指定前自行假設或直接採用該預設路徑。
- 使用者明確指定路徑(透過 `--exclusions`,或在詢問中確認用預設 / 確認無檔)後才繼續。
- **檔案允許不存在或為空** → 視為「無排除事項」,防守方直接進入原始碼判斷,**不**因缺檔而中斷。
### 4. 攻擊方審查
@@ -104,10 +108,11 @@ slash 參數格式:`/jsc:code-review <target> <source> [角色...]`(角色
## 呼叫方式
格式:`<target> <source> [角色...]`**來源/目標分支缺一不可**,缺漏會反問補齊;角色可省略(會詢問)。
格式:`<target> <source> [角色...] [--exclusions <排除事項檔案路徑>]`**來源/目標分支缺一不可**,缺漏會反問補齊;
角色可省略(會詢問);`--exclusions` 可省略(省略時若選到防守方會反問檔案路徑)。
| 助理 | 呼叫 |
| --- | --- |
| Claude Code / Antigravity | `/jsc:code-review`(反問分支與角色),或 `/jsc:code-review main feature/login``/jsc:code-review main feature/login mage``/jsc:code-review main feature/login all` |
| Codex | `$code-review main feature/login attack`(可接參數),或用 `/skills` 選單 |
| OpenCode | 描述需求(如「幫我用攻防角色 review main 與 feature/login 的差異」)自動觸發 |
| Claude Code / Antigravity | `/jsc:code-review`(反問分支與角色),或 `/jsc:code-review main feature/login``/jsc:code-review main feature/login mage``/jsc:code-review main feature/login all --exclusions .codereview.md` |
| Codex | `$code-review main feature/login attack`,或指定排除事項 `$code-review main feature/login all --exclusions docs/review-rules.md`,或用 `/skills` 選單 |
| OpenCode | 描述需求(如「用攻防角色 review main 與 feature/login 的差異,排除事項看 docs/review-rules.md」)自動觸發 |
+3 -2
View File
@@ -22,9 +22,10 @@ personality: 沉穩公正、就事論事,不護短也不冤枉,只依排除
排除事項設定檔位於**專案根目錄**(建議檔名 `.codereview.md`,列出已知技術債/團隊慣例/刻意取捨)。
1. **若不知道排除事項檔案的位置必須先詢問使用者**(提供建議預設 `.codereview.md`)。
1. **只要使用者沒有明確告知檔案路徑一律先詢問**。預設檔名 `.codereview.md` 僅是詢問時的**建議選項**
**不可**在未取得使用者明確指定前自行假設或直接採用該預設路徑。
2. **檔案允許不存在或為空** → 視為「無排除事項」,直接進入原始碼判斷,不因缺檔而中斷。
3. 取得位置(或確認無檔)後,以該檔內容作為排除事項依據。
3. 取得使用者明確指定的路徑(或在詢問中確認用預設 / 確認無檔)後,以該檔內容作為排除事項依據。
## 裁決準則(對攻擊方的每一條 finding 依序處理)