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
//! `tm generate` — dev-time regeneration of derived, committed artifacts
//! (issue #2913).
//!
//! Why: extracted from `cli.rs` (issue #2603 precedent) to keep the top-level
//! file under the 500-SLOC production cap.
//! What: [`GenerateAction`] — currently only `capabilities`, which
//! regenerates the `tm-capabilities` bundled skill from the live harness
//! surfaces (CLI tree, MCP tool catalog, agent roster, skill catalog, doctor
//! checks).
//! Test: `cli_parses_generate_capabilities`, `cli_parses_generate_capabilities_check`.
use Subcommand;
/// Actions for the `generate` subcommand.
///
/// Why: `generate` is a namespace for dev-time codegen subcommands — today
/// only the `tm-capabilities` catalog, but scoped as its own action enum so a
/// future generator (e.g. shell completions) doesn't need a new top-level
/// `Command` variant.
/// What: `Capabilities` regenerates `crates/trusty-mpm/src/assets/skills/
/// tm-capabilities/` from the in-process CLI/MCP/agent/skill/doctor surfaces;
/// `--check` diffs the freshly generated output against the committed files
/// instead of writing, exiting non-zero on drift (the CI gate).
/// Test: `cli_parses_generate_capabilities`, `cli_parses_generate_capabilities_check`.
pub