tix/cli/cli_beads.rs
1#[allow(clippy::wildcard_imports)]
2use super::*;
3
4/// The `tix capacity` subcommands (mission `cycle-capacity-planning-01M3C85C`, WP05).
5///
6/// A thin adapter: the `[capacity]` section, its validation, the shared calculation,
7/// the findings and the close evidence all live in `crate::capacity`. This enum owns
8/// only the spelling of the surface — the scope and the unit are always explicit
9/// (C-003/C-004), and no flag here can change an issue.
10#[derive(Debug, Clone, Subcommand)]
11pub enum BeadsAction {
12 /// Report what `bd` and its workspace look like (read-only)
13 ///
14 /// Runs only `bd version`, `bd where` and `bd config get`, so it is safe on a
15 /// repository that has not opted in — and it names a workspace whose events
16 /// journal is off, because a live mirror would then see nothing.
17 Detect,
18 /// A read-only summary of the beads workspace
19 ///
20 /// The open/closed/blocked/ready figures are computed the way beads derives
21 /// them — from the `blocks` dependencies — so they agree with `bd ready`
22 /// rather than guessing.
23 Status,
24 /// List beads issues, read-only
25 List {
26 /// Include closed issues
27 #[arg(long)]
28 all: bool,
29 },
30 /// Show one beads issue, read-only
31 Show {
32 /// Beads id, or a unique fragment of one (or of a title)
33 issue: String,
34 },
35 /// Follow the beads events journal, printing each change as it commits
36 ///
37 /// Reads the journal in pages and re-reads from its own checkpoint, so it
38 /// survives a gap between reads. Requires the journal to be enabled wherever
39 /// beads writes; `detect` says whether it is.
40 Watch {
41 /// Sequence to resume from (default: the beginning of what is retained)
42 #[arg(long)]
43 since: Option<u64>,
44 /// Seconds between reads
45 #[arg(long, default_value_t = 1)]
46 interval: u64,
47 },
48 /// Write local issues into beads through `bd import`
49 ///
50 /// **Incremental by default**: only issues whose exported row changed since
51 /// the last push are sent, so a repeat run with nothing changed invokes `bd`
52 /// not at all. `--all` forces every issue through, which is what a discarded
53 /// state file or a rebuilt beads workspace needs.
54 Push {
55 /// Print the JSONL instead of importing it
56 #[arg(long)]
57 dry_run: bool,
58 /// Send every issue, ignoring the export watermark
59 #[arg(long)]
60 all: bool,
61 /// List the per-issue diagnostics (which local fields beads cannot hold)
62 #[arg(long)]
63 verbose: bool,
64 },
65 /// Pull beads issues into local files
66 Pull {
67 /// Print nothing on success (used by the beads hooks)
68 #[arg(long)]
69 quiet: bool,
70 },
71 /// Pull, then push — the full both-ways pass
72 Reconcile {
73 /// Print nothing on success beyond the push report
74 #[arg(long)]
75 quiet: bool,
76 },
77}