Skip to content

Land typed reform tools to short-circuit reform-API guessing (track PR #55) #81

@vahid-ahmadi

Description

@vahid-ahmadi

Symptom (live test 2026-05-28)

Same live test as #(reform-recipes issue): the agent burned 15+ run_python iterations trying to guess how to express a 1pp basic-rate reform via free-form Python. Never converged.

Diagnosis

PR #55 (feat/register-typed-tools) re-exposes calculate_household, run_economy_simulation, and analyse_microdata — typed tools that pin reform semantics inside the engine objects.

With those tools registered, the agent calls:

analyse_microdata(reform={"income_tax": {"basic_rate": 0.21}})

…once, instead of free-form Python on Parameters(...) 15 times. The engine handles the partial-override semantics correctly.

Per the commit message of 249f9c8:

"These functions have existed since the early agent_tools.py but were quietly removed from the registry in PR #11 (compute → run_python rewrite) — no documented rationale."

This issue tracks landing PR #55 specifically to unblock the reform-API failure class.

Action

Either:

  1. Review and merge Register the three dormant typed tools (UK) #55 as-is, OR
  2. If Register the three dormant typed tools (UK) #55 is stalled, extract just the analyse_microdata typed tool into a smaller PR — that's the one that fixes today's symptom.

Constraints

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions