.agents/skills/summarize_testdata_changes/SKILL.md
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.