Core Concept

What is a context?

A context is a structured, machine-readable representation of a slow-moving organizational truth — something that's true today, was true last quarter, and will probably be true next quarter.

What contexts are — and aren't

Contexts are NOT

  • One-time prompt instructions
  • Sprint goals or feature specs
  • Fast-changing data (prices, metrics, feature flags)
  • Opinions or preferences that vary by person
  • Documentation that needs human judgment to interpret

Contexts ARE

  • +Durable organizational knowledge (changes quarterly at most)
  • +Shared truths that apply across teams and projects
  • +Structured for AI retrieval, not just human reading
  • +Versioned with ownership, so someone is accountable for accuracy
  • +The 'how we do things here' that takes months to learn

Anatomy of a context

Every context has the same structure — regardless of whether it's about code, brand voice, or release processes.

Name

A clear, scannable identifier

error-handling-patterns

Description

What this context covers and when it applies

Standard error handling patterns for all backend services. Applies to any service that processes API requests or background jobs.

Imperatives

The rules — what AI must and must not do

MUST wrap all external API calls in try/catch with structured error logging.
MUST NOT use generic catch-all error handlers.
MUST include correlation IDs in all error responses.

Examples

Concrete good and bad patterns

✓ Good: ApiError with code, message, correlationId, and upstream cause
✕ Bad: catch(e) { console.log(e) }

Metadata

Owner, version, last updated, applicable scope

Owner: @platform-team · v3 · Updated: 2025-Q4 · Scope: all backend services

Contexts across your org

The same structure works for code standards, brand voice, support policies, and everything in between.

Architecture

"All services use event-driven communication via Kafka. No direct service-to-service HTTP."

Compliance

"All customer-facing releases require privacy review. PII encrypted at rest with AES-256."

Brand Voice

"Never say leverage or synergy. Tone is direct, warm, jargon-free. Active voice only."

Team Boundaries

"Team Atlas owns notifications. Their intake queue is 2 sprints. Plan accordingly."

Release Process

"Payments platform: 6-week change window. Feature freeze starts 4 weeks before EOQ."

Design System

"Use design tokens for all colors and spacing. Never use raw hex values. All interactive elements must meet WCAG AA."

The “should this be a context?” test

Ask three questions:

1. Is it slow-moving? Does it change quarterly at most? If it changes weekly, it's not a context.

2. Is it shared? Does it apply to more than one person or team? If it's personal preference, it's a style — not a context.

3. Does it cause problems when AI doesn't know it? If ignoring it leads to rework, violations, or wasted cycles — it should be a context.

If the answer to all three is yes, you've found a context.