diri AGENTS.md

diri AGENTS.md is an instructions file for Codex, OpenCode from cristicretu/diri. It costs 2,162 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for Diri, a Rust-based project that manages remote terminal sessions. They define the approved remote design, repository scope, and required agent catalog.

In plain words
What is it for?
Use them when working on Diri’s remote sessions, SSH, pseudo-terminals, terminal state, packaging, or agent manifests.
Why use it?
They give coding agents a fixed architecture to follow when changing remote behavior, avoiding outdated transport designs and accidental changes to core repository rules.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/cristicretu/diri/agents-md
Clone the repo
git clone --depth 1 https://github.com/cristicretu/diri

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for diri AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/cristicretu/diri/agents-md.svg)](https://agentmods.dev/instructions/cristicretu/diri/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/cristicretu/diri/agents-md"><img src="https://agentmods.dev/badge/instructions/cristicretu/diri/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,162 This file is loaded in full into every session.
When invoked 2,162 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.02162 $0.02162
Opus 5 $0.01081 $0.01081
Sonnet 5 $0.00432 $0.00432
Haiku 4.5 $0.00216 $0.00216

Measured 6d ago against content hash 2770bbc0782e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

diri AGENTS.md scanned grade A with 1 finding 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 6d ago.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- The current baseline must not require remote `tmux`, `screen`, `zellij`, Node.js, Python, `socat`, `nc`, `curl`, `wget`, or a preinstalled Diri service.
AGENTS.md · 109 lines

How it starts

The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Diri repository instructions

Scope

These instructions apply to the whole repository. The active architecture decision baseline for remote work is diri/REMOTE_PORT.md; read it before changing remote session behavior, SSH handling, PTYs, holders, terminal state, or packaging.

Completed remote architecture baseline

  • The remote refactor is complete. Maintain the bootstrapped Remote PTY Holder as Diri's only remote session transport; future remote work extends this architecture rather than reopening the transport migration.
  • Implement and maintain remote behavior entirely in the Rust workspace under diri/.
  • Implement and verify every product behavior in the Rust workspace. Historical migration documents are context, not an alternate implementation baseline.
  • diri/crates/diri-engine/manifests is the canonical Agent catalog. Keep at least the established 20 manifests and preserve the package-time count gate: a missing manifest does not error, it silently spawns a bare login shell.
  • The former Rust SSH + tmux transport has been deleted. Never reintroduce it as legacy_tmux, a feature flag, a migration path, or a runtime fallback. Missing, corrupt, unsupported, or capability-incompatible Helper artifacts must fail closed with a structured error; an unavailable packaged transport reports remote_transport_unavailable.
  • When implementation and diri/REMOTE_PORT.md disagree, stop and resolve the design mismatch explicitly instead of silently choosing one.

Rust workspace map

  • diri/crates/diri-engine: authoritative local session engine, PTY/holder lifecycle, status reduction, host orchestration, and remote bootstrap/SSH seam.
  • diri/crates/diri-proto: shared Rust data models and wire codecs. remote_pty is the authoritative versioned Remote Helper protocol; companion access is not part of the current remote transport.
  • diri/crates/diri-client: local app-to-engine client. It should not execute SSH directly.
  • diri/crates/diri-term: GPUI terminal renderer and client-side terminal interaction.
  • diri/crates/diri-app: desktop UI. It requests remote actions through the local Engine.
  • diri/crates/diri-node: optional enhanced node mode. It is not a dependency of the default SSH bootstrap path.
  • diri/crates/diri-terminal-state: shared headless terminal parser/Grid/Snapshot/Diff implementation used by the local Engine and remote Holder.
  • diri/crates/diri-remote: minimal remote Helper binary. Keep it independent of GPUI, diri-app, diri-client, and diri-node.

Read the full file on GitHub · 109 lines

Changes

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.

  1. 6d ago First seen · 109 lines · 2,162 tokens per session scan A 2770bbc0782e

Subscribe to this mod's changes

diri AGENTS.md is an instructions file published in the GitHub repository cristicretu/diri (280 stars, last pushed today), licensed Apache-2.0. It adds 2,162 tokens to every session, about $0.0108 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

gpuix AGENTS.md

AGENTS.md instructions for remorses/gpuix, covering agents.md - gpuix codebase guide, readme is the public api contract, gpuix is a thin layer on gpui, project goal and mouse capture is armed by the press.

remorses/gpuix · 16,141 tokens

agentharness rust.instructions.md

Rust-specific naming conventions, style, and best practices.

andr-ca/agentharness · 909 tokens

clave-cli CLAUDE.md

Claude Code instructions for grabrick/clave-cli, covering claude.md — навигатор по проекту clave, 0. что такое clave, 1. жёсткие правила общения и авторства, 2. тулчейн (иначе cargo: command not found) and 3. гейт: без него ничего не отгружается.

grabrick/clave-cli · 2,551 tokens

turso AGENTS.md

AGENTS.md instructions for tursodatabase/turso, covering turso agent guidelines, quick reference, testing, running tests and test organization.

tursodatabase/turso · 2,194 tokens

cli AGENTS.md

AGENTS.md instructions for googleworkspace/cli, covering agents.md, project overview, build & test, changesets and architecture.

googleworkspace/cli · 2,700 tokens

azure-sdk-for-rust resourcemanager.instructions.md

Instructions for Azure/azure-sdk-for-rust, a project described as: This repository is for the active development of the Azure SDK for Rust. For consumers of the SDK we recommend visiting Docs.rs and looking up the docs for any of libraries in the SDK.

Azure/azure-sdk-for-rust · 400 tokens