litclaude-ai 0.3.8 → 0.3.10
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 +22 -0
- package/README.md +44 -20
- package/README_ko-KR.md +45 -21
- package/RELEASE_CHECKLIST.md +12 -12
- package/bin/litclaude-ai.js +103 -3
- package/docs/agents.md +6 -0
- package/docs/hooks.md +18 -26
- package/package.json +1 -1
- package/plugins/litclaude/.claude-plugin/plugin.json +4 -4
- package/plugins/litclaude/agents/boulder-executor.md +5 -2
- package/plugins/litclaude/agents/prometheus-planner.md +3 -1
- package/plugins/litclaude/bin/litclaude-hook.js +116 -12
- package/plugins/litclaude/commands/lit-plan.md +5 -0
- package/plugins/litclaude/commands/litgoal.md +4 -0
- package/plugins/litclaude/commands/litresearch.md +3 -0
- package/plugins/litclaude/commands/review-work.md +1 -1
- package/plugins/litclaude/commands/start-work.md +5 -0
- package/plugins/litclaude/skills/lit-loop/SKILL.md +4 -0
- package/plugins/litclaude/skills/lit-plan/SKILL.md +6 -0
- package/plugins/litclaude/skills/litgoal/SKILL.md +4 -0
- package/plugins/litclaude/skills/litresearch/SKILL.md +4 -0
- package/plugins/litclaude/skills/programming/SKILL.md +38 -1
- package/plugins/litclaude/skills/review-work/SKILL.md +4 -0
- package/plugins/litclaude/skills/rules/SKILL.md +6 -4
- package/plugins/litclaude/skills/start-work/SKILL.md +5 -0
- package/scripts/validate-plugin.mjs +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.10 - 2026-06-20 — build-decision gate and reuse self-review
|
|
4
|
+
|
|
5
|
+
- Add a pre-write minimum-first build-decision gate and a necessity/reuse self-review to the
|
|
6
|
+
programming skill.
|
|
7
|
+
|
|
8
|
+
## 0.3.9 - 2026-06-19 — hook activation and mode-discipline parity
|
|
9
|
+
|
|
10
|
+
- Port the LitOpenCode v0.1.17 workflow contract into Claude Code-native surfaces without copying
|
|
11
|
+
OpenCode-only hooks or permission objects.
|
|
12
|
+
- Rework `UserPromptSubmit` activation so natural language routes `lit`, `litwork`, `lit plan`,
|
|
13
|
+
`lit review`, `lit research`, `lit goal`, and `lit start work` to distinct mode contracts while
|
|
14
|
+
ignoring slash commands/mentions, code spans/fences, substrings, and compound tokens.
|
|
15
|
+
- Add safe natural-language `lit start work` behavior: the hook emits a `BLOCKED:` handoff that tells
|
|
16
|
+
the user to run `/start-work` or `/litclaude:start-work` instead of pretending a prompt hook can
|
|
17
|
+
switch Claude Code agents.
|
|
18
|
+
- Strengthen prompt contracts across lit-loop, lit-plan, start-work, review-work, litresearch, and
|
|
19
|
+
litgoal; document primary order as `lit-loop`, `lit-plan`/`prometheus-planner`, then
|
|
20
|
+
`start-work`/`boulder-executor`.
|
|
21
|
+
- Add installer permission preferences (`safe`, `balanced`, `yolo`) as Claude-native recorded
|
|
22
|
+
settings. Balanced records routine automation preference while preserving dangerous-shell deny
|
|
23
|
+
boundaries and planner read-only safeguards.
|
|
24
|
+
|
|
3
25
|
## 0.3.8 - 2026-06-16 — sibling-parity skill depth + goal/workflow feasibility reflection
|
|
4
26
|
|
|
5
27
|
- **Deepen eight skills to sibling parity.** A cross-sibling audit found several skill prompts were
|
package/README.md
CHANGED
|
@@ -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" />
|
|
12
|
-
<img src="https://img.shields.io/badge/version-0.3.
|
|
12
|
+
<img src="https://img.shields.io/badge/version-0.3.10-2ea44f" />
|
|
13
13
|
<img src="https://img.shields.io/badge/Claude%20Code-plugin-blueviolet" />
|
|
14
14
|
<img src="https://img.shields.io/badge/license-MIT-blue" />
|
|
15
15
|
</p>
|
|
@@ -22,18 +22,20 @@
|
|
|
22
22
|
> `litclaude@litclaude-ai`, so normal `claude` launches can load the
|
|
23
23
|
> LitClaude skills and hooks without a long `--plugin-dir` command.
|
|
24
24
|
|
|
25
|
-
This checkout is prepared as `litclaude-ai@0.3.
|
|
25
|
+
This checkout is prepared as `litclaude-ai@0.3.10` for personal install
|
|
26
26
|
convenience. The repo can remain quiet; preparing npm package metadata here does
|
|
27
27
|
not imply public repo promotion, marketplace publication, or advertisement.
|
|
28
|
-
Future package releases still require explicit user approval. The v0.3.
|
|
29
|
-
release materials preserve the v0.
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
Future package releases still require explicit user approval. The v0.3.10
|
|
29
|
+
release materials preserve the v0.3.8 skill-depth work and add Claude-native
|
|
30
|
+
hook activation, prompt/mode contract, safe mode-transition, primary-order, and
|
|
31
|
+
installer permission-preference discipline.
|
|
32
32
|
|
|
33
33
|
## Features
|
|
34
34
|
|
|
35
35
|
- **Natural Claude launch** - install once with `npx`, then run plain `claude`
|
|
36
|
-
- **LIT prompt hooks** - type `lit`, `litwork`,
|
|
36
|
+
- **LIT prompt hooks** - type `lit`, `litwork`, `lit plan`, `lit review`,
|
|
37
|
+
`lit research`, `lit goal`, or `lit start work`; slash commands stay on
|
|
38
|
+
Claude Code's native command surface and do not double-activate the hook
|
|
37
39
|
- **Deep interview mode** - type `/deep-interview` or `$deep-interview` to
|
|
38
40
|
turn broad intent into a spec before planning or implementation
|
|
39
41
|
- **v0.2.0 workflow parity** - adds `review-work` 5-lane review discipline and
|
|
@@ -93,7 +95,7 @@ directory, the normal install command works:
|
|
|
93
95
|
|
|
94
96
|
```bash
|
|
95
97
|
cd /tmp
|
|
96
|
-
npx --yes litclaude-ai@0.3.
|
|
98
|
+
npx --yes litclaude-ai@0.3.10 install
|
|
97
99
|
```
|
|
98
100
|
|
|
99
101
|
Validate the installed plugin:
|
|
@@ -106,7 +108,7 @@ The installer also sets Claude Code's `statusLine` command to the packaged
|
|
|
106
108
|
LitClaude HUD. A typical no-color render starts like:
|
|
107
109
|
|
|
108
110
|
```text
|
|
109
|
-
[🔥LITCLAUDE v0.3.
|
|
111
|
+
[🔥LITCLAUDE v0.3.10] | O4.8 │ ctx [▎░░] 9%/1000k │ 5h [▏░] 4% ↻2h15m │ 1w [▊░] 35% ↻3d6h │ git main +3 ✓
|
|
110
112
|
```
|
|
111
113
|
|
|
112
114
|
The `↻` suffix is a compact rate-limit reset countdown. It is separated from
|
|
@@ -160,6 +162,21 @@ the skill and hook inventory in `claude plugin details`.
|
|
|
160
162
|
Use `CLAUDE_CONFIG_DIR=/some/path` and `LITCLAUDE_HOME=/some/path` only for
|
|
161
163
|
isolated tests.
|
|
162
164
|
|
|
165
|
+
Installer permission preference can be recorded without copying OpenCode's
|
|
166
|
+
permission model:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
npx --yes litclaude-ai install --permission-mode safe
|
|
170
|
+
npx --yes litclaude-ai install --permission-mode balanced
|
|
171
|
+
npx --yes litclaude-ai install --yolo
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
`safe` is conservative. `balanced` records that routine automation guidance is
|
|
175
|
+
acceptable while preserving dangerous-shell deny boundaries and planner
|
|
176
|
+
read-only safeguards. `yolo` records explicit user preference, but the installer
|
|
177
|
+
does not rewrite Claude agent frontmatter or weaken `prometheus-planner`'s
|
|
178
|
+
`permissionMode: plan` boundary.
|
|
179
|
+
|
|
163
180
|
## LIT Usage
|
|
164
181
|
|
|
165
182
|
After install, start Claude Code:
|
|
@@ -173,6 +190,11 @@ Then type one of these prompts:
|
|
|
173
190
|
```text
|
|
174
191
|
lit
|
|
175
192
|
litwork
|
|
193
|
+
lit plan <what you want planned>
|
|
194
|
+
lit review <scope to review>
|
|
195
|
+
lit research <research question>
|
|
196
|
+
lit goal <outcome and criteria>
|
|
197
|
+
lit start work <approved plan>
|
|
176
198
|
$lit-plan <what you want planned>
|
|
177
199
|
/lit-plan <what you want planned>
|
|
178
200
|
$lit-loop <what you want executed with evidence>
|
|
@@ -189,15 +211,17 @@ $start-work plans/example-plan.md
|
|
|
189
211
|
/start-work plans/example-plan.md
|
|
190
212
|
```
|
|
191
213
|
|
|
192
|
-
Expected behavior: LitClaude's prompt hook adds `LITWORK MODE
|
|
193
|
-
context for LIT routes and shows `LitClaude lit hook active` as
|
|
194
|
-
message.
|
|
195
|
-
|
|
196
|
-
`
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
214
|
+
Expected behavior: LitClaude's prompt hook adds mode-specific `LITWORK MODE
|
|
215
|
+
ENABLED` context for natural LIT routes and shows `LitClaude lit hook active` as
|
|
216
|
+
a visible hook message. Slash commands such as `/lit-plan` are handled by Claude
|
|
217
|
+
Code's native command surface and should not double-activate the hook. Natural
|
|
218
|
+
`lit start work` is a safe handoff: it emits `BLOCKED:` and tells the user to
|
|
219
|
+
run `/start-work` or `/litclaude:start-work` with the approved plan because a
|
|
220
|
+
prompt hook cannot switch Claude Code agents. Plain `lit` still maps to
|
|
221
|
+
`/litclaude:lit-loop` / `Skill(lit-loop)` semantics before ordinary task
|
|
222
|
+
execution, then the matching skill and agent instructions steer Claude toward
|
|
223
|
+
test-first work, native goal handling, manual QA evidence, cleanup receipts, and
|
|
224
|
+
explicit approval before future release steps.
|
|
201
225
|
|
|
202
226
|
LitClaude does not auto-type `/goal` or send slash command text for you.
|
|
203
227
|
Instead, the hook and LIT skills add run-context guidance: use Claude Code's
|
|
@@ -284,8 +308,8 @@ namespaced commands when you want explicit LitClaude skill activation:
|
|
|
284
308
|
Those namespaced commands are shipped as real Claude Code command files under
|
|
285
309
|
`plugins/litclaude/commands/`, so `/litclaude:lit-loop` should load the
|
|
286
310
|
command body, then the matching skill guidance.
|
|
287
|
-
|
|
288
|
-
|
|
311
|
+
Slash commands and their shorter aliases are handled by Claude Code's native
|
|
312
|
+
command surface; the prompt hook no longer double-activates them.
|
|
289
313
|
|
|
290
314
|
Use `/deep-interview` before `/lit-plan` when the request is broad,
|
|
291
315
|
underspecified, or missing non-goals and acceptance criteria. It writes a
|
package/README_ko-KR.md
CHANGED
|
@@ -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" />
|
|
12
|
-
<img src="https://img.shields.io/badge/version-0.3.
|
|
12
|
+
<img src="https://img.shields.io/badge/version-0.3.10-2ea44f" />
|
|
13
13
|
<img src="https://img.shields.io/badge/Claude%20Code-plugin-blueviolet" />
|
|
14
14
|
<img src="https://img.shields.io/badge/license-MIT-blue" />
|
|
15
15
|
</p>
|
|
@@ -26,19 +26,21 @@
|
|
|
26
26
|
> 설치되므로, 매번 긴 `--plugin-dir` 없이 일반 `claude` 실행에서
|
|
27
27
|
> LitClaude skill과 hook을 불러올 수 있습니다.
|
|
28
28
|
|
|
29
|
-
현재 checkout은 `litclaude-ai@0.3.
|
|
29
|
+
현재 checkout은 `litclaude-ai@0.3.10` 배포 준비용으로 정리되어 있습니다. 목적은
|
|
30
30
|
다른 PC에서도 빠르게 설치하기 위한 개인용 package metadata를 갖추는 것입니다.
|
|
31
31
|
npm package metadata를 준비했다고 해서 홍보, 공개 저장소 운영, Claude
|
|
32
32
|
marketplace 등록을 의미하지는 않습니다. 새 버전 배포는 항상 별도의 명시적
|
|
33
|
-
승인 후에 진행합니다. v0.3.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
승인 후에 진행합니다. v0.3.10 release material은 v0.3.8 skill-depth 작업을
|
|
34
|
+
보존하고, Claude-native hook activation, prompt/mode contract, safe
|
|
35
|
+
mode-transition, primary-order, installer permission preference discipline을
|
|
36
|
+
추가합니다.
|
|
37
37
|
|
|
38
38
|
## 기능
|
|
39
39
|
|
|
40
40
|
- **자연스러운 Claude 실행** - 한 번 `npx`로 설치한 뒤에는 plain `claude`
|
|
41
|
-
- **LIT prompt hook** - `lit`, `litwork`,
|
|
41
|
+
- **LIT prompt hook** - `lit`, `litwork`, `lit plan`, `lit review`,
|
|
42
|
+
`lit research`, `lit goal`, `lit start work` 자연어 트리거. slash command는
|
|
43
|
+
Claude Code native command surface에서 처리되어 hook이 중복 활성화하지 않습니다.
|
|
42
44
|
- **Deep interview mode** - `/deep-interview` 또는 `$deep-interview`로 넓고
|
|
43
45
|
모호한 의도를 먼저 spec으로 정리한 뒤 계획/구현으로 넘김
|
|
44
46
|
- **v0.2.0 workflow parity** - package publish가 끝났다고 말하지 않으면서
|
|
@@ -98,7 +100,7 @@ checkout을 먼저 해석해서 `sh: litclaude-ai: command not found`로 실패
|
|
|
98
100
|
|
|
99
101
|
```bash
|
|
100
102
|
cd /tmp
|
|
101
|
-
npx --yes litclaude-ai@0.3.
|
|
103
|
+
npx --yes litclaude-ai@0.3.10 install
|
|
102
104
|
```
|
|
103
105
|
|
|
104
106
|
설치 상태를 확인합니다.
|
|
@@ -111,7 +113,7 @@ installer는 Claude Code의 `statusLine` command도 packaged LitClaude HUD로
|
|
|
111
113
|
설정합니다. 색상을 제거한 예시는 다음처럼 시작합니다.
|
|
112
114
|
|
|
113
115
|
```text
|
|
114
|
-
[🔥LITCLAUDE v0.3.
|
|
116
|
+
[🔥LITCLAUDE v0.3.10] | O4.8 │ ctx [▎░░] 9%/1000k │ 5h [▏░] 4% ↻2h15m │ 1w [▊░] 35% ↻3d6h │ git main +3 ✓
|
|
115
117
|
```
|
|
116
118
|
|
|
117
119
|
`↻` 표시는 rate-limit reset까지 남은 시간을 짧게 보여주는 countdown입니다.
|
|
@@ -164,6 +166,20 @@ LitClaude 전용 local marketplace 항목, `known_marketplaces.json`을 함께
|
|
|
164
166
|
격리 테스트가 필요할 때만 `CLAUDE_CONFIG_DIR=/some/path`와
|
|
165
167
|
`LITCLAUDE_HOME=/some/path`를 지정하세요.
|
|
166
168
|
|
|
169
|
+
installer permission preference는 OpenCode permission model을 그대로 복사하지
|
|
170
|
+
않고 Claude-native 설정으로 기록합니다.
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
npx --yes litclaude-ai install --permission-mode safe
|
|
174
|
+
npx --yes litclaude-ai install --permission-mode balanced
|
|
175
|
+
npx --yes litclaude-ai install --yolo
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
`safe`는 보수적 기본값입니다. `balanced`는 routine automation guidance를
|
|
179
|
+
허용한다는 선호만 기록하되 dangerous-shell deny boundary와 planner read-only
|
|
180
|
+
safeguard를 유지합니다. `yolo`도 명시적 선호를 기록할 뿐,
|
|
181
|
+
`prometheus-planner`의 `permissionMode: plan` boundary를 약화하지 않습니다.
|
|
182
|
+
|
|
167
183
|
## LIT 사용법
|
|
168
184
|
|
|
169
185
|
설치 후에는 일반적인 `claude` 명령에서 LitClaude를 사용할 수 있습니다.
|
|
@@ -177,6 +193,11 @@ claude
|
|
|
177
193
|
```text
|
|
178
194
|
lit
|
|
179
195
|
litwork
|
|
196
|
+
lit plan <계획이 필요한 작업>
|
|
197
|
+
lit review <검토할 범위>
|
|
198
|
+
lit research <조사할 질문>
|
|
199
|
+
lit goal <목표와 기준>
|
|
200
|
+
lit start work <승인된 계획>
|
|
180
201
|
$lit-plan <계획이 필요한 작업>
|
|
181
202
|
/lit-plan <계획이 필요한 작업>
|
|
182
203
|
$lit-loop <증거 기반으로 실행할 작업>
|
|
@@ -193,15 +214,17 @@ $start-work plans/example-plan.md
|
|
|
193
214
|
/start-work plans/example-plan.md
|
|
194
215
|
```
|
|
195
216
|
|
|
196
|
-
기대 동작은 LitClaude prompt hook이 LIT route
|
|
197
|
-
컨텍스트를 추가하고 `LitClaude lit hook active`라는
|
|
198
|
-
보여주는 것입니다. `/
|
|
199
|
-
|
|
200
|
-
`
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
217
|
+
기대 동작은 LitClaude prompt hook이 자연어 LIT route별 mode-specific
|
|
218
|
+
`LITWORK MODE ENABLED` 컨텍스트를 추가하고 `LitClaude lit hook active`라는
|
|
219
|
+
visible hook message를 보여주는 것입니다. `/lit-plan` 같은 slash command는
|
|
220
|
+
Claude Code native command surface에서 처리되며 hook을 중복 활성화하지
|
|
221
|
+
않습니다. 자연어 `lit start work`는 안전한 handoff로 `BLOCKED:`를 내고,
|
|
222
|
+
prompt hook이 Claude Code agent를 전환할 수 없으므로 승인된 plan과 함께
|
|
223
|
+
`/start-work` 또는 `/litclaude:start-work`를 실행하라고 안내합니다. plain
|
|
224
|
+
`lit`는 일반 작업 실행 전 `/litclaude:lit-loop` / `Skill(lit-loop)` semantics로
|
|
225
|
+
처리됩니다. 그 뒤 skill 및 agent 지시문이 Claude를 test-first 작업, native
|
|
226
|
+
goal 처리, 실제 수동 QA 증거, cleanup receipt, 향후 release step의 명시적 승인
|
|
227
|
+
쪽으로 유도합니다.
|
|
205
228
|
|
|
206
229
|
LitClaude는 `/goal`을 대신 입력하거나 slash command text를 자동 전송하지
|
|
207
230
|
않습니다. 대신 hook과 LIT skill이 run context를 보강합니다. Claude Code의
|
|
@@ -212,9 +235,10 @@ goal이 없을 때만 `create_goal`을 호출하며, `update_goal`은 검증 완
|
|
|
212
235
|
로컬 evidence ledger를 기준으로 계속 진행하고, 긴 실행 전에 필요한 경우에만
|
|
213
236
|
정확한 `/goal <completion condition>`를 제안합니다. 큰 독립 작업에서는
|
|
214
237
|
같은 원칙을 Claude Code가 노출한 orchestration surface에 적용합니다.
|
|
215
|
-
`Workflow`가 노출되면
|
|
216
|
-
|
|
217
|
-
|
|
238
|
+
`Workflow`가 노출되면 먼저 제안하고 사용자 opt-in 또는 이미 허용된 orchestration
|
|
239
|
+
상태에서만 `Workflow` tool을 호출합니다. isolated edit lane이 model-facing
|
|
240
|
+
worktree를 필요로 하면 `EnterWorktree`를 사용합니다. CLI surface만 가능한 새 격리
|
|
241
|
+
lane에서는 `claude --worktree <short-name> --tmux`를 사용합니다.
|
|
218
242
|
|
|
219
243
|
v0.2.2 Dynamic workflow hardening에서 `/dynamic-workflow`는 넓은 위임 작업을
|
|
220
244
|
위한 통합 bootstrap route입니다. `/goal`은 user-controlled 상태로 두고,
|
package/RELEASE_CHECKLIST.md
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
# LitClaude Release Checklist
|
|
2
2
|
|
|
3
|
-
Status: `litclaude-ai@0.3.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
`
|
|
11
|
-
`package.json` is aligned to `0.3.8`, and
|
|
12
|
-
`plugins/litclaude/.claude-plugin/plugin.json` is aligned to `0.3.8`.
|
|
3
|
+
Status: `litclaude-ai@0.3.10` is the current release candidate — a Claude-native
|
|
4
|
+
hook activation and mode-discipline parity pass based on LitOpenCode v0.1.17.
|
|
5
|
+
It routes natural `lit` prompts by mode, blocks natural-language start-work with
|
|
6
|
+
a safe handoff, reinforces planning/execution/review/research/goal contracts,
|
|
7
|
+
documents primary role order, and records installer permission preferences
|
|
8
|
+
without copying OpenCode-only permission objects.
|
|
9
|
+
`package.json` is aligned to `0.3.10`, and
|
|
10
|
+
`plugins/litclaude/.claude-plugin/plugin.json` is aligned to `0.3.10`.
|
|
13
11
|
|
|
14
12
|
This release carries the v0.2.2 Dynamic workflow hardening surfaces:
|
|
15
13
|
`/dynamic-workflow`, `workflow-check --json`, native `/goal` fallback guidance,
|
|
@@ -58,8 +56,8 @@ No npm publication is required for this track.
|
|
|
58
56
|
Before requesting publication approval, confirm these artifacts from the current
|
|
59
57
|
checkout:
|
|
60
58
|
|
|
61
|
-
- `package.json` version is `0.3.
|
|
62
|
-
- `plugins/litclaude/.claude-plugin/plugin.json` version is `0.3.
|
|
59
|
+
- `package.json` version is `0.3.10`.
|
|
60
|
+
- `plugins/litclaude/.claude-plugin/plugin.json` version is `0.3.10`.
|
|
63
61
|
- `plugins/litclaude/commands/dynamic-workflow.md` documents subagent delegation.
|
|
64
62
|
- `node bin/litclaude-ai.js workflow-check --json` reports `status: pass`.
|
|
65
63
|
- `node bin/litclaude-ai.js workflow-check --json` reports
|
|
@@ -72,6 +70,8 @@ checkout:
|
|
|
72
70
|
- `plugins/litclaude/commands/litgoal.md` documents durable goal state.
|
|
73
71
|
- `plugins/litclaude/lib/litgoal/` ships the runtime CLI/state modules.
|
|
74
72
|
- `node bin/litclaude-ai.js litgoal --help` prints durable state commands.
|
|
73
|
+
- `node bin/litclaude-ai.js --dry-run install --permission-mode balanced` reports
|
|
74
|
+
the balanced preference while preserving dangerous-shell deny boundaries.
|
|
75
75
|
- `npm pack --dry-run --json` includes runtime payloads and excludes local
|
|
76
76
|
`.litclaude/`, `.omc/`, and `evidence/` state.
|
|
77
77
|
- `.litclaude/lit-loop/evidence/v020-red-contracts.txt` or equivalent RED evidence
|
package/bin/litclaude-ai.js
CHANGED
|
@@ -36,6 +36,15 @@ Commands:
|
|
|
36
36
|
start-work-next Print the next active start-work continuation directive.
|
|
37
37
|
update Reinstall this package version and refresh the Claude plugin registry.
|
|
38
38
|
uninstall Remove LitClaude-managed install state.
|
|
39
|
+
|
|
40
|
+
Install options:
|
|
41
|
+
--permission-mode <safe|balanced|yolo>
|
|
42
|
+
Record a Claude-native LitClaude automation preference.
|
|
43
|
+
safe keeps conservative defaults; balanced allows routine
|
|
44
|
+
automation guidance while preserving dangerous-shell deny
|
|
45
|
+
boundaries; yolo records an explicit user preference without
|
|
46
|
+
weakening planner/read-only agent safeguards.
|
|
47
|
+
--yolo Shorthand for --permission-mode yolo.
|
|
39
48
|
`;
|
|
40
49
|
|
|
41
50
|
const parseArgs = (argv) => {
|
|
@@ -71,6 +80,74 @@ const knownExternalLspPlugins = {
|
|
|
71
80
|
};
|
|
72
81
|
const spinnerFrames = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
|
|
73
82
|
const hudAccentThemes = HUD_ACCENT_THEMES;
|
|
83
|
+
const permissionModes = new Set(["safe", "balanced", "yolo"]);
|
|
84
|
+
|
|
85
|
+
const parsePermissionMode = (value) => {
|
|
86
|
+
if (!permissionModes.has(value)) fail("--permission-mode must be one of safe, balanced, yolo", 64);
|
|
87
|
+
return value;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const parseInstallOptions = (rest) => {
|
|
91
|
+
let permissionMode = parsePermissionMode(process.env.LITCLAUDE_PERMISSION_MODE || "safe");
|
|
92
|
+
let permissionExplicit = Boolean(process.env.LITCLAUDE_PERMISSION_MODE);
|
|
93
|
+
|
|
94
|
+
for (let index = 0; index < rest.length; index += 1) {
|
|
95
|
+
const arg = rest[index];
|
|
96
|
+
if (arg === "--permission-mode") {
|
|
97
|
+
const value = rest[index + 1];
|
|
98
|
+
if (!value) fail("--permission-mode requires a value", 64);
|
|
99
|
+
permissionMode = parsePermissionMode(value);
|
|
100
|
+
permissionExplicit = true;
|
|
101
|
+
index += 1;
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
if (arg === "--yolo") {
|
|
105
|
+
permissionMode = "yolo";
|
|
106
|
+
permissionExplicit = true;
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
if (arg === "--permission-prompt" || arg === "--select-permissions") {
|
|
110
|
+
permissionExplicit = true;
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
if (arg === "--no-permission-prompt") {
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
fail(`Unknown install option: ${arg}`, 64);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return { permissionMode, permissionExplicit };
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
const permissionProfile = (mode) => {
|
|
123
|
+
switch (mode) {
|
|
124
|
+
case "balanced":
|
|
125
|
+
return {
|
|
126
|
+
mode,
|
|
127
|
+
description: "routine automation guidance allowed; dangerous shell patterns and existing deny rules preserved",
|
|
128
|
+
routineAutomation: true,
|
|
129
|
+
dangerousShellDenyPreserved: true,
|
|
130
|
+
plannerSafeguard: "prometheus-planner remains permissionMode: plan",
|
|
131
|
+
};
|
|
132
|
+
case "yolo":
|
|
133
|
+
return {
|
|
134
|
+
mode,
|
|
135
|
+
description: "explicit user preference recorded; Claude agent safeguards are not weakened by the installer",
|
|
136
|
+
routineAutomation: true,
|
|
137
|
+
dangerousShellDenyPreserved: true,
|
|
138
|
+
plannerSafeguard: "prometheus-planner remains permissionMode: plan",
|
|
139
|
+
};
|
|
140
|
+
case "safe":
|
|
141
|
+
default:
|
|
142
|
+
return {
|
|
143
|
+
mode: "safe",
|
|
144
|
+
description: "conservative automation guidance; no permission broadening",
|
|
145
|
+
routineAutomation: false,
|
|
146
|
+
dangerousShellDenyPreserved: true,
|
|
147
|
+
plannerSafeguard: "prometheus-planner remains permissionMode: plan",
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
};
|
|
74
151
|
|
|
75
152
|
const printUsage = () => {
|
|
76
153
|
process.stderr.write(usage);
|
|
@@ -327,6 +404,9 @@ const uninstallHudStatusLine = (home = claudeHome()) => {
|
|
|
327
404
|
"statusLineInstalledAt",
|
|
328
405
|
"statusLineUpdatedAt",
|
|
329
406
|
"previousStatusLine",
|
|
407
|
+
"permissionPreference",
|
|
408
|
+
"permissionMode",
|
|
409
|
+
"permissionUpdatedAt",
|
|
330
410
|
]) {
|
|
331
411
|
delete remainingLitClaude[key];
|
|
332
412
|
}
|
|
@@ -356,7 +436,19 @@ const unregisterMarketplace = (home = claudeHome()) => {
|
|
|
356
436
|
}
|
|
357
437
|
};
|
|
358
438
|
|
|
359
|
-
const
|
|
439
|
+
const recordPermissionPreference = (mode, home = claudeHome()) => {
|
|
440
|
+
const settings = readClaudeSettings(home);
|
|
441
|
+
const existingLitClaude = settings[litClaudeSettingsKey] ?? {};
|
|
442
|
+
settings[litClaudeSettingsKey] = {
|
|
443
|
+
...existingLitClaude,
|
|
444
|
+
permissionPreference: permissionProfile(mode),
|
|
445
|
+
permissionMode: mode,
|
|
446
|
+
permissionUpdatedAt: new Date().toISOString(),
|
|
447
|
+
};
|
|
448
|
+
writeClaudeSettings(settings, home);
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
const registerClaudePlugin = (installRoot, marketplacePath, home = claudeHome(), hudAccent = "cyan", permissionMode = "safe") => {
|
|
360
452
|
const registry = readInstalledPlugins(home);
|
|
361
453
|
const now = new Date().toISOString();
|
|
362
454
|
const existing = registry.plugins[pluginKey]?.[0] ?? {};
|
|
@@ -374,6 +466,7 @@ const registerClaudePlugin = (installRoot, marketplacePath, home = claudeHome(),
|
|
|
374
466
|
writeInstalledPlugins(registry, home);
|
|
375
467
|
registerMarketplace(marketplacePath, home);
|
|
376
468
|
installHudStatusLine(installRoot, home, hudAccent);
|
|
469
|
+
recordPermissionPreference(permissionMode, home);
|
|
377
470
|
};
|
|
378
471
|
|
|
379
472
|
const unregisterClaudePlugin = (home = claudeHome()) => {
|
|
@@ -440,7 +533,8 @@ const resetCurrentPointer = (home, target) => {
|
|
|
440
533
|
}
|
|
441
534
|
};
|
|
442
535
|
|
|
443
|
-
const install = async ({ dryRun }) => {
|
|
536
|
+
const install = async ({ dryRun, rest }) => {
|
|
537
|
+
const { permissionMode, permissionExplicit } = parseInstallOptions(rest);
|
|
444
538
|
const home = claudeHome();
|
|
445
539
|
const litClaudeHome = litHome();
|
|
446
540
|
const targetPlugin = claudePluginRoot(home);
|
|
@@ -454,6 +548,8 @@ const install = async ({ dryRun }) => {
|
|
|
454
548
|
process.stdout.write(`Would create local marketplace: ${targetMarketplace}\n`);
|
|
455
549
|
process.stdout.write(`Would register Claude plugin: ${pluginKey}\n`);
|
|
456
550
|
process.stdout.write(`Would set Claude statusLine HUD: ${hudCommandForPlugin(targetPlugin)}\n`);
|
|
551
|
+
process.stdout.write(`Would record permission preference: ${permissionMode}${permissionExplicit ? " (explicit)" : " (default)"}\n`);
|
|
552
|
+
process.stdout.write(`Permission profile: ${permissionProfile(permissionMode).description}\n`);
|
|
457
553
|
process.stdout.write("Launch with: claude\n");
|
|
458
554
|
return;
|
|
459
555
|
}
|
|
@@ -471,7 +567,7 @@ const install = async ({ dryRun }) => {
|
|
|
471
567
|
progress.step("Marketplace: writing local Claude marketplace");
|
|
472
568
|
const localMarketplace = writeLocalMarketplace(litClaudeHome);
|
|
473
569
|
progress.step("Claude registry: enabling plugin and HUD");
|
|
474
|
-
registerClaudePlugin(targetPlugin, localMarketplace, home, hudAccent);
|
|
570
|
+
registerClaudePlugin(targetPlugin, localMarketplace, home, hudAccent, permissionMode);
|
|
475
571
|
|
|
476
572
|
progress.step("Compatibility cache: refreshing local current pointer");
|
|
477
573
|
const litRoot = versionRoot(litClaudeHome);
|
|
@@ -486,6 +582,7 @@ const install = async ({ dryRun }) => {
|
|
|
486
582
|
process.stdout.write(`Marketplace: ${localMarketplace}\n`);
|
|
487
583
|
process.stdout.write(`Plugin path: ${intendedPluginPath(home)}\n`);
|
|
488
584
|
process.stdout.write(`HUD: LitClaude statusLine installed (${hudAccent})\n`);
|
|
585
|
+
process.stdout.write(`Permission preference: ${permissionMode} — ${permissionProfile(permissionMode).description}\n`);
|
|
489
586
|
process.stdout.write("Launch with: claude\n");
|
|
490
587
|
};
|
|
491
588
|
|
|
@@ -545,6 +642,9 @@ const doctor = ({ dryRun }) => {
|
|
|
545
642
|
|
|
546
643
|
process.stdout.write(`Plugin path: ${pluginPath}\n`);
|
|
547
644
|
const settings = readClaudeSettings();
|
|
645
|
+
const permissionMode = settings[litClaudeSettingsKey]?.permissionMode ?? "safe";
|
|
646
|
+
process.stdout.write(`PERMISSION_MODE: ${permissionMode}\n`);
|
|
647
|
+
process.stdout.write(`PERMISSION_PROFILE: ${permissionProfile(permissionMode).description}\n`);
|
|
548
648
|
if (settings.statusLine?.command === hudCommandForPlugin(pluginPath, settings[litClaudeSettingsKey]?.hudAccent)) {
|
|
549
649
|
process.stdout.write("HUD_STATUSLINE_PASS\n");
|
|
550
650
|
} else {
|
package/docs/agents.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
LitClaude agents map the LitClaude team workflow into Claude Code subagents
|
|
4
4
|
with bounded responsibilities.
|
|
5
5
|
|
|
6
|
+
Primary order:
|
|
7
|
+
|
|
8
|
+
1. `lit-loop` — the default execution-loop skill for direct, evidence-driven work.
|
|
9
|
+
2. `lit-plan` → `prometheus-planner` — planning-only, read-only, approval-gated.
|
|
10
|
+
3. `start-work` → `boulder-executor` — approved-plan execution-only; no redesign.
|
|
11
|
+
|
|
6
12
|
| Agent | Responsibility | Boundary |
|
|
7
13
|
| --- | --- | --- |
|
|
8
14
|
| `prometheus-planner` | Build implementation plans and identify risks. | Read-only tools, no write/edit/bash tools. |
|
package/docs/hooks.md
CHANGED
|
@@ -14,41 +14,35 @@ events while keeping execution local and bounded.
|
|
|
14
14
|
|
|
15
15
|
## Workflow Trigger Phrases
|
|
16
16
|
|
|
17
|
-
The `UserPromptSubmit` hook activates on
|
|
17
|
+
The `UserPromptSubmit` hook activates on these natural-language phrases and
|
|
18
|
+
legacy dollar shorthands:
|
|
18
19
|
|
|
19
20
|
```text
|
|
20
21
|
lit
|
|
21
22
|
litwork
|
|
23
|
+
lit plan
|
|
24
|
+
lit review
|
|
25
|
+
lit research
|
|
26
|
+
lit goal
|
|
27
|
+
lit start work
|
|
22
28
|
$lit-plan
|
|
23
|
-
/lit-plan
|
|
24
|
-
/litclaude:lit-plan
|
|
25
29
|
$lit-loop
|
|
26
|
-
/lit-loop
|
|
27
|
-
/litclaude:lit-loop
|
|
28
30
|
$deep-interview
|
|
29
|
-
/deep-interview
|
|
30
|
-
/litclaude:deep-interview
|
|
31
31
|
$dynamic-workflow
|
|
32
|
-
/dynamic-workflow
|
|
33
|
-
/litclaude:dynamic-workflow
|
|
34
32
|
$review-work
|
|
35
|
-
/review-work
|
|
36
|
-
/litclaude:review-work
|
|
37
33
|
$litgoal
|
|
38
|
-
/litgoal
|
|
39
|
-
/litclaude:litgoal
|
|
40
34
|
$start-work
|
|
41
|
-
/start-work
|
|
42
|
-
/litclaude:start-work
|
|
43
35
|
```
|
|
44
36
|
|
|
45
37
|
When a LIT trigger is present, the hook returns additional context containing
|
|
46
38
|
`LITWORK MODE ENABLED` and a visible `LitClaude lit hook active` system
|
|
47
|
-
message.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
`
|
|
39
|
+
message. That context is guidance for Claude Code; it is not executed as a
|
|
40
|
+
command. Slash commands and slash-command mentions are native Claude Code
|
|
41
|
+
surfaces and do not activate this prompt hook; code spans, code fences,
|
|
42
|
+
substrings, and compound tokens are also ignored. Natural `lit start work`
|
|
43
|
+
returns a `BLOCKED:` handoff that tells the user to run `/start-work` or
|
|
44
|
+
`/litclaude:start-work` with the approved plan, because a prompt hook cannot
|
|
45
|
+
switch Claude Code agents.
|
|
52
46
|
|
|
53
47
|
LitClaude follows the LitClaude goal pattern as model-facing run context, not
|
|
54
48
|
as slash-command injection. If Claude Code exposes the native goal surface, the
|
|
@@ -63,9 +57,9 @@ the hook context keeps the local evidence ledger authoritative. It may suggest
|
|
|
63
57
|
fallback chatter on every LIT turn.
|
|
64
58
|
|
|
65
59
|
For broad work, the same context ports the LitClaude model-facing principle to
|
|
66
|
-
Claude Code's exposed orchestration surfaces: if `Workflow` is available,
|
|
67
|
-
the `Workflow` tool
|
|
68
|
-
cleanup. If isolated edits need a model-facing worktree lane, use
|
|
60
|
+
Claude Code's exposed orchestration surfaces: if `Workflow` is available,
|
|
61
|
+
propose it first and call the `Workflow` tool only after user opt-in or existing
|
|
62
|
+
session permission, binding every lane to evidence and cleanup. If isolated edits need a model-facing worktree lane, use
|
|
69
63
|
`EnterWorktree`; when only the CLI surface is available, the actionable launch
|
|
70
64
|
form is `claude --worktree <short-name> --tmux`.
|
|
71
65
|
|
|
@@ -86,9 +80,7 @@ ledger, Boulder state, and `git status --short` before edits.
|
|
|
86
80
|
|
|
87
81
|
Plain `lit` therefore activates hook context, not a visible Skill tool call.
|
|
88
82
|
For a visible LitClaude command/skill invocation, use the namespaced Claude
|
|
89
|
-
Code commands
|
|
90
|
-
hook so they route to the same discipline instead of falling through to plain
|
|
91
|
-
`lit` loop activation:
|
|
83
|
+
Code commands:
|
|
92
84
|
|
|
93
85
|
```text
|
|
94
86
|
/litclaude:lit-loop <goal>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "litclaude",
|
|
3
3
|
"description": "Claude Code-native workflow plugin.",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.10",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "LitClaude contributors"
|
|
7
7
|
},
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"keywords": ["claude-code", "hooks", "skills", "agents", "lsp", "workflow"],
|
|
12
12
|
"skills": "./skills",
|
|
13
13
|
"agents": [
|
|
14
|
+
"./agents/prometheus-planner.md",
|
|
14
15
|
"./agents/boulder-executor.md",
|
|
15
|
-
"./agents/librarian-researcher.md",
|
|
16
16
|
"./agents/oracle-verifier.md",
|
|
17
|
-
"./agents/prometheus-planner.md",
|
|
18
17
|
"./agents/qa-runner.md",
|
|
19
|
-
"./agents/quality-reviewer.md"
|
|
18
|
+
"./agents/quality-reviewer.md",
|
|
19
|
+
"./agents/librarian-researcher.md"
|
|
20
20
|
],
|
|
21
21
|
"mcpServers": "./.mcp.json",
|
|
22
22
|
"lspServers": "./.lsp.json",
|
|
@@ -8,5 +8,8 @@ skills:
|
|
|
8
8
|
- programming
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
Execute only the assigned plan checkbox.
|
|
12
|
-
|
|
11
|
+
Execute only the assigned approved plan checkbox. Do not redesign, rescope, or
|
|
12
|
+
replace the approved plan unless evidence proves a blocker or stale state. Write
|
|
13
|
+
the failing test first, make the smallest change, run verification, capture
|
|
14
|
+
real-surface evidence, and report cleanup. Your DoneClaim must name changed
|
|
15
|
+
files, exact tests, real-surface evidence, risks, and cleanup receipt.
|
|
@@ -10,4 +10,6 @@ skills:
|
|
|
10
10
|
|
|
11
11
|
You are Prometheus, the planning agent. Explore first, ask only preference
|
|
12
12
|
questions, and write plans with concrete acceptance criteria and QA scenarios.
|
|
13
|
-
|
|
13
|
+
This is a planning-only role: must not implement product changes, do not run
|
|
14
|
+
mutating commands, and do not start execution. After approval, hand off through
|
|
15
|
+
`/start-work` or `/litclaude:start-work`.
|
|
@@ -43,30 +43,134 @@ const writeContext = (additionalContext, systemMessage) => {
|
|
|
43
43
|
);
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
const plainWordBoundary = /^[A-Za-z0-9]$/u;
|
|
47
|
+
const compoundWordBoundary = /^[A-Za-z0-9_-]$/u;
|
|
48
|
+
|
|
49
|
+
const triggerByToken = {
|
|
50
|
+
"deep-interview": { command: "/litclaude:deep-interview", skill: "Skill(deep-interview)", discipline: "deep-interview" },
|
|
51
|
+
"dynamic-workflow": { command: "/litclaude:dynamic-workflow", skill: "Skill(lit-loop)", discipline: "dynamic-workflow" },
|
|
52
|
+
"lit-plan": { command: "/litclaude:lit-plan", skill: "Skill(lit-plan)", discipline: "lit-plan" },
|
|
53
|
+
"lit-loop": { command: "/litclaude:lit-loop", skill: "Skill(lit-loop)", discipline: "lit-loop" },
|
|
54
|
+
"start-work": { command: "/litclaude:start-work", skill: "Skill(start-work)", discipline: "start-work" },
|
|
55
|
+
"review-work": { command: "/litclaude:review-work", skill: "Skill(review-work)", discipline: "review-work" },
|
|
56
|
+
litgoal: { command: "/litclaude:litgoal", skill: "Skill(litgoal)", discipline: "litgoal" },
|
|
57
|
+
litresearch: { command: "/litclaude:litresearch", skill: "Skill(litresearch)", discipline: "litresearch" },
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const modeContracts = {
|
|
61
|
+
"lit-loop": "Mode contract: lit-loop is a durable, evidence-driven execution loop. Define checkable success criteria before coding, use RED->GREEN tests, pair tests with real-surface evidence, checkpoint progress, and stop only when verified done or BLOCKED.",
|
|
62
|
+
"lit-plan": "Mode contract: lit-plan is planning-only. Do not edit files, run mutating commands, call start-work tooling, or implement. Explore read-only, produce an approval-gated plan, then tell the user to run `/start-work` or `/litclaude:start-work` for execution.",
|
|
63
|
+
"start-work": "Mode contract: start-work is execution-only for an approved plan. Natural-language activation cannot switch Claude Code agents, so this hook must hand off safely instead of pretending execution started.",
|
|
64
|
+
"review-work": "Mode contract: review-work runs a five-lane review: goal/constraints, real-surface QA, code quality, security, and docs/package/context readiness. PASS requires evidence from every applicable lane.",
|
|
65
|
+
litresearch: "Mode contract: litresearch uses sourced evidence, separates verified facts from hypotheses, cites the search/runtime surface used, and reports residual uncertainty.",
|
|
66
|
+
litgoal: "Mode contract: litgoal binds one outcome-shaped objective plus checkable criteria, each with scenario, real surface, and observable evidence.",
|
|
67
|
+
"deep-interview": "Mode contract: deep-interview clarifies vague requirements before planning or implementation, without inventing acceptance criteria.",
|
|
68
|
+
"dynamic-workflow": "Mode contract: dynamic-workflow is opt-in orchestration for broad, risky, parallel, or long-running work; propose it first and only call Workflow after user opt-in or existing session permission.",
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const withoutCode = (text) => text.replace(/```[\s\S]*?```/gu, " ").replace(/`[^`]*`/gu, " ");
|
|
72
|
+
const rawTriggerText = (text) => withoutCode(text).toLowerCase();
|
|
73
|
+
const normalizedTriggerText = (text) => rawTriggerText(text).replace(/[_-]+/gu, " ");
|
|
74
|
+
|
|
75
|
+
const isPlainWordBoundary = (value) => value === undefined || !plainWordBoundary.test(value);
|
|
76
|
+
const isCompoundWordBoundary = (value) => value === undefined || !compoundWordBoundary.test(value);
|
|
77
|
+
|
|
78
|
+
const containsPlainWord = (text, word) => {
|
|
79
|
+
for (let index = 0; index < text.length; index += 1) {
|
|
80
|
+
if (!text.startsWith(word, index)) continue;
|
|
81
|
+
const previous = index === 0 ? undefined : text[index - 1];
|
|
82
|
+
const next = text[index + word.length];
|
|
83
|
+
if (isPlainWordBoundary(previous) && isPlainWordBoundary(next)) return true;
|
|
84
|
+
}
|
|
85
|
+
return false;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const containsCompoundBoundedWord = (text, word) => {
|
|
89
|
+
for (let index = 0; index < text.length; index += 1) {
|
|
90
|
+
if (!text.startsWith(word, index)) continue;
|
|
91
|
+
const previous = index === 0 ? undefined : text[index - 1];
|
|
92
|
+
const next = text[index + word.length];
|
|
93
|
+
if (isCompoundWordBoundary(previous) && isCompoundWordBoundary(next)) return true;
|
|
94
|
+
}
|
|
95
|
+
return false;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const slashCommandMentions = [
|
|
99
|
+
"/deep-interview",
|
|
100
|
+
"/dynamic-workflow",
|
|
101
|
+
"/goal",
|
|
102
|
+
"/lit-loop",
|
|
103
|
+
"/lit-plan",
|
|
104
|
+
"/litclaude:deep-interview",
|
|
105
|
+
"/litclaude:dynamic-workflow",
|
|
106
|
+
"/litclaude:lit-loop",
|
|
107
|
+
"/litclaude:lit-plan",
|
|
108
|
+
"/litclaude:litgoal",
|
|
109
|
+
"/litclaude:litresearch",
|
|
110
|
+
"/litclaude:review-work",
|
|
111
|
+
"/litclaude:start-work",
|
|
112
|
+
"/litgoal",
|
|
113
|
+
"/litresearch",
|
|
114
|
+
"/review-work",
|
|
115
|
+
"/start-work",
|
|
56
116
|
];
|
|
57
117
|
|
|
58
|
-
const
|
|
118
|
+
const escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&");
|
|
119
|
+
|
|
120
|
+
const slashCommandMentionPattern = new RegExp(
|
|
121
|
+
`(^|\\s)(?:${slashCommandMentions.map(escapeRegExp).join("|")})(?=$|[\\s.,;:!?)}\\]])`,
|
|
122
|
+
"u",
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
const containsSlashCommandMention = (text) => slashCommandMentionPattern.test(text);
|
|
126
|
+
|
|
127
|
+
const findDollarCommandTrigger = (raw) => {
|
|
128
|
+
const match = /(?:^|\s)\$(deep-interview|dynamic-workflow|lit-plan|lit-loop|start-work|review-work|litgoal|litresearch)(?=$|[^\w-])/u.exec(raw);
|
|
129
|
+
if (!match) return undefined;
|
|
130
|
+
return { ...triggerByToken[match[1]], source: "dollar-command" };
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
const hasLitTrigger = (raw) => containsCompoundBoundedWord(raw, "lit") || containsCompoundBoundedWord(raw, "litwork");
|
|
134
|
+
|
|
135
|
+
const findNaturalLitTrigger = (prompt) => {
|
|
136
|
+
const raw = rawTriggerText(prompt);
|
|
137
|
+
if (containsSlashCommandMention(raw)) return undefined;
|
|
138
|
+
if (!hasLitTrigger(raw)) return undefined;
|
|
139
|
+
|
|
140
|
+
const normalized = normalizedTriggerText(prompt);
|
|
141
|
+
if (containsPlainWord(normalized, "review")) return { ...triggerByToken["review-work"], source: "natural-language" };
|
|
142
|
+
if (containsPlainWord(normalized, "start") && containsPlainWord(normalized, "work")) {
|
|
143
|
+
return { ...triggerByToken["start-work"], source: "natural-language", safetyBlock: true };
|
|
144
|
+
}
|
|
145
|
+
if (containsPlainWord(normalized, "research")) return { ...triggerByToken.litresearch, source: "natural-language" };
|
|
146
|
+
if (containsPlainWord(normalized, "goal")) return { ...triggerByToken.litgoal, source: "natural-language" };
|
|
147
|
+
if (containsPlainWord(normalized, "plan")) return { ...triggerByToken["lit-plan"], source: "natural-language" };
|
|
148
|
+
return { ...triggerByToken["lit-loop"], source: "natural-language", softConfirm: true };
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
const findWorkflowTrigger = (prompt) => {
|
|
152
|
+
const raw = rawTriggerText(prompt);
|
|
153
|
+
const dollarTrigger = findDollarCommandTrigger(raw);
|
|
154
|
+
if (dollarTrigger) return dollarTrigger;
|
|
155
|
+
if (containsSlashCommandMention(raw)) return undefined;
|
|
156
|
+
return findNaturalLitTrigger(prompt);
|
|
157
|
+
};
|
|
59
158
|
|
|
60
159
|
const isDiagnosticLiteralPrompt = (prompt) =>
|
|
61
160
|
/\bdiagnostic\b/iu.test(prompt)
|
|
62
161
|
&& /do not inspect or modify files/iu.test(prompt)
|
|
63
162
|
&& /reply with exactly one line/iu.test(prompt);
|
|
64
163
|
|
|
65
|
-
const litworkContext = ({ command, skill, discipline, softConfirm }) => [
|
|
164
|
+
const litworkContext = ({ command, skill, discipline, softConfirm, safetyBlock, source }) => [
|
|
165
|
+
...(safetyBlock
|
|
166
|
+
? ["BLOCKED: Natural-language start-work activation cannot switch the active Claude Code agent. Run `/start-work` (or `/litclaude:start-work`) with the approved plan so Claude Code can use the correct execution surface; do not continue implementation from this prompt hook."]
|
|
167
|
+
: []),
|
|
66
168
|
discipline === "deep-interview"
|
|
67
169
|
? "DEEP INTERVIEW MODE ENABLED."
|
|
68
170
|
: "LITWORK MODE ENABLED. Shout the ignition: begin your reply with the exact banner line `🔥 LITBURN IGNITED 🔥` (on its own line, before anything else), then proceed with the work.",
|
|
69
171
|
`Treat this prompt as an explicit request to use LitClaude ${discipline} discipline now; load or follow ${command} / ${skill} semantics before ordinary task execution.`,
|
|
172
|
+
modeContracts[discipline],
|
|
173
|
+
`Activation source: ${source ?? "legacy"}. Slash commands and slash-command mentions are handled by Claude Code's native command surface and do not activate this prompt hook. Code spans, code fences, substrings, and compound tokens are ignored. Secret-bearing prompt material is never persisted raw; record only redacted summaries and evidence paths in durable state.`,
|
|
70
174
|
"Use evidence-bound planning, tests, manual QA, and cleanup receipts.",
|
|
71
175
|
"Native goal binding (read this first): Claude Code's /goal (v2.1.139+) is a USER-TYPED slash command that sets an autonomous completion condition — a hook or skill CANNOT invoke it, and Claude Code currently exposes NO model-facing goal tools. So the real path is: when a goal is worth binding, propose a concrete, ready-to-paste /goal <completion condition> for the user, and keep driving the LitClaude evidence ledger meanwhile.",
|
|
72
176
|
"Forward-compat goal tools: if a future Claude Code build does expose model-facing goal tools, prefer them — first inspect get_goal, call create_goal with an objective-only payload when no matching goal is active, and reserve update_goal for verified completion or a genuine blocker. These are unavailable / not exposed today, so the /goal proposal above is the actual mechanism.",
|
|
@@ -6,6 +6,11 @@ argument-hint: '<planning brief>'
|
|
|
6
6
|
Use the `lit-plan` skill for the user's current planning brief or command
|
|
7
7
|
arguments.
|
|
8
8
|
|
|
9
|
+
This command is planning-only. Do not implement, edit files for product
|
|
10
|
+
changes, run mutating commands, or call start-work tooling from the planning
|
|
11
|
+
surface. End with an approval gate and instruct the user to run `/start-work` or
|
|
12
|
+
`/litclaude:start-work` after approval.
|
|
13
|
+
|
|
9
14
|
The plan must include Claude Code-native bootstrap steps:
|
|
10
15
|
|
|
11
16
|
- If model-facing goal tools are exposed, use `get_goal`, `create_goal`, and
|
|
@@ -6,6 +6,10 @@ argument-hint: '<goal operation>'
|
|
|
6
6
|
Use the `litgoal` skill for the user's current goal operation or command
|
|
7
7
|
arguments.
|
|
8
8
|
|
|
9
|
+
Shape the goal as one outcome-focused objective plus checkable criteria. Each
|
|
10
|
+
criterion needs a scenario, a real surface, and observable evidence before it is
|
|
11
|
+
complete.
|
|
12
|
+
|
|
9
13
|
Prefer the package CLI for durable local state:
|
|
10
14
|
`litclaude-ai litgoal create-goals`, `status`, `criteria`,
|
|
11
15
|
`record-evidence`, `checkpoint`, `steer`, and `record-review-blockers`.
|
|
@@ -6,6 +6,9 @@ argument-hint: '<research question>'
|
|
|
6
6
|
Use the `litresearch` skill for the user's research demand or command arguments.
|
|
7
7
|
Confirm the demand justifies saturation first: if a single read or one
|
|
8
8
|
`WebSearch` would answer it, do that directly and do not fan out.
|
|
9
|
+
Separate sourced evidence from hypotheses, verify contested claims before
|
|
10
|
+
synthesis, and report residual uncertainty rather than collapsing unknowns into
|
|
11
|
+
facts.
|
|
9
12
|
|
|
10
13
|
Before fanning out, bootstrap Claude Code-native research state:
|
|
11
14
|
|
|
@@ -7,7 +7,7 @@ Use the `review-work` skill for the user's current scope or command arguments.
|
|
|
7
7
|
|
|
8
8
|
Run the 5-lane review contract: goal and constraint verification
|
|
9
9
|
(goal/constraint), hands-on QA execution, code quality review, security review,
|
|
10
|
-
and local-first context mining.
|
|
10
|
+
and docs/package/context readiness through local-first context mining.
|
|
11
11
|
Aggregate findings into a PASS, FAIL, or NEEDS-CONTEXT verdict, and cite the
|
|
12
12
|
evidence used for every lane.
|
|
13
13
|
Manual-QA channels must leave artifacts, cleanup receipt paths, and bounded
|
|
@@ -6,6 +6,11 @@ argument-hint: '<plan-file>'
|
|
|
6
6
|
Use the `start-work` skill for the user's current plan file or command
|
|
7
7
|
arguments.
|
|
8
8
|
|
|
9
|
+
This command is the Claude Code-native execution transition for an approved
|
|
10
|
+
plan. If a user reached start-work through natural language (`lit start work`),
|
|
11
|
+
do not pretend the hook switched modes; require this slash command or the
|
|
12
|
+
namespaced `/litclaude:start-work` equivalent before execution.
|
|
13
|
+
|
|
9
14
|
Before the first checkbox, bootstrap Claude Code-native workflow state:
|
|
10
15
|
|
|
11
16
|
- Use `get_goal` and `create_goal` only if model-facing goal tools are exposed.
|
|
@@ -21,6 +21,10 @@ success criteria before editing. Keep decisions, evidence, cleanup receipts,
|
|
|
21
21
|
and remaining work in a durable notepad, plan, or ledger when the task spans
|
|
22
22
|
multiple steps.
|
|
23
23
|
|
|
24
|
+
This is a durable, evidence-driven execution loop. tests are necessary but not
|
|
25
|
+
sufficient: every done claim needs the matching real Claude Code/package/user
|
|
26
|
+
surface artifact, not just a green suite.
|
|
27
|
+
|
|
24
28
|
## Bootstrap
|
|
25
29
|
|
|
26
30
|
Before implementation:
|
|
@@ -9,6 +9,12 @@ You are a planner, not an implementer. Explore first, resolve discoverable
|
|
|
9
9
|
facts, and write one execution-ready plan under `plans/`. The plan should let a
|
|
10
10
|
fresh Claude Code session execute without re-solving the architecture.
|
|
11
11
|
|
|
12
|
+
This skill is **planning-only**. You must not implement, must not edit files for
|
|
13
|
+
product changes, and must not run mutating commands. Do not call any start-work
|
|
14
|
+
tool from inside planning mode. Once the plan is approved, tell the
|
|
15
|
+
user to run `/start-work` or `/litclaude:start-work` so Claude Code can use the
|
|
16
|
+
proper execution surface.
|
|
17
|
+
|
|
12
18
|
## Planning Contract
|
|
13
19
|
|
|
14
20
|
Every plan must include:
|
|
@@ -5,6 +5,10 @@ description: Durable LitClaude goal orchestration with CLI-backed state, explici
|
|
|
5
5
|
|
|
6
6
|
# Litgoal
|
|
7
7
|
|
|
8
|
+
Bind exactly one outcome-shaped objective at a time, then decompose it into
|
|
9
|
+
checkable criteria. Each criterion needs a scenario, a real surface, and
|
|
10
|
+
observable evidence before it can be marked complete.
|
|
11
|
+
|
|
8
12
|
Use this skill when work must survive turns, compaction, interrupted sessions,
|
|
9
13
|
or handoff to another agent. The core rule is strict: a goal is not complete
|
|
10
14
|
until every success criterion has observable evidence from a real surface and a
|
|
@@ -5,6 +5,10 @@ description: "Maximum-saturation LitClaude research orchestrator for Claude Code
|
|
|
5
5
|
|
|
6
6
|
# litresearch — maximum-saturation research orchestrator (Claude Code)
|
|
7
7
|
|
|
8
|
+
Use sourced evidence only. Separate verified facts from hypotheses, cite the
|
|
9
|
+
source or runtime surface for each material claim, and end with residual
|
|
10
|
+
uncertainty instead of overstating conclusions.
|
|
11
|
+
|
|
8
12
|
The LitClaude maximum-saturation research orchestrator, built only on Claude Code surfaces. Decompose a research demand, fan out parallel retrieval swarms, recursively chase every lead until convergence, verify contested claims by running code or adversarial review, and synthesize a fully cited answer — journaling every wave to disk so the work survives compaction. Every mechanism maps to a real Claude Code surface: the `Workflow` tool (Dynamic workflow), `Agent`/`Task` subagents namespaced `litclaude:`, `WebSearch`/`WebFetch`, the host `/deep-research` skill when the host exposes it, `TodoWrite` for the live lead tracker, and an on-disk `.litclaude/litresearch/<slug>/` session directory for the durable journal and cited synthesis.
|
|
9
13
|
|
|
10
14
|
## Role
|
|
@@ -16,7 +16,40 @@ writing a single line of code, then apply the shared philosophy on top.
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
## PHASE
|
|
19
|
+
## PHASE -1 — BUILD-DECISION GATE (RUN BEFORE PHASE 0)
|
|
20
|
+
|
|
21
|
+
Before writing or editing a single line of implementation code, work down these
|
|
22
|
+
checks and stop at the first one that cleanly meets the need:
|
|
23
|
+
|
|
24
|
+
1. Does this need to exist at all? If the outcome does not require it, do not build it.
|
|
25
|
+
2. Does the standard library already do it well? If so, use it.
|
|
26
|
+
3. Is there a native platform, runtime, or framework feature for it? If so, use it.
|
|
27
|
+
4. Does an already-installed dependency cover it cleanly? If so, reuse it — do not add or hand-roll.
|
|
28
|
+
5. Can the remaining gap be one clear line? If so, write the one line.
|
|
29
|
+
6. Only after all of the above fail: write the minimum code that genuinely works — nothing speculative.
|
|
30
|
+
|
|
31
|
+
Scope and floor (these keep the gate from under-building):
|
|
32
|
+
|
|
33
|
+
- Judge "minimum that works" over the WHOLE task, not per call site. If the same
|
|
34
|
+
logic appears at more than one call site, the minimum that works IS one small
|
|
35
|
+
shared helper — extract it.
|
|
36
|
+
- "Works" includes error handling for any failure the code can realistically hit
|
|
37
|
+
(network, parse, missing file, bad state) and the tests that prove the behavior
|
|
38
|
+
you just wrote. Only handling for states that genuinely cannot occur is the
|
|
39
|
+
speculative part to cut.
|
|
40
|
+
- Reach for a stdlib / native / dependency option only when it fits the need
|
|
41
|
+
cleanly, not merely because it technically can.
|
|
42
|
+
- Never shorten away, for the sake of fewer lines: input validation at trust
|
|
43
|
+
boundaries, handling that prevents data loss or corruption, security controls
|
|
44
|
+
(auth, secret handling, injection/escaping), or accessibility. The point is to
|
|
45
|
+
remove redundancy and speculation, never to lower the correctness floor.
|
|
46
|
+
|
|
47
|
+
PHASE -1 decides WHETHER and FROM WHAT to build; PHASE 0 and the per-language iron
|
|
48
|
+
list decide HOW.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## PHASE 0 — LANGUAGE GATE (RUN AFTER PHASE -1, EVERY TIME)
|
|
20
53
|
|
|
21
54
|
**Do not write or edit a single line of code before completing this gate.**
|
|
22
55
|
|
|
@@ -341,6 +374,10 @@ Answer these in your reply before declaring done:
|
|
|
341
374
|
6. **Helpers for one-off?** Any abstraction with a single caller that will never
|
|
342
375
|
get a second?
|
|
343
376
|
7. **Tests?** Is the new behavior locked by a test that fails if you revert it?
|
|
377
|
+
8. **Necessity & reuse?** Did everything you wrote need to exist, and did you
|
|
378
|
+
confirm the standard library, a native feature, or an already-installed
|
|
379
|
+
dependency did not already cover it before you hand-rolled? Remove anything
|
|
380
|
+
that fails this.
|
|
344
381
|
|
|
345
382
|
If any answer fails, fix it before declaring done.
|
|
346
383
|
|
|
@@ -16,6 +16,10 @@ only when they match the user's request and the repo's safety constraints. If
|
|
|
16
16
|
they are unavailable, run the same lanes yourself with local tools and record
|
|
17
17
|
the limits honestly.
|
|
18
18
|
|
|
19
|
+
The five lanes are goal/constraints, real-surface QA, code quality, security,
|
|
20
|
+
and docs/package/context readiness. A PASS verdict requires concrete evidence
|
|
21
|
+
for every applicable lane; missing evidence is BLOCKED, not approval.
|
|
22
|
+
|
|
19
23
|
## Subagent Assignment Contract
|
|
20
24
|
|
|
21
25
|
When review lanes run through child agents or Dynamic workflow lanes, send
|
|
@@ -32,10 +32,12 @@ guidance should be labeled and not silently treated as active truth.
|
|
|
32
32
|
|
|
33
33
|
## Trigger Discipline
|
|
34
34
|
|
|
35
|
-
For LitClaude triggers, recognize `lit`, `litwork`,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
belong to
|
|
35
|
+
For LitClaude natural-language triggers, recognize `lit`, `litwork`, `lit
|
|
36
|
+
plan`, `lit review`, `lit research`, `lit goal`, and `lit start work`, plus
|
|
37
|
+
legacy `$lit-plan`, `$lit-loop`, and `$start-work` shorthands. Slash commands
|
|
38
|
+
and slash-command mentions belong to Claude Code's native command surface and
|
|
39
|
+
must not double-activate through the prompt hook. Code spans, code fences,
|
|
40
|
+
substrings, and compound tokens are ignored.
|
|
39
41
|
|
|
40
42
|
## Priority
|
|
41
43
|
|
|
@@ -9,6 +9,11 @@ Use this skill when the user asks to execute a plan file, especially
|
|
|
9
9
|
`$start-work plans/<slug>.md`. The plan file and ledger are the source of truth,
|
|
10
10
|
not memory.
|
|
11
11
|
|
|
12
|
+
This skill is execution-only for an approved plan. If no approved plan is
|
|
13
|
+
visible, stop with `BLOCKED:` and ask for the plan file or explicit approval.
|
|
14
|
+
Do not redesign, rescope, or replace the plan unless fresh evidence proves a
|
|
15
|
+
blocker, contradiction, or stale state.
|
|
16
|
+
|
|
12
17
|
## Bootstrap
|
|
13
18
|
|
|
14
19
|
Before the first edit:
|
|
@@ -22,12 +22,12 @@ async function main() {
|
|
|
22
22
|
assert.equal(manifest.name, "litclaude");
|
|
23
23
|
assert.equal(manifest.skills, "./skills");
|
|
24
24
|
assert.deepEqual(manifest.agents, [
|
|
25
|
+
"./agents/prometheus-planner.md",
|
|
25
26
|
"./agents/boulder-executor.md",
|
|
26
|
-
"./agents/librarian-researcher.md",
|
|
27
27
|
"./agents/oracle-verifier.md",
|
|
28
|
-
"./agents/prometheus-planner.md",
|
|
29
28
|
"./agents/qa-runner.md",
|
|
30
29
|
"./agents/quality-reviewer.md",
|
|
30
|
+
"./agents/librarian-researcher.md",
|
|
31
31
|
]);
|
|
32
32
|
assert.equal("hooks" in manifest, false);
|
|
33
33
|
assert.equal(manifest.mcpServers, "./.mcp.json");
|