@codacy/verity-cli 0.34.0-experimental.cc5f6ec → 0.34.0-experimental.d4649a0

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.
@@ -151,18 +151,30 @@ Use the `verity review` command with all the context you gathered:
151
151
 
152
152
  ```bash
153
153
  verity review \
154
- --files "src/auth/pkce.ts,src/auth/callback.ts,src/auth/types.ts,src/middleware/auth.ts" \
155
- --changed "src/auth/pkce.ts,src/auth/callback.ts" \
156
- --intent "I am adding OAuth2 PKCE authentication flow..." \
157
- --specs "spec/AUTH.md,CLAUDE.md"
154
+ --files 'src/auth/pkce.ts,src/auth/callback.ts,src/auth/types.ts,src/middleware/auth.ts' \
155
+ --changed 'src/auth/pkce.ts,src/auth/callback.ts' \
156
+ --specs 'spec/AUTH.md,CLAUDE.md' \
157
+ --intent - <<'VERITY_EOF_<random>'
158
+ I am adding OAuth2 PKCE authentication flow...
159
+ VERITY_EOF_<random>
158
160
  ```
159
161
 
160
162
  **Arguments:**
161
163
  - `--files` (required): Comma-separated list of ALL files to include (changed + context)
162
164
  - `--changed` (optional): Comma-separated list of actually-modified files (subset of --files). If omitted, all files are treated as changed.
163
- - `--intent` (optional): Your synthesized intent description. Quote it.
165
+ - `--intent -` (optional): Your synthesized intent description, read from the heredoc (`-` means stdin).
164
166
  - `--specs` (optional): Comma-separated list of spec file paths to include.
165
167
 
168
+ **Keep the shell out of it.** The intent carries the user's words, so it goes
169
+ through the quoted heredoc (`<<'VERITY_EOF_<random>'`), never inside `"…"` on the
170
+ command line, where a `"`, a backtick or `$(…)` would run in the shell.
171
+ Replace `<random>` with 8 random letters and digits that you pick for this call,
172
+ the same at both ends. Text written before you picked them cannot contain the
173
+ line that ends the heredoc, so it cannot end it early.
174
+
175
+ Path lists go in single quotes, which expand nothing. Leave out any path that
176
+ itself contains a `'`.
177
+
166
178
  The CLI handles static analysis, file reading with size limits, payload construction, and the API call.
167
179
 
168
180
  ---
@@ -13,9 +13,18 @@ If the user provided a message (e.g., `/verity-feedback the analysis is too slow
13
13
  If they just typed `/verity-feedback` with no message, ask: "What feedback would you like to share?"
14
14
 
15
15
  ```bash
16
- verity feedback message "<their exact message>"
16
+ verity feedback message - <<'VERITY_EOF_<random>'
17
+ <their exact message>
18
+ VERITY_EOF_<random>
17
19
  ```
18
20
 
21
+ The message goes through the quoted heredoc, never inside `"…"` on the command
22
+ line: there, a `"`, a backtick or `$(…)` in the user's words would run in the
23
+ shell. The quotes around the first `VERITY_EOF_<random>` are what stop the shell
24
+ expanding anything. Replace `<random>` with 8 random letters and digits that you
25
+ pick for this call, the same at both ends. Text written before you picked them
26
+ cannot contain the line that ends the heredoc, so it cannot end it early.
27
+
19
28
  On success: "Thanks, feedback sent!"
20
29
  On error: "Couldn't send feedback right now. Your message: [repeat it so it's not lost]."
21
30
 
@@ -29,16 +38,23 @@ Ask for the required info if not provided:
29
38
  - **action**: one of `false_positive`, `acknowledged`, `will_fix_later`, `wrong_severity`, `useful`
30
39
 
31
40
  ```bash
32
- verity feedback finding <run-id> <pattern-id> <action> "optional note"
41
+ verity feedback finding <run-id> <pattern-id> <action> - <<'VERITY_EOF_<random>'
42
+ <optional note, in the user's words>
43
+ VERITY_EOF_<random>
33
44
  ```
34
45
 
46
+ Leave out the `-` and the heredoc when there is no note.
47
+
35
48
  Optional flags:
36
49
  - `--file <path>` — the file the finding applies to
37
50
  - `--line <n>` — the line number
38
51
 
39
52
  Example: marking a test file's fake JWT as a false positive:
40
53
  ```bash
41
- verity feedback finding run-20260420-abc1 no-hardcoded-secrets false_positive "Fake JWT used in tests" --file src/auth/tokens.test.ts --line 42
54
+ verity feedback finding run-20260420-abc1 no-hardcoded-secrets false_positive \
55
+ --file 'src/auth/tokens.test.ts' --line 42 - <<'VERITY_EOF_<random>'
56
+ Fake JWT used in tests
57
+ VERITY_EOF_<random>
42
58
  ```
43
59
 
44
60
  On success: report whether auto-suppression is now active (requires ≥2 independent dismissals for the same pattern+file pattern).
@@ -34,14 +34,24 @@ curl -s -H "Authorization: Bearer $VERITY_TOKEN" \
34
34
  curl -s -X POST -H "Authorization: Bearer $VERITY_TOKEN" \
35
35
  -H "Content-Type: application/json" \
36
36
  "$(verity config service-url)/compound/lessons" \
37
- -d '{
38
- "kind": "gotcha",
39
- "title": "RLS policies and cleanup cron are coupled",
40
- "body": "Changing RLS policies without updating the cleanup cron will break retention.",
41
- "file_globs": ["server/supabase/migrations/**"]
42
- }'
37
+ -d @- <<'VERITY_EOF_<random>'
38
+ {
39
+ "kind": "gotcha",
40
+ "title": "RLS policies and cleanup cron are coupled",
41
+ "body": "Changing RLS policies without updating the cleanup cron will break retention.",
42
+ "file_globs": ["server/supabase/migrations/**"]
43
+ }
44
+ VERITY_EOF_<random>
43
45
  ```
44
46
 
47
+ The body is read from the quoted heredoc (`-d @-`), never from a `'…'` string on
48
+ the command line, where a quote or `$(…)` in the user's words would run in the
49
+ shell. Inside it is plain JSON: escape `"` as `\"` and `\` as `\\`.
50
+
51
+ Replace `<random>` with 8 random letters and digits that you pick for this call,
52
+ the same at both ends. Text written before you picked them cannot contain the
53
+ line that ends the heredoc, so it cannot end it early.
54
+
45
55
  Valid kinds: `bug_pattern`, `architectural_decision`, `gotcha`, `preferred_convention`, `false_positive_rule`, `intent_template`.
46
56
 
47
57
  ### Archive a lesson
@@ -59,7 +69,9 @@ curl -s -X PATCH -H "Authorization: Bearer $VERITY_TOKEN" \
59
69
  curl -s -X POST -H "Authorization: Bearer $VERITY_TOKEN" \
60
70
  -H "Content-Type: application/json" \
61
71
  "$(verity config service-url)/compound/extract" \
62
- -d '{"task_id": "<task-uuid>"}'
72
+ -d @- <<'VERITY_EOF_<random>'
73
+ {"task_id": "<task-uuid>"}
74
+ VERITY_EOF_<random>
63
75
  ```
64
76
 
65
77
  ## How it works
@@ -42,7 +42,9 @@ Find related knowledge by seeding from files you're working on:
42
42
  curl -s -X POST -H "Authorization: Bearer $VERITY_TOKEN" \
43
43
  -H "Content-Type: application/json" \
44
44
  "$(verity config service-url)/compound/memory/walk" \
45
- -d '{"seed_files": ["src/auth/tokens.ts"], "max_hops": 2, "budget_tokens": 2000}'
45
+ -d @- <<'VERITY_EOF_<random>'
46
+ {"seed_files": ["src/auth/tokens.ts"], "max_hops": 2, "budget_tokens": 2000}
47
+ VERITY_EOF_<random>
46
48
  ```
47
49
 
48
50
  ### Add a node (user-authored)
@@ -53,15 +55,26 @@ User-authored nodes get `confidence: 1.0` and are never auto-archived:
53
55
  curl -s -X POST -H "Authorization: Bearer $VERITY_TOKEN" \
54
56
  -H "Content-Type: application/json" \
55
57
  "$(verity config service-url)/compound/memory/nodes" \
56
- -d '{
57
- "kind": "gotcha",
58
- "title": "RLS policies and cleanup cron are coupled",
59
- "body": "Changing RLS policies without updating the cleanup cron will break retention.",
60
- "file_globs": ["server/supabase/migrations/**"],
61
- "domains": ["security", "database"]
62
- }'
58
+ -d @- <<'VERITY_EOF_<random>'
59
+ {
60
+ "kind": "gotcha",
61
+ "title": "RLS policies and cleanup cron are coupled",
62
+ "body": "Changing RLS policies without updating the cleanup cron will break retention.",
63
+ "file_globs": ["server/supabase/migrations/**"],
64
+ "domains": ["security", "database"]
65
+ }
66
+ VERITY_EOF_<random>
63
67
  ```
64
68
 
69
+ The body is read from the quoted heredoc (`-d @-`), never from a `'…'` or
70
+ `"…"` string on the command line, where a quote or `$(…)` in the user's words
71
+ would run in the shell. Inside the heredoc it is plain JSON: escape `"` as `\"`
72
+ and `\` as `\\` in the title and body, as JSON requires.
73
+
74
+ Replace `<random>` with 8 random letters and digits that you pick for this call,
75
+ the same at both ends. Text written before you picked them cannot contain the
76
+ line that ends the heredoc, so it cannot end it early.
77
+
65
78
  Valid kinds: `decision`, `quality`, `security`, `intent`, `gotcha`, `pattern`, `domain`, `integration`.
66
79
 
67
80
  Or create the markdown file directly at `.verity/memory/<domain>/<slug>.md` with proper frontmatter (see `.verity/memory/SCHEMA.md` for the template).
@@ -32,10 +32,19 @@ commit or a push.
32
32
  ### 1. Candidates — one command
33
33
 
34
34
  ```bash
35
- verity prove candidates --hint "$ARGUMENTS" --json # hint given
36
35
  verity prove candidates --limit 8 --json # no hint
36
+ verity prove candidates --hint - --json <<'VERITY_EOF_<random>'
37
+ <the hint>
38
+ VERITY_EOF_<random>
37
39
  ```
38
40
 
41
+ The hint is the user's words, so it goes through the quoted heredoc (`-` means
42
+ stdin), never inside `"…"` on the command line, where a `"`, a backtick or `$(…)`
43
+ in it would run in the shell. The quotes around the first `VERITY_EOF_<random>`
44
+ stop the shell expanding anything. Replace `<random>` with 8 random letters and
45
+ digits that you pick for this call, the same at both ends. Text written before you
46
+ picked them cannot contain the line that ends the heredoc, so it cannot end it early.
47
+
39
48
  The hint **widens the pool** (files it names by path or content come first) and the
40
49
  service ranks it, naming a symbol and the properties worth checking per file. Do not
41
50
  search for the code yourself: if the ranker's list does not contain what the user
@@ -67,10 +76,18 @@ If Lean is missing, say what will be installed and where before running
67
76
  ### 4. Generate the model — one command
68
77
 
69
78
  ```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
79
+ verity prove generate src/pay.ts#charge --hint - <<'VERITY_EOF_<random>'
80
+ <the hint>
81
+ VERITY_EOF_<random>
82
+ # a region:
83
+ verity prove generate src/handler.ts --lines 120-180 --hint - <<'VERITY_EOF_<random>'
84
+ <the hint>
85
+ VERITY_EOF_<random>
72
86
  ```
73
87
 
88
+ Leave out `--hint -` and the heredoc when there is no hint. Pick new letters for
89
+ `<random>` on each call.
90
+
74
91
  The service writes the model, the linter fences it, this machine elaborates it, with
75
92
  up to **3** rounds on compiler errors — all inside the command. It prints the check:
76
93
  per property `✓ holds to bound k`, `✗ COUNTEREXAMPLE` with the trace, or `? inconclusive`.
@@ -95,17 +112,24 @@ before every verdict is in. Read the verdict:
95
112
 
96
113
  - **REPRODUCED** — the real code does this. **This is final: do not replay by hand
97
114
  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.
115
+ - **DIVERGED** — the model is wrong about the code. Revise it **at most twice** with
116
+ the revise command below, each time saying what the replay showed, then replay
117
+ again. After two divergences, report "no faithful model found for `<symbol>`" —
118
+ that is a valid result, not a bug.
103
119
  - **UNVERIFIED / UNREPLAYABLE** — not evidence either way. Only now replay by hand:
104
120
  a throwaway harness in a scratch directory that loads the real module and stubs only
105
121
  I/O boundaries **in memory**. Never edit the user's source files, and never read from
106
122
  or write to the user's databases, services or local stacks to do this — ask first if
107
123
  a stub cannot be faithful.
108
124
 
125
+ The revise command. The note goes through the heredoc, as the hint does:
126
+
127
+ ```bash
128
+ verity prove generate <target> --revise <Name> --note - <<'VERITY_EOF_<random>'
129
+ <what the replay showed>
130
+ VERITY_EOF_<random>
131
+ ```
132
+
109
133
  Never weaken or delete a property to get green; never add one to make something fail.
110
134
 
111
135
  ### 6. Report, in a few lines
@@ -116,7 +140,9 @@ commit the model** — `.verity/proofs/` is machine-local and ignores itself. Wh
116
140
  the team is the bug report and, when asked, the fix. Then record the outcome:
117
141
 
118
142
  ```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
143
+ verity reflect --user-input - --kind gotcha <<'VERITY_EOF_<random>'
144
+ 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.
145
+ VERITY_EOF_<random>
120
146
  ```
121
147
 
122
148
  The abstracted file's content leaves the machine for the Verity service and its
@@ -39,16 +39,27 @@ surfaces again, in any future review. So write `src/payments/retry.ts:88`, not
39
39
  ### 2. Record it
40
40
 
41
41
  ```bash
42
- verity reflect --user-input "<your draft>" --kind <kind>
42
+ verity reflect --user-input - --kind <kind> <<'VERITY_EOF_<random>'
43
+ <your draft>
44
+ VERITY_EOF_<random>
43
45
  ```
44
46
 
45
47
  That is the whole step. It never blocks, never prompts, and works the same in a
46
48
  TTY, a hook, CI, or a cron run.
47
49
 
50
+ The text goes through the quoted heredoc, never inside `"…"` on the command
51
+ line: there, a `"`, a backtick or `$(…)` in the words would run in the shell.
52
+ The quotes around the first `VERITY_EOF_<random>` are what stop the shell
53
+ expanding anything. Replace `<random>` with 8 random letters and digits that you
54
+ pick for this call, the same at both ends. Text written before you picked them
55
+ cannot contain the line that ends the heredoc, so it cannot end it early.
56
+
48
57
  If the reflection genuinely cannot name its files in prose, scope it explicitly:
49
58
 
50
59
  ```bash
51
- verity reflect --user-input "<your draft>" --kind <kind> --file-globs "src/auth/**"
60
+ verity reflect --user-input - --kind <kind> --file-globs 'src/auth/**' <<'VERITY_EOF_<random>'
61
+ <your draft>
62
+ VERITY_EOF_<random>
52
63
  ```
53
64
 
54
65
  The command warns when a reflection resolved to no files, so you will know when
@@ -58,7 +69,9 @@ this is needed rather than discovering it months later as a node nobody read.
58
69
  a lesson in their own terms — add `--confirmed`:
59
70
 
60
71
  ```bash
61
- verity reflect --user-input "<what they said>" --kind <kind> --confirmed
72
+ verity reflect --user-input - --kind <kind> --confirmed <<'VERITY_EOF_<random>'
73
+ <what they said>
74
+ VERITY_EOF_<random>
62
75
  ```
63
76
 
64
77
  This is not a formality. Without the flag a reflection is stored as
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/verity-cli",
3
- "version": "0.34.0-experimental.cc5f6ec",
3
+ "version": "0.34.0-experimental.d4649a0",
4
4
  "description": "CLI for Verity quality gate service",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://verity.md",