Pattern snapshot
A code-extracted representation of recurring patterns in a codebase — naming conventions, folder structure, modifier usage — that subagents read before generating new code so the output matches what a human reviewer expects.
A pattern snapshot is the convention-extraction step that runs before code generation. It catalogues the conventions actually present in your repository — public modifier discipline, async naming, folder layout, DTO suffix usage — so the implementing subagent generates code that reads as if a human on the team wrote it.
A snapshot is a generated file, committed alongside the code, that reads like:
endpoints: FastEndpoints classes, one per file, suffix "Endpoint"
dtos: records, suffix "Request" / "Response", no entities across the wire
async: suffix "Async" on public methods only
folders: Features/{Area}/{Feature}/ — vertical slice, no shared "Services" bucket
The implementing subagent reads it before writing code, the same way a new hire reads the last three merged PRs. The closest public reference implementation is codewithmukesh’s convention-learner Claude Code skill, which extracts conventions from an existing repo in one pass. Our pattern snapshots follow the same idea but are regenerated automatically and scoped per solution area — so a legacy corner of the codebase does not pollute the conventions applied to the modern one.
When to use
- Before any greenfield feature inside an existing codebase.
- When a new subagent is added to the team and needs to learn local conventions in one pass.
- After a large refactor that consolidates conventions, to refresh the snapshot.
Compare with
A coding standards document is human-readable; a pattern snapshot is agent-readable and derived from the actual code, so it stays current without a doc-maintenance ritual.