agentleFS
nyrowaynyroway/nyro/AGENTS.md

nyro

AGENTS.md194 starsChanged 4 months agoApache-2.0View on GitHub

  • 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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Keep changes focused and reversible.

    line 42
  2. Distinctive:

    Prefer existing patterns and utilities before adding abstractions or dependencies.

    line 43
  3. Very specific:

    Do not edit generated build output such as webui/dist/ unless the task explicitly requires it.

    line 44
  4. Distinctive:

    Add localized alternatives explicitly, but keep the canonical fallback/default value in English unless a caller/user setting selects …

    line 50
  5. Very specific:

    When modifying the database schema — including changes to INIT_SQL, POSTGRES_INIT_SQL, MYSQL_INIT_SQL constants or the migrate() function …

    line 79
  6. Very specific:

    Update docs/database/schema.md to reflect the new table/column definitions.

    line 81
  7. Very specific:

    Verify with make check and make test, then commit (chore: release vX.Y.Z) and push the branch.

    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
<!-- Generated: 2026-05-21 | Updated: 2026-09-09 -->

Nyro AI Gateway

Purpose

Nyro is a Rust workspace for a local AI protocol gateway with a Tauri desktop app, standalone server, and React WebUI. It translates OpenAI / Anthropic / Gemini-compatible client traffic to configured model providers while keeping administration and configuration local.

Key Files

FileDescription
Cargo.tomlRoot nyro package plus workspace definition for the new data-plane crates and legacy applications.
Cargo.lockLocked Rust dependency graph.
README.md / README_CN.mdUser-facing project documentation in English and Chinese.
MakefileCommon development and release commands.
docs/design/architecture.mdArchitecture overview and module layout.
webui/package.jsonReact/Vite WebUI dependencies and scripts.

Subdirectories

DirectoryPurpose
src/Experimental source-built root nyro proxy entrypoint, bootstrap, and Unix SIGHUP configuration reload; separate from released legacy entries.
crates/nyro-kernel/Workload-neutral lifecycle/generation library used by the experimental root proxy.
crates/nyro-protocol/Protocol wire types and bounded stream framing for the new data plane.
crates/nyro-llm/New typed LLM runtime, OpenAI/Anthropic/Gemini Chat codecs/providers, request execution, and correlated usage observations.
crates/nyro-config/Strict standalone file configuration for the experimental root proxy.
crates/nyro-security/Transport-neutral credential authentication and authorization primitives.
crates/nyro-limit/Shared concurrency, token-bucket rate admission, and cumulative quota primitives.
crates/nyro-core/Core Rust library: gateway, proxy, protocol conversion, provider adapters, storage, admin service.
crates/nyro-tools/Rust CLI/tooling crate.
src-server/Standalone server binary exposing proxy/admin HTTP surfaces.
src-tauri/Tauri desktop application shell and IPC integration.
webui/React + TypeScript management console.
docs/Design, server, standalone, and testing documentation.
tests/Python/E2E test assets and shared fixtures.
scripts/Install and release automation.

For AI Agents

Working In This Repository

  • Keep changes focused and reversible; do not mix unrelated cleanup into feature or refactor work.
  • Prefer existing patterns and utilities before adding abstractions or dependencies.
  • Do not edit generated build output such as webui/dist/ unless the task explicitly requires it.
  • Preserve separate English and Chinese user-facing docs when updating public documentation.

Multilingual Defaults

  • For any multilingual/i18n-capable value, the default must be English, in both frontend and backend code.
  • This applies to UI labels, fallback strings, seed/default configuration, generated examples, API defaults, and documentation-derived constants.
  • Add localized alternatives explicitly, but keep the canonical fallback/default value in English unless a caller/user setting selects another language.

Testing Requirements

  • Rust core changes: run the narrowest relevant cargo test -p <crate> ..., then cargo check -p <crate> or cargo clippy -p <crate> --all-targets when behavior or public APIs change.
  • WebUI changes: run the relevant package script from webui/ such as npm run lint or npm run build when TypeScript/UI behavior changes.
  • Documentation-only changes should still be checked for path/name accuracy.

Common Patterns

  • nyro-kernel owns resource/generation invariants only; keep business rules, configuration, HTTP, databases, and global module discovery outside it. See its README for lifecycle ownership and cancellation contracts.
  • nyro-core should remain transport-agnostic; desktop IPC and server HTTP layers call into core APIs rather than embedding core business logic.
  • Admin service code should be split by functional responsibility and tested through public APIs where possible; keep private state-machine tests internal instead of exposing private APIs just for tests.
  • Protocol/provider logic should keep protocol conversion boundaries explicit and avoid coupling provider adapters to UI/server transport concerns.

Dependencies

Internal

  • The root nyro package composes nyro-kernel, nyro-config, nyro-llm, nyro-security, and nyro-limit for the experimental file-config proxy.
  • src-tauri/ and src-server/ depend on crates/nyro-core/.
  • webui/ talks to the desktop IPC/server admin surfaces and should not duplicate core business rules.
  • Documentation in docs/ should reflect current crate and module boundaries.

External

  • Rust workspace uses Tokio, Axum, Reqwest, SQLx, Serde, Tauri, and tracing-related crates.
  • WebUI uses React, Vite, TypeScript, Radix UI primitives, TanStack Query, and Zustand.
<!-- MANUAL: Any manually added notes below this line are preserved on regeneration -->

Database Changes

When modifying the database schema — including changes to INIT_SQL, POSTGRES_INIT_SQL, MYSQL_INIT_SQL constants or the migrate() function in any storage backend — you must also:

  1. Update docs/database/schema.md to reflect the new table/column definitions.
  2. Regenerate deploy/schema/postgres.sql and deploy/schema/mysql.sql to match the final post-migration state:
    nyro-tools dump-schema --backend postgres > deploy/schema/postgres.sql
    nyro-tools dump-schema --backend mysql    > deploy/schema/mysql.sql
    These files are the authoritative reference schema for DBAs. They represent the final state after all migrations have run (with final table names: models, model_backends, api_key_models).

The SQL files in deploy/schema/ are derived reference artifacts — do not manually edit them except to update the header comment. Always regenerate from the migration source of truth.

Release Process

Local release work (cutting a release/vX.Y.Z branch off master through pushing it):

  1. Branch: git checkout master && git pull && git checkout -b release/vX.Y.Z.
  2. Bump the version in 3 places (keep identical): Cargo.toml [workspace.package].version, src-tauri/tauri.conf.json version, webui/package.json version. Refresh Cargo.lock via cargo update -w (never edit it by hand).
  3. Changelog: summarize all commits since the last tag (git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline) into a new version entry, and write it to both CHANGELOG.md (English, canonical) and CHANGELOG_CN.md (Chinese).
  4. Verify with make check and make test, then commit (chore: release vX.Y.Z) and push the branch.

PR merge (release/vX.Y.Z → master) and tagging vX.Y.Z are done remotely on GitHub; pushing the tag triggers the release workflows.

See docs/release.md for the full local release runbook (source of truth).

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.