@litfamily/litclaude 1.0.39 → 1.0.41
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 +36 -0
- package/README.md +8 -8
- package/README_ko-KR.md +8 -8
- package/docs/assets/readme/badge-version.svg +1 -1
- package/docs/hooks.md +35 -8
- package/package.json +1 -1
- package/plugins/litclaude/.claude-plugin/plugin.json +1 -1
- package/plugins/litclaude/bin/litclaude-hook.js +11 -2
- package/plugins/litclaude/bin/litclaude-mcp.js +1 -1
- package/plugins/litclaude/hooks/lit-band-client.mjs +1 -1
- package/plugins/litclaude/hooks/lit-mod.mjs +66 -8
- package/plugins/litclaude/lib/canonical-skill-resources.mjs +11 -11
- package/plugins/litclaude/lib/interface-probe-gate.mjs +4 -5
- package/plugins/litclaude/lib/lit-plan-persistence.mjs +4 -5
- package/plugins/litclaude/lib/litgoal/autoloop.mjs +4 -5
- package/plugins/litclaude/lib/litgoal/cli.mjs +4 -5
- package/plugins/litclaude/lib/litgoal/ledger.mjs +4 -5
- package/plugins/litclaude/lib/litgoal/state.mjs +4 -6
- package/plugins/litclaude/lib/mod/frame.mjs +47 -28
- package/plugins/litclaude/lib/mod/looks.mjs +36 -0
- package/plugins/litclaude/lib/mod/motion.mjs +2 -3
- package/plugins/litclaude/lib/mod/state.mjs +6 -3
- package/plugins/litclaude/lib/mod/svg-card.mjs +4 -1
- package/plugins/litclaude/lib/mod/timeline.mjs +3 -3
- package/plugins/litclaude/lib/mod/view.mjs +80 -11
- package/plugins/litclaude/lib/mod/workflow.mjs +2 -0
- package/plugins/litclaude/lib/motion-render-gate.mjs +4 -5
- package/plugins/litclaude/lib/project-state-root.mjs +44 -2
- package/plugins/litclaude/lib/rewind/brief.mjs +5 -2
- package/plugins/litclaude/lib/rewind/collect.mjs +16 -12
- package/plugins/litclaude/lib/rewind/next-step.mjs +4 -5
- package/plugins/litclaude/lib/rewind/redact.mjs +28 -8
- package/plugins/litclaude/lib/rewind/suggest.mjs +9 -4
- package/plugins/litclaude/lib/rewind/transcripts.mjs +4 -4
- package/plugins/litclaude/lib/start-work-lifecycle.mjs +6 -9
- package/plugins/litclaude/lib/workflow-stack.mjs +4 -5
- package/plugins/litclaude/lib/workflow-stage.mjs +104 -22
- package/plugins/litclaude/skills/lit-hijack/references/capture-and-provenance.md +8 -0
- package/plugins/litclaude/skills/lit-hijack/references/distil-and-licence.md +5 -0
- package/plugins/litclaude/skills/lit-hijack/scripts/hijack.mjs +115 -15
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/assets.mjs +110 -15
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage-serve.mjs +13 -3
- package/plugins/litclaude/skills/lit-typographic-motion/references/treatment.md +10 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.41 - 2026-10-27
|
|
4
|
+
|
|
5
|
+
- The LIT card now changes its look with the work. lit-adhd and lit-rewind draw the rainbow rewind
|
|
6
|
+
look whichever way you start them (bare `lit adhd`, `/lit-adhd`, `/litclaude:lit-adhd` or the
|
|
7
|
+
Skill tool). review-work splits the border into its five lanes with a `REVIEW n/5` count, each
|
|
8
|
+
lane turning its own colour on a pass and red on a fail. When Claude is waiting on you the border
|
|
9
|
+
breathes amber with `YOUR TURN`, and it settles back after your first keystroke. A finished plan,
|
|
10
|
+
goal, five-lane review or real publish plays one short ember burst. The looks never flash more
|
|
11
|
+
than three times a second, hold their width, stay still with motion off, and draw plain text
|
|
12
|
+
under `NO_COLOR`.
|
|
13
|
+
- Background review lanes now report back. Their verdicts are read from each lane's final report,
|
|
14
|
+
lanes that finish at the same moment no longer overwrite each other, and the review look stays
|
|
15
|
+
on while a lane is still running, even in a later turn.
|
|
16
|
+
- Teammates that are done and waiting for their next message show as `idle`, no longer as
|
|
17
|
+
`blocked` with a "quiet for … wake it?" warning.
|
|
18
|
+
- After `/exit` or `/clear`, the ended session no longer lingers on the next session's card.
|
|
19
|
+
- Fixed a card the host refused to draw when a skill fired before the session had started.
|
|
20
|
+
- Security: lit-hijack captures and lit-typographic-motion asset fetches now connect to the exact
|
|
21
|
+
address the redirect check approved, so a name cannot resolve to a private address between the
|
|
22
|
+
check and the connection.
|
|
23
|
+
|
|
24
|
+
## 1.0.40 - 2026-10-26
|
|
25
|
+
|
|
26
|
+
- Security: LitClaude never writes its state files through a symlink. A cloned repository can carry
|
|
27
|
+
a linked `.litclaude` folder, subfolder or state file; the write is now refused instead of landing
|
|
28
|
+
on whatever file the link points at.
|
|
29
|
+
- Security: lit-hijack captures and lit-typographic-motion asset fetches check every redirect hop,
|
|
30
|
+
refuse localhost and loopback, link-local and private addresses (and names that resolve to them),
|
|
31
|
+
and stop reading a body once it passes the size cap, whatever length the server declares.
|
|
32
|
+
- lit-hijack now fetches `https` only; capture an `http://` page from a saved copy with
|
|
33
|
+
`--kind file --url <url>`. A reuse prohibition on any line of a source now pauses for review.
|
|
34
|
+
- The lit-adhd brief redacts before it clips, catches more secret shapes (webhook URLs, URL-form
|
|
35
|
+
environment values, JSON `"api_token": "…"` pairs, keys split by invisible characters), strips
|
|
36
|
+
terminal control characters from commit subjects and plan rows, and shows only this folder's
|
|
37
|
+
sessions when another folder shares its Claude project name.
|
|
38
|
+
|
|
3
39
|
## 1.0.39 - 2026-10-26
|
|
4
40
|
|
|
5
41
|
- No question-mark progress anywhere: a gauge is drawn only when both numbers are known. A thread
|
package/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
1
|
+
<p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/docs/assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/docs/assets/cover-motion.webp" width="100%" alt="LitFamily motion cover: seven armored robots power on one by one, the LitClaude robot wakes with glowing eyes and a lit frame, then LITFAMILY and KEEP THE WORK LIT. light up." /></picture></p>
|
|
2
2
|
|
|
3
3
|
<h1 align="center">LitClaude</h1>
|
|
4
4
|
<p align="center"><strong>Keep the work lit.</strong></p>
|
|
5
5
|
<p align="center">A Claude Code plugin that helps every session plan the work, build it, check it, and leave a note the next session can pick up.</p>
|
|
6
6
|
<p align="center">
|
|
7
|
-
<img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
8
|
-
<a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
7
|
+
<img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/docs/assets/readme/badge-version.svg" alt="1.0.41" />
|
|
8
|
+
<a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/docs/assets/readme/badge-license.svg" alt="MIT license" /></a>
|
|
9
9
|
</p>
|
|
10
10
|
<p align="center">
|
|
11
|
-
<a href="https://github.com/wjgoarxiv/litclaude#readme">Full guide and skills gallery on GitHub</a> · <a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
11
|
+
<a href="https://github.com/wjgoarxiv/litclaude#readme">Full guide and skills gallery on GitHub</a> · <a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/README_ko-KR.md">한국어</a>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
14
|
Add `lit` to a Claude Code prompt and Claude pins the goal, writes a failing test first,
|
|
@@ -77,7 +77,7 @@ the `/plugin` menu.
|
|
|
77
77
|
## More
|
|
78
78
|
|
|
79
79
|
- [Full guide and skills gallery on GitHub](https://github.com/wjgoarxiv/litclaude#readme)
|
|
80
|
-
- [Privacy and network behavior](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
81
|
-
- [Migration and ownership conflicts](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
82
|
-
- [Release history](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
83
|
-
- [MIT license](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
80
|
+
- [Privacy and network behavior](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/docs/privacy.md)
|
|
81
|
+
- [Migration and ownership conflicts](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/docs/migration.md)
|
|
82
|
+
- [Release history](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/CHANGELOG.md)
|
|
83
|
+
- [MIT license](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/LICENSE)
|
package/README_ko-KR.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
1
|
+
<p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/docs/assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/docs/assets/cover-motion.webp" width="100%" alt="LitFamily 모션 커버: 일곱 로봇 패널이 차례로 켜지고, LitClaude 로봇의 눈과 테두리가 빛난 뒤 LITFAMILY와 KEEP THE WORK LIT. 문구가 밝아지는 영상" /></picture></p>
|
|
2
2
|
|
|
3
3
|
<h1 align="center">LitClaude</h1>
|
|
4
4
|
<p align="center"><strong>Keep the work lit.</strong></p>
|
|
5
5
|
<p align="center">Claude Code에서 세션마다 계획하고, 만들고, 확인한 뒤 다음 세션이 이어받을 기록을 남기게 돕는 플러그인입니다.</p>
|
|
6
6
|
<p align="center">
|
|
7
|
-
<img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
8
|
-
<a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
7
|
+
<img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/docs/assets/readme/badge-version.svg" alt="1.0.41" />
|
|
8
|
+
<a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/docs/assets/readme/badge-license.svg" alt="MIT license" /></a>
|
|
9
9
|
</p>
|
|
10
10
|
<p align="center">
|
|
11
|
-
<a href="https://github.com/wjgoarxiv/litclaude/blob/main/README_ko-KR.md">전체 안내와 스킬 갤러리는 GitHub에서</a> · <a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
11
|
+
<a href="https://github.com/wjgoarxiv/litclaude/blob/main/README_ko-KR.md">전체 안내와 스킬 갤러리는 GitHub에서</a> · <a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/README.md">English</a>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
14
|
Claude Code 프롬프트에 `lit`을 붙이면 Claude가 목표를 고정하고, 실패하는 테스트를 먼저 쓰고,
|
|
@@ -75,7 +75,7 @@ npx @litfamily/litclaude@latest uninstall
|
|
|
75
75
|
## 더 보기
|
|
76
76
|
|
|
77
77
|
- [전체 안내와 스킬 갤러리 (GitHub)](https://github.com/wjgoarxiv/litclaude/blob/main/README_ko-KR.md)
|
|
78
|
-
- [개인정보와 네트워크 동작](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
79
|
-
- [이전과 소유권 충돌](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
80
|
-
- [변경 이력](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
81
|
-
- [MIT 라이선스](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
78
|
+
- [개인정보와 네트워크 동작](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/docs/privacy.md)
|
|
79
|
+
- [이전과 소유권 충돌](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/docs/migration.md)
|
|
80
|
+
- [변경 이력](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/CHANGELOG.md)
|
|
81
|
+
- [MIT 라이선스](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.41/LICENSE)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="146" height="20" role="img" aria-label="release: 1.0.
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="146" height="20" role="img" aria-label="release: 1.0.41"><title>release: 1.0.41</title><g shape-rendering="crispEdges"><rect width="49" height="20" fill="#080d14"/><rect x="49" width="97" height="20" fill="#ff6337"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text x="255" y="140" textLength="390" transform="scale(.1)">release</text><text x="965" y="140" textLength="870" transform="scale(.1)" fill="#080D14">1.0.41</text></g></svg>
|
package/docs/hooks.md
CHANGED
|
@@ -38,7 +38,7 @@ verdicts: [PASS, FAIL, BLOCKED]
|
|
|
38
38
|
| `PostToolUse` | conditional post-edit routing, dynamic rule injection, and document humanizer check | Names only the checks the edit earned and only the rules whose globs matched. It rechecks successfully created DOCX/PPTX/PDF files when a supported tool or successful Bash output supplies a path; findings ask for revision without claiming rollback or completion. |
|
|
39
39
|
| `Stop` | lit-plan and interface-probe gates, start-work continuation, then litgoal autoloop gate | Root-session and progress-bound; no unbounded loop. |
|
|
40
40
|
| `SubagentStart` / `SubagentStop` | lane identity observation | Records the root session, child lane, and Claude-owned worktree without emitting child continuation. |
|
|
41
|
-
| `SessionEnd` | root-session receipt | Records the observed end and emits no continuation. |
|
|
41
|
+
| `SessionEnd` | root-session receipt | Records the observed end, marks the session's workflow stack `endedAt` so other sessions' cards drop its row, and emits no continuation. |
|
|
42
42
|
|
|
43
43
|
## #contract.procedure
|
|
44
44
|
|
|
@@ -341,7 +341,7 @@ requests are muted grey pills.
|
|
|
341
341
|
fresh session) keeps the old `PLAN ━━ WORK ━━ REVIEW` track there.
|
|
342
342
|
- When more than one thread is live (the session's stack frames, its running subagents, its
|
|
343
343
|
background shells and monitors, and another session of this project whose stack moved in the
|
|
344
|
-
last 15 minutes), rows under the detail row list them, one each: name, stage, a `[▉▉░░] k/n`
|
|
344
|
+
last 15 minutes and whose SessionEnd has not marked it ended), rows under the detail row list them, one each: name, stage, a `[▉▉░░] k/n`
|
|
345
345
|
gauge and `running`, `paused`, `blocked`, `idle` (a teammate waiting for a message) or
|
|
346
346
|
`done`. A child hangs under its paused parent with `└─`, parallel lanes and tasks sit under a fork line (`┬ 3 lanes in parallel`,
|
|
347
347
|
`┬ 2 lanes · 1 task in parallel`) with `├─`/`└─`, a background task is marked `$` (shell) or
|
|
@@ -384,9 +384,14 @@ requests are muted grey pills.
|
|
|
384
384
|
start-work plan is edited (`work 1/2`), and steps a lit-loop criterion to RED when a test
|
|
385
385
|
file is written, GREEN when the code changes after it, VERIFY when the tests run and RECORD
|
|
386
386
|
when `litgoal record-evidence` runs. For review-work, PreToolUse marks a lane running when a
|
|
387
|
-
prompt titled `Review lane: <lane>.` is spawned,
|
|
388
|
-
|
|
389
|
-
|
|
387
|
+
prompt titled `Review lane: <lane>.` is spawned (or, at the review stage, when the Agent
|
|
388
|
+
description names a lane), and the lane's `verdict:` line, read by PostToolUse for a
|
|
389
|
+
foreground reviewer and by SubagentStop for a background one, marks it passed or failed. A
|
|
390
|
+
background lane ends with no last message at SubagentStop, so the hook reads its verdict from
|
|
391
|
+
the `SubagentHandback` call at the end of its transcript (re-reading for up to 3 s, since the
|
|
392
|
+
host can flush that entry just after the stop), and takes the lane from the prompt's first
|
|
393
|
+
line when the prompt has no `Review lane:` title and that lane is already marked. Each stack
|
|
394
|
+
move holds the stack's lock, so lanes that stop together keep every verdict. The card names the lanes `goal`, `quality`, `security`, `qa` and `context`
|
|
390
395
|
(review-work's scope/diff, package/payload, security/provenance, tests/evidence and
|
|
391
396
|
real-surface/docs lanes); five passes finish the review. The hooks keep only the stage, the
|
|
392
397
|
lane, the counts and a project-relative plan name, never another path, a command or a prompt. The model can still refine the top frame
|
|
@@ -413,12 +418,15 @@ requests are muted grey pills.
|
|
|
413
418
|
auto-handoff fired. The completion moment takes it when the last task is checked, the work
|
|
414
419
|
completes or the goal is met: a light passes over the brand, embers scatter, and `COMPLETE`
|
|
415
420
|
shows for about a second.
|
|
416
|
-
- Amber or red when something needs attention: a lane quiet for more
|
|
417
|
-
border amber and puts `⚠ <lane> quiet for
|
|
421
|
+
- Amber or red when something needs attention: a running, pending or waiting lane quiet for more
|
|
422
|
+
than 10 minutes turns the border amber, draws its row `! … blocked` and puts `⚠ <lane> quiet for
|
|
423
|
+
12m` on the bottom edge. A teammate the host lists as idle has finished its turn and waits for a
|
|
424
|
+
message, so it is never called quiet: its row reads `- <name> ━━━━━ idle · 3 steps · last:
|
|
425
|
+
SendMessage`, dim, with a still pulse and no clock. A failed interface probe
|
|
418
426
|
turns it red. Otherwise the border is a calm, dim accent while idle and the full accent while
|
|
419
427
|
LIT is active, a step above the accent and breathing brighter toward white every 2.4 s.
|
|
420
428
|
- Running lanes show on the map row's right as a dot each, the count and the longest lane's clock
|
|
421
|
-
(`●● 2 lanes 1:07`). While they run a light walks across the dots (they breathe under
|
|
429
|
+
(`●● 2 lanes 1:07`); an idle teammate's dot is dim and adds no time to the clock. While they run a light walks across the dots (they breathe under
|
|
422
430
|
`subtle`), so the card moves while the main turn waits for them.
|
|
423
431
|
|
|
424
432
|
A toast in the top-right corner says when the LIT status really changes: a discipline starts or
|
|
@@ -502,6 +510,25 @@ purpose: Claude Code 2.1.270 and older refuse to load a plugin whose `userConfig
|
|
|
502
510
|
that would take every LitClaude hook down with it. Nerd glyphs reach only the terminal; the
|
|
503
511
|
desktop app and the other surfaces always get the basic set.
|
|
504
512
|
|
|
513
|
+
The card takes one of four looks (`lib/mod/looks.mjs`), checked in this order. **done**: when a
|
|
514
|
+
plan's tasks are all checked, a litgoal goal is met, review-work's five lanes have all passed, or a
|
|
515
|
+
main-loop `npm publish` (not `--dry-run`) succeeds, the chips row plays one 1.2 s spray of rainbow
|
|
516
|
+
embers and `DONE ✓`, then settles; it never loops. **YOUR TURN**: while the session waits on you
|
|
517
|
+
(the last answer's final paragraph ends in a question mark, a line reports `BLOCKED:`, an
|
|
518
|
+
`AskUserQuestion` is on screen, or a start-work boundary is open), the border breathes amber over
|
|
519
|
+
2.4 s and the corner reads `YOUR TURN`; the first key you type, a recalled or undone draft, or the
|
|
520
|
+
next turn ends it. **review**: while review-work runs (`lit review`, `/review-work`,
|
|
521
|
+
`/litclaude:review-work` or the Skill tool), the top and bottom rules split into its five lanes in
|
|
522
|
+
the map's order (goal, quality, security, qa, context): a lane is dim until its reviewer reports,
|
|
523
|
+
a darker shade of its colour while it runs, its own colour once it passes and red once it fails,
|
|
524
|
+
and the corner counts the lanes that reported (`REVIEW 2/5`). The look holds into later turns
|
|
525
|
+
while a lane is still running, since background lanes report in the turns their notifications
|
|
526
|
+
start. **rewind**: lit-adhd and lit-rewind
|
|
527
|
+
by any route, as above. No look flips more than a quarter of the card's brightness more than three
|
|
528
|
+
times a second; with `motion` off or reduced motion each look is one still frame, and with
|
|
529
|
+
`NO_COLOR` set the card keeps its labels and draws no colour (basic glyphs, no motion). The desktop
|
|
530
|
+
drawing shows the labels of these looks, not the lane segments or the embers.
|
|
531
|
+
|
|
505
532
|
The icons on `nerd` (the rounded pill caps U+E0B6 and U+E0B4, the chip bolt and the branch mark)
|
|
506
533
|
come from a Nerd Font. `litclaude-ai install
|
|
507
534
|
--icon-font`, or a Yes to the install question (default No), adds the symbols-only Nerd Font,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@litfamily/litclaude",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.41",
|
|
4
4
|
"description": "Claude Code plugin: add lit to a prompt and Claude plans, tests, checks and reviews the work, then leaves a handoff for the next session.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,7 +10,7 @@ import { clearActivation, hasActivated, readActivation, recordActivation } from
|
|
|
10
10
|
import { parsePlanTaskRows } from "../lib/plan-task-rows.mjs";
|
|
11
11
|
import { DISCIPLINE_ENTRY } from "../lib/mod/workflow.mjs";
|
|
12
12
|
import { stackPath } from "../lib/workflow-stack.mjs";
|
|
13
|
-
import { continueWorkflowStack, observeWorkflowPostTool, observeWorkflowPreTool, observeWorkflowSubagentStop, planRefOf, startWorkflowStage } from "../lib/workflow-stage.mjs";
|
|
13
|
+
import { continueWorkflowStack, endWorkflowStack, observeWorkflowPostTool, observeWorkflowPreTool, observeWorkflowSubagentStop, planRefOf, startWorkflowStage } from "../lib/workflow-stage.mjs";
|
|
14
14
|
import { renameAliases, renameNote } from "../lib/rename-aliases.mjs";
|
|
15
15
|
import { hasInterfaceModeWord, interfaceMode } from "../lib/interface-mode.mjs";
|
|
16
16
|
import { transcriptHasContextPressure } from "../lib/context-pressure.mjs";
|
|
@@ -536,6 +536,10 @@ const isExactBareScientificVisualization = (prompt) => /^\s*lit-scientific-visua
|
|
|
536
536
|
// resolves back to the command and the adapter never loads. A prompt that starts with the typed slash
|
|
537
537
|
// command gets the same bodies as the exact-bare route; a mention later in a prompt stays inert.
|
|
538
538
|
const isTypedScientificVisualizationCommand = (prompt) => /^\s*\/litclaude:lit-scientific-visualization(?=$|\s)/u.test(prompt);
|
|
539
|
+
// The host expands a typed `/lit-adhd`, `/lit-rewind` or `/review-work` itself, so no trigger routes
|
|
540
|
+
// it, but the LIT card keys those skills' looks (lib/mod/looks.mjs) on the ignition record: the
|
|
541
|
+
// record names the typed command's discipline.
|
|
542
|
+
const typedLookCommand = (prompt) => /^\s*\/(?:litclaude:)?(lit-adhd|lit-rewind|review-work)(?=$|\s)/u.exec(prompt)?.[1] ?? null;
|
|
539
543
|
|
|
540
544
|
const handoffContext = ({ typed = false } = {}) => {
|
|
541
545
|
let canonicalBody;
|
|
@@ -1725,7 +1729,7 @@ switch (eventName) {
|
|
|
1725
1729
|
? "lit-handoff"
|
|
1726
1730
|
: exactBareScientificVisualization
|
|
1727
1731
|
? "lit-scientific-visualization"
|
|
1728
|
-
: effectiveDiscipline ??
|
|
1732
|
+
: effectiveDiscipline ?? typedLookCommand(prompt),
|
|
1729
1733
|
});
|
|
1730
1734
|
} catch {
|
|
1731
1735
|
// A HUD record is cosmetic; an unwritable home never alters the prompt hook.
|
|
@@ -2035,6 +2039,11 @@ switch (eventName) {
|
|
|
2035
2039
|
} catch {
|
|
2036
2040
|
// SessionEnd is observational and emits no continuation.
|
|
2037
2041
|
}
|
|
2042
|
+
try {
|
|
2043
|
+
endWorkflowStack(typeof input.cwd === "string" ? input.cwd : process.cwd(), input.session_id);
|
|
2044
|
+
} catch {
|
|
2045
|
+
// The ended mark only folds this session's row from other cards.
|
|
2046
|
+
}
|
|
2038
2047
|
break;
|
|
2039
2048
|
}
|
|
2040
2049
|
case "stop": {
|
|
@@ -49,6 +49,6 @@ export default function LitBand(props, surface) {
|
|
|
49
49
|
if (surface.state?.live !== holder) surface.setState({ live: holder, now: holder.now });
|
|
50
50
|
|
|
51
51
|
if (!model.visible && interval() === null) return empty();
|
|
52
|
-
const frame = composeBand(model, sampleTimeline(holder.timeline, holder.now, profile), { columns: props.columns, glyphs: props.glyphs, accent: props.accent });
|
|
52
|
+
const frame = composeBand(model, sampleTimeline(holder.timeline, holder.now, profile), { columns: props.columns, glyphs: props.glyphs, accent: props.accent, color: props.color !== false });
|
|
53
53
|
return renderBand(surface.elements, frame);
|
|
54
54
|
}
|
|
@@ -42,8 +42,11 @@ import {
|
|
|
42
42
|
noteSpawn,
|
|
43
43
|
noteSpawnActivity,
|
|
44
44
|
noteSpawnEnded,
|
|
45
|
+
releaseFinish,
|
|
45
46
|
spinnerSuffix,
|
|
46
47
|
trackAgents,
|
|
48
|
+
waitingReason,
|
|
49
|
+
workflowFinish,
|
|
47
50
|
} from "../lib/mod/view.mjs";
|
|
48
51
|
|
|
49
52
|
const PANE = "lit-evidence";
|
|
@@ -85,7 +88,9 @@ const createLive = (options) => ({
|
|
|
85
88
|
evidenceTab: "goal",
|
|
86
89
|
ledger: [],
|
|
87
90
|
celebrated: new Set(),
|
|
88
|
-
accent:
|
|
91
|
+
// The default accent until session.start reads the settings: the host refuses a Client prop
|
|
92
|
+
// that is undefined, and a skill can fire before session.start has run.
|
|
93
|
+
accent: accentFromSettings(null, undefined),
|
|
89
94
|
git: null,
|
|
90
95
|
fired: [],
|
|
91
96
|
settledAt: 0,
|
|
@@ -97,6 +102,9 @@ const createLive = (options) => ({
|
|
|
97
102
|
turnNotified: false,
|
|
98
103
|
lists: EMPTY_LISTS,
|
|
99
104
|
tasks: EMPTY_TASKS,
|
|
105
|
+
waiting: null,
|
|
106
|
+
answeredBoundary: null,
|
|
107
|
+
noColor: false,
|
|
100
108
|
});
|
|
101
109
|
|
|
102
110
|
const stateIo = ($) => ({
|
|
@@ -142,6 +150,21 @@ function drawnKey(live, model) {
|
|
|
142
150
|
: JSON.stringify(withSvg ? stillModel(model) : model))).join("\n");
|
|
143
151
|
}
|
|
144
152
|
|
|
153
|
+
// What the session waits on the user for: the last answer's question or BLOCKED report, an
|
|
154
|
+
// AskUserQuestion on screen, or a start-work boundary the user has not answered since it appeared.
|
|
155
|
+
function waitingOf(live) {
|
|
156
|
+
const boundary = live.snapshot?.work?.awaiting ?? null;
|
|
157
|
+
return live.waiting ?? (boundary && boundary !== live.answeredBoundary ? { reason: "boundary" } : null);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// The user is answering: YOUR TURN ends now, and a boundary on screen stays answered.
|
|
161
|
+
async function endWaiting($, live, redraw = true) {
|
|
162
|
+
if (!waitingOf(live)) return;
|
|
163
|
+
live.waiting = null;
|
|
164
|
+
live.answeredBoundary = live.snapshot?.work?.awaiting ?? live.answeredBoundary;
|
|
165
|
+
if (redraw) await rebuild($, live);
|
|
166
|
+
}
|
|
167
|
+
|
|
145
168
|
async function rebuild($, live) {
|
|
146
169
|
const now = await $.clock.now();
|
|
147
170
|
const previous = live.model;
|
|
@@ -161,6 +184,8 @@ async function rebuild($, live) {
|
|
|
161
184
|
step: live.step,
|
|
162
185
|
lists: live.lists,
|
|
163
186
|
tasks: live.tasks,
|
|
187
|
+
turnStartedAt: live.turnStartedAt,
|
|
188
|
+
waiting: waitingOf(live),
|
|
164
189
|
// The thread rows stay reserved while threads are live, so the card does not shrink between repaints.
|
|
165
190
|
threadReserve: previous?.threads?.reserve ?? 0,
|
|
166
191
|
});
|
|
@@ -267,7 +292,12 @@ async function refresh($, live, options) {
|
|
|
267
292
|
noteIgnition(live, fresh.ignition, now);
|
|
268
293
|
const finish = detectCompletion(before, fresh);
|
|
269
294
|
if (finish) celebrate($, live, finish, options);
|
|
270
|
-
|
|
295
|
+
let next = await rebuild($, live);
|
|
296
|
+
const reviewed = workflowFinish(previousModel, next);
|
|
297
|
+
if (reviewed) {
|
|
298
|
+
celebrate($, live, { ...reviewed, id: `${reviewed.id}:${now}` }, options);
|
|
299
|
+
next = await rebuild($, live);
|
|
300
|
+
}
|
|
271
301
|
const raised = diffNotices(before, fresh, previousModel, next);
|
|
272
302
|
if (raised.length > 0) {
|
|
273
303
|
raiseToasts($, live, raised.map(noticeEntry), now);
|
|
@@ -309,6 +339,8 @@ export const register = (on, options) => {
|
|
|
309
339
|
live.settledAt = await $.clock.now();
|
|
310
340
|
const hostSettings = await $.settings.read().catch(() => null);
|
|
311
341
|
live.accent = accentFromSettings(hostSettings, await $.env.get("LITCLAUDE_HUD_ACCENT"));
|
|
342
|
+
// NO_COLOR (no-color.org): set and not empty, the card draws no colour and does not move.
|
|
343
|
+
live.noColor = Boolean(await $.env.get("NO_COLOR"));
|
|
312
344
|
live.reducedMotion = hostSettings?.prefersReducedMotion === true;
|
|
313
345
|
live.motion = effectiveMotion(live.motion, hostSettings);
|
|
314
346
|
await $.command.register({ name: PANE, description: "Show LitClaude goal criteria, evidence, lanes and gates in a pane" });
|
|
@@ -320,6 +352,7 @@ export const register = (on, options) => {
|
|
|
320
352
|
});
|
|
321
353
|
|
|
322
354
|
on("turn.start", async ($, e, next) => {
|
|
355
|
+
if (typeof e.agentId !== "string") await endWaiting($, live, false);
|
|
323
356
|
live.isWorking = true;
|
|
324
357
|
live.mainToolCalls = 0;
|
|
325
358
|
live.turnStartedAt = await $.clock.now();
|
|
@@ -345,8 +378,11 @@ export const register = (on, options) => {
|
|
|
345
378
|
live.turnNotified = true;
|
|
346
379
|
notifyFinish($, options, `LIT turn finished · ${live.model.title ?? "LitClaude"} · ${formatDuration(took)}`);
|
|
347
380
|
}
|
|
348
|
-
// The request is over: its chips dim to the recent list until a skill fires again.
|
|
381
|
+
// The request is over: its chips dim to the recent list until a skill fires again. An answer
|
|
382
|
+
// that asks the user something or reports BLOCKED leaves the card on YOUR TURN.
|
|
349
383
|
live.settledAt = now;
|
|
384
|
+
const reason = e.isAborted ? null : waitingReason(e.answer);
|
|
385
|
+
live.waiting = reason ? { reason } : null;
|
|
350
386
|
refreshSoon($, live, options);
|
|
351
387
|
return next(e);
|
|
352
388
|
});
|
|
@@ -366,6 +402,9 @@ export const register = (on, options) => {
|
|
|
366
402
|
// The live step: the main loop's tool by name and since when, nothing else of the call.
|
|
367
403
|
const step = typeof e.agentId === "string" ? null : { name: e.tool, at: await $.clock.now() };
|
|
368
404
|
if (step) live.mainToolCalls += 1;
|
|
405
|
+
// A question to the user is on screen until its call returns.
|
|
406
|
+
const asking = step !== null && e.tool === "AskUserQuestion";
|
|
407
|
+
if (asking) live.waiting = { reason: "question" };
|
|
369
408
|
if (step) {
|
|
370
409
|
live.step = step;
|
|
371
410
|
await rebuild($, live);
|
|
@@ -374,6 +413,7 @@ export const register = (on, options) => {
|
|
|
374
413
|
try {
|
|
375
414
|
result = await next(e);
|
|
376
415
|
} finally {
|
|
416
|
+
if (asking && live.waiting?.reason === "question") live.waiting = null;
|
|
377
417
|
if (step && live.step === step) live.step = live.isWorking ? { name: "thinking", at: await $.clock.now() } : null;
|
|
378
418
|
if (typeof e.agentId === "string") {
|
|
379
419
|
const now = await $.clock.now();
|
|
@@ -381,11 +421,28 @@ export const register = (on, options) => {
|
|
|
381
421
|
live.spawned = noteSpawnActivity(live.spawned, e.agentId, now, -1);
|
|
382
422
|
}
|
|
383
423
|
}
|
|
384
|
-
|
|
424
|
+
const now = await $.clock.now();
|
|
425
|
+
noteToolOutcome(live, e, result, now);
|
|
426
|
+
const release = releaseFinish(e, result);
|
|
427
|
+
if (release) {
|
|
428
|
+
celebrate($, live, { ...release, id: `${release.id}:${now}` }, options);
|
|
429
|
+
await rebuild($, live);
|
|
430
|
+
}
|
|
385
431
|
refreshSoon($, live, options);
|
|
386
432
|
return result;
|
|
387
433
|
}).catch(($, e, next) => next(e));
|
|
388
434
|
|
|
435
|
+
// The user typing, or recalling or undoing a draft, answers YOUR TURN.
|
|
436
|
+
on("prompt.edit", async ($, e, next) => {
|
|
437
|
+
await endWaiting($, live);
|
|
438
|
+
return next(e);
|
|
439
|
+
}).catch(($, e, next) => next(e));
|
|
440
|
+
|
|
441
|
+
on("prompt.change", async ($, e, next) => {
|
|
442
|
+
if (e.origin?.kind === "history" || e.origin?.kind === "undo") await endWaiting($, live);
|
|
443
|
+
return next(e);
|
|
444
|
+
}).catch(($, e, next) => next(e));
|
|
445
|
+
|
|
389
446
|
// A background task's notification ends its thread row: its text is read for ids alone.
|
|
390
447
|
on("prompt.submit", async ($, e, next) => {
|
|
391
448
|
if (e.origin?.kind === "task-notification") {
|
|
@@ -437,8 +494,9 @@ export const register = (on, options) => {
|
|
|
437
494
|
|
|
438
495
|
on("ui.render", { component: "AbovePrompt" }, async ($, e, next) => {
|
|
439
496
|
const settings = normalizeModSettings(options);
|
|
440
|
-
const motion = effectiveMotion(settings.motion, { prefersReducedMotion: live.reducedMotion });
|
|
441
|
-
const glyphs = resolveGlyphs(settings.glyphs, e.surface, live.iconFont.present);
|
|
497
|
+
const motion = live.noColor ? "off" : effectiveMotion(settings.motion, { prefersReducedMotion: live.reducedMotion });
|
|
498
|
+
const glyphs = live.noColor ? "basic" : resolveGlyphs(settings.glyphs, e.surface, live.iconFont.present);
|
|
499
|
+
const color = !live.noColor;
|
|
442
500
|
const model = live.model;
|
|
443
501
|
if (!model || settings.band === "off" || e.props.hasSurvey || (!model.visible && !live.exiting)) return next(e);
|
|
444
502
|
const elements = $.ui.resolve(e);
|
|
@@ -453,9 +511,9 @@ export const register = (on, options) => {
|
|
|
453
511
|
drawn = elements.Svg({ source, alt, ...(animated ? { isInteractive: true } : {}) });
|
|
454
512
|
}
|
|
455
513
|
} else if (elements.Client && !live.clientFailed) {
|
|
456
|
-
drawn = elements.Client({ key: "lit-band", module: "./lit-band-client.mjs", props: { model, columns, glyphs, motion, accent: live.accent } });
|
|
514
|
+
drawn = elements.Client({ key: "lit-band", module: "./lit-band-client.mjs", props: { model, columns, glyphs, motion, accent: live.accent, color } });
|
|
457
515
|
} else if (model.visible) {
|
|
458
|
-
drawn = renderBand(elements, composeBand(model, settledSample(model), { columns, glyphs, accent: live.accent }));
|
|
516
|
+
drawn = renderBand(elements, composeBand(model, settledSample(model), { columns, glyphs, accent: live.accent, color }));
|
|
459
517
|
}
|
|
460
518
|
const below = await next(e);
|
|
461
519
|
if (!drawn) return below;
|
|
@@ -23,12 +23,12 @@ export const canonicalSkillResourceManifest = Object.freeze(
|
|
|
23
23
|
["lib/plan-task-rows.mjs", "5ba6c6e3cd04fb3f1be33cf5692a05f46948390e70ca096b9516f1589c6ddde9"],
|
|
24
24
|
["lib/rename-aliases.mjs", "3ee93aec10d0dbe785c554ab3040173ee94fde27da1b440a54b0513e5d11a508"],
|
|
25
25
|
["lib/render_pages.py", "69e20951dff5af47cff074b699ad992f489f5ac14559a5c114e17aa4dbaa5db7"],
|
|
26
|
-
["lib/rewind/brief.mjs", "
|
|
27
|
-
["lib/rewind/collect.mjs", "
|
|
26
|
+
["lib/rewind/brief.mjs", "39afb666bb89244e374da48a71755e51690573f06f7d3de2a85e1100249c93cb"],
|
|
27
|
+
["lib/rewind/collect.mjs", "4bb6809e851276757585c89508949f86a1739ab9e0381eb315cb04f21faaac71"],
|
|
28
28
|
["lib/rewind/gauge.mjs", "347095c1d36492bb996a679b67847261d15388b29962ed2ebaabec3cf0a5d9df"],
|
|
29
|
-
["lib/rewind/next-step.mjs", "
|
|
30
|
-
["lib/rewind/redact.mjs", "
|
|
31
|
-
["lib/rewind/transcripts.mjs", "
|
|
29
|
+
["lib/rewind/next-step.mjs", "c8a7cd99647afd403c35b9f793b410172564090d50158814ff20c41c30725b74"],
|
|
30
|
+
["lib/rewind/redact.mjs", "5bff5f69191f2ec07720f2dde20a850730fed884efb47a43f2604d7295a1615a"],
|
|
31
|
+
["lib/rewind/transcripts.mjs", "3fe82276cea0c51f4d89868e3a8fc315f2e099bdefcbde193ffceffe16e0325c"],
|
|
32
32
|
["lib/rules/constants.mjs", "de97cc08ca834c35ba89a3d384517ae3f24fd52502b8ccd7a3c8227981e3f6c9"],
|
|
33
33
|
["lib/rules/discovery.mjs", "8a3d445c2d55c4d65c721c2724c4f927ffbd6dfa31472be857d9c827274c6456"],
|
|
34
34
|
["lib/rules/engine.mjs", "034227d4359b6a84a58bbe191cfaa9388383c649a8d7ec29b6082345af2008ba"],
|
|
@@ -587,12 +587,12 @@ export const canonicalSkillResourceManifest = Object.freeze(
|
|
|
587
587
|
["skills/lit-docx/templates/tonalities/proposal.yaml", "b1b7f4875a89208939ca82d69e6cfb30c35b64ea91d67d5aecc98fe04bde3bfc"],
|
|
588
588
|
["skills/lit-docx/templates/tonalities/report.yaml", "23ac1d24f8936c6d522e19354d5948f0d00dce6d60c34fa42e37adafcc68cb8c"],
|
|
589
589
|
["skills/lit-hijack/SKILL.md", "58283031ebf2828843ccb234a8f12f657c8be67068759e7012e303446a4bb5b2"],
|
|
590
|
-
["skills/lit-hijack/references/capture-and-provenance.md", "
|
|
590
|
+
["skills/lit-hijack/references/capture-and-provenance.md", "7e2db27da3b62ea1ede767485fca0f679d88bc6894d4e693928ee14f8c0ecfe8"],
|
|
591
591
|
["skills/lit-hijack/references/clean-room-build.md", "09b932c591d64bcd5308b7cfa431d11272a69cb0433db681ad2e766d7687cab2"],
|
|
592
|
-
["skills/lit-hijack/references/distil-and-licence.md", "
|
|
592
|
+
["skills/lit-hijack/references/distil-and-licence.md", "693618b7f8b4b9bd2e07424f22a07a50bcdce7d5c46e6708974226bce643aefb"],
|
|
593
593
|
["skills/lit-hijack/references/gap-and-port-design.md", "3f81b510abdb0966f20d75ed354b44b497ea7fc82888f1b490be571ac6949bd0"],
|
|
594
594
|
["skills/lit-hijack/references/parity-and-report.md", "095dd50851a2c299038a6048d7453b7d180d57237746d692453b1e0b08f577e9"],
|
|
595
|
-
["skills/lit-hijack/scripts/hijack.mjs", "
|
|
595
|
+
["skills/lit-hijack/scripts/hijack.mjs", "34f777ac3b6965dfa2dcbd72b4db4c68c7325fc500b1bebd520ebad2d222d929"],
|
|
596
596
|
["skills/lit-humanizer/NOTICE", "c2608d2bc42cac22e77ac64eb137f8fc40d8f9a0b08ae7d7a8a75cf11d9289be"],
|
|
597
597
|
["skills/lit-humanizer/SKILL.md", "32f1405440a226b30e0e3e511c47314ee4422cf48689e2e8e269c17bb8edc694"],
|
|
598
598
|
["skills/lit-humanizer/assets/always-on-rule.md", "1c0e1d9724f012f05142c69d06e8a8cc89596556cba2c8ff1438e99c7848a5cf"],
|
|
@@ -838,7 +838,7 @@ export const canonicalSkillResourceManifest = Object.freeze(
|
|
|
838
838
|
["skills/lit-typographic-motion/engine/core/voices.mjs", "41933e9738d9c2bd8ccb7e6e4ed33953d062e2847026b11703564bcf953ab6f5"],
|
|
839
839
|
["skills/lit-typographic-motion/engine/models/word-timing.json", "f9771cd09fc55af1e068ad8ba094d718c9066ac22099f6e394189ad81561e648"],
|
|
840
840
|
["skills/lit-typographic-motion/engine/node/analysis.mjs", "d3c20b50fb16a114376289fb9f7f567b37cbea5dab2f6a19248ab5b0243169dd"],
|
|
841
|
-
["skills/lit-typographic-motion/engine/node/assets.mjs", "
|
|
841
|
+
["skills/lit-typographic-motion/engine/node/assets.mjs", "aea99074e36144dbef78056adf5b420781cafd2a7aeab307452bc442978ca3a1"],
|
|
842
842
|
["skills/lit-typographic-motion/engine/node/blender.mjs", "26b5fe46b63450481b4e620aba5d7e0b86bdb39026dfda02ee95364fe98eea54"],
|
|
843
843
|
["skills/lit-typographic-motion/engine/node/board.mjs", "22c7873542e3f96c1e55b61475d79eebcf951bb87e1a9bfeaf9762c1e3a1ed22"],
|
|
844
844
|
["skills/lit-typographic-motion/engine/node/brief.mjs", "67417c46d7467c4a12d523e88876bf432f605c45b6c7723e0b8f04fa8fa429cb"],
|
|
@@ -871,7 +871,7 @@ export const canonicalSkillResourceManifest = Object.freeze(
|
|
|
871
871
|
["skills/lit-typographic-motion/engine/node/stage-capture.mjs", "df061c2847a43156edec18a1d6ed54c42b01b42a24575adb32d640c6697a54b7"],
|
|
872
872
|
["skills/lit-typographic-motion/engine/node/stage-gate.mjs", "3daaf3e41c84ba8371d2a50fd399dd7d3a2d8334489911c814be738894fe3914"],
|
|
873
873
|
["skills/lit-typographic-motion/engine/node/stage-qa.mjs", "409c5fd3dc17bb998647245b6bb2bf58b96d2a6538f96c7d8ca9e2847c5988fe"],
|
|
874
|
-
["skills/lit-typographic-motion/engine/node/stage-serve.mjs", "
|
|
874
|
+
["skills/lit-typographic-motion/engine/node/stage-serve.mjs", "4c737b2a9bb55873cec8441814e478137def2bbcbee3f024a1014bbf3c8a6a5b"],
|
|
875
875
|
["skills/lit-typographic-motion/engine/node/stage.mjs", "691b22e546eb2b2c2f5e5e4d0732c4c2345c04a1666e3508b6ee28d14be3bd38"],
|
|
876
876
|
["skills/lit-typographic-motion/engine/node/stills.mjs", "be783fa50136be4dcbee7edfac8fcd60e3130ba7aeebb53cb11251a7c49ddbb7"],
|
|
877
877
|
["skills/lit-typographic-motion/engine/node/styles.mjs", "16533b7d404781788d25d0d7d0be3d876f0e4b05d13df929d04f871c1c86109b"],
|
|
@@ -965,7 +965,7 @@ export const canonicalSkillResourceManifest = Object.freeze(
|
|
|
965
965
|
["skills/lit-typographic-motion/references/stage.md", "fb3477e552c2995bab1ee4322b88c60f3212fa6974584559891a91222a2b287a"],
|
|
966
966
|
["skills/lit-typographic-motion/references/studio.md", "e8908e245c3cd8e27a55e00f37a0772209cea747b301341686cf810015c9638a"],
|
|
967
967
|
["skills/lit-typographic-motion/references/style-bibles.md", "2b7a6117d4774fec7a18cf0cf0d7fb26cf3b642b6688a60169de9336e46836da"],
|
|
968
|
-
["skills/lit-typographic-motion/references/treatment.md", "
|
|
968
|
+
["skills/lit-typographic-motion/references/treatment.md", "0456ec5d17356be3d3f1b2b28394d723f9ec511a677901191ed6323abd36f548"],
|
|
969
969
|
["skills/lit-typographic-motion/references/type-craft.md", "5bac1461a4ecb64dc4492e7b765934e2ec0d17f848e720f281cb3031b7750903"],
|
|
970
970
|
["skills/lit-typographic-motion/scripts/motion-doctor.mjs", "ad2d2434f363d26dd1b907ec2030600a69bf740775da9a53874f5d74f196cb36"],
|
|
971
971
|
["skills/lit-typographic-motion/scripts/motion-runtime.mjs", "8cf247a25b9ec3c4745f608fd618aeb4e069940cdb97354682066121eea50f47"],
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
// anything the hook cannot read are not clean. The block
|
|
9
9
|
// counter is the loop brake: at most INTERFACE_PROBE_MAX_BLOCKS blocks per turn, then the stop
|
|
10
10
|
// passes with a warning. Any unreadable state fails SAFE (allow).
|
|
11
|
-
import { existsSync,
|
|
11
|
+
import { existsSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
12
12
|
import { extname, isAbsolute, join } from "node:path";
|
|
13
13
|
|
|
14
|
-
import {
|
|
14
|
+
import { requireStateDir, resolveProjectStateRoot, STATE_WRITE_FLAG } from "./project-state-root.mjs";
|
|
15
15
|
|
|
16
16
|
export const INTERFACE_PROBE_MAX_BLOCKS = 2;
|
|
17
17
|
// start-work is left out: its prompt turn must stay side-effect-free, and the plan rows it runs
|
|
@@ -40,10 +40,9 @@ const readTurn = (cwd) => {
|
|
|
40
40
|
|
|
41
41
|
const writeTurn = (cwd, state) => {
|
|
42
42
|
const target = interfaceProbeTurnPath(cwd);
|
|
43
|
-
|
|
44
|
-
ensureStateDirIgnored(target);
|
|
43
|
+
requireStateDir(join(target, ".."));
|
|
45
44
|
const tmp = `${target}.tmp`;
|
|
46
|
-
writeFileSync(tmp, JSON.stringify(state));
|
|
45
|
+
writeFileSync(tmp, JSON.stringify(state), { flag: STATE_WRITE_FLAG });
|
|
47
46
|
renameSync(tmp, target);
|
|
48
47
|
return state;
|
|
49
48
|
};
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
// `plans/*.md` newer than the prompt carries at least one `- [ ] N.` task row. The
|
|
4
4
|
// block counter is the loop brake: at most LIT_PLAN_MAX_BLOCKS blocks per session,
|
|
5
5
|
// after which the stop passes with a warning. Any unreadable state fails SAFE (allow).
|
|
6
|
-
import { existsSync,
|
|
6
|
+
import { existsSync, readdirSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { join, resolve } from "node:path";
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { requireStateDir, resolveProjectStateRoot, STATE_WRITE_FLAG } from "./project-state-root.mjs";
|
|
10
10
|
import { findProjectRoot } from "./rules/discovery.mjs";
|
|
11
11
|
|
|
12
12
|
export const LIT_PLAN_MAX_BLOCKS = 2;
|
|
@@ -37,10 +37,9 @@ const readTurn = (cwd) => {
|
|
|
37
37
|
|
|
38
38
|
const writeTurn = (cwd, state) => {
|
|
39
39
|
const target = litPlanTurnPath(cwd);
|
|
40
|
-
|
|
41
|
-
ensureStateDirIgnored(target);
|
|
40
|
+
requireStateDir(join(target, ".."));
|
|
42
41
|
const tmp = `${target}.tmp`;
|
|
43
|
-
writeFileSync(tmp, JSON.stringify(state));
|
|
42
|
+
writeFileSync(tmp, JSON.stringify(state), { flag: STATE_WRITE_FLAG });
|
|
44
43
|
renameSync(tmp, target);
|
|
45
44
|
return state;
|
|
46
45
|
};
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
// stopping only while it can durably increment this counter under the cap. If the
|
|
4
4
|
// counter cannot be read or written, the hook fails SAFE (allows stopping) rather
|
|
5
5
|
// than risk a runaway loop. State lives at `.litclaude/litgoal/autoloop.json`.
|
|
6
|
-
import { existsSync,
|
|
6
|
+
import { existsSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { join } from "node:path";
|
|
8
|
-
import {
|
|
8
|
+
import { requireStateDir, STATE_WRITE_FLAG } from "../project-state-root.mjs";
|
|
9
9
|
import { appendLitgoalLedger } from "./ledger.mjs";
|
|
10
10
|
import { litgoalGoalsPath, litgoalLedgerPath, litgoalLockDir, litgoalStateDir } from "./paths.mjs";
|
|
11
11
|
import { readLitgoalState, withLitgoalLock, writeLitgoalState } from "./state.mjs";
|
|
@@ -40,11 +40,10 @@ export const readAutoloopState = (cwd = process.cwd()) => {
|
|
|
40
40
|
|
|
41
41
|
export const writeAutoloopState = (cwd, state) => {
|
|
42
42
|
const dir = litgoalStateDir(cwd);
|
|
43
|
-
|
|
44
|
-
ensureStateDirIgnored(dir);
|
|
43
|
+
requireStateDir(dir);
|
|
45
44
|
const target = litgoalAutoloopPath(cwd);
|
|
46
45
|
const tmp = `${target}.tmp`;
|
|
47
|
-
writeFileSync(tmp, JSON.stringify(state));
|
|
46
|
+
writeFileSync(tmp, JSON.stringify(state), { flag: STATE_WRITE_FLAG });
|
|
48
47
|
renameSync(tmp, target);
|
|
49
48
|
return state;
|
|
50
49
|
};
|