Skip to content

[codex] Expose standalone typed tools#94

Open
anth-volk wants to merge 3 commits into
codex/modular-chat-prompts-testsfrom
codex/standalone-typed-tools
Open

[codex] Expose standalone typed tools#94
anth-volk wants to merge 3 commits into
codex/modular-chat-prompts-testsfrom
codex/standalone-typed-tools

Conversation

@anth-volk
Copy link
Copy Markdown

Fixes #93

Summary

  • Register the standalone typed tools with the chat runtime: calculate_household, run_economy_simulation, and analyse_microdata.
  • Update prompt/tool guidance so typed tools are preferred when their shape fits, with run_python kept as the fallback for structural reforms, introspection, and unsupported cases.
  • Block FRS row-level access in analyse_microdata while preserving aggregate FRS outputs through run_economy_simulation.
  • Add frontend labels, runtime docs, and focused tests for tool exposure, FRS rejection, mocked non-FRS microdata behaviour, and prompt contracts.
  • Default chat temperature to 0 and keep model-facing tool-result ordering deterministic while streaming frontend results as tools finish.

Validation

  • PYTHONPATH=backend python -m pytest backend/tests/test_agent_tools.py backend/tests/test_prompts.py backend/tests/test_structural_tools.py
  • python -m py_compile backend/tests/test_agent_tools.py backend/agent_tools.py backend/routes/chatbot.py
  • git diff --check

Notes

This is stacked on #92 to keep the standalone-tool review scoped to the 8-file diff on this branch. If preferred, it can be retargeted to main, but that would include the prompt/testing base from #92 in this PR as well.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
policyengine-uk-chat Ready Ready Preview, Comment May 29, 2026 11:41pm

Request Review

@github-actions
Copy link
Copy Markdown

Beta preview is ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant