The HaaS shift — Harness-as-a-Service and what to build vs buy — step 9 of 9
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:
- 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}
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:
- 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}
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.