RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/AGENTS.md/swc-project/swc

AGENTS.md

AGENTS.md
AGENTS.mdroot

Quality

88/100

Scores the file, not the repository.

Length

595 words

10 headings · 0 code blocks

Repository

34k

— · pushed 0 days ago

Last changed

2 days ago

First indexed 2 days ago.
swc-project/swc/AGENTS.mdRawGitHub
1# Instructions
2 
3## General rule
4 
5- Read the codebase - the codebase is source of truth, and you should prefer reading lots of source code over searching.
6- Do not search web unless explicitly asked to do so. Web search does not help in general for our project.
7- Write performant code. Always prefer performance over other things.
8- Use `gh` CLI tool for fetching data from `github.com`.
9- Do not let sandbox constraints stall progress. If sandbox restrictions block required work, request escalation promptly and continue.
10 
11## Code style
12 
13- Write comments and documentations in English.
14- Write documentation for your code.
15- When introducing a workaround, leave sufficient comments explaining why it is needed and any known limitations.
16- Commit your work as frequent as possible using git. Do NOT use `--no-verify` flag.
17- Prefer multiple small files over single large file.
18- Prefer enum (or dedicated type) based modeling over raw string literals whenever possible.
19 
20---
21 
22- When creating Atom instances, it's better to use `Cow<str>` or `&str` instead of `String`. Note that `&str` is better than `Cow<str>` here.
23 
24## Debugging and logging
25 
26- Do not guess behavior. Verify assumptions by reading source, fixtures, and tests.
27- Debug with logs when behavior is unclear.
28- Write sufficient logs for debugging and operational troubleshooting.
29- Prefer structured logging in Rust (`tracing`) over ad-hoc plain text logs when feasible.
30 
31## Shell safety
32 
33- For shell commands or scripts, prefer `$(...)` over legacy backticks for command substitution.
34- Quote and escape all dynamic shell values strictly.
35 
36## Git workflow
37 
38- Run `git commit` only after `git add`.
39- Once changes are staged, commit without unnecessary delay so staged history is preserved.
40- When creating or updating a pull request, follow the repository pull request template.
41- When creating a pull request, use the `add-changeset` skill to create the required changeset.
42- After addressing pull request review comments and pushing updates, resolve the corresponding review threads.
43 
44## Testing
45 
46- Write unit tests for your code.
47- Prefer fixture tests over inline (`#[test]`) tests.
48- Before running tests, run `git submodule update --init --recursive` to initialize and update all submodules.
49- You can do `UPDATE=1 cargo test` to get test outputs updated for fixture tests.
50- When instructed to fix tests, do not remove or modify existing tests.
51 
52### Fixture Test Common Guide
53 
54- Add new coverage by extending existing fixture suites instead of adding ad-hoc inline tests.
55- Find the exact fixture harness before adding files with: `rg -n "#\[(testing::)?fixture\(" tests src --glob "*.rs"`.
56- Keep each suite's naming conventions (for example: input.*, output.*, exec.*, .ans).
57- For snapshot-style tests, update expected outputs with `UPDATE=1 cargo test -p ...` using the exact crate command documented in each crate's AGENTS.md.
58- Always rerun the same crate tests without `UPDATE` before finishing.
59 
60## Verification
61 
62- Before finishing a task, always run this baseline locally.
63 - `cargo fmt --all`
64 - `cargo clippy --all --all-targets -- -D warnings`
65- For each touched Rust crate, run crate-level verification locally.
66 - `cargo test -p <crate>`
67- If wasm binding packages are touched, run:
68 - `(cd bindings/binding_core_wasm && ./scripts/test.sh)`
69 - `(cd bindings/binding_minifier_wasm && ./scripts/test.sh)`
70 - `(cd bindings/binding_typescript_wasm && ./scripts/test.sh)`
71 - `(cd bindings/binding_es_ast_viewer && ./scripts/test.sh)`
72- If node bindings or integration paths are touched, run:
73 - `(cd packages/core && pnpm build:dev && pnpm test)`
74 
75## Compatibility rule
76 
77- Do not use unstable, nightly only features of rustc.
78- Respect the project's MSRV. Do not rely on Rust language features or standard library APIs newer than the MSRV unless the change intentionally raises the MSRV.
79 

Commands it names

  • git commit
  • git add
  • git submodule update --init --recursive
  • cargo fmt --all
  • cargo clippy --all --all-targets -- -D warnings
  • cargo test -p <crate>

Sections

  • Instructions
  • General rule
  • Code style
  • Debugging and logging
  • Shell safety
  • Git workflow
  • Testing
  • Fixture Test Common Guide
  • Verification
  • Compatibility rule

What it covers

testlint-formatcode-styletesting-strategygit-pragent-behaviour

Stack — with the evidence

typescript

(1.00)

rust

(1.00)

javascript

(0.95)

node

(0.95)

eslint

(0.70)

github-actions

(0.60)

Format

AGENTS.md

A plain-markdown README for coding agents, deliberately unopinionated: no frontmatter, no globs, no vendor keys. That minimalism is why it became the one file a dozen different agents will read, and why it carries the least per-file targeting power of any format here.

What the corpus says about it

Repository

Owner
swc-project
Language
—
License
—
Archived
no

All configs in this repo

Also in swc-project/swc

Diff this repo’s formats

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?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
swc-project/swcCLAUDE.md · 34kCLAUDE.mdtypescriptrust+4testlint-formatstyletesting-strategy+382/1002 days ago
swc-project/swccrates/jsdoc/AGENTS.md · 34kAGENTS.mdtypescriptrust+4testtesting-strategydocs16/1002 days ago
swc-project/swccrates/swc/AGENTS.md · 34kAGENTS.mdtypescriptrust+4testtesting-strategy28/1002 days ago
swc-project/swccrates/swc_bundler/AGENTS.md · 34kAGENTS.mdtypescriptrust+4testtesting-strategy16/1002 days ago
swc-project/swccrates/swc_core/AGENTS.md · 34kAGENTS.mdtypescriptrust+4testtesting-strategy16/1002 days ago
swc-project/swccrates/swc_css_codegen/AGENTS.md · 34kAGENTS.mdtypescriptrust+4testtesting-strategy16/1002 days ago
swc-project/swccrates/swc_css_compat/AGENTS.md · 34kAGENTS.mdtypescriptrust+4testtesting-strategy28/1002 days ago
swc-project/swccrates/swc_css_lints/AGENTS.md · 34kAGENTS.mdtypescriptrust+4testtesting-strategy16/1002 days ago
swc-project/swccrates/swc_css_minifier/AGENTS.md · 34kAGENTS.mdtypescriptrust+4testtesting-strategy16/1002 days ago
swc-project/swccrates/swc_css_modules/AGENTS.md · 34kAGENTS.mdtypescriptrust+4testtesting-strategy16/1002 days ago
swc-project/swccrates/swc_css_parser/AGENTS.md · 34kAGENTS.mdtypescriptrust+4testtesting-strategy16/1002 days ago
swc-project/swccrates/swc_css_prefixer/AGENTS.md · 34kAGENTS.mdtypescriptrust+4testtesting-strategy16/1002 days ago
swc-project/swccrates/swc_ecma_codegen/AGENTS.md · 34kAGENTS.mdtypescriptrust+4testtesting-strategy16/1002 days ago
swc-project/swccrates/swc_ecma_lints/AGENTS.md · 34kAGENTS.mdtypescriptrust+4testtesting-strategy16/1002 days ago
swc-project/swccrates/swc_ecma_minifier/AGENTS.md · 34kAGENTS.mdtypescriptjavascript+5testtesting-strategyagent-behaviour51/1002 days ago
Diff against CLAUDE.md Diff against crates/jsdoc/AGENTS.md Diff against crates/swc/AGENTS.md Diff against crates/swc_bundler/AGENTS.md Diff against crates/swc_core/AGENTS.md Diff against crates/swc_css_codegen/AGENTS.md Diff against crates/swc_css_compat/AGENTS.md Diff against crates/swc_css_lints/AGENTS.md Diff against crates/swc_css_minifier/AGENTS.md Diff against crates/swc_css_modules/AGENTS.md Diff against crates/swc_css_parser/AGENTS.md Diff against crates/swc_css_prefixer/AGENTS.md Diff against crates/swc_ecma_codegen/AGENTS.md Diff against crates/swc_ecma_lints/AGENTS.md Diff against crates/swc_ecma_minifier/AGENTS.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199kAGENTS.mdtypescriptlangchain+16buildteststylearch+3100/1003 days ago
aaif-goose/gooseAGENTS.md · 52kAGENTS.mdrusttypescript+2setupbuildtestlint-format+6100/1003 days ago
wpscanteam/wpscanAGENTS.md · 9.7kAGENTS.mdrubyvue+3setupbuildteststyle+6100/1002 days ago
mui/material-uiAGENTS.md · 99kAGENTS.mdtypescriptjavascript+13setupbuildtestlint-format+9100/1003 days ago
SkeneTechnologies/skene-cookbookAGENTS.md · 51AGENTS.mdpythoneslint+4setupbuildtestlint-format+7100/1002 days ago
duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70AGENTS.mdtypescriptjavascript+5buildteststylearch+3100/1003 days ago
trick77/agents-md-syncAGENTS.md · 2AGENTS.mdtypescriptnode+4setupbuildteststyle+5100/1003 days ago
TryGhost/Ghoste2e/AGENTS.md · 55kAGENTS.mdtypescriptjavascript+12setupteststylearch+2100/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack