Advanced: Pipeline and Internal Mechanics
This chapter provides an in-depth explanation of AI App Factory's core mechanisms and advanced features, including the detailed working principles of the 7-stage pipeline, Sisyphus scheduler scheduling strategies, permission and security mechanisms, failure handling strategies, and how to optimize context to save token costs.
Prerequisites
Before studying this chapter, please ensure you have completed:
Chapter Contents
This chapter covers the following topics:
7-Stage Pipeline Deep Dive
Stage 1: Bootstrap - Structure Product Idea
- Learn how to transform vague product ideas into structured documentation
- Understand the input and output formats of the Bootstrap Agent
Stage 2: PRD - Generate Product Requirements Document
- Generate MVP-level PRD, including user stories, feature lists, and non-goals
- Master requirement decomposition and prioritization techniques
Stage 3: UI - Design Interface and Prototype
- Use ui-ux-pro-max skill to design UI structure and previewable prototypes
- Understand interface design workflow and best practices
Stage 4: Tech - Design Technical Architecture
- Design minimal viable technical architecture and Prisma data models
- Master technology selection and architecture design principles
Stage 5: Code - Generate Runnable Code
- Generate frontend and backend code, tests, and configurations based on UI Schema and Tech design
- Understand code generation workflow and template system
Stage 6: Validation - Validate Code Quality
- Validate dependency installation, type checking, Prisma schema, and code quality
- Master automated quality checking workflow
Stage 7: Preview - Generate Deployment Guide
- Generate complete running instructions and deployment configurations
- Learn CI/CD integration and Git Hooks configuration
Internal Mechanisms
- Understand how the scheduler coordinates the pipeline, manages state, and executes permission checks
- Master scheduling strategies and state machine principles
Context Optimization: Per-Session Execution
- Learn how to use the
factory continuecommand to save tokens - Master best practices for creating a new session at each stage
- Learn how to use the
Permissions and Security Mechanisms
- Understand capability boundary matrix, privilege escalation handling, and security check mechanisms
- Master security configuration and permission management
- Learn failure detection, retry mechanisms, rollback strategies, and manual intervention workflows
- Master troubleshooting and recovery techniques
Learning Path Recommendations
Recommended Learning Order
Complete the 7-Stage Pipeline First (in order)
- Bootstrap → PRD → UI → Tech → Code → Validation → Preview
- Each stage has clear inputs and outputs; learning in order builds a complete understanding
Then Learn the Scheduler and Context Optimization
- Understand how Sisyphus coordinates these 7 stages
- Learn how to optimize context to save token costs
Finally Learn Security and Failure Handling
- Master permission boundaries and security mechanisms
- Understand failure scenarios and response strategies
Focus Areas for Different Roles
| Role | Focus Chapters |
|---|---|
| Developer | Code, Validation, Tech, Orchestrator |
| Product Manager | Bootstrap, PRD, UI, Preview |
| Tech Lead | Tech, Code, Security, Failure Handling |
| DevOps Engineer | Validation, Preview, Context Optimization |
Next Steps
After completing this chapter, you can continue learning:
- FAQ & Troubleshooting - Resolve issues in actual use
- Best Practices - Master tips for efficient Factory usage
- CLI Command Reference - View complete command list
- Code Standards - Understand standards for generated code
💡 Tip: If you encounter issues during use, please first check the FAQ & Troubleshooting chapter.