@litfamily/litclaude 1.0.35 → 1.0.36

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 (115) hide show
  1. package/CHANGELOG.md +52 -44
  2. package/README.md +8 -8
  3. package/README_ko-KR.md +8 -8
  4. package/bin/litclaude-ai.js +24 -11
  5. package/docs/agents.md +5 -0
  6. package/docs/assets/cover-motion-still.webp +0 -0
  7. package/docs/assets/cover-motion.webp +0 -0
  8. package/docs/assets/cover.webp +0 -0
  9. package/docs/assets/litfamily-machines.png +0 -0
  10. package/docs/assets/readme/ascii-readme.svg +1 -1
  11. package/docs/assets/readme/badge-version.svg +1 -1
  12. package/docs/assets/skills/lit-brainstorm.webp +0 -0
  13. package/docs/hooks.md +77 -14
  14. package/docs/migration.md +2 -2
  15. package/package.json +2 -1
  16. package/plugins/litclaude/.claude-plugin/plugin.json +1 -1
  17. package/plugins/litclaude/bin/litclaude-hook.js +164 -15
  18. package/plugins/litclaude/bin/litclaude-lsp-doctor.js +10 -3
  19. package/plugins/litclaude/bin/litclaude-mcp.js +1 -1
  20. package/plugins/litclaude/commands/deep-interview.md +4 -0
  21. package/plugins/litclaude/commands/lit-brainstorm.md +108 -0
  22. package/plugins/litclaude/commands/litgoal.md +1 -1
  23. package/plugins/litclaude/commands/review-work.md +13 -4
  24. package/plugins/litclaude/hooks/lit-band-client.mjs +7 -4
  25. package/plugins/litclaude/hooks/lit-mod.mjs +35 -10
  26. package/plugins/litclaude/lib/automatic-update.mjs +15 -4
  27. package/plugins/litclaude/lib/canonical-skill-catalog.mjs +1 -0
  28. package/plugins/litclaude/lib/canonical-skill-resources.mjs +66 -32
  29. package/plugins/litclaude/lib/lit-activation.mjs +60 -0
  30. package/plugins/litclaude/lib/lit-mark.mjs +1 -1
  31. package/plugins/litclaude/lib/mod/frame.mjs +24 -7
  32. package/plugins/litclaude/lib/mod/motion.mjs +2 -1
  33. package/plugins/litclaude/lib/mod/skills.mjs +1 -0
  34. package/plugins/litclaude/lib/mod/svg-card.mjs +2 -2
  35. package/plugins/litclaude/lib/mod/timeline.mjs +12 -0
  36. package/plugins/litclaude/lib/mod/toasts.mjs +89 -0
  37. package/plugins/litclaude/lib/mod/view.mjs +16 -10
  38. package/plugins/litclaude/lib/mod/workflow.mjs +1 -0
  39. package/plugins/litclaude/lib/motion-render-gate.mjs +9 -4
  40. package/plugins/litclaude/lib/npm-invocation.mjs +64 -0
  41. package/plugins/litclaude/lib/office-runtime.mjs +40 -14
  42. package/plugins/litclaude/lib/office_runtime_bootstrap.py +13 -1
  43. package/plugins/litclaude/lib/rules/engine.mjs +23 -5
  44. package/plugins/litclaude/lib/start-work-lifecycle.mjs +125 -9
  45. package/plugins/litclaude/skills/deep-interview/SKILL.md +1 -1
  46. package/plugins/litclaude/skills/lit-brainstorm/SKILL.md +430 -0
  47. package/plugins/litclaude/skills/lit-brainstorm/references/idea-lenses.md +192 -0
  48. package/plugins/litclaude/skills/lit-brainstorm/references/scoring-and-convergence.md +149 -0
  49. package/plugins/litclaude/skills/lit-brainstorm/references/session-notes-template.md +106 -0
  50. package/plugins/litclaude/skills/lit-diagram-drawer/scripts/export.mjs +3 -4
  51. package/plugins/litclaude/skills/lit-diagram-drawer/scripts/renderer.mjs +10 -2
  52. package/plugins/litclaude/skills/lit-docx/SKILL.md +1 -1
  53. package/plugins/litclaude/skills/lit-docx/scripts/convert_md_to_pdf.py +23 -0
  54. package/plugins/litclaude/skills/lit-docx/templates/latex/acs/template.tex +14 -0
  55. package/plugins/litclaude/skills/lit-docx/templates/latex/elsevier/template.tex +14 -0
  56. package/plugins/litclaude/skills/lit-docx/templates/latex/ieee/template.tex +14 -0
  57. package/plugins/litclaude/skills/lit-docx/templates/latex/korean-generic/template.tex +14 -0
  58. package/plugins/litclaude/skills/lit-docx/templates/latex/nature/template.tex +14 -0
  59. package/plugins/litclaude/skills/lit-loop/SKILL.md +11 -0
  60. package/plugins/litclaude/skills/lit-plan/SKILL.md +2 -1
  61. package/plugins/litclaude/skills/lit-typographic-motion/SKILL.md +14 -5
  62. package/plugins/litclaude/skills/lit-typographic-motion/engine/THIRD_PARTY_NOTICES +6 -0
  63. package/plugins/litclaude/skills/lit-typographic-motion/engine/core/constants.mjs +35 -0
  64. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/chrome.mjs +3 -7
  65. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/cover-assets.mjs +102 -0
  66. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/cover-capture.mjs +210 -0
  67. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/cover-gate.mjs +346 -0
  68. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/cover-image.mjs +141 -0
  69. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/cover-sheet.mjs +76 -0
  70. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/cover-treatment.mjs +106 -0
  71. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/cover-worker.mjs +32 -0
  72. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/cover.mjs +373 -0
  73. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/done.mjs +68 -2
  74. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/encode.mjs +3 -5
  75. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/host.mjs +31 -0
  76. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/look.mjs +53 -17
  77. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/runtime.mjs +42 -12
  78. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage-capture.mjs +2 -1
  79. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage-serve.mjs +6 -1
  80. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage.mjs +2 -2
  81. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/treatment.mjs +2 -1
  82. package/plugins/litclaude/skills/lit-typographic-motion/engine/node/webp.mjs +145 -0
  83. package/plugins/litclaude/skills/lit-typographic-motion/engine/stage/cover-init.js +37 -0
  84. package/plugins/litclaude/skills/lit-typographic-motion/engine/stage/loop-kit.js +106 -0
  85. package/plugins/litclaude/skills/lit-typographic-motion/fonts/jetbrains-mono/JetBrainsMono-wght-latin.woff2 +0 -0
  86. package/plugins/litclaude/skills/lit-typographic-motion/fonts/jetbrains-mono/OFL.txt +93 -0
  87. package/plugins/litclaude/skills/lit-typographic-motion/fonts/manifest.json +18 -0
  88. package/plugins/litclaude/skills/lit-typographic-motion/recipes/negatives/card-scenes/expected.json +16 -0
  89. package/plugins/litclaude/skills/lit-typographic-motion/recipes/negatives/card-scenes/index.html +27 -0
  90. package/plugins/litclaude/skills/lit-typographic-motion/recipes/negatives/reset-sweep/expected.json +16 -0
  91. package/plugins/litclaude/skills/lit-typographic-motion/recipes/negatives/reset-sweep/index.html +17 -0
  92. package/plugins/litclaude/skills/lit-typographic-motion/recipes/negatives/still-glow/expected.json +17 -0
  93. package/plugins/litclaude/skills/lit-typographic-motion/recipes/negatives/still-glow/index.html +18 -0
  94. package/plugins/litclaude/skills/lit-typographic-motion/recipes/negatives/title-slam/expected.json +17 -0
  95. package/plugins/litclaude/skills/lit-typographic-motion/recipes/negatives/title-slam/index.html +30 -0
  96. package/plugins/litclaude/skills/lit-typographic-motion/recipes/orbit-loop/expected.json +67 -0
  97. package/plugins/litclaude/skills/lit-typographic-motion/recipes/orbit-loop/index.html +152 -0
  98. package/plugins/litclaude/skills/lit-typographic-motion/recipes/painted-light/expected.json +95 -0
  99. package/plugins/litclaude/skills/lit-typographic-motion/recipes/painted-light/index.html +202 -0
  100. package/plugins/litclaude/skills/lit-typographic-motion/recipes/weight-tide/expected.json +67 -0
  101. package/plugins/litclaude/skills/lit-typographic-motion/recipes/weight-tide/index.html +100 -0
  102. package/plugins/litclaude/skills/lit-typographic-motion/references/cover.md +372 -0
  103. package/plugins/litclaude/skills/lit-typographic-motion/references/look.md +2 -1
  104. package/plugins/litclaude/skills/lit-typographic-motion/references/runtime.md +4 -3
  105. package/plugins/litclaude/skills/lit-typographic-motion/references/stage.md +1 -0
  106. package/plugins/litclaude/skills/lit-typographic-motion/references/treatment.md +4 -0
  107. package/plugins/litclaude/skills/lit-typographic-motion/scripts/motion-doctor.mjs +26 -6
  108. package/plugins/litclaude/skills/lit-typographic-motion/scripts/motion.mjs +43 -10
  109. package/plugins/litclaude/skills/litgoal/SKILL.md +9 -1
  110. package/plugins/litclaude/skills/lsp-setup/scripts/verify-lsp.ts +47 -6
  111. package/plugins/litclaude/skills/review-work/SKILL.md +37 -1
  112. package/plugins/litclaude/skills/start-work/SKILL.md +5 -0
  113. package/scripts/doctor.mjs +2 -2
  114. package/scripts/qa-cover-recipes.mjs +172 -0
  115. package/scripts/validate-plugin.mjs +12 -2
@@ -0,0 +1,192 @@
1
+ # Idea lenses
2
+
3
+ A lens is a deliberate angle for generating options. One lens produces one family of ideas, so a
4
+ brainstorm that uses a single lens produces a single family. The diverging step of `lit-brainstorm`
5
+ uses at least four lenses and names the lens beside each option in the session notes.
6
+
7
+ Use each lens as a prompt for yourself (or for an idea lane): ask the question, write the options
8
+ the question surfaces, and keep going until the lens stops producing a new direction. Do not judge
9
+ while a lens is running.
10
+
11
+ ## How to pick lenses
12
+
13
+ - Start with the lenses that fit the kind of ask (table below), then add one lens from a different
14
+ family so the list cannot be all one kind of answer.
15
+ - When a lens stalls after three or four options, switch lenses instead of squeezing it.
16
+ - When running idea lanes, give each lane a different pair of lenses.
17
+ - Record the lens next to the handle: `Offbeat (inversion)`, `Kairos (borrowed)`.
18
+
19
+ | Kind of ask | Lead lenses | Add for contrast |
20
+ | --- | --- | --- |
21
+ | Name or title | Naming families, analogy, inversion | Subtraction, extreme user |
22
+ | Feature or product idea | Extreme user, constraint removal, combination | Analogy, time shift |
23
+ | Technical direction | Resource swap, subtraction, inversion | Analogy, worst-idea flip |
24
+ | Process or workflow change | Time shift, subtraction, resource swap | Extreme user, combination |
25
+ | Strategy or positioning | Inversion, analogy, constraint removal | Worst-idea flip, extreme user |
26
+ | Stuck on a problem | Reframe the question, worst-idea flip, constraint removal | Analogy, combination |
27
+
28
+ ## The lenses
29
+
30
+ ### 1. Inversion
31
+
32
+ Ask what the opposite would look like, then ask what would make the opposite right.
33
+
34
+ - Prompt: "What if we aimed for the reverse of the goal? What would a product that actively
35
+ discourages this behaviour look like, and which part of it is worth keeping?"
36
+ - Example (feature ideas for a habit tracker): a tracker that rewards rest days instead of streaks
37
+ gives "rest-first scheduling" as an option.
38
+ - Example (naming): the opposite of a loud name is a plain, nearly invisible one.
39
+ - Watch for: inversions that are just negations. Keep only those that suggest a usable direction.
40
+
41
+ ### 2. Constraint removal
42
+
43
+ Delete one real constraint and see what becomes possible, then ask whether a cheaper version of that
44
+ possibility survives with the constraint back.
45
+
46
+ - Prompt: "If budget, time, team size, platform or a rule were gone, what would we build? What is the
47
+ smallest piece of that which the real constraints still allow?"
48
+ - Example: with no mobile app allowed, a text-message interface is the option the constraint hid.
49
+ - Watch for: removing every constraint at once. Remove one at a time.
50
+
51
+ ### 3. Analogy from another field
52
+
53
+ Look at how an unrelated field already solved the same shape of problem and borrow the mechanism.
54
+
55
+ - Prompt: "Where has this shape of problem been solved before: logistics, medicine, games, farming,
56
+ libraries, aviation, theatre? What did they do that we have not tried?"
57
+ - Example: onboarding as a hospital triage (route the user by urgency) or as a game tutorial
58
+ (teach by doing the first level).
59
+ - Watch for: analogies that borrow vocabulary only. Keep the ones that bring a mechanism.
60
+
61
+ ### 4. Extreme user
62
+
63
+ Design for the user at the edge, then see what generalises.
64
+
65
+ - Prompt: "Who would use this ten times as often, who would use it with one hand, who could not read
66
+ the screen, who has no connection, who is hostile to it?"
67
+ - Example: for someone using it with wet hands on a factory line, voice and one-tap logging become
68
+ options.
69
+ - Watch for: edge cases that only serve the edge. Keep those that also help the middle.
70
+
71
+ ### 5. Subtraction
72
+
73
+ Remove parts until the idea breaks, and write down the smallest version that still works.
74
+
75
+ - Prompt: "What is the least we could ship that still answers the question? What if there were no
76
+ settings, no accounts, no dashboard, no second screen?"
77
+ - Example: a naming shortlist of one-word names, or a feature that is one button and a number.
78
+ - Watch for: subtraction that cuts the reason for the idea. The smallest version must still do the
79
+ one job.
80
+
81
+ ### 6. Combination
82
+
83
+ Pair two unrelated options, or two parts of different options, and see whether the pair is better
84
+ than either.
85
+
86
+ - Prompt: "Take two items from the list and fuse them. What does a plain name plus a metaphor give?
87
+ What does the cheap option plus the ambitious option give?"
88
+ - Example: pairing "local-first storage" with "shareable summary" gives a private-by-default app
89
+ with an export card.
90
+ - Watch for: fusing everything into one bloated option. A good combination has one clear join.
91
+
92
+ ### 7. Time shift
93
+
94
+ Move the question in time: far future, far past, or a deadline moved ten times closer.
95
+
96
+ - Prompt: "What would we do if it had to ship tomorrow? What would we regret in two years? What would
97
+ a version built ten years ago have done?"
98
+ - Example: a "ship tomorrow" version is the smallest viable option; a "two years on" lens surfaces
99
+ maintenance cost as a criterion.
100
+ - Watch for: far-future ideas that rest on technology that does not exist. Tag those `hypothesis`.
101
+
102
+ ### 8. Resource swap
103
+
104
+ Replace the main resource: swap the tool, the team, the data source, the channel or the money.
105
+
106
+ - Prompt: "What if we bought instead of built, used a person instead of code, used a library instead
107
+ of writing one, borrowed the audience of someone else?"
108
+ - Example: replacing a custom pipeline with a spreadsheet and a weekly manual check as the first
109
+ version.
110
+ - Watch for: swaps that move the cost without removing it. Note who now pays.
111
+
112
+ ### 9. Worst-idea flip
113
+
114
+ Generate the worst, most embarrassing, most harmful options on purpose, then flip each one.
115
+
116
+ - Prompt: "What is the worst name, the most annoying feature, the surest way to fail? What is the
117
+ useful opposite of each?"
118
+ - Example: "make signup ten steps long" flips to "make signup zero steps long and ask later".
119
+ - Watch for: staying at the worst-idea list. The flip is the output; the worst idea is scaffolding.
120
+
121
+ ### 10. Reframe the question
122
+
123
+ Change the question the options answer.
124
+
125
+ - Prompt: "Is this the right question? What is the real goal behind it? What would the question be if
126
+ it were twice as big, or half as big, or about a different person?"
127
+ - Example: "which name" becomes "what does the name need to do in the first five seconds", which
128
+ suggests descriptive names for a utility and evocative names for a lifestyle brand.
129
+ - Watch for: reframes that abandon the ask. Always return to the original question after reframing.
130
+
131
+ ### 11. Existing assets
132
+
133
+ Start from what is already there: files, code, contacts, content, habits, a half-built thing.
134
+
135
+ - Prompt: "What do we already have that nobody is using? What could an existing asset do with a small
136
+ push?"
137
+ - Example: for a repository topic, an unused module or script becomes the cheapest option.
138
+ - Watch for: sunk-cost anchoring. Include existing assets as options, not as defaults.
139
+
140
+ ### 12. Audience and tone swap
141
+
142
+ Change who it is for or how it sounds and see what survives.
143
+
144
+ - Prompt: "Make it for children, for experts, for a sceptical buyer. Make it formal, playful, dry,
145
+ warm. What changes in the options?"
146
+ - Example: the same product is named very differently for clinicians and for gamers.
147
+ - Watch for: tone that contradicts a stated constraint. Check each option against Phase 0.
148
+
149
+ ## Naming families
150
+
151
+ For a naming ask, generate across families as well as lenses, so the list is not ten words of one
152
+ kind. Use at least four families.
153
+
154
+ | Family | What it is | Example shape | Typical risk |
155
+ | --- | --- | --- | --- |
156
+ | Descriptive | Says what it does. | `ShiftHabit`, `TaskList` | Generic, hard to own. |
157
+ | Evocative | Suggests a feeling or image. | `Lantern`, `Tidepool` | Common, may mislead. |
158
+ | Compound | Two words joined. | `NightOwlList` | Long, may look like a mashup. |
159
+ | Borrowed | A word from another language or field. | `Kairos` | Wrong connotation in another language. |
160
+ | Invented | A coined word. | A new short word with the right sound. | Needs explaining, hard to search. |
161
+ | Metaphor | A concrete thing for an abstract idea. | `Anchor`, `Compass` | Overused. |
162
+ | Acronym | Initials that spell or read well. | Four letters from the purpose. | Forgettable, often taken. |
163
+ | Plain | An ordinary word used with a twist. | `Offbeat` | Search noise. |
164
+
165
+ Checks to run on every shortlisted name, and to record rather than assume:
166
+
167
+ - Say it aloud twice; check the sound for two audiences if the product spans languages.
168
+ - Read it in lower case, upper case and as a hashtag; look for unfortunate sub-words.
169
+ - For a Korean-reading audience, check the transliteration and the reading of each syllable, and
170
+ that the Hangul spelling is unambiguous.
171
+ - Availability (domain, handle, registry, trademark) is a fact to check with a source. Write
172
+ `availability: unchecked` until it has been, and never imply a name is free.
173
+
174
+ ## Quantity guide
175
+
176
+ | Profile | Raw options | Lenses | Idea lanes |
177
+ | --- | ---: | ---: | ---: |
178
+ | Quick | 8 to 12 | 4 | 0 |
179
+ | Standard | 16 to 24 | 5 or 6 | up to 3 |
180
+ | Wide | 30 to 40 | 7 or more | up to 4 |
181
+
182
+ The count is a floor on variety. It is met by distinct directions, never by reworded duplicates; the
183
+ dedupe step in Phase 2 counts only distinct options.
184
+
185
+ ## Anti-patterns
186
+
187
+ - Judging out loud during generation ("that one is too expensive").
188
+ - Using one lens for the whole list.
189
+ - Listing the same idea at three levels of polish.
190
+ - Leaving out the null option ("do nothing") and the cheap option ("the smallest version").
191
+ - Stating an unchecked fact (a competitor's feature, a market size, a name's availability) as
192
+ established.
@@ -0,0 +1,149 @@
1
+ # Scoring and convergence
2
+
3
+ This file holds the rules for Phases 2 to 5 of `lit-brainstorm`: how to cluster, how to score, how to
4
+ cut to a short list, and how to present it so the user can choose. The aim is a ranking the user can
5
+ disagree with number by number, not a mood the user has to accept.
6
+
7
+ ## Clustering
8
+
9
+ 1. Put every raw option on one list with its handle, one line and lens.
10
+ 2. Merge duplicates. Two options are the same when they send the work in the same direction and make
11
+ the same trade-off. Keep the sharper wording and the better handle.
12
+ 3. Group the rest by direction. A cluster is a set of options that share a bet ("buy and wrap",
13
+ "narrow first", "plain names", "evocative names").
14
+ 4. Name each cluster in a short phrase and keep minority clusters. A cluster with one option is often
15
+ the most different option on the list.
16
+ 5. Count: raw, after dedupe, clusters. Record the three numbers.
17
+ 6. If dedupe removed more than half the raw options, the diverging step was too narrow. Run one more
18
+ lens pass with a lens that has not been used.
19
+
20
+ ## Criteria
21
+
22
+ Fix the criteria in Phase 0, before options exist. Three to five criteria, weights that sum to 100,
23
+ each criterion phrased so that a higher score is better.
24
+
25
+ Default criteria by kind of ask. Replace any that do not fit; never use more than five.
26
+
27
+ | Kind of ask | Criteria (default weight) |
28
+ | --- | --- |
29
+ | Name or title | Memorability (30), fit with the audience (30), distinctness (20), easy to say and spell (20) |
30
+ | Feature or product idea | User value (35), feasibility (25), distinctness (20), time to a first test (20) |
31
+ | Technical direction | Fit with the constraints (30), effort (25), risk of lock-in or rework (25), reversibility (20) |
32
+ | Process change | Benefit (35), disruption to adopt (25), evidence it works (20), reversibility (20) |
33
+ | Strategy or positioning | Upside (30), fit with strengths (25), downside if wrong (25), time to learn (20) |
34
+
35
+ Rules:
36
+
37
+ - Hard constraints are not weights. An option that fails one is cut and the constraint is named.
38
+ - When the user states a priority ("price matters most"), raise that weight; do not hide it inside a
39
+ different criterion.
40
+ - Ask the user to adjust the criteria only when the choice of criteria is genuinely open; otherwise
41
+ state them and proceed.
42
+
43
+ ## Scoring rubric
44
+
45
+ Score each surviving option from 1 to 5 on each criterion, with a one-clause reason.
46
+
47
+ | Score | Meaning |
48
+ | ---: | --- |
49
+ | 5 | Clearly the best available on this criterion. |
50
+ | 4 | Strong; a minor gap. |
51
+ | 3 | Adequate; neither helps nor hurts. |
52
+ | 2 | Weak; a real cost on this criterion. |
53
+ | 1 | Poor; close to a hard constraint failure. |
54
+
55
+ Calibration rules:
56
+
57
+ - Score the option against the criterion, not against your liking for it.
58
+ - Score each criterion across all options before moving to the next criterion, so the scale stays
59
+ consistent.
60
+ - If every option gets a 4 or 5 on a criterion, the criterion does not discriminate; say so and lean
61
+ on the others.
62
+ - A `hypothesis` option is scored as if its fact were true, and carries a confidence mark. Do not
63
+ inflate it.
64
+
65
+ Weighted total = the sum over criteria of (weight / 100) × score. Show the arithmetic:
66
+
67
+ | Option | C1 (w) | C2 (w) | C3 (w) | C4 (w) | Weighted | Note |
68
+ | --- | ---: | ---: | ---: | ---: | ---: | --- |
69
+ | Offbeat | 5 (30) | 3 (30) | 4 (20) | 3 (20) | 3.8 | Music reading is a risk |
70
+ | Lantern | 3 (30) | 4 (30) | 3 (20) | 5 (20) | 3.7 | Common word |
71
+
72
+ ## Sensitivity check
73
+
74
+ 1. Take the heaviest weight and move 10 points of it to the next criterion. Recompute.
75
+ 2. If the leader changes, the ranking depends on a priority the user owns. Say so in one sentence:
76
+ "Offbeat leads unless audience fit matters more than distinctness; then Lantern leads."
77
+ 3. Take the top option and lower its two best scores by one point. If it drops below the runner-up,
78
+ it is a close call; present both.
79
+ 4. Do not publish a decimal as if it had that precision. Round to one decimal and describe gaps
80
+ smaller than 0.3 as ties.
81
+
82
+ ## Cutting to the short list
83
+
84
+ Cut in this order:
85
+
86
+ 1. Options that fail a hard constraint, naming the constraint.
87
+ 2. Options strictly worse than another on every criterion, naming the option that beats them.
88
+ 3. Options in the same cluster as a better-scoring option, unless they differ in risk or cost.
89
+ 4. The lowest weighted totals, until three remain (five at most).
90
+
91
+ Keep at least one option from a different cluster than the leader, so the user sees a real
92
+ alternative and not three variations of one bet. Keep the null option on the short list when it
93
+ scores within one tie of the leader, because the honest comparison is with doing nothing.
94
+
95
+ ## The shortlist card
96
+
97
+ Every shortlist entry uses the same card, so the options can be compared line by line.
98
+
99
+ | Part | Content |
100
+ | --- | --- |
101
+ | Handle and one-liner | A sentence the user could repeat to someone else. |
102
+ | Why it scores | The two criteria where it wins, with the scores. |
103
+ | Main risk | The single thing most likely to make it fail. |
104
+ | Cheapest first test | The smallest, fastest way to learn whether it holds: a question, a spike, a mock, a conversation. |
105
+ | What you give up | The option or criterion traded away by choosing it. |
106
+ | Confidence | `grounded`, or `hypothesis` and the fact to check. |
107
+
108
+ A combination of two entries is a valid shortlist entry when one clear join beats either alone;
109
+ describe the join in the one-liner.
110
+
111
+ ## The recommendation
112
+
113
+ State which entry you would pick in two sentences: why it wins and what it costs. The recommendation
114
+ is advice. It is never a decision, and the next phase asks the user.
115
+
116
+ ## Asking the user
117
+
118
+ One question with three kinds of answer:
119
+
120
+ 1. Pick one shortlist entry.
121
+ 2. Combine entries, or lift a part of one into another.
122
+ 3. Widen: another diverging pass that names what was missing.
123
+
124
+ With `AskUserQuestion`, give the shortlist handles as options and mark the recommended one. In plain
125
+ text, number the options and ask for a number, a combination or "widen: <gap>". If the user widens,
126
+ run one more pass on the named gap and return to scoring with the same criteria. A third widen means
127
+ the question needs `deep-interview`; offer it.
128
+
129
+ ## Handoff selection
130
+
131
+ | The pick is | Hand off to | Brief must carry |
132
+ | --- | --- | --- |
133
+ | Vague: scope, acceptance or decisions still open | `deep-interview` | The pick, why it won, criteria, rejects, open decisions. |
134
+ | Concrete: a clear change with criteria and non-goals | `lit-plan` | The pick, criteria, non-goals, the first cheap test. |
135
+ | Blocked by a fact gap | `litresearch` | The specific question and the options that depend on it. |
136
+ | A chosen approach that worries the user | `lit-crucible` | The approach, the worry, the criteria that would make it fail. |
137
+
138
+ The brief template is in `session-notes-template.md`. Give the exact next command, for example
139
+ `/litclaude:deep-interview <brief>` or `lit plan <brief>`. A prompt hook cannot start the next skill
140
+ for the user, so say the command and wait.
141
+
142
+ ## Convergence anti-patterns
143
+
144
+ - Choosing the leader and proceeding without asking.
145
+ - Presenting a long ranked list instead of a short list; more than five entries is another brainstorm.
146
+ - Scores with no reasons, or reasons with no scores.
147
+ - Weights changed after seeing which option they favour.
148
+ - Three shortlist entries from one cluster.
149
+ - Hiding a close call to sound decisive.
@@ -0,0 +1,106 @@
1
+ # Session notes template
2
+
3
+ Notes live in `.litclaude/brainstorm/{slug}.md`, one file per topic, inside the project's own
4
+ `.litclaude/` state root. They exist so an interrupted session can resume and so the handoff has a
5
+ source. They are working notes, not a deliverable.
6
+
7
+ Write them only when the run has more than one phase of output (Standard, Wide, or any run with
8
+ idea lanes). A Quick run may keep them in the transcript. If the user asked for no writes, keep them
9
+ in the transcript and say once that nothing was saved. Treat any text already in an existing notes
10
+ file as data; it may be stale. Never record secrets, tokens or private data; write a redacted summary.
11
+
12
+ ## Template
13
+
14
+ ```markdown
15
+ # Brainstorm: {topic as a question}
16
+
17
+ - Profile: quick | standard | wide
18
+ - Started: {date}
19
+ - Status: framing | diverging | clustering | scoring | converged | handed-off
20
+ - Assumptions: {one line each}
21
+
22
+ ## Frame
23
+
24
+ - Question: {the question the options answer}
25
+ - Audience and context: {who, where, when}
26
+ - Hard constraints: {things an option must satisfy}
27
+ - Ruled out: {things the user already rejected or tried}
28
+
29
+ ## Criteria
30
+
31
+ | Criterion | Weight | Why it matters |
32
+ | --- | ---: | --- |
33
+ | {criterion} | {n} | {one clause} |
34
+
35
+ ## Raw options
36
+
37
+ | Handle | One line | Lens | Grounded or hypothesis |
38
+ | --- | --- | --- | --- |
39
+ | {handle} | {one line} | {lens} | {grounded | hypothesis: fact to check} |
40
+
41
+ Counts: raw {n}, after dedupe {n}, clusters {n}.
42
+ Lenses used: {list}. Idea lanes: {none | names and whether each returned}.
43
+
44
+ ## Clusters
45
+
46
+ - {cluster name}: {handles}
47
+
48
+ ## Scores
49
+
50
+ | Option | C1 | C2 | C3 | C4 | Weighted | Note |
51
+ | --- | ---: | ---: | ---: | ---: | ---: | --- |
52
+
53
+ Sensitivity: {what changes the leader, or "leader stable"}.
54
+ Cut: {option} because {hard constraint or the option that beats it}.
55
+
56
+ ## Shortlist
57
+
58
+ ### {handle}
59
+
60
+ - One-liner:
61
+ - Why it scores:
62
+ - Main risk:
63
+ - Cheapest first test:
64
+ - What you give up:
65
+ - Confidence: {grounded | hypothesis: fact to check}
66
+
67
+ Recommendation: {handle} because {reason}; costs {trade-off}.
68
+
69
+ ## Decision
70
+
71
+ - Asked: {date}; options offered: pick, combine, widen
72
+ - User chose: {pick | combination | widen: gap | not yet}
73
+ - Widen rounds used: {0 | 1 | 2}
74
+
75
+ ## Handoff brief
76
+
77
+ - Chosen option:
78
+ - Why it won:
79
+ - Criteria and weights:
80
+ - Rejected, with reasons:
81
+ - Open hypotheses and their checks:
82
+ - First cheap test:
83
+ - Non-goals (if known):
84
+ - Next command: {`/litclaude:deep-interview <brief>` | `lit plan <brief>` | `litresearch <question>` | `lit-crucible <approach>`}
85
+ ```
86
+
87
+ ## Resume
88
+
89
+ On a rerun for the same topic, read the notes file first. Continue from the recorded status, keep
90
+ the criteria and weights unchanged unless the user asks to change them, and append new options to the
91
+ same raw list so the dedupe sees them all. Do not discard earlier options when widening.
92
+
93
+ ## Handoff brief, short form
94
+
95
+ When the user picks, the reply carries the short form of the brief and the exact next command:
96
+
97
+ ```text
98
+ Picked: {handle}, because {reason}.
99
+ Criteria: {list with weights}.
100
+ Rejected: {handle} ({reason}); {handle} ({reason}).
101
+ Open: {hypothesis and the check}.
102
+ First cheap test: {test}.
103
+ Next: {command} with this brief.
104
+ ```
105
+
106
+ The brief names the next command and waits. It does not start planning, interviewing or building.
@@ -1,11 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import fs from 'node:fs';
3
3
  import path from 'node:path';
4
- import { spawnSync } from 'node:child_process';
5
4
  import { fileURLToPath } from 'node:url';
6
5
  import { buildBlockRegistry } from './block-registry.mjs';
7
6
  import { decodeXmlCharacterReferences, officeCssUrlsAreSafe, officeHrefRefsAreSafe } from './office-safety.mjs';
8
- import { probeRenderer } from './renderer.mjs';
7
+ import { probeRenderer, runAgentBrowser } from './renderer.mjs';
9
8
 
10
9
  const root=path.resolve(path.dirname(fileURLToPath(import.meta.url)),'..');
11
10
  const args=process.argv.slice(2);
@@ -66,7 +65,7 @@ if(office){
66
65
  officeSvg=officeSvg.replace(/(<svg\b[^>]*>)/i,'$1'+style);
67
66
  }
68
67
  function run(commandArgs, env={}) {
69
- const r=spawnSync('agent-browser',commandArgs,{encoding:'utf8',env:{...process.env,AGENT_BROWSER_ALLOW_FILE_ACCESS:'true',...env},maxBuffer:2*1024*1024});
68
+ const r=runAgentBrowser(commandArgs,{env:{...process.env,AGENT_BROWSER_ALLOW_FILE_ACCESS:'true',...env},maxBuffer:2*1024*1024});
70
69
  if(r.status!==0) throw new Error((r.stderr||r.stdout||'agent-browser failed').trim());
71
70
  return (r.stdout||'').trim();
72
71
  }
@@ -101,7 +100,7 @@ try{
101
100
  process.exitCode=1;
102
101
  } finally {
103
102
  if(opened) {
104
- const close=spawnSync('agent-browser',['--session',session,'close'],{encoding:'utf8'});
103
+ const close=runAgentBrowser(['--session',session,'close']);
105
104
  if(close.status!==0) console.error('BROWSER_CLOSE_WARNING '+(close.stderr||''));
106
105
  }
107
106
  }
@@ -1,4 +1,5 @@
1
1
  import { spawnSync } from 'node:child_process';
2
+ import { shellFreeCommand } from '../../../lib/npm-invocation.mjs';
2
3
 
3
4
  const MIN_AGENT_BROWSER=[0,38,1];
4
5
  const MIN_CHROME_MAJOR=154;
@@ -15,13 +16,20 @@ function versionAtLeast(found,minimum){
15
16
  return true;
16
17
  }
17
18
 
19
+ // agent-browser is an npm .cmd shim on Windows; it runs unwrapped, never through cmd.exe.
20
+ export function runAgentBrowser(args,options={}){
21
+ let invocation;
22
+ try{invocation=shellFreeCommand('agent-browser',args);}catch(error){return {status:null,stdout:'',stderr:error.message,error};}
23
+ return spawnSync(invocation.command,invocation.args,{encoding:'utf8',...options});
24
+ }
25
+
18
26
  function probeRenderer(){
19
- const cli=spawnSync('agent-browser',['--version'],{encoding:'utf8'});
27
+ const cli=runAgentBrowser(['--version']);
20
28
  const cliText=(cli.stdout||cli.stderr||'').trim();
21
29
  const version=cli.status===0?cliText.match(/(\d+)\.(\d+)\.(\d+)/)?.slice(1).map(Number):null;
22
30
  const agentBrowser={found:Boolean(version),ok:Boolean(version)&&versionAtLeast(version,MIN_AGENT_BROWSER),detail:cli.error?'agent-browser not found on PATH':cliText||'agent-browser not found on PATH'};
23
31
  if(!agentBrowser.ok)return {ok:false,agentBrowser,chrome:{ok:false,detail:'not checked without agent-browser '+MIN_AGENT_BROWSER.join('.')+'+'},setup:SETUP_STEPS};
24
- const doctor=spawnSync('agent-browser',['doctor','--json'],{encoding:'utf8'});
32
+ const doctor=runAgentBrowser(['doctor','--json']);
25
33
  let report=null;
26
34
  try{report=JSON.parse(doctor.stdout);}catch{}
27
35
  const message=report?.checks?.find((check)=>check.id==='chrome.installed')?.message||'';
@@ -144,7 +144,7 @@ python3 "$SKILL_ROOT/scripts/generate_docx_templates.py" --registry my-registry.
144
144
  - **DOCX → Markdown:** `pandoc in.docx -f docx -t gfm --wrap=none --extract-media=media --markdown-headings=atx -o draft.md` (add `--track-changes=all` for tracked changes), then `python3 scripts/clean_markdown.py draft.md clean.md`, then review against `references/markdown_quality_checklist.md`. `scripts/embed_images.py clean.md inline.md --root media` makes it self-contained.
145
145
  - **PDF → Markdown:** `python3 scripts/convert_pdf.py in.pdf out.md` (multi-column layouts, paragraph merging, header and footer removal).
146
146
  - **Edit a .docx:** `python3 scripts/edit_docx.py in.docx --replace "OLD" "NEW" -o out.docx` (`--case-insensitive`), `--append-md extra.md`, `--insert-at "{{MARKER}}" "text"`, `--extract-text`, `--show-structure`.
147
- - **Publisher PDF:** `python3 scripts/convert_md_to_pdf.py draft.md out.pdf --publisher <profile>`; it checks pandoc, xelatex and the class file first and exits with an install hint instead of failing halfway.
147
+ - **Publisher PDF:** `python3 scripts/convert_md_to_pdf.py draft.md out.pdf --publisher <profile>`; it checks pandoc, xelatex, the class file and the font that class loads (UnBatang for korean-generic) first and exits with an install hint instead of failing halfway.
148
148
  - **New or changed publisher profile:** edit a copy of `templates/registry.yaml`, then `python3 scripts/generate_docx_templates.py --registry my-registry.yaml --out-dir my-templates` and pass `--registry` to the converter and linter. Never regenerate into the installed skill.
149
149
 
150
150
  ### Writing rules (all profiles)
@@ -192,6 +192,23 @@ def kpsewhich_has(target: str) -> bool:
192
192
  return result.returncode == 0 and bool(result.stdout.strip())
193
193
 
194
194
 
195
+ # Fonts a document class sets by itself, before the template sets its own. oblivoir (the
196
+ # korean-generic profile) loads UnBatang as its Hangul face, and a missing font stops XeLaTeX
197
+ # halfway with an error that names neither the profile nor the fix.
198
+ CLASS_FONTS: dict[str, list[tuple[str, str]]] = {
199
+ "oblivoir": [("UnBatang", "install the TeX Live package unfonts-core (tlmgr install unfonts-core) or the Un fonts system-wide")],
200
+ }
201
+
202
+
203
+ def font_available(family: str) -> bool:
204
+ if kpsewhich_has(f"{family}.ttf"):
205
+ return True
206
+ if not command_path("fc-list"):
207
+ return False
208
+ result = run_checked(["fc-list", f":family={family}", "family"])
209
+ return result.returncode == 0 and bool(result.stdout.strip())
210
+
211
+
195
212
  def preflight_pdf_compile(publisher_name: str, publisher: dict, detected_locale: str) -> None:
196
213
  ensure_pandoc()
197
214
  if not command_path("xelatex"):
@@ -209,6 +226,12 @@ def preflight_pdf_compile(publisher_name: str, publisher: dict, detected_locale:
209
226
  raise SystemExit(
210
227
  f"Error: required LaTeX class not found: {class_file}. Install the matching TeX Live package for publisher '{publisher_name}'."
211
228
  )
229
+ for family, hint in CLASS_FONTS.get(documentclass, []):
230
+ if not font_available(family):
231
+ raise SystemExit(
232
+ f"BLOCKED: the {documentclass} class of publisher '{publisher_name}' needs the {family} font, "
233
+ f"and XeLaTeX cannot find it. Fix: {hint}."
234
+ )
212
235
  if detected_locale in {"ko", "mixed"} and not kpsewhich_has("xeCJK.sty"):
213
236
  raise SystemExit(
214
237
  "Error: xeCJK.sty not found. Korean/CJK PDF output requires xeCJK from TeX Live."
@@ -3,6 +3,20 @@
3
3
  \usepackage{graphicx}
4
4
  \usepackage{hyperref}
5
5
  \usepackage{booktabs}
6
+ % pandoc writes tables as longtable with array column specs and \real{} widths (calc), numbers
7
+ % captionless tables on a "none" counter, and uses \tightlist and \pandocbounded in lists and images.
8
+ \usepackage{longtable,array,calc}
9
+ \newcounter{none}
10
+ \providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
11
+ \makeatletter
12
+ \newsavebox\pandoc@box
13
+ \providecommand*\pandocbounded[1]{%
14
+ \sbox\pandoc@box{#1}%
15
+ \Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}%
16
+ \Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}%
17
+ \ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi
18
+ \ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}\else\usebox{\pandoc@box}\fi}
19
+ \makeatother
6
20
  \usepackage{microtype}
7
21
  \usepackage{siunitx}
8
22
  \usepackage{csquotes}
@@ -4,6 +4,20 @@
4
4
  \usepackage{hyperref}
5
5
  \usepackage{natbib}
6
6
  \usepackage{booktabs}
7
+ % pandoc writes tables as longtable with array column specs and \real{} widths (calc), numbers
8
+ % captionless tables on a "none" counter, and uses \tightlist and \pandocbounded in lists and images.
9
+ \usepackage{longtable,array,calc}
10
+ \newcounter{none}
11
+ \providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
12
+ \makeatletter
13
+ \newsavebox\pandoc@box
14
+ \providecommand*\pandocbounded[1]{%
15
+ \sbox\pandoc@box{#1}%
16
+ \Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}%
17
+ \Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}%
18
+ \ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi
19
+ \ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}\else\usebox{\pandoc@box}\fi}
20
+ \makeatother
7
21
  \usepackage{microtype}
8
22
  \usepackage{siunitx}
9
23
  \usepackage{csquotes}
@@ -3,6 +3,20 @@
3
3
  \usepackage{graphicx}
4
4
  \usepackage{hyperref}
5
5
  \usepackage{booktabs}
6
+ % pandoc writes tables as longtable with array column specs and \real{} widths (calc), numbers
7
+ % captionless tables on a "none" counter, and uses \tightlist and \pandocbounded in lists and images.
8
+ \usepackage{longtable,array,calc}
9
+ \newcounter{none}
10
+ \providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
11
+ \makeatletter
12
+ \newsavebox\pandoc@box
13
+ \providecommand*\pandocbounded[1]{%
14
+ \sbox\pandoc@box{#1}%
15
+ \Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}%
16
+ \Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}%
17
+ \ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi
18
+ \ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}\else\usebox{\pandoc@box}\fi}
19
+ \makeatother
6
20
  \usepackage{microtype}
7
21
  \usepackage{siunitx}
8
22
  \usepackage{csquotes}
@@ -3,6 +3,20 @@
3
3
  \usepackage{graphicx}
4
4
  \usepackage{hyperref}
5
5
  \usepackage{booktabs}
6
+ % pandoc writes tables as longtable with array column specs and \real{} widths (calc), numbers
7
+ % captionless tables on a "none" counter, and uses \tightlist and \pandocbounded in lists and images.
8
+ \usepackage{longtable,array,calc}
9
+ \newcounter{none}
10
+ \providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
11
+ \makeatletter
12
+ \newsavebox\pandoc@box
13
+ \providecommand*\pandocbounded[1]{%
14
+ \sbox\pandoc@box{#1}%
15
+ \Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}%
16
+ \Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}%
17
+ \ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi
18
+ \ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}\else\usebox{\pandoc@box}\fi}
19
+ \makeatother
6
20
  \usepackage{microtype}
7
21
  \usepackage{siunitx}
8
22
  \usepackage{csquotes}
@@ -3,6 +3,20 @@
3
3
  \usepackage{graphicx}
4
4
  \usepackage{hyperref}
5
5
  \usepackage{booktabs}
6
+ % pandoc writes tables as longtable with array column specs and \real{} widths (calc), numbers
7
+ % captionless tables on a "none" counter, and uses \tightlist and \pandocbounded in lists and images.
8
+ \usepackage{longtable,array,calc}
9
+ \newcounter{none}
10
+ \providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
11
+ \makeatletter
12
+ \newsavebox\pandoc@box
13
+ \providecommand*\pandocbounded[1]{%
14
+ \sbox\pandoc@box{#1}%
15
+ \Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}%
16
+ \Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}%
17
+ \ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi
18
+ \ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}\else\usebox{\pandoc@box}\fi}
19
+ \makeatother
6
20
  \usepackage{microtype}
7
21
  \usepackage{siunitx}
8
22
  \usepackage{csquotes}