@codacy/verity-cli 0.32.6-experimental.df0a578 → 0.32.7
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 +16 -0
- package/bin/verity.js +582 -1980
- package/data/skills/verity-reflect/SKILL.md +31 -55
- package/package.json +2 -2
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: >-
|
|
3
3
|
Capture a durable learning at the end of a task: draft a concrete, cited observation from
|
|
4
|
-
what actually happened
|
|
4
|
+
what actually happened, then confirm it with the user or record it directly. Use at natural
|
|
5
5
|
task-completion moments, or when the user asks to record a lesson.
|
|
6
6
|
---
|
|
7
7
|
# /verity-reflect — Capture learnings after a task
|
|
8
8
|
|
|
9
|
-
At a natural task-completion moment, **the agent reflects
|
|
10
|
-
concrete, cited observation from what actually happened
|
|
11
|
-
|
|
9
|
+
At a natural task-completion moment, **the agent reflects first** — draft a
|
|
10
|
+
concrete, cited observation from what actually happened — then either confirm it
|
|
11
|
+
with the user (interactive) or record it directly (autonomous). This is the
|
|
12
|
+
"reflection flip": Verity stops asking the user to do the reflecting and instead
|
|
13
|
+
does the work, with the human as editor rather than author.
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
user to do the reflecting; it now also stops asking permission to keep it. The
|
|
15
|
-
human is a reader and editor of the record, not a gate in front of it.
|
|
15
|
+
## The flip — draft first, then confirm or auto-record
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
### 1. Draft
|
|
17
|
+
### 1. Self-draft (always)
|
|
20
18
|
|
|
21
19
|
When a task is complete, draft **1–3** things genuinely worth remembering — a
|
|
22
20
|
**decision**, a **gotcha**, or a **pattern** — from what happened this task. Each
|
|
@@ -24,69 +22,47 @@ item must be **concrete and cited**: name the files, PR, commands, or
|
|
|
24
22
|
error-signatures it came from. **Skip entirely if nothing non-obvious happened**
|
|
25
23
|
— an empty reflection is better than a filler one.
|
|
26
24
|
|
|
27
|
-
That last rule is now the *only* filter. Nobody is going to catch a weak
|
|
28
|
-
reflection before it lands, so do not record one.
|
|
29
|
-
|
|
30
25
|
Pick the right `--kind` per item: `decision`, `gotcha`, `pattern`, `security`,
|
|
31
26
|
`quality`, `intent`, `domain`, `integration`.
|
|
32
27
|
|
|
33
|
-
|
|
34
|
-
Verity scopes a node to the paths named in its text, and retrieval seeds on that
|
|
35
|
-
scope. A reflection that names no file in this repo is recorded and then never
|
|
36
|
-
surfaces again, in any future review. So write `src/payments/retry.ts:88`, not
|
|
37
|
-
"the retry path".
|
|
38
|
-
|
|
39
|
-
### 2. Record it
|
|
28
|
+
### 2. Branch on run mode
|
|
40
29
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
```
|
|
30
|
+
**Interactive** (a person is at the keyboard — a TTY): show your draft and ask
|
|
31
|
+
one question before recording:
|
|
44
32
|
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
> "Here's my reflection draft for the project memory: _\<draft\>_. Anything to
|
|
34
|
+
> **confirm, correct, or add** before I record it? (Say 'skip' to drop it.)"
|
|
47
35
|
|
|
48
|
-
|
|
36
|
+
Then record the **final** text — with their corrections folded in — via:
|
|
49
37
|
|
|
50
38
|
```bash
|
|
51
|
-
verity reflect --user-input "<
|
|
39
|
+
verity reflect --user-input "<final reflection>" --kind <kind>
|
|
52
40
|
```
|
|
53
41
|
|
|
54
|
-
|
|
55
|
-
this is needed rather than discovering it months later as a node nobody read.
|
|
42
|
+
If they say "skip", do **not** record.
|
|
56
43
|
|
|
57
|
-
**
|
|
58
|
-
|
|
44
|
+
**Autonomous** (no person to confirm — headless / CI / cron, or
|
|
45
|
+
`VERITY_AUTONOMOUS=1`, or a non-TTY session): record your draft **directly**,
|
|
46
|
+
never blocking:
|
|
59
47
|
|
|
60
48
|
```bash
|
|
61
|
-
verity reflect --user-input "<
|
|
49
|
+
verity reflect --user-input "<your draft>" --kind <kind> --autonomous
|
|
62
50
|
```
|
|
63
51
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
dashboard, the retrieval ranking, and the next agent to read the node all rely on
|
|
68
|
-
the difference. Never pass `--confirmed` for your own draft, even a good one.
|
|
69
|
-
|
|
70
|
-
### 3. Tell the user, in one line
|
|
71
|
-
|
|
72
|
-
The command prints the node id, the local file path, and a dashboard link. Relay
|
|
73
|
-
it — one line, no ceremony:
|
|
74
|
-
|
|
75
|
-
> Recorded a gotcha about the Stripe retry path → `.verity/memory/gotchas/n104-stripe-idempotency-keys.md`
|
|
76
|
-
|
|
77
|
-
They did not agree to this in advance, so they need to know it happened and where
|
|
78
|
-
to go if it is wrong. Do not ask them to confirm it after the fact either — the
|
|
79
|
-
file is right there, and editing or deleting it is the correction.
|
|
52
|
+
Mode is auto-detected when you omit the flag (TTY ⇒ interactive, non-TTY ⇒
|
|
53
|
+
autonomous); pass `--autonomous` to be explicit, or set `VERITY_AUTONOMOUS=0` to
|
|
54
|
+
force a confirm step even in a headless run.
|
|
80
55
|
|
|
81
|
-
###
|
|
56
|
+
### 3. Where it lands
|
|
82
57
|
|
|
83
|
-
|
|
84
|
-
Verity never writes a repo's own
|
|
85
|
-
|
|
58
|
+
The reflection is recorded **only to Verity's own memory namespace** —
|
|
59
|
+
`.verity/memory/` (synced to the service). Verity never writes a repo's own
|
|
60
|
+
`agents/memory` or any other store. One node per item; `source: 'user'`,
|
|
61
|
+
`confidence: 1.0`, never auto-archived.
|
|
86
62
|
|
|
87
63
|
## Auto-reflection (extract from task history)
|
|
88
64
|
|
|
89
|
-
Complementary to the
|
|
65
|
+
Complementary to the flip: trigger the server-side LLM extractor to mine the
|
|
90
66
|
current task's run history and produce 0–3 nodes. This is the same extraction
|
|
91
67
|
that runs automatically on task close and every 5 runs — use it to trigger
|
|
92
68
|
mid-task:
|
|
@@ -95,8 +71,8 @@ mid-task:
|
|
|
95
71
|
verity reflect
|
|
96
72
|
```
|
|
97
73
|
|
|
98
|
-
Use the draft flow above for the **compound moment** (a specific insight
|
|
99
|
-
node); use auto-extract to harvest what the run history shows.
|
|
74
|
+
Use the self-draft flow above for the **compound moment** (a specific insight
|
|
75
|
+
worth a confirmed node); use auto-extract to harvest what the run history shows.
|
|
100
76
|
|
|
101
77
|
## When to reflect
|
|
102
78
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codacy/verity-cli",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.7",
|
|
4
4
|
"description": "CLI for Verity quality gate service",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://verity.md",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "node scripts/build.js",
|
|
26
|
-
"test": "npm run build &&
|
|
26
|
+
"test": "npm run build && node scripts/run-tests.mjs",
|
|
27
27
|
"test:e2e": "node --import tsx --test --test-concurrency=1 tests/e2e/*.test.ts",
|
|
28
28
|
"typecheck": "tsc --noEmit",
|
|
29
29
|
"prepublishOnly": "npm run typecheck && npm run build"
|