Arguments
[plan file, specification, or todo file path]
Work Plan Execution Command
Execute a work plan efficiently while maintaining quality and finishing features.
Introduction
This command takes a work document (plan, specification, or todo file) and executes it systematically. The focus is on shipping complete features by understanding requirements quickly, following existing patterns, and maintaining quality throughout.
Input Document
#$ARGUMENTS
Execution Workflow
Phase 1: Quick Start
Read Plan and Clarify
- Read the work document completely
- Review any references or links provided in the plan
- If anything is unclear or ambiguous, ask clarifying questions now
- Get user approval to proceed
- Do not skip this - better to ask questions now than build the wrong thing
Setup Environment
First, check the current branch:
current_branch=$(git branch --show-current)
default_branch=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
# Fallback if remote HEAD isn't set
if [ -z "$default_branch" ]; then
default_branch=$(git rev-parse --verify origin/main >/dev/null 2>&1 && echo "main" || echo "master")
fi
If already on a feature branch (not the default branch):
- Ask: "Continue working on
[current_branch], or create a new branch?"
- If continuing, proceed to step 3
- If creating new, follow Option A or B below
If on the default branch, choose how to proceed:
Option A: Create a new branch
git pull origin [default_branch]
git checkout -b feature-branch-name
Use a meaningful name based on the work (e.g., feat/user-authentication, fix/email-validation).
Option B: Use a worktree (recommended for parallel development)
skill: git-worktree
# The skill will create a new branch from the default branch in an isolated worktree
Option C: Continue on the default branch
- Requires explicit user confirmation
- Only proceed after user explicitly says "yes, commit to [default_branch]"
- Never commit directly to the default branch without explicit permission
Recommendation: Use worktree if:
- You want to work on multiple features simultaneously
- You want to keep the default branch clean while experimenting
- You plan to switch between branches frequently
Create Todo List
- Use TodoWrite to break plan into actionable tasks
- Include dependencies between tasks
- Prioritize based on what needs to be done first
- Include testing and quality check tasks
- Keep tasks specific and completable
Phase 2: Execute
Task Execution Loop
For each task in priority order:
while (tasks remain):
- Mark task as in_progress in TodoWrite
- Read any referenced files from the plan
- Look for similar patterns in codebase
- Implement following existing conventions
- Write tests for new functionality
- Run tests after changes
- Mark task as completed in TodoWrite
- Mark off the corresponding checkbox in the plan file ([ ] → [x])
- Evaluate for incremental commit (see below)
IMPORTANT: Always update the original plan document by checking off completed items. Use the Edit tool to change - [ ] to - [x] for each task you finish. This keeps the plan as a living document showing progress and ensures no checkboxes are left unchecked.
Incremental Commits
After completing each task, evaluate whether to create an incremental commit:
| Commit when... |
Don't commit when... |
| Logical unit complete (model, service, component) |
Small part of a larger unit |
| Tests pass + meaningful progress |
Tests failing |
| About to switch contexts (backend → frontend) |
Purely scaffolding with no behavior |
| About to attempt risky/uncertain changes |
Would need a "WIP" commit message |
Heuristic: "Can I write a commit message that describes a complete, valuable change? If yes, commit. If the message would be 'WIP' or 'partial X', wait."
Commit workflow:
# 1. Verify tests pass (use project's test command)
# Examples: bin/rails test, npm test, pytest, go test, etc.
# 2. Stage only files related to this logical unit (not `git add .`)
git add <files related to this logical unit>
# 3. Commit with conventional message
git commit -m "feat(scope): description of this unit"
Handling merge conflicts: If conflicts arise during rebasing or merging, resolve them immediately. Incremental commits make conflict resolution easier since each commit is small and focused.
Note: Incremental commits use clean conventional messages without attribution footers. The final Phase 4 commit/PR includes the full attribution.
Follow Existing Patterns
- The plan should reference similar code - read those files first
- Match naming conventions exactly
- Reuse existing components where possible
- Follow project coding standards (see CLAUDE.md)
- When in doubt, grep for similar implementations
Test Continuously
- Run relevant tests after each significant change
- Don't wait until the end to test
- Fix failures immediately
- Add new tests for new functionality
Figma Design Sync (if applicable)
For UI work with Figma designs:
- Implement components following design specs
- Use figma-design-sync agent iteratively to compare
- Fix visual differences identified
- Repeat until implementation matches design
Track Progress
- Keep TodoWrite updated as you complete tasks
- Note any blockers or unexpected discoveries
- Create new tasks if scope expands
- Keep user informed of major milestones
Phase 3: Quality Check
Run Core Quality Checks
Always run before submitting:
# Run full test suite (use project's test command)
# Examples: bin/rails test, npm test, pytest, go test, etc.
# Run linting (per CLAUDE.md)
# Use linting-agent before pushing to origin
Consider Reviewer Agents (Optional)
Use for complex, risky, or large changes:
- code-simplicity-reviewer: Check for unnecessary complexity
- kieran-rails-reviewer: Verify Rails conventions (Rails projects)
- performance-oracle: Check for performance issues
- security-sentinel: Scan for security vulnerabilities
- cora-test-reviewer: Review test quality (Rails projects with comprehensive test coverage)
Run reviewers in parallel with Task tool:
Task(code-simplicity-reviewer): "Review changes for simplicity"
Task(kieran-rails-reviewer): "Check Rails conventions"
Present findings to user and address critical issues.
Final Validation
- All TodoWrite tasks marked completed
- All tests pass
- Linting passes
- Code follows existing patterns
- Figma designs match (if applicable)
- No console errors or warnings
Phase 4: Ship It
Create Commit
git add .
git status # Review what's being committed
git diff --staged # Check the changes
# Commit with conventional format
git commit -m "$(cat <<'EOF'
feat(scope): description of what and why
Brief explanation if needed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
Capture and Upload Screenshots for UI Changes (REQUIRED for any UI work)
For any design changes, new views, or UI modifications, you MUST capture and upload screenshots:
Step 1: Start dev server (if not running)
bin/dev # Run in background
Step 2: Capture screenshots with agent-browser CLI
agent-browser open http://localhost:3000/[route]
agent-browser snapshot -i
agent-browser screenshot output.png
See the agent-browser skill for detailed usage.
Step 3: Upload using imgup skill
skill: imgup
# Then upload each screenshot:
imgup -h pixhost screenshot.png # pixhost works without API key
# Alternative hosts: catbox, imagebin, beeimg
What to capture:
- New screens: Screenshot of the new UI
- Modified screens: Before AND after screenshots
- Design implementation: Screenshot showing Figma design match
IMPORTANT: Always include uploaded image URLs in PR description. This provides visual context for reviewers and documents the change.
Create Pull Request
git push -u origin feature-branch-name
gh pr create --title "Feature: [Description]" --body "$(cat <<'EOF'
## Summary
- What was built
- Why it was needed
- Key decisions made
## Testing
- Tests added/modified
- Manual testing performed
## Before / After Screenshots
| Before | After |
|--------|-------|
|  |  |
## Figma Design
[Link if applicable]
---
[](https://github.com/EveryInc/compound-engineering-plugin) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
Notify User
- Summarize what was completed
- Link to PR
- Note any follow-up work needed
- Suggest next steps if applicable
Key Principles
Start Fast, Execute Faster
- Get clarification once at the start, then execute
- Don't wait for perfect understanding - ask questions and move
- The goal is to finish the feature, not create perfect process
The Plan is Your Guide
- Work documents should reference similar code and patterns
- Load those references and follow them
- Don't reinvent - match what exists
Test As You Go
- Run tests after each change, not at the end
- Fix failures immediately
- Continuous testing prevents big surprises
Quality is Built In
- Follow existing patterns
- Write tests for new code
- Run linting before pushing
- Use reviewer agents for complex/risky changes only
Ship Complete Features
- Mark all tasks completed before moving on
- Don't leave features 80% done
- A finished feature that ships beats a perfect feature that doesn't
Quality Checklist
Before creating PR, verify:
When to Use Reviewer Agents
Don't use by default. Use reviewer agents only when:
- Large refactor affecting many files (10+)
- Security-sensitive changes (authentication, permissions, data access)
- Performance-critical code paths
- Complex algorithms or business logic
- User explicitly requests thorough review
For most features: tests + linting + following patterns is sufficient.
Common Pitfalls to Avoid
- Analysis paralysis - Don't overthink, read the plan and execute
- Skipping clarifying questions - Ask now, not after building wrong thing
- Ignoring plan references - The plan has links for a reason
- Testing at the end - Test continuously or suffer later
- Forgetting TodoWrite - Track progress or lose track of what's done
- 80% done syndrome - Finish the feature, don't move on early
- Over-reviewing simple changes - Save reviewer agents for complex work
1---2name: workflows-work3description: Execute work plans efficiently while maintaining quality and finishing features4metadata:5 source: https://skillmd.com/skills/levalencia/workflows-work6---78## Arguments9[plan file, specification, or todo file path]1011# Work Plan Execution Command1213Execute a work plan efficiently while maintaining quality and finishing features.1415## Introduction1617This command takes a work document (plan, specification, or todo file) and executes it systematically. The focus is on **shipping complete features** by understanding requirements quickly, following existing patterns, and maintaining quality throughout.1819## Input Document2021<input_document> #$ARGUMENTS </input_document>2223## Execution Workflow2425### Phase 1: Quick Start26271. **Read Plan and Clarify**2829 - Read the work document completely30 - Review any references or links provided in the plan31 - If anything is unclear or ambiguous, ask clarifying questions now32 - Get user approval to proceed33 - **Do not skip this** - better to ask questions now than build the wrong thing34352. **Setup Environment**3637 First, check the current branch:3839 ```bash40 current_branch=$(git branch --show-current)41 default_branch=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')4243 # Fallback if remote HEAD isn't set44 if [ -z "$default_branch" ]; then45 default_branch=$(git rev-parse --verify origin/main >/dev/null 2>&1 && echo "main" || echo "master")46 fi47 ```4849 **If already on a feature branch** (not the default branch):50 - Ask: "Continue working on `[current_branch]`, or create a new branch?"51 - If continuing, proceed to step 352 - If creating new, follow Option A or B below5354 **If on the default branch**, choose how to proceed:5556 **Option A: Create a new branch**57 ```bash58 git pull origin [default_branch]59 git checkout -b feature-branch-name60 ```61 Use a meaningful name based on the work (e.g., `feat/user-authentication`, `fix/email-validation`).6263 **Option B: Use a worktree (recommended for parallel development)**64 ```bash65 skill: git-worktree66 # The skill will create a new branch from the default branch in an isolated worktree67 ```6869 **Option C: Continue on the default branch**70 - Requires explicit user confirmation71 - Only proceed after user explicitly says "yes, commit to [default_branch]"72 - Never commit directly to the default branch without explicit permission7374 **Recommendation**: Use worktree if:75 - You want to work on multiple features simultaneously76 - You want to keep the default branch clean while experimenting77 - You plan to switch between branches frequently78793. **Create Todo List**80 - Use TodoWrite to break plan into actionable tasks81 - Include dependencies between tasks82 - Prioritize based on what needs to be done first83 - Include testing and quality check tasks84 - Keep tasks specific and completable8586### Phase 2: Execute87881. **Task Execution Loop**8990 For each task in priority order:9192 ```93 while (tasks remain):94 - Mark task as in_progress in TodoWrite95 - Read any referenced files from the plan96 - Look for similar patterns in codebase97 - Implement following existing conventions98 - Write tests for new functionality99 - Run tests after changes100 - Mark task as completed in TodoWrite101 - Mark off the corresponding checkbox in the plan file ([ ] → [x])102 - Evaluate for incremental commit (see below)103 ```104105 **IMPORTANT**: Always update the original plan document by checking off completed items. Use the Edit tool to change `- [ ]` to `- [x]` for each task you finish. This keeps the plan as a living document showing progress and ensures no checkboxes are left unchecked.1061072. **Incremental Commits**108109 After completing each task, evaluate whether to create an incremental commit:110111 | Commit when... | Don't commit when... |112 |----------------|---------------------|113 | Logical unit complete (model, service, component) | Small part of a larger unit |114 | Tests pass + meaningful progress | Tests failing |115 | About to switch contexts (backend → frontend) | Purely scaffolding with no behavior |116 | About to attempt risky/uncertain changes | Would need a "WIP" commit message |117118 **Heuristic:** "Can I write a commit message that describes a complete, valuable change? If yes, commit. If the message would be 'WIP' or 'partial X', wait."119120 **Commit workflow:**121 ```bash122 # 1. Verify tests pass (use project's test command)123 # Examples: bin/rails test, npm test, pytest, go test, etc.124125 # 2. Stage only files related to this logical unit (not `git add .`)126 git add <files related to this logical unit>127128 # 3. Commit with conventional message129 git commit -m "feat(scope): description of this unit"130 ```131132 **Handling merge conflicts:** If conflicts arise during rebasing or merging, resolve them immediately. Incremental commits make conflict resolution easier since each commit is small and focused.133134 **Note:** Incremental commits use clean conventional messages without attribution footers. The final Phase 4 commit/PR includes the full attribution.1351363. **Follow Existing Patterns**137138 - The plan should reference similar code - read those files first139 - Match naming conventions exactly140 - Reuse existing components where possible141 - Follow project coding standards (see CLAUDE.md)142 - When in doubt, grep for similar implementations1431444. **Test Continuously**145146 - Run relevant tests after each significant change147 - Don't wait until the end to test148 - Fix failures immediately149 - Add new tests for new functionality1501515. **Figma Design Sync** (if applicable)152153 For UI work with Figma designs:154155 - Implement components following design specs156 - Use figma-design-sync agent iteratively to compare157 - Fix visual differences identified158 - Repeat until implementation matches design1591606. **Track Progress**161 - Keep TodoWrite updated as you complete tasks162 - Note any blockers or unexpected discoveries163 - Create new tasks if scope expands164 - Keep user informed of major milestones165166### Phase 3: Quality Check1671681. **Run Core Quality Checks**169170 Always run before submitting:171172 ```bash173 # Run full test suite (use project's test command)174 # Examples: bin/rails test, npm test, pytest, go test, etc.175176 # Run linting (per CLAUDE.md)177 # Use linting-agent before pushing to origin178 ```1791802. **Consider Reviewer Agents** (Optional)181182 Use for complex, risky, or large changes:183184 - **code-simplicity-reviewer**: Check for unnecessary complexity185 - **kieran-rails-reviewer**: Verify Rails conventions (Rails projects)186 - **performance-oracle**: Check for performance issues187 - **security-sentinel**: Scan for security vulnerabilities188 - **cora-test-reviewer**: Review test quality (Rails projects with comprehensive test coverage)189190 Run reviewers in parallel with Task tool:191192 ```193 Task(code-simplicity-reviewer): "Review changes for simplicity"194 Task(kieran-rails-reviewer): "Check Rails conventions"195 ```196197 Present findings to user and address critical issues.1981993. **Final Validation**200 - All TodoWrite tasks marked completed201 - All tests pass202 - Linting passes203 - Code follows existing patterns204 - Figma designs match (if applicable)205 - No console errors or warnings206207### Phase 4: Ship It2082091. **Create Commit**210211 ```bash212 git add .213 git status # Review what's being committed214 git diff --staged # Check the changes215216 # Commit with conventional format217 git commit -m "$(cat <<'EOF'218 feat(scope): description of what and why219220 Brief explanation if needed.221222 🤖 Generated with [Claude Code](https://claude.com/claude-code)223224 Co-Authored-By: Claude <noreply@anthropic.com>225 EOF226 )"227 ```2282292. **Capture and Upload Screenshots for UI Changes** (REQUIRED for any UI work)230231 For **any** design changes, new views, or UI modifications, you MUST capture and upload screenshots:232233 **Step 1: Start dev server** (if not running)234 ```bash235 bin/dev # Run in background236 ```237238 **Step 2: Capture screenshots with agent-browser CLI**239 ```bash240 agent-browser open http://localhost:3000/[route]241 agent-browser snapshot -i242 agent-browser screenshot output.png243 ```244 See the `agent-browser` skill for detailed usage.245246 **Step 3: Upload using imgup skill**247 ```bash248 skill: imgup249 # Then upload each screenshot:250 imgup -h pixhost screenshot.png # pixhost works without API key251 # Alternative hosts: catbox, imagebin, beeimg252 ```253254 **What to capture:**255 - **New screens**: Screenshot of the new UI256 - **Modified screens**: Before AND after screenshots257 - **Design implementation**: Screenshot showing Figma design match258259 **IMPORTANT**: Always include uploaded image URLs in PR description. This provides visual context for reviewers and documents the change.2602613. **Create Pull Request**262263 ```bash264 git push -u origin feature-branch-name265266 gh pr create --title "Feature: [Description]" --body "$(cat <<'EOF'267 ## Summary268 - What was built269 - Why it was needed270 - Key decisions made271272 ## Testing273 - Tests added/modified274 - Manual testing performed275276 ## Before / After Screenshots277 | Before | After |278 |--------|-------|279 |  |  |280281 ## Figma Design282 [Link if applicable]283284 ---285286 [](https://github.com/EveryInc/compound-engineering-plugin) 🤖 Generated with [Claude Code](https://claude.com/claude-code)287 EOF288 )"289 ```2902914. **Notify User**292 - Summarize what was completed293 - Link to PR294 - Note any follow-up work needed295 - Suggest next steps if applicable296297---298299## Key Principles300301### Start Fast, Execute Faster302303- Get clarification once at the start, then execute304- Don't wait for perfect understanding - ask questions and move305- The goal is to **finish the feature**, not create perfect process306307### The Plan is Your Guide308309- Work documents should reference similar code and patterns310- Load those references and follow them311- Don't reinvent - match what exists312313### Test As You Go314315- Run tests after each change, not at the end316- Fix failures immediately317- Continuous testing prevents big surprises318319### Quality is Built In320321- Follow existing patterns322- Write tests for new code323- Run linting before pushing324- Use reviewer agents for complex/risky changes only325326### Ship Complete Features327328- Mark all tasks completed before moving on329- Don't leave features 80% done330- A finished feature that ships beats a perfect feature that doesn't331332## Quality Checklist333334Before creating PR, verify:335336- [ ] All clarifying questions asked and answered337- [ ] All TodoWrite tasks marked completed338- [ ] Tests pass (run project's test command)339- [ ] Linting passes (use linting-agent)340- [ ] Code follows existing patterns341- [ ] Figma designs match implementation (if applicable)342- [ ] Before/after screenshots captured and uploaded (for UI changes)343- [ ] Commit messages follow conventional format344- [ ] PR description includes summary, testing notes, and screenshots345- [ ] PR description includes Compound Engineered badge346347## When to Use Reviewer Agents348349**Don't use by default.** Use reviewer agents only when:350351- Large refactor affecting many files (10+)352- Security-sensitive changes (authentication, permissions, data access)353- Performance-critical code paths354- Complex algorithms or business logic355- User explicitly requests thorough review356357For most features: tests + linting + following patterns is sufficient.358359## Common Pitfalls to Avoid360361- **Analysis paralysis** - Don't overthink, read the plan and execute362- **Skipping clarifying questions** - Ask now, not after building wrong thing363- **Ignoring plan references** - The plan has links for a reason364- **Testing at the end** - Test continuously or suffer later365- **Forgetting TodoWrite** - Track progress or lose track of what's done366- **80% done syndrome** - Finish the feature, don't move on early367- **Over-reviewing simple changes** - Save reviewer agents for complex work