Snippets

python

Complete, checked snippets in this language.

python

Give the judge the host's record, not the model's word

A complete Python module that projects bounded accountability evidence into an evaluation query, so a judge scores the explanation separately from whether the effect happened.

Ran with Python 3.14 and PYTHONDONTWRITEBYTECODE=1 on synthetic turns: 11 checks passed (16, 10, 32, and 128 caps; no raw tenant, user, email, or destination in output; boolean amounts rejected; source not mutated), and __main__ printed the evidence-aware query.

python

Deterministic capabilities with a strict request contract

A complete Python module that validates model output as data, then runs approved normal code for calculator, email syntax, and mock support-ticket requests.

Compiled with python3 -m py_compile and run with a local self-test in Python 3.14.

python

Host-owned routing for direct and MCP execution

A complete Python unit that maps validated domain intent to approved direct functions or approved MCP tool names.

Compiled with python3 -m py_compile and run with fake MCP results plus mcp 2.0.0 over stdio in Python 3.14.

python

Thin MCP server adapters over deterministic Python tools

A complete MCP server module that exposes approved deterministic capabilities without moving business logic into the MCP layer.

Compiled with python3 -m py_compile and imported with mcp 2.0.0 in Python 3.14, verifying the MCPServer tool registry.

python

Local Ollama intent extractor with schema output

A complete Python unit that asks local Ollama for one JSON intent object, then validates the result before execution can happen.

Compiled with python3 -m py_compile and run with a mocked Ollama response in Python 3.14.