AI Recipes
Practical step-by-step guides for solving real tasks with AI. Focus on problem-solving logic, not just tools.
Humans have working, long-term, and procedural memory — an agent needs the same. In 2026 memory stopped being an optimization and became an architectural requirement: without it every session starts from scratch, and the user explains the same thing for the third time in a row.
View RecipeAgents trust their first answer too much — and fail exactly where a human would reread and fix. Reflection forces the model to draft first, then critique, then revise — and quality jumps significantly.
View RecipeIn 2026 only 22% of people trust autonomous agents — and the EU AI Act explicitly requires human oversight for high-risk systems. An agent that knows when to pause and ask for approval at critical points is not a bug — it is a mandatory part of production architecture.
View RecipeMost teams run one premium LLM on everything — from classification to architectural decisions. A smart router classifies the request first, then dispatches to a cheap/mid/premium model — cutting cost 30-80% without a quality drop.
View Recipe87% of top models remain vulnerable to jailbreaks, EU AI Act fines reach €35M, and layered guardrails catch 95% of incidents collectively. We break down how to build defense at every seam of the pipeline: a single guardrail is no guardrail — just a feeling of one.
View RecipeEveryone builds agents, almost nobody measures them. We break down why classical tests don't work here, how to assemble your first eval dataset in an hour, the difference between end-to-end and trajectory evaluation, and how not to fool yourself with LLM-as-judge.
View RecipeThe cheapest LLM optimization isn't a smaller model or a smarter RAG — it's a properly structured prefix cache. We break down how caching actually works, where to place cache points, why segment order matters more than content, and how to measure hit-rate so you don't fool yourself.
View RecipeClassic RAG isn't the only way to build a personal knowledge base. We unpack Andrej Karpathy's idea: an LLM acting as a librarian that maintains a topical wiki from your raw notes. When it beats RAG, how the structure works, and what to do when it breaks.
View RecipeA voice agent isn't 'a text bot plus TTS'. It's an STT → LLM → TTS chain that has to respond before the human starts talking again. We break down the latency budget, turn-taking, interruption handling, and three typical streaming-pipeline breakdowns.
View RecipeVision agents clicking through websites are the hottest automation trend of 2026. We break down when you actually need one (not always), the difference between DOM and vision approaches, why 'click and wait 2 seconds' almost always breaks, and which boundaries are mandatory before you ship to production.
View RecipeAutomatically analyzes review sentiment and generates a personalized response. We break down the core principle: one complex prompt is a trap, a chain of simple ones is power. We build a workflow with branching for cases when the AI needs to call a human.
View RecipeMCP (Model Context Protocol) is like a USB interface for AI: a standard connector through which Claude plugs into any tool. We break down how to design and run your own MCP server — from choosing what tools to expose to making the first call from Claude Desktop.
View RecipeClassic RAG is a brainless conveyor: query, retrieve, answer. Agentic RAG is when the agent decides whether to search, what to search for, and whether the results are good enough. We break down how to turn a linear pipeline into a decision loop — using LangGraph and ChromaDB.
View RecipeCode review is a perfect task for an AI agent: it requires reading context, finding related files, and applying different criteria to different parts of code. We break down how to build an agent that reviews code like an experienced engineer — prioritizing findings, searching for context, and posting a structured report directly to GitHub.
View RecipeEvery company drowns in documents: invoices, contracts, requests, letters. AI can read them — but for this to work reliably, you need not one magic button, but a pipeline: first understand what the document is, then extract the needed data, then decide what to do with it. We break down how to build such a pipeline in n8n with the Claude API.
View RecipeCrewAI is a framework where multiple AI agents work as a real team: each with a dedicated role, tools, and area of responsibility. We break down how to build a research crew with a coordinator and specialists — from role design to debugging your first real scenario.
View RecipeThe front door to the harness series: four development modes — Classic (A), AI-Assisted (B), Agent-Driven (B+), Agent-First (C). It's not a ladder but four distinct bets: one mode is optimal for one team and catastrophic for another on the same project. This recipe helps you pick a mode and answers the meta-question of how much AI a project even needs. For B+/C a harness is mandatory (it leads on to the Harness Engineering recipe); for A/B it's barely needed.
View RecipeA harness-engineering hub: a five-layer environment, the four-phase route a task travels, barriers vs conventions, and the lessons-ledger as the autonomy core. With an interactive explorer and a series map — how to set up any project so a coding agent runs a task from framing to push with almost no supervision.
View RecipePhase 0 of the Harness Engineering series — entering an existing (brownfield) project. Before any AGENTS.md or linters, you audit: baseline.md inventories what already exists (structure, boundaries, conventions, test and CI state as a descriptive baseline), and environment.md pins down the stack and a tool-selection table (role → concrete tool) that every later phase consumes. With copyable audit-bootstrap prompts — stack-agnostic, for JS/TS, Python, Go, Java/Kotlin and any other stack.
View RecipePhase 1 of the Harness Engineering series — context engineering. A deep dive into the four sources of truth the agent reads at start: AGENTS.md (working rules + Definition of Done + the retrieve rule), a per-agent addendum (CLAUDE.md / .cursorrules / system prompt), architecture.md (the layer & boundary map), and the ADR catalog (one decision = one markdown). Minimal templates and ready-to-copy bootstrap prompts — stack-agnostic, for any language and any agent.
View RecipePhase 2 of the Harness Engineering series: ExecPlan is a living plan in the repo that keeps an agent on a long autonomous task (7–25 hours, dozens of files) without losing context. When to use it and when to skip, which sections the human writes before the start (Context, Goal, Out of scope, Approach) and which the agent fills as it goes (Progress, Decisions, Surprises). A copyable ExecPlan template, a 30-minute readiness diagnostic, and the live-update discipline. Stack-agnostic.
View RecipePhase 3 of the harness series: 'machine over text'. Turn architectural rules from text in docs/architecture.md into deterministic checks — import boundaries, dead code, cycles, strict types. A cross-stack 'role → tool' table (dependency-cruiser / import-linter, knip / ts-prune / vulture, madge, tsc / mypy), a test-integrity tripwire instead of a coverage mandate (Goodhart), pre-commit + CI as the enforcement points, and your own check scripts for whatever isn't covered. With copyable prompts and configs.
View RecipePhase 5 of the Harness Engineering series: small continuous payments against entropy. Scheduled drift checks — dead code, outdated dependencies, doc/code desync — that don't just alert but PRODUCE an artifact: a PR, an issue, an updated quality.md. A semi-automated quality.md (a script gathers the numbers, a human writes the interpretation ~15 min/week), a doc-freshness gate, scheduling in CI, and honesty about metrics (Goodhart). Stack-agnostic, with copyable prompts.
View RecipePhase 5.5 of the Harness Engineering series: your "wrong" becomes code, not a forgotten chat. A /wrong command captures the correction, normalize splits the fork: a computational lesson (machine-catchable) goes into the rails as a sensor edit, an inferential lesson (judgement needed) becomes a markdown file in lessons/<boundary>/ that the agent reads before the task (the retrieve rule). maintain dedups and promotes matured inferential lessons into sensors. The health metric is how many lessons graduated into sensors, not the size of the notebook. Stack-agnostic, with copyable prompts and an interactive.
View RecipePhase 6 of the Harness Engineering series: a skill is a SKILL.md encoding a repeatable procedure ('how to do a recurring task') that the agent auto-loads via the trigger in its description field. You learn to tell a skill apart from the lessons-ledger (which stores 'what NOT to repeat'), to mine skill candidates from commit history, to write the make-or-break description field with trigger phrases, to structure SKILL.md (When to use / Steps / DoD / Anti-patterns / Examples), and to wire the library into the agent's context file. Stack-agnostic, with a copyable template.
View RecipePhase 7 of the Harness Engineering series: the process of working with coding agents, not the harness itself. The cornerstone is one thread per one task (not per project): otherwise context gets polluted, the task "completes" prematurely on overflow, and the history turns unreadable. The worktree workflow (create a worktree → run the agent inside → finish → delete), Plan mode for non-trivial work, the ExecPlan threshold for long tasks (cross-link, not a re-teach), subagents as the delegation boundary, and the "3 stumbles → the next task fixes the environment" rule. The artifact is a "Working with coding agents" section in CONTRIBUTING.md. Stack-agnostic.
View RecipeThe final phase of the Harness Engineering series: package everything built across phases 0–5.5 into a forkable template repo. The harness stops being an artisanal per-project build and becomes a golden path. What goes in the template with project-specific cleanup (AGENTS.md / CLAUDE.md with stubs, the ExecPlan template, an ADR _template, environment.md with an EMPTY tool-selection table, deterministic-check configs as TODO templates, GC jobs as tool-agnostic contracts, only the universal .claude/skills/), the migration capsule (the portable mechanism + a curated _core vs project-bound noise), HOW_TO_FORK.md with a 2–3 day estimate, and the "living fork" horizon — a shared harness-kit. Stack- and infra-agnostic, with a copyable fork skeleton.
View RecipeAn interactive tool of the Harness Engineering series: pick a stack (JS/TS, Python, Java/Kotlin, Go, PHP) and get a personal setup. A role → tool table (boundary linter, dead code, strict types, cycles, security, pre-commit), a Definition of Done checklist across all rollout phases (0→8), and ready copy/download artifacts for your stack: an AGENTS.md skeleton, a pre-commit config and an ExecPlan template. The role is universal, the tool is an example to choose and pin once in an ADR. Stack-agnostic.
View Recipe