Skip to content

docs: PRレビュー時のスコープ照合ルールを追加 (#57)#60

Open
strnh wants to merge 2 commits into
mainfrom
docs/57-pr-scope-review
Open

docs: PRレビュー時のスコープ照合ルールを追加 (#57)#60
strnh wants to merge 2 commits into
mainfrom
docs/57-pr-scope-review

Conversation

@strnh

@strnh strnh commented Jul 9, 2026

Copy link
Copy Markdown
Owner

概要 (Summary)

issue #57「PR #56: PDF取込機能が仕切書機能と無関係なスコープで混在している」の調査と対応。

Closes #57

調査結果 (Investigation)

issue の前提を検証した結果、PDF取込機能は PR #56 のマージ差分に含まれていないことを確認した。

「PR #56 に混在して見えた」のは、PR #51 マージ(68a7eca)を取得していない古いローカル main を比較基準にしたことによる誤認と考えられる(PR #56 ブランチは途中で origin/main をマージ(2d63620)しており、古い基準と比較すると PR #51 由来のファイルが「このPRの新規追加」に見える)。

対応内容 (Changes)

issue の対応案 3 点に対して:

  1. 別PRへの切り出し → 既に PR Issue #1: quotebuilder出力PDFの取込に対応 #51 として独立PRで実現済み(追加作業なし)
  2. スコープの事後記録 → PR feat: 仕切書と定期請求スケジュール(Phase A〜C) (#54) #56 本文に「PDF取込は本PRに含まれない(PR Issue #1: quotebuilder出力PDFの取込に対応 #51 で別途マージ済み)」の補足を追記
  3. レビュー時のスコープ照合運用 → 本PRで AGENTS.md に運用ルールを明文化
    • レビュー前に git fetch origin し、比較基準は必ず最新 origin/main(merge-base)
    • PR本文の宣言スコープと gh pr diff --name-only の実ファイル一覧を突合
    • 独立した複数機能は1PRにまとめない

影響範囲 (Impact)

  • ドキュメント(AGENTS.md)のみの変更。アプリケーションコードへの影響なし。

🤖 Generated with Claude Code

issue #57 の調査結果:
- PDF取込機能は PR #56 には含まれておらず、専用の PR #51 (Issue #1)
  で 2026-07-07 に別途マージ済み(git diff 68a7eca..65b265a および
  gh pr diff 56 --name-only で PDF/Import 関連 0 件を確認)
- 「PR #56 に混在」に見えたのは、古いローカル main(68a7eca 未取得)
  を比較基準にしたことによる誤認

再発防止として、レビュー時に最新 origin/main を基準にした
スコープ照合(PR本文 vs 実 diff)を行う運用ルールを明文化する。

Closes #57

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

issue #57 の調査結果(PR #56 への誤認)を踏まえ、PRレビュー時に「PR本文の宣言スコープ」と「実際の差分ファイル」を突合して確認する運用ルールを AGENTS.md に明文化するPRです。レビューの比較基準が古いローカル main だと誤認が起きうる、という再発防止の手順を追加しています。

Changes:

  • PRレビュー前に git fetch origin を行い、比較基準を最新にする旨を追記
  • PR本文スコープと gh pr diff --name-only のファイル一覧を突合する手順を追記
  • 独立機能の混在を避け、必要なら別issue/別PRへ切り出す運用を追記

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread AGENTS.md Outdated

## PRレビュー時のスコープ照合

- レビュー前に `git fetch origin` を実行し、diff の比較基準は必ず最新の `origin/main`(merge-base)にする。ローカル main が古いと、他PRでマージ済みの変更が「このPRの新規追加」に見える(issue #57 の誤認の原因)。

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

指摘のとおり修正しました(80f0952)。「merge-base(共通祖先コミット)を基準に diff を取る」と表現を正確化し、具体例として git diff origin/main...HEAD(= git diff $(git merge-base origin/main HEAD) HEAD と同等)を明記しました。

Copilot レビュー指摘に対応: merge-base は origin/main 自体ではなく
共通祖先コミットであるため、表現を修正し `git diff origin/main...HEAD`
の具体例を追記。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread AGENTS.md

## PRレビュー時のスコープ照合

- レビュー前に `git fetch origin` を実行し、diff は最新の `origin/main` と PR ブランチの merge-base(共通祖先コミット)を基準に取る(例: `git diff origin/main...HEAD`、これは `git diff $(git merge-base origin/main HEAD) HEAD` と同等)。ローカル main が古いと、他PRでマージ済みの変更が「このPRの新規追加」に見える(issue #57 の誤認の原因)。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PR #56: PDF取込機能が仕切書機能と無関係なスコープで混在している

2 participants