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
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
232 changes: 116 additions & 116 deletions .opentouryo-agent-assets.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tools/ExpectationGuard/CheckExpectationChange.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# expectation-guard-source: OpenTouryoCodingAgentAssets@945878daf458 src/quality/ExpectationGuard/CheckExpectationChange.ps1 sha256:d65d8b97c5ffa12e3cfad6a22d8cb4eccd3573677c2329c1fbf238c30cce430a
# expectation-guard-source: OpenTouryoCodingAgentAssets@b1665b271e4f src/quality/ExpectationGuard/CheckExpectationChange.ps1 sha256:d65d8b97c5ffa12e3cfad6a22d8cb4eccd3573677c2329c1fbf238c30cce430a
<#
.SYNOPSIS
期待値の変更を検出し、トレーラー Expectation-Change が付いているかを確かめる(共通の本体)。
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# expectation-guard-source: OpenTouryoCodingAgentAssets@945878daf458 src/quality/ExpectationGuard/tests/Run-Tests.ps1 sha256:146551b25fd5f7ca11fbb7850b32d2ecce9c66bde65f2de641b4aa7edec4439b
# expectation-guard-source: OpenTouryoCodingAgentAssets@b1665b271e4f src/quality/ExpectationGuard/tests/Run-Tests.ps1 sha256:146551b25fd5f7ca11fbb7850b32d2ecce9c66bde65f2de641b4aa7edec4439b
<#
.SYNOPSIS
期待値の変更の検出器の、判定の用例(cases.psd1)を回す(OpenTouryoCodingAgentAssets#3)。
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# expectation-guard-source: OpenTouryoCodingAgentAssets@945878daf458 src/quality/ExpectationGuard/tests/TestComparer.ps1 sha256:0a521f5338575d3cfa707cde9c0a18ca460524057cfddf35c21dc8d5f047bfd4
# expectation-guard-source: OpenTouryoCodingAgentAssets@b1665b271e4f src/quality/ExpectationGuard/tests/TestComparer.ps1 sha256:0a521f5338575d3cfa707cde9c0a18ca460524057cfddf35c21dc8d5f047bfd4
<#
.SYNOPSIS
判定の用例で使う、FileRules の Comparer の見本(Golden の正規化の代わり)。
Expand Down
2 changes: 1 addition & 1 deletion tools/ExpectationGuard/ExpectationGuard.Tests/cases.psd1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# expectation-guard-source: OpenTouryoCodingAgentAssets@945878daf458 src/quality/ExpectationGuard/tests/cases.psd1 sha256:75f7b084a0431ee36f6a79b78260f12a314ab4e31b2667fc1d6d3e98e99ce37b
# expectation-guard-source: OpenTouryoCodingAgentAssets@b1665b271e4f src/quality/ExpectationGuard/tests/cases.psd1 sha256:75f7b084a0431ee36f6a79b78260f12a314ab4e31b2667fc1d6d3e98e99ce37b
# 判定の用例(OpenTouryoCodingAgentAssets#3)。「この差分なら検出する/しない」を、文章ではなくテストで固定する。
#
# 各用例は、一時のリポジトリで次を行う。
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# expectation-guard-source: OpenTouryoCodingAgentAssets@945878daf458 src/quality/ExpectationGuard/tests/rules.test.psd1 sha256:524776bd95532d8c16221668ef103f2edd9f230087e187a2dcd528a912ba40bd
# expectation-guard-source: OpenTouryoCodingAgentAssets@b1665b271e4f src/quality/ExpectationGuard/tests/rules.test.psd1 sha256:524776bd95532d8c16221668ef103f2edd9f230087e187a2dcd528a912ba40bd
# 判定の用例で使う規則(すべての種類を 1 つずつ持つ)。用例のリポジトリでは guard/rules.psd1 として置く。
@{
Guard = @(
Expand Down
2 changes: 1 addition & 1 deletion tools/ExpectationGuard/rules.common.psd1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# expectation-guard-source: OpenTouryoCodingAgentAssets@945878daf458 src/quality/ExpectationGuard/rules.common.psd1 sha256:0e31b6bc86bd6be0479054d220efe4157e7d6f74c02bc78cbf186a78c6e371a4
# expectation-guard-source: OpenTouryoCodingAgentAssets@b1665b271e4f src/quality/ExpectationGuard/rules.common.psd1 sha256:0e31b6bc86bd6be0479054d220efe4157e7d6f74c02bc78cbf186a78c6e371a4
# 期待値の変更の検出器の、共通の規則(OpenTouryoCodingAgentAssets#3)。
# 原本は OpenTouryoCodingAgentAssets の src/quality/ExpectationGuard/。導入先では写しであり、直さない。
# リポジトリごとの規則は rules.psd1(見本は rules.sample.psd1)。配列はここに足され、値は rules.psd1 で上書きされる。
Expand Down
Loading