← ~/pillars / context-engineering/

Context engineering

What the agent sees decides what it does: CLAUDE.md and memory architecture, context-friendly repos, AI-legible docs, and the compaction discipline that keeps long sessions sharp.

by Paul Grycuk

updated 2026-07-05 6 artifacts 5 patterns

~/playbook/context-engineering stage · adopt

What does the agent need to see to do this work well?

standard
Always-on context is high-signal and under budget: CLAUDE.md holds only what is true every session.
check
Mechanically-checkable rules live in linters, not prose, so they never cost tokens or drift.
skill
CLAUDE.md architecture: the memory hierarchy, @imports, and path-scoped rules.
metric
Always-on tokens loaded every turn by standing context.
failure mode
Long sessions end with an agent that has forgotten its own decisions: context rot.
~/pillars/context-engineering/artifacts 6
claude-md-architecture-map.mdx claude-md

CLAUDE.md section: architecture map

A module index, boundary rules, and where-things-go table for a hexagonal/vertical-slice Java monorepo: the section that stops agents exploring and guessing.

✓ verified 2026-06-10

claude-md-bedrock-java.mdx claude-md

CLAUDE.md section: Java service calling Bedrock

Drop-in CLAUDE.md conventions for a Java repo on Bedrock: Converse API first, one client factory, EU Geo model IDs, no hardcoded credentials.

✓ verified 2026-06-10

claude-md-monorepo-root.mdx claude-md

CLAUDE.md template: Java monorepo root

A root CLAUDE.md that is a map, not a manual: module index, cross-cutting constraints, commit conventions, and delegation to per-module files.

✓ verified 2026-06-10

claude-md-java-service.mdx claude-md

CLAUDE.md template: Java service on AWS

A lean, layered CLAUDE.md for a Spring Boot/Quarkus service: commands first, judgment calls second, zero rules a hook should own.

✓ verified 2026-06-10

claude-md-rules-directory.mdx claude-md

Rules directory: path-scoped instructions

A .claude/rules/ layout that moves per-area instructions out of CLAUDE.md into path-scoped rule files, so API rules load only when the agent touches API files and the root file stays under the 200-line bar.

✓ verified 2026-07-18

skill-structured-notetaking.mdx skill

Skill: structured note-taking

A skill that has the agent maintain a NOTES.md outside the context window during long tasks: progress, dependencies, and decisions survive compaction instead of dissolving with the transcript.

✓ verified 2026-07-18

Copy-paste-complete files, each verified against the primary docs on the date shown.

// patterns

The reading behind the artifacts, one pattern per page.

❯ read the full guide ~3 min · why this pillar exists and how the pieces fit →