/pr-stack:implement STACK file path or feature name (e.g., "auth stack" or "STACK-AUTH.md")from pr-stack
Implement PRs from an existing STACK file using TDD
Ships in pr-stack. Installing the plugin adds it to Claude Code.
Execute a STACK-[FEATURE].md file ONE PR AT A TIME using strict Test-Driven Development.
ls STACK-*.md) and let the user choose.git branch --show-current and git status.All git town commands (hack, append, propose, sync, undo, etc.) MUST be run with dangerouslyDisableSandbox: true on the Bash tool. They require filesystem and network access beyond the default sandbox permissions. The user will be prompted to approve each one.
EVERY PR must go through ALL phases in order. No skipping. No combining. No moving to the next PR until the current one is fully committed, proposed, and marked complete.
Writing code is only HALF the work. The commit/test/propose cycle is the other half. Both halves are mandatory.
Each PR goes through exactly 6 phases. You MUST complete each phase before starting the next. You MUST complete ALL 6 phases before starting the next PR.
git town append, you MUST be on the base branch first because append creates a child of the current branch. For git town hack, you can be on any branch.
b. If you are not on the correct base branch, run git checkout <base-branch> before the branch command.
c. Run the branch command from the STACK file (e.g., git town hack auth-1 or git town append auth-2).
d. Verify the branch was created. Run git branch --show-current to confirm you are on the new branch. Do NOT rely on the branch command's stdout/stderr to determine success -- git-town outputs informational messages that are not errors. The branch command succeeded if and only if git branch --show-current returns the expected branch name.
e. If the branch already exists (you are resuming), just check it out.DO NOT commit. DO NOT move to Phase 3 until tests exist and fail.
DO NOT commit yet. DO NOT move to the review gate until tests pass.
MANDATORY: After tests pass, you MUST pause and present your changes to the user for review. Do NOT proceed to Phase 4 until the user explicitly approves.
Present the following:
Handle feedback:
HARD GATE: DO NOT proceed to Phase 4 until the user has explicitly approved.
This phase has 3 mandatory steps. Do all 3, in order.
Step 1: Quality Check If .stack-workflow.md exists, run its Pre-Commit Check commands. If it does not exist, just run the project's tests. If checks fail, fix the issues and re-run until they pass.
Step 2: Stage and Commit
&&:
git add file1 file2 ... && git commit -m "message"git add and git commit as separate Bash calls (this causes a race condition on index.lock)Step 3: Verify
Run git log --oneline -1 to confirm the commit was created.
HARD GATE: DO NOT proceed to Phase 5 until the commit exists. If the commit failed (e.g., pre-commit hook), fix the issue and commit again. Do NOT skip ahead.
This phase creates the PR. It is MANDATORY. Never skip it.
Step 1: Pre-PR Check (optional) If .stack-workflow.md exists and has a Pre-PR Check section, run those commands. Otherwise skip this step.
Step 2: Create the PR
git town propose --title "type(scope): description" --body "$(cat <<'EOF'
## Summary
Brief description
### Changes
- Bullet points
### Test Coverage
- Tests added/modified
### Stack Context
**Stack Progress**: X/Y PRs
- This PR: [description]
- Next: [next PR]
Generated with Claude Code
EOF
)"
Both --title and --body are required. Never use gh pr create.
Step 3: Verify Confirm the command succeeded. Note the PR URL from the output.
HARD GATE: DO NOT proceed to Phase 6 until git town propose has succeeded and you have a PR URL. If it failed, diagnose and retry.
Step 1: Update STACK file Mark the PR complete in the STACK file:
### PR X: [Title] COMPLETE
**Status**: Submitted for review on YYYY-MM-DD
**PR URL**: [URL from Phase 5]
**Completed by**: Implementation Agent
Step 2: Report to user Tell the user: the PR number, title, URL, and what's next in the stack.
Step 3: Check for more PRs
git town hack [name-N]: PR is independent (no code or file deps on previous PRs). Can run from any branch.git town append [name-N]: PR depends on previous (code deps OR same files modified). MUST be on the parent branch first.git town undo unless you have concrete evidence the command failed (e.g., git branch --show-current returns the wrong branch, or an actual error exit code).git branch --show-current and git config --get git-town-branch.<branch>.parent before taking any corrective action.ls or ls -la to find them (NOT ls -f)If user says "continue the auth stack, PR 3":
If the STACK file lists files that don't exist:
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub derekspelledcorrectly/claude-plugins --plugin pr-stack3 commands in this plugin
Other plugins' commands for the same job