Complete Workflow Guide: From Idea to Production
A comprehensive step-by-step guide to building a complete application using Claude Craft, from initial idea to production deployment.
Overview
This guide walks you through the complete development lifecycle:
- Ideation - Define your product vision
- Requirements - Document what you're building
- Architecture - Design the technical solution
- Planning - Create actionable sprints
- Development - Implement with TDD
- Quality - Validate and test
- Deployment - Ship to production
Prerequisites:
- Claude Craft installed in your project
- Basic understanding of your chosen technology stack
- Claude Code running
Phase 1: Ideation (5-10 minutes)
Start with BMAD
# Initialize BMAD in your project
/bmad:init
# Or start a workflow
/workflow:initDefine the Vision
Work with the Product Manager agent:
@pm I want to build an e-commerce platform for selling artisanal products.
Key features:
- Product catalog with categories
- Shopping cart and checkout
- User authentication
- Order managementThe PM will help you:
- Clarify the problem you're solving
- Identify target users
- Define success metrics
Create Initial Vision Document
@pm Create a vision document for this projectOutput: docs/vision.md
Phase 2: Requirements (15-30 minutes)
Analyze Requirements
Work with the Business Analyst:
@ba Analyze requirements for the e-commerce platform based on the visionThe BA will:
- Break down features into user stories
- Identify dependencies
- Create a user story map
Create PRD
@pm Create a Product Requirements DocumentValidate PRD
/gate:validate-prd docs/prd.mdEnsure you pass the PRD Gate (≥80%):
- [ ] Problem statement defined
- [ ] Target users identified
- [ ] Goals clear
- [ ] Success metrics defined
- [ ] Scope boundaries set
Phase 3: Architecture (20-45 minutes)
Design Architecture
Work with the Architect:
@architect Design the system architecture for the e-commerce platform
Consider:
- Symfony backend with API Platform
- PostgreSQL database
- Redis caching
- Docker deploymentThe Architect will create:
- System architecture diagram
- Component design
- Data model
- API contracts
Create Technical Specification
@architect Create technical specification from the PRDOutput: docs/tech-spec.md
Document Decisions
For important choices:
@architect Create an ADR for choosing JWT over session-based authOutput: docs/adr/001-jwt-authentication.md
Validate Tech Spec
/gate:validate-techspec docs/tech-spec.mdEnsure you pass the Tech Spec Gate (≥90%):
- [ ] Architecture documented
- [ ] API contracts defined
- [ ] Security addressed
- [ ] Performance requirements set
- [ ] Testing strategy defined
- [ ] Deployment plan created
Phase 4: Planning (15-30 minutes)
Create Backlog
Work with the Product Owner:
@po Create user stories from the technical specification
Prioritize using MoSCoW methodThe PO will create stories like:
EPIC-001: User Authentication
├── US-001: User registration
├── US-002: User login
├── US-003: Password reset
└── US-004: Social login
EPIC-002: Product Catalog
├── US-005: Browse products
├── US-006: Product search
├── US-007: Category filtering
└── US-008: Product detailsValidate Backlog
/gate:validate-backlogEach story must pass INVEST:
- Independent
- Negotiable
- Valuable
- Estimable
- Small
- Testable
Plan First Sprint
Work with the Scrum Master:
@sm Plan sprint 1 with the highest priority stories
Include:
- US-001: User registration
- US-002: User login
- US-005: Browse productsValidate Sprint
/gate:validate-sprintPhase 5: Development (Variable)
Start Sprint Development
/sprint:dev 1Or work story by story:
5.1 Get Next Story
/sprint:next-story --claimExample: US-001 (User Registration)
5.2 Transition to In-Progress
/sprint:transition US-001 in-progress5.3 TDD Red Phase (Write Failing Test)
Work with the Developer agent:
@dev Start TDD for US-001 (User Registration)
Begin with 🔴 Red phase - write failing testsCreate tests first:
// tests/Feature/UserRegistrationTest.php
class UserRegistrationTest extends TestCase
{
public function test_user_can_register_with_valid_data(): void
{
$response = $this->post('/api/register', [
'email' => 'test@example.com',
'password' => 'SecurePass123!',
'name' => 'Test User'
]);
$response->assertStatus(201);
$this->assertDatabaseHas('users', ['email' => 'test@example.com']);
}
}5.4 TDD Green Phase (Implement)
@dev Now implement 🟢 Green phase - make tests passGenerate code:
/symfony:generate-crud User5.5 TDD Refactor Phase
@dev 🔵 Refactor - clean up the implementation5.6 Code Review
@symfony-reviewer Review the user registration implementation5.7 Validate Story DoD
/gate:validate-story US-0015.8 Transition to Review
/sprint:transition US-001 review5.9 QA Validation
@qa Validate acceptance criteria for US-0015.10 Complete Story
/sprint:transition US-001 done5.11 Repeat
Continue with next story until sprint complete.
Phase 6: Quality (Throughout)
Continuous Quality Checks
Run regularly during development:
# Architecture check
/symfony:check-architecture
# Code quality
/symfony:check-code-quality
# Security audit
/symfony:check-security
# Test coverage
/symfony:check-testingFull Audit Before Release
/team:audit --sequentialPre-Commit Validation
Always before committing:
/common:pre-commit-checkSprint Review
At end of sprint:
@sm Run sprint review for sprint 1Retrospective
@sm Run sprint retrospectivePhase 7: Deployment (30-60 minutes)
Prepare Docker Configuration
@docker-architect Design Docker architecture for productionCreate Docker Files
/docker:compose-setup symfony postgresql redisCreate CI/CD Pipeline
/docker:cicd-pipeline github-actionsSecurity Check
/docker:security-scanPre-Release Checklist
/common:release-checklistDeploy
# Build and test
docker compose -f docker-compose.prod.yml build
docker compose -f docker-compose.prod.yml up -d
# Run migrations
docker compose exec app php bin/console doctrine:migrations:migrate
# Verify health
curl https://your-app.com/healthUsing Ralph for Automation
For automated development cycles, use Ralph Wiggum:
# Implement a feature automatically
/common:ralph-run "Implement user registration with TDD"
# With full DoD checks
/common:ralph-run --full "Add password reset feature"Ralph will iterate until:
- All tests pass
- Lint passes
- DoD validators pass
Complete Command Sequence
Here's a condensed sequence for a typical feature:
# 1. Initialize
/bmad:init
# 2. Define (PM)
@pm Create PRD for the feature
/gate:validate-prd docs/prd.md
# 3. Design (Architect)
@architect Create technical specification
/gate:validate-techspec docs/tech-spec.md
# 4. Plan (PO + SM)
@po Create user stories
@sm Plan sprint 1
/gate:validate-sprint
# 5. Develop (Dev)
/sprint:next-story --claim
@dev Implement with TDD
/gate:validate-story US-001
/sprint:transition US-001 done
# 6. Review (QA)
@qa Validate acceptance criteria
/team:audit --sequential
# 7. Deploy
/docker:cicd-pipeline github-actions
/common:release-checklistTips for Success
1. Don't Skip Quality Gates
Each gate catches different issues:
- PRD Gate → Prevents building the wrong thing
- Tech Spec Gate → Prevents architectural issues
- Backlog Gate → Ensures stories are implementable
- Story DoD → Ensures quality code
2. Use Agents Collaboratively
Let agents hand off to each other:
@bmad-master Route this to the appropriate agent3. TDD is Non-Negotiable
Always follow 🔴 Red → 🟢 Green → 🔵 Refactor.
4. Document Decisions
Use ADRs for important choices:
@architect Create ADR for choosing X over Y5. Regular Reviews
- Daily:
/common:daily-standup - End of Sprint:
@sm Run sprint review - Continuous:
@{tech}-reviewer Review this code
Troubleshooting
Quality Gate Fails
/gate:reportCheck which criteria are missing.
Story Blocked
/sprint:transition US-001 blocked --reason="Waiting for API"Need to Rollback
If using Ralph with Git checkpointing:
git log --oneline --grep="[ralph]"
git reset --hard HEAD~3Next Steps
- BMAD Practical Guide - Deep dive into BMAD
- Ralph Wiggum Guide - Automated development
- Commands Reference - All available commands
- Agents Reference - All available agents
