@olegkoval/agent-skills 1.91.0 → 1.92.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.
Files changed (41) hide show
  1. package/.github/prompts/self-critique.prompt.md +90 -232
  2. package/adapters/claude/olko-reflection/skills/self-critique/SKILL.md +90 -232
  3. package/adapters/claude/olko-reflection/skills/self-critique/references/rules.md +67 -0
  4. package/adapters/claude/olko-reflection/skills/self-critique/references/scoring.md +99 -0
  5. package/adapters/claude/olko-reflection/skills/self-critique/references/setup.md +62 -0
  6. package/adapters/claude/olko-reflection/skills/self-critique/scripts/claim-ledger.mjs +152 -9
  7. package/adapters/claude/olko-reflection/skills/self-critique/scripts/rule-store.mjs +34 -12
  8. package/adapters/claude/olko-reflection/skills/self-critique/scripts/run-store.mjs +133 -0
  9. package/adapters/cursor/olko-reflection/skills/self-critique/SKILL.md +90 -232
  10. package/adapters/cursor/olko-reflection/skills/self-critique/references/rules.md +67 -0
  11. package/adapters/cursor/olko-reflection/skills/self-critique/references/scoring.md +99 -0
  12. package/adapters/cursor/olko-reflection/skills/self-critique/references/setup.md +62 -0
  13. package/adapters/cursor/olko-reflection/skills/self-critique/scripts/claim-ledger.mjs +152 -9
  14. package/adapters/cursor/olko-reflection/skills/self-critique/scripts/rule-store.mjs +34 -12
  15. package/adapters/cursor/olko-reflection/skills/self-critique/scripts/run-store.mjs +133 -0
  16. package/adapters/grok/olko-reflection/skills/self-critique/SKILL.md +90 -232
  17. package/adapters/grok/olko-reflection/skills/self-critique/references/rules.md +67 -0
  18. package/adapters/grok/olko-reflection/skills/self-critique/references/scoring.md +99 -0
  19. package/adapters/grok/olko-reflection/skills/self-critique/references/setup.md +62 -0
  20. package/adapters/grok/olko-reflection/skills/self-critique/scripts/claim-ledger.mjs +152 -9
  21. package/adapters/grok/olko-reflection/skills/self-critique/scripts/rule-store.mjs +34 -12
  22. package/adapters/grok/olko-reflection/skills/self-critique/scripts/run-store.mjs +133 -0
  23. package/package.json +1 -1
  24. package/plugins/olko-apple-kit/.claude-plugin/plugin.json +1 -1
  25. package/plugins/olko-creative/.claude-plugin/plugin.json +1 -1
  26. package/plugins/olko-garmin-kit/.claude-plugin/plugin.json +1 -1
  27. package/plugins/olko-git-tools/.claude-plugin/plugin.json +1 -1
  28. package/plugins/olko-github-pr/.claude-plugin/plugin.json +1 -1
  29. package/plugins/olko-obsidian/.claude-plugin/plugin.json +1 -1
  30. package/plugins/olko-product/.claude-plugin/plugin.json +1 -1
  31. package/plugins/olko-reflection/.claude-plugin/plugin.json +1 -1
  32. package/plugins/olko-reflection/skills/self-critique/SKILL.md +90 -232
  33. package/plugins/olko-reflection/skills/self-critique/references/rules.md +67 -0
  34. package/plugins/olko-reflection/skills/self-critique/references/scoring.md +99 -0
  35. package/plugins/olko-reflection/skills/self-critique/references/setup.md +62 -0
  36. package/plugins/olko-reflection/skills/self-critique/scripts/claim-ledger.mjs +152 -9
  37. package/plugins/olko-reflection/skills/self-critique/scripts/rule-store.mjs +34 -12
  38. package/plugins/olko-reflection/skills/self-critique/scripts/run-store.mjs +133 -0
  39. package/plugins/olko-release/.claude-plugin/plugin.json +1 -1
  40. package/plugins/olko-skill-meta/.claude-plugin/plugin.json +1 -1
  41. package/plugins/olko-web-ops/.claude-plugin/plugin.json +1 -1
@@ -12,16 +12,12 @@ Run an adversarial review of **your own previous answer** and report the result
12
12
 
13
13
  ## Overview
14
14
 
15
- A confident answer is not a verified one. This skill turns your last substantial reply into the
16
- subject of a hostile review: a separate critic agent tries to refute it against live sources, hunts
17
- for the related issue or pattern you missed, and scores it. You then revise and re-score until the
18
- score stops moving, report the outcome honestly, including where you were wrong, and convert what
19
- the critic caught into a rule that survives the session.
20
-
21
- The point is to surface error before the user does, to make "is this actually right?" a measured
22
- quantity instead of a vibe, and to make the same mistake cost less the second time than it did the
23
- first. A critique that ends at a score has bought one corrected answer. A critique that ends at a
24
- durable rule has bought every answer after it.
15
+ A confident answer is not a verified one. A separate critic agent tries to refute your last answer
16
+ against live sources and hunts for the related issue or pattern you missed. The score is computed
17
+ from a labelled claim ledger. You revise under a ratchet, report honestly including where you were
18
+ wrong, and convert what the critic caught into a rule that survives the session. A critique that ends
19
+ at a score has bought one corrected answer; one that ends at a durable rule has bought every answer
20
+ after it.
25
21
 
26
22
  ## When to Use
27
23
 
@@ -33,174 +29,120 @@ durable rule has bought every answer after it.
33
29
  Do not use for trivial one-shot replies or simple chat. The overhead only pays off on load-bearing
34
30
  answers.
35
31
 
36
- **Standalone Cursor installation.** Use the generated Cursor adapter or the full skill package,
37
- including its `scripts/` directory. Copying only `SKILL.md` is insufficient for this workflow,
38
- which calls the bundled scripts.
32
+ Setup notes (state dir, Cursor install, the optional Stop-hook nudge): `references/setup.md`.
33
+ Penalties, anchors, ledger shape and integrity checks: `references/scoring.md`.
39
34
 
40
35
  ## Procedure
41
36
 
42
37
  1. **Snapshot the target.** Capture your last substantial answer verbatim and the original task
43
- text. This is `v1`.
38
+ text. This is `v1`. Create the run folder (outside the repo, one per run) and use it for every
39
+ file below:
40
+
41
+ ```bash
42
+ RUN=$(node <skill>/scripts/run-store.mjs new --cwd "$PWD")
43
+ ```
44
44
 
45
45
  Write your claim list before you re-read the answer's prose, and put a real receipt against each
46
46
  claim: a quoted field, a `file:line` whose body you actually opened, a command and its output.
47
- A claim you cannot receipt at snapshot time is already a finding - mark it `unverifiable` yourself
47
+ A claim you cannot receipt at snapshot time is already a finding: mark it `unverifiable` yourself
48
48
  rather than waiting for the critic to find it. Grep output, a file name, a path, an endpoint
49
- string, or the behaviour of a sibling module are not receipts for what code does; they prove
50
- those things exist, not what they do.
51
-
52
- Save the list to `.self-critique/author-claims.json` as an array of
53
- `{ id, text, load_bearing, receipt }`. Do NOT show it to the critic in round one.
54
-
55
- **Replay pass.** Before spawning the critic, check the answer against every stored rule. Resolve
56
- the memory dir as the auto-memory dir for the current project, else the repo's `.claude/memory`;
57
- if neither exists, skip replay, evidence-check, and prune with a one-line note. Run
58
- `node <skill>/scripts/rule-store.mjs checklist --dir <memory dir>`, then open each listed rule's
59
- memory file and read its body before testing the answer against it. The checklist's names and
60
- descriptions alone are insufficient. Tag each hit `(recurring)` in the report and record it with
49
+ string, or the behaviour of a sibling module are not receipts for what code does.
50
+
51
+ Save the list to `$RUN/author-claims.json` as an array of `{ id, text, load_bearing, receipt }`.
52
+ Do NOT show it to the critic in round one.
53
+
54
+ **Replay pass.** Before spawning the critic, check the answer against this skill's own rules.
55
+ Resolve the memory dir as the auto-memory dir for the current project, else the repo's
56
+ `.claude/memory`; if neither exists, skip replay, evidence-check, and prune with a one-line note.
57
+ Run `node <skill>/scripts/rule-store.mjs checklist --dir <memory dir>`. It lists only rules marked
58
+ `rule_store: self-critique`; open only those files and read each body before testing the answer
59
+ against it (names and descriptions alone are insufficient). Do not read the rest of the memory
60
+ dir. Tag each hit `(recurring)` in the report and record it with
61
61
  `node <skill>/scripts/rule-store.mjs fire <name> --dir <memory dir> --date <today>`.
62
- Fire counters and pruning apply only to rules in this memory directory. Rules routed to
63
- `CLAUDE.md`, `AGENTS.md`, or the shared store are neither counted nor pruned.
64
62
 
65
63
  2. **Spawn the critic (blind).** Launch one independent agent with live-source access (issue tracker,
66
64
  code host, error monitor, the repo). Round one input is the original task text and the answer
67
65
  verbatim, nothing else: the critic extracts the claims itself and never sees your list or sources.
68
- Use the prompt template below. The critic must return one fenced JSON block with `claims` (its own
69
- list, each `{ text, load_bearing, status, checked_by, receipt }`), `missed`, `where_wrong`,
70
- `shapes` and `verdict` (AGREE / AGREE-WITH-CAVEATS / DISAGREE). There is no `score` field: the
71
- score is computed in Step 2b.
66
+ Use the prompt template below. The critic returns one fenced JSON block with `claims`, `missed`,
67
+ `where_wrong`, `shapes` and `verdict`. There is no `score` field. **Save the returned JSON
68
+ verbatim** as `$RUN/critic-r<N>.json` (N is the round); the ledger is checked against it.
72
69
 
73
70
  2b. **Merge into the ledger.** Match the critic's claims to yours by meaning and set `origin` on
74
- each: `both`, `author` (only you found it), `critic` (only the critic found it). Every critic
75
- finding with `checked_by: inferred` must be re-verified by you before it may become `verified`
76
- or `refuted`; if you cannot verify it, it stays `inferred`. Both statuses require
77
- `checked_by: command` or `checked_by: read` and a non-empty receipt; validation rejects inferred evidence or a missing
78
- receipt. Save `.self-critique/ledger-v1.json`, then run
79
- `node <skill>/scripts/claim-ledger.mjs score .self-critique/ledger-v1.json` and
80
- `node <skill>/scripts/claim-ledger.mjs summary .self-critique/ledger-v1.json` (an invalid ledger
81
- exits 2 and prints the errors as JSON).
82
- Claims found by only one side are reported under their own heading, "Asymmetric claims".
83
-
84
- Ledger shape (`version` is always `1`):
85
-
86
- ```json
87
- { "version": 1,
88
- "claims": [{ "id": "c1", "text": "...", "load_bearing": true, "origin": "both",
89
- "status": "verified", "checked_by": "command", "receipt": "quoted output" }],
90
- "missed": [{ "id": "m1", "text": "...", "load_bearing": false, "checked_by": "read" }] }
71
+ each: `both`, `author` (only you found it), `critic` (only the critic found it). Every entry
72
+ carries its link back: `author_id` (the id in `author-claims.json`) for `author` and `both`,
73
+ `critic_ref` (`"r1:claims.3"` or `"r1:missed.1"`) for `critic` and `both` and on every `missed`
74
+ entry. Nothing from either side may be left out: every author claim and every critic item needs
75
+ an entry. Every critic finding with `checked_by: inferred` must be re-verified by you before it
76
+ may become `verified` or `refuted`; if you cannot, it stays `inferred` (and costs the same as
77
+ unverifiable when load-bearing). Save `$RUN/ledger-v1.json`, then run, always with all three
78
+ flags that apply (`--prev` from round two on):
79
+
80
+ ```bash
81
+ node <skill>/scripts/claim-ledger.mjs score $RUN/ledger-v1.json \
82
+ --author $RUN/author-claims.json --critic r1=$RUN/critic-r1.json [--prev $RUN/ledger-v<N-1>.json]
83
+ node <skill>/scripts/claim-ledger.mjs summary $RUN/ledger-v1.json
91
84
  ```
92
85
 
93
- - `origin`: `author` | `critic` | `both`
94
- - `status`: `verified` | `refuted` | `unverifiable` | `inferred`
95
- - `checked_by`: `command` (run, output quoted) | `read` (file or record opened, quoted) |
96
- `inferred` (reasoning only). Required on `missed` items too; an `inferred` missed item is not
97
- penalised. A `verified` or `refuted` claim may not use inferred evidence and requires a
98
- non-empty receipt.
99
-
100
- 3. **Decide and loop.** Accept a score of at least 90 only after all fixable findings are resolved
101
- or explicitly qualified in the answer and report; otherwise continue the critique loop. Stop
102
- when that condition holds, OR no ledger item is left that a revision could fix, OR 3 rounds have run.
103
- Otherwise revise the answer to produce `v2`, write `ledger-v2.json`, and run
104
- `node <skill>/scripts/claim-ledger.mjs ratchet .self-critique/ledger-v1.json .self-critique/ledger-v2.json`
105
- on the previous and new ledger: a lower re-score discards the revision, and you keep the winner. Round
106
- two and later hand the critic your receipts for the still-open claims (it is no longer blind).
107
- **Hard cap: 3 critic rounds.** (A known ceiling: raise it only if a round is still finding real,
108
- fixable defects.)
86
+ A ledger that drops a claim, cites a missing critic item, or loses an id from the previous round
87
+ exits 2 with the errors as JSON: fix the ledger, not the check. Output with
88
+ `"integrity": "unchecked"` was run without those flags and may not be reported as a score.
89
+ Claims found by only one side go under "Asymmetric claims".
90
+
91
+ 3. **Decide and loop.** After each round run
92
+ `node <skill>/scripts/claim-ledger.mjs status $RUN/ledger-v1.json [$RUN/ledger-v2.json ...]`.
93
+ It prints `first_score`, `final_score`, `trajectory`, `open` (`load_bearing` and `other` counts)
94
+ and `done`. **Stop when** `done` is true (no load-bearing claim is refuted, unverifiable or
95
+ inferred, and no load-bearing missed item remains, inferred ones included), OR nothing left open can be fixed by a
96
+ revision (say why in "Declined findings"), OR 3 rounds have run. There is no score threshold:
97
+ the critic-only penalty can never be revised away, so a score target would loop on nothing.
98
+
99
+ Otherwise revise the answer to produce `v2`, write `$RUN/ledger-v2.json` (it keeps every earlier
100
+ claim id), and run
101
+ `node <skill>/scripts/claim-ledger.mjs ratchet $RUN/ledger-v1.json $RUN/ledger-v2.json --author $RUN/author-claims.json --critic r1=$RUN/critic-r1.json --critic r2=$RUN/critic-r2.json`.
102
+ A lower re-score discards the revision and you keep the winner. Round two and later hand the
103
+ critic your receipts for the still-open claims (it is no longer blind). **Hard cap: 3 critic
104
+ rounds.**
109
105
 
110
106
  **Cost.** The critic runs on a mid-tier model (Sonnet class) by default. Escalate one tier only
111
107
  when a mid-tier round found nothing and the answer is load-bearing. When the budget is tight,
112
108
  verify load-bearing claims first.
113
109
 
114
- 4. **Report, always, even after a single round.** In this order:
115
- - **Corrected answer (`v_final`)** - restated in full, not as a diff, so the user can act on it
116
- without reading anything else. After a single round with no revision, restate `v1` unchanged.
117
- - **Claim ledger** - run `node <skill>/scripts/claim-ledger.mjs summary <ledger for v_final>`
118
- and `node <skill>/scripts/claim-ledger.mjs score <ledger for v_final>` using the ledger for
119
- whichever version the ratchet accepted (for example, `.self-critique/ledger-v2.json`). Report
120
- that table and its computed score.
110
+ 4. **Report, always, even after a single round.** Lead with two numbers, then the rest in order:
111
+ - **Headline** - the first-answer score (round 1, what the user would have got without this
112
+ skill) and the open-defect count from `status` (load-bearing and other). The first-answer
113
+ score is the honest quality number; the final score only measures the revision.
114
+ - **Corrected answer (`v_final`)** - restated in full, not as a diff. After a single round with
115
+ no revision, restate `v1` unchanged and label it unrevised. If load-bearing defects are still
116
+ open, give their count and the stop reason beside it; never call that outcome clean.
117
+ - **Score trajectory** - for example `72 -> 88 -> 94 (+22 pts)`, all computed. If only one round
118
+ ran with `done` true, state `no revision needed`; if it stopped with load-bearing defects open, say that instead. Add the trend from
119
+ `node <skill>/scripts/run-store.mjs history --cwd "$PWD"` (first-answer score per run).
120
+ - **Claim ledger** - the `summary` table for the ledger the ratchet kept, and its `score` with
121
+ `integrity: checked`.
121
122
  - **Where you were wrong** - consolidated, each item with the receipt the critic cited.
122
123
  - **Asymmetric claims** - claims only you found, and claims only the critic found.
123
124
  - **Recurring rules fired** - each stored rule the replay pass hit, with its new `fires` count.
124
- - **Iterations to satisfy** - how many critic rounds it took (1 means it was solid first pass).
125
- - **Score trajectory** - for example `72 -> 88 -> 94 (+22 pts)`, all computed scores. If only one
126
- round ran, state `no revision needed`.
125
+ - **Iterations to satisfy** - how many critic rounds it took (1 with `done` true means it was solid first pass).
127
126
  - **Unverifiable** - anything you should not present as fact.
128
127
  - **Declined findings** - ledger items you chose not to fix, with the reason. Silently dropping
129
128
  one looks identical to missing it.
130
- - **Rules written** - where each rule went and what it says (see Step 5).
131
- - **Rules proposed for deletion** - the candidates from the prune pass, or `none`.
132
-
133
- 5. **Convert the outcome into a durable rule.** See below. Skipping this step is what makes the
134
- same critique necessary again next week.
135
-
136
- ## Step 5: turn the critique into something that outlives the session
137
-
138
- A score is a measurement, not an improvement. The improvement is the rule you write down, in a
139
- place a future session actually reads, before you move on.
140
-
141
- **Not every finding earns a rule.** Write one only when the finding passes both gates:
142
-
143
- - **Recurrence** - the same *shape* of mistake could plausibly happen again on a different task.
144
- - **Cost** - it would have reached the user, cost real rework, or damaged their credibility with
145
- someone else.
146
-
147
- A one-off factual slip, a typo, or a finding fully explained by this task's specifics fails both.
148
- Writing a rule for it pollutes the store, and a littered store is worse than a thin one, because
149
- the next session stops reading it.
150
-
151
- **Write the shape, not the incident.** The incident is the evidence; the shape is the rule. Ask
152
- what class of reasoning produced the error, then name that class:
129
+ - **Rules written** and **Rules proposed for deletion** (Step 5), or `none`.
153
130
 
154
- | Incident | Shape worth keeping |
155
- | --- | --- |
156
- | Called an endpoint a read because the path was a noun and a sibling module imported | A conclusion drawn from evidence that does not cover the claim |
157
- | Priced an open design question as "small" in the same sentence that asked which design was wanted | Never attach a size to an answer you are simultaneously asking for |
158
- | Described a batch from the one member that was checked | Check the risk-deciding field on every member before describing the set |
131
+ 5. **Convert the outcome into a durable rule.** Skipping this step is what makes the same critique
132
+ necessary again next week. Write a rule only when the finding passes both gates:
159
133
 
160
- **Route it to the narrowest store the host has**, in this order, and only one of them:
134
+ - **Recurrence** - the same *shape* of mistake could plausibly happen again on a different task.
135
+ - **Cost** - it would have reached the user, cost real rework, or damaged their credibility.
161
136
 
162
- 1. The user's or project's agent memory, when the rule is about how to work with this user or this
163
- project.
164
- 2. The repository's own `CLAUDE.md` / `AGENTS.md`, when the rule is true only inside that codebase.
165
- 3. A shared, cross-session store, when the rule holds across projects. Use `context-repo` to resolve
166
- it, or `shared-knowledge-artifact` when several agents need to read the same ledger.
167
-
168
- Broadening a rule's scope so it qualifies for a wider store is the failure mode to avoid: one
169
- incident on one afternoon is not standing policy. Let the evidence decide where it lands.
170
-
171
- **Each rule carries three things.** Without all three the next session cannot act on it:
172
-
173
- - **The rule**, stated as the shape, in the imperative.
174
- - **Why**, with the incident and its receipt, dated. A rule with no cost attached gets argued away.
175
- - **How to apply**, naming the moment the rule fires ("before drafting outbound text", "before
176
- describing a batch"), not just the principle.
177
-
178
- Before writing to shared persistence, redact the incident evidence, including when using
179
- `context-repo` or `shared-knowledge-artifact`, while still including the incident and its dated
180
- receipt. This redaction requirement does not apply to local agent memory or repository-rule writes.
181
-
182
- **Dedupe before writing.** Read the store first. If a rule of the same shape exists, add one dated
183
- evidence line to it instead of creating a second entry, with at most three evidence lines per rule.
184
- A fourth incident means the rule named the incident, not the shape: rewrite the rule text and keep
185
- the three most recent evidence lines. Link related rules instead of restating them. Only when the
186
- memory directory resolved in Step 1 exists, run
187
- `node <skill>/scripts/rule-store.mjs evidence-check --dir <memory dir>` before writing and report
188
- any rule it flags. Skip this command when neither supported memory directory exists.
189
-
190
- **Memory rule identity and counters.** Mark each rule stored by this workflow with
191
- `rule_store: self-critique` under `metadata:` in its memory file's frontmatter. Mark an existing
192
- rule only after reading it and confirming it belongs to this workflow. Only marked rules are
193
- pruning candidates; unrelated project and user memories are excluded. A memory rule's `fires` and
194
- `last_fired` live under `metadata:` and are written only by `fire`. Rules routed to `CLAUDE.md`,
195
- `AGENTS.md`, or the shared store are neither counted nor pruned.
196
-
197
- **Prune pass.** At the end of this step, only when a valid memory directory is available, run
198
- `node <skill>/scripts/rule-store.mjs prune --dir <memory dir> --idle-days 60`. List the candidates
199
- in the report under "Rules proposed for deletion". Skip this command when neither supported memory
200
- directory exists. Never delete a rule without the user's reply.
201
-
202
- **Then close the loop.** State in your report where the rule was written and what it says, so the
203
- user can veto it. A rule the user has not seen is a rule they cannot correct.
137
+ A one-off factual slip, a typo, or a finding fully explained by this task's specifics fails both;
138
+ a littered store is worse than a thin one. Write the shape (the class of reasoning that produced
139
+ the error), not the incident. Route it to the narrowest store, in this order, and only one:
140
+ (1) the user's or project's agent memory, (2) the repo's `CLAUDE.md` / `AGENTS.md`, (3) a shared
141
+ cross-session store. Each rule carries three things: **the rule** in the imperative, **why** (the
142
+ incident, dated, with its receipt), and **how to apply** (the moment it fires). Mark memory rules
143
+ `rule_store: self-critique`, dedupe before writing, run the prune pass, and tell the user what you
144
+ wrote so they can veto it. Shapes table, routing detail, dedupe, redaction, identity and the
145
+ prune pass: `references/rules.md`.
204
146
 
205
147
  ## Critic prompt template
206
148
 
@@ -248,98 +190,14 @@ the default stance is that the answer is wrong until a live source proves otherw
248
190
  >
249
191
  > Do not output a score. It is computed from your claims.
250
192
 
251
- ### Score anchors
252
-
253
- The score is `100` minus penalties, floored at 0. Calibrate against these three ledgers (all claims
254
- `origin: both`; `node <skill>/scripts/claim-ledger.mjs anchors` prints them as JSON).
255
-
256
- **Strong, score 95**
257
-
258
- | id | load_bearing | status | checked_by |
259
- | --- | --- | --- | --- |
260
- | a1 | no | inferred | inferred |
261
-
262
- **Middling, score 72**
263
-
264
- | id | load_bearing | status | checked_by |
265
- | --- | --- | --- | --- |
266
- | b1 | no | refuted | read |
267
- | b2 | no | refuted | read |
268
- | b3 | no | unverifiable | read |
269
- | b4 | no | unverifiable | read |
270
-
271
- **Weak, score 40**
272
-
273
- | id | load_bearing | status | checked_by |
274
- | --- | --- | --- | --- |
275
- | c1 | yes | refuted | read |
276
- | c2 | yes | refuted | read |
277
- | c3 | yes | unverifiable | read |
278
-
279
- Penalties:
280
-
281
- | Finding | Points off |
282
- | --- | --- |
283
- | refuted, load-bearing | 25 |
284
- | refuted | 10 |
285
- | unverifiable, load-bearing | 10 |
286
- | unverifiable | 4 |
287
- | inferred, accepted | 5 |
288
- | missed, load-bearing | 15 |
289
- | missed | 5 |
290
- | verified but found only by the critic | 5 |
291
-
292
- ## Optional: auto-offer via a Claude Code Stop hook
293
-
294
- A hook is a shell command, so it cannot run this loop itself. What it can do is **nudge**: after a
295
- substantial answer, it offers the review and you run the skill only if the user says yes.
296
-
297
- The hook ships with this skill at `scripts/critique-nudge.mjs`. Register it as a `Stop` hook in your
298
- Claude Code settings (`.claude/settings.json` for a team, `.claude/settings.local.json` for
299
- yourself):
300
-
301
- ```json
302
- {
303
- "hooks": {
304
- "Stop": [
305
- {
306
- "hooks": [
307
- {
308
- "type": "command",
309
- "command": "node \"$CLAUDE_PROJECT_DIR/.claude/hooks/critique-nudge.mjs\"",
310
- "timeout": 15
311
- }
312
- ]
313
- }
314
- ]
315
- }
316
- }
317
- ```
318
-
319
- Copy `scripts/critique-nudge.mjs` to `.claude/hooks/critique-nudge.mjs` (or point the command at
320
- wherever you keep it). After an answer whose final prose is at least 1500 characters, the hook blocks
321
- the turn once and instructs the agent to append a one-line "critical-thinking review" offer, then
322
- stop. Two loop guards keep it from firing forever: it does nothing when `stop_hook_active` is set, and
323
- nothing when the answer already contains the offer phrase. On any malformed input it exits silently
324
- and never blocks the user.
325
-
326
- The 1500-character threshold is a heuristic with a known ceiling: it misses short but dense
327
- tool-heavy turns. If that matters, extend the script to also count tool calls since the last user
328
- message.
329
-
330
193
  ## Notes
331
194
 
332
- - One critic round is fine and common. If the answer was already solid, report
195
+ - One critic round is fine and common. If the answer was already solid (`done` true), report
333
196
  `iterations: 1, no revision needed` and the single score rather than forcing a revision.
334
197
  - Diversity beats redundancy: if a claim can fail in more than one way, give the critic distinct
335
198
  lenses (correctness, completeness, does-it-reproduce) instead of repeating the same check.
336
199
  - The critic verifies against live sources; it does not rewrite the answer or score it. You revise;
337
200
  the score is recomputed from the ledger.
338
- - In round two, hand the critic your receipts for the claims still open, so it spends its budget on
339
- the claims still standing instead of re-deriving the ones already settled.
340
201
  - A critic finding you disagree with is worth one challenge. Put the reasoning to it and let it rule;
341
202
  if it concedes, that is a real answer for the report, and the reasoning is what the user needs to
342
203
  see either way.
343
- - The honest test of Step 5 is not that a rule was written, it is that the next task of the same
344
- class does not need this skill to catch the same thing. If it does, the rule named the incident
345
- instead of the shape - rewrite it, do not add another.