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.
@@ -3,26 +3,30 @@ name: plan
3
3
  description: Build a falsifiable implementation plan for new features, major refactors, ambiguous work, or risky multi-module changes. Use when the user asks for a plan or material choices remain; skip routine edits with clear scope and proof.
4
4
  ---
5
5
 
6
- # Plan — make the change falsifiable
6
+ # Plan
7
7
 
8
- Use the lightest plan that removes uncertainty. Planning is a design protocol, not a mandatory pause before every edit.
8
+ Use the lightest plan that removes uncertainty; do not pause by default.
9
9
 
10
10
  ## 1. Bound the work
11
11
 
12
- State the goal, non-goals, affected modules, public interfaces, and configuration keys. Mark assumptions separately from known facts. Inspect the repository before treating a guessed interface or command as real.
12
+ State goal/non-goals, modules, public interfaces, and config keys. Separate
13
+ assumptions/facts. Inspect repository before trusting guesses.
13
14
 
14
15
  ## 2. Define proof
15
16
 
16
- For every requirement, name an observable pass/fail condition and the command or inspection that can test it. Do not invent an exact output line before the check exists; define the decisive signal precisely enough that success and failure cannot both satisfy it.
17
-
18
- If coverage is missing, plan the smallest red-before-green test or fixture first. Include the full verification tier for closeout.
17
+ For every requirement, name an observable pass/fail condition and the command
18
+ or inspection that tests it. Never invent exact output. Add the smallest
19
+ red-before-green test for missing coverage; include full verification at
20
+ closeout.
19
21
 
20
22
  ## 3. Choose reversible steps
21
23
 
22
- Break the work into independently checkable edits. Name compatibility risks, data or contract migrations, rollback points, and any state that cannot be recovered automatically.
24
+ Use independently checkable edits; name compatibility risks, data or contract
25
+ migrations, rollback points, and unrecoverable state.
23
26
 
24
27
  ## 4. Decide whether to pause
25
28
 
26
- Ask for approval before editing only when the remaining choice is ambiguous and materially changes the result, or when the next action is high-stakes, destructive, changes a public contract, expands scope, deploys, spends money, or affects production. Ask one decision-shaped question.
27
-
28
- Otherwise, show the concise plan and proceed. Update it when evidence invalidates a step; do not preserve a stale plan for ceremony.
29
+ Ask for approval only if ambiguity changes the result or the action is
30
+ high-stakes, destructive, changes a public contract, expands scope, deploys,
31
+ spends money, or affects production. Ask one decision-shaped question.
32
+ Otherwise, show the concise plan and proceed. Update it when evidence changes.
@@ -5,105 +5,121 @@ description: Make an unfamiliar repository agent-ready with a verify command, sm
5
5
 
6
6
  # Ready
7
7
 
8
- Goal: leave the repo with **one command that returns an exit code** and enough guardrails that future agent work self-verifies. Nothing here is language-specific — detect, don't assume.
8
+ Leave the repository with one unattended command that returns a meaningful exit
9
+ code, plus only the guardrails needed for future agents to self-verify. Detect
10
+ the stack; do not assume it. Run every artifact you add.
9
11
 
10
- Bootstrapping is itself work: verify each artifact you add actually runs before reporting it.
12
+ ## 1. Detect
11
13
 
12
- ## Phase 1 — Detect (never assume)
13
-
14
- Run the bundled evidence scan first — it replaces a dozen manual reads with one call:
14
+ Run the bundled scan first:
15
15
 
16
16
  ```
17
17
  <this-skill-dir>/scripts/detect.sh <repo-root>
18
18
  ```
19
19
 
20
- (The skill directory is wherever this SKILL.md lives, e.g. `~/.claude/skills/ready/` or `~/.codex/skills/ready/`.) The script surfaces candidates — **you still decide**. It cannot parse CI matrices or exotic build systems; open anything it flags and read the CI config yourself.
21
-
22
- Sources, in order of trust:
23
-
24
- 1. CI config — the most honest source of truth: `.github/workflows/*`, `.gitlab-ci.yml`, `.circleci/`. **Whatever CI runs is the verify command.**
25
- 2. Manifests: `package.json` scripts, `pyproject.toml` / `tox.ini` / `noxfile.py`, `Makefile`, `justfile`, `Cargo.toml`, `go.mod`, `build.gradle`, `composer.json`
26
- 3. Repo docs: `README*`, `CONTRIBUTING*`, `AGENTS.md`, `CLAUDE.md`, `docs/` — docs go stale; cross-check any doc-claimed command against CI when CI exists. A docs/CI mismatch is itself a finding to record in Phase 5.
27
- 4. Existing test dirs: `tests/`, `test/`, `spec/`, `__tests__/`, `*_test.*`, `test_*.*`
20
+ It finds candidates, not truth; open flagged files and interpret CI matrices or
21
+ unusual build systems yourself. Inspect in this order:
28
22
 
29
- Report what was found as a short table: run / test / lint / typecheck / build / git repo — command or `MISSING`.
23
+ 1. CI config: use what CI runs.
24
+ 2. Manifests and runners: package scripts, pyproject/tox/nox, Make/just,
25
+ Cargo/go/Gradle/composer.
26
+ 3. README, CONTRIBUTING, CLAUDE.md, AGENTS.md, and docs; record docs/CI drift.
27
+ 4. Existing test directories and naming conventions.
30
28
 
31
- **If the directory is not under version control**, propose `git init` early (ask first — some dirs are deliberately not repos): without git there is no smallest reversible step, no safe break-and-restore in Phase 6, and no bisect.
29
+ Report run/test/lint/typecheck/build/git as command or `MISSING`. If this is not
30
+ a Git repository, propose `git init` but ask first.
32
31
 
33
- ## Phase 2 — Establish the verify command
32
+ ## 2. Establish verification
34
33
 
35
- If a verify path exists, **use it** — do not invent a parallel one.
34
+ Reuse the existing verify path. If none exists, create the smallest entrypoint
35
+ in the repository's native convention.
36
36
 
37
- If none exists, create the smallest real one. Order of preference:
37
+ The command must:
38
38
 
39
- 1. The project's native runner, already installed (`pytest`, `vitest`, `go test`, `cargo test`, `dotnet test`)
40
- 2. A single entrypoint that chains them, matching the repo's existing convention (`Makefile` target, `package.json` script, `justfile` recipe) — e.g. `make verify` running lint then tests
39
+ - exit non-zero on failure and run unattended;
40
+ - work offline without credentials, GPU, network, or secrets;
41
+ - use installed project tooling and avoid watch mode;
42
+ - stay quiet on success and be documented for humans.
41
43
 
42
- Rules:
43
- - Must exit non-zero on failure. A script that always exits 0 is worse than nothing.
44
- - Must run to completion unattended: disable watch/interactive modes (e.g. `CI=1`, `--run`, `--watch=false`) — a command that waits for input or watches files hangs the loop.
45
- - Must run offline, with no credentials. Anything needing GPU/network/secrets belongs in a separate slow target.
46
- - Time the suite once (`time <cmd>`); the measurement, not a guess, decides one tier or two.
47
- - On success, output should be near-silent — prefer quiet flags in the fast tier so failures, not progress spam, fill the context.
48
- - Add it to the repo's own docs so humans find it too.
44
+ Time it once. Use one tier when the suite is already quick. When slow checks
45
+ would cripple the edit loop, define:
49
46
 
50
- **Two tiers when the repo has slow checks.** One `verify` command forces a bad trade: either the loop crawls or coverage gets cut. Split it:
47
+ - `verify`: lint/typecheck/unit or smoke coverage, normally under ~60 seconds;
48
+ - `verify-full`: integration/build/slow coverage, required at closeout and PR.
51
49
 
52
- - `verify` — fast (<~60s), offline: lint, typecheck, unit/smoke tests. Run on **every** loop iteration.
53
- - `verify-full` — everything else: full suite, integration, build, slow checks. Run **before declaring done** and before a PR — "done" means `verify-full` green, not just `verify`.
50
+ Run `verify` on every edit loop; run `verify-full` at closeout and before a PR.
54
51
 
55
- Name them by the repo's convention (`make verify` / `make verify-full`, npm scripts, just recipes). A small repo whose whole suite runs in seconds needs only the single tier — do not add ceremony it does not need.
52
+ For monorepos, prefer a repo-owned `verify-changed` backed by the workspace
53
+ dependency graph, with the root full suite as fallback. Read
54
+ [references/smart-verification.md](references/smart-verification.md) before
55
+ creating it and document its base revision and fallback.
56
56
 
57
- **Monorepos:** detect the workspace layout (`package.json` `workspaces`, `pnpm-workspace.yaml`, turbo/nx config, `go.work`, Cargo `[workspace]`). Prefer a repo-owned `verify-changed` target backed by the workspace's native dependency graph; `verify-full` remains the root suite. Never make a global hook guess package mappings from path prefixes. Read [references/smart-verification.md](references/smart-verification.md) before creating the target, and record its base-revision/fallback contract in Phase 5 notes.
57
+ For Claude Code enforcement-pack users, ask first before offering exact-match
58
+ tracking in the personal, gitignored `.claude/settings.local.json`:
58
59
 
59
- **Enforcement pack users (Claude Code, ask first):** if the verify-tracking hooks are active — classic install: `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/hooks/luciazero-verify.sh` exists; plugin install: the `luciazero` plugin is enabled — offer to record the established command in the repo's *personal* settings so the tracker matches it exactly instead of by broad regex — `.claude/settings.local.json` (gitignored, never committed): `{"env": {"LUCIAZERO_VERIFY_CMD": "<the fast-tier command>"}}`. Derive it from CI (the honest source); it is a cache of that truth, so note it must be updated if CI changes. Never put this variable in committed `.claude/settings.json`: the hook cannot distinguish settings scopes, so a repository can control it; treat a repository that ships it as hostile. Show the exact JSON before writing anything.
60
-
61
- ## Phase 3 — Smoke tests, if there are none
60
+ ```json
61
+ {"env":{"LUCIAZERO_VERIFY_CMD":"<fast command derived from CI>"}}
62
+ ```
62
63
 
63
- Do **not** attempt coverage. Write 3–6 tests that would catch a catastrophic break. Pick by this heuristic:
64
+ Show the JSON before writing it. Never commit this variable in
65
+ `.claude/settings.json`; repository-controlled hook configuration is hostile.
66
+ This setting caches CI truth; update it whenever CI's verify command changes.
67
+ Skip hook setup on harnesses without hooks.
64
68
 
65
- - **Contract shape** — the core data structure in/out: dimensions, keys, types, no NaN/null where impossible
66
- - **Round trip** — serialize→deserialize, encode→decode, save→load returns equal
67
- - **Import/boot** — every package imports, the app answers one request, the CLI runs `--help`. Prefer the framework's test client over binding a real port; any test that starts a process needs a hard timeout and must kill what it started.
68
- - **Artifact loads** — trained model / migration / config parses and does one forward pass or one query
69
- - **The bug you were sent to fix** — a regression test reproducing it, written *before* the fix
69
+ ## 3. Add smoke tests only when absent
70
70
 
71
- Use fixtures small enough to commit. Never depend on the user's real data paths.
71
+ Add 3–6 small tests for catastrophic failures, not pretend coverage. Choose the
72
+ most relevant:
72
73
 
73
- State plainly that these are smoke tests, not a suite.
74
+ - core input/output shape and impossible null/NaN values;
75
+ - serialize/deserialize or save/load round trip;
76
+ - import, CLI `--help`, or one request through a framework test client;
77
+ - model/config/migration load plus one operation;
78
+ - the reported bug as a red-before-fix regression.
74
79
 
75
- ## Phase 4 — Guardrails (only ones that pay for themselves)
80
+ Use commit-sized fixtures, never the user's real data paths. Avoid real ports;
81
+ if a process is unavoidable, enforce a hard timeout and cleanup. Label these as
82
+ smoke tests.
76
83
 
77
- Hooks, `.claude/settings.json`, and `/fewer-permission-prompts` are **Claude Code mechanisms**. On a harness without them (Codex CLI), skip the hook items and encode the same guardrails as instructions in the project's `AGENTS.md` instead: which files are untouchable, which derived file must be regenerated after editing which source.
84
+ ## 4. Add only paying guardrails
78
85
 
79
- Prefer few and deterministic. Candidates, in value order:
86
+ Claude hooks/settings are not portable; on Codex or another harness, put
87
+ necessary constraints in AGENTS.md instead.
80
88
 
81
- - **Auto-format/lint on write** — `PostToolUse` hook matching `Edit|Write`, running the repo's own formatter. Only if the repo already has one configured.
82
- - **Regenerate derived files** — if editing source X requires regenerating Y (protobuf, OpenAPI clients, migrations, lockfiles), hook it, scoped inside the command to the relevant paths. This is the highest-value hook in most repos because humans forget it.
83
- - **Protect the untouchables** — `PreToolUse` deny on production config, secrets, live model/deploy pointers.
84
- - **Permission allowlist** — put the repo's read-only and verify commands into `.claude/settings.json` so the loop is not interrupted. `/fewer-permission-prompts` derives this from real transcripts.
89
+ Prefer existing deterministic tools:
85
90
 
86
- Put project-scoped settings in the repo's `.claude/settings.json` (shared) or `.claude/settings.local.json` (personal, gitignored) — **not** in global settings.
91
+ 1. formatter/linter after writes;
92
+ 2. source-to-derived regeneration;
93
+ 3. denial for secrets, production config, and live deploy/model pointers;
94
+ 4. allowlisting read-only and verify commands.
87
95
 
88
- Hooks execute automatically on the user's machine. Show the exact command before installing it, and never install one that pushes, deploys, deletes, or writes outside the repo.
96
+ Keep shared settings project-scoped and personal settings gitignored. Show the
97
+ exact hook command before installation. Never add a hook that deploys, pushes,
98
+ deletes, or writes outside the repository.
89
99
 
90
- ## Phase 5 — Project notes file (`CLAUDE.md` / `AGENTS.md`)
100
+ ## 5. Record project knowledge
91
101
 
92
- Extend the notes file the repo already uses; if neither exists, create the one matching the current harness and add a one-line pointer from the other name so both find it. Write only what reading the code cannot tell you:
102
+ Extend the notes file already used; if neither exists, create the current
103
+ harness's file and point the other name to it. Record only facts code search
104
+ cannot reveal:
93
105
 
94
- - How to run / test / verify — the commands from Phase 2
95
- - Architecture facts that are load-bearing and non-obvious (what serves what, which file is source of truth)
96
- - **Footguns and null results**: "X looks right but breaks Y", "tried A, measured no gain, do not retry", "always rebuild Z after W"
97
- - Where the real docs live
106
+ - verify commands and coverage;
107
+ - non-obvious source-of-truth or architecture constraints;
108
+ - footguns, measured null results, and required regeneration;
109
+ - the location of deeper documentation.
98
110
 
99
- Do not restate the directory tree, git history, or anything a `grep` answers. Keep it dense; every line costs context on every future session.
111
+ Do not duplicate the tree, history, or grep-able facts. Every line becomes
112
+ future context cost.
100
113
 
101
- ## Phase 6 — Prove it and report
114
+ ## 6. Prove the loop
102
115
 
103
- 1. **Flake check** — run the fast verify tier twice. A green that does not repeat is a flake, and a flaky verify makes every future red ambiguous; fixing or quarantining the flake comes before relying on the loop. (Skip the double run only when the repo has a single slow tier — say so.)
104
- 2. **Red check** — break a line a smoke test actually covers (flip an expected value or a return), confirm verify goes red, then restore. The break is one deliberate edit: **record file, line, and original text before making it, and restore by reverting exactly that edit.** Only use `git checkout -- <file>` if the file was committed before the break — on a file carrying uncommitted work it silently discards that work too, and it cannot restore the untracked test files this skill just wrote. Never use bare `git stash` here (it sweeps the whole tree and skips untracked files). Breaking an uncovered line and staying green proves nothing. A verify command that cannot fail is not a verify command.
116
+ - **Flake check:** run the fast tier twice. If only one slow tier exists, run it
117
+ once and state that limitation. A non-repeatable green is not trusted.
118
+ - **Red check:** record a covered file, line, and original text; make one
119
+ deliberate break, prove verify fails, then restore exactly that edit. Do not
120
+ use `git checkout` on a file with user changes, and never use broad
121
+ `git stash`. New untracked tests require explicit restoration too.
122
+ - Run the final full tier after restoration.
105
123
 
106
- Report:
107
- - The one command to run (both tiers if split)
108
- - What it does and does not cover
109
- - What was added, and what was deliberately left out
124
+ Report the command(s), what each covers and does not cover, files added, and
125
+ anything deliberately left out.
@@ -3,72 +3,79 @@ name: retro
3
3
  description: Record durable lessons, null results, and footguns after hard work or debugging. Use when the user asks for a retro, dead ends need preserving, a task disproves an approach, or "จดบทเรียน". Keep repo knowledge separate from machine-local memory.
4
4
  ---
5
5
 
6
- # Retro — turn experience into recorded knowledge
6
+ # Retro
7
7
 
8
- The doctrine says: *never re-derive a dead end twice.* This skill is the procedure that makes it actually happen. A team that logs its null results stops paying for the same experiment twice — that is the cheapest intelligence upgrade available.
8
+ Never re-derive a dead end twice. Record only knowledge future work cannot
9
+ recover cheaply.
9
10
 
10
11
  ## 1. Scan the session
11
12
 
12
- Walk back through the work just finished and list candidates:
13
+ Ask:
13
14
 
14
- - What took the longest, and was the time spent where you first expected?
15
- - Which attempts **failed**, and what was the real cause once found?
16
- - What looked like the right approach but was wrong — and why exactly?
17
- - What surprised you: environment quirks, undocumented behavior, a flag or version that mattered?
18
- - What did you have to re-discover that should already have been written down?
15
+ - What took the longest?
16
+ - Which attempts **failed**, and why?
17
+ - What plausible approach was wrong?
18
+ - What environment/version/flag surprised us?
19
+ - What had to be rediscovered?
19
20
 
20
- **Also read the discipline report**, if the enforcement pack is installed: use `/discipline-report`, or run the first available local form — `luciazero discipline --project . --json` when `luciazero` is on PATH, or `node <this-skill-dir>/../../bin/luciazero.js discipline --project . --json` from a source checkout/npm package. If neither exists, report that the report is unavailable offline; use `npx` only when package resolution is explicitly allowed. Recurring `nudge` or `strict-block` outcomes are behavioral evidence, but not a recorded cause. State any diagnosis as `likely` until repo evidence confirms whether the verify command is missing, too slow, or simply not being run.
21
+ Also read the discipline report when installed: prefer local
22
+ `luciazero discipline --project . --json`, then the checkout/package CLI.
23
+ Use `npx` only when package resolution is explicitly allowed. A nudge or block
24
+ is evidence, not cause; state any diagnosis as `likely` until repo evidence
25
+ confirms it.
21
26
 
22
27
  ## 2. Filter hard
23
28
 
24
- Record only what **reading the code cannot tell a future agent**:
29
+ Keep only what reading the code cannot tell a future agent:
25
30
 
26
- - ✅ Null results: "tried X, measured no gain / broke Y — do not retry without new evidence"
27
- - ✅ Footguns: "A looks correct but silently breaks B"
28
- - ✅ Environment facts: version pins, platform quirks, commands that must follow other commands
29
- - ✅ Why a tempting approach is wrong (with the one-line evidence)
30
- - ❌ What the diff/git history already says
31
- - ❌ Anything a `grep` or `--help` answers
32
- - ❌ Session-only details (temp paths, one-off values)
31
+ - **Null results**: measured no gain or broke another property.
32
+ - **Footguns**: an apparently correct action silently breaks something.
33
+ - Environment facts, ordering constraints, and why a tempting path is wrong.
33
34
 
34
- A null result is worth exactly as much as a success. If the session proved nothing new, say so and stop — an empty retro is a valid result; padding it with restated code facts makes every future session pay for noise.
35
+ Reject diff/history summaries, session-only values, and Anything a `grep` or
36
+ `--help` answers. If nothing qualifies, stop: an empty retro is a valid result.
35
37
 
36
38
  ## 3. Route it, then write it
37
39
 
38
- **First decide who the lesson is true for:**
39
-
40
- - **Anyone who clones the repo** — code behavior, build quirks, disproven approaches → the committed notes below. A **debugged failure** specifically goes to the repo's lesson ledger `docs/lessons.md` in this fixed shape, so `/debug` can seed its hypothesis ledger from it next time:
40
+ - **Anyone who clones the repo:** code/build behavior and disproven approaches.
41
+ A debugged failure goes to `docs/lessons.md`:
41
42
 
42
43
  ```
43
- ## <one-line symptom, greppable — include the error string>
44
+ ## <greppable symptom; include exact error string>
44
45
  cause: <root cause> | proven-by: `<command>` | fix: <what fixed it> | date: YYYY-MM-DD
45
46
  ```
46
47
 
47
- - **True in every repository** — engineering lessons not tied to this codebase ("intermittent async test: check timezone pinning before touching the test") → append one line to `luciazero-heuristics.md` in the configured harness directory (`${CLAUDE_CONFIG_DIR:-$HOME/.claude}` or `${CODEX_HOME:-$HOME/.codex}`). Hard rules: one line per lesson, same update-in-place/dedup discipline, **cap the file at 100 lines** — when full, drop the weakest entry rather than growing (an unbounded heuristics file becomes context tax, the exact failure this pack exists to prevent). Never personal paths or secrets, even here.
48
- - **Only this machine or this user** — local paths, installed tool versions, personal preferences, credential locations → must **never** be committed. If the harness provides a persistent memory directory (Claude Code announces its per-project `memory/` dir and `MEMORY.md` index in context when enabled), write it there and update the index, applying the same format, dedup, and prune rules. If no memory system exists (Codex CLI, or memory disabled), keep only the generalization that is true for anyone who clones the repo — never personal preferences or credential locations, even generalized; if nothing repo-true remains, state the lesson in the retro report instead of writing it anywhere — an honest gap beats a note no harness will ever load.
48
+ - **True in every repository:** append one deduplicated line to configured
49
+ `luciazero-heuristics.md` under `${CLAUDE_CONFIG_DIR:-$HOME/.claude}` or
50
+ `${CODEX_HOME:-$HOME/.codex}` for the active harness. Never include secrets
51
+ or personal paths; cap the file at 100 lines and drop the weakest entry when
52
+ full.
53
+
54
+ - **Only this machine or this user:** local paths, versions, preferences, and
55
+ credential locations must **never** be committed. Use announced harness
56
+ memory and update its `MEMORY.md` index when available. If no memory system
57
+ exists, keep only a repo-true generalization; otherwise report the lesson
58
+ without writing it.
49
59
 
50
- Format, one entry per lesson:
60
+ Entry format:
51
61
 
52
62
  ```
53
- - **<topic>** — tried <X>; failed because <Y>; do <Z> instead. (evidence: <shortest decisive line>, <date>)
63
+ - **<topic>** — tried <X>; failed because <Y>; do <Z> instead. (evidence: <line>, <date>)
54
64
  ```
55
65
 
56
- Committed destinations:
57
-
58
- - **Project notes file** (`CLAUDE.md` / `AGENTS.md` — extend the one the repo uses) — if the lesson is load-bearing for most future sessions and fits in 1–2 lines.
59
- - **`docs/<topic>.md`** — if it needs detail (measurements, alternatives tried, tables); then put a one-line pointer in the notes file.
60
- - Follow the project's existing convention if it already has an experiments log or notes dir — extend it, do not invent a parallel one.
66
+ Use the existing Project notes file (`CLAUDE.md`/`AGENTS.md`) for 1–2
67
+ load-bearing lines. Use `docs/<topic>.md` for detail and link it once. Follow
68
+ existing conventions; do not create a parallel notes system.
61
69
 
62
70
  ## 4. Dedup and prune
63
71
 
64
- Before writing, read the existing notes (and `MEMORY.md` when routing to harness memory):
65
-
66
- - If a note on the topic exists, **update it in place** — do not append a duplicate.
67
- - If the session **disproved** an existing note, correct or delete it and say so in the report.
68
- - The same two rules govern `docs/lessons.md` and `luciazero-heuristics.md`: a ledger entry whose cause this session disproved gets corrected or deleted — a stale lesson mis-seeds every future `/debug`.
72
+ Read destinations first. For an existing topic, update it in place. If evidence
73
+ disproves an entry, correct or delete it. Apply this to project notes,
74
+ `docs/lessons.md`, heuristics, and memory; a stale lesson mis-seeds future
75
+ debugging.
69
76
 
70
77
  ## 5. Verify as a future reader
71
78
 
72
- Re-read each entry pretending it is six months later and context is gone. Would you know what to do differently? If an entry needs this session's context to make sense, rewrite it with the missing facts inline.
73
-
74
- Report what was recorded, where, and what was deliberately not recorded (and why).
79
+ Read each entry as if six months later with no session context. Add the missing
80
+ action/evidence or delete it. Report what was recorded, where, and what was
81
+ deliberately not recorded and why.
@@ -3,131 +3,80 @@ name: show
3
3
  description: Visualize code structure, changes, and verification evidence in the smallest useful view. Use for connections, flows, diffs, file maps, Mermaid diagrams, evidence maps, or focused HTML; show facts and label unknowns.
4
4
  ---
5
5
 
6
- # Show — make the evidence visible
6
+ # Show
7
7
 
8
- Answer three questions at a glance:
9
-
10
- 1. What connects to what?
11
- 2. What changed?
12
- 3. What proves it?
13
-
14
- Build an evidence view, not a decorative diagram. The view summarizes reality;
15
- source files, diffs, and command results remain the ground truth.
8
+ Answer at a glance: What connects to what? What changed? What proves it? Build
9
+ an evidence view, not a decorative diagram; source, diff, and command output
10
+ remain ground truth.
16
11
 
17
12
  ## 1. Set the focus
18
13
 
19
- Use the user's question and current task context as the input. Do not ask for
20
- details that can be discovered from the repository. Narrow broad requests to
21
- the smallest boundary that answers the question, and state that boundary.
22
-
23
- Gather only the relevant evidence:
14
+ Use the request and repository context. Do not ask for details that can be
15
+ discovered from the repository. State the smallest boundary that answers the
16
+ question. Gather only:
24
17
 
25
18
  - definitions, callers, consumers, configuration, and ownership;
26
- - the current diff or before/after revisions;
27
- - verification command, exit code, shortest decisive output, and coverage gaps.
19
+ - current diff or before/after revisions;
20
+ - verify command, exit code, decisive output, and coverage gaps.
28
21
 
29
- Never expose private chain-of-thought. Show observable structure, evidence, and
30
- concise conclusions instead.
22
+ Never expose private chain-of-thought. Show observable evidence and conclusions.
31
23
 
32
24
  ## 2. Normalize the evidence
33
25
 
34
- Reduce what was found to five kinds of information:
35
-
36
- - **Entities** — files, functions, components, services, states, or commands;
37
- - **Relations** — calls, owns, reads, writes, emits, depends on, or verifies;
38
- - **Changes** — added, removed, or modified entities and relations;
39
- - **Proof** — commands and observations that confirm or refute a claim;
40
- - **Gaps** — unknown, inferred, or unverified parts.
41
-
42
- Label inference as `? inferred`; never draw a guessed edge as fact.
26
+ Keep five kinds: **Entities**, **Relations**, **Changes**, **Proof**, and
27
+ **Gaps**. Label inference as `? inferred`; never draw a guessed edge as fact.
43
28
 
44
29
  ## 3. Choose the smallest useful view
45
30
 
46
31
  Prefer the first form that carries the relationship clearly:
47
32
 
48
- | Question | View |
49
- |---|---|
50
- | What does this logic decide? | Compact pseudocode |
51
- | Who calls what at runtime? | Call tree |
52
- | Who owns or contains what? | Component or shallow file tree |
53
- | How do 3+ parts exchange control or data? | Mermaid flow or sequence |
54
- | What changed structurally? | Before/after structural diff |
55
- | Why is this considered complete? | Requirement-to-proof evidence map |
56
- | Is prose already clearer? | One sentence or a short list; draw nothing |
57
-
58
- Use one primary view. Add a second only when it answers a different question.
59
- Use focused HTML only for dense UI, layout, or interactive state that text and
60
- Mermaid cannot show clearly. Keep HTML temporary unless the user asks to keep
61
- it, and open it only when the harness and user permissions allow.
33
+ - decision → compact pseudocode;
34
+ - runtime calls → call tree;
35
+ - ownership → shallow tree;
36
+ - 3+ interacting parts → Mermaid flow/sequence;
37
+ - structural change → before/after diff;
38
+ - completion → requirement-to-proof map;
39
+ - clear prose → one sentence or short list.
62
40
 
63
- ## 4. Render with a stable grammar
41
+ Use one primary view. Add another only for a different question. Reserve focused
42
+ HTML for dense UI or interactive state. Keep HTML temporary unless the user asks
43
+ to keep it, and open it only with permission.
64
44
 
65
- Use these marks consistently in text views:
45
+ ## 4. Render with a stable grammar
66
46
 
67
47
  ```text
68
- A --> B calls or moves data to
69
- A --owns--> B named relationship
70
- + item added
71
- - item removed
72
- ~ item changed
73
- [+] proven verification passed
74
- [x] disproven verification failed
75
- [?] unknown not verified
76
- [path/to/file:line] source pointer
48
+ A --> B calls or moves data
49
+ A --owns--> B named relation
50
+ + / - / ~ item added / removed / changed
51
+ [+] proven
52
+ [x] disproven
53
+ [?] unknown
54
+ [path/file:line] source
77
55
  ```
78
56
 
79
- Keep labels concrete and short. Omit unrelated files, helper calls, props,
80
- states, and branches. A reader should not need a legend beyond the grammar
81
- above.
82
-
83
- For Mermaid, keep node IDs simple, quote labels containing punctuation, and
84
- put source pointers outside the diagram when they would make nodes noisy.
57
+ Keep labels concrete and short. Omit unrelated detail. For Mermaid, keep node IDs
58
+ simple, quote punctuation-heavy labels, and put noisy source pointers outside.
85
59
 
86
60
  ## 5. Attach evidence
87
61
 
88
- Every important node or edge must be traceable to at least one of:
89
-
90
- - `path/to/file:line` for source structure;
91
- - a diff hunk or revision for a change;
92
- - an exact command, exit code, and shortest decisive output for proof.
93
-
94
- Do not use a green-looking diagram as verification. If no command ran, write
95
- `not run`. If a check does not cover a shown claim, mark that claim `[?]` and
96
- name the missing coverage. Failed proof remains visible as `[x]`; do not hide it
97
- to make the view look complete.
62
+ Every important node or edge must be traceable to source, a diff/revision, or
63
+ an exact command, exit code, and shortest decisive output. A green-looking view
64
+ is not verification. If no command ran, write `not run`. If proof misses a
65
+ claim, mark that claim `[?]` and name the gap; keep failed proof visible.
98
66
 
99
67
  ## Output contract
100
68
 
101
- Return, in this order:
69
+ Return in order:
102
70
 
103
- 1. **Answer** — one or two sentences naming the focus and conclusion.
104
- 2. **View** — the smallest useful visual.
71
+ 1. **Answer** — focus and conclusion in 1–2 sentences.
72
+ 2. **View** — smallest useful visual.
105
73
  3. **Sources** — compact file/line or revision pointers.
106
- 4. **Proof** — command, exit code, and decisive output; or `not run`.
107
- 5. **Unknowns** — uncovered or inferred parts; omit only when there are none.
108
-
109
- For a completed change, an evidence map may look like:
110
-
111
- ```text
112
- request
113
- --> ~ skills/catalog.txt
114
- --> + skills/show/SKILL.md
115
- --> ~ README.md / README.th.md
116
- |
117
- +--verified by--> [+] ./test.sh (exit 0)
118
- `PASS all checks green`
119
-
120
- [?] Real invocation in a fresh agent session was not exercised.
121
- ```
74
+ 4. **Proof** — command, exit code, decisive output; or `not run`.
75
+ 5. **Unknowns** — omit only when none exist.
122
76
 
123
77
  ## Fit into the Luciazero loop
124
78
 
125
- - With `/ready`, show the path from CI to the repository verify command.
126
- - With `/plan`, show the proposed before/after boundary and acceptance proof.
127
- - With `/debug`, show hypothesis → observation → conclusion without replacing
128
- the reproduction or hypothesis ledger.
129
- - With `/done`, show requirement → changed artifact → verification evidence.
130
- - With `/lucia-relay`, show current state → next action → blocker.
131
-
132
- The lifecycle skill owns the work and verification. `/show` only makes its
133
- structure and evidence easier to inspect.
79
+ Lifecycle skills own work and proof: `/ready` CI→verify, `/plan` boundary,
80
+ `/debug` hypothesis→observation, `/done` requirement→proof, and
81
+ `/lucia-relay` state→next action. The lifecycle skill owns the work and
82
+ verification. `/show` only exposes its structure.