Expand description
CLI usage telemetry (src/asdecided/usage.py) — ADR-046, content-free,
consent-gated, local-only.
Two halves, both consent-shaped:
- the READ-BACK (
decided usage): a unified summary over the CLI-usage log ($XDG_STATE_HOME/decisions/decided-usage.jsonl) and the Guide log (viatelemetry::summarize), with no consent gate on reads; - the RECORDER: one content-free event appended after every dispatched
command, if and only if consent is recorded (
decided telemetry on). Write-only observability: silent on every failure path, never alters output or exit codes, and skipped entirely for parse-level exits (argparse errors,--version/-h) exactly like the oracle’scli.main, which computes the command name only afterparse_argsreturns.
The recorder’s bytes (wall-clock ts, per-process random session id, measured duration) are nondeterministic by design and never byte-refereed; the read-back over SEEDED logs is what parity pins.
Structs§
Constants§
Functions§
- cli_
value UsageSummary.to_dict()— pinned key order.- combined_
value _combined(summary, guide)— theusage --json/--sharepayload. Unlike mcp-stats’ share report, the guide dict keeps itspath.- record_
command - Append one content-free usage event, if consent is recorded (ADR-046). Silent on every failure path — no consent, no command name, or an unwritable log all mean “record nothing”.
- share_
url - The prefilled GitHub issue URL — the FULL combined report, including
guide.path(usage does not strip the path; mcp-stats does). - summarize_
usage - Per-command counts, session count, and a recent-activity trend.
- usage_
path - Location of the CLI-usage log (separate from the Guide log, ADR-046).