@litfamily/litcodex 1.0.30 → 1.0.31

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 (376) hide show
  1. package/README-Ko-KR.md +11 -11
  2. package/README.md +11 -11
  3. package/dist/install/generated-skill-payload-hashes.d.ts +188 -82
  4. package/dist/install/generated-skill-payload-hashes.js +188 -82
  5. package/dist/install/skill-catalog.d.ts +1 -1
  6. package/dist/install/skill-catalog.js +12 -1
  7. package/dist/install/skill-resource-hashes.d.ts +1 -1
  8. package/dist/install/skill-resource-hashes.js +1 -1
  9. package/marketplace/plugins/litcodex/.codex-plugin/plugin.json +1 -1
  10. package/marketplace/plugins/litcodex/components/auto-update/package.json +1 -1
  11. package/marketplace/plugins/litcodex/components/comment-checker/package.json +1 -1
  12. package/marketplace/plugins/litcodex/components/git-bash/package.json +1 -1
  13. package/marketplace/plugins/litcodex/components/lit-loop/directive.md +10 -4
  14. package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-adhd.md +191 -0
  15. package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-handoff.md +2 -0
  16. package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-hijack.md +219 -0
  17. package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-recap.md +2 -0
  18. package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-schematic.md +199 -0
  19. package/marketplace/plugins/litcodex/components/lit-loop/directives/litwork.md +2 -1
  20. package/marketplace/plugins/litcodex/components/lit-loop/dist/adhd-suggest.d.ts +10 -0
  21. package/marketplace/plugins/litcodex/components/lit-loop/dist/adhd-suggest.js +67 -0
  22. package/marketplace/plugins/litcodex/components/lit-loop/dist/card-html.d.ts +1 -1
  23. package/marketplace/plugins/litcodex/components/lit-loop/dist/card-html.js +128 -8
  24. package/marketplace/plugins/litcodex/components/lit-loop/dist/card-looks.d.ts +19 -0
  25. package/marketplace/plugins/litcodex/components/lit-loop/dist/card-looks.js +58 -0
  26. package/marketplace/plugins/litcodex/components/lit-loop/dist/card-status.d.ts +27 -0
  27. package/marketplace/plugins/litcodex/components/lit-loop/dist/card-status.js +94 -7
  28. package/marketplace/plugins/litcodex/components/lit-loop/dist/cli.js +13 -3
  29. package/marketplace/plugins/litcodex/components/lit-loop/dist/codex-hook.d.ts +2 -0
  30. package/marketplace/plugins/litcodex/components/lit-loop/dist/codex-hook.js +8 -9
  31. package/marketplace/plugins/litcodex/components/lit-loop/dist/control-chars.d.ts +5 -0
  32. package/marketplace/plugins/litcodex/components/lit-loop/dist/control-chars.js +23 -0
  33. package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.d.ts +8 -0
  34. package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.js +118 -11
  35. package/marketplace/plugins/litcodex/components/lit-loop/dist/hud.d.ts +1 -1
  36. package/marketplace/plugins/litcodex/components/lit-loop/dist/hud.js +29 -13
  37. package/marketplace/plugins/litcodex/components/lit-loop/dist/lane-events.d.ts +13 -0
  38. package/marketplace/plugins/litcodex/components/lit-loop/dist/lane-events.js +85 -0
  39. package/marketplace/plugins/litcodex/components/lit-loop/dist/lane-state.d.ts +55 -0
  40. package/marketplace/plugins/litcodex/components/lit-loop/dist/lane-state.js +227 -0
  41. package/marketplace/plugins/litcodex/components/lit-loop/dist/live-step.d.ts +5 -1
  42. package/marketplace/plugins/litcodex/components/lit-loop/dist/live-step.js +17 -1
  43. package/marketplace/plugins/litcodex/components/lit-loop/dist/markers.d.ts +6 -0
  44. package/marketplace/plugins/litcodex/components/lit-loop/dist/markers.js +6 -0
  45. package/marketplace/plugins/litcodex/components/lit-loop/dist/modes.d.ts +1 -1
  46. package/marketplace/plugins/litcodex/components/lit-loop/dist/modes.js +25 -1
  47. package/marketplace/plugins/litcodex/components/lit-loop/dist/motion-gate.d.ts +79 -0
  48. package/marketplace/plugins/litcodex/components/lit-loop/dist/motion-gate.js +310 -0
  49. package/marketplace/plugins/litcodex/components/lit-loop/dist/motion-route.js +5 -1
  50. package/marketplace/plugins/litcodex/components/lit-loop/dist/plan-persistence.js +10 -0
  51. package/marketplace/plugins/litcodex/components/lit-loop/dist/redaction.js +18 -0
  52. package/marketplace/plugins/litcodex/components/lit-loop/dist/reentry.d.ts +15 -0
  53. package/marketplace/plugins/litcodex/components/lit-loop/dist/reentry.js +46 -9
  54. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-cli.d.ts +10 -0
  55. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-cli.js +88 -0
  56. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-go.d.ts +20 -0
  57. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-go.js +84 -0
  58. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-look.d.ts +6 -0
  59. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-look.js +41 -0
  60. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-redact.d.ts +3 -0
  61. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-redact.js +40 -0
  62. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-rollout.d.ts +48 -0
  63. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-rollout.js +292 -0
  64. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind.d.ts +162 -0
  65. package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind.js +773 -0
  66. package/marketplace/plugins/litcodex/components/lit-loop/dist/route-heads.js +44 -2
  67. package/marketplace/plugins/litcodex/components/lit-loop/dist/run-panel.js +1 -0
  68. package/marketplace/plugins/litcodex/components/lit-loop/dist/schematic-route.d.ts +6 -0
  69. package/marketplace/plugins/litcodex/components/lit-loop/dist/schematic-route.js +35 -0
  70. package/marketplace/plugins/litcodex/components/lit-loop/dist/screen-card.d.ts +3 -0
  71. package/marketplace/plugins/litcodex/components/lit-loop/dist/screen-card.js +15 -5
  72. package/marketplace/plugins/litcodex/components/lit-loop/dist/skill-mention-scope.js +6 -0
  73. package/marketplace/plugins/litcodex/components/lit-loop/dist/stack-hook.d.ts +8 -0
  74. package/marketplace/plugins/litcodex/components/lit-loop/dist/stack-hook.js +57 -0
  75. package/marketplace/plugins/litcodex/components/lit-loop/dist/statusline.js +8 -3
  76. package/marketplace/plugins/litcodex/components/lit-loop/dist/threads.d.ts +50 -0
  77. package/marketplace/plugins/litcodex/components/lit-loop/dist/threads.js +178 -0
  78. package/marketplace/plugins/litcodex/components/lit-loop/dist/trigger.d.ts +1 -1
  79. package/marketplace/plugins/litcodex/components/lit-loop/dist/trigger.js +29 -5
  80. package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-map.d.ts +10 -0
  81. package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-map.js +11 -1
  82. package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-stack.d.ts +132 -0
  83. package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-stack.js +488 -0
  84. package/marketplace/plugins/litcodex/components/lit-loop/package.json +1 -1
  85. package/marketplace/plugins/litcodex/components/lsp/package.json +1 -1
  86. package/marketplace/plugins/litcodex/components/rules/package.json +1 -1
  87. package/marketplace/plugins/litcodex/components/start-work-continuation/dist/codex-hook.d.ts +6 -0
  88. package/marketplace/plugins/litcodex/components/start-work-continuation/dist/codex-hook.js +65 -0
  89. package/marketplace/plugins/litcodex/components/start-work-continuation/package.json +1 -1
  90. package/marketplace/plugins/litcodex/components/telemetry/package.json +1 -1
  91. package/marketplace/plugins/litcodex/components/wikify-knowledge/package.json +1 -1
  92. package/marketplace/plugins/litcodex/hooks/hooks.json +24 -0
  93. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/SKILL.md +6 -0
  94. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/components.css +414 -0
  95. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/fonts.json +22 -0
  96. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/layouts/landing.html +164 -0
  97. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/layouts/settings.html +114 -0
  98. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/layouts/workspace.html +115 -0
  99. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/computational-brutalism.json +227 -0
  100. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/field-notes.json +205 -0
  101. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/graphite.json +200 -0
  102. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/meadow.json +199 -0
  103. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/neo-brutalism.json +222 -0
  104. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/ui.js +228 -0
  105. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/brand-and-imagery.md +1 -1
  106. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/complete-contract.md +1 -0
  107. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/craft-floor.md +2 -2
  108. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/default-editorial-pixel.json +15 -8
  109. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/design-choice.md +19 -0
  110. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/house-styles.md +235 -0
  111. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/motion-guide.md +2 -2
  112. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/probe-and-review.md +6 -0
  113. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/production-interview.md +2 -0
  114. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/slop-register.md +4 -4
  115. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/design-lock.mjs +400 -0
  116. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/lock-probe.mjs +196 -0
  117. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/page-probe.mjs +22 -4
  118. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/pixel-art.mjs +60 -0
  119. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/probe.mjs +59 -13
  120. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/rule-data.mjs +38 -4
  121. package/marketplace/plugins/litcodex/skills/lit-adhd/SKILL.md +181 -0
  122. package/marketplace/plugins/litcodex/skills/lit-adhd/agents/openai.yaml +6 -0
  123. package/marketplace/plugins/litcodex/skills/lit-adhd/references/card-examples.md +147 -0
  124. package/marketplace/plugins/litcodex/skills/lit-adhd/references/status-taxonomy.md +37 -0
  125. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/SKILL.md +18 -7
  126. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/style-guide.md +20 -11
  127. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-architecture.md +3 -3
  128. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-dependency.md +1 -1
  129. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-swimlane.md +1 -1
  130. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-tree-block-decomposition.md +1 -1
  131. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-tree.md +3 -3
  132. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-wardley.md +1 -1
  133. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/verifier-guide.md +1 -0
  134. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/diagram-craft-rules.mjs +1 -2
  135. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/visual-quality.mjs +1 -2
  136. package/marketplace/plugins/litcodex/skills/lit-docx/SKILL.md +12 -3
  137. package/marketplace/plugins/litcodex/skills/lit-docx/references/direction-step.md +6 -3
  138. package/marketplace/plugins/litcodex/skills/lit-hijack/SKILL.md +449 -0
  139. package/marketplace/plugins/litcodex/skills/lit-hijack/agents/openai.yaml +6 -0
  140. package/marketplace/plugins/litcodex/skills/lit-hijack/references/capture-and-provenance.md +100 -0
  141. package/marketplace/plugins/litcodex/skills/lit-hijack/references/clean-room-build.md +111 -0
  142. package/marketplace/plugins/litcodex/skills/lit-hijack/references/distil-and-licence.md +102 -0
  143. package/marketplace/plugins/litcodex/skills/lit-hijack/references/gap-and-port-design.md +125 -0
  144. package/marketplace/plugins/litcodex/skills/lit-hijack/references/parity-and-report.md +108 -0
  145. package/marketplace/plugins/litcodex/skills/lit-hijack/scripts/hijack.mjs +1050 -0
  146. package/marketplace/plugins/litcodex/skills/lit-loop/SKILL.md +13 -4
  147. package/marketplace/plugins/litcodex/skills/lit-plan/SKILL.md +6 -0
  148. package/marketplace/plugins/litcodex/skills/lit-pptx/NOTICE +1 -0
  149. package/marketplace/plugins/litcodex/skills/lit-pptx/SKILL.md +35 -8
  150. package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Bold.ttf +0 -0
  151. package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf +0 -0
  152. package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/jetbrains-mono/OFL.txt +93 -0
  153. package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/jetbrains-mono/SOURCE.md +21 -0
  154. package/marketplace/plugins/litcodex/skills/lit-pptx/references/anti-slop-checklist.md +5 -2
  155. package/marketplace/plugins/litcodex/skills/lit-pptx/references/authoring-guide.md +3 -4
  156. package/marketplace/plugins/litcodex/skills/lit-pptx/references/density-and-fill.md +20 -6
  157. package/marketplace/plugins/litcodex/skills/lit-pptx/references/direction-step.md +26 -8
  158. package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/14-engineering-review-computational-brutalism-ko.md +173 -0
  159. package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/15-launch-pitch-neo-brutalism-ko.md +154 -0
  160. package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/16-design-lecture-bauhaus-ko.md +139 -0
  161. package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/17-community-programme-riso-ko.md +158 -0
  162. package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/18-public-data-briefing-newsroom-ko.md +179 -0
  163. package/marketplace/plugins/litcodex/skills/lit-pptx/references/layout-families.md +42 -27
  164. package/marketplace/plugins/litcodex/skills/lit-pptx/references/title-treatments.md +31 -27
  165. package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/bauhaus.md +136 -0
  166. package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/chalk.md +1 -1
  167. package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/computational-brutalism.md +145 -0
  168. package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/neo-brutalism.md +155 -0
  169. package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/newsroom.md +141 -0
  170. package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/riso.md +133 -0
  171. package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/signal.md +1 -1
  172. package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/studio.md +1 -1
  173. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/compile-deck.js +1 -1
  174. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/craft_extras.py +136 -94
  175. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/embed_fonts.py +13 -1
  176. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/grid-resolver.js +101 -110
  177. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/layout-resolver.js +9 -15
  178. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/render-pack.js +386 -579
  179. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/slide-grid.js +104 -0
  180. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/template-registry.js +57 -6
  181. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/office-run.mjs +2 -1
  182. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/qa_deck.py +7 -13
  183. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/render_pages.py +124 -0
  184. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/atlas/pack.yaml +1 -1
  185. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/bauhaus/pack.yaml +98 -0
  186. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/chalk/pack.yaml +1 -1
  187. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/computational-brutalism/pack.yaml +100 -0
  188. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/gazette/pack.yaml +1 -1
  189. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/ledger/pack.yaml +1 -1
  190. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/neo-brutalism/pack.yaml +107 -0
  191. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/newsroom/pack.yaml +99 -0
  192. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/night/pack.yaml +1 -1
  193. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/paper/pack.yaml +1 -1
  194. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/riso/pack.yaml +99 -0
  195. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/signal/pack.yaml +2 -2
  196. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/studio/pack.yaml +1 -1
  197. package/marketplace/plugins/litcodex/skills/lit-recap/SKILL.md +2 -0
  198. package/marketplace/plugins/litcodex/skills/lit-schematic/SKILL.md +198 -0
  199. package/marketplace/plugins/litcodex/skills/lit-schematic/agents/openai.yaml +6 -0
  200. package/marketplace/plugins/litcodex/skills/lit-schematic/examples/iso-heat-exchanger/build.mjs +38 -0
  201. package/marketplace/plugins/litcodex/skills/lit-schematic/examples/iso-heat-exchanger/scene.mjs +133 -0
  202. package/marketplace/plugins/litcodex/skills/lit-schematic/examples/journal-adsorption-rig/build.mjs +87 -0
  203. package/marketplace/plugins/litcodex/skills/lit-schematic/examples/pid-dosing-skid/build.mjs +85 -0
  204. package/marketplace/plugins/litcodex/skills/lit-schematic/references/cutaway-outputs.md +70 -0
  205. package/marketplace/plugins/litcodex/skills/lit-schematic/references/isometric-craft.md +101 -0
  206. package/marketplace/plugins/litcodex/skills/lit-schematic/references/journal-figures.md +72 -0
  207. package/marketplace/plugins/litcodex/skills/lit-schematic/references/kit-api.md +134 -0
  208. package/marketplace/plugins/litcodex/skills/lit-schematic/references/pfd-and-layout.md +53 -0
  209. package/marketplace/plugins/litcodex/skills/lit-schematic/references/pid-drafting.md +103 -0
  210. package/marketplace/plugins/litcodex/skills/lit-schematic/references/pid-symbols.md +163 -0
  211. package/marketplace/plugins/litcodex/skills/lit-schematic/references/verification.md +100 -0
  212. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/doctor.mjs +57 -0
  213. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/figure.mjs +81 -0
  214. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/fonts.mjs +28 -0
  215. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/geom.mjs +113 -0
  216. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/interactive.mjs +292 -0
  217. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/isa.mjs +115 -0
  218. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/iso.mjs +719 -0
  219. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/legend-sheet.mjs +162 -0
  220. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/pid.mjs +937 -0
  221. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/png.mjs +132 -0
  222. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/qa-core.mjs +658 -0
  223. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/route.mjs +218 -0
  224. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/sheet.mjs +890 -0
  225. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/svg.mjs +82 -0
  226. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/theme.mjs +115 -0
  227. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/motion.mjs +129 -0
  228. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/qa.mjs +92 -0
  229. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/render.mjs +233 -0
  230. package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/scaffold.mjs +60 -0
  231. package/marketplace/plugins/litcodex/skills/lit-scientific-visualization/SKILL.md +34 -8
  232. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/SKILL.md +18 -14
  233. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/THIRD_PARTY_NOTICES +12 -0
  234. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/assets.mjs +388 -0
  235. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/blender/runner.py +221 -0
  236. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/blender.mjs +132 -0
  237. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/board.mjs +142 -0
  238. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/constants.mjs +6 -0
  239. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-assets.mjs +7 -4
  240. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-capture.mjs +8 -7
  241. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-init.js +14 -2
  242. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-treatment.mjs +38 -3
  243. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover.mjs +19 -4
  244. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/driver.mjs +8 -8
  245. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/gallery.mjs +147 -0
  246. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/house.mjs +45 -0
  247. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/image.mjs +89 -0
  248. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/look.mjs +58 -25
  249. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/runtime.mjs +59 -14
  250. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/safe-read.mjs +32 -0
  251. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/scaffold.mjs +208 -0
  252. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/score.mjs +668 -0
  253. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/sound.mjs +174 -31
  254. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-gate.mjs +45 -3
  255. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-kit.js +99 -1
  256. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-qa.js +8 -1
  257. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-qa.mjs +180 -11
  258. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-render.mjs +42 -12
  259. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-worker.mjs +7 -4
  260. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage.mjs +96 -10
  261. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/styles.mjs +233 -0
  262. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/treatment.mjs +291 -14
  263. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/vendor/three/LICENSE +21 -0
  264. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/vendor/three/addons/environments/RoomEnvironment.js +144 -0
  265. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/vendor/three/addons/geometries/RoundedBoxGeometry.js +155 -0
  266. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/vendor/three/three.module.js +54571 -0
  267. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/hero-3d/expected.json +33 -0
  268. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/hero-3d/index.html +139 -0
  269. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/cover.md +44 -7
  270. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/depth.md +156 -0
  271. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/design-choice.md +22 -0
  272. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/quality-gate.md +29 -7
  273. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/runtime.md +1 -1
  274. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/sound.md +87 -0
  275. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/stage.md +19 -7
  276. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/studio.md +246 -0
  277. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/style-bibles.md +2 -2
  278. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/treatment.md +41 -21
  279. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/scripts/render.mjs +51 -4
  280. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/styles/paper.json +185 -0
  281. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/styles/swiss-signal.json +188 -0
  282. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/styles/terminalcore.json +182 -0
  283. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/styles/tidal.json +187 -0
  284. package/marketplace/plugins/litcodex/skills/litresearch/SKILL.md +7 -0
  285. package/marketplace/plugins/litcodex/skills/litwork/SKILL.md +2 -1
  286. package/marketplace/plugins/litcodex/skills/readme-studio/SKILL.md +10 -0
  287. package/marketplace/plugins/litcodex/skills/review-work/SKILL.md +7 -1
  288. package/marketplace/plugins/litcodex/skills/start-work/SKILL.md +10 -0
  289. package/node_modules/@litcodex/lit-loop/directive.md +10 -4
  290. package/node_modules/@litcodex/lit-loop/directives/lit-adhd.md +191 -0
  291. package/node_modules/@litcodex/lit-loop/directives/lit-handoff.md +2 -0
  292. package/node_modules/@litcodex/lit-loop/directives/lit-hijack.md +219 -0
  293. package/node_modules/@litcodex/lit-loop/directives/lit-recap.md +2 -0
  294. package/node_modules/@litcodex/lit-loop/directives/lit-schematic.md +199 -0
  295. package/node_modules/@litcodex/lit-loop/directives/litwork.md +2 -1
  296. package/node_modules/@litcodex/lit-loop/dist/adhd-suggest.d.ts +10 -0
  297. package/node_modules/@litcodex/lit-loop/dist/adhd-suggest.js +67 -0
  298. package/node_modules/@litcodex/lit-loop/dist/card-html.d.ts +1 -1
  299. package/node_modules/@litcodex/lit-loop/dist/card-html.js +128 -8
  300. package/node_modules/@litcodex/lit-loop/dist/card-looks.d.ts +19 -0
  301. package/node_modules/@litcodex/lit-loop/dist/card-looks.js +58 -0
  302. package/node_modules/@litcodex/lit-loop/dist/card-status.d.ts +27 -0
  303. package/node_modules/@litcodex/lit-loop/dist/card-status.js +94 -7
  304. package/node_modules/@litcodex/lit-loop/dist/cli.js +13 -3
  305. package/node_modules/@litcodex/lit-loop/dist/codex-hook.d.ts +2 -0
  306. package/node_modules/@litcodex/lit-loop/dist/codex-hook.js +8 -9
  307. package/node_modules/@litcodex/lit-loop/dist/control-chars.d.ts +5 -0
  308. package/node_modules/@litcodex/lit-loop/dist/control-chars.js +23 -0
  309. package/node_modules/@litcodex/lit-loop/dist/hook-cli.d.ts +8 -0
  310. package/node_modules/@litcodex/lit-loop/dist/hook-cli.js +118 -11
  311. package/node_modules/@litcodex/lit-loop/dist/hud.d.ts +1 -1
  312. package/node_modules/@litcodex/lit-loop/dist/hud.js +29 -13
  313. package/node_modules/@litcodex/lit-loop/dist/lane-events.d.ts +13 -0
  314. package/node_modules/@litcodex/lit-loop/dist/lane-events.js +85 -0
  315. package/node_modules/@litcodex/lit-loop/dist/lane-state.d.ts +55 -0
  316. package/node_modules/@litcodex/lit-loop/dist/lane-state.js +227 -0
  317. package/node_modules/@litcodex/lit-loop/dist/live-step.d.ts +5 -1
  318. package/node_modules/@litcodex/lit-loop/dist/live-step.js +17 -1
  319. package/node_modules/@litcodex/lit-loop/dist/markers.d.ts +6 -0
  320. package/node_modules/@litcodex/lit-loop/dist/markers.js +6 -0
  321. package/node_modules/@litcodex/lit-loop/dist/modes.d.ts +1 -1
  322. package/node_modules/@litcodex/lit-loop/dist/modes.js +25 -1
  323. package/node_modules/@litcodex/lit-loop/dist/motion-gate.d.ts +79 -0
  324. package/node_modules/@litcodex/lit-loop/dist/motion-gate.js +310 -0
  325. package/node_modules/@litcodex/lit-loop/dist/motion-route.js +5 -1
  326. package/node_modules/@litcodex/lit-loop/dist/plan-persistence.js +10 -0
  327. package/node_modules/@litcodex/lit-loop/dist/redaction.js +18 -0
  328. package/node_modules/@litcodex/lit-loop/dist/reentry.d.ts +15 -0
  329. package/node_modules/@litcodex/lit-loop/dist/reentry.js +46 -9
  330. package/node_modules/@litcodex/lit-loop/dist/rewind-cli.d.ts +10 -0
  331. package/node_modules/@litcodex/lit-loop/dist/rewind-cli.js +88 -0
  332. package/node_modules/@litcodex/lit-loop/dist/rewind-go.d.ts +20 -0
  333. package/node_modules/@litcodex/lit-loop/dist/rewind-go.js +84 -0
  334. package/node_modules/@litcodex/lit-loop/dist/rewind-look.d.ts +6 -0
  335. package/node_modules/@litcodex/lit-loop/dist/rewind-look.js +41 -0
  336. package/node_modules/@litcodex/lit-loop/dist/rewind-redact.d.ts +3 -0
  337. package/node_modules/@litcodex/lit-loop/dist/rewind-redact.js +40 -0
  338. package/node_modules/@litcodex/lit-loop/dist/rewind-rollout.d.ts +48 -0
  339. package/node_modules/@litcodex/lit-loop/dist/rewind-rollout.js +292 -0
  340. package/node_modules/@litcodex/lit-loop/dist/rewind.d.ts +162 -0
  341. package/node_modules/@litcodex/lit-loop/dist/rewind.js +773 -0
  342. package/node_modules/@litcodex/lit-loop/dist/route-heads.js +44 -2
  343. package/node_modules/@litcodex/lit-loop/dist/run-panel.js +1 -0
  344. package/node_modules/@litcodex/lit-loop/dist/schematic-route.d.ts +6 -0
  345. package/node_modules/@litcodex/lit-loop/dist/schematic-route.js +35 -0
  346. package/node_modules/@litcodex/lit-loop/dist/screen-card.d.ts +3 -0
  347. package/node_modules/@litcodex/lit-loop/dist/screen-card.js +15 -5
  348. package/node_modules/@litcodex/lit-loop/dist/skill-mention-scope.js +6 -0
  349. package/node_modules/@litcodex/lit-loop/dist/stack-hook.d.ts +8 -0
  350. package/node_modules/@litcodex/lit-loop/dist/stack-hook.js +57 -0
  351. package/node_modules/@litcodex/lit-loop/dist/statusline.js +8 -3
  352. package/node_modules/@litcodex/lit-loop/dist/threads.d.ts +50 -0
  353. package/node_modules/@litcodex/lit-loop/dist/threads.js +178 -0
  354. package/node_modules/@litcodex/lit-loop/dist/trigger.d.ts +1 -1
  355. package/node_modules/@litcodex/lit-loop/dist/trigger.js +29 -5
  356. package/node_modules/@litcodex/lit-loop/dist/workflow-map.d.ts +10 -0
  357. package/node_modules/@litcodex/lit-loop/dist/workflow-map.js +11 -1
  358. package/node_modules/@litcodex/lit-loop/dist/workflow-stack.d.ts +132 -0
  359. package/node_modules/@litcodex/lit-loop/dist/workflow-stack.js +488 -0
  360. package/node_modules/@litcodex/lit-loop/package.json +1 -1
  361. package/node_modules/@litcodex/lit-loop/skills/lit-adhd/SKILL.md +181 -0
  362. package/node_modules/@litcodex/lit-loop/skills/lit-hijack/SKILL.md +449 -0
  363. package/node_modules/@litcodex/lit-loop/skills/lit-loop/SKILL.md +13 -4
  364. package/node_modules/@litcodex/lit-loop/skills/lit-plan/SKILL.md +6 -0
  365. package/node_modules/@litcodex/lit-loop/skills/lit-recap/SKILL.md +2 -0
  366. package/node_modules/@litcodex/lit-loop/skills/lit-schematic/SKILL.md +198 -0
  367. package/node_modules/@litcodex/lit-loop/skills/lit-scientific-visualization/SKILL.md +34 -8
  368. package/node_modules/@litcodex/lit-loop/skills/litresearch/SKILL.md +7 -0
  369. package/node_modules/@litcodex/lit-loop/skills/litwork/SKILL.md +2 -1
  370. package/node_modules/@litcodex/lit-loop/skills/review-work/SKILL.md +7 -1
  371. package/node_modules/@litcodex/lit-loop/skills/start-work/SKILL.md +10 -0
  372. package/package.json +2 -2
  373. package/readme-assets/badge-version.svg +1 -1
  374. package/readme-assets/skills/lit-adhd.webp +0 -0
  375. package/readme-assets/skills/lit-hijack.webp +0 -0
  376. package/readme-assets/skills/lit-schematic.webp +0 -0
@@ -16,6 +16,15 @@
16
16
  // the tool result that created it; each poll names the thread's newest card. When that is a later card,
17
17
  // this one folds into a single quiet line with its final state, stops every timer and never polls again.
18
18
  // Usage bars stay in the calm accent until 70 % (amber) and 90 % (red); pink and flame are for LIT marks.
19
+ //
20
+ // A side discipline started over paused work adds one row under the map: the paused frames with their stage
21
+ // and gauge, the running frame after ▶, and the way back (`lit continue`). A gauge is drawn only when both counts are
22
+ // real; a frame with no total gets its known facts in words and, while it runs, a moving pulse bar. The lit-adhd brief
23
+ // alone gets the rainbow look: a drifting rainbow border and pill, hue-cycling gauges (each cell of a gauge, stage word or use bar in its own hue, even at a low fill) and a four-star sparkle trail.
24
+ // Every motion is slow (a 9 to 14 s linear pass of a gradient or a 12 s hue turn; each 9 px star fades once in 5.6 s,
25
+ // staggered 1.4 s apart), so no 1 s window holds more than a fraction of one luminance change, against a limit of
26
+ // three opposing 10 % swings over a large area; nothing blinks or strobes, and under
27
+ // prefers-reduced-motion everything stands still as a static gradient. The idle card offers `lit adhd` as the way back.
19
28
  export const CARD_HTML = `<!doctype html>
20
29
  <html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
21
30
  <title>LIT</title>
@@ -92,7 +101,56 @@ kbd{font-size:12px;color:var(--acc);background:color-mix(in srgb,var(--acc) 12%,
92
101
  .lc.folded .brand{padding:0 7px 0 6px;font-size:11px;background:color-mix(in srgb,var(--dim) 24%,var(--bg));color:var(--ink);box-shadow:none;filter:grayscale(1)}
93
102
  .lc.folded .name{color:var(--dim);font-weight:600}
94
103
  .lc.folded .right{font-weight:600;letter-spacing:0;flex:0 0 auto}
95
- @media (prefers-reduced-motion:reduce){.lc,.lc *{animation:none!important}.brand::after,.nowpill::after,.comet{display:none}}
104
+ .pbar{display:inline-block;position:relative;width:54px;height:6px;border-radius:3px;background:var(--faint);overflow:hidden;vertical-align:middle}
105
+ .pbar i{position:absolute;top:0;bottom:0;width:38%;border-radius:3px;background:linear-gradient(90deg,transparent,var(--acc),transparent);animation:slidebar 1.8s ease-in-out infinite}
106
+ @keyframes slidebar{0%{left:-40%}100%{left:104%}}
107
+ .stk{margin:0 0 5px;overflow:hidden;text-overflow:ellipsis;font-size:12px}.stk .fr{font-weight:700}.stk kbd{font-size:11.5px}
108
+ .thr{margin:0 0 5px;font-size:12px;overflow:hidden}.thr .row{min-height:19px;gap:7px}.thr .fr{font-weight:700}.thr kbd{font-size:11.5px}
109
+ .thr .ld{white-space:pre}.thr .tg,.thr .tw{color:var(--dim);font-weight:700}
110
+ .thr .running .tg,.thr .running .tw{color:var(--green)}.thr .blocked .tg,.thr .blocked .tw{color:var(--amber)}.thr .done .tg,.thr .done .tw{color:var(--green)}
111
+ .lc.rewind{--rb:#ff2d95,#ff6337,#ffd23c,#6bdb8f,#5fd7ff,#9b6bff,#ff2d95;--rbt:rgba(255,45,149,.34),rgba(255,99,55,.3),rgba(255,210,60,.28),rgba(107,219,143,.28),rgba(95,215,255,.32),rgba(155,107,255,.34),rgba(255,45,149,.34);border:3px solid transparent;padding:9px 12px 8px;background:radial-gradient(120% 140% at 100% 0%,color-mix(in srgb,#9b6bff 18%,transparent),transparent 55%) padding-box,linear-gradient(var(--bg),var(--bg)) padding-box,linear-gradient(115deg,var(--rb)) border-box;background-size:100% 100%,100% 100%,200% 200%;box-shadow:0 0 26px -2px #9b6bff;animation:drift 10s linear infinite,glow 10s linear infinite}
112
+ :root.pane .lc.rewind{padding:16px 18px 14px}
113
+ .lc.rewind.is-done,.lc.rewind.is-idle{animation:none}
114
+ .lc.rewind .head{margin:-9px -12px 6px;padding:7px 12px;border-radius:10px 10px 0 0;background:linear-gradient(100deg,var(--rbt));background-size:200% 100%;animation:slide 8s linear infinite}
115
+ :root.pane .lc.rewind .head{margin:-16px -18px 8px;padding:10px 18px}
116
+ .lc.rewind.folded{padding:2px 8px;animation:drift 10s linear infinite}
117
+ .lc.rewind.folded .head{margin:0;padding:0;background:none;animation:none}
118
+ .lc.rewind .brand,.lc.rewind .nowpill{background:linear-gradient(100deg,var(--rb));background-size:200% 100%;animation:slide 5s linear infinite;box-shadow:0 0 14px -2px #ff2d95}
119
+ .lc.rewind.is-done .brand{animation:none}
120
+ .lc.rewind .name{background:linear-gradient(100deg,var(--rb));background-size:200% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;animation:slide 5s linear infinite}
121
+ @keyframes slide{from{background-position:0 0}to{background-position:200% 0}}
122
+ @keyframes glow{0%,100%{box-shadow:0 0 26px -2px #ff2d95}17%{box-shadow:0 0 26px -2px #ff6337}33%{box-shadow:0 0 26px -2px #ffd23c}50%{box-shadow:0 0 26px -2px #5fd7ff}67%{box-shadow:0 0 26px -2px #9b6bff}83%{box-shadow:0 0 26px -2px #6bdb8f}}
123
+ .lc.rewind .bar,.lc.rewind .pbar{animation:hue 6s linear infinite}
124
+ .lc.rewind .mini,.lc.rewind .st.done{animation:hue 9s linear infinite}
125
+ .lc.rewind .pbar{width:84px;height:8px;border-radius:4px}
126
+ @keyframes hue{to{filter:hue-rotate(360deg)}}
127
+ .lc.rewind .pbar i{background:linear-gradient(90deg,transparent,#ff2d95,#ffd23c,#6bdb8f,#5fd7ff,transparent)}
128
+ .sparks{position:absolute;inset:0;overflow:hidden;pointer-events:none;border-radius:inherit}
129
+ .sparks i{position:absolute;font-style:normal;font-size:13px;line-height:1;opacity:0;color:#fff;text-shadow:0 0 6px #ff2d95,0 0 12px #5fd7ff;animation:trail 4.2s linear infinite}
130
+ .sparks i:nth-child(1){top:8%;animation-delay:0s}.sparks i:nth-child(2){top:30%;animation-delay:.6s}.sparks i:nth-child(3){top:52%;animation-delay:1.2s}.sparks i:nth-child(4){top:74%;animation-delay:1.8s}.sparks i:nth-child(5){top:18%;animation-delay:2.4s}.sparks i:nth-child(6){top:62%;animation-delay:3s}.sparks i:nth-child(7){top:86%;animation-delay:3.6s}
131
+ @keyframes trail{0%{left:3%;opacity:0}12%{opacity:.95}80%{opacity:.6}100%{left:95%;opacity:0}}
132
+ :root.light .sparks i{color:#c0186b;text-shadow:none}
133
+ :root.light .lc.rewind{--rb:#c0186b,#bd3f0b,#9a5b00,#17783f,#006f99,#6a3fd1,#c0186b;--rbt:rgba(192,24,107,.2),rgba(189,63,11,.18),rgba(154,91,0,.16),rgba(23,120,63,.18),rgba(0,111,153,.2),rgba(106,63,209,.2),rgba(192,24,107,.2);background:radial-gradient(120% 140% at 100% 0%,color-mix(in srgb,#6a3fd1 10%,transparent),transparent 55%) padding-box,linear-gradient(var(--bg),var(--bg)) padding-box,linear-gradient(115deg,var(--rb)) border-box;background-size:100% 100%,100% 100%,200% 200%;box-shadow:0 0 22px -4px #6a3fd1}
134
+ @keyframes drift{from{background-position:0 0,0 0,0% 50%}to{background-position:0 0,0 0,200% 50%}}
135
+ /* YOUR TURN: amber border, slow breathe (2.4 s period) */
136
+ .lc.turn{border-color:var(--amber);box-shadow:0 0 18px -4px var(--amber);animation:amberbreathe 2.4s ease-in-out infinite}
137
+ .lc.turn .brand{background:var(--amber);color:var(--pillink)}
138
+ .lc.turn .right{color:var(--amber)}
139
+ .lc.turn .brand::after{display:none}
140
+ @keyframes amberbreathe{0%,100%{border-color:color-mix(in srgb,var(--amber) 40%,transparent);box-shadow:0 0 12px -4px color-mix(in srgb,var(--amber) 30%,transparent)}50%{border-color:var(--amber);box-shadow:0 0 22px -2px color-mix(in srgb,var(--amber) 70%,transparent)}}
141
+ .lc.turn.folded{animation:none}
142
+ /* REVIEW: segmented top and bottom borders drawn by JS in .review-lanes */
143
+ .lc.review{border-color:color-mix(in srgb,var(--acc) 40%,transparent);animation:none}
144
+ .lc.review .brand::after{display:none}
145
+ .review-lanes{display:flex;gap:2px;height:3px;border-radius:2px;margin:0 -2px 6px}.review-lanes i{flex:1;border-radius:2px;transition:background .4s ease}
146
+ /* DONE: one burst of rainbow embers, then settle */
147
+ .lc.done{border-color:color-mix(in srgb,var(--green) 60%,transparent);box-shadow:0 0 0 1px color-mix(in srgb,var(--green) 8%,transparent)}
148
+ .done-burst{position:absolute;inset:0;overflow:hidden;pointer-events:none;border-radius:inherit;animation:burstfade 2s ease-out forwards}
149
+ .done-burst i{position:absolute;font-style:normal;font-size:14px;line-height:1;color:#fff;text-shadow:0 0 6px var(--green),0 0 12px var(--acc);animation:ember 1.6s ease-out forwards}
150
+ .done-burst i:nth-child(1){top:20%;left:15%;animation-delay:0s}.done-burst i:nth-child(2){top:40%;left:50%;animation-delay:.15s}.done-burst i:nth-child(3){top:60%;left:80%;animation-delay:.3s}.done-burst i:nth-child(4){top:30%;left:70%;animation-delay:.1s}.done-burst i:nth-child(5){top:70%;left:30%;animation-delay:.25s}
151
+ @keyframes ember{0%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(-18px) scale(.5)}}
152
+ @keyframes burstfade{0%{opacity:1}80%{opacity:1}100%{opacity:0}}
153
+ @media (prefers-reduced-motion:reduce){.lc,.lc *{animation:none!important}.lc.rewind{animation:none!important;background-position:0 0,0 0,0% 50%}.brand::after,.nowpill::after,.comet,.sparks,.done-burst{display:none}.pbar i{left:31%}.lc.rewind .bar,.lc.rewind .pbar,.lc.rewind .mini,.lc.rewind .st.done,.lc.rewind .brand,.lc.rewind .nowpill{animation:none!important}.lc.turn{animation:none!important}}
96
154
  </style></head>
97
155
  <body><div id="card" class="lc is-idle" role="status" aria-live="polite"><div class="head"><span class="brand">🔥 LIT</span><span class="j">·</span><span class="name dim">starting…</span></div></div>
98
156
  <script>
@@ -101,7 +159,7 @@ var STATUS_TOOL="lit_card_status";
101
159
  var FAST=1500,SLOW=5000,IDLE=15000,MAX_BACKOFF=30000;
102
160
  var root=document.documentElement,card=document.getElementById("card");
103
161
  var status=null,thread=null,timer=null,ticker=null,failures=0,idleSince=Date.now(),bridge=null,hostMode=null;
104
- var opened=null,folded=false;
162
+ var opened=null,folded=false,burstKey=null;
105
163
  var nextId=1,pending={};
106
164
 
107
165
  function el(tag,cls,text){var n=document.createElement(tag);if(cls)n.className=cls;if(text!=null)n.textContent=String(text);return n;}
@@ -114,7 +172,12 @@ function lin(v){return v<=0.04045?v/12.92:Math.pow((v+0.055)/1.055,2.4);}
114
172
  function gam(v){return v<=0.0031308?v*12.92:1.055*Math.pow(v,1/2.4)-0.055;}
115
173
  function mix(a,b,t){var x=hex(a),y=hex(b);return"#"+x.map(function(v,i){var m=gam(lin(v)+(lin(y[i])-lin(v))*t);return("0"+Math.round(Math.max(0,Math.min(1,m))*255).toString(16)).slice(-2);}).join("");}
116
174
  function token(name){return getComputedStyle(root).getPropertyValue(name)||"#ffffff";}
117
- function ramp(t){var f=token("--flame"),p=token("--pink"),a=token("--acc");return t<=0.5?mix(f,p,t*2):mix(p,a,(t-0.5)*2);}
175
+ /* the rewind look draws every cell of a gauge, map or use bar in its own hue round the wheel, whatever the fill */
176
+ var WHEEL_DARK=["#ff2d95","#ff6337","#ffd23c","#6bdb8f","#5fd7ff","#9b6bff"],WHEEL_LIGHT=["#c0186b","#bd3f0b","#9a5b00","#17783f","#006f99","#6a3fd1"];
177
+ function rewound(){return card.classList.contains("rewind");}
178
+ function lookIs(name){return card.classList.contains(name);}
179
+ function wheel(t){var c=root.classList.contains("light")?WHEEL_LIGHT:WHEEL_DARK,x=Math.max(0,Math.min(1,t))*(c.length-1),i=Math.min(c.length-2,Math.floor(x));return mix(c[i],c[i+1],x-i);}
180
+ function ramp(t){if(rewound())return wheel(t);var f=token("--flame"),p=token("--pink"),a=token("--acc");return t<=0.5?mix(f,p,t*2):mix(p,a,(t-0.5)*2);}
118
181
 
119
182
  function clock(ms){var s=Math.max(0,Math.floor(ms/1000));return Math.floor(s/60)+":"+("0"+(s%60)).slice(-2);}
120
183
  function span(ms){var s=Math.max(1,Math.round(ms/1000));if(s<60)return s+"s";var m=Math.floor(s/60);if(m<60)return s%60?m+"m "+(s%60)+"s":m+"m";return Math.floor(m/60)+"h "+(m%60)+"m";}
@@ -126,11 +189,11 @@ function bar(done,total){
126
189
  var cells=Math.min(total,10),filled=total===0?0:Math.round(done/total*cells);
127
190
  if(done>0&&filled===0)filled=1;if(done<total&&filled===cells)filled=cells-1;
128
191
  var b=el("span","bar");
129
- for(var i=0;i<cells;i++){var s=el("i","seg"+(i<filled?"":" off"));if(i<filled)s.style.background=mix(token("--pink"),token("--acc"),cells<=1?0:i/(cells-1));b.appendChild(s);}
192
+ for(var i=0;i<cells;i++){var s=el("i","seg"+(i<filled?"":" off"));if(i<filled)s.style.background=rewound()?wheel(cells<=1?0:i/(cells-1)):mix(token("--pink"),token("--acc"),cells<=1?0:i/(cells-1));b.appendChild(s);}
130
193
  return b;
131
194
  }
132
195
  function useColor(p){return p>=90?token("--red"):p>=70?token("--amber"):null;}
133
- function mini(p){var b=el("span","mini"),on=Math.round(p/10),fill=useColor(p)||token("--acc");for(var i=0;i<10;i++){var c=el("i");if(i<on)c.style.background=fill;b.appendChild(c);}return b;}
196
+ function mini(p){var b=el("span","mini"),on=Math.round(p/10),warn=useColor(p),fill=warn||token("--acc");for(var i=0;i<10;i++){var c=el("i");if(i<on)c.style.background=warn||!rewound()?fill:wheel(i/9);b.appendChild(c);}return b;}
134
197
  function spinner(soft){
135
198
  var ns="http://www.w3.org/2000/svg",svg=document.createElementNS(ns,"svg");
136
199
  svg.setAttribute("class","spin"+(soft?" soft":""));svg.setAttribute("viewBox","0 0 16 16");svg.setAttribute("width","12");svg.setAttribute("height","12");svg.setAttribute("aria-hidden","true");
@@ -157,6 +220,8 @@ function head(s){
157
220
  if(s.state==="ready"){add(h,el("span","name dim","ready"),el("span","right dim","idle"));return h;}
158
221
  add(h,el("span","name acc",s.mode||"lit"));
159
222
  if(s.state==="complete"){add(h,el("span","right ok",doneWord(s)+" ✓"));return h;}
223
+ if(s.look==="turn"){var tr=el("span","right");tr.style.color="var(--amber)";tr.appendChild(el("span",null,"YOUR TURN"));h.appendChild(tr);return h;}
224
+ if(s.look==="review"&&s.reviewLanes){var cnt=s.reviewLanes.filter(function(l){return l==="pass"||l==="fail";}).length;var rr=el("span","right acc");rr.appendChild(el("span",null,"REVIEW "+cnt+"/5"));h.appendChild(rr);return h;}
160
225
  var r=el("span","right acc");if(!s.map)r.appendChild(el("span",null,"IGNITED"));
161
226
  if(s.working){if(s.turnStartedAt)r.appendChild(turnClock(s.turnStartedAt));r.appendChild(el("i","dot"));}
162
227
  if(r.childNodes.length)h.appendChild(r);return h;
@@ -199,6 +264,55 @@ function taskRow(s){
199
264
  }
200
265
  add(row,el("span","dim","└"),liveNode(s));return row;
201
266
  }
267
+ /* work paused under a side discipline: paused frames, the running one after the play mark, and the way back */
268
+ function pulse(){var b=el("span","pbar");b.setAttribute("aria-hidden","true");b.appendChild(el("i"));return b;}
269
+ /* a gauge only when both counts are real; otherwise what is known in words, and a moving pulse on the running frame */
270
+ function frameMark(f,running){
271
+ if(f.gauge)return el("span","dim",f.gauge);
272
+ var w=el("span","dim",f.note||"");
273
+ return running?add(el("span","fm"),w,pulse()):w;
274
+ }
275
+ function stackNode(s){
276
+ var k=s.stack;if(!k||!k.paused||!k.paused.length||!k.running)return null;
277
+ var row=el("div","row stk");add(row,el("span","dim","⏸"));
278
+ k.paused.forEach(function(f,i){if(i>0)row.appendChild(joiner());add(row,el("span","fr",f.name+(f.stage?" "+f.stage:"")),frameMark(f,false));});
279
+ add(row,el("span","acc","‖ ▶"),el("span","fr",k.running.name),frameMark(k.running,true),el("span","dim","· back"),el("kbd",null,"lit continue"));
280
+ return row;
281
+ }
282
+ /* the thread rows: frames parent first, lanes under the top frame behind a fork line, other sessions last; no placeholder, ever */
283
+ var GLYPH={running:"●",paused:"|",blocked:"!",idle:"-",done:"✓"};
284
+ function threadRow(t,lead){
285
+ var r=el("div","row tr "+t.state);
286
+ add(r,el("span","dim ld",lead||""),el("span","tg",GLYPH[t.state]||"●"),el("span","fr",t.name));
287
+ if(t.stage)r.appendChild(el("span","dim",t.stage));
288
+ if(t.gauge)r.appendChild(el("span","dim",t.gauge));
289
+ else{if(t.note)r.appendChild(el("span","dim",t.note));if(t.state==="running")r.appendChild(pulse());}
290
+ r.appendChild(el("span","tw",t.state));
291
+ if(t.session)r.appendChild(el("span","dim","· other session "+t.session));
292
+ return r;
293
+ }
294
+ function threadsNode(s){
295
+ var k=s.threads;if(!k||!k.chain)return null;
296
+ var box=el("div","thr"),last=null,under=new Array(Math.max(1,k.chain.length)).join(" ");
297
+ k.chain.forEach(function(t,i){
298
+ last=threadRow(t,i?new Array(i).join(" ")+"└─ ":"");
299
+ if(k.back&&i===k.chain.length-1)add(last,el("span","dim","· back"),el("kbd",null,"lit continue"));
300
+ box.appendChild(last);
301
+ });
302
+ if(k.laneCount>=2)box.appendChild(add(el("div","row dim"),el("span","ld",under+"┬ "+k.laneCount+" lanes in parallel")));
303
+ (k.lanes||[]).forEach(function(t,i){
304
+ var branch=k.laneCount>=2?(i===k.lanes.length-1?"└─ ":"├─ "):(k.chain.length?"└─ ":"");
305
+ last=threadRow(t,under+branch);box.appendChild(last);
306
+ });
307
+ (k.others||[]).forEach(function(t){last=threadRow(t,"");box.appendChild(last);});
308
+ if(k.more>0&&last)last.appendChild(el("span","dim","+"+k.more+" more"));
309
+ return box;
310
+ }
311
+ /* the rainbow look's sparkle trail: four small stars drifting along the top edge, one at a time */
312
+ function sparks(){var w=el("div","sparks");w.setAttribute("aria-hidden","true");["✦","✧","✦","✧","✦","✧","✦"].forEach(function(c){w.appendChild(el("i",null,c));});return w;}
313
+ function doneBurst(){var w=el("div","done-burst");w.setAttribute("aria-hidden","true");["✦","✧","✦","✧","✦"].forEach(function(c){w.appendChild(el("i",null,c));});return w;}
314
+ var LANE_COLORS_D=["#5fd7ff","#b48cff","#ff6fae","#6bdb8f","#ffd75f"],LANE_RUNNING_D=["#5095af","#7e6caf","#a85c82","#569771","#a89557"],LANE_DIM_D="#3d444d",LANE_FAIL_D="#ff5f5f";
315
+ function laneEl(states){var w=el("div","review-lanes");w.setAttribute("aria-hidden","true");(states||[]).forEach(function(st,i){var s=el("i");s.style.background=st==="pass"?LANE_COLORS_D[i]:st==="running"?LANE_RUNNING_D[i]:st==="fail"?LANE_FAIL_D:LANE_DIM_D;w.appendChild(s);});return w;}
202
316
  function useItems(s){
203
317
  var u=s.usage||{},items=[];
204
318
  [["ctx",u.ctx],["5h",u.fiveHour],["1w",u.week]].forEach(function(x){if(typeof x[1]==="number")items.push(x);});
@@ -243,8 +357,10 @@ function usageBlock(s){
243
357
  }
244
358
  function renderInline(s){
245
359
  card.appendChild(head(s));
246
- if(s.state==="ready"){var hint=el("div","row");add(hint,el("span","dim","no LIT skill yet"),joiner(),el("span","dim","type"),el("kbd",null,"lit <task>"),el("span","dim","to start one"));hint.style.marginTop="6px";card.appendChild(hint);return;}
360
+ if(s.state==="ready"){var hint=el("div","row");add(hint,el("span","dim","no LIT skill yet"),joiner(),el("span","dim","type"),el("kbd",null,"lit <task>"),el("span","dim","to start one"));hint.style.marginTop="6px";card.appendChild(hint);var back=el("div","row");add(back,el("span","dim","back from a break?"),el("kbd",null,"lit adhd"),el("span","dim","shows where you were"));card.appendChild(back);return;}
361
+ if(s.look==="review"&&s.reviewLanes)card.appendChild(laneEl(s.reviewLanes));
247
362
  if(s.map)card.appendChild(mapRow(s));else card.appendChild(el("div","map"));
363
+ var sk=threadsNode(s)||stackNode(s);if(sk)card.appendChild(sk);
248
364
  card.appendChild(taskRow(s));
249
365
  var f=foot(s);if(!f)return;card.appendChild(f);
250
366
  /* a narrow card drops the workspace, then the branch, then the last use items, rather than cut a number */
@@ -254,13 +370,15 @@ function renderInline(s){
254
370
  }
255
371
  function renderPane(s){
256
372
  card.appendChild(head(s));
373
+ if(s.look==="review"&&s.reviewLanes)card.appendChild(laneEl(s.reviewLanes));
257
374
  if(s.state==="ready"){
258
375
  var hero=el("div","hero"),hs=el("div","heros");add(hs,"type ",el("kbd",null,"lit <task>")," in this thread to start one");
259
- var ex=el("div","examples");["lit add a --shout flag","lit plan the release note","lit-loop fix the parser"].forEach(function(t){ex.appendChild(el("kbd",null,t));});
376
+ var ex=el("div","examples");["lit add a --shout flag","lit plan the release note","lit-loop fix the parser","lit adhd"].forEach(function(t){ex.appendChild(el("kbd",null,t));});
260
377
  add(hero,el("div","flame","🔥"),el("div","herot","no LIT skill yet"),hs,ex);card.appendChild(hero);
261
378
  }else{
262
379
  if(s.state==="complete"){var prog=progressOf(s.map),bn=el("div","banner",doneWord(s)+" ✓");if(prog)add(bn,el("span","dim",prog.done+"/"+prog.total+" tasks"));if(s.ignitedAt)add(bn,el("span","dim","· "+span(took(s))));card.appendChild(bn);}
263
380
  if(s.map)card.appendChild(timeline(s));else{var r=el("div","row");r.style.marginTop="14px";add(r,liveNode(s));card.appendChild(r);}
381
+ var pk=threadsNode(s)||stackNode(s);if(pk){pk.style.marginTop="10px";card.appendChild(pk);}
264
382
  }
265
383
  var u=usageBlock(s);if(u)card.appendChild(u);
266
384
  }
@@ -269,9 +387,11 @@ function render(){
269
387
  if(folded){root.classList.toggle("pane",false);card.className="lc folded";card.textContent="";renderFolded(s);reportSize();return;}
270
388
  if(!s)return;
271
389
  var p=pane();root.classList.toggle("pane",p);
272
- card.className="lc"+(s.state==="complete"?" is-done":s.state==="ready"?" is-idle":"");
390
+ card.className="lc"+(s.state==="complete"?" is-done":s.state==="ready"?" is-idle":"")+(s.state!=="ready"?(s.look==="rewind"?" rewind":s.look==="review"?" review":s.look==="turn"?" turn":s.look==="done"?" done":""):"");
273
391
  card.textContent="";
274
392
  if(p)renderPane(s);else renderInline(s);
393
+ if(s.look==="rewind"&&s.state==="ignited")card.appendChild(sparks());
394
+ if(s.look==="done"){var key=(s.thread||"")+"/"+(s.ignitedAt||0)+"/"+(s.turnEndedAt||0);if(burstKey!==key){burstKey=key;card.appendChild(doneBurst());}}
275
395
  reportSize();
276
396
  }
277
397
  function tick(){
@@ -0,0 +1,19 @@
1
+ export interface Look {
2
+ readonly label: string;
3
+ readonly palette: "rainbow" | "lanes" | "amber" | "rainbow" | "default";
4
+ readonly comet: "bottom-leftward" | "none";
5
+ readonly pill: "rainbow" | "accent" | "amber" | "brand";
6
+ }
7
+ export declare const LOOKS: Readonly<Record<string, Readonly<Look>>>;
8
+ export declare const LOOK_BY_SKILL: Readonly<Record<string, string>>;
9
+ /** The look a skill or discipline id brings, or null for one that keeps the card's own look. */
10
+ export declare function lookOf(id: string): string | null;
11
+ /** The five review-work lanes in the order the border draws them. */
12
+ export declare const REVIEW_LANE_NAMES: readonly ["scope", "tests", "package", "security", "surface"];
13
+ /** The review-work lane ids as the workflow stack stores them. */
14
+ export declare const REVIEW_LANE_IDS: readonly ["goal", "quality", "security", "qa", "context"];
15
+ /** One colour per review lane in border-draw order, and each one dimmed while the lane is still running. */
16
+ export declare const LANE_COLORS: readonly string[];
17
+ export type LaneState = "pass" | "running" | "fail" | "dim";
18
+ /** A lane segment's colour: its own once it passed, red once it failed, dim until it reports. */
19
+ export declare function laneColor(index: number, state: LaneState): string;
@@ -0,0 +1,58 @@
1
+ // src/card-looks.ts — the LIT card's looks: what a skill or session state turns the card into.
2
+ //
3
+ // A look names its palette, its corner label, its comet path and its pill style; card-html.ts and
4
+ // screen-card.ts draw them. card-status.ts picks one look per read: a completion first, then the
5
+ // session waiting on the user, then the look of a skill running this turn (whatever route ran it).
6
+ //
7
+ // rewind lit-adhd and lit-rewind: rainbow border and rails, `REWIND <<`, a `<<` comet
8
+ // review review-work: the top and bottom rules split into the five review lanes
9
+ // turn waiting on the user: an amber border breathing over 2.4 s, `YOUR TURN`
10
+ // done a plan, goal, review or release finished: one rainbow burst of embers
11
+ export const LOOKS = Object.freeze({
12
+ rewind: Object.freeze({
13
+ label: "REWIND <<",
14
+ palette: "rainbow",
15
+ comet: "bottom-leftward",
16
+ pill: "rainbow",
17
+ }),
18
+ review: Object.freeze({
19
+ label: "REVIEW",
20
+ palette: "lanes",
21
+ comet: "none",
22
+ pill: "accent",
23
+ }),
24
+ turn: Object.freeze({
25
+ label: "YOUR TURN",
26
+ palette: "amber",
27
+ comet: "none",
28
+ pill: "amber",
29
+ }),
30
+ done: Object.freeze({ label: "DONE", palette: "rainbow", comet: "none", pill: "brand" }),
31
+ });
32
+ export const LOOK_BY_SKILL = Object.freeze({
33
+ "lit-adhd": "rewind",
34
+ "lit-rewind": "rewind",
35
+ "review-work": "review",
36
+ });
37
+ const BY_SKILL = new Map(Object.entries(LOOK_BY_SKILL));
38
+ /** The look a skill or discipline id brings, or null for one that keeps the card's own look. */
39
+ export function lookOf(id) {
40
+ return BY_SKILL.get(id) ?? null;
41
+ }
42
+ /** The five review-work lanes in the order the border draws them. */
43
+ export const REVIEW_LANE_NAMES = Object.freeze(["scope", "tests", "package", "security", "surface"]);
44
+ /** The review-work lane ids as the workflow stack stores them. */
45
+ export const REVIEW_LANE_IDS = Object.freeze(["goal", "quality", "security", "qa", "context"]);
46
+ /** One colour per review lane in border-draw order, and each one dimmed while the lane is still running. */
47
+ export const LANE_COLORS = Object.freeze(["#5fd7ff", "#b48cff", "#ff6fae", "#6bdb8f", "#ffd75f"]);
48
+ const LANE_RUNNING = Object.freeze(["#5095af", "#7e6caf", "#a85c82", "#569771", "#a89557"]);
49
+ const LANE_DIM = "#3d444d";
50
+ const LANE_FAIL = "#ff5f5f";
51
+ /** A lane segment's colour: its own once it passed, red once it failed, dim until it reports. */
52
+ export function laneColor(index, state) {
53
+ if (state === "pass")
54
+ return LANE_COLORS[index] ?? LANE_DIM;
55
+ if (state === "running")
56
+ return LANE_RUNNING[index] ?? LANE_DIM;
57
+ return state === "fail" ? LANE_FAIL : LANE_DIM;
58
+ }
@@ -1,3 +1,5 @@
1
+ import { type LaneState } from "./card-looks.js";
2
+ import { type ThreadView } from "./threads.js";
1
3
  import { type WorkflowMap } from "./workflow-map.js";
2
4
  export interface CardStatus {
3
5
  readonly version: 1;
@@ -5,6 +7,8 @@ export interface CardStatus {
5
7
  readonly thread: string | null;
6
8
  readonly state: "ready" | "ignited" | "complete";
7
9
  readonly mode: string | null;
10
+ /** The card's look: "rewind", "review", "turn" (waiting on the user), "done" (just finished), or null. */
11
+ readonly look: string | null;
8
12
  readonly ignitedAt: number | null;
9
13
  readonly map: WorkflowMap | null;
10
14
  readonly step: {
@@ -21,6 +25,12 @@ export interface CardStatus {
21
25
  readonly working: boolean;
22
26
  /** Percent of the context window and of each quota window in use, from the thread's last token count. */
23
27
  readonly usage: Usage | null;
28
+ /** Work paused under a side discipline, or null while the thread has a single line of work. */
29
+ readonly stack?: CardStack | null;
30
+ /** Frames, child agents and other live sessions as rows; null while the stack row says all there is to say. */
31
+ readonly threads?: ThreadView | null;
32
+ /** The five review-work lane states, in border-draw order; null when the mode is not review-work. */
33
+ readonly reviewLanes?: readonly LaneState[] | null;
24
34
  /** The workspace's checked-out branch, or a short commit when detached. */
25
35
  readonly branch: string | null;
26
36
  /** Folder name of the workspace only; the full path stays out of the card. */
@@ -29,6 +39,23 @@ export interface CardStatus {
29
39
  readonly cardOpenedAt: number | null;
30
40
  readonly now: number;
31
41
  }
42
+ /**
43
+ * One frame of the session's workflow stack as the card names it: the skill and its stage, and a gauge only when
44
+ * both counts are real. A frame without a total carries a short `note` in words instead (`step 2`, or empty).
45
+ */
46
+ export interface CardFrame {
47
+ readonly name: string;
48
+ readonly stage: string | null;
49
+ readonly gauge: string | null;
50
+ readonly note: string;
51
+ }
52
+ /** A side discipline running over paused work: what is paused, what runs, and the way back. */
53
+ export interface CardStack {
54
+ readonly breadcrumb: string;
55
+ readonly row: string;
56
+ readonly paused: readonly CardFrame[];
57
+ readonly running: CardFrame;
58
+ }
32
59
  export interface Usage {
33
60
  readonly ctx: number | null;
34
61
  readonly fiveHour: number | null;
@@ -9,9 +9,13 @@
9
9
  // write of the card server, the time a card opened, lives in live-step.ts.
10
10
  import { closeSync, fstatSync, readdirSync, readSync } from "node:fs";
11
11
  import { basename, isAbsolute, join } from "node:path";
12
+ import { lookOf, REVIEW_LANE_IDS } from "./card-looks.js";
13
+ import { cleanDeep, cleanLines } from "./control-chars.js";
12
14
  import { codexHomeFrom, openRegularFile, plainDirs, readLiveStep, readThreadPointer, } from "./live-step.js";
13
15
  import { normalizeSessionId } from "./state-paths.js";
16
+ import { readThreads, threadLines } from "./threads.js";
14
17
  import { readWorkflowSignals, workflowMapCells, workflowMapText, workflowTurn, } from "./workflow-map.js";
18
+ import { breadcrumb, frameNote, readStack, stackGauge, stackRow } from "./workflow-stack.js";
15
19
  /** The rollout header carries the base instructions, so it is read up to this many bytes. */
16
20
  const MAX_ROLLOUT_HEADER_BYTES = 256 * 1024;
17
21
  /** The newest token count sits near the end of the rollout; only this much of the tail is read. */
@@ -268,6 +272,7 @@ function ready(thread, workspace, cardOpenedAt, now) {
268
272
  thread,
269
273
  state: "ready",
270
274
  mode: null,
275
+ look: null,
271
276
  ignitedAt: null,
272
277
  map: null,
273
278
  step: null,
@@ -277,12 +282,36 @@ function ready(thread, workspace, cardOpenedAt, now) {
277
282
  turnEndedAt: null,
278
283
  working: false,
279
284
  usage: null,
285
+ stack: null,
286
+ threads: null,
287
+ reviewLanes: null,
280
288
  branch: null,
281
289
  workspace,
282
290
  cardOpenedAt,
283
291
  now,
284
292
  };
285
293
  }
294
+ /** The paused frames under the running one, read from the thread's own stack; null when nothing is paused. */
295
+ function readCardStack(cwd, thread) {
296
+ try {
297
+ const stack = readStack(cwd, thread);
298
+ const row = stackRow(stack);
299
+ const crumb = breadcrumb(stack);
300
+ const top = stack.frames.at(-1);
301
+ if (row === null || crumb === null || top === undefined || !stack.frames.some((f) => f.status === "paused"))
302
+ return null;
303
+ const framed = (f) => ({
304
+ name: f.skill ?? f.family ?? "work",
305
+ stage: f.stage,
306
+ gauge: stackGauge(f),
307
+ note: frameNote(f),
308
+ });
309
+ return { breadcrumb: crumb, row, paused: stack.frames.slice(0, -1).map(framed), running: framed(top) };
310
+ }
311
+ catch {
312
+ return null;
313
+ }
314
+ }
286
315
  /**
287
316
  * Whether the model is still on the turn while no tool runs. A record that knows its turn says so
288
317
  * directly (open until Stop, unless it has gone quiet for the stale window); an older record without
@@ -331,11 +360,53 @@ export function readCardStatus(threadId, env, now = Date.now(), options = {}) {
331
360
  const stage = drawn?.cells.find((cell) => cell.state === "current")?.key;
332
361
  const finished = !recorded && turnOver && !open && drawn?.family === "main" && stage !== undefined && FINISHING_STAGES.has(stage);
333
362
  const map = finished && drawn !== null ? finishedMap(drawn) : drawn;
334
- return {
363
+ const state = recorded || finished ? "complete" : "ignited";
364
+ const working = step !== null || turnWorking(live, lastStepAt, now);
365
+ const cardStack = readCardStack(cwd, thread);
366
+ // The look: a completion first, then the session waiting on the user, then the skill's own look.
367
+ // When the mode has no look (a scoped or implicit skill load that the hook never routed), the
368
+ // stack's active top frame can carry it: family "main" + stage "review" → "review".
369
+ // The "turn" look fires only when the last assistant message asked something (question mark,
370
+ // approval phrase) or reported BLOCKED — not on every finished turn.
371
+ let skillLook = lookOf(turn.mode);
372
+ let reviewFrame;
373
+ try {
374
+ const stack = readStack(cwd, thread);
375
+ reviewFrame = stack.frames.find((f) => f.family === "main" && f.stage === "review" && f.status === "active");
376
+ if (skillLook === null && reviewFrame !== undefined) {
377
+ skillLook = "review";
378
+ }
379
+ }
380
+ catch {
381
+ // The card shows what it can; a missing stack does not break the read.
382
+ }
383
+ const waitReason = live?.waitReason ?? null;
384
+ const waitingOnUser = !working && state === "ignited" && turnOver && waitReason !== null;
385
+ // The done look fires only for an explicit plan/goal completion (recorded signal), not for a
386
+ // routine turn that implicitly finishes at a finishing stage.
387
+ const doneLook = state === "complete" && recorded;
388
+ const look = doneLook ? "done" : waitingOnUser ? "turn" : skillLook;
389
+ // Review lane states from the workflow stack's verdicts.
390
+ let reviewLanes = null;
391
+ if (skillLook === "review" && reviewFrame !== undefined) {
392
+ reviewLanes = REVIEW_LANE_IDS.map((id) => {
393
+ const v = reviewFrame.verdicts[id];
394
+ if (v === "pass")
395
+ return "pass";
396
+ if (v === "fail")
397
+ return "fail";
398
+ if (v === "running")
399
+ return "running";
400
+ return "dim";
401
+ });
402
+ }
403
+ // Every string here came from a record; none of it may carry a terminal control.
404
+ return cleanDeep({
335
405
  version: 1,
336
406
  thread,
337
- state: recorded || finished ? "complete" : "ignited",
407
+ state,
338
408
  mode: turn.mode,
409
+ look,
339
410
  ignitedAt: turn.startedAt,
340
411
  map,
341
412
  step,
@@ -343,13 +414,16 @@ export function readCardStatus(threadId, env, now = Date.now(), options = {}) {
343
414
  lastTool: live?.lastTool ? toolDisplayName(live.lastTool) : null,
344
415
  turnStartedAt: live?.turnStartedAt ?? null,
345
416
  turnEndedAt: turnOver ? live.turnEndedAt : null,
346
- working: step !== null || turnWorking(live, lastStepAt, now),
417
+ working,
347
418
  usage: rollout ? readUsage(thread, env) : null,
419
+ stack: cardStack,
420
+ threads: readThreads(cwd, thread, now, signals),
421
+ reviewLanes,
348
422
  branch: readBranch(cwd),
349
423
  workspace,
350
424
  cardOpenedAt,
351
425
  now,
352
- };
426
+ });
353
427
  }
354
428
  /** Minutes and seconds, `m:ss`. */
355
429
  export function clock(ms) {
@@ -359,14 +433,27 @@ export function clock(ms) {
359
433
  /** The card as plain text, for hosts that cannot draw it (the terminal `codex`). */
360
434
  export function cardStatusText(status) {
361
435
  if (status.state === "ready")
362
- return "🔥 LIT · ready — no LIT skill in this thread yet. Type `lit <task>` to start one.";
363
- const lines = [`🔥 LIT ${status.state === "complete" ? "COMPLETE ✓" : "IGNITED"} · ${status.mode ?? "lit"}`];
436
+ return "🔥 LIT · ready — no LIT skill in this thread yet. Type `lit <task>` to start one, or `lit adhd` after a break.";
437
+ const lookLabel = status.look === "turn"
438
+ ? " YOUR TURN"
439
+ : status.look === "rewind"
440
+ ? " REWIND <<"
441
+ : status.look === "review"
442
+ ? " REVIEW"
443
+ : "";
444
+ const lines = [
445
+ `🔥 LIT ${status.state === "complete" ? "COMPLETE ✓" : "IGNITED"} · ${status.mode ?? "lit"}${lookLabel}`,
446
+ ];
364
447
  if (status.map !== null) {
365
448
  lines.push(workflowMapText(status.map));
366
449
  if (status.map.next !== null)
367
450
  lines.push(`next ▸ ${status.map.next}`);
368
451
  }
452
+ if (status.threads)
453
+ lines.push(...threadLines(status.threads));
454
+ else if (status.stack)
455
+ lines.push(status.stack.row);
369
456
  if (status.step !== null)
370
457
  lines.push(`⠹ ${status.step.tool} · ${clock(status.now - status.step.startedAt)}`);
371
- return lines.join("\n");
458
+ return cleanLines(lines.join("\n"));
372
459
  }
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  // src/cli.ts — M06-owned component bin dispatcher (A2 §3/§6.4, A3 addendum A1).
3
3
  //
4
- // Bin `litcodex-lit-loop` → dist/cli.js, the target the aggregate hooks.json invokes. Knows exactly
5
- // two route prefixes — `hook` and `loop` — and NO `config` route (config migration is
4
+ // Bin `litcodex-lit-loop` → dist/cli.js, the target the aggregate hooks.json invokes. Knows four route
5
+ // prefixes — `hook`, `loop`, `rewind` and `stage` — and NO `config` route (config migration is
6
6
  // owned by the separate litcodex-ai installer bin, not this dispatcher).
7
7
  //
8
8
  // Exit-code table (A3 addendum A1.2):
@@ -14,8 +14,9 @@
14
14
  //
15
15
  // `main` NEVER calls process.exit (the shebang wrapper does); it resolves exactly one integer, so
16
16
  // the dispatcher is unit-testable with an injected argv array.
17
- import { runPostCompactHookCli, runPostToolUseLiveHookCli, runPreToolUseCreateGoalGuardCli, runPreToolUseLiveHookCli, runSessionStartHookCli, runStopPlanPersistenceHookCli, runUserPromptSubmitHookCli, } from "./hook-cli.js";
17
+ import { runPostCompactHookCli, runPostToolUseLiveHookCli, runPreToolUseCreateGoalGuardCli, runPreToolUseLiveHookCli, runSessionStartHookCli, runStopPlanPersistenceHookCli, runSubagentHookCli, runUserPromptSubmitHookCli, } from "./hook-cli.js";
18
18
  import { loopCommand } from "./loop-cli.js";
19
+ import { rewindCommand, stageCommand } from "./rewind-cli.js";
19
20
  const UNKNOWN_COMMAND = "lit-loop: unknown command\n";
20
21
  /**
21
22
  * Dispatch one argv vector to a route and resolve its exit code. Pure of process.exit; writes only
@@ -39,6 +40,10 @@ export async function main(argv, stdin, stdout, stderr) {
39
40
  return runPreToolUseLiveHookCli(stdin, stdout, stderr);
40
41
  if (subcommand === "post-tool-use-live")
41
42
  return runPostToolUseLiveHookCli(stdin, stdout, stderr);
43
+ if (subcommand === "subagent-start")
44
+ return runSubagentHookCli("start", stdin);
45
+ if (subcommand === "subagent-stop")
46
+ return runSubagentHookCli("stop", stdin);
42
47
  stderr.write(UNKNOWN_COMMAND);
43
48
  return 1;
44
49
  }
@@ -47,6 +52,11 @@ export async function main(argv, stdin, stdout, stderr) {
47
52
  // and never calls process.exit. The `doctor` subcommand is still the M09 stub until M11/T16.
48
53
  return loopCommand(argv.slice(3), { stdout, stderr, stdin });
49
54
  }
55
+ // `rewind` prints the lit-adhd brief data; `stage` records the stage and k/n of the work on top of the stack.
56
+ if (command === "rewind")
57
+ return rewindCommand(argv.slice(3), { stdout, stderr });
58
+ if (command === "stage")
59
+ return stageCommand(argv.slice(3), { stdout, stderr });
50
60
  stderr.write(UNKNOWN_COMMAND);
51
61
  return 1;
52
62
  }
@@ -21,6 +21,8 @@ export type HookDecision = {
21
21
  readonly stdout: string;
22
22
  readonly mode: LitMode;
23
23
  readonly entry?: "continue";
24
+ /** True when the film context was added, so the completion gate (motion-gate.ts) arms the turn. */
25
+ readonly film?: true;
24
26
  } | {
25
27
  readonly kind: "noop";
26
28
  };
@@ -27,6 +27,7 @@ import { BROWSER_DRIVE_MODE_SPEC, HANDOFF_MODE_SPEC, modeForToken, resolveSkillP
27
27
  import { motionRouteContext } from "./motion-route.js";
28
28
  import { continueContext, enterRoute, entryNotes, NO_REENTRY } from "./reentry.js";
29
29
  import { loadRouteContext, loadSkillInvocationContext } from "./route-context.js";
30
+ import { classifySchematicRequest } from "./schematic-route.js";
30
31
  import { isExactBareScientificVisualizationPrompt, isScientificVisualizationWhitespaceNearMiss, shouldSuppressScientificVisualizationInjection, } from "./scientific-visualization-route.js";
31
32
  import { matchRenamedSkillInvocation, skillRenameNote } from "./skill-renames.js";
32
33
  import { maskMarkdownCode, matchLitTrigger } from "./trigger.js";
@@ -220,7 +221,8 @@ export function runUserPromptSubmitHook(input, reentry = () => NO_REENTRY) {
220
221
  if (match === null) {
221
222
  return { kind: "noop" };
222
223
  }
223
- const mode = modeForToken(match.token);
224
+ // A bare `lit` that asks for a drawing of real equipment takes the schematic route, not the generic lit-loop one.
225
+ const mode = modeForToken(match.token === "lit" && classifySchematicRequest(input.prompt) ? "lit-schematic" : match.token);
224
226
  // Whether this session already holds the contract comes from the session's saved state (reentry.ts), not the transcript.
225
227
  const decision = shouldSuppressInjection(input.prompt, transcriptPath, mode.openMarker, { transcriptDedupe: false });
226
228
  if (decision.suppress) {
@@ -230,20 +232,17 @@ export function runUserPromptSubmitHook(input, reentry = () => NO_REENTRY) {
230
232
  const keeps = entry.kind === "continue" || (entry.kind === "resume" && entry.active);
231
233
  const route = entry.kind === "first" ? mode.mode : entry.route;
232
234
  const context = keeps ? continueContext(route, entry) : loadDirectiveForModeFailSilent(mode);
235
+ const film = mode.skillName === "lit-loop" ? motionRouteContext(mode.skillPath, input.prompt) : "";
233
236
  const stdout = context === ""
234
237
  ? ""
235
- : formatAdditionalContextOutput([
236
- context,
237
- ...(keeps ? [] : entryNotes(entry)),
238
- mode.skillName === "lit-loop" ? motionRouteContext(mode.skillPath, input.prompt) : "",
239
- skillRenameNote(match.raw),
240
- ]
238
+ : formatAdditionalContextOutput([context, ...(keeps ? [] : entryNotes(entry)), film, skillRenameNote(match.raw)]
241
239
  .filter(Boolean)
242
240
  .join("\n"), route);
243
241
  if (stdout === "") {
244
242
  return { kind: "noop" };
245
243
  }
244
+ const filmMark = film === "" ? {} : { film: true };
246
245
  return keeps
247
- ? { kind: "inject", stdout, mode: route, entry: "continue" }
248
- : { kind: "inject", stdout, mode: mode.mode };
246
+ ? { kind: "inject", stdout, mode: route, entry: "continue", ...filmMark }
247
+ : { kind: "inject", stdout, mode: mode.mode, ...filmMark };
249
248
  }
@@ -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;