@codacy/verity-cli 0.31.1-experimental.02b82ff โ†’ 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,83 @@
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
+
6
83
  ## [0.31.1] โ€” 2026-08-27
7
84
 
8
85
  **Verity stops repeating itself.** A finding it had already closed could keep
@@ -30,9 +107,10 @@ npm install -g @codacy/verity-cli
30
107
 
31
108
  ### ๐Ÿ’ฌ The carried-findings notice tells the truth, and offers a way out
32
109
 
33
- - It **no longer calls those findings "blocking."** They are the ones that did
34
- *not* gate your run โ€” a passing run was printing "1 blocking finding(s)" every
35
- turn, an alarm the gate itself had already decided not to act on.
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.)
36
114
  - It now **names the way to resolve them**, instead of repeating a problem with
37
115
  no stated exit.
38
116
 
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) |