repopilot 0.12.0 → 0.13.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 +101 -290
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -7,76 +7,46 @@
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
- **Local-first repository risk checks for safer human and AI-assisted code changes.**
10
+ **Local-first repository audits for safer human and AI-assisted code changes.**
11
11
 
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.
16
-
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
-
22
- ---
23
-
24
- ## Why RepoPilot?
25
-
26
- Most tools either lint one language or send results into a dashboard. RepoPilot is
27
- designed for the local development loop:
12
+ RepoPilot is a fast Rust CLI that scans a repository locally, ranks evidence-backed risks, supports baseline adoption, reviews branches, and creates AI-ready remediation context without uploading source code.
28
13
 
29
14
  ```text
30
- scan -> understand risk -> generate AI context -> fix -> review
15
+ scan -> review risk -> baseline adoption -> CI evidence -> local AI context
31
16
  ```
32
17
 
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
- ---
18
+ RepoPilot is not a replacement for language linters, formatters, type checkers, or dedicated security scanners. It complements them with repository-level evidence: secrets, runtime footguns, architecture risk, review blast radius, baseline status, and report formats that work in CI.
51
19
 
52
20
  ## Install
53
21
 
54
- With Cargo:
22
+ Choose one install method.
23
+
24
+ Cargo:
55
25
 
56
26
  ```bash
57
27
  cargo install repopilot
58
28
  ```
59
29
 
60
- With npm:
30
+ npm:
61
31
 
62
32
  ```bash
63
33
  npm install -g repopilot
64
34
  ```
65
35
 
66
- With Homebrew:
36
+ Homebrew:
67
37
 
68
38
  ```bash
69
39
  brew tap mykytastel/repopilot
70
40
  brew install repopilot
71
41
  ```
72
42
 
73
- With curl on Linux/macOS:
43
+ Installer:
74
44
 
75
45
  ```bash
76
46
  curl -fsSL https://raw.githubusercontent.com/MykytaStel/repopilot/main/install.sh | bash
77
47
  ```
78
48
 
79
- Build from source:
49
+ From source:
80
50
 
81
51
  ```bash
82
52
  git clone https://github.com/MykytaStel/repopilot.git
@@ -84,347 +54,188 @@ cd repopilot
84
54
  cargo build --release
85
55
  ```
86
56
 
87
- Upgrade:
88
-
89
- ```bash
90
- cargo install repopilot --force
91
- npm update -g repopilot
92
- brew update && brew upgrade repopilot
93
- ```
94
-
95
- ---
57
+ More: [docs/install.md](docs/install.md).
96
58
 
97
59
  ## Quick Start
98
60
 
99
- Start with a local scan:
61
+ Run a local scan:
100
62
 
101
63
  ```bash
102
64
  repopilot scan .
65
+ repopilot doctor .
103
66
  ```
104
67
 
105
- Check adoption readiness and create an intentional baseline for existing debt:
68
+ Adopt RepoPilot in an existing repository without failing CI on old debt:
106
69
 
107
70
  ```bash
108
- repopilot doctor .
109
71
  repopilot baseline create . --output .repopilot/baseline.json
110
72
  repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high
111
73
  ```
112
74
 
113
- Generate AI-ready context for the highest-risk work:
75
+ Review a branch:
114
76
 
115
77
  ```bash
116
- repopilot ai context . --budget 4k
78
+ repopilot review . --base origin/main
117
79
  ```
118
80
 
119
- Copy AI context on macOS:
81
+ Generate local AI context:
120
82
 
121
83
  ```bash
122
- repopilot ai context . | pbcopy
84
+ repopilot ai context . --budget 4k
123
85
  ```
124
86
 
125
- Save a Markdown report:
87
+ Save CI evidence:
126
88
 
127
89
  ```bash
128
90
  repopilot scan . --format markdown --output repopilot-report.md
91
+ repopilot scan . --format json --output repopilot-report.json --receipt .repopilot/receipt.json
92
+ repopilot scan . --format sarif --output repopilot.sarif
129
93
  ```
130
94
 
131
- Run a focused security scan:
132
-
133
- ```bash
134
- repopilot scan . --min-severity high --rule security.secret-candidate
135
- ```
136
-
137
- Review only changed code against a base branch:
138
-
139
- ```bash
140
- repopilot review . --base origin/main
141
- ```
95
+ ## What It Checks
142
96
 
143
- ---
97
+ | Area | Examples |
98
+ |---|---|
99
+ | Security | secret candidates, private keys, committed `.env` files |
100
+ | Runtime risk | Rust panic/unwrap paths, JavaScript/Python/Go/JVM/.NET process exits |
101
+ | Architecture | circular dependencies, excessive fan-out, instability hubs |
102
+ | Review risk | changed files, branch context, blast radius |
103
+ | Adoption | baselines, new-vs-existing findings, CI gates |
104
+ | Evidence | JSON, Markdown, SARIF, receipts, report envelopes |
105
+ | AI context | local, budgeted, evidence-backed Markdown for coding assistants |
144
106
 
145
107
  ## Trust Mode
146
108
 
147
- RepoPilot's default scan profile is intentionally quiet.
148
-
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.
109
+ Default scans are intentionally quiet. They keep high-trust security, runtime, and import-graph findings visible while summarizing broad maintainability and testing suggestions as strict-only noise.
152
110
 
153
111
  ```bash
154
- repopilot scan . # default profile
112
+ repopilot scan . # compact default output
113
+ repopilot scan . --output-style full
155
114
  repopilot scan . --profile strict # full audit output
156
- repopilot scan . --include-maintainability
157
- ```
158
-
159
- The visibility engine classifies findings by product intent:
160
-
161
- ```text
162
- SecurityRisk | RuntimeRisk | ActionableRisk | Maintainability | TestingGap | Informational
163
115
  ```
164
116
 
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:
169
-
170
- - [Trust Mode](docs/trust-mode.md)
171
- - [Core Visibility Engine](docs/core-visibility-engine.md)
172
-
173
- ---
174
-
175
- ## AI Workflow
117
+ Use strict mode for cleanup passes, rule development, and release hardening. Use the default profile for day-to-day local checks and CI gates.
176
118
 
177
- RepoPilot does not call LLM APIs. It produces local Markdown that you choose where
178
- to paste.
179
-
180
- ```bash
181
- repopilot ai context . --focus security
182
- repopilot ai plan . --focus security
183
- repopilot ai prompt . --budget 8k
184
- ```
185
-
186
- Typical loop:
187
-
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
- ```
196
-
197
- See [AI workflows](docs/ai-workflows.md).
198
-
199
- ---
119
+ More: [docs/trust-mode.md](docs/trust-mode.md).
200
120
 
201
121
  ## Core Commands
202
122
 
203
- | Command | Alias | Description |
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` |
208
- | `repopilot review [path]` | `r` | Review findings that touch changed Git diff lines |
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 |
214
- | `repopilot doctor [path]` | `d` | Diagnose audit readiness |
215
- | `repopilot init` | — | Generate `repopilot.toml` |
216
-
217
- Get command help:
218
-
219
- ```bash
220
- repopilot --help
221
- repopilot scan --help
222
- repopilot review --help
223
- repopilot ai --help
123
+ ```text
124
+ scan | review | baseline | compare | doctor | inspect | ai | init | cache
224
125
  ```
225
126
 
226
- ---
227
-
228
- ## Output Formats
127
+ Common workflows:
229
128
 
230
129
  ```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
130
+ repopilot scan .
131
+ repopilot review . --base origin/main
132
+ repopilot baseline create .
133
+ repopilot compare before.json after.json
134
+ repopilot inspect rules
135
+ repopilot inspect eval-rules --format json
136
+ repopilot ai context .
236
137
  ```
237
138
 
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
- ---
139
+ More: [docs/commands.md](docs/commands.md) and [docs/cli.md](docs/cli.md).
247
140
 
248
- ## Configuration
141
+ ## Baseline Adoption
249
142
 
250
- Generate a config file:
143
+ A baseline records current findings as accepted existing debt. Future scans can fail only on newly introduced risk:
251
144
 
252
145
  ```bash
253
- repopilot init
146
+ repopilot baseline create . --output .repopilot/baseline.json
147
+ git add .repopilot/baseline.json
148
+ repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high
254
149
  ```
255
150
 
256
- Run with an explicit config:
151
+ Review baseline updates like code changes. A baseline is not a suppression file; it is a CI adoption contract.
257
152
 
258
- ```bash
259
- repopilot scan . --config repopilot.toml
260
- ```
153
+ ## Rule Quality
261
154
 
262
- Configuration precedence:
155
+ Rules move through a lifecycle:
263
156
 
264
157
  ```text
265
- CLI args > repopilot.toml > built-in defaults
158
+ experimental -> preview -> stable
266
159
  ```
267
160
 
268
- Common scan options:
161
+ Before a rule becomes stable or default-visible, it should have metadata, true-positive and false-positive fixtures, stable finding IDs, concrete evidence, false-positive notes, recommendations, and clean local evaluation:
269
162
 
270
163
  ```bash
271
- repopilot scan . --preset strict
272
- repopilot scan . --preset balanced
273
- repopilot scan . --preset lenient
274
- repopilot scan . --max-file-loc 500
275
- repopilot scan . --max-directory-depth 6
276
- repopilot scan . --exclude generated
277
- repopilot scan . --include-low-signal
164
+ repopilot inspect eval-rules --format json
278
165
  ```
279
166
 
280
- See [configuration docs](docs/configuration.md).
167
+ More: [docs/rule-quality-gate.md](docs/rule-quality-gate.md).
281
168
 
282
- ---
169
+ ## Local-First
283
170
 
284
- ## Baseline and Review
171
+ RepoPilot does not upload source code, run a hosted scanner, call LLM APIs implicitly, send telemetry, or require a SaaS account.
285
172
 
286
- Create a baseline for existing findings:
173
+ AI commands only format local scan evidence as Markdown for tools such as Claude Code, ChatGPT, Cursor, Zed, or another assistant.
287
174
 
288
- ```bash
289
- repopilot baseline create . --output .repopilot/baseline.json
290
- ```
175
+ ## Reports
291
176
 
292
- Scan against accepted debt:
177
+ | Format | Use case |
178
+ |---|---|
179
+ | Console | fast local feedback |
180
+ | Markdown | PR comments and human-readable reports |
181
+ | JSON | automation and internal tooling |
182
+ | SARIF | GitHub Code Scanning |
183
+ | HTML | shareable local reports |
184
+ | Receipt | compact release/CI evidence |
293
185
 
294
- ```bash
295
- repopilot scan . --baseline .repopilot/baseline.json
296
- ```
186
+ More: [docs/reports.md](docs/reports.md).
297
187
 
298
- Fail CI only on new high-risk findings:
188
+ ## CI
189
+
190
+ Minimal baseline-aware gate:
299
191
 
300
192
  ```bash
301
193
  repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high
302
194
  ```
303
195
 
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.
306
-
307
- Validate or bypass local feedback suppressions:
196
+ GitHub Code Scanning:
308
197
 
309
198
  ```bash
310
- repopilot inspect feedback .
311
- repopilot scan . --ignore-feedback
199
+ repopilot scan . --format sarif --output repopilot.sarif
312
200
  ```
313
201
 
314
- Review a pull request or branch diff:
202
+ Release smoke:
315
203
 
316
204
  ```bash
317
- repopilot review . --base origin/main --fail-on-priority p1
205
+ ./scripts/smoke-product.sh
318
206
  ```
319
207
 
320
- See:
321
-
322
- - [CLI reference](docs/cli.md)
323
- - [Commands guide](docs/commands.md)
324
- - [GitHub Code Scanning integration](docs/integrations/github-code-scanning.md)
325
-
326
- ---
327
-
328
- ## What RepoPilot Checks
329
-
330
- RepoPilot includes rules for:
208
+ More: [docs/integrations/github-code-scanning.md](docs/integrations/github-code-scanning.md).
331
209
 
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).
210
+ ## Documentation
352
211
 
353
- ---
212
+ | Document | Purpose |
213
+ |---|---|
214
+ | [Install](docs/install.md) | Cargo, npm, Homebrew, curl, and source builds |
215
+ | [Commands](docs/commands.md) | Task-oriented workflows |
216
+ | [CLI](docs/cli.md) | Complete command and flag reference |
217
+ | [Configuration](docs/configuration.md) | `repopilot.toml`, presets, ignores, and baselines |
218
+ | [Rulesets](docs/rulesets.md) | Built-in rules, lifecycle, severity, and confidence |
219
+ | [Trust Mode](docs/trust-mode.md) | Default vs strict visibility policy |
220
+ | [Reports](docs/reports.md) | JSON, SARIF, Markdown, HTML, receipts, and schema fields |
221
+ | [Release Process](docs/release.md) | Local and CI release gates |
354
222
 
355
- ## Example
223
+ ## Development
356
224
 
357
225
  ```bash
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
226
+ cargo fmt --all -- --check
227
+ cargo clippy --all-targets --all-features -- -D warnings
228
+ cargo test --all
229
+ npm run test:npm
230
+ ./scripts/smoke-product.sh
377
231
  ```
378
232
 
379
- Default mode shows what is likely to matter now. Strict mode keeps the full audit:
233
+ Run rule evaluation from source:
380
234
 
381
235
  ```bash
382
- repopilot scan . --profile strict
236
+ cargo run -- inspect eval-rules --format json
383
237
  ```
384
238
 
385
- ---
386
-
387
- ## Documentation
388
-
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 |
410
-
411
- ---
412
-
413
- ## Roadmap
414
-
415
- Planned direction:
416
-
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
423
-
424
- See [roadmap](docs/roadmap.md).
425
-
426
- ---
427
-
428
239
  ## License
429
240
 
430
- RepoPilot is licensed under **MIT OR Apache-2.0**.
241
+ 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.12.0",
3
+ "version": "0.13.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.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"
29
+ "@repopilot/darwin-arm64": "0.13.0",
30
+ "@repopilot/darwin-x64": "0.13.0",
31
+ "@repopilot/linux-arm64-gnu": "0.13.0",
32
+ "@repopilot/linux-x64-gnu": "0.13.0",
33
+ "@repopilot/win32-x64-msvc": "0.13.0"
34
34
  },
35
35
  "keywords": [
36
36
  "cli",