/pr-workflow:plan-pipeline-execute [plan-name]from pr-workflow
Executes a validated plan in an isolated git worktree: TDD scaffolding, layer-based parallel agents, quality gate with smoke test, PR creation, and merge after user approval.
Ships in pr-workflow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Execute the validated plan in an isolated worktree. Spawn per-task agents, verify quality, create the PR, and merge it only after the user approves.
Run /clear before this command.
A validated plan must exist at docs/plans/plan-{name}.md with all issues resolved (output of /plan-pipeline-validate).
Create an isolated git worktree:
git worktree add .worktrees/{plan-name} -b feature/{plan-name}
All execution happens inside the worktree. Main branch remains clean throughout.
Only for tasks marked as TDD in the plan.
For each TDD task, before any implementation:
Do not write implementation code in this step.
Parse the task list from the plan. Group tasks by layer (Layer 1 = foundation, Layer 2 = depends on Layer 1, etc.).
For each layer:
run_in_background: true)Read (TaskOutput was removed in v2.1.277)git add -- {task files} then git commit -m "feat: {task-description}" -- {task files}. Check git status for files no agent reportedDrift detection: after each layer, diff the actual changes against the plan spec. If implementation deviates significantly from the plan (new files not in plan, plan files not touched), flag and ask how to proceed. Do not silently continue on drift.
Agent instructions for each task:
You are implementing one task from a validated plan.
Task: {description}
Files to modify: {file list}
Acceptance criteria: {criteria}
Relevant ADRs: {adr list}
First principles:
- Build state-of-the-art. No workarounds, no legacy patterns.
- Fix at the correct architectural level, never with component-level hacks.
- If you discover that the plan is wrong or missing context, stop and report. Do not improvise architecture.
Other agents are working in the same worktree. Do not run git add, commit, stash, checkout, restore or reset.
When complete, report every file you created, modified or deleted.
Run in parallel:
If all pass: proceed to smoke test.
If any fail: spawn a debugging subagent (quality-fixer) with the failure output. It gets up to 3 auto-fix attempts. After each attempt, re-run the quality gate. If still failing after 3 attempts: stop, report the failure with the full error output, and wait for human intervention.
Integration smoke test (skip for pure frontend or docs-only plans):
Run the smoke commands defined in the plan's ## Integration Verification section. Additionally:
Smoke test failures are debugged by a quality-fixer-smoke agent with the same 3-attempt limit.
In the worktree, before creating the PR.
PRD Reconciliation: compare the implemented behavior against the original PRD. Note any deviations or additions discovered during implementation. Update the PRD with actuals. These updates ship in the same PR as the feature.
Plan Archival: move docs/plans/plan-{name}.md to docs/plans/completed/plan-{name}.md. Update the status header.
Commit documentation updates: docs: reconcile PRD and archive plan for {feature-name}.
Push the worktree branch and create the PR:
git push origin feature/{plan-name}
gh pr create \
--title "{feature-name}: {one-line summary from plan}" \
--body-file "$PR_BODY_FILE"
Write the PR body (template below) to $PR_BODY_FILE outside the worktree first, so it is not committed.
PR body template:
## Summary
{plan summary paragraph}
## Changes
{auto-generated from task list: bullet per task with files affected}
## ADRs
{list of ADRs created during this plan}
## Test Plan
{from plan test plan section}
## Smoke Test Results
{output from integration verification}
Wait for CI. Creating the PR is not an approval to merge it.
gh pr checks "feature/{plan-name}" --watch --fail-fast
gh pr view "feature/{plan-name}" --json url,headRefOid,reviewDecision,mergeable
If a check fails, or the command reports no checks, show the output and do not merge on your own (checks can take a moment to register: look again before concluding there are none).
STOP. Show the user the PR URL, the check results and the review status, then ask whether to merge. Run the next block only after an explicit yes in the conversation, with the headRefOid you showed. Without it, end here: leave the PR open and the worktree in place, and skip Steps 7 and 8.
gh pr merge "feature/{plan-name}" --squash --delete-branch --match-head-commit "{headRefOid}"
Only after the merge.
Switch back to develop/main. Update docs/plans/metrics/{name}.json with execution data:
Commit metrics update.
Only after the merge.
git worktree remove .worktrees/{plan-name}
/plan-pipeline-execute
Picks up the most recent validated plan. Or specify:
/plan-pipeline-execute plan-user-authentication
Setting up worktree: .worktrees/user-authentication
Branch: feature/user-authentication
TDD scaffolding: 2 tasks marked TDD
✓ Written failing tests for: auth-token-validation
✓ Written failing tests for: refresh-token-rotation
Committed: "test: failing tests for auth pipeline (TDD)"
Executing Layer 1 (3 tasks, parallel)...
[agent-1] Implementing: JWT token generation service
[agent-2] Implementing: User session model
[agent-3] Implementing: Auth middleware
✓ Layer 1 complete. 3 commits.
Drift check: Layer 1... ✓ No drift detected.
Executing Layer 2 (2 tasks, parallel)...
[agent-4] Implementing: Login endpoint
[agent-5] Implementing: Refresh endpoint
✓ Layer 2 complete. 2 commits.
Quality gate...
✓ Lint passed
✓ Type check passed
✓ Tests: 47 passed, 0 failed
Smoke test...
✓ GraphQL introspection: OK
✓ POST /api/auth/login: 200
✓ POST /api/auth/refresh: 200
Pre-PR docs...
✓ PRD reconciled (1 minor deviation noted)
✓ Plan archived to docs/plans/completed/
PR created: #142 "user-authentication: JWT auth with refresh token rotation"
CI checks: passed
Merge PR #142? > yes
PR merged (squash). Branch deleted.
Metrics committed. Worktree cleaned.
✅ Feature complete.
After /plan-pipeline-validate confirms all issues are resolved. Never skip validation: executing an unvalidated plan skips the independent review that catches plan issues before code exists.
/plan-pipeline-ceo-review → product direction locked
/plan-pipeline-eng-review → architecture locked
/plan-pipeline-start → produce implementation plan
/plan-pipeline-validate → validate before execution
/plan-pipeline-execute → execute to PR, approved merge ← you are here
What SKILL.md sets; muted values are Claude Code's defaults
highThree short reads, in order
npx claudepluginhub florianbruniaux/claude-code-plugins --plugin pr-workflow14 skills in this plugin
/handoff-createGenerate a structured handoff document from the current session. Captures scope, relevant files with line numbers, key discoveries, work completed, current status, next steps, and code snippets. Use before ending a session or handing work to another agent./handoff-resumeLoad a handoff document and resume work from where a previous session left off. Parses scope, file references, completed work, and next steps, then checks live state and existing authorization before proceeding./handoff-updateUpdate an existing handoff document with current session progress. Applies section-specific merge rules: append-only for Work Done (never deletes history), replace for Status and Next Steps, merge for Files and Discoveries. Falls back to creating a new handoff if no source file is found./issue-triageTriage a GitHub issue backlog in 3 phases: audit, deep analysis, and validated comment, label, or close actions. Use when triaging GitHub issues, sorting bug reports, cleaning up stale tickets, or detecting duplicate issues. Not for pull requests (use pr-triage)./plan-pipelineCoordinate the plan-to-merged-PR pipeline: product direction (ceo-review), architecture (eng-review), implementation plan (start), validation (validate), execution (execute). Use when planning and shipping a non-trivial feature end to end, or to resume the pipeline from a given stage. Not for small changes (use plan mode)./plan-pipeline-ceo-reviewStrategic product gate: challenge the brief and find the 10-star product hiding in the request before any code is written. Use before implementing a significant feature when the product direction is not locked.Other plugins' skills for the same job