ai_fixステップの改善: 具体的な修正手順とstep_iteration表示
- ai_fixのinstruction_templateを強化
- {step_iteration}を使って何回目のレビューか明示
- 具体的な修正手順を明記(Read→grep→Edit→Test→Report)
- 報告フォーマットを明示(「修正済み」ではなく具体的に報告)
- 禁止事項を明示(ファイルを開かずに報告することを禁止)
- coderエージェントに「レビュワーの指摘は絶対」を追加
- レビュワーが「未修正」と指摘したら事実確認を優先
- 「修正済みのはず」という思い込みを捨てる
- 反論せず、まず従う
これにより、9回連続未修正のような問題が発生しにくくなる。
This commit is contained in:
parent
3bc0251aa9
commit
1ee73c525c
@ -12,10 +12,17 @@ You are the implementer. **Focus on implementation, not design decisions.**
|
|||||||
- Don't swallow errors; fail fast (Fail Fast)
|
- Don't swallow errors; fail fast (Fail Fast)
|
||||||
- Don't guess; report unclear points
|
- Don't guess; report unclear points
|
||||||
|
|
||||||
|
**Reviewer's feedback is absolute. Your understanding is wrong.**
|
||||||
|
- If reviewer says "not fixed", first open the file and verify the facts
|
||||||
|
- Drop the assumption "I should have fixed it"
|
||||||
|
- Fix all flagged issues with Edit tool
|
||||||
|
- Don't argue; just comply
|
||||||
|
|
||||||
**Be aware of AI's bad habits:**
|
**Be aware of AI's bad habits:**
|
||||||
- Hiding uncertainty with fallbacks → Prohibited (will be flagged in review)
|
- Hiding uncertainty with fallbacks → Prohibited (will be flagged in review)
|
||||||
- Writing unused code "just in case" → Prohibited (will be flagged in review)
|
- Writing unused code "just in case" → Prohibited (will be flagged in review)
|
||||||
- Making design decisions arbitrarily → Report and ask for guidance
|
- Making design decisions arbitrarily → Report and ask for guidance
|
||||||
|
- Dismissing reviewer feedback → Prohibited (your understanding is wrong)
|
||||||
|
|
||||||
## Most Important Rule
|
## Most Important Rule
|
||||||
|
|
||||||
|
|||||||
@ -209,12 +209,31 @@ steps:
|
|||||||
- condition: Cannot proceed, insufficient info
|
- condition: Cannot proceed, insufficient info
|
||||||
next: plan
|
next: plan
|
||||||
instruction_template: |
|
instruction_template: |
|
||||||
Address the AI Reviewer's feedback.
|
**This is AI Review iteration {step_iteration}.**
|
||||||
Focus on:
|
|
||||||
- Correcting incorrect assumptions
|
If this is iteration 2 or later, it means your previous fixes were not actually applied.
|
||||||
- Fixing plausible-but-wrong implementations
|
**Your belief that you "already fixed it" is wrong.**
|
||||||
- Aligning with existing codebase patterns
|
|
||||||
- Removing scope creep
|
**First, acknowledge:**
|
||||||
|
- Files you thought were "fixed" are actually not fixed
|
||||||
|
- Your understanding of previous work is incorrect
|
||||||
|
- You need to start from zero
|
||||||
|
|
||||||
|
**Required actions:**
|
||||||
|
1. Open all flagged files with Read tool (drop assumptions, verify facts)
|
||||||
|
2. Search for problem code with grep to confirm it exists
|
||||||
|
3. Fix confirmed problems with Edit tool
|
||||||
|
4. Run tests to verify (`./gradlew :backend:test` etc.)
|
||||||
|
5. Report specifically "what you checked and what you fixed"
|
||||||
|
|
||||||
|
**Report format:**
|
||||||
|
- ❌ "Already fixed"
|
||||||
|
- ✅ "Checked file X at L123, found problem Y, fixed to Z"
|
||||||
|
|
||||||
|
**Absolutely prohibited:**
|
||||||
|
- Reporting "fixed" without opening files
|
||||||
|
- Judging based on assumptions
|
||||||
|
- Leaving problems that AI Reviewer REJECTED
|
||||||
pass_previous_response: true
|
pass_previous_response: true
|
||||||
|
|
||||||
- name: reviewers
|
- name: reviewers
|
||||||
|
|||||||
@ -204,12 +204,31 @@ steps:
|
|||||||
- WebSearch
|
- WebSearch
|
||||||
- WebFetch
|
- WebFetch
|
||||||
instruction_template: |
|
instruction_template: |
|
||||||
Address the AI Reviewer's feedback.
|
**This is AI Review iteration {step_iteration}.**
|
||||||
Focus on:
|
|
||||||
- Correcting incorrect assumptions
|
If this is iteration 2 or later, it means your previous fixes were not actually applied.
|
||||||
- Fixing plausible-but-wrong implementations
|
**Your belief that you "already fixed it" is wrong.**
|
||||||
- Aligning with existing codebase patterns
|
|
||||||
- Removing scope creep
|
**First, acknowledge:**
|
||||||
|
- Files you thought were "fixed" are actually not fixed
|
||||||
|
- Your understanding of previous work is incorrect
|
||||||
|
- You need to start from zero
|
||||||
|
|
||||||
|
**Required actions:**
|
||||||
|
1. Open all flagged files with Read tool (drop assumptions, verify facts)
|
||||||
|
2. Search for problem code with grep to confirm it exists
|
||||||
|
3. Fix confirmed problems with Edit tool
|
||||||
|
4. Run tests to verify (`./gradlew :backend:test` etc.)
|
||||||
|
5. Report specifically "what you checked and what you fixed"
|
||||||
|
|
||||||
|
**Report format:**
|
||||||
|
- ❌ "Already fixed"
|
||||||
|
- ✅ "Checked file X at L123, found problem Y, fixed to Z"
|
||||||
|
|
||||||
|
**Absolutely prohibited:**
|
||||||
|
- Reporting "fixed" without opening files
|
||||||
|
- Judging based on assumptions
|
||||||
|
- Leaving problems that AI Reviewer REJECTED
|
||||||
pass_previous_response: true
|
pass_previous_response: true
|
||||||
rules:
|
rules:
|
||||||
- condition: AI Reviewer's issues have been fixed
|
- condition: AI Reviewer's issues have been fixed
|
||||||
|
|||||||
@ -216,11 +216,31 @@ steps:
|
|||||||
- WebSearch
|
- WebSearch
|
||||||
- WebFetch
|
- WebFetch
|
||||||
instruction_template: |
|
instruction_template: |
|
||||||
Address the AI Reviewer's feedback.
|
**This is AI Review iteration {step_iteration}.**
|
||||||
Focus on:
|
|
||||||
- Correcting incorrect assumptions
|
If this is iteration 2 or later, it means your previous fixes were not actually applied.
|
||||||
- Fixing plausible-but-wrong implementations
|
**Your belief that you "already fixed it" is wrong.**
|
||||||
- Aligning with existing codebase patterns
|
|
||||||
|
**First, acknowledge:**
|
||||||
|
- Files you thought were "fixed" are actually not fixed
|
||||||
|
- Your understanding of previous work is incorrect
|
||||||
|
- You need to start from zero
|
||||||
|
|
||||||
|
**Required actions:**
|
||||||
|
1. Open all flagged files with Read tool (drop assumptions, verify facts)
|
||||||
|
2. Search for problem code with grep to confirm it exists
|
||||||
|
3. Fix confirmed problems with Edit tool
|
||||||
|
4. Run tests to verify (`./gradlew :backend:test` etc.)
|
||||||
|
5. Report specifically "what you checked and what you fixed"
|
||||||
|
|
||||||
|
**Report format:**
|
||||||
|
- ❌ "Already fixed"
|
||||||
|
- ✅ "Checked file X at L123, found problem Y, fixed to Z"
|
||||||
|
|
||||||
|
**Absolutely prohibited:**
|
||||||
|
- Reporting "fixed" without opening files
|
||||||
|
- Judging based on assumptions
|
||||||
|
- Leaving problems that AI Reviewer REJECTED
|
||||||
- Removing scope creep
|
- Removing scope creep
|
||||||
pass_previous_response: true
|
pass_previous_response: true
|
||||||
rules:
|
rules:
|
||||||
|
|||||||
@ -12,10 +12,17 @@
|
|||||||
- エラーは握りつぶさず、早期に失敗させる(Fail Fast)
|
- エラーは握りつぶさず、早期に失敗させる(Fail Fast)
|
||||||
- 推測で実装せず、不明点は報告する
|
- 推測で実装せず、不明点は報告する
|
||||||
|
|
||||||
|
**レビュワーの指摘は絶対。あなたの認識が間違っている。**
|
||||||
|
- レビュワーが「未修正」と指摘したら、まずファイルを開いて事実確認
|
||||||
|
- 「修正済みのはず」という思い込みを捨てる
|
||||||
|
- 指摘された問題を全て Edit tool で修正する
|
||||||
|
- 反論せず、まず従う
|
||||||
|
|
||||||
**AIの悪い癖を自覚する:**
|
**AIの悪い癖を自覚する:**
|
||||||
- 不確実なときにフォールバックで隠す → 禁止(レビューで指摘される)
|
- 不確実なときにフォールバックで隠す → 禁止(レビューで指摘される)
|
||||||
- 「念のため」で未使用コードを書く → 禁止(レビューで指摘される)
|
- 「念のため」で未使用コードを書く → 禁止(レビューで指摘される)
|
||||||
- 設計判断を勝手にする → 報告して判断を仰ぐ
|
- 設計判断を勝手にする → 報告して判断を仰ぐ
|
||||||
|
- レビュワーの指摘を軽視する → 禁止(あなたの認識が間違っている)
|
||||||
|
|
||||||
## 最重要ルール
|
## 最重要ルール
|
||||||
|
|
||||||
|
|||||||
@ -205,12 +205,31 @@ steps:
|
|||||||
- condition: 判断できない、情報不足
|
- condition: 判断できない、情報不足
|
||||||
next: plan
|
next: plan
|
||||||
instruction_template: |
|
instruction_template: |
|
||||||
AI Reviewerのフィードバックに対応してください。
|
**これは {step_iteration} 回目の AI Review です。**
|
||||||
以下に集中してください:
|
|
||||||
- 間違った仮定の修正
|
2回目以降は、前回の修正が実際には行われていなかったということです。
|
||||||
- もっともらしいが間違っている実装の修正
|
**あなたの「修正済み」という認識が間違っています。**
|
||||||
- 既存コードベースのパターンとの整合
|
|
||||||
- スコープクリープの除去
|
**まず認めること:**
|
||||||
|
- 「修正済み」と思っていたファイルは実際には修正されていない
|
||||||
|
- 前回の作業内容の認識が間違っている
|
||||||
|
- ゼロベースで考え直す必要がある
|
||||||
|
|
||||||
|
**必須アクション:**
|
||||||
|
1. 指摘された全ファイルを Read tool で開く(思い込みを捨てて事実確認)
|
||||||
|
2. 問題箇所を grep で検索して実在を確認する
|
||||||
|
3. 確認した問題を Edit tool で修正する
|
||||||
|
4. テストを実行して検証する(`./gradlew :backend:test` 等)
|
||||||
|
5. 「何を確認して、何を修正したか」を具体的に報告する
|
||||||
|
|
||||||
|
**報告フォーマット:**
|
||||||
|
- ❌ 「既に修正されています」
|
||||||
|
- ✅ 「ファイルXのL123を確認した結果、問題Yが存在したため、Zに修正しました」
|
||||||
|
|
||||||
|
**絶対に禁止:**
|
||||||
|
- ファイルを開かずに「修正済み」と報告
|
||||||
|
- 思い込みで判断
|
||||||
|
- AI Reviewer が REJECT した問題の放置
|
||||||
pass_previous_response: true
|
pass_previous_response: true
|
||||||
|
|
||||||
- name: reviewers
|
- name: reviewers
|
||||||
|
|||||||
@ -213,12 +213,31 @@ steps:
|
|||||||
- WebSearch
|
- WebSearch
|
||||||
- WebFetch
|
- WebFetch
|
||||||
instruction_template: |
|
instruction_template: |
|
||||||
AI Reviewerのフィードバックに対応してください。
|
**これは {step_iteration} 回目の AI Review です。**
|
||||||
以下に集中してください:
|
|
||||||
- 間違った仮定の修正
|
2回目以降は、前回の修正が実際には行われていなかったということです。
|
||||||
- もっともらしいが間違っている実装の修正
|
**あなたの「修正済み」という認識が間違っています。**
|
||||||
- 既存コードベースのパターンとの整合
|
|
||||||
- スコープクリープの除去
|
**まず認めること:**
|
||||||
|
- 「修正済み」と思っていたファイルは実際には修正されていない
|
||||||
|
- 前回の作業内容の認識が間違っている
|
||||||
|
- ゼロベースで考え直す必要がある
|
||||||
|
|
||||||
|
**必須アクション:**
|
||||||
|
1. 指摘された全ファイルを Read tool で開く(思い込みを捨てて事実確認)
|
||||||
|
2. 問題箇所を grep で検索して実在を確認する
|
||||||
|
3. 確認した問題を Edit tool で修正する
|
||||||
|
4. テストを実行して検証する(`./gradlew :backend:test` 等)
|
||||||
|
5. 「何を確認して、何を修正したか」を具体的に報告する
|
||||||
|
|
||||||
|
**報告フォーマット:**
|
||||||
|
- ❌ 「既に修正されています」
|
||||||
|
- ✅ 「ファイルXのL123を確認した結果、問題Yが存在したため、Zに修正しました」
|
||||||
|
|
||||||
|
**絶対に禁止:**
|
||||||
|
- ファイルを開かずに「修正済み」と報告
|
||||||
|
- 思い込みで判断
|
||||||
|
- AI Reviewer が REJECT した問題の放置
|
||||||
pass_previous_response: true
|
pass_previous_response: true
|
||||||
rules:
|
rules:
|
||||||
- condition: AI Reviewerの指摘に対する修正が完了した
|
- condition: AI Reviewerの指摘に対する修正が完了した
|
||||||
|
|||||||
@ -204,12 +204,31 @@ steps:
|
|||||||
- WebSearch
|
- WebSearch
|
||||||
- WebFetch
|
- WebFetch
|
||||||
instruction_template: |
|
instruction_template: |
|
||||||
AI Reviewerのフィードバックに対応してください。
|
**これは {step_iteration} 回目の AI Review です。**
|
||||||
以下に集中してください:
|
|
||||||
- 間違った仮定の修正
|
2回目以降は、前回の修正が実際には行われていなかったということです。
|
||||||
- もっともらしいが間違っている実装の修正
|
**あなたの「修正済み」という認識が間違っています。**
|
||||||
- 既存コードベースのパターンとの整合
|
|
||||||
- スコープクリープの除去
|
**まず認めること:**
|
||||||
|
- 「修正済み」と思っていたファイルは実際には修正されていない
|
||||||
|
- 前回の作業内容の認識が間違っている
|
||||||
|
- ゼロベースで考え直す必要がある
|
||||||
|
|
||||||
|
**必須アクション:**
|
||||||
|
1. 指摘された全ファイルを Read tool で開く(思い込みを捨てて事実確認)
|
||||||
|
2. 問題箇所を grep で検索して実在を確認する
|
||||||
|
3. 確認した問題を Edit tool で修正する
|
||||||
|
4. テストを実行して検証する(`./gradlew :backend:test` 等)
|
||||||
|
5. 「何を確認して、何を修正したか」を具体的に報告する
|
||||||
|
|
||||||
|
**報告フォーマット:**
|
||||||
|
- ❌ 「既に修正されています」
|
||||||
|
- ✅ 「ファイルXのL123を確認した結果、問題Yが存在したため、Zに修正しました」
|
||||||
|
|
||||||
|
**絶対に禁止:**
|
||||||
|
- ファイルを開かずに「修正済み」と報告
|
||||||
|
- 思い込みで判断
|
||||||
|
- AI Reviewer が REJECT した問題の放置
|
||||||
pass_previous_response: true
|
pass_previous_response: true
|
||||||
rules:
|
rules:
|
||||||
- condition: AI Reviewerの指摘に対する修正が完了した
|
- condition: AI Reviewerの指摘に対する修正が完了した
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user