Skip to content

Assistant: expose factoryWhatIf (demand-override simulation) #127

Description

@ApocDev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: aiAI planning supportarea: plannerProduction block / planning modelenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions