ENV-003 recommended environment-tiers

Dev environment(s) exist

At least one dev environment for QA, method to deploy feature branches for testing

Question to ask

"Where does QA test feature branches before they hit staging?"

Verification guide

Severity: Recommended

Check automatically:

  1. Find dev/preview in workflow files:

    grep -r -l "dev\|preview\|review" .github/workflows/
    
  2. Check GitHub deployment history for dev/preview:

    gh api repos/{owner}/{repo}/deployments --jq '.[] | select(.environment | test("dev|preview|review"; "i")) | {env: .environment, ref: .ref, created: .created_at}' | head -20
    
  3. Check for preview deployment patterns (Vercel, Netlify auto-preview):

    gh pr list --state merged --limit 5 --json number | jq -r '.[].number' | xargs -I {} gh pr view {} --comments --json comments --jq '.comments[].body' | grep -i "preview\|deploy"
    
  4. Look for environment-per-PR patterns in workflows:

    grep -r "pull_request" .github/workflows/ | grep -l "deploy\|preview"
    

Ask user:

  • How many dev environments exist?
  • Are they persistent or ephemeral (per-PR)?
  • Dev environment URL(s) or URL pattern

Pass criteria:

  • At least one dev environment exists for QA
  • Method to deploy feature branches for testing

Fail criteria:

  • No dev environment (testing only on staging)
  • No way to test feature branches before merge

Evidence to capture:

  • Dev environment URL(s) or pattern
  • Ephemeral (per-PR) vs persistent
  • Workflow file path
  • How developers trigger a dev deploy

Cross-reference with:

  • ENV-001, ENV-002 (complete tier picture)
  • ENV-005 (dev should have verbose logging)

Section

04. Environments

Infrastructure & Setup