title
Context budget - always-on vs on-demand
kind
sop
triggers
tools

Standard Operating Procedure: Context budget

Keep always-on agent context small. Load philosophy, SOPs, and skills on demand. Prefer kit-knowledge and memory MCP over dumping files into the prompt.

Targets

SurfaceTarget
Always-on bootstrap (AGENTS.md + project handshake + thin IDE rules)< ~2k tokens (~8KB chars combined when possible)
Skill discovery (descriptions only)Acceptable; do not pre-load skill bodies
Full SOP / philosophy read on typo or debug routesZero unless the route needs that procedure
MCP servers enabledOne profile matching the work; match skill mcp: frontmatter

Split

MechanismHolds
Always-onInvariants + phase→skill index (AGENTS.md)
SkillsRole/phase behavior when triggered
File read / kit-knowledgeSOP slices, philosophy sections, handovers
memory MCPGlossary, SLOs, prefs across sessions (never secrets)
Other MCPLive systems (GitHub, Context7, browsers, …)

Measure

pnpm kit measure-context

Reports character/token estimates for always-on surfaces and flags when over budget. Re-run after editing AGENTS.md or project handshake templates. Public write-up: docs/kit.md.

Session checklist

  • Did not bulk-read CODING_PHILOSOPHY.md or multiple SOPs before the first edit on a small route
  • Loaded at most one phase skill body for the active route
  • Used kit-knowledge or a single SOP path when a procedure was needed
  • Spec/XFN stored durable facts in memory MCP (or N/A in handover)
  • Only one MCP profile active; unused heavy servers not installed globally

Markdown source