@codacy/verity-cli 0.33.3-experimental.d8b96f8 → 0.33.3-experimental.f081164
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 +25 -0
- package/README.md +3 -0
- package/bin/verity.js +19357 -7895
- package/data/grammars/tree-sitter-go.wasm +0 -0
- package/data/grammars/tree-sitter-java.wasm +0 -0
- package/data/grammars/tree-sitter-javascript.wasm +0 -0
- package/data/grammars/tree-sitter-python.wasm +0 -0
- package/data/grammars/tree-sitter-tsx.wasm +0 -0
- package/data/grammars/tree-sitter-typescript.wasm +0 -0
- package/data/grammars/web-tree-sitter.wasm +0 -0
- package/data/skills/verity-init/SKILL.md +174 -76
- package/data/skills/verity-prove/SKILL.md +135 -0
- package/package.json +9 -2
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,46 +1,62 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: >-
|
|
3
|
-
Set Verity up in this project: ask the
|
|
4
|
-
install, and repair a project the Claude
|
|
5
|
-
|
|
6
|
-
set up.
|
|
3
|
+
Set Verity up in this project: ask the setup questions in the session, run the
|
|
4
|
+
deterministic install with those answers, sign in, and repair a project the Claude
|
|
5
|
+
Code plugin has just been added to. Use right after installing the Verity plugin,
|
|
6
|
+
or when Verity says this project is not set up.
|
|
7
7
|
disable-model-invocation: true
|
|
8
8
|
---
|
|
9
9
|
# /verity-init — set Verity up in this project
|
|
10
10
|
|
|
11
|
-
You are running the setup
|
|
11
|
+
You are running, inside this session, the same setup `verity init` runs at a
|
|
12
|
+
terminal: the same questions, the same install, the same sign-in. The only
|
|
13
|
+
difference is who asks. At a terminal the CLI prompts; here **you** ask, and pass
|
|
14
|
+
the answers down as flags.
|
|
12
15
|
|
|
13
16
|
**Why this skill exists.** Claude Code has no post-install hook and a plugin
|
|
14
17
|
cannot invoke a skill, so installing Verity repairs nothing: it cannot remove a
|
|
15
18
|
project's superseded skills, stand down duplicate hooks, or derive a Standard.
|
|
16
19
|
All of that needs a command someone runs — this one.
|
|
17
20
|
|
|
18
|
-
**`verity init` prompts on a terminal, and you are not one.**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
**`verity init` prompts on a terminal, and you are not one.** Run with `--yes`
|
|
22
|
+
alone it takes the unattended answer to every question: stop-only review (no
|
|
23
|
+
commit or push gate), no telemetry, no sign-in, nothing untracked. Every one of
|
|
24
|
+
those is a decision that belongs to the user, so every one is asked here.
|
|
25
|
+
|
|
26
|
+
Run every `verity` command below the way this session's context says (the
|
|
27
|
+
plugin's own copy), not with plain `verity`, whenever the context names one.
|
|
23
28
|
|
|
24
29
|
---
|
|
25
30
|
|
|
26
|
-
## Step 0:
|
|
31
|
+
## Step 0: Read where the project stands — before asking anything
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
verity doctor --json
|
|
35
|
+
```
|
|
27
36
|
|
|
28
|
-
|
|
29
|
-
the plugin's, **tell the user that first**, in one line, before the questions —
|
|
30
|
-
with the `npm install -g` command the context gives. Finding out after they have
|
|
31
|
-
answered is the failure this step exists to prevent: an older CLI cannot take the
|
|
32
|
-
answers.
|
|
37
|
+
From that one report:
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
- **`blocked` is true** → show the `prerequisites[].remedy` lines and stop.
|
|
40
|
+
Nothing below can work.
|
|
41
|
+
- **`hooks.versions.skew` is set** → tell the user first, in one line, with
|
|
42
|
+
`hooks.versions.skew.remedy`. An older CLI cannot take the answers, so they
|
|
43
|
+
should hear it now, not after answering.
|
|
44
|
+
- **`answers`** holds what a previous run recorded (`intensity`, `moments`,
|
|
45
|
+
`telemetry`). On a re-run those are the defaults — pre-select them. The shipped
|
|
46
|
+
defaults are only for a project with nothing recorded.
|
|
47
|
+
- **`telemetry.enabled`** decides whether the telemetry question is asked at all.
|
|
48
|
+
- **`memory.trackedFiles > 0` and `memory.optedOut` is false** → the graph
|
|
49
|
+
question applies.
|
|
50
|
+
- **`trackedState.files > 0`** → the committed-state question applies.
|
|
36
51
|
|
|
37
|
-
## Step 1: Ask
|
|
52
|
+
## Step 1: Ask — once, in one prompt
|
|
38
53
|
|
|
39
|
-
Use `AskUserQuestion` with
|
|
40
|
-
|
|
41
|
-
|
|
54
|
+
Use `AskUserQuestion` with every question that applies **in a single call**, in
|
|
55
|
+
this order. It takes at most four; if more apply, put the rest in ONE follow-up
|
|
56
|
+
call. Do not ask one at a time, and do not ask in prose unless `AskUserQuestion`
|
|
57
|
+
is unavailable (then ask in prose and **wait** — never choose for the user).
|
|
42
58
|
|
|
43
|
-
**
|
|
59
|
+
**1 — "When should Verity review your code?"** (multi-select, always asked)
|
|
44
60
|
|
|
45
61
|
| Option | Description |
|
|
46
62
|
|---|---|
|
|
@@ -48,12 +64,12 @@ setup gets, so spend it once.
|
|
|
48
64
|
| `Before commit` | Reviews the staged diff and blocks the commit on a failing review. |
|
|
49
65
|
| `Before push / PR` | Reviews the commits about to be pushed and blocks on a failing review. |
|
|
50
66
|
|
|
51
|
-
Pre-select **After every turn
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
67
|
+
Pre-select the recorded moments, or **After every turn** on a first run, and do
|
|
68
|
+
not call it "recommended": under the plugin it runs whatever the answer. Say
|
|
69
|
+
plainly in the question text that choosing only the first means **git commits
|
|
70
|
+
and pushes are not gated**.
|
|
55
71
|
|
|
56
|
-
**
|
|
72
|
+
**2 — "How deeply should Verity review?"** (single-select, always asked)
|
|
57
73
|
|
|
58
74
|
| Option | Description |
|
|
59
75
|
|---|---|
|
|
@@ -61,75 +77,157 @@ first means **git commits and pushes are not gated**.
|
|
|
61
77
|
| `Lightweight` | Critical security only, about 3s. |
|
|
62
78
|
| `Thorough` | All tools, all rules, about 15s. |
|
|
63
79
|
|
|
80
|
+
**3 — "Send cost & usage telemetry to Verity?"** (single-select; **only when
|
|
81
|
+
`telemetry.enabled` is false**)
|
|
82
|
+
|
|
83
|
+
| Option | Description |
|
|
84
|
+
|---|---|
|
|
85
|
+
| `Yes, enable it` | Powers the /usage dashboard. Sends Claude Code's own OpenTelemetry metrics and traces: model names, token counts, cost, session ids. Not your prompts, code, or tool input/output. |
|
|
86
|
+
| `No` | /usage stays empty. Enable later with `verity telemetry install`. |
|
|
87
|
+
|
|
88
|
+
**4 — "Sign in to Verity now?"** (single-select, always asked)
|
|
89
|
+
|
|
90
|
+
| Option | Description |
|
|
91
|
+
|---|---|
|
|
92
|
+
| `Sign in now (recommended)` | One GitHub login covers every repository you can write to, for 90 days. Needed for run history, cloud memory and the dashboard. If you are already signed in this just confirms it. |
|
|
93
|
+
| `Skip for now` | The gate still reviews your code locally; nothing is saved. Sign in later with `/verity-init` or `verity login`. |
|
|
94
|
+
|
|
95
|
+
If asked, explain: the GitHub token is used once to check which repositories they
|
|
96
|
+
can write to, then discarded; signing in does not give Verity access to their
|
|
97
|
+
code, which is analyzed in memory and never stored.
|
|
98
|
+
|
|
99
|
+
**5 — "Stop tracking Verity's knowledge graph in git?"** (only when the graph
|
|
100
|
+
question applies; say how many files)
|
|
101
|
+
|
|
102
|
+
| Option | Description |
|
|
103
|
+
|---|---|
|
|
104
|
+
| `Yes, untrack it (recommended)` | Files stay on disk; their removal from the index is staged for you to commit. Generated notes stop appearing in every diff and PR. |
|
|
105
|
+
| `No, not now` | Nothing changes. `verity memory track` records it as deliberate. |
|
|
106
|
+
|
|
107
|
+
**6 — "Untrack committed Verity state?"** (only when `trackedState.files > 0`;
|
|
108
|
+
say how many files)
|
|
109
|
+
|
|
110
|
+
| Option | Description |
|
|
111
|
+
|---|---|
|
|
112
|
+
| `Yes, untrack it (recommended)` | Machine-local files that should never have been committed — they can include copies of flagged secrets. Files stay on disk; the removal is staged. |
|
|
113
|
+
| `No, not now` | Nothing changes. |
|
|
114
|
+
|
|
64
115
|
## Step 2: Run the install with those answers
|
|
65
116
|
|
|
66
|
-
|
|
67
|
-
defaulted:
|
|
117
|
+
One command, no prompts, nothing silently defaulted:
|
|
68
118
|
|
|
69
119
|
```bash
|
|
70
|
-
verity init --yes --no-setup
|
|
120
|
+
verity init --yes --no-setup \
|
|
121
|
+
--moments <stop[,pre-commit][,pre-push] | none> \
|
|
122
|
+
--intensity <balanced|lightweight|thorough> \
|
|
123
|
+
[--telemetry on|off] [--untrack-memory] [--untrack-state]
|
|
71
124
|
```
|
|
72
125
|
|
|
73
|
-
`--
|
|
74
|
-
|
|
126
|
+
- Pass `--telemetry` only when question 3 was asked. Omitting it leaves the
|
|
127
|
+
recorded choice alone.
|
|
128
|
+
- Pass `--untrack-memory` / `--untrack-state` only on a yes.
|
|
129
|
+
- Pass `stop` only if they ticked it. Under the plugin the Stop review runs either
|
|
130
|
+
way and `verity init` says so.
|
|
131
|
+
- An unrecognised value is refused rather than dropped, so a typo cannot quietly
|
|
132
|
+
remove a gate. If init exits non-zero, show its error and stop.
|
|
133
|
+
|
|
134
|
+
This is idempotent and does the whole install: removes the project's own
|
|
135
|
+
`.claude/skills/verity-*` copies that the plugin supersedes, stands down duplicate
|
|
136
|
+
`.claude/settings.json` hooks, adopts the team's Standard from the service or
|
|
137
|
+
derives one from the codebase, heals a stale analysis config, and records the
|
|
138
|
+
plugin version — which is what stops Verity asking at every session start.
|
|
75
139
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
140
|
+
Init runs before sign-in, so on a first run it says it skipped authentication and
|
|
141
|
+
that telemetry needs a token. That is expected — Step 3 handles both. Do not
|
|
142
|
+
repeat those lines to the user as problems.
|
|
79
143
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
144
|
+
## Step 3: Sign in — here, in two halves
|
|
145
|
+
|
|
146
|
+
Skip this step if they chose **Skip for now**; say the gate runs locally and how
|
|
147
|
+
to sign in later.
|
|
148
|
+
|
|
149
|
+
`verity login` on its own prints a code and then blocks until it is approved, and
|
|
150
|
+
you would only see the code after it ended. So it is split:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
verity login --start
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
It prints one JSON object on stdout:
|
|
157
|
+
|
|
158
|
+
- **`"status": "logged_in"`** → they already are. Say so and go to Step 4.
|
|
159
|
+
- **`"status": "pending"`** → show the user `verification_uri` and `user_code`
|
|
160
|
+
exactly as given, and ask them to approve it in their browser and tell you when
|
|
161
|
+
they have. Wait for their reply. Do not run anything in the meantime.
|
|
162
|
+
- **`"status": "failed"`** → show the error, and tell them to run `verity login`
|
|
163
|
+
in their own terminal later. Go to Step 4.
|
|
164
|
+
|
|
165
|
+
When they say it is approved (or ask you to check):
|
|
86
166
|
|
|
87
|
-
|
|
88
|
-
|
|
167
|
+
```bash
|
|
168
|
+
verity login --finish
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Give the tool call at least a 150-second timeout; it waits up to 100 seconds.
|
|
172
|
+
|
|
173
|
+
- **exit 0, `"status": "logged_in"`** → report the lines it printed about the
|
|
174
|
+
account and whether this repository is covered, word for word where it names a
|
|
175
|
+
link to grant the Verity GitHub App.
|
|
176
|
+
- **exit 2, `"status": "pending"`** → not approved yet. Show the code again, wait
|
|
177
|
+
for them, and run `--finish` again.
|
|
178
|
+
- **exit 1** → `denied`, `expired`, `service_changed`, `no_pending` or `failed`.
|
|
179
|
+
Show the error. For `expired` or `no_pending`, offer to start again with
|
|
180
|
+
`--start`.
|
|
181
|
+
|
|
182
|
+
If they change their mind while a code is pending, run `verity login --cancel`.
|
|
89
183
|
|
|
90
|
-
|
|
184
|
+
⚠ Never run plain `verity login` from here, and never tell a user whose Step 0
|
|
185
|
+
reported a version skew to run it in a terminal until they have fixed the skew —
|
|
186
|
+
the old global CLI can sign the machine in to a different server, and the plugin
|
|
187
|
+
follows that sign-in.
|
|
91
188
|
|
|
92
|
-
|
|
93
|
-
code, waits for the user to approve it in a browser, and blocks until they do.
|
|
94
|
-
Started from a tool call it just hangs, and the user never sees the code.
|
|
189
|
+
## Step 4: Finish telemetry, if it waited on sign-in
|
|
95
190
|
|
|
96
|
-
|
|
191
|
+
If they said yes to telemetry and init reported it needs a token, and Step 3
|
|
192
|
+
signed them in:
|
|
97
193
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
>
|
|
104
|
-
> It prints a code and a link; approve it in your browser. One login covers every
|
|
105
|
-
> repository you can write to, for 90 days. Without it the gate still reviews
|
|
106
|
-
> your code — it just records nothing, so there is no history, no cloud memory
|
|
107
|
-
> and no dashboard.
|
|
194
|
+
```bash
|
|
195
|
+
verity telemetry install
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
It takes effect on their next Claude Code session.
|
|
108
199
|
|
|
109
|
-
|
|
200
|
+
## Step 5: Report what happened
|
|
110
201
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
machine in to a different server, and the plugin follows that sign-in.
|
|
202
|
+
```bash
|
|
203
|
+
verity doctor --json
|
|
204
|
+
```
|
|
115
205
|
|
|
116
|
-
|
|
206
|
+
Summarise from this report, not from memory of what you ran:
|
|
117
207
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
208
|
+
- what init removed (superseded skills, duplicate hooks) — those skill
|
|
209
|
+
directories are usually committed, so the deletions show in `git status` and
|
|
210
|
+
are the user's to commit;
|
|
211
|
+
- whether the Standard was **adopted** from the service or **derived** from the
|
|
212
|
+
codebase (init's output says which);
|
|
213
|
+
- the moments and intensity now in effect, and who wires the hooks
|
|
214
|
+
(`hooks.source`);
|
|
215
|
+
- anything untracked, and that the staged removal is theirs to commit;
|
|
216
|
+
- sign-in and telemetry state;
|
|
217
|
+
- each line of `next`, if any.
|
|
122
218
|
|
|
123
|
-
|
|
124
|
-
|
|
219
|
+
Then offer `/verity-setup` for the part a lookup cannot produce — project-specific
|
|
220
|
+
`custom_patterns` such as *"every route under `api/` uses the auth middleware"* —
|
|
221
|
+
and say it is optional: the gate is already running.
|
|
125
222
|
|
|
126
223
|
---
|
|
127
224
|
|
|
128
225
|
## What NOT to do here
|
|
129
226
|
|
|
130
227
|
- **Do not wire hooks or edit `.gitignore` yourself.** `verity init` owns that.
|
|
131
|
-
Doing it here is how the two flows drifted apart before
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
228
|
+
Doing it here is how the two flows drifted apart before.
|
|
229
|
+
- **Do not synthesize a Standard by hand.** The CLI derives it in seconds from
|
|
230
|
+
the same catalogue you would be reading.
|
|
231
|
+
- **Do not answer a question for the user**, including by leaving a flag off
|
|
232
|
+
because it seemed obvious. An omitted question is an unattended answer.
|
|
233
|
+
- **Do not run plain `verity login`.** Step 3.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >-
|
|
3
|
+
Formally verify a small, risky piece of code with a Lean 4 model written by the
|
|
4
|
+
Verity service: rank candidates from git history and the user's hint, CONFIRM with
|
|
5
|
+
the user which code to model, have the service generate the model, check it locally
|
|
6
|
+
with `verity prove check`, and replay any counterexample on the real code before
|
|
7
|
+
calling it a bug. Use when the user asks to verify, prove, or model-check code, or
|
|
8
|
+
asks "can this race / double run / fail open?". Anything typed after /verity-prove
|
|
9
|
+
is the user's hint: the file, function, or worry to check.
|
|
10
|
+
---
|
|
11
|
+
# /verity-prove — Formal verification of small pieces of code
|
|
12
|
+
|
|
13
|
+
**The words after `/verity-prove` are the hint.** `/verity-prove` alone means "find me
|
|
14
|
+
something worth checking"; `/verity-prove can the Stripe webhook double-charge on a
|
|
15
|
+
redelivered event?` names the target and the worry. Carry it through every step as
|
|
16
|
+
`$ARGUMENTS`.
|
|
17
|
+
|
|
18
|
+
Verity keeps **Lean 4 models of the riskiest code**, not of the codebase: a few dozen
|
|
19
|
+
lines that abstract ONE function and check a few properties by exhaustive bounded
|
|
20
|
+
search. When a property fails you get the **shortest sequence of actions** that breaks
|
|
21
|
+
it — a hypothesis to replay on the real code.
|
|
22
|
+
|
|
23
|
+
**The service does the work; you orchestrate and present.** Ranking, writing the model
|
|
24
|
+
and replaying its counterexample all run on the Verity service through the CLI. You
|
|
25
|
+
do not search the codebase by hand, read the Lean library, or write Lean yourself
|
|
26
|
+
unless a step below says so. Each step is one command; read its output, decide, move on.
|
|
27
|
+
Lean runs on this machine only because the user asked for it; nothing here blocks a
|
|
28
|
+
commit or a push.
|
|
29
|
+
|
|
30
|
+
## The flow
|
|
31
|
+
|
|
32
|
+
### 1. Candidates — one command
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
verity prove candidates --hint "$ARGUMENTS" --json # hint given
|
|
36
|
+
verity prove candidates --limit 8 --json # no hint
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The hint **widens the pool** (files it names by path or content come first) and the
|
|
40
|
+
service ranks it, naming a symbol and the properties worth checking per file. Do not
|
|
41
|
+
search for the code yourself: if the ranker's list does not contain what the user
|
|
42
|
+
meant, say so and ask them for the file or function. A named file or function in the
|
|
43
|
+
hint skips ranking: go straight to step 2 with it.
|
|
44
|
+
|
|
45
|
+
### 2. Confirm with the user — always
|
|
46
|
+
|
|
47
|
+
**Do not generate a model until the user has said which code.** Present at most three
|
|
48
|
+
candidates in one short message: file, the symbol the ranker named, the first property
|
|
49
|
+
it suggested, the reason. Ask. Their answer is the scope; do not widen it. If the hint
|
|
50
|
+
is a worry in the user's words, it becomes an `intent` property — that needs no further
|
|
51
|
+
confirmation, they just gave it.
|
|
52
|
+
|
|
53
|
+
A hint that names the code, or a candidate the user saw in an earlier session, is
|
|
54
|
+
**not** a confirmation of the exact symbol and property. Still ask, in one line:
|
|
55
|
+
"I'll model `<file>#<symbol>` for `<property>` — go ahead?" It costs the user one word.
|
|
56
|
+
|
|
57
|
+
### 3. Set up once per repo
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
verity prove init
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
If Lean is missing, say what will be installed and where before running
|
|
64
|
+
`verity lean install` (official release, ≈800 MB download, 2.7 GB on disk, into
|
|
65
|
+
`~/.verity/lean`). Everything else needs only `verity login`.
|
|
66
|
+
|
|
67
|
+
### 4. Generate the model — one command
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
verity prove generate src/pay.ts#charge --hint "$ARGUMENTS"
|
|
71
|
+
verity prove generate src/handler.ts --lines 120-180 --hint "$ARGUMENTS" # a region
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The service writes the model, the linter fences it, this machine elaborates it, with
|
|
75
|
+
up to **3** rounds on compiler errors — all inside the command. It prints the check:
|
|
76
|
+
per property `✓ holds to bound k`, `✗ COUNTEREXAMPLE` with the trace, or `? inconclusive`.
|
|
77
|
+
Only if it ends with "no model elaborated" do you write one by hand from
|
|
78
|
+
`.verity/proofs/Models/README.md` (one symbol, ≤ ~120 lines, `#eval Verity.model …`
|
|
79
|
+
header, one `#eval Verity.check …` per property, tagged `.structural` or `.intent` with
|
|
80
|
+
`source :=`); check it with `verity prove check <Name>`.
|
|
81
|
+
|
|
82
|
+
### 5. Replay before you call it a bug — one command
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
verity prove replay <Name> # every counterexample
|
|
86
|
+
verity prove replay <Name> --property P2 # one
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The service replays the trace on the real code in a network-less container and accepts
|
|
90
|
+
an answer only when code ran, the real function's lines appear verbatim in the harness,
|
|
91
|
+
and the harness itself printed `REPLAY_RESULT=reproduced`. A model's counterexamples
|
|
92
|
+
replay in parallel, so the command takes about as long as one replay (~30 s). **Run it
|
|
93
|
+
in the foreground and wait for it**: do not background it, do other work, or report
|
|
94
|
+
before every verdict is in. Read the verdict:
|
|
95
|
+
|
|
96
|
+
- **REPRODUCED** — the real code does this. **This is final: do not replay by hand
|
|
97
|
+
as well.** Report it as a bug (step 6).
|
|
98
|
+
- **DIVERGED** — the model is wrong about the code. Revise it **at most twice**, each
|
|
99
|
+
time saying what the replay showed:
|
|
100
|
+
`verity prove generate <target> --revise <Name> --note "<what the replay showed>"`,
|
|
101
|
+
then replay again. After two divergences, report "no faithful model found for
|
|
102
|
+
`<symbol>`" — that is a valid result, not a bug.
|
|
103
|
+
- **UNVERIFIED / UNREPLAYABLE** — not evidence either way. Only now replay by hand:
|
|
104
|
+
a throwaway harness in a scratch directory that loads the real module and stubs only
|
|
105
|
+
I/O boundaries **in memory**. Never edit the user's source files, and never read from
|
|
106
|
+
or write to the user's databases, services or local stacks to do this — ask first if
|
|
107
|
+
a stub cannot be faithful.
|
|
108
|
+
|
|
109
|
+
Never weaken or delete a property to get green; never add one to make something fail.
|
|
110
|
+
|
|
111
|
+
### 6. Report, in a few lines
|
|
112
|
+
|
|
113
|
+
What was modelled, what was checked to what bound, what was refuted and whether it
|
|
114
|
+
replayed, and what remains `intent` awaiting the user's confirmation. **Never offer to
|
|
115
|
+
commit the model** — `.verity/proofs/` is machine-local and ignores itself. What reaches
|
|
116
|
+
the team is the bug report and, when asked, the fix. Then record the outcome:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
verity reflect --user-input "Modelled runSeed (cli/src/lib/seed-runner.ts): P1 at-most-once refuted in 2 steps, replayed — guard checks a path the server never writes." --kind gotcha
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
The abstracted file's content leaves the machine for the Verity service and its
|
|
123
|
+
replay container; only git-tracked files are ever read.
|
|
124
|
+
|
|
125
|
+
## Do not
|
|
126
|
+
|
|
127
|
+
- Search the codebase yourself before the ranker has answered, or instead of asking the user.
|
|
128
|
+
- Model code the user did not confirm.
|
|
129
|
+
- Write Lean by hand while `verity prove generate` can still try.
|
|
130
|
+
- Replay by hand after a REPRODUCED verdict, or present a model-only counterexample as a bug.
|
|
131
|
+
- Background `verity prove replay`, or report before its verdicts are in.
|
|
132
|
+
- Write to the user's databases or local services, even throwaway rows.
|
|
133
|
+
- Put `sorry` in a model, weaken a property to get green, or touch source files.
|
|
134
|
+
- Run Lean from a hook, or install anything silently.
|
|
135
|
+
- Commit, stage, or un-ignore anything under `.verity/proofs/`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codacy/verity-cli",
|
|
3
|
-
"version": "0.33.3-experimental.
|
|
3
|
+
"version": "0.33.3-experimental.f081164",
|
|
4
4
|
"description": "CLI for Verity quality gate service",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://verity.md",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"files": [
|
|
14
14
|
"bin/verity.js",
|
|
15
15
|
"data/skills/",
|
|
16
|
+
"data/grammars/",
|
|
16
17
|
"package.json",
|
|
17
18
|
"README.md",
|
|
18
19
|
"LICENSE",
|
|
@@ -31,8 +32,14 @@
|
|
|
31
32
|
"devDependencies": {
|
|
32
33
|
"@types/node": "^20",
|
|
33
34
|
"esbuild": "^0.25.12",
|
|
35
|
+
"tree-sitter-go": "0.25.0",
|
|
36
|
+
"tree-sitter-java": "0.23.5",
|
|
37
|
+
"tree-sitter-javascript": "0.25.0",
|
|
38
|
+
"tree-sitter-python": "0.25.0",
|
|
39
|
+
"tree-sitter-typescript": "0.23.2",
|
|
34
40
|
"tsx": "^4.21.0",
|
|
35
|
-
"typescript": "^5.4"
|
|
41
|
+
"typescript": "^5.4",
|
|
42
|
+
"web-tree-sitter": "0.27.0"
|
|
36
43
|
},
|
|
37
44
|
"dependencies": {
|
|
38
45
|
"commander": "^12",
|