@litfamily/litclaude 1.0.19 → 1.0.21

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 (101) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +14 -8
  3. package/README_ko-KR.md +13 -8
  4. package/docs/assets/readme/badge-version.svg +1 -1
  5. package/docs/hooks.md +3 -2
  6. package/package.json +1 -1
  7. package/plugins/litclaude/.claude-plugin/plugin.json +1 -1
  8. package/plugins/litclaude/bin/litclaude-hook.js +4 -4
  9. package/plugins/litclaude/bin/litclaude-mcp.js +1 -1
  10. package/plugins/litclaude/lib/canonical-skill-resources.mjs +91 -31
  11. package/plugins/litclaude/skills/frontend-ui-ux/ATTRIBUTION.md +3 -6
  12. package/plugins/litclaude/skills/lit-docx/SKILL.md +50 -19
  13. package/plugins/litclaude/skills/lit-docx/references/components.md +207 -0
  14. package/plugins/litclaude/skills/lit-docx/references/direction-step.md +277 -0
  15. package/plugins/litclaude/skills/lit-docx/references/examples/01-report-ko.md +166 -0
  16. package/plugins/litclaude/skills/lit-docx/references/examples/02-brief-ko.md +105 -0
  17. package/plugins/litclaude/skills/lit-docx/references/examples/03-manual-ko.md +164 -0
  18. package/plugins/litclaude/skills/lit-docx/references/examples/04-proposal-ko.md +138 -0
  19. package/plugins/litclaude/skills/lit-docx/references/examples/05-memo-en.md +55 -0
  20. package/plugins/litclaude/skills/lit-docx/references/examples/06-journal-en.md +130 -0
  21. package/plugins/litclaude/skills/lit-docx/references/examples/07-report-en.md +123 -0
  22. package/plugins/litclaude/skills/lit-docx/references/examples/08-proposal-en.md +123 -0
  23. package/plugins/litclaude/skills/lit-docx/references/examples/09-memo-ko.md +45 -0
  24. package/plugins/litclaude/skills/lit-docx/references/page-composition.md +221 -0
  25. package/plugins/litclaude/skills/lit-docx/references/tonalities/brief.md +143 -0
  26. package/plugins/litclaude/skills/lit-docx/references/tonalities/journal.md +142 -0
  27. package/plugins/litclaude/skills/lit-docx/references/tonalities/manual.md +148 -0
  28. package/plugins/litclaude/skills/lit-docx/references/tonalities/memo.md +137 -0
  29. package/plugins/litclaude/skills/lit-docx/references/tonalities/proposal.md +140 -0
  30. package/plugins/litclaude/skills/lit-docx/references/tonalities/report.md +156 -0
  31. package/plugins/litclaude/skills/lit-docx/scripts/convert_md_to_docx.py +274 -73
  32. package/plugins/litclaude/skills/lit-docx/scripts/docx_design.py +2449 -0
  33. package/plugins/litclaude/skills/lit-docx/scripts/docx_layout.py +959 -0
  34. package/plugins/litclaude/skills/lit-docx/scripts/qa_docx.py +66 -9
  35. package/plugins/litclaude/skills/lit-docx/scripts/slop_lint.py +18 -6
  36. package/plugins/litclaude/skills/lit-docx/templates/tonalities/brief.yaml +28 -0
  37. package/plugins/litclaude/skills/lit-docx/templates/tonalities/journal.yaml +25 -0
  38. package/plugins/litclaude/skills/lit-docx/templates/tonalities/manual.yaml +26 -0
  39. package/plugins/litclaude/skills/lit-docx/templates/tonalities/memo.yaml +26 -0
  40. package/plugins/litclaude/skills/lit-docx/templates/tonalities/proposal.yaml +26 -0
  41. package/plugins/litclaude/skills/lit-docx/templates/tonalities/report.yaml +26 -0
  42. package/plugins/litclaude/skills/lit-pptx/SKILL.md +105 -48
  43. package/plugins/litclaude/skills/lit-pptx/references/agents/analyst.md +1 -1
  44. package/plugins/litclaude/skills/lit-pptx/references/agents/thesis.md +1 -1
  45. package/plugins/litclaude/skills/lit-pptx/references/anti-slop-checklist.md +59 -30
  46. package/plugins/litclaude/skills/lit-pptx/references/authoring-guide.md +119 -42
  47. package/plugins/litclaude/skills/lit-pptx/references/consensus-protocol.md +1 -1
  48. package/plugins/litclaude/skills/lit-pptx/references/data-display-cookbook.md +13 -6
  49. package/plugins/litclaude/skills/lit-pptx/references/density-and-fill.md +164 -0
  50. package/plugins/litclaude/skills/lit-pptx/references/design-system-azure.md +7 -4
  51. package/plugins/litclaude/skills/lit-pptx/references/direction-step.md +186 -0
  52. package/plugins/litclaude/skills/lit-pptx/references/examples/01-pitch-signal-ko.md +210 -0
  53. package/plugins/litclaude/skills/lit-pptx/references/examples/02-pitch-studio-ko.md +147 -0
  54. package/plugins/litclaude/skills/lit-pptx/references/examples/03-business-review-ledger-ko.md +199 -0
  55. package/plugins/litclaude/skills/lit-pptx/references/examples/04-business-review-night-en.md +203 -0
  56. package/plugins/litclaude/skills/lit-pptx/references/examples/05-research-talk-paper-en.md +179 -0
  57. package/plugins/litclaude/skills/lit-pptx/references/examples/06-lecture-chalk-ko.md +199 -0
  58. package/plugins/litclaude/skills/lit-pptx/references/examples/07-data-review-night-en.md +194 -0
  59. package/plugins/litclaude/skills/lit-pptx/references/examples/08-image-led-atlas-ko.md +175 -0
  60. package/plugins/litclaude/skills/lit-pptx/references/examples/09-briefing-gazette-ko.md +204 -0
  61. package/plugins/litclaude/skills/lit-pptx/references/examples/10-status-update-ledger-ko.md +179 -0
  62. package/plugins/litclaude/skills/lit-pptx/references/examples/11-portfolio-studio-en.md +164 -0
  63. package/plugins/litclaude/skills/lit-pptx/references/examples/12-research-tutorial-chalk-en.md +174 -0
  64. package/plugins/litclaude/skills/lit-pptx/references/interview-protocol.md +1 -1
  65. package/plugins/litclaude/skills/lit-pptx/references/layout-families.md +198 -0
  66. package/plugins/litclaude/skills/lit-pptx/references/stages/autopilot.md +1 -1
  67. package/plugins/litclaude/skills/lit-pptx/references/stages/interview.md +2 -2
  68. package/plugins/litclaude/skills/lit-pptx/references/stages/plan.md +1 -1
  69. package/plugins/litclaude/skills/lit-pptx/references/title-treatments.md +109 -0
  70. package/plugins/litclaude/skills/lit-pptx/references/tonalities/atlas.md +139 -0
  71. package/plugins/litclaude/skills/lit-pptx/references/tonalities/chalk.md +148 -0
  72. package/plugins/litclaude/skills/lit-pptx/references/tonalities/gazette.md +149 -0
  73. package/plugins/litclaude/skills/lit-pptx/references/tonalities/ledger.md +149 -0
  74. package/plugins/litclaude/skills/lit-pptx/references/tonalities/night.md +147 -0
  75. package/plugins/litclaude/skills/lit-pptx/references/tonalities/paper.md +151 -0
  76. package/plugins/litclaude/skills/lit-pptx/references/tonalities/signal.md +150 -0
  77. package/plugins/litclaude/skills/lit-pptx/references/tonalities/studio.md +132 -0
  78. package/plugins/litclaude/skills/lit-pptx/scripts/compile-deck.js +64 -16
  79. package/plugins/litclaude/skills/lit-pptx/scripts/craft_extras.py +664 -3
  80. package/plugins/litclaude/skills/lit-pptx/scripts/deck_craft.py +48 -6
  81. package/plugins/litclaude/skills/lit-pptx/scripts/lib/grid-resolver.js +521 -0
  82. package/plugins/litclaude/skills/lit-pptx/scripts/lib/layout-resolver.js +362 -11
  83. package/plugins/litclaude/skills/lit-pptx/scripts/lib/markdown-loader.js +6 -4
  84. package/plugins/litclaude/skills/lit-pptx/scripts/lib/render-adapter-pptx.js +211 -65
  85. package/plugins/litclaude/skills/lit-pptx/scripts/lib/render-pack.js +3559 -0
  86. package/plugins/litclaude/skills/lit-pptx/scripts/lib/slide-ast.js +10 -6
  87. package/plugins/litclaude/skills/lit-pptx/scripts/lib/template-registry.js +286 -1
  88. package/plugins/litclaude/skills/lit-pptx/scripts/qa_deck.py +39 -10
  89. package/plugins/litclaude/skills/lit-pptx/scripts/validate_pptx.py +22 -7
  90. package/plugins/litclaude/skills/lit-pptx/templates/enrolled/AZURE-A2Z/layout-mapping.yaml +1 -1
  91. package/plugins/litclaude/skills/lit-pptx/templates/enrolled/AZURE-A2Z/template.yaml +4 -1
  92. package/plugins/litclaude/skills/lit-pptx/templates/enrolled/AZURE-PRO/layout-mapping.yaml +1 -1
  93. package/plugins/litclaude/skills/lit-pptx/templates/enrolled/AZURE-PRO/template.yaml +4 -1
  94. package/plugins/litclaude/skills/lit-pptx/templates/tonalities/atlas/pack.yaml +92 -0
  95. package/plugins/litclaude/skills/lit-pptx/templates/tonalities/chalk/pack.yaml +97 -0
  96. package/plugins/litclaude/skills/lit-pptx/templates/tonalities/gazette/pack.yaml +93 -0
  97. package/plugins/litclaude/skills/lit-pptx/templates/tonalities/ledger/pack.yaml +94 -0
  98. package/plugins/litclaude/skills/lit-pptx/templates/tonalities/night/pack.yaml +93 -0
  99. package/plugins/litclaude/skills/lit-pptx/templates/tonalities/paper/pack.yaml +98 -0
  100. package/plugins/litclaude/skills/lit-pptx/templates/tonalities/signal/pack.yaml +94 -0
  101. package/plugins/litclaude/skills/lit-pptx/templates/tonalities/studio/pack.yaml +92 -0
@@ -143,11 +143,23 @@ async function resolveAndRender(ast, templateName, outputs, options = {}) {
143
143
  throw new Error("layout-resolver module not available. Cannot resolve layouts.");
144
144
  }
145
145
 
146
- const templateObj = templateRegistry.loadTemplate(templateName);
146
+ // A tonality (flag or frontmatter) is a design direction read from a pack; without one the named
147
+ // template loads as a legacy pack and keeps its own look.
148
+ const meta = (ast.deck && ast.deck.metadata) || {};
149
+ const tonality = options.tonality || meta.tonality || null;
150
+ const templateObj = tonality
151
+ ? templateRegistry.loadTonality(tonality, { density: meta.density, variance: meta.variance, canvas: meta.canvas, faces: options.faces || meta.faces })
152
+ : templateRegistry.loadTemplate(templateName);
153
+ if (tonality) {
154
+ const d = templateObj.pack.dials;
155
+ console.log(`Tonality ${templateObj.pack.id} · density ${d.density} · variance ${d.variance} · ${d.canvas} ${templateObj.pack.grid.name} grid` +
156
+ (templateName && templateName !== tonality ? ` (template ${templateName} not used)` : ""));
157
+ }
158
+ const can = (capability) => templateRegistry.hasCapability(templateObj, capability);
147
159
 
148
- // Font override (azure-style templates): swap the whole font system regardless
149
- // of which template was chosen. Applied before accent (independent of colour).
150
- if (options.font && templateObj.template && templateObj.template.render_style === "azure") {
160
+ // Font override (templates with the font-swap capability): swap the whole font system
161
+ // regardless of which template was chosen. Applied before accent (independent of colour).
162
+ if (options.font && can("font-swap")) {
151
163
  const { applyFont, KEYS } = require("./lib/font-map");
152
164
  if (KEYS.includes(options.font)) {
153
165
  applyFont(templateObj, options.font);
@@ -158,10 +170,10 @@ async function resolveAndRender(ast, templateName, outputs, options = {}) {
158
170
  const resolved = layoutResolver.resolve(ast, templateObj);
159
171
  if (options.sourceDir) resolved.sourceDir = options.sourceDir;
160
172
 
161
- // Custom accent recolor (azure-style templates only): derive a WCAG-safe
173
+ // Custom accent recolor (templates with the recolor capability): derive a WCAG-safe
162
174
  // palette from the accent hex, override template tokens + hardcoded decoration
163
175
  // colors, and regenerate the gradient circle PNGs in the new hue.
164
- if (options.accent && templateObj.template && templateObj.template.render_style === "azure") {
176
+ if (options.accent && can("recolor")) {
165
177
  const { derivePalette, defaultToDerivedMap } = require("./lib/derive-palette");
166
178
  const { genGradientAssets } = require("./lib/gen-gradient-assets");
167
179
  const os = require("os");
@@ -199,11 +211,11 @@ async function resolveAndRender(ast, templateName, outputs, options = {}) {
199
211
  console.log(`Accent ${options.accent} → primary ${derived.primary} (white-contrast ${derived._ratios.whiteOnPrimary}:1)`);
200
212
  }
201
213
 
202
- // Blurred gradient-mesh background (azure-style): ambient wash on cover/closing/
214
+ // Blurred gradient-mesh background (mesh-background capability): ambient wash on cover/closing/
203
215
  // content (light) and a deep textured wash on section dividers (dark). Uses the
204
216
  // ACTIVE palette (so it respects --accent). The dark mesh sits ABOVE the base
205
217
  // section fill rect, so qa_deck still resolves the (dark) fill behind white text.
206
- if (options.bg === "mesh" && templateObj.template && templateObj.template.render_style === "azure") {
218
+ if (options.bg === "mesh" && can("mesh-background")) {
207
219
  const { genMeshBg } = require("./lib/gen-bg");
208
220
  const os = require("os");
209
221
  const dims = templateObj.template.dimensions || {};
@@ -277,8 +289,36 @@ if (require.main === module) {
277
289
  }
278
290
  process.exit(0);
279
291
  }
292
+ if (args[0] === "--list-tonalities") {
293
+ const reg = require("./lib/template-registry");
294
+ for (const id of reg.listTonalities()) {
295
+ const p = reg.loadPack(id);
296
+ console.log(`${id} — ${p.intent} [density ${p.density}, variance ${p.variance}; ${p.treatments.join(", ")}]`);
297
+ }
298
+ for (const name of reg.listTemplates()) console.log(`${name} (legacy template)`);
299
+ process.exit(0);
300
+ }
280
301
  if (args[0] === "--list-layouts" && args[1]) {
281
302
  const reg = require("./lib/template-registry");
303
+ if (reg.listTonalities().includes(String(args[1]).toLowerCase())) {
304
+ // A tonality lists its families with the titles each can take there, and its variants.
305
+ const G = require("./lib/grid-resolver");
306
+ const p = reg.loadPack(args[1]);
307
+ console.log(`${p.id} — ${p.intent}`);
308
+ console.log(`treatments: ${p.treatments.join(", ")}`);
309
+ console.log("layout families:");
310
+ for (const f of p["layout-families"]) {
311
+ console.log(` ${f} [${G.familyAllows(f).filter((t) => p.treatments.includes(t)).join(", ")}]`);
312
+ }
313
+ console.log(`covers: ${p.covers.join(", ")}`);
314
+ console.log(`sections: ${p.sections.join(", ")}`);
315
+ console.log(`closings: ${p.closings.join(", ")}`);
316
+ process.exit(0);
317
+ }
318
+ if (!reg.listTemplates().includes(args[1])) {
319
+ console.error(`Unknown tonality or template "${args[1]}". Tonalities: ${reg.listTonalities().join(", ")}; legacy templates: ${reg.listTemplates().join(", ")}`);
320
+ process.exit(1);
321
+ }
282
322
  const t = reg.loadTemplate(args[1]);
283
323
  const layouts = (t.mapping && t.mapping.layouts) || {};
284
324
  const caps = (t.capabilities && t.capabilities.supported_blocks) || {};
@@ -294,10 +334,13 @@ if (require.main === module) {
294
334
  if (args.length === 0) {
295
335
  console.error("Usage:");
296
336
  console.error(" node compile-deck.js --list-templates");
297
- console.error(" node compile-deck.js --list-layouts <template>");
337
+ console.error(" node compile-deck.js --list-tonalities");
338
+ console.error(" node compile-deck.js --list-layouts <template or tonality>");
298
339
  console.error(" node compile-deck.js <input.md> [--ast out.json]");
299
340
  console.error(" node compile-deck.js <input.md> --template <name> --html out.html");
300
341
  console.error(" node compile-deck.js <input.md> --template <name> --pptx out.pptx");
342
+ console.error(" node compile-deck.js <input.md> --tonality <id> --pptx out.pptx (or tonality: in the frontmatter)");
343
+ console.error(" node compile-deck.js <input.md> --tonality <id> --faces a2z --pptx out.pptx (A2Z faces on request; Pretendard by default)");
301
344
  console.error(" node compile-deck.js <input.md> --template <name> --ast out.json --html out.html --pptx out.pptx");
302
345
  console.error(" node compile-deck.js <input.md> --template <name> --export-viz-context ctx.json");
303
346
  process.exit(1);
@@ -309,10 +352,12 @@ if (require.main === module) {
309
352
  let htmlPath = null;
310
353
  let pptxPath = null;
311
354
  let embedFonts = false;
355
+ let facesFlag = null;
312
356
  let accent = null;
313
357
  let font = null;
314
358
  let bg = null;
315
359
  let vizContextPath = null;
360
+ let tonalityFlag = null;
316
361
 
317
362
  for (let i = 1; i < args.length; i++) {
318
363
  if (args[i] === "--embed-fonts") { embedFonts = true; continue; }
@@ -320,6 +365,8 @@ if (require.main === module) {
320
365
  if (args[i] === "--font" && args[i + 1]) { font = args[i + 1]; i++; continue; }
321
366
  if (args[i] === "--bg" && args[i + 1]) { bg = args[i + 1]; i++; continue; }
322
367
  if (args[i] === "--export-viz-context" && args[i + 1]) { vizContextPath = args[i + 1]; i++; continue; }
368
+ if (args[i] === "--tonality" && args[i + 1]) { tonalityFlag = args[i + 1]; i++; continue; }
369
+ if (args[i] === "--faces" && args[i + 1]) { facesFlag = args[i + 1]; i++; continue; }
323
370
  if (args[i] === "--ast" && args[i + 1]) {
324
371
  astPath = args[i + 1];
325
372
  i++;
@@ -335,13 +382,14 @@ if (require.main === module) {
335
382
  }
336
383
  }
337
384
 
338
- // If --html or --pptx is requested, --template is required
339
- if ((htmlPath || pptxPath || vizContextPath) && !templateName) {
340
- console.error("Error: --template is required when using --html, --pptx or --export-viz-context");
385
+ let source = fs.readFileSync(inputPath, "utf-8");
386
+
387
+ // A render needs a design: --template, --tonality, or a tonality: line in the frontmatter.
388
+ const frontTonality = (source.match(/^---[ \t]*\n([\s\S]*?)\n---/) || ["", ""])[1].match(/^tonality:[ \t]*(\S+)/m);
389
+ if ((htmlPath || pptxPath || vizContextPath) && !templateName && !tonalityFlag && !frontTonality) {
390
+ console.error("Error: --template or --tonality (or tonality: in the frontmatter) is required when using --html, --pptx or --export-viz-context");
341
391
  process.exit(1);
342
392
  }
343
-
344
- let source = fs.readFileSync(inputPath, "utf-8");
345
393
  const sourceDir = path.dirname(path.resolve(inputPath));
346
394
 
347
395
  // A `data:` frontmatter key means the numbers live in a CSV/JSON file: the shared
@@ -385,12 +433,12 @@ if (require.main === module) {
385
433
  }
386
434
 
387
435
  // Resolve and render if template + output formats specified
388
- if (templateName && (htmlPath || pptxPath || vizContextPath)) {
436
+ if (htmlPath || pptxPath || vizContextPath) {
389
437
  await resolveAndRender(ast, templateName, {
390
438
  html: htmlPath,
391
439
  pptx: pptxPath,
392
440
  vizContext: vizContextPath,
393
- }, { sourceDir, accent: effectiveAccent, font: effectiveFont, bg: effectiveBg });
441
+ }, { sourceDir, accent: effectiveAccent, font: effectiveFont, bg: effectiveBg, tonality: tonalityFlag, faces: facesFlag });
394
442
 
395
443
  // Optional: embed bundled fonts into the PPTX for a self-contained deck.
396
444
  if (embedFonts && pptxPath) {