Transform the current React Native gallery app into a reusable template system that combines smart AI-guided customization with OpenSpec workflow integration.
src/
├── components/
│ ├── atoms/ # Button, Icon, Badge, ProgressBar, etc.
│ ├── molecules/ # AlbumCard, SearchBar, ProcessingIndicator
│ ├── organisms/ # PhotoGrid, PhotoViewerModal, SettingsDrawer
│ └── templates/ # MainTemplate, OnboardingTemplate
├── screens/ # Main, Albums, Onboarding, Settings
├── contexts/ # Gallery, Navigation, Processing, Search, Settings, Toast
├── services/ # Background, database, media, ML, orchestrator
├── models/ # WatermelonDB models (MediaFile, Album, Label)
├── theme/ # Design tokens, useTheme hook
└── utils/ # Animations, constants, device utilities
Transform Codebase into Based Native App Template
Overview
Transform the current React Native gallery app into a reusable template system that combines smart AI-guided customization with OpenSpec workflow integration.
Current State Analysis
Tech Stack
Current Structure
Requirements from Discovery (5 Rounds)
Round 1: Core Architecture
Round 2: Technical Implementation
/* AI-INSTRUCTION-START:id ... AI-INSTRUCTION-END */Round 3: Project Structure
Round 4: Skeleton Details
Round 5: Deployment & Usage
Implementation Plan
Phase 1: Clean Skeleton Creation
Remove domain-specific code
Create minimal skeleton pages
Phase 2: Feature Flag System
Create template.config.json
Implement feature flags in code
Phase 3: AI Instruction System
Add AI instruction blocks throughout codebase
/* AI-INSTRUCTION-START:instruction-id ... AI-INSTRUCTION-END */Create openspec/ai-instructions/ directory
Phase 4: OpenSpec Integration
Fill out openspec/project.md with:
Set up OpenSpec structure
Phase 5: Setup Wizard System
Phase 6: Documentation & Polish
Write comprehensive README.md
Final cleanup & verification
Success Criteria
Estimated Scope
Deliverable
Production-ready React Native template with: