1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
Appellation: shepherd <library>
Created At: 2026.08.12:16:20:00
Contrib: @FL03
*/
//! # shepherd
//!
//! The umbrella SDK. Every consumer links this crate; nothing links a member
//! crate directly.
//!
//! ## Why an umbrella
//!
//! Shepherd has been rewritten once, Python to Rust, and the reason was reach:
//! the old implementation could not be embedded in a host that needed it
//! without the CLI wrapped around it. The member split is the insurance against
//! a third rewrite, and this crate is what makes the split usable -- one name,
//! one version, one feature vocabulary, regardless of how many members exist
//! behind it.
//!
//! That indirection is load-bearing. Splitting a new layer out of
//! [`shepherd_core`] is then an internal refactor, because consumers were never
//! naming the member they depended on.
//!
//! ## Capabilities, not crates
//!
//! Members are addressed by what they *do*, never by their crate name:
//!
//! | Feature | Adds | Cost |
//! |---|---|---|
//! | *(none)* | the engine: domain types, run state, config schema | `thiserror`, `strum` |
//! | `json` | the canonical artifact codec | `serde`, `serde_json` |
//! | `parse` | the run-id and branch grammars | `nom` |
//! | `schema` | the config key universe | `schemars` |
//! | `registry` | the SQLite registry and migration runner | `rusqlite` |
//! | `render` | deterministic templating and provenance | `minijinja`, `sha2` |
//! | `full` | everything; `native` is its alias | all of the above |
//!
//! Capability flags fan out weakly (`?/`), so asking for `json` configures the
//! registry only if you already asked for `registry`. Enabling a capability
//! never conjures a member you did not request.
//!
//! ## The boundary still holds
//!
//! This crate adds no dependency of its own -- it is re-exports and a feature
//! graph. `shepherd-core` remains free of `clap`, `anyhow`, a log sink, an I/O
//! backend, and `std::process`, and CI proves it on every push by compiling it
//! to `wasm32-unknown-unknown` alongside a forbidden-dependency gate.
compile_error!
extern crate alloc;
// re-exports — the engine is flattened, capabilities are namespaced
pub use *;
/// Canonical content compilation and prompt-budget measurement.
pub use shepherd_compiler as compiler;
/// The SQLite registry: schema, migration runner, and query surface.
pub use shepherd_registry as registry;
/// Template resolution, deterministic rendering, and artifact provenance.
pub use shepherd_render as render;
// prelude
//
// Only the engine is glob-re-exported here. Every member defines its own
// `Error` and `Result`, so globbing all three would make `shepherd::prelude::*`
// ambiguous at the use site (E0659) the moment a consumer enabled two
// capabilities. Member preludes stay addressable at `shepherd::registry::prelude`.