Prompt file imported from drewsephski/compound-engineering (
.windsurf/workflows/work.md). Copyright stays with the author.
/work Workflow
Execute a plan with worktrees and task tracking.
When to Use
After you have an approved plan from /plan.
Steps
- Create isolated worktree - Use
git worktree addto create a parallel workspace - Set up the environment - Install dependencies, configure settings
- Implement step by step - Follow the plan files in order
- Run validations - Execute tests, linting, type checking after changes
- Track progress - Update todo status as items complete
- Handle issues - When something fails, adapt or escalate
- Create PR - Open pull request when implementation is complete
Worktree Pattern
# Create worktree for feature
git worktree add ../project-feature-name feature-branch-name
# Work in isolation
cd ../project-feature-name
# Clean up when done
cd ../project-main
git worktree remove ../project-feature-name
Validation Checkpoints
After each significant change:
- Tests pass
- Linting clean
- Type checking passes
- No breaking changes to existing functionality
When to Intervene
- Tests failing repeatedly (3+ attempts)
- Agent clearly stuck on same issue
- Something fundamental was wrong in the original plan
Intervention Protocol
When you need to intervene:
- Stop the current work
- Update the plan (not the code)
- Let the agent fix code based on updated plan
- Resume from where it left off
Parallel Work
At Stage 4+, run multiple work streams:
- Feature A in worktree A
- Feature B in worktree B
- Bug fix in worktree C
Check in periodically. Review PRs as they complete.
Output
A pull request with:
- Implementation matching the plan
- Tests for new functionality
- Clean commit history
- Ready for review
Tips
- You don't need to watch every step
- Check in periodically to see progress
- Trust the plan - if the plan was good, execution will be good
- Worktrees keep your main workspace clean and allow parallel development