agentleFS
OrionArchitektonOrionArchitekton/cosmocrat-operator/AGENTS.md

cosmocrat-operator

AGENTS.md2 starsChanged 17 months agoApache-2.0View on GitHub

ts-rs allows you to derive TypeScript types from Rust structs/enums. By annotating your Rust types with #[derive(TS)] and related macros, ts-rs will generate .ts declaration files for those types. When making changes to the types, you can regenerate them using pnpm run generate-types Do not manually edit shared/types.ts, instead edit crates/server/src/bin/generate_types.rs

  • Reads credentials
  • 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 repository4 other files it gives its agents.

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    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. Very specific:

    When making changes to the types, you can regenerate them using pnpm run generate-types Do not manually edit shared/types.ts, instead edit …

    line 17
  2. Very specific:

    Do not manually edit shared/types.ts, instead edit crates/server/src/bin/generate_types.rs

    line 18
  3. Very specific:

    Run dev (frontend + backend with ports auto-assigned): pnpm run dev

    line 22
  4. Very specific:

    When testing changes by runnign the application, you should prefer pnpm run dev:qa over pnpm run dev, which starts the application in a …

    line 33
  5. Very specific:

    Keep functions small, add Debug/Serialize/Deserialize where useful.

    line 38
  6. Very specific:

    Use .env for local overrides.

    line 45

≈ “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

Repository Guidelines

Project Structure & Module Organization

  • crates/: Rust workspace crates — server (API + bins), db (SQLx models/migrations), executors, services, utils, deployment, local-deployment, remote.
  • frontend/: React + TypeScript app (Vite, Tailwind). Source in frontend/src.
  • frontend/src/components/dialogs: Dialog components for the frontend.
  • remote-frontend/: Remote deployment frontend.
  • shared/: Generated TypeScript types (shared/types.ts). Do not edit directly.
  • assets/, dev_assets_seed/, dev_assets/: Packaged and local dev assets.
  • npx-cli/: Files published to the npm CLI package.
  • scripts/: Dev helpers (ports, DB preparation).
  • docs/: Documentation files.

Managing Shared Types Between Rust and TypeScript

ts-rs allows you to derive TypeScript types from Rust structs/enums. By annotating your Rust types with #[derive(TS)] and related macros, ts-rs will generate .ts declaration files for those types. When making changes to the types, you can regenerate them using pnpm run generate-types Do not manually edit shared/types.ts, instead edit crates/server/src/bin/generate_types.rs

Build, Test, and Development Commands

  • Install: pnpm i
  • Run dev (frontend + backend with ports auto-assigned): pnpm run dev
  • Backend (watch): pnpm run backend:dev:watch
  • Frontend (dev): pnpm run frontend:dev
  • Type checks: pnpm run check (frontend) and pnpm run backend:check (Rust cargo check)
  • Rust tests: cargo test --workspace
  • Generate TS types from Rust: pnpm run generate-types (or generate-types:check in CI)
  • Prepare SQLx (offline): pnpm run prepare-db
  • Prepare SQLx (remote package, postgres): pnpm run remote:prepare-db
  • Local NPX build: pnpm run build:npx then pnpm pack in npx-cli/

Automated QA

  • When testing changes by runnign the application, you should prefer pnpm run dev:qa over pnpm run dev, which starts the application in a dedicated mode that is optimised for QA testing

Coding Style & Naming Conventions

  • Rust: rustfmt enforced (rustfmt.toml); group imports by crate; snake_case modules, PascalCase types.
  • TypeScript/React: ESLint + Prettier (2 spaces, single quotes, 80 cols). PascalCase components, camelCase vars/functions, kebab-case file names where practical.
  • Keep functions small, add Debug/Serialize/Deserialize where useful.

Testing Guidelines

  • Rust: prefer unit tests alongside code (#[cfg(test)]), run cargo test --workspace. Add tests for new logic and edge cases.
  • Frontend: ensure pnpm run check and pnpm run lint pass. If adding runtime logic, include lightweight tests (e.g., Vitest) in the same directory.

Security & Config Tips

  • Use .env for local overrides; never commit secrets. Key envs: FRONTEND_PORT, BACKEND_PORT, HOST
  • Dev ports and assets are managed by scripts/setup-dev-environment.js.

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.