-
Notifications
You must be signed in to change notification settings - Fork 2
feat(review): add review:explain-change with a digest policy and an interactive view #6018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
48d7b08
feat(review): add review:explain-change with a digest policy and an i…
kyle-sexton 27d36b8
fix(review): close explain-change's output-path and self-config holes
kyle-sexton 48d3c19
fix(review): treat case-variant overlays as tracked in explain-change
kyle-sexton 24eedc6
Merge origin/main into feat/1217-review-explain-change
kyle-sexton cfaaaba
fix(review): add stub evals and avoid a typos hit in the explain-chan…
kyle-sexton 0047e1c
Merge origin/main into feat/1217-review-explain-change
kyle-sexton b10026d
Merge origin/main into feat/1217-review-explain-change
kyle-sexton 91f51b9
fix(review): read explain-change team config at the base commit and g…
kyle-sexton 5a2ae65
merge main
cursoragent 509abc8
fix(review): refuse an explain-change overlay inside a .claude submodule
kyle-sexton 65a9855
Merge branch 'feat/1217-review-explain-change' of ssh://github.com/me…
kyle-sexton c221d9e
Merge origin/main into feat/1217-review-explain-change
kyle-sexton 0dc4e08
Merge origin/main into feat/1217-review-explain-change
kyle-sexton 62337da
docs(review): name the submodule guard in the digest overlay paragraph
kyle-sexton be6fc89
Merge origin/main into feat/1217-review-explain-change
kyle-sexton feb2d03
Merge remote-tracking branch 'origin/main' into feat/1217-review-expl…
kyle-sexton 7003422
Merge remote-tracking branch 'origin/main' into feat/1217-review-expl…
kyle-sexton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| # Review Digest Convention | ||
|
|
||
| When `/review:explain-change` builds or offers a change digest for a pull request. This file is | ||
| the owner doc for the `review-digest` cascade concern and this repository's team layer for it: the | ||
| config block below is what the skill reads here. | ||
|
|
||
| ## The policy | ||
|
|
||
| `digest_policy` takes one of three values: | ||
|
|
||
| - `off`: the digest is never offered or built unasked. | ||
| - `offer` (the default): the skill offers the digest when any trigger below fires, and stays | ||
| quiet when none does. | ||
| - `always`: the skill builds the digest when the pull request is marked ready. At any other | ||
| point it behaves as `offer`. | ||
|
|
||
| A reader who invokes the skill directly has asked for the digest. That request is the explicit | ||
| argument tier, so the skill builds it whatever the policy says. | ||
|
|
||
| Whatever the policy, the digest never posts to the pull request, never comments on it, and never | ||
| sets a check status. It does not gate merge. | ||
|
|
||
| ## The triggers | ||
|
|
||
| Under `offer`, any one of these fires the offer: | ||
|
|
||
| | Trigger | Fires when | Key | | ||
| |---|---|---| | ||
| | files | the pull request changes more than `max_files` files | `max_files` | | ||
| | changed-lines | additions plus deletions exceed `max_changed_lines` | `max_changed_lines` | | ||
| | blast-radius | the assessed blast radius is one of `blast_radius` | `blast_radius` | | ||
| | risk-path | a changed path matches one of the `risk_paths` globs | `risk_paths` | | ||
| | label | the pull request carries the `opt_in_label` label | `opt_in_label` | | ||
|
|
||
| `risk_paths` globs use `**` for any number of directories and `*` or `?` within one path | ||
| segment. A change to any file this convention or the rendered-views `medium` key reads fires | ||
| risk-path whatever `risk_paths` holds. An empty `opt_in_label` turns the label trigger off. The blast radius comes from the | ||
| plan or a `/review:quality-gate downstream` pass, as LOW, MEDIUM, HIGH, or CRITICAL. | ||
|
|
||
| ## The keys and their layers | ||
|
|
||
| The surface is JSON. Layers resolve per the | ||
| [config-cascade convention](config-cascade/README.md), per-key override, a later layer replacing | ||
| an earlier one key by key: | ||
|
|
||
| 1. user-global `~/.claude/review-digest.json` | ||
| 2. team: the `json config` block in `docs/conventions/review-digest.md`, else | ||
| `.claude/review-digest.json` | ||
| 3. overlay `.claude/review-digest.local.json` | ||
|
|
||
| The team layer, and the rendered-views team file, are read from the pull request's base commit | ||
| (`baseRefOid`), never the working tree, so a checked-out pull request cannot configure its own | ||
| digest. When that commit is not in the clone, the team layer is skipped with a warning. The | ||
| overlay applies only when untracked, in any letter case, and is refused when `.claude` or the | ||
| overlay is a symlink, or when `.claude` is itself a tracked entry (a submodule or a tracked file) or | ||
| holds a `.git`; one that is not gitignored is reported and still applied. | ||
|
|
||
| An explicit `--policy` argument beats every layer. An unknown key is inert, and an invalid value | ||
| is reported and ignored. Lists replace whole. No key is policy-floor: each one only decides when a | ||
| reader is offered a view. | ||
|
|
||
| Where a built page goes is the `medium` key of the | ||
| [rendered-views concern](rendered-views/README.md#the-rendered-views-cascade-concern), not a key | ||
| here. The skill's shipped default is `file`. | ||
|
|
||
| The block below holds the shipped defaults, so this repository runs on them. A test holds it equal | ||
| to the skill's own defaults. | ||
|
|
||
| ```json config | ||
| { | ||
| "digest_policy": "offer", | ||
| "max_files": 5, | ||
| "max_changed_lines": 200, | ||
| "blast_radius": ["HIGH", "CRITICAL"], | ||
| "risk_paths": [".github/workflows/**", "**/hooks/**", "**/migrations/**"], | ||
| "opt_in_label": "explain-change" | ||
| } | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.