@codacy/verity-cli 0.31.1 โ†’ 0.31.3

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,130 @@
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
+ **Verity ships as a Claude Code plugin.** `/plugin marketplace add codacy/verity`
9
+ then `/plugin install verity@codacy` gives a working gate with nothing else to
10
+ install โ€” the plugin carries the CLI as a pinned dependency, and Claude Code
11
+ installs and updates it for you.
12
+
13
+ ### ๐Ÿ”Œ The plugin
14
+
15
+ - **Eight skills, namespaced** โ€” `/verity:analyze`, `/verity:status`,
16
+ `/verity:learn`, `/verity:memory`, `/verity:reflect` are available to Claude
17
+ directly; `/verity:setup`, `/verity:insights` and `/verity:feedback` are yours
18
+ to invoke and are not offered to the model at all. The whole plugin adds about
19
+ 500 tokens to a session (`claude plugin details verity`).
20
+ - **All six hooks come from the plugin**, so nothing is written to your
21
+ `.claude/settings.json`.
22
+ - **One gate decision per turn.** A project carrying both the plugin and the
23
+ hooks `verity init` used to write no longer reviews each turn twice: when the
24
+ plugin is present it owns the hooks, and the settings.json copy stands down.
25
+ `verity init` detects the plugin and removes the duplicate wiring.
26
+
27
+ ### โš™๏ธ Git-moment gating moved into the project
28
+
29
+ `verity guard` now reads `.verity/config.json` instead of taking its moments from
30
+ which hook was wired, because a plugin's hooks are the same for everyone. **The
31
+ default gates nothing** โ€” set it with `verity config git-moments commit,push`, or
32
+ answer the question in `verity init`. An explicit `--on` still wins, so existing
33
+ installs are untouched.
34
+
35
+ **Setup is one command.** `verity init` and `/verity-setup` were two half-flows
36
+ that overlapped โ€” and the overlap was not harmless: init wired the Stop hook,
37
+ then the skill reconciled the hooks to a selection it asked for afterwards,
38
+ silently removing what init had just reported installing. They are now one flow
39
+ with one entry point.
40
+
41
+ ### ๐ŸŽฏ `verity init` is the whole setup
42
+
43
+ - **It asks the questions whose answers it acts on** โ€” analysis intensity, when
44
+ to review (on stop / before commit / before push), and cost & usage telemetry.
45
+ On the terminal, before anything is wired to them.
46
+ - **Then it hands off to Claude Code** to finish the half that needs a model:
47
+ reading the codebase and synthesizing the Standard (`/verity-setup`). If Claude
48
+ Code isn't installed, or you are already inside a session, it prints the one
49
+ command instead. `verity setup` is an alias for the same command.
50
+ - **`--yes` takes every recommended answer and asks nothing** (CI, scripts,
51
+ agents) โ€” including the GitHub login, whose unattended answer is skip, so the
52
+ project stays local-only until you run `verity login`. `--no-setup` stops after
53
+ the deterministic phase. A re-run keeps the answers you gave interactively
54
+ instead of resetting them to the defaults.
55
+ - **The hooks are written ONCE, to your selection.** Init reconciles instead of
56
+ installing-then-being-reconciled, so a project that chose commit+push no longer
57
+ gets a Stop hook installed and then removed. The always-on infra hooks (intent,
58
+ baseline, post-compact, session-end) are wired by that same path โ€” previously
59
+ only the legacy installer added the last two, and `verity uninstall` left them
60
+ behind.
61
+
62
+ ### ๐Ÿฉบ `verity doctor`
63
+
64
+ - **New command: what is set up here, and what is missing.** Prerequisites, which
65
+ phase has run, your recorded answers, the hook wiring, telemetry, and the
66
+ artifacts โ€” plus a `next` list. `--json` is what `/verity-setup` reads, so the
67
+ skill no longer re-implements init's prerequisite checks (its own version told
68
+ you to install the analysis CLI by hand, which init had already installed for
69
+ you).
70
+
71
+ ### โœจ It looks like something now
72
+
73
+ - **A wordmark on `verity init`**, and the flow is drawn as what it is: `Phase 1 of
74
+ 2 ยท this machine`, then `Phase 2 of 2 ยท your Standard`. Steps are numbered
75
+ `[n/8]`, so a run that stops tells you where.
76
+ - **Spinners on the two waits that are actually long** โ€” the global install of
77
+ `@codacy/analysis-cli`, and the GitHub device flow, where the elapsed clock is
78
+ the difference between "waiting for you to approve" and a terminal that looks
79
+ hung. Nowhere else: seven of init's eight steps take milliseconds, and a spinner
80
+ on an instant step claims work that isn't happening. No progress bars either โ€”
81
+ no step has a real percentage, so a bar would be an animation of a guess.
82
+ - **The handoff to `/verity-setup` is framed and then verified.** Before: what
83
+ phase 2 does and roughly how long. After: what it actually produced, read from
84
+ disk (`standard.yaml`, the analysis config, `VERITY.md`), with elapsed time โ€” so
85
+ quitting that session early no longer leaves you with no statement of what got
86
+ done. (No spinner over it: the Claude Code session owns the terminal and draws
87
+ its own status, so ours would be painting blind.)
88
+ - **Colour is finally gated.** Every `[verity]` prefix used to carry raw ANSI into
89
+ CI logs, pipes, and agent transcripts. Colour and art now require a terminal on
90
+ stderr and honour `NO_COLOR` / `TERM=dumb`, with `FORCE_COLOR=1` to override.
91
+
92
+ ### ๐Ÿงน One writer per file
93
+
94
+ - **`.gitignore`** โ€” one whitelist block from one writer. Init used to write a
95
+ single `.verity/.snapshot/` line while the skill wrote a block that supersedes
96
+ it; an install with only the narrow line now upgrades, so `.verity/setup.json`,
97
+ `.baseline`, `.cache/` and whatever state file ships next are covered by
98
+ construction rather than by enumeration.
99
+ - **A `.verity/` entry is repaired to `.verity/*`.** With the directory form git
100
+ cannot re-include the committed standard, and the symptom is not an error: a
101
+ project that looks configured while `.verity/standard.yaml` is silently ignored.
102
+ Committed machine state is also detected and offered for untracking.
103
+ - **`CLAUDE.md`** โ€” the post-task reflection instructions moved into the managed
104
+ block. The skill used to append them beside it, along with a second copy of the
105
+ memory pointer.
106
+ - **A closed stdin no longer aborts an install.** A question that loses its
107
+ terminal (Ctrl+D, a pty that ends) falls back to the default instead of
108
+ crashing init between copying the skills and wiring the hooks.
109
+
110
+ ## [0.31.3] โ€” 2026-09-03
111
+
112
+ **After a rebase, Verity reviewed the wrong code.** When a branch was rebased
113
+ onto an updated main, the gate could treat all of the upstream changes as the
114
+ session's own work and block the push on findings in code the session never
115
+ touched. The cause was that the review baseline was trusted by whether its commit
116
+ still existed rather than whether it was still part of the current history, so a
117
+ rewritten baseline kept anchoring every diff.
118
+
119
+ - **The push gate reviews exactly what the push publishes** โ€” the commits the
120
+ remote does not yet have โ€” so a rebase, a force-push, a first push, or
121
+ re-pushing an already-published commit each review only their real new work.
122
+ - **The stop-hook baseline is trusted only while it is an ancestor of HEAD.** A
123
+ rewritten baseline is discarded and re-derived from the commits actually made
124
+ since, so upstream changes are never attributed to the session.
125
+ - **A commit made during a merge reviews only the files you resolved**, not the
126
+ whole incoming branch.
127
+ - **A slash command such as `/login` is no longer treated as a task or a goal**,
128
+ so the review is graded against what you were actually working on.
129
+
6
130
  ## [0.31.1] โ€” 2026-08-27
7
131
 
8
132
  **Verity stops repeating itself.** A finding it had already closed could keep
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) |