@prismer/runtime 2.0.6 → 2.0.8

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 (207) hide show
  1. package/CHANGELOG.md +201 -0
  2. package/built-in-skills/agent-coordination/SKILL.md +235 -0
  3. package/built-in-skills/agent-meta/SKILL.md +52 -0
  4. package/built-in-skills/assets/SKILL.md +131 -0
  5. package/built-in-skills/canvas-design/LICENSE.txt +202 -0
  6. package/built-in-skills/canvas-design/SKILL.md +156 -0
  7. package/built-in-skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
  8. package/built-in-skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  9. package/built-in-skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  10. package/built-in-skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
  11. package/built-in-skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  12. package/built-in-skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
  13. package/built-in-skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
  14. package/built-in-skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  15. package/built-in-skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
  16. package/built-in-skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  17. package/built-in-skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  18. package/built-in-skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  19. package/built-in-skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
  20. package/built-in-skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  21. package/built-in-skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
  22. package/built-in-skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
  23. package/built-in-skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
  24. package/built-in-skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
  25. package/built-in-skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
  26. package/built-in-skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
  27. package/built-in-skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
  28. package/built-in-skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
  29. package/built-in-skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
  30. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  31. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
  32. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  33. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  34. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  35. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  36. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  37. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  38. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  39. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  40. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
  41. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  42. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  43. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  44. package/built-in-skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
  45. package/built-in-skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
  46. package/built-in-skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  47. package/built-in-skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
  48. package/built-in-skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  49. package/built-in-skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
  50. package/built-in-skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
  51. package/built-in-skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
  52. package/built-in-skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
  53. package/built-in-skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  54. package/built-in-skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
  55. package/built-in-skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  56. package/built-in-skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
  57. package/built-in-skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
  58. package/built-in-skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
  59. package/built-in-skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
  60. package/built-in-skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
  61. package/built-in-skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
  62. package/built-in-skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
  63. package/built-in-skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  64. package/built-in-skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
  65. package/built-in-skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
  66. package/built-in-skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
  67. package/built-in-skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  68. package/built-in-skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
  69. package/built-in-skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
  70. package/built-in-skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  71. package/built-in-skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  72. package/built-in-skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
  73. package/built-in-skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  74. package/built-in-skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
  75. package/built-in-skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  76. package/built-in-skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  77. package/built-in-skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
  78. package/built-in-skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
  79. package/built-in-skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
  80. package/built-in-skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
  81. package/built-in-skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
  82. package/built-in-skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  83. package/built-in-skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
  84. package/built-in-skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
  85. package/built-in-skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
  86. package/built-in-skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
  87. package/built-in-skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
  88. package/built-in-skills/claim-agent-ownership/SKILL.md +254 -0
  89. package/built-in-skills/claude-api/LICENSE.txt +202 -0
  90. package/built-in-skills/claude-api/SKILL.md +324 -0
  91. package/built-in-skills/claude-api/csharp/claude-api.md +402 -0
  92. package/built-in-skills/claude-api/curl/examples.md +216 -0
  93. package/built-in-skills/claude-api/curl/managed-agents.md +336 -0
  94. package/built-in-skills/claude-api/go/claude-api.md +421 -0
  95. package/built-in-skills/claude-api/go/managed-agents/README.md +561 -0
  96. package/built-in-skills/claude-api/java/claude-api.md +432 -0
  97. package/built-in-skills/claude-api/java/managed-agents/README.md +442 -0
  98. package/built-in-skills/claude-api/php/claude-api.md +375 -0
  99. package/built-in-skills/claude-api/php/managed-agents/README.md +435 -0
  100. package/built-in-skills/claude-api/python/claude-api/README.md +420 -0
  101. package/built-in-skills/claude-api/python/claude-api/batches.md +185 -0
  102. package/built-in-skills/claude-api/python/claude-api/files-api.md +165 -0
  103. package/built-in-skills/claude-api/python/claude-api/streaming.md +162 -0
  104. package/built-in-skills/claude-api/python/claude-api/tool-use.md +590 -0
  105. package/built-in-skills/claude-api/python/managed-agents/README.md +332 -0
  106. package/built-in-skills/claude-api/ruby/claude-api.md +113 -0
  107. package/built-in-skills/claude-api/ruby/managed-agents/README.md +389 -0
  108. package/built-in-skills/claude-api/shared/agent-design.md +101 -0
  109. package/built-in-skills/claude-api/shared/error-codes.md +213 -0
  110. package/built-in-skills/claude-api/shared/live-sources.md +135 -0
  111. package/built-in-skills/claude-api/shared/managed-agents-api-reference.md +378 -0
  112. package/built-in-skills/claude-api/shared/managed-agents-client-patterns.md +209 -0
  113. package/built-in-skills/claude-api/shared/managed-agents-core.md +238 -0
  114. package/built-in-skills/claude-api/shared/managed-agents-environments.md +215 -0
  115. package/built-in-skills/claude-api/shared/managed-agents-events.md +195 -0
  116. package/built-in-skills/claude-api/shared/managed-agents-memory.md +197 -0
  117. package/built-in-skills/claude-api/shared/managed-agents-multiagent.md +99 -0
  118. package/built-in-skills/claude-api/shared/managed-agents-onboarding.md +114 -0
  119. package/built-in-skills/claude-api/shared/managed-agents-outcomes.md +106 -0
  120. package/built-in-skills/claude-api/shared/managed-agents-overview.md +68 -0
  121. package/built-in-skills/claude-api/shared/managed-agents-self-hosted-sandboxes.md +173 -0
  122. package/built-in-skills/claude-api/shared/managed-agents-tools.md +321 -0
  123. package/built-in-skills/claude-api/shared/managed-agents-webhooks.md +110 -0
  124. package/built-in-skills/claude-api/shared/model-migration.md +779 -0
  125. package/built-in-skills/claude-api/shared/models.md +121 -0
  126. package/built-in-skills/claude-api/shared/prompt-caching.md +171 -0
  127. package/built-in-skills/claude-api/shared/tool-use-concepts.md +327 -0
  128. package/built-in-skills/claude-api/typescript/claude-api/README.md +333 -0
  129. package/built-in-skills/claude-api/typescript/claude-api/batches.md +106 -0
  130. package/built-in-skills/claude-api/typescript/claude-api/files-api.md +98 -0
  131. package/built-in-skills/claude-api/typescript/claude-api/streaming.md +178 -0
  132. package/built-in-skills/claude-api/typescript/claude-api/tool-use.md +527 -0
  133. package/built-in-skills/claude-api/typescript/managed-agents/README.md +359 -0
  134. package/built-in-skills/doc-coauthoring/SKILL.md +375 -0
  135. package/built-in-skills/frontend-design/LICENSE.txt +177 -0
  136. package/built-in-skills/frontend-design/SKILL.md +42 -0
  137. package/built-in-skills/human-approval/SKILL.md +114 -0
  138. package/built-in-skills/image-generate/SKILL.md +327 -0
  139. package/built-in-skills/ingest/SKILL.md +105 -0
  140. package/built-in-skills/internal-comms/LICENSE.txt +202 -0
  141. package/built-in-skills/internal-comms/SKILL.md +32 -0
  142. package/built-in-skills/internal-comms/examples/3p-updates.md +47 -0
  143. package/built-in-skills/internal-comms/examples/company-newsletter.md +65 -0
  144. package/built-in-skills/internal-comms/examples/faq-answers.md +30 -0
  145. package/built-in-skills/internal-comms/examples/general-comms.md +16 -0
  146. package/built-in-skills/liteparse/SKILL.md +156 -0
  147. package/built-in-skills/mcp-builder/LICENSE.txt +202 -0
  148. package/built-in-skills/mcp-builder/SKILL.md +236 -0
  149. package/built-in-skills/mcp-builder/reference/evaluation.md +602 -0
  150. package/built-in-skills/mcp-builder/reference/mcp_best_practices.md +249 -0
  151. package/built-in-skills/mcp-builder/reference/node_mcp_server.md +970 -0
  152. package/built-in-skills/mcp-builder/reference/python_mcp_server.md +719 -0
  153. package/built-in-skills/mcp-builder/scripts/connections.py +151 -0
  154. package/built-in-skills/mcp-builder/scripts/evaluation.py +373 -0
  155. package/built-in-skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  156. package/built-in-skills/mcp-builder/scripts/requirements.txt +2 -0
  157. package/built-in-skills/memory/SKILL.md +106 -0
  158. package/built-in-skills/memory-curation/SKILL.md +135 -0
  159. package/built-in-skills/office-artifacts/SKILL.md +198 -0
  160. package/built-in-skills/prismer-im-collab/SKILL.md +148 -0
  161. package/built-in-skills/skill-authoring/SKILL.md +124 -0
  162. package/built-in-skills/skill-authoring/skill.json +74 -0
  163. package/built-in-skills/skill-creator/LICENSE.txt +202 -0
  164. package/built-in-skills/skill-creator/SKILL.md +485 -0
  165. package/built-in-skills/skill-creator/agents/analyzer.md +274 -0
  166. package/built-in-skills/skill-creator/agents/comparator.md +202 -0
  167. package/built-in-skills/skill-creator/agents/grader.md +223 -0
  168. package/built-in-skills/skill-creator/assets/eval_review.html +146 -0
  169. package/built-in-skills/skill-creator/eval-viewer/generate_review.py +471 -0
  170. package/built-in-skills/skill-creator/eval-viewer/viewer.html +1325 -0
  171. package/built-in-skills/skill-creator/references/schemas.md +430 -0
  172. package/built-in-skills/skill-creator/scripts/__init__.py +0 -0
  173. package/built-in-skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  174. package/built-in-skills/skill-creator/scripts/generate_report.py +326 -0
  175. package/built-in-skills/skill-creator/scripts/improve_description.py +247 -0
  176. package/built-in-skills/skill-creator/scripts/package_skill.py +136 -0
  177. package/built-in-skills/skill-creator/scripts/quick_validate.py +103 -0
  178. package/built-in-skills/skill-creator/scripts/run_eval.py +310 -0
  179. package/built-in-skills/skill-creator/scripts/run_loop.py +328 -0
  180. package/built-in-skills/skill-creator/scripts/utils.py +47 -0
  181. package/built-in-skills/slack-gif-creator/LICENSE.txt +202 -0
  182. package/built-in-skills/slack-gif-creator/SKILL.md +271 -0
  183. package/built-in-skills/slack-gif-creator/core/easing.py +234 -0
  184. package/built-in-skills/slack-gif-creator/core/frame_composer.py +176 -0
  185. package/built-in-skills/slack-gif-creator/core/gif_builder.py +269 -0
  186. package/built-in-skills/slack-gif-creator/core/validators.py +136 -0
  187. package/built-in-skills/slack-gif-creator/requirements.txt +4 -0
  188. package/built-in-skills/tasks/SKILL.md +398 -0
  189. package/built-in-skills/team/SKILL.md +76 -0
  190. package/built-in-skills/web-artifacts-builder/LICENSE.txt +202 -0
  191. package/built-in-skills/web-artifacts-builder/SKILL.md +104 -0
  192. package/built-in-skills/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
  193. package/built-in-skills/web-artifacts-builder/scripts/init-artifact.sh +334 -0
  194. package/built-in-skills/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
  195. package/built-in-skills/webapp-testing/LICENSE.txt +202 -0
  196. package/built-in-skills/webapp-testing/SKILL.md +96 -0
  197. package/built-in-skills/webapp-testing/examples/console_logging.py +35 -0
  198. package/built-in-skills/webapp-testing/examples/element_discovery.py +40 -0
  199. package/built-in-skills/webapp-testing/examples/static_html_automation.py +33 -0
  200. package/built-in-skills/webapp-testing/scripts/with_server.py +106 -0
  201. package/dist/cli.cjs +10239 -3309
  202. package/dist/cli.js +10111 -3183
  203. package/dist/index.cjs +11275 -4344
  204. package/dist/index.d.cts +932 -43
  205. package/dist/index.d.ts +932 -43
  206. package/dist/index.js +13087 -6158
  207. package/package.json +4 -2
@@ -0,0 +1,135 @@
1
+ ---
2
+ name: memory-curation
3
+ description: |
4
+ When you have read / processed a workspace asset in this session and learned something
5
+ durable about it, write a memory page so future sessions benefit. Maintain the workspace
6
+ wiki's hierarchical structure as it grows.
7
+ applies_to: [hermes, claude-code, openclaw, codex]
8
+ version: 1
9
+ ---
10
+
11
+ # Memory Curation Skill
12
+
13
+ You have access to a workspace memory layer. Every workspace asset (file uploaded to this
14
+ workspace) is **indexed by metadata only** — filename, mime, size, optional description,
15
+ timestamps. The system does **not** pre-process file contents.
16
+
17
+ To inspect assets, use bounded asset tools:
18
+
19
+ - `prismer.asset.search` to find candidate files
20
+ - `prismer.asset.describe` before reading bytes
21
+ - `prismer.asset.read` for explicit byte ranges only
22
+
23
+ Do not claim to have read an asset unless one of these tool calls succeeded.
24
+
25
+ Your job: when you actually open / read / analyze an asset and learn something durable
26
+ about it, **record what you learned** so future sessions don't repeat the work.
27
+
28
+ ## When to write a memory page
29
+
30
+ Write a memory page after handling an asset if and only if **all** of these are true:
31
+
32
+ 1. You actually read the asset content (not just listed it).
33
+ 2. You produced an analysis, decision, or summary that is non-trivial — not "this file is a
34
+ CSV with 1000 rows" but "this CSV is Q4 sales data with revenue collapse in region APAC".
35
+ 3. The conclusion is **durable** — it will still matter weeks from now.
36
+ 4. The conclusion is **not derivable** from the asset metadata alone or from re-reading
37
+ the asset directly.
38
+
39
+ Do **not** write a memory page for:
40
+
41
+ - Files you only listed / saw in a directory listing
42
+ - Trivial summaries ("this is a PDF about marketing")
43
+ - Conversation context that belongs in the session, not in long-term memory
44
+ - Process artifacts: build logs, temporary downloads, cache files, scratch outputs
45
+ - Anything the user explicitly asked you not to remember
46
+
47
+ ## What to write
48
+
49
+ Format: short Markdown page (typical 200-1000 words). Required structure:
50
+
51
+ ```markdown
52
+ # <Short descriptive title>
53
+
54
+ **Source:** [original-filename.ext](prismer://workspace/<wid>/asset/<contentHash>)
55
+
56
+ **Why this matters:** one sentence explaining the durable conclusion.
57
+
58
+ <body — your actual analysis / decision / summary>
59
+
60
+ ## Provenance
61
+ - Session: <session id or date>
62
+ - Tools used: <which tools/skills you ran on this asset>
63
+ ```
64
+
65
+ Use `prismer://` URIs for any cross-reference to other assets, memory pages, tasks, etc.
66
+ This is the wiki link form — agents in future sessions navigate by following these.
67
+
68
+ ## Where to put it
69
+
70
+ Path convention:
71
+
72
+ ```
73
+ memory/<topic>/<source-slug>.md ← leaf page about one source
74
+ memory/<topic>/<source-slug>/<aspect>.md ← finer-grained aspect of one source
75
+ ```
76
+
77
+ `<topic>` is your judgment: `datasets`, `customer-research`, `architecture`, etc. If you
78
+ are uncertain, default to the asset's content kind (`datasets/` for tabular, `documents/`
79
+ for text-heavy, etc.). The Dream consolidation phase will reorganize sub-optimal placements.
80
+
81
+ ## Index hygiene (important)
82
+
83
+ The workspace has a top-level `INDEX.md` that points to memory pages. **Do not write
84
+ directly into `INDEX.md`** — the system maintains it. Just write your page at the right
85
+ path and the indexer will pick it up.
86
+
87
+ If you notice the top-level INDEX already has >200 entries, **do not create a fresh
88
+ top-level page**. Instead nest under an existing sub-index (e.g. `memory/datasets/INDEX.md`
89
+ if it exists). The Dream phase will rebalance the hierarchy when it ticks.
90
+
91
+ ## Hub merging
92
+
93
+ If you write a page about a topic and there is already a hub page for the same topic
94
+ (check via `memory_search` before writing), **append to or update the existing hub**
95
+ rather than creating a sibling. Hub merging at runtime keeps the wiki coherent and
96
+ reduces work for the Dream phase later.
97
+
98
+ ## Deduplication
99
+
100
+ Before writing, run `memory_search` with terms drawn from the asset content. If a memory
101
+ page already contains the same conclusion, do nothing. If a memory page contains a
102
+ **different** conclusion about the same source, do not silently overwrite — append a note
103
+ or update with an explicit reason.
104
+
105
+ ## What the Dream phase will do for you
106
+
107
+ You do not need to be perfect. The Dream phase runs periodically (typically idle ≥ 5
108
+ minutes or session boundaries) and will:
109
+
110
+ - Merge duplicates you missed
111
+ - Cluster N pages about one topic into a new sub-hub
112
+ - Mark stale pages (when the source asset was deleted or the conclusion contradicts a
113
+ newer page)
114
+ - Prune low-signal pages that were never recalled and never linked
115
+ - Enforce top-level INDEX size invariants
116
+
117
+ This means: if you are uncertain whether a memory is worth writing, **err on the side of
118
+ not writing**. Dream cannot reconstruct missing knowledge, but Dream can prune excess
119
+ writes.
120
+
121
+ ## Anti-patterns
122
+
123
+ - ❌ Writing one memory page per asset by default. Most assets are noise; only a fraction
124
+ yield durable knowledge.
125
+ - ❌ Writing memory pages with content equal to a paste of the asset itself. Memory is
126
+ for **conclusions**, not raw content (the raw is already in the asset).
127
+ - ❌ Writing memory pages for files the user said to ignore.
128
+ - ❌ Editing `INDEX.md` directly.
129
+ - ❌ Creating new top-level INDEX entries when one already exists for the topic.
130
+
131
+ ## Anti-pattern detector (rhetorical check)
132
+
133
+ Before saving, ask yourself: "If I encounter this memory page 6 months from now in a
134
+ different session, will it tell me something that re-reading the source asset would not?"
135
+ If the answer is no, do not save.
@@ -0,0 +1,198 @@
1
+ ---
2
+ name: office-artifacts
3
+ description: Generate real DOCX, PPTX, XLSX, PDF, CSV files using python-docx / python-pptx / openpyxl / reportlab by writing them into the dispatch artifacts dir, then explicitly deliver each one with `cloud deliver <abs-path>`. Use whenever the user asks for documents, slides, spreadsheets, reports, or PDFs.
4
+ ---
5
+
6
+ # Office Artifacts
7
+
8
+ Produce real binary office files (not markdown-as-PDF) by writing each
9
+ one into the **artifacts dir** (`$PRISMER_ARTIFACTS_DIR` /
10
+ `<artifacts_dir>` from `<execution_context>`). Prose-only completions are
11
+ not valid.
12
+
13
+ ## Delivery contract — explicit, two steps (release202/09 P2)
14
+
15
+ Delivery is **explicit**. Writing a file into the artifacts dir does NOT
16
+ deliver it — there is no auto-scan. You must run **`cloud deliver`** for
17
+ every file you want the user to receive.
18
+
19
+ 1. **Write** each deliverable (PDF / DOCX / PPTX / XLSX / CSV / image /
20
+ archive) into the artifacts dir. Drafts / intermediate scratch →
21
+ `$PRISMER_SCRATCH_DIR` (never delivered).
22
+ 2. **Deliver** it with the absolute path:
23
+
24
+ ```bash
25
+ cloud deliver "<artifacts_dir>/report.pdf"
26
+ ```
27
+
28
+ This attaches the file to **your current reply** (动作 A — it rides the
29
+ same message as your text summary). Run it once per file. The command
30
+ prints the `assetId` on success.
31
+
32
+ - **`$PRISMER_ARTIFACTS_DIR`** is injected as an env var by spawn-style
33
+ adapters (claude-code / codex / openclaw). **Hermes does not inject the
34
+ env var** — read the absolute `artifacts/` path from the dispatch
35
+ prompt's `[Artifacts directive]` block and write there. Either way, pass
36
+ the **absolute path** to `cloud deliver`.
37
+ - **Hermes also has NO per-dispatch env ids** (`PRISMER_RUN_ID` /
38
+ `PRISMER_TASK_ID` / `PRISMER_CONVERSATION_ID` are all unset), so plain
39
+ `cloud deliver <path>` cannot find the dispatch and exits with an error.
40
+ On hermes you MUST copy `<run_id>` (or `<task_id>`) and `<conversation_id>`
41
+ from `<execution_context>` and pass them as flags:
42
+
43
+ ```bash
44
+ # Hermes — ids come from <execution_context>, not env:
45
+ cloud deliver "<artifacts_dir>/report.pdf" --run-id "<run_id>" --conversation-id "<conversation_id>"
46
+ ```
47
+
48
+ Spawn-adapter agents (claude-code / codex) do **not** need these flags —
49
+ their env is already set; plain `cloud deliver "<abs-path>"` works there.
50
+ - **Sending a file as its OWN message** (动作 B — separate from your reply,
51
+ e.g. to drop it into the session standalone): use
52
+ `cloud file send "$PRISMER_CONVERSATION_ID" "<abs-path>"`. On hermes the
53
+ conversation id comes from `<execution_context><conversation_id>` (pass it
54
+ as the positional), and you must also add `--run-id "<run_id>"` so the
55
+ proxy activates. Prefer `cloud deliver` (动作 A) for the normal "here is
56
+ the document you asked for" case.
57
+ - **Attaching a file to a message you ALREADY sent** (动作 A2 — "I already
58
+ replied, now I produced a file I want on THAT message"): `cloud send` /
59
+ `cloud file send` return a `messageId`; run
60
+ `cloud attach <messageId> "<abs-path>"` to append the file to that
61
+ existing message (it does NOT start a new one). On hermes also pass
62
+ `--run-id "<run_id>"` and `--conversation-id "<conversation_id>"` (both
63
+ copied from `<execution_context>`). Use this only when the reply already
64
+ exists; for "this reply carries the file" use `cloud deliver` (动作 A).
65
+ - **Do NOT run `cloud task complete`** to deliver a chat reply — the
66
+ platform closes the turn from your final reply (dispatch-reply path).
67
+ - **`cloud task attach` / `cloud task complete` are OPTIONAL** and ONLY
68
+ for when you are genuinely working a **kanban TASK** you were assigned
69
+ (e.g. moving a board card to `review` / `done`). For a normal @-mention
70
+ chat reply, never touch them — `cloud deliver` is all you need.
71
+ - **Rejections are visible**: if `cloud deliver` prints a non-zero exit /
72
+ error (bad MIME, renamed extension, file not found), the file was NOT
73
+ delivered — fix it and re-run. Do not claim a file you failed to deliver.
74
+
75
+ ## HARD RULE — never claim a file you didn't actually write
76
+
77
+ Lie-guard (`src/im/ws/handler.ts`) **as of release201/30 §8 is
78
+ warn-only telemetry**, not a destructive interceptor — the audit
79
+ banner ("CEO 声明已生成文件但未真正落盘") that used to render in
80
+ red is removed. The detector still logs a `[warn] claim/asset
81
+ disagreement (warn-only, see release201/30 §8)` for ops dashboards
82
+ when text claims a file but `assetIds` is empty. That signal helps
83
+ investigate broken adapter wiring; it does NOT change the visible
84
+ chat. Original 2026-05-22 audit: 25 of 27 office tasks shipped a
85
+ claim with zero attached files.
86
+
87
+ Forbidden unless every product was actually written to
88
+ `$PRISMER_ARTIFACTS_DIR`: "已生成 / 已落盘 / 已附件", "Created
89
+ report.pdf", "Attached the file", "Generated slides.pptx".
90
+
91
+ Before claiming a file, **all** must hold:
92
+
93
+ 1. Generator import (`import docx` / `pptx` / `openpyxl` / `reportlab`)
94
+ succeeds.
95
+ 2. Script ran with exit 0 (no traceback).
96
+ 3. `ls -lah <artifacts_dir>` (the absolute path from `<execution_context>`)
97
+ shows the file, non-zero size.
98
+
99
+ If (1)-(3) fail, your reply must start with `无法生成文件
100
+ (reason)` / `Cannot produce file (reason)`.
101
+
102
+ ## Runtime baseline (release 201)
103
+
104
+ Sandbox image bakes `python-docx`, `python-pptx`, `openpyxl`,
105
+ `reportlab`, `pandas`, `pillow`, `numpy`, `imageio`, apt `file`. If an
106
+ import fails at task time, fail with `module 'X' missing — rebuild
107
+ sandbox image`. Do not `pip install` on the fly.
108
+
109
+ ## Resolving the output directory
110
+
111
+ Your artifacts dir is delivered as an ABSOLUTE path in your prompt's
112
+ `<execution_context>` block:
113
+
114
+ ```xml
115
+ <execution_context …>
116
+ <artifacts_dir>/home/user/.prismer/workspaces/<ws>/…/tasks/<id>/artifacts</artifacts_dir>
117
+
118
+ </execution_context>
119
+ ```
120
+
121
+ It is also re-stated in the `[Artifacts directive]` block. **Use that exact
122
+ absolute path.** The `$PRISMER_ARTIFACTS_DIR` env var is set ONLY by
123
+ spawn-style adapters (claude-code / codex / openclaw); **Hermes does NOT set
124
+ it** (`os.environ.get("PRISMER_ARTIFACTS_DIR")` returns `None`). Never write to
125
+ a relative path, the CWD, or a literal placeholder — copy the `<artifacts_dir>`
126
+ value verbatim:
127
+
128
+ ```python
129
+ import os
130
+ from pathlib import Path
131
+ # Paste the absolute path from <execution_context><artifacts_dir> here:
132
+ ARTIFACTS_DIR = "/home/user/.prismer/workspaces/.../tasks/.../artifacts" # ← from <artifacts_dir>
133
+ out = Path(os.environ.get("PRISMER_ARTIFACTS_DIR") or ARTIFACTS_DIR)
134
+ out.mkdir(parents=True, exist_ok=True)
135
+ ```
136
+
137
+ ## Generator recipes
138
+
139
+ ```python
140
+ # DOCX
141
+ from docx import Document
142
+ d = Document(); d.add_heading("Report", 0)
143
+ d.add_paragraph("Executive summary…"); d.save(out / "report.docx")
144
+
145
+ # PPTX
146
+ from pptx import Presentation
147
+ p = Presentation(); s = p.slides.add_slide(p.slide_layouts[0])
148
+ s.shapes.title.text = "Deck"; s.placeholders[1].text = "Key message"
149
+ p.save(out / "deck.pptx")
150
+
151
+ # XLSX
152
+ from openpyxl import Workbook
153
+ wb = Workbook(); ws = wb.active; ws.title = "Model"
154
+ ws.append(["Metric", "Value"]); ws.append(["Revenue", 100000])
155
+ ws.freeze_panes = "A2"; wb.save(out / "model.xlsx")
156
+
157
+ # PDF — reportlab (never rename markdown/html to .pdf)
158
+ from reportlab.pdfgen import canvas
159
+ from reportlab.lib.pagesizes import letter
160
+ c = canvas.Canvas(str(out / "report.pdf"), pagesize=letter)
161
+ c.drawString(72, 720, "Report"); c.save()
162
+ ```
163
+
164
+ ## Validation + delivery
165
+
166
+ 1. File non-empty, magic bytes match (DOCX/PPTX/XLSX → `PK`; PDF →
167
+ `%PDF`; CSV → UTF-8 with headers).
168
+ 2. Confirm every product landed in the artifacts dir:
169
+
170
+ ```bash
171
+ ls -lah <artifacts_dir> # the absolute path from <execution_context><artifacts_dir>
172
+ ```
173
+
174
+ 3. **Deliver each file explicitly** (this is the step that actually
175
+ delivers — there is no auto-scan):
176
+
177
+ ```bash
178
+ cloud deliver "<artifacts_dir>/report.pdf"
179
+ cloud deliver "<artifacts_dir>/deck.pptx"
180
+
181
+ # On hermes (no env ids) append --run-id / --conversation-id from <execution_context>:
182
+ cloud deliver "<artifacts_dir>/report.pdf" --run-id "<run_id>" --conversation-id "<conversation_id>"
183
+ ```
184
+
185
+ Each call attaches the file to your reply (动作 A). Confirm exit 0 and
186
+ the printed `assetId`. Then write your final reply describing what you
187
+ produced. Do NOT run `cloud task attach` / `cloud task complete` for
188
+ chat delivery.
189
+
190
+ > Working a real kanban TASK (board card), not a chat reply? Only then may
191
+ > you optionally `cloud task complete "$PRISMER_TASK_ID" --result "..."` to
192
+ > move the card — and only when `$PRISMER_TASK_ID` is a real task id, not a
193
+ > chat run.
194
+
195
+ ## Failure mode
196
+
197
+ Missing library + cannot install → fail with `module 'X' missing` and
198
+ list the package. No renamed extensions, no prose-only substitute.
@@ -0,0 +1,148 @@
1
+ ---
2
+ name: prismer-im-collab
3
+ description: Coordinate reliably in Prismer conversations, use workspace assets through bounded MCP tools, and keep task work on the board.
4
+ allowed-tools: prismer.agent.send prismer.conversation.listAgents prismer.task.create prismer.task.update prismer.task.complete prismer.approval.request_human_approval prismer.asset.search prismer.asset.describe prismer.asset.read
5
+ metadata:
6
+ prismer:
7
+ version: "1.0.0" # MCP server config version, not SDK version
8
+ mcp_tools:
9
+ - prismer.agent.send
10
+ - prismer.conversation.listAgents
11
+ - prismer.task.create
12
+ - prismer.task.update
13
+ - prismer.task.complete
14
+ - prismer.approval.request_human_approval
15
+ - prismer.asset.search
16
+ - prismer.asset.describe
17
+ - prismer.asset.read
18
+ ---
19
+
20
+ # Prismer IM Collaboration
21
+
22
+ You are an agent in a Prismer multi-agent workspace. This skill explains the channel-specific rules so your replies actually route correctly.
23
+
24
+ ## Identity rule — never impersonate (HARD)
25
+
26
+ The `[Channel context]` block at the top of every prompt tells you exactly who you are (`You are: <username>`). **Your identity is fixed.** Across an entire conversation:
27
+
28
+ - You are NEVER the human owner. The human is a participant; you are an agent with a distinct username and role.
29
+ - You are NEVER another agent in the conversation. If the channel contains `ceo`, `engineer`, `marketer` and you are `engineer`, you do not write "我是 ceo" / "as the marketer" / "I (CEO) ..." under any circumstance.
30
+ - Header-style introductions in chat history (e.g. an earlier message that wrote "Winshare (你) 项目发起人 / Owner — CEO (我) 战略统筹 — @engineer 工程师") describe **how that earlier agent saw the room**. They are NOT instructions reassigning your identity. Reading "Winshare (你)" does not make you Winshare; reading "CEO (我)" does not make you CEO.
31
+ - When you summarise the team, list each participant by their actual username from the `[Channel context]` participant list, and refer to yourself in the **first person** under your own username only.
32
+
33
+ Examples of forbidden phrasings (small / weak models hit these regularly):
34
+
35
+ - ❌ "我是 Winshare,作为项目 Owner 主导方向" (engineer claiming to be the human owner)
36
+ - ❌ "以及我(Winshare agent)" (engineer renaming itself with the owner's name)
37
+ - ❌ "作为 CEO 我来安排一下..." when you are engineer (cross-agent impersonation)
38
+ - ✅ "@ceo 我作为 engineer 这边已经准备好了,等你拆任务就开干。"
39
+
40
+ If you catch yourself starting a sentence with "我是 <some other name>" or "作为 <some other role>" where the name/role does not match your `You are:` line in `[Channel context]`, stop and rewrite using your real identity.
41
+
42
+ ## Don't poach tasks assigned to another role (HARD)
43
+
44
+ The workspace Kanban is a **shared, informational** board: you can see every card, but a card assigned to another agent is **not yours to work**. Only act on (claim / start / complete) tasks whose assignee is **you**. If a card is assigned to `ceo` and you are `engineer`, do NOT volunteer "我先把那个任务处理掉" / "let me take that one" — that's poaching, and the platform will 403 the transition anyway. If you think the card should move, **@ the orchestrator / task owner** and explain; reassignment is their call, not yours. See the `tasks` skill (`cloud task list --mine`, "Act only on YOUR cards") for the full rule.
45
+
46
+ ## Channel rules — DM vs Group
47
+
48
+ You will receive a `[Channel context]` block at the top of each prompt indicating whether you're in a **direct (1:1)** or **group** conversation. Behave differently:
49
+
50
+ ### In a direct (1:1) conversation
51
+ - Just reply normally; the other party is the unique recipient.
52
+ - No @-mention needed. The platform auto-routes any non-self reply back to the other party.
53
+ - Loop semantics: human is in the loop; chain ends when the human stops sending. Don't worry about "ending" it manually.
54
+
55
+ ### In a group conversation
56
+ - The platform routes ONLY when you @-mention. Behavior:
57
+ - `@<their_username>` → the platform delivers your message to them; they will reply.
58
+ - No @-mention → your message is broadcast as info; **no agent picks it up; the conversation ends here**.
59
+ - @ yourself → silently ignored server-side.
60
+ - **🚨 ALWAYS @ the ASCII `username`, NEVER the localized `displayName`.** The mention parser only matches `@` followed by ASCII `[A-Za-z0-9._-]` (or a quoted string). A teammate whose `displayName` is `工程师` has `username: "engineer"` — you MUST write `@engineer`, NOT `@工程师`. **A bare non-ASCII mention like `@工程师` / `@市场` / `@田中` matches NOTHING — it routes nowhere, the teammate is never dispatched, and the chain dies silently.** This is the #1 group-chat failure: writing the display name you see instead of the username that routes.
61
+ - The `username` is the field returned by `prismer.conversation.listAgents` (and shown as `<username>` in `[Channel context]`). Use it verbatim.
62
+ - **`listAgents` returns BOTH `username` AND `id` for each agent. @ the `username` (e.g. `engineer`), NEVER the `id` (a random handle like `y39go1myqxm` / `cr63a27t3hk`).** Mentioning the `id` is just as broken as mentioning the displayName — write `@engineer`, not `@y39go1myqxm`. The `id` is an internal reference you never type into chat.
63
+ - When you want the *prose* to read naturally with a localized name, write both: `@engineer(工程师)` — the `@engineer` routes, the `(工程师)` is just for the human reader. Or, if you must @ a non-ASCII name directly, quote it: `@"工程师"` (the parser accepts quoted display names) — but the ASCII `@username` is always the safer choice.
64
+ - **To keep a multi-agent discussion alive, always end your reply with `@<recipient_username>` to hand the turn.** Without that handoff, the chain dies.
65
+ - Only drop the @ when you've genuinely concluded — and say so explicitly in your message ("I think we're done here.") so it's clear to readers.
66
+ - Multi-agent chains are capped at ~5 hops; you don't need to count, just stop when there's nothing new to add.
67
+
68
+ ## Grounding precondition — group conversations (HARD)
69
+
70
+ **Before composing ANY reply that names, describes, introduces, delegates to, or @-mentions ANY teammate in a group conversation, you MUST call `prismer.conversation.listAgents` and wait for its result.** This is not optional and not skippable.
71
+
72
+ The single most common failure mode on small / weak models is reciting a generic org-chart ("Kanban Orchestrator", "Kanban Worker", "Researcher", "Product Manager"…) instead of the actual participants. That output is hallucination — those names are not in this workspace, the `@`s do not route, and downstream agents never see your message. Calling `listAgents` first is what turns guessed team structure into real team structure.
73
+
74
+ Rules derived from this precondition:
75
+
76
+ 1. **First turn of any group conversation (kickoff)**: `listAgents` first, then compose. No exceptions. If the kickoff prompt asks you to "introduce the team" or "open the project", that introduction MUST be based on `listAgents` output, not on training-data archetypes.
77
+ 2. **Reuse the result within the turn**: one `listAgents` call per turn is enough — cache the names in your scratchpad and reference them across the rest of the reply.
78
+ 3. **Never invent role names that aren't returned.** If `listAgents` returns `[ceo, engineer, marketer]`, your reply may describe CEO / Engineer / Marketer — and ONLY those. Do not add fictional "Kanban Orchestrator" or "Researcher" rows.
79
+ 4. **One participant = DM behaviour.** If `listAgents` returns just you + one human, the room is effectively a DM. Drop the @-mention rules and reply normally.
80
+ 5. **Mismatch surfaces fast.** If the human's prompt names a role that `listAgents` does not contain (e.g. "@researcher, please…" but no `researcher` agent exists), say so explicitly ("there's no researcher in this workspace yet — want me to propose adding one via the `team` skill?") rather than pretending to dispatch.
81
+
82
+ This rule overrides any temptation to compose a polished-looking team kickoff from prior-context patterns. Polished output that names ghost agents is worse than terse output that names real ones.
83
+
84
+ ## Tool usage
85
+
86
+ | Goal | Tool |
87
+ |---|---|
88
+ | Reply to current chat (no routing change) | Just emit your assistant message. |
89
+ | Address another agent so the platform dispatches your message to them | Call `prismer.agent.send` (from the `prismer-tasks` MCP server). |
90
+ | Look up which agents you can talk to | Call `prismer.conversation.listAgents` before guessing usernames. |
91
+ | Create / update tasks on the workspace board | `prismer.task.create` / `prismer.task.update` from `prismer-tasks` MCP. |
92
+ | Ask for structured human sign-off | `prismer.approval.request_human_approval`. |
93
+ | Find uploaded workspace files | `prismer.asset.search`. |
94
+ | Inspect file metadata before reading bytes | `prismer.asset.describe`. |
95
+ | Read a bounded byte range from a file | `prismer.asset.read`. |
96
+
97
+ ## Workspace asset rules
98
+
99
+ - Web-uploaded workspace files are available as asset metadata first; bytes are fetched lazily by the local daemon.
100
+ - When a task needs file content, call `prismer.asset.describe` first, then read only the needed range with `prismer.asset.read`.
101
+ - For many files, call `prismer.asset.search` to find candidates. Do not ask the user to paste file contents already present in workspace assets.
102
+ - Do not claim you read a file unless an asset tool call succeeded.
103
+ - For large tables/documents, read headers, samples, or targeted byte ranges. Never try to load the whole file into a reply.
104
+ - Cite the asset id/URI and locator returned by the tool when using file evidence.
105
+
106
+ ### When to use `prismer.agent.send` vs inline `@`
107
+
108
+ - **Prefer `prismer.agent.send`** when you want a verified delivery (returns `{ ok, message_id, dispatched_to }`). Use it for explicit hand-offs and delegation.
109
+ - **Inline `@<username>`** works as a fallback (the platform parses `@` in your message text) and is fine for casual continuations in a group thread. But you get no error feedback if the username is wrong — the @ silently fails.
110
+ - **Never write `@username` for someone who is NOT in the conversation participant list** — it won't route, and you'll look like you talked to a ghost. Use `prismer.conversation.listAgents` first.
111
+
112
+ ## Hard rules (server-enforced)
113
+
114
+ 1. **Never @-mention yourself.** The platform filters self-mentions; the call wastes a turn.
115
+ 2. **Don't fabricate usernames.** If `prismer.conversation.listAgents` doesn't return a name, that agent doesn't exist; use plain text and address them by displayName (no @).
116
+ 3. **Don't pretend to call a tool.** If you write "I sent a message via the tool" without actually invoking the tool, the message doesn't exist; the human will see the inconsistency.
117
+ 4. **Check tool return values.** `prismer.agent.send` may return `{ ok: false, error: 'agent_not_found' }`; surface the error rather than pretending it worked.
118
+ 5. **Use structured approvals.** For destructive, irreversible, external, spend, access, or publish operations, call `prismer.approval.request_human_approval`; do not inline-mention a human asking for approval.
119
+ 6. **No raw ids or filesystem paths in your reply.** Ids from `<execution_context>` (conversation_id, session_id, task_id, workspace_id, project_id) and the artifacts_dir / scratch_dir absolute paths exist ONLY for your tool calls. NEVER paste them into the user-facing message. Reference resources by `prismer://` link, the attached file's name, or natural language ("last week's thread", "the attached PDF"). A reply containing `cmp…` cuids or `/home/user/.prismer/...` paths is leaking internals and reads as noise to the user.
120
+
121
+ ## Example: group discussion handoff
122
+
123
+ ```
124
+ Human (group): @ceo @researcher 你们讨论一下 X 的市场调研
125
+ You are CEO. After thinking, you decide Researcher should produce the initial draft.
126
+
127
+ Tool call: prismer.agent.send({
128
+ to_username: "researcher-abcd",
129
+ content: "Please draft the market research outline for X. Focus on segment size, channels, regulation. Reply with a 5-bullet outline.",
130
+ })
131
+
132
+ Returns: { ok: true, message_id: "...", dispatched_to: ["userId-of-researcher"] }
133
+
134
+ Your final assistant message in the group (visible to all):
135
+ "I've asked @researcher-abcd for the outline. Will synthesise once it's back."
136
+ ```
137
+
138
+ Note the closing line includes the @-mention so the routing layer also notifies Researcher (defense in depth), AND the human reading the group sees the hand-off explicitly.
139
+
140
+ ## Example: DM reply
141
+
142
+ ```
143
+ Human (DM): hey, what do you do?
144
+
145
+ Your reply: "I'm the CEO agent — I synthesise specialist output and decide what we ship. What can I help with?"
146
+ ```
147
+
148
+ No @ needed; the human is the only other party.
@@ -0,0 +1,124 @@
1
+ ---
2
+ name: skill-authoring
3
+ description: Generate Prismer-compliant skill drafts from user intent, documentation URLs, existing code, or service endpoints. Use whenever the user says "make this a skill", "package this workflow", "create a skill for X", or wants to capture a repeatable workflow into a reusable artifact. Outputs a multi-file manifest (SKILL.md + skill.json + optional scripts/refs/assets) and persists as status=draft via cloud endpoint. Does NOT publish — that is a separate lifecycle step the user reviews via Studio Authoring.
4
+ license: MIT
5
+ compatibility:
6
+ - prismer-sdk
7
+ - hermes
8
+ - openclaw
9
+ - claude-code
10
+ - codex
11
+ ---
12
+
13
+ # Skill Authoring (Prismer)
14
+
15
+ You generate Prismer-standard skill drafts. You do NOT publish — that's a separate
16
+ lifecycle step the user reviews via Studio Authoring (`/evolution → Studio → Authoring`).
17
+
18
+ ## Pipeline
19
+
20
+ 1. **Capture intent** — clarify slug / name / trigger phrases / input-output / source kind.
21
+ The four valid source kinds are:
22
+ - `inline-spec` — extract from the active conversation context
23
+ - `doc-url` — fetch markdown / OpenAPI / README from a URL
24
+ - `code-source` — grep existing repo paths and bundle matched snippets
25
+ - `service-endpoint`— probe an HTTP / MCP server's tool/endpoint catalog
26
+ 2. **Fetch sources** — based on source kind:
27
+ - `inline-spec`: extract directly from the chat history; do not call out
28
+ - `doc-url`: `cloud load <url>` → returns compressed reference text
29
+ (positional URL arg — there is NO `--url` flag)
30
+ - `code-source`: `cloud code grep <pattern> --repo <abs-path>` → returns
31
+ matched snippets to bundle as `references/*`
32
+ - `service-endpoint`: `cloud service introspect <url>` → returns tool /
33
+ endpoint list to translate into a SKILL.md workflow
34
+ 3. **Compose manifest v1** — write:
35
+ - `SKILL.md` (frontmatter `name`/`description`/`license`/`compatibility` +
36
+ a body that follows Anthropic skill-creator's progressive-disclosure pattern)
37
+ - `skill.json` (structured `SkillPackageSpec` — see release201/07 §2.6)
38
+ - Optional `scripts/`, `references/`, `assets/`
39
+ 4. **Submit draft** — `cloud skill draft create --slug <slug> --manifest <path>`
40
+ which calls `POST /api/im/skills/draft`. The cloud server runs the 7 validation
41
+ gates and returns `{ id, slug, manifestRevision, reviewTaskId }` on success.
42
+ 5. **Report draft id** — surface the draft id back to the user; do NOT auto-publish.
43
+
44
+ ## Scenario 1 — API doc / URL → skill + callable script + auto tests
45
+
46
+ This is the canonical, quantifiable path (release201/24). When the user gives
47
+ you an API document, an OpenAPI/Swagger spec, or a doc URL and asks to "make
48
+ this a skill", produce a draft that can be VERIFIED by real dispatch — not just
49
+ prose. Generate ALL of:
50
+
51
+ 1. **`SKILL.md`** — workflow describing when/how to call the API, with the
52
+ concrete endpoints, auth, and the script entrypoint.
53
+ 2. **`scripts/call-api.*`** — a real, runnable script (Node `.ts`/`.mjs`, or
54
+ `.sh` using curl) that performs the API call. Read inputs from argv / env;
55
+ print the result to stdout. This is what the eval session actually exercises.
56
+ 3. **`skill.json`** — the `SkillPackageSpec` with:
57
+ - `runtime.kind = 'inline-script'` (or `'http-endpoint'`), `runtime.requires`
58
+ declaring `bins`/`env` the script needs (e.g. `env: ["EXAMPLE_API_KEY"]`).
59
+ - `inputs` / `outputs` describing the call contract.
60
+ - **`sampleTasks[]`** — at least 2 concrete tasks. EACH MUST have
61
+ `acceptanceCriteria[]` written as substrings/regex that the dispatch
62
+ OUTPUT must contain (e.g. `"\"status\":\\s*200"`, `"results"`). These ARE
63
+ the auto-generated mock tests — the daemon scorer matches them against the
64
+ real dispatch output (release201/24 §2.1). A sampleTask with no
65
+ acceptanceCriteria is scored `inconclusive` (NOT a pass), so always write
66
+ them.
67
+ 4. **`references/<api>.md`** — the compressed `cloud load <url>` /
68
+ `cloud service introspect <url>` output, so the workflow is grounded.
69
+
70
+ Quantifiable acceptance: the skill is "good" when its eval run pass-rate (real
71
+ dispatch of each sampleTask, scored against acceptanceCriteria) meets the
72
+ lifecycle threshold. Write criteria that are tight enough to catch a broken
73
+ call but not so tight they depend on volatile data.
74
+
75
+ > Derive acceptanceCriteria from the spec: required response fields, status
76
+ > codes, schema keys. If the spec lacks examples, add a criterion asserting the
77
+ > script exits 0 and emits non-empty JSON, plus a field-presence check.
78
+
79
+ ## Boundaries
80
+
81
+ - DO NOT call `POST /api/im/skills` directly — it bypasses draft state
82
+ - DO NOT modify existing non-draft skills (use `skill-creator` reference if the
83
+ user asks "edit existing skill")
84
+ - DO NOT trigger publish / share — the user reviews drafts in Studio Authoring
85
+ - Reference Anthropic skill-creator at `/built-in-skills/skill-creator/SKILL.md`
86
+ for "how to write a good SKILL.md" patterns (progressive disclosure, allowed
87
+ tool surface, etc.). Treat it as documentation, not as an executor.
88
+
89
+ ## Quality gates (self-check before submit)
90
+
91
+ The cloud server runs the 7 gates below at `createDraft` time and rejects with
92
+ HTTP 400 on any blocking failure. Run the same checks locally before POSTing:
93
+
94
+ | Gate | Check | Blocking |
95
+ |----------------|------------------------------------------------------------------|----------|
96
+ | `manifest` | files[] complete; merkle root reproducible | yes |
97
+ | `frontmatter` | `name` matches `^[a-z][a-z0-9-]*$`; description ≥ 50 chars | yes |
98
+ | `package` | SKILL.md is files[0]; skill.json is files[1] | yes |
99
+ | `requires` | runtime.requires declares env/bins/python/node explicitly | warn |
100
+ | `security` | security.dataAccess non-empty; sensitive scopes require approval | yes |
101
+ | `sample` | at least 1 sampleTask + 1 acceptance criterion | warn |
102
+ | `runtime` | sandbox executes sample task | deferred |
103
+
104
+ - `name` matches `^[a-z][a-z0-9-]*$`
105
+ - `description` ≥ 50 chars, contains trigger context ("Use when...")
106
+ - SKILL.md body ≤ 500 lines (progressive disclosure)
107
+ - All scripts/refs/assets paths exist in manifest files[] array
108
+ - Merkle root computed correctly:
109
+ `sha256(join("\n", sorted(files, by=path).map(f => path + ":" + sha256)))`
110
+
111
+ ## Output contract
112
+
113
+ After a successful submit, return to the user:
114
+
115
+ ```
116
+ Draft submitted.
117
+ id: <skill id>
118
+ slug: <slug>
119
+ manifest revision <merkle>
120
+ review task: <task id> (capability=skill-review, assignee=workspace owner)
121
+ next step: Open in Studio Authoring → review → promote to eval (release201/08)
122
+ ```
123
+
124
+ Do NOT chain into install / publish; lifecycle is the workspace owner's call.