@brokkai/slopcop 0.0.10 → 0.0.11

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
@@ -145,9 +145,22 @@ present, and names what it did:
145
145
  A skill that is already there is left alone by init, so running it again is
146
146
  safe. `slopcop login` and every check also install the skill in those
147
147
  directories, rewriting one that differs from the skill bundled into the binary,
148
- so an agent follows the instructions of the slopcop version it runs; local
149
- edits to an installed skill do not survive them. `slopcop init --no-skill`
150
- skips the install and any update of it.
148
+ so an agent follows the instructions of the slopcop version it runs. Each
149
+ install records the version that wrote it, and what each file held, in
150
+ `.slopcop-skill.json` in the skill folder. An update names the version it
151
+ replaces, the new one and the files that changed, for example:
152
+
153
+ ```
154
+ slopcop: updated the slopcop skill at ~/.claude/skills/slopcop from v0.0.9 to v0.0.10 (changed: SKILL.md). Reread it if you loaded the old one.
155
+ ```
156
+
157
+ It removes the files the new skill no longer has. A skill with local edits,
158
+ one that matches neither its record nor any release, is copied first to
159
+ `skill-backups/<harness>-<time>` next to the slopcop configuration, outside
160
+ every skills directory so no harness loads it as a second skill, and the
161
+ notice says where. A check's `json` and `sarif` reports carry the same update
162
+ (see below). `slopcop init --no-skill` skips the install and any update of
163
+ it.
151
164
 
152
165
  Init also adds a `Stop` hook for each harness installed here, and leaves
153
166
  everything else in the file as it was:
@@ -166,13 +179,28 @@ When the agent stops, the hook checks the working tree through the same
166
179
  hosted API, but only when all of these hold:
167
180
 
168
181
  - the session wrote files in the repository with its edit tools (a Codex
169
- session's subagents included);
182
+ session's subagents included), or the working tree has a changed
183
+ dependency manifest or lockfile (see below);
170
184
  - slopcop is signed in, and the workspace a check would use
171
185
  (`$SLOPCOP_WORKSPACE`, or the login's) has the repository active
172
186
  (`slopcop repo list`), so nothing is sent from other repositories;
173
187
  - the tree differs from the last check in the session, including a check the
174
188
  agent ran by hand.
175
189
 
190
+ An agent often adds a dependency through its shell, with `npm install`,
191
+ `pnpm add`, `cargo add` or `uv add`, which no edit tool records. So the hook
192
+ also checks when git shows one of these files changed, added or untracked in
193
+ any directory of the repository: `package.json`, `package-lock.json`,
194
+ `npm-shrinkwrap.json`, `pnpm-lock.yaml`, `yarn.lock`, `Cargo.toml`,
195
+ `Cargo.lock`, `pyproject.toml`, `uv.lock`, `poetry.lock`, `requirements*.txt`,
196
+ `go.mod` and `go.sum`. Files git ignores and those under `node_modules` do
197
+ not count. The hook recognises these files by name only: it never reads
198
+ them, runs a package manager or asks an advisory database; the hosted check
199
+ reads them like any other file in the change. A changed dependency file
200
+ counts as one the session wrote, since the hook cannot tell which command
201
+ changed it, so its new findings are handed to the agent like those in files
202
+ it edited, even if the file was already changed when the session began.
203
+
176
204
  New findings in files the session wrote are handed to the agent to fix, once
177
205
  for a given tree and at most twice in a row; then the agent is let go and you
178
206
  are told what remains. A finding ignored with `slopcop ignore` is not handed
@@ -197,8 +225,10 @@ slopcop login # browser device flow
197
225
  slopcop login --token "$SLOPCOP_TOKEN" # existing credential, for CI and agents
198
226
  ```
199
227
 
200
- The browser flow prints a URL and a code and stores the token once the login is
201
- approved. The service URL defaults to `https://slopcop.com`; `--service`,
228
+ The browser flow prints a link that opens the approval page with the code
229
+ filled in, plus the page and code to type in instead, and stores the token once
230
+ the login is approved. Approve only if the page shows the code your terminal
231
+ printed. The service URL defaults to `https://slopcop.com`; `--service`,
202
232
  `$SLOPCOP_SERVICE`, or a stored value override it.
203
233
 
204
234
  The credential lives in `slopcop/config.json` under the user config directory
@@ -307,7 +337,7 @@ Flags:
307
337
  | `--timeout DURATION` | how long to wait for the result (default `10m`) |
308
338
  | `-w`, `--workspace NAME\|ID` | check in, and bill, this workspace of the account instead of the login's |
309
339
  | `--add-repository` | add the repository to the workspace `--workspace` names, which then pays for it, without asking at a terminal; for after the user approved it |
310
- | `--verbose` | print the resolved request to stderr |
340
+ | `--verbose` | print the resolved request to stderr, and name each inconclusive check in `human` |
311
341
 
312
342
  ### What is sent
313
343
 
@@ -384,8 +414,13 @@ summary line such as `1 new finding across 1 file(s); 72 already in the code |
384
414
  Analysis complete`, and any omitted new findings or
385
415
  incomplete checks. `json` prints `status`, `baseCommit`, `summary`
386
416
  (`newFindings` and `existingFindings` count the split), `findings` (each with
387
- `new` and its `id`), `incomplete`, `failure` when the analysis did not
388
- complete, and `emptyChange` when the patch was empty. `sarif` prints a SARIF 2.1.0 log whose results carry `baselineState`
417
+ `new` and its `id`), `incomplete`, `inconclusive`, `failure` when the analysis did not
418
+ complete, and `emptyChange` when the patch was empty. When the check
419
+ installed or updated the skill, `skillUpdated` lists each skill directory it
420
+ wrote: `dir`, `from` (a release, `unknown`, or absent for a fresh install),
421
+ `to`, `changed` and, for a skill with local edits, `backup`; the failed and
422
+ pending reports carry it too, and `sarif` puts it in
423
+ `properties["slopcop.skillUpdated"]`. `sarif` prints a SARIF 2.1.0 log whose results carry `baselineState`
389
424
  `new` and the finding id in `properties["slopcop.findingId"]`. `--format` only
390
425
  changes the rendering, never the request, so the service answers the same check
391
426
  whichever is used.
@@ -406,10 +441,18 @@ reached the service; after, a service that received it keeps running it, and
406
441
  running the same check again picks up its result.
407
442
 
408
443
  An inconclusive check, one that ran but could not prove there is nothing
409
- more to find, never changes the exit code and is not named in any format.
410
- Complete proof is rare in static analysis, typically at a library boundary,
411
- so this is the norm rather than a gap. `summary.inconclusive` counts them in
412
- `json`, as does `slopcop.inconclusive` in `sarif`. A check that timed out or
444
+ more to find, never changes the exit code or the status. Complete proof is
445
+ rare in static analysis, typically at a library boundary, so this is the norm
446
+ rather than a gap. Each report still says where they are, so a reviewer can
447
+ judge what a `clean` result is worth: `human` prints one `Inconclusive:` line
448
+ with the count and how many concern only files the change does not write, and
449
+ `--verbose` names each check. `json` lists them in `inconclusive`, each with
450
+ `policyId`, `reason` and `elsewhere` (true when it concerns only files the
451
+ change does not write), beside the `summary.inconclusive` count. `sarif` adds
452
+ a `note` notification per check with `slopcop.inconclusive` and
453
+ `slopcop.elsewhere` properties. The service names at most 50; the counts
454
+ cover the rest. It does not yet say which files or lines each one concerns,
455
+ or what evidence was missing. A check that timed out or
413
456
  that Bifrost judged unreliable is incomplete and counts wherever it is.
414
457
 
415
458
  The service applies `--fail-on` and sets the status; the exit code follows it.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brokkai/slopcop",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "Static analysis for coding agents and CI: check a change through the hosted SlopCop API",
5
5
  "keywords": [
6
6
  "agents",