Check architectural boundaries in agent-written code#
Current registry release: v0.5.0. Verify the exact public identity with
npm view bce-engine@0.5.0 version dist.integritybefore installation. The same exact version is active as the Lane-A trust anchor.
The release retains the stack foundation (stack snapshot, stack diff, cross-OS golden-byte
proof, and read-only MCP classification) and adds selected declared-stack enforcement to the
ordinary gate, MCP, and offline v2 replay. It does not add automatic repair or registry resolution.
bce gives coding agents a local, deterministic architecture check. A versioned
EngineeringBlueprint records the repository's structural rules. Agents draft those rules from
your intent, inspect the code, and repair violations; the same engine checks every pull request.
Humans own the intent and approve policy changes. Agents operate the day-to-day loop.
Released support (v0.5.0): TypeScript/JavaScript framework-surface AST extraction,
direct TypeScript/JavaScript module boundaries, a Python import-surface MVP, and structured Python
module boundaries. Node 22+ is required; the contract remains pre-1.0.
Evidence boundary: a score of 100 means the implemented checks passed over the observed surface. Route guard checks find governed call sites; they do not prove authorization, tenant isolation, or execution on every path. See the route evidence limits and correction, including the export forms missed by the immutable v0.3.0 release. Start with a bounded pilot and verify realistic violations in your own repository.
Watch BCE govern its own main branch: live GitHub stages, authenticated self-adoption, and explicit evidence boundaries.
Start with your coding agent#
Give your existing agent this task:
Read https://blueprint-conformance.github.io/bce/llms.txt and its agent start guide.
Inspect this repository and identify one supported architecture boundary from our stated intent.
Use BCE to draft the rule, prove a real RED → code fix → GREEN, and wire the local agent loop.
Keep setup advisory and present policy changes for my review. Report unsupported scope explicitly.
The agent start guide routes an existing gated repository straight to MCP
run_gate {} and a new repository to local authoring and onboarding. Your current agent can do
this with its own tools; BCE needs no additional model account for that path. The blueprint
inspection tools and review cockpit let humans examine the same contract and evidence.
Run a real gate#
Three commands. No account, hosted service, API key, or repository setup:
npm view bce-engine@0.5.0 version dist.integrity
npm install --save-dev --save-exact bce-engine@0.5.0
npx --no-install bce demo
The released demo runs one conforming tree and one drifted tree. List six targeted recipes for extension registration, tenant access, egress, TypeScript and Python module layering, and configuration widening, then run the boundary closest to your repository:
npx --no-install bce demo --list
npx --no-install bce demo --recipe module-layering
Run the released First Win recipes, or keep the zero-argument proof above.
The architecture package#
One checked-in blueprint defines the intended components, relationships, and boundaries. BCE extracts the repository it received, compares the two, and returns one deterministic verdict.
These are the specification's first four enforcing types: C1 requiredComponent requires a
real pluginSurface; C2 requiredDependency requires its governed registration edge;
C3 forbiddenDependency rejects the axios import; and C4 forbiddenPath keeps extracted
components out of src/legacy/**. The taxonomy has four more enforcing types and three explicit
reserved types—open the C1–C4 visual guide or
read the exact semantics.
In v0.5.0, the AI-first review surface's bce propose writes an immutable draft
packet to quarantine; the model cannot approve or land policy. Read the review
ceremony.
See the gate discriminate#
This excerpt is cut from a live engine run on every push. It keeps the decisive lines selectable while the full transcript retains every emitted detail.
$ bce gate --repo drift --blueprint-dir blueprint --extractor ast --all
::error:: - [no-direct-http-client/critical] extension:greeting.plugin
observed: forbidden edge extension:greeting.plugin -> axios is present
at: src/greeting.plugin.ts#L16
bce gate [enforced]: 1/1 blueprint(s) evaluated, 1 failing.
$ echo $?
1
$ bce gate --repo clean --blueprint-dir blueprint --extractor ast
✓ no-direct-http-client@0.1.0 — score 100 (pass)
bce gate [enforced]: 1/1 blueprint(s) evaluated, 0 failing.
$ echo $?
0
CI derives those lines from real RED and GREEN runs and rejects byte drift. The proof contract also verifies the complete recording and visual replay against the engine.
One engine, three entry points#
Use the CLI for local feedback, the pinned GitHub Action at the merge boundary, or ten
read-only MCP tools inside an agent loop. They share the same extraction, evaluation, report,
and exit-code path; policy changes remain outside MCP. The released Action source is pinned to
blueprint-conformance/bce@bbc898156fa5d41b89d5a09c566f4e50481ccf63.
The Agent Skill loads these instructions on demand, prefers the read-only run_gate {} tool, fixes
source code on RED, and re-runs the same contract. Inspect the skill,
wire the done-check, or follow ordered onboarding.
Adopt without freezing the repository#
Start in advisory mode, capture known debt in a shrink-only baseline, then enforce the same verdict. The mode is committed policy—not a skip flag—and moving backward requires a reviewed rationale. Read the brownfield adoption guide.
Evidence and limits#
We use BCE to govern BCE.
Live checks not loadedFollow the observed main commit through our own gate, evidence checks and public deployment. Every stage links to GitHub.
- Source: mainNot checked
- Self-gate + doctorNot checked
- Tests + evidenceNot checked
- Node 22 / 24Not checked
- Pages deploymentNot checked
Live results require JavaScript and access to the public GitHub API.
Committed policy: bce-engine-architecture@0.1.2, ratified-enforced, self-ratified. Authenticated decision · How to read this pipeline.
First-party operational evidence; no independent replication or product efficacy claim. These lifecycle additions are implemented in source and v0.5.0; they are absent from the immutable npm 0.3.0 artifact.
Mechanism evidence is strong; causal product benefit is not established. This repository has a generated suite whose current count is shown above, replayed RED/GREEN fixtures, 50/50 killed self-blueprint mutants, deterministic reports, and cross-platform CI. Those are first-party proofs on author-controlled infrastructure; independent witnesses remain 0.
The Stage D declared-stack replay record reports that an oracle-separated fresh-context agent run matched the recorded A–D matrix: pass, violation, structural refusal, and detached integrity verification. The raw evidence is not public, so this is an author-controlled record—not an independently verifiable community witness—and it does not change that zero count.
Accelerated pilot v6 retained all 16 paired attempts in one exact local model/client cell. Its author-operated record contains useful directional observations, including 2/8 versus 3/8 safe successful completions, but it is permanently ineligible for a product decision. One baseline infrastructure timeout remains in the intention-to-treat denominator. The Evidence Foundry v3 primary stage—120 paired tasks and 240 retained attempts—has not run; its later transport stages are separately gated. We do not claim that BCE makes agents more successful, cheaper, faster, or safer than a baseline. Inspect and replay the public evidence, check the public truth ledger, or inspect the study contract.
Start with your repository#
The v0.5.0 release contains six packaged architecture recipes. Run one, then adapt it with a
measured authoring walkthrough for an empty repository, plain JavaScript, TypeScript, a monorepo,
or direct module layering: choose the boundary that must hold. The measured
test keeps every layout's author → RED → fix → GREEN first win in under 60 seconds, including
loaded-runner contention.
Specification: blueprint-conformance/v1alpha1 · Agent loop: MCP and agent workflow · Documentation: blueprint-conformance.github.io/bce
Released stack plane (v0.5.0). bce stack
snapshot emits a content-addressed StackManifest of the declared dependency closure (npm
lockfile v3/shrinkwrap and pnpm-lock v9, Dockerfile/compose image refs, the declared node runtime),
and bce stack diff classifies every move between two manifests (added / removed / forward /
backward / rewritten / flags-changed / spec-changed / unknown), failing closed on a backward,
rewritten, or unproven move. A cross-OS golden-byte-identity proof and a built-dist-CLI RED/GREEN
discriminating pair over a real revision pair now run in CI, and a read-only stack_diff MCP tool
exposes the classifier over already-written manifests. Check the registry identity before choosing
an install target:
npm view bce-engine@0.5.0 version dist.integrity
The release also packages pnpm-lock v9 ingestion (sources[].parser widened accordingly) and five
enforcing declared-stack constraint types: exact package pins, closure equality, forbidden packages,
digest-pinned images, and allowed Node versions. Missing, opaque, variable, or conflicting required
declarations refuse instead of passing. These stack-plane capabilities remain absent from immutable
v0.3.1, while the enforcement types are absent from immutable v0.4.0.
Current registry release: v0.5.0. In addition to the stack plane above, it expands route-handler inventory, refuses recognized unsupported or rebound handlers, and makes the call-site evidence limit visible in the terminal. A fresh registry installation passed all 52 route cases against the exact released archive, and a fresh public installation passed 90 declared-stack gate, CLI, MCP, replay, tamper, and refusal cases. This release also includes offline review preparation, explicit solo-steward lifecycle support, and the local specification; immutable v0.3.0 does not contain those additions.
Its exact npm integrity is
sha512-Uq1nWo6SR/xJUDCCiDXdoK+1RrnDm4/0z++brj5gsJlBOwpHdISxSH/p21ZqSFmaggXp7DB53AJpZKT2I9Xd9A==,
and its source/Action commit is bbc898156fa5d41b89d5a09c566f4e50481ccf63. The canonical GitHub
Release is immutable with the exact tarball, signed payload manifest, signed EvidenceRecord, and
compliance report attached. Read the verification record.
Compatibility remains pre-1.0.
Apache-2.0 — license, notice, and trademarks.
Documentation
Specification
The normative artifact model, constraint taxonomy, scoring, modes, and versioning policy — plus the generated JSON Schemas and the conformance vectors.
Guides
Adopting the gate, reading its output, and extending it.
For Agents
What an agent working in a gated repository needs: the machine-readable index, drop-in loop snippets, and the experimental authoring prompt pack.
RFCs
How the format changes.