Repository navigation
docs: the recipe layer is three systems that never meet — audit + convergence plan - #3960
Merged
Merged
Conversation
Audited against build 5193/335cb25e4 after asking whether a user could request an activity nobody coded (a job-application campaign) from #general. They cannot. - experience/recipe.rs describes a room, executes nothing - recipe/ (PipelineExecutor) executes anything, owns no room - commands/benchmark.rs:1287 is a private third loader over a fourth store affordances grant no verbs (hands_surface filters a GLOBAL list on hardcoded prefixes); layout has zero consumers; declared param defaults are not the defaults (benchmark.rs:1906 uses the Rust Default). recipe/mod.rs already states the law and names the static-plumbing trap that benchmark.rs then rebuilt. Includes the benchmark recipe written out as the migration target, the ledger of what we do vs what is authored, and a user's arbitrary ask as the same data. Cards: c2ec4b96 360143a1 c6648d08 dbdd6bcf fa447bfe d92a5941 92de4d78 7d8f8fa8
Joel's scope call: chat and benchmarks are the only exotic consumers; profile, theme/universe and settings are positron pages needing regions only. So the schema needs exactly three live capabilities — regions (have them), affordances (inert), pipeline (absent) — and the positron pages are the regression suite. Phase A makes the recipe layer one thing: one schema with real param defaults (S0), affordances selecting the tool surface (S1), one store and loader (S2), a pipeline that runs in a room (S3). Phase B is the proof: benchmark authored as a recipe and run beside the Rust path before its private store, loader, param model and card mirror are deleted (S4), then an ask becomes a recipe (S5) and a ratchet stops a fourth system appearing (S6). Every slice must delete more than it adds; S4 strongly so.
One step shape for both entry points: ExperienceRecipe gains an optional `pipeline: Vec<RecipeStep>`, reusing recipe::types::RecipeStep rather than declaring a second step type. Nothing executes it yet (S3 gives the executor the room) — this is the schema half, so the two systems stop being two shapes. RecipeStep gains PartialEq and a ts-rs export; ExperienceRecipe.ts regenerates. Empty pipeline is the ordinary case and stays the default, so chat, profile, theme/universe and settings — positron pages that are regions and nothing more — are byte-identical. A floor test in source.rs asserts no shipped recipe grew a pipeline by accident; benchmark gets one deliberately in S4. Plan amended: the declared-defaults fix (benchmark.rs:1906 uses the Rust Default, not the recipe's) moves to S4, where dispatch resolves params through the recipe anyway — doing it in S0 would build that resolution twice. Tests: experience 58, recipe 134, modules::activity 19 — all green. Card 360143a1. Plan: docs/planning/RECIPE-CONVERGENCE-PLAN.md
…face
Before this, a recipe's `affordances` rode into the Experience manifest and
reached every RENDERER and never the citizen standing in the room: her tool
surface was persona_tools::native_tool_specs() filtered by hardcoded name
prefixes in hands_surface(). The recipe could not add a verb or withhold one.
"Recipe = content-type + RULES" was half true — the rules stopped at the screen.
Now the room's manifest reaches the mind, through the seams that already exist:
ipc installs the node's ONE RecipeExperienceSource (the same registry the
positron projection resolves from) via install_node_experience_source;
the persona spawn passes it as PersonaBrainConfig.experience;
the cycle stamps Workspace.room_affordances from it on every tick;
select_tool_surface takes the room's set FIRST — before focus and budget,
because both narrow a surface the room has already bounded.
One filter, one place. The selection keys on RAW command names cached beside
the wire-dialect specs — the 2026-09-04 muting was a name-space mismatch at
exactly this seam, and the test pins it. SelectedSurface.specs is a Cow so a
room-selected subset and the cached surfaces share one type.
Three guards, each a test:
- a room declaring nothing is byte-identical to pre-S1 on every arm
- a room whose affordances match no native verb falls back to the pre-S1
surface and probes delib.surface.room_affordances_unmatched — never an
empty offer (the #206 cliff)
- the shipped benchmark recipe must authorize every hand a work turn
offers; it named code/list and code/tree, which are now in benchmark.json
The one deliberate behaviour change: benchmark.json authors its affordances
(hands, web/fetch + web/search, room/members, cognition/observe). Work turns
in a benchmark room are unchanged; message turns there no longer offer
activity/spawn|invite|recipes, interface/screenshot, perception/look,
vision/look — a solver's room withholds what a solver does not need.
NativeToolSpec + ToolInputSchema gain PartialEq (the byte-identical test).
Tests: faculty 70/70, workspace 27, experience 55, persona_workspace 21,
should_respond 2, vitals 4, activity 19, persona_tools 11 — green.
Card c2ec4b96. Plan: docs/planning/RECIPE-CONVERGENCE-PLAN.md
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…eleted recipe/run read a SECOND store — rows in a `recipes` data collection — while rooms resolved from the recipe files. Zero such rows ever existed on this node: the second store never had a tenant. Now `recipe/run` resolves its name as a PURPOSE through the node's one ExperienceSource (the same catalogue activity/recipes lists and activity/spawn accepts), via a new trait method `recipe_for_purpose`; an unknown purpose is a named refusal pointing at the overlay directory, never a fabricated recipe. PipelineExecutor::run takes (name, &[RecipeStep], args) so the ONE activity recipe's pipeline drives it directly; recipe::types::Recipe is deleted and its tolerant-parse invariant (unknown fields at both levels load) folds into the S0 test. Module docs and the recipe/run help text stop describing a store that no longer exists; RECIPE-EXECUTION-RUNTIME.md's "Violation 5" is marked resolved. Net: one type, one loader and one store path removed. Nothing added but a trait method and a test. Tests: recipe 75, experience 59, commands::recipe_run 2, generate_recipe 46. Card 360143a1 (S3 next). Plan: docs/planning/RECIPE-CONVERGENCE-PLAN.md Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…s seeded
Until now an activity recipe could describe a room and nothing else. Now the
ONE birth path — spawn_activity_room, all five callers — runs the recipe's
pipeline after the room is bound, with $room.{id,name,recipe} seeded and the
resolved params as $args, and the spawn result carries the receipt
(pipeline.{stepsRun,stepsSkipped,heldAt,trace}). An authored recipe with a
pipeline of existing verbs now spawns a room AND does work, no Rust committed.
THE APPROVAL BOUNDARY. `approval: "human"` on a step HOLDS the run there: the
step is not dispatched, the receipt names it (held_at), nothing after it runs.
Checked before interpolation so a held step never even resolves its arguments.
Proven over an EMPTY registry, where any dispatch would have failed loudly —
a clean receipt with held_at = 0 is proof nothing was attempted. This is what
keeps an authored campaign from submitting applications in a human's name
unattended: a property of the STEP, authored as data, not a policy elsewhere.
Callers without an executor at hand (benchmark_round, agent/solve, work —
all spawning the benchmark recipe, which declares no pipeline until S4) probe
activity.pipeline.unrun for a recipe that does declare one: a wiring fact,
never a silent no-op. recipe/run reports held_at too.
Executor: run_with(name, pipeline, args, seed) — run() delegates with no seed.
ExecutionState::seeded binds the room after args. RecipeStep gains `approval`
(ts-rs exported). The audit doc's examples now use the executor's REAL step
shape (params / outputTo / condition / approval); `each` and `on:` are marked
S3b, which lands inside S4 with its one consumer rather than ahead of it.
Tests: 176 across recipe, recipe_run, activity, experience, work,
benchmark_round — green. Card 360143a1. Plan: RECIPE-CONVERGENCE-PLAN.md
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…beside it
benchmark/dispatch does everything a round needs in one Rust function: import,
room, cards, tracker, staging, kickoff. A recipe cannot call a function — only
verbs. This slice splits dispatch's pieces into verbs that share its own writers,
so a round posted by the authored `benchmark/swe` recipe and one posted by
dispatch are the same round by construction:
prepare_cards(spec, selection) THE ONE WRITER of benchmark cards (task +
oracle only, no side effects). Extracted from
dispatch; dispatch now calls it too. The env
pre-warm stays dispatch's side effect.
benchmark/import pure: rows carry the writer's title/body and
the ONE parser's task id — the grader keys on
the title, so a recipe-posted card is graded
exactly like a dispatched one.
benchmark/round-open|round-track DELIBERATELY TEMPORARY adapters over the
round tracker, which holds a second copy of
card state the board already owns. When the
board-projection work deletes the tracker,
both verbs go and the pipeline shortens.
each fan-out in the executor: $item/$index per
element, results bound as an array. Proven
over an empty registry: three items, three
dispatches — never one with the array.
benchmark-swe.json (`benchmark/swe`, base academy, same affordances as the Rust
door): import → round-open → work/create ×each → round-track → invite → doctrine.
Params resolve through the recipe's DECLARED defaults — `driver: citizen` is now
real on this path, closing the defaults lie S0 deferred. activity/spawn routes a
benchmark purpose to dispatch ONLY when the recipe declares no pipeline; a recipe
that declares its behaviour drives itself. Genuine v4 id, pinned in shipped::.
Floor tests: every page recipe declares no pipeline; the authored round is made
only of a known verb set (a new step = a new verb, on purpose); both benchmark
recipes authorize every hand a work turn offers; shipped ids stay distinct
without a hardcoded count.
Still owed (S4b, in the plan): the side-by-side run on one (suite, seed, sample)
after deploy; kickoff parity; detached-solve staging as a step; then delete
dispatch, benchmark_recipes, load_recipe, run_params — and, with the board as
the card store, the tracker and its two adapter verbs.
Tests: recipe/import/work/benchmark 160, experience+activity 78, faculty floor —
green. Cards fa447bfe, 360143a1. Plan: RECIPE-CONVERGENCE-PLAN.md
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ma, definitive validation
Three things, all off every hot path (once per spawn, once per catalogue read;
the registry lookup is built once per process):
TYPED STEP VOCABULARY. on_error: OnError {Fail, Skip} and approval:
Option<Approval {Human}> are enums, not Option<String>. A misspelled policy is
refused at load and named, never silently the default. Unknown FIELDS stay
tolerated (a newer file loads on an older executor); unknown VALUES are refused.
Exported to TS and JSON Schema.
A PUBLISHED RECIPE SCHEMA. protocol/schema/experience-recipe.schema.json, from
ExperienceRecipe (schemars) on every test run exactly as the ts-rs bindings
are, gated by the same drift job (it now diffs protocol/schema/ too). An
authored file carries "$schema" and an editor validates and completes it.
This is what makes complete customization WITHOUT repo changes safe: the
overlay directory is the store, the schema is the contract, and the gate
below names what is wrong instead of asking for a compiler.
DEFINITIVE PIPELINE VALIDATION (recipe/validate.rs). Every step is checked
against the COMMAND REGISTRY'S OWN param schemas — like a request against an
API spec, not key-name matching: the command exists; literal values are typed
by `type`/`enum` through $ref definitions (anyOf for Option, oneOf for a
documented enum); every $reference is RESOLVED — $args.x to a declared recipe
param, typed by its default; $room.* to a seeded field (asserted against the
seeding site by test); $item/$index only inside `each`; anything else to an
earlier step's outputTo. Envelope fields (derived from CommandRequest) never
flag. activity/recipes lists issues per recipe as typed PipelineIssue rows;
activity/spawn refuses a recipe with any, naming each step.
The gate paid for itself on its first run against the live registry: my own
benchmark/round-track had #[schemars(skip)] on the two fields the authored
round passes. The schema was the lie; it declares them now (recipe/run's args
too).
Not yet definitive: the SHAPE of a prior step's output ($imported.cards is
known to exist, not what it holds) — command outputs carry a TS type, not a
JSON Schema; next is Output: JsonSchema on ActionCommand.
Tests: 171 across recipe, experience, activity, benchmark_import, recipe_run,
faculty floor — green. Plan: RECIPE-CONVERGENCE-PLAN.md § S3c
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…rives The loader derives a missing `id` from `purpose` (RFC 4122 v5) — "author a file, zero code" includes zero uuidgen — but the generated schema listed `id` as required, so an editor would have demanded a UUID the author must never hand-mint. The Rust type keeps `id` required (a LOADED recipe always has one); the file-level contract is the loader's, and it now says optional, with the derivation explained on the property. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
The identity ratchet (every_string_typed_identity_field_is_declared) caught S4a's benchmark/round-open and round-track taking room_id: String. Typed as Uuid now (string on the TS wire), the parse-and-refuse arm is gone, and the open result's round_id is a Uuid too. Guard 20/20, benchmark_import, validate. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docs only. The audit that found the defect, and the plan to repair it.
The finding
Asked whether an ordinary user could request an activity nobody coded — a job-application
campaign, from
#general— and traced why not. There are three separate systems called"recipe", and none of them is the recipe system:
experience/recipe.rsrecipe/(PipelineExecutor)recipescollectioncommands/benchmark.rs:1287benchmark_recipescollectionrecipe/mod.rsalready states the correct law — "adding a recipe CONCEPT is authoring data,never committing Rust" — and names the static-plumbing trap it was built to replace.
benchmark.rsrebuilt that trap six months later, over a fourth store.Three things an author cannot see from the schema:
affordancesgrant nothing. The tool surface is a globalnative_tool_specs()filteredby hardcoded prefixes in
hands_surface()(llm_deliberation_faculty.rs:414,:3205). Theroom never enters the decision, so no activity can bind an integration to itself or withhold
a capability. An infinite recipe space over a fixed global surface is a layout language.
layouthas zero consumers — andbenchmark.jsonships a full tree of it.benchmark.jsondeclaresdriver.default: "citizen";benchmark.rs:1906usesp.drive.unwrap_or_default(), the RustDefaultof theCLI arg type. They agree by coincidence.
The plan
Scoped by the real consumers rather than a framework: chat and benchmarks are the only exotic
users; profile, theme/universe and settings are positron pages needing regions only, so they
are the regression suite, not a target. The schema needs exactly three live capabilities.
Phase A — one recipe system: one schema with real param defaults (S0) · affordances select
the tool surface (S1, load-bearing) · one store and loader (S2) · a pipeline that runs in a
room (S3).
Phase B — benchmarks onto it: benchmark authored as a recipe and run beside the Rust
path on the same seed, matching board and verdicts, before its private store, loader, param
model and card mirror are deleted (S4) · an ask in a room becomes a recipe (S5, last, so the
generator emits a schema a real consumer has proven) · a ratchet so no schema field goes unread
again (S6).
Every slice reuses an existing primitive and deletes a parallel path. The check on each: does
it delete more than it adds? Phase A roughly neutral, S4 strongly negative.
Files
docs/architecture/RECIPES-ARE-THREE-SYSTEMS-THAT-NEVER-MEET.md— the audit, with thebenchmark recipe written out as the migration target and a user's arbitrary ask as the same
data
docs/activities/AN-ASK-NOBODY-CODED-IS-A-RECIPE.md— why the long tail of user asks is theproduct, and the approval boundary for outward-facing actions
docs/planning/RECIPE-CONVERGENCE-PLAN.md— the slices, their order and acceptanceCards on the continuum board:
c2ec4b96360143a1c6648d08dbdd6bcffa447bfed92a594192de4d787d8f8fa8Verified against build 5193 /
335cb25e4.