@codacy/verity-cli 0.35.5 → 0.36.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.
- package/CHANGELOG.md +67 -0
- package/bin/verity.js +2244 -218
- package/data/skills/verity-memory/SKILL.md +56 -8
- package/data/skills/verity-reflect/SKILL.md +9 -0
- package/package.json +2 -2
|
@@ -79,22 +79,70 @@ Valid kinds: `decision`, `quality`, `security`, `intent`, `gotcha`, `pattern`, `
|
|
|
79
79
|
|
|
80
80
|
Or create the markdown file directly at `.verity/memory/<domain>/<slug>.md` with proper frontmatter (see `.verity/memory/SCHEMA.md` for the template).
|
|
81
81
|
|
|
82
|
+
### Ask the graph a question
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
verity memory ask --json - <<'VERITY_EOF_<random>'
|
|
86
|
+
why do we check the Gateway at the API level and not just TCP?
|
|
87
|
+
VERITY_EOF_<random>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The command prints the matching nodes, best first, with their ids and paths.
|
|
91
|
+
It also quotes the sentences that answer the question, each with the id of its
|
|
92
|
+
node. It runs on the local files: nothing is sent, and no model writes the
|
|
93
|
+
answer. Read the nodes before you rely on a quote. `--full` prints whole bodies,
|
|
94
|
+
`--limit <n>` sets how many nodes come back, and `--all` includes archived nodes.
|
|
95
|
+
`verity memory recall` is the same command.
|
|
96
|
+
|
|
82
97
|
### Edit a node
|
|
83
98
|
|
|
84
|
-
|
|
99
|
+
```bash
|
|
100
|
+
# Change the files the node is about. Each glob must match a file in the repository.
|
|
101
|
+
verity memory edit <node-id> --file-globs scripts/verity.sh 'config/*.yaml'
|
|
102
|
+
|
|
103
|
+
# Replace the body
|
|
104
|
+
verity memory edit <node-id> --body - <<'VERITY_EOF_<random>'
|
|
105
|
+
<the new body>
|
|
106
|
+
VERITY_EOF_<random>
|
|
107
|
+
|
|
108
|
+
# Or edit .verity/memory/<domain>/<slug>.md by hand (the title too), then upload it as it is
|
|
109
|
+
verity memory edit <node-id>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The command uploads the node at once and reads it back from the service. It
|
|
113
|
+
fails if the service did not take the change. `--status active|archived|superseded`
|
|
114
|
+
changes only the status. If a teammate changed the node on the service since
|
|
115
|
+
your last pull, the command refuses and changes nothing: run `verity memory pull`
|
|
116
|
+
and edit again, or pass `--force` to overwrite their version. The source, author
|
|
117
|
+
and confidence of a node stay as the service recorded them.
|
|
85
118
|
|
|
86
|
-
###
|
|
119
|
+
### Delete a node
|
|
87
120
|
|
|
88
121
|
```bash
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
-d '{"status": "archived"}'
|
|
122
|
+
verity memory delete <node-id> --reason - <<'VERITY_EOF_<random>'
|
|
123
|
+
<why the node is wrong or no longer applies>
|
|
124
|
+
VERITY_EOF_<random>
|
|
93
125
|
```
|
|
94
126
|
|
|
95
|
-
|
|
127
|
+
The node is archived on the service for the whole team, and its file is removed
|
|
128
|
+
here. The text and the reason are kept on this machine in `.verity/.memory-trash/`.
|
|
129
|
+
`verity memory restore <node-id>` undoes it.
|
|
130
|
+
|
|
131
|
+
### Consolidate the graph
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
verity memory dream # print the plan; changes nothing
|
|
135
|
+
verity memory dream --apply # make the changes, and save a report in .verity/dreams/
|
|
136
|
+
verity memory dream --revert <dream-id>
|
|
137
|
+
verity memory dream --list
|
|
138
|
+
```
|
|
96
139
|
|
|
97
|
-
|
|
140
|
+
`dream` merges near-duplicate nodes of one kind into the strongest one, and the
|
|
141
|
+
strongest one takes over their file_globs. It also retires the nodes that the
|
|
142
|
+
graph marks as superseded, and it prunes empty placeholders. It never changes a
|
|
143
|
+
node with `source: user`. It lists for a person the pairs that only may be the
|
|
144
|
+
same, and the contradictions that nothing in the graph settles. Show the plan
|
|
145
|
+
to the user before you run `--apply`.
|
|
98
146
|
|
|
99
147
|
### Run lint
|
|
100
148
|
|
|
@@ -47,6 +47,15 @@ VERITY_EOF_<random>
|
|
|
47
47
|
That is the whole step. It never blocks, never prompts, and works the same in a
|
|
48
48
|
TTY, a hook, CI, or a cron run.
|
|
49
49
|
|
|
50
|
+
Write the title as the first line of the draft: the node is titled by its first
|
|
51
|
+
line, or by the first sentence of it, up to 120 characters. The command prints
|
|
52
|
+
the title it stored. If it is wrong, or the reflection is, correct it with
|
|
53
|
+
`verity memory edit <node-id>` or remove it with `verity memory delete <node-id>`.
|
|
54
|
+
|
|
55
|
+
Paths count when they are written from the repository root, as a file
|
|
56
|
+
(`scripts/verity.sh`), a glob with a folder (`config/*.yaml`) or a folder with a
|
|
57
|
+
trailing slash (`src/payments/`).
|
|
58
|
+
|
|
50
59
|
The text goes through the quoted heredoc, never inside `"…"` on the command
|
|
51
60
|
line: there, a `"`, a backtick or `$(…)` in the words would run in the shell.
|
|
52
61
|
The quotes around the first `VERITY_EOF_<random>` are what stop the shell
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codacy/verity-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "CLI for Verity quality gate service",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://verity.md",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"web-tree-sitter": "0.27.0"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@codacy/analysis-cli": "0.
|
|
45
|
+
"@codacy/analysis-cli": "0.29.0",
|
|
46
46
|
"commander": "^12",
|
|
47
47
|
"yaml": "^2"
|
|
48
48
|
}
|