Golden Samples
Curated reference implementations that agents use as templates for generating new code in a consistent style.
Definition
Golden Samples are curated reference implementations that agents use as templates for new code. A well-chosen golden sample teaches an agent more than pages of written instructions, because it demonstrates the expected patterns, naming conventions, error handling approaches, and architectural boundaries through concrete example.
Golden Samples serve several functions in an agentic workflow:
- Pattern Enforcement — they show agents how code should be structured within the project, reducing style drift and architectural violations.
- Implicit Knowledge Transfer — conventions that are difficult to express in written rules (such as preferred error handling patterns or logging approaches) become learnable through example.
- Quality Baseline — they establish a measurable standard against which agent output can be compared using a Pattern Consistency Score.
The Principal Systems Architect is typically responsible for curating and maintaining Golden Samples. They are included in Context Packets alongside Live Specs and architectural rules, and are updated during monthly Boundary Audit cycles to reflect evolving codebase standards.