Context Engineering for Coding Agents (Martin Fowler)
Context engineering for coding agents is easier to describe in theory than to implement in practice. This hands-on guide from a Thoughtworks consultant cuts through the abstraction, using Claude Code as the reference implementation to show exactly which configuration levers exist, what they do, and when to reach for them. The central distinction the post draws is between two types of context: instructions, which tell the agent what to do, and guidance, which sets the standards the agent should meet. Both matter, but they require different management strategies.
The practical catalog covers CLAUDE.md for persistent project rules that load on every session, hooks for pre- and post-tool injection of live context (the example given is auto-attaching lint output before a code review step, so the agent sees current style violations without being asked), custom slash commands for reusable multi-step workflows, and spec files for task-scoped context that gets loaded only when relevant. Each mechanism has a purpose and a cost, and the post is clear about both. The counterintuitive headline insight: even with a 200k token window, more context is often worse. Agent effectiveness degrades with noise, cost scales linearly with tokens, and the goal is curated context — not exhaustive context.
For developers actively building with Claude Code or any coding agent with a similar configuration system, this is the most practical breakdown available of how to apply context engineering principles in real workflows. The advice to aggressively remove context when in doubt is a useful corrective to the instinct to pile everything in and hope for the best.