{"owner":"facebook","repo":"infer","hasSkills":true,"totalSkillsCount":4,"totalTokensCount":2433,"categories":["root-instruction","mcp-config","marketplace","plugin-manifest"],"hasMcp":true,"mcpConfig":{"mcpServers":{"infer":{"command":"npx","args":["-y","@modelcontextprotocol/server-infer"]}}},"found":["AGENTS.md",".cursor/mcp.json",".claude-plugin/marketplace.json",".claude-plugin/plugin.json"],"skills":{"AGENTS.md":"# AGENTS.md\n\nThis file provides guidance to Open Code / Codex / Claude Code (claude.ai/code) when working with code in this repository.\n\n## What is Infer?\n\nInfer is a multi-language static analysis tool developed by Meta. It detects bugs in Java, C, C++, Objective-C, Erlang, Hack, Python, Rust, Swift, and C# code. The primary implementation language is OCaml.\n\n## Build Commands\n\nAll build commands run from the repository root. You must have run `./build-infer.sh` and `make devsetup` initially.\n\n| Command                          | Purpose                                                              |\n| -------------------------------- | -------------------------------------------------------------------- |\n| `make -j`                        | Full native build (default `dev` mode, warnings are fatal)           |\n| `make -j BUILD_MODE=dev-noerror` | Build ignoring warnings                                              |\n| `make -j -C infer/src check`     | Type-check only (fastest iteration cycle, requires prior full build) |\n| `make -j -C infer/src byte`      | Bytecode build (for testing changes quickly)                         |\n| `make opt`                       | Optimized build with flambda                                         |\n| `make fmt`                       | Format changed OCaml files with ocamlformat                          |\n| `make fmt_all`                   | Format all OCaml files                                               |\n\n## Testing\n\n| Command                                                     | Purpose                                                |\n| ----------------------------------------------------------- | ------------------------------------------------------ |\n| `make -j 4 test`                                            | Run all tests (adjust parallelism to your cores)       |\n| `make -j test_build`                                        | Verify build has no warnings                           |\n| `make test-replace`                                         | Update expected test outputs after intentional changes |\n| `make direct_{lang}_{analyzer}_test`                        | Run a single test suite (rebuilds infer first)         |\n| `make -C infer/tests/codetoanalyze/{lang}/{analyzer}/ test` | Run a single test suite (assumes infer is up-to-date)  |\n| `make ocaml_unit_test`                                      | Run OCaml unit tests only                              |\n| `make swift_tests`                                          | Run Swift tests (separate from main `test` target)     |\n\nDirect test names follow the pattern `{lang}_{analyzer}`, e.g., `direct_java_pulse_test`, `direct_cpp_pulse_test`, `direct_c_frontend_test`. These are defined in the `DIRECT_TESTS` variable in the root Makefile.\n\n### Test structure\n\nTests live in `infer/tests/codetoanalyze/{language}/{analyzer}/`. Each test directory has:\n\n- Source files to analyze\n- `issues.exp` with expected output (one issue per line)\n- `Makefile` that runs infer and diffs output against `issues.exp`\n\nTest procedure naming conventions:\n\n- `*Bad` — should report an error\n- `*Ok` — should not report an error\n- `FP_*` — false positive (known limitation, include explanatory comment)\n- `FN_*` — false negative (known limitation, include explanatory comment)\n\n### Debugging analysis\n\n```sh\ninfer --debug -- clang -c examples/hello.c\nfirefox infer-out/captured/hello.c.*.html\n```\n\n## Architecture\n\n### Frontends (language → SIL translation)\n\nEach supported language has a frontend that translates source code into SIL (Separation Logic Intermediate Language), defined in `infer/src/IR/`:\n\n| Directory  | Language          | Mechanism                                          |\n| ---------- | ----------------- | -------------------------------------------------- |\n| `clang/`   | C/C++/Objective-C | Custom clang plugin (`facebook-clang-plugins/`)    |\n| `java/`    | Java              | javalib/Sawja bytecode parsing                     |\n| `erlang/`  | Erlang            | Erlang compiler integration                        |\n| `python/`  | Python            | PyML-based frontend                                |\n| `rust/`    | Rust              | Charon IR translation                              |\n| `llvm/`    | LLVM bitcode      | LLVM OCaml bindings (used by Swift)                |\n| `textual/` | Textual SIL       | Text-based SIL representation (Hack, Python, LLVM) |\n\n### Intermediate Representation (`infer/src/IR/`)\n\nCore types: `Sil.ml` (instructions), `Procdesc.ml` (procedure descriptors), `Typ.ml` (types), `Procname.ml` (procedure names), `Tenv.ml` (type environments).\n\n### Analysis engines\n\n- **Pulse** (`pulse/`, ~150+ files) — The main abstract domain. Handles memory safety, taint tracking, null safety, resource leaks via abductive reasoning.\n- **Abstract interpretation framework** (`absint/`) — `AbstractDomain.ml`, `AbstractInterpreter.ml` define the fixpoint computation infrastructure.\n- **Buffer overrun** (`bufferoverrun/`) — Array bounds analysis.\n- **Concurrency** (`concurrency/`) — Race condition detection (RacerD).\n- **Cost** (`cost/`) — Computational cost analysis.\n- **TOPL** (`topl/`) — Temporal property checking.\n- **Checkers** (`checkers/`) — Miscellaneous checkers (liveness, purity, annotations, etc.).\n\n### Backend (`infer/src/backend/`)\n\nAnalysis scheduling (`AnalysisDependencyGraph.ml`), call graph construction (`CallGraph.ml`), checker registration (`callbacks.ml`), reporting.\n\n### Configuration (`infer/src/base/Config.ml`)\n\nVery large file (~189KB) defining all command-line options. Uses `CommandLineOption` module (aliased `CLOpt`).\n\n## OCaml Coding Conventions\n\n- **100-character line limit.** Format with `ocamlformat`.\n- **`IStd` is auto-opened** in every file. Always write `open! IStd` explicitly at the top.\n- **Polymorphic equality is disabled.** Use type-specific equality (e.g., `Int.equal`, `String.equal`). Use `PolyVariantEqual` only for modules heavy on argument-free polymorphic variants.\n- **Standard module aliases** (use consistently, do not alias these names to other modules):\n  ```ocaml\n  module CLOpt = CommandLineOption\n  module F = Format\n  module L = Logging\n  module MF = MarkupFormatter\n  ```\n- **Printf debugging:** Use `Logging.debug_dev` (triggers a warning to prevent accidental commits).\n- Use `[@@deriving compare, equal]` for comparison/equality derivations.\n- Use named arguments when purpose isn't obvious, especially for bool/int params and function-typed params (conventionally named `f`).\n- Avoid globally opening modules other than `IStd` and `PolyVariantEqual`.\n- **OCaml debugger:** Module `M` is really `InferModules__M` (or `InferBase__M`, etc.) when setting breakpoints in `ocamldebug`.\n\n## Key Files\n\n- `infer/src/base/Config.ml` — All CLI options\n- `infer/src/IR/Sil.ml` — SIL instruction definitions\n- `infer/src/absint/AbstractInterpreter.ml` — Fixpoint computation\n- `infer/src/pulse/PulseAbductiveDomain.ml` — Pulse's core abstract state\n- `infer/src/dune` — Main dune build config (generated from `dune.common` + `dune.in`)\n- `Makefile` — Test targets and build orchestration\n",".cursor/mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/facebook/infer/HEAD/.cursor/mcp.json)",".claude-plugin/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/facebook/infer/HEAD/.claude-plugin/marketplace.json)",".claude-plugin/plugin.json":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/facebook/infer/HEAD/.claude-plugin/plugin.json)"},"files":{"AGENTS.md":"# AGENTS.md\n\nThis file provides guidance to Open Code / Codex / Claude Code (claude.ai/code) when working with code in this repository.\n\n## What is Infer?\n\nInfer is a multi-language static analysis tool developed by Meta. It detects bugs in Java, C, C++, Objective-C, Erlang, Hack, Python, Rust, Swift, and C# code. The primary implementation language is OCaml.\n\n## Build Commands\n\nAll build commands run from the repository root. You must have run `./build-infer.sh` and `make devsetup` initially.\n\n| Command                          | Purpose                                                              |\n| -------------------------------- | -------------------------------------------------------------------- |\n| `make -j`                        | Full native build (default `dev` mode, warnings are fatal)           |\n| `make -j BUILD_MODE=dev-noerror` | Build ignoring warnings                                              |\n| `make -j -C infer/src check`     | Type-check only (fastest iteration cycle, requires prior full build) |\n| `make -j -C infer/src byte`      | Bytecode build (for testing changes quickly)                         |\n| `make opt`                       | Optimized build with flambda                                         |\n| `make fmt`                       | Format changed OCaml files with ocamlformat                          |\n| `make fmt_all`                   | Format all OCaml files                                               |\n\n## Testing\n\n| Command                                                     | Purpose                                                |\n| ----------------------------------------------------------- | ------------------------------------------------------ |\n| `make -j 4 test`                                            | Run all tests (adjust parallelism to your cores)       |\n| `make -j test_build`                                        | Verify build has no warnings                           |\n| `make test-replace`                                         | Update expected test outputs after intentional changes |\n| `make direct_{lang}_{analyzer}_test`                        | Run a single test suite (rebuilds infer first)         |\n| `make -C infer/tests/codetoanalyze/{lang}/{analyzer}/ test` | Run a single test suite (assumes infer is up-to-date)  |\n| `make ocaml_unit_test`                                      | Run OCaml unit tests only                              |\n| `make swift_tests`                                          | Run Swift tests (separate from main `test` target)     |\n\nDirect test names follow the pattern `{lang}_{analyzer}`, e.g., `direct_java_pulse_test`, `direct_cpp_pulse_test`, `direct_c_frontend_test`. These are defined in the `DIRECT_TESTS` variable in the root Makefile.\n\n### Test structure\n\nTests live in `infer/tests/codetoanalyze/{language}/{analyzer}/`. Each test directory has:\n\n- Source files to analyze\n- `issues.exp` with expected output (one issue per line)\n- `Makefile` that runs infer and diffs output against `issues.exp`\n\nTest procedure naming conventions:\n\n- `*Bad` — should report an error\n- `*Ok` — should not report an error\n- `FP_*` — false positive (known limitation, include explanatory comment)\n- `FN_*` — false negative (known limitation, include explanatory comment)\n\n### Debugging analysis\n\n```sh\ninfer --debug -- clang -c examples/hello.c\nfirefox infer-out/captured/hello.c.*.html\n```\n\n## Architecture\n\n### Frontends (language → SIL translation)\n\nEach supported language has a frontend that translates source code into SIL (Separation Logic Intermediate Language), defined in `infer/src/IR/`:\n\n| Directory  | Language          | Mechanism                                          |\n| ---------- | ----------------- | -------------------------------------------------- |\n| `clang/`   | C/C++/Objective-C | Custom clang plugin (`facebook-clang-plugins/`)    |\n| `java/`    | Java              | javalib/Sawja bytecode parsing                     |\n| `erlang/`  | Erlang            | Erlang compiler integration                        |\n| `python/`  | Python            | PyML-based frontend                                |\n| `rust/`    | Rust              | Charon IR translation                              |\n| `llvm/`    | LLVM bitcode      | LLVM OCaml bindings (used by Swift)                |\n| `textual/` | Textual SIL       | Text-based SIL representation (Hack, Python, LLVM) |\n\n### Intermediate Representation (`infer/src/IR/`)\n\nCore types: `Sil.ml` (instructions), `Procdesc.ml` (procedure descriptors), `Typ.ml` (types), `Procname.ml` (procedure names), `Tenv.ml` (type environments).\n\n### Analysis engines\n\n- **Pulse** (`pulse/`, ~150+ files) — The main abstract domain. Handles memory safety, taint tracking, null safety, resource leaks via abductive reasoning.\n- **Abstract interpretation framework** (`absint/`) — `AbstractDomain.ml`, `AbstractInterpreter.ml` define the fixpoint computation infrastructure.\n- **Buffer overrun** (`bufferoverrun/`) — Array bounds analysis.\n- **Concurrency** (`concurrency/`) — Race condition detection (RacerD).\n- **Cost** (`cost/`) — Computational cost analysis.\n- **TOPL** (`topl/`) — Temporal property checking.\n- **Checkers** (`checkers/`) — Miscellaneous checkers (liveness, purity, annotations, etc.).\n\n### Backend (`infer/src/backend/`)\n\nAnalysis scheduling (`AnalysisDependencyGraph.ml`), call graph construction (`CallGraph.ml`), checker registration (`callbacks.ml`), reporting.\n\n### Configuration (`infer/src/base/Config.ml`)\n\nVery large file (~189KB) defining all command-line options. Uses `CommandLineOption` module (aliased `CLOpt`).\n\n## OCaml Coding Conventions\n\n- **100-character line limit.** Format with `ocamlformat`.\n- **`IStd` is auto-opened** in every file. Always write `open! IStd` explicitly at the top.\n- **Polymorphic equality is disabled.** Use type-specific equality (e.g., `Int.equal`, `String.equal`). Use `PolyVariantEqual` only for modules heavy on argument-free polymorphic variants.\n- **Standard module aliases** (use consistently, do not alias these names to other modules):\n  ```ocaml\n  module CLOpt = CommandLineOption\n  module F = Format\n  module L = Logging\n  module MF = MarkupFormatter\n  ```\n- **Printf debugging:** Use `Logging.debug_dev` (triggers a warning to prevent accidental commits).\n- Use `[@@deriving compare, equal]` for comparison/equality derivations.\n- Use named arguments when purpose isn't obvious, especially for bool/int params and function-typed params (conventionally named `f`).\n- Avoid globally opening modules other than `IStd` and `PolyVariantEqual`.\n- **OCaml debugger:** Module `M` is really `InferModules__M` (or `InferBase__M`, etc.) when setting breakpoints in `ocamldebug`.\n\n## Key Files\n\n- `infer/src/base/Config.ml` — All CLI options\n- `infer/src/IR/Sil.ml` — SIL instruction definitions\n- `infer/src/absint/AbstractInterpreter.ml` — Fixpoint computation\n- `infer/src/pulse/PulseAbductiveDomain.ml` — Pulse's core abstract state\n- `infer/src/dune` — Main dune build config (generated from `dune.common` + `dune.in`)\n- `Makefile` — Test targets and build orchestration\n",".cursor/mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/facebook/infer/HEAD/.cursor/mcp.json)",".claude-plugin/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/facebook/infer/HEAD/.claude-plugin/marketplace.json)",".claude-plugin/plugin.json":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/facebook/infer/HEAD/.claude-plugin/plugin.json)"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/facebook/infer/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# AGENTS.md\n\nThis file provides guidance to Open Code / Codex / Claude Code (claude.ai/code) when working with code in this repository.\n\n## What is Infer?\n\nInfer is a multi-language static analysis tool developed by Meta. It detects bugs in Java, C, C++, Objective-C, Erlang, Hack, Python, Rust, Swift, and C# code. The primary implementation language is OCaml.\n\n## Build Commands\n\nAll build commands run from the repository root. You must have run `./build-infer.sh` and `make devsetup` initially.\n\n| Command                          | Purpose                                                              |\n| -------------------------------- | -------------------------------------------------------------------- |\n| `make -j`                        | Full native build (default `dev` mode, warnings are fatal)           |\n| `make -j BUILD_MODE=dev-noerror` | Build ignoring warnings                                              |\n| `make -j -C infer/src check`     | Type-check only (fastest iteration cycle, requires prior full build) |\n| `make -j -C infer/src byte`      | Bytecode build (for testing changes quickly)                         |\n| `make opt`                       | Optimized build with flambda                                         |\n| `make fmt`                       | Format changed OCaml files with ocamlformat                          |\n| `make fmt_all`                   | Format all OCaml files                                               |\n\n## Testing\n\n| Command                                                     | Purpose                                                |\n| ----------------------------------------------------------- | ------------------------------------------------------ |\n| `make -j 4 test`                                            | Run all tests (adjust parallelism to your cores)       |\n| `make -j test_build`                                        | Verify build has no warnings                           |\n| `make test-replace`                                         | Update expected test outputs after intentional changes |\n| `make direct_{lang}_{analyzer}_test`                        | Run a single test suite (rebuilds infer first)         |\n| `make -C infer/tests/codetoanalyze/{lang}/{analyzer}/ test` | Run a single test suite (assumes infer is up-to-date)  |\n| `make ocaml_unit_test`                                      | Run OCaml unit tests only                              |\n| `make swift_tests`                                          | Run Swift tests (separate from main `test` target)     |\n\nDirect test names follow the pattern `{lang}_{analyzer}`, e.g., `direct_java_pulse_test`, `direct_cpp_pulse_test`, `direct_c_frontend_test`. These are defined in the `DIRECT_TESTS` variable in the root Makefile.\n\n### Test structure\n\nTests live in `infer/tests/codetoanalyze/{language}/{analyzer}/`. Each test directory has:\n\n- Source files to analyze\n- `issues.exp` with expected output (one issue per line)\n- `Makefile` that runs infer and diffs output against `issues.exp`\n\nTest procedure naming conventions:\n\n- `*Bad` — should report an error\n- `*Ok` — should not report an error\n- `FP_*` — false positive (known limitation, include explanatory comment)\n- `FN_*` — false negative (known limitation, include explanatory comment)\n\n### Debugging analysis\n\n```sh\ninfer --debug -- clang -c examples/hello.c\nfirefox infer-out/captured/hello.c.*.html\n```\n\n## Architecture\n\n### Frontends (language → SIL translation)\n\nEach supported language has a frontend that translates source code into SIL (Separation Logic Intermediate Language), defined in `infer/src/IR/`:\n\n| Directory  | Language          | Mechanism                                          |\n| ---------- | ----------------- | -------------------------------------------------- |\n| `clang/`   | C/C++/Objective-C | Custom clang plugin (`facebook-clang-plugins/`)    |\n| `java/`    | Java              | javalib/Sawja bytecode parsing                     |\n| `erlang/`  | Erlang            | Erlang compiler integration                        |\n| `python/`  | Python            | PyML-based frontend                                |\n| `rust/`    | Rust              | Charon IR translation                              |\n| `llvm/`    | LLVM bitcode      | LLVM OCaml bindings (used by Swift)                |\n| `textual/` | Textual SIL       | Text-based SIL representation (Hack, Python, LLVM) |\n\n### Intermediate Representation (`infer/src/IR/`)\n\nCore types: `Sil.ml` (instructions), `Procdesc.ml` (procedure descriptors), `Typ.ml` (types), `Procname.ml` (procedure names), `Tenv.ml` (type environments).\n\n### Analysis engines\n\n- **Pulse** (`pulse/`, ~150+ files) — The main abstract domain. Handles memory safety, taint tracking, null safety, resource leaks via abductive reasoning.\n- **Abstract interpretation framework** (`absint/`) — `AbstractDomain.ml`, `AbstractInterpreter.ml` define the fixpoint computation infrastructure.\n- **Buffer overrun** (`bufferoverrun/`) — Array bounds analysis.\n- **Concurrency** (`concurrency/`) — Race condition detection (RacerD).\n- **Cost** (`cost/`) — Computational cost analysis.\n- **TOPL** (`topl/`) — Temporal property checking.\n- **Checkers** (`checkers/`) — Miscellaneous checkers (liveness, purity, annotations, etc.).\n\n### Backend (`infer/src/backend/`)\n\nAnalysis scheduling (`AnalysisDependencyGraph.ml`), call graph construction (`CallGraph.ml`), checker registration (`callbacks.ml`), reporting.\n\n### Configuration (`infer/src/base/Config.ml`)\n\nVery large file (~189KB) defining all command-line options. Uses `CommandLineOption` module (aliased `CLOpt`).\n\n## OCaml Coding Conventions\n\n- **100-character line limit.** Format with `ocamlformat`.\n- **`IStd` is auto-opened** in every file. Always write `open! IStd` explicitly at the top.\n- **Polymorphic equality is disabled.** Use type-specific equality (e.g., `Int.equal`, `String.equal`). Use `PolyVariantEqual` only for modules heavy on argument-free polymorphic variants.\n- **Standard module aliases** (use consistently, do not alias these names to other modules):\n  ```ocaml\n  module CLOpt = CommandLineOption\n  module F = Format\n  module L = Logging\n  module MF = MarkupFormatter\n  ```\n- **Printf debugging:** Use `Logging.debug_dev` (triggers a warning to prevent accidental commits).\n- Use `[@@deriving compare, equal]` for comparison/equality derivations.\n- Use named arguments when purpose isn't obvious, especially for bool/int params and function-typed params (conventionally named `f`).\n- Avoid globally opening modules other than `IStd` and `PolyVariantEqual`.\n- **OCaml debugger:** Module `M` is really `InferModules__M` (or `InferBase__M`, etc.) when setting breakpoints in `ocamldebug`.\n\n## Key Files\n\n- `infer/src/base/Config.ml` — All CLI options\n- `infer/src/IR/Sil.ml` — SIL instruction definitions\n- `infer/src/absint/AbstractInterpreter.ml` — Fixpoint computation\n- `infer/src/pulse/PulseAbductiveDomain.ml` — Pulse's core abstract state\n- `infer/src/dune` — Main dune build config (generated from `dune.common` + `dune.in`)\n- `Makefile` — Test targets and build orchestration\n","isInternal":false,"tokens":1533,"sizeBytes":7168},{"name":"marketplace.json","path":".claude-plugin/marketplace.json","rawUrl":"https://raw.githubusercontent.com/facebook/infer/HEAD/.claude-plugin/marketplace.json","title":"Claude Plugin Marketplace Catalog","category":"marketplace","format":"json","content":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/facebook/infer/HEAD/.claude-plugin/marketplace.json)","tokens":300,"sizeBytes":193},{"name":"plugin.json","path":".claude-plugin/plugin.json","rawUrl":"https://raw.githubusercontent.com/facebook/infer/HEAD/.claude-plugin/plugin.json","title":"claude-plugin Plugin Manifest","category":"plugin-manifest","format":"json","content":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/facebook/infer/HEAD/.claude-plugin/plugin.json)","tokens":300,"sizeBytes":179},{"name":"mcp.json","path":".cursor/mcp.json","rawUrl":"https://raw.githubusercontent.com/facebook/infer/HEAD/.cursor/mcp.json","title":"Model Context Protocol (MCP) Configuration","category":"mcp-config","format":"json","content":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/facebook/infer/HEAD/.cursor/mcp.json)","tokens":300,"sizeBytes":172}],"systemPromptSnippet":"<yakaai_skills repo=\"facebook/infer\">\n<!-- File: AGENTS.md (Tokens: ~1533 | Category: root-instruction) -->\n# AGENTS.md\n\nThis file provides guidance to Open Code / Codex / Claude Code (claude.ai/code) when working with code in this repository.\n\n## What is Infer?\n\nInfer is a multi-language static analysis tool developed by Meta. It detects bugs in Java, C, C++, Objective-C, Erlang, Hack, Python, Rust, Swift, and C# code. The primary implementation language is OCaml.\n\n## Build Commands\n\nAll build commands run from the repository root. You must have run `./build-infer.sh` and `make devsetup` initially.\n\n| Command                          | Purpose                                                              |\n| -------------------------------- | -------------------------------------------------------------------- |\n| `make -j`                        | Full native build (default `dev` mode, warnings are fatal)           |\n| `make -j BUILD_MODE=dev-noerror` | Build ignoring warnings                                              |\n| `make -j -C infer/src check`     | Type-check only (fastest iteration cycle, requires prior full build) |\n| `make -j -C infer/src byte`      | Bytecode build (for testing changes quickly)                         |\n| `make opt`                       | Optimized build with flambda                                         |\n| `make fmt`                       | Format changed OCaml files with ocamlformat                          |\n| `make fmt_all`                   | Format all OCaml files                                               |\n\n## Testing\n\n| Command                                                     | Purpose                                                |\n| ----------------------------------------------------------- | ------------------------------------------------------ |\n| `make -j 4 test`                                            | Run all tests (adjust parallelism to your cores)       |\n| `make -j test_build`                                        | Verify build has no warnings                           |\n| `make test-replace`                                         | Update expected test outputs after intentional changes |\n| `make direct_{lang}_{analyzer}_test`                        | Run a single test suite (rebuilds infer first)         |\n| `make -C infer/tests/codetoanalyze/{lang}/{analyzer}/ test` | Run a single test suite (assumes infer is up-to-date)  |\n| `make ocaml_unit_test`                                      | Run OCaml unit tests only                              |\n| `make swift_tests`                                          | Run Swift tests (separate from main `test` target)     |\n\nDirect test names follow the pattern `{lang}_{analyzer}`, e.g., `direct_java_pulse_test`, `direct_cpp_pulse_test`, `direct_c_frontend_test`. These are defined in the `DIRECT_TESTS` variable in the root Makefile.\n\n### Test structure\n\nTests live in `infer/tests/codetoanalyze/{language}/{analyzer}/`. Each test directory has:\n\n- Source files to analyze\n- `issues.exp` with expected output (one issue per line)\n- `Makefile` that runs infer and diffs output against `issues.exp`\n\nTest procedure naming conventions:\n\n- `*Bad` — should report an error\n- `*Ok` — should not report an error\n- `FP_*` — false positive (known limitation, include explanatory comment)\n- `FN_*` — false negative (known limitation, include explanatory comment)\n\n### Debugging analysis\n\n```sh\ninfer --debug -- clang -c examples/hello.c\nfirefox infer-out/captured/hello.c.*.html\n```\n\n## Architecture\n\n### Frontends (language → SIL translation)\n\nEach supported language has a frontend that translates source code into SIL (Separation Logic Intermediate Language), defined in `infer/src/IR/`:\n\n| Directory  | Language          | Mechanism                                          |\n| ---------- | ----------------- | -------------------------------------------------- |\n| `clang/`   | C/C++/Objective-C | Custom clang plugin (`facebook-clang-plugins/`)    |\n| `java/`    | Java              | javalib/Sawja bytecode parsing                     |\n| `erlang/`  | Erlang            | Erlang compiler integration                        |\n| `python/`  | Python            | PyML-based frontend                                |\n| `rust/`    | Rust              | Charon IR translation                              |\n| `llvm/`    | LLVM bitcode      | LLVM OCaml bindings (used by Swift)                |\n| `textual/` | Textual SIL       | Text-based SIL representation (Hack, Python, LLVM) |\n\n### Intermediate Representation (`infer/src/IR/`)\n\nCore types: `Sil.ml` (instructions), `Procdesc.ml` (procedure descriptors), `Typ.ml` (types), `Procname.ml` (procedure names), `Tenv.ml` (type environments).\n\n### Analysis engines\n\n- **Pulse** (`pulse/`, ~150+ files) — The main abstract domain. Handles memory safety, taint tracking, null safety, resource leaks via abductive reasoning.\n- **Abstract interpretation framework** (`absint/`) — `AbstractDomain.ml`, `AbstractInterpreter.ml` define the fixpoint computation infrastructure.\n- **Buffer overrun** (`bufferoverrun/`) — Array bounds analysis.\n- **Concurrency** (`concurrency/`) — Race condition detection (RacerD).\n- **Cost** (`cost/`) — Computational cost analysis.\n- **TOPL** (`topl/`) — Temporal property checking.\n- **Checkers** (`checkers/`) — Miscellaneous checkers (liveness, purity, annotations, etc.).\n\n### Backend (`infer/src/backend/`)\n\nAnalysis scheduling (`AnalysisDependencyGraph.ml`), call graph construction (`CallGraph.ml`), checker registration (`callbacks.ml`), reporting.\n\n### Configuration (`infer/src/base/Config.ml`)\n\nVery large file (~189KB) defining all command-line options. Uses `CommandLineOption` module (aliased `CLOpt`).\n\n## OCaml Coding Conventions\n\n- **100-character line limit.** Format with `ocamlformat`.\n- **`IStd` is auto-opened** in every file. Always write `open! IStd` explicitly at the top.\n- **Polymorphic equality is disabled.** Use type-specific equality (e.g., `Int.equal`, `String.equal`). Use `PolyVariantEqual` only for modules heavy on argument-free polymorphic variants.\n- **Standard module aliases** (use consistently, do not alias these names to other modules):\n  ```ocaml\n  module CLOpt = CommandLineOption\n  module F = Format\n  module L = Logging\n  module MF = MarkupFormatter\n  ```\n- **Printf debugging:** Use `Logging.debug_dev` (triggers a warning to prevent accidental commits).\n- Use `[@@deriving compare, equal]` for comparison/equality derivations.\n- Use named arguments when purpose isn't obvious, especially for bool/int params and function-typed params (conventionally named `f`).\n- Avoid globally opening modules other than `IStd` and `PolyVariantEqual`.\n- **OCaml debugger:** Module `M` is really `InferModules__M` (or `InferBase__M`, etc.) when setting breakpoints in `ocamldebug`.\n\n## Key Files\n\n- `infer/src/base/Config.ml` — All CLI options\n- `infer/src/IR/Sil.ml` — SIL instruction definitions\n- `infer/src/absint/AbstractInterpreter.ml` — Fixpoint computation\n- `infer/src/pulse/PulseAbductiveDomain.ml` — Pulse's core abstract state\n- `infer/src/dune` — Main dune build config (generated from `dune.common` + `dune.in`)\n- `Makefile` — Test targets and build orchestration\n\n<!-- File: .claude-plugin/marketplace.json (Tokens: ~300 | Category: marketplace) -->\n# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/facebook/infer/HEAD/.claude-plugin/marketplace.json)\n\n<!-- File: .claude-plugin/plugin.json (Tokens: ~300 | Category: plugin-manifest) -->\n# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/facebook/infer/HEAD/.claude-plugin/plugin.json)\n\n<!-- File: .cursor/mcp.json (Tokens: ~300 | Category: mcp-config) -->\n# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/facebook/infer/HEAD/.cursor/mcp.json)\n</yakaai_skills>"}