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
#[allow(clippy::wildcard_imports)]
use super::*;
/// The `tix capacity` subcommands (mission `cycle-capacity-planning-01M3C85C`, WP05).
///
/// A thin adapter: the `[capacity]` section, its validation, the shared calculation,
/// the findings and the close evidence all live in `crate::capacity`. This enum owns
/// only the spelling of the surface — the scope and the unit are always explicit
/// (C-003/C-004), and no flag here can change an issue.
#[derive(Debug, Clone, Subcommand)]
pub enum BeadsAction {
/// Report what `bd` and its workspace look like (read-only)
///
/// Runs only `bd version`, `bd where` and `bd config get`, so it is safe on a
/// repository that has not opted in — and it names a workspace whose events
/// journal is off, because a live mirror would then see nothing.
Detect,
/// A read-only summary of the beads workspace
///
/// The open/closed/blocked/ready figures are computed the way beads derives
/// them — from the `blocks` dependencies — so they agree with `bd ready`
/// rather than guessing.
Status,
/// List beads issues, read-only
List {
/// Include closed issues
#[arg(long)]
all: bool,
},
/// Show one beads issue, read-only
Show {
/// Beads id, or a unique fragment of one (or of a title)
issue: String,
},
/// Follow the beads events journal, printing each change as it commits
///
/// Reads the journal in pages and re-reads from its own checkpoint, so it
/// survives a gap between reads. Requires the journal to be enabled wherever
/// beads writes; `detect` says whether it is.
Watch {
/// Sequence to resume from (default: the beginning of what is retained)
#[arg(long)]
since: Option<u64>,
/// Seconds between reads
#[arg(long, default_value_t = 1)]
interval: u64,
},
/// Write local issues into beads through `bd import`
///
/// **Incremental by default**: only issues whose exported row changed since
/// the last push are sent, so a repeat run with nothing changed invokes `bd`
/// not at all. `--all` forces every issue through, which is what a discarded
/// state file or a rebuilt beads workspace needs.
Push {
/// Print the JSONL instead of importing it
#[arg(long)]
dry_run: bool,
/// Send every issue, ignoring the export watermark
#[arg(long)]
all: bool,
/// List the per-issue diagnostics (which local fields beads cannot hold)
#[arg(long)]
verbose: bool,
},
/// Pull beads issues into local files
Pull {
/// Print nothing on success (used by the beads hooks)
#[arg(long)]
quiet: bool,
},
/// Pull, then push — the full both-ways pass
Reconcile {
/// Print nothing on success beyond the push report
#[arg(long)]
quiet: bool,
},
}