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
//! Subcommand bodies — one module per top-level `dbmd` subcommand.
//!
//! Each module exposes a single entry point:
//!
//! ```ignore
//! pub fn run(ctx: &Context, args: &SomeArgs) -> CliResult
//! ```
//!
//! where `ctx` carries the global flags (`--json`, `--color`) and `args` is the
//! subcommand's parsed clap struct from [`crate::cli`]. The dispatch in
//! `main.rs` calls exactly these `run` functions; **adding logic means editing
//! only the relevant `cmd/<name>.rs`, never `main.rs` or `cli.rs`.** That is
//! the seam that lets the subcommand-body agents work in parallel.
//!
//! Each body is a thin wrapper: it parses `args`, calls into `dbmd-core`, and
//! formats output (text by default, JSON under `ctx.json`). All real logic
//! lives in `dbmd-core` — these modules only translate between the parsed clap
//! struct and the library, then render. (The `64` / `not_implemented` path is
//! retained in [`crate::error`] as a reserved contract code, but no body
//! returns it.)