Context-Engineering Handbook — Prompt Files (Verbatim Excerpts)
Excerpt 1: Foundation 01 — Atoms: The Fundamental Unit
Source: 00_foundations/01_atoms_prompting.md
Prompting technique described: Atomic prompt decomposition — breaking a prompt into TASK + CONSTRAINTS + OUTPUT FORMAT as the baseline measurement primitive.
## The Anatomy of an Atomic Prompt
Let's break down what makes an effective atomic prompt:
┌─────────────────────────────────────────────────────────────┐
│ │
│ ATOMIC PROMPT = [TASK] + [CONSTRAINTS] + [OUTPUT FORMAT] │
│ │
└─────────────────────────────────────────────────────────────┘
## The Limitations of Atoms
While atomic prompts are the building blocks of LLM interactions, they quickly reveal fundamental limitations:
┌──────────────────────────────────────┐
│ LIMITATIONS OF ATOMIC PROMPTS │
├──────────────────────────────────────┤
│ ✗ No memory across interactions │
│ ✗ Limited demonstration capability │
│ ✗ No complex reasoning scaffolds │
│ ✗ Prone to ambiguity │
│ ✗ High variance in outputs │
└──────────────────────────────────────┘
Source: 00_foundations/05_cognitive_tools.md
Prompting technique described: Cognitive tool patterns — structured prompt templates that function as reasoning tool calls, analogous to human heuristics. The IBM Zurich paper showed these increase GPT-4.1 AIME2024 performance from 26.7% to 43.3%.
### From Biology to Cognition
Our journey through context engineering has followed a biological metaphor:
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ │ │ │ │ │ │ │
│ Atoms │────►│ Molecules│────►│ Cells │────►│ Organs │
│ │ │ │ │ │ │ │
└──────────┘ └──────────┘ └──────────┘ └──────────┘
│ │ │ │
▼ ▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ │ │ │ │ │ │ │
│ Prompts │ │ Few-shot │ │ Memory │ │ Multi │
│ │ │ │ │ │ │ -agent │
└──────────┘ └──────────┘ └──────────┘ └──────────┘
### Cognitive Tools?
"Cognitive tools" encapsulate reasoning operations within the LLM itself — IBM Zurich
These cognitive tools (structured prompt templates as tool calls) break down the problem by identifying the main concepts at hand, extracting relevant information in the question, and highlighting meaningful properties, theorems, and techniques that might be helpful in solving the problem.
Excerpt 3: Foundation 03 — Cells: Memory Management
Source: 00_foundations/03_cells_memory.md
Prompting technique described: Context window budgeting — modeling how conversation history consumes token budget and designing strategies (sliding window, summarization, selective retention) to manage it.
## The Cell Solution: Conversation Memory
The simplest cell structure adds conversation history to the context:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ SYSTEM PROMPT: "You are a helpful assistant..." │
│ │
│ CONVERSATION HISTORY: │
│ User: "My name is Alex." │
│ Assistant: "Hello Alex, nice to meet you." │
│ │
│ CURRENT INPUT: "What's my name?" │
│ │
└───────────────────────────────────────────────────────────────────────┘
## The Memory Token Budget Problem
As conversations grow, context windows fill up. We need memory management strategies:
[Context Window Tokens]
┌─────────────────────────────────────────────┐
Turn 5 │ History 2-4 User Input 5 │
│ │
└─────────────────────────────────────────────┘
▲
│
Eventually, something has to go
Excerpt 4: Biological Metaphor — Main Framework
Source: README.md
Prompting technique described: Progressive abstraction framing — the biological metaphor organizes complex engineering concepts into a memorable, hierarchical mental model.
## Why This Repository Exists
This repository provides a progressive, first-principles approach to context engineering, built around a biological metaphor:
atoms → molecules → cells → organs → neural systems → neural & semantic field theory
│ │ │ │ │ │
single few- memory + multi- cognitive tools + context = fields +
prompt shot agents agents operating systems persistence & resonance
Mathematical Foundations:
C = A(c₁, c₂, ..., cₙ)