@codacy/verity-cli 0.32.5-experimental.4d91ca0 → 0.32.6-experimental.833e71a

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.
@@ -1,20 +1,22 @@
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, then confirm it with the user or record it directly. Use at natural
4
+ what actually happened and record it straight into the project knowledge base. 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 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.
9
+ At a natural task-completion moment, **the agent reflects and records** — draft a
10
+ concrete, cited observation from what actually happened, write it to the project
11
+ knowledge base, and say what you wrote. No question, no waiting.
14
12
 
15
- ## The flip draft first, then confirm or auto-record
13
+ This is the second half of the "reflection flip". Verity first stopped asking the
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.
16
16
 
17
- ### 1. Self-draft (always)
17
+ ## The flow
18
+
19
+ ### 1. Draft
18
20
 
19
21
  When a task is complete, draft **1–3** things genuinely worth remembering — a
20
22
  **decision**, a **gotcha**, or a **pattern** — from what happened this task. Each
@@ -22,47 +24,69 @@ item must be **concrete and cited**: name the files, PR, commands, or
22
24
  error-signatures it came from. **Skip entirely if nothing non-obvious happened**
23
25
  — an empty reflection is better than a filler one.
24
26
 
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
+
25
30
  Pick the right `--kind` per item: `decision`, `gotcha`, `pattern`, `security`,
26
31
  `quality`, `intent`, `domain`, `integration`.
27
32
 
28
- ### 2. Branch on run mode
33
+ **Citing the files is not decoration — it is what makes the reflection findable.**
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
29
40
 
30
- **Interactive** (a person is at the keyboard — a TTY): show your draft and ask
31
- one question before recording:
41
+ ```bash
42
+ verity reflect --user-input "<your draft>" --kind <kind>
43
+ ```
32
44
 
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.)"
45
+ That is the whole step. It never blocks, never prompts, and works the same in a
46
+ TTY, a hook, CI, or a cron run.
35
47
 
36
- Then record the **final** text with their corrections folded in via:
48
+ If the reflection genuinely cannot name its files in prose, scope it explicitly:
37
49
 
38
50
  ```bash
39
- verity reflect --user-input "<final reflection>" --kind <kind>
51
+ verity reflect --user-input "<your draft>" --kind <kind> --file-globs "src/auth/**"
40
52
  ```
41
53
 
42
- If they say "skip", do **not** record.
54
+ The command warns when a reflection resolved to no files, so you will know when
55
+ this is needed rather than discovering it months later as a node nobody read.
43
56
 
44
- **Autonomous** (no person to confirmheadless / CI / cron, or
45
- `VERITY_AUTONOMOUS=1`, or a non-TTY session): record your draft **directly**,
46
- never blocking:
57
+ **When the *user* authored the words** they said "record this: …", or dictated
58
+ a lesson in their own terms add `--confirmed`:
47
59
 
48
60
  ```bash
49
- verity reflect --user-input "<your draft>" --kind <kind> --autonomous
61
+ verity reflect --user-input "<what they said>" --kind <kind> --confirmed
50
62
  ```
51
63
 
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.
64
+ This is not a formality. Without the flag a reflection is stored as
65
+ `source: agent` (confidence 0.7) *Verity thought this, nobody checked it*. With
66
+ it, `source: user` at confidence 1.0 — *a person stands behind this*. The
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.
55
80
 
56
- ### 3. Where it lands
81
+ ### 4. Where it lands
57
82
 
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.
83
+ Only Verity's own memory namespace — `.verity/memory/` (mirrored to the service).
84
+ Verity never writes a repo's own `agents/memory` or any other store. One node per
85
+ item, synced to disk immediately so it is readable and editable straight away.
62
86
 
63
87
  ## Auto-reflection (extract from task history)
64
88
 
65
- Complementary to the flip: trigger the server-side LLM extractor to mine the
89
+ Complementary to the above: trigger the server-side LLM extractor to mine the
66
90
  current task's run history and produce 0–3 nodes. This is the same extraction
67
91
  that runs automatically on task close and every 5 runs — use it to trigger
68
92
  mid-task:
@@ -71,8 +95,8 @@ mid-task:
71
95
  verity reflect
72
96
  ```
73
97
 
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.
98
+ Use the draft flow above for the **compound moment** (a specific insight worth a
99
+ node); use auto-extract to harvest what the run history shows.
76
100
 
77
101
  ## When to reflect
78
102
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/verity-cli",
3
- "version": "0.32.5-experimental.4d91ca0",
3
+ "version": "0.32.6-experimental.833e71a",
4
4
  "description": "CLI for Verity quality gate service",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://verity.md",