Skip to content

xpd dspy

Use xpd dspy to review DSPy 3.5 modules, typed signatures, adapters, concurrency, caching, and optimizer configurations with a recorded Duroxide ledger.

Run xpd dspy <paths> --limit 0 --format json to list read.modules, read.signatures, read.facts, findings, and checklist. Pass --all-modules to include review checklist items for every surveyed DSPy file, --group-by module or --packet N for context-budgeted review packets, and --questions to inspect the catalog without surveying files.

Terminal window
$ xpd dspy --questions --format json | jq -c '{facts:(.facts|length),questions:(.questions|length)}'
{"facts":5,"questions":6}
Terminal window
xpd dspy [OPTIONS] [PATHS]...
xpd dspy <COMMAND>
Subcommand What it does
xpd dspy start Start a run: record the commit it starts from, the paths, line count, checks and optional benchmark of the project
xpd dspy plan Record the plan of a round: the fixes in order, and the findings that are right as they are
xpd dspy approve Record that the user said yes to a fix that changes what callers or users see
xpd dspy gate Gate a fix that is committed: run the checks, time --bench when set, count lines and compare the findings with the commit before it. Exit 1 when the fix is not kept
xpd dspy drop Record that a fix was given up, after its files were restored
xpd dspy status Print the run and the stage that comes next
xpd dspy finish End the run: compare findings, line count and benchmark timing with the start commit. Exit 1 while a fix is open or a new finding has no reason
Argument What it does
<PATHS>... Files or directories (directories respect .gitignore)
Option Default What it does
--kind <KIND> List only the findings of these kinds, separated by commas. Repeatable. Values: lm-bound-in-module, threadpool-loses-context, configure-in-forward, direct-forward-call, missing-super-init, predictor-in-forward, sequential-predictor-loop, single-threaded-eval, cache-disabled-in-module, unbounded-react-iters, json-loads-on-prediction, pack-rule.
--limit <LIMIT> 20 The most findings to list of each kind, strongest first. 0 lists every finding.
--since <COMMIT> Count the findings at this commit too, and print each count beside the count of today.
--group-by <GROUP_BY> none Group findings and checklist items by owning module or shared cause. Values: none (Keep the default flat per-kind listing), module (Group findings and checklist items by owning module path), cause (Group related findings by shared kind and anchor files).
--packet <N> Emit one 1-indexed deterministic context-budgeted review packet for the Nth cluster.
--budget-lines <LINES> 300 Maximum source lines included across excerpts inside a --packet view.
--all-modules Include checklist review items for every surveyed module, not only modules with findings.
--format <FORMAT> Output format. Default: text on a terminal, json otherwise. Values: text, json.
--adapter <ADAPTER> Optional Python adapter or command emitting zero-LLM DSPy predictor facts.
--questions Print the DSPy evidence and review question catalog without surveying files.
Command Result
xpd dspy start Record committed paths, optional --adapter, --all-modules, baseline project checks, and latency benchmarks.
xpd dspy <paths> List modules, signatures, findings, facts, and checklist items.
xpd dspy plan Record fixes, accepted findings, and reasoned checklist verdicts.
xpd dspy approve Approve an interface change.
xpd dspy gate Re-survey, run baseline checks, and gate latency regressions.
xpd dspy drop Record an abandoned fix after restoring the last kept commit.
xpd dspy status Read the active run state and next stage.
xpd dspy finish Close the run once fixes, findings, and checklist items are settled.

Pass --adapter adapter.py to inspect instantiated dspy.Module objects without calling any language model. Define programs() returning a mapping of program names to dspy.Module instances. The runner inspects named_predictors(), verifies predictor.lm is None, records signature field types and instruction character counts, and reports the active adapter and interpreter factory.

A successful list or stage exits 0. A rejected gate or blocked finish exits 1. Invalid input and adapter errors exit 2.