agentleFS
sinamerajisinameraji/autopilot/AGENTS.md

autopilot

AGENTS.md176 starsChanged 2 months agoMITView on GitHub

Project context for coding agents. Refreshed 2026-10-01. Autopilot (autopilot-ai, formerly KimiFlare) is a TypeScript terminal coding agent. OpenRouter with the user's own key is the default provider, and the model picker uses OpenRouter's live catalog; custom OpenAI-compatible endpoints and a Requesty fallback are also supported. Do not assume the old Cloudflare AI Gateway / Workers AI architecture still applies. Run a focused test with npx tsx --test src/path/to/file.test.ts. Tests use node:test and node:assert; there is no Jest/Vitest setup.

  • Installs packages
  • 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
  • could be automatic: a setting could enforce it
  1. Very specific:

    Run a focused test with npx tsx --test src/path/to/file.test.ts.

    line 25
  2. Distinctive:

    Keep the project ESM-only.

    line 49
  3. Distinctive:

    Prefer async/await; use type-only imports (import type) when appropriate.

    line 51
  4. Very specific:

    When adding a tool, define its schema/implementation and register it in ALL_TOOLS in src/tools/executor.ts.

    line 52
  5. Very specific:

    Keep ink, ink-text-input, ink-spinner, ink-select-input, react, commander, turndown, and camouflage-tui external in the root tsup.config.ts.

    line 54
  6. Distinctive:

    Run npm run typecheck before considering a change complete.

    line 56
  7. Distinctive:

    Use Conventional Commits. Do not bump the root package version manually.

    line 57
  8. Very specific:

    Never commit secrets or user state.

    line 58

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

Autopilot — Project Instructions

Project context for coding agents. Refreshed 2026-10-01.

Project

Autopilot (autopilot-ai, formerly KimiFlare) is a TypeScript terminal coding agent. OpenRouter with the user's own key is the default provider, and the model picker uses OpenRouter's live catalog; custom OpenAI-compatible endpoints and a Requesty fallback are also supported. Do not assume the old Cloudflare AI Gateway / Workers AI architecture still applies.

  • Node.js 20 or newer; TypeScript 5.7; ESM.
  • Interactive terminal UI plus one-shot print and JSON-RPC/SDK modes.
  • Main package: autopilot-ai; license: MIT.

Build, test, run

CommandPurpose
npm installInstall dependencies
npm run devRun the CLI from src/index.tsx
npm run buildBundle CLI and SDK with tsup into dist/
npm run typecheckType-check with tsc --noEmit
npm testRun co-located tests with Node's test runner through tsx
npm startRun the built CLI
npm run build:remoteBuild the separate remote/agent project

Run a focused test with npx tsx --test src/path/to/file.test.ts. Tests use node:test and node:assert; there is no Jest/Vitest setup.

Repository map

  • src/index.tsx — Commander CLI entry point and mode/command routing.
  • src/app.tsx, src/ui/ — interactive app state and terminal UI components.
  • src/agent/ — OpenRouter client, streaming/tool-call turn loop, prompts, session and supervisor logic.
  • src/models/ — OpenRouter model catalog, capabilities, and pricing; live catalog is authoritative, with seed data as offline fallback.
  • src/tools/ — tool schemas, implementations, permissions, output reduction, and dispatch (executor.ts).
  • src/init/ — /init project discovery and AGENTS.md prompt generation.
  • src/skills/ — skill discovery/routing; supports .agents/skills/, AGENTS.md, .github/skills/, and .kimiflare/skills/.
  • src/memory/ — local SQLite-backed cross-session memory and retrieval. The repository-scoped database defaults to .kimiflare/memory.db (configurable); memory tools expose remember, recall, and forget.
  • src/lsp/, src/mcp/ — Language Server Protocol and Model Context Protocol integrations.
  • src/sdk/, src/server/ — programmatic session SDK and RPC/server integration.
  • src/runs/, src/jobs/ — durable run/job lifecycle and unattended execution.
  • src/code-mode/ — generated TypeScript tool execution and sandboxing.
  • src/hooks/, src/intent/, src/cost-attribution/, src/util/ — lifecycle hooks, intent routing, cost reporting, and shared utilities.
  • src/remote/ — remote command implementation; remote/agent/ is a separate package.
  • acp/ — standalone Zed Agent Client Protocol package.
  • feedback-worker/ — separate feedback service; docs/ and functions/ support the GitHub Pages site.
  • bin/ — published CLI shims; dist/ is generated output.

Conventions and guardrails

  • Keep the project ESM-only. Use import/export, node: prefixes for built-ins, and .js extensions in relative TypeScript imports.
  • TypeScript is strict (noUncheckedIndexedAccess, noImplicitOverride, isolatedModules). Keep tests co-located as *.test.ts / *.test.tsx.
  • Prefer async/await; use type-only imports (import type) when appropriate.
  • When adding a tool, define its schema/implementation and register it in ALL_TOOLS in src/tools/executor.ts; cover behavior with a co-located test.
  • Pass and respect AbortSignal for long-running work, especially requests and streams.
  • Keep ink, ink-text-input, ink-spinner, ink-select-input, react, commander, turndown, and camouflage-tui external in the root tsup.config.ts; do not accidentally bundle runtime UI dependencies.
  • isolated-vm and camouflage-tui are optional dependencies; preserve their graceful/intentional fallback behavior.
  • Run npm run typecheck before considering a change complete. Add or update tests for behavior changes.
  • Use Conventional Commits. Do not bump the root package version manually; release-please manages releases. The active workflows publish npm releases and deploy docs/ to GitHub Pages.
  • Never commit secrets or user state. .kimiflare/, ~, .config/, sessions/, and coverage output are ignored; config and historical user data remain under the legacy kimiflare paths for compatibility.

Context file behavior

/init creates AGENTS.md when no supported project context file exists. It refreshes an existing AGENTS.md first, or otherwise preserves and refreshes legacy KIMI.md, KIMIFLARE.md, or AGENT.md in place. The system prompt loads AGENTS.md before those legacy names. Keep this file focused on stable project facts and actionable conventions; verify claims against the source when they may have changed.

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.