Context Engineering

The concept of managing the context for an LLM or Agent or Harness.

The idea is to ensure that the agent gets the most accurate information to produce the most accurate output.

There are many ways to do this.

Monolithic Context

  • Put all the relevant context within the Claude file
  • PRO
    • Has all the knowledge
    • All can update it so maintenance can be not that much.
  • CON
    • Can become stale if not kept up to date.
    • Can be costly in tokens

Segmented Context

A folder where the files are kept which is broken up into smaller pieces branching from a main doc

src/docs
- CONTEXT.md
- ARCHITECTURE.md
- MEMORY.md
- LOG.md

PRO

  • Partial split of the BIG Claude file
  • Less context that big claude
  • Better than Big Agent File
    CON
  • Still a bit much tokens that can be consumed.

Distributed Context

src/
    docs/
        CONTEXT.md
        ARCHITECTURE.md
        CODING_STYLE.md
        MEMORY.md		
        LOG.md
        
    app/
        module1/
            CONTEXT.md
            docs/adr
                ADR001.md
                ADR002.md
                ADR004.md
        module2/
            CONTEXT.md
            docs/adr
                ADR003.md
                ADR005.md
        

PRO:


📇 Additional Metadata

  • 🗂 Type:: note
  • 🏷️ Tags::
  • 📡 Status:: #status/🌱