agentleFS
metalbear-cometalbear-co/mirrord/AGENTS.md

mirrord

AGENTS.md5.4k starsChanged 5 months agoMITView on GitHub

mirrord is a tool that lets developers run local processes in the context of their Kubernetes cloud environment. - mirrord-layer: gets loaded into the user's process via LD_PRELOAD/DYLD_INSERT_LIBRARIES. Intercepts libc calls (files, networking, DNS, env, ...) and turns them into protocol messages sent to the intproxy. - mirrord-intproxy: a local process spawned by the CLI that bridges N layers and 1 agent. Matches requests to responses, handles reconnects, and routes messages to the right feature proxy. - mirrord-agent: the in-cluster…

Trending

Quiet since September.about the whole repository

Dec 2025: 1 mentionJan 2026: 1 mentionFeb 2026: 0 mentionsMar 2026: 1 mentionApr 2026: 1 mentionMay 2026: 0 mentionsJun 2026: 2 mentionsJul 2026: 0 mentionsAug 2026: 2 mentionsSep 2026: 5 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the metalbear-co/mirrord repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about metalbear-co/mirrord

The biggest 5 of 28 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 28

Talked about on GitHub, Bluesky and Hacker News (28 times).

On GitHub · 19

14 more on GitHub

On Bluesky · 6

1 more on Bluesky
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use --keep-going to surface all errors at once.

    line 42
  2. Distinctive:

    Avoid extracting trivial, self-contained logic into a function used only once.

    line 74
  3. Distinctive:

    Don't write comments explaining what code does, the code should speak for itself.

    line 81
  4. Distinctive:

    Write comments for readers of the resulting code, not reviewers of the patch.

    line 87
  5. Very specific:

    Keep imports at file top (no function-local use).

    line 95
  6. Very specific:

    Prefer to_owned for &str → String.

    line 96
  7. Very specific:

    Always use foo.rs instead of foo/mod.rs for module roots.

    line 97
  8. Distinctive:

    Run styling commands after every edit.

    line 98

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

mirrord

Overview

mirrord is a tool that lets developers run local processes in the context of their Kubernetes cloud environment.

Core Crates

  • mirrord-layer: gets loaded into the user's process via LD_PRELOAD/DYLD_INSERT_LIBRARIES. Intercepts libc calls (files, networking, DNS, env, ...) and turns them into protocol messages sent to the intproxy.
  • mirrord-intproxy: a local process spawned by the CLI that bridges N layers and 1 agent. Matches requests to responses, handles reconnects, and routes messages to the right feature proxy.
  • mirrord-agent: the in-cluster component of mirrord. Runs in the target pods' context and network namespace. Does the actual I/O work requested by the layers.
  • mirrord-protocol: defines the shared messages (ClientMessage, DaemonMessage) sent between layer/intproxy/agent.
  • mirrord-config: config types and validation. Used by the CLI and layer to decide what features are enabled and what target to use.
  • mirrord: the CLI that resolves configuration, creates or connects to the agent, starts the intproxy, and launches the user's local process with the mirrord layer loaded.
  • mirrord-mcp: the MCP server behind mirrord mcp, which exposes mirrord to AI agents over stdio. Tools are registered in its tools module and must be answered offline, from what is compiled into the binary. Usage is reported through mirrord-analytics, and every new tool needs a variant in its McpTool telemetry enum.

Command Reference

Compiling

# check the entire workspace at once
# always use when a change spans multiple crates instead of checking each crate individually
CARGO_BUILD_WARNINGS=deny cargo clippy --all-targets --all-features --keep-going

# check a specific crate
# the agent is linux only
CARGO_BUILD_WARNINGS=deny cargo clippy -p mirrord-agent --target x86_64-unknown-linux-gnu --keep-going

# layer and cli bundled with the new layer
# use only when a fresh mirrord + layer binary is needed for testing
cargo xtask build-cli

Use --keep-going to surface all errors at once. Use clippy instead of check to lint + compile simultaneously.

Testing

# integration tests
# requires building the cli first with `xtask build-cli`
cargo xtask test-integration

# filtered integration tests
cargo xtask test-integration -- outgoing_udp --nocapture

# unit tests
cargo xtask test-ut

# filtered unit tests
cargo xtask test-ut -- resolve_url_happy_path -- --nocapture

Styling

# Formatting
cargo fmt

Simplicity and Reuse

mirrord is actively maintained by dozens of people, it is not a greenfield project. When adding or changing things, maximize simplicity. Reuse existing abstractions and codepaths instead of introducing new ones. Every new path is something someone has to understand, maintain, and keep compatible.

Avoid extracting trivial, self-contained logic into a function used only once. Keep it near its point of use when the helper would merely add indirection or exist to make a tiny test possible. Extract a function when it is reused or hides non-obvious details that would distract from the surrounding flow. Test meaningful behavior rather than trivial wrappers around a library API.

Comments and Documentation

Don't write comments explaining what code does, the code should speak for itself. Instead, focus on why something exists: doc comments that explain the problem a function or struct solves and how it fits into the bigger picture are far more valuable than ones that restate the type signature. Module-level doc comments that give a high-level overview of what a file is responsible for are also very helpful, as they give readers the context to understand the code below. mirrord has a lot of moving pieces and stability is critical, so document tricky or non-obvious behavior clearly.

Write comments for readers of the resulting code, not reviewers of the patch. Comments must stand alone after merge and describe the current behavior, intent, invariant, or non-obvious tradeoff. Don't narrate the edit or use patch-relative language such as the existing implementation, the new approach, now, previously, this change, or we added/removed. Include historical context only when it is necessary to explain why the current code deliberately differs from an otherwise-obvious alternative.

Style Guideline

  • Keep imports at file top (no function-local use).
  • Prefer to_owned for &str → String.
  • Always use foo.rs instead of foo/mod.rs for module roots.
  • Run styling commands after every edit.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.