$npx -y skills add digitalocean-labs/do-app-platform-skills --skill plannerGenerate staged project plans from design through deployment. Use when planning App Platform projects, breaking complex deployments into resumable stages, or tracking multi-step infrastructure setup.
| 1 | # Planner Skill |
| 2 | |
| 3 | Generate staged project plans that break complex projects into manageable, resumable steps - from initial design through coding, testing, to cloud deployment. |
| 4 | |
| 5 | > **Tip**: For a complete overview of all available skills, see the [root SKILL.md](../../SKILL.md). |
| 6 | |
| 7 | --- |
| 8 | |
| 9 | ## Greenfield vs Brownfield Detection |
| 10 | |
| 11 | | Scenario | Detection | Behavior | |
| 12 | |----------|-----------|----------| |
| 13 | | **Greenfield** | No Dockerfiles, no `.do/app.yaml` | Create artifacts from scratch | |
| 14 | | **Brownfield** | Dockerfiles and/or `.do/app.yaml` exist | Review, validate, enhance existing | |
| 15 | |
| 16 | The AI assistant automatically detects the project state. Don't recreate valid artifacts. The critical validation gate is `doctl app dev build` — if that passes, artifacts are correct. |
| 17 | |
| 18 | --- |
| 19 | |
| 20 | ## Why Staged Deployment? |
| 21 | |
| 22 | Complex App Platform deployments fail when executed monolithically: |
| 23 | |
| 24 | 1. **Blind deployment fails** - Deploying without infrastructure prep results in cryptic errors |
| 25 | 2. **Context is lost** - Credentials, cluster IDs, and progress are forgotten between sessions |
| 26 | 3. **Debugging is harder** - When everything deploys at once, it's unclear which component failed |
| 27 | 4. **Resumability is poor** - Starting over wastes time; partial progress isn't tracked |
| 28 | |
| 29 | --- |
| 30 | |
| 31 | ## Build Locally First |
| 32 | |
| 33 | **CRITICAL**: Always validate builds locally before cloud deployment. |
| 34 | |
| 35 | ```bash |
| 36 | doctl app dev build # Build using local app spec |
| 37 | doctl app dev build --app <APP_ID> # Build using existing deployed app |
| 38 | doctl app dev build --env-file .env # Build with environment overrides |
| 39 | ``` |
| 40 | |
| 41 | | Build Location | Feedback Time | Cost of Failure | |
| 42 | |----------------|---------------|-----------------| |
| 43 | | Cloud | 5-10 minutes | Wasted cycle, confusing logs | |
| 44 | | Local | 30-60 seconds | Immediate fix, clear errors | |
| 45 | |
| 46 | **Full details**: See [build-local-first.md](reference/build-local-first.md) |
| 47 | |
| 48 | --- |
| 49 | |
| 50 | ## Tier Classification |
| 51 | |
| 52 | ### Detection from User Description |
| 53 | |
| 54 | | User Mentions | Tier | |
| 55 | |--------------|------| |
| 56 | | "static", "frontend only", "no database", "SPA" | Tier 1 | |
| 57 | | "PostgreSQL", "MySQL", "database", "API + frontend" | Tier 2 | |
| 58 | | "Kafka", "OpenSearch", "workers", "event-driven", "microservices" | Tier 3 | |
| 59 | |
| 60 | ### Decision Tree |
| 61 | |
| 62 | ``` |
| 63 | Does user mention Kafka, OpenSearch, workers, or "event-driven"? |
| 64 | YES → Tier 3 (Complex) |
| 65 | NO → Does user mention database (PostgreSQL, MySQL, MongoDB)? |
| 66 | YES → Tier 2 (Database-backed) |
| 67 | NO → Tier 1 (Simple) |
| 68 | ``` |
| 69 | |
| 70 | ### Detection from app.yaml (Fallback) |
| 71 | |
| 72 | If `.do/app.yaml` exists: |
| 73 | - `workers` present → Tier 3 |
| 74 | - `databases` with `KAFKA` or `OPENSEARCH` → Tier 3 |
| 75 | - `databases` present → Tier 2 |
| 76 | - Neither → Tier 1 |
| 77 | |
| 78 | --- |
| 79 | |
| 80 | ## Tier Structures |
| 81 | |
| 82 | ### Tier 1: Simple (5 stages) |
| 83 | |
| 84 | **Criteria**: Static sites, single service, no database |
| 85 | |
| 86 | ``` |
| 87 | Plan/ |
| 88 | ├── 01-local-design.md |
| 89 | ├── 02-local-coding.md |
| 90 | ├── 03-local-testing.md |
| 91 | ├── 04-cloud-deploy.md |
| 92 | └── 05-cloud-validate.md |
| 93 | ``` |
| 94 | |
| 95 | **Examples**: Next.js static export, React SPA, Hugo site, Astro |
| 96 | |
| 97 | ### Tier 2: Database-Backed (7 stages) |
| 98 | |
| 99 | **Criteria**: 1-2 services, single database (PostgreSQL/MySQL) |
| 100 | |
| 101 | ``` |
| 102 | Plan/ |
| 103 | ├── 01-local-design.md |
| 104 | ├── 02-local-coding.md |
| 105 | ├── 03-local-testing.md |
| 106 | ├── 04-cloud-database.md |
| 107 | ├── 05-cloud-config.md |
| 108 | ├── 06-cloud-deploy.md |
| 109 | └── 07-cloud-validate.md |
| 110 | ``` |
| 111 | |
| 112 | **Examples**: Rails + PostgreSQL, Django + MySQL, Node.js API + Postgres |
| 113 | |
| 114 | ### Tier 3: Complex (9 stages) |
| 115 | |
| 116 | **Criteria**: Multi-service, workers, Kafka/OpenSearch, VPC networking |
| 117 | |
| 118 | ``` |
| 119 | Plan/ |
| 120 | ├── 01-local-design.md |
| 121 | ├── 02-local-coding.md |
| 122 | ├── 03-local-testing.md |
| 123 | ├── 04-cloud-database-clusters.md |
| 124 | ├── 05-cloud-config-users-topics.md |
| 125 | ├── 06-cloud-debug-validation.md |
| 126 | ├── 07-cloud-secrets-cicd.md |
| 127 | ├── 08-cloud-deploy-production.md |
| 128 | └── 09-cloud-end-to-end.md |
| 129 | ``` |
| 130 | |
| 131 | **Examples**: Event-driven microservices, ML pipelines, real-time analytics |
| 132 | |
| 133 | > **CRITICAL: Tier 3 apps MUST use GitHub Actions for deployment** |
| 134 | > |
| 135 | > Tier 3 apps have `${SECRET_NAME}` placeholders only resolved by `digitalocean/app_action/deploy@v2`. |
| 136 | > - Set `deploy_on_push: false` in `.do/app.yaml` |
| 137 | > - Deploy via `git push` (triggers GitHub Actions), NOT `doctl apps create` |
| 138 | |
| 139 | --- |
| 140 | |
| 141 | ## Stage Templates |
| 142 | |
| 143 | Stage templates are provided in the `templates/` directory: |
| 144 | |
| 145 | | Directory | Purpose | |
| 146 | |-----------|---------| |
| 147 | | `templates/local/` | Local stages 1-3 (all tiers) | |
| 148 | | `templates/tier-1-simple/` | Tier 1 cloud stages | |
| 149 | | `templates/tier-2-database/` | Tier 2 cloud stages | |
| 150 | | `templates/tier-3-complex/` | Tier 3 cloud stages | |
| 151 | |
| 152 | Each stage file follows this structure: |
| 153 | |
| 154 | ```markdown |
| 155 | # Stage N: [Stage Name] |
| 156 | |
| 157 | **Status**: TODO |
| 158 | **Prerequisites**: Stage N-1 complete |
| 159 | |
| 160 | ## Tasks |
| 161 | - [ ] Task description |
| 162 | - [ ] Expected outcome |
| 163 | |
| 164 | ## Verification |
| 165 | [Commands t |