repopilot 0.10.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,91 +7,82 @@
7
7
  [![License](https://img.shields.io/crates/l/repopilot.svg)](LICENSE)
8
8
  [![GitHub Stars](https://img.shields.io/github/stars/MykytaStel/repopilot?style=social)](https://github.com/MykytaStel/repopilot)
9
9
 
10
- Audit your repository locally, turn the results into AI-ready remediation context,
11
- and ship safer changes without sending source code to a hosted scanner.
10
+ **Local-first repository risk checks for safer human and AI-assisted code changes.**
12
11
 
13
- RepoPilot is a local-first CLI for architecture, security, code quality, testing,
14
- and framework health checks. It gives developers useful terminal reports, CI gates,
15
- SARIF for GitHub Code Scanning, and Markdown briefs that can be pasted into Claude
16
- Code, ChatGPT, Cursor, or another coding assistant.
12
+ RepoPilot gives teams a fast safety pass before a pull request, release, or AI
13
+ coding session. It scans a repository locally, explains architecture, security,
14
+ code-quality, testing, and framework risks, then turns findings into AI-ready
15
+ context without uploading your source code to a hosted scanner.
17
16
 
18
- Version `0.10.0` is an adoption and stability release: it focuses on cleaner
19
- rollout diagnostics, reproducible audit receipts, CI artifacts, and 0.x command
20
- compatibility while keeping all scans local.
17
+ It is not meant to replace language linters. RepoPilot focuses on repository
18
+ signals that are hard to see from one file at a time: risky files, architecture
19
+ drift, security candidates, testing gaps, review risk, baselines, and remediation
20
+ context for Claude Code, ChatGPT, Cursor, or another coding assistant.
21
21
 
22
- ## Why RepoPilot?
22
+ ---
23
23
 
24
- Most linters and audit tools stop at the terminal. RepoPilot bridges the gap to your AI assistant:
24
+ ## Why RepoPilot?
25
25
 
26
- | | SonarQube / CodeClimate | ESLint / language linters | **RepoPilot** |
27
- |---|---|---|---|
28
- | Runs offline | ❌ | ✅ | ✅ |
29
- | No code upload | ❌ | ✅ | ✅ |
30
- | Cross-language architecture analysis | ✅ | ❌ | ✅ |
31
- | LLM-ready output | ❌ | ❌ | ✅ |
32
- | Fits in a model context window | ❌ | ❌ | ✅ |
33
- | CI gate on new findings only | ✅ | partial | ✅ |
26
+ Most tools either lint one language or send results into a dashboard. RepoPilot is
27
+ designed for the local development loop:
34
28
 
35
- ```bash
36
- repopilot ai context . | pbcopy # macOS: paste into your coding assistant
29
+ ```text
30
+ scan -> understand risk -> generate AI context -> fix -> review
37
31
  ```
38
32
 
39
- ## Features
40
-
41
- - Repository scanning for projects, folders, and individual files
42
- - Gitignore-aware walking with built-in ignores for common build, cache, vendor, and native platform directories
43
- - Architecture findings: oversized files, deep nesting, deep relative imports, risky barrel files, too many modules per directory
44
- - Coupling analysis: excessive fan-out, high-instability hubs, circular dependencies
45
- - Code quality findings: cyclomatic complexity density, long functions, TODO/FIXME/HACK markers
46
- - Security findings: hardcoded secret candidates, committed private keys, committed `.env` files
47
- - Testing findings: missing test folder, source files without test counterparts
48
- - Framework findings for JavaScript, React, React Native, Expo, and Django projects
49
- - React Native architecture profile: project kind, New Architecture, Hermes, Codegen, platform mismatch, and package manager signals
50
- - Workspace scanning (`--workspace`) for npm, yarn, pnpm, and Cargo workspaces with per-package risk summary — parallel per-package scans
51
- - Evidence-backed findings with stable rule IDs, severity, file paths, line numbers, and snippets
52
- - 46 built-in rules with titles, descriptions, recommendations, and docs links
53
- - `repopilot.toml` configuration generated by `repopilot init`
54
- - Configuration presets (`--preset strict|balanced|lenient`) for quick threshold tuning
55
- - Baseline workflow for accepting existing findings in legacy repositories
56
- - CI-friendly failure thresholds with `--fail-on`
57
- - Git diff-aware review mode for prioritizing findings introduced by changed lines
58
- - Doctor adoption guidance for config, baseline, CI gate, report, and receipt readiness
59
- - Audit receipt JSON from `repopilot scan --receipt` for reproducible scan evidence
60
- - Console, JSON, Markdown, HTML, and SARIF (2.1.0) scan output — SARIF includes per-result category and workspace package properties
61
- - First-party GitHub Action wrapper for `scan`, `review`, `compare`, and `ai` workflows, with optional SARIF upload and receipt output for scans
62
- - Compare mode for diffing two JSON scan reports
63
- - **`repopilot ai context`** — formats scan output as LLM-ready markdown, paste into Claude Code or ChatGPT to start remediating
64
- - **`repopilot ai plan`** — turns findings into a prioritized remediation plan
65
- - **`repopilot ai prompt`** — exports an AI-ready remediation prompt with RepoPilot context
66
-
67
- See [docs/rulesets.md](docs/rulesets.md) for the full list of rules and severity levels.
33
+ | Capability | Language linters | Hosted scanners | RepoPilot |
34
+ |---|---:|---:|---:|
35
+ | Runs locally | ✅ | ❌ | ✅ |
36
+ | No source upload required | ✅ | ❌ | ✅ |
37
+ | Cross-language repository view | ❌ | ✅ | ✅ |
38
+ | Architecture and repo risk signals | partial | ✅ | ✅ |
39
+ | AI-ready remediation context | ❌ | ❌ | ✅ |
40
+ | Baseline and PR review workflow | partial | ✅ | ✅ |
41
+ | Default noise reduction / Trust Mode | ❌ | partial | ✅ |
42
+
43
+ Use RepoPilot when you need to:
44
+
45
+ - understand the highest-risk files before asking an AI assistant to edit;
46
+ - add a CI gate without blocking on every existing finding;
47
+ - review PR risk from changed lines instead of only whole-repo noise;
48
+ - produce local evidence for releases through Markdown, JSON, SARIF, and receipts.
49
+
50
+ ---
68
51
 
69
52
  ## Install
70
53
 
54
+ With Cargo:
55
+
71
56
  ```bash
72
57
  cargo install repopilot
73
58
  ```
74
59
 
75
- Install with npm:
60
+ With npm:
76
61
 
77
62
  ```bash
78
63
  npm install -g repopilot
79
64
  ```
80
65
 
81
- Install with Homebrew:
66
+ With Homebrew:
82
67
 
83
68
  ```bash
84
69
  brew tap mykytastel/repopilot
85
70
  brew install repopilot
86
71
  ```
87
72
 
88
- Install with curl (Linux/macOS):
73
+ With curl on Linux/macOS:
89
74
 
90
75
  ```bash
91
76
  curl -fsSL https://raw.githubusercontent.com/MykytaStel/repopilot/main/install.sh | bash
92
77
  ```
93
78
 
94
- The curl installer verifies the GitHub Release SHA256 checksum and aborts if the checksum cannot be downloaded or verified.
79
+ Build from source:
80
+
81
+ ```bash
82
+ git clone https://github.com/MykytaStel/repopilot.git
83
+ cd repopilot
84
+ cargo build --release
85
+ ```
95
86
 
96
87
  Upgrade:
97
88
 
@@ -101,381 +92,339 @@ npm update -g repopilot
101
92
  brew update && brew upgrade repopilot
102
93
  ```
103
94
 
104
- Build from source:
105
-
106
- ```bash
107
- git clone https://github.com/MykytaStel/repopilot.git
108
- cd repopilot
109
- cargo build --release
110
- ```
95
+ ---
111
96
 
112
97
  ## Quick Start
113
98
 
114
- No config needed. Run this in any repository and see findings immediately:
99
+ Start with a local scan:
115
100
 
116
101
  ```bash
117
102
  repopilot scan .
118
103
  ```
119
104
 
120
- Then get an AI-ready brief to paste into Claude Code, Cursor, or ChatGPT:
105
+ Check adoption readiness and create an intentional baseline for existing debt:
121
106
 
122
107
  ```bash
123
- repopilot ai context . | pbcopy # macOS — copies to clipboard
124
- repopilot ai context . # print to terminal
108
+ repopilot doctor .
109
+ repopilot baseline create . --output .repopilot/baseline.json
110
+ repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high
125
111
  ```
126
112
 
127
- That's the two-minute loop. Scan, read the output, paste the context into your assistant, fix.
113
+ Generate AI-ready context for the highest-risk work:
128
114
 
129
- ### Going deeper
115
+ ```bash
116
+ repopilot ai context . --budget 4k
117
+ ```
130
118
 
131
- Once you want CI integration, baseline tracking, or tighter configuration:
119
+ Copy AI context on macOS:
132
120
 
133
121
  ```bash
134
- repopilot init # generate repopilot.toml
135
- repopilot doctor . # check CI / baseline readiness
136
- repopilot baseline create . # accept existing findings as known debt
137
- repopilot review . --base origin/main --fail-on new-high # CI gate on new findings only
122
+ repopilot ai context . | pbcopy
138
123
  ```
139
124
 
140
- Save a shareable report:
125
+ Save a Markdown report:
141
126
 
142
127
  ```bash
143
- repopilot scan . --format markdown --output repopilot-report.md --receipt .repopilot/receipt.json
128
+ repopilot scan . --format markdown --output repopilot-report.md
144
129
  ```
145
130
 
146
- Reduce scan noise while iterating:
131
+ Run a focused security scan:
147
132
 
148
133
  ```bash
149
- repopilot scan . --min-severity high
150
- repopilot scan . --workspace --min-severity medium
151
- repopilot scan . --exclude fixtures --max-file-size 1mb --max-files 500
134
+ repopilot scan . --min-severity high --rule security.secret-candidate
152
135
  ```
153
136
 
154
- By default, RepoPilot skips low-signal audit paths such as tests, fixtures, examples, generated files, and benchmarks. Use `--include-low-signal` when you want those paths analyzed too.
137
+ Review only changed code against a base branch:
155
138
 
156
- ## Local-First AI Workflow
157
-
158
- RepoPilot does not call LLM APIs. AI commands scan local files and produce Markdown
159
- that you decide where to paste.
139
+ ```bash
140
+ repopilot review . --base origin/main
141
+ ```
160
142
 
161
- `repopilot ai context` scans a project and formats all findings as structured markdown ready to paste into Claude Code, Cursor, ChatGPT, or any LLM assistant. It includes a risk level, tech stack summary, findings grouped by category with evidence snippets and fix recommendations, and a token-count estimate.
143
+ ---
162
144
 
163
- ```bash
164
- # Paste into Claude Code or ChatGPT
165
- repopilot ai context .
145
+ ## Trust Mode
166
146
 
167
- # Focus on security only, keep it short
168
- repopilot ai context . --focus security --budget 2k
147
+ RepoPilot's default scan profile is intentionally quiet.
169
148
 
170
- # Save to file
171
- repopilot ai context . --output repopilot-context.md
149
+ The default profile focuses on actionable production, security, and runtime risks.
150
+ Strict mode shows the full raw audit output, including maintainability and testing
151
+ suggestions.
172
152
 
173
- # Pipe directly into clipboard (macOS)
174
- repopilot ai context . --no-header | pbcopy
153
+ ```bash
154
+ repopilot scan . # default profile
155
+ repopilot scan . --profile strict # full audit output
156
+ repopilot scan . --include-maintainability
175
157
  ```
176
158
 
177
- ## Example Output
159
+ The visibility engine classifies findings by product intent:
178
160
 
161
+ ```text
162
+ SecurityRisk | RuntimeRisk | ActionableRisk | Maintainability | TestingGap | Informational
179
163
  ```
180
- $ repopilot ai context .
181
164
 
182
- # RepoPilot Vibe Check — my-app
165
+ Hidden suggestions are summarized by intent, rule, category, and reason, so the
166
+ default report stays quiet without silently losing information.
167
+
168
+ Read more:
183
169
 
184
- **Risk Level:** 🟠 ELEVATED
185
- **Tech Stack:** React Native (New Arch), Expo, TypeScript
186
- **Size:** 94 files · 8,340 LOC · ~42k tokens
187
- **Health:** 18 findings · 2.2/kloc — 4 high, 9 medium
170
+ - [Trust Mode](docs/trust-mode.md)
171
+ - [Core Visibility Engine](docs/core-visibility-engine.md)
188
172
 
189
- ## Security (2 high)
190
- 1. [HIGH] Possible secret detected — `src/config/api.ts:12`
191
- ```
192
- const API_KEY = "sk_live_…"
193
- ```
194
- > **Fix:** Move to environment variables or a secrets manager.
173
+ ---
195
174
 
196
- ## Architecture (2 high)
197
- 1. [HIGH] Circular dependency detected — `src/store/index.ts`
198
- > **Fix:** Extract shared types to a separate module to break the cycle.
175
+ ## AI Workflow
199
176
 
200
- ## Top Recommendations
201
- 1. **Move hardcoded API key** (src/config/api.ts:12) — use process.env or a vault
202
- 2. **Break circular dependency** (src/store/index.ts) — extract shared types
177
+ RepoPilot does not call LLM APIs. It produces local Markdown that you choose where
178
+ to paste.
203
179
 
204
- ---
205
- *~3.8k tokens (budget: 4k) · scanned in 312ms — paste into Claude Code, Cursor, or ChatGPT*
180
+ ```bash
181
+ repopilot ai context . --focus security
182
+ repopilot ai plan . --focus security
183
+ repopilot ai prompt . --budget 8k
206
184
  ```
207
185
 
208
- Paste this into a coding assistant and ask for a focused patch. For larger
209
- repositories, start with one focus area instead of asking for every finding at
210
- once.
186
+ Typical loop:
211
187
 
212
- ## Recommended Remediation Loop
188
+ ```text
189
+ 1. Run RepoPilot locally.
190
+ 2. Read the risk summary.
191
+ 3. Generate focused AI context.
192
+ 4. Paste the context into Claude Code, ChatGPT, Cursor, or another assistant.
193
+ 5. Apply the patch.
194
+ 6. Run RepoPilot review/scan again.
195
+ ```
213
196
 
214
- RepoPilot is a local-first safety layer for AI-assisted and vibe-coded changes. Run it after generating or refactoring code to catch newly introduced high-risk findings, workspace hotspots, missing tests, and architecture drift without uploading source code to an external service.
197
+ See [AI workflows](docs/ai-workflows.md).
215
198
 
216
- ```bash
217
- repopilot ai context . --focus security # get an LLM brief for Claude Code
218
- repopilot ai plan . --focus security # get a prioritized hardening plan
219
- repopilot ai prompt . --budget 8k # generate a paste-ready remediation prompt
220
- repopilot review . --base origin/main --baseline .repopilot/baseline.json --fail-on new-high
221
- repopilot scan . --workspace --min-severity medium --format markdown --output repopilot-report.md
222
- ```
199
+ ---
223
200
 
224
- ## Commands
201
+ ## Core Commands
225
202
 
226
203
  | Command | Alias | Description |
227
- |---------|-------|-------------|
228
- | `repopilot scan <path>` | `s` | Scan a project, folder, or file for findings |
204
+ |---|---:|---|
205
+ | `repopilot scan <path>` | `s` | Scan a project, folder, or file |
206
+ | `repopilot scan <path> --changed` | — | Scan changed files with local cache |
207
+ | `repopilot cache clear [path]` | — | Remove `.repopilot/cache` |
229
208
  | `repopilot review [path]` | `r` | Review findings that touch changed Git diff lines |
230
- | `repopilot ai context <path>` | — | LLM-ready context from a scan |
231
- | `repopilot ai plan <path>` | — | Prioritized remediation plan |
232
- | `repopilot ai prompt <path>` | — | AI-ready remediation prompt |
233
- | `repopilot compare <before> <after>` | `cmp` | Compare two JSON scan reports and show what changed |
234
- | `repopilot baseline create <path>` | `bl` | Scan a path and store current findings as accepted debt |
209
+ | `repopilot ai context <path>` | — | Generate LLM-ready repository context |
210
+ | `repopilot ai plan <path>` | — | Generate a prioritized remediation plan |
211
+ | `repopilot ai prompt <path>` | — | Generate a paste-ready remediation prompt |
212
+ | `repopilot compare <before> <after>` | `cmp` | Compare two JSON scan reports |
213
+ | `repopilot baseline create <path>` | `bl` | Store current findings as accepted debt |
235
214
  | `repopilot doctor [path]` | `d` | Diagnose audit readiness |
236
- | `repopilot init` | — | Generate a default `repopilot.toml` configuration file |
215
+ | `repopilot init` | — | Generate `repopilot.toml` |
237
216
 
238
- Use `--help` on any command for the full description and examples:
217
+ Get command help:
239
218
 
240
219
  ```bash
241
220
  repopilot --help
242
221
  repopilot scan --help
243
222
  repopilot review --help
244
- repopilot baseline create --help
223
+ repopilot ai --help
245
224
  ```
246
225
 
247
- ## Configuration
248
-
249
- RepoPilot automatically reads `repopilot.toml` from the current working directory when running `scan`.
226
+ ---
250
227
 
251
- Configuration precedence:
228
+ ## Output Formats
252
229
 
253
- ```text
254
- CLI args > repopilot.toml > built-in defaults
230
+ ```bash
231
+ repopilot scan . --format console
232
+ repopilot scan . --format json --output report.json
233
+ repopilot scan . --format markdown --output report.md
234
+ repopilot scan . --format html --output report.html
235
+ repopilot scan . --format sarif --output repopilot.sarif
255
236
  ```
256
237
 
257
- Generate a default config:
238
+ Use:
239
+
240
+ - `console` for local development
241
+ - `markdown` for human-readable reports
242
+ - `json` for scripts and integrations
243
+ - `html` for shareable reports
244
+ - `sarif` for GitHub Code Scanning
245
+
246
+ ---
247
+
248
+ ## Configuration
249
+
250
+ Generate a config file:
258
251
 
259
252
  ```bash
260
253
  repopilot init
261
- repopilot init --force
262
- repopilot init --path ./repopilot.toml
263
254
  ```
264
255
 
265
- Use an explicit config path:
256
+ Run with an explicit config:
266
257
 
267
258
  ```bash
268
259
  repopilot scan . --config repopilot.toml
269
260
  ```
270
261
 
271
- Example `repopilot.toml`:
272
-
273
- ```toml
274
- [scan]
275
- ignore = [
276
- ".git",
277
- ".github",
278
- ".repopilot",
279
- "target",
280
- "node_modules",
281
- "dist",
282
- "build",
283
- ".next",
284
- ".nuxt",
285
- ".cache",
286
- "coverage",
287
- "vendor",
288
- "Pods",
289
- "DerivedData"
290
- ]
291
- max_file_bytes = 2097152
292
-
293
- [architecture]
294
- max_file_lines = 300
295
- huge_file_lines = 1000
296
- max_directory_modules = 20
297
- max_directory_depth = 5
298
- max_function_lines = 50
299
- max_fan_out = 15
300
- instability_hub_min_fan_in = 5
301
- instability_hub_min_instability_pct = 75
302
-
303
- [testing]
304
- detect_missing_tests = true
305
-
306
- [security]
307
- detect_secret_like_names = true
308
-
309
- [output]
310
- default_format = "console"
262
+ Configuration precedence:
263
+
264
+ ```text
265
+ CLI args > repopilot.toml > built-in defaults
311
266
  ```
312
267
 
313
- CLI threshold overrides:
268
+ Common scan options:
314
269
 
315
270
  ```bash
271
+ repopilot scan . --preset strict
272
+ repopilot scan . --preset balanced
273
+ repopilot scan . --preset lenient
316
274
  repopilot scan . --max-file-loc 500
317
- repopilot scan . --max-directory-modules 25
318
275
  repopilot scan . --max-directory-depth 6
319
- repopilot scan . --max-file-size 1mb
320
- repopilot scan . --max-files 1000
321
276
  repopilot scan . --exclude generated
322
277
  repopilot scan . --include-low-signal
323
278
  ```
324
279
 
325
- `--max-file-size` accepts raw bytes or `kb`, `mb`, and `gb` suffixes. `--exclude` matches an exact path relative to the scan root or a file/directory name; repeat it for multiple paths.
280
+ See [configuration docs](docs/configuration.md).
326
281
 
327
- JSON output includes scan input accounting fields: `files_discovered` for files found after ignore/exclude filters, `files_count` for analyzed text files, `files_skipped_low_signal` for default low-signal skips, and `binary_files_skipped` for unreadable/binary files.
282
+ ---
328
283
 
329
- ## Baseline Workflow
284
+ ## Baseline and Review
330
285
 
331
- Existing repositories often have findings that cannot all be fixed before adopting a new audit tool. A baseline stores accepted existing findings so future scans can distinguish new findings from existing ones.
286
+ Create a baseline for existing findings:
332
287
 
333
288
  ```bash
334
- repopilot baseline create .
335
- repopilot scan . --baseline .repopilot/baseline.json
336
- repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high
289
+ repopilot baseline create . --output .repopilot/baseline.json
337
290
  ```
338
291
 
339
- By default, `baseline create` writes `.repopilot/baseline.json` and creates the `.repopilot/` directory if needed. Use `--output ./baseline.json` for a custom path. Existing baseline files are not overwritten unless you pass `--force`.
340
-
341
- Baseline files store accepted existing findings. Future scans can mark findings as `new` or `existing`, which is useful for legacy repositories and CI. Do not refresh a baseline blindly unless the team accepts those findings as technical debt.
342
-
343
- ## Review Workflow
344
-
345
- Use `review` when you want RepoPilot to focus on findings that touch changed Git diff lines.
292
+ Scan against accepted debt:
346
293
 
347
294
  ```bash
348
- repopilot review .
349
- repopilot review . --format json --output review.json
350
- repopilot review . --baseline .repopilot/baseline.json --fail-on new-high
295
+ repopilot scan . --baseline .repopilot/baseline.json
351
296
  ```
352
297
 
353
- By default, `review` compares the working tree against `HEAD`, including staged, unstaged, and untracked files. For branch or CI review, pass a base ref:
298
+ Fail CI only on new high-risk findings:
354
299
 
355
300
  ```bash
356
- repopilot review . --base origin/main
357
- repopilot review . --base origin/main --head HEAD --format markdown
301
+ repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high
358
302
  ```
359
303
 
360
- Review mode still scans the repository with the normal rules, but separates findings into in-diff and out-of-diff groups. When import coupling data is available, it also shows blast radius: files that import changed files and may need extra review. When `--fail-on` is used, the CI gate evaluates only in-diff findings.
304
+ Commit `.repopilot/baseline.json` only after reviewing the accepted findings.
305
+ Do not update it just to make CI green; note accepted baseline changes in the PR.
361
306
 
362
- ## Output Formats
307
+ Validate or bypass local feedback suppressions:
363
308
 
364
309
  ```bash
365
- repopilot scan . --format console
366
- repopilot scan . --format json --output report.json
367
- repopilot scan . --format markdown --output report.md
368
- repopilot scan . --format html --output report.html
369
- repopilot scan . --format sarif --output repopilot.sarif
310
+ repopilot inspect feedback .
311
+ repopilot scan . --ignore-feedback
370
312
  ```
371
313
 
372
- ### SARIF output
314
+ Review a pull request or branch diff:
373
315
 
374
316
  ```bash
375
- repopilot scan . --format sarif --output repopilot.sarif
317
+ repopilot review . --base origin/main --fail-on-priority p1
376
318
  ```
377
319
 
378
- If your installed RepoPilot version does not support `--output`, redirect stdout instead:
320
+ See:
379
321
 
380
- ```bash
381
- repopilot scan . --format sarif > repopilot.sarif
382
- ```
322
+ - [CLI reference](docs/cli.md)
323
+ - [Commands guide](docs/commands.md)
324
+ - [GitHub Code Scanning integration](docs/integrations/github-code-scanning.md)
383
325
 
384
- Use JSON when custom scripts need to parse RepoPilot results. Console, Markdown, and HTML reports include the RepoPilot version, risk summary, top rules, and grouped findings for human review. Use SARIF for CI and code scanning integrations, including GitHub Code Scanning.
385
- Use `--receipt <path>` with `scan` when CI or release processes need compact evidence of the exact RepoPilot version, git state, scan scope, finding counts, language counts, and health score.
326
+ ---
386
327
 
387
- See [docs/integrations/github-code-scanning.md](docs/integrations/github-code-scanning.md) for a copy-paste GitHub Actions workflow, required permissions, and local validation commands.
328
+ ## What RepoPilot Checks
329
+
330
+ RepoPilot includes rules for:
331
+
332
+ - architecture risk
333
+ - large and complex files
334
+ - deep nesting
335
+ - risky barrel files
336
+ - excessive fan-out and coupling
337
+ - circular dependencies
338
+ - TODO/FIXME/HACK markers
339
+ - long functions
340
+ - hardcoded secret candidates
341
+ - committed private keys
342
+ - committed `.env` files
343
+ - missing test structure
344
+ - source files without test counterparts
345
+ - JavaScript/TypeScript framework signals
346
+ - React and React Native project health
347
+ - Django project health
348
+ - Rust panic/unwrap risk
349
+ - JavaScript runtime exit risk
350
+
351
+ See the full rule list in [rulesets](docs/rulesets.md).
388
352
 
389
- Compare two JSON reports:
353
+ ---
354
+
355
+ ## Example
390
356
 
391
357
  ```bash
392
- repopilot scan . --format json --output before.json
393
- repopilot scan . --format json --output after.json
394
- repopilot compare before.json after.json
395
- repopilot compare before.json after.json --format markdown
396
- repopilot compare before.json after.json --format json --output diff.json
358
+ $ repopilot scan .
359
+
360
+ RepoPilot Scan
361
+ Version: 0.12.0
362
+ Path: .
363
+ Risk: Elevated
364
+ Health score: 93/100
365
+ Profile: default
366
+ Findings visible: 7
367
+ Hidden suggestions: 657 strict-only suggestions
368
+
369
+ Top risks:
370
+ P0 security.secret-candidate src/config/app.ts:12
371
+ P1 language.rust.panic-risk src/api/routes/search.rs:88
372
+
373
+ Hidden suggestions breakdown:
374
+ 379 testing-gap / testing.source-without-test
375
+ 104 maintainability / code-quality.long-function
376
+ 43 maintainability / architecture.large-file
397
377
  ```
398
378
 
399
- ## CI Usage
400
-
401
- Use `--fail-on new-high` to fail CI only when new high or critical findings are introduced. Supported new-finding thresholds are `new-low`, `new-medium`, `new-high`, and `new-critical`.
402
-
403
- When `--fail-on new-*` is used without `--baseline`, RepoPilot treats all current findings as new. For baseline-based adoption, commit an accepted baseline and scan against it in CI.
404
-
405
- To upload RepoPilot findings to GitHub Code Scanning, generate SARIF and use `github/codeql-action/upload-sarif`. The workflow must include `security-events: write`.
406
- The first-party action can also run `command: ai-context`, `command: ai-plan`, or `command: ai-prompt`; those commands emit Markdown and do not produce SARIF. Prefer typed action inputs such as `path`, `config`, `baseline`, `fail-on`, `focus`, `budget`, `output`, and `receipt`; `args` remains available for advanced flags.
407
-
408
- ```yaml
409
- name: RepoPilot
410
-
411
- on:
412
- pull_request:
413
-
414
- permissions:
415
- contents: read
416
- security-events: write
417
-
418
- jobs:
419
- repopilot:
420
- runs-on: ubuntu-latest
421
-
422
- steps:
423
- - uses: actions/checkout@v5
379
+ Default mode shows what is likely to matter now. Strict mode keeps the full audit:
424
380
 
425
- - name: Install Rust
426
- uses: dtolnay/rust-toolchain@stable
427
-
428
- - name: Install RepoPilot
429
- run: cargo install repopilot
381
+ ```bash
382
+ repopilot scan . --profile strict
383
+ ```
430
384
 
431
- - name: Run RepoPilot
432
- run: repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high --receipt repopilot-receipt.json
385
+ ---
433
386
 
434
- - name: Run RepoPilot (SARIF)
435
- run: repopilot scan . --format sarif --output repopilot.sarif
387
+ ## Documentation
436
388
 
437
- - name: Upload to GitHub Code Scanning
438
- uses: github/codeql-action/upload-sarif@v4
439
- if: always()
440
- with:
441
- sarif_file: repopilot.sarif
389
+ | Document | Description |
390
+ |---|---|
391
+ | [Install](docs/install.md) | Cargo, npm, Homebrew, curl, and source builds |
392
+ | [AI workflows](docs/ai-workflows.md) | Claude Code, ChatGPT, Cursor, and remediation workflows |
393
+ | [Security](docs/security.md) | Local-first trust model and vulnerability reporting |
394
+ | [Configuration](docs/configuration.md) | `repopilot.toml`, presets, ignore files, and baseline adoption |
395
+ | [Language support](docs/language-support.md) | Supported language/framework tiers and limitations |
396
+ | [Knowledge Engine](docs/knowledge-engine.md) | Rule applicability and local-first learning policy |
397
+ | [Risk Engine](docs/risk-engine.md) | Risk scoring, priorities, and calibration policy |
398
+ | [Local Feedback](docs/local-feedback.md) | Repository-local suppressions and validation |
399
+ | [Trust Mode](docs/trust-mode.md) | Default vs strict visibility and hidden suggestions |
400
+ | [Core Visibility Engine](docs/core-visibility-engine.md) | Finding intent model and visibility decisions |
401
+ | [CLI reference](docs/cli.md) | Commands, flags, and exit codes |
402
+ | [Commands guide](docs/commands.md) | Task-oriented command examples |
403
+ | [Rulesets](docs/rulesets.md) | Implemented rules, categories, and severity levels |
404
+ | [React Native](docs/react-native.md) | React Native and Expo detection |
405
+ | [GitHub Code Scanning](docs/integrations/github-code-scanning.md) | SARIF workflow and CI setup |
406
+ | [Roadmap](docs/roadmap.md) | Pre-1.0 roadmap and v1 gates |
407
+ | [0.12 GTM plan](docs/gtm-0.12.md) | Launch audiences, messaging, and proof points |
408
+ | [Release process](docs/release.md) | Manual release process |
409
+ | [Changelog](CHANGELOG.md) | Version history |
442
410
 
443
- - name: Upload audit receipt
444
- uses: actions/upload-artifact@v4
445
- if: always()
446
- with:
447
- name: repopilot-receipt
448
- path: repopilot-receipt.json
449
- ```
411
+ ---
450
412
 
451
413
  ## Roadmap
452
414
 
453
- These are planned ideas, not current features:
415
+ Planned direction:
454
416
 
455
- - Change Risk Map
456
- - Better architecture drift detection
457
- - Optional per-platform npm binary packages for faster installs
417
+ - stronger Trust Mode calibration
418
+ - `repopilot eval` with golden fixtures
419
+ - local feedback validation and report transparency
420
+ - hidden suggestion trend tracking
421
+ - deeper dependency graph and impact analysis
422
+ - AI task packs with context, constraints, and acceptance criteria
458
423
 
459
- ## Documentation
424
+ See [roadmap](docs/roadmap.md).
460
425
 
461
- | Document | Description |
462
- |---|---|
463
- | [docs/install.md](docs/install.md) | Installation options for Cargo, npm, Homebrew, curl, and source builds |
464
- | [docs/ai-workflows.md](docs/ai-workflows.md) | Claude Code, ChatGPT, Cursor, and AI remediation workflows |
465
- | [docs/security.md](docs/security.md) | Local-first trust model, installer security, and vulnerability reporting |
466
- | [docs/configuration.md](docs/configuration.md) | `repopilot.toml`, presets, ignore files, and baseline adoption |
467
- | [docs/language-support.md](docs/language-support.md) | Supported language/framework tiers, rule families, and limitations |
468
- | [docs/cli.md](docs/cli.md) | Complete CLI reference — all commands, flags, and exit codes |
469
- | [docs/commands.md](docs/commands.md) | Task-oriented command guide and common patterns |
470
- | [docs/rulesets.md](docs/rulesets.md) | Implemented audit rules, categories, and severity levels |
471
- | [docs/react-native.md](docs/react-native.md) | React Native and Expo detection, findings, and limitations |
472
- | [docs/integrations/github-code-scanning.md](docs/integrations/github-code-scanning.md) | GitHub Code Scanning SARIF workflow |
473
- | [docs/release.md](docs/release.md) | Manual release process |
474
- | [docs/release-checklist-0.10.md](docs/release-checklist-0.10.md) | 0.10.0 release readiness checklist |
475
- | [docs/distribution.md](docs/distribution.md) | Distribution channels |
476
- | [docs/github-ruleset.md](docs/github-ruleset.md) | GitHub branch ruleset configuration |
477
- | [CHANGELOG.md](CHANGELOG.md) | Version history |
426
+ ---
478
427
 
479
428
  ## License
480
429
 
481
- RepoPilot is licensed under MIT OR Apache-2.0.
430
+ RepoPilot is licensed under **MIT OR Apache-2.0**.