Configuration
Use .anvil/config.yml to make guardrail scoring match the kind of repo you are auditing. Place it in the target repo root.
Internal tool
Section titled “Internal tool”Good default for operator workspaces, internal automation, and agent-facing repos.
version: 1profile: internal-toolhardGates: dimensions: ciDiscipline: minScore: 3 driftResilience: minScore: 3Library
Section titled “Library”Stricter on types and regression discipline for reusable packages.
version: 1profile: libraryhardGates: dimensions: typeSafety: minScore: 4 testDepth: minScore: 3 driftResilience: minScore: 3Production app
Section titled “Production app”Use when runtime, release, and security failures can escape the repo.
version: 1profile: production-apphardGates: dimensions: ciDiscipline: minScore: 4 typeSafety: minScore: 4 testDepth: minScore: 4 security: minScore: 3Prototype
Section titled “Prototype”Lighter weighting, but still keeps the repo honest about drift and security.
version: 1profile: prototypehardGates: enabled: falseDismiss one dimension
Section titled “Dismiss one dimension”Only use not-applicable when the repo truly does not have that surface:
version: 1profile: internal-tooldimensions: security: applicability: not-applicable reason: "Local operator workspace only, no deployed service or runtime secrets path."Schema quick reference
Section titled “Schema quick reference”version: 1profile: internal-tool
hardGates: enabled: true exitCode: 2 dimensions: ciDiscipline: minScore: 3
dimensions: security: applicability: not-applicable reason: "No deployable runtime or secrets surface." testDepth: minScoreHint: 3Top-level fields
Section titled “Top-level fields”version— required integer, currently1profile— optional preset:internal-tool,library,production-app, orprototypehardGates— optional enforced minimums that can fail CI without hiding the rest of the reportdimensions— optional per-dimension overrides for applicability, weight, and recommendation floor
Merge rules
Section titled “Merge rules”- Missing config file: Anvil uses the built-in defaults
- Missing
profile: defaults tointernal-tool hardGates.enableddefaults totruewhenhardGatesis presenthardGates.exitCodedefaults to2reasonis required whenapplicability: not-applicable- a
not-applicabledimension cannot also be hard-gated minScoreandminScoreHintare integer scores from0to5
What each preset emphasizes
Section titled “What each preset emphasizes”internal-tool— drift resilience and practical guardrails for agent/operator reposlibrary— stronger type safety and regression discipline for reusable packagesproduction-app— higher CI, testing, and security floors for deployed systemsprototype— lightest posture, good for short-lived spikes