xpd audit
Run xpd audit for a single read-only report across xpd check, static ledger workflows, optional --since regression deltas, and recorded ledger debt.
Without --workflows, xpd audit runs xpd check alongside the four general-purpose static workflows: untangle, harden, optimize, and discover. Pass --workflows all to include every registered static workflow, or pass a comma-separated list of workflow names. xpd audit never executes project code, never runs runtime adapters, and never writes to the ledger store.
Pass --since <commit> to compare both linter issues and workflow findings against an earlier commit and report newly introduced and resolved counts. Add --fail-on-regression in CI or local gates to exit 1 when --since detects net new issues or findings, or when xpd check reports errors without --since.
When a worktree has recorded ledger runs in its Duroxide store, xpd audit also summarizes accepted findings, accepted checklist exceptions, and open fixes for each audited workflow.
xpd audit [OPTIONS] [PATHS]...Arguments
Section titled “Arguments”| Argument | What it does |
|---|---|
<PATHS>... |
Files or directories to audit (directories respect .gitignore) |
Options
Section titled “Options”| Option | Default | What it does |
|---|---|---|
--since <COMMIT> |
Compare findings against this commit and report new and resolved counts. | |
--workflows <WORKFLOWS> |
Comma-separated static workflows to run, or all for every registered workflow. Repeatable. |
|
--fail-on-regression |
Exit 1 when --since detects net new issues or findings, or when check finds errors. |
|
--fail-on-debt-increase |
Exit 1 for newly accepted findings or checklist exceptions. Compare with the previous run by default, or with runs finished at or before the commit given by --since. |
|
--strict-clean |
Exit 1 for any check error, blocking workflow finding, open fix, or newly accepted debt. | |
--format <FORMAT> |
Output format. Default: text on a terminal, json otherwise. Values: text, json. |
|
-j, --jobs <NUM> |
Maximum worker threads to use (overrides RAYON_NUM_THREADS and the default cap of 8) Aliases: --threads. |
Example
Section titled “Example”def load_count(raw): try: return parse_count(raw) except Exception: return parse_count_v1(raw)$ xpd audit example.py --workflows harden --format json | jq -c '{schema: .schema_version, harden: .workflows[0].findings}'{"schema":1,"harden":0}$ xpd enhance harden example.py --format json | jq -c '[.advice[].kind]'["fallback-on-exception"]The audit counts the findings that may stop a run. No kind of untangle, harden, discover or optimize is proven yet, so each of their findings is advice, which xpd enhance <track> lists and the audit leaves out.
Exit status
Section titled “Exit status”A completed audit exits 0. When --fail-on-regression is set and a regression or check error is present, xpd audit exits 1. Invalid arguments or unreadable inputs exit 2.