Borrowing it
Nothing to install: this file belongs to hyperlogue/r3. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/hyperlogue/r3/main/AGENTS.mdgit clone --depth 1 https://github.com/hyperlogue/r3Wrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/hyperlogue/r3/agents-md)<a href="https://agentmods.dev/instructions/hyperlogue/r3/agents-md"><img src="https://agentmods.dev/badge/instructions/hyperlogue/r3/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/hyperlogue/r3/agents-md"><img src="https://agentmods.dev/badge/instructions/hyperlogue/r3/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.04845 | $0.04845 |
| Opus 5.5 | $0.01938 | $0.01938 |
| Sonnet 5.5 | $0.00969 | $0.00969 |
| Haiku 4.5 | $0.00485 | $0.00485 |
Grade A, and why
r3 AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 324 lines — stays where its author put it; the contents beside it link to each section on GitHub.
r3 — Render. Review. Refine.
r3 is a local-first workspace for published artifacts and human/agent conversations. A per-user server owns immutable content and persisted threads; the browser, CLI, and agents use the same HTTP/JSON contract. The server, worker, CLI, and SPA ship as one self-contained binary. Read README.md for usage.
Write README.md for human readers evaluating and getting started with r3. Keep agent instructions, protocol semantics, and exhaustive feature details in the agent guide or reference documentation.
Use CONTEXT.md for domain terminology. Backend names the entity; server and notification worker name its storage and local notification roles. Subscription names notification routing state; selected subscription names the one currently chosen. Existing protocol fields retain their wire spellings.
This file, the artifact design, schema explanation, and the deep-reference skills below are the design source of truth. Update the document that owns a decision when it changes. Verification maps behavior to executable acceptance checks. Earlier live-file reviews have been retired; imported historical evidence remains readable but does not define new API behavior.
Architecture
The HTTP/JSON contract is the product. Start at shared/artifacts.ts (re-exported
by shared/types.ts), then server/artifact-api.ts, cli/artifact-commands.ts,
and web/src/artifact-api.ts. Keep all three clients aligned.
publisher: capture local files/git → CLI HTTP upload ─┐
browser: fetch + authenticated event stream ──────────┼→ backend server
agent: CLI/HTTP publications, threads, claims ───────┘ SQLite + immutable blobs
local agent harness ← persistent worker ← outward stream ← selected backend
opaque preview document → scoped version bytes + trusted r3 runtime
- The server is the only SQLite writer. Storage and domain services are explicitly constructed and injected; importing modules must not open a database.
- Ordinary requests use artifact/version identity. The server never resolves a publisher path, Git repository, worktree, or live file. Git and directory capture run on the publisher. Direct upgrades from live-review stores require r3 1.5.0 first; current startup upgrades only artifact schemas.
- Projects are optional groups, assigned explicitly or inferred from a sanitized publisher-supplied Git remote under server policy. Their IDs do not derive from paths or URLs. Later publications preserve the group; deletion preserves artifacts.
- One logical agent session identifies one run. Multiple agents, including subagents, use distinct IDs. Sessions are attribution, not credentials, accounts, artifact ownership, or live presence.
- Local mode starts the same backend server lazily and announces it in
$XDG_RUNTIME_DIR/r3/daemon.json. A private Unix sidecar bootstraps local CLI credentials. A loopback-only server needs no login unlessrequireLogin=true; any external bind, host, public URL, or trusted proxy always requires login and refusesrequireLogin=false. No-login mode refuses forwarded requests, issues no credentials, and the browser warns once about it unlessdisableLoginNoticeis set. Publication URLs stay stable;r3 openneeds a one-time sign-in ticket only when local login is required. Browser boot never exposes the API credential. Backend selection isR3_URL, nearest project.r3.json, userbackendUrl, then automatic local. Saved credentials are keyed by the complete normalized URL;r3 loginsupports browser approval or an API key. The separate persistent worker opens only private Unix IPC and outgoing backend streams. CLI data/watch go directly to the backend. Read remote protocol for auth, recovery, and wire rules. - The loopback application listener dispatches scoped preview paths separately from its authenticated API. Previews use the browser's r3 address automatically; every rendered document has an opaque browser origin and no application credentials. App HTML downloads are attachments; the workspace checks browser capabilities and obtains any required consent before loading executable documents.
- SSE carries invalidations after committed writes. Clients refetch state on ready or reconnect. No filesystem watcher or live-content fallback remains.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- today Changed · +5 lines · +101 tokens per session f7af022acf9d
- 11d ago Changed · +23 lines · +406 tokens per session 00450d904a09
- 12d ago Changed · +4 lines · +57 tokens per session 7d33bac3a674
- 13d ago Changed · +8 tokens per session 879ccbea8f72
- 14d ago Changed · -5 tokens per session 98ae8ab310b2
- 15d ago Changed · -2 lines · -27 tokens per session df31016fa9a1
- 17d ago Changed · +4 lines · +35 tokens per session e7586816c7bf
- 18d ago Changed · +2 lines · +31 tokens per session 2661c84b4a6e
- 25d ago Changed · +6 lines · +85 tokens per session d18b6aaba60d
- 29d ago First seen · 282 lines · 4,154 tokens per session scan A a77b7bcf51c6
r3 AGENTS.md is an instructions file published in the GitHub repository hyperlogue/r3 (45 stars, last pushed today), licensed MIT. It adds 4,845 tokens to every session, about $0.0194 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.