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
3 changes: 2 additions & 1 deletion .claude/agents/opentouryo-change-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ Issue: #NNN(GitHub の Issue が無ければ、要件を書いた文書のパ

## 手順

1. **Issue を読む**:`gh issue view NNN --comments`(リポジトリのルートで)。何を直す・足すのかと、本文の案を押さえる。
1. **Issue を読む**:`gh issue view NNN --json title,body,comments`(リポジトリのルートで)。何を直す・足すのかと、本文の案を押さえる。
- `--comments` は使わない(端末につながっていないと、コメントだけを出して本文を出さない)。本文が空・読めないなら、推し量らずに見ていない範囲に書く。
- **コメントのうち、書いた側(エージェント)の報告**(完了の報告・途中の報告)**は、主の説明である。** 根拠にしない。
そこに書かれたこと(「テストで確かめた」など)は、コードとテストを読んで自分で確かめる。
- 人の判断(どの案にするか、など)は、前提にしてよい。
Expand Down
4 changes: 2 additions & 2 deletions .claude/agents/opentouryo-expectation-reviewer.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# expectation-guard-source: OpenTouryoCodingAgentAssets@945878daf458 src/quality/ExpectationGuard/opentouryo-expectation-reviewer.md sha256:6c4be159093e9e30b39985cf2cf1483f921f6dd21afe6627073e79fdbd9bc301
# expectation-guard-source: OpenTouryoCodingAgentAssets@b1665b271e4f src/quality/ExpectationGuard/opentouryo-expectation-reviewer.md sha256:44c214f387ca21d906a0cbd955f4976c38973419009e81c451a62f99d7ce5941
name: opentouryo-expectation-reviewer
description: 期待値の変更のトレーラー(Expectation-Change:)の理由を、検出器が検出した一覧・差分と突き合わせる(書いたモデルとは別のモデル)。トレーラーの文面を提案したら、コミットの前に使う。止める判定はせず、観点ごとに「合う/合わない/判断できない」と根拠を返す。ファイルは編集しない。
tools: Read, Grep, Glob, Bash, PowerShell, WebFetch
Expand Down Expand Up @@ -30,7 +30,7 @@ model: sonnet
人が自分から付けた理由は、差分のテストのすべてと突き合わせる(網羅は「理由が述べる変化が差分にあるか」で見る)
2. `DiffCommand` の差分を**すべて**読む。`Findings` のファイルは必ず読み、テストなら変わったテストの前後の全体を読む。
3. 理由が挙げる根拠を、**自分で**読む。
- Issue:`gh issue view <番号> --comments`
- Issue:`gh issue view <番号> --json title,body,comments`(`--comments` は端末につながっていないと本文を出さないので使わない。本文が読めなければ「判断できない」にする)
- 仕様の節:WebFetch で原典の該当の節を読む(続きは offset で)。読めなければ「判断できない」にする
4. 次の観点で判定する。

Expand Down
4 changes: 4 additions & 0 deletions .claude/agents/opentouryo-test-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@ model: opus
実装役の報告:<報告の本文>
前の指摘:<差し戻しの後に新しく呼ばれたときだけ。前の回の自分の指摘(直し方の文)をそのまま>
セルフレビューの残り:<その段を承認した後だけ。実装役のセルフレビューのうち、自分の指摘に無かった点>
通っていない分岐:<段 4 を承認した後だけ。司令役がカバレッジで見つけた、足した・変えたメソッドの通っていない分岐(ファイル:行)>
```

- **型の外の説明・見立て(「ここは正しい」など)は前提にしない。**
- **実装役の報告は、確かめる対象の一覧として使う。** 書かれた結果(「全件通った」「壊して落ちた」など)は、自分で確かめるまで根拠にしない。
実装役のセルフレビューは、承認の前には渡されない(渡されていたら読まず、見た範囲の欄に書く)。
- **「セルフレビューの残り」が渡されたら**(承認の後)、1 件ずつ実物で確かめ、「直す(直し方の文)」「仕様の読み・仕様に無い期待(問いの形で)」
「問題なし(理由)」のどれかで返す。
- **「通っていない分岐」が渡されたら**、1 件ずつ実装と仕様(本文・決定記録)を読み、「仕様で期待が決まる(足すケースの案と根拠の ID)」
「仕様に無い期待(問いの形で)」「仕様に無い処理(直し方の文)」「テストで通せない(理由)」のどれかで返す。
**根拠の ID が無いケースを案にしない**(カバレッジを上げるためのテストは書かせない。`TESTING.md` 2)。
- 成果物が読めない(差分が空・パスが無い)なら、レビューせずにそう返す。

## 守ること
Expand Down
2 changes: 1 addition & 1 deletion .claude/hooks/ExpectationGuard.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# expectation-guard-source: OpenTouryoCodingAgentAssets@945878daf458 src/quality/ExpectationGuard/ExpectationGuard.ps1 sha256:c0833938e4cd37042217f956917b8f24e3b4a69ebf30857c9c4f4422a8ec8be5
# expectation-guard-source: OpenTouryoCodingAgentAssets@b1665b271e4f src/quality/ExpectationGuard/ExpectationGuard.ps1 sha256:c0833938e4cd37042217f956917b8f24e3b4a69ebf30857c9c4f4422a8ec8be5
<#
.SYNOPSIS
期待値の変更になりうる編集を、人の確認付きにする(段 1。Claude Code の PreToolUse フック)。
Expand Down
2 changes: 1 addition & 1 deletion .githooks/commit-msg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# expectation-guard-source: OpenTouryoCodingAgentAssets@945878daf458 src/quality/ExpectationGuard/commit-msg sha256:646f55d33b89697d55b1923a2f63dd58f9dae2701ec622c4a4b6f8883d4ed1c0
# expectation-guard-source: OpenTouryoCodingAgentAssets@b1665b271e4f src/quality/ExpectationGuard/commit-msg sha256:646f55d33b89697d55b1923a2f63dd58f9dae2701ec622c4a4b6f8883d4ed1c0
# Expectation-change guard (stage 2. OpenTouryoCodingAgentAssets#3).
# Rejects a commit that changes test expectations without an "Expectation-Change: <reason>" trailer
# in the commit message. The detection itself is tools/ExpectationGuard/CheckExpectationChange.ps1 (shared with the CI check);
Expand Down
Loading
Loading