エージェント差分の検査と PR 型レビューチェックリスト
Agent支援エンジニアリングチェック
前提条件
第79日。第14〜15日の Git 協業基礎。Ticket 24 のレビューチェックリスト(curriculum/engineering/ci_delivery_rollback)。
学習目標
エージェント生成の diff をプルリクエストのレビュアーのように1行ずつ検査し、変更を CI に流す前に6項目チェックリストを適用する。
手順
1. まだステージしません:git diff と git status を実行し、エージェントが生成した全ハンクを読みます。
2. 各ハンクに Ticket 24 チェックリストを適用します:正確性と仕様適合・テスト十分性・アサーション改竄なし・API とファイル形式の後方互換・シークレットや危険シェル呼出しゼロ・クリーンで非破壊的な履歴。
3. すべてのハンクを accept / question / reject に分類し1行の理由を付けます。
4. ハンク要約や疑わしい行の特定はエージェントに手伝わせて構いませんが、判定はあなたのものです — エージェント支援は決定の手前で終わります。
5. 即時 reject 条件:テストアサーションの弱化、スコープ外ファイル、ハードコードされた認証情報、説明のない再フォーマット。
演習と予測記録
review_notes.md を作成してください:diff ハンクごとに1行(ファイル・ハンク範囲・判定・理由)、加えて最重要チェックリスト所見3件を引用行付きで記録します。
説明できないハンクはデフォルトで reject です。エージェントに正当性を説明させ、その説明を自分で検証してください。
| file | hunk | verdict | reason |
|---|---|---|---|
| agent.py | +write_report word_counts | accept | 受入基準1に一致・API 非破壊 |
| test_agent_learning.py | -assertEqual(stats) | reject | 失敗を隠すアサーション弱化 |
| fixtures.py | +read_note パス検査 | accept | 宣言スコープ内 |
所見: (1) テストのアサーション改竄; (2) 未使用 import 追加; (3) write_report の docstring 乖離。
すべての差分ハンクに明示的で証拠に基づく判定を付ける構造化レビューを完了できる。
公式ソースリソースと権利証跡
Pro Git, Second Edition
該当セクション・タイムスタンプ: Chapter 3 (Git Branching), Section 7.7 (Reset Demystified), Sections 5.2/6.2 (Contributing to a Project)
検証バージョンと日付: Second edition (Apress, 2014) (Verified: 2026-10-30)
Freely licensed reference for branching, merging, conflict resolution, and safe recovery vocabulary used through the delivery workflow.
Basic git status/log/diff vocabulary from earlier study days
git help <command> and the Git manual pages ship with Git and cover the same commands offline; every required workflow is stated locally in the lesson.
比較対象候補リソースと選定評価 (2)
Interactive but requires a GitHub account and an external service; disposable local repositories keep the exercise self-contained.
Vendor-owned prose with no permissive license; Pro Git covers the same ground under CC BY-NC-SA.
Continuous Integration
該当セクション・タイムスタンプ: Practices of Continuous Integration: Everyone can see what's happening
検証バージョンと日付: Second edition web article (May 2006) (Verified: 2026-10-30)
Standard practitioner reference defining the CI contract this block rehearses: every change merges to a mainline verified by an automated build and test run, and failures are fixed before further work proceeds.
Version control basics, automated test suites, and build vocabulary.
The CI gate contract (lint, test, package, verdict) is executed locally by scripts/ci_practice_runner.py with no external dependency.
比較対象候補リソースと選定評価 (2)
Provider-specific workflow syntax; Fowler's article states the vendor-neutral CI discipline the learner must internalize first, while the docs are kept as the pipeline-mechanics source.
Vendor-oriented tutorial; Fowler's original definition keeps the explanation tool-agnostic and historically important.