Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .claude/agents/test-runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,24 @@ TEST_VERDICT:

`docs/dev/agent-skill-boundaries.md#OUTPUT_BUDGET_V1` の制約に従う。routing-critical な機械可読フィールドは削らず、人間向け説明・証跡・diff 再掲のみを削減する。
`TEST_VERDICT_MACHINE/v1` の全フィールドは必ず含める(routing 必須フィールド)。

## VC 逐語実行規則(Issue #589)

Issue 本文の `## Verification Commands` に記載された VC コマンドは **逐語実行(verbatim)** する。

- パターン削除・簡略化・置換は禁止する。`rg -n "foo|bar"` は `rg foo` に簡略化してはならない
- VC コマンドの一部を省略して実行することを禁止する
- VC に記載された引数・フラグをすべてそのまま使用すること
- regex-bearing command(rg / grep -E / egrep)のパターン引数内 `|` は regex alternation として扱い、shell pipeline と混同しない

違反例(禁止):
```
# VC に rg -n "foo|bar" .claude/ とある場合
rg foo .claude/ # NG: パターンを簡略化している
rg -n "foo" .claude/ | rg "bar" # NG: pipeline に分割している
```

正しい実行:
```
rg -n "foo|bar" .claude/ # OK: 逐語実行
```
18 changes: 18 additions & 0 deletions .claude/skills/create-issue/references/body-authoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,24 @@ rg -q "<field>" <file>

VC に `rg` が含まれる場合、`rg "foo\|bar"` の `\|` は `|` に修正する(rg の OR 演算子)。

**Issue #589 追記**: `baseline_vc_preflight.py` は `\|` を含む rg / egrep / grep -E コマンドを
`regex_literal_pipe_suspected` として `blocked` に分類する。`\|` は ripgrep / ERE では alternation を
意図するなら `|` のみで十分であり、`\|` は literal pipe 文字のため。

VC を修正できない正当な理由(例: BRE モードで literal pipe が必要)がある場合は、
コマンド行の直前行に以下の annotation を付与することで exempt できる:

```bash
# vc-regex-intent: literal-pipe-ok reason="BRE mode: \| is literal pipe (intentional)"
$ grep "foo\|bar" file.txt
```

annotation 構文:
- 形式: `# vc-regex-intent: literal-pipe-ok reason="<理由>"`
- 位置: VC コマンド行の直前行(bash ブロック内)
- `reason` フィールドは任意だが強く推奨(レビュー時の根拠として使用)
- annotation がない場合: `baseline_vc_preflight` は `decision: blocked` を返す

### rg を用いた VC 作成コマンド構築

VC 内でファイルのパターン存在確認を行う際は `grep` より `rg` を優先する。`grep` は GNU 拡張差や Perl 互換構文の扱いが環境によって分かれるため、決定論性が低い。
Expand Down
Loading
Loading