コマンドラインからGitHub issueの本文やコメントを読み取り専用で確認し、URLや番号から対象リポジトリを指定する手順を案内します。
- issueの本文とコメントを読みたいとき
- URLからissueの内容を確認したいとき
- 別リポジトリのissueを参照したいとき
Carbonの`toolchain/*/testdata`の差分をコード変更と結び付け、入力・診断・出力の変更を漏れなく分類した報告にまとめる手順を示します。
Instructions for summarizing changes to Carbon testdata files (`toolchain/*/testdata`).
実行スコア 未検証
インストール方法を見るCarbonのtoolchain/*/testdataにある差分を調べ、コード変更と関連付けて報告する手順を示します。Git、Jujutsu、GitHubのプルリクエストから差分を特定し、付属のPythonスクリプトで入力、標準エラー、標準出力の追加・削除を分類できます。変更の共通点に沿ってグループを作り、テスト入力や診断出力に変更があれば、該当ファイルをすべて挙げて内容を記載します。CHECK行を含む全ての変更が少なくとも一つのグループに含まれているか、最後に差分と照らして確認します。
コンパイラの変更に伴ってテストデータが多数更新され、変更内容をレビュー担当者に説明したいときに向いています。入力の変更と期待出力だけの変更を分け、関連するファイルをまとめて報告できます。差分が大きい場合も、ヘルパースクリプトで追加・削除箇所を整理してから記述できます。
対象はCarbonのtoolchain/*/testdataです。差分の取得にはGit、Jujutsu、またはGitHub CLIを使う手順が示されています。付属のPythonスクリプトは統合形式の差分を標準入力から読み取ります。このスキルは差分の報告向けであり、変更が正しいかどうかのレビューは別のスキルの対象です。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
This skill provides instructions for creating a comprehensive report summarizing
changes to Carbon testdata files (toolchain/*/testdata) and associating them
with related code changes.
This skill is about reporting a diff. For deciding whether the diff is correct in the first place, see the Review testdata changes skill.
Produce a report that:
Use your VCS (Git or Jujutsu) or query Github to identify changes. For large changes, it is recommended to use the included helper script to extract test input changes.
git diff --stat -- ':!toolchain/*/testdata/*'
git diff -- ':!toolchain/*/testdata/*'git diff --name-only 'toolchain/*/testdata/*'jj --no-pager diff --stat '~toolchain/*/testdata'
'~toolchain/*/testdata' is critical if it
contains wildcards.--git to get standard
unified diff format: jj --no-pager diff --git '~toolchain/*/testdata'jj --no-pager diff --name-only 'toolchain/*/testdata'gh pr diffgh pr diff --name-only | grep '^toolchain/.*/testdata'If you are summarizing changes in a specific revision (for example, @-) or
pull request (for example, #1234), add -r <rev> or <pr_number> to the
commands:
git diff <rev>^ <rev> ... (or use git show <rev>)jj --no-pager diff -r <rev> ...gh pr diff <pr_number>To easily identify changes, use the included Python helper script to extract all text additions and removals from the diff, categorized by Input, STDERR, and STDOUT changes. This script reads a unified diff from stdin.
# For Git:
git diff -- 'toolchain/*/testdata/*' | python3 .agents/skills/summarize_testdata_changes/scripts/parse_diff.py
# For Jujutsu (jj):
jj diff --git 'toolchain/*/testdata' | python3 .agents/skills/summarize_testdata_changes/scripts/parse_diff.py
# For a specific revision with jj:
jj diff -r @- --git 'toolchain/*/testdata' | python3 .agents/skills/summarize_testdata_changes/scripts/parse_diff.py
# For a specific PR with Github:
gh pr diff 1234 | python3 .agents/skills/summarize_testdata_changes/scripts/parse_diff.py
CHECK lines.
// CHECK), along with diagnostic output changes where relevant// CHECK:STDERR) with no corresponding changes to test inputs// CHECK:STDOUT)
CHECK
lines.// CHECK)
or diagnostic output (lines prefixed with // CHECK:STDERR):
// CHECK:STDOUT):
As a final validation step:
Use the following template for the generated report:
# `testdata` Change Summary
## Code Changes
[One paragraph summarizing changes outside of testdata.]
## Test Changes
### [Group Name]
[Description of the group.]
[Change 1: diff context OR link]
[Change 2: diff context OR link]
...
## Diagnostic Changes
### [Group Name]
[Description of the group.]
[Change 1: diff context OR link]
[Change 2: diff context OR link]
...
## [Output Type] Changes
### [File Path]
[Description of the group.]
[Example diff context]
Changes of this kind were found in [Number] files. Examples: [List of files]
...
Skip sections that would be empty.
まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
コマンドラインからGitHub issueの本文やコメントを読み取り専用で確認し、URLや番号から対象リポジトリを指定する手順を案内します。
AIアシスタントがCarbonのコードベースを扱う際に、専用ツールでファイルを閲覧・検索・編集し、一時ファイルを管理するためのルールを示します。
Bazeliskを使ったCarbonプロジェクトのビルド、テスト、実行、デバッグの基本手順を確認し、対象を絞った検証やASanの利用方法も把握できます。
Carbonコンパイラに組み込み関数を追加する際の登録、型シグネチャ検証、定数評価、LLVMコード生成、テスト方法を案内します。
Carbonツールチェーンのコードを書く際に、言語ごとの整形方法やコメント、命名、ドキュメント、コミットメッセージの基準を確認できます。
Carbonコンパイラのエラーや警告を定義し、書式やソース位置のラベルを整え、テストで網羅性を確かめる方法を案内します。