Skip to content

fix: improve pr-create and pr-status reliability, consolidate pr-merge#13

Merged
tombakerjr merged 3 commits into
mainfrom
claude/fix-plugin-commands-s7Uo0
Feb 17, 2026
Merged

fix: improve pr-create and pr-status reliability, consolidate pr-merge#13
tombakerjr merged 3 commits into
mainfrom
claude/fix-plugin-commands-s7Uo0

Conversation

@tombakerjr
Copy link
Copy Markdown
Owner

pr-create: Add existing-PR check using gh pr list (exits 0 when no PR
exists) instead of gh pr view (exits non-zero). Make confirmation step
resilient with the same approach.

pr-status: Rewrite from snapshot-only to full readiness checker — watches
CI to completion, polls for review bot comment with timestamp validation
against the current CI run, scans for blocker keywords, and reports a
clear READY/NOT READY verdict.

pr-merge: Remove duplicated CI watching, comment polling, and blocker
scanning (Steps 3-6). Delegate readiness checking to /pr-status, keeping
only merge-specific logic: local verification, review feedback assessment,
fix loop, merge execution, and return to main.

Fixes #12

https://claude.ai/code/session_01Ch89tRMukrCMshPhYskRnC

pr-create: Add existing-PR check using `gh pr list` (exits 0 when no PR
exists) instead of `gh pr view` (exits non-zero). Make confirmation step
resilient with the same approach.

pr-status: Rewrite from snapshot-only to full readiness checker — watches
CI to completion, polls for review bot comment with timestamp validation
against the current CI run, scans for blocker keywords, and reports a
clear READY/NOT READY verdict.

pr-merge: Remove duplicated CI watching, comment polling, and blocker
scanning (Steps 3-6). Delegate readiness checking to /pr-status, keeping
only merge-specific logic: local verification, review feedback assessment,
fix loop, merge execution, and return to main.

Fixes #12

https://claude.ai/code/session_01Ch89tRMukrCMshPhYskRnC
…status

- Delete pr-create.md: redundant with Claude Code's built-in PR creation
  and GitHub PR templates
- Delete pr-merge.md: merge is a single gh command once status says ready
- Rewrite pr-status.md as the single readiness checker: watches CI to
  completion, polls for the review comment with timestamp validation
  against the current CI run, scans for blockers, and reports a clear
  READY TO MERGE / CHANGES NEEDED verdict
- Update agent-team-development and subagent-driven-development skills
  to use /pr-status in a fix loop (check → fix → push → re-check)
  instead of invoking /pr-merge. Agent decides when to run
  staff-code-reviewer on fixes.
- Update context-recovery.md, git-guard.py, and CLAUDE.md to remove
  all references to deleted commands

Fixes #12

https://claude.ai/code/session_01Ch89tRMukrCMshPhYskRnC
…t into plan-execution

The two execution skills shared ~70% of their content (task classification,
fix loop severity, escalation rules, phase review logic, the final PR flow).
Merge into a single `plan-execution` skill that auto-selects mode:

- **Team mode** (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS set): worktrees,
  spawned teammates, shared task list, mailbox communication
- **Subagent mode** (default): parallel dispatch via `run_in_background`,
  each subagent gets only what you pass it (lightweight context), independent
  `model` param per task

Key corrections from the previous separate skills:
- Subagents CAN run in parallel via `run_in_background` (not sequential)
- Subagents are more efficient for well-scoped tasks (no context inheritance)
- Team mode teammates inherit lead's model (noted as tradeoff)

Also updates all references across CLAUDE.md, README.md, writing-plans,
using-git-worktrees, systematic-debugging, implementer agent, and
workflow-preferences hook. Removes /pr-create and /pr-merge references
from README that were missed in previous commit.

716 lines (two files) → 502 lines (one file), -315 net across repo.

https://claude.ai/code/session_01Ch89tRMukrCMshPhYskRnC
@claude
Copy link
Copy Markdown

claude Bot commented Feb 11, 2026

Claude finished @tombakerjr's task in 2m 3s —— View job


Code Review Complete

LGTM - no blocking issues

Reviewed the PR consolidation and pr-status rewrite. The changes improve maintainability while preserving functionality. All shell scripts are cross-platform compatible and defensively coded.

Summary of Changes

  1. pr-status rewrite - Upgraded from snapshot-only check to full readiness checker with CI watching, review comment polling, and timestamp validation
  2. plan-execution consolidation - Merged agent-team-development + subagent-driven-development into unified skill with auto-mode-selection (net -200 lines)
  3. Deleted pr-create and pr-merge - Functionality consolidated elsewhere

CONSIDER (Non-blocking design tradeoffs)

  1. commands/pr-status.md:60 - Review bot detection pattern claude\|code-review\|github-actions is hardcoded. If review bot username changes, polling will break. Current pattern is broad enough to catch common CI bots.

  2. commands/pr-status.md:47 - Max retries hardcoded to 12 (60s total wait). Given CLAUDE.md states "review bot posts 10-12 seconds after CI," this is 5-6x buffer, which is reasonable.

  3. commands/pr-status.md:62-64 - Date parsing uses Linux date -d with macOS date -j -f fallback. Code defensively checks for empty epochs before comparison, so edge cases are handled.

Code Quality Checks

  • ✅ Shellcheck passes on extracted shell scripts
  • ✅ Cross-platform date handling (Linux/macOS)
  • ✅ Defensive null checks throughout
  • ✅ Python git-guard.py has safe regex patterns
  • ✅ Documentation (CLAUDE.md, README.md) accurately reflects new structure
  • ✅ No references to deleted commands found in codebase

@tombakerjr tombakerjr merged commit 29ac5cd into main Feb 17, 2026
2 checks passed
@tombakerjr tombakerjr deleted the claude/fix-plugin-commands-s7Uo0 branch February 17, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix pr-create and pr-status command reliability

2 participants