Skip to main content

Module cmd

Module cmd 

Source

Modules§

admin
config, export-snapshot (FR10), backup-key — administrative commands. Config surfaces the TP8 (c)/(b) treatment + the pre-2025 lot method; export/backup arrive in Task 15.
answer
income answer (D-8) — the ONLY in-app path to the fail-loud tri-states and the dates of birth.
import
import <files…> (FR1/FR2) — detect+parse via adapters, append the batch atomically into the vault, and save. Idempotency + ImportConflict detection are core’s job (append_import_batch); the CLI surfaces the per-source FR2 counts (dropped/unclassified) and the append/dup/conflict tally.
init
init — create the encrypted vault (Vault::create), initialize the core event schema + CLI config table (via Session::create), and FORCE the §8 key-backup step. The key-backup path is a required argument: a vault with no backed-up key is unrecoverable, so init never skips it.
inspect
verify (FR9) + report/show (FR4) — read-only inspection of the pure projection. verify arrives in Task 6; this file starts with report.
optimize
optimize run (Task 9) — §C.2 Mode-1 what-if proposal. READ-ONLY: opens the vault, projects, optimizes, and returns the proposal. Appends / persists NOTHING.
promote
Approach-B / Task 10 — the promote-tranche CLI verb: BG-D5 (record-time purchase-provenance attestation), BG-D6 (two-sided informed-consent recording), and BG-D7 (Form 8275 Part II present-by- construction). Mirrors cmd/tranche.rs::declare_tranche end-to-end: resolve inputs, guard at record time (fail-closed, nothing appended on refusal), append exactly one decision, save.
reconcile
reconcile decision emitters (FR6/FR7/FR8, §7.2). Each fn builds exactly ONE EventPayload decision variant and appends it via append_decision (monotonic decision_seq), then saves. Decisions are append-only and re-projectable; the engine resolves precedence (latest-decision_seq, Void-first). now is the injected decision creation-time / safe-harbor made-date (§6.2) — deterministic in tests.
tax
tax-profile command helpers — set/show the per-year TaxProfile side-table entry. report_tax_year (Task 9) provides the standalone “tax owed / what-if” calculator. report_tax_year also runs the M4 carryforward-consistency advisory (Task 10).
tranche
Conservative-filing DeclareTranche record path + the tranche⇄allocation mutual-exclusion guard (D-8 UX layer). A tranche is undocumented BTC declared at $0 basis (the IRS fallback), folded to an EstimatedConservative lot homed at window_end. See design/conservative-filing/SPEC.md D-8.
whatif
what-if sell (task #43) — §43 READ-ONLY hypothetical-sale tax planning. Opens the vault, runs the pure deterministic projection, and calls btctax_core::whatif::sell with the synthetic sale. Appends NOTHING, writes NO side-table row, calls no session.save() (the vault is byte-identical after — the whatif_never_persists KAT). Tax decision-support (consequences), NOT buy/sell advice.