backstopcore

package module
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 5 Imported by: 0

README ¶

backstop

An AI agent discipline framework. Backstop gates the pipeline before code is written — enforcing standards, verifying claims, and tracing lineage from intent to implementation.

Backstop is not a code quality scanner. It is a framework that assumes AI agents will fabricate, skip steps, and ignore conventions unless mechanically constrained.

Status

🚧 Under active development. Public, but early — expect rough edges and breaking changes.

Getting Started

Install the CLI (see the releases page for platform binaries, or build from source with make build), then from your project root:

backstop init

This initializes a git repository if one doesn't exist, writes backstop.yml declaring your artifact root, creates the artifact-type directories backstop expects, and writes a .gitignore for backstop's own generated files. It installs no packs and enforces nothing on its own — packs are what backstop actually checks, and you add them explicitly:

backstop pack add <org>/<pack>@<version>

Prefer a minimal footprint — no bundle/spec/plan artifact layout, just pack-declared checks? Run backstop init --no-sdlc instead.

Once you have a project, backstop doctor diagnoses common setup problems in one pass — config discovery, git presence, installed packs, the running binary's build identity, whether your packs' declared test/build entrypoints actually execute, and whether your artifacts sit where backstop expects them:

backstop doctor

Each check reports pass, warn, fail, or skipped (with the check that owns the skip condition named explicitly, so a chain of unmet prerequisites never reads as an unrelated failure) — never a silent gap.

Run the actual gate against your project with:

backstop gate

Structure

cmd/backstop/    CLI entrypoint
pkg/             Go packages (gate orchestration, pack lifecycle, validation, schema loading)
artifacts/       Primitive schemas, templates, and docs (versioned)
recipes/         Recipe capability primitives
docs/            Documentation — end-user guides plus the internal codebase map

Packs — the actual checks backstop runs — live in their own repos and install into gitignored .backstop/packs/, the same way node_modules works for a JS project. See backstop-ai for the published packs.

Documentation

  • Getting Started — install, initialize a project, add your first pack, run the gate.
  • Concepts — what backstop is, what a pack is, and why the gate works the way it does.
  • CLI Reference — every command and flag.
  • Pack Authoring — write, validate, and publish your own checks.
  • Artifact Workflow — bundles, specs, plans, issues, and how lineage is traced.

docs/CODEBASE-MAP.md is internal-facing — a navigational map of this repo for contributors, not end-user documentation.

License

MIT

Documentation ¶

Index ¶

Constants ¶

This section is empty.

Variables ¶

View Source
var BaseEnginesFS embed.FS

BaseEnginesFS embeds the backstop-owned BASE ENGINE pack source (packs/base-engines) into the binary (ISSUE-027). It is declared at the module root — exactly like SchemaFS — because //go:embed cannot reference a directory above its own package. pkg/baseengines reads the embedded pack.yml from this FS and loads it through the normal pack.ParseManifest path, so the binary holds the four generic engine bindings as embedded DATA, never as baked Go literals.

View Source
var SchemaFS embed.FS

SchemaFS embeds all artifact schemas from the artifacts/ directory. Each CLI binary version constitutes a schema cohort — a locked set of schemas that the binary validates against.

Functions ¶

func ListSchemas ¶

func ListSchemas() ([]string, error)

ListSchemas walks the embedded SchemaFS and returns sorted paths for all schema files matching artifacts/*/v*/schema.json and artifacts/base/schema.json.

Types ¶

This section is empty.

Directories ¶

Path Synopsis
cmd
backstop command
pkg
baseengines
Package baseengines loads the backstop-owned BASE ENGINE pack (the four generic engines: semgrep, ast-grep, sandbox, config-file) from an embedded pack.yml and projects it into an engine.Registry (ISSUE-027).
Package baseengines loads the backstop-owned BASE ENGINE pack (the four generic engines: semgrep, ast-grep, sandbox, config-file) from an embedded pack.yml and projects it into an engine.Registry (ISSUE-027).
check
Package check implements the backstop code check validation engine.
Package check implements the backstop code check validation engine.
config
Package config provides backstop.yml discovery, loading, and validation.
Package config provides backstop.yml discovery, loading, and validation.
gate
Package gate implements the backstop gate command — the full reconciliation kill chain (ADR-0010).
Package gate implements the backstop gate command — the full reconciliation kill chain (ADR-0010).
initialize
Package initialize orchestrates `backstop init`: the one prompt-free invocation that takes a consuming project from "the binary is present" to first useful output (SPEC-069).
Package initialize orchestrates `backstop init`: the one prompt-free invocation that takes a consuming project from "the binary is present" to first useful output (SPEC-069).
pack
Package pack provides scaffolding logic for rule packs and code packs.
Package pack provides scaffolding logic for rule packs and code packs.
pack/distribution
Package distribution implements the pack distribution lifecycle: six commands (pack add, pack remove, pack install, pack update, pack upgrade, pack list) plus the backstop.lock format, SHA-256 content hashing, gate-time lock verification, tool_config provenance tracking, and .backstop/packs/ lifecycle management.
Package distribution implements the pack distribution lifecycle: six commands (pack add, pack remove, pack install, pack update, pack upgrade, pack list) plus the backstop.lock format, SHA-256 content hashing, gate-time lock verification, tool_config provenance tracking, and .backstop/packs/ lifecycle management.
pack/engine
Package engine holds the shared EngineBinding table that the gate uses to dispatch pack-rule enforcement onto a declared execution engine.
Package engine holds the shared EngineBinding table that the gate uses to dispatch pack-rule enforcement onto a declared execution engine.
recipe
Package recipe implements the recipe manifest and the generic applier that materializes a pack-declared recipe into a consumer project (SPEC-054).
Package recipe implements the recipe manifest and the generic applier that materializes a pack-declared recipe into a consumer project (SPEC-054).
waiver
Package waiver implements the backstop waiver subsystem (SPEC-049): a backstop-native, engine-neutral, accountable "chosen not to fix" valve.
Package waiver implements the backstop waiver subsystem (SPEC-049): a backstop-native, engine-neutral, accountable "chosen not to fix" valve.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL