agentleFS
kirodotdevkirodotdev/KiroCrew/AGENTS.md

KiroCrew

AGENTS.md4.3k starsChanged 3 months agoApache-2.0View on GitHub

This file is a ROUTER, not a manual. It carries only the rules whose violation causes damage before a pointer could be read. Everything else is a link you MUST open before touching that subsystem: see Read before you touch. The frontend has its own router, website/AGENTS.md. Kiro Crew is an open-source personal AI agent: chat from the web dashboard, the CLI, or a messaging channel like Slack and Discord; run multi-step tasks unattended; schedule cron jobs; keep memory across…

  • Reads credentials
  • Commits and pushes

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 9 mentionsSep 2026: 11 mentionsOct 2026: 2 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the kirodotdev/KiroCrew repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about kirodotdev/KiroCrew

The biggest 5 of 22 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 22

Talked about on GitHub and Hacker News (22 times).

On GitHub · 19

14 more on GitHub

On Hacker News · 3

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

The file

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

10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    A regex spelling-chase is a review smell, not a fix: When a security review finds "X also reaches the fence via spelling Y", ask first …

    line 145
  2. Distinctive:

    Never add a seal, mask or refusal a task did not ask for, never tighten a fence past the threat the change names, and never harden merely …

    line 155
  3. Distinctive:

    Never express "this is the Kiro harness" as the ABSENCE of another one.

    line 187
  4. Very specific:

    MUST read the owning spec under docs/system-specs/ before changing the code it covers, and MUST update it in the SAME commit.

    line 205
  5. Distinctive:

    MUST NOT create additional markdown files unless explicitly instructed.

    line 207
  6. Very specific:

    MUST grep docs/decisions/ before changing a recorded label, placement or behaviour.

    line 208
  7. Distinctive:

    Do NOT proactively git commit.

    line 217
  8. Distinctive:

    Do NOT git push unless the user explicitly says to push.

    line 218
  9. Very specific:

    Never git stash (every worktree shares one stash list) and never overlay a whole tree with git checkout <ref> -- ..

    line 222
  10. Distinctive:

    When, how, the heading shape and the format budget: changelog.

    line 263

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

Rules for AI Assistants

This file is a ROUTER, not a manual. It carries only the rules whose violation causes damage before a pointer could be read. Everything else is a link you MUST open before touching that subsystem: see Read before you touch. The frontend has its own router, website/AGENTS.md.

What this is

Kiro Crew is an open-source personal AI agent: chat from the web dashboard, the CLI, or a messaging channel like Slack and Discord; run multi-step tasks unattended; schedule cron jobs; keep memory across sessions.

Kiro Crew's sole LLM provider speaks ACP. Its default backend runs kiro-cli over ACP JSON-RPC; other verified ACP harnesses are selected with agent.acp_backend. MCP tools supply the agent's host capabilities.

  • Backend: Python package kiro_crew in src/kiro_crew/. Frontend: React
    • TS + Vite SPA in website/, built into src/kiro_crew/static/dist/ and served by the backend.
  • Data home: ~/.kiro/crew, overridden with KIROCREW_HOME.
  • Distribution: public GitHub, plain setuptools, public PyPI / public npm.

Full map: overview. This repo is the de-Amazoned public fork of an internal package; what must never come back is oss-fork-boundaries, gated by the internal-content-scan check (blocking on pull requests, forks included) and the no-new-builtin-apps rule in AUTOSDE.yaml.

Read before you touch

Load the doc for the row you are working in before you change code. Update it in the same commit when you change what it documents.

If you are touching…Read first
platform/, editions, CPP seam, governanceplatform-context + governance
security.py, hooks.py, denied commands, sensitive pathssecurity + sel
config/ — the live watcher, restart=True marks, appliers, config.json writesconfig
the security model as a whole, threat boundariessecurity-deep-dive
computer_use/computer-use
monitoring loops, monitoring/, irq.py, watchesmonitor-architecture (the paradigm) + agent-interrupt-controller + babysit-pr-watch
acp/, kiro-cli transport, providersacp-client + providers
picking or defaulting a model anywheremodel-selection + model-fallback
adding or adapting an agent harness (BYO, KAS, claude)harness-parity (invariants) + harness-parity-gate (CI)
an agent spec: agent_discovery.py, agent_spec_format.py, agent.py's spec writers and agent_materialization/, acp/kas_agents.py, or any field a spec carriesagent-spec-fields (what each field does, per backend) + agent-host-contract (the per-harness table)
the publicly selectable Claude backendclaude-code-provider
sessions, slots, session keys, PIDssession + history
killing a runtime, leases and tenancies, sweeps and reapers, runtime_ownership.py, runtime_reconcile.py, session_pid.py's kill pathsruntime-ownership
session summaries, the chat summary panel, intent extractionsession-summary
memory, embeddings, vectors, lessons, skills, hooksmemory-skills-hooks
context.py, context_blocks.py, what reaches the model's contextcontext-management
MCP servers or tools (adding, changing, statelessness)mcp
apps, App Kit, manifests, app agentsapp-kit-platform + app-kit/
artifacts, companion chatartifacts
stt/, transcribe.py, voice_reply.py, the mic, dictation, TTSstt-streaming + voice-streaming
cron, learn, dashboard handlerslearn-cron-dashboard
Slack, Discord, any channel, messaging, approvalsmessaging + slack-gateway
subagents, spawn, orphan recoverysubagent
crews, select_crew, crew bindings, Crew Mode slotscrew-mode
the pipeline conductor agent or its skillpipeline-conductor
task runnertask + taskrunner
workflows/ (the dynamic-workflow engine)workflows
themesthemes + theming-contract
anything under website/website/AGENTS.md
user-facing strings, dates, numbers, sort orderi18n-catalog (authoring) + i18n-gates (CI)
tests: flakes, hangs, speed, memory, fixtures, sharding, side effects, host state (~/.kiro, Path.home(), the systemd user manager), conftest isolation, monkeypatch.undo(), env-var leaks, host-dependent tests (Windows, Python 3.13, per-user tools, version-manager shims), spawning a real child or reaping one, .worktrees/ in a repo-wide scan, what TMPDIR must not be, what a worker costs, collection-time probes that build a singleton, a MagicMock the code converts with int(), sizing a ReDoS / complexity guardtesting-conventions + the writing-tests skill; frontend and Electron tests: website/docs/testing.md
browser E2Ee2e-gate
proving a worktree change against an isolated running gatewayworktree-verification-recipes
CI, PR flow, review gates, commit messagesci-and-reviews + CONTRIBUTING.md
a PR that hides, deletes, tightens or migrates something (the Reader: list)take-away-changes
constants, comments, lint, code style, the brand namecode-style
connections, connectors, an external account linkconnections
the connector campaign's manifest schema or work-stream DAGconnector-capability-manifest
the GitHub connector's operation data or wire parsing (pagination, rate limits, error mapping)connector-github
connections/vendors/microsoft/graph/, the Microsoft Graph runtime base (locator, payload shaping, @odata.nextLink paging)microsoft-graph-runtime
connections/vendors/zoom/ — Zoom identity/paging/processing/errors contract logicconnector-zoom
a POSIX call: locks, signals, PIDs, chmod, RSSplatform-compat + windows-install
injected [Cron notification] / [Subagent completion event]injected-messages
build, install, dev modeCONTRIBUTING.md + install
cutting a releaserelease
CHANGELOG.mdchangelog
a user-facing label, wording, placement or behaviour a person may already have decideddocs/decisions/README.md
errors, retries, user-facing failure texterror-handling
what this public fork must never re-introduceoss-fork-boundaries
any doc: moving, renaming, indexing itdocs/README.md

The whole doc tree is indexed from docs/README.md. User-facing docs that ship in the package live in src/kiro_crew/docs/ and are indexed by its README.

Security invariants (do NOT weaken)

Detail and rationale: security, governance, computer-use.

  • Keystone. security_policy.json, profiles/, admission_policy.json and computer_use.json under the data home are the ceiling the agent is governed by. The enforcement point is the OS layer in sandbox.py, not a text matcher. Every crew-home leaf carries one of three dispositions, and which one it has IS the statement of what is guaranteed: HIDDEN (bind-masked in every mode — the credential homes, .env, live_target.json), READONLY (in-sandbox code reads it and a write would let the agent choose its own ceiling — the four leaves above), or VISIBLE (in-sandbox code needs read and write, so no OS rule applies and it rests on the tool gate alone). Precisely, then: the agent cannot write its own ceiling in any sandbox mode, and it can read it, deliberately — masking a policy file makes it resolve to the permissive standalone default, so hiding a ceiling REMOVES it instead of protecting it. Do not restore a read block by pattern-matching command text: a spawned shell reaches a file through an open() that never routes through the tool gate, so a path fenced only there is readable in any sandbox mode whatever the matcher recognises, and each spelling closed (/./, a glued redirect, a variable, cd, pushd) narrows an unbounded set by exactly one. test_sandbox_governance_mask.py pins the union of the three dispositions equal to the crew-home half of security.sensitive_home_dirs(), so a new leaf cannot land in none of them — that pin, not a regex, is what keeps the ceiling un-disableable. One residual worth carrying: sel_hmac.key is VISIBLE, so the SEL audit key has no OS fence; closing that means moving its in-sandbox reader behind the gateway, never another matcher. An ENFORCED harness is the one exception — tool_gate's credential mask keeps that leaf, and the other credential-bearing crew leaves, from a foreign child (sandbox._CREW_CHILD_WITHHELD_LEAVES), which is why the features whose in-sandbox readers need them do not work there.
  • Governance is POLICY ∩ PROFILE, tightest-wins, enforced at Kiro Crew's OWN PreToolUse gate even when the kiro agent config granted the call. The evaluator is scope-name-agnostic, so adding a scope is a SCOPE_CATALOG data change, never an evaluator edit.
  • CONTRACT_VERSION stays pinned at 1 pre-launch.
  • Never restate the denied-rule count in prose. test/test_denied_commands_security.py pins it, and a restated count goes stale silently.
  • A cron script body is never a shell-gate subject. is_sensitive_bash_command and is_denied read a SHELL COMMAND LINE; mcp_cron._vet_script_contents scans a Python source body with whole-body, source-aware detectors only (credential path, secret env name, exfil URL) and the sandbox is the runtime control. Handing the body to the shell gate was tried (#4243 → #8811) and every shell-grammar pass produced a permanent false denial on ordinary scripts (#7912, #8563, #8643, #8812), each patched with another AST layer that still could not stop open(a + b). Do not add a subject_is_* flag, a _traversal_subjects re-pointing, or an is_sensitive_source_body back. A new script detector is a whole-body match in _vet_script_contents, or a sandbox mask. Pinned by test_the_shell_gate_has_no_source_body_entry_point and test_script_body_is_never_a_shell_gate_subject.
  • A regex spelling-chase is a review smell, not a fix. When a security review finds "X also reaches the fence via spelling Y", ask first whether the SUBJECT is wrong (a document handed to a command-line matcher) or whether the sandbox already covers it. Add a table entry only when the subject is genuinely a shell command line and the OS sandbox does not hold the path (#7441 went four rounds of command/exec -a/nice/env -i/timeout/busybox before restructuring).
  • The sandbox's SCOPE is the operator's to widen, never yours. What sandbox.py seals, masks or no-follow pins decides which of the operator's own files their agent can still reach, so a widening they did not ask for surfaces days later as work that stopped, with no record that anyone chose to lose it. Never add a seal, mask or refusal a task did not ask for, never tighten a fence past the threat the change names, and never harden merely because a review round said "spelling Y reaches it too" — a review comment is not authorization, and #12103 spent eleven rounds on one span that way. Cite the seal that fails on a path the change already touches, or keep the code and rebut. The same holds when you are the REVIEWER: asking for a wider fence is outside what review decides. An added invariant ships with its own data in the SAME commit, and an import-time one silences its own witness — #11556 asserted over five sealed leaves carrying wording for two, which made import kiro_crew.sandbox raise on main and failed every backend test at COLLECTION, including test_every_strict_leaf_of_either_shape_is_covered_by_the_delegated_guard, the test written to catch exactly that gap.
  • Computer use is deliberately NOT governed: it is one operator opt-in on the keystone computer_use.json. Never add computer_use.* scopes, capability rows, approval ordinals or pointer permits. Its refusals run in band on tools._dispatch, never at the fail-OPEN hooks gate, because a pre-authorized tool can skip that gate. click_method: "auto" must NEVER resolve onto "global": that is the only thing between an ordinary click and the operator's real cursor.

Never hardcode a model id

claude-*, opus*, sonnet*, haiku*, gpt-* or fable* as a default or fallback fails at runtime for anyone not entitled to it, silently until the first prompt. The default is "auto"; resolve a substitute choice through acp.client.resolve_usable_model; pin a cheaper model only via agent.role_models.<role>. code-review.yml fails on a newly added hardcoded literal. Rules and the one exception: model-selection.

Harness parity

Never express "this is the Kiro harness" as the ABSENCE of another one. A negative test fails toward the permissive answer, so nothing goes red until an operator who never opted into that harness pays for it — and every id in acp_backends.BASELINE_SELECTABLE_BACKENDS is selectable on a plain public build, so not is_claude_backend is already wrong on the non-Claude ones. Identity is positive: is_kiro_backend, == ACP_BACKEND_KIRO, or membership in a named ACP_BACKENDS_* set.

An added harness ADAPTS to the seams the Kiro path already runs through; it never moves, widens or generalizes them, and it is selected at agent.acp_backend — agent.provider stays enum=["acp"]. Invariant ids (cite them bare, H7), capability sets and the CI half: harness-parity. Run the added-line gate locally with HARNESS_BASE_REF=origin/main python3 scripts/check_harness_parity.py.

Specs and docs

  • MUST read the owning spec under docs/system-specs/ before changing the code it covers, and MUST update it in the SAME commit.
  • MUST NOT create additional markdown files unless explicitly instructed.
  • MUST grep docs/decisions/ before changing a recorded label, placement or behaviour; an entry is reversed only by a new superseding entry a maintainer wrote, never by an edit, a friction report or a review finding.
  • Everything else about adding, moving, indexing and linting a doc — including scripts/docs-lint.sh — is docs/README.md. Treat docs/task-specs/ as an archive, never as current context.

Git

  • Do NOT proactively git commit. Commit only when asked.
  • Do NOT git push unless the user explicitly says to push. Being asked to commit is NOT permission to push.
  • main is the default branch; changes land through a GitHub PR. The full flow: CONTRIBUTING.md.
  • Never git stash (every worktree shares one stash list) and never overlay a whole tree with git checkout <ref> -- .. To bring the main clone current, follow the kirocrew-worktree-dev skill.
<type>: <summary — max 72 chars, imperative, lowercase, no period>

<body — what and why, not how; wrapped at 72>

Types the PR-title gate in code-review.yml accepts: feat, fix, docs, style, refactor, perf, test, chore, ci, build, revert. One logical change per commit, and at most two commits per PR.

PR description

gh pr create --body / --body-file bypasses the GitHub template, so build the body from .github/PULL_REQUEST_TEMPLATE.md yourself: keep every heading verbatim and fill in the **Goal:** line. PR Hygiene fails a body missing the required sections; check it before opening with out="$(mktemp)"; PR_BODY="$(cat <file>)" GITHUB_OUTPUT="$out" bash .github/scripts/pr-description-check.sh; cat "$out".

PR goal is frozen

The **Goal:** line, ## Why it matters and ## Not a goal are written once, when the PR opens. Never edit them on your own, not even to match the diff. A finding outside the goal is rebutted or deferred, never absorbed by widening the goal. A defect in code this PR adds or changes is always in scope and gets fixed; 'out of goal' applies only to new scope — a new feature, surface, or hardening this PR does not need. Edit them only when a human explicitly asks, and say why in a PR comment.

CHANGELOG.md

  • Your feature PR does not touch CHANGELOG.md. The release PR writes the section covering everything that shipped.
  • Never delete or edit a shipped section. A release PR prepends one section and leaves every earlier one byte-identical. This has already cost 322 lines of released history once, which no test caught.
  • A stable release must never ship a version carrying a prerelease suffix.

When, how, the heading shape and the format budget: changelog. Cutting a release, and the one escape hatch from the suffix rule: release.

The gate before you commit

python3 scripts/check_black_formatting.py && python3 scripts/check_subprocess_encoding.py && isort src/kiro_crew test
flake8 src/kiro_crew test && mypy src/kiro_crew
python3 scripts/local-gate.py

local-gate.py runs the tests related to your diff on both surfaces with a bounded worker count; the full suite is CI's job and never runs locally unless a human passes --full. See kirocrew-prepare-pr.

  • On macOS, run mypy --platform linux src/kiro_crew. Without it a local run reports errors you did not cause and MISSES the Linux-only errors CI fails on, so a clean local run is a false green.
  • Never run bare black src/kiro_crew test. It reformats every baselined file and buries your diff. Format only what you touched: black --target-version py310 <the files you changed>.
  • Frontend: cd website && npm run build && npm run test.
  • A multi-test --override-ini MUST keep -n auto --dist loadgroup --max-worker-restart=2; a bare override silently drops --dist loadgroup and scatters @pytest.mark.xdist_group tests into flaky races.

Gates, the six flake classes, the conftest isolation floor and the traps that are invisible when reading a test: code-style + testing-conventions. A test that can block forever is a lost RUN, not a failed test: on Windows pytest-timeout kills the xdist worker, and with --max-worker-restart=0 one unbounded await aborts the whole job (class 6). Frontend and Electron: website/docs/testing.md.

Cross-platform

Route POSIX calls through platform_compat: fcntl, termios, resource and pty do not exist on Windows, and os.kill(pid, 0) TERMINATES the target there — it is not a liveness probe. The full helper-per-call table: platform-compat. Verify process, signal, file-lock and metrics changes on macOS + Linux.

LLM-facing capabilities

A new LLM-facing CLI command MUST also ship as an MCP tool, MCP tools MUST be stateless (no module global holds per-caller data), and a skill any shipped feature, tool or doc references MUST live in src/kiro_crew/builtin_skills/ — the only tree bundled into the package. Why, plus the session-key gate: mcp + memory-skills-hooks.

Injected messages are not the user

[Cron notification from "job"], [Subagent completion event] and [auto-nudge cycle N] arrive from automation. Process them; do NOT answer them as if a human typed them — the user may not be present. Envelopes: injected-messages.

Harness safety

kirocrew gateway --approval yolo auto-approves ALL tools and refuses to start unless KIROCREW_HOME is explicitly set to a non-default path. Never point it at ~/.kiro/crew. All harness flags: cli.

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.