Autonomous Execution
This skill provides patterns for executing projects autonomously while maintaining quality and knowing when to stop and ask for help.
Prerequisites for Autonomous Execution
Before starting autonomous work, verify:
Project Readiness
- • Tech Plan exists - Architecture and sequencing documented
- • Tasks Document exists - Granular tasks with acceptance criteria
- • Success criteria defined - Clear "done" definition
- • Tests exist - Automated validation available
- • Quality gates configured - Pre-commit hooks, CI checks
Documentation Readiness
- • Project docs available - CLAUDE.md, relevant docs
- • Troubleshooting guide exists - Common issues documented
- • Stop conditions clear - When to pause and ask
Execution Patterns
Pattern 1: Task-by-Task Execution
When to use: Standard execution for most projects
Process:
- •Read task - Understand requirements and acceptance criteria
- •Plan approach - Identify implementation strategy
- •Implement - Write code following project standards
- •Self-validate - Run tests, check acceptance criteria
- •Update status - Mark task complete, update progress
- •Proceed to next - Move to next task
Validation Checkpoints:
- •After each task: Run relevant test suite
- •After each phase: Run full test suite
- •Before completion: Complete quality gate checklist
Pattern 2: Phase-by-Phase Execution
When to use: Projects with clear phases (migrations, refactors)
Process:
- •Complete all tasks in current phase
- •Run phase-specific validation
- •Verify quality gates pass
- •Document learnings
- •Proceed to next phase only after validation
Pattern 3: Incremental Validation
When to use: Large projects or risky changes
Process:
- •Make small, focused change
- •Validate immediately
- •Commit only if validation passes
- •Repeat with next small change
Self-Validation Strategies
Task-Level Validation
After completing each task:
- •
Run relevant tests:
- •Unit tests for logic changes
- •Integration tests for API/service changes
- •E2E tests for user-facing changes
- •
Check acceptance criteria:
- •Review each criterion
- •Verify all can be marked complete
- •Document any deviations
- •
Run quality checks:
- •Type checking
- •Linting
- •Build verification
- •
Update task status:
- •Mark acceptance criteria complete
- •Add completion notes
- •Update status to "Complete"
Phase-Level Validation
After completing each phase:
- •Run phase-specific validation (if script exists)
- •Run full test suite multiple times (catch flakiness)
- •Verify all quality gates pass
- •Document any learnings or issues
Stop Conditions
CRITICAL: Stop and ask for help when encountering:
Immediate Stop (Blockers)
| Condition | Action |
|---|---|
| Tests fail 3+ times | Stop, document issue |
| Architectural decision needed | Stop, ask for guidance |
| External dependency blocked | Stop, report blocker |
| Quality gate failure (can't fix) | Stop, seek help |
| Ambiguous requirements | Stop, ask for clarification |
Pause and Evaluate
| Condition | Action |
|---|---|
| Unexpected complexity | Assess scope, consider asking |
| Breaking changes detected | Evaluate impact, may need input |
| Performance regression | Investigate, may need guidance |
| Security concerns | Always ask before proceeding |
How to Stop Gracefully
When stopping:
- •
Document current state:
- •What was attempted
- •What failed
- •What was learned
- •
Update task status:
- •Mark as "Blocked" or "In Progress"
- •Add blocker notes
- •
Create summary:
- •Brief description of issue
- •What was tried
- •What's needed to proceed
Quality Gates
Pre-Commit Gates
Before each commit, verify:
- • No skipped tests
- • No focused tests (.only)
- • Unit tests pass
- • Type checking passes
- • Linting passes
Pre-Phase Gates
Before proceeding to next phase:
- • All phase tasks complete
- • Phase validation passes
- • Full test suite passes
- • All pre-commit gates pass
Pre-Completion Gates
Before marking project complete:
- • All tasks complete
- • All acceptance criteria met
- • All tests passing
- • No regressions
- • Documentation updated
Progress Tracking
After Each Task
- •Mark acceptance criteria checkboxes
- •Add completion notes
- •Update task status
- •Update "Current Focus" to next task
Metrics to Track
- •Completion percentage (tasks done / total)
- •Phase completion status
- •Test coverage (maintain or improve)
- •Quality gate status
Troubleshooting Common Issues
Tests Fail After Changes
- •Review test output for specific failures
- •Check if changes broke test assumptions
- •Verify test data/fixtures are correct
- •Run tests in isolation
- •Check if dependencies changed
Quality Gates Block Commit
- •Read error message carefully
- •Fix the specific issue
- •Re-run checks locally
- •Don't bypass - fix root cause
Unclear Acceptance Criteria
- •Review task description and context
- •Check tech plan for guidance
- •Review similar completed tasks
- •Stop and ask if still unclear
Best Practices
Code Quality
- •Follow project standards and existing patterns
- •Write tests when possible
- •Keep changes small and focused
- •Document decisions in completion notes
Validation
- •Validate early and often
- •Run full suite regularly
- •Don't proceed if gates fail
- •Verify acceptance criteria are actually met
Progress Management
- •Update status after every task
- •Document learnings as you go
- •Track blockers explicitly
- •Celebrate completed tasks
Communication
- •Write clear completion notes
- •Ask when stuck (don't waste time)
- •Share learnings
- •Be transparent about deviations
Integration with Playbook
This skill supports:
- •
/playbook:work- Primary execution command - •
/playbook:tasks- Task document management - •
/playbook:learnings- Post-execution capture
Success Criteria
Autonomous execution is successful when:
- • All tasks complete
- • All tests passing
- • Quality gates pass
- • No regressions
- • Documentation updated
- • Ready for review
Autonomous execution requires discipline: validate often, stop when uncertain, document everything.