@litfamily/litcodex 1.0.30 → 1.0.32

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 (394) hide show
  1. package/README-Ko-KR.md +13 -12
  2. package/README.md +13 -12
  3. package/TRADEMARK.md +12 -0
  4. package/dist/install/generated-skill-payload-hashes.d.ts +188 -82
  5. package/dist/install/generated-skill-payload-hashes.js +188 -82
  6. package/dist/install/skill-catalog.d.ts +1 -1
  7. package/dist/install/skill-catalog.js +12 -1
  8. package/dist/install/skill-resource-hashes.d.ts +1 -1
  9. package/dist/install/skill-resource-hashes.js +1 -1
  10. package/marketplace/plugins/litcodex/.codex-plugin/plugin.json +1 -1
  11. package/marketplace/plugins/litcodex/components/auto-update/package.json +1 -1
  12. package/marketplace/plugins/litcodex/components/comment-checker/package.json +1 -1
  13. package/marketplace/plugins/litcodex/components/git-bash/package.json +1 -1
  14. package/marketplace/plugins/litcodex/components/lit-loop/directive.md +10 -4
  15. package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-adhd.md +194 -0
  16. package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-handoff.md +2 -0
  17. package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-hijack.md +219 -0
  18. package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-plan.md +2 -1
  19. package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-recap.md +2 -0
  20. package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-schematic.md +199 -0
  21. package/marketplace/plugins/litcodex/components/lit-loop/directives/litwork.md +2 -1
  22. package/marketplace/plugins/litcodex/components/lit-loop/dist/adhd-suggest.d.ts +10 -0
  23. package/marketplace/plugins/litcodex/components/lit-loop/dist/adhd-suggest.js +67 -0
  24. package/marketplace/plugins/litcodex/components/lit-loop/dist/card-html.d.ts +1 -1
  25. package/marketplace/plugins/litcodex/components/lit-loop/dist/card-html.js +128 -8
  26. package/marketplace/plugins/litcodex/components/lit-loop/dist/card-looks.d.ts +19 -0
  27. package/marketplace/plugins/litcodex/components/lit-loop/dist/card-looks.js +58 -0
  28. package/marketplace/plugins/litcodex/components/lit-loop/dist/card-status.d.ts +30 -0
  29. package/marketplace/plugins/litcodex/components/lit-loop/dist/card-status.js +97 -7
  30. package/marketplace/plugins/litcodex/components/lit-loop/dist/cli.js +13 -3
  31. package/marketplace/plugins/litcodex/components/lit-loop/dist/codex-hook.d.ts +2 -0
  32. package/marketplace/plugins/litcodex/components/lit-loop/dist/codex-hook.js +8 -9
  33. package/marketplace/plugins/litcodex/components/lit-loop/dist/control-chars.d.ts +5 -0
  34. package/marketplace/plugins/litcodex/components/lit-loop/dist/control-chars.js +23 -0
  35. package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.d.ts +8 -0
  36. package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.js +126 -13
  37. package/marketplace/plugins/litcodex/components/lit-loop/dist/hud.d.ts +1 -1
  38. package/marketplace/plugins/litcodex/components/lit-loop/dist/hud.js +29 -13
  39. package/marketplace/plugins/litcodex/components/lit-loop/dist/lane-events.d.ts +13 -0
  40. package/marketplace/plugins/litcodex/components/lit-loop/dist/lane-events.js +85 -0
  41. package/marketplace/plugins/litcodex/components/lit-loop/dist/lane-state.d.ts +55 -0
  42. package/marketplace/plugins/litcodex/components/lit-loop/dist/lane-state.js +227 -0
  43. package/marketplace/plugins/litcodex/components/lit-loop/dist/live-step.d.ts +5 -1
  44. package/marketplace/plugins/litcodex/components/lit-loop/dist/live-step.js +17 -1
  45. package/marketplace/plugins/litcodex/components/lit-loop/dist/markers.d.ts +6 -0
  46. package/marketplace/plugins/litcodex/components/lit-loop/dist/markers.js +6 -0
  47. package/marketplace/plugins/litcodex/components/lit-loop/dist/modes.d.ts +1 -1
  48. package/marketplace/plugins/litcodex/components/lit-loop/dist/modes.js +25 -1
  49. package/marketplace/plugins/litcodex/components/lit-loop/dist/motion-gate.d.ts +79 -0
  50. package/marketplace/plugins/litcodex/components/lit-loop/dist/motion-gate.js +310 -0
  51. package/marketplace/plugins/litcodex/components/lit-loop/dist/motion-route.js +5 -1
  52. package/marketplace/plugins/litcodex/components/lit-loop/dist/plan-persistence.d.ts +1 -1
  53. package/marketplace/plugins/litcodex/components/lit-loop/dist/plan-persistence.js +38 -2
  54. package/marketplace/plugins/litcodex/components/lit-loop/dist/plan-scope-roots.d.ts +7 -0
  55. package/marketplace/plugins/litcodex/components/lit-loop/dist/plan-scope-roots.js +76 -0
  56. package/marketplace/plugins/litcodex/components/lit-loop/dist/redaction.js +18 -0
  57. package/marketplace/plugins/litcodex/components/lit-loop/dist/reentry.d.ts +15 -0
  58. package/marketplace/plugins/litcodex/components/lit-loop/dist/reentry.js +46 -9
  59. package/marketplace/plugins/litcodex/components/lit-loop/dist/restart-chip.d.ts +6 -0
  60. package/marketplace/plugins/litcodex/components/lit-loop/dist/restart-chip.js +59 -0
  61. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-cli.d.ts +10 -0
  62. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-cli.js +88 -0
  63. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-go.d.ts +20 -0
  64. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-go.js +94 -0
  65. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-look.d.ts +6 -0
  66. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-look.js +41 -0
  67. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-redact.d.ts +3 -0
  68. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-redact.js +40 -0
  69. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-rollout.d.ts +48 -0
  70. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-rollout.js +292 -0
  71. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind.d.ts +168 -0
  72. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind.js +867 -0
  73. package/marketplace/plugins/litcodex/components/lit-loop/dist/route-heads.js +45 -3
  74. package/marketplace/plugins/litcodex/components/lit-loop/dist/run-panel.js +1 -0
  75. package/marketplace/plugins/litcodex/components/lit-loop/dist/schematic-route.d.ts +6 -0
  76. package/marketplace/plugins/litcodex/components/lit-loop/dist/schematic-route.js +35 -0
  77. package/marketplace/plugins/litcodex/components/lit-loop/dist/screen-card.d.ts +3 -0
  78. package/marketplace/plugins/litcodex/components/lit-loop/dist/screen-card.js +15 -5
  79. package/marketplace/plugins/litcodex/components/lit-loop/dist/session-liveness.d.ts +16 -0
  80. package/marketplace/plugins/litcodex/components/lit-loop/dist/session-liveness.js +90 -0
  81. package/marketplace/plugins/litcodex/components/lit-loop/dist/skill-mention-scope.js +6 -0
  82. package/marketplace/plugins/litcodex/components/lit-loop/dist/stack-hook.d.ts +8 -0
  83. package/marketplace/plugins/litcodex/components/lit-loop/dist/stack-hook.js +57 -0
  84. package/marketplace/plugins/litcodex/components/lit-loop/dist/statusline.js +8 -3
  85. package/marketplace/plugins/litcodex/components/lit-loop/dist/threads.d.ts +50 -0
  86. package/marketplace/plugins/litcodex/components/lit-loop/dist/threads.js +183 -0
  87. package/marketplace/plugins/litcodex/components/lit-loop/dist/trigger.d.ts +1 -1
  88. package/marketplace/plugins/litcodex/components/lit-loop/dist/trigger.js +29 -5
  89. package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-map.d.ts +10 -0
  90. package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-map.js +11 -1
  91. package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-stack.d.ts +139 -0
  92. package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-stack.js +518 -0
  93. package/marketplace/plugins/litcodex/components/lit-loop/package.json +1 -1
  94. package/marketplace/plugins/litcodex/components/lsp/package.json +1 -1
  95. package/marketplace/plugins/litcodex/components/rules/package.json +1 -1
  96. package/marketplace/plugins/litcodex/components/start-work-continuation/dist/codex-hook.d.ts +6 -0
  97. package/marketplace/plugins/litcodex/components/start-work-continuation/dist/codex-hook.js +65 -0
  98. package/marketplace/plugins/litcodex/components/start-work-continuation/package.json +1 -1
  99. package/marketplace/plugins/litcodex/components/telemetry/package.json +1 -1
  100. package/marketplace/plugins/litcodex/components/wikify-knowledge/package.json +1 -1
  101. package/marketplace/plugins/litcodex/hooks/hooks.json +24 -0
  102. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/SKILL.md +6 -0
  103. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/components.css +414 -0
  104. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/fonts.json +22 -0
  105. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/layouts/landing.html +164 -0
  106. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/layouts/settings.html +114 -0
  107. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/layouts/workspace.html +115 -0
  108. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/computational-brutalism.json +227 -0
  109. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/field-notes.json +205 -0
  110. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/graphite.json +200 -0
  111. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/meadow.json +199 -0
  112. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/neo-brutalism.json +222 -0
  113. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/ui.js +228 -0
  114. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/brand-and-imagery.md +1 -1
  115. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/complete-contract.md +1 -0
  116. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/craft-floor.md +2 -2
  117. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/default-editorial-pixel.json +15 -8
  118. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/design-choice.md +19 -0
  119. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/house-styles.md +235 -0
  120. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/motion-guide.md +2 -2
  121. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/probe-and-review.md +6 -0
  122. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/production-interview.md +2 -0
  123. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/slop-register.md +4 -4
  124. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/design-lock.mjs +400 -0
  125. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/lock-probe.mjs +196 -0
  126. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/page-probe.mjs +22 -4
  127. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/pixel-art.mjs +60 -0
  128. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/probe.mjs +59 -13
  129. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/rule-data.mjs +38 -4
  130. package/marketplace/plugins/litcodex/skills/lit-adhd/SKILL.md +185 -0
  131. package/marketplace/plugins/litcodex/skills/lit-adhd/agents/openai.yaml +6 -0
  132. package/marketplace/plugins/litcodex/skills/lit-adhd/references/card-examples.md +163 -0
  133. package/marketplace/plugins/litcodex/skills/lit-adhd/references/status-taxonomy.md +45 -0
  134. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/SKILL.md +18 -7
  135. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/style-guide.md +20 -11
  136. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-architecture.md +3 -3
  137. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-dependency.md +1 -1
  138. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-swimlane.md +1 -1
  139. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-tree-block-decomposition.md +1 -1
  140. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-tree.md +3 -3
  141. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-wardley.md +1 -1
  142. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/verifier-guide.md +1 -0
  143. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/diagram-craft-rules.mjs +1 -2
  144. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/visual-quality.mjs +1 -2
  145. package/marketplace/plugins/litcodex/skills/lit-docx/SKILL.md +12 -3
  146. package/marketplace/plugins/litcodex/skills/lit-docx/references/direction-step.md +6 -3
  147. package/marketplace/plugins/litcodex/skills/lit-hijack/SKILL.md +449 -0
  148. package/marketplace/plugins/litcodex/skills/lit-hijack/agents/openai.yaml +6 -0
  149. package/marketplace/plugins/litcodex/skills/lit-hijack/references/capture-and-provenance.md +100 -0
  150. package/marketplace/plugins/litcodex/skills/lit-hijack/references/clean-room-build.md +111 -0
  151. package/marketplace/plugins/litcodex/skills/lit-hijack/references/distil-and-licence.md +102 -0
  152. package/marketplace/plugins/litcodex/skills/lit-hijack/references/gap-and-port-design.md +125 -0
  153. package/marketplace/plugins/litcodex/skills/lit-hijack/references/parity-and-report.md +108 -0
  154. package/marketplace/plugins/litcodex/skills/lit-hijack/scripts/hijack.mjs +1050 -0
  155. package/marketplace/plugins/litcodex/skills/lit-loop/SKILL.md +13 -4
  156. package/marketplace/plugins/litcodex/skills/lit-plan/SKILL.md +9 -2
  157. package/marketplace/plugins/litcodex/skills/lit-plan/references/full-workflow.md +2 -1
  158. package/marketplace/plugins/litcodex/skills/lit-pptx/NOTICE +1 -0
  159. package/marketplace/plugins/litcodex/skills/lit-pptx/SKILL.md +35 -8
  160. package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Bold.ttf +0 -0
  161. package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf +0 -0
  162. package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/jetbrains-mono/OFL.txt +93 -0
  163. package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/jetbrains-mono/SOURCE.md +21 -0
  164. package/marketplace/plugins/litcodex/skills/lit-pptx/references/anti-slop-checklist.md +5 -2
  165. package/marketplace/plugins/litcodex/skills/lit-pptx/references/authoring-guide.md +3 -4
  166. package/marketplace/plugins/litcodex/skills/lit-pptx/references/density-and-fill.md +20 -6
  167. package/marketplace/plugins/litcodex/skills/lit-pptx/references/direction-step.md +26 -8
  168. package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/14-engineering-review-computational-brutalism-ko.md +173 -0
  169. package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/15-launch-pitch-neo-brutalism-ko.md +154 -0
  170. package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/16-design-lecture-bauhaus-ko.md +139 -0
  171. package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/17-community-programme-riso-ko.md +158 -0
  172. package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/18-public-data-briefing-newsroom-ko.md +179 -0
  173. package/marketplace/plugins/litcodex/skills/lit-pptx/references/layout-families.md +42 -27
  174. package/marketplace/plugins/litcodex/skills/lit-pptx/references/title-treatments.md +31 -27
  175. package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/bauhaus.md +136 -0
  176. package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/chalk.md +1 -1
  177. package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/computational-brutalism.md +145 -0
  178. package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/neo-brutalism.md +155 -0
  179. package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/newsroom.md +141 -0
  180. package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/riso.md +133 -0
  181. package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/signal.md +1 -1
  182. package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/studio.md +1 -1
  183. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/compile-deck.js +1 -1
  184. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/craft_extras.py +136 -94
  185. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/embed_fonts.py +13 -1
  186. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/grid-resolver.js +101 -110
  187. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/layout-resolver.js +9 -15
  188. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/render-pack.js +386 -579
  189. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/slide-grid.js +104 -0
  190. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/template-registry.js +57 -6
  191. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/office-run.mjs +2 -1
  192. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/qa_deck.py +7 -13
  193. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/render_pages.py +124 -0
  194. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/atlas/pack.yaml +1 -1
  195. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/bauhaus/pack.yaml +98 -0
  196. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/chalk/pack.yaml +1 -1
  197. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/computational-brutalism/pack.yaml +100 -0
  198. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/gazette/pack.yaml +1 -1
  199. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/ledger/pack.yaml +1 -1
  200. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/neo-brutalism/pack.yaml +107 -0
  201. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/newsroom/pack.yaml +99 -0
  202. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/night/pack.yaml +1 -1
  203. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/paper/pack.yaml +1 -1
  204. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/riso/pack.yaml +99 -0
  205. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/signal/pack.yaml +2 -2
  206. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/studio/pack.yaml +1 -1
  207. package/marketplace/plugins/litcodex/skills/lit-recap/SKILL.md +2 -0
  208. package/marketplace/plugins/litcodex/skills/lit-schematic/SKILL.md +198 -0
  209. package/marketplace/plugins/litcodex/skills/lit-schematic/agents/openai.yaml +6 -0
  210. package/marketplace/plugins/litcodex/skills/lit-schematic/examples/iso-heat-exchanger/build.mjs +38 -0
  211. package/marketplace/plugins/litcodex/skills/lit-schematic/examples/iso-heat-exchanger/scene.mjs +133 -0
  212. package/marketplace/plugins/litcodex/skills/lit-schematic/examples/journal-adsorption-rig/build.mjs +87 -0
  213. package/marketplace/plugins/litcodex/skills/lit-schematic/examples/pid-dosing-skid/build.mjs +85 -0
  214. package/marketplace/plugins/litcodex/skills/lit-schematic/references/cutaway-outputs.md +70 -0
  215. package/marketplace/plugins/litcodex/skills/lit-schematic/references/isometric-craft.md +101 -0
  216. package/marketplace/plugins/litcodex/skills/lit-schematic/references/journal-figures.md +72 -0
  217. package/marketplace/plugins/litcodex/skills/lit-schematic/references/kit-api.md +134 -0
  218. package/marketplace/plugins/litcodex/skills/lit-schematic/references/pfd-and-layout.md +53 -0
  219. package/marketplace/plugins/litcodex/skills/lit-schematic/references/pid-drafting.md +103 -0
  220. package/marketplace/plugins/litcodex/skills/lit-schematic/references/pid-symbols.md +163 -0
  221. package/marketplace/plugins/litcodex/skills/lit-schematic/references/verification.md +100 -0
  222. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/doctor.mjs +57 -0
  223. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/figure.mjs +81 -0
  224. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/fonts.mjs +28 -0
  225. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/geom.mjs +113 -0
  226. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/interactive.mjs +292 -0
  227. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/isa.mjs +115 -0
  228. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/iso.mjs +719 -0
  229. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/legend-sheet.mjs +162 -0
  230. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/pid.mjs +937 -0
  231. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/png.mjs +132 -0
  232. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/qa-core.mjs +658 -0
  233. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/route.mjs +218 -0
  234. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/sheet.mjs +890 -0
  235. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/svg.mjs +82 -0
  236. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/theme.mjs +115 -0
  237. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/motion.mjs +129 -0
  238. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/qa.mjs +92 -0
  239. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/render.mjs +233 -0
  240. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/scaffold.mjs +60 -0
  241. package/marketplace/plugins/litcodex/skills/lit-scientific-visualization/SKILL.md +34 -8
  242. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/SKILL.md +18 -14
  243. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/THIRD_PARTY_NOTICES +12 -0
  244. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/assets.mjs +388 -0
  245. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/blender/runner.py +221 -0
  246. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/blender.mjs +132 -0
  247. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/board.mjs +142 -0
  248. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/constants.mjs +6 -0
  249. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-assets.mjs +7 -4
  250. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-capture.mjs +8 -7
  251. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-init.js +14 -2
  252. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-treatment.mjs +38 -3
  253. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover.mjs +19 -4
  254. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/driver.mjs +8 -8
  255. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/gallery.mjs +147 -0
  256. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/house.mjs +45 -0
  257. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/image.mjs +89 -0
  258. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/look.mjs +58 -25
  259. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/runtime.mjs +59 -14
  260. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/safe-read.mjs +32 -0
  261. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/scaffold.mjs +208 -0
  262. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/score.mjs +668 -0
  263. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/sound.mjs +174 -31
  264. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-gate.mjs +45 -3
  265. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-kit.js +99 -1
  266. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-qa.js +8 -1
  267. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-qa.mjs +180 -11
  268. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-render.mjs +42 -12
  269. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-worker.mjs +7 -4
  270. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage.mjs +96 -10
  271. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/styles.mjs +233 -0
  272. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/treatment.mjs +291 -14
  273. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/vendor/three/LICENSE +21 -0
  274. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/vendor/three/addons/environments/RoomEnvironment.js +144 -0
  275. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/vendor/three/addons/geometries/RoundedBoxGeometry.js +155 -0
  276. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/vendor/three/three.module.js +54571 -0
  277. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/hero-3d/expected.json +33 -0
  278. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/hero-3d/index.html +139 -0
  279. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/cover.md +44 -7
  280. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/depth.md +156 -0
  281. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/design-choice.md +22 -0
  282. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/quality-gate.md +29 -7
  283. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/runtime.md +1 -1
  284. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/sound.md +87 -0
  285. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/stage.md +19 -7
  286. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/studio.md +246 -0
  287. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/style-bibles.md +2 -2
  288. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/treatment.md +41 -21
  289. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/scripts/render.mjs +51 -4
  290. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/styles/paper.json +185 -0
  291. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/styles/swiss-signal.json +188 -0
  292. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/styles/terminalcore.json +182 -0
  293. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/styles/tidal.json +187 -0
  294. package/marketplace/plugins/litcodex/skills/litresearch/SKILL.md +7 -0
  295. package/marketplace/plugins/litcodex/skills/litwork/SKILL.md +2 -1
  296. package/marketplace/plugins/litcodex/skills/readme-studio/SKILL.md +10 -0
  297. package/marketplace/plugins/litcodex/skills/review-work/SKILL.md +7 -1
  298. package/marketplace/plugins/litcodex/skills/start-work/SKILL.md +11 -1
  299. package/node_modules/@litcodex/lit-loop/directive.md +10 -4
  300. package/node_modules/@litcodex/lit-loop/directives/lit-adhd.md +194 -0
  301. package/node_modules/@litcodex/lit-loop/directives/lit-handoff.md +2 -0
  302. package/node_modules/@litcodex/lit-loop/directives/lit-hijack.md +219 -0
  303. package/node_modules/@litcodex/lit-loop/directives/lit-plan.md +2 -1
  304. package/node_modules/@litcodex/lit-loop/directives/lit-recap.md +2 -0
  305. package/node_modules/@litcodex/lit-loop/directives/lit-schematic.md +199 -0
  306. package/node_modules/@litcodex/lit-loop/directives/litwork.md +2 -1
  307. package/node_modules/@litcodex/lit-loop/dist/adhd-suggest.d.ts +10 -0
  308. package/node_modules/@litcodex/lit-loop/dist/adhd-suggest.js +67 -0
  309. package/node_modules/@litcodex/lit-loop/dist/card-html.d.ts +1 -1
  310. package/node_modules/@litcodex/lit-loop/dist/card-html.js +128 -8
  311. package/node_modules/@litcodex/lit-loop/dist/card-looks.d.ts +19 -0
  312. package/node_modules/@litcodex/lit-loop/dist/card-looks.js +58 -0
  313. package/node_modules/@litcodex/lit-loop/dist/card-status.d.ts +30 -0
  314. package/node_modules/@litcodex/lit-loop/dist/card-status.js +97 -7
  315. package/node_modules/@litcodex/lit-loop/dist/cli.js +13 -3
  316. package/node_modules/@litcodex/lit-loop/dist/codex-hook.d.ts +2 -0
  317. package/node_modules/@litcodex/lit-loop/dist/codex-hook.js +8 -9
  318. package/node_modules/@litcodex/lit-loop/dist/control-chars.d.ts +5 -0
  319. package/node_modules/@litcodex/lit-loop/dist/control-chars.js +23 -0
  320. package/node_modules/@litcodex/lit-loop/dist/hook-cli.d.ts +8 -0
  321. package/node_modules/@litcodex/lit-loop/dist/hook-cli.js +126 -13
  322. package/node_modules/@litcodex/lit-loop/dist/hud.d.ts +1 -1
  323. package/node_modules/@litcodex/lit-loop/dist/hud.js +29 -13
  324. package/node_modules/@litcodex/lit-loop/dist/lane-events.d.ts +13 -0
  325. package/node_modules/@litcodex/lit-loop/dist/lane-events.js +85 -0
  326. package/node_modules/@litcodex/lit-loop/dist/lane-state.d.ts +55 -0
  327. package/node_modules/@litcodex/lit-loop/dist/lane-state.js +227 -0
  328. package/node_modules/@litcodex/lit-loop/dist/live-step.d.ts +5 -1
  329. package/node_modules/@litcodex/lit-loop/dist/live-step.js +17 -1
  330. package/node_modules/@litcodex/lit-loop/dist/markers.d.ts +6 -0
  331. package/node_modules/@litcodex/lit-loop/dist/markers.js +6 -0
  332. package/node_modules/@litcodex/lit-loop/dist/modes.d.ts +1 -1
  333. package/node_modules/@litcodex/lit-loop/dist/modes.js +25 -1
  334. package/node_modules/@litcodex/lit-loop/dist/motion-gate.d.ts +79 -0
  335. package/node_modules/@litcodex/lit-loop/dist/motion-gate.js +310 -0
  336. package/node_modules/@litcodex/lit-loop/dist/motion-route.js +5 -1
  337. package/node_modules/@litcodex/lit-loop/dist/plan-persistence.d.ts +1 -1
  338. package/node_modules/@litcodex/lit-loop/dist/plan-persistence.js +38 -2
  339. package/node_modules/@litcodex/lit-loop/dist/plan-scope-roots.d.ts +7 -0
  340. package/node_modules/@litcodex/lit-loop/dist/plan-scope-roots.js +76 -0
  341. package/node_modules/@litcodex/lit-loop/dist/redaction.js +18 -0
  342. package/node_modules/@litcodex/lit-loop/dist/reentry.d.ts +15 -0
  343. package/node_modules/@litcodex/lit-loop/dist/reentry.js +46 -9
  344. package/node_modules/@litcodex/lit-loop/dist/restart-chip.d.ts +6 -0
  345. package/node_modules/@litcodex/lit-loop/dist/restart-chip.js +59 -0
  346. package/node_modules/@litcodex/lit-loop/dist/rewind-cli.d.ts +10 -0
  347. package/node_modules/@litcodex/lit-loop/dist/rewind-cli.js +88 -0
  348. package/node_modules/@litcodex/lit-loop/dist/rewind-go.d.ts +20 -0
  349. package/node_modules/@litcodex/lit-loop/dist/rewind-go.js +94 -0
  350. package/node_modules/@litcodex/lit-loop/dist/rewind-look.d.ts +6 -0
  351. package/node_modules/@litcodex/lit-loop/dist/rewind-look.js +41 -0
  352. package/node_modules/@litcodex/lit-loop/dist/rewind-redact.d.ts +3 -0
  353. package/node_modules/@litcodex/lit-loop/dist/rewind-redact.js +40 -0
  354. package/node_modules/@litcodex/lit-loop/dist/rewind-rollout.d.ts +48 -0
  355. package/node_modules/@litcodex/lit-loop/dist/rewind-rollout.js +292 -0
  356. package/node_modules/@litcodex/lit-loop/dist/rewind.d.ts +168 -0
  357. package/node_modules/@litcodex/lit-loop/dist/rewind.js +867 -0
  358. package/node_modules/@litcodex/lit-loop/dist/route-heads.js +45 -3
  359. package/node_modules/@litcodex/lit-loop/dist/run-panel.js +1 -0
  360. package/node_modules/@litcodex/lit-loop/dist/schematic-route.d.ts +6 -0
  361. package/node_modules/@litcodex/lit-loop/dist/schematic-route.js +35 -0
  362. package/node_modules/@litcodex/lit-loop/dist/screen-card.d.ts +3 -0
  363. package/node_modules/@litcodex/lit-loop/dist/screen-card.js +15 -5
  364. package/node_modules/@litcodex/lit-loop/dist/session-liveness.d.ts +16 -0
  365. package/node_modules/@litcodex/lit-loop/dist/session-liveness.js +90 -0
  366. package/node_modules/@litcodex/lit-loop/dist/skill-mention-scope.js +6 -0
  367. package/node_modules/@litcodex/lit-loop/dist/stack-hook.d.ts +8 -0
  368. package/node_modules/@litcodex/lit-loop/dist/stack-hook.js +57 -0
  369. package/node_modules/@litcodex/lit-loop/dist/statusline.js +8 -3
  370. package/node_modules/@litcodex/lit-loop/dist/threads.d.ts +50 -0
  371. package/node_modules/@litcodex/lit-loop/dist/threads.js +183 -0
  372. package/node_modules/@litcodex/lit-loop/dist/trigger.d.ts +1 -1
  373. package/node_modules/@litcodex/lit-loop/dist/trigger.js +29 -5
  374. package/node_modules/@litcodex/lit-loop/dist/workflow-map.d.ts +10 -0
  375. package/node_modules/@litcodex/lit-loop/dist/workflow-map.js +11 -1
  376. package/node_modules/@litcodex/lit-loop/dist/workflow-stack.d.ts +139 -0
  377. package/node_modules/@litcodex/lit-loop/dist/workflow-stack.js +518 -0
  378. package/node_modules/@litcodex/lit-loop/package.json +1 -1
  379. package/node_modules/@litcodex/lit-loop/skills/lit-adhd/SKILL.md +185 -0
  380. package/node_modules/@litcodex/lit-loop/skills/lit-hijack/SKILL.md +449 -0
  381. package/node_modules/@litcodex/lit-loop/skills/lit-loop/SKILL.md +13 -4
  382. package/node_modules/@litcodex/lit-loop/skills/lit-plan/SKILL.md +9 -2
  383. package/node_modules/@litcodex/lit-loop/skills/lit-recap/SKILL.md +2 -0
  384. package/node_modules/@litcodex/lit-loop/skills/lit-schematic/SKILL.md +198 -0
  385. package/node_modules/@litcodex/lit-loop/skills/lit-scientific-visualization/SKILL.md +34 -8
  386. package/node_modules/@litcodex/lit-loop/skills/litresearch/SKILL.md +7 -0
  387. package/node_modules/@litcodex/lit-loop/skills/litwork/SKILL.md +2 -1
  388. package/node_modules/@litcodex/lit-loop/skills/review-work/SKILL.md +7 -1
  389. package/node_modules/@litcodex/lit-loop/skills/start-work/SKILL.md +11 -1
  390. package/package.json +3 -2
  391. package/readme-assets/badge-version.svg +1 -1
  392. package/readme-assets/skills/lit-adhd.webp +0 -0
  393. package/readme-assets/skills/lit-hijack.webp +0 -0
  394. package/readme-assets/skills/lit-schematic.webp +0 -0
@@ -0,0 +1,5 @@
1
+ export declare function clean(text: string): string;
2
+ /** Every string inside a plain value, cleaned; numbers, booleans and null pass through. */
3
+ export declare function cleanDeep<T>(value: T): T;
4
+ /** A multi-line text with each line cleaned; the line breaks stay. */
5
+ export declare function cleanLines(text: string): string;
@@ -0,0 +1,23 @@
1
+ // src/control-chars.ts — record text is data. Strings that came from a repository, a rollout or a state file
2
+ // are stripped of C0/C1 controls (ESC, CSI, OSC and BEL among them) and of zero-width and bidi format
3
+ // characters before the brief, the text HUD or the card text prints them. A leaf module, so the card, the
4
+ // HUD and the collector can all use it.
5
+ const CONTROL = /[\u0000-\u001f\u007f-\u009f​-‏‪-‮⁦-⁩]/gu;
6
+ export function clean(text) {
7
+ return text.replace(CONTROL, "");
8
+ }
9
+ /** Every string inside a plain value, cleaned; numbers, booleans and null pass through. */
10
+ export function cleanDeep(value) {
11
+ if (typeof value === "string")
12
+ return clean(value);
13
+ if (Array.isArray(value))
14
+ return value.map((item) => cleanDeep(item));
15
+ if (value !== null && typeof value === "object") {
16
+ return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, cleanDeep(item)]));
17
+ }
18
+ return value;
19
+ }
20
+ /** A multi-line text with each line cleaned; the line breaks stay. */
21
+ export function cleanLines(text) {
22
+ return text.split("\n").map(clean).join("\n");
23
+ }
@@ -1,3 +1,4 @@
1
+ import { type MotionEvaluator } from "./motion-gate.js";
1
2
  /** Hard cap on stdin to bound memory / ReDoS exposure inside the 5 s Codex hook budget. 8 MB. */
2
3
  export declare const MAX_STDIN_BYTES = 8000000;
3
4
  /** Machine-readable error envelope emitted to stderr on a NON-zero exit. */
@@ -19,6 +20,8 @@ export declare function runUserPromptSubmitHookCli(stdin: NodeJS.ReadableStream,
19
20
  export interface AutoHandoffHookOptions {
20
21
  readonly env?: NodeJS.ProcessEnv;
21
22
  readonly now?: number;
23
+ /** Replaces the installed film skill's done-check in the Stop gate; tests only. */
24
+ readonly evaluateMotion?: MotionEvaluator;
22
25
  }
23
26
  /**
24
27
  * Asks the model to open the LIT card for this LIT turn, so the live card sits next to the newest turn
@@ -46,3 +49,8 @@ export interface LiveStepHookOptions {
46
49
  export declare function runPreToolUseLiveHookCli(stdin: NodeJS.ReadableStream, _stdout: NodeJS.WritableStream, _stderr: NodeJS.WritableStream, options?: LiveStepHookOptions): Promise<number>;
47
50
  /** Catch-all PostToolUse: clear the live step this call set. Prints nothing; exits 0 on every input. */
48
51
  export declare function runPostToolUseLiveHookCli(stdin: NodeJS.ReadableStream, _stdout: NodeJS.WritableStream, _stderr: NodeJS.WritableStream, options?: LiveStepHookOptions): Promise<number>;
52
+ /**
53
+ * SubagentStart and SubagentStop: a child agent began or ended, so its lane row appears or leaves. Prints
54
+ * nothing and exits 0 on every input, including one whose payload shape is not the one probed.
55
+ */
56
+ export declare function runSubagentHookCli(kind: "start" | "stop", stdin: NodeJS.ReadableStream, options?: LiveStepHookOptions): Promise<number>;
@@ -8,14 +8,21 @@
8
8
  // and NEVER throws.
9
9
  import { isAbsolute } from "node:path";
10
10
  import { Writable } from "node:stream";
11
+ import { adhdSuggestion } from "./adhd-suggest.js";
11
12
  import { claimReloadContext, evaluateAutoHandoffStop, recordCompaction, takeReloadContext } from "./auto-handoff.js";
12
13
  import { applyAutoHandoffRoute, clearManagedCompactionWhenOff, parseAutoHandoffRoute, } from "./auto-handoff-settings.js";
13
14
  import { applyPreToolUseCreateGoalGuard, isLitUserPromptSubmitInput, runUserPromptSubmitHook } from "./codex-hook.js";
14
- import { endLiveStep, recordLiveStepEnd, recordLiveStepStart, recordTurnStart, writeThreadPointer, } from "./live-step.js";
15
+ import { laneScope, subagentEvent, toolLaneEvents } from "./lane-events.js";
16
+ import { recordLaneEvent } from "./lane-state.js";
17
+ import { detectWaitReason, endLiveStep, recordLiveStepEnd, recordLiveStepStart, recordTurnStart, writeThreadPointer, } from "./live-step.js";
18
+ import { armMotionTurn, disarmMotionTurn, evaluateMotionStop, recordMotionTool, } from "./motion-gate.js";
15
19
  import { evaluatePlanPersistence, formatStopBlockOutput, rearmLitPlanIfSatisfied, recordLitPlanActivation, } from "./plan-persistence.js";
16
- import { clearActiveRoute, isBareLit, readActiveRoute, readResumeWork, recordActiveRoute } from "./reentry.js";
20
+ import { clearActiveRoute, isBareLit, isLitContinue, readActiveRoute, readResumeWork, recordActiveRoute, } from "./reentry.js";
21
+ import { isBoundaryAnswer, isGoPrompt, takeGo } from "./rewind-go.js";
17
22
  import { workflowCard } from "./screen-card.js";
18
23
  import { screenColor } from "./screen-status.js";
24
+ import { recordLiveness } from "./session-liveness.js";
25
+ import { applyPromptToStack, frameToResume } from "./stack-hook.js";
19
26
  import { recordWorkflowTurn, workflowStopLine, workflowTurn } from "./workflow-map.js";
20
27
  /** Hard cap on stdin to bound memory / ReDoS exposure inside the 5 s Codex hook budget. 8 MB. */
21
28
  export const MAX_STDIN_BYTES = 8_000_000;
@@ -102,13 +109,61 @@ export async function runUserPromptSubmitHookCli(stdin, stdout, stderr, repoRoot
102
109
  return 0;
103
110
  }
104
111
  clearManagedCompactionWhenOff(hookCwd(parsed, repoRoot), auto.env ?? process.env);
112
+ // `lit approve` / `lit deny` answer a start-work boundary; the lifecycle hook owns them, so this one stays out.
113
+ if (isLitUserPromptSubmitInput(parsed) && isBoundaryAnswer(parsed.prompt))
114
+ return 0;
115
+ // `go` after a lit-adhd brief runs the one step the brief named, as if the user had typed that step.
116
+ let goNote = null;
117
+ if (isLitUserPromptSubmitInput(parsed) && isGoPrompt(parsed.prompt)) {
118
+ const scope = hookSessionScope(parsed, repoRoot);
119
+ const go = scope === null ? null : takeGo(scope.cwd, scope.sessionId, auto.now ?? Date.now());
120
+ if (go?.kind === "hint") {
121
+ stdout.write(withReloadContext("", go.text) ?? "");
122
+ return 0;
123
+ }
124
+ if (go?.kind === "run") {
125
+ parsed = { ...parsed, prompt: go.prompt };
126
+ goNote = go.note;
127
+ }
128
+ }
105
129
  const pointer = hookSessionScope(parsed, repoRoot);
106
- const decision = runUserPromptSubmitHook(parsed, () => ({
107
- active: pointer === null ? null : readActiveRoute(pointer.cwd, pointer.sessionId),
108
- resume: pointer === null ? null : readResumeWork(pointer.cwd, pointer.sessionId),
109
- }));
110
- if (pointer !== null && decision.kind === "inject")
111
- recordActiveRoute(pointer.cwd, pointer.sessionId, decision.mode);
130
+ const savedRoute = pointer === null ? null : readActiveRoute(pointer.cwd, pointer.sessionId);
131
+ // An active lit-plan owns the persistence gate, so `lit continue` stays inside it rather than leaving it armed.
132
+ const litContinue = pointer !== null &&
133
+ savedRoute !== "lit-plan" &&
134
+ isLitUserPromptSubmitInput(parsed) &&
135
+ isLitContinue(parsed.prompt);
136
+ // `lit continue` over a side discipline returns to the paused spine, at the stage and count it left.
137
+ const spine = litContinue ? frameToResume(pointer.cwd, pointer.sessionId) : null;
138
+ const decision = runUserPromptSubmitHook(parsed, () => {
139
+ const saved = savedRoute;
140
+ return {
141
+ active: spine !== null && saved !== null ? spine.skill : saved,
142
+ resume: pointer === null ? null : readResumeWork(pointer.cwd, pointer.sessionId),
143
+ frame: spine === null
144
+ ? null
145
+ : {
146
+ skill: spine.skill ?? "work",
147
+ stage: spine.stage,
148
+ ...(spine.n === undefined ? {} : { n: spine.n }),
149
+ ...(spine.total === undefined ? {} : { total: spine.total }),
150
+ },
151
+ };
152
+ });
153
+ // A film prompt arms the completion gate for this session; any other prompt disarms it.
154
+ if (pointer !== null && isLitUserPromptSubmitInput(parsed)) {
155
+ if (decision.kind === "inject" && decision.film === true)
156
+ armMotionTurn(pointer.cwd, pointer.sessionId, auto.now);
157
+ else
158
+ disarmMotionTurn(pointer.cwd, pointer.sessionId);
159
+ }
160
+ // A read-only brief never takes the saved route: the work under it keeps its contract and its place.
161
+ if (pointer !== null && decision.kind === "inject" && decision.mode !== "lit-adhd") {
162
+ recordActiveRoute(pointer.cwd, pointer.sessionId, spine?.skill ?? decision.mode);
163
+ }
164
+ if (pointer !== null && isLitUserPromptSubmitInput(parsed) && (litContinue || decision.kind === "inject")) {
165
+ applyPromptToStack(pointer.cwd, pointer.sessionId, parsed.prompt, { continued: litContinue, mode: decision.kind === "inject" ? decision.mode : null }, auto.now === undefined ? undefined : new Date(auto.now));
166
+ }
112
167
  // Only a LIT thread gets a pointer: this prompt ignites LIT, or an earlier one already did.
113
168
  if (pointer !== null && (decision.kind === "inject" || workflowTurn(pointer.cwd, pointer.sessionId) !== null)) {
114
169
  writeThreadPointer(auto.env ?? process.env, pointer.sessionId, pointer.cwd, auto.now);
@@ -129,7 +184,8 @@ export async function runUserPromptSubmitHookCli(stdin, stdout, stderr, repoRoot
129
184
  const own = decision.kind === "inject"
130
185
  ? withCardOffer(withWorkflowMap(decision.stdout, parsed, decision.mode, env), pointer, auto, decision.entry === "continue")
131
186
  : "";
132
- const output = withAutoHandoffReload(own, parsed, repoRoot, auto);
187
+ const noted = goNote === null || own === "" ? own : (withReloadContext(own, goNote) ?? own);
188
+ const output = withAutoHandoffReload(noted, parsed, repoRoot, auto);
133
189
  if (output !== "")
134
190
  stdout.write(output);
135
191
  return 0;
@@ -307,7 +363,7 @@ export async function runStopPlanPersistenceHookCli(stdin, stdout, stderr, repoR
307
363
  // No tool runs once Stop fires: one whose PostToolUse never came (interrupted, or denied by another hook) is over.
308
364
  // The turn itself closes only below, after the guards that can send the model back to work.
309
365
  endLiveStep(scope.cwd, scope.sessionId, auto.now, false);
310
- const persistence = evaluatePlanPersistence(scope.cwd, scope.sessionId);
366
+ const persistence = evaluatePlanPersistence(scope.cwd, scope.sessionId, auto.now);
311
367
  if (persistence.decision === "block") {
312
368
  stdout.write(formatStopBlockOutput(persistence.reason));
313
369
  return 0;
@@ -328,8 +384,21 @@ export async function runStopPlanPersistenceHookCli(stdin, stdout, stderr, repoR
328
384
  // A subagent's Stop carries the parent's session id; the parent's turn is still running.
329
385
  if (isSubagent(parsed))
330
386
  return 0;
331
- endLiveStep(scope.cwd, scope.sessionId, auto.now);
387
+ const motion = await evaluateMotionStop({
388
+ cwd: scope.cwd,
389
+ sessionId: scope.sessionId,
390
+ ...(auto.now === undefined ? {} : { now: auto.now }),
391
+ ...(auto.evaluateMotion === undefined ? {} : { evaluate: auto.evaluateMotion }),
392
+ });
393
+ if (motion.action === "block") {
394
+ stdout.write(formatStopBlockOutput(motion.reason));
395
+ return 0;
396
+ }
397
+ const lastMsg = typeof record["last_assistant_message"] === "string" ? record["last_assistant_message"] : null;
398
+ endLiveStep(scope.cwd, scope.sessionId, auto.now, true, detectWaitReason(lastMsg));
332
399
  const env = auto.env ?? process.env;
400
+ if (workflowTurn(scope.cwd, scope.sessionId) !== null)
401
+ recordLiveness(scope.cwd, scope.sessionId, "idle", env, auto.now);
333
402
  const line = typeof record["turn_id"] === "string"
334
403
  ? workflowStopLine(scope.cwd, scope.sessionId, record["turn_id"], {
335
404
  stopHookActive: record["stop_hook_active"] === true,
@@ -371,6 +440,16 @@ export async function runSessionStartHookCli(stdin, stdout, stderr, repoRoot = p
371
440
  return event.exit;
372
441
  clearManagedCompactionWhenOff(hookCwd(event.parsed, repoRoot), auto.env ?? process.env);
373
442
  const record = event.parsed;
443
+ if (typeof record === "object" &&
444
+ record !== null &&
445
+ (record["source"] === "startup" || record["source"] === "resume")) {
446
+ const opened = hookSessionScope(record, repoRoot);
447
+ const offer = opened === null ? null : adhdSuggestion(opened.cwd, opened.sessionId);
448
+ if (offer !== null) {
449
+ stdout.write(`${JSON.stringify({ hookSpecificOutput: { hookEventName: "SessionStart", additionalContext: offer } })}\n`);
450
+ }
451
+ return 0;
452
+ }
374
453
  if (typeof record !== "object" || record === null || record["source"] !== "compact")
375
454
  return 0;
376
455
  const scope = hookSessionScope(record, repoRoot);
@@ -461,8 +540,42 @@ export async function runPostToolUseLiveHookCli(stdin, _stdout, _stderr, options
461
540
  if (event.exit !== null)
462
541
  return 0;
463
542
  const scope = toolEventScope(event.parsed);
464
- if (scope !== null && !OWN_CARD_TOOL.test(scope.tool))
465
- recordLiveStepEnd(scope.cwd, scope.sessionId, scope, options.now ?? Date.now());
543
+ const now = options.now ?? Date.now();
544
+ if (scope !== null && !OWN_CARD_TOOL.test(scope.tool)) {
545
+ recordLiveStepEnd(scope.cwd, scope.sessionId, scope, now);
546
+ if (workflowTurn(scope.cwd, scope.sessionId) !== null)
547
+ recordLiveness(scope.cwd, scope.sessionId, "alive", options.env ?? process.env, now);
548
+ }
549
+ recordLanes(event.parsed, toolLaneEvents, now);
550
+ // A shell call that ran the film renderer is noted for the completion gate (motion-gate.ts).
551
+ recordMotionTool(event.parsed, now);
552
+ return 0;
553
+ }
554
+ /** Fold a hook payload's lane events into the session's lane records; only a LIT thread has lanes to draw. */
555
+ function recordLanes(parsed, read, now) {
556
+ try {
557
+ const scope = laneScope(parsed);
558
+ if (scope === null || workflowTurn(scope.cwd, scope.sessionId) === null)
559
+ return;
560
+ for (const laneEvent of read(parsed))
561
+ recordLaneEvent(scope.cwd, scope.sessionId, laneEvent, now);
562
+ }
563
+ catch {
564
+ // Lanes only decorate the card; a hook never fails because of them.
565
+ }
566
+ }
567
+ /**
568
+ * SubagentStart and SubagentStop: a child agent began or ended, so its lane row appears or leaves. Prints
569
+ * nothing and exits 0 on every input, including one whose payload shape is not the one probed.
570
+ */
571
+ export async function runSubagentHookCli(kind, stdin, options = {}) {
572
+ const event = await readHookEvent(stdin, nullSink());
573
+ if (event.exit !== null)
574
+ return 0;
575
+ recordLanes(event.parsed, (parsed) => {
576
+ const laneEvent = subagentEvent(parsed, kind);
577
+ return laneEvent === null ? [] : [laneEvent];
578
+ }, options.now ?? Date.now());
466
579
  return 0;
467
580
  }
468
581
  /** Swallows the parse errors the shared reader reports; the live-step hooks stay silent. */
@@ -1,4 +1,5 @@
1
1
  import { type CardStatus } from "./card-status.js";
2
+ export { clean } from "./control-chars.js";
2
3
  export interface HudSession {
3
4
  readonly id: string;
4
5
  readonly cwd: string;
@@ -31,7 +32,6 @@ export declare function listSessions(env: NodeJS.ProcessEnv): HudSession[];
31
32
  export declare function pickSession(env: NodeJS.ProcessEnv, wanted?: string | null): HudSession | null;
32
33
  /** Everything one frame needs, read once. Never throws and never writes. */
33
34
  export declare function readHud(env: NodeJS.ProcessEnv, wanted: string | null, now: number): HudView;
34
- export declare function clean(text: string): string;
35
35
  /** The card with every record-derived string stripped of control characters. */
36
36
  export declare function cleanStatus(status: CardStatus): CardStatus;
37
37
  /** Terminal cells a plain string takes: CJK and emoji take two, combining marks none. */
@@ -11,9 +11,11 @@
11
11
  import { lstatSync, readdirSync } from "node:fs";
12
12
  import { join } from "node:path";
13
13
  import { cardStatusText, readCardStatus } from "./card-status.js";
14
+ import { clean, cleanDeep } from "./control-chars.js";
14
15
  import { codexHomeFrom, liveStepPath, plainDirsOrMissing, readLiveStep, readSmallJson, readThreadPointer, threadPointerPath, } from "./live-step.js";
15
16
  import { LIT_LOOP_DIR, LIT_LOOP_GOALS, normalizeSessionId } from "./state-paths.js";
16
17
  import { workflowTurn } from "./workflow-map.js";
18
+ export { clean } from "./control-chars.js";
17
19
  const POINTER_DIR = "litcodex/lit-loop/threads";
18
20
  const MAX_LIVE_STEP_BYTES = 4_096;
19
21
  /** The cap the workflow map itself reads its state files under. */
@@ -183,19 +185,9 @@ export function readHud(env, wanted, now) {
183
185
  return { wanted, session: null, status: null, unreadable: ["LIT records"] };
184
186
  }
185
187
  }
186
- /** C0/C1 controls (ESC, CSI, BEL among them) plus zero-width and bidi format characters. */
187
- const CONTROL = /[\u0000-\u001f\u007f-\u009f\u200b-\u200f\u202a-\u202e\u2066-\u2069]/gu;
188
- export function clean(text) {
189
- return text.replace(CONTROL, "");
190
- }
191
188
  /** The card with every record-derived string stripped of control characters. */
192
189
  export function cleanStatus(status) {
193
- return {
194
- ...status,
195
- mode: status.mode === null ? null : clean(status.mode),
196
- step: status.step === null ? null : { ...status.step, tool: clean(status.step.tool) },
197
- map: status.map === null ? null : { ...status.map, next: status.map.next === null ? null : clean(status.map.next) },
198
- };
190
+ return cleanDeep(status);
199
191
  }
200
192
  const MARK = /^\p{M}$/u;
201
193
  const WIDE_EMOJI = /^\p{Emoji_Presentation}$/u;
@@ -257,6 +249,22 @@ function age(lastSeen, now) {
257
249
  const BOLD = "\u001b[1m";
258
250
  const DIM = "\u001b[2m";
259
251
  const RESET = "\u001b[0m";
252
+ const AMBER_FG = "\u001b[38;2;255;175;60m";
253
+ const GREEN_FG = "\u001b[38;2;107;219;143m";
254
+ /** 256-colour codes, one per cell: red, orange, yellow, green, cyan, blue, violet, pink. */
255
+ const RAINBOW = [203, 209, 221, 114, 80, 75, 141, 205];
256
+ /** One line tinted cell by cell through the rainbow; still, never animated. */
257
+ function rainbowLine(line) {
258
+ let index = 0;
259
+ let out = BOLD;
260
+ for (const cell of cells(line)) {
261
+ if (cell.text === " ")
262
+ out += cell.text;
263
+ else
264
+ out += `\u001b[38;5;${RAINBOW[index++ % RAINBOW.length]}m${cell.text}`;
265
+ }
266
+ return `${out}${RESET}`;
267
+ }
260
268
  /** One frame as text: a header, the card, and at most one "cannot read" line. Pure. */
261
269
  export function renderHud(view, options) {
262
270
  const width = Math.max(10, Math.floor(options.width));
@@ -280,17 +288,25 @@ export function renderHud(view, options) {
280
288
  else {
281
289
  const { id, folder, lastSeen } = view.session;
282
290
  lines.push({ text: `${id.slice(0, SHORT_ID)} · ${clean(folder)} · ${age(lastSeen, options.now)}`, style: DIM });
291
+ const look = view.status?.look ?? null;
292
+ const tint = look === "turn" ? AMBER_FG : look === "done" ? GREEN_FG : "";
283
293
  cardStatusText(cleanStatus(view.status))
284
294
  .split("\n")
285
295
  .forEach((text, index) => {
286
- lines.push({ text, style: index === 0 ? BOLD : "" });
296
+ lines.push({
297
+ text,
298
+ style: index === 0 ? `${BOLD}${tint}` : tint || "",
299
+ rainbow: index === 0 && look === "rewind",
300
+ });
287
301
  });
288
302
  }
289
303
  if (view.unreadable.length > 0)
290
304
  lines.push({ text: `cannot read ${view.unreadable.join(", ")}`, style: DIM });
291
305
  return lines
292
- .map(({ text, style }) => {
306
+ .map(({ text, style, rainbow }) => {
293
307
  const line = fit(clean(text), width);
308
+ if (options.color && rainbow === true)
309
+ return rainbowLine(line);
294
310
  return options.color && style !== "" ? `${style}${line}${RESET}` : line;
295
311
  })
296
312
  .join("\n");
@@ -0,0 +1,13 @@
1
+ import { type LaneCounts, type LaneEvent } from "./lane-state.js";
2
+ export interface LaneScope {
3
+ readonly sessionId: string;
4
+ readonly cwd: string;
5
+ }
6
+ /** The session and workspace a payload names; null unless both are present and the workspace is absolute. */
7
+ export declare function laneScope(parsed: unknown): LaneScope | null;
8
+ /** The lane event a `SubagentStart` or `SubagentStop` payload carries, or null. */
9
+ export declare function subagentEvent(parsed: unknown, kind: "start" | "stop"): LaneEvent | null;
10
+ /** Done and total of an `update_plan` list (`plan: [{ step, status }]`); null for an empty or odd one. */
11
+ export declare function planCounts(toolInput: unknown): LaneCounts | null;
12
+ /** The lane events one `PostToolUse` payload carries: a spawn's name, an `update_plan` count, a child's step. */
13
+ export declare function toolLaneEvents(parsed: unknown): LaneEvent[];
@@ -0,0 +1,85 @@
1
+ // src/lane-events.ts — reads Codex hook payloads into lane events, failing open.
2
+ //
3
+ // Shapes seen on codex-cli 0.164.0 (probed against a fake Responses provider, 2026-10-26):
4
+ // SubagentStart { session_id (the parent's), turn_id, cwd, agent_id, agent_type }
5
+ // SubagentStop the same plus agent_transcript_path, stop_hook_active, last_assistant_message
6
+ // PostToolUse from a child: the usual fields plus agent_id and agent_type
7
+ // spawn_agent PostToolUse of the parent: tool_response is the JSON text {"agent_id","nickname"}
8
+ // A payload that does not look like this yields no event: no row is drawn and nothing is printed.
9
+ // Only ids, a plain display name, the agent type and plan counts leave a payload; a prompt, a command,
10
+ // a tool input or a model message never does.
11
+ import { isAbsolute } from "node:path";
12
+ import { laneKind, laneName } from "./lane-state.js";
13
+ function isRecord(value) {
14
+ return typeof value === "object" && value !== null && !Array.isArray(value);
15
+ }
16
+ function text(value, max = 128) {
17
+ return typeof value === "string" && value !== "" && value.length <= max ? value : null;
18
+ }
19
+ /** The session and workspace a payload names; null unless both are present and the workspace is absolute. */
20
+ export function laneScope(parsed) {
21
+ if (!isRecord(parsed))
22
+ return null;
23
+ const sessionId = text(parsed["session_id"]);
24
+ const cwd = text(parsed["cwd"], 4096);
25
+ return sessionId === null || cwd === null || !isAbsolute(cwd) ? null : { sessionId, cwd };
26
+ }
27
+ /** The lane event a `SubagentStart` or `SubagentStop` payload carries, or null. */
28
+ export function subagentEvent(parsed, kind) {
29
+ if (!isRecord(parsed))
30
+ return null;
31
+ const agentId = text(parsed["agent_id"]);
32
+ if (agentId === null)
33
+ return null;
34
+ return kind === "stop"
35
+ ? { type: "stopped", agentId }
36
+ : { type: "started", agentId, kind: laneKind(parsed["agent_type"]) };
37
+ }
38
+ function parseJson(value) {
39
+ if (typeof value !== "string" || value.length > 4096)
40
+ return value;
41
+ try {
42
+ return JSON.parse(value);
43
+ }
44
+ catch {
45
+ return null;
46
+ }
47
+ }
48
+ /** Done and total of an `update_plan` list (`plan: [{ step, status }]`); null for an empty or odd one. */
49
+ export function planCounts(toolInput) {
50
+ const plan = isRecord(toolInput) ? toolInput["plan"] : null;
51
+ if (!Array.isArray(plan) || plan.length === 0 || plan.length > 200)
52
+ return null;
53
+ let done = 0;
54
+ for (const item of plan) {
55
+ const status = isRecord(item) ? item["status"] : null;
56
+ if (status !== "pending" && status !== "in_progress" && status !== "completed")
57
+ return null;
58
+ if (status === "completed")
59
+ done += 1;
60
+ }
61
+ return { done, total: plan.length };
62
+ }
63
+ /** The lane events one `PostToolUse` payload carries: a spawn's name, an `update_plan` count, a child's step. */
64
+ export function toolLaneEvents(parsed) {
65
+ if (!isRecord(parsed))
66
+ return [];
67
+ const tool = text(parsed["tool_name"], 128);
68
+ const agentId = text(parsed["agent_id"]);
69
+ const events = [];
70
+ if (tool === "spawn_agent") {
71
+ const reply = parseJson(parsed["tool_response"]);
72
+ const spawned = isRecord(reply) ? text(reply["agent_id"]) : null;
73
+ if (spawned !== null)
74
+ events.push({ type: "spawned", agentId: spawned, name: laneName(isRecord(reply) ? reply["nickname"] : null) });
75
+ return events;
76
+ }
77
+ if (tool === "update_plan") {
78
+ const counts = planCounts(parsed["tool_input"]);
79
+ if (counts !== null)
80
+ events.push({ type: "plan", agentId, counts });
81
+ }
82
+ if (agentId !== null && tool !== null)
83
+ events.push({ type: "tool", agentId });
84
+ return events;
85
+ }
@@ -0,0 +1,55 @@
1
+ export declare const LANE_DIR = ".litcodex/lane-state";
2
+ export declare const MAX_LANES = 12;
3
+ /** A lane nobody touched for this long lost its stop event (a killed child); it is no longer shown. */
4
+ export declare const LANE_STALE_MS: number;
5
+ /** A lane quiet for this long reads `idle` instead of `running`. */
6
+ export declare const LANE_IDLE_MS: number;
7
+ export interface LaneCounts {
8
+ readonly done: number;
9
+ readonly total: number;
10
+ }
11
+ export interface LaneRecord {
12
+ readonly agentId: string;
13
+ readonly name: string | null;
14
+ readonly kind: string | null;
15
+ readonly started: boolean;
16
+ readonly startedAt: number | null;
17
+ readonly at: number;
18
+ readonly steps: number;
19
+ readonly plan: LaneCounts | null;
20
+ }
21
+ export type LaneEvent = {
22
+ readonly type: "spawned";
23
+ readonly agentId: string;
24
+ readonly name: string | null;
25
+ } | {
26
+ readonly type: "started";
27
+ readonly agentId: string;
28
+ readonly kind: string | null;
29
+ } | {
30
+ readonly type: "stopped";
31
+ readonly agentId: string;
32
+ } | {
33
+ readonly type: "tool";
34
+ readonly agentId: string;
35
+ } | {
36
+ readonly type: "plan";
37
+ readonly agentId: string | null;
38
+ readonly counts: LaneCounts;
39
+ };
40
+ /** A display name that is plain letters, digits, spaces and `._-`, at most 24 characters; else null. */
41
+ export declare function laneName(value: unknown): string | null;
42
+ /** An agent type such as `default` or `explorer`; anything else is not shown. */
43
+ export declare function laneKind(value: unknown): string | null;
44
+ /**
45
+ * Apply one event to a lane record and return the next one, or null when the lane is gone. Pure.
46
+ * `started` and `spawned` open a record; `tool` and `plan` only update a record whose child already
47
+ * started, so a stray event never draws a lane that has no end.
48
+ */
49
+ export declare function applyLaneEvent(lane: LaneRecord | null, event: LaneEvent, now: number): LaneRecord | null;
50
+ /** Read, apply one event and write back. Never throws. */
51
+ export declare function recordLaneEvent(cwd: string, sessionId: string, event: LaneEvent, now?: number): void;
52
+ /** The lanes to draw: started, not stale, oldest first; a spawn that never started is not one. */
53
+ export declare function readLanes(cwd: string, sessionId: string, now?: number): LaneRecord[];
54
+ /** The main thread's last `update_plan` counts, or null when it kept none. */
55
+ export declare function readMainPlan(cwd: string, sessionId: string): LaneCounts | null;