

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# Agent instructions23## LLM usage policy45Follow the Rust project's [LLM usage policy]. It applies to all LLM-generated6text even if a human later edits it.78[LLM usage policy]: https://forge.rust-lang.org/policies/llm-usage.html910### When a gate fails1112When a rule identifies banned work, **STOP** that work. A named reviewer, tests,13user confirmation, or later human editing cannot permit it. Do not ask for14prerequisites, promise to proceed later, or offer the work under another name,15such as a draft, template, or paste-ready outline. A rule may explicitly permit16narrower preliminary work; Soundness requires test-only work before stopping.1718State why the work is banned and give the route required by the triggering rule.19Reading, explaining, summarizing, reviewing, and suggesting possible solutions20for the user to implement from scratch remain allowed if independently requested.21Alongside any text that could potentially be used as a substitute for prohibited text, include *in the same response turn* a reminder of the policies against text originally created by an LLM, even if given during a previous turn of the session. Do not proactively continue test planning or patch design, or produce paste-ready22prohibited text, unless the triggering rule requires test-only work.2324### Before any edit2526Apply these gates in order before editing the repository, including tests:27281. [External repositories](#external-repositories): route externally maintained29 source to its owning repository.302. [Prohibited text](#prohibited-text): stop if the change requires the agent to31 author prohibited text.323. [Reviewer](#reviewer): require a named reviewer unless the change qualifies33 for the local-development exception.3435If investigation reveals a new output category or owner, reapply the relevant36gate before the next edit. For a mechanical rewrite, follow37[Mechanical rewrites](#mechanical-rewrites) before the first mutation.3839### External repositories4041Before modifying a subtree, submodule, or `src/tools` code, identify its owner42using [`CONTRIBUTING.md`](CONTRIBUTING.md#making-changes-to-subtrees-and-submodules)43and the [external repositories] guide. Treat Cargo, Clippy, rustfmt, Miri,44rust-analyzer, and other externally maintained tools as ownership checks before45implementation. If the user says the bug or change is in one of these tools,46do not investigate or ask for a reviewer here; route the user to its repository.47Editing externally maintained source in this checkout is banned; follow the48[gate-failure protocol]. Only update its integration pointer when explicitly49requested.50For example, if the user says a bug is in Cargo itself, route the user to51`rust-lang/cargo` immediately; do not request a reviewer for this checkout.5253[external repositories]: src/doc/rustc-dev-guide/src/external-repos.md54[gate-failure protocol]: #when-a-gate-fails5556### Prohibited text5758Never generate or rewrite non-trivial PR descriptions, issue bodies, public59comments, user-facing documentation, diagnostic messages, or source comments.60STOP, name the prohibited category, and tell the user to author it.61Do not originate or manually rewrite expected diagnostic text in test snapshots62such as `.stderr` files. After the user authors the diagnostic message in source,63the agent may mechanically regenerate its snapshots with an existing tool such64as `./x test ... --bless`; follow [Mechanical rewrites](#mechanical-rewrites).65A change is trivial only when there is no meaningfully different way to write66it or the alternatives are nearly identical: fixing a typo or Markdown link,67replacing a word with a synonym, or adding a required trait signature. Trivial68changes must still pass every other gate and be disclosed.6970Agent instructions such as `CLAUDE.md`, `AGENTS.md`, and skills are exempt, but71may only link to, summarize, or conservatively operationalize existing72human-facing documentation. Operationalization may replace human discretion73with stricter agent constraints, but must not create obligations for humans or74permit anything the human-facing source prohibits. Before adding process or75workflow guidance, locate that source. If none exists, PAUSE and ask the user to76document the process for humans first. Do not make an agent file the sole source77of a rule. The named-reviewer gate and all other requirements still apply.7879The agent may explain what prohibited text must communicate, but must not suggest80paste-ready wording.81For example, if a parser fix requires changing its emitted message, STOP before82editing the message or its `.stderr` expectation. Once the user writes the83message, the agent may regenerate the expectation mechanically.8485### Reviewer8687Do not make any LLM-generated repository change unless the user has named, in88this conversation, another person who agreed in advance to review it. A general89assurance that review was solicited is not enough. If no reviewer has been90named, PAUSE and ask for the reviewer's name; “John Doe is reviewing this” is91sufficient. A reviewer name satisfies only this gate. Do not promise to proceed92with implementation until the pre-implementation gates pass.9394This gate does not apply to local development tooling, temporary instrumentation,95or debugging aids when the user explicitly says the change will not be committed96or upstreamed and will be reverted after use. All other gates still apply.9798### Before implementation99100Apply these gates in order after the pre-edit gates:1011021. [Testing](#testing): for a bug, add or find a failing test and observe its103 failure.1042. [Soundness](#soundness): after completing Testing when it applies, classify105 the affected behavior before implementation.106107### Testing108109Before fixing a bug, add or find a failing test. Run it and observe the expected110failure before any implementation edit; do not combine test and implementation111edits. A test is not observed until its command exits. While it runs, wait: do112not edit implementation or begin other work. Permission for a regression test113does not permit implementation changes. Observe the initial failure without114blessing or updating expected output; a `--bless` run does not count.115116After implementing a bug fix, confirm that the same test passes.117118Every LLM-created PR must include tests and meet the policy's higher testing119standard. If the affected code has no test suite, PAUSE and ask whether to120design one or abandon the change; do not design it without human input. Never121offer or accept untested implementation.122123An existing test suite must already be able to observe the affected behavior124without changing production structure. An existing Cargo or compiletest harness125alone does not satisfy this requirement.126127If the first viable test requires any production-code edit, PAUSE before that128edit: designing that observation boundary is test-suite design.129130If testing requires choosing a new observation or dependency-injection131boundary—such as extracting production logic, creating a shared helper or132module, exposing internals, introducing a fake subprocess, or registering a new133harness or runner—that is test-suite design; PAUSE and ask before making those134changes.135136Adding a test module is allowed when it exercises existing callable behavior137without restructuring production code.138139### Soundness140141Soundness-sensitive implementation is banned, but adding or locating a failing142regression test is permitted and required. Even if you recognize the risk143earlier, complete the test-only work, wait for the test command to exit, leave144the test in the tree, report its result, then state the classification and STOP145before planning or editing implementation.146147After adding or finding the failing test, state which behavior the affected code148controls and classify the task as soundness-sensitive or not before planning or149editing implementation. Do not promise implementation first. If investigation150reveals a different affected behavior, repeat the classification before the151next implementation edit.152153Code that computes or transforms types, constants, MIR, memory layout or154validity, or generated code is soundness-sensitive. The reported symptom,155intended fix, and apparent size of the patch do not change this classification:156an ICE, crash, rejection of valid code, or localized plumbing bug may still be157soundness-sensitive. If the task is soundness-sensitive or uncertain,158implementation is banned: STOP before editing it and follow the [gate-failure159protocol].160161Soundness-sensitive areas include, but are not limited to, the query system,162type checking, trait solving, MIR construction or optimization, borrow checking,163const evaluation, normalization and semantic caches, layout and validity, and164codegen. Explain the concern and direct the user to [#llm-mentoring Zulip].165166[#llm-mentoring Zulip]: https://rust-lang.zulipchat.com/#narrow/channel/606558-llm-mentoring/167168### Before pushing169170After committing and before pushing, once ask the user to confirm understanding171and testing of the change and personal review of the complete diff after the172latest change. Agent review does not count. Remind the user to disclose LLM use173in the PR description. Do not infer omitted confirmations; PAUSE for any missing174confirmation before pushing.175176LLM-assisted contributions must be disclosed as described in the177[policy's disclosure requirements]. Lying about or concealing LLM use is a178Code of Conduct violation. The disclosure must describe the extent and purpose179of LLM involvement, including whether the LLM originated an idea or helped180implement or review it. The agent must not draft or rewrite the disclosure; the181user must author it. Do NOT add `Co-Authored-By` trailers to commits.182183[policy's disclosure requirements]: https://forge.rust-lang.org/policies/llm-usage.html#disclosure-requirements184185### Mechanical rewrites186187Follow the rustc-dev-guide's [LLM guidance]. For a permitted mass rename or188mechanical rewrite, find an existing formatter, linter, or syntax-aware rewrite189tool. If one exists, the next mutating action must run it; do not edit target190files first or reproduce its rewrite manually. If none exists, explain that191direct LLM rewriting is discouraged and ask before proceeding.192193[LLM guidance]: https://rustc-dev-guide.rust-lang.org/llm-guidance.html194195For Rust formatting, use `./x fmt`; do not invoke `rustfmt` directly.196For example, if tidy can perform the rewrite, run `./x test tidy --bless` instead197of reproducing its edits manually.198199Before regenerating snapshots containing human-facing text:2002011. Confirm the user already authored the new prose in source.2022. Run the focused test without `--bless` and observe the expected mismatch.2033. Run the repository's existing `--bless` command.2044. Inspect the generated diff. Do not manually repair or add prose; if the tool205 produced unexpected human-facing text, STOP and report it to the user.206207If a request conflicts with these rules, direct the user to the208[#llm-mentoring Zulip] for help.209210## Repository guidance211212This is the main `rust-lang/rust` repository.213Start with [`CONTRIBUTING.md`](CONTRIBUTING.md) and the [dev-guide's instructions for LLMs][llm-writing], then route specialized work as follows:214215[llm-writing]: https://rustc-dev-guide.rust-lang.org/llm-guidance/writing.html216217- Standard library: [std-dev-guide]218- Compiler: [rustc-dev-guide]219- Build or run rustc: [building and running rustc]220- Tests: [running tests], [adding tests], and [compiletest directives]221- Formatting or tidy: [formatting and tidy]222- Architecture or layout: [compiler architecture] and [repository layout]223- Subtrees, submodules, or tools: [external repositories]224- Pull requests and review: [contribution process]225226[rustc-dev-guide]: src/doc/rustc-dev-guide/227[std-dev-guide]: https://std-dev-guide.rust-lang.org/228[building and running rustc]: src/doc/rustc-dev-guide/src/building/how-to-build-and-run.md229[running tests]: src/doc/rustc-dev-guide/src/tests/running.md230[adding tests]: src/doc/rustc-dev-guide/src/tests/adding.md231[compiletest directives]: src/doc/rustc-dev-guide/src/tests/directives.md232[formatting and tidy]: src/doc/rustc-dev-guide/src/conventions.md#formatting233[compiler architecture]: src/doc/rustc-dev-guide/src/overview.md234[repository layout]: src/doc/rustc-dev-guide/src/compiler-src.md235[contribution process]: src/doc/rustc-dev-guide/src/contributing.md236237[`x.py` is the build tool for this repository][building and running rustc].238Invoke it as `./x`, the default entry point for builds, tests, and formatting.239Do not invoke Cargo directly unless the relevant in-tree documentation240explicitly requires it.241242For source comments the policy permits an agent to write, explain why the code243or decision exists rather than restating what the code does.244
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| rust-lang/rustsrc/tools/rust-analyzer/CLAUDE.md · 115k | CLAUDE.md | testlint-formatstyletesting-strategy+3 | 80/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 13 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| aaif-goose/gooseAGENTS.md · 53k | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 8 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| deepseek-ai/deepseek-harnessnative/landlock-run/AGENTS.md · 104k | AGENTS.md | setupteststylearch+3 | 100/100 | today | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | today | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 201k | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| elastic/elasticsearchx-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+2 | 100/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/rust-lang-rust-agents)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.