A comprehensive software development lifecycle system that builds and ships Shopify features exactly like you would: Plan → Build → Test → Review → Ship, with 90% confidence gates at every stage and compound learning throughout.
This system replicates your complete development workflow with:
- 5 Phases: Prompt Engineering → Planning → Building → Testing → Code Review
- 8 Specialized Agents: Each handling one aspect of the workflow
- 90% Confidence Gates: At every phase, must reach 90% to proceed
- Compound Learning: System gets smarter after every feature
- Complexity Routing: Simple features skip phases, complex features get broken down
- Playwright Integration: Real browser testing for user-facing features
- Root Cause Analysis: No band-aid fixes, solve actual problems
.claude/
├── skills/build-feature/
│ ├── SKILL.md ← Main orchestrator
│ ├── README.md ← This file
│ └── scripts/
│ ├── confidence.js ← Objective calculator (all phases)
│ └── complexity-detector.js ← Auto-detects feature complexity
│
├── agents/
│ ├── prompt-engineer.md ← Phase 1: Structures requirements
│ ├── planner.md ← Phase 2: Creates detailed plans
│ ├── builder.md ← Phase 3: Implements features
│ ├── test-strategist.md ← Phase 4a: Decides testing approach
│ ├── playwright-tester.md ← Phase 4b: E2E testing
│ ├── unit-tester.md ← Phase 4c: Unit testing
│ ├── bug-analyzer.md ← Phase 4d: Root cause analysis
│ └── code-reviewer.md ← Phase 5: Reviews & optimizes
│
└── memory/ ← Compound learning storage
├── prompts/learned-patterns.md
├── planning/architecture-decisions.md
├── building/implementation-patterns.md
├── testing/playwright-scenarios.md
├── testing/common-bugs.md
└── review/optimization-patterns.md
/build-feature "Add wishlist button to product cards"The system will:
- Detect complexity (SIMPLE/MEDIUM/COMPLEX)
- Route through appropriate workflow
- Build with 90% confidence at each stage
- Test comprehensively (Playwright + Unit tests)
- Review and optimize code
- Capture learnings for next time
- Present production-ready feature
Simple Feature:
/build-feature "Change button color to red"→ Skips Prompt + Planning, goes directly to Build
Medium Feature:
/build-feature "Add size guide modal to product pages"→ Full workflow (all 5 phases)
Complex Feature:
/build-feature "Implement product recommendation engine"→ Full workflow + breaks into phases
Bug Fix:
/build-feature "Fix cart button not working on mobile"→ Auto-detects as bug fix, structures accordingly
Figma to Code:
/build-feature "Convert this Figma design to code [screenshot]"→ Auto-detects as UI implementation, includes visual testing
Goal: Convert raw prompt into structured requirement
Agent: prompt-engineer
Process:
- Auto-detect type (Feature/Bug/UI/Optimization)
- Auto-detect complexity (Simple/Medium/Complex)
- Structure requirement (Format A for simple, B for complex)
- Calculate requirement clarity confidence
- If < 90%: Ask clarifying questions
- Iterate until ≥ 90%
Output:
- Structured requirement document
- Acceptance criteria
- Test scenarios
- Possible approaches
Confidence Formula:
Clarity = (
Completeness × 40% +
Clarity × 40% +
Testability × 20%
)
Goal: Create detailed, executable implementation plan
Agent: planner
Process:
- Scan codebase for similar patterns
- Research best practices
- Identify integration points
- Plan for edge cases
- Create step-by-step TODOs
- If COMPLEX: Break into phases
- Calculate planning confidence
- If < 90%: Research more, ask questions
- Iterate until ≥ 90%
Output:
- Detailed plan with TODOs
- Files to create/modify
- Integration approach
- Edge case handling
- Pattern references
Confidence Formula:
Planning = (
Requirements Understanding × 25% +
Codebase Patterns Found × 25% +
Integration Clarity × 20% +
Edge Cases Identified × 15% +
Execution Sequence × 15%
)
Goal: Implement feature according to plan (or directly for simple)
Agent: builder
Process:
- Read plan (or prompt for simple features)
- Execute TODOs systematically
- Follow coding standards from CLAUDE.md
- Handle all edge cases
- Add documentation
- Self-assess alignment
- Calculate build confidence
- If < 90%: Analyze WHY (requirement/codebase/approach/plan issue)
- Take appropriate action based on root cause
- Iterate until ≥ 90%
Output:
- Feature implementation
- Files created/modified
- Integration complete
- Edge cases handled
- Documented code
Confidence Formula:
Build = (
Requirement Alignment × 30% +
Code Quality × 25% +
Edge Cases Handled × 20% +
Integration Correctness × 15% +
Feature Completeness × 10%
)
Goal: Comprehensive testing with Playwright + Unit tests, bug-free feature
Agents: test-strategist, playwright-tester, unit-tester, bug-analyzer
Process:
4a. Test Strategist:
- Analyze built feature
- Decide if Playwright needed (user interactions, complex UI, forms, etc.)
- Decide if unit tests needed (pure functions, business logic)
- Create test strategy document
4b. Playwright Tester (if needed):
- Write E2E tests for user interactions
- Run tests in real browser
- Report pass/fail rates
4c. Unit Tester (if needed):
- Write unit tests for functions
- Run tests
- Report results
4d. Bug Analyzer (for failures):
- Analyze test failures
- Find ROOT CAUSE (not symptom)
- Suggest proper fix
- Send to Builder one bug at a time
- Builder fixes, re-test
- Loop until all tests pass
Output:
- Comprehensive test suite
- All tests passing
- Bugs fixed at root cause
- Testing confidence ≥ 90%
Confidence Formula:
Testing = (
Playwright Tests × 30% +
Unit Tests × 25% +
Code Coverage × 20% +
Edge Cases × 15% +
Test Stability × 10%
)
Goal: Production-ready, optimized, maintainable code
Agent: code-reviewer
Process:
- Review all code against checklist:
- Code style
- Best practices
- Performance
- Security
- Accessibility
- Maintainability
- Documentation
- Apply optimizations
- ALWAYS re-test after changes
- If tests fail: Send back to Builder
- Calculate code quality confidence
- If < 90%: Apply more optimizations
- Iterate until ≥ 90%
Output:
- Optimized code
- All quality checks passed
- Tests still passing
- Production-ready feature
Confidence Formula:
Review = (
Code Style × 20% +
Best Practices × 25% +
Performance × 20% +
Security × 20% +
Maintainability × 15%
)
After each feature completion, learnings are captured to memory files:
.claude/memory/prompts/learned-patterns.md
- How users describe features
- Common clarification questions
- Patterns in requirements
.claude/memory/planning/architecture-decisions.md
- Architectural choices made
- Why certain approaches chosen
- Patterns discovered in codebase
.claude/memory/building/implementation-patterns.md
- Code patterns that work well
- How to handle specific integrations
- Edge case handling approaches
.claude/memory/testing/playwright-scenarios.md
- Reusable test scenarios
- Test patterns for common features
- What to test for different feature types
.claude/memory/testing/common-bugs.md
- Bugs found and their root causes
- How bugs were fixed
- How to prevent similar bugs
.claude/memory/review/optimization-patterns.md
- Code optimizations that worked
- Performance improvements
- Quality patterns
- During feature development: Agents read memory files
- Start with higher understanding: Past patterns inform current work
- After feature completion: Capture new learnings
- Next feature: Starts smarter than the last
Result: System gets faster and better over time (compound effect)
1. Complexity Detection
→ SIMPLE (score: 15%)
2. Skip Prompt Engineering
3. Skip Planning
4. Build
→ Change CSS/Tailwind class
→ Confidence: 95% ✅
5. Test
→ Visual check
→ Confidence: 92% ✅
6. Review
→ Quick check
→ Confidence: 94% ✅
7. Done
Total time: ~5 minutes
1. Complexity Detection
→ MEDIUM (score: 45%)
2. Prompt Engineering
→ Structure requirement
→ Clarify: storage method, UI behavior
→ Confidence: 92% ✅
3. Planning
→ Scan codebase, find patterns
→ Create plan with TODOs
→ Confidence: 91% ✅
4. Build
→ Create sections/wishlist.liquid
→ Create assets/wishlist.js
→ Handle edge cases
→ Confidence: 93% ✅
5. Test
→ Playwright: 15/15 tests passed
→ Unit: 6/6 tests passed
→ Confidence: 95% ✅
6. Review
→ Optimize long function
→ Add JSDoc
→ Remove console.logs
→ Re-test: All pass
→ Confidence: 94% ✅
7. Learn
→ Capture patterns to memory
8. Done
Total time: ~2 hours
Iterations: 7 (1 per phase + 1 test fix iteration)
1. Complexity Detection
→ COMPLEX (score: 85%)
2. Prompt Engineering
→ Comprehensive structure
→ Multiple clarifications
→ Confidence: 91% ✅
3. Planning
→ Break into 4 phases:
- Phase 1: Data structure
- Phase 2: Algorithm
- Phase 3: UI
- Phase 4: Integration
→ Detailed plan for Phase 1
→ Confidence: 93% ✅
4-7. Execute Phase 1
(Build → Test → Review → Learn)
8. Plan Phase 2
→ Detailed plan
→ Confidence: 92% ✅
9-12. Execute Phase 2
(Build → Test → Review → Learn)
... Continue for Phases 3 & 4
Final: Done
Total time: ~2 days (across multiple sessions)
All phases use 90% threshold. Adjust in confidence.js if needed.
- Prompt Engineering: Max 3 iterations
- Planning: Max 5 iterations
- Build: Max 5 iterations
- Testing: Max 10 iterations
- Code Review: Max 3 iterations
Playwright is used ONLY for:
- User interactions (clicks, inputs)
- Complex UI components
- Form submissions
- Cart/checkout flows
- Responsive/mobile features
- JavaScript-heavy features
- Cross-browser concerns
Simple features may not need Playwright.
node .claude/skills/build-feature/scripts/confidence.js <phase> <scores>
# Examples
node confidence.js prompt 100,90,85
node confidence.js planning 100,90,85,75,70
node confidence.js build 95,85,90,80,92
node confidence.js testing 100,95,85,90,88
node confidence.js review 95,90,88,92,85node .claude/skills/build-feature/scripts/complexity-detector.js "feature request"
# Output: SIMPLE | MEDIUM | COMPLEXThe system succeeds when:
- ✅ All confidence gates passed (≥90%)
- ✅ All tests passing (Playwright + Unit)
- ✅ Code review approved
- ✅ Feature meets requirements exactly
- ✅ Learnings captured for next time
- ✅ You're proud of the result
- 90% confidence gates prevent rushing
- Comprehensive testing catches bugs
- Code review ensures maintainability
- Compound learning makes each feature faster
- Patterns captured and reused
- No rework from unclear requirements
- Same high standards every time
- Follows your coding conventions
- Maintains architectural decisions
- Simple features are fast (skip phases)
- Complex features are managed (broken down)
- System adapts to feature size
- Gets smarter over time
- Builds institutional knowledge
- Prevents repeat mistakes
/build-feature "Add a 'Sale' badge to discounted products"Watch the system:
- Detect complexity
- Structure requirement
- Plan implementation
- Build feature
- Test thoroughly
- Review & optimize
- Capture learnings
Memory files will have:
- 10+ patterns learned
- 10+ architectural decisions
- 20+ implementation patterns
- 30+ test scenarios
- 15+ common bugs documented
- 10+ optimization patterns
Result: Feature #11 will be faster and better than Feature #1
- SKILL.md: Main orchestrator logic
- Each agent .md: Detailed instructions for that agent
- Memory files: Captured learnings
- CLAUDE.md: Project coding standards
You provide:
- Feature request (prompt)
- Answers to clarification questions
- Approval at key decision points
- Final git commit approval
System handles:
- Requirement structuring
- Implementation planning
- Code writing
- Testing (E2E + Unit)
- Bug fixing
- Code review
- Optimization
- Learning capture
You remain in control:
- System asks before major changes
- You approve plans before execution
- You review final result before commit
- You can interrupt at any phase
A system that builds and ships features exactly like you would, with:
- Your quality standards
- Your coding conventions
- Your thoroughness
- Your attention to detail
But faster and more consistent because:
- It remembers everything
- It doesn't skip steps
- It tests comprehensively
- It learns from mistakes
Ready to build features like never before! 🚀
Start with: /build-feature "your feature request"