Skip to content

Compare Approaches (Counterfactuals)

Counterfactuals is an experimental way to compare alternative approaches. Ódinn copies a source workspace into separate candidate directories, creates independent run records, and can execute bounded task plans through the audited tool boundary.

Candidate directories are filesystem copies—not Git worktrees or operating-system sandboxes.

Terminal window
odinn experimental enable counterfactual --confirm-impact
Terminal window
odinn experimental counterfactual run \
--source-run <run-id> \
--from <step-id> \
--plan-file plan-a.yml \
--plan-file plan-b.yml

Without --execute, this creates dry-run candidates only. Generated and cache-heavy directories such as .git, node_modules, build output, coverage, and package caches are excluded.

Terminal window
odinn experimental counterfactual run \
--source-run <run-id> \
--from <step-id> \
--plan-file plan-a.yml \
--plan-file plan-b.yml \
--execute
odinn experimental counterfactual compare <group-id>

Read-only candidate tasks can receive a one-use candidate-bound capability. Mutating tasks require explicitly approved authority.

Terminal window
odinn experimental counterfactual select \
<group-id> \
--run <candidate-run-id>

Selection is a preview until --apply is supplied. Apply replaces only eligible workspace files and keeps a temporary source backup for recovery.

Branching does not make irreversible external actions safe. Candidate plans must not be treated as isolated hostile-code execution. Compare the recorded evidence, then choose deliberately.