@lincyaw/skills 1.0.0-rc.11 → 1.0.0-rc.110

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 (54) hide show
  1. package/README.md +1 -1
  2. package/package.json +4 -4
  3. package/skills/index.json +27 -18
  4. package/skills/presmium-animate/SKILL.md +10 -4
  5. package/skills/presmium-animate/gallery/algorithms/lecture.json +171 -115
  6. package/skills/presmium-animate/gallery/anime/scenes/kmeans-seeded.ts +2 -1
  7. package/skills/presmium-animate/gallery/catalog/paper-figure/scenes/figure-tour.ts +41 -0
  8. package/skills/presmium-animate/gallery/catalog/paper-figure/scenes/figures/demo-figure.py +89 -0
  9. package/skills/presmium-animate/gallery/catalog/paper-figure/scenes/figures/demo.json +282 -0
  10. package/skills/presmium-animate/gallery/catalog/paper-figure/scenes/lib/figure.ts +206 -0
  11. package/skills/presmium-animate/gallery/catalog/paper-figure/scenes/lib/tour.ts +145 -0
  12. package/skills/presmium-animate/gallery/catalog/paper-figure/tools/figure.py +54 -0
  13. package/skills/presmium-animate/gallery/craft/lecture.json +109 -57
  14. package/skills/presmium-animate/gallery/data/lecture.json +1618 -368
  15. package/skills/presmium-animate/gallery/data/scenes/pf/figure-tour.ts +2 -0
  16. package/skills/presmium-animate/gallery/emphasis/lecture.json +321 -79
  17. package/skills/presmium-animate/gallery/films/lecture.json +36 -10
  18. package/skills/presmium-animate/gallery/lengths/lecture.json +23 -88
  19. package/skills/presmium-animate/gallery/lengths/scenes/kit/fx/time.ts +12 -0
  20. package/skills/presmium-animate/gallery/math-ml/lecture.json +238 -159
  21. package/skills/presmium-animate/gallery/paths-3d/lecture.json +74 -64
  22. package/skills/presmium-animate/gallery/product/lecture.json +27 -3
  23. package/skills/presmium-animate/gallery/story/lecture.json +23 -90
  24. package/skills/presmium-animate/gallery/structure/lecture.json +104 -65
  25. package/skills/presmium-animate/gallery/text/lecture.json +115 -63
  26. package/skills/presmium-animate/gallery/timeline/lecture.json +106 -187
  27. package/skills/presmium-animate/gallery/timeline/scenes/bubble.ts +1 -1
  28. package/skills/presmium-animate/gallery/transitions/lecture.json +103 -52
  29. package/skills/presmium-animate/references/acceptance.md +83 -0
  30. package/skills/presmium-animate/references/lengths.md +2 -2
  31. package/skills/presmium-animate/references/libraries.md +22 -11
  32. package/skills/presmium-animate/references/procedural.md +2 -0
  33. package/skills/presmium-animate/references/scenarios.md +1 -0
  34. package/skills/presmium-animate/references/story.md +33 -15
  35. package/skills/presmium-animate/references/storyboards.md +1 -1
  36. package/skills/presmium-animate/references/team.md +177 -0
  37. package/skills/presmium-animate/references/timeline.md +8 -0
  38. package/skills/presmium-author/SKILL.md +77 -19
  39. package/skills/presmium-author/references/assistance.md +77 -6
  40. package/skills/{presmium-present → presmium-author}/references/classroom.md +2 -2
  41. package/skills/presmium-author/references/document.md +3 -1
  42. package/skills/presmium-author/references/lecture.md +146 -0
  43. package/skills/presmium-author/references/publishing.md +144 -15
  44. package/skills/presmium-author/references/writing.md +191 -7
  45. package/skills/presmium-develop/references/plugin.md +7 -3
  46. package/skills/presmium-paper-to-xiaohongshu/SKILL.md +79 -0
  47. package/skills/presmium-paper-to-xiaohongshu/references/publication.md +92 -0
  48. package/src/cli.ts +4 -4
  49. package/src/install.ts +42 -5
  50. package/src/messages.ts +5 -5
  51. package/src/resources.ts +5 -4
  52. package/skills/presmium-present/SKILL.md +0 -35
  53. package/skills/presmium-present/references/delivery.md +0 -122
  54. package/skills/presmium-present/references/lecture.md +0 -74
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @lincyaw/skills
2
2
 
3
- The bundled `presmium-author`, `presmium-animate`, `presmium-present` and `presmium-develop` skills, with their references and animation gallery text. Their authority is the repository’s `.agents/skills`; packaging generates this package’s `skills/` resources and index.
3
+ The bundled `presmium-author`, `presmium-animate`, `presmium-develop` and `presmium-paper-to-xiaohongshu` skills, with their references and animation gallery text. The paper workflow produces a narrated animation, independent cover and brief introduction, continues the configured account's episode numbering and verifies the Xiaohongshu submission. Their authority is the repository’s `.agents/skills`; packaging generates this package’s `skills/` resources and index.
4
4
 
5
5
  `listBundledSkills()` returns names, descriptions and relative file lists. `readBundledSkill({ name, path, offset, limit })` reads at most 12,000 Unicode characters and returns the next offset, package version and file SHA-256. `skillDirectory(name)` supplies a resource base to a host integration. Unsafe paths and unavailable files raise `SkillError` with a stable code.
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lincyaw/skills",
3
- "version": "1.0.0-rc.11",
3
+ "version": "1.0.0-rc.110",
4
4
  "description": "Presmium's bundled authoring, animation, presentation and plugin-development skills for coding agents",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -36,14 +36,14 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "jiti": "^2.7.0",
39
- "@lincyaw/kernel": "1.0.0-rc.11"
39
+ "@lincyaw/kernel": "1.0.0-rc.110"
40
40
  },
41
41
  "presmium": {
42
42
  "skills": [
43
43
  "presmium-author",
44
44
  "presmium-animate",
45
- "presmium-present",
46
- "presmium-develop"
45
+ "presmium-develop",
46
+ "presmium-paper-to-xiaohongshu"
47
47
  ],
48
48
  "generated": [
49
49
  "skills"
package/skills/index.json CHANGED
@@ -1,17 +1,19 @@
1
1
  [
2
2
  {
3
3
  "name": "presmium-author",
4
- "description": "Create and edit a Presmium teaching document: the sole authoritative lecture.json, stable pages and rich-text blocks, steps, narration, assets and component definitions; validate, preview and publish it. 写讲义、改文稿、安排页面、正文、分步与讲稿、检查和构建时使用。",
4
+ "description": "Write, edit, present and produce a Presmium teaching document: the sole lecture.json with its pages, blocks, steps and narration; its reading version (web page, notebook) and presentation version (slides, narrated lecture video); writing style for both; voiceover, captions, classroom, export and publishing. Use it to write or revise a lecture, plan pages, write slide text or narration, check, preview, present, record, generate voiceover or export. 写讲义、改文稿、写正文与幻灯片文字、写讲稿、配音、字幕、放映、上课、导出、发布时使用。",
5
5
  "files": [
6
6
  "SKILL.md",
7
7
  "references/assistance.md",
8
+ "references/classroom.md",
8
9
  "references/code.md",
9
10
  "references/document.md",
11
+ "references/lecture.md",
10
12
  "references/publishing.md",
11
13
  "references/writing.md"
12
14
  ],
13
- "version": "1.0.0-rc.11",
14
- "hash": "3f841d69e55215c71ce44c08a8d5637ed5b6a94be165f9a75283c7df08dbac0c"
15
+ "version": "1.0.0-rc.110",
16
+ "hash": "9777e60fba2711820154b2885bb6a13dd4a68448472c512383165b0277488e6f"
15
17
  },
16
18
  {
17
19
  "name": "presmium-animate",
@@ -98,6 +100,12 @@
98
100
  "gallery/catalog/motion-showcase/scenes/stop-motion.ts",
99
101
  "gallery/catalog/motion-showcase/scenes/surround.ts",
100
102
  "gallery/catalog/motion-showcase/scenes/whiteboard-sketch.ts",
103
+ "gallery/catalog/paper-figure/scenes/figure-tour.ts",
104
+ "gallery/catalog/paper-figure/scenes/figures/demo-figure.py",
105
+ "gallery/catalog/paper-figure/scenes/figures/demo.json",
106
+ "gallery/catalog/paper-figure/scenes/lib/figure.ts",
107
+ "gallery/catalog/paper-figure/scenes/lib/tour.ts",
108
+ "gallery/catalog/paper-figure/tools/figure.py",
101
109
  "gallery/catalog/product-ui/scenes/ai-answer.ts",
102
110
  "gallery/catalog/product-ui/scenes/before-after.ts",
103
111
  "gallery/catalog/product-ui/scenes/chat-thread.ts",
@@ -215,6 +223,7 @@
215
223
  "gallery/data/scenes/motion/bars.ts",
216
224
  "gallery/data/scenes/motion/counter.ts",
217
225
  "gallery/data/scenes/motion/ring.ts",
226
+ "gallery/data/scenes/pf/figure-tour.ts",
218
227
  "gallery/data/scenes/remotion/bar-chart.ts",
219
228
  "gallery/data/scenes/remotion/counter.ts",
220
229
  "gallery/data/scenes/show/stat-gauge.ts",
@@ -527,38 +536,38 @@
527
536
  "gallery/transitions/scenes/motion/wipe.ts",
528
537
  "gallery/transitions/scenes/remotion/series-transition.ts",
529
538
  "gallery/transitions/scenes/remotion/wipe.ts",
539
+ "references/acceptance.md",
530
540
  "references/lengths.md",
531
541
  "references/libraries.md",
532
542
  "references/procedural.md",
533
543
  "references/scenarios.md",
534
544
  "references/story.md",
535
545
  "references/storyboards.md",
546
+ "references/team.md",
536
547
  "references/timeline.md"
537
548
  ],
538
- "version": "1.0.0-rc.11",
539
- "hash": "9e3a9ca95da8c619742adbcfee68112d426a48b442fd375b367e5e5fb3cf5a21"
549
+ "version": "1.0.0-rc.110",
550
+ "hash": "278048c31db270706e3ac00172af8e181b2425eef4e6d635561873f6edf65e08"
540
551
  },
541
552
  {
542
- "name": "presmium-present",
543
- "description": "Present and deliver a Presmium document, run classroom interaction, export or record it, and manage structured narration, real speech synthesis, subtitles and video playback from lecture.json production settings. 放映、上课、导出、录课、配音、字幕与讲授视频时使用。",
553
+ "name": "presmium-develop",
554
+ "description": "Develop and debug Presmium plugins: versioned component definitions, shared React components through @lincyaw/host, static fallbacks, browser and Node services, routes, passes, executors and renderers. Use for a plugin project created by presmium new --type plugin. 开发、调试和真实验证 Presmium 插件时使用。",
544
555
  "files": [
545
556
  "SKILL.md",
546
- "references/classroom.md",
547
- "references/delivery.md",
548
- "references/lecture.md"
557
+ "references/plugin.md",
558
+ "references/testing.md"
549
559
  ],
550
- "version": "1.0.0-rc.11",
551
- "hash": "04a41943c1bb3ef1a13bf9847946b27b16535dd78358e606de2d999730217560"
560
+ "version": "1.0.0-rc.110",
561
+ "hash": "96422f5cef6a97bba23c9c67b7fb0ee491b18f01f789e262ca24b274e7fabaa1"
552
562
  },
553
563
  {
554
- "name": "presmium-develop",
555
- "description": "Develop and debug Presmium plugins: versioned component definitions, shared React components through @lincyaw/host, static fallbacks, browser and Node services, routes, passes, executors and renderers. Use for a plugin project created by presmium new --type plugin. 开发、调试和真实验证 Presmium 插件时使用。",
564
+ "name": "presmium-paper-to-xiaohongshu",
565
+ "description": "Turn paper links into narrated Presmium animations, independent covers and brief introductions, then save drafts, schedule or publish authorized Xiaohongshu posts with continuing episode numbers. Use for the configured paper-sharing workflow or an explicit paper-to-Xiaohongshu request; research-only links do not authorize posting. 论文链接制作动画、配音、封面与简介,支持批量草稿、定时与接续期数发布。",
556
566
  "files": [
557
567
  "SKILL.md",
558
- "references/plugin.md",
559
- "references/testing.md"
568
+ "references/publication.md"
560
569
  ],
561
- "version": "1.0.0-rc.11",
562
- "hash": "9b3cab9683b45f11c631a19f916639ffb4c0f74c054c14baee24aa5655a35de4"
570
+ "version": "1.0.0-rc.110",
571
+ "hash": "fd786b61de15a588205eb3c99c28481a4be9d46127a09fdc29b6e5f28e8f684c"
563
572
  }
564
573
  ]
@@ -9,7 +9,7 @@ Work top down: each layer decides the next, and its details are in the reference
9
9
 
10
10
  ## 1. Ground rules
11
11
 
12
- - Presmium-owned normalized document IR is the only editable authority; animation implementations are referenced project files. Do not add a MyST directive or Markdown source as a second input.
12
+ - Presmium-owned normalized document IR is the only editable authority; animation implementations are referenced project files. Keep page titles, narration, steps, parameters, timing and comments in `lecture.json`. Do not add per-page content files, a MyST directive or Markdown as a second input, or a generator that reconstructs the saved document from them.
13
13
  - A step rests on the final frame of its state, and that frame is at once the still on the web page, the slide and the held shot of the video. So a piece is designed as a strip of rest frames, and motion is what carries one into the next.
14
14
  - Every state is reconstructible when selected in any order: the look is a function of the step and the time only. An earlier playback side effect is not state.
15
15
 
@@ -27,21 +27,27 @@ A teaching segment, an explainer or paper video, a promo, a product demo and a d
27
27
 
28
28
  [Story](references/story.md) is the process, each stage ending in a check: brief, thesis, central picture, three storylines for the person to pick, a storyboard of rest frames with what carries each boundary, the script, an animatic the person approves, motion, review against the spec and with cold viewers. [Storyboards](references/storyboards.md) has filled-in examples for popular science, papers, courses, data stories and products; [Scenarios](references/scenarios.md) the usual pictures for each subject.
29
29
 
30
+ For a complete teaching explainer or paper video, read [Planning and acceptance](references/acceptance.md) before scene code. Save `storyboard.md` with both the step sequence and the element design tables: each object's meaning, visual encoding, start/end states, operation, narration trigger, result timing, evidence and continuity. Rest-frame keywords alone are not a motion plan. Each core explanation must visibly establish the situation, perform the operation, expose its result and let it be read. If a reference work is specified, analyse its operations and object/spatial continuity before adapting its look. Automatic workflows choose and review internally; honour a person's explicit preview request without adding routine approval stops.
31
+
32
+ A piece too large for one agent is made from one storyboard file every agent reads, with a term table that gives each term its definition and first page, shared scene modules that only the coordinator changes, edits through the MCP author actions, a reading of its own words every agent does against the storyboard, review rounds appended to the storyboard and a cold read by a fresh agent in three passes: [Team](references/team.md).
33
+
30
34
  ## 5. Motion, rhythm and sound
31
35
 
32
36
  [Lengths](references/lengths.md): what each second shows at 1, 5, 10, 30 and 60 s, the rules every piece follows, the polish list, measured rhythm, carrying beats instead of replacing them, an operated camera, product screens, sound and music, and how to build and export a film.
33
37
 
34
38
  ## 6. Implementation
35
39
 
36
- Keep animation code in `scenes/<name>.ts` or another project file, using the installed `@lincyaw/addon-motion/scene` public exports (`defineScene`, `gsapScene`, `animeScene`, `motionScene`, `d3Scene`, `threeScene`, `remotionScene`); read the actual public types before choosing one. [Libraries](references/libraries.md) picks the library by the picture, lists each one's pitfalls and indexes every gallery piece under "Find an effect"; [Timeline](references/timeline.md) aligns steps and narration; [Procedural](references/procedural.md) covers motion computed from mathematics and where assets come from. Scene sources live in `gallery/<library>/scenes/` and `gallery/catalog/<deck>/scenes/` (ready pieces whose text, images and data are parameters). The gallery's documents show them by scenario: `algorithms`, `data`, `math-ml`, `text`, `emphasis`, `structure`, `product`, `transitions`, `paths-3d` and `craft`, each scene forwarded from its source by a one-line file; `gallery/lengths` (pieces by length and the shared `kit/`), `gallery/films`, `gallery/story` (the worked narrated example) and `gallery/timeline` are documents of their own. Inspect the closest real example instead of inventing an API. The repository’s `examples/gallery/animation-library` links to this same gallery; `pnpm studio` copies it into a workspace with regular files for editing. Keep reusable effect sources here and method guidance in `references/`; complete public courses and product examples belong in `examples/gallery/`.
40
+ Keep animation code in `scenes/<name>.ts` or another project file, using the installed `@lincyaw/addon-motion/scene` public exports (`defineScene`, `gsapScene`, `animeScene`, `motionScene`, `d3Scene`, `threeScene`, `remotionScene`); read the actual public types before choosing one. [Libraries](references/libraries.md) picks the library by the picture, lists each one's pitfalls and indexes every gallery piece under "Find an effect"; [Timeline](references/timeline.md) aligns steps and narration; [Procedural](references/procedural.md) covers motion computed from mathematics and where assets come from. Scene sources live in `gallery/<library>/scenes/` and `gallery/catalog/<deck>/scenes/` (ready pieces whose text, images and data are parameters; `catalog/paper-figure` explains a paper's own figure and ships the crop tool `tools/figure.py`). The gallery's documents show them by scenario: `algorithms`, `data`, `math-ml`, `text`, `emphasis`, `structure`, `product`, `transitions`, `paths-3d` and `craft`, each scene forwarded from its source by a one-line file; `gallery/lengths` (pieces by length and the shared `kit/`), `gallery/films`, `gallery/story` (the worked narrated example) and `gallery/timeline` are documents of their own. Inspect the closest real example instead of inventing an API. The repository’s `examples/gallery/animation-library` links to this same gallery; `pnpm studio` copies it into a workspace with regular files for editing. Keep reusable effect sources here and method guidance in `references/`; complete public courses and product examples belong in `examples/gallery/`.
37
41
 
38
42
  Register an explicit component definition in `definitions` with a file implementation reference, parameter Schema and declared states. Insert a component block pointing to it; put its state on the corresponding section's steps. Stable state IDs describe implementation states, not the component's position in the document. Existing migrated numeric bindings retain explicit `legacyIndex`; do not rename their numbers into guessed semantic states. Use design tokens for styling, reuse the project's semantic icons and public host controls, dispose timelines, subscriptions, canvas/WebGL resources and timers, provide readable static fallback data and report unsupported rendering capabilities.
39
43
 
40
44
  ## 7. Voice, verify and deliver
41
45
 
42
- Narration is structured in `narrations`; steps name narration IDs. Cue targets use stable block IDs. Timing and voice inheritance belong in `production`, never a second timing object on a step or scene. The voice comes from the workspace's speech engine (Volcengine built in, or an OpenAI-compatible service); see `presmium-present/references/lecture.md` for synthesis, playback and export.
46
+ Narration is structured in `narrations`; steps name narration IDs. Cue targets use stable block IDs. Timing and voice inheritance belong in `production`, never a second timing object on a step or scene. While the narrated lecture plays, each scene state lasts until its step's voice ends: place beats at fractions of their state (`at(k) + f * durations[k]`) and never rewrite `durations` to the voice ([Timeline](references/timeline.md)). The voice comes from the workspace's speech engine (Volcengine built in, or an OpenAI-compatible service); see `presmium-author/references/lecture.md` for synthesis, playback and export, and `presmium-author/references/writing.md` for how narration is written.
47
+
48
+ Validate the edited document (`presmium check` or `check_document` also bundles each scene and reports one that doesn't compile, with its file and line), then look at the actual result. With the MCP server, `capture_slides` gives the rest frame of each step of a page and, with `at`, frames that many milliseconds into a step's animation, drawn by the step clock as a lecture export draws them, so they are reproducible; `measure` returns the boxes of elements (a CSS selector) in slide pixels, for positions and overlaps. Capture the steps in any order you like, since each picture is made from its step and time alone; `arrive: 'backward'` checks that going back to a step shows its frame, and `capture_reading` shows the scene on the reading page, also at a phone width (390). Without the MCP server, build only the relevant form, open it, jump forward and backward in arbitrary order, and inspect the static fallback if it matters (exports print it). Do not claim an animation works merely because JSON validation or compilation succeeded, and do not write browser scripts for pictures the tool takes.
43
49
 
44
- Validate the edited document, then build only the relevant form. Open the actual result, jump forward and backward in arbitrary order, and inspect the static fallback if it matters. Do not claim an animation works merely because JSON validation or compilation succeeded.
50
+ For complete explanations, apply the separate fact, layout, runtime and explanatory-motion checks in [Planning and acceptance](references/acceptance.md#4-review-four-different-things). Review low-cost timed operations and close the independent cold-read findings before freezing the source and resources for the full narrated export. Do not run final export alongside an unfinished review. Retain important captures with `retain: true` and give the reviewer their returned manifest, not a mixed directory of old and new pictures. Timed direct captures use `at`; backward arrival checks resting frames in a separate call without `at`. A contact sheet cannot pass motion: the cold viewer must retell which object was operated on, what changed and how the result follows. Static cards, a whole figure with all conclusions permanently visible, or a shared entrance preset used instead of the core operation fail this check even when the data and typography are correct.
45
51
 
46
52
  ```sh
47
53
  presmium check lesson --json