Skip to main content

Crate xchecker

Crate xchecker 

Source
Expand description

xchecker - Spec pipeline with receipts and gateable JSON contracts

This crate provides a deterministic, token-efficient pipeline that transforms rough ideas into detailed implementation plans through a structured phase-based approach.

xchecker can be used in two ways:

  • CLI: Install via cargo install xchecker and run from command line
  • Library: Add as a dependency and use internal APIs to embed in your application

§Quick Start (CLI)

Install xchecker from crates.io:

cargo install xchecker

Run a spec generation workflow:

# Initialize a new spec
xchecker init my-feature

# Run all phases (dry-run mode for testing)
xchecker spec my-feature --dry-run

# Check spec status
xchecker status my-feature --json

# Run environment health checks
xchecker doctor --json

§Quick Start (Library)

Add xchecker to your Cargo.toml:

[dependencies]
xchecker = "1"
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }

Use OrchestratorHandle as the stable embedding facade for phase execution. Avoid reaching into internal orchestrator modules directly; those are not covered by semver guarantees.

§JSON Contracts

xchecker emits JSON in JCS (RFC 8785) canonical form for deterministic output:

  • Receipts: schemas/receipt.v1.json
  • Status: schemas/status.v1.json
  • Doctor: schemas/doctor.v1.json

Use emit_jcs to emit JSON in canonical form for your own integrations.

§Stable Public API

The following types are part of stable public API for 1.x releases:

Internal modules are accessible via module paths but are marked #[doc(hidden)] and are not covered by semver stability guarantees.

Re-exports§

pub use xchecker_redaction as redaction;
pub use xchecker_status as status;

Structs§

CliArgs
CLI argument structure for configuration override.
Config
Configuration for xchecker operations.
ConfigBuilder
Builder for programmatic configuration.
ExitCode
Exit codes matching the documented exit code table.
OrchestratorConfig
Configuration for orchestrator execution.
OrchestratorHandle
The primary public API for embedding xchecker.
StatusOutput
Status output for a spec, matching schemas/status.v1.json.

Enums§

ErrorCategory
Error categories for grouping similar errors.
PhaseId
Phase identifiers for the spec generation workflow.
XCheckerError
Library-level error type with rich context.

Traits§

UserFriendlyError
Trait for providing user-friendly error reporting.

Functions§

emit_jcs
JCS (RFC 8785) canonical JSON emission for JSON contracts.
xchecker_version
Returns xchecker version with embedded git revision Format: “{CARGO_PKG_VERSION}+{GIT_SHA}”