repopilot 0.20.0 → 0.21.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 +112 -108
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -3,172 +3,176 @@
|
|
|
3
3
|
[](https://crates.io/crates/repopilot)
|
|
4
4
|
[](https://www.npmjs.com/package/repopilot)
|
|
5
5
|
[](https://github.com/MykytaStel/repopilot/actions)
|
|
6
|
-
[](https://github.com/MykytaStel/repopilot/releases)
|
|
7
6
|
[](LICENSE)
|
|
8
7
|
|
|
9
|
-
**
|
|
8
|
+
**Deterministic review for code you didn't write.**
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
Coding agents and busy teams produce more diffs than anyone can carefully
|
|
11
|
+
read. RepoPilot is a local Rust CLI that inspects a Git change and reports,
|
|
12
|
+
with structural evidence, where it crosses security boundaries, changes
|
|
13
|
+
behavior, and how far it reaches through the import graph. There is no LLM
|
|
14
|
+
inside and nothing leaves your machine: the same diff always produces the
|
|
15
|
+
same answer, so you can gate CI on it.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
## Sixty seconds: an agent "optimizes" image uploads
|
|
18
|
+
|
|
19
|
+
An agent is asked to shell out to `mogrify` after image edits in a Django
|
|
20
|
+
app (Wagtail). The diff is one file, +12 −6, and it works. It also quietly
|
|
21
|
+
drops a permission check and pipes request input into a shell.
|
|
20
22
|
|
|
21
23
|
<p align="center">
|
|
22
|
-
<img src="https://raw.githubusercontent.com/MykytaStel/repopilot/main/docs/demos/
|
|
24
|
+
<img src="https://raw.githubusercontent.com/MykytaStel/repopilot/main/docs/demos/03-agent-review.gif" alt="repopilot review flagging a removed auth check and a request-to-shell taint flow in a one-file diff" width="800">
|
|
23
25
|
</p>
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
> tests, linters, type checkers, and dedicated security tools.
|
|
27
|
+
One command, `repopilot review .`, and the diff answers for itself:
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
```text
|
|
30
|
+
⚑ access control changed — wagtail/images/views/images.py
|
|
31
|
+
⚑ auth check removed — wagtail/images/views/images.py:264
|
|
32
|
+
Authentication/authorization check removed (auth calls: 1 -> 0)
|
|
33
|
+
⚑ subprocess/exec added — wagtail/images/views/images.py:270
|
|
34
|
+
⚑ untrusted input reaches subprocess/exec — wagtail/images/views/images.py:270
|
|
35
|
+
HTTP request input reaches subprocess/exec: subprocess.run("mogrify -quality " + quality + ...
|
|
36
|
+
⚠ A code boundary changed but no test did — confirm it's still covered.
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The edit is scripted so you can replay it on the pinned Wagtail checkout
|
|
40
|
+
RepoPilot uses for regression testing — but it is the kind of diff agents
|
|
41
|
+
ship every day:
|
|
29
42
|
|
|
30
43
|
```bash
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
44
|
+
python3 scripts/zoo.py clone --only wagtail
|
|
45
|
+
scripts/demo-agent-edit.sh .zoo/wagtail
|
|
46
|
+
repopilot review .zoo/wagtail
|
|
34
47
|
```
|
|
35
48
|
|
|
36
|
-
|
|
37
|
-
|
|
49
|
+
The same review works across languages — the identical flow in a Spring
|
|
50
|
+
controller (`scripts/demo-java-agent-edit.sh` on the pinned PetClinic
|
|
51
|
+
checkout) is caught the same way.
|
|
38
52
|
|
|
39
|
-
|
|
53
|
+
> RepoPilot reports structural evidence, not a security verdict. A flagged
|
|
54
|
+
> flow is a path to verify, not a confirmed vulnerability. Use it beside
|
|
55
|
+
> tests, linters, and dedicated security tools.
|
|
40
56
|
|
|
41
|
-
|
|
42
|
-
|---|---|
|
|
43
|
-
| Review what changed before merge | `repopilot review .` |
|
|
44
|
-
| Review a branch against main | `repopilot review . --base origin/main` |
|
|
45
|
-
| Audit the whole repository | `repopilot scan .` |
|
|
46
|
-
| Adopt existing debt gradually | `repopilot baseline create .` |
|
|
47
|
-
| Review a complete agent run | `repopilot snapshot` then `repopilot review --since-snapshot` |
|
|
48
|
-
| Prepare context for an assistant | `repopilot ai context .` |
|
|
49
|
-
| Connect a local MCP client | `repopilot mcp --root .` |
|
|
57
|
+
## Why not an LLM reviewer?
|
|
50
58
|
|
|
51
|
-
|
|
52
|
-
|
|
59
|
+
- **Deterministic.** Same diff in, same signals out. You can gate a pipeline
|
|
60
|
+
on it and reproduce any result; there is no prompt to drift and no model
|
|
61
|
+
to update under you.
|
|
62
|
+
- **Local.** No source upload, no API key, no per-review cost, no telemetry.
|
|
63
|
+
It runs offline, including the MCP server.
|
|
64
|
+
- **Evidence, not opinions.** Every signal points at a line and states the
|
|
65
|
+
structural fact behind it — an auth call count that went down, a request
|
|
66
|
+
value reaching `subprocess.run`. Nothing "looks fine."
|
|
53
67
|
|
|
54
|
-
|
|
68
|
+
LLM reviewers are useful; a deterministic layer under them is what makes
|
|
69
|
+
their output checkable.
|
|
55
70
|
|
|
56
|
-
|
|
71
|
+
## Install
|
|
57
72
|
|
|
58
73
|
```bash
|
|
59
|
-
|
|
74
|
+
cargo install repopilot
|
|
75
|
+
# or
|
|
76
|
+
npm install -g repopilot
|
|
60
77
|
```
|
|
61
78
|
|
|
62
|
-
|
|
79
|
+
Homebrew, GitHub Releases, and source builds:
|
|
80
|
+
[Installation](https://github.com/MykytaStel/repopilot/blob/main/docs/install.md).
|
|
81
|
+
|
|
82
|
+
## Review a change
|
|
63
83
|
|
|
64
84
|
```bash
|
|
65
|
-
repopilot review .
|
|
85
|
+
repopilot review . # working tree vs HEAD
|
|
86
|
+
repopilot review . --base origin/main # branch vs main
|
|
66
87
|
```
|
|
67
88
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- algorithmic changes: deeper nesting, nested loops, growth, or recursion;
|
|
75
|
-
- taint-lite flows: changed request or process input reaching SQL, exec,
|
|
76
|
-
filesystem-write, or outbound-network sinks;
|
|
77
|
-
- blast radius: files that import a changed file.
|
|
89
|
+
Review groups evidence into tiers: security boundaries (access control,
|
|
90
|
+
request trust, deploy surface, supply chain, secrets), behavioral changes
|
|
91
|
+
(network, subprocess, filesystem, SQL, removed error handling or auth),
|
|
92
|
+
algorithmic shifts, taint-lite flows (changed request/process input reaching
|
|
93
|
+
SQL, exec, filesystem-write, or network sinks), and blast radius (files that
|
|
94
|
+
import what changed).
|
|
78
95
|
|
|
79
|
-
|
|
80
|
-
explicit high-confidence gate with:
|
|
96
|
+
Signals are advisory by default. Gate CI on the high-confidence tier:
|
|
81
97
|
|
|
82
98
|
```bash
|
|
83
99
|
repopilot review . --base origin/main --fail-on-review definitely
|
|
84
100
|
```
|
|
85
101
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
repopilot review --since-snapshot
|
|
92
|
-
```
|
|
102
|
+
Every review also resolves to one merge-readiness verdict — `ready`,
|
|
103
|
+
`review`, or `blocked` — built from findings, review signals, CODEOWNERS,
|
|
104
|
+
and blast radius, with deterministic reason codes and suggested owners.
|
|
105
|
+
Console, Markdown, JSON, MCP, and the GitHub Action summary all read the
|
|
106
|
+
same record.
|
|
93
107
|
|
|
94
|
-
##
|
|
108
|
+
## Compare risk across runs
|
|
95
109
|
|
|
96
|
-
|
|
110
|
+
History is local, bounded, and off by default. Record two compatible
|
|
111
|
+
analyses to see what's new, persisting, resolved, or changed severity —
|
|
112
|
+
nothing leaves your machine:
|
|
97
113
|
|
|
98
114
|
```bash
|
|
99
|
-
repopilot
|
|
100
|
-
repopilot
|
|
101
|
-
repopilot scan . \
|
|
102
|
-
--baseline .repopilot/baseline.json \
|
|
103
|
-
--fail-on new-high
|
|
115
|
+
repopilot review . --record-history
|
|
116
|
+
repopilot scan . --record-history
|
|
104
117
|
```
|
|
105
118
|
|
|
106
|
-
|
|
107
|
-
suggestions. Use `--profile strict` for the full audit surface.
|
|
108
|
-
|
|
109
|
-
## AI Handoff
|
|
119
|
+
Receipts live under `.repopilot/history/`.
|
|
110
120
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
or LLM calls:
|
|
121
|
+
To calibrate a known rule to your repository instead of silencing it
|
|
122
|
+
project-wide, add a scoped, diffable entry to `.repopilot/overlay.toml`:
|
|
114
123
|
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
124
|
+
```toml
|
|
125
|
+
[[overlay]]
|
|
126
|
+
rule = "behavioral.panic-risk"
|
|
127
|
+
path = "src/cli/**"
|
|
128
|
+
severity = "low"
|
|
129
|
+
reason = "CLI handlers can terminate on unrecoverable input"
|
|
119
130
|
```
|
|
120
131
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
controls shape it:
|
|
132
|
+
Overlay decisions stay visible in `--profile strict` and the decision
|
|
133
|
+
trace — never a silent post-scan filter. Details:
|
|
134
|
+
[Configuration](https://github.com/MykytaStel/repopilot/blob/main/docs/configuration.md).
|
|
125
135
|
|
|
126
|
-
|
|
127
|
-
- `--budget` — `2k`/`4k`/`8k`/`16k` or an integer token target (default `4k`,
|
|
128
|
-
roughly four characters per token), so the output fits your model's context;
|
|
129
|
-
- `--output FILE` — write Markdown to a file instead of stdout (or pipe to your
|
|
130
|
-
clipboard, e.g. `| pbcopy`). Pass `--no-task` to drop the agent guidance and emit
|
|
131
|
-
fact-only context.
|
|
136
|
+
## Guard an agent run
|
|
132
137
|
|
|
133
|
-
|
|
138
|
+
Take a snapshot before the agent starts, review everything it did — commits
|
|
139
|
+
and uncommitted edits — when it stops:
|
|
134
140
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
141
|
+
```bash
|
|
142
|
+
repopilot snapshot
|
|
143
|
+
# ... agent session ...
|
|
144
|
+
repopilot review --since-snapshot
|
|
145
|
+
```
|
|
138
146
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
147
|
+
To wire this in permanently — a Claude Code hook that reviews every agent
|
|
148
|
+
session, an MCP server the agent can query mid-task (`repopilot init
|
|
149
|
+
--mcp-client claude|cursor|generic`), or a PR gate via the GitHub Action —
|
|
150
|
+
see [Guard your agent runs](https://github.com/MykytaStel/repopilot/blob/main/docs/agent-guardrail.md).
|
|
142
151
|
|
|
143
|
-
|
|
144
|
-
See [MCP server](https://github.com/MykytaStel/repopilot/blob/main/docs/mcp.md).
|
|
152
|
+
## Beyond the diff
|
|
145
153
|
|
|
146
|
-
|
|
154
|
+
- `repopilot scan .` — full-repository audit (architecture, coupling,
|
|
155
|
+
framework, testing). `repopilot baseline create .` adopts existing debt so
|
|
156
|
+
only new findings gate.
|
|
157
|
+
- `repopilot ai context .` — one compact Markdown handoff of repository
|
|
158
|
+
facts, findings, and a prioritized fix plan for an external assistant.
|
|
159
|
+
Local, no LLM calls.
|
|
160
|
+
- `repopilot mcp --root .` — the same analysis over stdio for coding agents:
|
|
161
|
+
synchronous, root-confined, offline.
|
|
147
162
|
|
|
148
|
-
|
|
149
|
-
Editor extensions and PyPI packages are not supported distribution channels.
|
|
163
|
+
Details: [Common workflows](https://github.com/MykytaStel/repopilot/blob/main/docs/commands.md).
|
|
150
164
|
|
|
151
165
|
## Documentation
|
|
152
166
|
|
|
153
167
|
- [Documentation index](https://github.com/MykytaStel/repopilot/blob/main/docs/README.md)
|
|
154
|
-
- [
|
|
168
|
+
- [Guard your agent runs](https://github.com/MykytaStel/repopilot/blob/main/docs/agent-guardrail.md)
|
|
155
169
|
- [CLI reference](https://github.com/MykytaStel/repopilot/blob/main/docs/cli.md)
|
|
156
170
|
- [Configuration](https://github.com/MykytaStel/repopilot/blob/main/docs/configuration.md)
|
|
157
171
|
- [Reports and schemas](https://github.com/MykytaStel/repopilot/blob/main/docs/reports.md)
|
|
158
172
|
- [GitHub pull request integration](https://github.com/MykytaStel/repopilot/blob/main/docs/integrations/github-code-scanning.md)
|
|
159
|
-
- [Signal contract](https://github.com/MykytaStel/repopilot/blob/main/docs/engineering/signal-contract.md)
|
|
160
|
-
- [Release process](https://github.com/MykytaStel/repopilot/blob/main/docs/release.md)
|
|
161
|
-
|
|
162
|
-
## Development
|
|
163
173
|
|
|
164
|
-
|
|
165
|
-
cargo fmt --all -- --check
|
|
166
|
-
cargo clippy --all-targets --all-features -- -D warnings
|
|
167
|
-
cargo test --all
|
|
168
|
-
npm run release:contract
|
|
169
|
-
./scripts/smoke-product.sh
|
|
170
|
-
```
|
|
174
|
+
Contributing and development commands: [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
171
175
|
|
|
172
176
|
## License
|
|
173
177
|
|
|
174
|
-
|
|
178
|
+
MIT OR Apache-2.0.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repopilot",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"description": "Local-first CLI for reviewing Git changes, security boundaries, and blast radius before merge.",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"LICENSE"
|
|
31
31
|
],
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"@repopilot/darwin-arm64": "0.
|
|
34
|
-
"@repopilot/darwin-x64": "0.
|
|
35
|
-
"@repopilot/linux-arm64-gnu": "0.
|
|
36
|
-
"@repopilot/linux-x64-gnu": "0.
|
|
37
|
-
"@repopilot/win32-x64-msvc": "0.
|
|
33
|
+
"@repopilot/darwin-arm64": "0.21.0",
|
|
34
|
+
"@repopilot/darwin-x64": "0.21.0",
|
|
35
|
+
"@repopilot/linux-arm64-gnu": "0.21.0",
|
|
36
|
+
"@repopilot/linux-x64-gnu": "0.21.0",
|
|
37
|
+
"@repopilot/win32-x64-msvc": "0.21.0"
|
|
38
38
|
},
|
|
39
39
|
"keywords": [
|
|
40
40
|
"cli",
|