Learn the stack before AI builds it.
You can’t review code you don’t understand — and you can’t steer an AI tool through a stack you’ve never seen. Every technology, AI tool and integration in the Lab has official docs and hand-picked channels here, plus build-alongs that show what your project will look like.
Every piece of your stack, explained by people who build with it.
Official documentation first, then channels worth your time. “Recent tutorials” searches YouTube for this year’s material, because stacks move fast.
Loading…
Watch someone build what you’re planning.
Before you prompt, see a real build of the same shape: the structure, the rough edges, the time it takes.
Three runnable starting points.
Each lane is a small TypeScript + Fastify project with contracts, safe defaults and a preconfigured .cortex/.
Assistant app + API
A single assistant behind a typed API (POST /assist) with an OpenAPI contract, input validation and safe defaults.
cortex tutorial scaffold lane-a ./my-assistant
Workflow agent
Planner + executor with a fixed tool whitelist. safe mode plans only; execute runs approved tools.
cortex tutorial scaffold lane-b ./my-agent
MCP server
Contract-first tools with JSON-schema validation, typed errors and an audit-safe path for mutating tools.
cortex tutorial scaffold lane-c ./my-mcp
Your agent becomes the tutor.
These skills compile to Agent Skills for Claude Code, Codex, Cursor, Copilot, Gemini CLI and the rest — so whichever tool you open knows which phase you are in.
cortex add skill stack-selection cortex add skill tutorial-coach cortex add skill agent-foundations cortex add skill mcp-builder cortex add skill api-contract-engineering cortex compile
Six phases. Don’t skip ahead.
Finish a phase’s checklist before expanding. cortex tutorial phases shows the same roadmap in your terminal.
0Pick your lane and constraints
Write down target users, monthly budget ceiling, latency target, team size and stack familiarity, and your compliance boundary. Choose a primary and a fallback stack.
Constraints are approved · primary + fallback stack chosen · you know what success means in 30 days.
Picking a model or framework before defining latency and budget; microservices for a team under five; no fallback model.
Try the Lab to turn constraints into a stack and a ready .cortex/ config.
1Define contracts before code
Agent input/output/error schema, JSON schema for every tool, and OpenAPI contracts with a written versioning policy.
Every tool has a schema · every endpoint has success and error examples · the versioning policy is written.
Changing required fields without a version bump; ambiguous error payloads; no idempotency on writes.
2Build a basic agent safely
Validate input → bounded prompt context → model call with max tokens and a timeout → at most one approved tool → structured output.
Token budget, timeout and retry limits exist · tool whitelist exists · a suggest-only safe mode exists.
Letting the model invent tool arguments; no fallback for tool failures; prompt injection mixed with system policy.
3Add MCP capability
One read-only tool → strict validation and error mapping → one mutating tool with an audit log → capability discovery and version tags.
Schemas validated server-side · mutating tools enforce authorization · every call is auditable · compatibility policy documented.
Mutating tools without auth checks; internal exceptions leaking into responses; silent schema changes breaking clients.
4Evolve contracts and quality
Contract tests on every PR, golden prompt cases, evals for core journeys, and dashboards for latency, cost and failures.
≥ 10 golden eval cases · contract tests block breaking changes · dashboards show token cost and failure reasons.
Tuning prompts without regression tests; contract changes without migration notes; no incident path for model outages.
5Scale deliberately
In order: caching and retrieval quality → queue-based async execution → model routing and fallback → multi-tenant isolation and governance.
You can name your top 3 cost drivers · fail over between models · trace one request across every system.
Premature multi-agent orchestration; no governance on tool use and spend; no owner for contracts and model policy.
Compare current model prices and context windows on the model registry before choosing a routing policy.