spec_driven_docs/lib.rs
1//! Spec-driven documentation: current specs, immutable decision records, and
2//! executable gates kept coherent for people and coding agents.
3//!
4//! This crate is the canon's distribution: the `sdd` binary installs, verifies,
5//! upgrades, and gates instances, and carries the whole payload — spec seeds,
6//! templates, lint configs, and the method chapters — embedded at compile
7//! time. The method itself lives in the repository's
8//! markdown, not here; this crate only ships and enforces it.
9//!
10//! Major modules:
11//! - [`domain`] — pure types and invariants: manifest, profiles, rule and gate
12//! identifiers, marker-block splicing, versions.
13//! - [`embedded`] — every compile-time embedded asset and its accessors.
14//! - [`gates`] — the delivered gate implementations and their registry.
15//! - [`services`] — install, verify, upgrade, and hook-rendering orchestration.
16//! - [`adapters`] — filesystem I/O at the edges.
17//! - [`plan`] — the typed document every landing write comes from.
18//! - [`release`] — the bundle and resolver boundary every landing verb
19//! reads a release through.
20//! - [`transaction`] — the lock, staging, and journal a recoverable
21//! multi-file write runs through.
22//! - [`cli`] / [`commands`] — clap parse shapes and their handlers.
23//! - [`error`] — [`error::AppError`] and the exit-code matrix.
24//!
25//! # The supported target
26//!
27//! Linux is the only target this crate supports
28//! (ADR-linux-is-the-only-supported-target). The refusal below states that
29//! boundary to the compiler rather than to a reader, because the source is
30//! otherwise portable enough that a build elsewhere would succeed and then
31//! keep promises nothing here proves. The guard names the operating system
32//! and not the architecture: no source in this crate varies by
33//! architecture, and `dist-workspace.toml` states which architecture the
34//! release builds.
35
36#[cfg(not(target_os = "linux"))]
37compile_error!(
38 "spec-driven-docs supports Linux only. Its permission, path, and \
39 filesystem behavior is written and tested against one target, and a \
40 build for another would carry promises this project does not keep. \
41 See _docs/decisions/ADR-linux-is-the-only-supported-target.md."
42);
43
44pub mod adapters;
45pub mod cli;
46pub mod commands;
47pub mod context;
48pub mod domain;
49pub mod embedded;
50pub mod error;
51pub mod gates;
52pub mod logging;
53pub mod output;
54pub mod payload_roots;
55pub mod plan;
56pub mod probes;
57pub mod release;
58pub mod services;
59pub mod transaction;