Skip to content

Docs: a Sans-IO how-to for agents, loaded where each tool reads instructions - #1131

Merged
GLinnik21 merged 3 commits into
mainfrom
docs/sans-io-guide
Oct 29, 2026
Merged

GLinnik21 merged 3 commits into
mainfrom
docs/sans-io-guide

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

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

Why this placement. How each tool reads instructions:

  • Claude Code loads a subfolder CLAUDE.md when it reads, writes or edits a file there, and expands @ imports. With a root CLAUDE.md, it does not read a subfolder AGENTS.md.
  • OpenCode loads a subfolder AGENTS.md after a read in that folder. It never reads CLAUDE.md and does not expand @.
  • Codex reads only the AGENTS.md chain from the root down to its start folder.

So data/src carries the content in AGENTS.md beside a CLAUDE.md that imports it, and root AGENTS.md points 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, OK
  • python3 ci/test_managed_targets.py: Ran 19 tests, OK
  • python3 ci/test_ci_workflows.py: Ran 77 tests, OK

One 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

GLinnik21 and others added 3 commits October 29, 2026 16:07
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]>
@GLinnik21 GLinnik21 added the documentation Improvements or additions to documentation label Oct 29, 2026
@GLinnik21
GLinnik21 merged commit cd6fdbf into main Oct 29, 2026
15 checks passed
@GLinnik21
GLinnik21 deleted the docs/sans-io-guide branch October 29, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agents have no how-to for writing Sans-IO code where they write it

1 participant