agentleFS
hcsolakogluhcsolakoglu/sidekick/AGENTS.md

sidekick

AGENTS.md1 starsChanged 4 months agoMITView on GitHub

Use this file as the canonical rule list for AI agents and humans. Read CONTRIBUTING.md for the human review process. Run every command before claiming completion: The suite runs every test file in its own isolated SIDEKICK_HOME sandbox and executes files concurrently; set SIDEKICK_TEST_CONCURRENCY=1 to reproduce a serial-only failure. Review the pack listing deliberately. It may contain only the files selected by package.json; keep dist/, bin/, README.md, LICENSE, installable skills/, and published docs/, but exclude internal research notes such as…

  • 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 31,774 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

Show its rules and text

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

18 rules. About 2 are common, 7 are distinctive, and 9 are very specific to this project.

  • ≈2

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this file as the canonical rule list for AI agents and humans.

    line 3
  2. Very specific:

    Keep state, lifecycle, process, and adapter logic in src/core/.

    line 10
  3. Very specific:

    Keep engine argv builders in src/core/engines/.

    line 11
  4. Very specific:

    Add node:test coverage under test/unit/, test/integration/, or test/snapshots/.

    line 12
  5. Distinctive:

    Keep zero runtime dependencies.

    line 17
  6. Very specific:

    Update --help, README.md, every affected file under skills/, CHANGELOG.md, and docs/cli-surface.json in the same PR as a CLI-surface change.

    line 20
  7. Very specific:

    Add node:test coverage for every behavior change.

    line 21
  8. Distinctive:

    Use conventional commit subjects.

    line 22
  9. Very specific:

    Do not call process.exit() or assign process.exitCode outside the CLI error boundary in src/cli.ts.

    line 23
  10. Very specific:

    Keep --json stdout as pure JSON or JSON Lines.

    line 24
  11. Very specific:

    Before delegation, run sidekick doctor ENGINE, then sidekick capabilities ENGINE --model MODEL --json.

    line 28
  12. Distinctive:

    Run every command before claiming completion:

    line 40
  13. Common:

    Never print prompt contents, tokens, credentials, environment secrets, or auth state to logs.

    line 55
  14. Distinctive:

    Do not add dependencies that run install scripts.

    line 56
  15. Distinctive:

    Keep GitHub workflow permissions least-privilege.

    line 57
  16. Distinctive:

    Treat engine command overrides and completion hooks as trusted local code without weakening argv isolation.

    line 58
  17. Very specific:

    Use the mock engine for automated tests and lifecycle smoke checks.

    line 62
  18. Common:

    Do not require credentials, network access, or real harness installations in the test suite.

    line 63

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

Sidekick contribution contract

Use this file as the canonical rule list for AI agents and humans. Read CONTRIBUTING.md for the human review process.

Repository map

  • Enter through bin/sidekick.js; keep it a thin executable wrapper around dist/cli.js.
  • Parse arguments and map errors in src/cli.ts.
  • Implement public behavior in src/commands/.
  • Keep state, lifecycle, process, and adapter logic in src/core/.
  • Keep engine argv builders in src/core/engines/.
  • Add node:test coverage under test/unit/, test/integration/, or test/snapshots/.
  • Maintain user documentation in README.md and docs/; maintain harness instructions in skills/.

Hard rules

  • Keep zero runtime dependencies. Justify any exception explicitly in the PR before adding it.
  • Spawn executables with argv arrays and shell: false. Never construct shell command strings.
  • Preserve Linux, macOS, and Windows behavior. Do not add POSIX-only APIs or assumptions; use node:path for paths.
  • Update --help, README.md, every affected file under skills/, CHANGELOG.md, and docs/cli-surface.json in the same PR as a CLI-surface change.
  • Add node:test coverage for every behavior change.
  • Use conventional commit subjects.
  • Do not call process.exit() or assign process.exitCode outside the CLI error boundary in src/cli.ts.
  • Keep --json stdout as pure JSON or JSON Lines. Send diagnostics and progress to stderr.

Control-plane contract

  • Before delegation, run sidekick doctor ENGINE, then sidekick capabilities ENGINE --model MODEL --json; choose only controls whose exact engine/provider/model/transport/toolVersion/action record is native or simulated.
  • --mode remains a legacy compatibility input. It is not a universal permission, effort, sandbox, or reasoning field.
  • New runs persist one immutable meta.controls snapshot from the creation action (initial/adopt). requested, applied, and effective are distinct; adapter argv/config evidence is not provider/runtime effective evidence.
  • applied describes the creation-time application path. Resume/fallback turns may emit different native mechanisms for the same requested values; each turn's command.json is the authoritative argv for that turn. Worker builds reproject applied mechanisms for the current action without rewriting the creation snapshot.
  • Explicit unsupported, unverified, invalid, or value-level mismatched controls fail closed with exit code 2 before prompt, cwd, discovery, lock, store, or worker side effects.
  • Codex --effort is value-gated (minimal|low|medium|high|xhigh|max) for any --model; Sidekick does not maintain a curated Codex model allowlist. Provider/model may ignore unsupported levels.
  • Hermes has no public per-run --effort CLI flag in the current oneshot adapter path; global agent.reasoning_effort config is not treated as per-run Sidekick control. Explicit Hermes non-auto effort stays fail-closed/unverified until a native per-run surface exists.
  • Claude effort remains exact-model per official model-config docs.
  • status --json and spawn/adopt JSON acknowledgements expose control state. command.json records the exact argv sent to the engine.

Verification contract

Run every command before claiming completion:

npm run prepack
npm run surface:check
npm pack --dry-run
npm run smoke:mock

The suite runs every test file in its own isolated SIDEKICK_HOME sandbox and executes files concurrently; set SIDEKICK_TEST_CONCURRENCY=1 to reproduce a serial-only failure.

Review the pack listing deliberately. It may contain only the files selected by package.json; keep dist/, bin/, README.md, LICENSE, installable skills/, and published docs/, but exclude internal research notes such as engine-candidates.md.

Security

  • Never print prompt contents, tokens, credentials, environment secrets, or auth state to logs.
  • Do not add dependencies that run install scripts.
  • Keep GitHub workflow permissions least-privilege; grant write permissions only to the job that needs them.
  • Treat engine command overrides and completion hooks as trusted local code without weakening argv isolation.

Dogfooding

  • Use the mock engine for automated tests and lifecycle smoke checks.
  • Do not require credentials, network access, or real harness installations in the test suite.

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.