repopilot 0.19.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 +114 -95
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -3,157 +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
|
-
|
|
28
|
-
## Install
|
|
27
|
+
One command, `repopilot review .`, and the diff answers for itself:
|
|
29
28
|
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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.
|
|
34
37
|
```
|
|
35
38
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
## Review A Change
|
|
40
|
-
|
|
41
|
-
Review the working tree against `HEAD`:
|
|
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:
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
|
|
44
|
+
python3 scripts/zoo.py clone --only wagtail
|
|
45
|
+
scripts/demo-agent-edit.sh .zoo/wagtail
|
|
46
|
+
repopilot review .zoo/wagtail
|
|
45
47
|
```
|
|
46
48
|
|
|
47
|
-
|
|
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.
|
|
48
52
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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.
|
|
56
|
+
|
|
57
|
+
## Why not an LLM reviewer?
|
|
52
58
|
|
|
53
|
-
|
|
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."
|
|
54
67
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
- behavioral changes: network, subprocess, filesystem, SQL, dependencies,
|
|
58
|
-
migrations, removed error handling, or removed auth checks;
|
|
59
|
-
- algorithmic changes: deeper nesting, nested loops, growth, or recursion;
|
|
60
|
-
- taint-lite flows: changed request or process input reaching SQL, exec,
|
|
61
|
-
filesystem-write, or outbound-network sinks;
|
|
62
|
-
- blast radius: files that import a changed file.
|
|
68
|
+
LLM reviewers are useful; a deterministic layer under them is what makes
|
|
69
|
+
their output checkable.
|
|
63
70
|
|
|
64
|
-
|
|
65
|
-
explicit high-confidence gate with:
|
|
71
|
+
## Install
|
|
66
72
|
|
|
67
73
|
```bash
|
|
68
|
-
|
|
74
|
+
cargo install repopilot
|
|
75
|
+
# or
|
|
76
|
+
npm install -g repopilot
|
|
69
77
|
```
|
|
70
78
|
|
|
71
|
-
|
|
79
|
+
Homebrew, GitHub Releases, and source builds:
|
|
80
|
+
[Installation](https://github.com/MykytaStel/repopilot/blob/main/docs/install.md).
|
|
81
|
+
|
|
82
|
+
## Review a change
|
|
72
83
|
|
|
73
84
|
```bash
|
|
74
|
-
repopilot
|
|
75
|
-
|
|
76
|
-
repopilot review --since-snapshot
|
|
85
|
+
repopilot review . # working tree vs HEAD
|
|
86
|
+
repopilot review . --base origin/main # branch vs main
|
|
77
87
|
```
|
|
78
88
|
|
|
79
|
-
|
|
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).
|
|
80
95
|
|
|
81
|
-
|
|
96
|
+
Signals are advisory by default. Gate CI on the high-confidence tier:
|
|
82
97
|
|
|
83
98
|
```bash
|
|
84
|
-
repopilot
|
|
85
|
-
repopilot baseline create .
|
|
86
|
-
repopilot scan . \
|
|
87
|
-
--baseline .repopilot/baseline.json \
|
|
88
|
-
--fail-on new-high
|
|
99
|
+
repopilot review . --base origin/main --fail-on-review definitely
|
|
89
100
|
```
|
|
90
101
|
|
|
91
|
-
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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:
|
|
99
113
|
|
|
100
114
|
```bash
|
|
101
|
-
repopilot
|
|
102
|
-
repopilot
|
|
103
|
-
repopilot ai context . --no-task --output ai-context.md # fact-only, for embedding
|
|
115
|
+
repopilot review . --record-history
|
|
116
|
+
repopilot scan . --record-history
|
|
104
117
|
```
|
|
105
118
|
|
|
106
|
-
|
|
107
|
-
and risk, the findings with evidence, a prioritized **P0–P3 remediation plan** with
|
|
108
|
-
the Context Risk Graph edit order, working rules, and a verification checklist. Three
|
|
109
|
-
controls shape it:
|
|
119
|
+
Receipts live under `.repopilot/history/`.
|
|
110
120
|
|
|
111
|
-
|
|
112
|
-
-
|
|
113
|
-
roughly four characters per token), so the output fits your model's context;
|
|
114
|
-
- `--output FILE` — write Markdown to a file instead of stdout (or pipe to your
|
|
115
|
-
clipboard, e.g. `| pbcopy`). Pass `--no-task` to drop the agent guidance and emit
|
|
116
|
-
fact-only context.
|
|
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`:
|
|
117
123
|
|
|
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"
|
|
130
|
+
```
|
|
119
131
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
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).
|
|
135
|
+
|
|
136
|
+
## Guard an agent run
|
|
137
|
+
|
|
138
|
+
Take a snapshot before the agent starts, review everything it did — commits
|
|
139
|
+
and uncommitted edits — when it stops:
|
|
123
140
|
|
|
124
141
|
```bash
|
|
125
|
-
|
|
142
|
+
repopilot snapshot
|
|
143
|
+
# ... agent session ...
|
|
144
|
+
repopilot review --since-snapshot
|
|
126
145
|
```
|
|
127
146
|
|
|
128
|
-
|
|
129
|
-
|
|
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).
|
|
130
151
|
|
|
131
|
-
##
|
|
152
|
+
## Beyond the diff
|
|
132
153
|
|
|
133
|
-
|
|
134
|
-
|
|
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.
|
|
162
|
+
|
|
163
|
+
Details: [Common workflows](https://github.com/MykytaStel/repopilot/blob/main/docs/commands.md).
|
|
135
164
|
|
|
136
165
|
## Documentation
|
|
137
166
|
|
|
138
167
|
- [Documentation index](https://github.com/MykytaStel/repopilot/blob/main/docs/README.md)
|
|
139
|
-
- [
|
|
168
|
+
- [Guard your agent runs](https://github.com/MykytaStel/repopilot/blob/main/docs/agent-guardrail.md)
|
|
140
169
|
- [CLI reference](https://github.com/MykytaStel/repopilot/blob/main/docs/cli.md)
|
|
141
170
|
- [Configuration](https://github.com/MykytaStel/repopilot/blob/main/docs/configuration.md)
|
|
142
171
|
- [Reports and schemas](https://github.com/MykytaStel/repopilot/blob/main/docs/reports.md)
|
|
143
172
|
- [GitHub pull request integration](https://github.com/MykytaStel/repopilot/blob/main/docs/integrations/github-code-scanning.md)
|
|
144
|
-
- [Signal contract](https://github.com/MykytaStel/repopilot/blob/main/docs/engineering/signal-contract.md)
|
|
145
|
-
- [Release process](https://github.com/MykytaStel/repopilot/blob/main/docs/release.md)
|
|
146
|
-
|
|
147
|
-
## Development
|
|
148
173
|
|
|
149
|
-
|
|
150
|
-
cargo fmt --all -- --check
|
|
151
|
-
cargo clippy --all-targets --all-features -- -D warnings
|
|
152
|
-
cargo test --all
|
|
153
|
-
npm run release:contract
|
|
154
|
-
./scripts/smoke-product.sh
|
|
155
|
-
```
|
|
174
|
+
Contributing and development commands: [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
156
175
|
|
|
157
176
|
## License
|
|
158
177
|
|
|
159
|
-
|
|
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",
|