Context Engineering

Agent Working-Context Curation

03 / 12

In Practice

  • Create a project context file: overview, architecture, module map, commands, conventions, and do-not-touch areas
  • Keep AGENTS.md / CLAUDE.md lean; link deeper docs for architecture, APIs, data flows, and ADRs
  • Write a repo map the agent can navigate: folders, owners, entry points, tests, and common change paths
  • Capture project-specific rules: naming, errors, logging, auth, feature flags, migrations, and deployment checks
  • Keep task state in spec.md, plan.md, todos, or scratchpad files so it survives compaction and handoff
  • Refresh the context layer when the agent repeats a mistake, asks the same question, or misses a rule
  • Prune as much as you add: stale architecture notes and dead conventions mislead the agent just as badly as a missing one

An agent walking into a codebase needs the same things a new engineer does: how to run it, what the architecture is, what not to touch, and where the failure modes are. One set of files serves both.

— Ben SE, CTO, CodeWalnut

Page 13 of 72: Context Engineering: In Practice

Contents