Read entropy-report.md, fix pr_worthy violations, and open targeted PRs. One PR per concern. Requires entropy-scan to have run first.
From entropy-patrolnpx claudepluginhub app-vitals/marketplace --plugin entropy-patrolThis skill uses the workspace's default tool permissions.
Read the latest entropy-report.md and open focused, human-reviewable PRs for pr_worthy violations. Each PR fixes one rule — no bundled concerns, max 3 files changed per PR.
Prerequisites: Run /entropy-scan first to produce entropy-report.md.
Before starting, check for flags:
--dry-run — print what PRs would be opened without creating branches, making changes, or creating PRs--rule {id} — fix only violations of a specific rule ID (e.g., --rule dead_exports)entropy-report.md in the project root.No entropy-report.md found. Run /entropy-scan first to generate a report.
Then stop.Load the same golden principles config that the scan used:
.claude/entropy-patrol/golden-principles.yaml in the project root. If it exists, load it.skills/entropy-scan/golden-principles.yaml.rule_id → rule for quick lookup (needed for pr_worthy status and PR body generation).## Findings section. Collect all unchecked (- [ ]) findings.pr_worthy: true in the golden principles config.--rule flag was passed, further filter to only that rule's findings. If no findings match that rule ID, print: "No unchecked findings for rule {rule_id}. Nothing to fix." and stop.rule_id. One PR will be opened per group.pr_worthy unchecked findings exist, print:
No pr_worthy findings to fix. All violations are either:
- Already checked off (fixed)
- In categories marked pr_worthy: false (fix manually)
Run /entropy-scan to refresh the report.
Then stop.If --dry-run was passed, print a preview and stop:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ENTROPY FIX — DRY RUN
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Would open {N} PRs:
1. fix/entropy-{rule-id}-{short-description}
Rule: {rule.description} ({severity})
Findings: {count} instances
Files affected: {list of unique file paths}
2. ...
No branches created. No files changed. No PRs opened.
Re-run without --dry-run to execute.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Stop after printing.
If there are more than 10 rule groups to fix, note:
Found {N} rules with pr_worthy findings. Capping at 10 PRs per run.
Fixing highest-severity rules first. Re-run after merging to continue.
Process only the first 10 groups (sorted by severity).
For each group (one rule at a time, sequentially — never parallel):
If the rule severity is high AND any finding involves deleting code (not just adding tests, moving functions, or renaming — specifically removing existing logic), print:
⚠️ HIGH-SEVERITY DESTRUCTIVE FIX
Rule: {rule.id} — {rule.description}
Findings:
- {file}:{line} — {description}
...
This fix involves removing existing code. Confirm to proceed? (yes/no)
Wait for confirmation. If the answer is not yes, skip this group and note it in the final summary.
Check if branch fix/entropy-{rule-id}-{short-description} already exists (locally or remotely):
fix/entropy-{rule-id}-... already exists — skipping. Merge or delete it first."git checkout main && git checkout -b fix/entropy-{rule-id}-{short-description}detection_hint remediation guidancefix(entropy): resolve {rule.id} — {finding_count} instance(s)Run:
gh pr create \
--title "fix(entropy): {rule.description} ({finding_count} instance(s))" \
--body "..." \
--base main
PR body format:
## Entropy Fix: {rule.description}
**Golden Principle:** `{rule.id}` ({rule.severity})
**Findings fixed:** {count}
### What was changed
{bullet list: `file_path:line` — one-line description of change}
### Why this matters
{rule.description — explain the principle being enforced and why drift here costs the team}
### Review notes
{Any caveats: "N instances auto-fixed; M flagged as needs-human-review and left as comments"}
{If blast radius cap applied: "N additional findings deferred — re-run /entropy-fix after merge"}
---
_Generated by [entropy-patrol](https://github.com/app-vitals/marketplace/tree/main/plugins/entropy-patrol). Review carefully before merging._
After the PR is opened successfully, go back to the base branch and update entropy-report.md:
- [ ] to - [x] for each finding that was addressed in this PR_(fixed in PR #{pr_number})_Record the result for the final summary (success, skip, or failure with reason).
After processing all groups, run git checkout {original-branch} to return to where you started.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ENTROPY FIX COMPLETE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
OPENED {N} PRs
SKIPPED {N} groups (branch exists or no-confirm)
FAILED {N} PRs (see below)
PRs opened:
#{pr_number} — {rule.id}: {title}
...
{If any failures:}
Failures (fix manually):
{rule.id} — {reason}
{If any deferred findings:}
Deferred findings (run /entropy-fix again after merging open PRs):
{rule.id} — {N} remaining findings
entropy-report.md updated with fixed findings checked off.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
gh pr create fails: Log the failure, continue to the next group. Do not abort the run.entropy-report.md. Do not re-scan during a fix run.