Resume Build
Resume a previously started project build from where it left off.
Input
$ARGUMENTS
Expected format: <project-name>
The project name must match a directory under projects/.
If no arguments provided, list available projects under projects/ and ask the user which one to resume.
State Detection
Before resuming, determine what has been completed by checking:
- •Plan exists?
test -f projects/<name>/plan.md - •Issues file exists?
test -f projects/<name>/issues.json - •Repo created?
cd projects/<name> && git remote get-url origin - •Staging branch exists?
git branch -r --list origin/staging - •Which issues are closed?
gh issue list --state closed --json number,title - •Which issues are open?
gh issue list --state open --json number,title - •Any open PRs?
gh pr list --state open --json number,title,headRefName - •Which phases are merged?
gh pr list --base main --state merged --search "Phase" --json number,title
Resume Logic
Based on state detection, resume from the earliest incomplete step:
If plan.md is missing
- •Resume from Phase 1 (Planning). Read any partial context to avoid re-doing work.
If issues.json is missing
- •Resume from issue generation. Re-read plan.md and generate issues.json.
If repo is not created
- •Resume from Phase 2 (Repository Setup). Use existing plan.md and issues.json.
If repo exists but issues remain open
- •Read issues.json, identify the current phase and issue.
- •Check for any in-progress PR (open PR for a feature branch). If found:
- •Check if it needs review, testing, or merging.
- •Resume from that step.
- •If no open PR, start implementing the next open issue.
If all issues in a phase are closed but phase not merged
- •Resume from Phase Merge for that phase.
If everything is complete
- •Report that the project build is already complete. Show the repo URL.
Output
Report:
- •Project name and repo URL
- •What was already completed
- •Where the build is resuming from
- •Then continue the full pipeline from that point
Example Usage
code
/resume-build my-kanban-app /resume-build todo-cli