promptdojo_
Checkpoint

One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.

Final checkpoint for the chapter. Write portfolio_route(projects) that takes a list of project profiles and returns a routing decision plus a per-runtime count.

Each project has: name, team_size, latency_critical (bool), vertical_constraints (bool), language.

Use the same decision rules as the previous drill:

  1. tiny solo + no vertical constraints → "build-your-own"
  2. TypeScript + no vertical constraints → "vercel-ai-sdk"
  3. Python + (latency_critical OR vertical) → "build-your-own"
  4. Python (otherwise) → "claude-agents-sdk"
  5. anything else + latency_critical → "build-your-own"
  6. anything else → "openai-agents-sdk"

Return a dict with two fields:

  • routes: dict mapping project name → recommended runtime (insertion order preserved)
  • counts: dict mapping runtime → count of projects using it (insertion order = first-seen order)

Five projects run. Expected output:

routes: {'frontend-agent': 'vercel-ai-sdk', 'support-bot': 'claude-agents-sdk', 'side-project': 'build-your-own', 'trading-helper': 'build-your-own', 'data-pipeline': 'claude-agents-sdk'}
counts: {'vercel-ai-sdk': 1, 'claude-agents-sdk': 2, 'build-your-own': 2}

this step needs the editor

on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.

open this same url on a laptop to keep going today.