Your first scenario in 5 minutes¶
This page walks through running an existing Ophamin scenario against
the bundled MockSubstrate — no external system required, runs in a
few seconds, produces a signed proof record.
1. Confirm the install¶
You should see 32 scenarios across five tiers. Pick one that doesn't
need a real corpus on disk — BayesianPhiPosteriorScenario runs
against a Family-L simulation built into the scenario itself:
2. Run it¶
The bundled MockSubstrate is the default substrate for the demo
mode; for any scenario that doesn't require an external corpus or a
real Kimera repo, no further wiring is needed. From a Python REPL:
from ophamin.measuring.scenarios import BayesianPhiPosteriorScenario
from ophamin.measuring.proof.codec import dump
scenario = BayesianPhiPosteriorScenario(
simulate_from_family_l=True,
sample_sizes=(20, 200),
draws=1000, tune=500,
seed=42,
)
proof = scenario.run()
dump(proof, "my_first_proof.json")
print(f"verdict: {proof.verdict.outcome}")
print(f"observed: {proof.verdict.observed_value:.4f}")
print(f"threshold: {proof.claim.threshold.describe()}")
print(f"proof_id: {proof.proof_id}")
Output:
verdict: VALIDATED
observed: 0.3162
threshold: hdi_contraction_ratio <= 0.40 fraction
proof_id: a3b9f8c2…
3. Verify the proof¶
The proof is HMAC-signed with the default sign key. Inspect or validate it:
To verify the signature, pass the key (the framework's default sign
key is ophamin-default-sign-key; in production you'd use your own):
4. Read the proof¶
The proof is a 9-section JSON record. Open it in your editor or:
The nine sections:
- Identity —
proof_id,schema_version,ophamin_version,created_at - Claim — falsifiable statement + operationalisation + threshold
- Pre-registration —
config_hash,data_hash, analysis plan captured BEFORE the run - Data — substrate name + commit + datasets used
- Evidence — per-pillar statistics with library attribution
- Verdict —
VALIDATED/REFUTED/INCONCLUSIVE - Reproduction — exact command + environment lock
- Provenance — W3C PROV-JSON graph
- Signature — HMAC-SHA256 over the canonical JSON form
See SCHEMAS.md for the full layout and
versioning policy.
Next steps¶
- Run a full campaign — 6 phases
end-to-end via
ophamin run-all - Write a new scenario — bind your own corpus + claim
- Wrap a third-party pillar — register a custom analysis library