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.
- skills/AGENTS.mdAGENTS.md
- skills/codex/AGENTS.mdAGENTS.md
- sidekickSkill
- sidekickSkill
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
- Distinctive: line 3
Use this file as the canonical rule list for AI agents and humans.
- Very specific: line 10
Keep state, lifecycle, process, and adapter logic in src/core/.
- Very specific: line 11
Keep engine argv builders in src/core/engines/.
- Very specific: line 12
Add node:test coverage under test/unit/, test/integration/, or test/snapshots/.
- Distinctive: line 17
Keep zero runtime dependencies.
- Very specific: line 20
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.
- Very specific: line 21
Add node:test coverage for every behavior change.
- Distinctive: line 22
Use conventional commit subjects.
- Very specific: line 23
Do not call process.exit() or assign process.exitCode outside the CLI error boundary in src/cli.ts.
- Very specific: line 24
Keep --json stdout as pure JSON or JSON Lines.
- Very specific: line 28
Before delegation, run sidekick doctor ENGINE, then sidekick capabilities ENGINE --model MODEL --json.
- Distinctive: line 40
Run every command before claiming completion:
- Common: line 55
Never print prompt contents, tokens, credentials, environment secrets, or auth state to logs.
- Distinctive: line 56
Do not add dependencies that run install scripts.
- Distinctive: line 57
Keep GitHub workflow permissions least-privilege.
- Distinctive: line 58
Treat engine command overrides and completion hooks as trusted local code without weakening argv isolation.
- Very specific: line 62
Use the mock engine for automated tests and lifecycle smoke checks.
- Common: line 63
Do not require credentials, network access, or real harness installations in the test suite.
≈ “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.
Files
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 arounddist/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:testcoverage undertest/unit/,test/integration/, ortest/snapshots/. - Maintain user documentation in
README.mdanddocs/; maintain harness instructions inskills/.
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:pathfor paths. - Update
--help,README.md, every affected file underskills/,CHANGELOG.md, anddocs/cli-surface.jsonin the same PR as a CLI-surface change. - Add
node:testcoverage for every behavior change. - Use conventional commit subjects.
- Do not call
process.exit()or assignprocess.exitCodeoutside the CLI error boundary insrc/cli.ts. - Keep
--jsonstdout as pure JSON or JSON Lines. Send diagnostics and progress to stderr.
Control-plane contract
- Before delegation, run
sidekick doctor ENGINE, thensidekick capabilities ENGINE --model MODEL --json; choose only controls whose exact engine/provider/model/transport/toolVersion/action record is native or simulated. --moderemains a legacy compatibility input. It is not a universal permission, effort, sandbox, or reasoning field.- New runs persist one immutable
meta.controlssnapshot from the creation action (initial/adopt).requested,applied, andeffectiveare distinct; adapter argv/config evidence is not provider/runtime effective evidence. applieddescribes the creation-time application path. Resume/fallback turns may emit different native mechanisms for the same requested values; each turn'scommand.jsonis 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
2before prompt, cwd, discovery, lock, store, or worker side effects. - Codex
--effortis 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
--effortCLI flag in the current oneshot adapter path; globalagent.reasoning_effortconfig is not treated as per-run Sidekick control. Explicit Hermes non-auto effort stays fail-closed/unverifieduntil a native per-run surface exists. - Claude effort remains exact-model per official model-config docs.
status --jsonand spawn/adopt JSON acknowledgements expose control state.command.jsonrecords 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:mockThe 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
mockengine for automated tests and lifecycle smoke checks. - Do not require credentials, network access, or real harness installations in the test suite.
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
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.

