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.
Enable Counterfactuals
Section titled “Enable Counterfactuals”odinn experimental enable counterfactual --confirm-impactCreate candidates
Section titled “Create candidates”odinn experimental counterfactual run \ --source-run <run-id> \ --from <step-id> \ --plan-file plan-a.yml \ --plan-file plan-b.ymlWithout --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.
Execute and compare
Section titled “Execute and compare”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.
Select
Section titled “Select”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.
Limits
Section titled “Limits”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.
