Deterministic What-Ifs in Mycroft: Scenario Analysis Without AI Guessing
Mycroft's scenario engine answers financial what-ifs with pure deterministic arithmetic bound to a hashed, verified baseline, refusing to forecast or recommend.
Finance teams ask what-if questions constantly: what happens to EBITDA if revenue moves, or if costs move. The danger is subtle but real, an AI agent asked that question can quietly let an illustrative assumption slide into sounding like a forecast, or worse, a recommendation. This update walks through an engine built specifically to do the arithmetic and refuse to do the deciding.
The temptation an agent has to resist
The failure mode this system is designed against is easy to miss. You ask an agent what happens if revenue rises 5%, it answers, and somewhere in the phrasing the assumption quietly becomes a forecast, or a suggestion to actually go do it. A scenario is a hypothetical by definition. The moment a system implies a probability or picks a winner among outcomes, it has crossed from arithmetic into a kind of judgment it was never authorized to make.
Binding every scenario to a verified baseline
Every scenario in this system is bound to an exact baseline run, and the CSVs behind that baseline are rehashed and checked against the run log before a single number is allowed to move. If a source file has changed by even one byte, the scenario refuses to run at all, on the principle that you cannot run a what-if on data you have not verified. The assumptions layered onto that baseline are just as constrained: only two methods are allowed, an explicit dollar amount or a percent of the verified actual, and every assumption carries its own reasoning and source so its lineage survives. Duplicate categories are rejected, non-finite values are rejected, and any assumption that would push a category negative is rejected outright.
Boring, deterministic math on purpose
The arithmetic itself is deliberately unremarkable: a percent assumption scales the verified actual, an amount adds a fixed figure, and every result is quantized to the cent. No sampling, no model involvement, no randomness anywhere in the calculation. Run the same scenario a thousand times and you get the identical result in cents every time, which is exactly the property you want from a system whose entire job is to compute, not to estimate.
Three exercises against one verified baseline
The demonstration runs three scenarios against a verified actual EBITDA of 230,000. A 5 percent revenue recovery exercise lifts that figure to 275,500. A $20,000 reduction in COGS brings it to 250,000. A balanced operating exercise, combining a little more revenue, a little more payroll, and a little less overhead, lands at 252,300. Each of the three is traceable back to its exact assumption, with the engine writing two artifacts for every run: a machine log and a human-readable decision pack.
Refusing to choose
Every output carries the same four labels regardless of which scenario produced it: this is a simulation, not a forecast; recommendation, none; decision, human required; adequacy, pending human review. The numbers land on the page, but the choice of what to do with them is explicitly handed back to a person. This update also adds a full scenario test suite, bringing the project to 32 passing tests covering the hashing, the rejected inputs, the deterministic arithmetic, and the labeling itself, so the guardrails are enforced and checked rather than living only as a comment in the code.
Key takeaways
- The engine performs what-if arithmetic without letting an assumption slide into sounding like a forecast or a recommendation.
- Every scenario is bound to a verified baseline through file hashes; if a source file changes, the scenario refuses to run.
- Assumptions are restricted to two methods, an explicit amount or a percent of the verified actual, with rejected inputs for duplicates, non-finite values, and negative results.
- The math is fully deterministic and quantized to the cent, with no sampling, no model, and no randomness in the calculation path.
- Every output is stamped as a simulation, not a forecast, with no recommendation, and decision authority explicitly left to a human reviewer.
- The update brings the project's test suite to 32 passing tests, covering hashing, input rejection, deterministic arithmetic, and labeling.
Try it yourself
There is a real question worth sitting with here: should an agent calculate the scenario, or decide which future the business should choose? This kind of boundary between computation and judgment is exactly the design discipline behind the Mycroft Financial AI project, part of the Humanitarians AI Fellows program.
Chapters
- 0:00The temptation: How assumptions quietly become recommendations
- 0:35Designing the scenario contract and verifying baseline file hashes
- 1:10Restricting assumptions to explicit amounts or percentages of actuals
- 1:45Traceability down to the cent: Calculating three distinct scenario runs
- 2:25Stamping output with strict labels: Simulation, not a forecast
- 3:00The core debate: Computing the numbers vs. choosing a business future
Full transcript(auto-generated, with timestamps)
The temptation: How assumptions quietly become recommendations
[0:00]This is Onyx in for Humanitarians AI. This week on the Mycroft Finance Investigator what if analysis without the AI guessing. Finance teams need scenarios. What happens to EBITDA if revenue moves, if costs move. The danger is an agent that quietly turns an illustrative assumption into a forecast or a recommendation. This week's engine does the arithmetic and refuses to do the deciding. Act one, the temptation. The failure mode is subtle. You ask an agent what happens if revenue rises 5% and it answers, but somewhere in the phrasing the assumption has quietly become a forecast or worse, a recommendation to go do it. A scenario
Designing the scenario contract and verifying baseline file hashes
[0:35]Is a hypothetical. The moment a machine implies a probability or picks a winner, it has crossed from arithmetic into judgment it was never authorized to make. Act two, the scenario contract. Every scenario is bound to the exact baseline run and the verified CSVs are rehashed and checked against the run log before a single number moves. If a source file changed by one byte, the scenario refuses to run. You cannot do a what if on data you haven't verified. The assumptions are just as constrained. Only two methods are allowed, an explicit amount or a percent of the verified actual. Every assumption carries its own reasoning and source so
Restricting assumptions to explicit amounts or percentages of actuals
[1:11]The lineage survives. Duplicate categories are rejected, non-finite values are rejected, and any assumption that would drive a category negative is rejected outright. And the math is boringly deterministic, which is exactly what you want. A percent assumption scales the verified actual, an amount adds a fixed figure. The result is quantized to the cent. No sampling, no model, no randomness. Run it a thousand times and you get the same cents every time. Act three, three exercises, one verified baseline. Start from the verified actual EBITDA of 230,000. A 5% revenue recovery exercise lifts it
Traceability down to the cent: Calculating three distinct scenario runs
[1:47]To 275,500. A $20,000 reduction in COGS brings it to 250,000. And a balanced operating exercise, a little more revenue, a little more payroll, a little less overhead, lands at 252,300. Three what-ifs, each traceable to its assumption. The engine writes two artifacts, a machine log and a human-readable decision pack, and everyone is stamped with the same four labels. This is a simulation, not a forecast. Recommendation, none. Decision, human required. Adequacy, pending human review. The numbers are on the page, but the choice is explicitly handed back to a person. It is all tested. This week adds the scenario suite, and the complete project
Stamping output with strict labels: Simulation, not a forecast
[2:25]Now stands at 32 passing tests, covering the hashing, the rejected inputs, the deterministic arithmetic, and the labels themselves. The guardrails aren't a promise in a comment, they're enforced and checked. The verdict, this is what-if analysis with the guessing removed. Every scenario is bound to a verified baseline and its file hashes. Only explicit amount or percent assumptions are allowed with their lineage preserved. Illegal inputs are rejected, the arithmetic is deterministic, and there is no external model anywhere in the runtime. The output shows the numbers and refuses to choose, simulation not forecast, no recommendation, human required. Your turn, there's a clean line here worth
The core debate: Computing the numbers vs. choosing a business future
[3:01]Arguing about between computing a number and choosing a future. So, here's the question to sit with. Should an agent calculate the scenario or decide which future the business should choose? What-if analysis without AI guessing. This is Onyx, in for humanitarian's AI.
More from Mycroft Financial AI
3:29Building an Evidence-Driven AI Variance Engine in 3 Weeks for Mycroft
3:17Mycroft Update: Why Your AI Agent Ignores Your Code
3:16How to Test Mycroft's Finance AI Agent: Breaking the Books on Purpose
3:47Fencing the AI: Why Our Finance Agent Cannot Approve Itself
3:53Refusal by Design: Implementing 15 Failure Safeguards in AI for Mycroft
2:17