@litfamily/litclaude 1.0.44 → 1.0.45
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 +37 -0
- package/README.md +8 -8
- package/README_ko-KR.md +8 -8
- package/bin/litclaude-ai.js +173 -4
- package/docs/assets/readme/badge-version.svg +1 -1
- package/package.json +1 -1
- package/plugins/litclaude/.claude-plugin/plugin.json +1 -1
- package/plugins/litclaude/bin/litclaude-ai +1 -0
- package/plugins/litclaude/bin/litclaude-hook.js +21 -7
- package/plugins/litclaude/bin/litclaude-mcp.js +1 -1
- package/plugins/litclaude/hooks/hooks.json +1 -1
- package/plugins/litclaude/lib/agent-file/apply.mjs +150 -0
- package/plugins/litclaude/lib/agent-file/attribution.mjs +62 -0
- package/plugins/litclaude/lib/agent-file/block.md +12 -0
- package/plugins/litclaude/lib/agent-file/cli.mjs +71 -0
- package/plugins/litclaude/lib/agent-file/managed-block.mjs +82 -0
- package/plugins/litclaude/lib/agent-file/project-block.md +9 -0
- package/plugins/litclaude/lib/canonical-skill-resources.mjs +8 -8
- package/plugins/litclaude/lib/mark.mjs +23 -6
- package/plugins/litclaude/lib/rewind/brief.mjs +12 -2
- package/plugins/litclaude/lib/rewind/collect.mjs +25 -7
- package/plugins/litclaude/lib/rewind/next-step.mjs +21 -3
- package/plugins/litclaude/lib/start-work-lifecycle.mjs +4 -2
- package/plugins/litclaude/skills/lit-adhd/SKILL.md +5 -4
- package/plugins/litclaude/skills/lit-init/SKILL.md +12 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage.mjs +4 -1
- package/plugins/litclaude/skills/lit-typographic-motion/engine/stage/init.js +13 -0
- package/plugins/litclaude/skills/readme-studio/templates/hyperframes-cover/package-lock.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.45 - 2026-10-30
|
|
4
|
+
|
|
5
|
+
- lit-adhd no longer tells this session to `lit continue` a paused workflow, or `go` on its own run, while other
|
|
6
|
+
lanes are at work. It checked its own paused step before looking at the lanes, so the lane hold never applied to
|
|
7
|
+
the session that started them. A pending `lit approve` is still offered, because that choice is the user's.
|
|
8
|
+
- The README Studio HyperFrames cover template now locks `@hono/node-server` 2.1.5. 2.1.1 decoded a static path
|
|
9
|
+
twice, which let a request slip past middleware (Dependabot alert, moderate; the template only renders locally).
|
|
10
|
+
- The installer can add a short LitFamily block to the global `CLAUDE.md` that Claude Code reads every
|
|
11
|
+
session: the activation word, where plans and handoffs live, and the never-push-without-a-yes rule. It
|
|
12
|
+
sits between `<!-- litfamily:litclaude:start -->` and `<!-- litfamily:litclaude:end -->` markers at the
|
|
13
|
+
end of the file, so your own text is never changed; the first install keeps a backup copy, an update
|
|
14
|
+
refreshes only the block, and `uninstall` takes it out again byte for byte. An interactive install asks
|
|
15
|
+
first, `--yes` adds it, `--no-agent-file` skips it, and a non-interactive install without `--yes` only
|
|
16
|
+
prints how to add it. `litclaude-ai config agentFile off` removes it and keeps it off; `on` brings it
|
|
17
|
+
back. `doctor` prints `AGENT_FILE:`. `lit init` now also writes the project version of the block into
|
|
18
|
+
the repo's `AGENTS.md` through `litclaude-ai agent-file project`, with a `CLAUDE.md` that imports it
|
|
19
|
+
when the repo has none.
|
|
20
|
+
- `litclaude-ai config attribution off` hides Claude Code's `Co-Authored-By` commit line and its pull
|
|
21
|
+
request line through Claude Code's own `attribution` setting, and adds a matching rule to the LitFamily
|
|
22
|
+
block; `keep`, the default, leaves them as Claude Code writes them, and `uninstall` restores whatever
|
|
23
|
+
the setting held before. An interactive install asks once; `--yes` changes nothing.
|
|
24
|
+
- Linux fixes found by running the suite on ubuntu-latest. start-work kept a project folder whose name is stored
|
|
25
|
+
decomposed (NFD) in its composed spelling and then could not find the plan on ext4, which does not fold the two;
|
|
26
|
+
it now keeps the spelling on disk and compares in NFC. A 3D film on a host without a GPU fell over when three.js
|
|
27
|
+
threw on its null WebGL context, and now retries on SwiftShader as intended. A Web Animation the page starts
|
|
28
|
+
while loading no longer runs on the wall clock before frame 0, where a slow host let a short one finish and move
|
|
29
|
+
its chained successor early. The no-ffmpeg and large-argument tests no longer assume macOS, and a hand-run
|
|
30
|
+
`ci-linux.yml` runs the `ci.yml` steps on ubuntu-latest.
|
|
31
|
+
- The prompt hook no longer times out when another session holds the start-work lock. It waited up to 5 seconds
|
|
32
|
+
for the lock inside a hook the host stops at 5 seconds, so the host printed "hook timed out" and dropped the
|
|
33
|
+
answer. The hook now waits 1.5 seconds and answers that start-work is busy and to send the prompt again, and its
|
|
34
|
+
time limit is 10 seconds like the other hooks.
|
|
35
|
+
- lit-adhd no longer offers `go` while parallel lanes are at work. A live session of the repo or a herdr agent
|
|
36
|
+
working in the same herdr workspace now holds the single-plan `go`; the brief says to wait and not to type `go`.
|
|
37
|
+
It reads `herdr agent list` as the JSON it is, and a HANDOFF Next item already marked done (DONE, SHIPPED, ✅,
|
|
38
|
+
`[x]`, struck through) is skipped for the first open one.
|
|
39
|
+
|
|
3
40
|
## 1.0.44 - 2026-10-29
|
|
4
41
|
|
|
5
42
|
- A release from GitHub Actions no longer runs the whole suite a second time. The publish gate asks GitHub whether
|
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.45/docs/assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.45/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.45/docs/assets/readme/badge-version.svg" alt="1.0.45" />
|
|
8
|
+
<a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.45/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.45/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.45/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.45/docs/privacy.md)
|
|
81
|
+
- [Migration and ownership conflicts](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.45/docs/migration.md)
|
|
82
|
+
- [Release history](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.45/CHANGELOG.md)
|
|
83
|
+
- [MIT license](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.45/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.45/docs/assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.45/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.45/docs/assets/readme/badge-version.svg" alt="1.0.45" />
|
|
8
|
+
<a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.45/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.45/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.45/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.45/docs/privacy.md)
|
|
79
|
+
- [이전과 소유권 충돌](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.45/docs/migration.md)
|
|
80
|
+
- [변경 이력](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.45/CHANGELOG.md)
|
|
81
|
+
- [MIT 라이선스](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.45/LICENSE)
|
package/bin/litclaude-ai.js
CHANGED
|
@@ -33,6 +33,24 @@ import { readPublicSource } from "../plugins/litclaude/lib/public-source-reader/
|
|
|
33
33
|
import { shellFreeCommand } from "../plugins/litclaude/lib/npm-invocation.mjs";
|
|
34
34
|
import { MOD_CHOICES } from "../plugins/litclaude/lib/mod/settings.mjs";
|
|
35
35
|
import { MARK_MODES, readMarkMode, writeMarkMode } from "../plugins/litclaude/lib/mark.mjs";
|
|
36
|
+
import {
|
|
37
|
+
AGENT_FILE_ID,
|
|
38
|
+
AGENT_FILE_MODES,
|
|
39
|
+
agentFileBody,
|
|
40
|
+
agentFileState,
|
|
41
|
+
applyAgentFile,
|
|
42
|
+
readAgentFileMode,
|
|
43
|
+
writeAgentFileMode,
|
|
44
|
+
} from "../plugins/litclaude/lib/agent-file/apply.mjs";
|
|
45
|
+
import { agentFileLine, runAgentFileCli } from "../plugins/litclaude/lib/agent-file/cli.mjs";
|
|
46
|
+
import {
|
|
47
|
+
ATTRIBUTION_MODES,
|
|
48
|
+
applyAttribution,
|
|
49
|
+
readAttributionMode,
|
|
50
|
+
restoreAttribution,
|
|
51
|
+
storedAttributionMode,
|
|
52
|
+
writeAttributionMode,
|
|
53
|
+
} from "../plugins/litclaude/lib/agent-file/attribution.mjs";
|
|
36
54
|
import { officialBuildLines } from "../plugins/litclaude/lib/official-build.mjs";
|
|
37
55
|
import { verifyBundledSkillsIntegrity } from "../plugins/litclaude/lib/bundled-skills-integrity.mjs";
|
|
38
56
|
import { verifyCanonicalFrontendCorpus } from "../plugins/litclaude/lib/canonical-frontend-corpus.mjs";
|
|
@@ -86,7 +104,7 @@ const prewarmMotionRuntime = () => {
|
|
|
86
104
|
};
|
|
87
105
|
const version = packageJson.version;
|
|
88
106
|
|
|
89
|
-
const usage = `Usage: litclaude-ai [--dry-run] <install|doctor|config|invite|path|run|update|uninstall|litgoal|wikify|workflow-check|workflow-stage|rewind|start-work|start-work-next|public-read|motion-runtime> [...args]
|
|
107
|
+
const usage = `Usage: litclaude-ai [--dry-run] <install|doctor|config|invite|path|run|update|uninstall|agent-file|litgoal|wikify|workflow-check|workflow-stage|rewind|start-work|start-work-next|public-read|motion-runtime> [...args]
|
|
90
108
|
litclaude-ai --version
|
|
91
109
|
|
|
92
110
|
Commands:
|
|
@@ -98,6 +116,13 @@ Commands:
|
|
|
98
116
|
desktop app too, which shows no editor for them.
|
|
99
117
|
\`config mark <on|meta|off>\` sets whether engine outputs carry
|
|
100
118
|
LitClaude's marks; it is kept in LitClaude's own config.json.
|
|
119
|
+
\`config agentFile <on|off>\` adds or removes the short LitFamily
|
|
120
|
+
block in the global CLAUDE.md; your own text there is never touched.
|
|
121
|
+
\`config attribution <keep|off>\` keeps or hides Claude Code's
|
|
122
|
+
Co-Authored-By and pull request line (keep is the default).
|
|
123
|
+
agent-file project [--dir <path>]
|
|
124
|
+
Write the LitFamily project block into the repo's AGENTS.md, and a
|
|
125
|
+
CLAUDE.md that imports it when the repo has none (what \`lit init\` runs).
|
|
101
126
|
invite [@<github-id>] [--json]
|
|
102
127
|
Record who invited you (the same as typing \`lit invite @<id>\`);
|
|
103
128
|
the LIT card gets its club look. Saved in ~/.litclaude/invite.json
|
|
@@ -246,6 +271,7 @@ const parseInstallOptions = (rest, existingPermissionMode = "safe") => {
|
|
|
246
271
|
let permissionExplicit = Boolean(process.env.LITCLAUDE_PERMISSION_MODE);
|
|
247
272
|
let assumeYes = false;
|
|
248
273
|
let iconFont = false;
|
|
274
|
+
let agentFile = true;
|
|
249
275
|
|
|
250
276
|
for (let index = 0; index < rest.length; index += 1) {
|
|
251
277
|
const arg = rest[index];
|
|
@@ -277,10 +303,14 @@ const parseInstallOptions = (rest, existingPermissionMode = "safe") => {
|
|
|
277
303
|
iconFont = true;
|
|
278
304
|
continue;
|
|
279
305
|
}
|
|
306
|
+
if (arg === "--no-agent-file") {
|
|
307
|
+
agentFile = false;
|
|
308
|
+
continue;
|
|
309
|
+
}
|
|
280
310
|
fail(`Unknown install option: ${arg}`, 64);
|
|
281
311
|
}
|
|
282
312
|
|
|
283
|
-
return { permissionMode, permissionExplicit, assumeYes, iconFont };
|
|
313
|
+
return { permissionMode, permissionExplicit, assumeYes, iconFont, agentFile };
|
|
284
314
|
};
|
|
285
315
|
|
|
286
316
|
const permissionProfile = (mode) => {
|
|
@@ -794,6 +824,102 @@ const uninstallModOptions = (home = claudeHome()) => {
|
|
|
794
824
|
writeClaudeSettings(settings, home);
|
|
795
825
|
};
|
|
796
826
|
|
|
827
|
+
// The LitFamily block in the global CLAUDE.md (lib/agent-file). An install adds it on a Yes or --yes
|
|
828
|
+
// and refreshes one already there; a non-interactive install without --yes only says how to add it.
|
|
829
|
+
const agentFilePath = (home = claudeHome()) => join(home, "CLAUDE.md");
|
|
830
|
+
const writeAgentFile = (action, dryRun = false) => applyAgentFile({
|
|
831
|
+
path: agentFilePath(),
|
|
832
|
+
id: AGENT_FILE_ID,
|
|
833
|
+
version,
|
|
834
|
+
body: agentFileBody("global", { attribution: readAttributionMode({ litHome: litHome() }) }),
|
|
835
|
+
action,
|
|
836
|
+
dryRun,
|
|
837
|
+
});
|
|
838
|
+
|
|
839
|
+
// Rewrites the block in place when it is already there, so it follows the attribution choice.
|
|
840
|
+
const refreshAgentFile = () => {
|
|
841
|
+
if (readAgentFileMode({ litHome: litHome() }) === "off" || agentFileState({ path: agentFilePath(), version }) === "absent") return null;
|
|
842
|
+
return writeAgentFile("install");
|
|
843
|
+
};
|
|
844
|
+
|
|
845
|
+
// Claude Code's own `attribution` setting: `off` hides it, `keep` puts back what LitClaude replaced.
|
|
846
|
+
const setAttribution = (mode, home = claudeHome()) => {
|
|
847
|
+
const settings = readClaudeSettings(home);
|
|
848
|
+
const before = JSON.stringify(settings);
|
|
849
|
+
const record = { ...(settings[litClaudeSettingsKey] ?? {}) };
|
|
850
|
+
const result = mode === "off" ? applyAttribution(settings, record) : (restoreAttribution(settings, record), "restored");
|
|
851
|
+
if (Object.keys(record).length > 0) settings[litClaudeSettingsKey] = record;
|
|
852
|
+
else delete settings[litClaudeSettingsKey];
|
|
853
|
+
if (JSON.stringify(settings) !== before) writeClaudeSettings(settings, home);
|
|
854
|
+
return result;
|
|
855
|
+
};
|
|
856
|
+
|
|
857
|
+
const ATTRIBUTION_QUESTION = "Keep Claude Code's Co-Authored-By line in commits and pull requests? [Y/n] ";
|
|
858
|
+
|
|
859
|
+
const shouldPromptAttribution = () => {
|
|
860
|
+
if (process.env.LITCLAUDE_ATTRIBUTION_PROMPT === "1") return true;
|
|
861
|
+
if (process.env.LITCLAUDE_ATTRIBUTION_PROMPT === "0") return false;
|
|
862
|
+
return Boolean(process.stdin.isTTY && process.stdout.isTTY && !Object.hasOwn(process.env, "CI"));
|
|
863
|
+
};
|
|
864
|
+
|
|
865
|
+
// An install changes attribution only when the user chose `off`, now or before; --yes and a
|
|
866
|
+
// non-interactive install leave Claude Code's default alone.
|
|
867
|
+
const installAttribution = async ({ assumeYes }) => {
|
|
868
|
+
let mode = storedAttributionMode(litHome());
|
|
869
|
+
if (mode === undefined && !assumeYes && shouldPromptAttribution()) {
|
|
870
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout, terminal: shouldColorInstall() });
|
|
871
|
+
try {
|
|
872
|
+
mode = /^\s*n/iu.test(await rl.question(ATTRIBUTION_QUESTION)) ? "off" : "keep";
|
|
873
|
+
} finally {
|
|
874
|
+
rl.close();
|
|
875
|
+
}
|
|
876
|
+
writeAttributionMode(litHome(), mode);
|
|
877
|
+
}
|
|
878
|
+
const result = readAttributionMode({ litHome: litHome() }) === "off" ? setAttribution("off") : null;
|
|
879
|
+
const note = result === "user-changed" ? "; your own attribution setting in settings.json was left as it is" : "";
|
|
880
|
+
process.stdout.write(`ATTRIBUTION: ${readAttributionMode({ litHome: litHome() })}${note} (change: litclaude-ai config attribution <keep|off>)\n`);
|
|
881
|
+
};
|
|
882
|
+
const AGENT_FILE_QUESTION = "Add the short LitFamily block to your global CLAUDE.md? Your own text stays as it is. [Y/n] ";
|
|
883
|
+
|
|
884
|
+
const shouldPromptAgentFile = () => {
|
|
885
|
+
if (process.env.LITCLAUDE_AGENT_FILE_PROMPT === "1") return true;
|
|
886
|
+
if (process.env.LITCLAUDE_AGENT_FILE_PROMPT === "0") return false;
|
|
887
|
+
return Boolean(process.stdin.isTTY && process.stdout.isTTY && !Object.hasOwn(process.env, "CI"));
|
|
888
|
+
};
|
|
889
|
+
|
|
890
|
+
const installAgentFile = async ({ assumeYes, agentFile }) => {
|
|
891
|
+
const path = agentFilePath();
|
|
892
|
+
if (!agentFile || readAgentFileMode({ litHome: litHome() }) === "off") {
|
|
893
|
+
process.stdout.write(`AGENT_FILE: off (${path} left as it is; turn on: litclaude-ai config agentFile on)\n`);
|
|
894
|
+
return;
|
|
895
|
+
}
|
|
896
|
+
const state = agentFileState({ path, version });
|
|
897
|
+
// A linked, non-file or non-UTF-8 CLAUDE.md is never written, so asking about it would only mislead.
|
|
898
|
+
if (["symlink", "not-file", "not-utf8"].includes(state)) {
|
|
899
|
+
process.stdout.write(`AGENT_FILE: ${state} ${path}; left as it is\n`);
|
|
900
|
+
return;
|
|
901
|
+
}
|
|
902
|
+
if (state === "absent" && !assumeYes) {
|
|
903
|
+
if (!shouldPromptAgentFile()) {
|
|
904
|
+
process.stdout.write(`AGENT_FILE: skipped (add the LitFamily block to ${path}: litclaude-ai config agentFile on)\n`);
|
|
905
|
+
return;
|
|
906
|
+
}
|
|
907
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout, terminal: shouldColorInstall() });
|
|
908
|
+
let yes;
|
|
909
|
+
try {
|
|
910
|
+
yes = !/^\s*n/iu.test(await rl.question(AGENT_FILE_QUESTION));
|
|
911
|
+
} finally {
|
|
912
|
+
rl.close();
|
|
913
|
+
}
|
|
914
|
+
if (!yes) {
|
|
915
|
+
writeAgentFileMode(litHome(), "off");
|
|
916
|
+
process.stdout.write("AGENT_FILE: off (turn on later: litclaude-ai config agentFile on)\n");
|
|
917
|
+
return;
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
process.stdout.write(`${agentFileLine(writeAgentFile("install"))}\n`);
|
|
921
|
+
};
|
|
922
|
+
|
|
797
923
|
// `config` prints the options; `config <option> <value>` sets one. A value the user sets is theirs,
|
|
798
924
|
// so it leaves the install record and uninstall keeps it.
|
|
799
925
|
const configModOptions = (rest, home = claudeHome()) => {
|
|
@@ -801,6 +927,8 @@ const configModOptions = (rest, home = claudeHome()) => {
|
|
|
801
927
|
const options = modOptionsOf(readClaudeSettings(home));
|
|
802
928
|
for (const key of Object.keys(MOD_CHOICES)) process.stdout.write(`${key.padEnd(7)} ${options[key].padEnd(7)} (${MOD_CHOICES[key].join(", ")})\n`);
|
|
803
929
|
process.stdout.write(`${"mark".padEnd(7)} ${readMarkMode({ litHome: litHome() }).padEnd(7)} (${MARK_MODES.join(", ")})\n`);
|
|
930
|
+
process.stdout.write(`agentFile ${readAgentFileMode({ litHome: litHome() }).padEnd(5)} (${AGENT_FILE_MODES.join(", ")})\n`);
|
|
931
|
+
process.stdout.write(`attribution ${readAttributionMode({ litHome: litHome() }).padEnd(4)} (${ATTRIBUTION_MODES.join(", ")})\n`);
|
|
804
932
|
process.stdout.write("Change one with: litclaude-ai config <option> <value>. New Claude Code sessions, terminal or desktop app, pick it up.\n");
|
|
805
933
|
return;
|
|
806
934
|
}
|
|
@@ -817,7 +945,33 @@ const configModOptions = (rest, home = claudeHome()) => {
|
|
|
817
945
|
process.stdout.write(`MARK: ${value}\n`);
|
|
818
946
|
return;
|
|
819
947
|
}
|
|
820
|
-
|
|
948
|
+
// `agentFile` is kept in config.json too, and acts at once: off removes the block, on writes it.
|
|
949
|
+
if (key === "agentFile") {
|
|
950
|
+
const value = String(raw ?? "").trim().toLowerCase();
|
|
951
|
+
if (!AGENT_FILE_MODES.includes(value) || rest.length > 2) fail(`agentFile takes one of: ${AGENT_FILE_MODES.join(", ")}`, 64);
|
|
952
|
+
try {
|
|
953
|
+
writeAgentFileMode(litHome(), value);
|
|
954
|
+
} catch (error) {
|
|
955
|
+
fail(error.message);
|
|
956
|
+
}
|
|
957
|
+
process.stdout.write(`AGENT_FILE: ${value}\n${agentFileLine(writeAgentFile(value === "off" ? "uninstall" : "install"))}\n`);
|
|
958
|
+
return;
|
|
959
|
+
}
|
|
960
|
+
// `attribution` sets Claude Code's own setting and the block line together.
|
|
961
|
+
if (key === "attribution") {
|
|
962
|
+
const value = String(raw ?? "").trim().toLowerCase();
|
|
963
|
+
if (!ATTRIBUTION_MODES.includes(value) || rest.length > 2) fail(`attribution takes one of: ${ATTRIBUTION_MODES.join(", ")}`, 64);
|
|
964
|
+
try {
|
|
965
|
+
writeAttributionMode(litHome(), value);
|
|
966
|
+
} catch (error) {
|
|
967
|
+
fail(error.message);
|
|
968
|
+
}
|
|
969
|
+
setAttribution(value, home);
|
|
970
|
+
const block = refreshAgentFile();
|
|
971
|
+
process.stdout.write(`ATTRIBUTION: ${value}\n${block ? `${agentFileLine(block)}\n` : ""}`);
|
|
972
|
+
return;
|
|
973
|
+
}
|
|
974
|
+
if (!Object.hasOwn(MOD_CHOICES, key)) fail(`Unknown option: ${key}. Options: ${[...Object.keys(MOD_CHOICES), "mark", "agentFile", "attribution"].join(", ")}`, 64);
|
|
821
975
|
const value = String(raw ?? "").trim().toLowerCase();
|
|
822
976
|
if (!MOD_CHOICES[key].includes(value) || rest.length > 2) fail(`${key} takes one of: ${MOD_CHOICES[key].join(", ")}`, 64);
|
|
823
977
|
const settings = readClaudeSettings(home);
|
|
@@ -1383,7 +1537,7 @@ const install = async ({ dryRun, rest }) => {
|
|
|
1383
1537
|
const home = claudeHome();
|
|
1384
1538
|
const litClaudeHome = litHome();
|
|
1385
1539
|
const existingLitClaude = readClaudeSettings(home)[litClaudeSettingsKey] ?? {};
|
|
1386
|
-
const { permissionMode, permissionExplicit, assumeYes, iconFont } = parseInstallOptions(rest, existingLitClaude.permissionMode);
|
|
1540
|
+
const { permissionMode, permissionExplicit, assumeYes, iconFont, agentFile } = parseInstallOptions(rest, existingLitClaude.permissionMode);
|
|
1387
1541
|
const existingHudAccent = normalizeHudAccent(existingLitClaude.hudAccent);
|
|
1388
1542
|
const existingOutputStyle = existingLitClaude.outputStyleChoice ?? "off";
|
|
1389
1543
|
const requestedHudAccent = process.env.LITCLAUDE_HUD_ACCENT
|
|
@@ -1418,6 +1572,9 @@ const install = async ({ dryRun, rest }) => {
|
|
|
1418
1572
|
} else {
|
|
1419
1573
|
process.stdout.write("Icon font: not requested (pass --icon-font)\n");
|
|
1420
1574
|
}
|
|
1575
|
+
process.stdout.write(!agentFile || readAgentFileMode({ litHome: litClaudeHome }) === "off"
|
|
1576
|
+
? `Agent file: off (${agentFilePath(home)} left as it is)\n`
|
|
1577
|
+
: `Would add the LitFamily block to ${agentFilePath(home)} (asks first; --yes adds it, --no-agent-file skips)\n`);
|
|
1421
1578
|
process.stdout.write("Launch with: claude\n");
|
|
1422
1579
|
return;
|
|
1423
1580
|
}
|
|
@@ -1530,6 +1687,8 @@ const install = async ({ dryRun, rest }) => {
|
|
|
1530
1687
|
process.stdout.write("DESKTOP_APP: ready — the Claude desktop app's Code tab reads these same settings; open a new session there\n");
|
|
1531
1688
|
process.stdout.write(`${prewarmMotionRuntime()}\n`);
|
|
1532
1689
|
if (wantsIconFont) await runIconFontInstall();
|
|
1690
|
+
await installAttribution({ assumeYes });
|
|
1691
|
+
await installAgentFile({ assumeYes, agentFile });
|
|
1533
1692
|
process.stdout.write("Launch with: claude\n");
|
|
1534
1693
|
if (preservedPath) process.stderr.write(`INSTALL_WARNING: PRESERVED_MODIFIED_SKILL lit-korean at ${preservedPath}\n`);
|
|
1535
1694
|
};
|
|
@@ -1651,6 +1810,9 @@ const doctor = ({ dryRun }) => {
|
|
|
1651
1810
|
process.stdout.write(`${iconFontDoctorLine()}\n`);
|
|
1652
1811
|
process.stdout.write(`MOD_OPTIONS: ${modOptionsLine(readClaudeSettings())}\n`);
|
|
1653
1812
|
process.stdout.write(`MARK: ${readMarkMode({ litHome: litHome() })} (change: litclaude-ai config mark <on|meta|off>)\n`);
|
|
1813
|
+
const agentFileMode = readAgentFileMode({ litHome: litHome() });
|
|
1814
|
+
process.stdout.write(`AGENT_FILE: ${agentFileMode === "off" ? "off" : agentFileState({ path: agentFilePath(), version })} (${agentFilePath()}; change: litclaude-ai config agentFile <on|off>)\n`);
|
|
1815
|
+
process.stdout.write(`ATTRIBUTION: ${readAttributionMode({ litHome: litHome() })} (change: litclaude-ai config attribution <keep|off>)\n`);
|
|
1654
1816
|
for (const line of officialBuildLines(packageJson)) process.stdout.write(`${line}\n`);
|
|
1655
1817
|
|
|
1656
1818
|
// lit-typographic-motion: the seven readiness probes, every run. Read-only and never fatal; a
|
|
@@ -1766,6 +1928,7 @@ const uninstall = ({ dryRun }) => {
|
|
|
1766
1928
|
const fonts = uninstallIconFont({ litHome: home, dryRun: true });
|
|
1767
1929
|
for (const path of fonts.removed) process.stdout.write(`Would remove icon font file: ${path}\n`);
|
|
1768
1930
|
for (const { path, reason } of fonts.kept) process.stdout.write(`Would keep icon font file: ${path} (${reason})\n`);
|
|
1931
|
+
process.stdout.write(`Would remove the LitFamily block from ${agentFilePath()} (your own text stays)\n`);
|
|
1769
1932
|
return;
|
|
1770
1933
|
}
|
|
1771
1934
|
// Before the LitClaude home goes: the manifest there says which font files LitClaude wrote.
|
|
@@ -1778,6 +1941,8 @@ const uninstall = ({ dryRun }) => {
|
|
|
1778
1941
|
rmSync(marketplaceRoot(home), { recursive: true, force: true });
|
|
1779
1942
|
// Notifier files predate ownership receipts; retain their bytes and foreign entries.
|
|
1780
1943
|
removeEmptyDirectory(updateNotifierRoot);
|
|
1944
|
+
// Before LitClaude's settings record goes: it holds the attribution value to put back.
|
|
1945
|
+
setAttribution("keep");
|
|
1781
1946
|
unregisterClaudePlugin();
|
|
1782
1947
|
unregisterMarketplace();
|
|
1783
1948
|
uninstallHudStatusLine();
|
|
@@ -1787,6 +1952,7 @@ const uninstall = ({ dryRun }) => {
|
|
|
1787
1952
|
rmSync(claudePluginRoot(), { recursive: true, force: true });
|
|
1788
1953
|
removeEmptyDirectory(dirname(claudePluginRoot()));
|
|
1789
1954
|
removeEmptyDirectory(pluginCacheRoot);
|
|
1955
|
+
process.stdout.write(`${agentFileLine(writeAgentFile("uninstall"))}\n`);
|
|
1790
1956
|
process.stdout.write("UNINSTALL_PASS\n");
|
|
1791
1957
|
};
|
|
1792
1958
|
|
|
@@ -1926,6 +2092,9 @@ const main = async () => {
|
|
|
1926
2092
|
case "uninstall":
|
|
1927
2093
|
uninstall(parsed);
|
|
1928
2094
|
break;
|
|
2095
|
+
case "agent-file":
|
|
2096
|
+
exitAfterFlush(runAgentFileCli(parsed.rest, { dryRun: parsed.dryRun }));
|
|
2097
|
+
break;
|
|
1929
2098
|
default:
|
|
1930
2099
|
printUsage();
|
|
1931
2100
|
fail(`Unknown command: ${command}`, 64);
|
|
@@ -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.45"><title>release: 1.0.45</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.45</text></g></svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@litfamily/litclaude",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.45",
|
|
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": {
|
|
@@ -18,6 +18,7 @@ const SUBCOMMANDS = {
|
|
|
18
18
|
rewind: async (load, rest) => (await load("../lib/rewind/collect.mjs")).runRewindCli(rest, process.cwd()),
|
|
19
19
|
wikify: async (load, rest) => (await load("../lib/wikify-knowledge-cli.mjs")).runWikifyKnowledgeCli(rest, undefined, process.cwd()),
|
|
20
20
|
"motion-runtime": async (load, rest) => (await load("../skills/lit-typographic-motion/scripts/motion-runtime.mjs")).main(rest),
|
|
21
|
+
"agent-file": async (load, rest) => (await load("../lib/agent-file/cli.mjs")).runAgentFileCli(rest, { cwd: process.cwd() }),
|
|
21
22
|
};
|
|
22
23
|
|
|
23
24
|
const main = async () => {
|
|
@@ -49,6 +49,7 @@ import {
|
|
|
49
49
|
recordStartWorkSubagentStart,
|
|
50
50
|
recordStartWorkSubagentStop,
|
|
51
51
|
resumeStartWorkFromUserPrompt,
|
|
52
|
+
StartWorkLifecycleError,
|
|
52
53
|
startWorkStructuredContext,
|
|
53
54
|
} from "../lib/start-work-lifecycle.mjs";
|
|
54
55
|
import { formatResolvedPlanNotice, resolveLatestDurablePlan } from "../lib/durable-plan.mjs";
|
|
@@ -1374,6 +1375,10 @@ const invocationContext = (invoked, invocation) => {
|
|
|
1374
1375
|
if (invoked.nothing) {
|
|
1375
1376
|
return [`Nothing in this session's start-work is waiting for approval, so \`lit ${invoked.nothing}\` changed nothing. Tell the user that in one sentence and start no other work.`, "LitClaude start-work had nothing to approve."];
|
|
1376
1377
|
}
|
|
1378
|
+
if (invoked.busy) {
|
|
1379
|
+
const typed = invoked.busy === "start" ? "start-work command" : `\`lit ${invoked.busy}\``;
|
|
1380
|
+
return [`Another LitClaude session or command is updating this project's start-work state right now, so this ${typed} changed nothing. Tell the user in one sentence to send the same prompt again in a few seconds, and start no other work.`, "LitClaude start-work is busy; send it again."];
|
|
1381
|
+
}
|
|
1377
1382
|
if (invoked.choose) {
|
|
1378
1383
|
const list = invoked.choose.length ? `Open plans: ${invoked.choose.map(clipPath).join(", ")}.` : "No plan under plans/ has an open task.";
|
|
1379
1384
|
return [`LitClaude did not start start-work: ${invocation?.plan ? "that plan" : "no single open plan"} could be chosen. ${list} Ask the user which plan to run with \`/litclaude:start-work <plan>\`; do not implement anything from this prompt.`, "LitClaude start-work needs a plan name."];
|
|
@@ -1726,20 +1731,29 @@ switch (eventName) {
|
|
|
1726
1731
|
const own = resolveProjectStateRoot(cwd);
|
|
1727
1732
|
const above = relative(found, own);
|
|
1728
1733
|
const lifecycleRoot = above && !above.startsWith("..") && !isAbsolute(above) ? own : found;
|
|
1734
|
+
// The host drops this hook's answer at its time limit, so a lock another session holds gets a
|
|
1735
|
+
// short wait and a "busy, send it again" reply instead of the full lock wait.
|
|
1736
|
+
process.env.LITCLAUDE_START_WORK_LOCK_TIMEOUT_MS ??= "1500";
|
|
1737
|
+
const lockBusy = (error) => error instanceof StartWorkLifecycleError && error.status === 75;
|
|
1729
1738
|
try {
|
|
1730
1739
|
if (invocation.kind === "start" && invocation.plan) {
|
|
1731
1740
|
adoption = adoptStartWork(lifecycleRoot, { sessionId: input.session_id, plan: invocation.plan, promptId: input.prompt_id });
|
|
1732
1741
|
}
|
|
1733
|
-
} catch {
|
|
1742
|
+
} catch (error) {
|
|
1734
1743
|
adoption = null;
|
|
1744
|
+
if (lockBusy(error)) invoked = { busy: invocation.kind };
|
|
1735
1745
|
}
|
|
1736
1746
|
if (!adoption) {
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1747
|
+
if (!invoked) {
|
|
1748
|
+
try {
|
|
1749
|
+
invoked = invocation.kind === "start"
|
|
1750
|
+
? startWorkFromInvocation(lifecycleRoot, { sessionId: input.session_id, promptId: input.prompt_id, plan: invocation.plan })
|
|
1751
|
+
: (invocation.kind === "approve" ? approveStartWorkBoundary : denyStartWorkBoundary)(lifecycleRoot, { sessionId: input.session_id, promptId: input.prompt_id }) ?? { nothing: invocation.kind };
|
|
1752
|
+
} catch (error) {
|
|
1753
|
+
invoked = lockBusy(error)
|
|
1754
|
+
? { busy: invocation.kind }
|
|
1755
|
+
: { failed: error instanceof Error ? error.message : "lifecycle validation failed" };
|
|
1756
|
+
}
|
|
1743
1757
|
}
|
|
1744
1758
|
invoked = { ...invoked, lifecycleRoot, sessionId: input.session_id };
|
|
1745
1759
|
}
|