Execute implementation work with gate checks and verification. Use when user wants to code, build features, implement iterations, or execute action items...
Execute implementation work following Flow framework patterns. This skill guides the build phase: verify readiness ā start implementation ā execute action items ā verify completion ā mark complete.
Activate when the user wants to start coding:
Flow's Core Principle: Design before code. Implementation happens AFTER brainstorming is complete (if needed) and pre-implementation tasks are done.
Key Gates:
Implementation Pattern: Start ā Execute ā Verify ā Complete
Before starting ANY implementation, verify readiness:
IF iteration has brainstorming section:
IF brainstorming status ā ā
COMPLETE:
ā BLOCK implementation
SUGGEST: "Brainstorming must be completed first. Use `/flow-next-subject` to continue brainstorming."
ELSE:
ā
PASS gate
ELSE:
ā
PASS gate (no brainstorming needed)
IF iteration has "Pre-Implementation Tasks" section:
IF any pre-task status ā ā
COMPLETE:
ā BLOCK implementation
LIST incomplete pre-tasks
SUGGEST: "Complete pre-tasks first, then use `/flow-implement-start`"
ELSE:
ā
PASS gate
ELSE:
ā
PASS gate (no pre-tasks)
IF iteration status = š§ IN PROGRESS:
ā
PASS (already implementing)
IF iteration status = šØ READY or ā³ PENDING:
SUGGEST: "Use `/flow-implement-start` to begin implementation"
Command: /flow-implement-start
What it does:
When to suggest: User is ready to code and gates passed
Sequential Execution:
- [x] Action itemParallel Execution (when safe):
Handling Blockers:
IF encounter blocker during implementation:
DOCUMENT blocker in Implementation Notes
ASSESS severity:
- Minor (< 15 min fix): Handle and continue
- Major (> 15 min, out of scope): STOP and notify user
- Blocking (cannot proceed): Mark iteration ā BLOCKED, notify user
Before marking iteration complete, verify:
Verification Checklist:
Testing Strategy (from PLAN.md):
Command: /flow-implement-complete
What it does:
When to suggest: All verification criteria met
/flow-implement-startUse when: Starting implementation for current iteration
Prerequisites:
Effect:
/flow-implement-completeUse when: All action items done and verified
Prerequisites:
Effect:
Use when: Action items depend on each other
Action Items:
- [x] Create database schema
- [x] Implement data access layer (depends on schema)
- [x] Add service layer (depends on DAL)
- [x] Create API endpoints (depends on service)
Approach:
Use when: Action items are independent
Action Items:
- [ ] Create logger utility
- [ ] Create validator utility
- [ ] Create formatter utility
Approach:
Use when: Complex implementation with multiple steps
Action Items:
- [x] Implement basic authentication (VERIFY: can login)
- [x] Add JWT token generation (VERIFY: tokens valid)
- [x] Add token refresh (VERIFY: refresh works)
- [x] Add logout (VERIFY: tokens invalidated)
Approach:
Small blocking tasks (< 30 min) that must be completed BEFORE main iteration work starts.
Examples:
IF iteration has "Pre-Implementation Tasks" section:
FOR EACH pre-task:
Complete pre-task
Mark ā
COMPLETE with date
Document changes in pre-task section
ONLY AFTER ALL PRE-TASKS DONE:
Run /flow-implement-start for main iteration
#### Pre-Implementation Tasks
##### ā³ Pre-Task 1: Update ErrorHandler to support async
**Why Blocking**: Retry logic requires async error handling
**Scope** (< 30 min):
- Update ErrorHandler.ts with async support
- Add retryAsync() method
- Update 3 call sites
**Files**:
- src/utils/ErrorHandler.ts
---
##### ā
Pre-Task 1: Update ErrorHandler to support async
**Completed**: 2025-10-30
**Changes Made**:
- Added async support to ErrorHandler class
- Implemented retryAsync() method with exponential backoff
- Updated call sites in BillingService, PaymentService, OrderService
- Added unit tests for async error handling
**Files Modified**:
- src/utils/ErrorHandler.ts (+42 lines)
- tests/utils/ErrorHandler.test.ts (+28 lines)
Code Quality:
Functionality:
Testing:
Documentation:
Mark iteration ā BLOCKED when:
Blocked Pattern:
### ā Iteration 2: Error Handling
**Status**: ā BLOCKED
**Blocker**: Stripe SDK doesn't support custom retry logic in v12
**Options**:
A) Downgrade to Stripe SDK v11 (supports custom retry)
B) Wait for v13 release (eta 2 weeks)
C) Implement wrapper around SDK calls
**Waiting for**: User decision on approach
For comprehensive guidance on verification, testing patterns, completion criteria, bug documentation, and decision-making, see VERIFICATION.md.
That resource includes:
During implementation, if you discover issues NOT in current action items:
STOP - Don't make assumptions
ASSESS - Categorize the issue:
NOTIFY user with structured options:
AWAIT user decision before proceeding
ā ļø SCOPE BOUNDARY ALERT
During implementation of Iteration 2 (Error Handling), discovered:
**Issue**: PaymentService.ts uses deprecated error format that conflicts with new retry logic
**Impact**: Cannot complete current action item without addressing this
**Options**:
A) Create pre-implementation task (estimated 20 min):
- Update PaymentService error format
- Update 2 call sites
- Add to Pre-Implementation Tasks section
B) Add as brainstorming subject:
- Need to design error format standard across all services
- Affects more than just PaymentService
C) Handle immediately:
- Fix PaymentService.ts now as part of current work
- Document change in Implementation Notes
D) Defer to separate iteration:
- Work around issue for now
- Create new iteration for error format standardization
Which approach would you prefer?
User: "Let's implement the authentication system"
AI Response:
I'll help you implement the authentication system. Let me check readiness:
ā
Brainstorming Session - COMPLETE (4 subjects resolved)
ā
Pre-Implementation Tasks - COMPLETE (updated User model)
ā
Iteration Status - šØ READY
Ready to implement! Use `/flow-implement-start` to begin.
Action items from brainstorming:
1. Create AuthService class
2. Implement login/logout methods
3. Add JWT token generation
4. Integrate with API endpoints
5. Add authentication middleware
Estimated time: 3-4 hours
Should I start implementation?
User: "Start implementing the payment integration"
AI Response:
I'll help you implement payment integration. Let me check readiness:
ā Pre-Implementation Tasks - INCOMPLETE
Found 2 incomplete pre-tasks:
1. ā³ Pre-Task 1: Refactor PaymentConfig interface
2. ā³ Pre-Task 2: Update environment variables
These tasks must be completed before main implementation. Should I help you complete them now?
User: "Are we done with this iteration?"
AI Response:
Let me verify completion criteria:
ā
All action items checked off (5/5)
ā
Code compiles without errors
ā
Tests passing (unit: 12/12, integration: 3/3)
ā
Files modified documented (4 files)
ā
Implementation notes updated
ā
No unresolved blockers
Verification complete! All criteria met.
Use `/flow-implement-complete` to mark this iteration done and move to the next one.
User: "How's the implementation going?"
AI Response:
Implementation progress for Iteration 2: Error Handling
Completed (3/5):
- [x] Create RetryPolicy class
- [x] Implement exponential backoff algorithm
- [x] Add configuration for max retries
In Progress (1/5):
- [ ] Integrate with StripeClient ā CURRENT (60% done)
Pending (1/5):
- [ ] Add tests for retry scenarios
Estimated completion: 1 hour
Working on integrating RetryPolicy with StripeClient.ts. Will move to tests next.
User: "Let's start building the retry logic"
AI Process:
1. Read current iteration from task file
2. Check brainstorming status: ā
COMPLETE (4 subjects resolved)
3. Check pre-tasks: ā
COMPLETE (updated ErrorHandler.ts)
4. Verify iteration status: šØ READY
AI Response:
"Ready to start implementation! All gates passed:
ā
Brainstorming complete (4 subjects resolved)
ā
Pre-tasks complete (ErrorHandler updated)
ā
Iteration status: READY
Action items from brainstorming (Type D):
- [ ] Create RetryPolicy class
- [ ] Implement exponential backoff algorithm
- [ ] Add configuration for max retries
- [ ] Integrate with StripeClient
- [ ] Add tests for retry scenarios
Use `/flow-implement-start` to begin, then I'll execute these action items."
User: "Start implementing the payment flow"
AI Process:
1. Read current iteration from task file
2. Check brainstorming: ā
COMPLETE
3. Check pre-tasks: Found 2 incomplete pre-tasks
AI Response:
"Cannot start implementation yet. Pre-tasks must be completed first:
ā Pre-Implementation Tasks - INCOMPLETE
Blocking tasks:
1. ā³ Pre-Task 1: Update PaymentStatus enum - Add PENDING_RETRY and FAILED_PERMANENT states
2. ā³ Pre-Task 2: Refactor PaymentService.process() - Extract validation logic to separate method
These must be done BEFORE main implementation. Should I complete these pre-tasks now?"
User: "Yes, complete them"
AI Process:
1. Complete Pre-Task 1 (update enum, update switch statements)
2. Mark Pre-Task 1 ā
COMPLETE with date and changes
3. Complete Pre-Task 2 (extract validation method)
4. Mark Pre-Task 2 ā
COMPLETE with date and changes
5. Verify all pre-tasks done
AI Response:
"All pre-tasks completed:
ā
Pre-Task 1: PaymentStatus enum updated (4 files modified)
ā
Pre-Task 2: Validation logic extracted (2 files modified)
Now ready for main implementation. Use `/flow-implement-start` to begin."
User: "I think we're done with this iteration"
AI Process:
1. Read current iteration action items
2. Check completion status
3. Verify each completion criterion
AI Response:
"Let me verify completion criteria:
ā
Action Items (5/5):
- [x] Create RetryPolicy class
- [x] Implement exponential backoff algorithm
- [x] Add configuration for max retries
- [x] Integrate with StripeClient
- [x] Add tests for retry scenarios
ā
Code Quality:
- No syntax errors
- Linting passed
- Follows project conventions
ā
Tests:
- Unit tests: 8/8 passing
- Integration tests: 2/2 passing
ā
Documentation:
- Files modified documented (4 files)
- Implementation notes updated
All verification criteria met! Use `/flow-implement-complete` to mark this iteration complete."
User: [AI is implementing action items]
AI Process:
1. Working on "Integrate RetryPolicy with StripeClient"
2. Discovers PaymentService.ts uses deprecated error format
3. Realizes this is out of scope
AI Response:
"ā ļø SCOPE BOUNDARY ALERT
While integrating RetryPolicy with StripeClient, I discovered:
**Issue**: PaymentService.ts uses deprecated error format that conflicts with new retry logic
**Impact**: Current action item can continue, but this will cause issues when we add retry to PaymentService later
**Options**:
A) Create pre-implementation task for NEXT iteration:
- Estimated: 20-30 minutes
- Update PaymentService error format
- Update 3 call sites
B) Add as new brainstorming subject:
- Design error format standard across all services
- Affects PaymentService, BillingService, OrderService
C) Handle immediately (expand current scope):
- Fix PaymentService.ts now
- Document as scope expansion
D) Defer to separate iteration:
- Work around for now (document workaround)
- Create new task for error format standardization
I recommend Option A (pre-task for next iteration) as it's small and blocking for future work. Which approach would you prefer?"
Design Stage (flow-designer Skill):
/flow-brainstorm-start - Design decisions/flow-brainstorm-complete - Generate action itemsBuild Stage (This Skill):
/flow-implement-start - Begin work ā YOU ARE HERE/flow-implement-complete - Finish iteration ā YOU ARE HERENavigation Stage (flow-navigator Skill):
/flow-status - Check progress/flow-next - What to do nextBefore implementing, verify ALL gates passed:
[ ] Brainstorming complete (if applicable)
[ ] Pre-implementation tasks complete (if applicable)
[ ] Current iteration status = šØ READY or ā³ PENDING
[ ] User confirmed ready to implement
If ALL checked ā Use /flow-implement-start
If ANY unchecked ā Address blockers first
Before marking complete, verify ALL criteria met:
[ ] All action items checked off
[ ] Code compiles/runs
[ ] Tests passing
[ ] Files modified documented
[ ] Implementation notes updated
[ ] No unresolved blockers
[ ] Verification completed
If ALL checked ā Use /flow-implement-complete
If ANY unchecked ā Continue implementation