luciazero 2.3.0 → 2.4.2
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/LICENSE +1 -1
- package/README.md +35 -31
- package/agents/reviewer.md +34 -26
- package/claude/agents/reviewer.md +34 -26
- package/claude/hooks/luciazero-verify.sh +6 -14
- package/install-codex.sh +5 -1
- package/install.sh +3 -2
- package/package.json +10 -5
- package/skills/bisect/SKILL.md +11 -8
- package/skills/debug/SKILL.md +29 -23
- package/skills/discipline-report/SKILL.md +16 -6
- package/skills/done/SKILL.md +36 -30
- package/skills/experiment/SKILL.md +20 -17
- package/skills/imouto-mode/SKILL.md +29 -22
- package/skills/lucia-relay/SKILL.md +46 -32
- package/skills/lucia-relay/scripts/relay.py +599 -85
- package/skills/plan/SKILL.md +14 -10
- package/skills/ready/SKILL.md +82 -66
- package/skills/retro/SKILL.md +46 -39
- package/skills/show/SKILL.md +45 -96
- package/CHANGELOG.md +0 -712
- package/README.th.md +0 -277
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2026
|
|
3
|
+
Copyright (c) 2026 athit (athitfkm@gmail.com)
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<img src="https://
|
|
2
|
+
<img src="https://cdn.jsdelivr.net/gh/ohm41321/luciazero@37cb470e2b7c704ff32f3a46dbb125e312875960/docs/assets/lucia.png" width="220" alt="Lucia — Luciazero's mascot">
|
|
3
3
|
<h1>Luciazero</h1>
|
|
4
4
|
<p>
|
|
5
5
|
<strong>Evidence-first discipline for coding agents.</strong><br>
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
<p>
|
|
9
9
|
<a href="https://www.npmjs.com/package/luciazero"><img src="https://img.shields.io/npm/v/luciazero" alt="npm version"></a>
|
|
10
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="LICENSE"><img src="https://img.shields.io/github/license/ohm41321/luciazero" alt="MIT license"></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
12
|
</p>
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
|
-
**English** · [ภาษาไทย](README.th.md)
|
|
15
|
+
**English** · [ภาษาไทย](https://github.com/ohm41321/luciazero/blob/main/README.th.md)
|
|
16
16
|
|
|
17
17
|
Luciazero is a lightweight discipline layer for coding agents. It works with
|
|
18
18
|
Claude Code, Codex CLI, and compatible skill runtimes through plugin, CLI, or
|
|
@@ -21,7 +21,7 @@ skills-only installs.
|
|
|
21
21
|
> Done is proven by a command, not by my judgment. If no verification command
|
|
22
22
|
> exists, that is the first bug.
|
|
23
23
|
|
|
24
|
-
It ships a compact [9-rule doctrine](claude/luciazero.md), 11 on-demand skills,
|
|
24
|
+
It ships a compact [9-rule doctrine](https://github.com/ohm41321/luciazero/blob/main/claude/luciazero.md), 11 on-demand skills,
|
|
25
25
|
verification hooks, a risk-routed reviewer, and an eval harness. It is designed
|
|
26
26
|
to make completion claims auditable—not to replace an agent runtime or become an
|
|
27
27
|
overnight orchestrator.
|
|
@@ -31,7 +31,7 @@ overnight orchestrator.
|
|
|
31
31
|
This GIF is driven by the shipped hooks, not a mockup:
|
|
32
32
|
|
|
33
33
|
<p align="center">
|
|
34
|
-
<img src="https://
|
|
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">
|
|
35
35
|
</p>
|
|
36
36
|
|
|
37
37
|
```text
|
|
@@ -53,30 +53,34 @@ This GIF is driven by the shipped hooks, not a mockup:
|
|
|
53
53
|
| Context lost between agents | `/lucia-relay` transfers evidence, next action, and negative knowledge |
|
|
54
54
|
|
|
55
55
|
Mechanical guarantees run in `test.sh`; behavioral claims are measured by the
|
|
56
|
-
[eval harness](eval/README.md).
|
|
56
|
+
[eval harness](https://github.com/ohm41321/luciazero/blob/main/eval/README.md).
|
|
57
57
|
|
|
58
58
|
## Keep work portable
|
|
59
59
|
|
|
60
60
|
`/lucia-relay` transfers decisions and evidence instead of dumping a chat
|
|
61
61
|
transcript. Session A writes canonical `LUCIA_RELAY.json` plus a generated
|
|
62
|
-
human view; session B checks
|
|
63
|
-
and
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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.
|
|
70
74
|
|
|
71
75
|
<p align="center">
|
|
72
|
-
<img src="https://
|
|
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">
|
|
73
77
|
</p>
|
|
74
78
|
|
|
75
|
-
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
|
|
76
80
|
temporary Git repository. CI's `relay-transfer` fixture scores the complete
|
|
77
81
|
reference 6/6 and rejects a generic Markdown handoff (1/6) plus a
|
|
78
82
|
content-complete but stale fingerprint (5/6). Those are mechanical protocol
|
|
79
|
-
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).
|
|
80
84
|
|
|
81
85
|
## Install
|
|
82
86
|
|
|
@@ -217,9 +221,9 @@ Snapshot: 2026-08-12.
|
|
|
217
221
|
|
|
218
222
|
*One Luciazero run was invalidated by model capacity. †This is a
|
|
219
223
|
**ceiling-effect warning, not evidence of uplift or no effect**: the pilot has
|
|
220
|
-
only one run per arm per task. See the [full benchmark](docs/benchmark.md),
|
|
221
|
-
[campaign registry](eval/results/campaigns.json), and
|
|
222
|
-
[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).
|
|
223
227
|
|
|
224
228
|
<!-- END GENERATED: benchmark-evidence -->
|
|
225
229
|
|
|
@@ -246,7 +250,7 @@ only one run per arm per task. See the [full benchmark](docs/benchmark.md),
|
|
|
246
250
|
- Windows: the installers and hooks are Bash scripts — run them under WSL.
|
|
247
251
|
`npx luciazero discipline` works in native Node.
|
|
248
252
|
|
|
249
|
-
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.
|
|
250
254
|
|
|
251
255
|
## Developing Luciazero
|
|
252
256
|
|
|
@@ -264,14 +268,14 @@ tier.
|
|
|
264
268
|
|
|
265
269
|
More detail:
|
|
266
270
|
|
|
267
|
-
- [Architecture and trade-offs](docs/comparison.md)
|
|
268
|
-
- [Eval methodology](eval/README.md)
|
|
269
|
-
- [Benchmark results and GPT plan](docs/benchmark.md)
|
|
270
|
-
- [Raw campaign registry](eval/results/campaigns.json)
|
|
271
|
-
- [Experiment log](docs/experiments.md)
|
|
272
|
-
- [Contributing](CONTRIBUTING.md)
|
|
273
|
-
- [Publishing](docs/publishing.md)
|
|
274
|
-
- [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)
|
|
275
279
|
|
|
276
280
|
## Support the project
|
|
277
281
|
|
|
@@ -281,8 +285,8 @@ a Thai-language Discord bot. If Luciazero saves you review cycles, you can
|
|
|
281
285
|
|
|
282
286
|
## License
|
|
283
287
|
|
|
284
|
-
[MIT](LICENSE)
|
|
288
|
+
[MIT](https://github.com/ohm41321/luciazero/blob/main/LICENSE)
|
|
285
289
|
|
|
286
290
|
## ภาษาไทย
|
|
287
291
|
|
|
288
|
-
README ฉบับภาษาไทยเต็ม: [README.th.md](README.th.md)
|
|
292
|
+
README ฉบับภาษาไทยเต็ม: [README.th.md](https://github.com/ohm41321/luciazero/blob/main/README.th.md)
|
package/agents/reviewer.md
CHANGED
|
@@ -1,49 +1,57 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: reviewer
|
|
3
|
-
description:
|
|
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
|
-
|
|
8
|
+
# Reviewer
|
|
9
9
|
|
|
10
|
-
|
|
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
|
-
|
|
13
|
+
## Route the search
|
|
13
14
|
|
|
14
|
-
|
|
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
|
-
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
##
|
|
33
|
+
## Evidence discipline
|
|
27
34
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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,
|
|
45
|
+
One line per finding, severe first:
|
|
42
46
|
|
|
43
47
|
```
|
|
44
48
|
path:line — severity — problem. Concrete fix.
|
|
45
49
|
```
|
|
46
50
|
|
|
47
|
-
|
|
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
|
|
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:
|
|
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
|
-
|
|
8
|
+
# Reviewer
|
|
9
9
|
|
|
10
|
-
|
|
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
|
-
|
|
13
|
+
## Route the search
|
|
13
14
|
|
|
14
|
-
|
|
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
|
-
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
##
|
|
33
|
+
## Evidence discipline
|
|
27
34
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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,
|
|
45
|
+
One line per finding, severe first:
|
|
42
46
|
|
|
43
47
|
```
|
|
44
48
|
path:line — severity — problem. Concrete fix.
|
|
45
49
|
```
|
|
46
50
|
|
|
47
|
-
|
|
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
|
|
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.
|
|
@@ -220,20 +220,12 @@ KEY="$(printf '%s' "${CWD}" | python3 -c 'import sys,hashlib;print(hashlib.md5(s
|
|
|
220
220
|
BASE="${TMPDIR:-/tmp}/luciazero-verify-state-$(id -u 2>/dev/null || echo unknown)"
|
|
221
221
|
# The base name is predictable, so validate ownership/type before touching it.
|
|
222
222
|
# A hostile pre-created symlink or directory makes the hook fail open.
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
os.mkdir(path, 0o700)
|
|
230
|
-
info = os.lstat(path)
|
|
231
|
-
if not stat.S_ISDIR(info.st_mode) or stat.S_ISLNK(info.st_mode):
|
|
232
|
-
raise SystemExit(1)
|
|
233
|
-
if hasattr(os, "getuid") and info.st_uid != os.getuid():
|
|
234
|
-
raise SystemExit(1)
|
|
235
|
-
os.chmod(path, 0o700)
|
|
236
|
-
PY
|
|
223
|
+
if [ -e "${BASE}" ] || [ -L "${BASE}" ]; then
|
|
224
|
+
[ -d "${BASE}" ] && [ ! -L "${BASE}" ] && [ -O "${BASE}" ] || exit 0
|
|
225
|
+
else
|
|
226
|
+
(umask 077 && mkdir "${BASE}") 2>/dev/null || exit 0
|
|
227
|
+
fi
|
|
228
|
+
chmod 700 "${BASE}" 2>/dev/null || exit 0
|
|
237
229
|
STATE="${BASE}/${KEY}"
|
|
238
230
|
mkdir -p "${STATE}" 2>/dev/null || exit 0
|
|
239
231
|
chmod 700 "${STATE}" 2>/dev/null || exit 0
|
package/install-codex.sh
CHANGED
|
@@ -27,6 +27,10 @@ skill_inventory() {
|
|
|
27
27
|
catalog "${SRC}/skills/catalog.txt"
|
|
28
28
|
catalog "${SRC}/skills/aliases.txt"
|
|
29
29
|
}
|
|
30
|
+
version_of() {
|
|
31
|
+
awk -F '"' '/^[[:space:]]*"version"[[:space:]]*:/ { print $4; exit }' \
|
|
32
|
+
"${SRC}/package.json" 2>/dev/null || true
|
|
33
|
+
}
|
|
30
34
|
|
|
31
35
|
# collision-proof backup path for $1 (two runs in the same second must not overwrite)
|
|
32
36
|
bakpath() {
|
|
@@ -151,7 +155,7 @@ while IFS= read -r AGENT_NAME; do
|
|
|
151
155
|
done < <(catalog "${SRC}/claude/agents/catalog.txt")
|
|
152
156
|
|
|
153
157
|
# 4. version sidecar (informational; removed by uninstall-codex.sh)
|
|
154
|
-
V_NEW="$(
|
|
158
|
+
V_NEW="$(version_of)"
|
|
155
159
|
if [ -n "${V_NEW}" ]; then
|
|
156
160
|
printf '%s\n' "${V_NEW}" > "${CODEX_DIR}/.luciazero-version"
|
|
157
161
|
fi
|
package/install.sh
CHANGED
|
@@ -34,9 +34,10 @@ skill_inventory() {
|
|
|
34
34
|
catalog "${SRC}/skills/aliases.txt"
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
#
|
|
37
|
+
# Package metadata is present in git checkouts and npm payloads alike.
|
|
38
38
|
version_of() {
|
|
39
|
-
|
|
39
|
+
awk -F '"' '/^[[:space:]]*"version"[[:space:]]*:/ { print $4; exit }' \
|
|
40
|
+
"${SRC}/package.json" 2>/dev/null || true
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
if [ "${STATUS_ONLY}" = 1 ]; then
|
package/package.json
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "luciazero",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.2",
|
|
4
4
|
"description": "Verification-first discipline for coding agents (Claude Code + Codex CLI): 9-rule doctrine, 11 skills, risk-routed reviewer, fail-open enforcement hooks. npx luciazero installs it.",
|
|
5
|
-
"repository": {
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/ohm41321/luciazero.git"
|
|
8
|
+
},
|
|
6
9
|
"homepage": "https://github.com/ohm41321/luciazero#readme",
|
|
7
|
-
"
|
|
10
|
+
"author": { "name": "athit", "email": "athitfkm@gmail.com" },
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/ohm41321/luciazero/issues"
|
|
13
|
+
},
|
|
8
14
|
"bin": {
|
|
9
15
|
"luciazero": "bin/luciazero.js"
|
|
10
16
|
},
|
|
@@ -17,8 +23,7 @@
|
|
|
17
23
|
"install.sh",
|
|
18
24
|
"uninstall.sh",
|
|
19
25
|
"install-codex.sh",
|
|
20
|
-
"uninstall-codex.sh"
|
|
21
|
-
"CHANGELOG.md"
|
|
26
|
+
"uninstall-codex.sh"
|
|
22
27
|
],
|
|
23
28
|
"engines": {
|
|
24
29
|
"node": ">=18"
|
package/skills/bisect/SKILL.md
CHANGED
|
@@ -3,24 +3,27 @@ name: bisect
|
|
|
3
3
|
description: Pinpoint the first bad commit for a reproducible regression in a safe temporary worktree. Use when HEAD is bad, a known revision is good, and one unattended command distinguishes them; handles flaky endpoints and git-bisect skip exit 125.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Bisect
|
|
6
|
+
# Bisect
|
|
7
7
|
|
|
8
8
|
## 1. Freeze the criterion
|
|
9
9
|
|
|
10
|
-
Confirm the bad endpoint fails and
|
|
10
|
+
Confirm the bad endpoint fails and name a good commit or tag. One unattended
|
|
11
|
+
command decides: exit `0` means good, `1–124` means bad, and `125` means
|
|
12
|
+
untestable. A missing executable is an infrastructure error.
|
|
11
13
|
|
|
12
14
|
## 2. Run in a throwaway worktree
|
|
13
15
|
|
|
14
|
-
Locate this skill's installed directory, stay in the repository under investigation, and invoke the bundled script by its absolute path:
|
|
15
|
-
|
|
16
16
|
```bash
|
|
17
17
|
<this-skill-dir>/scripts/safe-bisect.sh --good <good-rev> --bad <bad-rev> -- <verify-command> [args...]
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
The
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
The helper repeats each endpoint twice, uses a detached temporary worktree,
|
|
21
|
+
cleans state, resets bisect, and removes the worktree on every exit path. Use
|
|
22
|
+
`--retries N` only for endpoint samples. Make the reproduction deterministic
|
|
23
|
+
first through `/debug`.
|
|
23
24
|
|
|
24
25
|
## 3. Interpret narrowly
|
|
25
26
|
|
|
26
|
-
Report the
|
|
27
|
+
Report the first bad commit, not automatically the root cause. Read its diff and
|
|
28
|
+
relevant callers; feed `/debug`, keep the regression test, and run the full
|
|
29
|
+
verification tier after fixing.
|
package/skills/debug/SKILL.md
CHANGED
|
@@ -3,49 +3,55 @@ name: debug
|
|
|
3
3
|
description: Debug a stubborn bug with a deterministic reproduction, hypothesis ledger, one-variable fixes, and a regression test. Use after the first obvious look fails, reproduction is unclear, or a fix attempt failed. Not for routine obvious failures; use for "ไล่บั๊ก".
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Debug
|
|
6
|
+
# Debug
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
For bugs that resist the first obvious look: debugging starts with a hypothesis,
|
|
9
|
+
not an edit. Reality, not a plausible patch, decides.
|
|
9
10
|
|
|
10
11
|
## 1. Reproduce first
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
Find one command that shows the failure deterministically. It is ground truth.
|
|
14
|
+
Do not theorize about causes of a failure you cannot trigger.
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
For intermittent failures, fix the seed, pin the time/timezone, run it in a loop,
|
|
17
|
+
and identify the trigger before proceeding.
|
|
16
18
|
|
|
17
19
|
## 2. Minimize
|
|
18
20
|
|
|
19
|
-
Shrink
|
|
21
|
+
Shrink to smaller input, fewer flags, one test instead of the suite. Stop when
|
|
22
|
+
further reduction costs more than it clarifies.
|
|
20
23
|
|
|
21
24
|
## 3. Hypothesis ledger
|
|
22
25
|
|
|
23
|
-
|
|
26
|
+
Before inventing causes, search the symptom in:
|
|
24
27
|
|
|
25
|
-
-
|
|
26
|
-
-
|
|
28
|
+
- repo ledger `docs/lessons.md`;
|
|
29
|
+
- configured harness `luciazero-heuristics.md` under
|
|
30
|
+
`${CLAUDE_CONFIG_DIR:-$HOME/.claude}` or
|
|
31
|
+
`${CODEX_HOME:-$HOME/.codex}`.
|
|
27
32
|
|
|
28
|
-
A match becomes **H1
|
|
29
|
-
|
|
30
|
-
Keep a visible ledger in the conversation. Each entry:
|
|
33
|
+
A match becomes **H1**, but must pass its `proven-by` observation.
|
|
31
34
|
|
|
32
35
|
```
|
|
33
|
-
H<N>: <suspected cause> — refutable by: <command / observation> → <
|
|
36
|
+
H<N>: <suspected cause> — refutable by: <command / observation> → <refuted|confirmed|pending>
|
|
34
37
|
```
|
|
35
38
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
Run the observation, not the edit. Choose the cheapest discriminating log,
|
|
40
|
+
query, debugger stop, grep, or bisect. Trust real state. Dead hypotheses stay in
|
|
41
|
+
the ledger marked refuted. Keep the ledger visible in the conversation.
|
|
39
42
|
|
|
40
43
|
## 4. One variable per iteration
|
|
41
44
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
Change one thing, re-run the reproduction, and record the result. A failed fix
|
|
46
|
+
gets **reverted before the next attempt**. Two consecutive failed fixes on the
|
|
47
|
+
same hypothesis means the hypothesis is dead; widen to environment, versions,
|
|
48
|
+
input, concurrency, or a wrong test.
|
|
45
49
|
|
|
46
50
|
## 5. Close out
|
|
47
51
|
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
+
- Commit a regression test. Run it both ways and quote both results: red before
|
|
53
|
+
the fix, green after. Use the done skill's `revert-probe.sh` when applicable.
|
|
54
|
+
- Remove all instrumentation: prints, sleeps, debug flags.
|
|
55
|
+
- Run the full verify tier.
|
|
56
|
+
- If the cause, footgun, or null result is not obvious from code, run `/retro`;
|
|
57
|
+
debugged failures go to `docs/lessons.md` as symptom → cause → proof → fix.
|
|
@@ -3,7 +3,7 @@ name: discipline-report
|
|
|
3
3
|
description: Analyze Luciazero stop-outcome logs for evidence-backed verification habits. Use for discipline stats, recurring nudge or strict-block patterns, local behavior reports, or machine-readable JSON.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Discipline report
|
|
6
|
+
# Discipline report
|
|
7
7
|
|
|
8
8
|
Resolve the first available local CLI:
|
|
9
9
|
|
|
@@ -12,12 +12,22 @@ luciazero discipline [--days N] [--project PATH_OR_ID] [--json]
|
|
|
12
12
|
node <this-skill-dir>/../../bin/luciazero.js discipline [--days N] [--project PATH_OR_ID] [--json]
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
Use the first
|
|
15
|
+
Use the first only when on PATH; use the second from a checkout/package. If
|
|
16
|
+
neither local form exists, report unavailable offline. Use `npx` only when
|
|
17
|
+
package resolution is explicitly allowed.
|
|
16
18
|
|
|
17
|
-
The
|
|
19
|
+
The command reads `luciazero-stats.log`, accepts current
|
|
20
|
+
schema-versioned JSON lines and legacy space-delimited records, ignores malformed
|
|
21
|
+
lines without failing, and never sends data over the network. Telemetry includes
|
|
22
|
+
turn/Bash wall time plus Bash, verify, and skill counts; parallel Bash intervals
|
|
23
|
+
are merged. Raw commands and skill names are never persisted.
|
|
18
24
|
|
|
19
|
-
Treat recorded outcomes as observations, not causes.
|
|
25
|
+
Treat recorded outcomes as observations, not causes. `nudge` means no recognized
|
|
26
|
+
later verify; `strict-block` means its strict command was red. Explanations must
|
|
27
|
+
say `likely` unless the log records the cause.
|
|
20
28
|
|
|
21
|
-
|
|
29
|
+
Non-Bash remainder includes tools, hooks, scheduling, and reasoning; do not
|
|
30
|
+
label it as model latency without another measurement.
|
|
22
31
|
|
|
23
|
-
Use `--project .`
|
|
32
|
+
Use `--project .` for this repo or another name/id as needed. Use `--json` for
|
|
33
|
+
dashboards or `/retro`.
|