Skip to main content

ossctl_core/
lib.rs

1//! Core library for `ossctl` — the deterministic engine behind the `/oss-*`
2//! Claude Code skill family.
3//!
4//! All logic that must be exact and identical for every caller lives here so it
5//! is unit-testable without spawning the binary. The `ossctl-cli` crate is a
6//! thin clap + I/O shell over this library (ADR-0001 §2).
7//!
8//! The founding architecture is fixed by the accepted ADRs under `docs/adr/`;
9//! this crate realizes their module layout. At founding these are **module
10//! stubs** — the compiling shape, no domain logic yet:
11//!
12//! - [`contract`] — `OSS-RELEASE.md` schema + normalizer (port of
13//!   `check-oss-release.py`); [`contract::schema`] is the ONE canonical serde
14//!   model (ADR-0003).
15//! - [`facts`] — deterministic repo-fact detector (port of
16//!   `infer-repo-facts.py`), behind the repo ports.
17//! - [`audit`] — readiness scoring over the normalized contract + facts.
18//! - [`release`] — the resumable per-ecosystem release-cut engine (ADR-0002):
19//!   sealed plan, phase-barrier coordinator, event-sourced journal, reconcile.
20//! - [`protocol`] — the versioned public JSON/JSONL envelopes + DTOs (§10/§12),
21//!   versioned independently of the internal domain types.
22//! - [`ports`] — the injected effect seam (`CommandRunner`, `Clock`, `IdGen`,
23//!   `RegistryQuery`, `Fs`, `GitRepo`) so each domain is testable without
24//!   touching the real filesystem, git, network, or clock.
25//!
26//! `ossctl-core` is the canonical library surface, so public items must carry
27//! doc comments (`#![warn(missing_docs)]`); level policy otherwise lives in the
28//! workspace `[workspace.lints]` table.
29#![warn(missing_docs)]
30
31pub mod audit;
32pub mod contract;
33pub mod facts;
34pub mod ports;
35pub mod protocol;
36pub mod release;
37pub(crate) mod vcs;
38
39pub use protocol::{SCHEMA_VERSION, SUPPORTED_SCHEMAS};