agentleFS
bytedancebytedance/sonic/AGENTS.md

sonic

AGENTS.md9.6k starsChanged 21 months agoApache-2.0View on GitHub

Sonic is a Go JSON library with JIT, SIMD, and native-code acceleration. Public APIs live at the repository root and in ast/, decoder/, encoder/, option/, unquote/, and utf8/. Implementation details live under internal/, including JIT, native dispatch, runtime helpers, caching, and encoder/decoder internals. C sources are in native/; generated Go native wrappers are under internal/native/. The workspace in go.work includes the root module plus compatibility/, external_jsonlib_test/, fuzz/, generic_test/, issue_test/, and loader/. Test data and examples live in testdata/, examples/, fuzz/corpus/,…

Trending

More talk lately.about the whole repository

Dec 2025: 1 mentionJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 2 mentionsApr 2026: 1 mentionMay 2026: 1 mentionJun 2026: 0 mentionsJul 2026: 4 mentionsAug 2026: 5 mentionsSep 2026: 5 mentionsOct 2026: 6 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the bytedance/sonic repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about bytedance/sonic

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

See all 58

Talked about on GitHub, Hacker News, Bluesky and Stack Overflow (58 times).

On GitHub · 50

45 more on GitHub
  • 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,439 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.

The file

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

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Add focused package tests beside changed Go code.

    line 25
  2. Very specific:

    Do not disclose security bugs in public issues.

    line 33

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

Repository Guidelines

Project Structure & Module Organization

Sonic is a Go JSON library with JIT, SIMD, and native-code acceleration. Public APIs live at the repository root and in ast/, decoder/, encoder/, option/, unquote/, and utf8/. Implementation details live under internal/, including JIT, native dispatch, runtime helpers, caching, and encoder/decoder internals. C sources are in native/; generated Go native wrappers are under internal/native/. The workspace in go.work includes the root module plus compatibility/, external_jsonlib_test/, fuzz/, generic_test/, issue_test/, and loader/. Test data and examples live in testdata/, examples/, fuzz/corpus/, and package-local *_test.go files.

Build, Test, and Development Commands

  • go test ./...: run the main module tests.
  • SONIC_USE_OPTDEC=1 SONIC_USE_FASTMAP=1 SONIC_ENCODER_USE_VM=1 go test ./...: exercise the optimized/VM path used in CI.
  • cd loader && go test ./...: test the loader submodule.
  • go test ./issue_test and go test ./generic_test: run regression and compatibility suites from the workspace.
  • go test ./compatibility: run the Go 1.27 encoding/json semantic drift catalog (see docs/sonic-go127-compatibility.md).
  • ./scripts/test_race.sh: run the expected race-detection regression check.
  • ./scripts/fuzz.sh fuzz, then ./scripts/fuzz.sh run or runopt: initialize and run fuzzing.
  • ./scripts/bench.sh: run core encoder, decoder, AST, and external JSON benchmark suites.
  • ./scripts/build-x86.sh [clang]: regenerate x86 native outputs after changing native/*.c.

Coding Style & Naming Conventions

Use gofmt for all Go files and follow Go Code Review Comments. Keep generated native output synchronized with its C source. Go tests use TestXxx, BenchmarkXxx, and FuzzXxx. Issue regressions follow issue_test/issueNNN_test.go. Shell scripts should be executable, use bash consistently, and keep environment toggles explicit. Write repository documentation in English by default; use another language only when the target audience or existing document explicitly requires it.

Testing Guidelines

Add focused package tests beside changed Go code. For parser, encoder, JIT, SIMD, or loader changes, run both default and optimized/VM paths. For user-reported behavior fixes, add or update an issue_test case. For fuzz-sensitive parsing changes, seed fuzz/corpus/ or fuzz/testdata/ when useful.

Commit & Pull Request Guidelines

History and the PR template use Conventional Commits, for example feat: support Go 1.26, fix(decoder): handle ..., opt: ast node set, ci: add ..., or chore: update go mod. Branch names should use prefixes such as feature/, bugfix/, optimize/, doc/, ci/, test/, or refactor/; validate with ./scripts/check_branch_name.sh. PRs should describe user-visible impact, link issues when applicable, include tests or benchmark data for performance changes, and update user documentation when behavior changes.

Security & Compatibility Notes

Do not disclose security bugs in public issues; follow CONTRIBUTING.md and contact the maintainers. Supported Go versions are documented in README.md; be careful with linkname behavior on newer Go releases and use scripts/go_flags.sh patterns when needed.

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.