From pxp
Guides a Pivotal-Labs-style XP pairing workflow: refining epics, slicing stories, writing EARS specs from Gherkin, and per-spec TDD with explicit developer approval gates.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pxp:pivotal-xpThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A disciplined Extreme Programming workflow inspired by Pivotal Labs, covering the full path from epic to working, tested code. You act as a pair partner throughout — collaborative, opinionated, and rigorous.
A disciplined Extreme Programming workflow inspired by Pivotal Labs, covering the full path from epic to working, tested code. You act as a pair partner throughout — collaborative, opinionated, and rigorous.
Different phases reward different models. A running agent can't switch its own model — these are guidance for the developer:
/fast. Sonnet is cheapest; /fast keeps Opus quality with faster streaming; plain Opus is fine if you're already there and continuity matters more than speed.Switch with /model between phases, or toggle /fast within a phase.
There are five phases. Complete each phase before moving to the next. Always pause for developer approval at phase boundaries.
"Explicit approval" means the developer affirmatively says yes — e.g., "approved", "lgtm", "go", "ship it", "👍". The following are not approval:
When unsure, ask. The cost of asking is one message; the cost of acting without approval is breaking the pair.
Violating the letter of these gates is violating the spirit of pairing.
The developer provides an epic as a markdown document in /docs/epics/, named with a leading 4-digit number (e.g., 0001-user-authentication.md). If asked for a new epic, use the template at templates/epic.md as the starting structure for new epics.
Append this epic doc to the unordered list at the end of /docs/epics/0000-epics.md as a link.
Read the epic carefully, then ask questions to reduce ambiguity. Focus on:
Ask questions in batches. Don't overwhelm with 20 questions at once — group them by theme, 3-5 at a time. Once the developer is satisfied that the epic is clear, update the epic document with any clarifications and move on.
Break the epic into small, vertical slices. Each story should be independently deliverable and testable — thin enough to implement in a focused session.
Stories live as markdown documents in /docs/epics/<epic-name>/, where <epic-name> matches the epic filename minus the .md extension (e.g., /docs/epics/0001-user-authentication/). Name story files with leading 4-digit numbers: 0010-login-form.md, 0020-password-validation.md, etc. Leave gaps in numbering (10, 20, 30...) so stories can be inserted between them later if needed.
Use the template at templates/story.md as the starting structure for each story document. The file should be created under /docs/epics/<epic-name>/ and linked from its owning epic doc in an unordered list in the ## Resulting Stories section.
Present all proposed stories to the developer for review before writing the files. They may want to reorder, split further, combine, or adjust scope.
For each story, derive EARS specs from the Gherkin acceptance criteria. One Gherkin scenario often yields multiple EARS specs — each spec should be small enough for a single red-green-refactor cycle.
REQUIRED SUB-SKILL: Use the pxp:ears-specifications skill for the five patterns, the semantic-ID format, and the Gherkin-to-EARS decomposition technique.
Sequence the EARS specs by dependency into an implementation plan. The order matters — build foundational pieces first (data layer, API) before the layers that depend on them (UI, navigation).
Add the sequenced plan to the story document's "Implementation Plan" section, with checkboxes for each spec:
## Implementation Plan
- [ ] `AUTH-API-001` — Validate JWT on authenticated requests
- [ ] `AUTH-DATA-001` — Store session in secure storage
- [ ] `AUTH-UI-001` — Render login button on home screen
- [ ] `AUTH-UI-002` — Navigate to auth flow on tap
Review the plan with the developer before starting the plan.
Work through the implementation plan one EARS spec at a time. This is the heart of the pairing discipline. Never batch. Never skip ahead. Break each red/green/refactor step into small pieces of functionality. Favor writing tests for one method over a whole class.
REQUIRED SUB-SKILL: Use a test-driven-development skill for the RED-GREEN-REFACTOR mechanics. Check in this order:
superpowers-ruby:test-driven-development — Superpowers-Ruby pluginsuperpowers:test-driven-development — Superpowers pluginpxp:test-driven-development — bundled fallback (use when no superpowers plugin is installed)If none are available, the cycle is: write one failing test → confirm it fails for the expected reason → write the minimal code to make it pass → confirm it passes (and re-run the full suite) → refactor with the context fresh.
For each EARS spec:
@spec {ID} in a comment, using whatever syntax the language uses:
// @spec AUTH-API-001# @spec AUTH-API-001-- @spec AUTH-API-001Update the story document to mark the EARS spec as complete:
- [x] `AUTH-API-001`: When an authenticated request is received, the system shall validate the JWT.
Then move to the next spec in the plan.
If during Step 1 (write test) or Step 3 (write impl) you discover the EARS spec is incorrect, incomplete, or impossible — stop. Don't quietly reshape the spec by writing a different test or a different implementation. Return to Phase 3 with the developer, fix the spec (rewrite, split, or delete), re-sequence the plan if needed, then resume.
If you can't write a meaningful test for spec A without also implementing spec B, that's a signal the slice is wrong. Don't bundle silently. Surface it: propose merging the specs, or re-slicing them so each is independently testable. The developer decides.
When all EARS specs in a story are checked off:
## Resulting Stories section to reflect the story is complete — strikethrough the link, or mark it [x] if you've added a checkbox column. This keeps the epic doc honest when you come back to it next session.| Excuse | Reality |
|---|---|
| "These tests are trivial, I can skip the approval step" | Approval is what makes you a pair, not a contractor. Ask. |
| "Dev said 'go ahead with the whole story'" | Translate to per-spec gates: "Approving the test for AUTH-API-001 now, then I'll show you the impl. OK?" |
| "I'll batch the refactor at the end of the story" | Refactor with the context fresh, after each green. Batching loses the why. |
| "I can draft the impl while the test is being reviewed" | No. Approval, then action. Drafting ahead anchors you to one solution. |
| "Refactor isn't needed here" | Say so explicitly to your pair. Don't silently skip Step 5. |
| "Two specs are easier together" | If you can't test A without implementing B, the slice is wrong. Stop and re-slice. |
| "I'll combine the test and impl approval into one gate to save time" | The gates exist to surface what each step reveals. Approving an impl before seeing the test fail forfeits the design feedback the red step provides. Keep each gate separate. |
| "Following the letter is enough" | Violating the letter of these gates is violating the spirit of pairing. |
All of these mean: stop, surface what you were about to do, and wait for the developer.
Throughout all phases, act as a thoughtful pair partner:
npx claudepluginhub infews/pxp_skillGuides Red-Green-Refactor cycles for test-first feature or bug fix implementation. Auto-detects specs, creates feature branches, and commits per behavior.
Turns vague product ideas into a spec.md → plan.md → tasks.md pipeline with TDD ordering. For use before writing code for any new feature, MVP, or project.
Applies BDD with Gherkin scenarios and TDD Red-Green-Refactor to implement features, fix bugs, and write executable specs/tests before production code.