agentleFS
cyberkaidacyberkaida/reverse-engineering-assistant/AGENTS.md

reverse-engineering-assistant

AGENTS.md848 starsChanged 13 months agoApache-2.0View on GitHub

ReVa (Reverse Engineering Assistant) is a Ghidra extension that provides a Model Context Protocol (MCP) server for AI‑assisted reverse engineering. It offers a collection of tool providers that expose Ghidra functionality (decompiler, strings, symbols, etc.) via a JSON‑based MCP interface.

  • 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 repository3 other files it gives its agents.

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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:

    Types: Prefer concrete generic types (List<>, Map<>) over raw collections.

    line 48
  2. Distinctive:

    Documentation: Every public class and method must have a Javadoc comment describing purpose, parameters, and return values.

    line 49
  3. Very specific:

    Always log the stack trace via DebugLogger.

    line 56
  4. Distinctive:

    Unit tests: Use JUnit 4 only (no JUnit 5 annotations).

    line 67
  5. Very specific:

    Ensure all tests pass before committing.

    line 70
  6. Distinctive:

    Follow the guidance in .github/copilot-instructions.md for using the MCP SDK, Gradle (no wrapper), and Java 21.

    line 76

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

AGENTS.md

Project Overview

ReVa (Reverse Engineering Assistant) is a Ghidra extension that provides a Model Context Protocol (MCP) server for AI‑assisted reverse engineering. It offers a collection of tool providers that expose Ghidra functionality (decompiler, strings, symbols, etc.) via a JSON‑based MCP interface.


Build & Test Commands

Building the extension

# Set the Ghidra installation directory first
export GHIDRA_INSTALL_DIR=/path/to/ghidra
gradle            # no wrapper – use the system `gradle` command

Testing

  • Unit tests: gradle test --info
  • Integration tests (require a headed GUI environment): gradle integrationTest --info
  • Run a single unit test: gradle test --tests "*MyTestClass.testMethod" --info
  • Run a single integration test: gradle integrationTest --tests "*MyIntegrationTest" --info
  • Check (includes lint & both test suites): gradle check

Project Structure

  • src/main/java/reva/ – Core source code
    • util/ – Foundational utilities (AddressUtil, ProgramLookupUtil, etc.)
    • plugin/ – Ghidra plugin infrastructure and configuration
    • server/ – Embedded Jetty server and MCP transport
    • tools/ – Tool providers (decompiler, functions, strings, symbols, …)
    • resources/ – Read‑only MCP resources
    • services/ – Service‑layer abstractions
    • ui/ – Optional UI components
  • src/test/ – Unit tests (no Ghidra runtime required)
  • src/test.slow/ – Integration tests (require Ghidra environment)

Development Guidelines

Code Style

  • Java version: Target Java 21.
  • Formatting: 4‑space indentation, no trailing whitespace. Imports sorted alphabetically, static imports after regular imports.
  • Naming: Classes & enums PascalCase; methods & variables camelCase; constants UPPER_SNAKE_CASE.
  • Types: Prefer concrete generic types (List<>, Map<>) over raw collections; use Optional for nullable returns.
  • Documentation: Every public class and method must have a Javadoc comment describing purpose, parameters, and return values.

Error Handling

  • Convert runtime exceptions (e.g., IllegalArgumentException) to structured JSON responses:
    {"success":false,"error":"<message>","details":{}}
  • Always log the stack trace via DebugLogger.

Utilities (must‑use)

  • AddressUtil.formatAddress() – consistent address formatting.
  • ProgramLookupUtil.getValidatedProgram() – safe program resolution.
  • AbstractToolProvider helper methods (getString, getInt, getOptional*).
  • HighFunctionDBUtil.updateDBVariable() – persist changes inside a transaction.

Testing Practices

  • Unit tests: Use JUnit 4 only (no JUnit 5 annotations).
  • Integration tests: Set java.awt.headless=false and fork each test (forkEvery 1).
  • Validate program state changes with Ghidra APIs (Function.getParameters(), DataType.isEquivalent()).
  • Ensure all tests pass before committing; the CI pipeline runs gradle check.

Copilot / Cursor Rules

  • Follow the guidance in .github/copilot-instructions.md for using the MCP SDK, Gradle (no wrapper), and Java 21.
  • Cursor-specific rules, if any are added, should follow the conventions outlined above.

Additional Resources

  • MCP Java SDK
  • Ghidra documentation: start from FlatProgramAPI or ProgramPlugin.
  • Project README for high‑level overview and installation steps.

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.