*Continent · 3 territory* ## Summary A backtest replays a recorded log of requests through a rulebook and reports what the rules would have decided: the rules that never fired, the rules that would have stalled work, the facts the log did not carry, and where the rule and the record differ. The function takes a rulebook and a log of requests in the shape of the governance-backtest schema, and the changelog gives the signature as backtest(rulebook, events, options?) over entries in time order. The principles say rules should also learn from what actually happens, and that is as far as this layer goes. What a request log contains, who supplies it, and how the current-versus-proposed comparison is presented are still open. ## Explanation - A backtest replays a recorded log of requests through a rulebook and reports what the rules would have decided, including the rules that never fired, the rules that would have stalled work, the facts the log did not carry, and where the rule and the record differ. - `backtest(rulebook, events)` replays what your agents asked (the adapter's `Governed.request`, plus whether it ran) and reports what the rules would have decid… - A recorded log is replayed through a rulebook before it goes live (backtest): what it would have decided, the rules that never fired, the rules that would have… - In the governance specification, a site replays a log of what its participants asked to do through a rulebook before the rulebook goes live and reads what the rulebook would have decided. - A site replays a log of what its participants asked to do through a rulebook before the rulebook goes live and reads what the rulebook would have decided. - The backtest function takes a rulebook and a log of requests in the shape of the governance-backtest schema — the shape the adapter's Governed.request already has, plus an outcome — and runs the replay through the dialect. - `backtest(rulebook, events, options?)` and `compareBacktests` (§ 13) take a `/1` rulebook and a log of `/1` requests in the shape of `spec/governance-backtest.… - The changelog gives the signature as backtest(rulebook, events, options?) over a log of { at, request, outcome? } entries in time order. - backtest(rulebook, events, options?) replays a recorded log — [{ at, request, outcome? }] in time order — through a rulebook and reports what it would have dec… - The principles say rules should also learn from what actually happens: a backtest of a recorded log says what the rules would have decided and what a change would change, and that is as far as this layer goes. - Rules should also learn from what actually happens: a backtest of a recorded log says what the rules would have decided and what a change would change, and tha… - The doctrine file describes src/backtest.ts replaying a recorded log through a rulebook in both formats, producing the report and the current-versus-proposed comparison. - `src/backtest.ts` replays a recorded log through a rulebook in both formats, producing the report and the current-versus-proposed comparison. - AGENTS.md states that backtest(rulebook, events: [{ at, request, outcome? }]) returns a report with no free text and every list in a defined order (byArea or byScope), and that compareBacktests(baseline, proposed) compares two reports. - `backtest(rulebook, events: [{ at, request, outcome? }])` (§ 13, § 16.11) returns a report with no free text and every list in a defined order (`byArea` or `by… - SPEC.md states that backtest(rulebook, events, options?) returns a BacktestReport and compareBacktests(baseline, proposed) returns a BacktestComparison, per spec/backtest.schema.json and spec/backtest-report.schema.json. - backtest(rulebook, events, options?) returns a BacktestReport and compareBacktests(baseline, proposed) returns a BacktestComparison, per spec/backtest.schema.j… - The README states that backtest(rulebook, events) replays what agents asked (the adapter's Governed.request, plus whether it ran) and reports what the rules would have decided, the rules that never fired, the rules that would have stalled work, the facts the log did not carry, and where the rule and the record differ. - `backtest(rulebook, events)` replays what your agents asked (the adapter's `Governed.request`, plus whether it ran) and reports what the rules would have decid… - The README states that d7-backtest.json proves a recorded log of /1 requests replayed through the desk rulebooks: totals and rows in tool/scope words, counts by scope, history built from earlier events, missing facts and args, gaps by tool, differences between rule and record, conflicts that occurred, and a current-versus-proposed comparison (cap 500 → 750). - d7-backtest.json proves a recorded log of /1 requests (the adapter's Governed.request plus an outcome) replayed through the desk rulebooks: totals and rows in… - The README states that backtest.json proves a recorded log replayed through a rulebook: totals, history built from earlier events, missing facts named, gaps, stalls, conflicts that occurred, rule-versus-record differences, and a current-versus-proposed comparison. - backtest.json proves a recorded log replayed through a rulebook: totals, history built from earlier events, missing facts named, gaps, stalls, conflicts that o… - The principles name backtest.json and d7-backtest.json as the recorded log replayed through a rulebook before it goes live. - A recorded log is replayed through a rulebook before it goes live (backtest): what it would have decided, the rules that never fired, the rules that would have… - What a request log contains beyond the request and its outcome, who supplies it, and how the current-versus-proposed comparison is presented are not stated. - `backtest(rulebook, events, options?)` and `compareBacktests` (§ 13) take a `/1` rulebook and a log of `/1` requests in the shape of `spec/governance-backtest.… - d7-backtest.json proves a recorded log of /1 requests (the adapter's Governed.request plus an outcome) replayed through the desk rulebooks: totals and rows in… - backtest.json proves a recorded log replayed through a rulebook: totals, history built from earlier events, missing facts named, gaps, stalls, conflicts that o… ## Threads - What a backtest replays and reports: decisions, rules that never fired, rules that would have stalled work, missing facts, and rule-versus-record differences. - `backtest(rulebook, events)` replays what your agents asked (the adapter's `Governed.request`, plus whether it ran) and reports what the rules would have decid… - A recorded log is replayed through a rulebook before it goes live (backtest): what it would have decided, the rules that never fired, the rules that would have… - The function signature and input shape: backtest(rulebook, events, options?) over { at, request, outcome? } entries in time order. - `backtest(rulebook, events, options?)` and `compareBacktests` (§ 13) take a `/1` rulebook and a log of `/1` requests in the shape of `spec/governance-backtest.… - backtest(rulebook, events, options?) replays a recorded log — [{ at, request, outcome? }] in time order — through a rulebook and reports what it would have dec… - The report contract: no free text, defined list order, BacktestReport and BacktestComparison per the backtest schemas. - `backtest(rulebook, events: [{ at, request, outcome? }])` (§ 13, § 16.11) returns a report with no free text and every list in a defined order (`byArea` or `by… - backtest(rulebook, events, options?) returns a BacktestReport and compareBacktests(baseline, proposed) returns a BacktestComparison, per spec/backtest.schema.j… - The recorded runs: backtest.json and d7-backtest.json, with the cap 500 → 750 comparison. - d7-backtest.json proves a recorded log of /1 requests (the adapter's Governed.request plus an outcome) replayed through the desk rulebooks: totals and rows in… - backtest.json proves a recorded log replayed through a rulebook: totals, history built from earlier events, missing facts named, gaps, stalls, conflicts that o… - Rules learning from what actually happens, and the layer stopping there. - Rules should also learn from what actually happens: a backtest of a recorded log says what the rules would have decided and what a change would change, and tha… ## How it formed On Oct 18, 2026 the changelog gave the backtest signature over a log in time order; on Oct 19, 2026 the doctrine, specification, README and principles set out the report contract, the recorded runs and the limit of the layer. - backtest(rulebook, events, options?) replays a recorded log — [{ at, request, outcome? }] in time order — through a rulebook and reports what it would have dec… - `src/backtest.ts` replays a recorded log through a rulebook in both formats, producing the report and the current-versus-proposed comparison. - backtest(rulebook, events, options?) returns a BacktestReport and compareBacktests(baseline, proposed) returns a BacktestComparison, per spec/backtest.schema.j… - d7-backtest.json proves a recorded log of /1 requests (the adapter's Governed.request plus an outcome) replayed through the desk rulebooks: totals and rows in… - Rules should also learn from what actually happens: a backtest of a recorded log says what the rules would have decided and what a change would change, and tha… ## Consultant **Where it shows up** — The backtest keeps coming up as a replay of a recorded log through a rulebook before it goes live: backtest.json and d7-backtest.json, the cap 500 → 750 comparison, and the rules that never fired or would have stalled work. **A way forward** — Keep the report's fixed shape — no free text, every list in a defined order — and add one worked example of a log entry with its outcome so the schema's shape is visible next to the prose. ## Ideas - A rulebook should be replayed against a recorded request log before it goes live, so the decisions it would have made are known in advance. - A backtest should report the decisions rules would make and where rule and record differ, not explain why things happened. - A proposed rulebook change should be replayed against a recorded log so the decisions it would change are known before it goes live. - A backtest report should carry no free text and keep every list in a defined order. ## History Earlier, Bevia read this as: “A backtest replays a recorded log of requests through a rulebook and reports what the rules would have decided — the rules that never fired, the rules that would have stalled work, the facts the log did not carry, and where the rule and the record differ — and the same documents describe the deterministic engine that runs it and the authority that writes the rules.” (until 2026-11-22) ## Territories - [[Bevia/World/Territories/Replaying a recorded log through a rulebook|Replaying a recorded log through a rulebook]] - [[Bevia/World/Territories/Pure deterministic backtest replaying recorded logs|Pure deterministic backtest replaying recorded logs]] - [[Bevia/World/Territories/Backtest and comparison function signatures|Backtest and comparison function signatures]]