Skip to the content.

Context Engineering

9 concepts covering principles and patterns for engineering the instruction context that reaches LLMs in agent frameworks. Derived from empirical analysis of Goose + AgentFS across strong and weak models.

Concept Type Description
LLM Context Layer Model Pattern Layered model of how instructions reach a stateless LLM per turn
Instruction Override Semantics Lesson How LLMs resolve conflicting instructions — specialization wins, contradiction is nondeterministic
MOIM / Persistent Instructions Reality Lesson Goose MOIM claims attention advantage but injects at the same primacy zone as AGENTS.md
JIT-Reminder via Hooks Pattern Using hook-based tool blocking to inject targeted reminders at the recency zone
Rule Ordering by Frequency Lesson Ordering rules by operational frequency improves adherence over lifecycle-based ordering
Goose Message Role Mapping Reference How Goose maps its internal concepts to OpenAI Chat Completions API message roles
Generation Prior Conflict Pattern How pretraining priors override system prompt rules at generation time
CNL Authoring for Weak Models Convention Controlled Natural Language principles for agent instruction authoring
Assistant Prefix as Continuation Lesson Assistant-role prefix messages shift model from generation to continuation mode