repopilot 0.11.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.
Files changed (2) hide show
  1. package/README.md +251 -307
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -7,92 +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.11.0` is a signal quality and CI polish release: it reduces
19
- low-value self-audit findings, adds first-party Action parity for priority/rule
20
- filters, and tightens the `doctor -> scan/review -> ai context -> CI gate` loop
21
- 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.
22
21
 
23
- ## Why RepoPilot?
22
+ ---
24
23
 
25
- Most linters and audit tools stop at the terminal. RepoPilot bridges the gap to your AI assistant:
24
+ ## Why RepoPilot?
26
25
 
27
- | | SonarQube / CodeClimate | ESLint / language linters | **RepoPilot** |
28
- |---|---|---|---|
29
- | Runs offline | ❌ | ✅ | ✅ |
30
- | No code upload | ❌ | ✅ | ✅ |
31
- | Cross-language architecture analysis | ✅ | ❌ | ✅ |
32
- | LLM-ready output | ❌ | ❌ | ✅ |
33
- | Fits in a model context window | ❌ | ❌ | ✅ |
34
- | 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:
35
28
 
36
- ```bash
37
- repopilot ai context . | pbcopy # macOS: paste into your coding assistant
29
+ ```text
30
+ scan -> understand risk -> generate AI context -> fix -> review
38
31
  ```
39
32
 
40
- ## Features
41
-
42
- - Repository scanning for projects, folders, and individual files
43
- - Gitignore-aware walking with built-in ignores for common build, cache, vendor, and native platform directories
44
- - Architecture findings: oversized files, deep nesting, deep relative imports, risky barrel files, too many modules per directory
45
- - Coupling analysis: excessive fan-out, high-instability hubs, circular dependencies
46
- - Code quality findings: cyclomatic complexity density, long functions, TODO/FIXME/HACK markers
47
- - Security findings: hardcoded secret candidates, committed private keys, committed `.env` files
48
- - Testing findings: missing test folder, source files without test counterparts
49
- - Framework findings for JavaScript, React, React Native, Expo, and Django projects
50
- - React Native architecture profile: project kind, New Architecture, Hermes, Codegen, platform mismatch, and package manager signals
51
- - Workspace scanning (`--workspace`) for npm, yarn, pnpm, and Cargo workspaces with per-package risk summary — parallel per-package scans
52
- - Evidence-backed findings with stable rule IDs, severity, file paths, line numbers, and snippets
53
- - 46 built-in rules with titles, descriptions, recommendations, and docs links
54
- - `repopilot.toml` configuration generated by `repopilot init`
55
- - Configuration presets (`--preset strict|balanced|lenient`) for quick threshold tuning
56
- - Baseline workflow for accepting existing findings in legacy repositories
57
- - CI-friendly failure thresholds with `--fail-on`
58
- - Git diff-aware review mode for prioritizing findings introduced by changed lines
59
- - Doctor adoption guidance for config, baseline, CI gate, report, and receipt readiness
60
- - Audit receipt JSON from `repopilot scan --receipt` for reproducible scan evidence
61
- - Console, JSON, Markdown, HTML, and SARIF (2.1.0) scan output — SARIF includes per-result category and workspace package properties
62
- - First-party GitHub Action wrapper for `scan`, `review`, `compare`, and `ai` workflows, with optional SARIF upload and receipt output for scans
63
- - Compare mode for diffing two JSON scan reports
64
- - **`repopilot ai context`** — formats scan output as LLM-ready markdown, paste into Claude Code or ChatGPT to start remediating
65
- - **`repopilot ai plan`** — turns findings into a prioritized remediation plan
66
- - **`repopilot ai prompt`** — exports an AI-ready remediation prompt with RepoPilot context
67
-
68
- 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
+ ---
69
51
 
70
52
  ## Install
71
53
 
54
+ With Cargo:
55
+
72
56
  ```bash
73
57
  cargo install repopilot
74
58
  ```
75
59
 
76
- Install with npm:
60
+ With npm:
77
61
 
78
62
  ```bash
79
63
  npm install -g repopilot
80
64
  ```
81
65
 
82
- Install with Homebrew:
66
+ With Homebrew:
83
67
 
84
68
  ```bash
85
69
  brew tap mykytastel/repopilot
86
70
  brew install repopilot
87
71
  ```
88
72
 
89
- Install with curl (Linux/macOS):
73
+ With curl on Linux/macOS:
90
74
 
91
75
  ```bash
92
76
  curl -fsSL https://raw.githubusercontent.com/MykytaStel/repopilot/main/install.sh | bash
93
77
  ```
94
78
 
95
- 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
+ ```
96
86
 
97
87
  Upgrade:
98
88
 
@@ -102,385 +92,339 @@ npm update -g repopilot
102
92
  brew update && brew upgrade repopilot
103
93
  ```
104
94
 
105
- Build from source:
106
-
107
- ```bash
108
- git clone https://github.com/MykytaStel/repopilot.git
109
- cd repopilot
110
- cargo build --release
111
- ```
95
+ ---
112
96
 
113
97
  ## Quick Start
114
98
 
115
- No config needed. Run this in any repository and see findings immediately:
99
+ Start with a local scan:
116
100
 
117
101
  ```bash
118
102
  repopilot scan .
119
103
  ```
120
104
 
121
- 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:
122
106
 
123
107
  ```bash
124
- repopilot ai context . | pbcopy # macOS — copies to clipboard
125
- 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
126
111
  ```
127
112
 
128
- 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:
129
114
 
130
- ### Going deeper
115
+ ```bash
116
+ repopilot ai context . --budget 4k
117
+ ```
131
118
 
132
- Once you want CI integration, baseline tracking, or tighter configuration:
119
+ Copy AI context on macOS:
133
120
 
134
121
  ```bash
135
- repopilot init # generate repopilot.toml
136
- repopilot doctor . # check CI / baseline readiness
137
- repopilot scan . --min-priority p2 --rule security.secret-candidate
138
- repopilot ai context . --focus security # prepare local AI context
139
- repopilot baseline create . # accept existing findings as known debt
140
- repopilot review . --base origin/main --fail-on-priority p1 # CI gate on high-priority risk
122
+ repopilot ai context . | pbcopy
141
123
  ```
142
124
 
143
- Save a shareable report:
125
+ Save a Markdown report:
144
126
 
145
127
  ```bash
146
- repopilot scan . --format markdown --output repopilot-report.md --receipt .repopilot/receipt.json
128
+ repopilot scan . --format markdown --output repopilot-report.md
147
129
  ```
148
130
 
149
- Reduce scan noise while iterating:
131
+ Run a focused security scan:
150
132
 
151
133
  ```bash
152
- repopilot scan . --min-severity high
153
- repopilot scan . --workspace --min-severity medium
154
- repopilot scan . --exclude fixtures --max-file-size 1mb --max-files 500
134
+ repopilot scan . --min-severity high --rule security.secret-candidate
155
135
  ```
156
136
 
157
- 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:
158
138
 
159
- ## Local-First AI Workflow
160
-
161
- RepoPilot does not call LLM APIs. AI commands scan local files and produce Markdown
162
- that you decide where to paste.
139
+ ```bash
140
+ repopilot review . --base origin/main
141
+ ```
163
142
 
164
- `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
+ ---
165
144
 
166
- ```bash
167
- # Paste into Claude Code or ChatGPT
168
- repopilot ai context .
145
+ ## Trust Mode
169
146
 
170
- # Focus on security only, keep it short
171
- repopilot ai context . --focus security --budget 2k
147
+ RepoPilot's default scan profile is intentionally quiet.
172
148
 
173
- # Save to file
174
- 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.
175
152
 
176
- # Pipe directly into clipboard (macOS)
177
- 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
178
157
  ```
179
158
 
180
- ## Example Output
159
+ The visibility engine classifies findings by product intent:
181
160
 
161
+ ```text
162
+ SecurityRisk | RuntimeRisk | ActionableRisk | Maintainability | TestingGap | Informational
182
163
  ```
183
- $ repopilot ai context .
184
164
 
185
- # 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:
186
169
 
187
- **Risk Level:** 🟠 ELEVATED
188
- **Tech Stack:** React Native (New Arch), Expo, TypeScript
189
- **Size:** 94 files · 8,340 LOC · ~42k tokens
190
- **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)
191
172
 
192
- ## Security (2 high)
193
- 1. [HIGH] Possible secret detected — `src/config/api.ts:12`
194
- ```
195
- const API_KEY = "sk_live_…"
196
- ```
197
- > **Fix:** Move to environment variables or a secrets manager.
173
+ ---
198
174
 
199
- ## Architecture (2 high)
200
- 1. [HIGH] Circular dependency detected — `src/store/index.ts`
201
- > **Fix:** Extract shared types to a separate module to break the cycle.
175
+ ## AI Workflow
202
176
 
203
- ## Top Recommendations
204
- 1. **Move hardcoded API key** (src/config/api.ts:12) — use process.env or a vault
205
- 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.
206
179
 
207
- ---
208
- *~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
209
184
  ```
210
185
 
211
- Paste this into a coding assistant and ask for a focused patch. For larger
212
- repositories, start with one focus area instead of asking for every finding at
213
- once.
186
+ Typical loop:
214
187
 
215
- ## 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
+ ```
216
196
 
217
- 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).
218
198
 
219
- ```bash
220
- repopilot ai context . --focus security # get an LLM brief for Claude Code
221
- repopilot ai plan . --focus security # get a prioritized hardening plan
222
- repopilot ai prompt . --budget 8k # generate a paste-ready remediation prompt
223
- repopilot review . --base origin/main --baseline .repopilot/baseline.json --fail-on-priority p1
224
- repopilot scan . --workspace --min-severity medium --format markdown --output repopilot-report.md
225
- ```
199
+ ---
226
200
 
227
- ## Commands
201
+ ## Core Commands
228
202
 
229
203
  | Command | Alias | Description |
230
- |---------|-------|-------------|
231
- | `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` |
232
208
  | `repopilot review [path]` | `r` | Review findings that touch changed Git diff lines |
233
- | `repopilot ai context <path>` | — | LLM-ready context from a scan |
234
- | `repopilot ai plan <path>` | — | Prioritized remediation plan |
235
- | `repopilot ai prompt <path>` | — | AI-ready remediation prompt |
236
- | `repopilot compare <before> <after>` | `cmp` | Compare two JSON scan reports and show what changed |
237
- | `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 |
238
214
  | `repopilot doctor [path]` | `d` | Diagnose audit readiness |
239
- | `repopilot init` | — | Generate a default `repopilot.toml` configuration file |
215
+ | `repopilot init` | — | Generate `repopilot.toml` |
240
216
 
241
- Use `--help` on any command for the full description and examples:
217
+ Get command help:
242
218
 
243
219
  ```bash
244
220
  repopilot --help
245
221
  repopilot scan --help
246
222
  repopilot review --help
247
- repopilot baseline create --help
223
+ repopilot ai --help
248
224
  ```
249
225
 
250
- ## Configuration
251
-
252
- RepoPilot automatically reads `repopilot.toml` from the current working directory when running `scan`.
226
+ ---
253
227
 
254
- Configuration precedence:
228
+ ## Output Formats
255
229
 
256
- ```text
257
- 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
258
236
  ```
259
237
 
260
- 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:
261
251
 
262
252
  ```bash
263
253
  repopilot init
264
- repopilot init --force
265
- repopilot init --path ./repopilot.toml
266
254
  ```
267
255
 
268
- Use an explicit config path:
256
+ Run with an explicit config:
269
257
 
270
258
  ```bash
271
259
  repopilot scan . --config repopilot.toml
272
260
  ```
273
261
 
274
- Example `repopilot.toml`:
275
-
276
- ```toml
277
- [scan]
278
- ignore = [
279
- ".git",
280
- ".github",
281
- ".repopilot",
282
- "target",
283
- "node_modules",
284
- "dist",
285
- "build",
286
- ".next",
287
- ".nuxt",
288
- ".cache",
289
- "coverage",
290
- "vendor",
291
- "Pods",
292
- "DerivedData"
293
- ]
294
- max_file_bytes = 2097152
295
-
296
- [architecture]
297
- max_file_lines = 300
298
- huge_file_lines = 1000
299
- max_directory_modules = 20
300
- max_directory_depth = 5
301
- max_function_lines = 50
302
- max_fan_out = 15
303
- instability_hub_min_fan_in = 5
304
- instability_hub_min_instability_pct = 75
305
-
306
- [testing]
307
- detect_missing_tests = true
308
-
309
- [security]
310
- detect_secret_like_names = true
311
-
312
- [output]
313
- default_format = "console"
262
+ Configuration precedence:
263
+
264
+ ```text
265
+ CLI args > repopilot.toml > built-in defaults
314
266
  ```
315
267
 
316
- CLI threshold overrides:
268
+ Common scan options:
317
269
 
318
270
  ```bash
271
+ repopilot scan . --preset strict
272
+ repopilot scan . --preset balanced
273
+ repopilot scan . --preset lenient
319
274
  repopilot scan . --max-file-loc 500
320
- repopilot scan . --max-directory-modules 25
321
275
  repopilot scan . --max-directory-depth 6
322
- repopilot scan . --max-file-size 1mb
323
- repopilot scan . --max-files 1000
324
276
  repopilot scan . --exclude generated
325
277
  repopilot scan . --include-low-signal
326
278
  ```
327
279
 
328
- `--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).
329
281
 
330
- 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
+ ---
331
283
 
332
- ## Baseline Workflow
284
+ ## Baseline and Review
333
285
 
334
- 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:
335
287
 
336
288
  ```bash
337
- repopilot baseline create .
338
- repopilot scan . --baseline .repopilot/baseline.json
339
- repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high
289
+ repopilot baseline create . --output .repopilot/baseline.json
340
290
  ```
341
291
 
342
- 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`.
343
-
344
- 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.
345
-
346
- ## Review Workflow
347
-
348
- Use `review` when you want RepoPilot to focus on findings that touch changed Git diff lines.
292
+ Scan against accepted debt:
349
293
 
350
294
  ```bash
351
- repopilot review .
352
- repopilot review . --format json --output review.json
353
- repopilot review . --baseline .repopilot/baseline.json --fail-on new-high
295
+ repopilot scan . --baseline .repopilot/baseline.json
354
296
  ```
355
297
 
356
- 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:
357
299
 
358
300
  ```bash
359
- repopilot review . --base origin/main
360
- repopilot review . --base origin/main --head HEAD --format markdown
301
+ repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high
361
302
  ```
362
303
 
363
- 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.
364
306
 
365
- ## Output Formats
307
+ Validate or bypass local feedback suppressions:
366
308
 
367
309
  ```bash
368
- repopilot scan . --format console
369
- repopilot scan . --format json --output report.json
370
- repopilot scan . --format markdown --output report.md
371
- repopilot scan . --format html --output report.html
372
- repopilot scan . --format sarif --output repopilot.sarif
310
+ repopilot inspect feedback .
311
+ repopilot scan . --ignore-feedback
373
312
  ```
374
313
 
375
- ### SARIF output
314
+ Review a pull request or branch diff:
376
315
 
377
316
  ```bash
378
- repopilot scan . --format sarif --output repopilot.sarif
317
+ repopilot review . --base origin/main --fail-on-priority p1
379
318
  ```
380
319
 
381
- If your installed RepoPilot version does not support `--output`, redirect stdout instead:
320
+ See:
382
321
 
383
- ```bash
384
- repopilot scan . --format sarif > repopilot.sarif
385
- ```
322
+ - [CLI reference](docs/cli.md)
323
+ - [Commands guide](docs/commands.md)
324
+ - [GitHub Code Scanning integration](docs/integrations/github-code-scanning.md)
386
325
 
387
- Use JSON when custom scripts need to parse RepoPilot results. Console, Markdown, and HTML reports include the RepoPilot version, risk summary, top risk clusters, top rules, and grouped findings for human review. Use SARIF for CI and code scanning integrations, including GitHub Code Scanning.
388
- 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
+ ---
389
327
 
390
- 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).
391
352
 
392
- Compare two JSON reports:
353
+ ---
354
+
355
+ ## Example
393
356
 
394
357
  ```bash
395
- repopilot scan . --format json --output before.json
396
- repopilot scan . --format json --output after.json
397
- repopilot compare before.json after.json
398
- repopilot compare before.json after.json --format markdown
399
- 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
400
377
  ```
401
378
 
402
- ## CI Usage
403
-
404
- 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`.
405
-
406
- 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.
407
-
408
- To upload RepoPilot findings to GitHub Code Scanning, generate SARIF and use `github/codeql-action/upload-sarif`. The workflow must include `security-events: write`.
409
- The first-party action can also run `command: doctor`, `command: ai-context`, `command: ai-plan`, or `command: ai-prompt`; AI commands emit Markdown and do not produce SARIF. Prefer typed action inputs such as `path`, `config`, `baseline`, `fail-on`, `fail-on-priority`, `min-priority`, `rule`, `timing`, `focus`, `budget`, `output`, and `receipt`; `args` remains available for advanced flags.
410
-
411
- ```yaml
412
- name: RepoPilot
413
-
414
- on:
415
- pull_request:
416
-
417
- permissions:
418
- contents: read
419
- security-events: write
420
-
421
- jobs:
422
- repopilot:
423
- runs-on: ubuntu-latest
424
-
425
- steps:
426
- - uses: actions/checkout@v5
379
+ Default mode shows what is likely to matter now. Strict mode keeps the full audit:
427
380
 
428
- - name: Install Rust
429
- uses: dtolnay/rust-toolchain@stable
430
-
431
- - name: Install RepoPilot
432
- run: cargo install repopilot
381
+ ```bash
382
+ repopilot scan . --profile strict
383
+ ```
433
384
 
434
- - name: Run RepoPilot
435
- run: repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high --receipt repopilot-receipt.json
385
+ ---
436
386
 
437
- - name: Run RepoPilot (SARIF)
438
- run: repopilot scan . --format sarif --output repopilot.sarif
387
+ ## Documentation
439
388
 
440
- - name: Upload to GitHub Code Scanning
441
- uses: github/codeql-action/upload-sarif@v4
442
- if: always()
443
- with:
444
- 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 |
445
410
 
446
- - name: Upload audit receipt
447
- uses: actions/upload-artifact@v4
448
- if: always()
449
- with:
450
- name: repopilot-receipt
451
- path: repopilot-receipt.json
452
- ```
411
+ ---
453
412
 
454
413
  ## Roadmap
455
414
 
456
- These are planned ideas, not current features:
415
+ Planned direction:
457
416
 
458
- - Change Risk Map
459
- - Better architecture drift detection
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
460
423
 
461
- ## Documentation
424
+ See [roadmap](docs/roadmap.md).
462
425
 
463
- | Document | Description |
464
- |---|---|
465
- | [docs/install.md](docs/install.md) | Installation options for Cargo, npm, Homebrew, curl, and source builds |
466
- | [docs/ai-workflows.md](docs/ai-workflows.md) | Claude Code, ChatGPT, Cursor, and AI remediation workflows |
467
- | [docs/security.md](docs/security.md) | Local-first trust model, installer security, and vulnerability reporting |
468
- | [docs/configuration.md](docs/configuration.md) | `repopilot.toml`, presets, ignore files, and baseline adoption |
469
- | [docs/language-support.md](docs/language-support.md) | Supported language/framework tiers, rule families, and limitations |
470
- | [docs/risk-engine.md](docs/risk-engine.md) | Risk scoring, priority buckets, signals, and calibration policy |
471
- | [docs/cli.md](docs/cli.md) | Complete CLI reference — all commands, flags, and exit codes |
472
- | [docs/commands.md](docs/commands.md) | Task-oriented command guide and common patterns |
473
- | [docs/rulesets.md](docs/rulesets.md) | Implemented audit rules, categories, and severity levels |
474
- | [docs/react-native.md](docs/react-native.md) | React Native and Expo detection, findings, and limitations |
475
- | [docs/integrations/github-code-scanning.md](docs/integrations/github-code-scanning.md) | GitHub Code Scanning SARIF workflow |
476
- | [docs/release.md](docs/release.md) | Manual release process |
477
- | [docs/release-announcement-0.11.md](docs/release-announcement-0.11.md) | 0.11.0 launch post and post-publish checks |
478
- | [docs/release-checklist-0.11.md](docs/release-checklist-0.11.md) | 0.11.0 release readiness checklist |
479
- | [docs/release-checklist-0.10.md](docs/release-checklist-0.10.md) | 0.10.0 release readiness checklist |
480
- | [docs/distribution.md](docs/distribution.md) | Distribution channels |
481
- | [docs/github-ruleset.md](docs/github-ruleset.md) | GitHub branch ruleset configuration |
482
- | [CHANGELOG.md](CHANGELOG.md) | Version history |
426
+ ---
483
427
 
484
428
  ## License
485
429
 
486
- RepoPilot is licensed under MIT OR Apache-2.0.
430
+ RepoPilot is licensed under **MIT OR Apache-2.0**.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repopilot",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Local-first CLI for repository audit, architecture risk detection, baseline tracking, and CI-friendly code review.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "repository": {
@@ -26,11 +26,11 @@
26
26
  "LICENSE"
27
27
  ],
28
28
  "optionalDependencies": {
29
- "@repopilot/darwin-arm64": "0.11.0",
30
- "@repopilot/darwin-x64": "0.11.0",
31
- "@repopilot/linux-arm64-gnu": "0.11.0",
32
- "@repopilot/linux-x64-gnu": "0.11.0",
33
- "@repopilot/win32-x64-msvc": "0.11.0"
29
+ "@repopilot/darwin-arm64": "0.12.0",
30
+ "@repopilot/darwin-x64": "0.12.0",
31
+ "@repopilot/linux-arm64-gnu": "0.12.0",
32
+ "@repopilot/linux-x64-gnu": "0.12.0",
33
+ "@repopilot/win32-x64-msvc": "0.12.0"
34
34
  },
35
35
  "keywords": [
36
36
  "cli",