Context
Repository: !git remote get-url origin 2>/dev/null | sed -E 's#(git@github.com:|https://github.com/)([^.]+)(\.git)?#https://github.com/\2#' || echo "No repository"
Branch: !git branch --show-current 2>/dev/null || echo "No branch"
Execution steps
- Treat
$ARGUMENTS as optional audience, base branch, or focus area. Examples: for product, against main, focus auth flow.
- Confirm the current directory is inside a git repository. If not, stop and report that this command needs a git repo.
- Determine the comparison base from
$ARGUMENTS, the upstream branch, the default branch from gh repo view, then main or master.
- Inspect commits and diffs with read-only git commands only. Do not edit files, checkout branches, stash, rebase, merge, or write output files unless explicitly asked.
- Read the files needed to understand behavior, especially entry points, tests, docs, and user-facing flows touched by the diff.
- Explain the changes as a walkthrough from the user's perspective. Organize by flows, states, and risks, not by file inventory.
- Call out what appears unchanged when that helps the user trust the diff.
- Include risks, edge cases, and suggested validation steps. Keep recommendations practical and scoped to the current branch.
- Include safety notes for missing
gh auth, missing upstream or base branch, no git repo, and empty diffs.
Output format
Branch Walkthrough
- Branch: [current branch]
- Base: [base branch]
- Audience: [resolved audience]
What Users Experience
[Short narrative summary]
Flows Changed
- [Flow name]: [what changed, expected behavior, visible impact]
Risks And Edge Cases
- [Risk]: [why it matters and how to check it]
Suggested Validation
- [Manual or automated checks a reviewer should run]
Notes
[Missing auth, missing base, no repo, empty diff, or assumptions]
1---2name: walkthrough3description: Explain current branch changes from a user perspective4---56## Context78Repository: !`git remote get-url origin 2>/dev/null | sed -E 's#(git@github.com:|https://github.com/)([^.]+)(\.git)?#https://github.com/\2#' || echo "No repository"`9Branch: !`git branch --show-current 2>/dev/null || echo "No branch"`1011## Execution steps12131. Treat `$ARGUMENTS` as optional audience, base branch, or focus area. Examples: `for product`, `against main`, `focus auth flow`.142. Confirm the current directory is inside a git repository. If not, stop and report that this command needs a git repo.153. Determine the comparison base from `$ARGUMENTS`, the upstream branch, the default branch from `gh repo view`, then `main` or `master`.164. Inspect commits and diffs with read-only git commands only. Do not edit files, checkout branches, stash, rebase, merge, or write output files unless explicitly asked.175. Read the files needed to understand behavior, especially entry points, tests, docs, and user-facing flows touched by the diff.186. Explain the changes as a walkthrough from the user's perspective. Organize by flows, states, and risks, not by file inventory.197. Call out what appears unchanged when that helps the user trust the diff.208. Include risks, edge cases, and suggested validation steps. Keep recommendations practical and scoped to the current branch.219. Include safety notes for missing `gh` auth, missing upstream or base branch, no git repo, and empty diffs.2223## Output format2425# Branch Walkthrough2627- Branch: [current branch]28- Base: [base branch]29- Audience: [resolved audience]3031## What Users Experience3233[Short narrative summary]3435## Flows Changed3637- [Flow name]: [what changed, expected behavior, visible impact]3839## Risks And Edge Cases4041- [Risk]: [why it matters and how to check it]4243## Suggested Validation4445- [Manual or automated checks a reviewer should run]4647## Notes4849[Missing auth, missing base, no repo, empty diff, or assumptions]