Skip to content

Copilot レビュー用カスタムインストラクションを追加し README に Good Practice 参照先を明記#16

Merged
mackato merged 3 commits into
mainfrom
copilot-instructions
Jun 3, 2026
Merged

Copilot レビュー用カスタムインストラクションを追加し README に Good Practice 参照先を明記#16
mackato merged 3 commits into
mainfrom
copilot-instructions

Conversation

@mackato
Copy link
Copy Markdown
Member

@mackato mackato commented Jun 3, 2026

ユーザー指示の要点

  • ghas-setup を flake パッケージとして追加し README をパッケージ単位に分割 #14 でレビューが収束しなかったため、Copilot レビューのカスタムインストラクションを追加する。
  • instacto/instactocopilot-instructions.md を参考に、プロジェクト毎の言語・ツールに依存しない汎用ルールを作成する。
  • 本リポジトリを他プロジェクトの Good Practice 参照先と位置づけ、その旨を README に含める(カスタムインストラクションはその 1 例)。

変更の概要

  • 新規 .github/copilot-instructions.md: 言語・ツール非依存の汎用レビュールール。参照ドキュメント(../README.md / ../CLAUDE.md)を一次情報として複製しない(DRY)。レビューの進め方/集中すべき観点(バグ・セキュリティ・破壊的変更・パフォーマンス・YAGNI・DRY・ドキュメント追従)/重箱の隅をつつかない(厳守)指摘の網羅性と圧縮/出力ルール(日本語)で構成。
  • README.md: 冒頭に ## 参照用 Good Practice 節を追加し、第 1 例として copilot-instructions を提示。構成ツリーにも 1 行追加。
  • 参考元(instacto)の固有要素(用語集・要件・出典の信頼度階層・断定表現・ドメイン用語の追加提案ポリシー)は本 repo に不要なため除去。

レビューのポイント

検証方法

  • grep -n '^||' .github/copilot-instructions.md README.md 該当なし(自ルールのドッグフード)。
  • devbox run check(shellcheck・bats・statix・deadnix・nixfmt)→ all checks passed。
  • README / copilot-instructions の相対リンク先が実在することを確認。

🤖 Generated with Claude Code

PR レビューが収束しない(指摘の小分け・後出し・重箱の隅つつき)課題に対し、
GitHub Copilot のカスタムインストラクションを導入する。言語・ツール非依存の
汎用ルールに限定し、重箱の隅をつつかない方針と初回レビューでの網羅・圧縮を中心に据える。
あわせて本リポジトリを他プロジェクトの Good Practice 参照先と位置づける旨を README に追記する。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot レビューの収束を早めるために、リポジトリ全体で再利用できる「言語・ツール非依存」の Copilot カスタムインストラクションを追加し、あわせて本リポジトリを他プロジェクトの Good Practice 参照先として README に明記する PR です。

Changes:

  • .github/copilot-instructions.md を新規追加し、レビュー観点・進め方・出力ルールを定義
  • README 冒頭に「参照用 Good Practice」節を追加し、参照例として copilot-instructions を提示
  • README の構成ツリーに copilot-instructions を追記

Reviewed changes

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

File Description
README.md Good Practice の参照先として本 repo を位置づけ、copilot-instructions への導線を追加
.github/copilot-instructions.md Copilot のレビュー向け汎用ルール(DRY / YAGNI / 重箱回避 / 網羅と圧縮 / 出力ルール)を新設

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

Comment thread .github/copilot-instructions.md Outdated
@@ -0,0 +1,54 @@
# GitHub Copilot カスタムインストラクション

本ファイルは GitHub Copilot が本リポジトリの PR をレビューする際の指示。`@copilot` へのレビュー依頼・コード補完にも適用される。プロジェクト固有の原則・仕様はここに複製せず、下記を一次情報として参照する(DRY)。
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ご指摘ありがとうございます。2 点に分けて対応しました。

  • コード補完: ご指摘のとおり誤りでした。.github/copilot-instructions.md を参照するのは Copilot Chat とコードレビューで、コード補完は対象外(公式ドキュメント)。「コード補完にも適用」を削除しました。
  • メンション名: @github-copilot ではなく、レビューは「Copilot をレビュアーに追加」する仕組みで、CLI でも gh pr edit --add-reviewer @copilotChangelog)と @copilot が使われます。誤解を避けるため @copilot へのレビュー依頼 という表現自体をやめ、「Copilot をレビュアーに追加したとき」に改めました。

f655bba で修正済みです。

`.github/copilot-instructions.md` が参照されるのは Copilot のコードレビュー時で、
コード補完は対象外(GitHub 公式ドキュメント)。誤った運用を招かないよう
「コード補完にも適用」を削除し、レビュー依頼の表現も「Copilot をレビュアーに追加」に改める。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

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 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread .github/copilot-instructions.md Outdated
- [`../README.md`](../README.md) — リポジトリの概要・構成
- [`../CLAUDE.md`](../CLAUDE.md) — プロジェクト全体の原則・運用ルール

これらに書かれた内容は本ファイルに複製しない。詳細が必要なら README の目次から関連ドキュメントを辿る。
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ご指摘のとおりです。README に「目次」は存在しないため、「目次から辿る」を「README の該当セクションやそこからのリンクで関連ドキュメントを辿る」に修正しました(552c6be)。

README に「目次」は存在しないため、「目次から辿る」は誤解を招く。
「該当セクションやそこからのリンクで辿る」に改める。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

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 2 out of 2 changed files in this pull request and generated no new comments.

@mackato
Copy link
Copy Markdown
Member Author

mackato commented Jun 3, 2026

LGTM。Copilot レビューの指摘(コード補完・メンション名・参照導線)はすべて対応済みで、devbox run check も通過。レビュー収束につきマージします。

@mackato mackato merged commit 67be699 into main Jun 3, 2026
2 checks passed
@mackato mackato deleted the copilot-instructions branch June 3, 2026 15:55
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.

2 participants