원클릭으로
summarize-testdata-changes
// Instructions for summarizing changes to Carbon testdata files (`toolchain/*/testdata`).
// Instructions for summarizing changes to Carbon testdata files (`toolchain/*/testdata`).
Instructions for using Bazel or Bazelisk to build, test, and debug in the Carbon repository.
Instructions for using the `gh` command to query and inspect GitHub state safely.
Instructions for safely viewing and accessing GitHub issues by way of command line.
Instructions for checking, building, debugging, and understanding the Carbon toolchain.
Instructions for authoring, structuring, and running toolchain tests using the file_test infrastructure.
Instructions for code formatting and style guidelines in the Carbon toolchain.
| name | Summarize testdata changes |
| description | Instructions for summarizing changes to Carbon testdata files (`toolchain/*/testdata`). |
This skill provides instructions for creating a comprehensive report summarizing
changes to Carbon testdata files (toolchain/*/testdata) and associating them
with related code changes.
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.