@litfamily/litmuse 0.1.0 → 0.1.2

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 (176) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +115 -26
  3. package/README_ko-KR.md +112 -23
  4. package/bin/litmuse.mjs +4 -0
  5. package/docs/assets/card/after.webp +0 -0
  6. package/docs/assets/card/idle.webp +0 -0
  7. package/docs/assets/card/working.webp +0 -0
  8. package/docs/assets/handoff/latest.webp +0 -0
  9. package/docs/assets/handoff/saved.webp +0 -0
  10. package/docs/assets/readme/demo.webp +0 -0
  11. package/lib/stage-card.mjs +180 -5
  12. package/package.json +7 -1
  13. package/plugin/.muse-plugin/plugin.json +26 -11
  14. package/plugin/commands/lit-status.md +2 -1
  15. package/plugin/commands/lit.md +1 -1
  16. package/plugin/hooks/lib/digest.mjs +1 -1
  17. package/plugin/hooks/lib/next-step.mjs +68 -0
  18. package/plugin/hooks/lib/routes.mjs +59 -0
  19. package/plugin/hooks/lib/workflow-stack.mjs +318 -0
  20. package/plugin/hooks/session-start.mjs +29 -2
  21. package/plugin/hooks/user-prompt-submit.mjs +138 -7
  22. package/plugin/lib/capped-fetch.mjs +25 -0
  23. package/plugin/lib/pinned-fetch.mjs +79 -0
  24. package/plugin/lib/plan-task-rows.mjs +32 -0
  25. package/plugin/lib/render_pages.py +29 -1
  26. package/plugin/lib/rewind/collect.mjs +679 -0
  27. package/plugin/lib/rewind/gauge.mjs +72 -0
  28. package/plugin/lib/rewind/next-step.mjs +91 -0
  29. package/plugin/lib/rewind/redact.mjs +83 -0
  30. package/plugin/lib/rewind/transcripts.mjs +227 -0
  31. package/plugin/skills/frontend-ui-ux/SKILL.md +24 -9
  32. package/plugin/skills/frontend-ui-ux/kit/components.css +414 -0
  33. package/plugin/skills/frontend-ui-ux/kit/fonts.json +22 -0
  34. package/plugin/skills/frontend-ui-ux/kit/layouts/landing.html +164 -0
  35. package/plugin/skills/frontend-ui-ux/kit/layouts/settings.html +114 -0
  36. package/plugin/skills/frontend-ui-ux/kit/layouts/workspace.html +115 -0
  37. package/plugin/skills/frontend-ui-ux/kit/styles/computational-brutalism.json +227 -0
  38. package/plugin/skills/frontend-ui-ux/kit/styles/field-notes.json +205 -0
  39. package/plugin/skills/frontend-ui-ux/kit/styles/graphite.json +200 -0
  40. package/plugin/skills/frontend-ui-ux/kit/styles/meadow.json +199 -0
  41. package/plugin/skills/frontend-ui-ux/kit/styles/neo-brutalism.json +222 -0
  42. package/plugin/skills/frontend-ui-ux/kit/ui.js +226 -0
  43. package/plugin/skills/frontend-ui-ux/references/complete-contract.md +2 -1
  44. package/plugin/skills/frontend-ui-ux/references/craft-floor.md +9 -4
  45. package/plugin/skills/frontend-ui-ux/references/default-editorial-pixel.json +59 -7
  46. package/plugin/skills/frontend-ui-ux/references/house-styles.md +234 -0
  47. package/plugin/skills/frontend-ui-ux/references/motion-guide.md +3 -3
  48. package/plugin/skills/frontend-ui-ux/references/slop-register.md +7 -7
  49. package/plugin/skills/frontend-ui-ux/scripts/design-lock.mjs +400 -0
  50. package/plugin/skills/frontend-ui-ux/scripts/interface-probe-lock.mjs +196 -0
  51. package/plugin/skills/frontend-ui-ux/scripts/interface-probe-page.mjs +31 -10
  52. package/plugin/skills/frontend-ui-ux/scripts/interface-probe-rules.mjs +19 -7
  53. package/plugin/skills/frontend-ui-ux/scripts/interface-probe-static.mjs +4 -0
  54. package/plugin/skills/frontend-ui-ux/scripts/interface-probe.mjs +59 -7
  55. package/plugin/skills/frontend-ui-ux/scripts/pixel-art.mjs +60 -0
  56. package/plugin/skills/lit-adhd/SKILL.md +188 -0
  57. package/plugin/skills/lit-adhd/references/card-examples.md +121 -0
  58. package/plugin/skills/lit-adhd/references/status-taxonomy.md +43 -0
  59. package/plugin/skills/lit-adhd/scripts/rewind.mjs +11 -0
  60. package/plugin/skills/lit-diagram-drawer/SKILL.md +3 -3
  61. package/plugin/skills/lit-diagram-drawer/scripts/diagram-craft-rules.mjs +1 -2
  62. package/plugin/skills/lit-diagram-drawer/scripts/visual-quality.mjs +0 -1
  63. package/plugin/skills/lit-docx/SKILL.md +1 -1
  64. package/plugin/skills/lit-hijack/SKILL.md +589 -0
  65. package/plugin/skills/lit-hijack/references/capture-and-provenance.md +123 -0
  66. package/plugin/skills/lit-hijack/references/clean-room-build.md +133 -0
  67. package/plugin/skills/lit-hijack/references/distil-and-licence.md +128 -0
  68. package/plugin/skills/lit-hijack/references/gap-and-port-design.md +152 -0
  69. package/plugin/skills/lit-hijack/references/parity-and-report.md +133 -0
  70. package/plugin/skills/lit-hijack/scripts/hijack.mjs +879 -0
  71. package/plugin/skills/lit-pptx/SKILL.md +20 -9
  72. package/plugin/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Bold.ttf +0 -0
  73. package/plugin/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf +0 -0
  74. package/plugin/skills/lit-pptx/fonts/jetbrains-mono/OFL.txt +93 -0
  75. package/plugin/skills/lit-pptx/fonts/provenance.json +32 -1
  76. package/plugin/skills/lit-pptx/references/direction-step.md +19 -2
  77. package/plugin/skills/lit-pptx/references/examples/13-engineering-review-computational-brutalism-ko.md +173 -0
  78. package/plugin/skills/lit-pptx/references/examples/14-launch-pitch-neo-brutalism-ko.md +154 -0
  79. package/plugin/skills/lit-pptx/references/examples/15-design-lecture-bauhaus-ko.md +139 -0
  80. package/plugin/skills/lit-pptx/references/examples/16-community-programme-riso-ko.md +158 -0
  81. package/plugin/skills/lit-pptx/references/examples/17-public-data-briefing-newsroom-ko.md +179 -0
  82. package/plugin/skills/lit-pptx/references/tonalities/bauhaus.md +112 -0
  83. package/plugin/skills/lit-pptx/references/tonalities/computational-brutalism.md +118 -0
  84. package/plugin/skills/lit-pptx/references/tonalities/neo-brutalism.md +125 -0
  85. package/plugin/skills/lit-pptx/references/tonalities/newsroom.md +115 -0
  86. package/plugin/skills/lit-pptx/references/tonalities/riso.md +109 -0
  87. package/plugin/skills/lit-pptx/scripts/compile-deck.js +1 -1
  88. package/plugin/skills/lit-pptx/scripts/craft_extras.py +136 -92
  89. package/plugin/skills/lit-pptx/scripts/embed_fonts.py +13 -1
  90. package/plugin/skills/lit-pptx/scripts/lib/grid-resolver.js +105 -116
  91. package/plugin/skills/lit-pptx/scripts/lib/layout-resolver.js +9 -15
  92. package/plugin/skills/lit-pptx/scripts/lib/render-pack.js +368 -561
  93. package/plugin/skills/lit-pptx/scripts/lib/slide-grid.js +104 -0
  94. package/plugin/skills/lit-pptx/scripts/lib/template-registry.js +57 -6
  95. package/plugin/skills/lit-pptx/scripts/qa_deck.py +4 -4
  96. package/plugin/skills/lit-pptx/templates/tonalities/atlas/pack.yaml +1 -1
  97. package/plugin/skills/lit-pptx/templates/tonalities/bauhaus/pack.yaml +98 -0
  98. package/plugin/skills/lit-pptx/templates/tonalities/chalk/pack.yaml +1 -1
  99. package/plugin/skills/lit-pptx/templates/tonalities/computational-brutalism/pack.yaml +99 -0
  100. package/plugin/skills/lit-pptx/templates/tonalities/gazette/pack.yaml +1 -1
  101. package/plugin/skills/lit-pptx/templates/tonalities/ledger/pack.yaml +1 -1
  102. package/plugin/skills/lit-pptx/templates/tonalities/neo-brutalism/pack.yaml +107 -0
  103. package/plugin/skills/lit-pptx/templates/tonalities/newsroom/pack.yaml +99 -0
  104. package/plugin/skills/lit-pptx/templates/tonalities/night/pack.yaml +1 -1
  105. package/plugin/skills/lit-pptx/templates/tonalities/paper/pack.yaml +1 -1
  106. package/plugin/skills/lit-pptx/templates/tonalities/riso/pack.yaml +99 -0
  107. package/plugin/skills/lit-pptx/templates/tonalities/signal/pack.yaml +2 -2
  108. package/plugin/skills/lit-pptx/templates/tonalities/studio/pack.yaml +1 -1
  109. package/plugin/skills/lit-recap/SKILL.md +3 -0
  110. package/plugin/skills/lit-schematic/SKILL.md +241 -0
  111. package/plugin/skills/lit-schematic/examples/iso-heat-exchanger/build.mjs +14 -0
  112. package/plugin/skills/lit-schematic/examples/iso-heat-exchanger/scene.mjs +8 -0
  113. package/plugin/skills/lit-schematic/examples/journal-adsorption-rig/build.mjs +22 -0
  114. package/plugin/skills/lit-schematic/examples/pid-dosing-skid/build.mjs +73 -0
  115. package/plugin/skills/lit-schematic/references/cutaway-outputs.md +25 -0
  116. package/plugin/skills/lit-schematic/references/isometric-craft.md +24 -0
  117. package/plugin/skills/lit-schematic/references/journal-figures.md +19 -0
  118. package/plugin/skills/lit-schematic/references/kit-api.md +27 -0
  119. package/plugin/skills/lit-schematic/references/pfd-and-layout.md +20 -0
  120. package/plugin/skills/lit-schematic/references/pid-drafting.md +26 -0
  121. package/plugin/skills/lit-schematic/references/pid-symbols.md +27 -0
  122. package/plugin/skills/lit-schematic/references/verification.md +24 -0
  123. package/plugin/skills/lit-schematic/scripts/doctor.mjs +13 -0
  124. package/plugin/skills/lit-schematic/scripts/lib/figure.mjs +49 -0
  125. package/plugin/skills/lit-schematic/scripts/lib/isa.mjs +18 -0
  126. package/plugin/skills/lit-schematic/scripts/lib/iso.mjs +58 -0
  127. package/plugin/skills/lit-schematic/scripts/lib/legend-sheet.mjs +10 -0
  128. package/plugin/skills/lit-schematic/scripts/lib/qa-core.mjs +241 -0
  129. package/plugin/skills/lit-schematic/scripts/lib/sheet.mjs +446 -0
  130. package/plugin/skills/lit-schematic/scripts/lib/svg.mjs +39 -0
  131. package/plugin/skills/lit-schematic/scripts/lib/theme.mjs +25 -0
  132. package/plugin/skills/lit-schematic/scripts/motion.mjs +8 -0
  133. package/plugin/skills/lit-schematic/scripts/qa.mjs +21 -0
  134. package/plugin/skills/lit-schematic/scripts/render.mjs +38 -0
  135. package/plugin/skills/lit-schematic/scripts/scaffold.mjs +73 -0
  136. package/plugin/skills/lit-scientific-visualization/SKILL.md +2 -0
  137. package/plugin/skills/lit-typographic-motion/SKILL.md +12 -8
  138. package/plugin/skills/lit-typographic-motion/engine/THIRD_PARTY_NOTICES +11 -0
  139. package/plugin/skills/lit-typographic-motion/engine/blender/runner.py +218 -0
  140. package/plugin/skills/lit-typographic-motion/engine/core/presets.mjs +1 -1
  141. package/plugin/skills/lit-typographic-motion/engine/node/assets.mjs +218 -0
  142. package/plugin/skills/lit-typographic-motion/engine/node/blender.mjs +144 -0
  143. package/plugin/skills/lit-typographic-motion/engine/node/board.mjs +136 -0
  144. package/plugin/skills/lit-typographic-motion/engine/node/done.mjs +42 -3
  145. package/plugin/skills/lit-typographic-motion/engine/node/gallery.mjs +120 -0
  146. package/plugin/skills/lit-typographic-motion/engine/node/house.mjs +44 -0
  147. package/plugin/skills/lit-typographic-motion/engine/node/pipeline.mjs +18 -7
  148. package/plugin/skills/lit-typographic-motion/engine/node/runtime.mjs +6 -3
  149. package/plugin/skills/lit-typographic-motion/engine/node/scaffold.mjs +210 -0
  150. package/plugin/skills/lit-typographic-motion/engine/node/score.mjs +639 -0
  151. package/plugin/skills/lit-typographic-motion/engine/node/sound-cli.mjs +21 -4
  152. package/plugin/skills/lit-typographic-motion/engine/node/sound.mjs +126 -27
  153. package/plugin/skills/lit-typographic-motion/engine/node/stage-serve.mjs +29 -5
  154. package/plugin/skills/lit-typographic-motion/engine/node/stage.mjs +82 -14
  155. package/plugin/skills/lit-typographic-motion/engine/node/styles.mjs +214 -0
  156. package/plugin/skills/lit-typographic-motion/engine/node/treatment.mjs +311 -10
  157. package/plugin/skills/lit-typographic-motion/engine/vendor/three/LICENSE +21 -0
  158. package/plugin/skills/lit-typographic-motion/engine/vendor/three/addons/environments/RoomEnvironment.js +144 -0
  159. package/plugin/skills/lit-typographic-motion/engine/vendor/three/addons/geometries/RoundedBoxGeometry.js +155 -0
  160. package/plugin/skills/lit-typographic-motion/engine/vendor/three/three.module.js +54571 -0
  161. package/plugin/skills/lit-typographic-motion/recipes/hero-3d/expected.json +69 -0
  162. package/plugin/skills/lit-typographic-motion/recipes/hero-3d/index.html +139 -0
  163. package/plugin/skills/lit-typographic-motion/references/depth.md +122 -0
  164. package/plugin/skills/lit-typographic-motion/references/sound.md +74 -16
  165. package/plugin/skills/lit-typographic-motion/references/stage.md +29 -5
  166. package/plugin/skills/lit-typographic-motion/references/studio.md +245 -0
  167. package/plugin/skills/lit-typographic-motion/references/treatment.md +31 -8
  168. package/plugin/skills/lit-typographic-motion/scripts/motion.mjs +48 -7
  169. package/plugin/skills/lit-typographic-motion/styles/paper.json +41 -0
  170. package/plugin/skills/lit-typographic-motion/styles/swiss-signal.json +41 -0
  171. package/plugin/skills/lit-typographic-motion/styles/terminalcore.json +42 -0
  172. package/plugin/skills/lit-typographic-motion/styles/tidal.json +41 -0
  173. package/plugin/skills/readme-studio/SKILL.md +1 -1
  174. package/plugin/skills/readme-studio/templates/hyperframes-cover/package-lock.json +3 -3
  175. package/plugin/skills/readme-studio/templates/remotion-cover/package-lock.json +3 -3
  176. package/plugin/skills/start-work/SKILL.md +6 -0
@@ -0,0 +1,32 @@
1
+ /** Return source lines that are outside Markdown code fences, preserving line indexes. */
2
+ export const planLinesOutsideFences = (text) => {
3
+ const visible = [];
4
+ let fence = null;
5
+ const lines = text.split(/\r?\n/u);
6
+ for (let index = 0; index < lines.length; index += 1) {
7
+ const line = lines[index];
8
+ const fenceMatch = /^ {0,3}(`{3,}|~{3,})(.*)$/u.exec(line);
9
+ if (!fence && fenceMatch) {
10
+ fence = { marker: fenceMatch[1][0], length: fenceMatch[1].length };
11
+ continue;
12
+ }
13
+ if (
14
+ fence
15
+ && fenceMatch
16
+ && fenceMatch[1][0] === fence.marker
17
+ && fenceMatch[1].length >= fence.length
18
+ && fenceMatch[2].trim() === ""
19
+ ) {
20
+ fence = null;
21
+ continue;
22
+ }
23
+ if (!fence) visible.push({ line, index });
24
+ }
25
+ return visible;
26
+ };
27
+
28
+ /** Parse the exact column-zero checkbox grammar consumed by start-work. */
29
+ export const parsePlanTaskRows = (text) => planLinesOutsideFences(text).flatMap(({ line, index }) => {
30
+ const match = /^- \[([ xX])\]\s+(.+?)\s*$/u.exec(line);
31
+ return match ? [{ checked: match[1].toLowerCase() === "x", text: match[2], line, index }] : [];
32
+ });
@@ -2,7 +2,9 @@
2
2
  """Render a .pptx, .docx or .pdf to PNG pages so a person (or the model) can look at it.
3
3
 
4
4
  LibreOffice (soffice) converts Office files to PDF in a private profile directory,
5
- so parallel runs never share a lock; PyMuPDF rasterises the PDF pages. A PDF input
5
+ so parallel runs never share a lock; PyMuPDF rasterises the PDF pages. Fonts a .pptx
6
+ embeds as plain font files are placed in that profile's font folder first, so the pages
7
+ show the faces PowerPoint shows even where the font is not installed. A PDF input
6
8
  skips the conversion. Without soffice an Office file cannot be rendered: the script
7
9
  prints SKIP with the reason and exits 0, and the caller must say that the visual
8
10
  pass did not happen.
@@ -21,9 +23,34 @@ import shutil
21
23
  import subprocess
22
24
  import sys
23
25
  import tempfile
26
+ import zipfile
24
27
  from pathlib import Path
25
28
 
26
29
 
30
+ def profile_fonts(source: Path, profile: Path) -> list[Path]:
31
+ """Copy the plain font files a .pptx embeds (ppt/fonts/*.fntdata) into the profile's font folder."""
32
+ if source.suffix.lower() != ".pptx":
33
+ return []
34
+ placed = []
35
+ try:
36
+ with zipfile.ZipFile(source) as z:
37
+ for name in z.namelist():
38
+ if not (name.startswith("ppt/fonts/") and name.endswith(".fntdata")):
39
+ continue
40
+ data = z.read(name)
41
+ # Only a TrueType or OpenType file; an obfuscated or EOT part is left to the renderer.
42
+ kind = ".otf" if data[:4] == b"OTTO" else ".ttf" if data[:4] in (b"\x00\x01\x00\x00", b"true") else None
43
+ if not kind:
44
+ continue
45
+ target = profile / "user" / "fonts" / (Path(name).stem + kind)
46
+ target.parent.mkdir(parents=True, exist_ok=True)
47
+ target.write_bytes(data)
48
+ placed.append(target)
49
+ except zipfile.BadZipFile:
50
+ return []
51
+ return placed
52
+
53
+
27
54
  def to_pdf(source: Path, out_dir: Path) -> tuple[Path | None, str]:
28
55
  if source.suffix.lower() == ".pdf":
29
56
  return source, "input is already PDF"
@@ -31,6 +58,7 @@ def to_pdf(source: Path, out_dir: Path) -> tuple[Path | None, str]:
31
58
  if not soffice:
32
59
  return None, "LibreOffice (soffice) is not on PATH"
33
60
  with tempfile.TemporaryDirectory(prefix="litmuse-soffice-") as profile:
61
+ profile_fonts(source, Path(profile))
34
62
  result = subprocess.run(
35
63
  [
36
64
  soffice,