Full-Stack Web Application Playbook
This playbook guides you through executing a full-stack web application mission. Use this for CRUD apps, dashboards, e-commerce sites, and similar projects with distinct frontend and backend layers.
Milestone Strategy: Vertical Slices
Structure your milestones as vertical slices of functionality, not horizontal layers.
Good milestones:
- "user-auth" (login, signup, sessions - full stack)
- "product-catalog" (listing, search, detail pages - full stack)
- "checkout" (cart, payment, confirmation - full stack)
Bad milestones:
- "all-api-endpoints" (horizontal - can't test in isolation)
- "frontend-pages" (horizontal - can't test without backend)
Each milestone should leave the app in a coherent, testable state where a user can complete a meaningful flow.
Walking Skeleton First
Before any real feature implementation, establish a walking skeleton that spans the full user-facing surface with the thinnest possible implementation.
Why: This lets work-scrutiny-validator determine testing needs and user-testing-validator exercise the complete surface from the start. Prevents building features in isolation only to discover integration issues later.
What to include:
- All planned UI pages (can be stubs/placeholders)
- All planned API endpoints (can return mock data)
- All planned CLI commands (can be no-ops)
- Basic routing and navigation
Skeleton milestone should be first. Once the skeleton exists, subsequent milestones fill in real functionality.
Worker Types for Full-Stack
frontend-worker
- Implements UI features (pages, components, state)
- TDD: Write component/integration tests FIRST (before any implementation)
- MUST do manual browser verification with agent-browser CLI:
- Visual quality is essential - check for:
- Placement and alignment issues
- Z-index problems (overlapping, hidden elements)
- Overflow and content clipping/scroll issues
- Inconsistent margins/padding
- Missing states (hover/focus/disabled/loading/empty/error)
- Fix issues found:
- Issues with own work (including from manual testing) → must fix
- Manageable existing issues under their skill → fix them
- Large scope or outside their skill → report to orchestrator
- Include any fixes in whatWasImplemented
backend-worker
- Implements API endpoints and services
- TDD: Write API tests FIRST (before any implementation)
- Verifies actual endpoint behavior (not just tests passing)
- Fix issues found:
- Issues with own work (including from manual testing) → must fix
- Manageable existing issues under their skill → fix them
- Large scope or outside their skill → report to orchestrator
- Include any fixes in whatWasImplemented
Quality Enforcement Flow
1. Orchestrator creates implementation features grouped by milestone
2. Implementation workers build features (TDD + manual verification)
3. When milestone X completes → system injects work-scrutiny-validator
4. Work-scrutiny validates handoffs match diffs, re-runs tests
5. Work-scrutiny determines what user testing is needed and creates testing features
6. User-testing validates user flows via browser (if UI) or appropriate surface
7. Failed validation surfaces bugs → orchestrator creates fix features
8. Repeat until milestone passes, then move to next milestone
Common Pitfalls
Building backend without frontend - Leads to API designs that don't match UI needs. Build vertical slices instead.
Skipping the skeleton - Causes integration issues late in the mission. Always start with skeleton.
Features too large - "Build the product page" is too big. Break into: "product list", "product detail", "product search", etc.
Forgetting error states - Workers often implement happy path only. expectedBehavior should include error cases.
Not testing cross-feature interactions - Login affects what's visible in the catalog. Test these connections.
No lasting test infrastructure - Per-worker TDD produces unit/integration tests, but consider whether the mission also needs dedicated features for shared test fixtures, seed data, or e2e test suites - especially when building on an existing codebase that already has e2e coverage.
Example Milestone Breakdown
For an e-commerce app:
Milestone: skeleton
- Stub all routes (home, catalog, product, cart, checkout, auth)
- Stub all API endpoints
- Basic navigation between pages
Milestone: user-auth
- Login page + endpoint
- Signup page + endpoint
- Session management
- Protected route handling
Milestone: product-catalog
- Product list page + endpoint
- Product detail page + endpoint
- Product search + filtering
Milestone: checkout
- Cart management (add, remove, update quantity)
- Checkout flow (shipping, payment)
- Order confirmation
Example: backend-worker Skill
---
name: backend-worker
description: Implement backend features including API endpoints, services, and business logic.
---
# Backend Worker
## When to Use This Skill
Features involving API endpoints, backend services, database operations, or server-side logic.
## Work Procedure
### 1. Understand the Feature
Read the feature's description, expectedBehavior, and preconditions.
Identify endpoints/services to create, input/output shapes, and error cases.
### 2. Write Tests First (TDD)
Before implementing, write tests that define expected behavior:
- API tests: request/response shapes, status codes, error responses
- Unit tests: service logic, edge cases
Run tests - they should fail (red).
### 3. Implement
Write minimum code to make tests pass. Follow patterns in AGENTS.md.
Run tests - they should pass (green).
### 4. Manual Verification
Tests passing isn't enough. Actually call the endpoints:
- Make real HTTP requests (curl, httpie, or similar)
- Test error cases manually
- Check logs for unexpected errors
### 5. Fix Issues Found
- Issues with your own work (including from manual verification) → must fix
- Manageable existing issues that fall under your skill → fix them
- Large scope issues or outside your skill → report to orchestrator in discoveredIssues
Include any fixes in whatWasImplemented.
### 6. Run Verification Steps
Execute each step in the feature's verificationSteps array.
## Handoff Requirements
Use the EndFeatureRun tool with structured handoff. Here's what thorough work looks like:
### Example Handoff (Product Search Endpoint)
```json
{
"whatWasImplemented": "GET /api/products/search endpoint with query parameter, relevance sorting, pagination via cursor, and input validation requiring minimum 2-character queries. Also fixed existing bug in GET /api/products/:id that was returning soft-deleted products.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{
"command": "npm test -- --grep 'product search'",
"exitCode": 0,
"observation": "4 tests passed: 'returns matching products sorted by relevance', 'returns empty array for no matches', 'paginates with cursor', 'rejects query under 2 chars'"
},
{
"command": "curl 'http://localhost:3000/api/products/search?q=wireless+headphones&limit=5'",
"exitCode": 0,
"observation": "returned 5 products, first was Sony WH-1000XM5 with score 0.94, response included cursor eyJvZmZzZXQiOjV9"
},
{
"command": "curl 'http://localhost:3000/api/products/search?q=xyznonexistent'",
"exitCode": 0,
"observation": "returned {\"results\":[],\"message\":\"No products found matching 'xyznonexistent'\"}"
},
{
"command": "curl 'http://localhost:3000/api/products/search?q=a'",
"exitCode": 0,
"observation": "returned 400 with {\"error\":\"Query must be at least 2 characters\",\"code\":\"INVALID_QUERY\"}"
}
],
"interactiveChecks": []
},
"tests": {
"added": [
{
"file": "tests/api/product-search.test.ts",
"cases": [
{
"name": "returns matching products sorted by relevance",
"verifies": "basic search returns results ordered by score descending"
},
{
"name": "returns empty array with message for no matches",
"verifies": "graceful handling when nothing matches query"
},
{
"name": "paginates results with cursor",
"verifies": "cursor-based pagination for large result sets"
},
{
"name": "returns 400 for query under 2 characters",
"verifies": "input validation rejects too-short queries"
}
]
}
],
"coverage": "search query handling, relevance sorting, pagination, input validation, empty results"
},
"discoveredIssues": [
{
"severity": "suggestion",
"description": "Response time ~800ms for common terms like 'phone' - requires DB indexing or caching layer (outside feature scope)",
"suggestedFix": "Consider adding search index or caching layer"
}
]
}
```
## When to Return to Orchestrator
- Requirements are ambiguous or contradictory
- Existing bugs affect this feature
- Scope is larger than expected (e.g., requires unmentioned migration)
- Design decision affects other features
```
1---2name: full-stack-playbook3description: Playbook for full-stack web application missions. Provides guidance on vertical slice milestones, walking skeleton, frontend/backend workers, and quality enforcement. Use for CRUD apps, dashboards, e-commerce sites, and similar projects with distinct frontend and backend layers.4---56# Full-Stack Web Application Playbook78This playbook guides you through executing a full-stack web application mission. Use this for CRUD apps, dashboards, e-commerce sites, and similar projects with distinct frontend and backend layers.910## Milestone Strategy: Vertical Slices1112Structure your milestones as **vertical slices** of functionality, not horizontal layers.1314**Good milestones:**15- "user-auth" (login, signup, sessions - full stack)16- "product-catalog" (listing, search, detail pages - full stack)17- "checkout" (cart, payment, confirmation - full stack)1819**Bad milestones:**20- "all-api-endpoints" (horizontal - can't test in isolation)21- "frontend-pages" (horizontal - can't test without backend)2223Each milestone should leave the app in a coherent, testable state where a user can complete a meaningful flow.2425## Walking Skeleton First2627Before any real feature implementation, establish a **walking skeleton** that spans the full user-facing surface with the thinnest possible implementation.2829**Why:** This lets work-scrutiny-validator determine testing needs and user-testing-validator exercise the complete surface from the start. Prevents building features in isolation only to discover integration issues later.3031**What to include:**32- All planned UI pages (can be stubs/placeholders)33- All planned API endpoints (can return mock data)34- All planned CLI commands (can be no-ops)35- Basic routing and navigation3637**Skeleton milestone should be first.** Once the skeleton exists, subsequent milestones fill in real functionality.3839## Worker Types for Full-Stack4041### frontend-worker4243- Implements UI features (pages, components, state)44- **TDD: Write component/integration tests FIRST (before any implementation)**45- **MUST do manual browser verification with agent-browser CLI:**46- **Visual quality is essential** - check for:47 - Placement and alignment issues48 - Z-index problems (overlapping, hidden elements)49 - Overflow and content clipping/scroll issues50 - Inconsistent margins/padding51 - Missing states (hover/focus/disabled/loading/empty/error)52- **Fix issues found:**53 - Issues with own work (including from manual testing) → must fix54 - Manageable existing issues under their skill → fix them55 - Large scope or outside their skill → report to orchestrator56 - Include any fixes in whatWasImplemented5758### backend-worker5960- Implements API endpoints and services61- **TDD: Write API tests FIRST (before any implementation)**62- Verifies actual endpoint behavior (not just tests passing)63- **Fix issues found:**64 - Issues with own work (including from manual testing) → must fix65 - Manageable existing issues under their skill → fix them66 - Large scope or outside their skill → report to orchestrator67 - Include any fixes in whatWasImplemented6869## Quality Enforcement Flow7071```text721. Orchestrator creates implementation features grouped by milestone732. Implementation workers build features (TDD + manual verification)743. When milestone X completes → system injects work-scrutiny-validator754. Work-scrutiny validates handoffs match diffs, re-runs tests765. Work-scrutiny determines what user testing is needed and creates testing features776. User-testing validates user flows via browser (if UI) or appropriate surface787. Failed validation surfaces bugs → orchestrator creates fix features798. Repeat until milestone passes, then move to next milestone80```8182## Common Pitfalls83841. **Building backend without frontend** - Leads to API designs that don't match UI needs. Build vertical slices instead.85862. **Skipping the skeleton** - Causes integration issues late in the mission. Always start with skeleton.87883. **Features too large** - "Build the product page" is too big. Break into: "product list", "product detail", "product search", etc.89904. **Forgetting error states** - Workers often implement happy path only. expectedBehavior should include error cases.91925. **Not testing cross-feature interactions** - Login affects what's visible in the catalog. Test these connections.93946. **No lasting test infrastructure** - Per-worker TDD produces unit/integration tests, but consider whether the mission also needs dedicated features for shared test fixtures, seed data, or e2e test suites - especially when building on an existing codebase that already has e2e coverage.9596## Example Milestone Breakdown9798For an e-commerce app:99100**Milestone: skeleton**101- Stub all routes (home, catalog, product, cart, checkout, auth)102- Stub all API endpoints103- Basic navigation between pages104105**Milestone: user-auth**106- Login page + endpoint107- Signup page + endpoint108- Session management109- Protected route handling110111**Milestone: product-catalog**112- Product list page + endpoint113- Product detail page + endpoint114- Product search + filtering115116**Milestone: checkout**117- Cart management (add, remove, update quantity)118- Checkout flow (shipping, payment)119- Order confirmation120121### Example: backend-worker Skill122123````markdown124---125name: backend-worker126description: Implement backend features including API endpoints, services, and business logic.127---128129# Backend Worker130131## When to Use This Skill132133Features involving API endpoints, backend services, database operations, or server-side logic.134135## Work Procedure136137### 1. Understand the Feature138139Read the feature's description, expectedBehavior, and preconditions.140Identify endpoints/services to create, input/output shapes, and error cases.141142### 2. Write Tests First (TDD)143144Before implementing, write tests that define expected behavior:145146- API tests: request/response shapes, status codes, error responses147- Unit tests: service logic, edge cases148149Run tests - they should fail (red).150151### 3. Implement152153Write minimum code to make tests pass. Follow patterns in AGENTS.md.154Run tests - they should pass (green).155156### 4. Manual Verification157158Tests passing isn't enough. Actually call the endpoints:159160- Make real HTTP requests (curl, httpie, or similar)161- Test error cases manually162- Check logs for unexpected errors163164### 5. Fix Issues Found165166- Issues with your own work (including from manual verification) → must fix167- Manageable existing issues that fall under your skill → fix them168- Large scope issues or outside your skill → report to orchestrator in discoveredIssues169170Include any fixes in whatWasImplemented.171172### 6. Run Verification Steps173174Execute each step in the feature's verificationSteps array.175176## Handoff Requirements177178Use the EndFeatureRun tool with structured handoff. Here's what thorough work looks like:179180### Example Handoff (Product Search Endpoint)181182```json183{184 "whatWasImplemented": "GET /api/products/search endpoint with query parameter, relevance sorting, pagination via cursor, and input validation requiring minimum 2-character queries. Also fixed existing bug in GET /api/products/:id that was returning soft-deleted products.",185 "whatWasLeftUndone": "",186 "verification": {187 "commandsRun": [188 {189 "command": "npm test -- --grep 'product search'",190 "exitCode": 0,191 "observation": "4 tests passed: 'returns matching products sorted by relevance', 'returns empty array for no matches', 'paginates with cursor', 'rejects query under 2 chars'"192 },193 {194 "command": "curl 'http://localhost:3000/api/products/search?q=wireless+headphones&limit=5'",195 "exitCode": 0,196 "observation": "returned 5 products, first was Sony WH-1000XM5 with score 0.94, response included cursor eyJvZmZzZXQiOjV9"197 },198 {199 "command": "curl 'http://localhost:3000/api/products/search?q=xyznonexistent'",200 "exitCode": 0,201 "observation": "returned {\"results\":[],\"message\":\"No products found matching 'xyznonexistent'\"}"202 },203 {204 "command": "curl 'http://localhost:3000/api/products/search?q=a'",205 "exitCode": 0,206 "observation": "returned 400 with {\"error\":\"Query must be at least 2 characters\",\"code\":\"INVALID_QUERY\"}"207 }208 ],209 "interactiveChecks": []210 },211 "tests": {212 "added": [213 {214 "file": "tests/api/product-search.test.ts",215 "cases": [216 {217 "name": "returns matching products sorted by relevance",218 "verifies": "basic search returns results ordered by score descending"219 },220 {221 "name": "returns empty array with message for no matches",222 "verifies": "graceful handling when nothing matches query"223 },224 {225 "name": "paginates results with cursor",226 "verifies": "cursor-based pagination for large result sets"227 },228 {229 "name": "returns 400 for query under 2 characters",230 "verifies": "input validation rejects too-short queries"231 }232 ]233 }234 ],235 "coverage": "search query handling, relevance sorting, pagination, input validation, empty results"236 },237 "discoveredIssues": [238 {239 "severity": "suggestion",240 "description": "Response time ~800ms for common terms like 'phone' - requires DB indexing or caching layer (outside feature scope)",241 "suggestedFix": "Consider adding search index or caching layer"242 }243 ]244}245```246247## When to Return to Orchestrator248249- Requirements are ambiguous or contradictory250- Existing bugs affect this feature251- Scope is larger than expected (e.g., requires unmentioned migration)252- Design decision affects other features253```