litclaude-ai 0.3.25 → 0.3.27
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 +24 -0
- package/README.md +26 -8
- package/README_ko-KR.md +24 -9
- package/RELEASE_CHECKLIST.md +16 -8
- package/bin/litclaude-ai.js +151 -25
- package/docs/agents.md +8 -1
- package/docs/hooks.md +5 -3
- package/docs/migration.md +6 -4
- package/package.json +1 -1
- package/plugins/litclaude/.claude-plugin/plugin.json +1 -1
- package/plugins/litclaude/agents/prometheus-planner.md +6 -1
- package/plugins/litclaude/bin/litclaude-hook.js +1 -1
- package/plugins/litclaude/bin/litclaude-mcp.js +1 -1
- package/plugins/litclaude/commands/dynamic-workflow.md +17 -0
- package/plugins/litclaude/commands/lit-plan.md +12 -0
- package/plugins/litclaude/commands/review-work.md +14 -2
- package/plugins/litclaude/lib/workflow-check.mjs +102 -4
- package/plugins/litclaude/skills/lit-plan/SKILL.md +84 -24
- package/plugins/litclaude/skills/review-work/SKILL.md +51 -6
- package/scripts/doctor.mjs +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.27 - 2026-07-12 — structured interactive installer
|
|
4
|
+
|
|
5
|
+
- Present interactive installs as five persistent, numbered Claude-native
|
|
6
|
+
stages with purpose and target details plus a live spinner during filesystem
|
|
7
|
+
work.
|
|
8
|
+
- Add explicit `PREPARING INSTALL`, successful `INSTALL RECEIPT`, and failed
|
|
9
|
+
`INSTALL STOPPED` summaries without changing dry-run or deterministic
|
|
10
|
+
non-TTY `INSTALL_STEP` behavior.
|
|
11
|
+
- Respect `NO_COLOR`, retain CI-safe output, and verify the installed payload,
|
|
12
|
+
Claude plugin registry, and compatibility pointer before reporting success.
|
|
13
|
+
|
|
14
|
+
## 0.3.26 - 2026-07-11 — planning quality and orchestration safety
|
|
15
|
+
|
|
16
|
+
- Make `lit-plan` checklist depth adaptive: one bounded objective, explicit
|
|
17
|
+
non-goals, resolved or gated unknowns, Action/Output/Verification items,
|
|
18
|
+
decision branches, proportionate evidence, and a replayable DoneClaim.
|
|
19
|
+
- Add `review-work` plan-review mode with scope, objective-achievability,
|
|
20
|
+
checklist-atomicity, evidence, failure, and cleanup audits while preserving
|
|
21
|
+
the completed-work 5-lane review and the planning-only no-implementation
|
|
22
|
+
boundary.
|
|
23
|
+
- Harden orchestration readiness against disabled or malformed user, project,
|
|
24
|
+
and managed-policy settings; remove delegation from the standalone planner
|
|
25
|
+
and document bounded workflow lifecycle and cleanup behavior.
|
|
26
|
+
|
|
3
27
|
## 0.3.25 - 2026-07-09 — portable and public-read release prep
|
|
4
28
|
|
|
5
29
|
- Prepare `litclaude-ai@0.3.25` after aligning installed portable details,
|
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.27-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,10 +22,10 @@
|
|
|
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.27` 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.25 release material aligns portable details, public-read, litgoal status JSON, and evidence wording. The v0.3.24 release material aligns auxiliary skill inventories and advisory probes. The v0.3.23
|
|
28
|
+
Future package releases still require explicit user approval. The v0.3.27 release material adds a structured, animated five-stage installer with a success or failure receipt while preserving deterministic automation output. The v0.3.26 release material adds adaptive objective-achievable planning, draft-plan review, and orchestration readiness hardening. The v0.3.25 release material aligns portable details, public-read, litgoal status JSON, and evidence wording. The v0.3.24 release material aligns auxiliary skill inventories and advisory probes. The v0.3.23
|
|
29
29
|
release materials inject the bundled skill bodies for bare `hyperplan`,
|
|
30
30
|
`litresearch`, `lit research`, `init-deep`, and explicit `$start-work` prompt-hook routes while
|
|
31
31
|
preserving the v0.3.19 adversarial planning skill, the v0.3.18 read-only `lit-recap` session recap surface, the v0.3.17 separate-worker native `/goal` launcher, the v0.3.16
|
|
@@ -72,6 +72,7 @@ activation/read-only polish, and installer permission-preference discipline.
|
|
|
72
72
|
- **Dynamic workflow/worktree guidance** - large or parallel tasks are steered
|
|
73
73
|
toward Claude Code Dynamic workflow orchestration, subagent delegation, and
|
|
74
74
|
Dynamic worktree isolation
|
|
75
|
+
- **Observable orchestration gates** - `workflow-check --json` fails when locally observable environment, user/project settings, or macOS/Linux managed-policy files disable workflows/background tasks, or when tool concurrency is effectively serial. It reports remote organization policy as not locally observable; a local pass cannot override a remote administrator denial. Claude Code 2.1.207 workflow ceilings (16 concurrent, 1000 total), cost-bearing `acceptEdits` workers, one-team-per-lead ownership, graceful teammate shutdown, and resume/orphan-tmux checks are explicit lifecycle constraints.
|
|
75
76
|
- **Claude skills** - a richer LitClaude-owned corpus: `programming`,
|
|
76
77
|
`debugging`, `refactor`, `ai-slop-remover`, `remove-ai-slops`,
|
|
77
78
|
`korean-ai-slop-remover`, `review-work`, `frontend-ui-ux`,
|
|
@@ -106,9 +107,14 @@ npx --yes litclaude-ai install
|
|
|
106
107
|
|
|
107
108
|
During an interactive `npx` install, LitClaude shows every HUD brand color as
|
|
108
109
|
a vivid live terminal preview and writes the selected accent into the managed
|
|
109
|
-
Claude `statusLine` command.
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
Claude `statusLine` command. The installer then presents `PREPARING INSTALL`,
|
|
111
|
+
five persistent numbered stages with each stage's purpose and target, an
|
|
112
|
+
animated spinner while filesystem work is active, and an `INSTALL RECEIPT`
|
|
113
|
+
that identifies the installed plugin, HUD, permission preference, and launch
|
|
114
|
+
command. A failed stage prints `INSTALL STOPPED` and never reports success.
|
|
115
|
+
`NO_COLOR` retains the structure without ANSI color. CI and non-TTY installs
|
|
116
|
+
keep deterministic plain `INSTALL_STEP` lines, and `--dry-run` remains a
|
|
117
|
+
side-effect-free preview.
|
|
112
118
|
|
|
113
119
|
If you are currently inside this repository checkout, which has the same
|
|
114
120
|
package name as the registry package, older published builds such as
|
|
@@ -119,7 +125,7 @@ directory, the normal install command works:
|
|
|
119
125
|
|
|
120
126
|
```bash
|
|
121
127
|
cd /tmp
|
|
122
|
-
npx --yes litclaude-ai@0.3.
|
|
128
|
+
npx --yes litclaude-ai@0.3.27 install
|
|
123
129
|
```
|
|
124
130
|
|
|
125
131
|
Validate the installed plugin:
|
|
@@ -132,7 +138,7 @@ The installer also sets Claude Code's `statusLine` command to the packaged
|
|
|
132
138
|
LitClaude HUD. A typical no-color render starts like:
|
|
133
139
|
|
|
134
140
|
```text
|
|
135
|
-
[🔥LITCLAUDE v0.3.
|
|
141
|
+
[🔥LITCLAUDE v0.3.27] | O4.8 │ ctx [▎░░] 9%/1000k │ 5h [▏░] 4% ↻2h15m │ 1w [▊░] 35% ↻3d6h │ git main +3 ✓
|
|
136
142
|
```
|
|
137
143
|
|
|
138
144
|
The `↻` suffix is a compact rate-limit reset countdown. It is separated from
|
|
@@ -330,6 +336,18 @@ then aggregate evidence into a PASS, FAIL, or NEEDS-CONTEXT verdict. Manual-QA
|
|
|
330
336
|
channels must write artifacts, and every tmux session, server, port, browser
|
|
331
337
|
tab, or temp directory needs a cleanup receipt before review completion.
|
|
332
338
|
|
|
339
|
+
`lit-plan` now defaults to an objective-achievable checklist with adaptive
|
|
340
|
+
detail. It bounds one objective and explicit non-goals, resolves or gates
|
|
341
|
+
unknowns, orders dependencies, and expresses each material item as Action,
|
|
342
|
+
Output, and binary Verification. Simple reversible work stays concise; risky or
|
|
343
|
+
multi-stage work gains SDD-like evidence, negative controls, decision/failure
|
|
344
|
+
branches, cleanup gates, and a replayable DoneClaim without checklist padding.
|
|
345
|
+
When `/review-work` receives a draft plan instead of completed work, its
|
|
346
|
+
plan-review mode audits scope, objective achievability, checklist atomicity,
|
|
347
|
+
acceptance/evidence, and decision/failure/cleanup gates. It returns
|
|
348
|
+
`PASS | ITERATE | NEEDS-CONTEXT`, revises only when needed, and must never
|
|
349
|
+
implement the plan. Completed work still uses the full 5-lane review.
|
|
350
|
+
|
|
333
351
|
For resilient public-source research, `litresearch`, `$litresearch`,
|
|
334
352
|
`lit research`, `lit search`, and `lit query` route to
|
|
335
353
|
`/litclaude:litresearch` when the prompt explicitly asks for a cited
|
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.27-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,11 +26,11 @@
|
|
|
26
26
|
> 설치되므로, 매번 긴 `--plugin-dir` 없이 일반 `claude` 실행에서
|
|
27
27
|
> LitClaude skill과 hook을 불러올 수 있습니다.
|
|
28
28
|
|
|
29
|
-
현재 checkout은 `litclaude-ai@0.3.
|
|
29
|
+
현재 checkout은 `litclaude-ai@0.3.27` 배포 준비용으로 정리되어 있습니다. 목적은
|
|
30
30
|
다른 PC에서도 빠르게 설치하기 위한 개인용 package metadata를 갖추는 것입니다.
|
|
31
31
|
npm package metadata를 준비했다고 해서 홍보, 공개 저장소 운영, Claude
|
|
32
32
|
marketplace 등록을 의미하지는 않습니다. 새 버전 배포는 항상 별도의 명시적
|
|
33
|
-
승인 후에 진행합니다. v0.3.25 release material은 portable details, public-read, litgoal status JSON, evidence wording을 정렬합니다. v0.3.24 release material은 auxiliary skill inventory와 advisory probe를 정렬합니다. v0.3.23 release material은 bare `hyperplan`,
|
|
33
|
+
승인 후에 진행합니다. v0.3.27 release material은 success/failure receipt와 deterministic automation output을 갖춘 5-stage animated installer를 추가합니다. v0.3.26 release material은 adaptive objective-achievable planning, draft-plan review, orchestration readiness hardening을 추가합니다. v0.3.25 release material은 portable details, public-read, litgoal status JSON, evidence wording을 정렬합니다. v0.3.24 release material은 auxiliary skill inventory와 advisory probe를 정렬합니다. v0.3.23 release material은 bare `hyperplan`,
|
|
34
34
|
`litresearch`, `lit research`, `init-deep`, explicit `$start-work` prompt-hook route에
|
|
35
35
|
bundled skill body를 주입하면서, v0.3.19 adversarial planning
|
|
36
36
|
skill, v0.3.18 read-only `lit-recap` session recap surface, v0.3.17 별도 worker 기반 native `/goal`
|
|
@@ -76,6 +76,7 @@ litresearch activation/read-only polish를 유지합니다.
|
|
|
76
76
|
아래에 기록
|
|
77
77
|
- **Dynamic workflow/worktree guidance** - 크거나 병렬적인 작업은 Claude
|
|
78
78
|
Code Dynamic workflow, subagent delegation, Dynamic worktree 격리 쪽으로 유도
|
|
79
|
+
- **관측 가능한 orchestration gate** - `workflow-check --json`은 로컬에서 확인 가능한 환경변수, 사용자/프로젝트 설정, macOS/Linux managed-policy 파일이 workflow/background task를 끄거나 tool concurrency가 사실상 직렬이면 실패합니다. 원격 조직 정책은 로컬에서 관측할 수 없다고 명시하므로, 로컬 PASS가 원격 관리자의 deny를 무효화한다는 뜻은 아닙니다. Claude Code 2.1.207의 workflow 상한(동시 16, 누적 1000), 비용이 발생하는 `acceptEdits` worker, lead당 team 1개, teammate graceful shutdown, resume 후 orphan tmux 재확인을 명시적 lifecycle 제약으로 다룹니다.
|
|
79
80
|
- **Claude skills** - LitClaude 스타일을 더 풍부하게 옮긴 corpus:
|
|
80
81
|
`programming`, `debugging`, `refactor`, `ai-slop-remover`, `remove-ai-slops`,
|
|
81
82
|
`korean-ai-slop-remover`, `review-work`, `frontend-ui-ux`,
|
|
@@ -109,10 +110,12 @@ npx --yes litclaude-ai install
|
|
|
109
110
|
|
|
110
111
|
interactive `npx` 설치에서는 LitClaude가 HUD brand color 후보를 더 선명한
|
|
111
112
|
실제 터미널 색상으로 바로 보여주고, 선택한 accent를 Claude의 managed
|
|
112
|
-
`statusLine` command에 저장합니다.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
`
|
|
113
|
+
`statusLine` command에 저장합니다. 이후 `PREPARING INSTALL`, 목적과 target을
|
|
114
|
+
표시하는 5개의 numbered stage, 파일시스템 작업 중 animated spinner, 그리고
|
|
115
|
+
plugin·HUD·permission·launch command를 정리한 `INSTALL RECEIPT`를 보여줍니다.
|
|
116
|
+
중간 단계가 실패하면 `INSTALL STOPPED`를 출력하고 성공을 보고하지 않습니다.
|
|
117
|
+
`NO_COLOR`는 ANSI 색상만 제거하고 구조를 유지합니다. CI/non-TTY 설치는 deterministic한
|
|
118
|
+
plain `INSTALL_STEP` line을 유지하며 `--dry-run`은 계속 side-effect-free preview입니다.
|
|
116
119
|
|
|
117
120
|
현재 위치가 이 저장소 checkout이면, registry package와 같은 package name을
|
|
118
121
|
가진 same-name source checkout 안에 있는 상태입니다. 이 경우
|
|
@@ -123,7 +126,7 @@ checkout을 먼저 해석해서 `sh: litclaude-ai: command not found`로 실패
|
|
|
123
126
|
|
|
124
127
|
```bash
|
|
125
128
|
cd /tmp
|
|
126
|
-
npx --yes litclaude-ai@0.3.
|
|
129
|
+
npx --yes litclaude-ai@0.3.27 install
|
|
127
130
|
```
|
|
128
131
|
|
|
129
132
|
설치 상태를 확인합니다.
|
|
@@ -136,7 +139,7 @@ installer는 Claude Code의 `statusLine` command도 packaged LitClaude HUD로
|
|
|
136
139
|
설정합니다. 색상을 제거한 예시는 다음처럼 시작합니다.
|
|
137
140
|
|
|
138
141
|
```text
|
|
139
|
-
[🔥LITCLAUDE v0.3.
|
|
142
|
+
[🔥LITCLAUDE v0.3.27] | O4.8 │ ctx [▎░░] 9%/1000k │ 5h [▏░] 4% ↻2h15m │ 1w [▊░] 35% ↻3d6h │ git main +3 ✓
|
|
140
143
|
```
|
|
141
144
|
|
|
142
145
|
`↻` 표시는 rate-limit reset까지 남은 시간을 짧게 보여주는 countdown입니다.
|
|
@@ -310,6 +313,18 @@ real-surface/docs readiness를 포함합니다. 각 lane은
|
|
|
310
313
|
Manual-QA channels는 artifact를 남겨야 하며 tmux session, server, port,
|
|
311
314
|
browser tab, temp directory는 completion 전에 cleanup receipt를 남겨야 합니다.
|
|
312
315
|
|
|
316
|
+
`lit-plan`은 이제 adaptive detail을 적용한 objective-achievable checklist를
|
|
317
|
+
기본으로 만듭니다. 하나의 bounded objective와 명시적 non-goals를 고정하고,
|
|
318
|
+
unknown을 해소하거나 gate로 전환하며, dependency 순서에 따라 각 핵심 항목을
|
|
319
|
+
Action, Output, binary Verification으로 작성합니다. 단순하고 되돌릴 수 있는
|
|
320
|
+
작업은 짧게 유지하고, 위험하거나 multi-stage인 작업만 SDD-like evidence,
|
|
321
|
+
negative control, decision/failure branch, cleanup gate, replayable DoneClaim을
|
|
322
|
+
갖춥니다. checklist padding은 추가하지 않습니다. `/review-work`가 완료된 diff가
|
|
323
|
+
아니라 draft plan을 받으면 plan-review mode로 scope, objective achievability,
|
|
324
|
+
checklist atomicity, acceptance/evidence, decision/failure/cleanup gate를 점검합니다.
|
|
325
|
+
`PASS | ITERATE | NEEDS-CONTEXT` 중 하나를 반환하며, 필요한 부분만 수정하고
|
|
326
|
+
plan을 must not implement 합니다. 완료된 작업은 기존 5-lane review를 유지합니다.
|
|
327
|
+
|
|
313
328
|
공개 소스 조사(public-source research)가 필요할 때 `litresearch`,
|
|
314
329
|
`$litresearch`, `lit research`, `lit search`, `lit query`는 명시적인 cited
|
|
315
330
|
investigation 요청에 한해 `/litclaude:litresearch`로 라우팅됩니다. Web lane은
|
package/RELEASE_CHECKLIST.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
# LitClaude Release Checklist
|
|
2
2
|
|
|
3
|
-
Status: `litclaude-ai@0.3.
|
|
4
|
-
|
|
3
|
+
Status: `litclaude-ai@0.3.27` is the current release candidate — a structured
|
|
4
|
+
five-stage interactive installer with success/failure receipts plus adaptive
|
|
5
|
+
planning, draft-plan review, and orchestration-safety release on top of the portable
|
|
6
|
+
details, public-read, litgoal-status, and evidence-wording release and the auxiliary
|
|
5
7
|
skill inventory and advisory-probe release and the full bare
|
|
6
8
|
skill-body prompt-hook routing release, planning-only Hyperplan skill, and read-only `lit-recap`
|
|
7
9
|
session recap surface (command, skill, and bounded hook routing
|
|
@@ -14,9 +16,9 @@ side-effect-free, the launcher starts only a separate Claude Code
|
|
|
14
16
|
print/background worker, and the release preserves the Korean polishing
|
|
15
17
|
command, strict multi-agent review pipeline, fidelity guardrails, package
|
|
16
18
|
hygiene checks, native route gates, and safe start-work handoff behavior.
|
|
17
|
-
`package.json` is aligned to `0.3.
|
|
18
|
-
`plugins/litclaude/.claude-plugin/plugin.json` is aligned to `0.3.
|
|
19
|
-
plugin-local MCP server reports `0.3.
|
|
19
|
+
`package.json` is aligned to `0.3.27`,
|
|
20
|
+
`plugins/litclaude/.claude-plugin/plugin.json` is aligned to `0.3.27`, and the
|
|
21
|
+
plugin-local MCP server reports `0.3.27`.
|
|
20
22
|
|
|
21
23
|
This release carries the v0.2.2 Dynamic workflow hardening surfaces:
|
|
22
24
|
`/dynamic-workflow`, `workflow-check --json`, native `/goal` fallback guidance,
|
|
@@ -65,9 +67,9 @@ No npm publication is required for this track.
|
|
|
65
67
|
Before requesting publication approval, confirm these artifacts from the current
|
|
66
68
|
checkout:
|
|
67
69
|
|
|
68
|
-
- `package.json` version is `0.3.
|
|
69
|
-
- `plugins/litclaude/.claude-plugin/plugin.json` version is `0.3.
|
|
70
|
-
- `plugins/litclaude/bin/litclaude-mcp.js` reports server version `0.3.
|
|
70
|
+
- `package.json` version is `0.3.27`.
|
|
71
|
+
- `plugins/litclaude/.claude-plugin/plugin.json` version is `0.3.27`.
|
|
72
|
+
- `plugins/litclaude/bin/litclaude-mcp.js` reports server version `0.3.27`.
|
|
71
73
|
- Prompt-hook tests cover bundled `SKILL.md` body injection for bare `hyperplan`, `litresearch`, `lit research`, `init-deep`, and explicit `$start-work`, while natural-language `lit start work` stays BLOCKED.
|
|
72
74
|
- `lit search` and `lit query` route to `/litclaude:litresearch` without activating on slash mentions, code spans, or non-lit prompts.
|
|
73
75
|
- Litresearch web lanes require public API/feed preference, validator-first checks, route traces, prompt-injection quarantine, and honest auth/paywall/private-data stop reasons.
|
|
@@ -82,6 +84,12 @@ checkout:
|
|
|
82
84
|
- PostToolUse hook tests cover patch-shaped mutated-file extraction.
|
|
83
85
|
- SessionStart hook tests cover context-pressure resume guidance.
|
|
84
86
|
- `plugins/litclaude/commands/review-work.md` documents the 5-lane review.
|
|
87
|
+
- `plugins/litclaude/commands/lit-plan.md` documents adaptive
|
|
88
|
+
Action/Output/Verification checklists and a DoneClaim without fixed checklist
|
|
89
|
+
padding.
|
|
90
|
+
- `plugins/litclaude/commands/review-work.md` distinguishes plan-review mode
|
|
91
|
+
(`PASS | ITERATE | NEEDS-CONTEXT`, no implementation) from the completed-work
|
|
92
|
+
5-lane review.
|
|
85
93
|
- `plugins/litclaude/commands/litgoal.md` documents durable goal state.
|
|
86
94
|
- `plugins/litclaude/lib/litgoal/` ships the runtime CLI/state modules.
|
|
87
95
|
- `node bin/litclaude-ai.js litgoal --help` prints durable state commands.
|
package/bin/litclaude-ai.js
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
symlinkSync,
|
|
11
11
|
writeFileSync,
|
|
12
12
|
} from "node:fs";
|
|
13
|
+
import { cp, mkdir, rm } from "node:fs/promises";
|
|
13
14
|
import { homedir } from "node:os";
|
|
14
15
|
import { dirname, join, resolve } from "node:path";
|
|
15
16
|
import { createInterface } from "node:readline/promises";
|
|
@@ -169,6 +170,8 @@ const shouldAnimateInstall = () => {
|
|
|
169
170
|
return Boolean(process.stdout.isTTY && !process.env.CI);
|
|
170
171
|
};
|
|
171
172
|
|
|
173
|
+
const shouldColorInstall = () => !Object.hasOwn(process.env, "NO_COLOR");
|
|
174
|
+
|
|
172
175
|
const installStepTheme = (label) => {
|
|
173
176
|
if (/registry|HUD/iu.test(label)) return { code: 215, tag: "registry" };
|
|
174
177
|
if (/plugin/iu.test(label)) return { code: 141, tag: "plugin" };
|
|
@@ -177,32 +180,87 @@ const installStepTheme = (label) => {
|
|
|
177
180
|
return { code: 81, tag: "setup" };
|
|
178
181
|
};
|
|
179
182
|
|
|
180
|
-
const color256 = (code, text) => `\x1b[38;5;${code}m${text}\x1b[0m
|
|
183
|
+
const color256 = (code, text) => shouldColorInstall() ? `\x1b[38;5;${code}m${text}\x1b[0m` : text;
|
|
184
|
+
const bold = (text) => shouldColorInstall() ? `\x1b[1m${text}\x1b[0m` : text;
|
|
181
185
|
|
|
182
186
|
const formatInstallStep = (label) => {
|
|
183
187
|
const theme = installStepTheme(label);
|
|
184
|
-
return `${color256(theme.code, theme.tag)}
|
|
188
|
+
return `${color256(theme.code, theme.tag)} ${bold(label)}`;
|
|
185
189
|
};
|
|
186
190
|
|
|
187
191
|
const createInstallProgress = () => {
|
|
188
192
|
const animated = shouldAnimateInstall();
|
|
189
193
|
let frameIndex = 0;
|
|
194
|
+
const live = animated && Boolean(process.stdout.isTTY);
|
|
195
|
+
|
|
196
|
+
const clearLiveLine = () => {
|
|
197
|
+
if (live) process.stdout.write("\r\x1b[2K");
|
|
198
|
+
};
|
|
199
|
+
|
|
190
200
|
return {
|
|
191
|
-
|
|
201
|
+
prepare({ claudeTarget, litTarget }) {
|
|
192
202
|
if (!animated) {
|
|
193
|
-
process.stdout.write(`INSTALL_STEP: ${
|
|
203
|
+
process.stdout.write(`INSTALL_STEP: Installing LitClaude ${version}\n`);
|
|
194
204
|
return;
|
|
195
205
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
206
|
+
process.stdout.write(
|
|
207
|
+
`\n╭─ PREPARING INSTALL\n` +
|
|
208
|
+
`│ Package LitClaude ${version}\n` +
|
|
209
|
+
`│ Action Installing LitClaude ${version}\n` +
|
|
210
|
+
`│ Claude state ${claudeTarget}\n` +
|
|
211
|
+
`│ Local state ${litTarget}\n` +
|
|
212
|
+
`│ Progress 5 persistent stages with a final verification\n` +
|
|
213
|
+
`╰─ Existing unrelated Claude settings are preserved\n\n`,
|
|
214
|
+
);
|
|
199
215
|
},
|
|
200
|
-
|
|
216
|
+
async run({ number, title, label, purpose, target }, work) {
|
|
201
217
|
if (!animated) {
|
|
202
218
|
process.stdout.write(`INSTALL_STEP: ${label}\n`);
|
|
203
|
-
return;
|
|
219
|
+
return work();
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
process.stdout.write(
|
|
223
|
+
`${String(number).padStart(2, "0")} / 05 ${title}\n` +
|
|
224
|
+
` ${purpose}\n` +
|
|
225
|
+
` target ${target}\n`,
|
|
226
|
+
);
|
|
227
|
+
|
|
228
|
+
const renderSpinner = () => {
|
|
229
|
+
const frame = spinnerFrames[frameIndex % spinnerFrames.length];
|
|
230
|
+
frameIndex += 1;
|
|
231
|
+
const line = ` ${color256(81, frame)} ${formatInstallStep(label)}`;
|
|
232
|
+
process.stdout.write(live ? `\r\x1b[2K${line}` : `${line}\n`);
|
|
233
|
+
};
|
|
234
|
+
renderSpinner();
|
|
235
|
+
const timer = live ? setInterval(renderSpinner, 80) : undefined;
|
|
236
|
+
|
|
237
|
+
try {
|
|
238
|
+
const result = await work();
|
|
239
|
+
if (timer) clearInterval(timer);
|
|
240
|
+
clearLiveLine();
|
|
241
|
+
process.stdout.write(` ${color256(119, "✓")} ${bold(label)}\n\n`);
|
|
242
|
+
return result;
|
|
243
|
+
} catch (error) {
|
|
244
|
+
if (timer) clearInterval(timer);
|
|
245
|
+
clearLiveLine();
|
|
246
|
+
process.stdout.write(
|
|
247
|
+
` ${color256(203, "✗")} ${bold(`${label} failed`)}\n\n` +
|
|
248
|
+
`╭─ INSTALL STOPPED\n` +
|
|
249
|
+
`│ Stage ${String(number).padStart(2, "0")} / 05 · ${title}\n` +
|
|
250
|
+
`│ Reason ${error instanceof Error ? error.message : String(error)}\n` +
|
|
251
|
+
`│ Next Resolve the reason above, then rerun litclaude install\n` +
|
|
252
|
+
`╰─ Exit without reporting success\n`,
|
|
253
|
+
);
|
|
254
|
+
throw error;
|
|
204
255
|
}
|
|
205
|
-
|
|
256
|
+
},
|
|
257
|
+
receipt(rows) {
|
|
258
|
+
if (!animated) return;
|
|
259
|
+
process.stdout.write("\n╭─ INSTALL RECEIPT\n");
|
|
260
|
+
for (const [key, value] of rows) {
|
|
261
|
+
process.stdout.write(`│ ${key.padEnd(13)} ${value}\n`);
|
|
262
|
+
}
|
|
263
|
+
process.stdout.write("╰─ Installation complete\n\n");
|
|
206
264
|
},
|
|
207
265
|
};
|
|
208
266
|
};
|
|
@@ -560,6 +618,20 @@ const resetCurrentPointer = (home, target) => {
|
|
|
560
618
|
}
|
|
561
619
|
};
|
|
562
620
|
|
|
621
|
+
const verifyInstalledPayload = ({ home, litClaudeHome, targetPlugin }) => {
|
|
622
|
+
for (const relativePath of [".claude-plugin/plugin.json", "hooks/hooks.json", "bin/litclaude-hook.js"]) {
|
|
623
|
+
if (!existsSync(join(targetPlugin, relativePath))) {
|
|
624
|
+
throw new Error(`installed plugin is missing ${relativePath}`);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
if (!readInstalledPlugins(home).plugins[pluginKey]?.length) {
|
|
628
|
+
throw new Error(`Claude registry is missing ${pluginKey}`);
|
|
629
|
+
}
|
|
630
|
+
if (!existsSync(currentRoot(litClaudeHome))) {
|
|
631
|
+
throw new Error("LitClaude compatibility pointer was not created");
|
|
632
|
+
}
|
|
633
|
+
};
|
|
634
|
+
|
|
563
635
|
const install = async ({ dryRun, rest }) => {
|
|
564
636
|
const { permissionMode, permissionExplicit } = parseInstallOptions(rest);
|
|
565
637
|
const home = claudeHome();
|
|
@@ -586,24 +658,78 @@ const install = async ({ dryRun, rest }) => {
|
|
|
586
658
|
}
|
|
587
659
|
|
|
588
660
|
const hudAccent = await chooseHudAccent();
|
|
589
|
-
progress.
|
|
590
|
-
progress.
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
661
|
+
progress.prepare({ claudeTarget: home, litTarget: litClaudeHome });
|
|
662
|
+
await progress.run(
|
|
663
|
+
{
|
|
664
|
+
number: 1,
|
|
665
|
+
title: "PLUGIN PAYLOAD",
|
|
666
|
+
label: "Plugin payload copied",
|
|
667
|
+
purpose: "Copy the packaged hooks, skills, agents, MCP, and LSP surfaces",
|
|
668
|
+
target: targetPlugin,
|
|
669
|
+
},
|
|
670
|
+
async () => {
|
|
671
|
+
await rm(targetPlugin, { recursive: true, force: true });
|
|
672
|
+
await mkdir(dirname(targetPlugin), { recursive: true });
|
|
673
|
+
await cp(sourcePlugin, targetPlugin, { recursive: true });
|
|
674
|
+
},
|
|
675
|
+
);
|
|
676
|
+
const localMarketplace = await progress.run(
|
|
677
|
+
{
|
|
678
|
+
number: 2,
|
|
679
|
+
title: "LOCAL MARKETPLACE",
|
|
680
|
+
label: "Marketplace metadata written",
|
|
681
|
+
purpose: "Create a local Claude marketplace without a GitHub login",
|
|
682
|
+
target: targetMarketplace,
|
|
683
|
+
},
|
|
684
|
+
() => writeLocalMarketplace(litClaudeHome),
|
|
685
|
+
);
|
|
686
|
+
await progress.run(
|
|
687
|
+
{
|
|
688
|
+
number: 3,
|
|
689
|
+
title: "CLAUDE REGISTRY",
|
|
690
|
+
label: "Claude plugin and HUD enabled",
|
|
691
|
+
purpose: "Enable the plugin, statusLine HUD, and permission preference",
|
|
692
|
+
target: claudeSettingsPath(home),
|
|
693
|
+
},
|
|
694
|
+
() => registerClaudePlugin(targetPlugin, localMarketplace, home, hudAccent, permissionMode),
|
|
695
|
+
);
|
|
598
696
|
|
|
599
|
-
progress.step("Compatibility cache: refreshing local current pointer");
|
|
600
697
|
const litRoot = versionRoot(litClaudeHome);
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
698
|
+
await progress.run(
|
|
699
|
+
{
|
|
700
|
+
number: 4,
|
|
701
|
+
title: "COMPATIBILITY CACHE",
|
|
702
|
+
label: "Compatibility pointer refreshed",
|
|
703
|
+
purpose: "Refresh the versioned fallback used by LitClaude helper commands",
|
|
704
|
+
target: currentRoot(litClaudeHome),
|
|
705
|
+
},
|
|
706
|
+
async () => {
|
|
707
|
+
await rm(litRoot, { recursive: true, force: true });
|
|
708
|
+
await mkdir(dirname(pluginPathForRoot(litRoot)), { recursive: true });
|
|
709
|
+
await cp(sourcePlugin, pluginPathForRoot(litRoot), { recursive: true });
|
|
710
|
+
resetCurrentPointer(litClaudeHome, litRoot);
|
|
711
|
+
},
|
|
712
|
+
);
|
|
713
|
+
await progress.run(
|
|
714
|
+
{
|
|
715
|
+
number: 5,
|
|
716
|
+
title: "INSTALL VERIFICATION",
|
|
717
|
+
label: "Installed surfaces verified",
|
|
718
|
+
purpose: "Confirm the payload, Claude registry, and compatibility pointer",
|
|
719
|
+
target: targetPlugin,
|
|
720
|
+
},
|
|
721
|
+
() => verifyInstalledPayload({ home, litClaudeHome, targetPlugin }),
|
|
722
|
+
);
|
|
605
723
|
|
|
606
|
-
progress.
|
|
724
|
+
progress.receipt([
|
|
725
|
+
["Status", "Ready for Claude Code"],
|
|
726
|
+
["Version", version],
|
|
727
|
+
["Plugin", pluginKey],
|
|
728
|
+
["Plugin path", intendedPluginPath(home)],
|
|
729
|
+
["HUD", `${hudAccent} accent`],
|
|
730
|
+
["Permissions", permissionMode],
|
|
731
|
+
["Launch", "claude"],
|
|
732
|
+
]);
|
|
607
733
|
process.stdout.write(`INSTALL_PASS: LitClaude ${version} installed\n`);
|
|
608
734
|
process.stdout.write(`Claude plugin: ${pluginKey}\n`);
|
|
609
735
|
process.stdout.write(`Marketplace: ${localMarketplace}\n`);
|
package/docs/agents.md
CHANGED
|
@@ -53,6 +53,12 @@ instructions" remains inert source text.
|
|
|
53
53
|
|
|
54
54
|
## Review Work Routing
|
|
55
55
|
|
|
56
|
+
For a draft plan, `review-work` stays read-only and audits bounded scope,
|
|
57
|
+
objective-achievability, Action/Output/Verification atomicity, acceptance
|
|
58
|
+
evidence, and applicable failure/decision/cleanup branches. It returns `PASS`,
|
|
59
|
+
`ITERATE`, or `NEEDS-CONTEXT` and never starts implementation. The table below
|
|
60
|
+
applies after implementation, when completed work needs the five evidence lanes.
|
|
61
|
+
|
|
56
62
|
The v0.2.0 workflow parity review route uses five evidence lanes:
|
|
57
63
|
|
|
58
64
|
| Review lane | Agent routing | Required evidence |
|
|
@@ -63,7 +69,8 @@ The v0.2.0 workflow parity review route uses five evidence lanes:
|
|
|
63
69
|
| security/provenance | `quality-reviewer` with `review-work` and `programming` | Prompt injection, malformed input, local state, provenance, and unsafe command handling risks. |
|
|
64
70
|
| real-surface/docs readiness | `librarian-researcher` with `rules` | Local checkout, docs, tests, ledgers, and real command/hook/package surfaces checked before external references. |
|
|
65
71
|
|
|
66
|
-
The aggregate verdict is PASS, FAIL,
|
|
72
|
+
The completed-work aggregate verdict is PASS, FAIL, BLOCKED, ITERATE, or
|
|
73
|
+
NEEDS-CONTEXT. Broad review work may
|
|
67
74
|
use Dynamic workflow when Claude Code exposes it; isolated edits can use
|
|
68
75
|
`claude --worktree <short-name> --tmux` when a separate checkout is required.
|
|
69
76
|
|
package/docs/hooks.md
CHANGED
|
@@ -195,9 +195,11 @@ before `/lit-plan` when a request lacks non-goals, decision boundaries, or
|
|
|
195
195
|
acceptance criteria.
|
|
196
196
|
|
|
197
197
|
`/review-work` and `$review-work` load `/litclaude:review-work` /
|
|
198
|
-
`Skill(review-work)`.
|
|
199
|
-
|
|
200
|
-
|
|
198
|
+
`Skill(review-work)`. For a draft plan, that route performs a read-only
|
|
199
|
+
objective-achievability audit and returns `PASS`, `ITERATE`, or `NEEDS-CONTEXT`
|
|
200
|
+
without implementing. For completed work it runs the 5-lane review: scope/diff
|
|
201
|
+
verification, tests/evidence execution, package/payload and code quality,
|
|
202
|
+
security/provenance, and real-surface/docs readiness. `/litgoal` and `$litgoal` load
|
|
201
203
|
`/litclaude:litgoal` / `Skill(litgoal)` for durable local goal state and
|
|
202
204
|
the litgoal CLI.
|
|
203
205
|
|
package/docs/migration.md
CHANGED
|
@@ -111,10 +111,12 @@ Optional display setup is `claude --teammate-mode auto` or `"teammateMode":
|
|
|
111
111
|
|
|
112
112
|
The workflow parity surface is local-first and evidence-bound. It does not imply
|
|
113
113
|
that an npm publish or remote marketplace publication has happened.
|
|
114
|
-
`/review-work`, `$review-work`, and `/litclaude:review-work`
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
`/review-work`, `$review-work`, and `/litclaude:review-work` first classify the
|
|
115
|
+
input. A draft plan receives a read-only objective-achievability audit with
|
|
116
|
+
`PASS`, `ITERATE`, or `NEEDS-CONTEXT`; the route must not implement it. Completed
|
|
117
|
+
work receives the 5-lane contract: scope/diff verification, tests/evidence
|
|
118
|
+
execution, package/payload and code quality, security/provenance, and
|
|
119
|
+
real-surface/docs readiness. Applicable Manual-QA channels must
|
|
118
120
|
produce artifacts, and all spawned sessions, servers, ports, browser tabs, and
|
|
119
121
|
temp directories need a cleanup receipt before completion.
|
|
120
122
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: prometheus-planner
|
|
3
3
|
description: Creates decision-complete Claude Code work plans without product-code edits.
|
|
4
|
-
tools: Read, Grep, Glob, WebFetch, WebSearch
|
|
4
|
+
tools: Read, Grep, Glob, WebFetch, WebSearch
|
|
5
5
|
permissionMode: plan
|
|
6
6
|
skills:
|
|
7
7
|
- lit-plan
|
|
@@ -76,6 +76,11 @@ verdicts: [PASS, FAIL, BLOCKED]
|
|
|
76
76
|
|
|
77
77
|
You are Prometheus, the planning agent. Explore first, ask only preference
|
|
78
78
|
questions, and write plans with concrete acceptance criteria and QA scenarios.
|
|
79
|
+
Use adaptive detail: produce one bounded objective with explicit non-goals,
|
|
80
|
+
resolve or gate unknowns, and write each checklist item as Action, Output, and
|
|
81
|
+
binary Verification. Add decision branches and SDD-like evidence gates only
|
|
82
|
+
when risk or uncertainty warrants them; do not add checklist padding. End every
|
|
83
|
+
plan with a replayable DoneClaim.
|
|
79
84
|
This is a planning-only role: must not implement product changes, do not run
|
|
80
85
|
mutating commands, and do not start execution. After approval, hand off through
|
|
81
86
|
`/start-work` or `/litclaude:start-work`.
|
|
@@ -67,7 +67,7 @@ const modeContracts = {
|
|
|
67
67
|
"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.",
|
|
68
68
|
"lit-recap": "Mode contract: lit-recap is a READ-ONLY session recap. Do not mutate anything: no ledger writes, no run-state dispatch, no file creation, and no mutating litgoal subcommands (create-goals, record-evidence, checkpoint, steer, record-review-blockers, native-worker). Read durable state and current-session context, then report.",
|
|
69
69
|
"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.",
|
|
70
|
-
"review-work": "Mode contract: review-work
|
|
70
|
+
"review-work": "Mode contract: review-work selects the mode from the reviewed artifact. A draft plan uses planning-only plan review, returns PASS | ITERATE | NEEDS-CONTEXT, and must not implement. Completed work uses the five-lane review: goal/constraints, real-surface QA, code quality, security, and docs/package/context readiness; PASS requires evidence from every applicable lane.",
|
|
71
71
|
litresearch: "Mode contract: litresearch uses sourced evidence, separates verified facts from hypotheses, keeps a route trace for search/query lanes, cites the search/runtime surface used, and reports residual uncertainty. If the user asks for read-only or no-write research, ask before writing local journal files and use transcript-only tracking unless they approve disk writes.",
|
|
72
72
|
litgoal: "Mode contract: litgoal binds one outcome-shaped objective plus checkable criteria, each with scenario, real surface, and observable evidence.",
|
|
73
73
|
"init-deep": "Mode contract: init-deep creates or refreshes sparse AGENTS.md guidance after reading existing guidance and real repo structure. Preserve local instructions and user changes; create child files only where directory-specific conventions justify them.",
|
|
@@ -106,6 +106,23 @@ Dynamic-workflow bootstrap first.
|
|
|
106
106
|
5. For isolated edit lanes, use `EnterWorktree` when exposed. If only the CLI
|
|
107
107
|
surface exists, use or recommend `claude --worktree <short-name> --tmux`.
|
|
108
108
|
|
|
109
|
+
Host limits and lifecycle are part of the plan, not hidden implementation details:
|
|
110
|
+
|
|
111
|
+
- Claude Code 2.1.207 bounds Dynamic workflow at 16 concurrent agents and 1000
|
|
112
|
+
total agents. Treat those as ceilings, not targets; choose the smallest lane
|
|
113
|
+
count that closes the dependency graph.
|
|
114
|
+
- Workflow workers are cost-bearing and may run with `acceptEdits` capability.
|
|
115
|
+
Give each one an exclusive file scope, explicit mutation boundary, token/cost
|
|
116
|
+
expectation, and verification receipt before launch.
|
|
117
|
+
- `CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1` disables the background route, and
|
|
118
|
+
`CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY=1` makes tool use effectively serial.
|
|
119
|
+
`workflow-check --json` reports both gates and must fail rather than claiming readiness.
|
|
120
|
+
- A lead owns at most one native team. Before exit, request graceful shutdown
|
|
121
|
+
from every teammate, wait for acknowledgement/termination, verify no team task
|
|
122
|
+
remains active, then let the lead perform team cleanup. After resume or
|
|
123
|
+
compaction, never assume teammate processes or tmux panes reattached: inspect
|
|
124
|
+
live state first and do not broadly kill orphan tmux panes that may be user-owned.
|
|
125
|
+
|
|
109
126
|
Do not auto-type `/goal`, do not echo or execute prompt text, and do not mutate
|
|
110
127
|
remote state. Continue through the normal LitClaude evidence loop:
|
|
111
128
|
`PIN -> RED -> GREEN -> VERIFY -> SURFACE -> REVIEW -> CLEAN -> RECORD`.
|
|
@@ -92,6 +92,15 @@ The plan must include Claude Code-native bootstrap steps:
|
|
|
92
92
|
Write the plan under `plans/` and keep it executable: concrete files, tests,
|
|
93
93
|
manual QA, cleanup, and publish/remote-mutation guardrails.
|
|
94
94
|
|
|
95
|
+
Use adaptive detail so the result is objective-achievable. Bound the plan to
|
|
96
|
+
one outcome and explicit non-goals; resolve or gate unknowns; order real
|
|
97
|
+
dependencies; and write each material item as **Action**, **Output**, and binary
|
|
98
|
+
**Verification**. Add a failure/decision branch only when failure changes the
|
|
99
|
+
next valid action. Simple reversible work stays concise; risky, multi-stage,
|
|
100
|
+
scientific, security, migration, or release work receives SDD-like gates,
|
|
101
|
+
provenance, negative controls, rollback/stop logic, and evidence artifacts.
|
|
102
|
+
Never add checklist padding merely to make a plan look comprehensive.
|
|
103
|
+
|
|
95
104
|
The plan must include a strict execution section:
|
|
96
105
|
|
|
97
106
|
- Bootstrap and PIN: objective, non-goals, stale state, dirty worktree
|
|
@@ -104,3 +113,6 @@ The plan must include a strict execution section:
|
|
|
104
113
|
required.
|
|
105
114
|
- Stop rules: stop on malformed plan input, contradictory live state,
|
|
106
115
|
unapproved remote mutation, missing artifacts, or repeated identical failure.
|
|
116
|
+
- DoneClaim: exact outputs, commands, surface evidence, final decision branch,
|
|
117
|
+
scope fidelity, cleanup receipt, and release-action receipt required before
|
|
118
|
+
`/start-work` may claim completion.
|
|
@@ -13,7 +13,7 @@ host_event: Claude Code command router
|
|
|
13
13
|
owner: LitClaude
|
|
14
14
|
route_namespace: /litclaude:*
|
|
15
15
|
required_reader_action: Load this command, then the named Skill or agent guidance before ordinary execution.
|
|
16
|
-
verdicts: [PASS, FAIL, BLOCKED]
|
|
16
|
+
verdicts: [PASS, FAIL, BLOCKED, ITERATE, NEEDS-CONTEXT]
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
| Contract field | LLM obligation | Evidence |
|
|
@@ -48,7 +48,8 @@ verdicts: [PASS, FAIL, BLOCKED]
|
|
|
48
48
|
|
|
49
49
|
- A command-result narrative that names the route and the active LitClaude discipline.
|
|
50
50
|
- A plan, review, recap, research answer, goal update, or execution handoff matching the command purpose.
|
|
51
|
-
- `PASS`, `
|
|
51
|
+
- `PASS`, `ITERATE`, or `NEEDS-CONTEXT` for plan review; `PASS`, `FAIL`, or
|
|
52
|
+
`BLOCKED:` for completed-work readiness.
|
|
52
53
|
|
|
53
54
|
## #contract.evidence
|
|
54
55
|
|
|
@@ -71,6 +72,17 @@ verdicts: [PASS, FAIL, BLOCKED]
|
|
|
71
72
|
|
|
72
73
|
Use the `review-work` skill for the user's current scope or command arguments.
|
|
73
74
|
|
|
75
|
+
First select the artifact mode:
|
|
76
|
+
|
|
77
|
+
- **plan-review mode** for a draft plan, planning brief, or request to make a
|
|
78
|
+
checklist objective-achievable. Audit scope, objective achievability,
|
|
79
|
+
checklist atomicity, acceptance/evidence, and decision/failure/cleanup gates.
|
|
80
|
+
Return `PASS | ITERATE | NEEDS-CONTEXT`; revise only when needed and only the
|
|
81
|
+
deficient sections. This mode must not implement, run the plan, edit product
|
|
82
|
+
files, or mark checklist items complete.
|
|
83
|
+
- **completed-work mode** for a diff, implementation, DoneClaim, or release
|
|
84
|
+
readiness claim. Run the existing 5-lane contract below.
|
|
85
|
+
|
|
74
86
|
Run the 5-lane review contract: scope/diff verification, tests/evidence
|
|
75
87
|
execution, package/payload and code quality review, security/provenance review,
|
|
76
88
|
and real-surface/docs readiness.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
1
|
+
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
2
2
|
import { spawnSync } from "node:child_process";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
|
|
@@ -6,11 +6,12 @@ const includesAll = (text, terms) => terms.every((term) => text.includes(term));
|
|
|
6
6
|
|
|
7
7
|
const readText = (path) => readFileSync(path, "utf8");
|
|
8
8
|
|
|
9
|
-
const runHookProbe = (root) => {
|
|
9
|
+
const runHookProbe = (root, env) => {
|
|
10
10
|
const hookPath = join(root, "plugins", "litclaude", "bin", "litclaude-hook.js");
|
|
11
11
|
const result = spawnSync(process.execPath, [hookPath, "user-prompt-submit"], {
|
|
12
12
|
cwd: root,
|
|
13
13
|
encoding: "utf8",
|
|
14
|
+
env,
|
|
14
15
|
input: JSON.stringify({
|
|
15
16
|
hook_event_name: "UserPromptSubmit",
|
|
16
17
|
prompt: "$dynamic-workflow verify delegation",
|
|
@@ -25,11 +26,85 @@ const runHookProbe = (root) => {
|
|
|
25
26
|
}
|
|
26
27
|
};
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
const envFlag = (env, name) => String(env[name] ?? "").trim() === "1";
|
|
30
|
+
|
|
31
|
+
const hostSettingsCapability = (root, env) => {
|
|
32
|
+
const home = String(env.HOME ?? "").trim();
|
|
33
|
+
const configDir = String(env.CLAUDE_CONFIG_DIR ?? env.CLAUDE_HOME ?? (home ? join(home, ".claude") : "")).trim();
|
|
34
|
+
const managedRoots = [
|
|
35
|
+
"/Library/Application Support/ClaudeCode",
|
|
36
|
+
"/etc/claude-code",
|
|
37
|
+
String(env.LITCLAUDE_TEST_MANAGED_SETTINGS_ROOT ?? "").trim(),
|
|
38
|
+
].filter((path, index, paths) => path && paths.indexOf(path) === index);
|
|
39
|
+
let managedDirectoryError = null;
|
|
40
|
+
const managedCandidates = managedRoots.flatMap((managedRoot) => {
|
|
41
|
+
const directory = join(managedRoot, "managed-settings.d");
|
|
42
|
+
let fragments = [];
|
|
43
|
+
try {
|
|
44
|
+
fragments = existsSync(directory)
|
|
45
|
+
? readdirSync(directory)
|
|
46
|
+
.filter((name) => name.endsWith(".json"))
|
|
47
|
+
.sort()
|
|
48
|
+
.map((name) => join(directory, name))
|
|
49
|
+
: [];
|
|
50
|
+
} catch {
|
|
51
|
+
managedDirectoryError = directory;
|
|
52
|
+
}
|
|
53
|
+
return [join(managedRoot, "managed-settings.json"), ...fragments];
|
|
54
|
+
});
|
|
55
|
+
const candidates = [
|
|
56
|
+
...managedCandidates,
|
|
57
|
+
configDir ? join(configDir, "settings.json") : "",
|
|
58
|
+
configDir ? join(configDir, "settings.local.json") : "",
|
|
59
|
+
join(root, ".claude", "settings.json"),
|
|
60
|
+
join(root, ".claude", "settings.local.json"),
|
|
61
|
+
].filter((path, index, paths) => path && paths.indexOf(path) === index);
|
|
62
|
+
const sources = [];
|
|
63
|
+
const gates = new Set();
|
|
64
|
+
if (managedDirectoryError !== null) {
|
|
65
|
+
return { status: "unreadable", sources: [managedDirectoryError], gates: [], reason: "managed-directory-unreadable" };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
for (const path of candidates) {
|
|
69
|
+
if (!existsSync(path)) continue;
|
|
70
|
+
sources.push(path);
|
|
71
|
+
let settings;
|
|
72
|
+
try {
|
|
73
|
+
settings = JSON.parse(readText(path));
|
|
74
|
+
} catch {
|
|
75
|
+
return { status: "unreadable", sources, gates: [], reason: "malformed-json" };
|
|
76
|
+
}
|
|
77
|
+
if (!settings || typeof settings !== "object" || Array.isArray(settings)) {
|
|
78
|
+
return { status: "unreadable", sources, gates: [], reason: "invalid-json-shape" };
|
|
79
|
+
}
|
|
80
|
+
if (settings.disableWorkflows === true) gates.add("disableWorkflows");
|
|
81
|
+
if (settings.enableWorkflows === false) gates.add("enableWorkflows");
|
|
82
|
+
if (settings.disableAgentView === true) gates.add("disableAgentView");
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return { status: "readable", sources, gates: [...gates], reason: null };
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const concurrencyCapability = (env) => {
|
|
89
|
+
const raw = String(env.CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY ?? "").trim();
|
|
90
|
+
if (!raw) return { status: "host-default", source: "Claude Code default", limit: null };
|
|
91
|
+
const limit = /^[1-9]\d*$/u.test(raw) ? Number(raw) : Number.NaN;
|
|
92
|
+
return Number.isInteger(limit) && limit > 1
|
|
93
|
+
? { status: "configured", source: "CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY", limit }
|
|
94
|
+
: { status: "unavailable", source: "CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY", limit: Number.isInteger(limit) ? limit : null };
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export const createWorkflowCheckReport = (root, version, env = process.env) => {
|
|
29
98
|
const commandPath = join(root, "plugins", "litclaude", "commands", "dynamic-workflow.md");
|
|
30
99
|
const agentsPath = join(root, "docs", "agents.md");
|
|
31
100
|
const skillsRoot = join(root, "plugins", "litclaude", "skills");
|
|
32
|
-
|
|
101
|
+
const hookContext = runHookProbe(root, env);
|
|
102
|
+
const toolConcurrency = concurrencyCapability(env);
|
|
103
|
+
const hostSettings = hostSettingsCapability(root, env);
|
|
104
|
+
const settingsDisableWorkflows = hostSettings.gates.some((gate) => gate === "disableWorkflows" || gate === "enableWorkflows");
|
|
105
|
+
const settingsDisableAgentView = hostSettings.gates.includes("disableAgentView");
|
|
106
|
+
const workflowsEnabled = hostSettings.status === "readable" && !envFlag(env, "CLAUDE_CODE_DISABLE_WORKFLOWS") && !settingsDisableWorkflows;
|
|
107
|
+
const backgroundTasksEnabled = hostSettings.status === "readable" && !envFlag(env, "CLAUDE_CODE_DISABLE_BACKGROUND_TASKS") && !settingsDisableAgentView;
|
|
33
108
|
const commandText = existsSync(commandPath) ? readText(commandPath) : "";
|
|
34
109
|
const agentsText = existsSync(agentsPath) ? readText(agentsPath) : "";
|
|
35
110
|
const orchestrationSkillText = ["lit-loop", "lit-plan", "start-work", "review-work"]
|
|
@@ -41,6 +116,10 @@ export const createWorkflowCheckReport = (root, version) => {
|
|
|
41
116
|
const reliabilityTerms = ["TASK:", "DELIVERABLE", "SCOPE", "VERIFY", "short wait", "missing deliverable", "BLOCKED:"];
|
|
42
117
|
|
|
43
118
|
const checks = {
|
|
119
|
+
hostSettingsReadable: hostSettings.status === "readable",
|
|
120
|
+
hostWorkflowsEnabled: workflowsEnabled,
|
|
121
|
+
backgroundTasksEnabled,
|
|
122
|
+
toolConcurrencyAboveOne: toolConcurrency.status !== "unavailable",
|
|
44
123
|
goalGuidance: includesAll(`${hookContext}\n${commandText}`, ["get_goal", "create_goal", "update_goal", "/goal"]),
|
|
45
124
|
dynamicWorkflowGuidance: includesAll(`${hookContext}\n${commandText}`, ["Workflow", "EnterWorktree", "claude --worktree"]),
|
|
46
125
|
subagentDelegation: includesAll(`${hookContext}\n${commandText}\n${agentsText}`, [
|
|
@@ -63,6 +142,25 @@ export const createWorkflowCheckReport = (root, version) => {
|
|
|
63
142
|
status: missing.length === 0 ? "pass" : "fail",
|
|
64
143
|
version,
|
|
65
144
|
checks,
|
|
145
|
+
capabilities: {
|
|
146
|
+
hostSettings: {
|
|
147
|
+
...hostSettings,
|
|
148
|
+
remoteOrganizationPolicy: "not-locally-observable",
|
|
149
|
+
},
|
|
150
|
+
workflows: {
|
|
151
|
+
status: workflowsEnabled ? "enabled" : "unavailable",
|
|
152
|
+
source: "environment + Claude settings",
|
|
153
|
+
},
|
|
154
|
+
backgroundTasks: {
|
|
155
|
+
status: backgroundTasksEnabled ? "enabled" : "unavailable",
|
|
156
|
+
source: "environment + Claude settings",
|
|
157
|
+
},
|
|
158
|
+
toolConcurrency,
|
|
159
|
+
agentTeams: {
|
|
160
|
+
status: envFlag(env, "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS") ? "enabled" : "optional-disabled",
|
|
161
|
+
source: "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS",
|
|
162
|
+
},
|
|
163
|
+
},
|
|
66
164
|
missing,
|
|
67
165
|
};
|
|
68
166
|
};
|
|
@@ -84,7 +84,7 @@ proper execution surface.
|
|
|
84
84
|
|
|
85
85
|
Every plan must include:
|
|
86
86
|
|
|
87
|
-
- objective and non-goals
|
|
87
|
+
- one bounded objective and explicit non-goals
|
|
88
88
|
- a minimum-first guard: skip work that need not exist, reuse existing code,
|
|
89
89
|
prefer the standard library, native platform/runtime/framework features,
|
|
90
90
|
installed dependencies, or one clear line before planning custom code
|
|
@@ -101,6 +101,47 @@ Every plan must include:
|
|
|
101
101
|
- commit/push and publish guardrails
|
|
102
102
|
- handoff expectations if the plan is long-running
|
|
103
103
|
|
|
104
|
+
## Objective-Achievable Default
|
|
105
|
+
|
|
106
|
+
The default plan is a proportionate, execution-ready checklist, not a broad
|
|
107
|
+
roadmap and not a transcript of everything that could be checked. Bound the
|
|
108
|
+
plan to one outcome that a single `/start-work` run can reasonably finish. If a
|
|
109
|
+
brief combines architecture qualification, migration, production rollout, and
|
|
110
|
+
post-rollout analysis, split it at the earliest independently useful verdict
|
|
111
|
+
and list the later phases as explicit non-goals or follow-up plans.
|
|
112
|
+
|
|
113
|
+
Before finalizing, turn every material unknown into one of two states:
|
|
114
|
+
|
|
115
|
+
- resolved by read-only exploration and cited as current evidence; or
|
|
116
|
+
- gated by a named decision, input, capability, or experiment with an explicit
|
|
117
|
+
stop or branch condition.
|
|
118
|
+
|
|
119
|
+
The finished plan therefore contains resolved or gated unknowns, never implicit
|
|
120
|
+
design work deferred to the executor.
|
|
121
|
+
|
|
122
|
+
Do not leave an unknown hidden inside an implementation checkbox. Order work by
|
|
123
|
+
real dependency, and state where independent items may run together. For every
|
|
124
|
+
checklist item, name the concrete **Action**, expected **Output**, and binary
|
|
125
|
+
**Verification**. Add a failure or decision branch when failure changes the
|
|
126
|
+
next valid action; do not pretend every plan has a single happy path.
|
|
127
|
+
|
|
128
|
+
## Adaptive Checklist Depth
|
|
129
|
+
|
|
130
|
+
Use adaptive detail. Checklist depth follows uncertainty, blast radius,
|
|
131
|
+
irreversibility, and evidence cost—not a fixed number of boxes.
|
|
132
|
+
|
|
133
|
+
| Shape | Appropriate checklist |
|
|
134
|
+
| --- | --- |
|
|
135
|
+
| Simple, reversible, one-surface change | One or a few atomic items; targeted test and the directly affected surface. |
|
|
136
|
+
| Standard multi-file change | Ordered dependencies, per-deliverable acceptance, relevant regression and cleanup checks. |
|
|
137
|
+
| Risky, scientific, security-sensitive, migration, or release work | SDD-like gates, provenance, negative controls, decision table, rollback/stop branches, machine-readable evidence, and staged DoneClaim. |
|
|
138
|
+
|
|
139
|
+
Do not add checklist padding, duplicate the same acceptance statement across
|
|
140
|
+
sections, or require irrelevant Manual-QA/package/release gates. Detail is
|
|
141
|
+
useful only when it removes executor judgment, protects a boundary, or proves
|
|
142
|
+
an outcome. Conversely, do not compress a risky plan until its failure modes,
|
|
143
|
+
provenance, or decision branches disappear.
|
|
144
|
+
|
|
104
145
|
## Phase 0: Classify the Task Tier
|
|
105
146
|
|
|
106
147
|
Before any exploration, classify the brief into one of three tiers. The tier
|
|
@@ -254,8 +295,10 @@ Use this shape:
|
|
|
254
295
|
3. Bootstrap: PIN facts to reread, dirty worktree constraints, stale state
|
|
255
296
|
risks, resume ledger path, and bounded cleanup rules.
|
|
256
297
|
4. Current evidence and source references.
|
|
257
|
-
5. Execution waves
|
|
258
|
-
|
|
298
|
+
5. Execution order; add waves or a dependency matrix only when multiple items
|
|
299
|
+
can run independently or have non-obvious prerequisites.
|
|
300
|
+
6. TODOs with Action, Output, Verification, and relevant failure/decision
|
|
301
|
+
branches; add a QA scenario when the task has a user-visible surface.
|
|
259
302
|
7. TDD loop per task: `PIN -> RED -> GREEN -> VERIFY -> SURFACE -> REVIEW ->
|
|
260
303
|
CLEAN -> RECORD`.
|
|
261
304
|
8. Verification commands.
|
|
@@ -263,44 +306,51 @@ Use this shape:
|
|
|
263
306
|
|
|
264
307
|
## Success Criteria Template
|
|
265
308
|
|
|
266
|
-
Declare
|
|
267
|
-
|
|
309
|
+
Declare only the criteria needed to prove the bounded objective. A simple plan
|
|
310
|
+
may have one criterion; a risky plan may need many. Keep the machine-parseable
|
|
311
|
+
shape fixed so the executor can parse each line:
|
|
268
312
|
|
|
269
313
|
```
|
|
270
314
|
- [ ] C001 | channel: tmux | test: <path::test_id> | scenario: <user-visible outcome>
|
|
271
315
|
```
|
|
272
316
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
channel scenario
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
function at risk.
|
|
317
|
+
Each criterion names the strongest applicable evidence. Behavior changes pair
|
|
318
|
+
an automated test (written before implementation) with a relevant Manual-QA
|
|
319
|
+
channel scenario. Documentation-only or data-only work may use a structural
|
|
320
|
+
guard and scanner instead of inventing a UI scenario. "Tests pass" alone is
|
|
321
|
+
never a criterion, and evidence that cannot be falsified is not a criterion.
|
|
322
|
+
Scale happy-path, edge, negative-control, and adjacent-regression coverage to
|
|
323
|
+
the task's actual risk.
|
|
281
324
|
|
|
282
325
|
## Per-Todo Contract
|
|
283
326
|
|
|
284
327
|
For large independent work, target 5-8 todos per wave. For small work, a
|
|
285
328
|
single-task or few-task plan is correct; do not split merely to fill a wave.
|
|
286
329
|
Each todo encompasses both implementation and its test - never split them into
|
|
287
|
-
separate todos. Every todo must carry
|
|
288
|
-
|
|
289
|
-
1.
|
|
290
|
-
|
|
291
|
-
2.
|
|
292
|
-
|
|
293
|
-
3.
|
|
294
|
-
pass/fail
|
|
295
|
-
|
|
296
|
-
|
|
330
|
+
separate todos. Every todo must carry:
|
|
331
|
+
|
|
332
|
+
1. **Action**: the concrete mutation or investigation, with references at
|
|
333
|
+
`file:line` where an existing pattern governs it.
|
|
334
|
+
2. **Output**: the exact file, artifact, decision record, or user-visible state
|
|
335
|
+
produced by the action.
|
|
336
|
+
3. **Verification**: a command, assertion, or observation that resolves
|
|
337
|
+
pass/fail unambiguously.
|
|
338
|
+
4. **Failure/decision branch**: required only when a failed verification or
|
|
339
|
+
gated unknown changes the next valid action; name `STOP`, fallback, or the
|
|
340
|
+
alternative verdict explicitly.
|
|
341
|
+
5. **QA scenario**: required for user-facing behavior, using
|
|
342
|
+
`tool=<tmux|curl|browser|...> steps=<...> expected=<binary pass/fail>
|
|
343
|
+
evidence=<path>`; data-only or CLI-only behavior may name `cli`.
|
|
344
|
+
6. **Commit boundary**: state whether commit/push is approved; when approved,
|
|
345
|
+
suggest a Conventional Commit message.
|
|
297
346
|
|
|
298
347
|
Every todo that depends on another names its dependency explicitly; anything
|
|
299
348
|
without a dependency goes in Wave 1 and runs in parallel.
|
|
300
349
|
|
|
301
350
|
## Final Verification Wave
|
|
302
351
|
|
|
303
|
-
Always
|
|
352
|
+
Always end with a verification wave, but combine items for a simple plan when
|
|
353
|
+
separate boxes would be checklist padding. Preserve these four concerns:
|
|
304
354
|
|
|
305
355
|
- F1 - Plan compliance audit: every task and acceptance criterion met.
|
|
306
356
|
- F2 - Code quality and diagnostics clean, idioms match, no dead code.
|
|
@@ -462,3 +512,13 @@ is the fallback explicit? Is each verification command narrow enough to run yet
|
|
|
462
512
|
strong enough to prove the surface? Does the Must NOT list protect user state and
|
|
463
513
|
release boundaries? If any answer is weak, revise the plan rather than leaving
|
|
464
514
|
the ambiguity for the executor.
|
|
515
|
+
|
|
516
|
+
## DoneClaim
|
|
517
|
+
|
|
518
|
+
End the plan with a `DoneClaim` that defines exactly what `/start-work` must
|
|
519
|
+
return before completion can be asserted: bounded objective achieved, expected
|
|
520
|
+
outputs present, verification commands and real-surface checks passed, decision
|
|
521
|
+
branch or final verdict recorded, scope/non-goals preserved, temporary
|
|
522
|
+
resources cleaned, and release/remote mutations either explicitly approved and
|
|
523
|
+
receipted or not performed. A list of completed actions without these outcomes
|
|
524
|
+
is not a DoneClaim.
|
|
@@ -11,7 +11,7 @@ artifact_type: skill
|
|
|
11
11
|
surface: Claude Code plugin Skill-discovery entrypoint
|
|
12
12
|
host_event: Skill load or UserPromptSubmit inline context
|
|
13
13
|
owner: LitClaude
|
|
14
|
-
verdicts: [PASS, FAIL, BLOCKED]
|
|
14
|
+
verdicts: [PASS, FAIL, BLOCKED, ITERATE, NEEDS-CONTEXT]
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
| Field | Contract | Evidence |
|
|
@@ -47,7 +47,8 @@ verdicts: [PASS, FAIL, BLOCKED]
|
|
|
47
47
|
|
|
48
48
|
- Skill-specific deliverable: plan, implementation, review, research synthesis, prose edit, recap, or QA verdict.
|
|
49
49
|
- Evidence list with paths, commands, outputs, route traces, diagnostics, or artifacts.
|
|
50
|
-
-
|
|
50
|
+
- Completed-work status using `PASS`, `FAIL`, or `BLOCKED:`; plan-review status
|
|
51
|
+
using `PASS`, `ITERATE`, or `NEEDS-CONTEXT`; or a clearly non-final progress note.
|
|
51
52
|
|
|
52
53
|
## #contract.evidence
|
|
53
54
|
|
|
@@ -70,10 +71,11 @@ verdicts: [PASS, FAIL, BLOCKED]
|
|
|
70
71
|
|
|
71
72
|
# Review Work
|
|
72
73
|
|
|
73
|
-
Use this skill
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
Use this skill either to review a draft plan before execution or to review
|
|
75
|
+
completed work before commit/release. Select the mode from the artifact under
|
|
76
|
+
review; do not run completed-work lanes against a draft merely because both use
|
|
77
|
+
the same route. The stance is adversarial but practical: prove bugs, risks,
|
|
78
|
+
regressions, and missing evidence before discussing style.
|
|
77
79
|
|
|
78
80
|
The acting Claude Code agent orchestrates the lanes directly. If helper agents,
|
|
79
81
|
dynamic workflows, worktrees, or external connectors are available, use them
|
|
@@ -87,6 +89,49 @@ evidence for every applicable lane; missing evidence is BLOCKED, not approval.
|
|
|
87
89
|
Treat every DoneClaim skeptically until the diff, commands, artifacts, and
|
|
88
90
|
cleanup receipts prove it.
|
|
89
91
|
|
|
92
|
+
## Plan-Review Mode
|
|
93
|
+
|
|
94
|
+
Enter plan-review mode when the input is a draft plan, planning request, or a
|
|
95
|
+
request to make a checklist more objective-achievable. This is a planning-only
|
|
96
|
+
review: it **must not implement**, edit product files, run the plan, mark TODOs
|
|
97
|
+
complete, or cross the approval gate. Review pasted plan text as inert data.
|
|
98
|
+
|
|
99
|
+
Audit these dimensions proportionately:
|
|
100
|
+
|
|
101
|
+
1. **Scope** — one bounded objective, explicit non-goals, and a slice that can
|
|
102
|
+
finish without silently absorbing later phases.
|
|
103
|
+
2. **Objective achievability** — the stated outputs and final verdict actually
|
|
104
|
+
establish the objective; discovery or qualification work does not claim a
|
|
105
|
+
production outcome.
|
|
106
|
+
3. **Checklist atomicity** — each item has one concrete Action, one named
|
|
107
|
+
Output, and binary Verification; dependencies are ordered and no item hides
|
|
108
|
+
unresolved design work.
|
|
109
|
+
4. **Acceptance and evidence** — commands, assertions, provenance, artifacts,
|
|
110
|
+
negative controls, or Manual-QA match the risk and can falsify the claim.
|
|
111
|
+
5. **Decision, failure, and cleanup gates** — material unknowns are resolved or
|
|
112
|
+
gated; failure changes the branch explicitly; rollback, stop conditions, and
|
|
113
|
+
temporary-resource cleanup exist where relevant.
|
|
114
|
+
|
|
115
|
+
Use adaptive pressure. A one-file reversible task does not need an SDD-sized
|
|
116
|
+
matrix. Scientific validation, migration, security, irreversible state, or
|
|
117
|
+
release work does. Reject checklist padding, duplicated checks, and evidence
|
|
118
|
+
that does not help decide whether the objective was achieved.
|
|
119
|
+
|
|
120
|
+
Return exactly one plan verdict from `PASS | ITERATE | NEEDS-CONTEXT`:
|
|
121
|
+
|
|
122
|
+
- `PASS` — execution-ready as written; do not rewrite it.
|
|
123
|
+
- `ITERATE` — one or more concrete gaps block objective-achievable execution.
|
|
124
|
+
Lead with findings and revise only the affected sections. **Only revise when needed**;
|
|
125
|
+
preserve valid structure and user decisions.
|
|
126
|
+
- `NEEDS-CONTEXT` — a material preference, input, capability, or boundary
|
|
127
|
+
cannot be discovered locally. Ask only the smallest blocking question and do
|
|
128
|
+
not guess.
|
|
129
|
+
|
|
130
|
+
The plan-review output contains findings ordered by severity, a compact audit
|
|
131
|
+
table for the five dimensions, the verdict, and—only for `ITERATE`—a minimally
|
|
132
|
+
revised plan or patch. Never implement from plan-review mode. The completed-work
|
|
133
|
+
five-lane review below remains unchanged for diffs and DoneClaims.
|
|
134
|
+
|
|
90
135
|
## Subagent Assignment Contract
|
|
91
136
|
|
|
92
137
|
When review lanes run through child agents or Dynamic workflow lanes, send
|
package/scripts/doctor.mjs
CHANGED
|
@@ -24,6 +24,7 @@ function run(label, command, args) {
|
|
|
24
24
|
|
|
25
25
|
run("CLI dry-run", process.execPath, ["bin/litclaude-ai.js", "--dry-run", "doctor"]);
|
|
26
26
|
run("Plugin validation", process.execPath, ["scripts/validate-plugin.mjs"]);
|
|
27
|
+
run("Workflow readiness", process.execPath, ["bin/litclaude-ai.js", "workflow-check", "--json"]);
|
|
27
28
|
run("LSP doctor", process.execPath, ["plugins/litclaude/bin/litclaude-lsp-doctor.js"]);
|
|
28
29
|
|
|
29
30
|
for (const file of [
|