@codacy/verity-cli 0.31.0 โ†’ 0.31.1-experimental.68fca47

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/CHANGELOG.md CHANGED
@@ -3,6 +3,250 @@
3
3
  All notable changes to Verity are documented here. This project follows
4
4
  [Semantic Versioning](https://semver.org/).
5
5
 
6
+ ## [Unreleased]
7
+
8
+ **Setup is one command.** `verity init` and `/verity-setup` were two half-flows
9
+ that overlapped โ€” and the overlap was not harmless: init wired the Stop hook,
10
+ then the skill reconciled the hooks to a selection it asked for afterwards,
11
+ silently removing what init had just reported installing. They are now one flow
12
+ with one entry point.
13
+
14
+ ### ๐ŸŽฏ `verity init` is the whole setup
15
+
16
+ - **It asks the questions whose answers it acts on** โ€” analysis intensity, when
17
+ to review (on stop / before commit / before push), and cost & usage telemetry.
18
+ On the terminal, before anything is wired to them.
19
+ - **Then it hands off to Claude Code** to finish the half that needs a model:
20
+ reading the codebase and synthesizing the Standard (`/verity-setup`). If Claude
21
+ Code isn't installed, or you are already inside a session, it prints the one
22
+ command instead. `verity setup` is an alias for the same command.
23
+ - **`--yes` takes every recommended answer and asks nothing** (CI, scripts,
24
+ agents) โ€” including the GitHub login, whose unattended answer is skip, so the
25
+ project stays local-only until you run `verity login`. `--no-setup` stops after
26
+ the deterministic phase. A re-run keeps the answers you gave interactively
27
+ instead of resetting them to the defaults.
28
+ - **The hooks are written ONCE, to your selection.** Init reconciles instead of
29
+ installing-then-being-reconciled, so a project that chose commit+push no longer
30
+ gets a Stop hook installed and then removed. The always-on infra hooks (intent,
31
+ baseline, post-compact, session-end) are wired by that same path โ€” previously
32
+ only the legacy installer added the last two, and `verity uninstall` left them
33
+ behind.
34
+
35
+ ### ๐Ÿฉบ `verity doctor`
36
+
37
+ - **New command: what is set up here, and what is missing.** Prerequisites, which
38
+ phase has run, your recorded answers, the hook wiring, telemetry, and the
39
+ artifacts โ€” plus a `next` list. `--json` is what `/verity-setup` reads, so the
40
+ skill no longer re-implements init's prerequisite checks (its own version told
41
+ you to install the analysis CLI by hand, which init had already installed for
42
+ you).
43
+
44
+ ### โœจ It looks like something now
45
+
46
+ - **A wordmark on `verity init`**, and the flow is drawn as what it is: `Phase 1 of
47
+ 2 ยท this machine`, then `Phase 2 of 2 ยท your Standard`. Steps are numbered
48
+ `[n/8]`, so a run that stops tells you where.
49
+ - **Spinners on the two waits that are actually long** โ€” the global install of
50
+ `@codacy/analysis-cli`, and the GitHub device flow, where the elapsed clock is
51
+ the difference between "waiting for you to approve" and a terminal that looks
52
+ hung. Nowhere else: seven of init's eight steps take milliseconds, and a spinner
53
+ on an instant step claims work that isn't happening. No progress bars either โ€”
54
+ no step has a real percentage, so a bar would be an animation of a guess.
55
+ - **The handoff to `/verity-setup` is framed and then verified.** Before: what
56
+ phase 2 does and roughly how long. After: what it actually produced, read from
57
+ disk (`standard.yaml`, the analysis config, `VERITY.md`), with elapsed time โ€” so
58
+ quitting that session early no longer leaves you with no statement of what got
59
+ done. (No spinner over it: the Claude Code session owns the terminal and draws
60
+ its own status, so ours would be painting blind.)
61
+ - **Colour is finally gated.** Every `[verity]` prefix used to carry raw ANSI into
62
+ CI logs, pipes, and agent transcripts. Colour and art now require a terminal on
63
+ stderr and honour `NO_COLOR` / `TERM=dumb`, with `FORCE_COLOR=1` to override.
64
+
65
+ ### ๐Ÿงน One writer per file
66
+
67
+ - **`.gitignore`** โ€” one whitelist block from one writer. Init used to write a
68
+ single `.verity/.snapshot/` line while the skill wrote a block that supersedes
69
+ it; an install with only the narrow line now upgrades, so `.verity/setup.json`,
70
+ `.baseline`, `.cache/` and whatever state file ships next are covered by
71
+ construction rather than by enumeration.
72
+ - **A `.verity/` entry is repaired to `.verity/*`.** With the directory form git
73
+ cannot re-include the committed standard, and the symptom is not an error: a
74
+ project that looks configured while `.verity/standard.yaml` is silently ignored.
75
+ Committed machine state is also detected and offered for untracking.
76
+ - **`CLAUDE.md`** โ€” the post-task reflection instructions moved into the managed
77
+ block. The skill used to append them beside it, along with a second copy of the
78
+ memory pointer.
79
+ - **A closed stdin no longer aborts an install.** A question that loses its
80
+ terminal (Ctrl+D, a pty that ends) falls back to the default instead of
81
+ crashing init between copying the skills and wiring the hooks.
82
+
83
+ ## [0.31.1] โ€” 2026-08-27
84
+
85
+ **Verity stops repeating itself.** A finding it had already closed could keep
86
+ appearing on every run, for the life of the project, with no way to end it โ€” and
87
+ the one command you'd run to understand why would crash halfway through. Both
88
+ are fixed.
89
+
90
+ ```bash
91
+ npm install -g @codacy/verity-cli
92
+ ```
93
+
94
+ ### ๐Ÿ” A finding Verity has answered stops coming back
95
+
96
+ - **When a finding is settled โ€” you rebutted it, you waived it, it was
97
+ dispositioned โ€” Verity now knows.** It used to keep its own local copy of what
98
+ it had said and never update it, so a finding that was formally closed on the
99
+ service still reappeared on every run. One reported case repeated six times
100
+ across two branches, including runs that never even looked at the file.
101
+ - **`verity waive` stopped looking broken.** A waive worked, but this same stale
102
+ copy meant the finding kept printing anyway โ€” so the disposition looked like it
103
+ had been ignored.
104
+ - **Saying it again re-opens it.** If Verity raises a settled finding a second
105
+ time, it counts as open again. Answering a finding is not a mute switch, and
106
+ a real recurrence always wins.
107
+
108
+ ### ๐Ÿ’ฌ The carried-findings notice tells the truth, and offers a way out
109
+
110
+ - It **no longer calls those findings "blocking."** They did not *fail* your
111
+ run โ€” a run that was otherwise passing printed "1 blocking finding(s)" every
112
+ turn, which reads as a failure that never happened. (It does still turn a PASS
113
+ into a WARN, and the notice now says only what is true.)
114
+ - It now **names the way to resolve them**, instead of repeating a problem with
115
+ no stated exit.
116
+
117
+ ### ๐Ÿ› Fixes
118
+
119
+ - **`verity status` no longer crashes partway through.** A pending item with no
120
+ priority threw an error mid-report, so everything below it โ€” your active
121
+ tasks, your run history โ€” silently never printed. It was also the one screen
122
+ that would have explained the repeating finding above.
123
+
124
+ ## [0.31.0] โ€” 2026-08-25
125
+
126
+ **The gate reviews exactly the change you're shipping โ€” and people get the last
127
+ word.** The theme of 0.31 is evidence and disposition. Every claim the gate
128
+ makes is now bound to bytes it actually reviewed: a finding about a file that
129
+ isn't in your change can no longer block it, leftovers from a previous run can
130
+ no longer resurface as fresh criticals, and an old plan file that happens to be
131
+ committed can no longer hijack what a push is judged against. Commits and
132
+ pushes become a first-class review moment โ€” the whole change ships for review,
133
+ to a stronger model, on its own budget. And two new verbs, `verity waive` and
134
+ `verity ignore`, let humans and agents put a disposition on the record that the
135
+ gate *verifies* rather than obeys: every one is reasoned, audited, and voids
136
+ itself the moment the evidence changes.
137
+
138
+ ```bash
139
+ npm install -g @codacy/verity-cli
140
+ verity init # optional โ€” refreshes the installed skill docs
141
+ ```
142
+
143
+ ### ๐Ÿงพ No finding without the bytes
144
+
145
+ - **A finding about a file that wasn't in the change can no longer block.**
146
+ Findings citing files whose bytes were not under review are downgraded to
147
+ pre-existing โ€” downgraded, never dropped, and counted in the run's metadata.
148
+ This closes a real class of false blocks reproduced from production: stale
149
+ pending items from a previous run re-raised as blocking criticals against a
150
+ clean push โ€” one of them literally labelled *"Not blocking"*.
151
+ - **It reaches every installed CLI on deploy day** โ€” the rule is enforced
152
+ server-side, with a client-side belt on top: the guard refuses to block on a
153
+ finding citing a file it never sent.
154
+ - **What the gate said before is context, never a fresh finding.** Pending
155
+ items inform the review; they are no longer restatable as new findings.
156
+
157
+ ### ๐Ÿšข A commit or push is a first-class review moment
158
+
159
+ - **The whole change ships for review.** Budgets at `pre-commit`/`pre-push`
160
+ are raised to **120 files / ~570 KB** (the interactive Stop turn is
161
+ unchanged at 40). A 45-file commit used to arrive as 40 files with 5
162
+ silently dropped โ€” the gate was reviewing a different change than the one
163
+ landing.
164
+ - **A stronger reviewer, when it matters most.** Git moments run on
165
+ **gpt-5.6-sol** at medium reasoning with a 3-minute budget; interactive
166
+ turns stay on the fast model. Overridable per project
167
+ (`process_constraints.git_moment_model` / `git_moment_reasoning_effort`).
168
+ Measured live: a 45-file, 318 KB push reviewed in ~52s.
169
+ - **Intent is what the change contains.** Only documents that are *part of the
170
+ push* ride along as plans. A six-month-old committed plan can no longer gate
171
+ an unrelated push โ€” and "the plan isn't fully implemented" is never a
172
+ finding; it informs intent alignment only.
173
+ - The coverage line now carries the elapsed time โ€” a longer review is fine
174
+ when it says so.
175
+
176
+ ### โœ‹ `verity waive` โ€” accepted risk, on the record
177
+
178
+ - **A human disposition now actually unblocks the gate.** A finding your
179
+ reviewers had explicitly accepted used to re-block every commit and push,
180
+ forever, with no documented way out.
181
+ - `verity waive <pattern-id> --file <path> --reason "โ€ฆ"` โ€” the reason is
182
+ mandatory (name the review, ADR, or ticket it records). The waive is bound
183
+ to the file's exact bytes: the same bytes pass for everyone, in any session
184
+ โ€” **edit the file and the waive voids itself.** An assertion, not a mute
185
+ switch.
186
+ - Every waive lands in the statements ledger, visible in run reports; at most
187
+ 3 statements per call.
188
+ - **A waive ends a security-pushback round.** The gate resists an *agent*
189
+ arguing a security finding away; a human-attributable disposition is exactly
190
+ the adjudication that round exists to wait for.
191
+
192
+ ### ๐Ÿคซ `verity ignore` and `.verityignore`
193
+
194
+ - **Declare a housekeeping window** โ€” `verity ignore --turn --reason "โ€ฆ"` (or
195
+ `--for 30m`) for the agent-run `git pull` or dependency surgery that
196
+ shouldn't cost a review turn. **The declaration is checked, never
197
+ believed**: if a single file is authored during it, the whole window voids,
198
+ the review runs anyway, and the broken declaration is reported. Budgeted at
199
+ 3 per session, spent on declaration โ€” a void never refunds the attempt.
200
+ - **`.verityignore`** โ€” a committed, team-shared exclusion file at the repo
201
+ root, gitignore syntax: "is this file worth reviewing, ever?" Every
202
+ exclusion is named in the run's coverage ledger, never silent.
203
+ - **You can't blind the gate in the same move.** If `.verityignore` is part of
204
+ a turn's change, *no* ignore rules apply to that turn at all โ€” writing
205
+ `src/**` into it and the vulnerability into `src/` in one turn doesn't work.
206
+ Patterns that would exclude the whole repository are refused, and a pattern
207
+ that would have hidden a really-detected secret is warned about.
208
+
209
+ ### Migrating
210
+
211
+ 1. Server-side changes โ€” the byte witness, the git-moment profile, waive
212
+ honouring โ€” reach **every** installed client on deploy day with no action.
213
+ 2. `npm install -g @codacy/verity-cli` for the new commands (`verity waive`,
214
+ `verity ignore`, `verity config service-url`) and the raised git-moment
215
+ budget on the client side.
216
+ 3. Optionally re-run `verity init` once per repo to refresh the installed
217
+ skill docs; the CLAUDE.md guidance block updates automatically.
218
+ 4. To use `.verityignore`: create it at the repo root (gitignore syntax) and
219
+ commit it.
220
+
221
+ [0.31.0]: https://github.com/codacy/verity-core/releases/tag/v0.31.0
222
+
223
+ ## [0.30.1] โ€” 2026-08-24
224
+
225
+ **The guard reviews the tree your command targets.** A focused release for
226
+ everyone working with git worktrees โ€” and the first piece of making routine
227
+ turns free.
228
+
229
+ - **Worktrees are reviewed correctly.** `cd ../wt && git push` used to review
230
+ the *main checkout's* push range; pushing from a worktree that had diverged
231
+ from its upstream reviewed drift that wasn't even on disk. The guard now
232
+ resolves *which repo, which tree, which range* from the command itself (cd
233
+ chains, `git -C`, remotes and refspecs), with ranges anchored at the
234
+ merge-base โ€” worktrees can live anywhere.
235
+ - **Named refusals over guesses.** When the command's target can't be resolved
236
+ (e.g. `--git-dir`, `GIT_WORK_TREE=`, or two pushes at two targets in one
237
+ command), the guard allows *without* review and says so loudly โ€” it never
238
+ issues a verdict about a tree it guessed.
239
+ - **Coverage is printed on every run**: the moment, tree, branch, range, the
240
+ files reviewed, and what was excluded and why.
241
+ - **A user-typed `! command` turn no longer costs a Verity turn.** `! git
242
+ pull` used to run the full pipeline and then narrate, in Verity's voice, a
243
+ turn nobody took. It now exits fast and silent โ€” keyed on evidence, never
244
+ the prompt: any authored file or agent tool call defeats the skip, and
245
+ commands that can write code (`! npm install`, redirects, pipes) are still
246
+ reviewed.
247
+
248
+ [0.30.1]: https://github.com/codacy/verity-core/releases/tag/v0.30.1
249
+
6
250
  ## [0.30.0] โ€” 2026-08-13
7
251
 
8
252
  **Verity feels smarter, and tuned to the session you're in.** The theme of 0.30
package/README.md CHANGED
@@ -10,7 +10,30 @@ cd your-project
10
10
  verity init
11
11
  ```
12
12
 
13
- Then open the project in Claude Code and run `/verity-setup`.
13
+ `verity init` is the whole setup. It asks how deeply to review and when
14
+ (on stop / before commit / before push), wires everything, offers the optional
15
+ GitHub login โ€” then launches Claude Code to finish the half that needs a model:
16
+ reading your codebase and synthesizing the Standard (`/verity-setup`).
17
+
18
+ If Claude Code isn't on your PATH, or you're already inside a session, init prints
19
+ the one command to run instead. `verity setup` is an alias for the same command.
20
+
21
+ | Flag | Use |
22
+ |------|-----|
23
+ | `--yes` | Take the recommended answer for every question โ€” no prompts at all (CI, scripts, agents). Includes the GitHub login, whose unattended answer is **skip**: the project stays local-only until you run `verity login`. |
24
+ | `--no-setup` | Stop after the deterministic phase; don't launch Claude Code |
25
+ | `--force` | Overwrite the installed skills even when they differ |
26
+
27
+ Run `verity doctor` any time to see prerequisites, which phase is done, the hook
28
+ wiring, and what is still missing.
29
+
30
+ ### Output
31
+
32
+ Human output goes to **stderr**; stdout carries only data (`--json`). Colour, the
33
+ wordmark, and the spinners appear only when stderr is a terminal, and honour
34
+ `NO_COLOR` and `TERM=dumb`; `FORCE_COLOR=1` forces them on for a pipe that renders
35
+ ANSI. In CI, in a pipe, or when init runs inside a Claude Code session you get the
36
+ same information as plain lines โ€” no art, no animation, no escape sequences.
14
37
 
15
38
  ### Permission denied?
16
39
 
@@ -49,7 +72,8 @@ No re-setup needed: your token, Standard, and run history all carry over.
49
72
  | Command | Description |
50
73
  |---------|-------------|
51
74
  | **Core** | |
52
- | `verity init` | Initialize Verity in current project |
75
+ | `verity init` | Set up Verity in this project โ€” asks the setup questions, then hands off to `/verity-setup` (alias: `verity setup`) |
76
+ | `verity doctor` | Prerequisites, setup phase, hook wiring, and what is still missing (`--json` for the machine-readable report) |
53
77
  | `verity analyze` | Run analysis on changed files (stop hook) |
54
78
  | `verity analyze --mode <mode>` | Force analysis mode (standard/plan/debug/skip) |
55
79
  | `verity review --files <paths>` | On-demand analysis (advisory) |
@@ -69,6 +93,7 @@ No re-setup needed: your token, Standard, and run history all carry over.
69
93
  | `verity logout --others` | Sign out every OTHER machine (e.g. a lost laptop) |
70
94
  | `verity logout --all` | Sign out everywhere, including here |
71
95
  | `verity hooks install` | Wire Claude Code hooks |
96
+ | `verity hooks install --moments stop,pre-commit,pre-push` | Change WHEN Verity reviews (what `verity init` asks for) |
72
97
  | `verity standard push` | Upload project Standard |
73
98
  | **Knowledge** | |
74
99
  | `verity reflect` | Trigger knowledge extraction for current task |
@@ -85,7 +110,7 @@ No re-setup needed: your token, Standard, and run history all carry over.
85
110
 
86
111
  | Skill | Description |
87
112
  |-------|-------------|
88
- | `/verity-setup` | Project configuration wizard |
113
+ | `/verity-setup` | Synthesizes the Standard + analysis config (the half of setup that needs a model; `verity init` launches it) |
89
114
  | `/verity-analyze` | On-demand analysis |
90
115
  | `/verity-status` | Project health dashboard |
91
116
  | `/verity-feedback` | Feedback (general + per-finding) |