luciazero 2.2.0 → 2.4.1

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/README.md CHANGED
@@ -1,31 +1,37 @@
1
- **English** | [ภาษาไทย](README.th.md)
2
-
3
- # Luciazero for Claude Code & Codex CLI
4
-
5
- [![npm](https://img.shields.io/npm/v/luciazero)](https://www.npmjs.com/package/luciazero)
6
- [![CI](https://github.com/ohm41321/luciazero/actions/workflows/ci.yml/badge.svg)](https://github.com/ohm41321/luciazero/actions/workflows/ci.yml)
7
- [![license](https://img.shields.io/github/license/ohm41321/luciazero)](LICENSE)
8
-
9
- <p align="center">
10
- <img src="https://raw.githubusercontent.com/ohm41321/luciazero/main/docs/assets/lucia.png" width="280" alt="Lucia — Luciazero's mascot">
11
- </p>
12
-
13
- Luciazero makes coding agents run a `plan → change → verify → fix` loop instead
14
- of handing back work they merely believe is finished.
1
+ <div align="center">
2
+ <img src="https://cdn.jsdelivr.net/gh/ohm41321/luciazero@37cb470e2b7c704ff32f3a46dbb125e312875960/docs/assets/lucia.png" width="220" alt="Lucia — Luciazero's mascot">
3
+ <h1>Luciazero</h1>
4
+ <p>
5
+ <strong>Evidence-first discipline for coding agents.</strong><br>
6
+ <code>plan → change → verify → fix</code>
7
+ </p>
8
+ <p>
9
+ <a href="https://www.npmjs.com/package/luciazero"><img src="https://img.shields.io/npm/v/luciazero" alt="npm version"></a>
10
+ <a href="https://github.com/ohm41321/luciazero/actions/workflows/ci.yml"><img src="https://github.com/ohm41321/luciazero/actions/workflows/ci.yml/badge.svg" alt="CI status"></a>
11
+ <a href="https://github.com/ohm41321/luciazero/blob/main/LICENSE"><img src="https://img.shields.io/github/license/ohm41321/luciazero" alt="MIT license"></a>
12
+ </p>
13
+ </div>
14
+
15
+ **English** · [ภาษาไทย](https://github.com/ohm41321/luciazero/blob/main/README.th.md)
16
+
17
+ Luciazero is a lightweight discipline layer for coding agents. It works with
18
+ Claude Code, Codex CLI, and compatible skill runtimes through plugin, CLI, or
19
+ skills-only installs.
15
20
 
16
21
  > Done is proven by a command, not by my judgment. If no verification command
17
22
  > exists, that is the first bug.
18
23
 
19
- It ships a compact [9-rule doctrine](claude/luciazero.md), 11 on-demand skills,
20
- verification hooks, a risk-routed reviewer, and an eval harness. It is a
21
- discipline layer, not an agent runtime or overnight orchestrator.
24
+ It ships a compact [9-rule doctrine](https://github.com/ohm41321/luciazero/blob/main/claude/luciazero.md), 11 on-demand skills,
25
+ verification hooks, a risk-routed reviewer, and an eval harness. It is designed
26
+ to make completion claims auditable—not to replace an agent runtime or become an
27
+ overnight orchestrator.
22
28
 
23
- ## See it in 15 seconds
29
+ ## See the loop
24
30
 
25
31
  This GIF is driven by the shipped hooks, not a mockup:
26
32
 
27
33
  <p align="center">
28
- <img src="https://raw.githubusercontent.com/ohm41321/luciazero/main/docs/assets/statusline-demo.gif" width="720" alt="Edit becomes unverified, a red check stays red, and a successful verify turns green">
34
+ <img src="https://cdn.jsdelivr.net/gh/ohm41321/luciazero@37cb470e2b7c704ff32f3a46dbb125e312875960/docs/assets/statusline-demo.gif" width="720" alt="Edit becomes unverified, a red check stays red, and a successful verify turns green">
29
35
  </p>
30
36
 
31
37
  ```text
@@ -34,7 +40,7 @@ This GIF is driven by the shipped hooks, not a mockup:
34
40
  ✅ verify 3m → the latest check passed three minutes ago
35
41
  ```
36
42
 
37
- ## What it prevents
43
+ ## What it protects
38
44
 
39
45
  | Failure mode | Mechanism |
40
46
  |---|---|
@@ -47,34 +53,42 @@ This GIF is driven by the shipped hooks, not a mockup:
47
53
  | Context lost between agents | `/lucia-relay` transfers evidence, next action, and negative knowledge |
48
54
 
49
55
  Mechanical guarantees run in `test.sh`; behavioral claims are measured by the
50
- [eval harness](eval/README.md).
56
+ [eval harness](https://github.com/ohm41321/luciazero/blob/main/eval/README.md).
51
57
 
52
- ## Carry unfinished work across agents
58
+ ## Keep work portable
53
59
 
54
60
  `/lucia-relay` transfers decisions and evidence instead of dumping a chat
55
61
  transcript. Session A writes canonical `LUCIA_RELAY.json` plus a generated
56
- human view; session B checks the Git fingerprint, reads the exact next action
57
- and refuted hypotheses, re-runs verification, then explicitly consumes the
58
- relay.
59
-
60
- Relay decides where the recipient is before it writes pointers. Same-machine
61
- receivers may use full local paths. Cross-machine relays require a clean pushed
62
- commit, reject machine-only paths, and carry otherwise-local knowledge inline
63
- in the JSON.
62
+ human view; session B checks trusted repository identity, HEAD, and manifest
63
+ digest, reads the exact next action and negative knowledge, re-runs every
64
+ approved verification command in its own harness, then explicitly consumes.
65
+
66
+ Same-machine receivers may use local paths and schema 1/2. Cross-machine schema
67
+ 3 is created only after commit and push: it publishes a commit-named transfer
68
+ tag and records a sanitized clone URL, head/base OIDs, committed changed files,
69
+ and inline knowledge.
70
+ The receiver supplies the expected route, HEAD, and manifest digest independently, so a
71
+ forged artifact cannot downgrade validation. Detached checkouts are supported;
72
+ Relay never executes artifact commands. The receiver runs them in its coding
73
+ harness and passes `consume --verified` only after every result matches.
64
74
 
65
75
  <p align="center">
66
- <img src="https://raw.githubusercontent.com/ohm41321/luciazero/main/docs/assets/relay-demo.gif" width="720" alt="One session creates a Lucia Relay; another validates it, detects repository drift, re-runs evidence, and consumes it">
76
+ <img src="https://cdn.jsdelivr.net/gh/ohm41321/luciazero@37cb470e2b7c704ff32f3a46dbb125e312875960/docs/assets/relay-demo.gif" width="720" alt="One session creates a Lucia Relay; another validates it, detects repository drift, re-runs evidence, and consumes it">
67
77
  </p>
68
78
 
69
- The GIF runs the [shipped implementation](docs/assets/relay-demo.sh) in a
79
+ The GIF runs the [shipped implementation](https://github.com/ohm41321/luciazero/blob/main/docs/assets/relay-demo.sh) in a
70
80
  temporary Git repository. CI's `relay-transfer` fixture scores the complete
71
81
  reference 6/6 and rejects a generic Markdown handoff (1/6) plus a
72
82
  content-complete but stale fingerprint (5/6). Those are mechanical protocol
73
- checks—not model-uplift results. See the [method and limits](docs/benchmark.md#skill-protocol-evidence).
83
+ checks—not model-uplift results. See the [method and limits](https://github.com/ohm41321/luciazero/blob/main/docs/benchmark.md#skill-protocol-evidence).
74
84
 
75
85
  ## Install
76
86
 
77
- ### Claude Code plugin recommended
87
+ Luciazero supports Claude Code, Codex CLI, and compatible agents. Choose the
88
+ installation path that matches your workflow.
89
+
90
+ <details>
91
+ <summary><strong>Recommended · Claude Code plugin</strong></summary>
78
92
 
79
93
  Carries the doctrine, all skills, reviewer, and verify-tracking hooks:
80
94
 
@@ -87,20 +101,25 @@ Start a repository with `/luciazero:ready`. Plugin skills use the
87
101
  `/luciazero:` prefix. The plugin has no statusline because Claude Code plugins
88
102
  cannot set one.
89
103
 
90
- ### Skills only — any compatible agent
104
+ </details>
105
+
106
+ <details>
107
+ <summary><strong>Skills only · any compatible agent</strong></summary>
91
108
 
92
109
  ```bash
93
110
  npx skills add ohm41321/luciazero
94
111
  ```
95
112
 
96
- This installs the 11 skills plus the temporary `/luciazero-bootstrap`
97
- compatibility alias: no doctrine, reviewer, or hooks.
113
+ This installs the 11 skills: no doctrine, reviewer, or hooks.
98
114
 
99
- ### Classic Claude Code and Codex
115
+ </details>
116
+
117
+ <details>
118
+ <summary><strong>Classic install · Claude Code or Codex CLI</strong></summary>
100
119
 
101
120
  ```bash
102
121
  npx luciazero # Claude Code
103
- npx luciazero --with-hooks # Claude Code + hooks/statusline; needs Python 3
122
+ npx luciazero --with-hooks # Claude Code + hooks/statusline; needs Python 3.9+
104
123
  npx luciazero codex # Codex CLI
105
124
 
106
125
  npx luciazero uninstall
@@ -112,7 +131,9 @@ Classic installs support `--status`; Codex receives the doctrine and skills but
112
131
  not Claude-only hooks/statusline. Installers back up name collisions and remove
113
132
  only exact Luciazero-managed copies on uninstall.
114
133
 
115
- ## Update
134
+ </details>
135
+
136
+ ## Update safely
116
137
 
117
138
  Luciazero never changes classic or Codex files in the background.
118
139
 
@@ -141,7 +162,7 @@ Claude Code can auto-update the plugin at startup: open `/plugin` →
141
162
  marketplaces leave this off by default. For release-only notifications, use
142
163
  GitHub **Watch → Custom → Releases**.
143
164
 
144
- ## The 11 skills
165
+ ## Skills at a glance
145
166
 
146
167
  Run `/ready` first; the rest activate when their moment arrives.
147
168
 
@@ -168,7 +189,7 @@ Risky diffs also pass through one read-only `reviewer` with `security`,
168
189
  `contract`, or `general` focus. Security and contract risk together receive two
169
190
  separate passes.
170
191
 
171
- ## Evidence
192
+ ## Evidence & limitations
172
193
 
173
194
  <!-- BEGIN GENERATED: benchmark-evidence -->
174
195
 
@@ -200,16 +221,17 @@ Snapshot: 2026-08-12.
200
221
 
201
222
  *One Luciazero run was invalidated by model capacity. †This is a
202
223
  **ceiling-effect warning, not evidence of uplift or no effect**: the pilot has
203
- only one run per arm per task. See the [full benchmark](docs/benchmark.md),
204
- [campaign registry](eval/results/campaigns.json), and
205
- [raw pilot rows](eval/results/gpt-5.6-terra-medium-pilot-2026-08-12.jsonl).
224
+ only one run per arm per task. See the [full benchmark](https://github.com/ohm41321/luciazero/blob/main/docs/benchmark.md),
225
+ [campaign registry](https://github.com/ohm41321/luciazero/blob/main/eval/results/campaigns.json), and
226
+ [raw pilot rows](https://github.com/ohm41321/luciazero/blob/main/eval/results/gpt-5.6-terra-medium-pilot-2026-08-12.jsonl).
206
227
 
207
228
  <!-- END GENERATED: benchmark-evidence -->
208
229
 
209
- ## Requirements and safety
230
+ ## Security & requirements
210
231
 
211
232
  - Node.js 18+ for the CLI and discipline report.
212
- - Bash for classic installers; Python 3 for hooks and Lucia Relay.
233
+ - Bash for classic installers; Python 3.9+ for hooks and Lucia Relay
234
+ (`install.sh --with-hooks` refuses anything older).
213
235
  - Core installers, hooks, helpers, and graders are offline. Real behavioral
214
236
  evals invoke a model CLI and consume API credit or subscription quota.
215
237
  - Hooks run commands on your machine. Read them before enabling them.
@@ -219,10 +241,18 @@ only one run per arm per task. See the [full benchmark](docs/benchmark.md),
219
241
  - Set `LUCIAZERO_VERIFY_CMD` to the repo's exact fast verify command.
220
242
  - Put `LUCIAZERO_STRICT_VERIFY_CMD` only in personal settings, never in a
221
243
  committed repository config. Strict mode fails open on internal errors.
244
+ - A repository's committed `.claude/settings.json` cannot configure Luciazero
245
+ at all: every `LUCIAZERO_*` key (and `CLAUDE_CONFIG_DIR`) declared there — in
246
+ the session directory or any ancestor up to the repository root — is refused
247
+ and named once at `SessionStart`. Your own settings still configure it: the
248
+ search stops at the repo root and at `$HOME`, and never reads your global
249
+ `~/.claude/settings.json` or gitignored `.claude/settings.local.json`.
250
+ - Windows: the installers and hooks are Bash scripts — run them under WSL.
251
+ `npx luciazero discipline` works in native Node.
222
252
 
223
- See [SECURITY.md](SECURITY.md) for the complete trust boundary.
253
+ See [SECURITY.md](https://github.com/ohm41321/luciazero/blob/main/SECURITY.md) for the complete trust boundary.
224
254
 
225
- ## Development
255
+ ## Developing Luciazero
226
256
 
227
257
  ```bash
228
258
  ./test.sh --fast # intermediate loop: core doctrine/hooks/report/Relay checks
@@ -238,16 +268,16 @@ tier.
238
268
 
239
269
  More detail:
240
270
 
241
- - [Architecture and trade-offs](docs/comparison.md)
242
- - [Eval methodology](eval/README.md)
243
- - [Benchmark results and GPT plan](docs/benchmark.md)
244
- - [Raw campaign registry](eval/results/campaigns.json)
245
- - [Experiment log](docs/experiments.md)
246
- - [Contributing](CONTRIBUTING.md)
247
- - [Publishing](docs/publishing.md)
248
- - [Changelog](CHANGELOG.md)
271
+ - [Architecture and trade-offs](https://github.com/ohm41321/luciazero/blob/main/docs/comparison.md)
272
+ - [Eval methodology](https://github.com/ohm41321/luciazero/blob/main/eval/README.md)
273
+ - [Benchmark results and GPT plan](https://github.com/ohm41321/luciazero/blob/main/docs/benchmark.md)
274
+ - [Raw campaign registry](https://github.com/ohm41321/luciazero/blob/main/eval/results/campaigns.json)
275
+ - [Experiment log](https://github.com/ohm41321/luciazero/blob/main/docs/experiments.md)
276
+ - [Contributing](https://github.com/ohm41321/luciazero/blob/main/CONTRIBUTING.md)
277
+ - [Publishing](https://github.com/ohm41321/luciazero/blob/main/docs/publishing.md)
278
+ - [Changelog](https://github.com/ohm41321/luciazero/blob/main/CHANGELOG.md)
249
279
 
250
- ## Lucia family & support
280
+ ## Support the project
251
281
 
252
282
  Luciazero shares its mascot with [Lucia](https://lucia-discord-bot.vercel.app),
253
283
  a Thai-language Discord bot. If Luciazero saves you review cycles, you can
@@ -255,8 +285,8 @@ a Thai-language Discord bot. If Luciazero saves you review cycles, you can
255
285
 
256
286
  ## License
257
287
 
258
- [MIT](LICENSE)
288
+ [MIT](https://github.com/ohm41321/luciazero/blob/main/LICENSE)
259
289
 
260
290
  ## ภาษาไทย
261
291
 
262
- README ฉบับภาษาไทยเต็ม: [README.th.md](README.th.md)
292
+ README ฉบับภาษาไทยเต็ม: [README.th.md](https://github.com/ohm41321/luciazero/blob/main/README.th.md)
@@ -1,49 +1,57 @@
1
1
  ---
2
2
  name: reviewer
3
- description: Risk-routed adversarial code reviewer with general, security, and contract focus modes. Spawn before declaring a risky change done, or when asked to review a diff, branch, or PR. Tries to refute the change, reads callers and consumers, and never edits files. If the harness offers a built-in adversarial review command, prefer it; use this agent when none exists or an independent focused pass is wanted.
3
+ description: Adversarial reviewer with general, security, and contract routes. Use for diffs or risky closeout. Prefer built-in review; otherwise use this agent independently. Verifies callers and consumers, never edits, and prefers no finding over a false one.
4
4
  tools: Read, Grep, Glob, Bash
5
5
  model: inherit
6
6
  ---
7
7
 
8
- You are an adversarial code reviewer. Your job is to **refute** the change, not to approve it. Hunt for a real problem; praise is noise and is forbidden. An empty result after a genuine search is better than an invented finding.
8
+ # Reviewer
9
9
 
10
- ## Input
10
+ Refute the change; do not approve or praise it. Find verified defects that the
11
+ happy-path checks missed. A clean result is better than a speculative finding.
11
12
 
12
- You are given a diff, branch, PR, or changed-file list and an optional `focus`: `general` (default), `security`, or `contract`. If given a branch or nothing specific, derive the diff (`git diff`, `git diff main...HEAD`, `git show`). Read enough surrounding code to judge every hunk, then search call sites, consumers, schemas, and tests that still rely on the old behavior.
13
+ ## Route the search
13
14
 
14
- ## What to hunt
15
+ Input is a diff, branch, PR, changed-file list, and optional focus: `general`
16
+ (default), `security`, or `contract`. Derive the diff when needed. Read each
17
+ hunk in context, then rank risks by impact and reachability; investigate the
18
+ highest first instead of applying every checklist item equally.
15
19
 
16
- Automated checks already cover the happy path. Hunt what they do not:
20
+ - `security`: trace each changed trust boundary from external input to a
21
+ sensitive sink. Check validation, authorization, encoding, path containment,
22
+ command/query construction, secrets, failure defaults, and error disclosure.
23
+ - `contract`: identify the old observable shape, then search callers,
24
+ consumers, fixtures, docs, serializers, migrations, and compatibility code.
25
+ Include changed defaults and parse/format drift.
26
+ - `general`: prioritize error paths, state transitions, concurrency, resource
27
+ cleanup, and material edge cases.
17
28
 
18
- - **Edge cases** empty input, zero, negative, unicode, max length, first/last element, concurrent access
19
- - **Error paths** what happens when the call fails, the file is missing, the network drops; are errors swallowed?
20
- - **Changed contracts** public API shape, serialized formats, DB schema, config keys: does anything else consume the old shape?
21
- - **Unintended diff content** — files touched by accident, debug prints, commented-out code, secrets, dependency pins loosened
22
- - **Resource discipline** — leaks (handles, connections, subscriptions), missing cleanup on the error path
23
- - **Test honesty** — do the new/changed tests actually fail if the change is reverted? Tests that assert nothing, or were weakened to pass, are findings.
24
- - **Security** — injection via interpolated input, path traversal, secrets in code or logs
29
+ For every route also inspect unintended diff content, dependency changes, debug
30
+ artifacts, swallowed failures, and test honesty. A changed test is suspect if it
31
+ would still pass when the implementation is reverted.
25
32
 
26
- ## Focus routes
33
+ ## Evidence discipline
27
34
 
28
- - `security`: map every changed trust boundary from input to sensitive sink. Check validation, encoding, authorization, failure defaults, path containment, command/query construction, secret handling, and error disclosure. Read endpoint wiring and permission callers—not only the changed function.
29
- - `contract`: identify the old externally observable shape, then search all in-repo consumers, fixtures, docs, serializers, migrations, and compatibility shims. Treat silent default changes and parse/format drift as contracts too.
30
- - `general`: apply the whole checklist with extra attention to error paths, state transitions, concurrency, and resource cleanup.
35
+ Confirm each suspected defect in source before reporting it. Read direct callers
36
+ and consumers when they can prove reachability or compatibility. Use cheap,
37
+ read-only commands when decisive. Never edit, commit, or push.
31
38
 
32
- ## Rules
33
-
34
- - **Verify before reporting.** Read the actual code for each suspected finding. A finding you did not confirm against the source is speculation — drop it or mark it explicitly as unverified.
35
- - Run cheap read-only commands when they settle a question (`git log` for context, the test suite if it is fast). Never edit, never commit, never push.
36
- - No style or formatting nits unless they change meaning.
37
- - Stay inside the diff's causal scope; a defect in an unchanged consumer broken by the diff is in scope. Pre-existing unrelated problems go in one short "outside scope" line at the end.
39
+ Stay inside the diff's causal scope. No style or formatting findings unless they
40
+ change behavior. Do not narrate the search. Report every verified
41
+ `blocker`/`major`; report at most three `minor` findings, ranked by impact.
38
42
 
39
43
  ## Output
40
44
 
41
- One line per finding, most severe first:
45
+ One line per finding, severe first:
42
46
 
43
47
  ```
44
48
  path:line — severity — problem. Concrete fix.
45
49
  ```
46
50
 
47
- Severity: `blocker` (exploitable security, data loss, or fundamentally wrong result) / `major` (breaks a supported contract, permission boundary, or material edge case) / `minor` (works now, but has a concrete fragility).
51
+ - `blocker`: exploitable security issue, data loss, or fundamentally wrong result
52
+ - `major`: supported contract or permission boundary breaks
53
+ - `minor`: concrete fragility without an immediate material break
48
54
 
49
- If, after a genuine hunt, nothing survives verification: report exactly `No findings.` plus one sentence on what you checked. Do **not** invent findings to seem useful — a false finding costs more than an empty report.
55
+ If nothing survives verification, output exactly `No findings.` plus one short
56
+ sentence naming the boundaries checked. Put unrelated pre-existing defects in
57
+ one optional `Outside scope:` line.
@@ -1,49 +1,57 @@
1
1
  ---
2
2
  name: reviewer
3
- description: Risk-routed adversarial code reviewer with general, security, and contract focus modes. Spawn before declaring a risky change done, or when asked to review a diff, branch, or PR. Tries to refute the change, reads callers and consumers, and never edits files. If the harness offers a built-in adversarial review command, prefer it; use this agent when none exists or an independent focused pass is wanted.
3
+ description: Adversarial reviewer with general, security, and contract routes. Use for diffs or risky closeout. Prefer built-in review; otherwise use this agent independently. Verifies callers and consumers, never edits, and prefers no finding over a false one.
4
4
  tools: Read, Grep, Glob, Bash
5
5
  model: inherit
6
6
  ---
7
7
 
8
- You are an adversarial code reviewer. Your job is to **refute** the change, not to approve it. Hunt for a real problem; praise is noise and is forbidden. An empty result after a genuine search is better than an invented finding.
8
+ # Reviewer
9
9
 
10
- ## Input
10
+ Refute the change; do not approve or praise it. Find verified defects that the
11
+ happy-path checks missed. A clean result is better than a speculative finding.
11
12
 
12
- You are given a diff, branch, PR, or changed-file list and an optional `focus`: `general` (default), `security`, or `contract`. If given a branch or nothing specific, derive the diff (`git diff`, `git diff main...HEAD`, `git show`). Read enough surrounding code to judge every hunk, then search call sites, consumers, schemas, and tests that still rely on the old behavior.
13
+ ## Route the search
13
14
 
14
- ## What to hunt
15
+ Input is a diff, branch, PR, changed-file list, and optional focus: `general`
16
+ (default), `security`, or `contract`. Derive the diff when needed. Read each
17
+ hunk in context, then rank risks by impact and reachability; investigate the
18
+ highest first instead of applying every checklist item equally.
15
19
 
16
- Automated checks already cover the happy path. Hunt what they do not:
20
+ - `security`: trace each changed trust boundary from external input to a
21
+ sensitive sink. Check validation, authorization, encoding, path containment,
22
+ command/query construction, secrets, failure defaults, and error disclosure.
23
+ - `contract`: identify the old observable shape, then search callers,
24
+ consumers, fixtures, docs, serializers, migrations, and compatibility code.
25
+ Include changed defaults and parse/format drift.
26
+ - `general`: prioritize error paths, state transitions, concurrency, resource
27
+ cleanup, and material edge cases.
17
28
 
18
- - **Edge cases** empty input, zero, negative, unicode, max length, first/last element, concurrent access
19
- - **Error paths** what happens when the call fails, the file is missing, the network drops; are errors swallowed?
20
- - **Changed contracts** public API shape, serialized formats, DB schema, config keys: does anything else consume the old shape?
21
- - **Unintended diff content** — files touched by accident, debug prints, commented-out code, secrets, dependency pins loosened
22
- - **Resource discipline** — leaks (handles, connections, subscriptions), missing cleanup on the error path
23
- - **Test honesty** — do the new/changed tests actually fail if the change is reverted? Tests that assert nothing, or were weakened to pass, are findings.
24
- - **Security** — injection via interpolated input, path traversal, secrets in code or logs
29
+ For every route also inspect unintended diff content, dependency changes, debug
30
+ artifacts, swallowed failures, and test honesty. A changed test is suspect if it
31
+ would still pass when the implementation is reverted.
25
32
 
26
- ## Focus routes
33
+ ## Evidence discipline
27
34
 
28
- - `security`: map every changed trust boundary from input to sensitive sink. Check validation, encoding, authorization, failure defaults, path containment, command/query construction, secret handling, and error disclosure. Read endpoint wiring and permission callers—not only the changed function.
29
- - `contract`: identify the old externally observable shape, then search all in-repo consumers, fixtures, docs, serializers, migrations, and compatibility shims. Treat silent default changes and parse/format drift as contracts too.
30
- - `general`: apply the whole checklist with extra attention to error paths, state transitions, concurrency, and resource cleanup.
35
+ Confirm each suspected defect in source before reporting it. Read direct callers
36
+ and consumers when they can prove reachability or compatibility. Use cheap,
37
+ read-only commands when decisive. Never edit, commit, or push.
31
38
 
32
- ## Rules
33
-
34
- - **Verify before reporting.** Read the actual code for each suspected finding. A finding you did not confirm against the source is speculation — drop it or mark it explicitly as unverified.
35
- - Run cheap read-only commands when they settle a question (`git log` for context, the test suite if it is fast). Never edit, never commit, never push.
36
- - No style or formatting nits unless they change meaning.
37
- - Stay inside the diff's causal scope; a defect in an unchanged consumer broken by the diff is in scope. Pre-existing unrelated problems go in one short "outside scope" line at the end.
39
+ Stay inside the diff's causal scope. No style or formatting findings unless they
40
+ change behavior. Do not narrate the search. Report every verified
41
+ `blocker`/`major`; report at most three `minor` findings, ranked by impact.
38
42
 
39
43
  ## Output
40
44
 
41
- One line per finding, most severe first:
45
+ One line per finding, severe first:
42
46
 
43
47
  ```
44
48
  path:line — severity — problem. Concrete fix.
45
49
  ```
46
50
 
47
- Severity: `blocker` (exploitable security, data loss, or fundamentally wrong result) / `major` (breaks a supported contract, permission boundary, or material edge case) / `minor` (works now, but has a concrete fragility).
51
+ - `blocker`: exploitable security issue, data loss, or fundamentally wrong result
52
+ - `major`: supported contract or permission boundary breaks
53
+ - `minor`: concrete fragility without an immediate material break
48
54
 
49
- If, after a genuine hunt, nothing survives verification: report exactly `No findings.` plus one sentence on what you checked. Do **not** invent findings to seem useful — a false finding costs more than an empty report.
55
+ If nothing survives verification, output exactly `No findings.` plus one short
56
+ sentence naming the boundaries checked. Put unrelated pre-existing defects in
57
+ one optional `Outside scope:` line.
@@ -26,7 +26,9 @@ except Exception:
26
26
  model = ((d.get("model") or {}).get("display_name")) or "claude"
27
27
  cwd = ((d.get("workspace") or {}).get("current_dir")) or d.get("cwd") or os.getcwd()
28
28
 
29
- key = hashlib.md5(cwd.encode()).hexdigest()[:12]
29
+ # state-directory name, not a security decision — explicit so a FIPS python3
30
+ # does not raise here and drop the statusline to its minimal fallback line
31
+ key = hashlib.md5(cwd.encode(), usedforsecurity=False).hexdigest()[:12]
30
32
  uid = os.getuid() if hasattr(os, "getuid") else "unknown"
31
33
  base = os.path.join(os.environ.get("TMPDIR", "/tmp"), f"luciazero-verify-state-{uid}")
32
34
  try: