factoryWhatIf in app/src/server/factory-solve.server.ts simulates demand overrides across every block — it's the engine behind the What-if page. The assistant has coherenceAudit for the factory's current balance but nothing for hypotheticals, so "if I double py-science-pack-1 output, which blocks need resizing?" is manual block-by-block arithmetic today.
Add a whatIf tool: input a map of demand overrides ({good: newRate}), output which blocks fall short (block, current rate, needed rate) and any new shortfalls the ripple creates. The result should be directly actionable as reviseBlock calls or submitPlan updates entries, and the tool description should say so.
This pairs naturally with the existing scale-up guidance in the system prompt (raise an existing block instead of duplicating it) — the tool gives that guidance exact numbers.
factoryWhatIfinapp/src/server/factory-solve.server.tssimulates demand overrides across every block — it's the engine behind the What-if page. The assistant hascoherenceAuditfor the factory's current balance but nothing for hypotheticals, so "if I doublepy-science-pack-1output, which blocks need resizing?" is manual block-by-block arithmetic today.Add a
whatIftool: input a map of demand overrides ({good: newRate}), output which blocks fall short (block, current rate, needed rate) and any new shortfalls the ripple creates. The result should be directly actionable asreviseBlockcalls orsubmitPlanupdatesentries, and the tool description should say so.This pairs naturally with the existing scale-up guidance in the system prompt (raise an existing block instead of duplicating it) — the tool gives that guidance exact numbers.