$npx -y skills add PolicyEngine/policyengine-claude --skill fix-prUse when the user invokes $fix-pr or asks Codex or Claude Code to apply fixes to a PolicyEngine PR based on $review-program findings, GitHub review comments, CI failures, or local review reports.
| 1 | # fix-pr |
| 2 | |
| 3 | Thin launcher. The canonical workflow — phases, roles, consent gates, verification |
| 4 | gates, artifact contracts — lives in [references/workflow.md](references/workflow.md). |
| 5 | Read it completely before acting and follow it exactly; this file only adapts it to this |
| 6 | surface. Do not redefine flags, phases, ownership, or gates here. |
| 7 | |
| 8 | Treat the text after `$fix-pr` as the raw workflow arguments: |
| 9 | |
| 10 | ```text |
| 11 | $fix-pr [PR_NUMBER_OR_SEARCH] [--local] [--resume] [--full-validation] |
| 12 | ``` |
| 13 | |
| 14 | Hard rules restated from the canonical workflow (they cannot be skipped on any surface): |
| 15 | |
| 16 | - Determine the PR first, then ask about push/post mode unless `--local` is set. |
| 17 | - No edit before the user-approved fix plan file exists; fix only what it lists. |
| 18 | - Never push while a verification gate is red. |
| 19 | - Never read full review reports into the main context; use the short handoff files. |
| 20 | |
| 21 | Surface adapters: |
| 22 | |
| 23 | - **Claude Code**: also read |
| 24 | [references/claude-launcher.md](references/claude-launcher.md) — it maps canonical |
| 25 | roles to this plugin's agent types and the workflow's abstract operations to Claude |
| 26 | Code mechanics. |
| 27 | - **Codex**: use the delegation mapping below. |
| 28 | |
| 29 | Delegation mapping (when subagent use is available and authorized): |
| 30 | |
| 31 | - Map every role in the canonical Roles table to a `worker` when it edits files or |
| 32 | writes reports, or an `explorer` for read-only codebase questions. |
| 33 | - Pass concrete `RUN_ROOT`, `WORKTREE_ID`, and `PREFIX` values and the role's task spec |
| 34 | from the canonical workflow to every subagent; name the role's skills explicitly in |
| 35 | the subagent prompt. |
| 36 | - Respect the canonical ownership table — no worker edits outside its assigned files; |
| 37 | only the fix-pusher role commits or pushes. |
| 38 | - If subagents are unavailable or not authorized, execute the roles directly in phase |
| 39 | order, preserving the same handoff files and gates. |