Repository navigation
Docs: a Sans-IO how-to for agents, loaded where each tool reads instructions - #1131
Merged
Merged
Conversation
AGENTS.md states the rule ("Logic never performs IO") and docs/sans-io.md is the
design record, but nothing told an agent HOW to keep it at the moment it writes
a store, a screen or a machine step.
docs/sans-io-guide.md is that companion: which files are machines (the MACHINES
array in ci/check-deps.sh) and which code is worker-side and so may do IO; what
counts as IO as a principle first, then the names, including the registry readers
the globals pattern does not match (server_ids, server_roster_gen, peek_settled,
current_gen, tape::active); six moves with a short snippet from this tree each
(emit a store job, take the session as an argument, step returns effects, count
the dt, a seam instead of a cfg(test) branch, refuse a command that arrives
without its input); task::beside; the ledgers (never the fix); and a checklist.
rust-modules/data/src/AGENTS.md is the store recipe (store, runner and Bridge
split, input as argument, refusal, drain, landing). Its CLAUDE.md imports it and
the guide, so Claude Code loads both when it touches the data layer; OpenCode
reads the AGENTS.md when it reads a file there. The root AGENTS.md, the only
file every tool loads at start, points at both. The screens, ui and player
guides get a short Sans-IO section importing the guide.
The doc-claim-auditor and pr-reviewer prompts enumerated the nested guides
("the three nested module guides") and now name them, the data one included.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… tree still has ledger lines The guide said #1108 removed "the registry reads" from the Watchlist and catalog stores, but the Watchlist's client_for and roster reads remain (W-2); it removed the session reads. The player guide said route/plan.rs reads no registry, but build_stream still has globals lines; it now states the rule for a step. The data recipe says a step must start no worker and read no registry, since Person and Search still read the roster. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…e numbers The guide no longer lists every IO-shaped name as "where IO belongs": `LiveIo` (called by the Watchlist step) and `build_stream` (its registry reads and fork) are named as ledger leftovers to leave alone, and an IO trait is a model only when just the job body calls it. The ledger rule now reads the same in the guide's ledger section, its checklist and data/AGENTS.md: a one-for-one rename of the fn that already holds a site (#1116's `sink` to `raw_sink`) changes only its key and never covers a new call; nothing else adds a line or raises a count. Corrected against docs/sans-io.md: only the `*_FILLS` list of each fanning call that reaches a store; the Bridge, not the store, calls `run_with_input`; Catalog's mailbox and Metadata's episode-page and Related-window takes are the ungated landings; Hubs raises its claim at the launch, not in the step; the `wall` rule does count clock reads in most machine scope; `ci/allow/forks/*.txt` are six ledgers, not one. A session read in a screen is answered (the Bridge folds it into what a store publishes; the screens' own `peek`/`client_for` reads are ledger lines). ui/src/CLAUDE.md: `ui/` is scanned for workers and globals only (it is not in FORK_SCOPE), and its frame-thread paragraph no longer sends machine code to `spawn_off_frame` or `storage_worker`; it emits an effect or store job. Line numbers are gone from both new files (paths, symbols and PR numbers stay), and docs/sans-io.md "Scope" now lists player/release.rs, matching the `MACHINES` array in ci/check-deps.sh. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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.
Closes #1130
Agents now get a how-to for Sans-IO code at the moment they write it, in a form each tool loads. Nothing outside prose changes: no code, no CI, no ledger.
What it adds
docs/sans-io-guide.md, the how-to beside the design recorddocs/sans-io.md:&OffFramefunctions, the runner, the Bridge, actuators, seams that only a job body calls);plex::server_ids(), theserver_*generation readers,session::peek_settled(),session::current_gen(),tape::active());dtit is handed, a seam or argument instead of acfg(test)branch (Browse: the Library's directory and listing-page reads leave as store jobs #1028), refuse a command that lacks its input;task::besideand blocking calls belong;LiveIoseam andbuild_stream's registry reads.rust-modules/data/src/AGENTS.md, the store recipe: the store, runner and Bridge split, and nine rules.rust-modules/data/src/CLAUDE.mdimports it and the guide.AGENTS.md, two sentences in the "Logic never performs IO" bullet, plus a "Load the right context" line fordata/stores.doc-claim-auditorandpr-revieweragents now include the new files. Indocs/sans-io.md, the Scope list gainsrelease.rs, matchingci/check-deps.sh.Why this placement. How each tool reads instructions:
CLAUDE.mdwhen it reads, writes or edits a file there, and expands@imports. With a rootCLAUDE.md, it does not read a subfolderAGENTS.md.AGENTS.mdafter a read in that folder. It never readsCLAUDE.mdand does not expand@.AGENTS.mdchain from the root down to its start folder.So
data/srccarries the content inAGENTS.mdbeside aCLAUDE.mdthat imports it, and rootAGENTS.mdpoints at both new files for Codex. The new files cite paths, symbols and PR numbers, never line numbers.Checks
python3 ci/test_agent_files.py: Ran 18 tests, OKpython3 ci/test_managed_targets.py: Ran 19 tests, OKpython3 ci/test_ci_workflows.py: Ran 77 tests, OKOne review round checked every name, symbol and PR number against the tree, and the advice against
docs/sans-io.md. Its ten findings are applied (e29277d).🤖 Generated with Claude Code