agentleFS
GitHubKnown publishergithub/codeql/unified/AGENTS.md

codeql / unified

AGENTS.md10k starsChanged 4 years agoMITView on GitHub

This is a CodeQL extractor that maps a language's parse tree onto a shared AST using the yeast desugaring engine. Swift, the only language so far, is parsed by Apple's swift-syntax rather than by tree-sitter. - The raw parse tree's shape is described by extractor/swift_node_types.yml, which is generated from swift-syntax by swift-syntax-rs/schemagen. Do not edit it by hand; regenerate it with scripts/regenerate-node-types.sh after changing the pinned swift-syntax version, then review the diff alongside the mapping in extractor/src/languages/swift/swift.rs. - To run…

Trending

Quiet this year.thin dataabout 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: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the github/codeql repository that our weekly crawl found: only 5 in all, so this is a hint, not a trend. There is no adoption data for this file yet.
  • 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 repositoryOne other file it gives its agents.

The file

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

3 rules. About 0 are common, 0 are distinctive, and 3 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.

  • 3

    Very specific

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

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

    Check the output files for correctness but do not edit them manually.

    line 38
  2. Very specific:

    If you changed the extractor code, always rebuild it before running CodeQL tests.

    line 41
  3. Very specific:

    Do not edit .expected files manually.

    line 45

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

Agent instructions

This is a CodeQL extractor that maps a language's parse tree onto a shared AST using the yeast desugaring engine. Swift, the only language so far, is parsed by Apple's swift-syntax rather than by tree-sitter.

Building

  • To build the extractor, run scripts/create-extractor-pack.sh

Swift Parser

  • Swift source is parsed by the swift-syntax-rs crate, which wraps Apple's swift-syntax. The extractor calls swift_syntax_rs::parse_to_json in-process to obtain the parse tree as JSON; the extractor does not invoke a separate parser binary, and there is no grammar in this repository to edit.
  • extractor/src/languages/swift/adapter.rs converts that JSON into a yeast AST.
  • The raw parse tree's shape is described by extractor/swift_node_types.yml, which is generated from swift-syntax by swift-syntax-rs/schemagen. Do not edit it by hand; regenerate it with scripts/regenerate-node-types.sh after changing the pinned swift-syntax version, then review the diff alongside the mapping in extractor/src/languages/swift/swift.rs.

AST Mapping

  • The target AST shape is described by extractor/ast_types.yml.
  • The mapping from the parse tree to the target AST is found in extractor/src/languages/swift/swift.rs
  • To run tests for the parser and mapping, run cargo test in the extractor directory. Since the parser is linked in-process, this needs a working Swift toolchain (so swift-syntax-rs can build). The tests can also be run under Bazel via bazel test //unified/extractor:all_tests.
  • Extractor test cases are located at extractor/tests/corpus/swift/*/*.swift.
  • Each test case has a corresponding .output file containing its generated output along with a copy of the test case itself.
  • Check the output files for correctness but do not edit them manually. Regenerate them with scripts/update-corpus.sh.

CodeQL Testing

  • If you changed the extractor code, always rebuild it before running CodeQL tests.
  • To run all CodeQL tests, run codeql test run --search-path extractor-pack ql/test
  • Do not edit .expected files manually. To update the expected output, pass --learn to the codeql test run command.
  • To run a specific test, pass the specific directory to the codeql test run command instead of ql/test.

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.