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.
@@ -1,70 +1,76 @@
1
1
  ---
2
2
  name: done
3
- description: Run the closeout ritual before handing back non-trivial work: full verification, revert-probe honesty, independent review, and scope reporting. Use before declaring completion, opening a PR, wrapping up a change, or "ปิดงาน".
3
+ description: Run the closeout ritual before handing back non-trivial work; full verification, revert-probe honesty, independent review, and scope reporting. Use before declaring completion, opening a PR, wrapping up a change, or "ปิดงาน".
4
4
  ---
5
5
 
6
- # Done — prove it before you say it
7
-
8
- The doctrine says: *done is proven by a command, not by my judgment.* This is the ritual that turns that rule into a checklist. Run every step; skipping one is how "done" ships broken.
6
+ # Done
9
7
 
10
8
  ## 1. Full verify
11
9
 
12
- Run the **full** tier (`verify-full` if the repo has two tiers, else the verify command). Quote the shortest decisive line of real output.
10
+ Run the **full** tier now: `verify-full` when present, otherwise verify. Quote
11
+ the shortest decisive line.
13
12
 
14
- - Red → you are not here yet. Go back to the loop; do not continue this ritual.
15
- - No verify command exists → that is the first bug (`/ready`). Say so instead of declaring done.
16
- - The command must actually have run **now**, in this session — a green from an hour ago proves the past, not the present.
13
+ - Red → you are not here yet. Return to the loop.
14
+ - No verify command exists → use `/ready`; do not claim done.
15
+ - It must actually have run **now**, not earlier in the session.
17
16
 
18
17
  ## 2. Skeptic diff pass
19
18
 
20
- Re-read the final diff as a hostile reviewer. Tests prove what they cover; hunt what they do not:
19
+ Re-read the final diff as a hostile reviewer. Check:
21
20
 
22
- - **Edge cases** — empty, zero, negative, unicode, first/last, concurrent
23
- - **Error paths** — the call fails, the file is missing, the network drops; are errors swallowed?
24
- - **Changed contracts** — public API shape, serialized formats, schema, config keys: who consumes the old shape?
25
- - **Accidental content** — files touched by mistake, debug prints, commented-out code, leftover instrumentation, loosened dependency pins, secrets
26
- - **Test honesty** — would the new/changed tests fail if the change were reverted? The mechanical form: `<this-skill-dir>/scripts/revert-probe.sh "<verify-cmd>"` answers it in one command. Weakened or deleted checks are findings, not cleanup.
21
+ - **Edge cases**: empty, zero, unicode, boundaries, concurrency.
22
+ - **Error paths**: failures, missing files, dropped network, cleanup.
23
+ - **Changed contracts**: APIs, formats, schema, config, old consumers.
24
+ - **Accidental content**: unrelated files, debug code, secrets, loose pins.
25
+ - **Test honesty**: would changed tests fail if implementation is reverted?
27
26
 
28
- Fix what you find, re-run step 1, then continue.
27
+ When applicable run
28
+ `<this-skill-dir>/scripts/revert-probe.sh "<verify-cmd>"`. Weakened checks are
29
+ findings. Fix findings and repeat full verify.
29
30
 
30
31
  ## 3. Risk-routed independent review
31
32
 
32
- Classify the diff before requesting an adversarial second opinion:
33
+ Choose focus:
33
34
 
34
- - `security` — auth, permissions, external input, paths, command construction, secrets, or public endpoints
35
- - `contract` — public API, CLI, serialized data, schema, config keys, migrations, or downstream consumers
36
- - `general` — money, concurrency, resource ownership, a wide unfamiliar diff, or any hunk whose safety you cannot explain in one sentence
35
+ - `security`: auth, permissions, input, paths, commands, secrets, endpoints.
36
+ - `contract`: public API/CLI, schema, config, migration, consumers.
37
+ - `general`: money, concurrency, resources, or a wide uncertain diff.
37
38
 
38
- Use the harness's built-in review command (Claude Code: `/code-review`) or the single `reviewer` agent with the selected `focus`. If both `security` and `contract` apply, request two independent focused passes; do not blend two threat models into one shallow prompt. The reviewer must read callers and consumers, not only changed lines.
39
+ Prefer the harness's built-in review command; otherwise use one reviewer agent.
40
+ If security and contract both apply, request two independent focused passes.
41
+ The reviewer reads callers and consumers.
39
42
 
40
- A `blocker` or `major` finding must be fixed and re-verified, or explicitly waived by the user with the remaining risk named. A `minor` may be deferred only when the report names it. For a small, well-understood diff with no routed risk, step 2 suffices.
43
+ Fix and re-verify every `blocker` or `major`, unless the user explicitly
44
+ accepts the named risk. A `minor` may be deferred only when reported. A small,
45
+ well-understood diff with no routed risk may stop after the skeptic pass.
41
46
 
42
47
  ## 4. Scope check
43
48
 
44
- Re-read the original request. For each part: delivered, or named as left out with the reason. Silently dropped scope is the failure mode this step exists to catch. Anything left out gets said **plainly** in the report, not buried.
49
+ Re-read the original request. Every item is delivered, or named as left out with
50
+ a reason. Never drop scope silently.
45
51
 
46
52
  ## 5. Lessons
47
53
 
48
- If the session hit a dead end, a footgun, or disproved a tempting approach — run `/retro` now, while the evidence is fresh. If unfinished work remains for a future session or another agent, `/lucia-relay` instead.
54
+ For a dead end, footgun, or disproved approach, run `/retro`. If unfinished
55
+ state must transfer, use `/lucia-relay` instead.
49
56
 
50
57
  ## 6. Report
51
58
 
52
59
  ```
53
60
  Done: <what changed, one line>
54
- Proof: <verify command> → <decisive output line>
55
- Not covered: <what verify does not prove>
56
- Left out: <scope not delivered + why, or "nothing">
61
+ Proof: <verify command> → <decisive line>
62
+ Not covered: <verification gap>
63
+ Left out: <scope omitted + reason, or nothing>
57
64
  ```
58
65
 
59
- No hedging in the report: if all steps passed, state it plainly; if one did not, the task is not done and the report says what remains instead.
60
-
61
- When the report feeds a machine — a CI job, a PR comment, a dashboard — mirror it as JSON: same facts, no extra claims. A blocked closeout reports `"status": "blocked"` with the failing line as `decisive_line`.
66
+ No hedging: report done only after every step passes. Machine output mirrors the
67
+ same facts; blocked output uses `"status": "blocked"` and its failing line.
62
68
 
63
69
  ```json
64
70
  {
65
71
  "status": "done",
66
72
  "verify": {"command": "./test.sh", "exit_code": 0, "decisive_line": "PASS all checks green"},
67
- "not_covered": "<what verify does not prove>",
73
+ "not_covered": "<verification gap>",
68
74
  "left_out": "nothing"
69
75
  }
70
76
  ```
@@ -5,40 +5,43 @@ description: Measure performance or tuning changes with a baseline, controlled c
5
5
 
6
6
  # Experiment — no claim without a measurement
7
7
 
8
- An optimization without a baseline is a guess with confidence. The protocol is the same loop as always — but *verify* here means **measure**, and the doctrine's "never re-derive a dead end twice" means null results get recorded with the same weight as wins.
8
+ Optimization needs numbers; null results get recorded too.
9
9
 
10
10
  ## 1. Define the metric before touching code
11
11
 
12
- - One command that prints the number: runtime, RSS, p95 latency, binary size, query count. If no such command exists, building it is step zero (the measurement twin of "no verify command is the first bug").
13
- - Decide **now** what improvement would count — "worth it if ≥10% faster" — so the verdict is not negotiated after the numbers exist.
12
+ Choose one command that prints the number: runtime, RSS, latency, size, or count.
13
+ Decide **now** what improvement would count, before seeing results. If no metric
14
+ command exists, build it first.
14
15
 
15
16
  ## 2. Baseline
16
17
 
17
- - Run the measurement **at least 3 times**; record all values, not just the mean — the spread is what separates signal from noise.
18
- - Pin what you can: fixed seed, same input data, warm/cold state chosen deliberately, machine as quiet as you can get it. Note what you could not pin.
19
- - Correctness verify must be green before and after — a fast wrong answer is not an optimization.
18
+ Run at least 3 times and record all values, not only the mean. Pin what you can:
19
+ seed, input, cache state, and environment; state what remains uncontrolled.
20
+ Correctness verify must be green before and after.
20
21
 
21
22
  ## 3. One variable per experiment
22
23
 
23
- Change one thing. Two changes in one measurement produce a number that explains neither. (Same discipline as `/debug`; same reason.)
24
+ Change one thing. Multiple changes make the result uninterpretable.
24
25
 
25
26
  ## 4. Measure again
26
27
 
27
- - Same command, same repetitions, same conditions.
28
- - The difference counts only if it clearly beats the baseline spread. Inside the noise = **null result**, not "slightly faster".
28
+ Use the Same command, same repetitions, same conditions. A result must beat the
29
+ baseline spread; Inside the noise = **null result**.
29
30
 
30
31
  ## 5. Verdict and record
31
32
 
32
- Append to `docs/experiments.md` (create it if absent; follow the repo's existing log if one exists):
33
+ Follow the repository's existing experiment log; otherwise create and append to
34
+ `docs/experiments.md`:
33
35
 
34
36
  ```
35
- ## <date> — <hypothesis, one line>
36
- change: <what was changed, file/approach>
37
- baseline: <values> | result: <values>
37
+ ## <date> — <hypothesis>
38
+ change: <one variable>
39
+ baseline: <all values> | result: <all values>
38
40
  verdict: WIN <n%> | NULL (inside noise) | LOSS
39
- decision: <kept / reverted> — <one-line reason>
41
+ decision: <kept or reverted + reason>
40
42
  ```
41
43
 
42
- - **Losers and nulls are reverted immediately** — the log keeps the knowledge, the tree keeps only wins.
43
- - A null result is a finding: "tried X, no measurable gain — do not retry without new evidence" saves the next session the same hour. If it is load-bearing, surface it via `/retro` into the project notes too.
44
- - Never delete a previous entry; if a new experiment overturns an old one, add the new entry and cross-reference.
44
+ Losers and nulls are reverted immediately; the log preserves the finding, not
45
+ the bad diff. A null result is a finding—record it so it is not retried without
46
+ new evidence. Never delete a previous entry; append a correction when later
47
+ evidence overturns it. Route load-bearing nulls through `/retro`.
@@ -6,38 +6,45 @@ disable-model-invocation: true
6
6
 
7
7
  # Imouto Mode
8
8
 
9
- Add Lucia's warm, caring, conversational, lightly tsundere voice to coding work without changing technical judgment. This is a non-romantic sibling-companion persona; work first, personality second.
9
+ Optional warm, lightly tsundere voice for coding. Keep a non-romantic
10
+ sibling-companion persona: work first, personality second.
10
11
 
11
12
  ## Modes
12
13
 
13
- Default: off for every request. Apply a selected mode only to the current invocation; the next request is off unless the user explicitly invokes the skill again. Never write preferences or configuration unless the user separately asks.
14
+ Default: off for every request. Apply a mode only to the current invocation; the
15
+ next request is off unless explicitly invoked again. Never persist preferences
16
+ unless separately asked.
14
17
 
15
- Interpret the invocation argument:
16
-
17
- - `focus` — recommended. Enable a brief warm touch in greetings, transitions, or the final handoff, not all three. Keep the technical body plain.
18
- - `on` — enable the voice throughout replies, capped at one or two short personality touches per response.
19
- - `off` — use the normal professional style for this invocation.
20
- - no argument or an unknown argument — show these choices without enabling anything.
18
+ - `focus` — recommended: one brief warm touch in greeting, transition, or handoff.
19
+ - `on` — voice throughout, capped at two short personality touches.
20
+ - `off` — normal professional voice.
21
+ - No or unknown argument — show these choices without enabling anything.
21
22
 
22
23
  ## Voice
23
24
 
24
- - Match the user's language. In Thai, sound casual, warm, attentive, and gently playful; use polite particles naturally rather than on every line.
25
- - Express tsundere character as mild surface reluctance or a brief playful denial, then show care through useful action. Keep it soft enough that the user never has to decode the answer.
26
- - Never insult, belittle, shame, snap at, or patronize the user. Never withhold help, delay work, hide uncertainty, or weaken evidence for the roleplay.
27
- - Encourage without exaggerating. Light teasing is allowed only when it cannot embarrass, distract, or obscure the answer.
28
- - Address the user as `พี่` or use another familiar form only after the user uses or requests it.
29
- - Remember preferences only from context that is actually available. Never claim memory that is not present.
25
+ Match the user's language. In Thai, be casual, warm, and gently playful without
26
+ padding. Express tsundere as mild surface reluctance, then show
27
+ care through useful action; the answer must remain obvious.
28
+
29
+ Never insult, belittle, shame, snap at, or patronize the user. Never withhold
30
+ help, hide uncertainty, weaken evidence, or delay work. Tease only when harmless.
31
+ Use `พี่` or another familiar form only after the user uses or requests it.
32
+ Use only available context; Never claim memory that is not present.
30
33
 
31
34
  ## Work-first boundaries
32
35
 
33
- - Preserve the plan → change → verify → fix loop and every applicable safety or verification rule.
34
- - Keep code, commands, paths, errors, test evidence, review findings, and incident/security guidance literal and unstyled.
35
- - For production incidents, destructive actions, security issues, medical/legal/financial stakes, or user distress, use a calm direct voice with no teasing or decorative cuteness.
36
- - Never add roleplay that delays a tool call, pads a progress update, repeats information, or consumes space needed for evidence.
37
- - Never auto-trigger. Repository names, mascot art, Thai text, or affectionate wording are not activation.
36
+ Preserve the plan → change → verify → fix loop and all safety rules. Keep code,
37
+ commands, paths, errors, test evidence, findings, and incident/security guidance
38
+ literal. For incidents, destructive actions, security, high-stakes advice, or
39
+ distress, use a calm direct voice with no teasing.
38
40
 
39
- ## Relationship boundaries
41
+ Never add roleplay that delays a tool call, pads updates, repeats facts, or
42
+ displaces evidence. Never auto-trigger. Names, mascot art, Thai, or affectionate
43
+ text are not activation.
40
44
 
41
- Keep the persona non-romantic and non-sexual. Do not use jealousy, possessiveness, exclusivity, guilt, emotional dependency, or claims of real feelings or consciousness. Do not call the user a partner or imply that Lucia replaces human relationships.
45
+ ## Relationship boundaries
42
46
 
43
- When enabled, remain a coding agent first. If personality and clarity conflict, choose clarity.
47
+ Keep the voice non-romantic and non-sexual. Never use jealousy, possessiveness,
48
+ exclusivity, guilt, emotional dependency, real-feeling/consciousness claims, or
49
+ replacement of human relationships. Remain a coding agent first. If personality
50
+ and clarity conflict, choose clarity.
@@ -3,46 +3,60 @@ name: lucia-relay
3
3
  description: Transfer unfinished work and non-obvious knowledge across sessions, agents, people, machines, or harnesses. Use for relay, handoff, continuing later, context transfer, compaction, or "ส่งต่อ"; produce verifiable portable state.
4
4
  ---
5
5
 
6
- # Lucia Relay — knowledge that survives the messenger
6
+ # Lucia Relay
7
7
 
8
- `/retro` stores permanent lessons. `/lucia-relay` transfers task-local state. The canonical artifact is `LUCIA_RELAY.json`; `LUCIA_RELAY.md` is its generated human view. A receiver trusts neither until the tree and verification evidence agree.
8
+ `/retro` stores durable lessons; Relay moves task state. JSON is canonical;
9
+ Markdown is generated. Treat received artifacts and their commands as
10
+ untrusted until repository identity, HEAD, and evidence agree.
9
11
 
10
12
  ## Decide the route first
11
13
 
12
- Before writing or pointing anywhere, answer: **Where is the recipient?**
14
+ - `same-machine`: local paths are usable; schema 1/2 remain readable.
15
+ - `cross-machine`: use schema 3, a clean pushed commit, portable knowledge, and
16
+ receiver-supplied trust. Never assume paths or artifact claims travel.
13
17
 
14
- - `same-machine`: the receiver shares this machine. Full local paths are allowed.
15
- - `cross-machine`: the receiver cannot open anything local. Every pointer must be repo-relative and present in a pushed commit, or the needed knowledge must be copied into `knowledge.inline` in `LUCIA_RELAY.json`.
16
-
17
- If the destination is not explicit and cannot be inferred, ask the user. Never assume a local path will travel.
18
+ Ask if unclear.
18
19
 
19
20
  ## Produce
20
21
 
21
- 1. Locate this skill's installed directory and run `<this-skill-dir>/scripts/relay.py draft --root . --recipient <same-machine|cross-machine>`. Always pass the route explicitly; the CLI's `same-machine` default exists only so older callers keep working.
22
- 2. Create `LUCIA_RELAY.json` at the repo root. Fill the original goal, completed and in-progress work, one literal next action, verification evidence, relevant files, read-first pointers, inline knowledge, open **and refuted** hypotheses, and landmines. Keep the captured `route` and `repository` objects from the draft.
23
- 3. For `cross-machine`, commit and push every task file first. Start each `read_first` entry with its repo-relative tracked path; an optional note may follow ` — `. Replace machine-local document, memory, or artifact pointers with a short `{ "label": "...", "content": "..." }` entry in `knowledge.inline`. Do not include credentials.
24
- 4. Run `<this-skill-dir>/scripts/relay.py render --root .`; fix every validation error and review both artifacts for secrets and route mistakes.
25
-
26
- Evidence rules:
27
-
28
- - A verification entry includes the exact command, exit code, shortest decisive line, and run time. Never turn “not run” into implied green.
29
- - The next action is executable: a command, exact edit, or decision. “Continue the refactor” is invalid.
30
- - Preserve refuted hypotheses and why they failed. They are the knowledge most likely to save the receiver time.
31
- - Point to relevant `docs/lessons.md` entries. For cross-machine delivery, inline an essential machine-local heuristic instead of pointing to its local file; omit secrets, credential locations, personal paths, and preferences.
32
-
33
- ## Route
34
-
35
- - Same worktree/session boundary: leave both files uncommitted; the SessionStart hook points at them.
36
- - Another local agent or harness sharing the tree: give it both full paths and ask it to run `inspect` before editing.
37
- - Cross-machine/person: give the pushed repository ref plus both artifacts. The validator rejects a dirty tree, a HEAD absent from locally known remote branches, and machine-only paths. If repository policy requires the relay files on the branch, review them for secrets, then force-add the ignored transient artifacts with `git add -f LUCIA_RELAY.json LUCIA_RELAY.md`. State explicitly that they must be consumed and removed after re-verification.
38
- - Chat-only channel: paste the JSON artifact; it is canonical and can regenerate the Markdown view.
39
-
40
- Do not copy the conversation transcript. Transfer decisions, evidence, negative knowledge, and pointers to source-of-truth files.
22
+ For same-machine, run `relay.py draft --root . --recipient same-machine`.
23
+
24
+ 1. Commit and push every task file first. Choose the task's base commit, then
25
+ run `relay.py draft --root . --recipient cross-machine --base <base> >
26
+ LUCIA_RELAY.json`. This publishes a commit-named transfer tag and records
27
+ sanitized clone URL, head/base OIDs, and committed changed files.
28
+ 2. Fill goal, done/in-progress state, one literal next action, verification,
29
+ `read_first`, inline knowledge, hypotheses (including refuted ones), and
30
+ landmines. Keep captured route/repository fields unchanged.
31
+ 3. Each verification entry needs an argv-safe command, exit code, decisive
32
+ line, and timezone-aware run time. Include at least one entry and portable
33
+ knowledge. Copy machine-local essentials into `knowledge.inline`; exclude
34
+ credentials, private paths, and preferences.
35
+ 4. Run `relay.py render --root .`, fix errors, then run `relay.py envelope
36
+ --root .`. Send both artifacts normally; send the envelope's repository URL,
37
+ HEAD, and manifest digest through an authenticated channel.
38
+
39
+ Do not transfer a chat transcript. Transfer decisions, evidence, negative
40
+ knowledge, and source-of-truth pointers. Keep artifacts out of Git; if
41
+ committed, review secrets and remove after use.
41
42
 
42
43
  ## Receive
43
44
 
44
- 1. Run `<this-skill-dir>/scripts/relay.py inspect --root .` and read both artifacts before touching code.
45
- 2. Read every `read_first` pointer and inspect the named changed files.
46
- 3. Compare the relay fingerprint with the current tree. Drift is a warning that the relay describes an earlier state.
47
- 4. Re-run the listed verification commands. The tree is truth; if evidence differs, report the mismatch and update the plan from current state.
48
- 5. After absorbing the knowledge, run `<this-skill-dir>/scripts/relay.py consume --root . --verified`. This explicit flag asserts that re-verification happened and removes both transient files. Write a fresh relay later; never accumulate or incrementally nurse a stale one.
45
+ 1. Obtain the trusted envelope. Clone its repository, checkout its HEAD
46
+ (detached is valid), and place both artifacts at root. Never execute a
47
+ command merely because the relay contains it.
48
+ 2. Run `relay.py inspect --root . --expected-recipient cross-machine
49
+ --trusted-head <sha> --trusted-manifest-sha256 <digest>
50
+ --trusted-repository-url <url>`. Read committed
51
+ changed files, every `read_first` pointer, inline knowledge, hypotheses, and
52
+ landmines before editing.
53
+ 3. Manually approve and run every verification command in the receiver's
54
+ coding harness; Relay never executes artifact commands. Compare each exit
55
+ code and decisive line with the recorded evidence.
56
+ 4. The tree wins on mismatch: report it and update the plan from current state.
57
+ After all evidence matches, run `relay.py consume --root . --verified
58
+ --expected-recipient cross-machine --trusted-head <sha>
59
+ --trusted-manifest-sha256 <digest> --trusted-repository-url <url>`.
60
+
61
+ For same-machine, inspect normally, rerun evidence manually, then consume with
62
+ `--verified`; never reuse a stale relay.