Repository navigation
Description
Description
Add a new pr_solve skill that takes a PR number, diagnoses all failures (CI failures, review feedback, merge conflicts), creates a structured fix plan via design_plan, then executes the fixes.
This fills the gap between the existing atomic skills (ci_check, ci_fix, code_review) and the fully autonomous worktree_solve-and-pr. Today, fixing a failing PR requires the user to manually orchestrate: check CI, read review comments, diagnose each failure, then fix. pr_solve composes existing skills into a single interactive workflow with a planning checkpoint before any code changes.
Problem Statement
When a PR has failures (CI red, reviewer requested changes, merge conflicts), the user must manually invoke multiple skills in sequence (ci_check → ci_fix, read review comments, etc.) and decide the order of fixes. There is no single entry point that gathers all PR problems, produces a consolidated fix plan, and executes it.
Proposed Solution
A pr_solve skill with this workflow:
- Gather all PR problems — Compose
ci_check(CI status),gh pr view(review comments, requested changes), and merge state into a single diagnostic report. - Present diagnosis — Show the user a structured summary of all issues found.
- Plan fixes — Use
design_planconventions to break the diagnosis into ordered fix tasks, presented for user approval. - Execute fixes — Apply fixes following TDD discipline (
code_tdd), commit after each task. - Verify — Run
ci_checkafter pushing to confirm fixes landed.
The skill reuses existing skills by reference (SSoT) rather than duplicating their logic.
Alternatives Considered
- Keep using individual skills manually — Works but requires the user to orchestrate the sequence. Error-prone when multiple failures interact.
- Extend
ci_fixto also handle review feedback — Violates single responsibility; CI failures and review feedback are different concerns that happen to co-occur on PRs.
Impact
- Benefits any developer working with PRs that have multiple failure types.
- Backward compatible — new skill, no changes to existing skills.
Acceptance Criteria
-
pr_solveskill file at.cursor/skills/pr_solve/SKILL.md - Skill composes
ci_check, review comment fetching, and merge state detection into a single diagnostic step - Diagnosis is presented to the user before any fixes are attempted
- Fix plan follows
design_planconventions (ordered tasks, files, verification) - User must approve the plan before execution begins
- Skill is registered in
CLAUDE.mdcommand table - Workspace copy via
scripts/sync_manifest.py(not manual) - TDD compliance (see
.cursor/rules/tdd.mdc)
Changelog Category
Added
Activity
gerchowl commentedon Feb 21, 2026
Implementation Plan
Issue: #133
Branch:
feature/133-pr-solve-skillTasks
pr:solveskill file with full workflow (identify PR, gather problems, present diagnosis, plan fixes, execute, verify) —.cursor/skills/pr:solve/SKILL.md— verify:test -f .cursor/skills/pr:solve/SKILL.md && head -5 .cursor/skills/pr:solve/SKILL.md/pr:solveinCLAUDE.mdcommand table in alphabetical order —CLAUDE.md— verify:grep 'pr:solve' CLAUDE.mdassets/workspace/—just sync-workspace— verify:test -f assets/workspace/.cursor/skills/pr:solve/SKILL.md## Unreleased/### Added—CHANGELOG.md— verify:grep 'pr.solve' CHANGELOG.mdSkill Design (Task 1 detail)
Frontmatter:
name: pr:solve,description,disable-model-invocation: trueWorkflow (6 steps):
gh pr viewfor metadata; derive issue number from PR body (Closes #N/Refs: #N).gh pr checks+gh run view --log-failed(composes ci:check pattern)gh apifor reviews and inline comments — only unresolved threadsgh pr view --json mergeable,mergeStateStatus— report but never auto-rebaseKey guardrails: no fixes without diagnosis first; no guessing; no auto-rebase; no stacking fixes; max loop count; delegation section for data-gathering.
feat(agent): add pr_solve skill for diagnosing and fixing PR failures
test: add failing BATS tests for skill directory naming convention
feat(agent): add pre-commit hook to enforce skill directory naming co…
test: add canary test injecting bad skill name into real repo
docs: add canary test category to TDD scenario checklist
docs: add idempotency and concurrency to TDD scenario checklist
docs: update CHANGELOG with pre-commit hook and TDD checklist additions
docs: regenerate SKILL_PIPELINE.md with pr_solve entry
docs: add pr_solve to skill pipeline diagram
feat(agent): add pr_solve skill and skill naming enforcement (#142)
chore: release 0.3.0 (#270)