@litfamily/litgrok 1.0.26 → 1.0.28

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 (235) hide show
  1. package/.grok/hooks/lit-mark.mjs +42 -0
  2. package/.grok/hooks/lit-status-line.mjs +174 -21
  3. package/.grok/hooks/plan-gate.mjs +13 -3
  4. package/.grok/hooks/record-passive-event.mjs +40 -6
  5. package/.grok/hooks/session-end.json +15 -0
  6. package/.grok/hooks/session-end.mjs +6 -0
  7. package/.grok/hooks/session-liveness.mjs +102 -0
  8. package/.grok/hooks/session-rows.mjs +57 -0
  9. package/.grok/hooks/session-start.mjs +17 -0
  10. package/.grok/hooks/workflow-stage.mjs +5 -2
  11. package/.grok/rules/00-litgrok.md +14 -0
  12. package/.grok/skills/frontend-ui-ux/ATTRIBUTION.md +23 -0
  13. package/.grok/skills/frontend-ui-ux/SKILL.md +4 -1
  14. package/.grok/skills/frontend-ui-ux/examples/phase-3-readme-ab/README.md +9 -0
  15. package/.grok/skills/frontend-ui-ux/kit/components.css +414 -0
  16. package/.grok/skills/frontend-ui-ux/kit/fonts.json +22 -0
  17. package/.grok/skills/frontend-ui-ux/kit/layouts/landing.html +164 -0
  18. package/.grok/skills/frontend-ui-ux/kit/layouts/settings.html +114 -0
  19. package/.grok/skills/frontend-ui-ux/kit/layouts/workspace.html +115 -0
  20. package/.grok/skills/frontend-ui-ux/kit/styles/computational-brutalism.json +227 -0
  21. package/.grok/skills/frontend-ui-ux/kit/styles/field-notes.json +205 -0
  22. package/.grok/skills/frontend-ui-ux/kit/styles/graphite.json +200 -0
  23. package/.grok/skills/frontend-ui-ux/kit/styles/meadow.json +199 -0
  24. package/.grok/skills/frontend-ui-ux/kit/styles/neo-brutalism.json +222 -0
  25. package/.grok/skills/frontend-ui-ux/kit/ui.js +226 -0
  26. package/.grok/skills/frontend-ui-ux/references/adaptive-layout.md +10 -4
  27. package/.grok/skills/frontend-ui-ux/references/brand-and-imagery.md +11 -7
  28. package/.grok/skills/frontend-ui-ux/references/complete-contract.md +21 -0
  29. package/.grok/skills/frontend-ui-ux/references/composition.md +10 -6
  30. package/.grok/skills/frontend-ui-ux/references/craft-floor.md +256 -93
  31. package/.grok/skills/frontend-ui-ux/references/creative-directions.md +9 -6
  32. package/.grok/skills/frontend-ui-ux/references/default-editorial-pixel.json +28 -0
  33. package/.grok/skills/frontend-ui-ux/references/house-styles.md +234 -0
  34. package/.grok/skills/frontend-ui-ux/references/implementation-platforms.md +10 -6
  35. package/.grok/skills/frontend-ui-ux/references/inclusive-interface.md +11 -5
  36. package/.grok/skills/frontend-ui-ux/references/interaction-motion.md +34 -78
  37. package/.grok/skills/frontend-ui-ux/references/motion-guide.md +10 -7
  38. package/.grok/skills/frontend-ui-ux/references/performance-delivery.md +11 -8
  39. package/.grok/skills/frontend-ui-ux/references/probe-loop.md +1 -1
  40. package/.grok/skills/frontend-ui-ux/references/product-direction.md +9 -4
  41. package/.grok/skills/frontend-ui-ux/references/production-interview.md +17 -0
  42. package/.grok/skills/frontend-ui-ux/references/redesign-playbook.md +10 -6
  43. package/.grok/skills/frontend-ui-ux/references/slop-register.md +148 -73
  44. package/.grok/skills/frontend-ui-ux/references/system-foundations.md +10 -4
  45. package/.grok/skills/frontend-ui-ux/references/visual-language.md +10 -4
  46. package/.grok/skills/frontend-ui-ux/references/visual-reconstruction.md +39 -72
  47. package/.grok/skills/frontend-ui-ux/scripts/design-lock.mjs +400 -0
  48. package/.grok/skills/frontend-ui-ux/scripts/interface-probe-driver.mjs +33 -0
  49. package/.grok/skills/frontend-ui-ux/scripts/interface-probe-lock.mjs +196 -0
  50. package/.grok/skills/frontend-ui-ux/scripts/interface-probe-page.mjs +1555 -0
  51. package/.grok/skills/frontend-ui-ux/scripts/interface-probe-rules.mjs +153 -0
  52. package/.grok/skills/frontend-ui-ux/scripts/interface-probe-server.mjs +57 -0
  53. package/.grok/skills/frontend-ui-ux/scripts/interface-probe-static.mjs +139 -0
  54. package/.grok/skills/frontend-ui-ux/scripts/interface-probe.mjs +363 -0
  55. package/.grok/skills/frontend-ui-ux/scripts/pixel-art.mjs +60 -0
  56. package/.grok/skills/lit-adhd/SKILL.md +155 -0
  57. package/.grok/skills/lit-adhd/references/card-examples.md +131 -0
  58. package/.grok/skills/lit-adhd/references/status-taxonomy.md +50 -0
  59. package/.grok/skills/lit-adhd/scripts/lib/brief.mjs +421 -0
  60. package/.grok/skills/lit-adhd/scripts/lib/collect.mjs +395 -0
  61. package/.grok/skills/lit-adhd/scripts/lib/gauge.mjs +87 -0
  62. package/.grok/skills/lit-adhd/scripts/lib/next-step.mjs +22 -0
  63. package/.grok/skills/lit-adhd/scripts/lib/plan-task-rows.mjs +32 -0
  64. package/.grok/skills/lit-adhd/scripts/lib/project-state-root.mjs +55 -0
  65. package/.grok/skills/lit-adhd/scripts/lib/redact.mjs +64 -0
  66. package/.grok/skills/lit-adhd/scripts/lib/suggest.mjs +140 -0
  67. package/.grok/skills/lit-adhd/scripts/lib/transcripts.mjs +232 -0
  68. package/.grok/skills/lit-adhd/scripts/rewind.mjs +6 -0
  69. package/.grok/skills/lit-diagram-drawer/SKILL.md +17 -5
  70. package/.grok/skills/lit-diagram-drawer/references/output-spec.md +2 -2
  71. package/.grok/skills/lit-diagram-drawer/references/style-guide.md +20 -11
  72. package/.grok/skills/lit-diagram-drawer/references/type-architecture.md +3 -3
  73. package/.grok/skills/lit-diagram-drawer/references/type-dependency.md +1 -1
  74. package/.grok/skills/lit-diagram-drawer/references/type-tree.md +3 -3
  75. package/.grok/skills/lit-diagram-drawer/references/type-wardley.md +1 -1
  76. package/.grok/skills/lit-diagram-drawer/references/verifier-guide.md +4 -0
  77. package/.grok/skills/lit-diagram-drawer/scripts/visual-quality.mjs +2 -2
  78. package/.grok/skills/lit-handoff/SKILL.md +2 -0
  79. package/.grok/skills/lit-hijack/SKILL.md +459 -0
  80. package/.grok/skills/lit-hijack/references/capture-and-provenance.md +124 -0
  81. package/.grok/skills/lit-hijack/references/clean-room-build.md +130 -0
  82. package/.grok/skills/lit-hijack/references/distil-and-licence.md +128 -0
  83. package/.grok/skills/lit-hijack/references/gap-and-port-design.md +150 -0
  84. package/.grok/skills/lit-hijack/references/parity-and-report.md +130 -0
  85. package/.grok/skills/lit-hijack/scripts/hijack.mjs +890 -0
  86. package/.grok/skills/lit-hijack/scripts/lib/safe-fetch.mjs +213 -0
  87. package/.grok/skills/lit-plan/SKILL.md +3 -1
  88. package/.grok/skills/lit-plan/references/plan-schema.md +4 -0
  89. package/.grok/skills/lit-plan/scripts/scaffold-plan.mjs +9 -2
  90. package/.grok/skills/lit-plan/scripts/scope-roots.mjs +83 -0
  91. package/.grok/skills/lit-pptx/SKILL.md +10 -5
  92. package/.grok/skills/lit-pptx/examples/13-engineering-review-computational-brutalism-ko.md +173 -0
  93. package/.grok/skills/lit-pptx/examples/14-launch-pitch-neo-brutalism-ko.md +154 -0
  94. package/.grok/skills/lit-pptx/examples/15-design-lecture-bauhaus-ko.md +139 -0
  95. package/.grok/skills/lit-pptx/examples/16-community-programme-riso-ko.md +158 -0
  96. package/.grok/skills/lit-pptx/examples/17-public-data-briefing-newsroom-ko.md +179 -0
  97. package/.grok/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Bold.ttf +0 -0
  98. package/.grok/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf +0 -0
  99. package/.grok/skills/lit-pptx/fonts/jetbrains-mono/OFL.txt +93 -0
  100. package/.grok/skills/lit-pptx/fonts/jetbrains-mono/provenance.json +1 -0
  101. package/.grok/skills/lit-pptx/references/direction-step.md +34 -8
  102. package/.grok/skills/lit-pptx/references/tonalities/bauhaus.md +140 -0
  103. package/.grok/skills/lit-pptx/references/tonalities/computational-brutalism.md +150 -0
  104. package/.grok/skills/lit-pptx/references/tonalities/neo-brutalism.md +161 -0
  105. package/.grok/skills/lit-pptx/references/tonalities/newsroom.md +144 -0
  106. package/.grok/skills/lit-pptx/references/tonalities/riso.md +137 -0
  107. package/.grok/skills/lit-pptx/scripts/compile-deck.js +1 -1
  108. package/.grok/skills/lit-pptx/scripts/craft_extras.py +61 -3
  109. package/.grok/skills/lit-pptx/scripts/deck_output.py +76 -62
  110. package/.grok/skills/lit-pptx/scripts/embed_fonts.py +14 -1
  111. package/.grok/skills/lit-pptx/scripts/lib/grid-resolver.js +101 -110
  112. package/.grok/skills/lit-pptx/scripts/lib/layout-resolver.js +9 -15
  113. package/.grok/skills/lit-pptx/scripts/lib/render-pack.js +389 -582
  114. package/.grok/skills/lit-pptx/scripts/lib/slide-grid.js +104 -0
  115. package/.grok/skills/lit-pptx/scripts/lib/template-registry.js +60 -8
  116. package/.grok/skills/lit-pptx/scripts/qa_deck.py +4 -4
  117. package/.grok/skills/lit-pptx/templates/tonalities/atlas/pack.yaml +2 -0
  118. package/.grok/skills/lit-pptx/templates/tonalities/bauhaus/pack.yaml +98 -0
  119. package/.grok/skills/lit-pptx/templates/tonalities/chalk/pack.yaml +2 -0
  120. package/.grok/skills/lit-pptx/templates/tonalities/computational-brutalism/pack.yaml +99 -0
  121. package/.grok/skills/lit-pptx/templates/tonalities/gazette/pack.yaml +2 -0
  122. package/.grok/skills/lit-pptx/templates/tonalities/ledger/pack.yaml +2 -0
  123. package/.grok/skills/lit-pptx/templates/tonalities/neo-brutalism/pack.yaml +107 -0
  124. package/.grok/skills/lit-pptx/templates/tonalities/newsroom/pack.yaml +99 -0
  125. package/.grok/skills/lit-pptx/templates/tonalities/night/pack.yaml +2 -0
  126. package/.grok/skills/lit-pptx/templates/tonalities/paper/pack.yaml +2 -0
  127. package/.grok/skills/lit-pptx/templates/tonalities/riso/pack.yaml +99 -0
  128. package/.grok/skills/lit-pptx/templates/tonalities/signal/pack.yaml +3 -0
  129. package/.grok/skills/lit-pptx/templates/tonalities/studio/pack.yaml +2 -0
  130. package/.grok/skills/lit-recap/SKILL.md +1 -1
  131. package/.grok/skills/lit-schematic/SKILL.md +140 -0
  132. package/.grok/skills/lit-schematic/examples/iso-heat-exchanger/build.mjs +38 -0
  133. package/.grok/skills/lit-schematic/examples/iso-heat-exchanger/scene.mjs +133 -0
  134. package/.grok/skills/lit-schematic/examples/journal-adsorption-rig/build.mjs +87 -0
  135. package/.grok/skills/lit-schematic/examples/pid-dosing-skid/build.mjs +85 -0
  136. package/.grok/skills/lit-schematic/references/cutaway-outputs.md +70 -0
  137. package/.grok/skills/lit-schematic/references/isometric-craft.md +101 -0
  138. package/.grok/skills/lit-schematic/references/journal-figures.md +72 -0
  139. package/.grok/skills/lit-schematic/references/kit-api.md +134 -0
  140. package/.grok/skills/lit-schematic/references/pfd-and-layout.md +53 -0
  141. package/.grok/skills/lit-schematic/references/pid-drafting.md +103 -0
  142. package/.grok/skills/lit-schematic/references/pid-symbols.md +163 -0
  143. package/.grok/skills/lit-schematic/references/verification.md +100 -0
  144. package/.grok/skills/lit-schematic/scripts/doctor.mjs +57 -0
  145. package/.grok/skills/lit-schematic/scripts/lib/figure.mjs +81 -0
  146. package/.grok/skills/lit-schematic/scripts/lib/fonts.mjs +27 -0
  147. package/.grok/skills/lit-schematic/scripts/lib/geom.mjs +113 -0
  148. package/.grok/skills/lit-schematic/scripts/lib/interactive.mjs +292 -0
  149. package/.grok/skills/lit-schematic/scripts/lib/isa.mjs +115 -0
  150. package/.grok/skills/lit-schematic/scripts/lib/iso.mjs +719 -0
  151. package/.grok/skills/lit-schematic/scripts/lib/legend-sheet.mjs +162 -0
  152. package/.grok/skills/lit-schematic/scripts/lib/pid.mjs +937 -0
  153. package/.grok/skills/lit-schematic/scripts/lib/png.mjs +132 -0
  154. package/.grok/skills/lit-schematic/scripts/lib/qa-core.mjs +658 -0
  155. package/.grok/skills/lit-schematic/scripts/lib/route.mjs +218 -0
  156. package/.grok/skills/lit-schematic/scripts/lib/sheet.mjs +890 -0
  157. package/.grok/skills/lit-schematic/scripts/lib/svg.mjs +82 -0
  158. package/.grok/skills/lit-schematic/scripts/lib/theme.mjs +115 -0
  159. package/.grok/skills/lit-schematic/scripts/motion.mjs +129 -0
  160. package/.grok/skills/lit-schematic/scripts/qa.mjs +92 -0
  161. package/.grok/skills/lit-schematic/scripts/render.mjs +233 -0
  162. package/.grok/skills/lit-schematic/scripts/scaffold.mjs +60 -0
  163. package/.grok/skills/lit-scientific-visualization/SKILL.md +36 -12
  164. package/.grok/skills/lit-typographic-motion/SKILL.md +7 -4
  165. package/.grok/skills/lit-typographic-motion/THIRD_PARTY_NOTICES +11 -0
  166. package/.grok/skills/lit-typographic-motion/recipes/hero-3d/expected.json +62 -0
  167. package/.grok/skills/lit-typographic-motion/recipes/hero-3d/index.html +82 -0
  168. package/.grok/skills/lit-typographic-motion/references/choice-first.md +30 -0
  169. package/.grok/skills/lit-typographic-motion/references/cover.md +10 -1
  170. package/.grok/skills/lit-typographic-motion/references/depth.md +119 -0
  171. package/.grok/skills/lit-typographic-motion/references/treatment.md +9 -1
  172. package/.grok/skills/lit-typographic-motion/scripts/blender/runner.py +218 -0
  173. package/.grok/skills/lit-typographic-motion/scripts/lib/assets.mjs +230 -0
  174. package/.grok/skills/lit-typographic-motion/scripts/lib/blender.mjs +136 -0
  175. package/.grok/skills/lit-typographic-motion/scripts/lib/board.mjs +153 -0
  176. package/.grok/skills/lit-typographic-motion/scripts/lib/chrome.mjs +61 -32
  177. package/.grok/skills/lit-typographic-motion/scripts/lib/constants.mjs +4 -2
  178. package/.grok/skills/lit-typographic-motion/scripts/lib/cover-capture.mjs +20 -11
  179. package/.grok/skills/lit-typographic-motion/scripts/lib/cover-treatment.mjs +26 -2
  180. package/.grok/skills/lit-typographic-motion/scripts/lib/cover.mjs +12 -5
  181. package/.grok/skills/lit-typographic-motion/scripts/lib/frame-pool.mjs +78 -1
  182. package/.grok/skills/lit-typographic-motion/scripts/lib/gallery.mjs +160 -0
  183. package/.grok/skills/lit-typographic-motion/scripts/lib/house.mjs +43 -0
  184. package/.grok/skills/lit-typographic-motion/scripts/lib/look.mjs +39 -1
  185. package/.grok/skills/lit-typographic-motion/scripts/lib/scaffold.mjs +174 -0
  186. package/.grok/skills/lit-typographic-motion/scripts/lib/score.mjs +640 -0
  187. package/.grok/skills/lit-typographic-motion/scripts/lib/sound.mjs +143 -0
  188. package/.grok/skills/lit-typographic-motion/scripts/lib/soundtrack.mjs +12 -3
  189. package/.grok/skills/lit-typographic-motion/scripts/lib/stage-gate.mjs +44 -0
  190. package/.grok/skills/lit-typographic-motion/scripts/lib/stage-qa.mjs +132 -3
  191. package/.grok/skills/lit-typographic-motion/scripts/lib/stage-session.mjs +51 -3
  192. package/.grok/skills/lit-typographic-motion/scripts/lib/stage.mjs +74 -9
  193. package/.grok/skills/lit-typographic-motion/scripts/lib/styles.mjs +224 -0
  194. package/.grok/skills/lit-typographic-motion/scripts/lib/treatment.mjs +198 -4
  195. package/.grok/skills/lit-typographic-motion/scripts/lib/vendor/three/LICENSE +21 -0
  196. package/.grok/skills/lit-typographic-motion/scripts/lib/vendor/three/addons/environments/RoomEnvironment.js +144 -0
  197. package/.grok/skills/lit-typographic-motion/scripts/lib/vendor/three/addons/geometries/RoundedBoxGeometry.js +155 -0
  198. package/.grok/skills/lit-typographic-motion/scripts/lib/vendor/three/three.module.js +54571 -0
  199. package/.grok/skills/lit-typographic-motion/scripts/motion.mjs +56 -6
  200. package/.grok/skills/lit-typographic-motion/scripts/stage/cover-init.js +20 -8
  201. package/.grok/skills/lit-typographic-motion/scripts/stage/loop-kit.js +2 -2
  202. package/.grok/skills/lit-typographic-motion/scripts/stage/stage-kit.js +25 -0
  203. package/.grok/skills/lit-typographic-motion/styles/paper.json +1 -0
  204. package/.grok/skills/lit-typographic-motion/styles/swiss-signal.json +1 -0
  205. package/.grok/skills/lit-typographic-motion/styles/terminalcore.json +1 -0
  206. package/.grok/skills/lit-typographic-motion/styles/tidal.json +1 -0
  207. package/.grok/skills/litgrok/SKILL.md +1 -1
  208. package/.grok/skills/litresearch/SKILL.md +2 -0
  209. package/.grok/skills/readme-studio/SKILL.md +14 -12
  210. package/.grok/skills/readme-studio/references/choice-first.md +24 -0
  211. package/.grok/skills/start-work/SKILL.md +8 -1
  212. package/.grok-plugin/plugin.json +4 -1
  213. package/CHANGELOG.md +18 -0
  214. package/README.md +11 -11
  215. package/README_ko-KR.md +11 -11
  216. package/TRADEMARK.md +12 -0
  217. package/bin/litgrok.mjs +2 -0
  218. package/docs/assets/readme/badge-version.svg +1 -1
  219. package/docs/assets/showcase/brief.webp +0 -0
  220. package/docs/assets/showcase/deck.webp +0 -0
  221. package/docs/assets/showcase/page.webp +0 -0
  222. package/docs/assets/showcase/pid.webp +0 -0
  223. package/docs/assets/skills/lit-adhd.webp +0 -0
  224. package/docs/assets/skills/lit-hijack.webp +0 -0
  225. package/docs/assets/skills/lit-schematic.webp +0 -0
  226. package/docs/reference.md +11 -7
  227. package/docs/reference_ko-KR.md +11 -7
  228. package/hooks/hooks.json +11 -0
  229. package/package.json +6 -1
  230. package/plugin.json +1 -1
  231. package/.grok/skills/frontend-ui-ux/scripts/page-probe.mjs +0 -105
  232. package/.grok/skills/frontend-ui-ux/scripts/probe.mjs +0 -91
  233. package/.grok/skills/frontend-ui-ux/scripts/rule-data.mjs +0 -56
  234. package/.grok/skills/frontend-ui-ux/scripts/static-probe.mjs +0 -27
  235. package/.grok/skills/frontend-ui-ux/scripts/static-server.mjs +0 -19
@@ -0,0 +1,57 @@
1
+ // The other sessions of this workspace, for the status line's extra rows. Each comes from that
2
+ // session's liveness record and, when it has one, its workflow snapshot; this session's own files are
3
+ // skipped. A session that is working reads `running`, one waiting at a turn end `idle`, and a finished
4
+ // start-work (its work stage closed with every plan task checked, or the done stage) `done` for one
5
+ // minute, then it leaves. An ended or stale session is not shown. Nothing here writes.
6
+
7
+ import { createHash } from 'node:crypto';
8
+ import { readdirSync, realpathSync } from 'node:fs';
9
+ import { isAbsolute, join } from 'node:path';
10
+ import { readLiveness } from './session-liveness.mjs';
11
+ import { readWorkflowState } from './workflow-stage.mjs';
12
+
13
+ export const DONE_SHOWN_MS = 60 * 1000;
14
+ const MAX_ROWS = 4;
15
+ const STATE_ORDER = { running: 0, idle: 1, done: 2 };
16
+ const RECORD_NAME = /^[0-9a-f]{32}\.json$/u;
17
+
18
+ const keyOf = (sessionId) => createHash('sha256').update(sessionId).digest('hex').slice(0, 32);
19
+
20
+ function finished(workflow) {
21
+ return workflow.stage === 'done'
22
+ || (workflow.ended && workflow.stage === 'work' && workflow.plan?.total > 0 && workflow.plan.done === workflow.plan.total);
23
+ }
24
+
25
+ /** Up to four `{ label, pane, state }` rows, running first, then idle, then done; newest first within each. */
26
+ export function readOtherSessions(dirs, selfSessionId, now = Date.now()) {
27
+ const selfName = typeof selfSessionId === 'string' && selfSessionId !== '' ? `${keyOf(selfSessionId)}.json` : null;
28
+ for (const directory of dirs) {
29
+ if (typeof directory !== 'string' || !isAbsolute(directory)) continue;
30
+ let root;
31
+ let names;
32
+ try {
33
+ root = realpathSync(directory);
34
+ names = readdirSync(join(root, '.grok', 'litgrok', 'liveness'));
35
+ } catch {
36
+ continue;
37
+ }
38
+ const rows = [];
39
+ for (const name of names) {
40
+ if (!RECORD_NAME.test(name) || name === selfName) continue;
41
+ const live = readLiveness(join(root, '.grok', 'litgrok', 'liveness', name), now);
42
+ if (!live || `${keyOf(live.sessionId)}.json` !== name) continue;
43
+ const workflow = readWorkflowState(join(root, '.grok', 'litgrok', 'session-ledger', name.replace(/\.json$/u, '.workflow.json')), live.sessionId);
44
+ let state;
45
+ if (workflow && finished(workflow)) {
46
+ if (now - Date.parse(workflow.updatedAt) > DONE_SHOWN_MS) continue;
47
+ state = 'done';
48
+ } else if (live.state === 'alive') state = 'running';
49
+ else if (live.state === 'idle') state = 'idle';
50
+ else continue;
51
+ rows.push({ label: workflow?.active ?? workflow?.stage ?? 'session', pane: live.pane, state, at: Date.parse(live.at) });
52
+ }
53
+ rows.sort((left, right) => STATE_ORDER[left.state] - STATE_ORDER[right.state] || right.at - left.at);
54
+ return rows.slice(0, MAX_ROWS).map(({ at: _at, ...row }) => row);
55
+ }
56
+ return [];
57
+ }
@@ -1,7 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import { homedir } from 'node:os';
4
+ import { join } from 'node:path';
3
5
  import { renderMark } from './lit-mark.mjs';
4
6
  import { claimSessionIgnition } from './record-passive-event.mjs';
7
+ import { adhdSuggestion } from '../skills/lit-adhd/scripts/lib/suggest.mjs';
5
8
 
6
9
  // Decode once: a multi-byte character can straddle two pipe chunks.
7
10
  const chunks = [];
@@ -16,6 +19,20 @@ try {
16
19
  if (bytes > 1024 * 1024) throw new Error('EVENT_TOO_LARGE');
17
20
  event = JSON.parse(Buffer.concat(chunks).toString('utf8'));
18
21
  if (claimSessionIgnition(event)) process.stdout.write(`${renderMark({ args: process.argv.slice(2) }).join('\n')}\n`);
22
+ // One nudge toward the catch-up brief per day, only when this project has other recent sessions.
23
+ // Best effort: a broken suggestion never breaks session start.
24
+ try {
25
+ const home = process.env.HOME || homedir();
26
+ const line = adhdSuggestion({
27
+ storeDir: join(home, '.grok', 'sessions'),
28
+ projectRoot: event.realWorkspaceRoot ?? event.workspaceRoot ?? event.cwd ?? process.cwd(),
29
+ sessionId: event.sessionId ?? process.env.GROK_SESSION_ID,
30
+ stateRoot: event.realWorkspaceRoot ?? event.workspaceRoot ?? event.cwd ?? process.cwd(),
31
+ });
32
+ if (line) process.stdout.write(`${line}\n`);
33
+ } catch {
34
+ // No suggestion; session start continues.
35
+ }
19
36
  } catch (error) {
20
37
  process.stderr.write(`LitGrok session-start: ${error.code || 'EVENT_INVALID'}\n`);
21
38
  process.exitCode = 1;
@@ -60,21 +60,24 @@ const SPACED_PLAN_PATTERN = /^\s*\/?lit\s+plan(?=$|[^\w-])/iu;
60
60
  const SPACED_REVIEW_PATTERN = /^\s*\/?lit\s+review(?=$|[^\w-])/iu;
61
61
  // Open brainstorming is no workflow stage: it names its own discipline and leaves the row where it was.
62
62
  const BRAINSTORM_PATTERN = /^\s*\/?(?:lit-brainstorm|lit\s+(?:brainstorm|brainstorming|ideation|ideate|idea|ideas))(?=$|[^\w-])/iu;
63
+ // Catch-up is no workflow stage either: it names its own discipline and leaves the row where it was.
64
+ const ADHD_PATTERN = /^\s*\/?(?:lit-adhd|lit-rewind|lit\s+(?:adhd|rewind))(?=$|[^\w-])/iu;
63
65
 
64
66
  /**
65
67
  * The stage a prompt names and how it enters it: 'switch' for a named skill (`discipline` is 'lit-plan' for the
66
68
  * spaced `lit plan`, null for the spaced `lit review`), 'continue' or 'restart' for lit. A brainstorm prompt
67
- * carries the discipline 'lit-brainstorm' and no stage.
69
+ * carries the discipline 'lit-brainstorm' and no stage; a catch-up prompt carries 'lit-adhd' and no stage.
68
70
  */
69
71
  export function entryFromPrompt(visibleText) {
70
72
  if (typeof visibleText !== 'string') return null;
71
73
  if (BRAINSTORM_PATTERN.test(visibleText)) return { stage: null, entry: 'switch', discipline: 'lit-brainstorm' };
74
+ if (ADHD_PATTERN.test(visibleText)) return { stage: null, entry: 'switch', discipline: 'lit-adhd' };
72
75
  const match = STAGE_PATTERN.exec(visibleText);
73
76
  if (!match) return null;
74
77
  const token = match[1].toLowerCase();
75
78
  if (token !== 'lit') return { stage: STAGE_OF[token], entry: 'switch' };
76
79
  if (SPACED_PLAN_PATTERN.test(visibleText)) return { stage: STAGE_OF['lit-plan'], entry: 'switch', discipline: 'lit-plan' };
77
- if (SPACED_REVIEW_PATTERN.test(visibleText)) return { stage: STAGE_OF['review-work'], entry: 'switch', discipline: null };
80
+ if (SPACED_REVIEW_PATTERN.test(visibleText)) return { stage: STAGE_OF['review-work'], entry: 'switch', discipline: 'review-work' };
78
81
  return { stage: STAGE_OF.lit, entry: RESTART_PATTERN.test(visibleText) ? 'restart' : 'continue' };
79
82
  }
80
83
 
@@ -102,6 +102,7 @@ Judge by this session's own state (earlier banner, plan file, workflow row), nev
102
102
  - A named discipline (`lit plan`, `lit-plan`, `start-work`, `review-work`, `lit review plan|work`) switches: ignite it once, in full.
103
103
  - `lit brainstorm|brainstorming|ideation|ideate|idea|ideas …` opens `lit-brainstorm` (options only, no edits), never deep-interview, lit-plan or the Office and film routes.
104
104
  - An approved plan or an active start-work plus a bare `lit` resumes that work; write no second plan.
105
+ - A bare `go` within 30 minutes (plan mtime) of saving a plan here loads start-work on it.
105
106
  - `lit new …` and `lit restart …` start fresh with the full activation.
106
107
  - A bare `lit` with nothing active asks one question to confirm; `lit fix X` never does.
107
108
 
@@ -122,11 +123,24 @@ Exclusions are checked before the trigger and route away even when a video noun
122
123
  - (iii) an Office deliverable other than a bare 발표 — 발표자료, 슬라이드, PPT, 덱, 보고서, 문서, slides, deck, pptx, report, document — with 넣, 삽입, embed or insert: that Office skill;
123
124
  - (iv) a text or image about a video — 스크립트, 대본, 썸네일, 요약, 기획안, script, transcript, thumbnail, summary, storyboard: its own task;
124
125
  - (v) motion on an interface with no video noun — 버튼, 호버, button, hover, motion tokens, reduced motion: `frontend-ui-ux`.
126
+ - (vi) a drawing of real equipment, even as an HTML page or a loop: `lit-schematic`.
125
127
 
126
128
  Film context: this is a film request. Load `lit-typographic-motion` from `.grok/skills/lit-typographic-motion/` (project) or `~/.grok/skills/lit-typographic-motion/` (user) and write `treatment.json` in the run's output directory first. Path rule: the type path when the words themselves are the film; the stage path for every other film, including anything with shapes, drawn objects, diagrams or imagery; a 9:16 film always takes the stage path. Every frame and track passes through the skill's renderer; hand-encoded films are not the deliverable. Never claim a hook routed the prompt.
127
129
 
128
130
  Film commands, run from the skill root: `node scripts/motion.mjs` with `make`, `stage`, `sound`, `look`, `gate`, `verify` (each takes `--out <dir>`); a README cover loop uses `cover` and `cover-gate` (references/cover.md); pre-warm outside the session with `npm exec --yes --package @litfamily/litgrok@<installed version> -- litgrok motion-runtime install`.
129
131
 
132
+ ## Equipment drawings
133
+
134
+ For an authorized bare `lit` request to draw real process or lab equipment, or `/lit-schematic`, load `lit-schematic` from `.grok/skills/lit-schematic/` (project) or `~/.grok/skills/lit-schematic/` (user). Triggers: P&ID, PFD, BFD, 공정도, 계장도, 장치도, 모식도, 배치도, 계통도, 단면도, apparatus, isometric cutaway, equipment layout. Measured-data plots go to `lit-scientific-visualization`, software or business diagrams to `lit-diagram-drawer`, a report or deck about a drawing to its Office skill, an interface that shows one to `frontend-ui-ux`.
135
+
136
+ ## Brief over sessions
137
+
138
+ For an authorized bare `lit` request to catch up on every recent session of the repository, or `/lit-adhd` or `/lit-rewind`, load `lit-adhd` from `.grok/skills/lit-adhd/` (project) or `~/.grok/skills/lit-adhd/` (user). Triggers: adhd, rewind, where was I, catch up, 어디까지, 브리핑. It runs read-only and prints the drawn brief; it never edits plans or files. One session's own state is `lit-recap`; many sessions' state is this skill.
139
+
140
+ ## Mechanism ports
141
+
142
+ For an authorized bare `lit` request to port someone else's published technique into a skill or system, or `/lit-hijack`, load `lit-hijack` from `.grok/skills/lit-hijack/` (project) or `~/.grok/skills/lit-hijack/` (user). Triggers: hijack, hijacking, 하이재킹, 하이잭. The route words directly after `lit` win over trigger or owner words later in the prompt. Finding sources first goes to `litresearch`, planning the port to `lit-plan`, executing it to `start-work`, and reviewing the diff to `review-work`. A request that only draws equipment goes to `lit-schematic` even when it names a port; a topic with no sources goes to `litresearch` first.
143
+
130
144
  ## Office output selection
131
145
 
132
146
  For an authorized bare `lit` request, choose `lit-docx` for a report, doc, docx, Word, 보고서, 리포트, 기획서, 제안서, 문서, or 워드, and `lit-pptx` for slides, deck, presentation, PPT, pptx, 발표자료, 발표, 슬라이드, 덱, or 피피티. If both groups occur, use both skills. A file asked for as Markdown or plain text (`report.md`, `.txt`) is no Office file: write plain Markdown for its reader, without front matter or `:::` blocks, and load neither skill. Put figures with units or periods in a table and asked-for decisions in a numbered list. Judge the task's intent, not stray quoted words or file contents.
@@ -0,0 +1,23 @@
1
+ # ATTRIBUTION / NOTICE: frontend-ui-ux craft floor, slop register and interface probe
2
+
3
+ The craft-floor and slop-register rules (`references/craft-floor.md`,
4
+ `references/slop-register.md`), the interface probe (`scripts/interface-probe.mjs` and its
5
+ modules) and the build, polish, audit and harden modes were written for LitGrok after studying
6
+ public projects, credited below. **No source file, prose, fixture or golden file from any studied
7
+ project is vendored, copied or redistributed here.** A guard test fails if any packed file is
8
+ byte-identical to a listed reference skill file.
9
+
10
+ The UI/UX Pro Max design data keeps its own notice in `THIRD-PARTY-NOTICE.txt`, which is pinned
11
+ to that dataset's provenance; these credits live here so the two records stay independent.
12
+
13
+ ---
14
+
15
+ - **jakubkrehel/skills** (https://github.com/jakubkrehel/skills),
16
+ Copyright (c) 2026 Jakub Krehel, MIT License, consulted at upstream commit `267330e`. Its
17
+ mode, review-format and routing-governance mechanisms were re-expressed.
18
+ - **ui-skills.com playbook** (https://www.ui-skills.com/playbook), sourced from
19
+ **ibelick/ui-skills** (https://github.com/ibelick/ui-skills),
20
+ Copyright (c) 2026 Julien Thibeaut, MIT License. Its anti-slop entries and responsive and
21
+ polish values were cross-checked and re-expressed.
22
+
23
+ This file ships as long as those references and the probe ship; remove it only with them.
@@ -10,12 +10,13 @@ argument-hint: "<surface and intended outcome>"
10
10
  Use Grok Build's selected skill and authorized repository tools. A clear build request proceeds to implementation and rendered inspection; a contract alone is not delivery. Review-only and plan-only requests authorize no edits. Incidental mentions are not requests; infer a bare target only when one frontend is unambiguous.
11
11
 
12
12
  Read references/production.md when deciding whether to clarify or build.
13
+ Ask a numbered choice of house style first (recommended first); skip only when the prompt names it or says you choose.
13
14
  Read references/complete-contract.md for the v1beta2 contract and validation limits.
14
15
  Read references/probe-loop.md for the required rendered check and fix cycle.
15
16
 
16
17
  Record direction and inventory, then implement. Evolve and validate the `litfamily.design-contract/v1beta2` contract as decisions settle; retain its evidence requirements. Respect explicit art direction and existing tokens, or use the authored editorial/pixel profile in the production reference.
17
18
 
18
- Resolve resources from the exact selected SKILL.md parent; bind its absolute path as FRONTEND_SKILL_ROOT and quote it, including spaces. Run scripts/verify-canonical-corpus.mjs before corpus use. Run scripts/validate-design-contract.mjs to validate the task contract. Run scripts/query-design-intelligence.mjs when retrieval helps. Run scripts/import-design-intelligence.mjs before trusting its dataset. See the complete contract for rooted commands.
19
+ Resolve resources from the exact selected SKILL.md parent; bind its absolute path as FRONTEND_SKILL_ROOT and quote it, including spaces. Run scripts/verify-canonical-corpus.mjs before corpus use. Run scripts/validate-design-contract.mjs to validate the task contract. Run scripts/query-design-intelligence.mjs when retrieval helps. Run scripts/import-design-intelligence.mjs before trusting its dataset. Run scripts/design-lock.mjs init --family <landing|workspace|settings> when the lock is missing. Run scripts/pixel-art.mjs init <style-id> to see the pixels first. Run scripts/interface-probe.mjs <built-page-or-directory> --out <task-evidence-directory> when the page stands. See the complete contract for rooted commands.
19
20
 
20
21
  ## Reference routes
21
22
 
@@ -27,6 +28,7 @@ Load references/craft-floor.md when checking numeric craft or responsive rules.
27
28
  Load references/composition.md when reading order, columns, or density is undecided.
28
29
  Load references/creative-directions.md when comparing visual directions.
29
30
  Load references/evidence-review.md when preparing observations or an independent verdict.
31
+ Load references/house-styles.md when naming the style, then lock it with design-lock.
30
32
  Load references/implementation-platforms.md when rendering or styling changes.
31
33
  Load references/inclusive-interface.md when keyboard, semantics, CJK, IME, or preferences matter.
32
34
  Load references/interaction-motion.md when states, feedback, focus, or motion need specification.
@@ -34,6 +36,7 @@ Load references/motion-guide.md when planning animation timing, scroll choreogra
34
36
  Load references/operating-lanes.md when selecting or recording the lane.
35
37
  Load references/performance-delivery.md when budgets or critical-path evidence matter.
36
38
  Load references/product-direction.md when the user, completion condition, or non-goal is unclear.
39
+ Load references/production-interview.md before the production round.
37
40
  Load references/redesign-playbook.md when changing an existing visual language.
38
41
  Load references/system-foundations.md when token layers or primitives need grounding.
39
42
  Load references/slop-register.md when reviewing generic patterns and functional tells.
@@ -0,0 +1,9 @@
1
+ # Phase 3 README A/B example slot
2
+
3
+ Add one directory per completed run under this path. Each case directory contains:
4
+
5
+ - `before.md` and `after.md`: the README copy before and after the design pass.
6
+ - `before.png` and `after.png`: matching screenshots from the same viewport and state.
7
+
8
+ Record the prompt, viewport, and run date in the case notes. Add a case only after both
9
+ versions have been rendered and reviewed.