@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
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="146" height="20" role="img" aria-label="local: 1.0.26"><title>local: 1.0.26</title><g shape-rendering="crispEdges"><rect width="49" height="20" fill="#080d14"/><rect x="49" width="97" height="20" fill="#ff6337"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text x="255" y="140" textLength="290" transform="scale(.1)">local</text><text x="965" y="140" textLength="870" transform="scale(.1)" fill="#080D14">1.0.26</text></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="146" height="20" role="img" aria-label="local: 1.0.28"><title>local: 1.0.28</title><g shape-rendering="crispEdges"><rect width="49" height="20" fill="#080d14"/><rect x="49" width="97" height="20" fill="#ff6337"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text x="255" y="140" textLength="290" transform="scale(.1)">local</text><text x="965" y="140" textLength="870" transform="scale(.1)" fill="#080D14">1.0.28</text></g></svg>
Binary file
Binary file
Binary file
Binary file
Binary file
package/docs/reference.md CHANGED
@@ -38,12 +38,12 @@ flowchart TD
38
38
 
39
39
  ## What it is
40
40
 
41
- - 39 Grok-native skill documents at `.grok/skills/<name>/SKILL.md`.
42
- - `lit-pptx` and `lit-docx` include packaged document engines, templates, pinned first-use cache installers, and QA guidance. Bare `lit` selection uses the project rule and requires a live Grok session to verify.
41
+ - 42 Grok-native skill documents at `.grok/skills/<name>/SKILL.md`.
42
+ - `lit-pptx` and `lit-docx` include packaged document engines, templates, pinned first-use cache installers, and QA guidance. `lit-schematic` brings a dependency-free Node engine (orthogonal router, ISA-5.1 tags, isometric camera, QA gate) with worked P&ID, journal-figure and cutaway examples. `lit-hijack` ports someone else's published technique clean-room with provenance, a licence gate and parity proof. `lit-adhd` briefs every recent session on one screen (one card each, the roadmap, one next step) and never edits anything. Bare `lit` selection uses the project rule and requires a live Grok session to verify.
43
43
  - A project rule at `.grok/rules/00-litgrok.md`.
44
44
  - A bounded `SessionStart` hook that prints the standard mark once per validated session and announces the installed payload.
45
45
  - A `PreToolUse` hook that rejects hedge phrasing in pending reader-facing writes while skipping quoted state enums, JSON/YAML scalars, fenced code, and status tables. The host treats only an explicit deny with exit 2 as blocking; exit 0 allows, while timeouts, crashes, and malformed output fail-open and the write proceeds.
46
- - Recording-only `UserPromptSubmit`, `PostToolUse`, `PostToolUseFailure`, `Stop`, `StopFailure`, `SubagentStart`, `SubagentStop`, `PreCompact`, and `PostCompact` hooks. They append bounded package-owned records under `.grok/litgrok/session-ledger/`, emit no stdout, and do not claim access to undocumented event fields. Each append checks only the ledger's first record for this session's identity, seals a torn last line so it is skipped, and moves a ledger past 8 MiB aside as `<key>.<n>.jsonl` before starting a fresh one, keeping the two newest segments; one hook rotates at a time, and the Stop gates read the newest segment and the live ledger. An oversized ledger whose first record belongs to another session is refused, never moved. `.grok/litgrok/` gets a `.gitignore` containing `*` when LitGrok first writes there.
46
+ - Recording-only `UserPromptSubmit`, `PostToolUse`, `PostToolUseFailure`, `Stop`, `StopFailure`, `SubagentStart`, `SubagentStop`, `PreCompact`, `PostCompact`, and `SessionEnd` hooks. They append bounded package-owned records under `.grok/litgrok/session-ledger/`, emit no stdout, and do not claim access to undocumented event fields. Each append checks only the ledger's first record for this session's identity, seals a torn last line so it is skipped, and moves a ledger past 8 MiB aside as `<key>.<n>.jsonl` before starting a fresh one, keeping the two newest segments; one hook rotates at a time, and the Stop gates read the newest segment and the live ledger. An oversized ledger whose first record belongs to another session is refused, never moved. `.grok/litgrok/` gets a `.gitignore` containing `*` when LitGrok first writes there.
47
47
  - A dependency-free `npx` installer that copies the complete packaged `.grok/` tree into user or project Grok paths.
48
48
  - A root-level `plugin.json` Grok plugin manifest in the shape accepted by `grok plugin validate`; the validator reports the shipped skill directory, agent directory, and hook manifests. LitGrok ships eleven Grok-native agent definitions under `.grok/agents/`.
49
49
  - Grok Build supports these plugin, skill, agent, hook, and rule surfaces. The GitHub repository also carries a skills-only Cursor-format manifest and one-entry marketplace in `.cursor-plugin/`, so Cursor and Grok Bot can load the skills; it stays out of the npm package, and a public Cursor Marketplace listing is not live yet. LitGrok ships no MCP server configuration, plugin-supplied LSP server configuration, command catalog, output styles, or TUI/skin surface; those remain unshipped.
@@ -66,10 +66,10 @@ flowchart LR
66
66
  HK --> PLAN --> LEDGER
67
67
  HK --> HEDGE
68
68
  RL --> LG
69
- LG --> S["39 skills · 11 agents"]
69
+ LG --> S["42 skills · 11 agents"]
70
70
  ```
71
71
 
72
- > **A narrow host boundary.** `plugin.json` exposes the package, hooks feed the plan gate and hedge guard, and rules provide project guidance while the session ledger records bounded state. Together these surfaces carry LitGrok’s 39 skills and 11 agents into Grok Build.
72
+ > **A narrow host boundary.** `plugin.json` exposes the package, hooks feed the plan gate and hedge guard, and rules provide project guidance while the session ledger records bounded state. Together these surfaces carry LitGrok’s 42 skills and 11 agents into Grok Build.
73
73
 
74
74
  ## Install
75
75
 
@@ -80,7 +80,7 @@ npm exec --yes --package @litfamily/litgrok@latest -- litgrok install
80
80
  Pin a version when you need a reproducible install:
81
81
 
82
82
  ```bash
83
- npm exec --yes --package @litfamily/litgrok@1.0.26 -- litgrok install
83
+ npm exec --yes --package @litfamily/litgrok@1.0.28 -- litgrok install
84
84
  ```
85
85
 
86
86
  Preview without writing files:
@@ -137,6 +137,10 @@ The timer is the time since Grok's `turn.started_at_ms`. Grok Build 1.0.13 sends
137
137
 
138
138
  The stage map shows the session's place in the LIT workflow, for example `plan ✓ ━━━━ [work 3/7] ━━━━ review · ──── done ·`, with the detail line `└ task 3/7 ▮▮▮▯▯▯▯ · next ▸ 4. README demo GIF · tests ✓ 214` and `⠹ Bash 0:31` at its right edge. The map appears once the session has a workflow stage; `LITGROK_HUD_LINES=1` hides the card. The `UserPromptSubmit` hook sets the stage from the first visible match among `deep-interview` (interview), `lit-plan` (plan), `start-work`, `litwork` or bare `lit` (work) and `review-work` (review), with the same code masking as the discipline, and records it as `stage` in the ledger. `lit review` as the first words of the prompt is the spaced spelling of `review-work`: it switches to the review stage and sets no status-row discipline. `lit brainstorm`, `lit ideation`, `lit ideate`, `lit idea`, `lit ideas` and `lit-brainstorm` as the first words open `lit-brainstorm`: the status row shows that name, the ledger record carries no stage and arms no plan gate, and a running stage stays as it is. A bare `lit` continues a stage that is running: it clears `ended` and changes neither the stage, the stages visited, the plan count nor the test verdict, unless the stage is `done` or none is set, when it starts work. A named skill switches the stage, and so does `lit plan` as the first words of the prompt, which also marks the turn `lit-plan` for the plan gate and the status row. `lit new` or `lit restart` as the first words of the prompt clears the stages visited, the plan count and the test verdict before it sets work; the plan count is then read again from `plans/`. State that is missing, malformed, oversized or from another session is replaced by a first activation, and the prompt hook still writes no stdout. The `PreToolUse` hook, registered for every tool, records only the tool name; a call is in flight while that record is the turn's newest tool record, and the line shows Grok's name mapped to a short label (`run_terminal_command` as `Bash`, `search_replace` as `Edit`) with the time since the record. The `PostToolUse` hook, now also registered for every tool, and `PostToolUseFailure` add `test: { verdict, count }` when `toolInput.command` calls a test runner (npm, pnpm, yarn or bun `test`, `node --test`, vitest, jest, mocha, pytest, unittest, cargo, go, deno, make, gradle, mvn, rspec, ctest, swift or dotnet test) outside a heredoc body or a quoted string; the verdict comes from the failure event, a non-zero exit code, or the runner's pass and fail counts in `toolResult`, and nothing is recorded when the outcome cannot be read. Because the line must survive a ledger tail of 128 KiB, the hooks also keep `<session-hash>.workflow.json` beside the ledger: stage, stages visited, whether the stage's turn has ended, the newest `plans/*.md` checkbox count (`- [x] N.` over all column-zero rows outside fences) with the first unchecked row's title, control characters removed and cut to 60 characters, and the last test verdict, at most 4 KiB, written atomically, refused through a symlink and only once there is something to show. `Stop` closes the stage unless the plan gate or a handoff directive held the turn; a review that ends with every task checked becomes done. In colour, as the family's LIT card draws it, stages behind are grey with a tick, the current stage is an accent chip with dark text and stages ahead are grey with a dot; rails into a passed or current stage are the accent, the rail leaving the current stage is a grey `━` and those further on are grey `─`, and while a turn runs one pink cell moves along the rail into the current stage at each redraw. The tool step is the bold accent and the test badge green or red. The stage names are LitGrok's own (`interview`, `plan`, `work`, `review`, `done`); LitGrok has no PIN-to-RECORD loop skill. Narrow rows shorten the rails to two cells and one, then drop the stage names, and finally keep only the current stage.
139
139
 
140
+ Other sessions of the same workspace get one row each under the card, or under the single row when this session has no card: `● start-work · w2B:p2 running`, `· lit-plan idle`, `✓ start-work done`. Running rows come first, then idle, then done, newest first, at most four. The rows come from liveness records: `PostToolUse` and `PostToolUseFailure` write `alive`, `Stop` writes `idle` and `SessionEnd` writes `ended` to `.grok/litgrok/liveness/<session-hash>.json`, with `HERDR_PANE_ID` kept only when it is a short plain token. A repeat of the same state within 30 seconds writes nothing, a symlinked record or folder is refused, and a failed write never changes the hook's output. A record older than 15 minutes reads as ended, so a session that dies without `SessionEnd` drops off. A start-work whose work stage ended with every plan task checked, or that reached `done`, shows `done` for 60 seconds and then leaves; an ended session is not shown. `LITGROK_HUD_LINES=1` keeps the single row without these rows.
141
+
142
+ Planning has two more aids. After `lit-plan` saves `plans/<slug>.md`, a bare `go` in the same conversation within 30 minutes of the plan file's modification time loads start-work on that plan; Grok Build drops an allowing prompt hook's output, so this route lives in the project rule and the lit-plan skill, not in a hook. And a todo that names an absolute path outside the project needs a `Scope roots: <path> (<actions>)` line: `scaffold-plan.mjs --check` and the Stop plan gate (within its two-block cap) name each uncovered folder with the exact line to paste. Fenced blocks and commands quoted in inline code do not count.
143
+
140
144
  `install --user --notify` appends a managed `[ui.notifications]` table with `condition = "always"` and `events = ["turn_complete", "approval_required", "agent_error"]`, so Grok's own terminal notification also fires while the terminal has focus. It follows the status-line rules: user scope only, off by default, a backup before any change, no change when any `notifications` setting already exists or `ui` is a top-level value or array, and user uninstall removes only the unchanged table. Grok Build 1.0.13 documents this table, yet its `grok inspect` lists `ui.notifications` as an unrecognized config key; that warning comes from Grok and changes nothing else in the file.
141
145
 
142
146
  ### Automatic handoff (opt-in)
@@ -283,7 +287,7 @@ npm pack --dry-run --json
283
287
 
284
288
  A passing static test does not prove that a live `grok` binary loaded the files.
285
289
 
286
- With Grok Build installed, run `grok inspect --json` from the Git project root and confirm that the rule path is listed. A plain folder can still show the skills and rules while reporting zero hooks. For a new disposable project, create the Git root yourself with `git init`; an existing repository should use its actual root. After granting trust, open `/skills` and `/hooks` to verify the catalog and eleven hook registrations. These are host-side checks; this package does not create the Git root, change trust, log in to Grok, or claim their result.
290
+ With Grok Build installed, run `grok inspect --json` from the Git project root and confirm that the rule path is listed. A plain folder can still show the skills and rules while reporting zero hooks. For a new disposable project, create the Git root yourself with `git init`; an existing repository should use its actual root. After granting trust, open `/skills` and `/hooks` to verify the catalog and twelve hook registrations. These are host-side checks; this package does not create the Git root, change trust, log in to Grok, or claim their result.
287
291
 
288
292
  ## Safety
289
293
 
@@ -38,12 +38,12 @@ flowchart TD
38
38
 
39
39
  ## 무엇을 제공하나요?
40
40
 
41
- - `.grok/skills/<name>/SKILL.md`에 Grok-native skill 문서 39개
42
- - `lit-pptx`와 `lit-docx`에는 문서 엔진, 템플릿, 첫 사용 시 고정된 의존성을 캐시에 설치하는 도구와 품질 검사 안내가 포함됩니다. 맨 끝의 `lit` 선택은 project rule 안내이며 실제 Grok 세션에서 확인해야 합니다.
41
+ - `.grok/skills/<name>/SKILL.md`에 Grok-native skill 문서 42개
42
+ - `lit-pptx`와 `lit-docx`에는 문서 엔진, 템플릿, 첫 사용 시 고정된 의존성을 캐시에 설치하는 도구와 품질 검사 안내가 포함됩니다. `lit-schematic`에는 의존성 없는 Node 엔진(직교 라우터, ISA-5.1 태그, 아이소메트릭 카메라, QA 게이트)과 P&ID·논문 그림·단면도 예제가 들어 있습니다. `lit-hijack`은 남의 글에 공개된 기법을 출처 기록, 라이선스 검사, 동등성 증명과 함께 가져옵니다. `lit-adhd`는 최근 세션 전체를 한 화면으로 브리핑하고 아무것도 고치지 않습니다. 맨 끝의 `lit` 선택은 project rule 안내이며 실제 Grok 세션에서 확인해야 합니다.
43
43
  - `.grok/rules/00-litgrok.md` project rule
44
44
  - 설치된 payload를 짧게 알리는 `SessionStart` hook
45
45
  - reader-facing write의 hedge 표현을 차단하되 quoted state enum, JSON/YAML scalar, fenced code, status table은 제외하는 `PreToolUse` hook. Host는 명시적인 deny와 exit 2만 차단으로 처리합니다. exit 0은 허용이고 timeout, crash, malformed output은 fail-open이므로 write가 진행됩니다.
46
- - `.grok/litgrok/session-ledger/`에 bounded package-owned record만 추가하는 `UserPromptSubmit`, `PostToolUse`, `PostToolUseFailure`, `Stop`, `StopFailure`, `SubagentStart`, `SubagentStop`, `PreCompact`, `PostCompact` hook. stdout을 출력하지 않으며 문서화되지 않은 event field 접근을 주장하지 않습니다. 기록할 때마다 ledger의 첫 record로만 이 세션의 identity를 확인하고, 끊긴 마지막 줄은 건너뛸 수 있게 닫으며, 8 MiB를 넘은 ledger는 `<key>.<n>.jsonl`로 옮긴 뒤 새로 시작하고, segment는 최근 두 개만 남깁니다. 한 번에 한 hook만 옮기며, Stop gate는 가장 최근 segment와 현재 ledger를 함께 읽습니다. 첫 record가 다른 세션의 것인 큰 ledger는 옮기지 않고 거부합니다. LitGrok이 `.grok/litgrok/`에 처음 쓸 때 `*` 한 줄짜리 `.gitignore`도 만듭니다.
46
+ - `.grok/litgrok/session-ledger/`에 bounded package-owned record만 추가하는 `UserPromptSubmit`, `PostToolUse`, `PostToolUseFailure`, `Stop`, `StopFailure`, `SubagentStart`, `SubagentStop`, `PreCompact`, `PostCompact`, `SessionEnd` hook. stdout을 출력하지 않으며 문서화되지 않은 event field 접근을 주장하지 않습니다. 기록할 때마다 ledger의 첫 record로만 이 세션의 identity를 확인하고, 끊긴 마지막 줄은 건너뛸 수 있게 닫으며, 8 MiB를 넘은 ledger는 `<key>.<n>.jsonl`로 옮긴 뒤 새로 시작하고, segment는 최근 두 개만 남깁니다. 한 번에 한 hook만 옮기며, Stop gate는 가장 최근 segment와 현재 ledger를 함께 읽습니다. 첫 record가 다른 세션의 것인 큰 ledger는 옮기지 않고 거부합니다. LitGrok이 `.grok/litgrok/`에 처음 쓸 때 `*` 한 줄짜리 `.gitignore`도 만듭니다.
47
47
  - package의 `.grok/` tree 전체를 user 또는 project 경로에 복사하는 dependency-free `npx` installer
48
48
  - Grok Build가 지원하는 plugin manifest 형식의 root-level `plugin.json`을 제공합니다. `grok plugin validate`가 이를 검증하고 `.grok/skills`, `.grok/agents`, hook manifest를 가리킵니다. `.grok/agents/` 아래 Grok-native agent 11개와 hook/rule을 함께 제공합니다.
49
49
  - GitHub 저장소에는 Cursor와 Grok Bot이 skill을 불러오도록 skill만 선언한 Cursor 형식 manifest와 항목 하나짜리 marketplace가 `.cursor-plugin/`에 있습니다. npm package에는 들어가지 않으며, 공개 Cursor Marketplace 등록은 아직 준비 중입니다.
@@ -67,10 +67,10 @@ flowchart LR
67
67
  HK --> PLAN --> LEDGER
68
68
  HK --> HEDGE
69
69
  RL --> LG
70
- LG --> S["39 skills · 11 agents"]
70
+ LG --> S["42 skills · 11 agents"]
71
71
  ```
72
72
 
73
- > **Host 경계는 좁고 명확합니다.** `plugin.json`이 package를 노출하고, hook은 plan gate와 hedge guard로 연결되며, rule은 project guidance가 됩니다. session ledger에는 bounded state를 기록하고, 이 표면들이 39개 skill과 11개 agent를 Grok Build에서 사용할 수 있게 합니다.
73
+ > **Host 경계는 좁고 명확합니다.** `plugin.json`이 package를 노출하고, hook은 plan gate와 hedge guard로 연결되며, rule은 project guidance가 됩니다. session ledger에는 bounded state를 기록하고, 이 표면들이 42개 skill과 11개 agent를 Grok Build에서 사용할 수 있게 합니다.
74
74
 
75
75
  ## 설치
76
76
 
@@ -81,7 +81,7 @@ npm exec --yes --package @litfamily/litgrok@latest -- litgrok install
81
81
  재현 가능한 설치는 버전을 고정합니다.
82
82
 
83
83
  ```bash
84
- npm exec --yes --package @litfamily/litgrok@1.0.26 -- litgrok install
84
+ npm exec --yes --package @litfamily/litgrok@1.0.28 -- litgrok install
85
85
  ```
86
86
 
87
87
  파일을 쓰지 않고 미리보기:
@@ -138,6 +138,10 @@ refresh_interval = 2
138
138
 
139
139
  단계 지도는 세션이 LIT 작업 흐름의 어디쯤인지 보여 줍니다. 예를 들면 `plan ✓ ━━━━ [work 3/7] ━━━━ review · ──── done ·`이고, 그 아래 세부 줄은 `└ task 3/7 ▮▮▮▯▯▯▯ · next ▸ 4. README demo GIF · tests ✓ 214`에 오른쪽 끝 `⠹ Bash 0:31`입니다. 지도는 세션에 작업 흐름 단계가 생기면 나타나고, `LITGROK_HUD_LINES=1`이면 카드 전체를 숨깁니다. `UserPromptSubmit` 훅은 프롬프트에서 보이는 첫 일치 항목으로 단계를 정합니다. `deep-interview`는 interview, `lit-plan`은 plan, `start-work`·`litwork`·`lit`만 쓴 경우는 work, `review-work`는 review이며, 코드 가리기 규칙은 discipline과 같고, ledger에 `stage`로 남깁니다. 프롬프트가 `lit review`로 시작하면 `review-work`의 띄어쓰기 표기로 보고 review 단계로 바꾸며 상태 줄 discipline은 정하지 않습니다. `lit brainstorm`, `lit ideation`, `lit ideate`, `lit idea`, `lit ideas`, `lit-brainstorm`으로 시작하면 `lit-brainstorm`을 엽니다. 상태 줄에 그 이름이 나오고, ledger 기록에는 stage가 없으며 plan gate도 켜지 않고, 진행 중인 단계는 그대로 둡니다. 모든 도구에 등록한 `PreToolUse` 훅은 도구 이름만 기록합니다. 그 기록이 턴의 가장 최근 도구 기록이면 실행 중으로 보고, Grok의 도구 이름을 짧은 이름(`run_terminal_command`는 `Bash`, `search_replace`는 `Edit`)으로 바꿔 기록 이후 경과 시간과 함께 보여 줍니다. 이제 모든 도구에 등록한 `PostToolUse` 훅과 `PostToolUseFailure` 훅은 `toolInput.command`가 테스트 실행기(npm·pnpm·yarn·bun `test`, `node --test`, vitest, jest, mocha, pytest, unittest, cargo, go, deno, make, gradle, mvn, rspec, ctest, swift, dotnet test)를 heredoc 본문이나 따옴표 문자열 밖에서 부를 때 `test: { verdict, count }`를 더합니다. 결과는 실패 이벤트, 0이 아닌 종료 코드, `toolResult`에 찍힌 통과·실패 수로 정하고, 결과를 읽을 수 없으면 남기지 않습니다. ledger는 끝의 128 KiB만 읽으므로 훅은 ledger 옆에 `<session-hash>.workflow.json`도 둡니다. 단계, 거친 단계, 그 단계의 턴이 끝났는지, 가장 최근 `plans/*.md`의 체크 수(펜스 밖 첫 열 작업 행 가운데 `- [x] N.`의 수)와 체크하지 않은 첫 행의 제목(제어 문자를 지우고 60자로 자름), 마지막 테스트 결과를 담으며, 4 KiB 이하로 원자적으로 쓰고, 심볼릭 링크는 거부하며, 보여 줄 것이 생겼을 때만 만듭니다. `Stop`은 plan gate나 핸드오프 지시가 턴을 붙잡지 않았으면 단계를 닫고, 모든 작업이 체크된 상태로 끝난 검토는 done이 됩니다. 색을 쓰면 패밀리 LIT 카드처럼 지나온 단계는 회색에 체크, 지금 단계는 어두운 글자의 강조색 칩, 앞으로 올 단계는 회색에 점입니다. 지나온 단계와 지금 단계로 들어가는 레일은 강조색, 지금 단계에서 나가는 레일은 회색 `━`, 그 뒤는 회색 `─`이고, 턴이 도는 동안 분홍 칸 하나가 다시 그릴 때마다 지금 단계로 들어가는 레일을 따라 움직입니다. 도구 표시는 굵은 강조색, 테스트 표시는 초록이나 빨강입니다. 단계 이름은 LitGrok 자신의 것(`interview`, `plan`, `work`, `review`, `done`)이고, LitGrok에는 PIN에서 RECORD로 가는 루프 스킬이 없습니다. 줄이 좁으면 레일을 두 칸, 한 칸으로 줄이고, 이어서 단계 이름을 빼며, 마지막에는 지금 단계만 남깁니다.
140
140
 
141
+ 같은 작업 공간의 다른 세션은 카드 아래(이 세션에 카드가 없으면 한 줄 행 아래)에 한 줄씩 나옵니다. `● start-work · w2B:p2 running`, `· lit-plan idle`, `✓ start-work done` 같은 모양이고, 실행 중, 쉬는 중, 끝냄 순서로 최신 것부터 네 줄까지 보입니다. 이 줄은 활동 기록에서 옵니다. `PostToolUse`와 `PostToolUseFailure`는 `alive`, `Stop`은 `idle`, `SessionEnd`는 `ended`를 `.grok/litgrok/liveness/<session-hash>.json`에 쓰고, `HERDR_PANE_ID`는 짧은 일반 토큰일 때만 남깁니다. 같은 상태가 30초 안에 다시 오면 쓰지 않고, 심볼릭 링크인 기록이나 폴더는 거부하며, 쓰기에 실패해도 훅 출력은 바뀌지 않습니다. 15분이 지난 기록은 끝난 것으로 보므로 `SessionEnd` 없이 멈춘 세션도 사라집니다. 모든 계획 작업을 체크한 채 work 단계가 끝났거나 `done`에 이른 start-work는 60초 동안 `done`으로 보인 뒤 사라지고, 끝난 세션은 보이지 않습니다. `LITGROK_HUD_LINES=1`이면 이 줄 없이 한 줄 행만 씁니다.
142
+
143
+ 계획에도 도움이 두 가지 더 있습니다. `lit-plan`이 `plans/<slug>.md`를 저장한 뒤 같은 대화에서 계획 파일 수정 시각으로부터 30분 안에 `go`만 입력하면 그 계획으로 start-work를 시작합니다. Grok Build는 허용한 프롬프트 훅의 출력을 버리므로 이 경로는 훅이 아니라 프로젝트 규칙과 lit-plan 스킬에 들어 있습니다. 또 할 일이 프로젝트 밖 절대 경로를 가리키면 `Scope roots: <path> (<actions>)` 줄이 있어야 합니다. `scaffold-plan.mjs --check`와 Stop plan gate(두 번 block 한도 안에서)가 덮이지 않은 폴더마다 붙여 넣을 줄을 그대로 알려 줍니다. 펜스 블록 안의 경로와 인라인 코드로 감싼 명령은 세지 않습니다.
144
+
141
145
  `install --user --notify`는 관리 표식이 붙은 `[ui.notifications]` 표를 추가합니다. `condition = "always"`와 `events = ["turn_complete", "approval_required", "agent_error"]`를 담아 터미널을 보고 있을 때도 Grok 자체 터미널 알림이 뜨게 합니다. 규칙은 상태 행과 같습니다. 사용자 범위에서만 쓸 수 있고, 기본은 꺼져 있으며, 바꾸기 전에 백업하고, `notifications` 설정이 이미 있거나 `ui`가 최상위 값 또는 배열이면 바꾸지 않으며, 사용자 범위 제거는 그대로인 표만 지웁니다. Grok Build 1.0.13은 이 표를 문서에 적어 두었지만 `grok inspect`는 `ui.notifications`를 인식하지 못한 설정 키로 표시합니다. 이 경고는 Grok이 내는 것이고 파일의 다른 부분은 바뀌지 않습니다.
142
146
 
143
147
  ### 자동 핸드오프 (선택)
@@ -280,7 +284,7 @@ npm pack --dry-run --json
280
284
 
281
285
  정적 테스트가 통과해도 live `grok` 바이너리가 파일을 읽었다는 뜻은 아닙니다.
282
286
 
283
- Grok Build가 설치된 환경에서는 Git project root에서 `grok inspect --json`을 실행해 rule 경로가 표시되는지 확인합니다. 일반 폴더에서는 skill과 rule이 보여도 hook이 0개일 수 있습니다. 새 disposable project는 사용자가 `git init`을 실행하고, 기존 저장소는 실제 root를 사용합니다. trust 허용 뒤 `/skills`와 `/hooks`에서 skill catalog와 열한 hook 등록을 확인합니다. 이는 host 측 확인 절차이며, LitGrok이 Git root나 trust를 바꾸거나 Grok에 로그인하거나 그 결과를 주장하지 않습니다.
287
+ Grok Build가 설치된 환경에서는 Git project root에서 `grok inspect --json`을 실행해 rule 경로가 표시되는지 확인합니다. 일반 폴더에서는 skill과 rule이 보여도 hook이 0개일 수 있습니다. 새 disposable project는 사용자가 `git init`을 실행하고, 기존 저장소는 실제 root를 사용합니다. trust 허용 뒤 `/skills`와 `/hooks`에서 skill catalog와 열두 hook 등록을 확인합니다. 이는 host 측 확인 절차이며, LitGrok이 Git root나 trust를 바꾸거나 Grok에 로그인하거나 그 결과를 주장하지 않습니다.
284
288
 
285
289
  ## 안전
286
290
 
package/hooks/hooks.json CHANGED
@@ -11,6 +11,17 @@
11
11
  ]
12
12
  }
13
13
  ],
14
+ "SessionEnd": [
15
+ {
16
+ "hooks": [
17
+ {
18
+ "type": "command",
19
+ "command": "node \"$GROK_PLUGIN_ROOT/.grok/hooks/session-end.mjs\"",
20
+ "timeout": 5
21
+ }
22
+ ]
23
+ }
24
+ ],
14
25
  "UserPromptSubmit": [
15
26
  {
16
27
  "hooks": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@litfamily/litgrok",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "description": "Installer for LitGrok: skills, a project rule and hooks that help xAI Grok Build sessions plan, build, check and hand off their work.",
5
5
  "keywords": [
6
6
  "grok",
@@ -54,6 +54,10 @@
54
54
  "docs/assets/cover-motion-still.webp",
55
55
  "docs/assets/litgrok-wordmark.svg",
56
56
  "docs/assets/litgrok-clay-icon.png",
57
+ "docs/assets/showcase/brief.webp",
58
+ "docs/assets/showcase/deck.webp",
59
+ "docs/assets/showcase/page.webp",
60
+ "docs/assets/showcase/pid.webp",
57
61
  "docs/assets/litgrok-ignition-1600.webp",
58
62
  "docs/assets/litgrok-continuity-1600.webp",
59
63
  "docs/assets/readme/ascii-readme.svg",
@@ -66,6 +70,7 @@
66
70
  "docs/assets/skills",
67
71
  "CONTRIBUTING.md",
68
72
  "SECURITY.md",
73
+ "TRADEMARK.md",
69
74
  "CODE_OF_CONDUCT.md",
70
75
  "SUPPORT.md",
71
76
  "docs/privacy.md",
package/plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "litgrok",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "description": "Grok Build skills, project rules, and bounded lifecycle hooks for evidence-first lit work.",
5
5
  "author": {
6
6
  "name": "LitGrok contributors"
@@ -1,105 +0,0 @@
1
- import { LIMITS, RULES } from './rule-data.mjs';
2
-
3
- // Serialized into agent-browser eval. All thresholds enter as data from rule-data.mjs.
4
- function inspect(config) {
5
- const { limits, rules } = config;
6
- const findings = [], notVerified = [], counts = new Map();
7
- const viewport = { width: innerWidth, height: innerHeight };
8
- const nodes = [...document.querySelectorAll('body *')].slice(0, limits.nodes);
9
- const selector = (e) => e?.id ? '#' + CSS.escape(e.id) : e?.tagName?.toLowerCase() + (e?.classList?.length ? '.' + CSS.escape(e.classList[0]) : '');
10
- const add = (rule, severity, e, value, threshold, tier = 'measured', note) => {
11
- const count = counts.get(rule) || 0;
12
- if (count >= limits.findingsPerRule) return;
13
- counts.set(rule, count + 1);
14
- findings.push({ rule, severity, tier, viewport, selector: selector(e) || null, value, threshold, ...(note ? { note } : {}) });
15
- };
16
- const visible = (e) => { const r = e.getBoundingClientRect(), s = getComputedStyle(e); return r.width > 0 && r.height > 0 && s.display !== 'none' && s.visibility !== 'hidden' && Number(s.opacity) > 0; };
17
- const text = nodes.filter((e) => visible(e) && [...e.childNodes].some((n) => n.nodeType === Node.TEXT_NODE && n.textContent.trim()));
18
- const primary = (e) => e.matches('button[type="submit"], input[type="submit"], .primary, [class*="primary"], [data-primary]');
19
- const color = (s) => { const m = s.match(/^rgba?\(([^)]+)\)$/); if (!m) return null; const p = m[1].split(/[\s,/]+/).filter(Boolean).map(Number); return p.length >= 3 && (p[3] ?? 1) === 1 ? p.slice(0, 3) : null; };
20
- const hsl = (c) => { if(!c)return null;const a=c.map((v)=>v/255),max=Math.max(...a),min=Math.min(...a),d=max-min,l=(max+min)/2,s=d?d/(1-Math.abs(2*l-1)):0;let h=0;if(d){const k=a.indexOf(max);h=60*((k===0?(a[1]-a[2])/d:k===1?(a[2]-a[0])/d+2:(a[0]-a[1])/d+4)+6)%360;}return {h,s,l}; };
21
- const bg = (e) => { for (let n = e; n; n = n.parentElement) { const style=getComputedStyle(n); if (style.backgroundImage !== 'none') return null; const c = color(style.backgroundColor); if (c) return c; } return [255,255,255]; };
22
- const lum = (c) => { const a = c.map((x) => { const v=x/255; return v<=0.04045?v/12.92:((v+0.055)/1.055)**2.4; }); return a[0]*0.2126+a[1]*0.7152+a[2]*0.0722; };
23
- const contrast = (a,b) => (Math.max(lum(a),lum(b))+0.05)/(Math.min(lum(a),lum(b))+0.05);
24
- const overflow = Math.max(document.documentElement.scrollWidth, document.body?.scrollWidth || 0) - innerWidth;
25
- if (overflow > rules['RS-006'].overflowPx) add('RS-006','HIGH',document.documentElement,overflow,rules['RS-006'].overflowPx);
26
- const accents = new Set(), glows=[];
27
- for (const e of text) {
28
- const s=getComputedStyle(e), r=e.getBoundingClientRect(), own=e.textContent.trim();
29
- const offscreen=r.right > innerWidth+rules['RS-007'].offscreenPx || r.left < -rules['RS-007'].offscreenPx;
30
- const clipped=e.scrollWidth-e.clientWidth > rules['RS-007'].clipPx && /hidden|clip/.test(s.overflowX) || e.scrollHeight-e.clientHeight > rules['RS-007'].clipPx && /hidden|clip/.test(s.overflowY);
31
- if ((clipped||offscreen) && !/sr-only|visually-hidden/.test(e.className || '') && s.textOverflow!=='ellipsis' && (!s.webkitLineClamp || s.webkitLineClamp==='none') && (!s.lineClamp || s.lineClamp==='none')) add('RS-007','HIGH',e,{scrollWidth:e.scrollWidth,clientWidth:e.clientWidth,right:Math.round(r.right)},offscreen?rules['RS-007'].offscreenPx:rules['RS-007'].clipPx);
32
- const fg=color(s.color), background=bg(e);
33
- if (fg && background && !e.matches(':disabled,[aria-disabled="true"]')) { const px=parseFloat(s.fontSize), large=px>=rules['CF-201'].largePx || px>=rules['CF-201'].boldPx && Number(s.fontWeight)>=rules['CF-201'].boldWeight, floor=large?rules['CF-201'].largeRatio:rules['CF-201'].bodyRatio, ratio=contrast(fg,background); if (ratio<floor) add('CF-201',large?'MEDIUM':'HIGH',e,+ratio.toFixed(2),floor); }
34
- else if (fg) notVerified.push({rule:'CF-201',reason:'image or gradient background needs visual review',selector:selector(e)});
35
- const lh=parseFloat(s.lineHeight), fs=parseFloat(s.fontSize), heading=/^H[1-6]$/.test(e.tagName);
36
- if (Number.isFinite(lh) && Number.isFinite(fs) && fs>0 && r.height>lh*1.5 && (heading || e.matches('p,blockquote,dd,li,td'))) { const ratio=lh/fs, rule=heading?'CF-102':'CF-103', floor=heading?(fs>=rules['CF-102'].displayPx?rules['CF-102'].displayMin:rules['CF-102'].min):(/[\u3000-\u9fff]/.test(own)?rules['CF-103'].cjkMin:rules['CF-103'].latinMin); if (ratio<floor) add(rule,'MEDIUM',e,+ratio.toFixed(2),floor); }
37
- if (e.matches('p,blockquote,dd,li,td') && !e.closest('nav,footer,marquee') && Number.isFinite(lh) && r.height>lh*1.5 && fs>0) { const ch=r.width/(fs*0.5), floor=/[\u3000-\u9fff]/.test(own)?rules['CF-101'].cjkLongLineCh:rules['CF-101'].longLineCh; if (ch>floor) add('CF-101','MEDIUM',e,+ch.toFixed(1),floor,'derived','rendered-line estimate'); }
38
- if ((s.backgroundClip==='text' || s.webkitBackgroundClip==='text') && /gradient\(/.test(s.backgroundImage)) add('SLOP-009','MEDIUM',e,'gradient text','solid text color');
39
- if (/^[\p{Emoji_Presentation}\p{Extended_Pictographic}]/u.test(own) && e.matches('button,a,[role="button"],nav *,[class*="badge"]')) add('SLOP-053','LOW',e,own.slice(0,8),'consistent icon set','derived','policy exception needs review');
40
- if (e.matches('label,button,a') && !e.matches('.brand,[class*="brand"],[data-brand]') && /^[A-Z][a-z]+(?: [A-Z][a-z]+){2,}$/.test(own)) add('CF-107','LOW',e,own,'sentence case');
41
- if(s.textTransform==='uppercase' && own.length>rules['SLOP-020'].maxUppercaseChars && [...own].filter((c)=>/[A-Za-z]/.test(c)).length>own.length/2)add('SLOP-020','LOW',e,own.length,rules['SLOP-020'].maxUppercaseChars);
42
- }
43
- for (const e of nodes) {
44
- if (!visible(e)) continue;
45
- const s=getComputedStyle(e), r=e.getBoundingClientRect();
46
- if (e.matches('a,button,input,select,textarea,[role="button"],[role="link"]')) {
47
- const size=Math.min(r.width,r.height), floor=rules['CF-701'].floorPx;
48
- const spaced=[...e.parentElement?.querySelectorAll('a,button,input,select,textarea,[role="button"],[role="link"]')||[]].every((other)=>other===e||(()=>{const b=other.getBoundingClientRect();return Math.max(0,Math.max(b.left-r.right,r.left-b.right))>=floor-size||Math.max(0,Math.max(b.top-r.bottom,r.top-b.bottom))>=floor-size;})());
49
- if (size<floor && !spaced) add('CF-701','HIGH',e,+size.toFixed(1),floor);
50
- else if (innerWidth<=768 && size<rules['CF-701'].touchPx) add('CF-701',primary(e)?'HIGH':'MEDIUM',e,+size.toFixed(1),rules['CF-701'].touchPx);
51
- if (e.matches('textarea,input:not([type]),input:is([type="text"],[type="search"],[type="email"],[type="url"],[type="tel"],[type="password"],[type="number"])') && innerWidth<=768 && parseFloat(s.fontSize)<rules['RS-008'].inputPx) add('RS-008','MEDIUM',e,parseFloat(s.fontSize),rules['RS-008'].inputPx);
52
- if (e.matches('a') && /^(#|javascript:)/i.test(e.getAttribute('href')||'')) add('SLOP-058',primary(e)||e.closest('nav')?'HIGH':'MEDIUM',e,e.getAttribute('href'),'working destination','derived');
53
- if (e.matches('button') && !e.hasAttribute('type') && e.form && [...document.querySelectorAll('button,input[type="submit"],input[type="image"]')].filter((button)=>button.form===e.form && (button.matches('input[type="submit"],input[type="image"]')||!button.hasAttribute('type')||button.type==='submit')).length>=2) add('SLOP-059','HIGH',e,'implicit submit','explicit type','derived');
54
- }
55
- if (s.willChange==='all' || s.willChange.split(',').some((x)=>x.trim() && !rules['CF-507'].allowed.includes(x.trim()) && x.trim()!=='auto')) add('CF-507','LOW',e,s.willChange,rules['CF-507'].allowed);
56
- if (e.matches('dialog,[role="dialog"],.modal,.overlay') && /blur\(/.test(s.backdropFilter)) add('CF-406','LOW',e,s.backdropFilter,'solid scrim');
57
- const shadow=s.boxShadow;const blur=shadow.match(/(-?\d+(?:\.\d+)?)px\s+(-?\d+(?:\.\d+)?)px\s+(\d+(?:\.\d+)?)px/);const shadowColor=color(shadow.match(/rgba?\([^)]+\)/)?.[0]||'');
58
- if(blur && Math.abs(Number(blur[1]))<=rules['CF-404'].maxOffsetPx && Math.abs(Number(blur[2]))<=rules['CF-404'].maxOffsetPx && Number(blur[3])>=rules['CF-404'].minBlurPx && hsl(shadowColor)?.s>=rules['CF-404'].minSaturation)glows.push(e);
59
- const p=e.parentElement; if (p && parseFloat(s.borderRadius)>0 && parseFloat(getComputedStyle(p).borderRadius)>0 && parseFloat(getComputedStyle(p).paddingLeft)<=rules['CF-401'].maxPaddingPx && Math.abs(r.width-(p.clientWidth-2*parseFloat(getComputedStyle(p).paddingLeft)))<4) { const expected=Math.max(0,parseFloat(getComputedStyle(p).borderRadius)-parseFloat(getComputedStyle(p).paddingLeft)); if (Math.abs(parseFloat(s.borderRadius)-expected)>rules['CF-401'].radiusTolerancePx) add('CF-401','LOW',e,parseFloat(s.borderRadius),expected); }
60
- if (r.width>=rules['CF-205'].minAreaPx && r.height>=rules['CF-205'].minAreaPx && /^(BUTTON|A|DIV|SECTION)$/.test(e.tagName) && !e.matches('[role="status"],[role="alert"],[class*="status"],[class*="success"],[class*="warning"],[class*="error"]') && !(r.height<=32&&r.width<=160) && s.backgroundColor!=='rgba(0, 0, 0, 0)') { const c=hsl(color(s.backgroundColor)); if(c && c.s>=rules['CF-205'].minSaturation)accents.add(s.backgroundColor); }
61
- if(s.transitionProperty.split(',').some((property)=>rules['SLOP-026'].properties.includes(property.trim())))add('SLOP-026','MEDIUM',e,s.transitionProperty,'transform/opacity');
62
- }
63
- const focusables=nodes.filter((e)=>visible(e)&&!e.matches(':disabled,[aria-disabled="true"]')&&e.matches('a[href],button,input:not([type="hidden"]),select,textarea,[tabindex]:not([tabindex="-1"])')).slice(0,5);
64
- for(const e of focusables){
65
- const name=e.getAttribute('aria-label')||e.getAttribute('aria-labelledby')?.split(/\s+/).map((id)=>document.getElementById(id)?.textContent||'').join(' ')||e.labels?.[0]?.textContent||e.getAttribute('alt')||e.getAttribute('title')||e.textContent||'';
66
- if(!name.trim())add('CF-603','HIGH',e,'empty accessible name','nonempty');
67
- const state=()=>{const s=getComputedStyle(e);return {outline:s.outline,outlineStyle:s.outlineStyle,outlineWidth:s.outlineWidth,outlineColor:s.outlineColor,boxShadow:s.boxShadow,border:s.border,backgroundColor:s.backgroundColor};};
68
- const rest=state();e.focus({preventScroll:true});if(!e.matches(':focus-visible')){notVerified.push({rule:'CF-202',selector:selector(e),reason:'programmatic focus not focus-visible'});e.blur();continue;}
69
- const focused=state();e.blur();if(['outline','boxShadow','border','backgroundColor'].every((key)=>rest[key]===focused[key]))add('CF-202','HIGH',e,'no focus style change','visible focus indicator');
70
- else if(focused.outlineStyle!=='auto'&&parseFloat(focused.outlineWidth)<2&&focused.boxShadow==='none')add('CF-202','MEDIUM',e,focused.outlineWidth,'2px custom indicator');
71
- }
72
- const overlapping=text.filter((e)=>!e.closest('nav,footer')).slice(0,180);
73
- for(let i=0;i<overlapping.length;i++)for(let j=i+1;j<overlapping.length;j++){
74
- const a=overlapping[i],b=overlapping[j];if(a.contains(b)||b.contains(a))continue;
75
- const x=a.getBoundingClientRect(),y=b.getBoundingClientRect(),area=Math.max(0,Math.min(x.right,y.right)-Math.max(x.left,y.left))*Math.max(0,Math.min(x.bottom,y.bottom)-Math.max(x.top,y.top));
76
- const ratio=area/Math.max(1,Math.min(x.width*x.height,y.width*y.height));
77
- if(ratio>=rules['RS-007'].overlapRatio)add('RS-007','MEDIUM',a,+ratio.toFixed(2),rules['RS-007'].overlapRatio);
78
- }
79
- const headings=nodes.filter((e)=>e.matches('h2')&&visible(e));
80
- const eyebrows=nodes.filter((e)=>visible(e)&&e.nextElementSibling?.matches('h2')&&getComputedStyle(e).textTransform==='uppercase'&&parseFloat(getComputedStyle(e).letterSpacing)>0);
81
- if(headings.length && eyebrows.length>Math.ceil(headings.length/3))add('SLOP-029','MEDIUM',eyebrows[0],eyebrows.length,Math.ceil(headings.length/3));
82
- for(const e of nodes.filter((n)=>n.matches('img'))){const src=e.getAttribute('src'),srcset=e.getAttribute('srcset'),loader=[...e.attributes].some((a)=>/^data-(?:src|srcset|lazy)/.test(a.name));if(!e.complete || ((!src&&!srcset)&&loader)){notVerified.push({rule:'SLOP-057',selector:selector(e),reason:'lazy image not fetched at capture'});continue;}if((!src&&!srcset)||src==='#'||src==='undefined'||srcset==='#'||srcset==='undefined'||(e.complete&&e.naturalWidth===0))add('SLOP-057','HIGH',e,src||srcset||'', 'loaded image');}
83
- for(const e of nodes.filter((n)=>n.matches('marquee')))add('SLOP-061','LOW',e,'marquee','static content');
84
- const hueClusters=[];for(const raw of accents){const c=hsl(color(raw));if(c&&!hueClusters.some((h)=>Math.min(Math.abs(h-c.h),360-Math.abs(h-c.h))<=rules['CF-205'].hueDegrees))hueClusters.push(c.h);}
85
- if (hueClusters.length>rules['CF-205'].allowedClusters) add('CF-205','MEDIUM',document.body,hueClusters.length,rules['CF-205'].allowedClusters,'derived','candidate accents; status colors need review');
86
- for(const e of glows)add(glows.length>=rules['SLOP-010'].recurrence?'SLOP-010':'CF-404',glows.length>=rules['SLOP-010'].recurrence?'MEDIUM':'LOW',e,getComputedStyle(e).boxShadow,glows.length>=rules['SLOP-010'].recurrence?rules['SLOP-010'].recurrence:'avoid glow','derived');
87
- const headingPurple=nodes.filter((e)=>visible(e)&&e.matches('h1,h2,h3,h4,h5,h6')).map((e)=>({element:e,c:color(getComputedStyle(e).color)})).find(({c})=>{const v=hsl(c);return v&&v.h>=rules['SLOP-008'].hueMin&&v.h<=rules['SLOP-008'].hueMax&&Math.max(...c)-Math.min(...c)>=rules['SLOP-008'].minChannelSpread;});
88
- if(headingPurple)add('SLOP-008','MEDIUM',headingPurple.element,+hsl(headingPurple.c).h.toFixed(1),[rules['SLOP-008'].hueMin,rules['SLOP-008'].hueMax],'derived','review brand exception');
89
- const authored=text.filter((e)=>!e.closest('script,style,noscript,template,code,pre,kbd,form,[contenteditable="true"]')).map((e)=>({element:e,copy:[...e.childNodes].filter((n)=>n.nodeType===Node.TEXT_NODE).map((n)=>n.textContent).join(' ')}));
90
- const bodyText=authored.filter(({element})=>!element.closest('blockquote')).map(({copy})=>copy).join(' ').slice(0,limits.text);
91
- if (/\blorem ipsum\b|\[placeholder\]|\bTODO\b/i.test(bodyText)) add('SLOP-060','LOW',document.body,'placeholder text','final copy','derived');
92
- for(const {element,copy} of authored){const quote=element.closest('blockquote[cite]');const cited=quote&&(()=>{try{return new URL(quote.cite).origin!==location.origin}catch{return false}})();const dash=[...copy.matchAll(/—|\s–\s/g)].filter((m)=>m[0]==='—'||!(/\d/.test(copy[m.index-1]||'')&&/\d/.test(copy[m.index+m[0].length]||''))).length;if(dash)add('SLOP-040',cited||/\p{Script=Han}—{2}/u.test(copy)?'LOW':'MEDIUM',element,dash,0,'derived');}
93
- for(const phrase of rules['SLOP-036'].phrases)if(new RegExp('\\b'+phrase.replace(/[.*+?^${}()|[\]\\]/g,'\\$&')+'\\b','i').test(bodyText))add('SLOP-036','MEDIUM',document.body,phrase,'specific claim','derived');
94
- for(const name of rules['SLOP-037'].names)if(new RegExp('\\b'+name+'\\b','i').test(bodyText))add('SLOP-037','MEDIUM',document.body,name,'brief-specific identity','derived','judgment required');
95
- for(const name of rules['SLOP-038'].names)if(new RegExp('\\b'+name+'\\b','i').test(bodyText))add('SLOP-038','MEDIUM',document.body,name,'specific attributed person','derived');
96
- const rebuttals=[...bodyText.matchAll(/\bNot\s+[^.!?]{2,60}[.!?]\s+[A-Z][^.!?]{2,60}[.!?]/g)];if(rebuttals.length>=rules['SLOP-039'].occurrences)add('SLOP-039','LOW',document.body,rebuttals.length,rules['SLOP-039'].occurrences,'derived');
97
- if(matchMedia('(prefers-color-scheme: dark)').matches){const pageBg=bg(document.body)||[255,255,255];if(lum(pageBg)>=rules['RS-002'].maxDarkLuminance){if(document.querySelector('[aria-label*="theme" i],[aria-label*="dark" i],[data-theme-toggle],button[class*="theme" i]'))notVerified.push({rule:'RS-002',reason:'theme control found; toggle path requires manual review'});else add('RS-002','MEDIUM',document.body,+lum(pageBg).toFixed(3),rules['RS-002'].maxDarkLuminance);}}
98
- if(matchMedia('(prefers-reduced-motion: reduce)').matches){const playing=[...document.querySelectorAll('video')].filter((v)=>!v.paused&&!v.closest('[role="progressbar"],[role="status"]'));const moving=document.getAnimations().filter((a)=>a.playState==='running'&&Number(a.effect?.getTiming()?.duration)>rules['RS-003'].maxMotionMs&&!a.effect?.target?.closest?.('[role="progressbar"],[role="status"],progress')&&/transform|translate|rotate|scale/.test(getComputedStyle(a.effect?.target||document.body).animationName+' '+getComputedStyle(a.effect?.target||document.body).transitionProperty));if(playing.length||moving.length)add('RS-003','HIGH',document.body,{playing:playing.length,moving:moving.length},0);}
99
- if (nodes.length===limits.nodes) notVerified.push({rule:'NODE-CAP',reason:'node sampling capped'});
100
- if ((document.body.innerText||'').length>limits.text) notVerified.push({rule:'TEXT-CAP',reason:'text sampling capped'});
101
- for (const sheet of document.styleSheets) { let css; try { css=sheet.cssRules; } catch { notVerified.push({rule:'*',reason:'cross-origin stylesheet unavailable'}); continue; } const walk=(list)=>{for(const r of list){if(r.cssRules)walk(r.cssRules);if(r.type===CSSRule.KEYFRAMES_RULE){const initial=[...r.cssRules].find((step)=>step.keyText==='from'||step.keyText==='0%');const value=initial?.style?.transform?.match(/scale\(\s*([\d.]+)/)?.[1];if(value!==undefined&&Number(value)<rules['CF-503'].minScale)add('CF-503','LOW',document.documentElement,Number(value),rules['CF-503'].minScale,'derived','declared keyframe');}}};walk(css); }
102
- return { findings, not_verified:notVerified };
103
- }
104
-
105
- export const pageProbe = `(${inspect.toString()})(${JSON.stringify({limits:LIMITS,rules:RULES})})`;
@@ -1,91 +0,0 @@
1
- #!/usr/bin/env node
2
- import { spawn } from 'node:child_process';
3
- import proc from '../../lit-pptx/scripts/proc.cjs';
4
- import { mkdirSync, mkdtempSync, realpathSync, rmSync, statSync, writeFileSync } from 'node:fs';
5
- import { tmpdir } from 'node:os';
6
- import { basename, join, resolve } from 'node:path';
7
- import { fileURLToPath } from 'node:url';
8
- import { probe as browserCapability } from '../../browser-drive/scripts/capability-probe.mjs';
9
- import { pageProbe } from './page-probe.mjs';
10
- import { MATRIX, LIMITS, RENDERED_RULES } from './rule-data.mjs';
11
- import { staticProbe } from './static-probe.mjs';
12
-
13
- const scriptDir = fileURLToPath(new URL('.', import.meta.url));
14
- const arg = (name) => { const i=process.argv.indexOf(name); return i<0?null:process.argv[i+1]; };
15
- const decode = (out) => { let v=JSON.parse(out); if(typeof v==='string' && /^[\[{]/.test(v))v=JSON.parse(v); return v; };
16
- function invoke(session,args,input,timeout=LIMITS.viewportMs) {
17
- const r=proc.run('agent-browser',['--session',session,...args],{input,encoding:'utf8',timeout});
18
- if(r.error||r.status!==0)throw Error((r.stderr||r.stdout||r.error?.message||'browser command failed').trim().slice(-240));
19
- return r.stdout.trim();
20
- }
21
- function output(out,manifest,findings) {
22
- writeFileSync(join(out,'findings.json'),JSON.stringify({manifest,findings},null,2)+'\n');
23
- const rows=['| Severity | Rule | Where | Measured | Fix |','| --- | --- | --- | --- | --- |'];
24
- for(const f of findings)rows.push(`| ${f.severity} | ${f.rule} | ${f.viewport}: ${f.selector??'—'} | ${JSON.stringify(f.value).replaceAll('|','\\|')} | ${JSON.stringify(f.threshold).replaceAll('|','\\|')} |`);
25
- rows.push('',`Exit code: ${manifest.exit_code}`,`Not verified: ${manifest.not_verified.length}`);
26
- writeFileSync(join(out,'review.md'),rows.join('\n')+'\n');
27
- }
28
- async function localServer(path) {
29
- const child=spawn(process.execPath,[join(scriptDir,'static-server.mjs'),path],{stdio:['ignore','pipe','pipe']});
30
- const url=await new Promise((ok,fail)=>{let done=false;const timer=setTimeout(()=>{if(!done)fail(Error('no entry page found'));},3000);child.stdout.once('data',(chunk)=>{done=true;clearTimeout(timer);const line=String(chunk).trim();if(line.startsWith('http://127.0.0.1:'))ok(line);else fail(Error('no entry page found'));});child.once('error',fail);child.once('exit',()=>{if(!done)fail(Error('no entry page found'));});});
31
- return {child,url};
32
- }
33
- export async function main() {
34
- const path=arg('--url'), outArg=arg('--out');
35
- if(!path||!outArg){process.stderr.write('usage: probe.mjs --url <local HTML path> --out <directory> [--static <source>]\n');return 2;}
36
- const out=resolve(outArg);mkdirSync(out,{recursive:true});
37
- const entry=resolve(path);
38
- const sources=process.argv.flatMap((value,index)=>value==='--static'&&process.argv[index+1]?[resolve(process.argv[index+1])]:[]);
39
- if(!sources.length)sources.push(entry);
40
- let fallback={findings:[],not_verified:RENDERED_RULES.map((rule)=>({rule,reason:'static fallback: needs a rendered DOM'}))};
41
- try{fallback=staticProbe(sources);}catch{/* no readable source */}
42
- const manifest={url:null,viewports_run:[],browser_version:null,zoom_emulation:'viewport-halved',not_verified:[...fallback.not_verified],screenshots:[],exit_code:2,blocked_reason:null};
43
- const blocked=(reason)=>{manifest.blocked_reason=reason;output(out,manifest,fallback.findings);process.stdout.write(`BLOCKED: ${reason}\n`);return 2;};
44
- try{if(!statSync(entry).isFile()||!entry.toLowerCase().endsWith('.html'))return blocked('no entry page found');}catch{return blocked('no entry page found');}
45
- const capability=browserCapability();
46
- if(!capability.available||capability.state==='below-verified-floor')return blocked('browser unavailable');
47
- if(!capability.accepted)return blocked('browser identity unverified');
48
- manifest.browser_version=`agent-browser ${capability.version.major}.${capability.version.minor}.${capability.version.patch}`;
49
- let server;try{server=await localServer(entry);}catch{return blocked('no entry page found');}
50
- manifest.url=server.url;
51
- const socketDir=mkdtempSync(join(tmpdir(),'lg-uiux-'));
52
- const oldSocketDir=process.env.AGENT_BROWSER_SOCKET_DIR;
53
- process.env.AGENT_BROWSER_SOCKET_DIR=socketDir;
54
- const session=`litgrok-uiux-${process.pid}-${Date.now()}`;
55
- const findings=[];let reason=null;const started=Date.now();
56
- try {
57
- for(const view of MATRIX){
58
- if(Date.now()-started>LIMITS.totalMs){for(const rule of RENDERED_RULES)manifest.not_verified.push({rule,viewport:view.label,reason:'time budget exceeded'});continue;}
59
- const began=Date.now();
60
- invoke(session,['set','viewport',String(view.width),String(view.height)]);
61
- invoke(session,['set','media',view.scheme,...(view.reducedMotion?['reduced-motion']:[])]);
62
- invoke(session,['open',server.url]);
63
- invoke(session,['wait',String(LIMITS.settleMs)]);
64
- const state=decode(invoke(session,['eval','document.readyState']));
65
- if(state!=='complete'&&state!=='interactive')throw Error('page did not become ready');
66
- const measured=decode(invoke(session,['eval','--stdin'],pageProbe));
67
- if(!Array.isArray(measured.findings))throw Error('invalid page probe result');
68
- for(const f of measured.findings)findings.push({...f,viewport:view.label});
69
- if(view.zoom){const defects=measured.findings.filter((f)=>f.rule==='RS-006'||f.rule==='RS-007');if(defects.length)findings.push({rule:'RS-004',severity:'HIGH',tier:'derived',viewport:view.label,selector:'html',value:defects.length,threshold:0,note:'viewport-halved zoom emulation'});}
70
- for(const n of measured.not_verified||[])manifest.not_verified.push({...n,viewport:view.label});
71
- const shot=join(out,`${view.label}.png`);invoke(session,['screenshot',shot]);
72
- manifest.screenshots.push({viewport:view.label,path:basename(shot),bytes:statSync(shot).size,width:view.width,height:view.height});
73
- manifest.viewports_run.push(view.label);
74
- if(Date.now()-began>LIMITS.viewportMs)manifest.not_verified.push({rule:'PR-001',viewport:view.label,reason:'viewport time budget exceeded'});
75
- }
76
- }catch(error){reason=error.message||'browser run failed';}
77
- try{invoke(session,['close'],undefined,5000);}catch{if(!reason)reason='browser cleanup failed';}
78
- server.child.kill('SIGTERM');
79
- if(oldSocketDir===undefined)delete process.env.AGENT_BROWSER_SOCKET_DIR;else process.env.AGENT_BROWSER_SOCKET_DIR=oldSocketDir;
80
- rmSync(socketDir,{recursive:true,force:true});
81
- if(reason){manifest.blocked_reason=reason;manifest.exit_code=2;output(out,manifest,[...fallback.findings,...findings]);process.stdout.write(`BLOCKED: ${reason}\n`);return 2;}
82
- if(manifest.viewports_run.length!==MATRIX.length){manifest.blocked_reason='matrix incomplete';manifest.exit_code=findings.some((f)=>f.severity==='HIGH'&&f.tier!=='not_verified')?1:2;output(out,manifest,findings);if(manifest.exit_code===2)process.stdout.write('BLOCKED: matrix incomplete\n');else process.stdout.write(`HIGH findings remain; ${findings.length} findings; ${manifest.screenshots.length} screenshots\n`);return manifest.exit_code;}
83
- manifest.not_verified=manifest.not_verified.filter((n)=>n.reason!=='static fallback: needs a rendered DOM');
84
- manifest.exit_code=findings.some((f)=>f.severity==='HIGH'&&f.tier!=='not_verified')?1:0;
85
- output(out,manifest,findings);
86
- process.stdout.write(`${manifest.exit_code===0?'No HIGH findings':'HIGH findings remain'}; ${findings.length} findings; ${manifest.screenshots.length} screenshots\n`);
87
- return manifest.exit_code;
88
- }
89
- let directlyInvoked=false;
90
- try{directlyInvoked=Boolean(process.argv[1])&&realpathSync(process.argv[1])===realpathSync(fileURLToPath(import.meta.url));}catch{/* imported or missing entry */}
91
- if(directlyInvoked)process.exitCode=await main();
@@ -1,56 +0,0 @@
1
- // Shared values for the local browser probe and its static fallback.
2
- export const MATRIX = Object.freeze([
3
- { label: '320', width: 320, height: 760, scheme: 'light' },
4
- { label: '390', width: 390, height: 844, scheme: 'light' },
5
- { label: '768', width: 768, height: 900, scheme: 'light' },
6
- { label: '1440', width: 1440, height: 900, scheme: 'light' },
7
- { label: '390-dark', width: 390, height: 844, scheme: 'dark' },
8
- { label: '390-reduced-motion', width: 390, height: 844, scheme: 'light', reducedMotion: true },
9
- { label: '1440-zoom200', width: 720, height: 450, scheme: 'light', zoom: 200 },
10
- ]);
11
-
12
- export const LIMITS = Object.freeze({ nodes: 3000, text: 4000, findingsPerRule: 30, settleMs: 1200, viewportMs: 20000, totalMs: 180000 });
13
-
14
- export const RULES = Object.freeze({
15
- 'RS-002': { maxDarkLuminance: 0.35, severity: 'MEDIUM' },
16
- 'RS-003': { maxMotionMs: 250, severity: 'HIGH' },
17
- 'RS-004': { severity: 'HIGH' },
18
- 'RS-006': { overflowPx: 8, severity: 'HIGH' },
19
- 'RS-007': { clipPx: 0, offscreenPx: 8, overlapRatio: 0.45, clipped: 'HIGH', overlap: 'MEDIUM' },
20
- 'RS-008': { inputPx: 16, severity: 'MEDIUM' },
21
- 'CF-101': { preferredMinCh: 60, preferredMaxCh: 75, longLineCh: 90, cjkLongLineCh: 60, severity: 'MEDIUM' },
22
- 'CF-102': { min: 1.2, max: 1.35, displayMin: 1.05, displayPx: 40, severity: 'MEDIUM' },
23
- 'CF-103': { latinMin: 1.4, cjkMin: 1.5, latinTarget: 1.5, cjkTarget: 1.6, severity: 'MEDIUM' },
24
- 'CF-104': { rows: 3, min: 1.4, severity: 'MEDIUM' },
25
- 'CF-107': { severity: 'LOW' },
26
- 'CF-109': { smallPx: 18, smallWeight: 400, lightWeight: 300, displayPx: 28, severity: 'MEDIUM' },
27
- 'CF-201': { bodyRatio: 4.5, largeRatio: 3, largePx: 24, boldPx: 18.5, boldWeight: 700, bodySeverity: 'HIGH', largeSeverity: 'MEDIUM' },
28
- 'CF-205': { minAreaPx: 24, minSaturation: 0.12, hueDegrees: 15, allowedClusters: 1, severity: 'MEDIUM' },
29
- 'CF-401': { radiusTolerancePx: 2, maxPaddingPx: 24, severity: 'LOW' },
30
- 'CF-404': { maxOffsetPx: 2, minBlurPx: 16, minSaturation: 0.4, severity: 'LOW' },
31
- 'CF-503': { minScale: 0.95, declaredSeverity: 'LOW', runningSeverity: 'MEDIUM' },
32
- 'CF-507': { allowed: ['transform', 'opacity', 'filter'], restSeverity: 'MEDIUM', propertySeverity: 'LOW' },
33
- 'CF-701': { floorPx: 24, touchPx: 44, severity: 'HIGH', touchSecondarySeverity: 'MEDIUM' },
34
- 'CF-703': { floorPx: 44, severity: 'HIGH' },
35
- 'CF-806': { severity: 'MEDIUM' },
36
- 'SLOP-008': { hueMin: 260, hueMax: 310, minChannelSpread: 50, severity: 'MEDIUM' },
37
- 'SLOP-009': { severity: 'MEDIUM' },
38
- 'SLOP-010': { recurrence: 2, severity: 'MEDIUM' },
39
- 'SLOP-020': { maxUppercaseChars: 40, severity: 'LOW' },
40
- 'SLOP-023': { severity: 'LOW' },
41
- 'SLOP-026': { properties: ['width', 'height', 'padding', 'margin', 'top', 'left'], severity: 'MEDIUM' },
42
- 'SLOP-029': { severity: 'MEDIUM' },
43
- 'SLOP-036': { phrases: ['streamline your','empower your','supercharge your','unleash your','unleash the power','leverage the power','built for the modern','trusted by leading','trusted by the world','best-in-class','industry-leading','world-class','enterprise-grade','next-generation','cutting-edge','transform your business','revolutionize','game-changer','game changing','mission-critical','best of breed','future-proof','future proof','seamless experience','seamlessly integrate','drive engagement','drive growth','drive results','harness the power'], severity: 'MEDIUM' },
44
- 'SLOP-037': { names: ['Acme', 'Nexus', 'Flowbit', 'Quantumly', 'NovaCore'], severity: 'MEDIUM' },
45
- 'SLOP-038': { names: ['Jane Doe', 'John Doe'], severity: 'MEDIUM' },
46
- 'SLOP-039': { occurrences: 3, severity: 'LOW' },
47
- 'SLOP-040': { occurrences: 1, severity: 'MEDIUM', carveoutSeverity: 'LOW' },
48
- 'SLOP-053': { severity: 'LOW' },
49
- 'SLOP-057': { severity: 'HIGH' },
50
- 'SLOP-058': { primarySeverity: 'HIGH', secondarySeverity: 'MEDIUM' },
51
- 'SLOP-059': { severity: 'HIGH' },
52
- 'SLOP-060': { severity: 'LOW' },
53
- 'SLOP-061': { severity: 'LOW' },
54
- });
55
-
56
- export const RENDERED_RULES = Object.freeze(Object.keys(RULES));
@@ -1,27 +0,0 @@
1
- import { readFileSync } from 'node:fs';
2
- import { RENDERED_RULES, RULES } from './rule-data.mjs';
3
-
4
- export { RENDERED_RULES };
5
- const signals = [
6
- ['SLOP-058', /href\s*=\s*["'](?:#|javascript:[^"']*)["']/gi, 'working destination'],
7
- ['SLOP-057', /<img\b[^>]*\bsrc\s*=\s*["'](?:#|)["']/gi, 'valid image source'],
8
- ['CF-503', /scale\(\s*0(?:[\s,)]|\.0)/gi, RULES['CF-503'].minScale],
9
- ['SLOP-060', /\blorem ipsum\b|\bplaceholder\b|\bcoming soon\b/gi, 'final copy'],
10
- ['SLOP-061', /<marquee\b/gi, 'static content'],
11
- ['CF-507', /will-change\s*:\s*(?:all|width|height|top|left)/gi, RULES['CF-507'].allowed],
12
- ['SLOP-009', /(?:-webkit-)?background-clip\s*:\s*text[^}]*gradient\(|gradient\([^}]*background-clip\s*:\s*text/gi, 'solid text color'],
13
- ['SLOP-012', /background-image\s*:[^;}]*(?:repeating-linear-gradient|repeating-radial-gradient)/gi, 'no decorative grid'],
14
- ['SLOP-026', /transition\s*:[^;}]*(?:width|height|top|left)/gi, 'compositor property'],
15
- ];
16
- export function staticProbe(paths) {
17
- const findings = [];
18
- for (const path of paths) {
19
- const source = readFileSync(path, 'utf8');
20
- for (const [rule, pattern, threshold] of signals) for (const match of source.matchAll(pattern)) {
21
- if (findings.filter((item) => item.rule === rule).length >= 30) break;
22
- const line = source.slice(0, match.index).split('\n').length;
23
- findings.push({ rule, severity: RULES[rule]?.severity || (rule === 'SLOP-058' ? 'MEDIUM' : 'LOW'), tier: 'derived', viewport: 'static', selector: `${path}:${line}`, value: match[0].slice(0, 100), threshold });
24
- }
25
- }
26
- return { findings, not_verified: RENDERED_RULES.map((rule) => ({ rule, reason: 'static fallback: needs a rendered DOM' })) };
27
- }
@@ -1,19 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createServer } from 'node:http';
3
- import { readFileSync, statSync } from 'node:fs';
4
- import { dirname, extname, resolve, sep } from 'node:path';
5
-
6
- const entry = resolve(process.argv[2] || '');
7
- const root = dirname(entry);
8
- const types = { '.html': 'text/html', '.css': 'text/css', '.js': 'text/javascript', '.mjs': 'text/javascript', '.svg': 'image/svg+xml', '.png': 'image/png', '.jpg': 'image/jpeg', '.webp': 'image/webp' };
9
- try { if (!statSync(entry).isFile() || extname(entry).toLowerCase() !== '.html') throw new Error(); }
10
- catch { process.stdout.write('BLOCKED: no entry page found\n'); process.exit(2); }
11
- const server = createServer((req, res) => {
12
- let path;
13
- try { path = resolve(root, decodeURIComponent(new URL(req.url, 'http://localhost').pathname).slice(1) || entry.split(sep).at(-1)); }
14
- catch { res.writeHead(400).end(); return; }
15
- if (path !== entry && !path.startsWith(root + sep)) { res.writeHead(403).end(); return; }
16
- try { const bytes = readFileSync(path); res.writeHead(200, { 'Content-Type': types[extname(path).toLowerCase()] || 'application/octet-stream', 'Cache-Control': 'no-store', 'Content-Security-Policy': "default-src 'self' data: blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; connect-src 'none'; form-action 'none'" }).end(bytes); }
17
- catch { res.writeHead(404).end(); }
18
- });
19
- server.listen(0, '127.0.0.1', () => process.stdout.write(`http://127.0.0.1:${server.address().port}/${encodeURIComponent(entry.split(sep).at(-1))}\n`));