The /build command executes implementation following the spec and plan, with progress tracking and deviation logging for full transparency.
Execute implementation following spec and plan, checking off tasks as work progresses and logging any deviations from the original approach.
/build [optional-iteration-instructions]
# First build
/build
# Iterative refinements
/build Change axios to fetch for HTTP requests
/build Add validation for empty email field
/build Use argon2 instead of bcrypt for password hashing
/build Fix failing test in auth.test.ts
When you run /build, Buildforce:
spec.yaml for requirementsplan.yaml for implementation stepsresearch.yaml (if exists) for patterns and context[ ] → [x]phase_1:
name: "Authentication Core"
tasks:
- [ ] Create authentication service
spec_refs: [FR1]
files: [src/auth/service.ts]
- [ ] Implement password hashing with bcrypt
spec_refs: [NFR2]
files: [src/auth/service.ts]
phase_1:
name: "Authentication Core"
tasks:
- [x] Create authentication service
spec_refs: [FR1]
files: [src/auth/service.ts]
- [x] Implement password hashing with bcrypt
spec_refs: [NFR2]
files: [src/auth/service.ts]
overall_progress:
phase_1: "2/2 tasks completed ✓"
current_status: |
Phase 1 complete. Authentication service created with bcrypt password hashing.
Moving to Phase 2: JWT integration.
/build Use argon2 instead of bcrypt
Deviation logged:
deviations:
- phase: "phase_1"
task: "Implement password hashing with bcrypt"
original: "Use bcrypt for password hashing"
actual: "Used argon2 for password hashing"
reason: "User requested argon2 for better security against GPU attacks"
Build supports multiple iterations with feedback:
# Iteration 1: Initial implementation
/build
# Review output, provide feedback
/build Add error handling for database connection failures
# Review again, refine further
/build Add retry logic with exponential backoff
# Final refinement
/build Add logging for all retry attempts
Each iteration:
/build, review output, then run /build [feedback] to iterate. Multiple iterations with small refinements produce better results than trying to do everything at once.tasks:
- [ ] Pending task
- [x] Completed task
- [ ] Another pending task
overall_progress:
phase_1: "2/2 tasks completed ✓"
phase_2: "1/3 tasks completed"
phase_3: "0/2 tasks completed"
current_status: |
Phase 1 complete. Phase 2 in progress: JWT middleware created,
working on token refresh endpoint. Phase 3 not started.
Deviations capture why implementation differs from plan:
deviations:
- phase: "phase_2"
task: "Create JWT middleware"
original: "Use express-jwt middleware"
actual: "Created custom middleware"
reason: "express-jwt doesn't support custom token extraction from cookies"
deviations:
- phase: "phase_1"
task: "Implement login endpoint"
original: "Return JWT in response body"
actual: "Return JWT in httpOnly cookie"
reason: "User requested cookie-based auth for better XSS protection"
deviations:
- phase: "phase_3"
task: "Add token refresh endpoint"
original: "Store refresh tokens in Redis"
actual: "Store refresh tokens in PostgreSQL"
reason: "Redis not configured in production environment, using main database"
After implementation, /build validates:
Code Quality:
Spec Requirements:
Plan Adherence:
After building, Buildforce provides:
What to Test:
How to Test:
Test Results:
## Testing Guidance
### Automated Tests
Run: `npm test src/auth/`
Expected: All tests pass
- ✅ login endpoint returns JWT for valid credentials
- ✅ login endpoint returns 401 for invalid credentials
- ✅ middleware rejects expired tokens
### Manual Testing
1. POST /auth/login with valid credentials
→ Should receive JWT token
2. Use JWT token in Authorization header
→ Should access protected routes
3. Wait 16 minutes (token expiration)
→ Should be rejected with 401
# First build: no arguments, just execute the plan
/build
# Be specific about what to change
/build Add input validation to check email format before database query
Don't reset or hide deviations—they tell the story of how implementation evolved:
deviations:
- # First iteration: changed library
- # Second iteration: added error handling
- # Third iteration: optimized performance
Don't rush to /complete. Run tests, verify features, ensure quality:
/build # Implement
# Test manually
/build Fix bug X # Refine
# Test again
/build Optimize Y # Polish
# Validate thoroughly
/complete # Only when confident
If implementation fails (compile errors, test failures), provide diagnostic info:
/build Fix TypeScript error: Property 'email' does not exist on type 'User'
Buildforce will: