lesson 5 of 6 · the haas shift — harness-as-a-service and what to build vs buythe haas shift — harness-as-a-service and what to build vs buylesson 5 of 6 · the haas shift — harness-as-a-service and what to build vs buythe haas shift — harness-as-a-service and what to build vs buylesson 5 of 6 · the haas shift — harness-as-a-service and what to build vs buythe haas shift — harness-as-a-service and what to build vs buylesson 5 of 6 · the haas shift — harness-as-a-service and what to build vs buythe haas shift — harness-as-a-service and what to build vs buylesson 5 of 6 · the haas shift — harness-as-a-service and what to build vs buythe haas shift — harness-as-a-service and what to build vs buylesson 5 of 6 · the haas shift — harness-as-a-service and what to build vs buythe haas shift — harness-as-a-service and what to build vs buylesson 5 of 6 · the haas shift — harness-as-a-service and what to build vs buythe haas shift — harness-as-a-service and what to build vs buylesson 5 of 6 · the haas shift — harness-as-a-service and what to build vs buythe haas shift — harness-as-a-service and what to build vs buylesson 5 of 6 · the haas shift — harness-as-a-service and what to build vs buythe haas shift — harness-as-a-service and what to build vs buylesson 5 of 6 · the haas shift — harness-as-a-service and what to build vs buythe haas shift — harness-as-a-service and what to build vs buylesson 5 of 6 · the haas shift — harness-as-a-service and what to build vs buythe haas shift — harness-as-a-service and what to build vs buy
Checkpoint
One last thing before we move on. pass this to mark the lesson done, or skip and keep moving. hop to the next when you're ready.
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:
- tiny solo + no vertical constraints →
"build-your-own" - TypeScript + no vertical constraints →
"vercel-ai-sdk" - Python + (latency_critical OR vertical) →
"build-your-own" - Python (otherwise) →
"claude-agents-sdk" - anything else + latency_critical →
"build-your-own" - 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}