agentleFS
joerniojoernio/joern/AGENTS.md

joern

AGENTS.md3.6k starsChanged 4 years agoApache-2.0View on GitHub

AGENTS instructions =================== Joern is a Scala 3 platform that turns source code, bytecode and binaries into Code Property Graphs (CPGs) and queries them. The main developer documentation is the Contributor's guide. Compiling with sbt ------------------ Always scope to the module you are working on. Compiling or testing the whole build is slow. Module names are the lazy vals at the top of build.sbt, for example semanticcpg, x2cpg, dataflowengineoss, c2cpg, javasrc2cpg, console, joerncli, querydb. The build uses -Werror: a compiler…

Trending

Quiet since September.about the whole repository

Dec 2025: 0 mentionsJan 2026: 2 mentionsFeb 2026: 1 mentionMar 2026: 5 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 2 mentionsJul 2026: 6 mentionsAug 2026: 2 mentionsSep 2026: 4 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the joernio/joern repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about joernio/joern

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

See all 51

Talked about on GitHub and Bluesky (51 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

12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always scope to the module you are working on.

    line 13
  2. Distinctive:

    Follow contributing-docs/08_pull_requests.md.

    line 28
  3. Distinctive:

    Write a short PR description and link the related issue, if any.

    line 33
  4. Distinctive:

    Follow Coding style and best practices.

    line 43
  5. Very specific:

    Do not use better.files or scala.sys.process.

    line 47
  6. Very specific:

    No single-letter identifiers except i, j, k and _.

    line 49
  7. Very specific:

    Do not iterate over unordered collections (HashMap, HashSet, TrieMap, ...) where the order can reach the CPG.

    line 50
  8. Distinctive:

    Avoid inline comments that restate the code.

    line 53
  9. Distinctive:

    Always add a unit test that verifies your change.

    line 58
  10. Very specific:

    NEVER edit maven_install.json by hand.

    line 105
  11. Distinctive:

    NEVER commit downloaded astgen binaries or other generated artifacts.

    line 106
  12. Distinctive:

    NEVER reproduce copyrighted material.

    line 111

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

AGENTS instructions

Joern is a Scala 3 platform that turns source code, bytecode and binaries into Code Property Graphs (CPGs) and queries them. The main developer documentation is the Contributor's guide.

  • Architecture and module layout
  • Development environment

Compiling with sbt

Always scope to the module you are working on. Compiling or testing the whole build is slow.

sbt --client --color=false --supershell=false --batch c2cpg/compile
sbt --client --color=false --supershell=false --batch "c2cpg/Test/compile"

Module names are the lazy vals at the top of build.sbt, for example semanticcpg, x2cpg, dataflowengineoss, c2cpg, javasrc2cpg, console, joerncli, querydb.

The build uses -Werror: a compiler warning fails the build.

Pull request guideline

  • Follow contributing-docs/08_pull_requests.md.
  • Title is [module] Description, for example [javasrc2cpg] Fix addition operator.
  • Before working on a bug fix, reproduce the problem with a failing test.
  • After making the change, confirm that it compiles, the new test passes, and the problem is fixed.
  • Format and lint before submitting (see below).
  • Write a short PR description and link the related issue, if any.

Coding style

sbt --client --color=false --supershell=false --batch "scalafmt ; Test/scalafmt ; integrationTests/scalafmt ; integrationTests/Test/scalafmt"
sbt --client --color=false --supershell=false --batch "scalafix --diff-base origin/master RestrictedImports SingleLetterIdentifiers UnorderedIteration"
  • Follow Coding style and best practices.
  • Scala 3 with braces: the build uses -no-indent -old-syntax. Do NOT use indentation-based syntax, end markers or : fewer-braces lambdas.
  • Max line length is 120 (scalafmt).
  • Do not use better.files or scala.sys.process. Use io.shiftleft.semanticcpg.utils.FileUtil, os-lib, java.nio.file and io.shiftleft.semanticcpg.utils.ExternalCommand.
  • No single-letter identifiers except i, j, k and _.
  • Do not iterate over unordered collections (HashMap, HashSet, TrieMap, ...) where the order can reach the CPG. CPG output must be deterministic. Sort first, or use an ordered collection.
  • Code must work on Linux, macOS and Windows. CI runs on all three.
  • Avoid inline comments that restate the code. Document intent with ScalaDoc.

Tests

Always add a unit test that verifies your change.

  • contributing-docs/04_unit_tests.md
  • contributing-docs/05_integration_tests.md
  • contributing-docs/06_manual_tests.md

Tests live in {module}/src/test/scala/io/joern/{module}/... and are named {Name}Tests.scala. Frontend tests derive from the frontend's own fixture (for example C2CpgSuite) and use code("...") to build a CPG.

For example, here's how to run a single test suite:

sbt --client --color=false --supershell=false --batch "c2cpg/testOnly *MethodTests"

To run all tests of one module:

sbt --client --color=false --supershell=false --batch c2cpg/test

sbt 2.x skips tests that already passed on unchanged inputs. Use testFull (for example c2cpg/testFull) to force a full run, which is what CI does.

Several frontends need external tools (Go, Swift, Rust, PHP) to run their tests. See Development environment.

Architecture

  • contributing-docs/01_architecture.md
  • contributing-docs/07_tech_stack.md
  • contributing-docs/09_common_tasks.md

Dependency direction is semanticcpg -> x2cpg -> dataflowengineoss and x2cpg -> frontends, then console -> joern-cli -> querydb. Never introduce a dependency in the other direction. A change in semanticcpg or x2cpg affects every frontend, so run the tests of the dependent modules too.

The CPG schema (node and edge types) is NOT defined in this repository. It comes from the external codepropertygraph library, whose version is cpgVersion in build.sbt.

Dependencies and build files

  • Dependency versions are declared in project/Versions.scala.
  • The experimental Bazel build (bazel.md) mirrors part of the sbt build. When you add or change a dependency or a source layout in a module that has a BUILD file, update BUILD and MODULE.bazel too.
  • NEVER edit maven_install.json by hand. Regenerate it with REPIN=1 bazel run @maven//:pin.
  • NEVER commit downloaded astgen binaries or other generated artifacts. They are git-ignored.

Copyright

  • NEVER reproduce copyrighted material. Test code must be written from scratch or be under a compatible license.

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.