litclaude-ai 0.3.48 → 0.4.3
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/CHANGELOG.md +60 -0
- package/README.md +50 -6
- package/README_ko-KR.md +32 -6
- package/RELEASE_CHECKLIST.md +22 -7
- package/bin/litclaude-ai.js +77 -4
- package/docs/hooks.md +45 -11
- package/docs/rules.md +13 -11
- package/docs/workflow-compatibility-audit.md +1 -1
- package/package.json +1 -1
- package/plugins/litclaude/.claude-plugin/plugin.json +1 -1
- package/plugins/litclaude/bin/litclaude-hook.js +135 -40
- package/plugins/litclaude/bin/litclaude-mcp.js +1 -1
- package/plugins/litclaude/hooks/hooks.json +4 -17
- package/plugins/litclaude/lib/canonical-frontend-commitments.mjs +4 -4
- package/plugins/litclaude/lib/canonical-runtime-commitments.mjs +6 -6
- package/plugins/litclaude/lib/canonical-skill-resources.mjs +33 -11
- package/plugins/litclaude/lib/deliverable-hedge-guard.mjs +395 -0
- package/plugins/litclaude/lib/lit-plan-persistence.mjs +133 -0
- package/plugins/litclaude/lib/skill-loop/apply.mjs +391 -0
- package/plugins/litclaude/lib/skill-loop/authority.mjs +129 -0
- package/plugins/litclaude/lib/skill-loop/cli.mjs +67 -0
- package/plugins/litclaude/lib/skill-loop/common.mjs +279 -0
- package/plugins/litclaude/lib/skill-loop/config.mjs +91 -0
- package/plugins/litclaude/lib/skill-loop/curator.mjs +636 -0
- package/plugins/litclaude/lib/skill-loop/hook-runtime.mjs +174 -0
- package/plugins/litclaude/lib/skill-loop/hook-state.mjs +484 -0
- package/plugins/litclaude/lib/skill-loop/ledger.mjs +834 -0
- package/plugins/litclaude/lib/skill-loop/mutation-transaction.mjs +505 -0
- package/plugins/litclaude/lib/skill-loop/proposal-reader.mjs +26 -0
- package/plugins/litclaude/lib/skill-loop/proposal-record.mjs +104 -0
- package/plugins/litclaude/lib/skill-loop/proposal-store.mjs +155 -0
- package/plugins/litclaude/lib/skill-loop/proposals.mjs +26 -0
- package/plugins/litclaude/lib/skill-loop/review-runner.mjs +13 -0
- package/plugins/litclaude/lib/skill-loop/review-transaction.mjs +358 -0
- package/plugins/litclaude/lib/skill-loop/review.mjs +222 -0
- package/plugins/litclaude/lib/skill-loop/usage.mjs +218 -0
- package/plugins/litclaude/skills/ai-slop-remover/SKILL.md +7 -0
- package/plugins/litclaude/skills/autoconference/SKILL.md +7 -0
- package/plugins/litclaude/skills/autoresearch/SKILL.md +7 -0
- package/plugins/litclaude/skills/browser-drive/SKILL.md +7 -0
- package/plugins/litclaude/skills/comment-checker/SKILL.md +7 -0
- package/plugins/litclaude/skills/debugging/SKILL.md +7 -0
- package/plugins/litclaude/skills/deep-interview/SKILL.md +7 -0
- package/plugins/litclaude/skills/frontend-ui-ux/references/_canonical-corpus/legal/frontend-ATTRIBUTION.md +5 -6
- package/plugins/litclaude/skills/frontend-ui-ux/references/_canonical-corpus/manifest.json +2 -2
- package/plugins/litclaude/skills/frontend-ui-ux/references/complete-contract.md +7 -0
- package/plugins/litclaude/skills/git-master/SKILL.md +7 -0
- package/plugins/litclaude/skills/hyperplan/SKILL.md +7 -0
- package/plugins/litclaude/skills/init-deep/SKILL.md +7 -0
- package/plugins/litclaude/skills/korean-ai-slop-remover/SKILL.md +7 -0
- package/plugins/litclaude/skills/lit-comprehend/SKILL.md +7 -0
- package/plugins/litclaude/skills/lit-handoff/SKILL.md +11 -4
- package/plugins/litclaude/skills/lit-loop/SKILL.md +7 -0
- package/plugins/litclaude/skills/lit-plan/SKILL.md +12 -2
- package/plugins/litclaude/skills/lit-recap/SKILL.md +7 -0
- package/plugins/litclaude/skills/lit-scientific-visualization/SKILL.md +7 -0
- package/plugins/litclaude/skills/litgoal/SKILL.md +7 -0
- package/plugins/litclaude/skills/litresearch/SKILL.md +7 -0
- package/plugins/litclaude/skills/litwork/SKILL.md +7 -0
- package/plugins/litclaude/skills/lsp/SKILL.md +7 -0
- package/plugins/litclaude/skills/lsp-setup/SKILL.md +7 -0
- package/plugins/litclaude/skills/programming/SKILL.md +7 -0
- package/plugins/litclaude/skills/refactor/SKILL.md +7 -0
- package/plugins/litclaude/skills/remove-ai-slops/SKILL.md +7 -0
- package/plugins/litclaude/skills/review-work/SKILL.md +7 -0
- package/plugins/litclaude/skills/rules/SKILL.md +15 -1
- package/plugins/litclaude/skills/skill-observer/SKILL.md +49 -7
- package/plugins/litclaude/skills/skill-observer/references/review-contract.md +77 -0
- package/plugins/litclaude/skills/skill-observer/scripts/skill-loop.mjs +10 -0
- package/plugins/litclaude/skills/start-work/SKILL.md +7 -0
- package/plugins/litclaude/skills/structural-search/SKILL.md +7 -0
- package/plugins/litclaude/skills/teammode/SKILL.md +7 -0
- package/plugins/litclaude/skills/visual-qa/references/complete-contract.md +7 -0
- package/plugins/litclaude/skills/wikify/SKILL.md +7 -0
- package/scripts/qa-real-surface-behaviors.mjs +1 -1
- package/scripts/validate-plugin.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,65 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.3 - 2026-08-31 — packed-payload integrity and channel routing
|
|
4
|
+
|
|
5
|
+
- Add packed-payload substance, cross-product parity, and referenced-path checks so
|
|
6
|
+
installed skills cannot silently lose the material they reference.
|
|
7
|
+
- Route post-compact rule re-injection through the channel Claude Code actually reads,
|
|
8
|
+
so compacted sessions receive the intended rules again.
|
|
9
|
+
- Refresh the canonical legal attribution metadata without changing the four upstream
|
|
10
|
+
attributions it records. This is a local release candidate only; no publish, tag, or
|
|
11
|
+
push was performed.
|
|
12
|
+
|
|
13
|
+
## 0.4.2 - 2026-08-30 — coordinated major-update-v2 patch release
|
|
14
|
+
|
|
15
|
+
- Require `lit-plan` to persist `plans/<slug>.md` with executable checkbox tasks
|
|
16
|
+
before a planning turn ends; approval gates execution after the plan exists.
|
|
17
|
+
- Add the shared installer frame, `--yes` path, and explicit host-owned model
|
|
18
|
+
selection notice while preserving Claude's host routing authority.
|
|
19
|
+
- Remove the retired handoff name from model-facing guidance and keep the
|
|
20
|
+
native handoff route available without a legacy user-skill path.
|
|
21
|
+
- This is a local release candidate only; no publish, tag, or push was performed.
|
|
22
|
+
|
|
23
|
+
## 0.4.1 - 2026-08-29 — approval-gated skill learning loop
|
|
24
|
+
|
|
25
|
+
- Observe validated skill consultations, bounded user corrections, tool
|
|
26
|
+
iteration signals, and coverage gaps without persisting raw transcripts. A
|
|
27
|
+
detached Stop review may queue at most three schema-valid pending proposals;
|
|
28
|
+
it never applies them.
|
|
29
|
+
- Add explicit list, apply, reject, rollback, and curator commands. Apply is the
|
|
30
|
+
only approval transition and may mutate only project
|
|
31
|
+
`.claude/skills/<name>/SKILL.md` packages marked
|
|
32
|
+
`litclaudeAgentGenerated: "true"`; bundled and unmarked user skills remain
|
|
33
|
+
protected.
|
|
34
|
+
- Record exact before/after snapshots in the project-local decision ledger and
|
|
35
|
+
content-addressed blob store. Rollback uses ownership, identity, and byte
|
|
36
|
+
checks and fails closed on conflicts.
|
|
37
|
+
- Add a deterministic SessionStart curator for projects that already have
|
|
38
|
+
skill-loop usage state. The default seven-day/two-hour schedule marks
|
|
39
|
+
eligible skills stale after 30 days and archives them after 90 days only
|
|
40
|
+
after backup; deletion, consolidation, and automatic apply remain disabled.
|
|
41
|
+
- Pin the complete skill-loop runtime and observer resources in the canonical
|
|
42
|
+
manifest, keep local `.litclaude` state out of the package, and reject
|
|
43
|
+
unpinned bundled-skill payload additions.
|
|
44
|
+
|
|
45
|
+
## 0.4.0 - 2026-08-27 — output-channel enforcement
|
|
46
|
+
|
|
47
|
+
- Add a standalone `#contract.output_channels` declaration to every shipped
|
|
48
|
+
skill contract, with the byte-budgeted `frontend-ui-ux` and `visual-qa`
|
|
49
|
+
declarations kept in their lazy `references/complete-contract.md` files.
|
|
50
|
+
- Enumerate the complete skill corpus in the documentation gate and enforce the
|
|
51
|
+
five allowed artifact genres and their exact limitations-channel mappings.
|
|
52
|
+
- Add Claude-native `PostToolUse` hedge feedback. Claude Code can return
|
|
53
|
+
model-visible `additionalContext` after a successful write, so the guard
|
|
54
|
+
resolves the active skill's declared genre and inspects only bounded explicit
|
|
55
|
+
write content from the host event. It never opens an artifact path, and asks
|
|
56
|
+
for a revision when a client deliverable leaks absent-evidence or limitation
|
|
57
|
+
prose.
|
|
58
|
+
- Record the validated scope honestly: two isolated A/B experiments found no
|
|
59
|
+
measurable behavior change from the contract prose alone. The declaration is
|
|
60
|
+
machine-readable metadata consumed by the guard; this release does not claim
|
|
61
|
+
that the prose itself makes the model write cleaner documents.
|
|
62
|
+
|
|
3
63
|
## 0.3.48 - 2026-08-26 — version alignment
|
|
4
64
|
|
|
5
65
|
- Align the package, plugin manifest, MCP server, README surfaces, release
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<p align="center"><img src="https://cdn.jsdelivr.net/npm/litclaude-ai@0.3
|
|
1
|
+
<p align="center"><img src="https://cdn.jsdelivr.net/npm/litclaude-ai@0.4.3/cover.png" width="100%" alt="LitClaude — Claude Code-native workflow package" /></p>
|
|
2
2
|
|
|
3
3
|
<h1 align="center">LitClaude</h1>
|
|
4
4
|
<p align="center">
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</p>
|
|
10
10
|
<p align="center">
|
|
11
11
|
<img src="https://img.shields.io/badge/npm-litclaude--ai-cb3837" alt="npm: litclaude-ai" />
|
|
12
|
-
<img src="https://img.shields.io/badge/version-0.3
|
|
12
|
+
<img src="https://img.shields.io/badge/version-0.4.3-2ea44f" alt="version 0.4.3" />
|
|
13
13
|
<img src="https://img.shields.io/badge/Claude%20Code-plugin-blueviolet" alt="Claude Code plugin" />
|
|
14
14
|
<img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license" />
|
|
15
15
|
</p>
|
|
@@ -50,13 +50,13 @@ npx --yes litclaude-ai@latest install
|
|
|
50
50
|
For a reproducible install, pin the current package version:
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
|
-
npm view litclaude-ai@0.3
|
|
53
|
+
npm view litclaude-ai@0.4.3 version
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
If that lookup returns `0.3
|
|
56
|
+
If that lookup returns `0.4.3`, the exact install is available:
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
|
-
npx --yes litclaude-ai@0.3
|
|
59
|
+
npx --yes litclaude-ai@0.4.3 install
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
Otherwise, wait for explicit human publication before using that pin. Check the
|
|
@@ -78,6 +78,24 @@ npx --yes litclaude-ai@latest install --yolo
|
|
|
78
78
|
`safe` adds no permission rules. `balanced` adds bounded read/search and routine
|
|
79
79
|
Git, npm, and Node rules. `yolo` adds broader edit/write patterns. These modes
|
|
80
80
|
write bounded entries under Claude's `permissions.allow` and `permissions.deny`.
|
|
81
|
+
|
|
82
|
+
### Install-time questions
|
|
83
|
+
|
|
84
|
+
On a TTY the installer asks two questions: the HUD brand color and the LitClaude
|
|
85
|
+
output style. The output-style question offers `None / keep current`,
|
|
86
|
+
ASD-STE100, and ELI5 (each in English and 한국어); a LitClaude style is written to
|
|
87
|
+
Claude's global `outputStyle` only when you pick one, never over a value you set
|
|
88
|
+
yourself, and `uninstall` removes it again only if it is still the LitClaude-written
|
|
89
|
+
value. `LITCLAUDE_OUTPUT_STYLE` and `LITCLAUDE_HUD_ACCENT` answer the questions
|
|
90
|
+
non-interactively, and `--yes` skips every question with today's shipped defaults:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
npx --yes litclaude-ai@latest install --yes
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The installer never asks for a model or reasoning effort: model selection is
|
|
97
|
+
host-owned — Claude Code picks its own models — and the summary prints
|
|
98
|
+
`Model selection: host-owned`.
|
|
81
99
|
Existing settings are preserved; LitClaude tracks and removes only rules it
|
|
82
100
|
inserted.
|
|
83
101
|
|
|
@@ -126,7 +144,33 @@ such as `/litclaude:lit-loop`.
|
|
|
126
144
|
| `lit-scientific-visualization` | Prepare publication figures; also `/litclaude:lit-scientific-visualization` |
|
|
127
145
|
| `litclaude wikify <capture/save/review/query/config>` | Manage reviewed local structured knowledge |
|
|
128
146
|
| `browser-drive`, `$browser-drive` | Drive a real page only after a capability probe verifies an external driver; never substitute a fetch, use credentials, or install without approval |
|
|
129
|
-
| `skill-observer`, `$skill-observer` |
|
|
147
|
+
| `skill-observer`, `$skill-observer` | Review bounded learning signals and manage pending proposals; only an explicit foreground `apply <proposal-id>` may change an eligible agent-owned skill |
|
|
148
|
+
|
|
149
|
+
## Skill learning loop
|
|
150
|
+
|
|
151
|
+
LitClaude records bounded learning signals only after a validated `SKILL.md`
|
|
152
|
+
consultation: user corrections, repeated tool iterations, and coverage gaps. A
|
|
153
|
+
Stop review treats the bounded, secret-scrubbed transcript excerpt as inert data
|
|
154
|
+
and may queue schema-valid proposals, but it never stores that excerpt or edits a
|
|
155
|
+
skill. Automatic application is disabled (`autoApply: false`); a proposal remains
|
|
156
|
+
`pending` until the user explicitly applies or rejects its exact id.
|
|
157
|
+
|
|
158
|
+
Use `/litclaude:skill-observer list`, `apply <proposal-id>`, `reject
|
|
159
|
+
<proposal-id>`, `rollback <ledger-id>`, `curator status`, or `curator run` from
|
|
160
|
+
the project whose state you want to manage. Apply can write only an eligible
|
|
161
|
+
project `.claude/skills/<name>/SKILL.md` carrying
|
|
162
|
+
`metadata.litclaudeAgentGenerated: "true"`. Bundled skill ids, paths outside
|
|
163
|
+
that root, and existing unmarked user skills are protected. Every mutation is
|
|
164
|
+
recorded in `.litclaude/skill-ledger.jsonl` with content-addressed blobs under
|
|
165
|
+
`.litclaude/skill-ledger-blobs/`; rollback verifies current bytes and restores
|
|
166
|
+
the exact recorded snapshot or fails closed.
|
|
167
|
+
|
|
168
|
+
The deterministic curator runs no more often than every seven days and only
|
|
169
|
+
after two idle hours. By default it marks unused eligible skills stale after 30
|
|
170
|
+
days and archives them after 90 days, taking a backup first. It never deletes or
|
|
171
|
+
consolidates skills. SessionStart runs this maintenance only when project-local
|
|
172
|
+
skill-loop usage state already exists; untouched projects receive no new
|
|
173
|
+
`.litclaude` state.
|
|
130
174
|
|
|
131
175
|
`lit start work <plan>` is intentionally a `BLOCKED:` handoff. Use
|
|
132
176
|
`/start-work` or `/litclaude:start-work` with the approved plan. `lit workflow`
|
package/README_ko-KR.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<p align="center"><img src="https://cdn.jsdelivr.net/npm/litclaude-ai@0.3
|
|
1
|
+
<p align="center"><img src="https://cdn.jsdelivr.net/npm/litclaude-ai@0.4.3/cover.png" width="100%" alt="LitClaude — Claude Code-native workflow package" /></p>
|
|
2
2
|
|
|
3
3
|
<h1 align="center">LitClaude</h1>
|
|
4
4
|
<p align="center">
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</p>
|
|
10
10
|
<p align="center">
|
|
11
11
|
<img src="https://img.shields.io/badge/npm-litclaude--ai-cb3837" alt="npm: litclaude-ai" />
|
|
12
|
-
<img src="https://img.shields.io/badge/version-0.3
|
|
12
|
+
<img src="https://img.shields.io/badge/version-0.4.3-2ea44f" alt="version 0.4.3" />
|
|
13
13
|
<img src="https://img.shields.io/badge/Claude%20Code-plugin-blueviolet" alt="Claude Code plugin" />
|
|
14
14
|
<img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license" />
|
|
15
15
|
</p>
|
|
@@ -52,13 +52,13 @@ npx --yes litclaude-ai@latest install
|
|
|
52
52
|
뒤 고정합니다.
|
|
53
53
|
|
|
54
54
|
```bash
|
|
55
|
-
npm view litclaude-ai@0.3
|
|
55
|
+
npm view litclaude-ai@0.4.3 version
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
조회 결과가 `0.3
|
|
58
|
+
조회 결과가 `0.4.3`이면 exact install을 사용할 수 있습니다.
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
|
-
npx --yes litclaude-ai@0.3
|
|
61
|
+
npx --yes litclaude-ai@0.4.3 install
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
그렇지 않으면 명시적인 human publication을 기다립니다. Pin은 그 뒤에 사용합니다.
|
|
@@ -128,7 +128,33 @@ hook을 중복 활성화하지 않습니다. 명시적으로 skill을 실행하
|
|
|
128
128
|
| `lit-scientific-visualization` | 출판용 figure를 준비합니다. `/litclaude:lit-scientific-visualization`도 지원합니다. |
|
|
129
129
|
| `litclaude wikify <capture/save/review/query/config>` | 검토 기반 local structured knowledge를 관리합니다. |
|
|
130
130
|
| `browser-drive`, `$browser-drive` | 외부 driver capability probe가 확인된 뒤에만 실제 page를 조작합니다. fetch로 대체하지 않으며 credential 사용과 승인 없는 설치를 하지 않습니다. |
|
|
131
|
-
| `skill-observer`, `$skill-observer` | 제한된
|
|
131
|
+
| `skill-observer`, `$skill-observer` | 제한된 learning signal을 검토하고 pending proposal을 관리합니다. 명시적인 foreground `apply <proposal-id>`만 eligible agent-owned skill을 변경할 수 있습니다. |
|
|
132
|
+
|
|
133
|
+
## Skill learning loop
|
|
134
|
+
|
|
135
|
+
LitClaude는 검증된 `SKILL.md` consultation 뒤에만 user correction, 반복된 tool
|
|
136
|
+
iteration, coverage gap을 제한된 learning signal로 기록합니다. Stop review는
|
|
137
|
+
secret을 제거한 bounded transcript excerpt를 inert data로 다루며 schema-valid
|
|
138
|
+
proposal을 queue할 수 있지만, excerpt 자체를 저장하거나 skill을 수정하지
|
|
139
|
+
않습니다. 자동 적용은 꺼져 있고(`autoApply: false`), 사용자가 정확한 id를
|
|
140
|
+
명시해 apply 또는 reject하기 전까지 proposal은 `pending`입니다.
|
|
141
|
+
|
|
142
|
+
관리할 state가 있는 project에서 `/litclaude:skill-observer list`, `apply
|
|
143
|
+
<proposal-id>`, `reject <proposal-id>`, `rollback <ledger-id>`, `curator
|
|
144
|
+
status`, `curator run`을 사용합니다. Apply는
|
|
145
|
+
`metadata.litclaudeAgentGenerated: "true"`를 가진 eligible project
|
|
146
|
+
`.claude/skills/<name>/SKILL.md`에만 쓸 수 있습니다. Bundled skill id, 이 root
|
|
147
|
+
밖의 path, marker가 없는 기존 user skill은 보호됩니다. 모든 mutation은
|
|
148
|
+
`.litclaude/skill-ledger.jsonl`에 기록되고 content-addressed blob은
|
|
149
|
+
`.litclaude/skill-ledger-blobs/`에 저장됩니다. Rollback은 현재 byte를 검증한
|
|
150
|
+
뒤 기록된 exact snapshot을 복원하며, 검증할 수 없으면 fail closed합니다.
|
|
151
|
+
|
|
152
|
+
Deterministic curator는 7일보다 자주 실행되지 않고 2시간 idle 뒤에만
|
|
153
|
+
실행됩니다. 기본값은 eligible skill을 30일 뒤 stale로 표시하고 90일 뒤 먼저
|
|
154
|
+
backup한 다음 archive하는 것입니다. Skill을 delete하거나 consolidate하지
|
|
155
|
+
않습니다. SessionStart maintenance는 project-local skill-loop usage state가 이미
|
|
156
|
+
있을 때만 실행되므로 untouched project에 새 `.litclaude` state를 만들지
|
|
157
|
+
않습니다.
|
|
132
158
|
|
|
133
159
|
`lit start work <plan>`은 의도적으로 `BLOCKED:` handoff를 반환합니다. 승인된
|
|
134
160
|
plan과 함께 `/start-work` 또는 `/litclaude:start-work`를 사용하세요. `lit
|
package/RELEASE_CHECKLIST.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# LitClaude Release Checklist
|
|
2
2
|
|
|
3
|
-
Status: `litclaude-ai@0.3
|
|
3
|
+
Status: `litclaude-ai@0.4.3` is the current release candidate — exact canonical
|
|
4
4
|
frontend corpus plus Claude-native `autoresearch`, `autoconference`, and `wikify`
|
|
5
5
|
workflow-family integration. It byte-pins the frontend library, legal companions,
|
|
6
6
|
family source closures, and adapters through independent commitments and package
|
|
@@ -45,9 +45,24 @@ side-effect-free, the launcher starts only a separate Claude Code
|
|
|
45
45
|
print/background worker, and the release preserves the Korean polishing
|
|
46
46
|
command, strict multi-agent review pipeline, fidelity guardrails, package
|
|
47
47
|
hygiene checks, native route gates, and safe start-work handoff behavior.
|
|
48
|
-
`package.json` is aligned to `0.3
|
|
49
|
-
`plugins/litclaude/.claude-plugin/plugin.json` is aligned to `0.3
|
|
50
|
-
plugin-local MCP server reports `0.3
|
|
48
|
+
`package.json` is aligned to `0.4.3`,
|
|
49
|
+
`plugins/litclaude/.claude-plugin/plugin.json` is aligned to `0.4.3`, and the
|
|
50
|
+
plugin-local MCP server reports `0.4.3`.
|
|
51
|
+
|
|
52
|
+
This candidate adds an approval-gated skill learning loop. Validated
|
|
53
|
+
consultations, bounded corrections, iteration signals, and coverage gaps may
|
|
54
|
+
produce pending proposals, but hooks and model reviews never apply them.
|
|
55
|
+
Foreground apply is restricted to marked agent-owned project skills, with
|
|
56
|
+
byte-exact ledger-backed rollback. The deterministic curator backs up and
|
|
57
|
+
archives eligible skills on its bounded schedule, never deletes or consolidates,
|
|
58
|
+
and runs at SessionStart only when project-local usage state already exists.
|
|
59
|
+
Automatic apply remains disabled.
|
|
60
|
+
|
|
61
|
+
The 0.4.0 release added machine-readable output-channel declarations across the
|
|
62
|
+
shipped skill corpus and a `PostToolUse` hedge-feedback path. Two isolated A/B
|
|
63
|
+
experiments found no measurable behavior change from declaration prose alone,
|
|
64
|
+
so the declaration remains guard metadata rather than evidence that prose
|
|
65
|
+
instructions by themselves improve generated documents.
|
|
51
66
|
|
|
52
67
|
This release carries the v0.2.2 Dynamic workflow hardening surfaces:
|
|
53
68
|
`/dynamic-workflow`, `workflow-check --json`, native `/goal` fallback guidance,
|
|
@@ -280,9 +295,9 @@ checkout and from an isolated install of the packed tarball:
|
|
|
280
295
|
Before requesting publication approval, confirm these artifacts from the current
|
|
281
296
|
checkout:
|
|
282
297
|
|
|
283
|
-
- `package.json` version is `0.3
|
|
284
|
-
- `plugins/litclaude/.claude-plugin/plugin.json` version is `0.3
|
|
285
|
-
- `plugins/litclaude/bin/litclaude-mcp.js` reports server version `0.3
|
|
298
|
+
- `package.json` version is `0.4.3`.
|
|
299
|
+
- `plugins/litclaude/.claude-plugin/plugin.json` version is `0.4.3`.
|
|
300
|
+
- `plugins/litclaude/bin/litclaude-mcp.js` reports server version `0.4.3`.
|
|
286
301
|
- Prompt-hook tests cover bundled `SKILL.md` body injection for bare `hyperplan`, `litresearch`, `lit research`, `init-deep`, and explicit leading `$start-work`; diagnostic/copy mentions stay inert while leading natural-language `lit start work` stays BLOCKED.
|
|
287
302
|
- `lit search` and `lit query` route to `/litclaude:litresearch` without activating on slash mentions, code spans, or non-lit prompts.
|
|
288
303
|
- Litresearch web lanes require public API/feed preference, validator-first checks, route traces, prompt-injection quarantine, and honest auth/paywall/private-data stop reasons.
|
package/bin/litclaude-ai.js
CHANGED
|
@@ -72,6 +72,10 @@ Install options:
|
|
|
72
72
|
only LitClaude-inserted entries. Planner/read-only agent
|
|
73
73
|
safeguards are never weakened.
|
|
74
74
|
--yolo Shorthand for --permission-mode yolo.
|
|
75
|
+
--yes Accept today's shipped defaults for every question (HUD accent,
|
|
76
|
+
output style) and run without prompts. Model selection stays
|
|
77
|
+
host-owned: Claude Code picks its own models, so the installer
|
|
78
|
+
never asks for a model or reasoning effort.
|
|
75
79
|
`;
|
|
76
80
|
|
|
77
81
|
const parseArgs = (argv) => {
|
|
@@ -146,6 +150,7 @@ const parseInstallOptions = (rest, existingPermissionMode = "safe") => {
|
|
|
146
150
|
const preservedMode = permissionModes.has(existingPermissionMode) ? existingPermissionMode : "safe";
|
|
147
151
|
let permissionMode = parsePermissionMode(process.env.LITCLAUDE_PERMISSION_MODE || preservedMode);
|
|
148
152
|
let permissionExplicit = Boolean(process.env.LITCLAUDE_PERMISSION_MODE);
|
|
153
|
+
let assumeYes = false;
|
|
149
154
|
|
|
150
155
|
for (let index = 0; index < rest.length; index += 1) {
|
|
151
156
|
const arg = rest[index];
|
|
@@ -169,10 +174,14 @@ const parseInstallOptions = (rest, existingPermissionMode = "safe") => {
|
|
|
169
174
|
if (arg === "--no-permission-prompt") {
|
|
170
175
|
continue;
|
|
171
176
|
}
|
|
177
|
+
if (arg === "--yes") {
|
|
178
|
+
assumeYes = true;
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
172
181
|
fail(`Unknown install option: ${arg}`, 64);
|
|
173
182
|
}
|
|
174
183
|
|
|
175
|
-
return { permissionMode, permissionExplicit };
|
|
184
|
+
return { permissionMode, permissionExplicit, assumeYes };
|
|
176
185
|
};
|
|
177
186
|
|
|
178
187
|
const permissionProfile = (mode) => {
|
|
@@ -238,6 +247,39 @@ const formatInstallStep = (label) => {
|
|
|
238
247
|
return `${color256(theme.code, theme.tag)} ${bold(label)}`;
|
|
239
248
|
};
|
|
240
249
|
|
|
250
|
+
// Shared LitFamily banner frame (plans/references/installer-choice-contract.md):
|
|
251
|
+
// a 46-glyph rule, the spaced wordmark, and ╭─/│/╰─ stage frames. Byte-identical
|
|
252
|
+
// glyphs across products; only name, version, and tagline differ.
|
|
253
|
+
const FAMILY_RULE = ` ${"━".repeat(46)}`;
|
|
254
|
+
const trueColorSupported = () => /truecolor|24bit/iu.test(process.env.COLORTERM ?? "");
|
|
255
|
+
const brandOrange = (text) => {
|
|
256
|
+
if (!shouldColorInstall()) return text;
|
|
257
|
+
return trueColorSupported() ? `\x1b[38;2;255;90;31m${text}\x1b[0m` : `\x1b[38;5;202m${text}\x1b[0m`;
|
|
258
|
+
};
|
|
259
|
+
const planYellow = (text) => {
|
|
260
|
+
if (!shouldColorInstall()) return text;
|
|
261
|
+
return trueColorSupported() ? `\x1b[38;2;250;204;21m${text}\x1b[0m` : `\x1b[38;5;220m${text}\x1b[0m`;
|
|
262
|
+
};
|
|
263
|
+
const INSTALL_STAGES = [
|
|
264
|
+
["01", "Plugin", "copy the packaged plugin payload"],
|
|
265
|
+
["02", "Market", "write the local marketplace"],
|
|
266
|
+
["03", "Registry", "enable plugin, HUD, permissions"],
|
|
267
|
+
["04", "Cache", "refresh the compatibility pointer"],
|
|
268
|
+
["05", "Verify", "confirm every installed surface"],
|
|
269
|
+
];
|
|
270
|
+
const familyBanner = () => [
|
|
271
|
+
brandOrange(FAMILY_RULE),
|
|
272
|
+
"",
|
|
273
|
+
` ${brandOrange("🔥")} l i t claude v${version}`,
|
|
274
|
+
` ${packageJson.description}`,
|
|
275
|
+
"",
|
|
276
|
+
brandOrange(FAMILY_RULE),
|
|
277
|
+
" ╭─ INSTALL PLAN",
|
|
278
|
+
...INSTALL_STAGES.map(([number, name, description]) => ` │ ${planYellow(number)} · ${name.padEnd(10)}${description}`),
|
|
279
|
+
" ╰─ Model selection: host-owned · unrelated Claude settings preserved",
|
|
280
|
+
"",
|
|
281
|
+
].join("\n");
|
|
282
|
+
|
|
241
283
|
const createInstallProgress = () => {
|
|
242
284
|
const animated = shouldAnimateInstall();
|
|
243
285
|
let frameIndex = 0;
|
|
@@ -253,6 +295,7 @@ const createInstallProgress = () => {
|
|
|
253
295
|
process.stdout.write(`INSTALL_STEP: Installing LitClaude ${version}\n`);
|
|
254
296
|
return;
|
|
255
297
|
}
|
|
298
|
+
process.stdout.write(`\n${familyBanner()}\n`);
|
|
256
299
|
process.stdout.write(
|
|
257
300
|
`\n╭─ PREPARING INSTALL\n` +
|
|
258
301
|
`│ Package LitClaude ${version}\n` +
|
|
@@ -600,6 +643,29 @@ const uninstallHudStatusLine = (home = claudeHome()) => {
|
|
|
600
643
|
writeClaudeSettings(settings, home);
|
|
601
644
|
};
|
|
602
645
|
|
|
646
|
+
const uninstallOutputStyle = (home = claudeHome()) => {
|
|
647
|
+
const settingsPath = claudeSettingsPath(home);
|
|
648
|
+
if (!existsSync(settingsPath)) return;
|
|
649
|
+
const settings = readClaudeSettings(home);
|
|
650
|
+
const litClaude = settings[litClaudeSettingsKey];
|
|
651
|
+
if (!litClaude) return;
|
|
652
|
+
|
|
653
|
+
const writtenName = litClaude.outputStyleWrittenName ?? null;
|
|
654
|
+
if (writtenName && settings.outputStyle === writtenName) {
|
|
655
|
+
delete settings.outputStyle;
|
|
656
|
+
} else if (writtenName && settings.outputStyle !== undefined) {
|
|
657
|
+
process.stdout.write("OUTPUT_STYLE_WARNING: outputStyle changed by user; leaving it untouched\n");
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
const remainingLitClaude = { ...litClaude };
|
|
661
|
+
for (const key of ["outputStyleChoice", "outputStyleWrittenName"]) {
|
|
662
|
+
delete remainingLitClaude[key];
|
|
663
|
+
}
|
|
664
|
+
if (Object.keys(remainingLitClaude).length > 0) settings[litClaudeSettingsKey] = remainingLitClaude;
|
|
665
|
+
else delete settings[litClaudeSettingsKey];
|
|
666
|
+
writeClaudeSettings(settings, home);
|
|
667
|
+
};
|
|
668
|
+
|
|
603
669
|
const uninstallPermissionRules = (home = claudeHome()) => {
|
|
604
670
|
const settingsPath = claudeSettingsPath(home);
|
|
605
671
|
if (!existsSync(settingsPath)) return;
|
|
@@ -939,7 +1005,7 @@ const install = async ({ dryRun, rest }) => {
|
|
|
939
1005
|
const home = claudeHome();
|
|
940
1006
|
const litClaudeHome = litHome();
|
|
941
1007
|
const existingLitClaude = readClaudeSettings(home)[litClaudeSettingsKey] ?? {};
|
|
942
|
-
const { permissionMode, permissionExplicit } = parseInstallOptions(rest, existingLitClaude.permissionMode);
|
|
1008
|
+
const { permissionMode, permissionExplicit, assumeYes } = parseInstallOptions(rest, existingLitClaude.permissionMode);
|
|
943
1009
|
const existingHudAccent = normalizeHudAccent(existingLitClaude.hudAccent);
|
|
944
1010
|
const existingOutputStyle = existingLitClaude.outputStyleChoice ?? "off";
|
|
945
1011
|
const requestedHudAccent = process.env.LITCLAUDE_HUD_ACCENT
|
|
@@ -970,8 +1036,12 @@ const install = async ({ dryRun, rest }) => {
|
|
|
970
1036
|
fail(`Packaged LitClaude plugin payload is missing: ${sourcePlugin}`);
|
|
971
1037
|
}
|
|
972
1038
|
|
|
973
|
-
const hudAccent =
|
|
974
|
-
|
|
1039
|
+
const hudAccent = assumeYes
|
|
1040
|
+
? (process.env.LITCLAUDE_HUD_ACCENT ? normalizeHudAccent(process.env.LITCLAUDE_HUD_ACCENT) : existingHudAccent)
|
|
1041
|
+
: await chooseHudAccent(existingHudAccent);
|
|
1042
|
+
const outputStyleChoice = assumeYes
|
|
1043
|
+
? normalizeOutputStyle(process.env.LITCLAUDE_OUTPUT_STYLE ?? existingOutputStyle)
|
|
1044
|
+
: await chooseOutputStyle(existingOutputStyle);
|
|
975
1045
|
progress.prepare({ claudeTarget: home, litTarget: litClaudeHome });
|
|
976
1046
|
await progress.run(
|
|
977
1047
|
{
|
|
@@ -1041,12 +1111,14 @@ const install = async ({ dryRun, rest }) => {
|
|
|
1041
1111
|
progress.receipt([
|
|
1042
1112
|
["Status", "Ready for Claude Code"],
|
|
1043
1113
|
["Version", version],
|
|
1114
|
+
["Model route", "host-owned (Claude Code picks models)"],
|
|
1044
1115
|
["Plugin", pluginKey],
|
|
1045
1116
|
["Plugin path", intendedPluginPath(home)],
|
|
1046
1117
|
["HUD", `${hudAccent} accent`],
|
|
1047
1118
|
["Permissions", `${permissionMode}; global settings allow/deny; ownership-safe removal`],
|
|
1048
1119
|
["Launch", "claude"],
|
|
1049
1120
|
]);
|
|
1121
|
+
process.stdout.write("Model selection: host-owned (Claude Code exposes no native route surface)\n");
|
|
1050
1122
|
process.stdout.write(`INSTALL_PASS: LitClaude ${version} installed\n`);
|
|
1051
1123
|
process.stdout.write(`Claude plugin: ${pluginKey}\n`);
|
|
1052
1124
|
process.stdout.write(`Marketplace: ${localMarketplace}\n`);
|
|
@@ -1259,6 +1331,7 @@ const uninstall = ({ dryRun }) => {
|
|
|
1259
1331
|
unregisterClaudePlugin();
|
|
1260
1332
|
unregisterMarketplace();
|
|
1261
1333
|
uninstallHudStatusLine();
|
|
1334
|
+
uninstallOutputStyle();
|
|
1262
1335
|
uninstallPermissionRules();
|
|
1263
1336
|
rmSync(pluginCacheRoot, { recursive: true, force: true });
|
|
1264
1337
|
process.stdout.write("UNINSTALL_PASS\n");
|
package/docs/hooks.md
CHANGED
|
@@ -12,7 +12,7 @@ surface: Claude Code plugin hooks
|
|
|
12
12
|
runtime: plugins/litclaude/bin/litclaude-hook.js
|
|
13
13
|
registration: plugins/litclaude/hooks/hooks.json
|
|
14
14
|
settings_activation: global Claude settings.json enabledPlugins entry for litclaude@litclaude-ai
|
|
15
|
-
events: [SessionStart, UserPromptSubmit, PreToolUse, PostToolUse,
|
|
15
|
+
events: [SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop, SubagentStart, SubagentStop, SessionEnd]
|
|
16
16
|
verdicts: [PASS, FAIL, BLOCKED]
|
|
17
17
|
```
|
|
18
18
|
|
|
@@ -32,11 +32,10 @@ verdicts: [PASS, FAIL, BLOCKED]
|
|
|
32
32
|
|
|
33
33
|
| Event or route | Contract mode | Hard boundary |
|
|
34
34
|
| --- | --- | --- |
|
|
35
|
-
| `SessionStart` | rules discovery and static injection | Adds context and, when
|
|
35
|
+
| `SessionStart` | rules discovery and static injection | Adds context and, when `source: compact`, durably reserves bounded rule re-injection after clearing the session dedup set. |
|
|
36
36
|
| `UserPromptSubmit` | route classifier, static-rule straggler lane, and explicit resume gate | Prompt routing adds guidance. Static-rule delivery may update rule dedup state; the exact start-work resume route may also mutate code-owned lifecycle state. |
|
|
37
37
|
| `PreToolUse` | bounded-authority enforcement | Allows normal Claude permission handling only for classified, authorized action/root pairs; otherwise denies before execution. |
|
|
38
|
-
| `PostToolUse` | conditional post-edit routing
|
|
39
|
-
| `PostCompact` | bounded context restoration | Durably reserves one unit of a 2-per-session budget, clears rule dedup state, and re-injects the static set at reduced caps. If reservation persistence fails, it emits the reset diagnostic but does not re-inject. |
|
|
38
|
+
| `PostToolUse` | conditional post-edit routing, dynamic rule injection, and deliverable hedge feedback | Names only the checks the edit earned and only the rules whose globs matched. When the current transcript identifies a loaded LitClaude skill, it reads that skill's shipped output-channel declaration and scans bounded submitted content for reader-facing paths only for `client_deliverable` / `reply`. It emits nothing when no lane applies and does not claim completion. |
|
|
40
39
|
| `Stop` | start-work continuation, then litgoal autoloop gate | Root-session and progress-bound; no unbounded loop. |
|
|
41
40
|
| `SubagentStart` / `SubagentStop` | lane identity observation | Records the root session, child lane, and Claude-owned worktree without emitting child continuation. |
|
|
42
41
|
| `SessionEnd` | root-session receipt | Records the observed end and emits no continuation. |
|
|
@@ -53,6 +52,7 @@ verdicts: [PASS, FAIL, BLOCKED]
|
|
|
53
52
|
|
|
54
53
|
- Claude Code hook JSON containing `continue: true`, `hookSpecificOutput.hookEventName`, and route-specific `additionalContext`.
|
|
55
54
|
- Optional `systemMessage` only for active LitClaude route guidance.
|
|
55
|
+
- `DELIVERABLE_HEDGE_VIOLATION` as `PostToolUse` `additionalContext` after a client-deliverable write contains a matched limitation phrase; the file has already been written, so the response asks Claude to revise it rather than claiming the write was prevented.
|
|
56
56
|
- `BLOCKED:` text for natural-language start-work, unavailable native goal binding, disabled Dynamic workflow, or gated agent-team setup.
|
|
57
57
|
- Unavailable native goal binding also includes `READY_TO_PASTE` and one bounded `/goal` command for the user to copy, paste, and send; the hook never enters or submits it.
|
|
58
58
|
|
|
@@ -85,9 +85,9 @@ settings. Separately, installer permission modes mutate global Claude settings
|
|
|
85
85
|
entries LitClaude inserted, and remove only those tracked entries on mode change or
|
|
86
86
|
uninstall.
|
|
87
87
|
|
|
88
|
-
For
|
|
89
|
-
text is emitted. A failed reservation keeps the hook alive
|
|
90
|
-
re-inject rules as if a budget unit had been reserved.
|
|
88
|
+
For `SessionStart` with `source: compact`, the **2-per-session** budget reservation must
|
|
89
|
+
be durably persisted before static rule text is emitted. A failed reservation keeps the hook alive
|
|
90
|
+
for diagnostics but does not re-inject rules as if a budget unit had been reserved.
|
|
91
91
|
Reservation uses a per-session exclusive filesystem lock around strict state read,
|
|
92
92
|
increment, fsynced temporary write, atomic rename, and directory fsync where supported. Known
|
|
93
93
|
unsupported directory-sync errors preserve portability; genuine I/O failures report an
|
|
@@ -96,20 +96,54 @@ missing state may initialize at count 0. Existing malformed, unreadable, oversiz
|
|
|
96
96
|
or otherwise uncertain state fails closed without replacement. Lock uncertainty also fails
|
|
97
97
|
closed; ordinary owners remove their lock artifact, and only a stale valid nonce/PID owner
|
|
98
98
|
whose process is no longer alive may be replaced through a fenced takeover. Live or malformed
|
|
99
|
-
incumbents are not silently removed.
|
|
99
|
+
incumbents are not silently removed. Claude Code does not collect model context from its
|
|
100
|
+
`PostCompact` stdout, so LitClaude does not register that event; the legacy runner is a
|
|
101
|
+
silent no-op for callers that still invoke it directly.
|
|
100
102
|
|
|
101
103
|
| Event | Runner | Purpose |
|
|
102
104
|
| --- | --- | --- |
|
|
103
|
-
| `SessionStart` | `plugins/litclaude/bin/litclaude-hook.js session-start` | Runs the bounded foreground automatic-update barrier
|
|
105
|
+
| `SessionStart` | `plugins/litclaude/bin/litclaude-hook.js session-start` | Runs the bounded foreground automatic-update barrier on a fresh session, discovers repo-local rule files, names the newest valid `plans/<slug>.md`, and on `source: compact` spends one of two durable re-injection reservations at reduced caps. |
|
|
104
106
|
| `UserPromptSubmit` | `plugins/litclaude/bin/litclaude-hook.js user-prompt-submit` | Detects prompt routes and injects workflow context; independently delivers static rules not already recorded for this session. |
|
|
105
107
|
| `PreToolUse` | `plugins/litclaude/bin/litclaude-hook.js pre-tool-use` | Enforces semantic action/root grants before Write, Edit, MultiEdit, NotebookEdit, Bash, Agent, and bounded read tools execute. |
|
|
106
|
-
| `PostToolUse` | `plugins/litclaude/bin/litclaude-hook.js post-tool-use` | Names the post-edit checks the edit actually earned,
|
|
107
|
-
| `PostCompact` | `plugins/litclaude/bin/litclaude-hook.js post-compact` | Durably spends one of two per-session reservations, clears the rule dedup set, and re-injects static rule bodies at reduced caps; an unpersisted reservation produces a diagnostic and no rule injection. |
|
|
108
|
+
| `PostToolUse` | `plugins/litclaude/bin/litclaude-hook.js post-tool-use` | Names the post-edit checks the edit actually earned, injects any glob-scoped rule matching the edited paths, and returns model-visible feedback when bounded submitted content for the loaded skill's declared `client_deliverable` artifact contains a hedge finding. |
|
|
108
109
|
| `Stop` | `plugins/litclaude/bin/litclaude-hook.js stop` | Emits bounded start-work continuation on new progress, otherwise applies the opt-in litgoal autoloop gate. |
|
|
109
110
|
| `SubagentStart` | `plugins/litclaude/bin/litclaude-hook.js subagent-start` | Registers child-lane and Claude-owned worktree identity. |
|
|
110
111
|
| `SubagentStop` | `plugins/litclaude/bin/litclaude-hook.js subagent-stop` | Finalizes the lane without child continuation. |
|
|
111
112
|
| `SessionEnd` | `plugins/litclaude/bin/litclaude-hook.js session-end` | Records root-session end without blocking Claude. |
|
|
112
113
|
|
|
114
|
+
### Deliverable hedge feedback
|
|
115
|
+
|
|
116
|
+
The hedge checker runs after a successful `Write`, `Edit`, or `MultiEdit` whose
|
|
117
|
+
host event includes explicit `content`, `new_string`, or `edits`, because Claude
|
|
118
|
+
Code's `PostToolUse` response can add `additionalContext` beside the completed
|
|
119
|
+
tool result. It scans only that bounded host-event content and never opens the
|
|
120
|
+
artifact path. The hook locates a loaded LitClaude skill only from an
|
|
121
|
+
assistant-side Skill invocation or the
|
|
122
|
+
exact Claude `hook_additional_context` attachment shape carrying LitClaude's
|
|
123
|
+
own `<litclaude-skill-body>` marker and the byte-identical current shipped skill
|
|
124
|
+
body in the bounded host transcript; generic
|
|
125
|
+
attachments, user text, and assistant text that merely echoes the marker cannot
|
|
126
|
+
grant a genre. It then reads `artifact_genre` and `limitations_channel` from that
|
|
127
|
+
skill's shipped `#contract.output_channels` block. The genre is never inferred
|
|
128
|
+
from a filename and is not maintained as a parallel hard-coded skill map.
|
|
129
|
+
|
|
130
|
+
Only `client_deliverable` with `limitations_channel: reply` is enforced in this
|
|
131
|
+
guard. The same prose under `working_note` is intentionally left alone. Quoted
|
|
132
|
+
status enums, JSON/YAML status scalars, fenced code, and status-table cells are
|
|
133
|
+
state rather than prose and are excluded. Korean absent-evidence matching is
|
|
134
|
+
anchored to evidence-bearing subjects such as 근거, 자료, 측정값, and 관찰 기록 so
|
|
135
|
+
factual specifications such as `이 API는 반환값이 없습니다` stay clean.
|
|
136
|
+
|
|
137
|
+
This is post-write feedback, not rollback or a permission denial. If the
|
|
138
|
+
transcript is absent, stale, oversized, malformed, or does not identify a known
|
|
139
|
+
bundled skill, or if the host event is path-only, unknown, outside the lexical
|
|
140
|
+
working root, not reader-facing, oversized, or over budget, the guard fails open
|
|
141
|
+
and the normal post-edit routes continue. It accepts at most 16 paths, 512 KiB
|
|
142
|
+
of submitted content per path, and 2 MiB in aggregate. Because no artifact
|
|
143
|
+
pathname is opened, a FIFO or an ancestor replacement cannot block the hook or
|
|
144
|
+
redirect which bytes it scans. The direct driver and regression fixtures live in
|
|
145
|
+
`test/deliverable-hedge-guard.test.mjs`.
|
|
146
|
+
|
|
113
147
|
### Cross-session plan discovery
|
|
114
148
|
|
|
115
149
|
The scaffold writer remains the only plan write surface. It writes through a same-directory
|
package/docs/rules.md
CHANGED
|
@@ -63,7 +63,7 @@ the hook.
|
|
|
63
63
|
| static | SessionStart | single-file + `alwaysApply` rules | 12,000 | 40,000 |
|
|
64
64
|
| static | UserPromptSubmit | the same, minus anything already injected this session | 6,000 | 16,000 |
|
|
65
65
|
| dynamic | PostToolUse | glob rules matching the paths the edit touched | 4,000 | 10,000 |
|
|
66
|
-
| re-inject |
|
|
66
|
+
| re-inject | SessionStart (`source: compact`) | static set again, at a small budget | 3,500 | 4,000 |
|
|
67
67
|
|
|
68
68
|
The UserPromptSubmit static lane runs whether or not a workflow prompt route activates.
|
|
69
69
|
It is a straggler lane for static rules created after SessionStart, and session dedup
|
|
@@ -74,16 +74,17 @@ Per-session dedup is keyed on `relativePath + sha256(body)[0:16]` and stored und
|
|
|
74
74
|
project's own git-ignored `.litclaude/rules/session-<id>.json`. No user profile is
|
|
75
75
|
touched. With no session id, dedup is a no-op and nothing is written.
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
allowance; past that it says the budget is spent instead
|
|
79
|
-
must be durably persisted before any rule body is emitted.
|
|
80
|
-
keeps the cache-reset diagnostic, reports that re-injection
|
|
81
|
-
re-inject an unreserved rule set.
|
|
77
|
+
Compact-sourced `SessionStart` clears the dedup set and spends one unit of a
|
|
78
|
+
**2-per-session** re-injection allowance; past that it says the budget is spent instead
|
|
79
|
+
of re-injecting. The reservation must be durably persisted before any rule body is emitted.
|
|
80
|
+
If that write fails, the hook keeps the cache-reset diagnostic, reports that re-injection
|
|
81
|
+
was skipped, and does not re-inject an unreserved rule set. Claude Code does not collect
|
|
82
|
+
model context from `PostCompact` stdout, so that event is not registered.
|
|
82
83
|
|
|
83
84
|
The state mutation is exact: successful static or dynamic delivery updates `injected`,
|
|
84
|
-
and a successful
|
|
85
|
-
`postCompactCount` in `.litclaude/rules/session-<id>.json`. No session id means
|
|
86
|
-
no
|
|
85
|
+
and a successful compact-sourced `SessionStart` reservation resets `injected` and
|
|
86
|
+
increments `postCompactCount` in `.litclaude/rules/session-<id>.json`. No session id means
|
|
87
|
+
no dedup, no compact reservation, and no rule-owned write.
|
|
87
88
|
|
|
88
89
|
Every session-state read/modify/write uses the same per-session exclusive lock, including
|
|
89
90
|
dedup updates, so another hook cannot roll a reserved count backward. A missing state file
|
|
@@ -171,5 +172,6 @@ that path. `!` anywhere else is a literal character.
|
|
|
171
172
|
|
|
172
173
|
Every lane is wrapped. An unreadable directory, a malformed rule, a symlink loop, or a
|
|
173
174
|
pattern that cannot compile results in fewer rules injected — never a failed hook. A
|
|
174
|
-
rule file over 256 KB is truncated before parsing.
|
|
175
|
-
safety budget: a failed state write keeps the hook alive but fails
|
|
175
|
+
rule file over 256 KB is truncated before parsing. Compact-sourced `SessionStart` is
|
|
176
|
+
stricter about its safety budget: a failed state write keeps the hook alive but fails
|
|
177
|
+
closed for re-injection.
|
|
@@ -53,7 +53,7 @@ the same 8 MiB per-file and 32 MiB aggregate budget before any whole-file read.
|
|
|
53
53
|
| prompt activation | `hooks/hooks.json`, `bin/litclaude-hook.js`, `commands/lit-loop.md`, `commands/lit-plan.md`, `commands/deep-interview.md`, `commands/start-work.md` | UserPromptSubmit detects workflow triggers and injects compact Claude Code guidance. |
|
|
54
54
|
| comment-checker | `skills/comment-checker`, `PostToolUse` hook guidance | Claude-native comment hygiene skill plus post-edit reminder. |
|
|
55
55
|
| lsp | `.lsp.json`, `.mcp.json`, `bin/litclaude-lsp-doctor.js`, `skills/lsp` | Lightweight Claude Code LSP/MCP helper rather than vendoring a full external package. |
|
|
56
|
-
| rules | `skills/rules`, `SessionStart`
|
|
56
|
+
| rules | `skills/rules`, `SessionStart` (`source: compact`) hook behavior | Claude session rule guidance and compact cache-reset messaging. |
|
|
57
57
|
| litgoal | `commands/litgoal.md`, `skills/litgoal`, `plugins/litclaude/lib/litgoal/`, `lit-*`, `start-work` goal guidance | Claude-native goal wording with evidence/ledger/quality-gate discipline and durable CLI state. |
|
|
58
58
|
| litwork | `commands/lit-loop.md`, `commands/lit-plan.md`, `skills/lit-loop`, `skills/lit-plan` | Claude skills, commands, agents, workflow/worktree guidance, and hook injection. |
|
|
59
59
|
| clarification interview | `commands/deep-interview.md`, `skills/deep-interview` | Socratic requirements mode with ambiguity scoring, persisted state, and a handoff to planning/execution. |
|
package/package.json
CHANGED