@codacy/verity-cli 0.35.0-experimental.9fc6b77 → 0.35.0

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.
@@ -36,10 +36,12 @@ Use this one report:
36
36
  - **`blocked` is true** → show the `prerequisites[].remedy` lines and stop.
37
37
  - **`hooks.versions.skew` is set** → tell the user first, in one line, with
38
38
  `hooks.versions.skew.remedy`.
39
- - **`artifacts.standard` is true** → this project already has a Standard here.
40
- Do not ask question 2. Init keeps the Standard and sends no profile.
39
+ - **`artifacts.standard` or `artifacts.legacyStandard` is true** → this project
40
+ already has a Standard here. `legacyStandard` is an old GATE.md Standard at
41
+ `.gate/standard.yaml`: init moves it to `.verity/` first, then keeps it. Do not
42
+ ask question 2. Init keeps the Standard and sends no profile.
41
43
 
42
- When `artifacts.standard` is false, also run:
44
+ When both are false, also run:
43
45
 
44
46
  ```bash
45
47
  verity standard history
@@ -50,8 +52,26 @@ verity standard history
50
52
  - **It prints "No Standard versions found."** → question 2 is **2b**.
51
53
  - **It fails** (for example, not signed in) → question 2 is **2b** for now.
52
54
  Step 2 checks again after sign-in.
55
+
56
+ Then check whether the service writes project rules for this project:
57
+
58
+ ```bash
59
+ verity standard generate --status
60
+ ```
61
+
62
+ It prints one word, and sends nothing:
63
+
64
+ - **`on`** or **`unknown`** → ask 2b, and offer "Create a new one from a repo
65
+ profile" in 2a.
66
+ - **`off`** or **`unsupported`** → the service would not use a profile. Do not
67
+ ask 2b, and do not offer "Create a new one from a repo profile" in 2a.
68
+ Pass `--profile skip`.
69
+ - **It fails** (not signed in) → decide as for `unknown`. Step 2 runs it again
70
+ after sign-in.
53
71
  - **`memory.trackedFiles > 0` and `memory.optedOut` is false** → question 3 applies.
54
72
  - **`trackedState.files > 0`** → question 4 applies.
73
+ - **`telemetry.enabled` is false and `answers.telemetry` is not `declined`** →
74
+ question 5 applies. An earlier "no" is an answer: do not ask again.
55
75
 
56
76
  ## Step 1: Ask, once, in one prompt
57
77
 
@@ -80,7 +100,8 @@ contents of their repositories.
80
100
  | `Create a new one with the built-in rules` | The new Standard becomes the next version for the whole team. It has the built-in rules only. Nothing is sent. |
81
101
 
82
102
  **2b — "Let Verity write review rules for this repository?"** (only when
83
- `artifacts.standard` is false and 2a does not apply)
103
+ `artifacts.standard` and `artifacts.legacyStandard` are both false, 2a does not
104
+ apply, and the status is `on` or `unknown`)
84
105
 
85
106
  | Option | Description |
86
107
  |---|---|
@@ -106,6 +127,17 @@ say how many files)
106
127
  | `Yes, untrack it (recommended)` | These files are machine-local and can include copies of flagged secrets. The files stay on disk, and the removal is staged. |
107
128
  | `No, not now` | Nothing changes. |
108
129
 
130
+ **5 — "Send Claude Code cost and usage from this machine to Verity?"** (only
131
+ when it applies)
132
+
133
+ | Option | Description |
134
+ |---|---|
135
+ | `Yes (recommended)` | Token counts, cost, models, tool names and the repository name, from every Claude Code session on this machine. No prompts, no code, no file contents. It needs sign-in. See it on the /usage page. Turn it off any time: `verity telemetry uninstall`. |
136
+ | `No` | Nothing changes, and init does not ask again. Turn it on later: `verity telemetry install`. |
137
+
138
+ Say that the scope is the whole machine: Claude Code takes these settings only
139
+ from user settings, never from one project.
140
+
109
141
  Do not ask when Verity reviews. All three moments are on by default: each turn,
110
142
  each commit and each push. Step 4 tells the user how to change them.
111
143
 
@@ -135,9 +167,12 @@ It prints one JSON object on stdout:
135
167
  in a terminal later. Go to Step 3.
136
168
 
137
169
  **After a new sign-in, check the Standard again.** If Step 0 could not run
138
- `verity standard history` (it failed) and `artifacts.standard` is false, run it
170
+ `verity standard history` (it failed) and `artifacts.standard` and
171
+ `artifacts.legacyStandard` are both false, run it
139
172
  now. If it lists versions, ask question 2a now, in its own prompt. Its answer
140
- replaces the answer to 2b.
173
+ replaces the answer to 2b. Also run `verity standard generate --status` again.
174
+ If it prints `off` or `unsupported`, the answer to 2b has no effect: pass
175
+ `--profile skip`.
141
176
 
142
177
  When the user says it is approved, or asks you to check:
143
178
 
@@ -166,7 +201,7 @@ can sign the machine in to a different server, and the plugin follows that sign-
166
201
  One command. It asks nothing:
167
202
 
168
203
  ```bash
169
- verity init --yes [--standard <use|new>] --profile <send|skip> [--untrack-memory] [--untrack-state]
204
+ verity init --yes [--standard <use|new>] --profile <send|skip> [--telemetry <on|off>] [--untrack-memory] [--untrack-state]
170
205
  ```
171
206
 
172
207
  - Question 2a: `Use it` → `--standard use`. `Create a new one from a repo
@@ -176,8 +211,10 @@ verity init --yes [--standard <use|new>] --profile <send|skip> [--untrack-memory
176
211
  Otherwise `--profile skip`.
177
212
  - When question 2 was not asked, leave `--standard` and `--profile` off.
178
213
  - `--untrack-memory` and `--untrack-state` only on a yes.
179
- - Do not pass `--moments` or `--telemetry`. Without them, init keeps the moments
180
- the project has, or turns on all three for a new project.
214
+ - Question 5: `--telemetry on` on a yes, `--telemetry off` on a no. When it was
215
+ not asked, leave `--telemetry` off.
216
+ - Do not pass `--moments`. Without it, init keeps the moments the project has,
217
+ or turns on all three for a new project.
181
218
  - If init exits non-zero, show its error and stop.
182
219
 
183
220
  Init is idempotent. It removes the project's own `.claude/skills/verity-*` copies
@@ -187,6 +224,8 @@ stops Verity asking at every session start.
187
224
 
188
225
  With `--profile send`, init prints the rules that Verity wrote. Each rule has an
189
226
  id, one sentence, where it applies and why. Show them to the user as printed.
227
+ When init prints the "too little history" line, tell the user that the built-in
228
+ rules apply.
190
229
 
191
230
  ## Step 4: Report what happened
192
231
 
@@ -206,6 +245,15 @@ Summarise from this report and from init's output, not from memory:
206
245
  commit;
207
246
  - anything untracked, and that the staged removal is the user's to commit;
208
247
  - sign-in state;
248
+ - formal verification, when init printed "Formal verification at push: on". Say
249
+ it as a fact, in init's words: at a push, Verity checks a small model of the
250
+ riskiest changed function and replays any counterexample on the real code;
251
+ that function's source is sent to Verity; only a reproduced bug blocks; turn
252
+ it off with `verity config formal off`. It is a default, like the moments. Do
253
+ not suggest turning it off, and do not connect it to the user's answers to
254
+ other questions;
255
+ - when init printed that the kept Standard has no project rules yet, that line
256
+ and its command (`verity standard generate`);
209
257
  - each line of `next`, if any.
210
258
 
211
259
  ---
@@ -218,3 +266,5 @@ Summarise from this report and from init's output, not from memory:
218
266
  - **Do not answer a question for the user**, and do not leave a flag off because
219
267
  it seems obvious. An omitted answer is an unattended one.
220
268
  - **Do not run plain `verity login`.** See Step 2.
269
+ - **Do not advise turning off a default** (the moments, formal verification)
270
+ unless the user asks. Say what it does and how to change it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/verity-cli",
3
- "version": "0.35.0-experimental.9fc6b77",
3
+ "version": "0.35.0",
4
4
  "description": "CLI for Verity quality gate service",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://verity.md",
@@ -37,20 +37,13 @@
37
37
  "tree-sitter-javascript": "0.25.0",
38
38
  "tree-sitter-python": "0.25.0",
39
39
  "tree-sitter-typescript": "0.23.2",
40
- "tsx": "^4.21.0",
40
+ "tsx": "^4.23.15",
41
41
  "typescript": "^5.4",
42
42
  "web-tree-sitter": "0.27.0"
43
43
  },
44
44
  "dependencies": {
45
+ "@codacy/analysis-cli": "0.25.0",
45
46
  "commander": "^12",
46
47
  "yaml": "^2"
47
- },
48
- "peerDependencies": {
49
- "@codacy/analysis-cli": ">=1.0.0"
50
- },
51
- "peerDependenciesMeta": {
52
- "@codacy/analysis-cli": {
53
- "optional": true
54
- }
55
48
  }
56
49
  }