Blueprints
A blueprint is the analyzed, versioned profile of one of your repositories. It captures how that codebase is actually built — its architecture, conventions, API patterns, dependencies, and the idioms your team has standardized on — and turns that into context an AI model can use. When a blueprint is attached to a gateway, it's injected into every request so generated code matches what already exists, instead of whatever the model would guess.
Think of it as your codebase, distilled. You don't write a blueprint by hand; Unyform produces it by running Analyze over a repository.
What's inside a blueprint
A blueprint is more than a README. Each one resolves to a structured set of sections:
- Architecture — the inferred shape of the system: how the repo is layered, the role it plays, how its modules relate.
- Conventions & patterns — recurring coding patterns extracted from the source, each with real example snippets, a frequency (high / medium / low), and the languages and frameworks it applies to.
- API patterns — the conventions your endpoints follow: routing, request and response shapes, error handling.
- Dependencies — the detected tech stack: languages, frameworks, key libraries (with versions and purpose), package manager, and build system.
- Idioms — the canonical way your codebase does a specific thing. Each idiom names the one symbol the team has standardized on for a given purpose, with an adoption percentage and the alternatives it displaced. These answer "what's the way we do X here?"
Note
Sections are resolved from the codegraph — the semantic graph Unyform builds from your repository — not stored as loose prose. That's what keeps a blueprint accurate to the analyzed commit rather than drifting as docs go stale.
How a blueprint gets created
Blueprints are produced by the Analyze pipeline. You point Unyform at a repository, and it does the work:
flowchart LR
R[Repository] --> P[Parse files]
P --> G[Build codegraph]
G --> A[Extract patterns,<br/>idioms, deps, APIs]
A --> V[Write blueprint version]
V --> B[(Blueprint)]
- Parse every source file into structured chunks (Rust, TypeScript, JavaScript, Python, Go, Java, and more).
- Build the codegraph — symbols, call edges, and relationships across the repo.
- Extract patterns, idioms, dependencies, API conventions, and architecture from the graph. Some passes are heuristic; others are AI-enriched for higher-fidelity descriptions.
- Write a new version — a content-addressed snapshot pinned to the git commit it was analyzed from.
You can kick this off two ways:
- From a connected GitHub repository — Unyform fetches the repo, analyzes it end to end, and pins the resulting version to the exact commit SHA.
- From code snippets — paste files directly into the Analyze panel for a quick blueprint without connecting a repo.
Tip
Re-run Analyze (the Regenerate action) after meaningful changes to keep a blueprint current. Each run cancels any in-flight analysis for the same blueprint, so rapid clicks won't produce conflicting versions.
Versioning
Every analysis produces a new, immutable blueprint version. Versions are
semver-tagged, content-addressed by SHA-256, and — when analyzed from a
connected repo — pinned to the originating git_commit_sha. The blueprint
itself always points at its latest version, but the full history is retained.
Because versions are commit-pinned, the context injected at request time reflects a known, reproducible state of your code. You can browse every version and who created it in the Dashboard, and idiom deep-links resolve to the source line as it existed at the analyzed commit rather than whatever is on the default branch today.
The underlying content is git-backed: each org's blueprints live in their own git repository, so the source of truth is versioned the same way your code is.
How gateways use a blueprint
Attaching a blueprint to a gateway is what makes it do work. On each request, the gateway loads the attached blueprint and prepends it as cached system context — so the model sees your architecture and conventions before it sees the prompt.
A few things keep this efficient:
- Caching — the injected context is marked for provider-side prompt caching, so you pay the token cost once per session rather than on every turn.
- Per-session dedup — the gateway tracks which blueprints it has already injected for a session and won't re-send them.
- Token budgets — caps bound how much blueprint context any single request can carry, so injection never crowds out the actual conversation.
Warning
A blueprint only shapes requests once it's attached to a gateway. An analyzed blueprint with no gateway attachment is just stored intelligence — nothing is injected until you wire it up.
You can confirm injection happened: responses carry x-unyform-blueprints and
x-unyform-blueprint-tokens headers showing which blueprints were applied and
how many tokens they added. See Gateway for the full request
path.
Where to see it
Everything lives in Dashboard → Blueprints:
- The list shows every blueprint for your org, with its latest version, detected languages and frameworks, and pattern counts.
- The detail page surfaces the full analyzed profile — tech stack, patterns, the idiom board, dependencies, API patterns, gap analysis, and the version history. From here you also run Analyze / Regenerate and attach the blueprint to a gateway.
That's the loop: analyze a repo into a blueprint, attach it to a gateway, and every AI request your team makes through that gateway is grounded in how your code actually works.
Edit this page on GitHub