majordomus_cli/release/mod.rs
1//! The release: what this project has shipped, what it would ship next, and the changelog
2//! that is a projection of both rather than a file somebody remembered to update.
3//!
4//! # The gap this closes
5//!
6//! Every other public fact in this repository has one canonical declaration and a set of
7//! projections derived from it — a command, a capability, a schema, a page. The release did
8//! not. Its version was two hand-written strings that a check compared with each other, and
9//! nothing raised them (it is authored once now, below); its changelog did not exist at all,
10//! and what changed in a version lived only in GitHub's release notes, outside the repository
11//! that produced it.
12//!
13//! Both facts were already *in* the tree, unread:
14//!
15//! ```text
16//! .ai/repo/releases/*.yaml what shipped, when, from which commit (kind release-record)
17//! .ai/repo/adrs/*.md the decisions, dated (kind adr)
18//! .ai/repo/features/*.md what the product gained (kind feature)
19//! git log <tag>..<tag> everything that has no object of its own
20//! ```
21//!
22//! This module joins them. Nothing here is authored: a section per release record, its
23//! decisions the ADRs dated inside that release's window, its changes the conventional
24//! commits in that range, its artifacts the record's own evidence. What follows the last
25//! release is the unreleased section, and the version it implies is arithmetic over the
26//! commit types rather than a number somebody chose.
27//!
28//! # The version is authored once
29//!
30//! The version is authored in one place, the crate manifest's `[package] version`, and
31//! [`version`] owns every other statement of it: the compiled constant, the lock's record,
32//! and `share/version.txt` — the projection the shell tool reads at start-up, because an
33//! installed tree has no `Cargo.toml`. That projection is a `majordomus generate` artifact
34//! and ships beside the tool, so the reason the version was once written twice by hand no
35//! longer holds (ADR 0085). `release bump` writes the manifest, `scripts/derive` derives the
36//! rest, and [`version::diagnose`] refuses a version anybody writes down by hand.
37
38pub mod changelog;
39pub mod commits;
40pub mod compat;
41pub mod landing;
42pub mod model;
43pub mod surface;
44pub mod version;
45
46pub use changelog::{compose, compose_published};
47pub use compat::{analyze, Impact, VersionPlan};
48pub use model::{Change, ChangeKind, Changelog, ReleaseSection, VersionReport};
49pub use surface::Surface;
50pub use version::{bump_of, Bump};