@codacy/verity-cli 0.31.1-experimental.80cf3ac โ†’ 0.31.1-experimental.b9b3862

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,127 @@
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
+ ### ๐Ÿค Joining a project that already has a Standard
9
+
10
+ - **`verity init` now offers the Standard the service already holds** for this
11
+ repository, instead of asking a model to invent a second one. Everyone after the
12
+ first person on a project โ€” a teammate cloning the repo, the same person on
13
+ another machine, a CI box โ€” gets the team's actual configuration
14
+ (`standard.yaml`, the analysis config, `.verityignore`, `VERITY.md`) written
15
+ straight to disk, and the model phase is skipped entirely.
16
+ - **This is a correctness fix as much as a speed one.** `verity standard push`
17
+ auto-versions, so a re-synthesis does not produce a private copy โ€” it produces
18
+ v4, and v4 is what the team is held to from then on.
19
+ - **Nothing about it can block a setup.** No token, offline, a 404, a service that
20
+ errors: every one of those falls through to the regular flow. An unreliable
21
+ answer is never reported as "no Standard stored" โ€” that would offer a fresh
22
+ synthesis over one the team already agreed.
23
+ - Unattended runs (`--yes`, CI) adopt without asking, for the same reason: a CI
24
+ box quietly authoring a new version of the team's Standard is not an outcome
25
+ anyone would choose on purpose.
26
+ - **`--no-adopt` opts out**, for a script that wants a fresh synthesis on purpose.
27
+ It skips the request as well as the write: asking a question whose answer is
28
+ discarded is a network call the user declined, and in a locked-down CI it is one
29
+ that can fail loudly for no reason.
30
+ - **Declining is remembered per VERSION, never as a mute.** Say no and init stops
31
+ asking about *that* Standard โ€” and offers the next one, because a new version is
32
+ new information. A boolean "never again" would have been the familiar
33
+ silent-forever failure: decline on Monday meaning to synthesize later, forget,
34
+ and every later run stays quiet while the project has no local config at all.
35
+
36
+ ### ๐Ÿ”ง Fixed
37
+
38
+ - **An upgrade no longer removes the gates you chose.** `.verity/setup.json` only
39
+ exists from this release, so every project configured before it had no recorded
40
+ answer โ€” including everyone who picked commit/push gates through the old
41
+ `/verity-setup`. The first upgraded `verity init` fell back to the shipped
42
+ default and reconciled those gates away, turning Stop back on. What you chose is
43
+ still legible in `.claude/settings.json`, so init reads it.
44
+ - `verity doctor` names the artifact that is actually missing instead of telling
45
+ you to run a phase that will decline: with a Standard adopted and no analysis
46
+ config, `/verity-setup` would have answered "already configured".
47
+ - The setup skill learned the same case โ€” Standard present, analysis config
48
+ missing โ€” and writes only the config rather than re-synthesizing the Standard.
49
+
50
+ ## [Unreleased]
51
+
52
+ **Setup is one command.** `verity init` and `/verity-setup` were two half-flows
53
+ that overlapped โ€” and the overlap was not harmless: init wired the Stop hook,
54
+ then the skill reconciled the hooks to a selection it asked for afterwards,
55
+ silently removing what init had just reported installing. They are now one flow
56
+ with one entry point.
57
+
58
+ ### ๐ŸŽฏ `verity init` is the whole setup
59
+
60
+ - **It asks the questions whose answers it acts on** โ€” analysis intensity, when
61
+ to review (on stop / before commit / before push), and cost & usage telemetry.
62
+ On the terminal, before anything is wired to them.
63
+ - **Then it hands off to Claude Code** to finish the half that needs a model:
64
+ reading the codebase and synthesizing the Standard (`/verity-setup`). If Claude
65
+ Code isn't installed, or you are already inside a session, it prints the one
66
+ command instead. `verity setup` is an alias for the same command.
67
+ - **`--yes` takes every recommended answer and asks nothing** (CI, scripts,
68
+ agents) โ€” including the GitHub login, whose unattended answer is skip, so the
69
+ project stays local-only until you run `verity login`. `--no-setup` stops after
70
+ the deterministic phase. A re-run keeps the answers you gave interactively
71
+ instead of resetting them to the defaults.
72
+ - **The hooks are written ONCE, to your selection.** Init reconciles instead of
73
+ installing-then-being-reconciled, so a project that chose commit+push no longer
74
+ gets a Stop hook installed and then removed. The always-on infra hooks (intent,
75
+ baseline, post-compact, session-end) are wired by that same path โ€” previously
76
+ only the legacy installer added the last two, and `verity uninstall` left them
77
+ behind.
78
+
79
+ ### ๐Ÿฉบ `verity doctor`
80
+
81
+ - **New command: what is set up here, and what is missing.** Prerequisites, which
82
+ phase has run, your recorded answers, the hook wiring, telemetry, and the
83
+ artifacts โ€” plus a `next` list. `--json` is what `/verity-setup` reads, so the
84
+ skill no longer re-implements init's prerequisite checks (its own version told
85
+ you to install the analysis CLI by hand, which init had already installed for
86
+ you).
87
+
88
+ ### โœจ It looks like something now
89
+
90
+ - **A wordmark on `verity init`**, and the flow is drawn as what it is: `Phase 1 of
91
+ 2 ยท this machine`, then `Phase 2 of 2 ยท your Standard`. Steps are numbered
92
+ `[n/8]`, so a run that stops tells you where.
93
+ - **Spinners on the two waits that are actually long** โ€” the global install of
94
+ `@codacy/analysis-cli`, and the GitHub device flow, where the elapsed clock is
95
+ the difference between "waiting for you to approve" and a terminal that looks
96
+ hung. Nowhere else: seven of init's eight steps take milliseconds, and a spinner
97
+ on an instant step claims work that isn't happening. No progress bars either โ€”
98
+ no step has a real percentage, so a bar would be an animation of a guess.
99
+ - **The handoff to `/verity-setup` is framed and then verified.** Before: what
100
+ phase 2 does and roughly how long. After: what it actually produced, read from
101
+ disk (`standard.yaml`, the analysis config, `VERITY.md`), with elapsed time โ€” so
102
+ quitting that session early no longer leaves you with no statement of what got
103
+ done. (No spinner over it: the Claude Code session owns the terminal and draws
104
+ its own status, so ours would be painting blind.)
105
+ - **Colour is finally gated.** Every `[verity]` prefix used to carry raw ANSI into
106
+ CI logs, pipes, and agent transcripts. Colour and art now require a terminal on
107
+ stderr and honour `NO_COLOR` / `TERM=dumb`, with `FORCE_COLOR=1` to override.
108
+
109
+ ### ๐Ÿงน One writer per file
110
+
111
+ - **`.gitignore`** โ€” one whitelist block from one writer. Init used to write a
112
+ single `.verity/.snapshot/` line while the skill wrote a block that supersedes
113
+ it; an install with only the narrow line now upgrades, so `.verity/setup.json`,
114
+ `.baseline`, `.cache/` and whatever state file ships next are covered by
115
+ construction rather than by enumeration.
116
+ - **A `.verity/` entry is repaired to `.verity/*`.** With the directory form git
117
+ cannot re-include the committed standard, and the symptom is not an error: a
118
+ project that looks configured while `.verity/standard.yaml` is silently ignored.
119
+ Committed machine state is also detected and offered for untracking.
120
+ - **`CLAUDE.md`** โ€” the post-task reflection instructions moved into the managed
121
+ block. The skill used to append them beside it, along with a second copy of the
122
+ memory pointer.
123
+ - **A closed stdin no longer aborts an install.** A question that loses its
124
+ terminal (Ctrl+D, a pty that ends) falls back to the default instead of
125
+ crashing init between copying the skills and wiring the hooks.
126
+
6
127
  ## [0.31.1] โ€” 2026-08-27
7
128
 
8
129
  **Verity stops repeating itself.** A finding it had already closed could keep
package/README.md CHANGED
@@ -10,7 +10,52 @@ 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 either **adopts the Standard your team already has**, or
16
+ launches Claude Code to synthesize one from your codebase (`/verity-setup`).
17
+
18
+ ### Joining a project that already uses Verity
19
+
20
+ A Standard belongs to the project, not to your machine. So once you are signed in,
21
+ init asks the service whether this repository already has one:
22
+
23
+ ```
24
+ This repository already has a Standard on Verity: version 3, pushed by claude-code
25
+ on 2026-08-12 ยท with analysis config and .verityignore
26
+ Use the existing Standard? [Y/n]
27
+ ```
28
+
29
+ Say yes and it writes `.verity/standard.yaml`, `.codacy/codacy.config.json`,
30
+ `.verityignore` and `VERITY.md` straight from the service โ€” no model phase, and no
31
+ second version of your team's Standard (`verity standard push` auto-versions, so a
32
+ fresh synthesis would become the version everyone is held to). Say no and it stops asking about
33
+ that version โ€” and offers the next one, since a new version is new information.
34
+ With no Standard stored yet, the regular flow runs.
35
+ `--no-adopt` opts out of the whole check, including the request. Offline, signed out, or a service
36
+ that cannot answer: also the regular flow โ€” setup has never needed the network and
37
+ still doesn't.
38
+
39
+ If Claude Code isn't on your PATH, or you're already inside a session, init prints
40
+ the one command to run instead. `verity setup` is an alias for the same command.
41
+
42
+ | Flag | Use |
43
+ |------|-----|
44
+ | `--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`. |
45
+ | `--no-setup` | Stop after the deterministic phase; don't launch Claude Code |
46
+ | `--no-adopt` | Don't offer the Standard the service already holds for this repo โ€” synthesize a fresh one. Skips the request entirely |
47
+ | `--force` | Overwrite the installed skills even when they differ |
48
+
49
+ Run `verity doctor` any time to see prerequisites, which phase is done, the hook
50
+ wiring, and what is still missing.
51
+
52
+ ### Output
53
+
54
+ Human output goes to **stderr**; stdout carries only data (`--json`). Colour, the
55
+ wordmark, and the spinners appear only when stderr is a terminal, and honour
56
+ `NO_COLOR` and `TERM=dumb`; `FORCE_COLOR=1` forces them on for a pipe that renders
57
+ ANSI. In CI, in a pipe, or when init runs inside a Claude Code session you get the
58
+ same information as plain lines โ€” no art, no animation, no escape sequences.
14
59
 
15
60
  ### Permission denied?
16
61
 
@@ -49,7 +94,8 @@ No re-setup needed: your token, Standard, and run history all carry over.
49
94
  | Command | Description |
50
95
  |---------|-------------|
51
96
  | **Core** | |
52
- | `verity init` | Initialize Verity in current project |
97
+ | `verity init` | Set up Verity in this project โ€” asks the setup questions, then hands off to `/verity-setup` (alias: `verity setup`) |
98
+ | `verity doctor` | Prerequisites, setup phase, hook wiring, and what is still missing (`--json` for the machine-readable report) |
53
99
  | `verity analyze` | Run analysis on changed files (stop hook) |
54
100
  | `verity analyze --mode <mode>` | Force analysis mode (standard/plan/debug/skip) |
55
101
  | `verity review --files <paths>` | On-demand analysis (advisory) |
@@ -69,6 +115,7 @@ No re-setup needed: your token, Standard, and run history all carry over.
69
115
  | `verity logout --others` | Sign out every OTHER machine (e.g. a lost laptop) |
70
116
  | `verity logout --all` | Sign out everywhere, including here |
71
117
  | `verity hooks install` | Wire Claude Code hooks |
118
+ | `verity hooks install --moments stop,pre-commit,pre-push` | Change WHEN Verity reviews (what `verity init` asks for) |
72
119
  | `verity standard push` | Upload project Standard |
73
120
  | **Knowledge** | |
74
121
  | `verity reflect` | Trigger knowledge extraction for current task |
@@ -85,7 +132,7 @@ No re-setup needed: your token, Standard, and run history all carry over.
85
132
 
86
133
  | Skill | Description |
87
134
  |-------|-------------|
88
- | `/verity-setup` | Project configuration wizard |
135
+ | `/verity-setup` | Synthesizes the Standard + analysis config (the half of setup that needs a model; `verity init` launches it) |
89
136
  | `/verity-analyze` | On-demand analysis |
90
137
  | `/verity-status` | Project health dashboard |
91
138
  | `/verity-feedback` | Feedback (general + per-finding) |