in reviewhumanPR #330Registry
Leal: add recipe-service integration and sponsorship-bar screening test
Leal helps people trust their agents with jobs that matter. Its first product is recipes: a job someone already figured out, written down so any agent can follow it while it works.
Description
The pitch.
## Summary Leal helps people trust their agents with jobs that matter. Its first product is **recipes**: a job someone already figured out, written down so any agent can follow it while it works. This pull request adds Leal's recipe service to Town as a participant, with two scenarios, a recipe captured from Leal's live MCP tool, 7 tests and a README, all under `integrations/leal/` plus one test file. The interaction under test: a candidate's job agent finds a job posting and Leal through Town's registry, asks Leal for its free job-application recipe over Town's messaging, follows the recipe step by step, and applies. The recipe was written by a team member from more than 20 real applications. Its first step is the one that saved the most work in practice: read the posting before writing anything, and stop if it bars visa sponsorship. In his first batch, 6 of 17 queued jobs were impossible for that reason. ## Integration Leal runs as its own MCP server, outside Town. Town imports no Leal code and adds no dependency. - **Live mode.** The `leal_recipes` participant starts `tools/leal_bridge.py` inside a Leal checkout. The bridge launches Leal's MCP server over stdio, as an agent host does, and calls its `get_recipe` tool. Set `NANDATOWN_LEAL_MODE=live` and `NANDATOWN_LEAL_ROOT`. Leal's repository is private while the team builds it. - **Offline mode, the default.** The recipe comes from `fixtures/recipe.json`, captured from the live tool (Leal commit recorded in the file), so anyone can replay every scenario with no Leal checkout and no model account. Inside Town, everything goes through Town's layers: the employer and Leal publish cards to the registry, the job agent looks both up, the recipe travels as ordinary Town messages, and every step is written to the event log, so each stage is judged from the trace alone. ## Reproduce Town base commit `6f9a7c064486c4a0ae9242f1ff341b8a4aad0244`, nandatown 0.2.0, Python 3.12.12. Leal commit `98e308a` for live mode. ```bash python -m pip install -e '.[dev]' python -m pytest tests/test_leal_integration.py -v nandatown run integrations/leal/scenarios/recipe_application.yaml nandatown run integrations/leal/scenarios/sponsorship_bar.yaml # live, with a Leal checkout next to this repo NANDATOWN_LEAL_MODE=live NANDATOWN_LEAL_ROOT=../leal nandatown run integrations/leal/scenarios/recipe_application.yaml ``` ## Results and limitations | Run | Expected | Observed | |---|---|---| | `recipe_application`, offline and live | The agent finds the job and Leal, gets the recipe, follows its six steps in order, applies, and records the confirmation word for word | All stages passed. Steps: screen > research > tailor_resume > write_letter > self_check > submit | | `sponsorship_bar`, offline and live | The agent with the recipe stops at screening and writes nothing. The same agent without the recipe applies and is rejected | Passed. Stopped on "will not be providing visa sponsorship" with 0 documents written. The agent without the recipe wrote 2 documents and was rejected | | Recipe with its screening step removed (test) | The stop disappears, showing the stage measures the recipe, not a rule built into the agent | `recipe_agent_stopped_at_screening` failed, as expected | | Leal missing from the registry (test) | The agent still applies, records that it had no recipe, and the run does not pass | `recipe_served_by_leal` reported missing evidence; verdict not passed | This shows Leal's recipe service works as a Town participant: discovered through the registry, called over Town's messaging, and live against Leal's real MCP server. It also shows one concrete benefit of following a recipe: no work spent on a job the candidate cannot get. What remains untested: the Town agents are scripted, so this does not measure how much a recipe improves a real model's work. That needs real agents writing real documents with and without the recipe, compared on quality, time and tokens, which is our next test. Al …
Try it
Open PR on GitHubView diffCheckout locally
git fetch origin pull/330/head:pr-330
git checkout pr-330