Access Granted

    The Context
    Engineering Guide

    Prompt engineering tells AI what to do. Context engineering tells AI who it is. Here's how to build that.

    Prompt engineering is a dead end — not because it doesn't work, but because it doesn't compound.

    Every time you open a new chat with Claude, it starts from zero. You re-explain your role, your preferences, your context. You craft a careful prompt. The AI does something useful. You close the tab. Tomorrow you do it again.

    The problem isn't the quality of your prompts. It's that prompts are stateless. They don't build on each other. The AI doesn't get smarter about you from one session to the next.

    The core insight
    A prompt tells AI what to do in this moment. Context tells AI who it's working with, what it already knows, what rules it enforces, and what it's learned from previous work. The prompt is 5% of what determines usefulness. Context is the other 95%.

    The ceiling on prompt engineering is that you're always the one doing the work of providing context. You're the memory. You're the rulebook. You're the continuity.

    Context engineering inverts this. Instead of you providing context to AI on demand, you build a system that provides context automatically — before you type a single word.

    Prompt engineering vs Context engineering
    Prompt engineering
    • • Stateless — resets every session
    • • You are the memory
    • • Quality depends on your prompt craft
    • • Effort stays constant (or grows)
    • • Model-dependent — breaks on updates
    Context engineering
    • • Stateful — builds across sessions
    • • System is the memory
    • • Quality improves as system learns
    • • Effort decreases over time
    • • Model-agnostic — survives updates

    The goal isn't to write better prompts. It's to build a system so well-configured that prompts become nearly unnecessary — where the AI already knows what it needs to know before you ask.

    Want to know where your current setup sits on this spectrum? The Health Check MCP scores your setup in 60 seconds.
    npx @iwo-szapar/second-brain-health-check
    CE as an engineering discipline — four sub-problems
    Composition

    What context to include and from which sources. The answer is never 'everything.' It's the minimum set that makes the AI effective for this task.

    Ranking

    Which context gets loaded first when budget is constrained. Not all context is equal — critical rules and recent activity outrank general background.

    Optimization

    Pruning irrelevant content before it reaches the model. Active removal, not passive accumulation. Smaller and relevant beats larger and comprehensive.

    Orchestration

    Sequencing context assembly across tools and agents. Which agent reads what, when, in what order. The plumbing of a multi-agent setup.

    Critical warning

    Don't generate your CLAUDE.md or AGENTS.md with AI. Gloaguen et al. found that AI-generated context files reduce task performance by ~3% and increase cost by 20% or more compared to human-written files.

    Write your own. Keep them minimal. The model writing its own instructions is a tempting shortcut that consistently underperforms — the AI optimizes for completeness, not for signal-to-noise ratio.

    Next step

    The guide explains the framework.
    These products build it for you.

    Two products, one system. Start with the infrastructure, add the memory layer.

    Second Brain 2.0

    The complete Claude Code infrastructure — CLAUDE.md, 30+ agents, 20+ skills, progressive disclosure, and hooks. Every pattern from this guide, pre-configured.

    DIY $197 · Kickstart $597 · DWY $2,497

    See Second Brain 2.0
    MemoryOS

    The memory layer that makes the whole system compound. Patterns, decisions, and knowledge extracted automatically — personalized to your role and workflow.

    Free · Standard $199/yr · Pro $349/yr

    Get MemoryOS