Repository navigation
feat(ops): PR Hedge Trim skill — automated CodeRabbit thread resolution #941
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 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9c478d4
docs: refresh CODEX_CLAUDE_PARITY_GAPS coverage report to 2026-03-13
hunnibear 7fb5e85
feat(submodules): add PMOVES-a0-plugins plugin index + Agent Zero TAC…
hunnibear 3c5904e
docs(submodule): update Agent Zero with integration guide and quickstart
hunnibear 53b94e8
feat(submodules): add PMOVES.Notes plugin to a0-plugins index
hunnibear 63977b8
refactor(tac): simplify NATS regex pattern and update description
hunnibear 7fa03d1
fix(ui): apply PR review fixes to main
hunnibear d8b79c0
merge: resolve conflicts in TAC tree and boot-jwt route
hunnibear 1dd80c9
Merge branch 'main' of https://github.com/POWERFULMOVES/PMOVES.AI
hunnibear 1883dbd
Merge branch 'main' of https://github.com/POWERFULMOVES/PMOVES.AI
hunnibear 9179e2e
feat(ops): add PR Hedge Trim skill — classify, fix, and resolve revie…
hunnibear 5de064b
fix(ops): address CodeRabbit review — schema alignment, error handlin…
hunnibear 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| # PR Hedge Trim | ||
|
|
||
| Classify, fix, and resolve CodeRabbit review threads on open PRs. | ||
|
|
||
| ## Arguments | ||
|
|
||
| - `$ARGUMENTS` - PR number(s) or flags: `--batch 935,936`, `--dry-run`, `--no-trail` | ||
|
|
||
| ## Instructions | ||
|
|
||
| Parse `$ARGUMENTS` and execute the hedge trim cycle. | ||
|
|
||
| ### Single PR (default) | ||
|
|
||
| Trim a single PR: analyze threads, apply fixes interactively, resolve addressed threads. | ||
|
|
||
| 1. Run `make -C pmoves pr-trim-analyze PR=<number>` | ||
| 2. Read the generated classification at `pmoves/docs/logs/pr_trim_<N>_threads.json` | ||
| 3. Display the classification table to the user | ||
| 4. For each **actionable** thread: | ||
| - Read the file and line referenced | ||
| - Apply the fix | ||
| - Explain the change to the user | ||
| 5. After all actionable threads are addressed, commit + push | ||
| 6. Run `make -C pmoves pr-trim-resolve PR=<number> RESOLVE_ACTIONABLE=1` | ||
| 7. Unless `--no-trail`: `make -C pmoves sign-trail SUMMARY="PR Hedge Trim: resolved K threads on PR #N"` | ||
|
|
||
| ### Batch mode (`--batch`) | ||
|
|
||
| Trim multiple PRs in sequence. | ||
|
|
||
| 1. Parse comma-separated PR numbers from `--batch` | ||
| 2. Execute single-PR flow for each, in order | ||
| 3. After all PRs trimmed, display summary table | ||
|
|
||
| ### Dry-run mode (`--dry-run`) | ||
|
|
||
| Analyze only — classify threads but do not resolve or fix. | ||
|
|
||
| 1. Run `make -C pmoves pr-trim-analyze PR=<number>` | ||
| 2. Display classification table | ||
| 3. Do not resolve threads, do not sign trail | ||
|
|
||
| ### Report mode (`--report`) | ||
|
|
||
| Generate a detailed markdown report for a PR. | ||
|
|
||
| 1. Run `make -C pmoves pr-trim-report PR=<number>` | ||
| 2. Display: `pmoves/docs/logs/pr_trim_<N>_summary.md` | ||
|
|
||
| ## Examples | ||
|
|
||
| ```bash | ||
| # Trim a single PR | ||
| /pr-trim 934 | ||
|
|
||
| # Batch trim multiple PRs | ||
| /pr-trim --batch 935,936,937 | ||
|
|
||
| # Dry-run analysis only | ||
| /pr-trim 934 --dry-run | ||
|
|
||
| # Skip Graphiti trail signing | ||
| /pr-trim 934 --no-trail | ||
|
|
||
| # Generate detailed report | ||
| /pr-trim 934 --report | ||
| ``` | ||
|
|
||
| ## Related | ||
|
|
||
| - `/pr-monitor` — Monitor PR merge readiness (read-only) | ||
| - `/chit:floos validate pr-monitor-graphiti-chit` — Validate the FlOO$ pipeline DAG | ||
| - `make -C pmoves pr-trim PR=<number>` — CLI equivalent of full cycle |
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
60 changes: 60 additions & 0 deletions
60
pmoves/contracts/schemas/ops/pr.trim.completed.v1.schema.json
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,60 @@ | ||
| { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "$id": "ops/pr.trim.completed.v1.schema.json", | ||
| "title": "PR Hedge Trim Completed", | ||
| "description": "Emitted when a PR hedge trim cycle completes — review threads classified, fixed, and resolved.", | ||
| "type": "object", | ||
| "required": ["pr_number", "repo", "agent_id", "total_threads", "resolved", "timestamp"], | ||
| "properties": { | ||
| "pr_number": { | ||
| "type": "integer", | ||
| "description": "GitHub PR number" | ||
| }, | ||
| "repo": { | ||
| "type": "string", | ||
| "description": "GitHub repository in owner/name format" | ||
| }, | ||
| "agent_id": { | ||
| "type": "string", | ||
| "description": "Agent that performed the trim" | ||
| }, | ||
| "total_threads": { | ||
| "type": "integer", | ||
| "description": "Total review threads on the PR" | ||
| }, | ||
| "actionable": { | ||
| "type": "integer", | ||
| "description": "Threads classified as actionable (fix-worthy)" | ||
| }, | ||
| "design_decision": { | ||
| "type": "integer", | ||
| "description": "Threads classified as design decisions" | ||
| }, | ||
| "false_positive": { | ||
| "type": "integer", | ||
| "description": "Threads classified as false positives" | ||
| }, | ||
| "nitpick": { | ||
| "type": "integer", | ||
| "description": "Threads classified as nitpick/cosmetic" | ||
| }, | ||
| "resolved": { | ||
| "type": "integer", | ||
| "description": "Number of threads resolved in this trim" | ||
| }, | ||
| "commit_sha": { | ||
| "type": "string", | ||
| "description": "HEAD commit SHA after fixes" | ||
| }, | ||
| "timestamp": { | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "description": "ISO 8601 completion timestamp" | ||
| }, | ||
| "trail_signed": { | ||
| "type": "boolean", | ||
| "description": "Whether a Graphiti trail entry was signed" | ||
| } | ||
|
POWERFULMOVES marked this conversation as resolved.
Resolved
|
||
| }, | ||
| "additionalProperties": false | ||
|
POWERFULMOVES marked this conversation as resolved.
Resolved
|
||
| } | ||
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
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.