@litfamily/litopencode 1.0.31 → 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 (267) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README-Ko-KR.md +6 -6
  3. package/README.md +6 -6
  4. package/dist/activation-probe.js +1 -0
  5. package/dist/activation-prompt-utils.d.ts +1 -1
  6. package/dist/activation-reentry.d.ts +20 -0
  7. package/dist/activation-reentry.js +110 -1
  8. package/dist/activation-routing.d.ts +2 -1
  9. package/dist/activation-routing.js +100 -11
  10. package/dist/activation-workflow-prompts.d.ts +4 -0
  11. package/dist/activation-workflow-prompts.js +30 -0
  12. package/dist/activation.d.ts +1 -1
  13. package/dist/activation.js +44 -5
  14. package/dist/adhd-next.d.ts +51 -0
  15. package/dist/adhd-next.js +150 -0
  16. package/dist/cli/managed-skill-assets.d.ts +1 -1
  17. package/dist/cli/managed-skill-assets.js +7 -1
  18. package/dist/cli/native-skill-integrity.js +1 -1
  19. package/dist/cli.js +7 -1
  20. package/dist/commands.d.ts +28 -1
  21. package/dist/commands.js +48 -1
  22. package/dist/features.d.ts +80 -1
  23. package/dist/features.js +105 -1
  24. package/dist/ledger.js +12 -1
  25. package/dist/secret-shapes.js +5 -5
  26. package/dist/skills.d.ts +22 -1
  27. package/dist/skills.js +36 -0
  28. package/dist/start-work-typed.d.ts +34 -0
  29. package/dist/start-work-typed.js +156 -0
  30. package/dist/state.d.ts +2 -0
  31. package/dist/state.js +2 -0
  32. package/dist/tools.js +22 -2
  33. package/dist/tui/mission-band.d.ts +20 -1
  34. package/dist/tui/mission-band.js +73 -16
  35. package/dist/tui/mission-looks.d.ts +38 -0
  36. package/dist/tui/mission-looks.js +73 -0
  37. package/dist/tui/mission-model.d.ts +2 -0
  38. package/dist/tui/mission-model.js +3 -1
  39. package/dist/tui/mission-rainbow.d.ts +33 -0
  40. package/dist/tui/mission-rainbow.js +90 -0
  41. package/dist/tui/mission-source.d.ts +48 -0
  42. package/dist/tui/mission-source.js +184 -2
  43. package/dist/tui/mission-text.d.ts +2 -0
  44. package/dist/tui/mission-text.js +9 -1
  45. package/dist/tui/mission-threads.d.ts +50 -0
  46. package/dist/tui/mission-threads.js +119 -0
  47. package/dist/tui.js +84 -6
  48. package/dist/uiux-visual-catalog.js +8 -1
  49. package/dist/v2/session-hooks.js +38 -5
  50. package/dist/workflow-stack.d.ts +53 -0
  51. package/dist/workflow-stack.js +196 -0
  52. package/docs/assets/readme/badge-version.svg +1 -1
  53. package/docs/assets/skills/lit-schematic.webp +0 -0
  54. package/docs/reference-Ko-KR.md +30 -2
  55. package/docs/reference.md +34 -2
  56. package/package.json +1 -1
  57. package/skills/frontend-ui-ux/SKILL.md +3 -2
  58. package/skills/frontend-ui-ux/kit/components.css +414 -0
  59. package/skills/frontend-ui-ux/kit/fonts.json +22 -0
  60. package/skills/frontend-ui-ux/kit/layouts/landing.html +164 -0
  61. package/skills/frontend-ui-ux/kit/layouts/settings.html +114 -0
  62. package/skills/frontend-ui-ux/kit/layouts/workspace.html +115 -0
  63. package/skills/frontend-ui-ux/kit/styles/computational-brutalism.json +227 -0
  64. package/skills/frontend-ui-ux/kit/styles/field-notes.json +205 -0
  65. package/skills/frontend-ui-ux/kit/styles/graphite.json +200 -0
  66. package/skills/frontend-ui-ux/kit/styles/meadow.json +199 -0
  67. package/skills/frontend-ui-ux/kit/styles/neo-brutalism.json +222 -0
  68. package/skills/frontend-ui-ux/kit/ui.js +226 -0
  69. package/skills/frontend-ui-ux/references/brand-and-imagery.md +2 -2
  70. package/skills/frontend-ui-ux/references/complete-contract.md +2 -1
  71. package/skills/frontend-ui-ux/references/craft-floor.md +6 -2
  72. package/skills/frontend-ui-ux/references/default-editorial-pixel.json +3 -0
  73. package/skills/frontend-ui-ux/references/house-styles.md +236 -0
  74. package/skills/frontend-ui-ux/references/motion-guide.md +2 -2
  75. package/skills/frontend-ui-ux/references/production.md +3 -1
  76. package/skills/frontend-ui-ux/references/slop-register.md +4 -4
  77. package/skills/frontend-ui-ux/scripts/design-lock.mjs +400 -0
  78. package/skills/frontend-ui-ux/scripts/pixel-art.mjs +60 -0
  79. package/skills/frontend-ui-ux/scripts/probe-lock.mjs +235 -0
  80. package/skills/frontend-ui-ux/scripts/probe-page.mjs +34 -12
  81. package/skills/frontend-ui-ux/scripts/probe-static.mjs +16 -3
  82. package/skills/frontend-ui-ux/scripts/probe-thresholds.json +8 -2
  83. package/skills/frontend-ui-ux/scripts/probe.mjs +35 -7
  84. package/skills/lit-adhd/SKILL.md +208 -0
  85. package/skills/lit-adhd/references/brief-format.md +43 -0
  86. package/skills/lit-adhd/references/card-examples.md +82 -0
  87. package/skills/lit-adhd/references/status-taxonomy.md +29 -0
  88. package/skills/lit-adhd/scripts/rewind.mjs +835 -0
  89. package/skills/lit-diagram-drawer/SKILL.md +4 -3
  90. package/skills/lit-diagram-drawer/references/style-guide.md +20 -11
  91. package/skills/lit-diagram-drawer/references/type-architecture.md +3 -3
  92. package/skills/lit-diagram-drawer/references/type-dependency.md +1 -1
  93. package/skills/lit-diagram-drawer/references/type-tree.md +3 -3
  94. package/skills/lit-diagram-drawer/references/type-wardley.md +1 -1
  95. package/skills/lit-diagram-drawer/references/verifier-guide.md +1 -0
  96. package/skills/lit-diagram-drawer/scripts/craft-thresholds.json +1 -2
  97. package/skills/lit-diagram-drawer/scripts/visual-quality.mjs +1 -2
  98. package/skills/lit-docx/SKILL.md +2 -1
  99. package/skills/lit-handoff/SKILL.md +2 -0
  100. package/skills/lit-hijack/SKILL.md +422 -0
  101. package/skills/lit-hijack/references/capture-and-provenance.md +87 -0
  102. package/skills/lit-hijack/references/clean-room-build.md +111 -0
  103. package/skills/lit-hijack/references/distil-and-licence.md +100 -0
  104. package/skills/lit-hijack/references/gap-and-port-design.md +126 -0
  105. package/skills/lit-hijack/references/parity-and-report.md +110 -0
  106. package/skills/lit-hijack/scripts/hijack.mjs +993 -0
  107. package/skills/lit-plan/SKILL.md +2 -0
  108. package/skills/lit-pptx/SKILL.md +27 -11
  109. package/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Bold.ttf +0 -0
  110. package/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf +0 -0
  111. package/skills/lit-pptx/fonts/jetbrains-mono/OFL.txt +93 -0
  112. package/skills/lit-pptx/fonts/jetbrains-mono/SOURCE.md +17 -0
  113. package/skills/lit-pptx/references/density-and-fill.md +9 -3
  114. package/skills/lit-pptx/references/direction-step.md +21 -6
  115. package/skills/lit-pptx/references/examples/04-lecture-chalk-ko.md +3 -6
  116. package/skills/lit-pptx/references/examples/05-research-talk-paper-en.md +1 -5
  117. package/skills/lit-pptx/references/examples/08-reliability-keynote-night-en.md +0 -4
  118. package/skills/lit-pptx/references/examples/09-status-update-ledger-en.md +2 -2
  119. package/skills/lit-pptx/references/examples/11-forecast-review-night-ko.md +4 -7
  120. package/skills/lit-pptx/references/examples/13-engineering-review-computational-brutalism-ko.md +173 -0
  121. package/skills/lit-pptx/references/examples/14-launch-pitch-neo-brutalism-ko.md +154 -0
  122. package/skills/lit-pptx/references/examples/15-design-lecture-bauhaus-ko.md +139 -0
  123. package/skills/lit-pptx/references/examples/16-community-programme-riso-ko.md +158 -0
  124. package/skills/lit-pptx/references/examples/17-public-data-briefing-newsroom-ko.md +179 -0
  125. package/skills/lit-pptx/references/layout-families.md +65 -47
  126. package/skills/lit-pptx/references/title-treatments.md +83 -134
  127. package/skills/lit-pptx/references/tonalities/atlas.md +3 -3
  128. package/skills/lit-pptx/references/tonalities/bauhaus.md +140 -0
  129. package/skills/lit-pptx/references/tonalities/chalk.md +7 -6
  130. package/skills/lit-pptx/references/tonalities/computational-brutalism.md +150 -0
  131. package/skills/lit-pptx/references/tonalities/gazette.md +1 -1
  132. package/skills/lit-pptx/references/tonalities/ledger.md +1 -1
  133. package/skills/lit-pptx/references/tonalities/neo-brutalism.md +161 -0
  134. package/skills/lit-pptx/references/tonalities/newsroom.md +144 -0
  135. package/skills/lit-pptx/references/tonalities/night.md +1 -1
  136. package/skills/lit-pptx/references/tonalities/paper.md +2 -2
  137. package/skills/lit-pptx/references/tonalities/riso.md +137 -0
  138. package/skills/lit-pptx/references/tonalities/signal.md +3 -3
  139. package/skills/lit-pptx/references/tonalities/studio.md +7 -6
  140. package/skills/lit-pptx/run.mjs +2 -1
  141. package/skills/lit-pptx/scripts/compile-deck.js +1 -1
  142. package/skills/lit-pptx/scripts/craft-thresholds.json +4 -8
  143. package/skills/lit-pptx/scripts/craft_extras.py +56 -3
  144. package/skills/lit-pptx/scripts/deck_output.py +75 -90
  145. package/skills/lit-pptx/scripts/embed_fonts.py +13 -1
  146. package/skills/lit-pptx/scripts/layout_inventory.py +12 -5
  147. package/skills/lit-pptx/scripts/lib/grid-resolver.js +101 -110
  148. package/skills/lit-pptx/scripts/lib/layout-resolver.js +9 -15
  149. package/skills/lit-pptx/scripts/lib/render-pack.js +373 -566
  150. package/skills/lit-pptx/scripts/lib/slide-grid.js +104 -0
  151. package/skills/lit-pptx/scripts/lib/template-registry.js +57 -6
  152. package/skills/lit-pptx/scripts/qa_deck.py +10 -11
  153. package/skills/lit-pptx/scripts/render_pages.py +118 -0
  154. package/skills/lit-pptx/templates/tonalities/atlas/pack.yaml +1 -1
  155. package/skills/lit-pptx/templates/tonalities/bauhaus/pack.yaml +98 -0
  156. package/skills/lit-pptx/templates/tonalities/chalk/pack.yaml +1 -1
  157. package/skills/lit-pptx/templates/tonalities/computational-brutalism/pack.yaml +99 -0
  158. package/skills/lit-pptx/templates/tonalities/gazette/pack.yaml +1 -1
  159. package/skills/lit-pptx/templates/tonalities/ledger/pack.yaml +1 -1
  160. package/skills/lit-pptx/templates/tonalities/neo-brutalism/pack.yaml +107 -0
  161. package/skills/lit-pptx/templates/tonalities/newsroom/pack.yaml +99 -0
  162. package/skills/lit-pptx/templates/tonalities/night/pack.yaml +1 -1
  163. package/skills/lit-pptx/templates/tonalities/paper/pack.yaml +1 -1
  164. package/skills/lit-pptx/templates/tonalities/riso/pack.yaml +99 -0
  165. package/skills/lit-pptx/templates/tonalities/signal/pack.yaml +2 -2
  166. package/skills/lit-pptx/templates/tonalities/studio/pack.yaml +1 -1
  167. package/skills/lit-recap/SKILL.md +4 -0
  168. package/skills/lit-schematic/SKILL.md +118 -0
  169. package/skills/lit-schematic/examples/iso-heat-exchanger/build.mjs +38 -0
  170. package/skills/lit-schematic/examples/iso-heat-exchanger/scene.mjs +133 -0
  171. package/skills/lit-schematic/examples/journal-adsorption-rig/build.mjs +87 -0
  172. package/skills/lit-schematic/examples/pid-dosing-skid/build.mjs +85 -0
  173. package/skills/lit-schematic/references/cutaway-outputs.md +70 -0
  174. package/skills/lit-schematic/references/isometric-craft.md +101 -0
  175. package/skills/lit-schematic/references/journal-figures.md +72 -0
  176. package/skills/lit-schematic/references/kit-api.md +134 -0
  177. package/skills/lit-schematic/references/pfd-and-layout.md +53 -0
  178. package/skills/lit-schematic/references/pid-drafting.md +103 -0
  179. package/skills/lit-schematic/references/pid-symbols.md +163 -0
  180. package/skills/lit-schematic/references/verification.md +100 -0
  181. package/skills/lit-schematic/scripts/doctor.mjs +57 -0
  182. package/skills/lit-schematic/scripts/lib/figure.mjs +81 -0
  183. package/skills/lit-schematic/scripts/lib/fonts.mjs +25 -0
  184. package/skills/lit-schematic/scripts/lib/geom.mjs +113 -0
  185. package/skills/lit-schematic/scripts/lib/interactive.mjs +292 -0
  186. package/skills/lit-schematic/scripts/lib/isa.mjs +115 -0
  187. package/skills/lit-schematic/scripts/lib/iso.mjs +719 -0
  188. package/skills/lit-schematic/scripts/lib/legend-sheet.mjs +162 -0
  189. package/skills/lit-schematic/scripts/lib/pid.mjs +937 -0
  190. package/skills/lit-schematic/scripts/lib/png.mjs +132 -0
  191. package/skills/lit-schematic/scripts/lib/qa-core.mjs +658 -0
  192. package/skills/lit-schematic/scripts/lib/route.mjs +218 -0
  193. package/skills/lit-schematic/scripts/lib/sheet.mjs +890 -0
  194. package/skills/lit-schematic/scripts/lib/svg.mjs +82 -0
  195. package/skills/lit-schematic/scripts/lib/theme.mjs +115 -0
  196. package/skills/lit-schematic/scripts/motion.mjs +129 -0
  197. package/skills/lit-schematic/scripts/qa.mjs +92 -0
  198. package/skills/lit-schematic/scripts/render.mjs +233 -0
  199. package/skills/lit-schematic/scripts/scaffold.mjs +60 -0
  200. package/skills/lit-scientific-visualization/SKILL.md +27 -4
  201. package/skills/lit-typographic-motion/SKILL.md +19 -17
  202. package/skills/lit-typographic-motion/THIRD_PARTY_NOTICES +9 -0
  203. package/skills/lit-typographic-motion/engine/accents.mjs +6 -0
  204. package/skills/lit-typographic-motion/engine/assets.mjs +282 -0
  205. package/skills/lit-typographic-motion/engine/blender/runner.py +228 -0
  206. package/skills/lit-typographic-motion/engine/blender.mjs +126 -0
  207. package/skills/lit-typographic-motion/engine/board.mjs +138 -0
  208. package/skills/lit-typographic-motion/engine/cover/assets.mjs +11 -8
  209. package/skills/lit-typographic-motion/engine/cover/capture.mjs +6 -6
  210. package/skills/lit-typographic-motion/engine/cover/render.mjs +20 -7
  211. package/skills/lit-typographic-motion/engine/cover/treatment.mjs +30 -3
  212. package/skills/lit-typographic-motion/engine/fill.mjs +54 -0
  213. package/skills/lit-typographic-motion/engine/gallery.mjs +118 -0
  214. package/skills/lit-typographic-motion/engine/house.mjs +42 -0
  215. package/skills/lit-typographic-motion/engine/look.mjs +65 -8
  216. package/skills/lit-typographic-motion/engine/loudness.mjs +101 -0
  217. package/skills/lit-typographic-motion/engine/scaffold.mjs +219 -0
  218. package/skills/lit-typographic-motion/engine/score.mjs +594 -0
  219. package/skills/lit-typographic-motion/engine/sound.mjs +9 -57
  220. package/skills/lit-typographic-motion/engine/stage/capture.mjs +23 -9
  221. package/skills/lit-typographic-motion/engine/stage/clock.js +8 -2
  222. package/skills/lit-typographic-motion/engine/stage/cover-init.js +12 -1
  223. package/skills/lit-typographic-motion/engine/stage/frame-worker.mjs +15 -7
  224. package/skills/lit-typographic-motion/engine/stage/gate.mjs +48 -4
  225. package/skills/lit-typographic-motion/engine/stage/qa-page.js +16 -5
  226. package/skills/lit-typographic-motion/engine/stage/qa.mjs +148 -7
  227. package/skills/lit-typographic-motion/engine/stage/render.mjs +69 -7
  228. package/skills/lit-typographic-motion/engine/stage/scan.mjs +20 -1
  229. package/skills/lit-typographic-motion/engine/stage/stage-kit.js +85 -4
  230. package/skills/lit-typographic-motion/engine/stills.mjs +1 -1
  231. package/skills/lit-typographic-motion/engine/styles.mjs +221 -0
  232. package/skills/lit-typographic-motion/engine/text.mjs +1 -1
  233. package/skills/lit-typographic-motion/engine/treatment.mjs +190 -6
  234. package/skills/lit-typographic-motion/engine/vendor/three/LICENSE +21 -0
  235. package/skills/lit-typographic-motion/engine/vendor/three/addons/environments/RoomEnvironment.js +144 -0
  236. package/skills/lit-typographic-motion/engine/vendor/three/addons/geometries/RoundedBoxGeometry.js +155 -0
  237. package/skills/lit-typographic-motion/engine/vendor/three/three.module.js +54571 -0
  238. package/skills/lit-typographic-motion/gate.mjs +18 -2
  239. package/skills/lit-typographic-motion/probe.mjs +13 -1
  240. package/skills/lit-typographic-motion/recipes/hero-3d/expected.json +64 -0
  241. package/skills/lit-typographic-motion/recipes/hero-3d/index.html +132 -0
  242. package/skills/lit-typographic-motion/recipes/orbit-loop/expected.json +2 -0
  243. package/skills/lit-typographic-motion/recipes/painted-light/expected.json +2 -0
  244. package/skills/lit-typographic-motion/recipes/weight-tide/expected.json +2 -0
  245. package/skills/lit-typographic-motion/references/cover.md +56 -13
  246. package/skills/lit-typographic-motion/references/craft-loop.md +20 -7
  247. package/skills/lit-typographic-motion/references/depth.md +112 -0
  248. package/skills/lit-typographic-motion/references/runtime.md +21 -6
  249. package/skills/lit-typographic-motion/references/sound.md +76 -0
  250. package/skills/lit-typographic-motion/references/stage.md +50 -7
  251. package/skills/lit-typographic-motion/references/studio.md +162 -0
  252. package/skills/lit-typographic-motion/references/style-bibles.md +18 -0
  253. package/skills/lit-typographic-motion/references/treatment.md +108 -9
  254. package/skills/lit-typographic-motion/render.mjs +60 -3
  255. package/skills/lit-typographic-motion/styles/paper.json +185 -0
  256. package/skills/lit-typographic-motion/styles/swiss-signal.json +188 -0
  257. package/skills/lit-typographic-motion/styles/terminalcore.json +182 -0
  258. package/skills/lit-typographic-motion/styles/tidal.json +187 -0
  259. package/skills/litresearch/SKILL.md +2 -0
  260. package/skills/managed-skill-manifest.json +517 -88
  261. package/skills/readme-studio/SKILL.md +1 -1
  262. package/skills/review-work/SKILL.md +2 -0
  263. package/skills/start-work/SKILL.md +8 -0
  264. package/skills/workflow-loop/SKILL.md +4 -0
  265. package/tools/check-pack-payload.mjs +4 -2
  266. package/tools/payload-substance-parity.json +4 -3
  267. package/tools/qa-cover-recipes.mjs +4 -3
@@ -7,7 +7,10 @@ import { autoHandoffSettingText } from "./auto-handoff.js";
7
7
  import { isReadOnlyWorkflowFamilyPlan } from "./workflow-families.js";
8
8
  import { queryKnowledge } from "./knowledge.js";
9
9
  import { activationDiscipline } from "./activation-probe.js";
10
- import { decideReentry } from "./activation-reentry.js";
10
+ import { adhdSessionNote } from "./activation-workflow-prompts.js";
11
+ import { typedPromptReply } from "./adhd-next.js";
12
+ import { decideReentry, recordActivation } from "./activation-reentry.js";
13
+ import { startTypedWork, typedStartArgument } from "./start-work-typed.js";
11
14
  import { micro, supportsMarkGlyphs } from "./lit-mark.js";
12
15
  // Prompt modules preserve minimum-first, single-task or few-task planning, avoidable custom code review,
13
16
  // and external-source safety; this module only coordinates their unchanged activation surfaces.
@@ -15,7 +18,7 @@ export { litHandoffPromptInjection, scientificVisualizationPromptInjection } fro
15
18
  export { litActivationBanner } from "./activation-prompt-utils.js";
16
19
  export { litLoopPromptInjection, litPlanPromptInjection } from "./activation-primary-prompts.js";
17
20
  export { containsStandaloneLitTrigger, detectChatActivationMode } from "./activation-routing.js";
18
- export { comprehendPromptInjection, debuggingPromptInjection, deepInterviewPromptInjection, gitMasterPromptInjection, litBrainstormPromptInjection, litCruciblePromptInjection, initDeepPromptInjection, litGoalPromptInjection, litRecapPromptInjection, litResearchPromptInjection, lspPromptInjection, lspSetupPromptInjection, litCodePromptInjection, refactorPromptInjection, removeAiSlopsPromptInjection, browserDrivePromptInjection, structuralSearchPromptInjection, rulesPromptInjection, reviewModeForcedNote, reviewWorkPromptInjection, startWorkChatPromptInjection, startWorkPromptInjection, litBurnoffFilePromptInjection, litFetchPromptInjection, litHumanizerPromptInjection } from "./activation-workflow-prompts.js";
21
+ export { comprehendPromptInjection, debuggingPromptInjection, deepInterviewPromptInjection, gitMasterPromptInjection, litBrainstormPromptInjection, litHijackPromptInjection, litAdhdPromptInjection, adhdSessionNote, litCruciblePromptInjection, initDeepPromptInjection, litGoalPromptInjection, litRecapPromptInjection, litResearchPromptInjection, lspPromptInjection, lspSetupPromptInjection, litCodePromptInjection, refactorPromptInjection, removeAiSlopsPromptInjection, browserDrivePromptInjection, structuralSearchPromptInjection, rulesPromptInjection, reviewModeForcedNote, reviewWorkPromptInjection, startWorkChatPromptInjection, startWorkPromptInjection, litBurnoffFilePromptInjection, litFetchPromptInjection, litHumanizerPromptInjection } from "./activation-workflow-prompts.js";
19
22
  export function showActivationToast(client, skillId, env = process.env) {
20
23
  const label = `🔥 LIT IGNITED · ${activationDiscipline(skillId)} 🔥`;
21
24
  const message = supportsMarkGlyphs(env)
@@ -132,13 +135,43 @@ export function createChatMessageActivationHook(projectRoot, options = {}) {
132
135
  // A malformed or unreadable knowledge store stays silent instead of inventing context.
133
136
  }
134
137
  }
138
+ if (!childSession && nonEmptyTextParts.length === 1 && output.parts.every((part) => part.type === "text")) {
139
+ const typed = await typedPromptReply(projectRoot, input.sessionID, nonEmptyTextParts[0].text, options.activationMemory, options.boundedAuthority);
140
+ if (typed !== undefined) {
141
+ output.parts.push({
142
+ id: `prt_litopencode_typed_${typed.mode.replace("-", "_")}_${idSuffix(input.messageID ?? output.message.id)}`,
143
+ sessionID: input.sessionID,
144
+ messageID: input.messageID ?? output.message.id,
145
+ type: "text",
146
+ text: typed.text,
147
+ synthetic: true,
148
+ metadata: { litopencode: { mode: typed.mode, trigger: "lit", source: "chat.message", typed: typed.kind } }
149
+ });
150
+ if (typed.continued)
151
+ await options.onSkillContinue?.(input.sessionID, typed.mode, false);
152
+ return;
153
+ }
154
+ }
135
155
  if (mode === undefined || childSession)
136
156
  return;
137
157
  const trigger = mode === "lit-handoff" ? "handoff" : mode === "lit-scientific-visualization" ? mode : "lit";
138
158
  const triggerText = nonEmptyTextParts.find((part) => detectChatActivationMode(part.text, agent) === mode)?.text;
139
159
  let activationText = promptForChatActivationMode(mode, triggerText);
160
+ if (mode === "lit-adhd")
161
+ activationText = `${activationText}\n${adhdSessionNote(input.sessionID)}`;
140
162
  if (mode === "start-work" && agent !== "lit-plan" && nonEmptyTextParts.length === 1) {
141
163
  const directive = parseStartWorkLifecycleDirective(nonEmptyTextParts[0].text, { chat: true });
164
+ const planArgument = directive === undefined ? typedStartArgument(nonEmptyTextParts[0].text) : undefined;
165
+ if (planArgument !== undefined) {
166
+ const started = await startTypedWork({
167
+ projectRoot,
168
+ sessionID: input.sessionID,
169
+ ...(planArgument === "" ? {} : { plan: planArgument }),
170
+ ...(options.boundedAuthority === undefined ? {} : { options: options.boundedAuthority })
171
+ });
172
+ if (started.quiet !== true)
173
+ activationText = `${started.text}\n${activationText}`;
174
+ }
142
175
  if (directive?.action === "resume") {
143
176
  try {
144
177
  const receipt = await applyTrustedStartWorkDirective(projectRoot, input.sessionID, directive, options.boundedAuthority);
@@ -165,6 +198,15 @@ export function createChatMessageActivationHook(projectRoot, options = {}) {
165
198
  activationText = `${reentry.line}\n${activationText}`;
166
199
  else if (reentry.kind === "confirm")
167
200
  activationText = `${activationText}\n${reentry.line}`;
201
+ if (options.activationMemory !== undefined &&
202
+ reentry.kind !== "continue" &&
203
+ reentry.kind !== "confirm" &&
204
+ mode !== "lit-handoff" &&
205
+ mode !== "lit-scientific-visualization") {
206
+ const recorded = await recordActivation({ memory: options.activationMemory, projectRoot, sessionID: input.sessionID, mode });
207
+ if (recorded.line !== undefined)
208
+ activationText = `${activationText}\n${recorded.line}`;
209
+ }
168
210
  output.parts.push({
169
211
  id: `prt_litopencode_${markMode.replace("-", "_")}_${idSuffix(input.messageID ?? output.message.id)}`,
170
212
  sessionID: input.sessionID,
@@ -186,9 +228,6 @@ export function createChatMessageActivationHook(projectRoot, options = {}) {
186
228
  return;
187
229
  }
188
230
  await options.onSkillActivation?.(input.sessionID, mode, appendedLit);
189
- if (reentry.kind !== "confirm" && mode !== "lit-handoff" && mode !== "lit-scientific-visualization") {
190
- options.activationMemory?.remember(input.sessionID, mode);
191
- }
192
231
  if (mode === "lit-scientific-visualization") {
193
232
  options.onScientificVisualizationActivation?.(input.sessionID);
194
233
  }
@@ -0,0 +1,51 @@
1
+ import { type ActivationMemory } from "./activation-reentry.ts";
2
+ import type { ChatActivationMode } from "./activation-routing.ts";
3
+ import type { BoundedAuthorityOptions } from "./bounded-authority.ts";
4
+ export declare const adhdNextSchema = "litopencode.adhd-next/v1";
5
+ export declare const adhdNextTtlMs: number;
6
+ export type NextKind = "continue" | "work" | "plan" | "elsewhere";
7
+ export type NextRecord = {
8
+ readonly schema: typeof adhdNextSchema;
9
+ readonly kind: NextKind;
10
+ readonly target: string;
11
+ readonly at: number;
12
+ readonly sessionID: string;
13
+ };
14
+ /** True only when the WHOLE prompt is a go word; a go word inside a sentence or a code span is not one. */
15
+ export declare function detectGoWord(text: string): boolean;
16
+ export declare function nextFile(projectRoot: string, sessionID: string): string;
17
+ export declare function writeNext(projectRoot: string, record: Omit<NextRecord, "schema">): Promise<void>;
18
+ /**
19
+ * Reads and removes the next-step record of THIS session. A record of another session, an older one,
20
+ * a link, an oversized file or malformed JSON is treated as absent; a file that was read is deleted either way.
21
+ */
22
+ export declare function consumeNext(projectRoot: string, sessionID: string, now: number): Promise<NextRecord | undefined>;
23
+ export type GoRoute = {
24
+ readonly text: string;
25
+ readonly mode: ChatActivationMode;
26
+ readonly kind: NextKind;
27
+ };
28
+ /**
29
+ * Turns a live `go` into the existing re-entry or start path. A paused spine returns through the same
30
+ * resume a `lit continue` takes, running work gets the continue note, and one open plan goes through the typed
31
+ * start-work path. A pending boundary is never answered here: only `lit approve` or `lit deny` can.
32
+ */
33
+ export declare function routeGo(input: {
34
+ readonly projectRoot: string;
35
+ readonly sessionID: string;
36
+ readonly text: string;
37
+ readonly memory?: ActivationMemory;
38
+ readonly boundedAuthority?: BoundedAuthorityOptions;
39
+ readonly now?: number;
40
+ }): Promise<GoRoute | undefined>;
41
+ export type TypedPromptReply = {
42
+ readonly text: string;
43
+ readonly mode: ChatActivationMode;
44
+ readonly kind: "approve" | "deny" | NextKind;
45
+ readonly continued: boolean;
46
+ };
47
+ /**
48
+ * The whole-prompt typed words of a ROOT user session: `lit approve`, `lit deny` and a live `go`.
49
+ * Callers pass only prompts that came from the user in a root session; anything else never reaches here.
50
+ */
51
+ export declare function typedPromptReply(projectRoot: string, sessionID: string, text: string, memory: ActivationMemory | undefined, boundedAuthority: BoundedAuthorityOptions | undefined): Promise<TypedPromptReply | undefined>;
@@ -0,0 +1,150 @@
1
+ import { constants as fsConstants } from "node:fs";
2
+ import fs from "node:fs/promises";
3
+ import path from "node:path";
4
+ import { createActivationMemory, decideReentry } from "./activation-reentry.js";
5
+ import { startWorkPromptInjection } from "./activation-workflow-prompts.js";
6
+ import { answerBoundary, boundaryVerdict, startTypedWork } from "./start-work-typed.js";
7
+ import { createRuntimePaths } from "./state.js";
8
+ // The brief from lit-adhd ends with one recommended next step and the word `go`. The collector writes that
9
+ // step as a small record for ONE session; a bare `go` only means something while that record is alive.
10
+ // Without it `go`, `고` and `진행` are ordinary words and nothing routes.
11
+ export const adhdNextSchema = "litopencode.adhd-next/v1";
12
+ export const adhdNextTtlMs = 30 * 60_000;
13
+ const safeSessionID = /^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/u;
14
+ const recordByteLimit = 4096;
15
+ const goWord = /^(?:lit\s+go|go|ㄱㄱ|고|진행)[.!?。]*$/iu;
16
+ /** True only when the WHOLE prompt is a go word; a go word inside a sentence or a code span is not one. */
17
+ export function detectGoWord(text) {
18
+ return goWord.test(text.trim());
19
+ }
20
+ export function nextFile(projectRoot, sessionID) {
21
+ if (!safeSessionID.test(sessionID))
22
+ throw new Error("next-step session id must match [A-Za-z0-9_-]");
23
+ return path.join(createRuntimePaths(projectRoot).adhdDir, `next-${sessionID}.json`);
24
+ }
25
+ function isNextRecord(value) {
26
+ if (typeof value !== "object" || value === null)
27
+ return false;
28
+ const record = value;
29
+ return (record.schema === adhdNextSchema &&
30
+ (record.kind === "continue" || record.kind === "work" || record.kind === "plan" || record.kind === "elsewhere") &&
31
+ typeof record.target === "string" &&
32
+ record.target.length <= 512 &&
33
+ typeof record.at === "number" &&
34
+ Number.isFinite(record.at) &&
35
+ typeof record.sessionID === "string");
36
+ }
37
+ export async function writeNext(projectRoot, record) {
38
+ const file = nextFile(projectRoot, record.sessionID);
39
+ await fs.mkdir(path.dirname(file), { recursive: true });
40
+ const existing = await fs.lstat(file).catch(() => undefined);
41
+ if (existing !== undefined && !existing.isFile())
42
+ throw new Error("next-step record path is not a regular file");
43
+ const temp = `${file}.${process.pid}.tmp`;
44
+ await fs.writeFile(temp, JSON.stringify({ schema: adhdNextSchema, ...record }), { mode: 0o600, flag: "w" });
45
+ await fs.rename(temp, file);
46
+ }
47
+ /**
48
+ * Reads and removes the next-step record of THIS session. A record of another session, an older one,
49
+ * a link, an oversized file or malformed JSON is treated as absent; a file that was read is deleted either way.
50
+ */
51
+ export async function consumeNext(projectRoot, sessionID, now) {
52
+ let file;
53
+ try {
54
+ file = nextFile(projectRoot, sessionID);
55
+ }
56
+ catch {
57
+ return undefined;
58
+ }
59
+ const stat = await fs.lstat(file).catch(() => undefined);
60
+ if (stat === undefined)
61
+ return undefined;
62
+ if (!stat.isFile() || stat.size > recordByteLimit) {
63
+ if (stat.isFile() || stat.isSymbolicLink())
64
+ await fs.unlink(file).catch(() => undefined);
65
+ return undefined;
66
+ }
67
+ let parsed;
68
+ try {
69
+ const handle = await fs.open(file, fsConstants.O_RDONLY | fsConstants.O_NOFOLLOW);
70
+ try {
71
+ parsed = JSON.parse(await handle.readFile("utf8"));
72
+ }
73
+ finally {
74
+ await handle.close();
75
+ }
76
+ }
77
+ catch {
78
+ parsed = undefined;
79
+ }
80
+ await fs.unlink(file).catch(() => undefined);
81
+ if (!isNextRecord(parsed) || parsed.sessionID !== sessionID)
82
+ return undefined;
83
+ const age = now - parsed.at;
84
+ return age >= 0 && age <= adhdNextTtlMs ? parsed : undefined;
85
+ }
86
+ /**
87
+ * Turns a live `go` into the existing re-entry or start path. A paused spine returns through the same
88
+ * resume a `lit continue` takes, running work gets the continue note, and one open plan goes through the typed
89
+ * start-work path. A pending boundary is never answered here: only `lit approve` or `lit deny` can.
90
+ */
91
+ export async function routeGo(input) {
92
+ if (!detectGoWord(input.text))
93
+ return undefined;
94
+ const now = input.now ?? Date.now();
95
+ const record = await consumeNext(input.projectRoot, input.sessionID, now);
96
+ if (record === undefined)
97
+ return undefined;
98
+ if (record.kind === "continue") {
99
+ const decision = await decideReentry({
100
+ memory: input.memory ?? createActivationMemory(),
101
+ projectRoot: input.projectRoot,
102
+ sessionID: input.sessionID,
103
+ mode: "lit-task",
104
+ text: "lit continue",
105
+ now
106
+ });
107
+ return decision.kind === "continue" ? { text: decision.text, mode: decision.mode, kind: "continue" } : undefined;
108
+ }
109
+ if (record.kind === "elsewhere") {
110
+ // The brief's step belongs to another session or worktree; go here only says where to act.
111
+ return {
112
+ text: `LitOpenCode: the user answered go to the lit-adhd brief, but its next step is outside this session: ${record.target} Say in one line where to open it; do not start that work here.`,
113
+ mode: "lit-adhd",
114
+ kind: "elsewhere"
115
+ };
116
+ }
117
+ if (record.kind === "work") {
118
+ return {
119
+ text: "LitOpenCode: the user answered go to the brief's next step, which is the running start-work run. Keep working from the checked plan; do not restart it, replan or widen what it may touch. A pending boundary still needs `lit approve` from the user.",
120
+ mode: "start-work",
121
+ kind: "work"
122
+ };
123
+ }
124
+ const started = await startTypedWork({
125
+ projectRoot: input.projectRoot,
126
+ sessionID: input.sessionID,
127
+ ...(record.target === "" ? {} : { plan: record.target }),
128
+ ...(input.boundedAuthority === undefined ? {} : { options: input.boundedAuthority })
129
+ });
130
+ return { text: `${started.text}\n${startWorkPromptInjection}`, mode: "start-work", kind: "plan" };
131
+ }
132
+ /**
133
+ * The whole-prompt typed words of a ROOT user session: `lit approve`, `lit deny` and a live `go`.
134
+ * Callers pass only prompts that came from the user in a root session; anything else never reaches here.
135
+ */
136
+ export async function typedPromptReply(projectRoot, sessionID, text, memory, boundedAuthority) {
137
+ const verdict = boundaryVerdict(text);
138
+ if (verdict !== undefined) {
139
+ const reply = await answerBoundary({ projectRoot, sessionID, verdict, ...(boundedAuthority === undefined ? {} : { options: boundedAuthority }) });
140
+ return { text: reply, mode: "start-work", kind: verdict, continued: false };
141
+ }
142
+ const go = await routeGo({
143
+ projectRoot,
144
+ sessionID,
145
+ text,
146
+ ...(memory === undefined ? {} : { memory }),
147
+ ...(boundedAuthority === undefined ? {} : { boundedAuthority })
148
+ });
149
+ return go === undefined ? undefined : { text: go.text, mode: go.mode, kind: go.kind, continued: go.kind !== "plan" && go.kind !== "elsewhere" };
150
+ }
@@ -1,5 +1,5 @@
1
1
  import type { LitOpenCodeRuntimeSkillId } from "../skills.ts";
2
- export type ManagedSkillId = "lit-brainstorm" | "lit-comprehend" | "lit-handoff" | "lit-scientific-visualization" | "lit-diagram-drawer" | "lit-pptx" | "lit-typographic-motion" | "lit-docx" | "readme-studio" | "frontend-ui-ux" | "visual-qa" | "lit-plan" | "browser-drive" | "lit-humanizer" | "autoresearch" | "autoconference" | "wikify";
2
+ export type ManagedSkillId = "lit-brainstorm" | "lit-hijack" | "lit-adhd" | "lit-comprehend" | "lit-handoff" | "lit-scientific-visualization" | "lit-diagram-drawer" | "lit-schematic" | "lit-pptx" | "lit-typographic-motion" | "lit-docx" | "readme-studio" | "frontend-ui-ux" | "visual-qa" | "lit-plan" | "browser-drive" | "lit-humanizer" | "autoresearch" | "autoconference" | "wikify";
3
3
  export type CanonicalManagedAsset = {
4
4
  readonly path: string;
5
5
  readonly sha256: string;
@@ -7,10 +7,13 @@ if (managedSkillManifest.schemaVersion !== 1) {
7
7
  }
8
8
  export function managedSkillDefinition(id) {
9
9
  if (id !== "lit-brainstorm" &&
10
+ id !== "lit-hijack" &&
11
+ id !== "lit-adhd" &&
10
12
  id !== "lit-comprehend" &&
11
13
  id !== "lit-handoff" &&
12
14
  id !== "lit-scientific-visualization" &&
13
15
  id !== "lit-diagram-drawer" &&
16
+ id !== "lit-schematic" &&
14
17
  id !== "lit-pptx" &&
15
18
  id !== "lit-typographic-motion" &&
16
19
  id !== "lit-docx" &&
@@ -94,6 +97,8 @@ const skillDiscoveryDescriptions = Object.freeze({
94
97
  "release-guardrails": "Trigger before any release-shaped action — version bump, tag, publish, changelog, \"is this ready to ship\" — so vocabulary scanning, version lockstep, and a real dry-pack manifest run before the claim is made and publication stays behind explicit user approval.",
95
98
  "lit-init": "Trigger when a repository needs agent-facing guidance created or refreshed: \"set up AGENTS.md\", \"document this repo for agents\", onboarding an unfamiliar codebase, or a restructure that left directory guidance stale and misleading.",
96
99
  "lit-brainstorm": "Trigger when the question is still open and the user wants options before a decision — \"what could we call it\", \"any ideas for\", \"how else could we do this\", \"brainstorm\", \"ideation\", `lit idea`, `lit brainstorm` — so many different options are generated, clustered, scored against stated criteria, and narrowed to a short list with trade-offs before one hand-off to deep-interview or lit-plan. Do not trigger to plan a chosen thing, to interview toward one spec, or to implement.",
100
+ "lit-hijack": "Trigger when the user wants the technique in someone else's published work — an X post or article, a repo, a gist, a blog post, a PDF, a transcript — ported into their own skill or system: \"hijack this\", \"port this technique\", `lit hijack`, `lit 하이재킹` — so it is captured with provenance, licence-gated, compared with the target, written as a source-free spec, built apart, and proven on the real surface. Do not trigger to find sources, to brainstorm options, or to copy source text.",
101
+ "lit-adhd": "Trigger when the user lost the thread or comes back to earlier work — \"where was I\", \"pick up where we left off\", \"what is still open\", several half-finished sessions — via `lit adhd` or `lit rewind`: a read-only brief with one next step that `go` follows.",
97
102
  "lit-crucible": "Trigger before planning when the approach itself is uncertain, contested, or expensive to reverse — competing designs, hidden coupling, a request to pressure-test assumptions or find what will go wrong — so independent read-only lanes attack the idea and only surviving evidence-backed insights reach lit-plan.",
98
103
  refactor: "Trigger when code should change shape without changing behavior: extracting, renaming, deduplicating, splitting an overgrown module, or paying down structure the user calls messy or hard to follow — so the behavior boundary is pinned by before/after checks and feature work is not smuggled into the diff.",
99
104
  "lit-burnoff": "Trigger when text or code reads as machine-written and should not — comments restating the code, hedging filler, decorative headings, invented emphasis — or when the user asks to \"clean this up\", \"make it less AI\", or strip generated padding, while facts, APIs, tests, and accessibility behavior stay intact.",
@@ -114,11 +119,12 @@ const skillDiscoveryDescriptions = Object.freeze({
114
119
  "lit-handoff": "Trigger only for explicit `/lit-handoff`, an exact bare `handoff` message, or native selection by the exact `lit-handoff` id.",
115
120
  "lit-scientific-visualization": "Trigger only for explicit `/lit-scientific-visualization`, an exact bare `lit-scientific-visualization` message, or native selection by the exact `lit-scientific-visualization` id.",
116
121
  "lit-diagram-drawer": "Select this skill from OpenCode's native skill picker when the user needs an architecture map, workflow, schema, decision path, schedule, or conceptual chart. Route product pages and interface layouts to frontend-ui-ux; route measured scientific data and statistical figures to lit-scientific-visualization. Do not claim a slash command or bare-chat route.",
122
+ "lit-schematic": "Select from OpenCode's native skill picker when the reader must see real hardware: a P&ID, PFD or equipment layout, a journal apparatus figure, or an isometric cutaway of a vessel or exchanger; a bounded lit drawing request directs the model to load it. Route abstract boxes-and-arrows to lit-diagram-drawer and measured-data plots to lit-scientific-visualization. Do not claim a slash command or bare-id chat route.",
117
123
  "lit-pptx": "Select for a PowerPoint deck or presentation, including a bounded lit request for slides. Keep editable Markdown and PPTX together, run the QA gate, and inspect the render.",
118
124
  "lit-typographic-motion": "Select for a new film or video. Write the treatment first, then render on the stage path (a captured page) or the type path (words alone), gate it and look at the frames; a README cover loop takes cover mode. Editing existing footage or embedding a video in a page is outside this route.",
119
125
  "lit-docx": "Select for a Word report, proposal, or document, including a bounded lit report request. Keep editable Markdown and DOCX together; select publisher profiles when specified and inspect rendered pages.",
120
126
  "readme-studio": "Select by native skill name for factual README writing and local cover composition. Inspect actual session image capability; never infer generation support or authorize publication from selection.",
121
- "frontend-ui-ux": "Trigger the moment interface work is described, not after it starts — \"design a settings page\", \"redesign the dashboard\", \"build a login screen\", or any making verb aimed at a UI, screen, layout, component, or stylesheet — so compact direction and existing tokens shape the authorized build. Evolve the contract with implementation and inspect renders; review and plan intent remains read-only. Also on the exact `frontend-ui-ux` id. The SKILL.md reference router names which of the sixteen shipped reference documents answers which question.",
127
+ "frontend-ui-ux": "Trigger the moment interface work is described, not after it starts — \"design a settings page\", \"redesign the dashboard\", \"build a login screen\", or any making verb aimed at a UI, screen, layout, component, or stylesheet — so compact direction and existing tokens shape the authorized build. Evolve the contract with implementation and inspect renders; review and plan intent remains read-only. Also on the exact `frontend-ui-ux` id. The SKILL.md reference router names which shipped reference document answers which question. A new page or screen locks one house style, layout family and signature moment first (references/house-styles.md); the look is rich unless the request asks for minimal or calm.",
122
128
  "visual-qa": "Trigger when a rendered surface needs to be checked rather than described — an explicit `visual-qa` request, or verifying that an interface change actually looks and behaves right. Selection does not make a browser callable: the shipped capture playbook names the exact blocked code per unavailable channel, and a blocked check reported honestly outranks an unproven pass.",
123
129
  autoresearch: "Trigger when a measurable objective needs repeated hypothesis, experiment, evaluation, and keep/revert decisions, or when its debug, fix, learn, plan, predict, reason, scenario, security, or readiness modes fit the request.",
124
130
  autoconference: "Trigger when several genuinely independent research lanes should explore partitions and exchange peer-reviewed packets; block rather than role-play when the current root lacks real OpenCode task capability.",
@@ -112,7 +112,7 @@ export async function nativeSkillContent(metadata, skill) {
112
112
  ...description.split("\n").map((line) => " " + line),
113
113
  "metadata:",
114
114
  ` ${litOpenCodeGeneratedFrontmatterMarker.replace(": true", ': "true"')}`,
115
- ...(skill.id === "lit-diagram-drawer" ? [" reader_projection: shared_rule"] : []),
115
+ ...(skill.id === "lit-diagram-drawer" || skill.id === "lit-schematic" ? [" reader_projection: shared_rule"] : []),
116
116
  "---",
117
117
  "",
118
118
  body.trimEnd(),
package/dist/cli.js CHANGED
@@ -81,11 +81,17 @@ function helpText() {
81
81
  "",
82
82
  "Native offline skills:",
83
83
  " frontend-ui-ux provides deterministic design-contract retrieval from a packaged MIT corpus,",
84
- " plus sixteen shipped reference documents routed from its SKILL.md.",
84
+ " plus a locked house-style kit and its shipped reference documents routed from its SKILL.md.",
85
85
  " visual-qa validates evidence, PNGs, terminal layouts, and independent review receipts,",
86
86
  " ships a per-channel capture playbook, and keeps blocked codes separate from fail codes.",
87
87
  " lit-diagram-drawer creates conceptual, editorial, and technical diagrams with packaged type guides,",
88
88
  " local verifiers, bounded importers, and exports that never install tools.",
89
+ " lit-schematic draws P&IDs, PFDs, journal apparatus figures and isometric cutaways of real equipment",
90
+ " with a symbol library, a QA gate, exports and a mandatory look at the render.",
91
+ " lit-hijack ports the mechanism of someone else's published work into your skill or system with a",
92
+ " phase-gate script (hijack.mjs), a licence table, a source-overlap check and a parity proof.",
93
+ " lit-adhd (alias lit-rewind) briefs earlier sessions in this worktree family with real progress only,",
94
+ " a roadmap and one recommended step you follow with go; lit approve and lit deny answer a boundary.",
89
95
  " lit-typographic-motion directs films from a treatment: a captured stage page or the type engine,",
90
96
  " and seamless README cover loops gated on the decoded WebP.",
91
97
  " Typographic-motion engine adapted from mexicat/pdoom-video (MIT, Giacomo Magnanini), commit `ca251e3`.",
@@ -1,7 +1,7 @@
1
1
  import type { Hooks } from "@opencode-ai/plugin";
2
2
  import type { BoundedAuthorityOptions } from "./bounded-authority.ts";
3
3
  import { type AutoHandoffRouteMode } from "./auto-handoff.ts";
4
- export type LitOpenCodeCommandId = "lit" | "lit-loop" | "litwork" | "lit-work" | "start-work" | "review-work" | "lit-plan" | "litgoal" | "lit-goal" | "litresearch" | "lit-research" | "lit-init" | "lit-crucible" | "lit-brainstorm" | "lit-burnoff-file" | "lit-fetch" | "refactor" | "lit-burnoff" | "lit-code" | "debugging" | "lit-commit" | "lsp" | "lsp-setup" | "rules" | "deep-interview" | "structural-search" | "browser-drive" | "lit-recap" | "lit-comprehend" | "lit-handoff" | "lit-scientific-visualization" | "lit-humanizer" | "autoresearch" | "autoresearch-debug" | "autoresearch-fix" | "autoresearch-learn" | "autoresearch-plan" | "autoresearch-predict" | "autoresearch-reason" | "autoresearch-scenario" | "autoresearch-security" | "autoresearch-ship" | "autoconference" | "autoconference-analyze" | "autoconference-debate" | "autoconference-plan" | "autoconference-resume" | "autoconference-ship" | "autoconference-survey" | "wikify-init" | "wikify-ingest" | "wikify-query" | "wikify-save" | "wikify-lint";
4
+ export type LitOpenCodeCommandId = "lit" | "lit-loop" | "litwork" | "lit-work" | "start-work" | "review-work" | "lit-plan" | "litgoal" | "lit-goal" | "litresearch" | "lit-research" | "lit-init" | "lit-crucible" | "lit-brainstorm" | "lit-hijack" | "lit-adhd" | "lit-rewind" | "lit-burnoff-file" | "lit-fetch" | "refactor" | "lit-burnoff" | "lit-code" | "debugging" | "lit-commit" | "lsp" | "lsp-setup" | "rules" | "deep-interview" | "structural-search" | "browser-drive" | "lit-recap" | "lit-comprehend" | "lit-handoff" | "lit-scientific-visualization" | "lit-humanizer" | "autoresearch" | "autoresearch-debug" | "autoresearch-fix" | "autoresearch-learn" | "autoresearch-plan" | "autoresearch-predict" | "autoresearch-reason" | "autoresearch-scenario" | "autoresearch-security" | "autoresearch-ship" | "autoconference" | "autoconference-analyze" | "autoconference-debate" | "autoconference-plan" | "autoconference-resume" | "autoconference-ship" | "autoconference-survey" | "wikify-init" | "wikify-ingest" | "wikify-query" | "wikify-save" | "wikify-lint";
5
5
  export type LitOpenCodeCommand = {
6
6
  readonly id: LitOpenCodeCommandId;
7
7
  readonly slash: string;
@@ -175,6 +175,33 @@ export declare const litOpenCodeCommands: readonly ({
175
175
  activationText: string;
176
176
  agent?: undefined;
177
177
  readOnly?: undefined;
178
+ } | {
179
+ id: "lit-hijack";
180
+ slash: string;
181
+ title: string;
182
+ description: string;
183
+ banner: string;
184
+ activationText: string;
185
+ agent?: undefined;
186
+ readOnly?: undefined;
187
+ } | {
188
+ id: "lit-adhd";
189
+ slash: string;
190
+ title: string;
191
+ description: string;
192
+ banner: string;
193
+ activationText: string;
194
+ agent?: undefined;
195
+ readOnly?: undefined;
196
+ } | {
197
+ id: "lit-rewind";
198
+ slash: string;
199
+ title: string;
200
+ description: string;
201
+ banner: string;
202
+ activationText: string;
203
+ agent?: undefined;
204
+ readOnly?: undefined;
178
205
  } | {
179
206
  id: "refactor";
180
207
  slash: string;
package/dist/commands.js CHANGED
@@ -1,9 +1,10 @@
1
1
  import { activationBanner } from "./activation-probe.js";
2
2
  import { renamedSkillId, skillRenameNote } from "./skill-renames.js";
3
- import { comprehendPromptInjection, debuggingPromptInjection, deepInterviewPromptInjection, gitMasterPromptInjection, lspPromptInjection, lspSetupPromptInjection, rulesPromptInjection, browserDrivePromptInjection, structuralSearchPromptInjection, litGoalPromptInjection, litBrainstormPromptInjection, litCruciblePromptInjection, initDeepPromptInjection, litLoopPromptInjection, litPlanPromptInjection, litRecapPromptInjection, litHandoffPromptInjection, litResearchPromptInjection, litCodePromptInjection, refactorPromptInjection, removeAiSlopsPromptInjection, reviewModeForcedNote, reviewWorkPromptInjection, scientificVisualizationPromptInjection, startWorkPromptInjection, litBurnoffFilePromptInjection, litFetchPromptInjection, litHumanizerPromptInjection } from "./activation.js";
3
+ import { comprehendPromptInjection, debuggingPromptInjection, deepInterviewPromptInjection, gitMasterPromptInjection, lspPromptInjection, lspSetupPromptInjection, rulesPromptInjection, browserDrivePromptInjection, structuralSearchPromptInjection, litGoalPromptInjection, litBrainstormPromptInjection, litHijackPromptInjection, litAdhdPromptInjection, adhdSessionNote, litCruciblePromptInjection, initDeepPromptInjection, litLoopPromptInjection, litPlanPromptInjection, litRecapPromptInjection, litHandoffPromptInjection, litResearchPromptInjection, litCodePromptInjection, refactorPromptInjection, removeAiSlopsPromptInjection, reviewModeForcedNote, reviewWorkPromptInjection, scientificVisualizationPromptInjection, startWorkPromptInjection, litBurnoffFilePromptInjection, litFetchPromptInjection, litHumanizerPromptInjection } from "./activation.js";
4
4
  import { createLitGoalOperations } from "./ledger.js";
5
5
  import { commandAliasOwnership } from "./cli/command-alias-ownership.js";
6
6
  import { applyTrustedStartWorkDirective, parseStartWorkLifecycleDirective } from "./bounded-authority-hooks.js";
7
+ import { startTypedWork, typedStartArgument } from "./start-work-typed.js";
7
8
  import { autoHandoffSettingText } from "./auto-handoff.js";
8
9
  import { formatResolvedPlanNotice, formatSavedPlanNotice, parsePlanSaveArgument, persistApprovedPlan, resolveLatestDurablePlan } from "./durable-plan.js";
9
10
  import { isWorkflowFamilyMode, workflowFamilyCommandDefinitions } from "./workflow-families.js";
@@ -143,6 +144,30 @@ export const litOpenCodeCommands = Object.freeze([
143
144
  banner: activationBanner("lit-brainstorm"),
144
145
  activationText: litBrainstormPromptInjection
145
146
  },
147
+ {
148
+ id: "lit-hijack",
149
+ slash: "/lit-hijack",
150
+ title: "LitOpenCode Lit Hijack",
151
+ description: "Port the mechanism in someone else's published work into your own skill or system: capture with provenance, licence gate, gap, source-free spec, separate build, parity proof and report.",
152
+ banner: activationBanner("lit-hijack"),
153
+ activationText: litHijackPromptInjection
154
+ },
155
+ {
156
+ id: "lit-adhd",
157
+ slash: "/lit-adhd",
158
+ title: "LitOpenCode Lit Adhd",
159
+ description: "Pick up where you left off: a read-only brief of earlier sessions in this worktree family with status, real progress, a roadmap and one recommended next step you follow with go.",
160
+ banner: activationBanner("lit-adhd"),
161
+ activationText: litAdhdPromptInjection
162
+ },
163
+ {
164
+ id: "lit-rewind",
165
+ slash: "/lit-rewind",
166
+ title: "LitOpenCode Lit Rewind",
167
+ description: "Alias for /lit-adhd.",
168
+ banner: activationBanner("lit-rewind"),
169
+ activationText: litAdhdPromptInjection
170
+ },
146
171
  {
147
172
  id: "refactor",
148
173
  slash: "/refactor",
@@ -311,6 +336,10 @@ function commandMode(command) {
311
336
  return "lit-crucible";
312
337
  if (command.id === "lit-brainstorm")
313
338
  return "lit-brainstorm";
339
+ if (command.id === "lit-hijack")
340
+ return "lit-hijack";
341
+ if (command.id === "lit-adhd" || command.id === "lit-rewind")
342
+ return "lit-adhd";
314
343
  if (command.id === "litgoal" || command.id === "lit-goal")
315
344
  return "litgoal";
316
345
  if (command.id === "refactor")
@@ -470,6 +499,7 @@ export function createCommandActivationHook(projectRoot, options = {}) {
470
499
  return;
471
500
  }
472
501
  }
502
+ let typedStartNote;
473
503
  if (command.id === "start-work") {
474
504
  if (/^save-plan(?:\s|$)/u.test(input.arguments.trim())) {
475
505
  const request = parsePlanSaveArgument(input.arguments);
@@ -552,6 +582,19 @@ export function createCommandActivationHook(projectRoot, options = {}) {
552
582
  });
553
583
  return;
554
584
  }
585
+ if (directive === undefined && !lifecycleIntent) {
586
+ const planArgument = typedStartArgument(`start-work ${input.arguments}`.trim());
587
+ if (planArgument !== undefined) {
588
+ const started = await startTypedWork({
589
+ projectRoot,
590
+ sessionID: input.sessionID,
591
+ ...(planArgument === "" ? {} : { plan: planArgument }),
592
+ ...(options.boundedAuthority === undefined ? {} : { options: options.boundedAuthority })
593
+ });
594
+ if (started.quiet !== true)
595
+ typedStartNote = started.text;
596
+ }
597
+ }
555
598
  if (directive !== undefined) {
556
599
  let lifecycleText;
557
600
  try {
@@ -595,6 +638,10 @@ export function createCommandActivationHook(projectRoot, options = {}) {
595
638
  activationText = `${command.activationText}\n\n${formatResolvedPlanNotice(durablePlan)}`;
596
639
  }
597
640
  }
641
+ if (command.id === "lit-adhd" || command.id === "lit-rewind")
642
+ activationText = `${activationText}\n${adhdSessionNote(input.sessionID)}`;
643
+ if (typedStartNote !== undefined)
644
+ activationText = `${typedStartNote}\n${activationText}`;
598
645
  output.parts.push({
599
646
  id: `prt_litopencode_${command.id.replace(/-/g, "_")}_activation`,
600
647
  sessionID: input.sessionID,
@@ -1,5 +1,5 @@
1
1
  export type LitOpenCodeBindingKind = "agent" | "cli" | "command" | "config" | "hook" | "tool";
2
- export type LitOpenCodeFeatureId = "planning-start-work-loop" | "lit-litwork-activation" | "start-work" | "review-work" | "litresearch" | "durable-ledger" | "bounded-authority-lifecycle" | "agent-roster" | "lit-plan" | "reference-benchmark-claims" | "native-goal-verdict" | "doctor-install" | "search-workflow-ideas" | "lit-fetch" | "guardrails" | "lit-init" | "lit-crucible" | "lit-brainstorm" | "refactor" | "lit-burnoff" | "lit-burnoff-file" | "comment-checker" | "lit-code" | "debugging" | "lit-commit" | "lsp" | "lsp-setup" | "rules" | "deep-interview" | "structural-search" | "browser-drive" | "lit-humanizer" | "lit-recap" | "lit-comprehend" | "lit-handoff" | "lit-scientific-visualization" | "lit-diagram-drawer" | "lit-pptx" | "lit-typographic-motion" | "lit-docx" | "readme-studio" | "frontend-ui-ux" | "visual-qa" | "autoresearch" | "autoconference" | "wikify";
2
+ export type LitOpenCodeFeatureId = "planning-start-work-loop" | "lit-litwork-activation" | "start-work" | "review-work" | "litresearch" | "durable-ledger" | "bounded-authority-lifecycle" | "agent-roster" | "lit-plan" | "reference-benchmark-claims" | "native-goal-verdict" | "doctor-install" | "search-workflow-ideas" | "lit-fetch" | "guardrails" | "lit-init" | "lit-crucible" | "lit-brainstorm" | "lit-hijack" | "lit-adhd" | "workflow-stack" | "refactor" | "lit-burnoff" | "lit-burnoff-file" | "comment-checker" | "lit-code" | "debugging" | "lit-commit" | "lsp" | "lsp-setup" | "rules" | "deep-interview" | "structural-search" | "browser-drive" | "lit-humanizer" | "lit-recap" | "lit-comprehend" | "lit-handoff" | "lit-scientific-visualization" | "lit-diagram-drawer" | "lit-schematic" | "lit-pptx" | "lit-typographic-motion" | "lit-docx" | "readme-studio" | "frontend-ui-ux" | "visual-qa" | "autoresearch" | "autoconference" | "wikify";
3
3
  export type LitOpenCodeFeatureBinding = {
4
4
  readonly kind: LitOpenCodeBindingKind;
5
5
  readonly id: string;
@@ -441,6 +441,64 @@ export declare const litOpenCodeFeatures: readonly ({
441
441
  description: string;
442
442
  })[];
443
443
  verification: string[];
444
+ } | {
445
+ id: "lit-hijack";
446
+ title: string;
447
+ summary: string;
448
+ bindings: ({
449
+ kind: "config";
450
+ id: string;
451
+ surface: string;
452
+ description: string;
453
+ } | {
454
+ kind: "command";
455
+ id: string;
456
+ surface: string;
457
+ description: string;
458
+ } | {
459
+ kind: "agent";
460
+ id: string;
461
+ surface: string;
462
+ description: string;
463
+ })[];
464
+ verification: string[];
465
+ } | {
466
+ id: "lit-adhd";
467
+ title: string;
468
+ summary: string;
469
+ bindings: ({
470
+ kind: "config";
471
+ id: string;
472
+ surface: string;
473
+ description: string;
474
+ } | {
475
+ kind: "command";
476
+ id: string;
477
+ surface: string;
478
+ description: string;
479
+ } | {
480
+ kind: "hook";
481
+ id: string;
482
+ surface: string;
483
+ description: string;
484
+ })[];
485
+ verification: string[];
486
+ } | {
487
+ id: "workflow-stack";
488
+ title: string;
489
+ summary: string;
490
+ bindings: ({
491
+ kind: "config";
492
+ id: string;
493
+ surface: string;
494
+ description: string;
495
+ } | {
496
+ kind: "hook";
497
+ id: string;
498
+ surface: string;
499
+ description: string;
500
+ })[];
501
+ verification: string[];
444
502
  } | {
445
503
  id: "refactor";
446
504
  title: string;
@@ -845,6 +903,27 @@ export declare const litOpenCodeFeatures: readonly ({
845
903
  description: string;
846
904
  })[];
847
905
  verification: string[];
906
+ } | {
907
+ id: "lit-schematic";
908
+ title: string;
909
+ summary: string;
910
+ bindings: ({
911
+ kind: "config";
912
+ id: string;
913
+ surface: string;
914
+ description: string;
915
+ } | {
916
+ kind: "hook";
917
+ id: string;
918
+ surface: string;
919
+ description: string;
920
+ } | {
921
+ kind: "cli";
922
+ id: string;
923
+ surface: string;
924
+ description: string;
925
+ })[];
926
+ verification: string[];
848
927
  } | {
849
928
  id: "lit-typographic-motion";
850
929
  title: string;