agentleFS
thiagodmontthiagodmont/keynobi/AGENTS.md

keynobi

AGENTS.md201 starsChanged 7 months agoMITView on GitHub

Keynobi is a macOS companion app for Android development: Gradle builds, logcat, devices, UI hierarchy, and an MCP server for AI clients. Tauri 2 (Rust, tokio) backend, SolidJS + TypeScript + Vite frontend, ts-rs for IPC types, rmcp for MCP. Each reference doc ends with Known Gaps: rules the code does not meet yet. Do not copy a known gap into new code. Run the checks for what you changed; all must pass. Update the reference doc that owns what…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 35,266 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 repository3 other files it gives its agents.

The file

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

5 rules. About 0 are common, 4 are distinctive, and 1 is 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.

  • 1

    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:

    Do not mention external documents or tool names in code, comments, or branch names.

    line 41
  2. Distinctive:

    Run the checks for what you changed.

    line 45
  3. Distinctive:

    Update the reference doc that owns what you changed (see Where to Look).

    line 55
  4. Very specific:

    Never commit docs/ (local planning files), secrets, or machine-specific paths.

    line 62
  5. Distinctive:

    Do not bump versions, tag, or run release scripts unless asked.

    line 63

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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

AGENTS.md

Keynobi is a macOS companion app for Android development: Gradle builds, logcat, devices, UI hierarchy, and an MCP server for AI clients. Tauri 2 (Rust, tokio) backend, SolidJS + TypeScript + Vite frontend, ts-rs for IPC types, rmcp for MCP.

Commands

npm ci                     # install
npm run tauri dev          # run the app (first Rust build takes minutes)
npm run dev:web            # frontend only, against the mock backend
npm run generate:bindings  # after changing Rust models; commit src/bindings/

Where to Look

TaskRead
Any changereferences/BEST_PRACTICES.md, references/CODE_PATTERN.md
Build, logcat, devices, layout, settingsreferences/DOMAIN_PATTERNS.md
MCP tools, prompts, resourcesreferences/MCP_SERVER.md
UI components, styling, accessibilityreferences/DESIGN_SYSTEM.md
User-visible behavior, shortcutsreferences/USER_MANUAL.md

Each reference doc ends with Known Gaps: rules the code does not meet yet. Do not copy a known gap into new code.

Key Rules

  • Layering: components → stores/services → src/lib/tauri-api.ts → Tauri commands → Rust services. Only tauri-api.ts calls invoke; commands validate and delegate.
  • IPC contract: a command change updates the Rust handler, generate_handler! in lib.rs, the tauri-api.ts wrapper, and the mock backend together. After changing Rust models, run npm run generate:bindings and npm run generate:ipc-fixtures; import IPC types from @/bindings and never edit generated files.
  • One implementation per behavior: Tauri commands and MCP tools call the same service function. Never copy logic into mcp_server.rs.
  • Process model: keynobi --mcp attaches to the running app when it can (the app serves the session on its own state) and otherwise runs standalone with its own state, which the GUI does not see. See references/MCP_SERVER.md § Modes.
  • Untrusted input: validate identifiers with utils/validation.rs and paths with utils/path.rs (canonicalized, never raw starts_with). Arguments to adb shell are re-parsed by the device shell.
  • Rust: no unwrap() in production code; new commands return Result<T, AppError>; never hold a Mutex across .await; every growing collection has a named cap.
  • Frontend: register shortcuts with registerKeyAndAction() in App.tsx; build UI from @/components/ui primitives and theme tokens.
  • User data: tests must never read or write ~/.keynobi. Unit tests get a temp data directory automatically (cfg(test) in settings_manager); integration tests must call tests/common::isolate_data_dir() first. CI fails if a test creates ~/.keynobi.

Code Style

  • Match the surrounding code. Formatting is enforced by Prettier and rustfmt.
  • Comment only when the code cannot explain itself; keep comments short.
  • Do not mention external documents or tool names in code, comments, or branch names.

Before You Finish

Run the checks for what you changed; all must pass.

npm run lint && npm run format:check && npm run typescript:check && npm test
npm run test:ds     # design system, shared styles, or tokens
npm run test:e2e    # user flows or IPC
cd src-tauri && cargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo test --lib --tests
cd src-tauri && cargo clippy --features telemetry -- -D warnings && cargo test --lib --tests --features telemetry  # telemetry code

Update the reference doc that owns what you changed (see Where to Look). Remove a Known Gaps entry when you fix it; add one when you knowingly leave a rule unmet.

Git and PRs

  • Branches: <type>/<short-kebab-slug>, for example fix/logcat-reconnect.
  • Commits and PR titles: Conventional Commits, type(scope): summary. Types: feat, fix, docs, refactor, test, ci, chore, style, perf. The changelog is generated from them.
  • Fill in .github/pull_request_template.md. Keep PRs to one concern.
  • Never commit docs/ (local planning files), secrets, or machine-specific paths.
  • Do not bump versions, tag, or run release scripts unless asked.

Security

Report vulnerabilities privately (see SECURITY.md), never in a public issue or PR.

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.