@litfamily/litclaude 1.0.42 → 1.0.44

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.
Files changed (117) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/README.md +8 -8
  3. package/README_ko-KR.md +8 -8
  4. package/TRADEMARK.md +12 -0
  5. package/bin/litclaude-ai.js +58 -5
  6. package/docs/assets/readme/badge-version.svg +1 -1
  7. package/docs/hooks.md +35 -6
  8. package/package.json +2 -1
  9. package/plugins/litclaude/.claude-plugin/plugin.json +7 -1
  10. package/plugins/litclaude/agents/korean-prose-editor.md +2 -0
  11. package/plugins/litclaude/agents/korean-style-analyzer.md +2 -0
  12. package/plugins/litclaude/agents/librarian-researcher.md +2 -0
  13. package/plugins/litclaude/agents/lit-executor.md +2 -0
  14. package/plugins/litclaude/agents/lit-planner.md +2 -0
  15. package/plugins/litclaude/agents/lit-verifier.md +2 -0
  16. package/plugins/litclaude/agents/meaning-preservation-auditor.md +2 -0
  17. package/plugins/litclaude/agents/native-flow-reviewer.md +2 -0
  18. package/plugins/litclaude/agents/polish-orchestrator.md +2 -0
  19. package/plugins/litclaude/agents/qa-runner.md +2 -0
  20. package/plugins/litclaude/agents/quality-reviewer.md +2 -0
  21. package/plugins/litclaude/bin/litclaude-hook.js +24 -5
  22. package/plugins/litclaude/bin/litclaude-mcp.js +1 -1
  23. package/plugins/litclaude/commands/litgoal.md +3 -1
  24. package/plugins/litclaude/hooks/lit-band-client.mjs +9 -4
  25. package/plugins/litclaude/hooks/lit-mod.mjs +9 -1
  26. package/plugins/litclaude/lib/canonical-runtime-commitments.mjs +6 -6
  27. package/plugins/litclaude/lib/canonical-skill-resources.mjs +49 -46
  28. package/plugins/litclaude/lib/invite.mjs +131 -0
  29. package/plugins/litclaude/lib/litgoal/autoloop.mjs +57 -8
  30. package/plugins/litclaude/lib/litgoal/cli.mjs +62 -1
  31. package/plugins/litclaude/lib/litgoal/freshness.mjs +55 -0
  32. package/plugins/litclaude/lib/litgoal/ledger.mjs +1 -1
  33. package/plugins/litclaude/lib/litgoal/state.mjs +1 -1
  34. package/plugins/litclaude/lib/litgoal/unknowns.mjs +44 -0
  35. package/plugins/litclaude/lib/mark-logo.png +0 -0
  36. package/plugins/litclaude/lib/mark.mjs +375 -0
  37. package/plugins/litclaude/lib/mod/frame.mjs +88 -19
  38. package/plugins/litclaude/lib/mod/looks.mjs +13 -0
  39. package/plugins/litclaude/lib/mod/motion.mjs +5 -0
  40. package/plugins/litclaude/lib/mod/settings.mjs +5 -2
  41. package/plugins/litclaude/lib/mod/state.mjs +18 -0
  42. package/plugins/litclaude/lib/mod/svg-card.mjs +61 -16
  43. package/plugins/litclaude/lib/mod/timeline.mjs +32 -0
  44. package/plugins/litclaude/lib/mod/view.mjs +8 -3
  45. package/plugins/litclaude/lib/official-build.mjs +22 -0
  46. package/plugins/litclaude/lib/output_mark.py +132 -0
  47. package/plugins/litclaude/lib/owner-lock.mjs +11 -1
  48. package/plugins/litclaude/lib/plan-task-rows.mjs +17 -4
  49. package/plugins/litclaude/lib/render_pages.py +16 -0
  50. package/plugins/litclaude/lib/rewind/collect.mjs +58 -5
  51. package/plugins/litclaude/lib/start-work-lifecycle.mjs +45 -10
  52. package/plugins/litclaude/skills/autoconference/SKILL.md +2 -0
  53. package/plugins/litclaude/skills/autoresearch/SKILL.md +2 -0
  54. package/plugins/litclaude/skills/browser-drive/SKILL.md +2 -0
  55. package/plugins/litclaude/skills/comment-checker/SKILL.md +2 -0
  56. package/plugins/litclaude/skills/debugging/SKILL.md +2 -0
  57. package/plugins/litclaude/skills/deep-interview/SKILL.md +2 -0
  58. package/plugins/litclaude/skills/frontend-ui-ux/SKILL.md +2 -0
  59. package/plugins/litclaude/skills/lit-adhd/SKILL.md +3 -0
  60. package/plugins/litclaude/skills/lit-brainstorm/SKILL.md +2 -0
  61. package/plugins/litclaude/skills/lit-burnoff/SKILL.md +2 -0
  62. package/plugins/litclaude/skills/lit-burnoff-file/SKILL.md +2 -0
  63. package/plugins/litclaude/skills/lit-code/SKILL.md +2 -0
  64. package/plugins/litclaude/skills/lit-commit/SKILL.md +2 -0
  65. package/plugins/litclaude/skills/lit-comprehend/SKILL.md +2 -0
  66. package/plugins/litclaude/skills/lit-crucible/SKILL.md +2 -0
  67. package/plugins/litclaude/skills/lit-diagram-drawer/SKILL.md +3 -1
  68. package/plugins/litclaude/skills/lit-diagram-drawer/scripts/export.mjs +35 -1
  69. package/plugins/litclaude/skills/lit-docx/SKILL.md +2 -0
  70. package/plugins/litclaude/skills/lit-docx/scripts/convert_md_to_docx.py +4 -1
  71. package/plugins/litclaude/skills/lit-docx/scripts/convert_md_to_pdf.py +2 -0
  72. package/plugins/litclaude/skills/lit-handoff/SKILL.md +2 -0
  73. package/plugins/litclaude/skills/lit-hijack/SKILL.md +2 -0
  74. package/plugins/litclaude/skills/lit-humanizer/SKILL.md +2 -0
  75. package/plugins/litclaude/skills/lit-init/SKILL.md +2 -0
  76. package/plugins/litclaude/skills/lit-loop/SKILL.md +2 -0
  77. package/plugins/litclaude/skills/lit-plan/SKILL.md +2 -0
  78. package/plugins/litclaude/skills/lit-pptx/SKILL.md +2 -0
  79. package/plugins/litclaude/skills/lit-pptx/scripts/lib/render-adapter-pptx.js +6 -1
  80. package/plugins/litclaude/skills/lit-recap/SKILL.md +2 -0
  81. package/plugins/litclaude/skills/lit-schematic/SKILL.md +3 -1
  82. package/plugins/litclaude/skills/lit-schematic/scripts/lib/sheet.mjs +10 -0
  83. package/plugins/litclaude/skills/lit-schematic/scripts/lib/svg.mjs +4 -0
  84. package/plugins/litclaude/skills/lit-schematic/scripts/motion.mjs +5 -2
  85. package/plugins/litclaude/skills/lit-schematic/scripts/render.mjs +20 -2
  86. package/plugins/litclaude/skills/lit-scientific-visualization/SKILL.md +2 -0
  87. package/plugins/litclaude/skills/lit-team/SKILL.md +2 -0
  88. package/plugins/litclaude/skills/lit-typographic-motion/SKILL.md +2 -0
  89. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/chrome.mjs +23 -2
  90. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/cover-capture.mjs +14 -1
  91. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/cover.mjs +48 -2
  92. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/encode.mjs +8 -1
  93. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/end-card.mjs +128 -0
  94. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/pipeline.mjs +59 -14
  95. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage-gate.mjs +7 -4
  96. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage.mjs +29 -7
  97. package/plugins/litclaude/skills/lit-typographic-motion/references/studio.md +11 -0
  98. package/plugins/litclaude/skills/litgoal/SKILL.md +53 -1
  99. package/plugins/litclaude/skills/litresearch/SKILL.md +2 -0
  100. package/plugins/litclaude/skills/litwork/SKILL.md +2 -0
  101. package/plugins/litclaude/skills/lsp/SKILL.md +2 -0
  102. package/plugins/litclaude/skills/lsp-setup/SKILL.md +2 -0
  103. package/plugins/litclaude/skills/readme-studio/SKILL.md +3 -1
  104. package/plugins/litclaude/skills/readme-studio/templates/cover-source.json +1 -0
  105. package/plugins/litclaude/skills/readme-studio/templates/hyperframes-cover/index.html +3 -2
  106. package/plugins/litclaude/skills/readme-studio/templates/remotion-cover/package-lock.json +3 -3
  107. package/plugins/litclaude/skills/readme-studio/templates/remotion-cover/package.json +2 -1
  108. package/plugins/litclaude/skills/readme-studio/templates/remotion-cover/src/index.tsx +4 -3
  109. package/plugins/litclaude/skills/refactor/SKILL.md +2 -0
  110. package/plugins/litclaude/skills/review-work/SKILL.md +2 -0
  111. package/plugins/litclaude/skills/rules/SKILL.md +2 -0
  112. package/plugins/litclaude/skills/start-work/SKILL.md +7 -0
  113. package/plugins/litclaude/skills/structural-search/SKILL.md +2 -0
  114. package/plugins/litclaude/skills/visual-qa/SKILL.md +2 -0
  115. package/plugins/litclaude/skills/wikify/SKILL.md +2 -0
  116. package/scripts/doctor.mjs +3 -1
  117. package/scripts/prepublish-test-gate.mjs +75 -22
@@ -15,7 +15,7 @@ import { assetUsed } from "./assets.mjs";
15
15
  import { BLENDER } from "./blender.mjs";
16
16
  import { addToStills, writeBoard } from "./board.mjs";
17
17
  import { BlockedError } from "./chrome.mjs";
18
- import { findFfmpeg, findFfprobe, findImg2webp, previewRungs, startMaster, encodePreview, probeVideo } from "./encode.mjs";
18
+ import { findFfmpeg, findFfprobe, findImg2webp, previewRungs, startMaster, encodePreview, probeVideo, tagStaged } from "./encode.mjs";
19
19
  import { resolveViewed, asBlocked } from "./pipeline.mjs";
20
20
  import { encodePng, rgbaToRgb } from "./png.mjs";
21
21
  import { auditMuxed } from "./sound.mjs";
@@ -29,6 +29,7 @@ import { styleCss, styleScript, readStyle } from "./styles.mjs";
29
29
  import { scanStage, stageFonts } from "./stage-serve.mjs";
30
30
  import { beatCuts, stillsPlan, writeStills } from "./stills.mjs";
31
31
  import { FORMATS, loadTreatment } from "./treatment.mjs";
32
+ import { endCardFrame, endCardPlan, endCardRule, padWavSilence, renderEndCard } from "./end-card.mjs";
32
33
 
33
34
  export const DELIVERABLES = ["film.mp4", "preview.webp", "preview.gif", "poster.png", "reduced-motion.png"];
34
35
  export const DETERMINISM_SAMPLES = Object.freeze({ min: 8, max: 16 });
@@ -380,6 +381,10 @@ export async function renderStage({ out, round = 1, stillsOnly = false, env = pr
380
381
  const stageOut = path.join(runDir, "stage");
381
382
  mkdirSync(stageOut, { recursive: true });
382
383
  const sound = soundTrackFor({ treatment, out, stageDir, frameCount, fps, cutTimes: cuts.map((c) => c / fps), ffmpeg });
384
+ // The track is scored to the film's own frames; the end card after it is silent.
385
+ const cardPlan = endCardPlan({ fps, env });
386
+ const card = cardPlan ? { ...cardPlan, rgba: await renderEndCard({ out, width, height, ground: treatment.style ? readStyle(treatment.style).palette.ground : null, env, log }) } : null;
387
+ if (card) padWavSilence(sound.file, { frames: card.frames, fps });
383
388
  const filmPath = path.join(stageOut, "film.mp4");
384
389
  const encoder = startMaster({ ffmpeg, width, height, fps, out: filmPath, audio: sound.file });
385
390
 
@@ -410,11 +415,13 @@ export async function renderStage({ out, round = 1, stillsOnly = false, env = pr
410
415
  const inflight = [];
411
416
  const maxInflight = pool.workers.length + 1;
412
417
  let poster = null;
418
+ let lastRgba = null;
413
419
  const consume = async (entry) => {
414
420
  const a = await entry.analysis;
415
421
  await encoder.write(a.rgba);
422
+ if (card && entry.f === frameCount - 1) lastRgba = Buffer.from(a.rgba);
416
423
  const flash = detector.push(a.cells);
417
- lines.push({ frame: entry.f, artifact: "master", rgbaSha256: a.rgbaSha256, luminanceP995: a.luminanceP995, luminanceP005: a.luminanceP005, busy: a.busy, flash });
424
+ lines.push({ frame: entry.f, artifact: "master", rgbaSha256: a.rgbaSha256, luminanceP995: a.luminanceP995, luminanceP005: a.luminanceP005, busy: a.busy, flash, ...(entry.endCard ? { endCard: true } : {}) });
418
425
  if (plan.all.has(entry.f)) kept.set(entry.f, a.rgba);
419
426
  if (detFrames.includes(entry.f)) detMaster.set(entry.f, a);
420
427
  if (entry.f % previewEvery === 0) {
@@ -435,6 +442,14 @@ export async function renderStage({ out, round = 1, stillsOnly = false, env = pr
435
442
  if (f % 30 === 0) progress(out, { phase: "master", frame: f, frameCount, round });
436
443
  }
437
444
  while (inflight.length) await consume(inflight.shift());
445
+ // The end card follows the film through the same analysis, encoder, flash detector, log and preview source.
446
+ if (card) {
447
+ for (let k = 0; k < card.frames; k++) {
448
+ const rgba = endCardFrame({ last: lastRgba, card: card.rgba, k, fade: card.fade });
449
+ const png = encodePng(rgbaToRgb(rgba, width, height), width, height, 3, { level: 1 });
450
+ await consume({ f: frameCount + k, analysis: analyzeChecked(pool, png, width, height), endCard: true });
451
+ }
452
+ }
438
453
  const encoded = await encoder.finish();
439
454
  if (encoded.code !== 0) throw new Error(`ffmpeg master encode failed (${encoded.code}): ${encoded.stderr.slice(-400)}`);
440
455
  const masterSec = (Date.now() - tMaster) / 1000;
@@ -454,9 +469,14 @@ export async function renderStage({ out, round = 1, stillsOnly = false, env = pr
454
469
  const qaResult = await qaPromise;
455
470
 
456
471
  progress(out, { phase: "preview", round });
457
- const preview = buildPreview({ out, ffmpeg, env, width, height, frameCount, fps });
472
+ const cardFrames = card?.frames ?? 0;
473
+ const preview = buildPreview({ out, ffmpeg, env, width, height, frameCount: frameCount + cardFrames, fps });
474
+ tagStaged(stageOut, env);
458
475
  const probe = probeVideo(filmPath, env);
459
- const soundAudit = auditMuxed({ ffmpeg, ffprobe: findFfprobe(env), film: filmPath, videoDurationSec: frameCount / fps, mode: sound.mode });
476
+ const soundAudit = auditMuxed({ ffmpeg, ffprobe: findFfprobe(env), film: filmPath, videoDurationSec: (frameCount + cardFrames) / fps, mode: sound.mode });
477
+ // The film's content rules judge its own frames; the flash audit reads every frame, end card included.
478
+ const filmLines = lines.filter((l) => !l.endCard);
479
+ const cardRule = card ? endCardRule({ lines: lines.filter((l) => l.endCard), plan: card, fps }) : null;
460
480
  const exports = {
461
481
  film: existsSync(filmPath) ? { bytes: statSync(filmPath).size } : null,
462
482
  preview: preview.file ? { bytes: preview.bytes, kind: path.extname(preview.file).slice(1) } : null,
@@ -465,8 +485,9 @@ export async function renderStage({ out, round = 1, stillsOnly = false, env = pr
465
485
  };
466
486
  const gate = evaluateStageGate({
467
487
  masterFlash: lines.map((l) => l.flash), previewFlash: preview.records ? { records: preview.records, fps: preview.rung.fps } : null, fps,
468
- probe, width, height, treatment, exports, reducedFrame: plan.reduced, frames: lines, usesWebGL: finalState.usesWebGL, renderer: finalState.webglRenderer, rung: ctx.rung,
469
- determinism, extraRules: [...soundAudit.rules, ...(qaResult?.rules ?? []), assetUsed(treatment, scan.files)].filter(Boolean),
488
+ probe, width, height, treatment, exports, reducedFrame: plan.reduced, frames: filmLines, usesWebGL: finalState.usesWebGL, renderer: finalState.webglRenderer, rung: ctx.rung,
489
+ endCardSec: card ? card.sec : 0,
490
+ determinism, extraRules: [...soundAudit.rules, ...(qaResult?.rules ?? []), assetUsed(treatment, scan.files), cardRule].filter(Boolean),
470
491
  });
471
492
  const promoted = promote(out, gate.flashFail);
472
493
  const loc = (name) => path.join(promoted.dir, name);
@@ -476,7 +497,8 @@ export async function renderStage({ out, round = 1, stillsOnly = false, env = pr
476
497
  if (gate.pass && !promoted.withheld) recordHouse(out, { style: treatment.style, path: "stage", format: treatment.format, durationSec: treatment.durationSec });
477
498
  const totalSec = (Date.now() - t0) / 1000;
478
499
  const manifest = {
479
- schemaVersion: 1, path: "stage", renderId: id, round, treatmentSha256: treatmentSha(out), format: treatment.format, width, height, fps, durationSec: spec.duration, treatmentDurationSec: treatment.durationSec,
500
+ schemaVersion: 1, path: "stage", renderId: id, round, treatmentSha256: treatmentSha(out), format: treatment.format, width, height, fps, durationSec: +(spec.duration + (card?.sec ?? 0)).toFixed(6), treatmentDurationSec: treatment.durationSec,
501
+ endCard: card ? { frames: card.frames, fade: card.fade, sec: +card.sec.toFixed(6) } : null,
480
502
  frameCount, seed: treatment.seed, renderer: finalState.webglRenderer ?? "no WebGL", rung: ctx.rung, chromeFlags: master.flags, usesWebGL: finalState.usesWebGL,
481
503
  cuts, stills: { sha256: stills.sha256, poster: plan.poster, reduced: plan.reduced }, posterEncoding: poster,
482
504
  geometry: geometryFor(width, height),
@@ -238,6 +238,17 @@ house style and later films are appended. While it exists the validator holds ne
238
238
  to the house style; a request that names another style wins for that film and does not move the house
239
239
  style. To change the house style, edit `style` in the file or delete it.
240
240
 
241
+ ## LitClaude's credit card and cover mark
242
+
243
+ When the user's LitClaude mark setting is `on` (the default), the renderer adds LitClaude's
244
+ credit after the film's last beat: about 0.5 s on the style's ground with the flame logo and "made with LitClaude" centred,
245
+ reached by a short crossfade, silent (the track is padded), with no camera move. The treatment, the beats
246
+ and the page stay as written; write no credit of your own. The film's length rule, dead air, flat-frame
247
+ and near-black rules judge the film's own frames; the flash audit and the full-frame step rule see the
248
+ card too, and `END-CARD` in the gate report checks it. The manifest records it as `endCard`, and
249
+ `durationSec` includes it. A cover loop gets a small static corner mark instead, placed clear of the
250
+ title and art boxes and recorded as `mark` in the cover manifest. `meta` and `off` draw neither.
251
+
241
252
  ## What stays free
242
253
 
243
254
  The subject, the idea, the copy, the drawing, the hero moves and the arc stay the model's, with the
@@ -206,6 +206,13 @@ Safety (the loop can never trap a session):
206
206
  fails safe and allows stopping.
207
207
  - **Escape hatches** — `LITCLAUDE_GOAL_OFF=1` (env kill switch), or
208
208
  `litclaude-ai litgoal checkpoint --status blocked` / `--status complete` to end the loop.
209
+ - **Stale passes reopen first** — before deciding, the hook re-hashes every input a passing
210
+ criterion was bound to (see Evidence Freshness); a changed or missing input turns that pass
211
+ into `stale` and the loop keeps going instead of completing.
212
+ - **User-only questions stop the loop** — when every criterion passes but open critical unknowns
213
+ remain, an open KU or UU keeps the loop running (Claude can probe it), while a set made only of
214
+ UK questions ends the session with `continue:false`, lists the questions, and moves the goal to
215
+ `needs_user_decision` instead of `complete`. Looping cannot answer a question only the user can.
209
216
 
210
217
  Prefer `--autoloop` when the user wants hands-off autonomous completion of a multi-criteria goal;
211
218
  otherwise the user-typed `/goal` proposal above remains available and they compose cleanly.
@@ -278,6 +285,48 @@ payload must fail with a controlled CLI error. A missing criterion id must fail
278
285
  with a controlled state error. Never record `pass` while a QA resource is still
279
286
  alive or while the artifact is only a dry-run claim.
280
287
 
288
+ ### Evidence Freshness
289
+
290
+ A file that existed when a check ran is not proof that the check is still current. Bind a pass
291
+ to the files it was observed on:
292
+
293
+ ```sh
294
+ litclaude-ai litgoal record-evidence --criterion criterion-1 --status pass \
295
+ --inputs dist/report.json,src/parser.mjs --reviewed docs/spec.md \
296
+ --json '{"artifact":"dist/report.json"}'
297
+ ```
298
+
299
+ `--inputs` (repeatable or comma-separated) records each file's absolute path and SHA-256 as
300
+ `role: "input"`; `--reviewed` does the same for the artifact a human review looked at
301
+ (`role: "reviewed"`), so review evidence is bound to the version that was reviewed. The runtime
302
+ owns the `inputs` field; an `inputs` key inside `--json` is refused, and so is a path that is
303
+ not a readable regular file. `status`, `checkpoint --status complete` and the autoloop Stop hook
304
+ re-hash those files: when one changed or vanished, the criterion becomes `stale` with
305
+ `staleInputs` naming each file and `changed` or `missing`, the ledger gets `evidence.stale`, and
306
+ completion is refused until fresh evidence is recorded.
307
+
308
+ ### Unknown Register
309
+
310
+ Reduce unknowns while the work runs, not only while it is planned:
311
+
312
+ ```sh
313
+ litclaude-ai litgoal unknown add --kind KK --text "<fact>" --source "<where it is stated>" --json
314
+ litclaude-ai litgoal unknown add --kind KU --text "<question>" --probe "<command or check>" --critical --json
315
+ litclaude-ai litgoal unknown resolve --id unknown-2 --evidence "<what answered it>" --json
316
+ litclaude-ai litgoal unknown list --json
317
+ ```
318
+
319
+ | Kind | Meaning | Required |
320
+ |---|---|---|
321
+ | KK | known known | `--source`; stored as `known` |
322
+ | KU | known unknown: Claude can check it | `--probe`; stays `open` |
323
+ | UK | unknown known: only the user can answer | `--probe` (usually "ask the user"); stays `open` |
324
+ | UU | unknown unknown that surfaced mid-run | `--probe`; stays `open` |
325
+
326
+ Closing an item needs `--evidence`. Any open item marked `--critical` blocks
327
+ `checkpoint --status complete` and autoloop completion. Ledger events are `unknown.added` and
328
+ `unknown.resolved`.
329
+
281
330
  ## Manual-QA Channels
282
331
 
283
332
  Manual-QA channels are required for criterion completion.
@@ -306,7 +355,8 @@ litclaude-ai litgoal checkpoint --status complete --note "<evidence summary>" --
306
355
  ```
307
356
 
308
357
  The runtime must reject `--status complete` until every criterion in
309
- `.litclaude/litgoal/goals.json` is `pass`. If completion is rejected, inspect
358
+ `.litclaude/litgoal/goals.json` is `pass` (a stale pass does not count) and no critical unknown
359
+ is open. If completion is rejected, inspect
310
360
  `criteria --json`, fix or record the pending criterion, and retry.
311
361
 
312
362
  ## Steering
@@ -371,3 +421,5 @@ Stop and surface the state when:
371
421
  or worktree cannot be cleaned up.
372
422
 
373
423
  Leftover runtime state means `blocked`, not `pass`.
424
+
425
+ <!-- LitClaude © 2026 wjgoarxiv · MIT · github.com/wjgoarxiv/litclaude · fp:182f034d168c -->
@@ -661,3 +661,5 @@ Record the stop condition: `local evidence sufficient`, `external host facts not
661
661
  needed`, or `external fact unresolved but not blocking`. This keeps litresearch
662
662
  compatible with minimum-first execution while preserving its evidence discipline
663
663
  for genuinely broad investigations.
664
+
665
+ <!-- LitClaude © 2026 wjgoarxiv · MIT · github.com/wjgoarxiv/litclaude · fp:668067cfc2cd -->
@@ -626,3 +626,5 @@ history-safety detail when the operation grows past a single commit.
626
626
  - On resume, re-read the notepad and the latest `git status` before continuing.
627
627
  Plans, handoffs, package metadata, test output, and resumed ledgers all drift
628
628
  between turns.
629
+
630
+ <!-- LitClaude © 2026 wjgoarxiv · MIT · github.com/wjgoarxiv/litclaude · fp:7ae19a889d31 -->
@@ -138,3 +138,5 @@ Record the command or tool used and the diagnostic result. Good examples:
138
138
  Diagnostics are signals, not noise. Do not suppress them. If an LSP failure is
139
139
  unrelated to the change, label it as pre-existing with the exact output and
140
140
  continue only when the task can be safely completed without hiding it.
141
+
142
+ <!-- LitClaude © 2026 wjgoarxiv · MIT · github.com/wjgoarxiv/litclaude · fp:c3341f4f5a65 -->
@@ -226,3 +226,5 @@ If Claude Code does not expose LSP tools and a server is not installed, do not
226
226
  fabricate a passing diagnostics result. Fall back to the project's own commands
227
227
  (`tsc --noEmit`, `ruff`, `cargo check`, `go test`, etc.), label the LSP gap as a
228
228
  controlled skip, and report it — consistent with the `lsp` skill's failure rules.
229
+
230
+ <!-- LitClaude © 2026 wjgoarxiv · MIT · github.com/wjgoarxiv/litclaude · fp:3dd28ec5d7f0 -->
@@ -61,7 +61,7 @@ After the reads of step 1 and the capability probe of step 3, and before any typ
61
61
 
62
62
  The tool adds "Other" itself, so no Other option is written. Skip a question when the prompt already names its answer (a static or animated cover, a renderer, "plain Markdown", an existing cover to keep) or the user hands the choice over ("알아서", "you choose", "just make it good"): take the Recommended option and say so in the reply. When `AskUserQuestion` is unavailable (a non-interactive `claude -p` run), pick the Recommended option of each question, say so in one line ("Non-interactive run: building the animated cover with a decorated README on Remotion, the recommended options"), and continue. Review, plan and keyword-only requests stay read-only and ask nothing.
63
63
 
64
- 4. Read `references/type-and-background.md`. Resolve Pretendard and Meslo LGS NF from explicit local files with license evidence; no system-font install or silent fallback. Use the isolated typography template to shape the title, Korean/prose and technical labels to SVG paths. Preserve editable strings, font identity, hashes and licenses in `cover-source.json`. Validate glyph coverage and inspect outlines. Generate dark ink for light fields and light ink for dark fields; external SVGs do not inherit CSS text color.
64
+ 4. Read `references/type-and-background.md`. Resolve Pretendard and Meslo LGS NF from explicit local files with license evidence; no system-font install or silent fallback. Use the isolated typography template to shape the title, Korean/prose and technical labels to SVG paths. Preserve editable strings, font identity, hashes and licenses in `cover-source.json`. Validate glyph coverage and inspect outlines. Generate dark ink for light fields and light ink for dark fields; external SVGs do not inherit CSS text color. Then run the mark helper `../../lib/mark.mjs` (relative to this skill) with `node`: when it prints `"visible":true`, shape its `text` ("made with LitClaude") the same way into `mark-dark.svg` and `mark-light.svg` (Pretendard, `--tracking 0.02`), put the flame logo it names as `logo` left of the text in both files (an `<image>` with the PNG as a `data:image/png;base64` URI, `logoScale` times the font size square, `logoGap` em from the text, centred on the x-height) and keep the templates' small corner mark (`mark: true`, `data-mark="on"`); otherwise set `mark: false` / `data-mark="off"` and `"mark": {"visible": false}` in `cover-source.json`. The mark is LitClaude's own credit, governed by the user's LitClaude mark setting.
65
65
  5. Read `references/render-and-deliver.md`. Select a renderer after checking the tool, license and prerequisites: pinned Remotion is preferred where compatible; pinned HyperFrames is the HTML alternative. Copy a template into a fresh task/project directory and install only there when authorized. Keep its lockfile. Do not depend on another repository, personal cache or global installation. Render to fresh filenames, never overwrite prior evidence or switch engines silently.
66
66
  6. Compose a distinctive cover from separate layers: real background, controllable Gaussian blur, static seeded grain, lighting falloff/glow, depth, original crisp pixel artwork and sharp outlined type. Keep the first frame identifiable and type legible. Deliver a 60fps, five-second master with deliberate easing, quick entry and readable hold, static posters and optimized inline animation. Target at most 2.5 MiB per inline GIF; record fps/size reductions honestly. An oversized preview needs an explicit delivery decision, not a hidden omission.
67
67
  7. Read `references/decoration-and-navigation.md`, then assemble a decorated, selectable README: centered hero, restrained emoji section labels, verified badge/logo row when useful, feature grid where it stays readable, optional `<details>` for secondary material, and footer navigation to checked targets. Keep purpose, immediate quick start, real features/demo and support/docs/license information visible as selectable text. Use local `<picture>` sources with reduced-motion posters first, light/dark and mobile variants actually rendered, and a static `<img>` fallback. If a registry strips HTML, select the plain-Markdown hero and ordinary headings/lists. Link the MP4 separately; arbitrary video HTML is not assumed to work in README renderers. Every claim and endpoint still requires direct source/target inspection; the structure checker does not establish truth.
@@ -94,3 +94,5 @@ No credential reads, login attempts, host configuration edits, unapproved instal
94
94
  ## #contract.anti_patterns
95
95
 
96
96
  Do not substitute a contract for an authorized build, a supplied background for native generation evidence, a structure check for claim truth, a screenshot for working motion, or local preview for hosted renderer acceptance. Do not hide wrong title text, missing glyphs, dark ink on dark backgrounds or an over-budget preview.
97
+
98
+ <!-- LitClaude © 2026 wjgoarxiv · MIT · github.com/wjgoarxiv/litclaude · fp:f487e12194ad -->
@@ -16,6 +16,7 @@
16
16
  "variant": "restrained"
17
17
  },
18
18
  "assets": [],
19
+ "mark": {"text": "made with LitClaude", "visible": true},
19
20
  "stages": {"facts": "pending", "background": "pending", "type": "pending", "render": "pending", "inspection": "pending"},
20
21
  "hosted_render": "POST_PUBLICATION_UNVERIFIED"
21
22
  }
@@ -16,15 +16,16 @@
16
16
  .type img{display:block;width:100%}.type .label{width:58%;max-height:40px;object-fit:contain;object-position:left}.type .title{margin-top:36px}.type .subtitle{width:90%}.rule{width:64px;height:5px;background:#c64d2e;margin:28px 0}
17
17
  .pixel{position:absolute;z-index:6;width:400px;right:100px;bottom:125px;animation:float 5s ease-in-out both}
18
18
  .line{position:absolute;bottom:40px;left:80px;right:80px;border-top:1px solid var(--ink)}
19
+ .litclaude-mark{position:absolute;z-index:7;right:80px;bottom:12px;height:16px;opacity:.6}#cover[data-layout=mobile] .litclaude-mark{right:54px}#cover[data-mark=off] .litclaude-mark{display:none}
19
20
  #cover[data-layout=mobile]{width:800px;height:1000px}#cover[data-layout=mobile] .type{left:54px;top:100px;width:692px;padding:30px}#cover[data-layout=mobile] .pixel{width:300px;right:80px;bottom:65px}#cover[data-layout=mobile] .rim-light{left:110px;top:20px;width:580px;height:56px;filter:blur(10px);opacity:.9;transform:none}
20
21
  @keyframes depth{0%,100%{transform:scale(1.04)}50%{transform:scale(1.055)}}
21
22
  @keyframes entry{0%,100%{transform:translateY(16px)}8%,88%{transform:translateY(0)}}
22
23
  @keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-14px)}}
23
24
  @media(prefers-reduced-motion:reduce){.depth-far,.depth-mid,.glow,.type,.pixel{animation:none;transform:none}}
24
25
  </style></head><body>
25
- <main id="cover" data-composition-id="readme-cover" data-start="0" data-duration="5" data-width="1600" data-height="800" data-no-timeline data-theme="light" data-layout="wide">
26
+ <main id="cover" data-composition-id="readme-cover" data-start="0" data-duration="5" data-width="1600" data-height="800" data-no-timeline data-theme="light" data-layout="wide" data-mark="on">
26
27
  <img class="background depth-far" src="assets/background.png" alt=""><img class="background depth-mid" src="assets/background.png" alt=""><div class="light"></div><div class="glow"></div>
27
28
  <svg class="grain"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency=".65" numOctaves="3" seed="19" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(#noise)"/></svg>
28
29
  <div class="rim-light" data-light-zone="open-background" aria-hidden="true"></div><section class="type foreground-plane"><img class="label" src="assets/label-dark.svg" alt="Technical label"><img class="title" src="assets/title-dark.svg" alt="Project title"><div class="rule"></div><img class="subtitle" src="assets/subtitle-dark.svg" alt="Project purpose"></section>
29
- <svg class="pixel" viewBox="0 0 20 20" shape-rendering="crispEdges" aria-label="Original pixel notebook motif"><path fill="var(--paper)" d="M3 1h12v2h2v15H3z"/><path fill="var(--ink)" d="M3 1h12v2H5v13h10V3h2v15H3zM7 5h6v1H7zM7 8h6v1H7zM7 11h4v1H7z"/><path fill="#c64d2e" d="M1 4h4v2H1zM1 9h4v2H1zM1 14h4v2H1zM13 13h5v2h-5z"/></svg><div class="line"></div>
30
+ <svg class="pixel" viewBox="0 0 20 20" shape-rendering="crispEdges" aria-label="Original pixel notebook motif"><path fill="var(--paper)" d="M3 1h12v2h2v15H3z"/><path fill="var(--ink)" d="M3 1h12v2H5v13h10V3h2v15H3zM7 5h6v1H7zM7 8h6v1H7zM7 11h4v1H7z"/><path fill="#c64d2e" d="M1 4h4v2H1zM1 9h4v2H1zM1 14h4v2H1zM13 13h5v2h-5z"/></svg><div class="line"></div><img class="litclaude-mark" src="assets/mark-dark.svg" alt="">
30
31
  </main></body></html>
@@ -3771,9 +3771,9 @@
3771
3771
  "license": "ISC"
3772
3772
  },
3773
3773
  "node_modules/zod": {
3774
- "version": "4.5.4",
3775
- "resolved": "https://registry.npmjs.org/zod/-/zod-4.5.4.tgz",
3776
- "integrity": "sha512-sC95tT5iHHH9gtpj6A81kh+NEaRAUFN+qlUPDUbRfOMvNf5QCBqsb3WgvnpVtK5Y+4UfA6KqufotuTvMGiTlsA==",
3774
+ "version": "4.6.6",
3775
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.6.tgz",
3776
+ "integrity": "sha512-4UmzQUF5fxvfcYHlbjBmejU+w+hbDnWFx4aS8kBx7nPBHcO2SqPbpAG8snbdg+Xse4pRefR98hgjFgIMCI/UhA==",
3777
3777
  "license": "MIT",
3778
3778
  "funding": {
3779
3779
  "url": "https://github.com/sponsors/colinhacks"
@@ -3,5 +3,6 @@
3
3
  "private": true,
4
4
  "type": "module",
5
5
  "scripts": {"compositions": "remotion compositions src/index.tsx", "render": "remotion render", "still": "remotion still"},
6
- "dependencies": {"remotion": "4.0.526", "@remotion/cli": "4.0.526", "react": "19.3.0", "react-dom": "19.3.0"}
6
+ "dependencies": {"remotion": "4.0.526", "@remotion/cli": "4.0.526", "react": "19.3.0", "react-dom": "19.3.0"},
7
+ "overrides": {"zod": "4.6.6"}
7
8
  }
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import {AbsoluteFill, Composition, Easing, Img, interpolate, registerRoot, staticFile, useCurrentFrame, useVideoConfig} from 'remotion';
3
3
 
4
- type CoverProps = {dark: boolean; mobile: boolean; blur: number; grain: number; expressive: boolean};
4
+ type CoverProps = {dark: boolean; mobile: boolean; blur: number; grain: number; expressive: boolean; mark: boolean};
5
5
 
6
- const Cover: React.FC<CoverProps> = ({dark, mobile, blur, grain, expressive}) => {
6
+ const Cover: React.FC<CoverProps> = ({dark, mobile, blur, grain, expressive, mark}) => {
7
7
  const frame = useCurrentFrame();
8
8
  const {durationInFrames} = useVideoConfig();
9
9
  const phase = frame / (durationInFrames - 1);
@@ -29,8 +29,9 @@ const Cover: React.FC<CoverProps> = ({dark, mobile, blur, grain, expressive}) =>
29
29
  <path fill={paper} d="M3 1h12v2h2v15H3z"/><path fill={color} d="M3 1h12v2H5v13h10V3h2v15H3zM7 5h6v1H7zM7 8h6v1H7zM7 11h4v1H7z"/><path fill="#c64d2e" d="M1 4h4v2H1zM1 9h4v2H1zM1 14h4v2H1zM13 13h5v2h-5z"/>
30
30
  </svg>
31
31
  <div style={{position: 'absolute', left: pad, right: pad, bottom: 40, borderTop: `1px solid ${color}88`}}/>
32
+ {mark ? <Img className="litclaude-mark" src={staticFile(`mark-${ink}.svg`)} style={{position: 'absolute', zIndex: 7, right: pad, bottom: 12, height: 16, opacity: 0.6}}/> : null}
32
33
  </AbsoluteFill>;
33
34
  };
34
35
 
35
- const Root = () => <>{[false,true].flatMap(mobile => [false,true].map(dark => <Composition key={`${mobile}-${dark}`} id={`Cover${mobile ? 'Mobile' : 'Wide'}${dark ? 'Dark' : 'Light'}`} component={Cover} width={mobile ? 800 : 1600} height={mobile ? 1000 : 800} fps={60} durationInFrames={300} defaultProps={{dark,mobile,blur:2,grain:0.06,expressive:false}}/>))}</>;
36
+ const Root = () => <>{[false,true].flatMap(mobile => [false,true].map(dark => <Composition key={`${mobile}-${dark}`} id={`Cover${mobile ? 'Mobile' : 'Wide'}${dark ? 'Dark' : 'Light'}`} component={Cover} width={mobile ? 800 : 1600} height={mobile ? 1000 : 800} fps={60} durationInFrames={300} defaultProps={{dark,mobile,blur:2,grain:0.06,expressive:false,mark:true}}/>))}</>;
36
37
  registerRoot(Root);
@@ -519,3 +519,5 @@ When you hit a deprecated method or API during a refactor:
519
519
 
520
520
  Refactoring without tests is reckless. Refactoring without understanding the
521
521
  impact zone is destructive. This workflow ensures you do neither.
522
+
523
+ <!-- LitClaude © 2026 wjgoarxiv · MIT · github.com/wjgoarxiv/litclaude · fp:eafbf36da346 -->
@@ -817,3 +817,5 @@ without explicit approval? Did verification rewrite local handoff state or
817
817
  generated files outside scope? A passing review includes a cleanup receipt that
818
818
  answers these questions directly. If the receipt is absent, the overall verdict
819
819
  is at least BLOCKED even when code and tests are correct.
820
+
821
+ <!-- LitClaude © 2026 wjgoarxiv · MIT · github.com/wjgoarxiv/litclaude · fp:58a03c9f9652 -->
@@ -171,3 +171,5 @@ Post-edit output is conditional, not a fixed reminder. It names only what the ed
171
171
  Rules work is verified by hook tests and real hook invocation. For this repo,
172
172
  use `test/hooks.test.mjs` and a CLI invocation of
173
173
  `plugins/litclaude/bin/litclaude-hook.js` with concrete JSON input.
174
+
175
+ <!-- LitClaude © 2026 wjgoarxiv · MIT · github.com/wjgoarxiv/litclaude · fp:427bda236421 -->
@@ -239,6 +239,11 @@ unavailable:
239
239
  its last checkbox, so do not ask the user to set a goal before executing.
240
240
  - Do not auto-type or send `/goal` text from a skill; if the user invokes `/goal`, respect it.
241
241
 
242
+ When a top-level task cannot move until the user acts, write `BLOCKED: <reason>` on its
243
+ line or as an indented body line under it. The Stop continuation skips such tasks; when
244
+ every open task is blocked it tells the user once and lets the session stop. Removing the
245
+ marker, or the user's reply, resumes the run.
246
+
242
247
  If model-facing goal tools are absent (the case today), continue with Boulder/ledger discipline.
243
248
  If goal tools are not exposed, do not print repeated fallback status; just keep
244
249
  the plan ledger accurate and continue with verified evidence.
@@ -527,3 +532,5 @@ dirty for the same reason and were not rewritten by formatting, tooling, or
527
532
  careless broad commands. The final cleanup receipt should say that no temporary
528
533
  files, spawned sessions, package publishes, commits, tags, or version bumps were
529
534
  created unless the user explicitly requested them.
535
+
536
+ <!-- LitClaude © 2026 wjgoarxiv · MIT · github.com/wjgoarxiv/litclaude · fp:89fd940d84ec -->
@@ -270,3 +270,5 @@ unpinned payload files. If a future need proves otherwise, add them then, and pi
270
270
  Stop when the report names its `query_class`, its engine and version, its scope with exclusions,
271
271
  and its count or blocker. A structural claim without a quoted probe is not finished work — it is
272
272
  an assumption about the host, and this skill exists because that assumption is often wrong.
273
+
274
+ <!-- LitClaude © 2026 wjgoarxiv · MIT · github.com/wjgoarxiv/litclaude · fp:463c72c136f7 -->
@@ -72,3 +72,5 @@ Require the canonical `litfamily.design-contract/v1beta2` from `schemas/design-c
72
72
  ## #contract.anti_patterns
73
73
 
74
74
  Never substitute HTTP success for rendering, a file path for verified image bytes, similarity for semantics, or same-context review for independence.
75
+
76
+ <!-- LitClaude © 2026 wjgoarxiv · MIT · github.com/wjgoarxiv/litclaude · fp:4aa1e9a577ea -->
@@ -137,3 +137,5 @@ always remains visible; protected structured or audit artifacts retain their sch
137
137
  - Accepting a claim during capture, querying review-needed records, emitting an empty knowledge wrapper, or treating a
138
138
  derived index, summary, or manifest as authority.
139
139
  - Skipping `review-work`, stale-state checks, or `lit-recap`/`handoff` continuity after material operations.
140
+
141
+ <!-- LitClaude © 2026 wjgoarxiv · MIT · github.com/wjgoarxiv/litclaude · fp:24f72ed51bcd -->
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawnSync } from "node:child_process";
3
- import { existsSync } from "node:fs";
3
+ import { existsSync, readFileSync } from "node:fs";
4
4
  import { join, resolve } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
6
6
  import {
@@ -10,6 +10,7 @@ import {
10
10
  import { verifyCanonicalSkillResources } from "../plugins/litclaude/lib/skill-resource-integrity.mjs";
11
11
  import { verifyCanonicalFrontendCorpus } from "../plugins/litclaude/lib/canonical-frontend-corpus.mjs";
12
12
  import { verifyCanonicalRuntimeClosures } from "../plugins/litclaude/lib/canonical-runtime-closures.mjs";
13
+ import { officialBuildLines } from "../plugins/litclaude/lib/official-build.mjs";
13
14
 
14
15
  const root = resolve(fileURLToPath(new URL("..", import.meta.url)));
15
16
 
@@ -104,4 +105,5 @@ process.stdout.write("\nLITGOAL_RUNTIME_PASS\n");
104
105
  process.stdout.write("START_WORK_LIFECYCLE_PASS: schema-3 bounded-authority runtime enrolled\n");
105
106
  process.stdout.write("START_WORK_HOST_HOOKS_PASS: PreToolUse, SubagentStart, SubagentStop, SessionEnd, and Stop enrolled\n");
106
107
  process.stdout.write("BUNDLED_SKILLS_PAYLOAD_PASS\n");
108
+ for (const line of officialBuildLines(JSON.parse(readFileSync(join(root, "package.json"), "utf8")))) process.stdout.write(`${line}\n`);
107
109
  process.stdout.write("\nDOCTOR_PASS\n");
@@ -1,26 +1,79 @@
1
1
  import { spawnSync } from "node:child_process";
2
+ import { resolve } from "node:path";
3
+ import { fileURLToPath } from "node:url";
2
4
 
3
- const env = Object.fromEntries(
4
- Object.entries(process.env).filter(([key]) => key.toLowerCase() !== "npm_config_dry_run"),
5
- );
6
- const npmExecPath = process.env.npm_execpath;
7
- const result = npmExecPath
8
- ? spawnSync(process.execPath, [npmExecPath, "test"], { env, stdio: "inherit" })
9
- : spawnSync(process.platform === "win32" ? "npm.cmd" : "npm", ["test"], {
10
- env,
11
- shell: process.platform === "win32",
12
- stdio: "inherit",
13
- });
5
+ // publish.yml sets LITCLAUDE_PUBLISH_FROM_CI. There the suite has already run in ci.yml, so the gate
6
+ // only proves that ci.yml passed on this exact, unmodified commit and refuses the publish otherwise.
7
+ // Everywhere else (a local npm publish, ci.yml itself) the full suite runs as before.
8
+ export async function ciVerdict({ env, fetchImpl = fetch, git = runGit }) {
9
+ const sha = env.GITHUB_SHA ?? "";
10
+ const repository = env.GITHUB_REPOSITORY ?? "";
11
+ if (env.GITHUB_ACTIONS !== "true" || !/^[0-9a-f]{40}$/u.test(sha) || !/^[\w.-]+\/[\w.-]+$/u.test(repository)) {
12
+ return { ok: false, reason: "not a GitHub Actions run with a commit and repository" };
13
+ }
14
+ if (git(["rev-parse", "HEAD"]) !== sha) return { ok: false, reason: `checkout is not ${sha}` };
15
+ if (git(["status", "--porcelain"]) !== "") return { ok: false, reason: "checkout has local changes" };
16
+ const url = `https://api.github.com/repos/${repository}/actions/workflows/ci.yml/runs`
17
+ + `?head_sha=${sha}&status=success&event=push&per_page=1`;
18
+ const headers = { accept: "application/vnd.github+json" };
19
+ if (env.GITHUB_TOKEN) headers.authorization = `Bearer ${env.GITHUB_TOKEN}`;
20
+ let body;
21
+ try {
22
+ const response = await fetchImpl(url, { headers });
23
+ if (!response.ok) return { ok: false, reason: `GitHub API answered ${response.status}` };
24
+ body = await response.json();
25
+ } catch (error) {
26
+ return { ok: false, reason: `GitHub API unreachable: ${error instanceof Error ? error.message : String(error)}` };
27
+ }
28
+ const run = Array.isArray(body?.workflow_runs) ? body.workflow_runs[0] : undefined;
29
+ if (run?.head_sha !== sha || run?.conclusion !== "success") {
30
+ return { ok: false, reason: `no successful ci.yml push run for ${sha}` };
31
+ }
32
+ return { ok: true, reason: `ci.yml run ${run.id} passed on ${sha}` };
33
+ }
34
+
35
+ function runGit(args) {
36
+ const result = spawnSync("git", args, { encoding: "utf8" });
37
+ return result.status === 0 ? result.stdout.trim() : null;
38
+ }
39
+
40
+ function runSuite() {
41
+ const env = Object.fromEntries(
42
+ Object.entries(process.env).filter(([key]) => key.toLowerCase() !== "npm_config_dry_run"),
43
+ );
44
+ const npmExecPath = process.env.npm_execpath;
45
+ const result = npmExecPath
46
+ ? spawnSync(process.execPath, [npmExecPath, "test"], { env, stdio: "inherit" })
47
+ : spawnSync(process.platform === "win32" ? "npm.cmd" : "npm", ["test"], {
48
+ env,
49
+ shell: process.platform === "win32",
50
+ stdio: "inherit",
51
+ });
52
+
53
+ if (result.error) {
54
+ console.error(`prepublish test gate could not start npm test: ${result.error.message}`);
55
+ process.exitCode = 1;
56
+ } else if (result.signal) {
57
+ console.error(`prepublish test gate interrupted by ${result.signal}`);
58
+ process.exitCode = 1;
59
+ } else if (Number.isInteger(result.status)) {
60
+ process.exitCode = result.status;
61
+ } else {
62
+ console.error("prepublish test gate received a non-integer npm test exit status");
63
+ process.exitCode = 1;
64
+ }
65
+ }
14
66
 
15
- if (result.error) {
16
- console.error(`prepublish test gate could not start npm test: ${result.error.message}`);
17
- process.exitCode = 1;
18
- } else if (result.signal) {
19
- console.error(`prepublish test gate interrupted by ${result.signal}`);
20
- process.exitCode = 1;
21
- } else if (Number.isInteger(result.status)) {
22
- process.exitCode = result.status;
23
- } else {
24
- console.error("prepublish test gate received a non-integer npm test exit status");
25
- process.exitCode = 1;
67
+ if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
68
+ if (process.env.LITCLAUDE_PUBLISH_FROM_CI === "1") {
69
+ const verdict = await ciVerdict({ env: process.env });
70
+ if (verdict.ok) {
71
+ console.log(`prepublish test gate: ${verdict.reason}; the suite is not run again`);
72
+ } else {
73
+ console.error(`prepublish test gate refused: ${verdict.reason}`);
74
+ process.exitCode = 1;
75
+ }
76
+ } else {
77
+ runSuite();
78
+ }
26
79
  }