> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Repository map

> Where the CLI, checkers, tests, benchmarks and docs live, and which file holds each kind of guidance.

A starting point for human and AI contributors. Each row names a folder and the canonical file to read before changing it, so you can find the right guidance without loading the whole repository.

## Guidance

| Read | For |
| - | - |
| [CONTRIBUTING.md](https://github.com/loadwise-dev/loadwise/blob/main/CONTRIBUTING.md) | Setup, source conventions, tests, benchmarks, pull request rules and releases. |
| [AGENTS.md](https://github.com/loadwise-dev/loadwise/blob/main/AGENTS.md) | Repository rules for coding agents. `CLAUDE.md` imports it. |
| [Contributing guide](https://loadwise.mintlify.app/contributing) | The walkthrough of one rule from detector to verified fix, with the commands to run it. |
| [AI coding agents](https://loadwise.mintlify.app/ai-agents) | How an agent scans, reads findings, applies fixes and verifies outcomes. |
| [changes/README.md](https://github.com/loadwise-dev/loadwise/blob/main/changes/README.md) | The changelog fragment each pull request adds. |
| [docs/rules](https://github.com/loadwise-dev/loadwise/tree/main/docs/rules) | One page per rule, grouped by checker. `npm run docs:rules` regenerates the indexes. |
| [bench/holdout](https://github.com/loadwise-dev/loadwise/blob/main/bench/holdout/README.md) | Reviewed upstream locations and how to refresh them. |
| [bench/evidence](https://github.com/loadwise-dev/loadwise/blob/main/bench/evidence/README.md) | Migration, API contract and query plan fixtures. |

## Source

| Path | Holds |
| - | - |
| [`bin/loadwise.ts`](https://github.com/loadwise-dev/loadwise/blob/main/bin/loadwise.ts) | CLI entry point: top-level usage, `--version`, crash reporting and the heap limit. |
| [`lib/shared/cli-dispatch.ts`](https://github.com/loadwise-dev/loadwise/blob/main/lib/shared/cli-dispatch.ts) | Routes `perf`, `rel`, `maint`, `sec`, `a11y`, `fix` and `check` to their modules, loaded on demand. |
| [`bin/github-action.ts`](https://github.com/loadwise-dev/loadwise/blob/main/bin/github-action.ts) | The GitHub Action runner behind `action.yml`. |
| `lib/<checker>/` | One folder per checker: `performance`, `reliability`, `maintainability`, `security`, `accessibility`. Each has `cli.ts`, `rule-ids.ts` and topic folders such as `collections/`. |
| `lib/<checker>/site-fixes/` | The automatic edit builders for that checker's rules. |
| [`lib/shared/analysis/`](https://github.com/loadwise-dev/loadwise/tree/main/lib/shared/analysis) | Scanning logic shared by checkers: AST helpers, function summaries, the call graph used for hot-path ranking, and the scan cache. |
| [`lib/shared/fix/`](https://github.com/loadwise-dev/loadwise/tree/main/lib/shared/fix) | `loadwise fix`: selection, previews, safety and type checks, patches, history and reversal. |
| [`lib/shared/reporting/`](https://github.com/loadwise-dev/loadwise/tree/main/lib/shared/reporting), `lib/shared/formats/` | Text output and the `--format` reports (SARIF, JUnit, HTML and others). |
| [`lib/shared/agent/`](https://github.com/loadwise-dev/loadwise/tree/main/lib/shared/agent) | `loadwise agent`: init, instructions, MCP server, pending reports, history and `verify`. |
| [`lib/editor/`](https://github.com/loadwise-dev/loadwise/tree/main/lib/editor) | The language server behind `loadwise lsp`, plus rule examples shown in hovers. |
| [`polyglot/`](https://github.com/loadwise-dev/loadwise/tree/main/polyglot) | ast-grep rules for Python, Go, Java and the other non-JS languages. |
| [`schema/`](https://github.com/loadwise-dev/loadwise/tree/main/schema) | JSON Schemas for `loadwise.config.json` and agent outcomes files. |
| [`editor/`](https://github.com/loadwise-dev/loadwise/tree/main/editor) | The VS Code-compatible extension package (VSIX). |
| [`integrations/`](https://github.com/loadwise-dev/loadwise/tree/main/integrations) | Zed, Sublime Text and Eclipse clients. |
| [`agent/hooks/`](https://github.com/loadwise-dev/loadwise/tree/main/agent/hooks), [`hooks/`](https://github.com/loadwise-dev/loadwise/tree/main/hooks) | The after-edit hook that `agent init` registers, and this repository's own pre-commit hook. |
| [`scripts/`](https://github.com/loadwise-dev/loadwise/tree/main/scripts) | Test runner (`run-tests.ts`, `test-files.ts`), rule docs, rule scaffold, changelog, corpus scoring and self-scan config. |

## Tests, fixtures and benchmarks

| Path | Holds |
| - | - |
| `test/<checker>/` | Unit and CLI tests, in the topic that matches `lib/<checker>/`. Most fixtures are inline source strings in the test. |
| `test/performance/fixtures/`, `test/shared/fixtures/` | Fixture projects and shared fix-verification cases. |
| [`examples/`](https://github.com/loadwise-dev/loadwise/tree/main/examples) | Small published examples with a finding and a clean control for each checker. |
| [`bench/recall/`](https://github.com/loadwise-dev/loadwise/tree/main/bench/recall) | Known bugs: `manifest.json` names the rule, file and line each case in `cases/<id>/` must report. `npm run bench:recall` |
| [`bench/holdout/`](https://github.com/loadwise-dev/loadwise/tree/main/bench/holdout) | Reviewed locations in pinned upstream files. `npm run bench:holdout -- --strict` |
| [`bench/corpus/`](https://github.com/loadwise-dev/loadwise/tree/main/bench/corpus) | Pinned open-source projects, review labels and the scorecard. `npm run bench:corpus` |
| [`bench/evidence/`](https://github.com/loadwise-dev/loadwise/tree/main/bench/evidence) | Migrations, API contracts and query plans. `npm run bench:evidence` |
| `bench/scanner.ts`, `bench/security.ts`, `bench/traces.ts`, `bench/patterns.ts` | Speed benchmarks. `npm run bench:scan` and the matching `bench:*` scripts. |

## Docs

`README.md` and `CONTRIBUTING.md` are the sources for the guide pages in `docs/*.mdx` and `docs/checkers/*.mdx`; change both together. Rule pages live in `docs/rules/<checker>/<rule-id>.md`. The [Docs site section](https://github.com/loadwise-dev/loadwise/blob/main/CONTRIBUTING.md#docs-site) of CONTRIBUTING.md covers the generated parts.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.