@prismer/runtime 2.0.7 → 2.2.55

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 (291) hide show
  1. package/CHANGELOG.md +3631 -0
  2. package/README.md +34 -12
  3. package/apc/skills/FIELD-DICTIONARY.md +111 -0
  4. package/apc/skills/bug-reproduce/SKILL.md +150 -0
  5. package/apc/skills/bug-reproduce/skill.json +96 -0
  6. package/apc/skills/code-review/SKILL.md +198 -0
  7. package/apc/skills/code-review/skill.json +124 -0
  8. package/apc/skills/design-review/SKILL.md +122 -0
  9. package/apc/skills/design-review/skill.json +88 -0
  10. package/apc/skills/doc-sync/SKILL.md +168 -0
  11. package/apc/skills/doc-sync/skill.json +81 -0
  12. package/apc/skills/env-doctor/SKILL.md +194 -0
  13. package/apc/skills/env-doctor/skill.json +209 -0
  14. package/apc/skills/git-ops/SKILL.md +189 -0
  15. package/apc/skills/git-ops/skill.json +94 -0
  16. package/apc/skills/impact-trace/SKILL.md +168 -0
  17. package/apc/skills/impact-trace/skill.json +104 -0
  18. package/apc/skills/observability/SKILL.md +195 -0
  19. package/apc/skills/observability/skill.json +116 -0
  20. package/apc/skills/release-db-config-sync/SKILL.md +186 -0
  21. package/apc/skills/release-db-config-sync/skill.json +109 -0
  22. package/apc/skills/release-ota-promote/SKILL.md +195 -0
  23. package/apc/skills/release-ota-promote/skill.json +176 -0
  24. package/apc/skills/release-preflight/SKILL.md +174 -0
  25. package/apc/skills/release-preflight/skill.json +175 -0
  26. package/apc/skills/release-rollback/SKILL.md +214 -0
  27. package/apc/skills/release-rollback/skill.json +230 -0
  28. package/apc/skills/release-tag/SKILL.md +194 -0
  29. package/apc/skills/release-tag/skill.json +94 -0
  30. package/apc/skills/releasing-prod/SKILL.md +49 -0
  31. package/apc/skills/releasing-test/SKILL.md +135 -0
  32. package/apc/skills/sdk-release/SKILL.md +200 -0
  33. package/apc/skills/spec-intake/SKILL.md +169 -0
  34. package/apc/skills/spec-intake/skill.json +93 -0
  35. package/apc/skills/test-result-feedback/SKILL.md +239 -0
  36. package/apc/skills/test-result-feedback/skill.json +193 -0
  37. package/apc/skills/test-runner/SKILL.md +169 -0
  38. package/apc/skills/test-runner/skill.json +103 -0
  39. package/apc/skills/ui-align/SKILL.md +209 -0
  40. package/apc/skills/ui-align/skill.json +114 -0
  41. package/apc/skills/ui-canvas/SKILL.md +148 -0
  42. package/apc/skills/ui-canvas/skill.json +127 -0
  43. package/built-in-skills/agent-coordination/SKILL.md +257 -0
  44. package/built-in-skills/agent-meta/SKILL.md +53 -0
  45. package/built-in-skills/assets/SKILL.md +133 -0
  46. package/built-in-skills/browser-use/SKILL.md +93 -0
  47. package/built-in-skills/canvas-design/LICENSE.txt +202 -0
  48. package/built-in-skills/canvas-design/SKILL.md +157 -0
  49. package/built-in-skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
  50. package/built-in-skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  51. package/built-in-skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  52. package/built-in-skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
  53. package/built-in-skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  54. package/built-in-skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
  55. package/built-in-skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
  56. package/built-in-skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  57. package/built-in-skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
  58. package/built-in-skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  59. package/built-in-skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  60. package/built-in-skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  61. package/built-in-skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
  62. package/built-in-skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  63. package/built-in-skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
  64. package/built-in-skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
  65. package/built-in-skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
  66. package/built-in-skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
  67. package/built-in-skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
  68. package/built-in-skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
  69. package/built-in-skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
  70. package/built-in-skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
  71. package/built-in-skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
  72. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  73. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
  74. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  75. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  76. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  77. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  78. package/built-in-skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  79. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  80. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  81. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  82. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
  83. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  84. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  85. package/built-in-skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  86. package/built-in-skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
  87. package/built-in-skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
  88. package/built-in-skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  89. package/built-in-skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
  90. package/built-in-skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  91. package/built-in-skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
  92. package/built-in-skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
  93. package/built-in-skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
  94. package/built-in-skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
  95. package/built-in-skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  96. package/built-in-skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
  97. package/built-in-skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  98. package/built-in-skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
  99. package/built-in-skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
  100. package/built-in-skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
  101. package/built-in-skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
  102. package/built-in-skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
  103. package/built-in-skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
  104. package/built-in-skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
  105. package/built-in-skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  106. package/built-in-skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
  107. package/built-in-skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
  108. package/built-in-skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
  109. package/built-in-skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  110. package/built-in-skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
  111. package/built-in-skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
  112. package/built-in-skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  113. package/built-in-skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  114. package/built-in-skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
  115. package/built-in-skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  116. package/built-in-skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
  117. package/built-in-skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  118. package/built-in-skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  119. package/built-in-skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
  120. package/built-in-skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
  121. package/built-in-skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
  122. package/built-in-skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
  123. package/built-in-skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
  124. package/built-in-skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  125. package/built-in-skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
  126. package/built-in-skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
  127. package/built-in-skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
  128. package/built-in-skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
  129. package/built-in-skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
  130. package/built-in-skills/claim-agent-ownership/SKILL.md +255 -0
  131. package/built-in-skills/claude-api/LICENSE.txt +202 -0
  132. package/built-in-skills/claude-api/SKILL.md +325 -0
  133. package/built-in-skills/claude-api/csharp/claude-api.md +402 -0
  134. package/built-in-skills/claude-api/curl/examples.md +216 -0
  135. package/built-in-skills/claude-api/curl/managed-agents.md +336 -0
  136. package/built-in-skills/claude-api/go/claude-api.md +421 -0
  137. package/built-in-skills/claude-api/go/managed-agents/README.md +561 -0
  138. package/built-in-skills/claude-api/java/claude-api.md +432 -0
  139. package/built-in-skills/claude-api/java/managed-agents/README.md +442 -0
  140. package/built-in-skills/claude-api/php/claude-api.md +375 -0
  141. package/built-in-skills/claude-api/php/managed-agents/README.md +435 -0
  142. package/built-in-skills/claude-api/python/claude-api/README.md +420 -0
  143. package/built-in-skills/claude-api/python/claude-api/batches.md +185 -0
  144. package/built-in-skills/claude-api/python/claude-api/files-api.md +165 -0
  145. package/built-in-skills/claude-api/python/claude-api/streaming.md +162 -0
  146. package/built-in-skills/claude-api/python/claude-api/tool-use.md +590 -0
  147. package/built-in-skills/claude-api/python/managed-agents/README.md +332 -0
  148. package/built-in-skills/claude-api/ruby/claude-api.md +113 -0
  149. package/built-in-skills/claude-api/ruby/managed-agents/README.md +389 -0
  150. package/built-in-skills/claude-api/shared/agent-design.md +101 -0
  151. package/built-in-skills/claude-api/shared/error-codes.md +213 -0
  152. package/built-in-skills/claude-api/shared/live-sources.md +135 -0
  153. package/built-in-skills/claude-api/shared/managed-agents-api-reference.md +378 -0
  154. package/built-in-skills/claude-api/shared/managed-agents-client-patterns.md +209 -0
  155. package/built-in-skills/claude-api/shared/managed-agents-core.md +238 -0
  156. package/built-in-skills/claude-api/shared/managed-agents-environments.md +215 -0
  157. package/built-in-skills/claude-api/shared/managed-agents-events.md +195 -0
  158. package/built-in-skills/claude-api/shared/managed-agents-memory.md +197 -0
  159. package/built-in-skills/claude-api/shared/managed-agents-multiagent.md +99 -0
  160. package/built-in-skills/claude-api/shared/managed-agents-onboarding.md +114 -0
  161. package/built-in-skills/claude-api/shared/managed-agents-outcomes.md +106 -0
  162. package/built-in-skills/claude-api/shared/managed-agents-overview.md +68 -0
  163. package/built-in-skills/claude-api/shared/managed-agents-self-hosted-sandboxes.md +173 -0
  164. package/built-in-skills/claude-api/shared/managed-agents-tools.md +321 -0
  165. package/built-in-skills/claude-api/shared/managed-agents-webhooks.md +110 -0
  166. package/built-in-skills/claude-api/shared/model-migration.md +779 -0
  167. package/built-in-skills/claude-api/shared/models.md +121 -0
  168. package/built-in-skills/claude-api/shared/prompt-caching.md +171 -0
  169. package/built-in-skills/claude-api/shared/tool-use-concepts.md +327 -0
  170. package/built-in-skills/claude-api/typescript/claude-api/README.md +333 -0
  171. package/built-in-skills/claude-api/typescript/claude-api/batches.md +106 -0
  172. package/built-in-skills/claude-api/typescript/claude-api/files-api.md +98 -0
  173. package/built-in-skills/claude-api/typescript/claude-api/streaming.md +178 -0
  174. package/built-in-skills/claude-api/typescript/claude-api/tool-use.md +527 -0
  175. package/built-in-skills/claude-api/typescript/managed-agents/README.md +359 -0
  176. package/built-in-skills/codebase-design/DEEPENING.md +37 -0
  177. package/built-in-skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
  178. package/built-in-skills/codebase-design/LICENSE +21 -0
  179. package/built-in-skills/codebase-design/SKILL.md +116 -0
  180. package/built-in-skills/conversation-compaction/SKILL.md +114 -0
  181. package/built-in-skills/council-creator/SKILL.md +426 -0
  182. package/built-in-skills/diagnosing-bugs/LICENSE +21 -0
  183. package/built-in-skills/diagnosing-bugs/SKILL.md +136 -0
  184. package/built-in-skills/diagnosing-bugs/scripts/hitl-loop.template.sh +41 -0
  185. package/built-in-skills/doc-coauthoring/SKILL.md +376 -0
  186. package/built-in-skills/document-generation/SKILL.md +105 -0
  187. package/built-in-skills/domain-modeling/ADR-FORMAT.md +47 -0
  188. package/built-in-skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
  189. package/built-in-skills/domain-modeling/LICENSE +21 -0
  190. package/built-in-skills/domain-modeling/SKILL.md +76 -0
  191. package/built-in-skills/frontend-design/LICENSE.txt +177 -0
  192. package/built-in-skills/frontend-design/SKILL.md +43 -0
  193. package/built-in-skills/human-approval/SKILL.md +129 -0
  194. package/built-in-skills/image-generate/SKILL.md +128 -0
  195. package/built-in-skills/image-generate/scripts/generate-and-deliver.mjs +289 -0
  196. package/built-in-skills/ingest/SKILL.md +73 -0
  197. package/built-in-skills/internal-comms/LICENSE.txt +202 -0
  198. package/built-in-skills/internal-comms/SKILL.md +33 -0
  199. package/built-in-skills/internal-comms/examples/3p-updates.md +47 -0
  200. package/built-in-skills/internal-comms/examples/company-newsletter.md +65 -0
  201. package/built-in-skills/internal-comms/examples/faq-answers.md +30 -0
  202. package/built-in-skills/internal-comms/examples/general-comms.md +16 -0
  203. package/built-in-skills/liteparse/SKILL.md +176 -0
  204. package/built-in-skills/mcp-builder/LICENSE.txt +202 -0
  205. package/built-in-skills/mcp-builder/SKILL.md +237 -0
  206. package/built-in-skills/mcp-builder/reference/evaluation.md +602 -0
  207. package/built-in-skills/mcp-builder/reference/mcp_best_practices.md +249 -0
  208. package/built-in-skills/mcp-builder/reference/node_mcp_server.md +970 -0
  209. package/built-in-skills/mcp-builder/reference/python_mcp_server.md +719 -0
  210. package/built-in-skills/mcp-builder/scripts/connections.py +151 -0
  211. package/built-in-skills/mcp-builder/scripts/evaluation.py +373 -0
  212. package/built-in-skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  213. package/built-in-skills/mcp-builder/scripts/requirements.txt +2 -0
  214. package/built-in-skills/memory/SKILL.md +471 -0
  215. package/built-in-skills/memory-dream/SKILL.md +339 -0
  216. package/built-in-skills/office-artifacts/SKILL.md +211 -0
  217. package/built-in-skills/okr/SKILL.md +154 -0
  218. package/built-in-skills/persona/SKILL.md +81 -0
  219. package/built-in-skills/persona-generator/SKILL.md +296 -0
  220. package/built-in-skills/pkf-svg/SKILL.md +253 -0
  221. package/built-in-skills/pkf-writing/SKILL.md +236 -0
  222. package/built-in-skills/prismer-im-collab/SKILL.md +168 -0
  223. package/built-in-skills/proactivity/SKILL.md +84 -0
  224. package/built-in-skills/remotion/SKILL.md +431 -0
  225. package/built-in-skills/role-builder/SKILL.md +203 -0
  226. package/built-in-skills/role-builder/scripts/author-role.mjs +334 -0
  227. package/built-in-skills/role-builder/scripts/ingest-role.mjs +223 -0
  228. package/built-in-skills/role-builder/scripts/instantiate-and-run.mjs +290 -0
  229. package/built-in-skills/role-builder/scripts/operation-harness.mjs +267 -0
  230. package/built-in-skills/skill-authoring/SKILL.md +134 -0
  231. package/built-in-skills/skill-authoring/skill.json +74 -0
  232. package/built-in-skills/skill-builder/SKILL.md +171 -0
  233. package/built-in-skills/skill-builder/scripts/ingest.mjs +265 -0
  234. package/built-in-skills/skill-creator/LICENSE.txt +202 -0
  235. package/built-in-skills/skill-creator/SKILL.md +227 -0
  236. package/built-in-skills/skill-creator/agents/analyzer.md +274 -0
  237. package/built-in-skills/skill-creator/agents/comparator.md +202 -0
  238. package/built-in-skills/skill-creator/agents/grader.md +223 -0
  239. package/built-in-skills/skill-creator/assets/eval_review.html +146 -0
  240. package/built-in-skills/skill-creator/eval-viewer/generate_review.py +471 -0
  241. package/built-in-skills/skill-creator/eval-viewer/viewer.html +1325 -0
  242. package/built-in-skills/skill-creator/references/external-library-import.md +110 -0
  243. package/built-in-skills/skill-creator/references/schemas.md +430 -0
  244. package/built-in-skills/skill-creator/scripts/__init__.py +0 -0
  245. package/built-in-skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  246. package/built-in-skills/skill-creator/scripts/generate_report.py +326 -0
  247. package/built-in-skills/skill-creator/scripts/import-library.mjs +475 -0
  248. package/built-in-skills/skill-creator/scripts/improve_description.py +247 -0
  249. package/built-in-skills/skill-creator/scripts/package_skill.py +136 -0
  250. package/built-in-skills/skill-creator/scripts/quick_validate.py +103 -0
  251. package/built-in-skills/skill-creator/scripts/run_eval.py +310 -0
  252. package/built-in-skills/skill-creator/scripts/run_loop.py +328 -0
  253. package/built-in-skills/skill-creator/scripts/utils.py +47 -0
  254. package/built-in-skills/slack-gif-creator/LICENSE.txt +202 -0
  255. package/built-in-skills/slack-gif-creator/SKILL.md +291 -0
  256. package/built-in-skills/slack-gif-creator/core/easing.py +234 -0
  257. package/built-in-skills/slack-gif-creator/core/frame_composer.py +176 -0
  258. package/built-in-skills/slack-gif-creator/core/gif_builder.py +269 -0
  259. package/built-in-skills/slack-gif-creator/core/validators.py +136 -0
  260. package/built-in-skills/slack-gif-creator/requirements.txt +4 -0
  261. package/built-in-skills/tasks/SKILL.md +413 -0
  262. package/built-in-skills/tdd/LICENSE +21 -0
  263. package/built-in-skills/tdd/SKILL.md +110 -0
  264. package/built-in-skills/tdd/mocking.md +59 -0
  265. package/built-in-skills/tdd/refactoring.md +10 -0
  266. package/built-in-skills/tdd/tests.md +61 -0
  267. package/built-in-skills/team/SKILL.md +77 -0
  268. package/built-in-skills/web-artifacts-builder/LICENSE.txt +202 -0
  269. package/built-in-skills/web-artifacts-builder/SKILL.md +105 -0
  270. package/built-in-skills/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
  271. package/built-in-skills/web-artifacts-builder/scripts/init-artifact.sh +334 -0
  272. package/built-in-skills/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
  273. package/built-in-skills/webapp-testing/LICENSE.txt +202 -0
  274. package/built-in-skills/webapp-testing/SKILL.md +97 -0
  275. package/built-in-skills/webapp-testing/examples/console_logging.py +35 -0
  276. package/built-in-skills/webapp-testing/examples/element_discovery.py +40 -0
  277. package/built-in-skills/webapp-testing/examples/static_html_automation.py +33 -0
  278. package/built-in-skills/webapp-testing/scripts/with_server.py +106 -0
  279. package/built-in-skills/wechat-pay/SKILL.md +59 -0
  280. package/dist/cli.cjs +72577 -16101
  281. package/dist/cli.js +72752 -16232
  282. package/dist/index.cjs +72632 -16024
  283. package/dist/index.d.cts +4956 -640
  284. package/dist/index.d.ts +4956 -640
  285. package/dist/index.js +72564 -15963
  286. package/package.json +39 -6
  287. package/plugins/memory/prismer/__init__.py +1211 -0
  288. package/plugins/memory/prismer/plugin.yaml +8 -0
  289. package/plugins/memory/prismer/tool-schemas.generated.json +249 -0
  290. package/plugins/tools/prismer-recall/__init__.py +282 -0
  291. package/plugins/tools/prismer-recall/plugin.yaml +15 -0
@@ -0,0 +1,253 @@
1
+ ---
2
+ name: pkf-svg
3
+ scope: common
4
+ description: 'Design controlled SVG, visual widgets, topology and Visual Core explainers with semantic color, safe geometry, accessibility, and bounded complexity. Use for an explicitly supported SVG/widget surface or to plan PKF visuals. PKF v1.1 has no production inline-SVG authoring surface (diagrams are Mermaid, data charts are d3); v1.2 controlled prismer-svg (pkf209 D19) is activated for PKF source authoring within the frozen validator whitelist.'
5
+ metadata:
6
+ aliases:
7
+ - pkf-visual
8
+ ---
9
+
10
+ # pkf-svg
11
+
12
+ Visual discipline for controlled SVG, widgets, architecture/topology maps,
13
+ and Visual Core experiments. It owns composition, semantic color, geometry,
14
+ safety, and a11y — not PKF persistence or memory placement.
15
+
16
+ ## Production boundary (tell the truth)
17
+
18
+ - PKF v1.1 keeps no `prismer-svg` production authoring element: SVG travels as
19
+ a reviewed static asset or a trusted host surface only.
20
+ - PKF v1.2 CONTROLLED `prismer-svg` (docs/pkf209 03 D19) is ACTIVATED
21
+ (2026-08-18): it may be authored inside PKF source. The production reader
22
+ validates against the frozen whitelist — script, foreignObject, on*,
23
+ external href, animation and canvas overflow are hard structure failures
24
+ (stable `svg-*` codes), not soft conventions. Never author free/raw SVG in
25
+ any version.
26
+ - In PKF, author diagrams with `<prismer-diagram format="mermaid">`; use
27
+ Mermaid `erDiagram|flowchart|sequenceDiagram|xychart-beta` as appropriate.
28
+ - Author data charts with `prismer-data` views
29
+ `chart-bar|chart-line|chart-pie`; the production reader renders them with d3.
30
+ - Mermaid renders classic today. D19 proposes host-only `handDrawn|neo`
31
+ top-right menu toggles; the workspace host (DiagramView) ships this
32
+ radiogroup — keyboard reachable, persisted per workspace, source never
33
+ carries look. Other hosts may not offer the toggle, so do not rely on
34
+ non-classic look.
35
+ - Mermaid actor/entity/class colors SHOULD use the semantic ramps below.
36
+ Implemented status (D19 §7): the workspace reader's `resolveMermaidTheme`
37
+ consumes this exact 9×7 table for themeVariables by diagram family —
38
+ sequence actor = blue (system), sequence alt/opt branch frame + activation
39
+ = amber (attention/reversible), note/signal = gray (annotation), erDiagram
40
+ entity = teal (approved), classDiagram box = purple (control), flowchart
41
+ nodes = blue (system). Honest limits: flowchart decision diamonds share
42
+ node colors (mermaid has no diamond-specific themeVariables), and mermaid
43
+ 11.x does not consume `attributeBackgroundColorOdd/Even` for erDiagram
44
+ attribute rows. Unknown diagram types keep the accent palette fallback.
45
+ - Apply the SVG rules below for any trusted SVG/widget surface, and for
46
+ `prismer-svg` authored in PKF source (v1.2 activated). Otherwise use Mermaid,
47
+ d3, semantic HTML/prose, or a reviewed static asset.
48
+
49
+ ## Scenario routing
50
+
51
+ - ERD/database schema → Mermaid `erDiagram`, never hand-drawn.
52
+ - Sequential process/decision tree → Mermaid `flowchart`; ≤5 flow nodes.
53
+ - Statistical data → d3 chart view; tables → markdown table, not a figure.
54
+ - Controlled SVG/widget → structural, illustrative, or multi-cluster topology
55
+ only when Mermaid/data surfaces cannot express the intended hierarchy.
56
+ - Loops/cycles → stepper with an explicit wrap-back cue, never a decorative ring.
57
+
58
+ ## Quality floor: 680×480 topology reference
59
+
60
+ - Use a 680×480 reference canvas for dense topology; preserve the safe area
61
+ x=40..640 and keep the bottom-most element at least 20px above the edge.
62
+ - Build at least 3 information layers: figure → container → node or status.
63
+ Containers express bounded contexts; nodes express actors/services/resources;
64
+ status annotations never compete with the primary topology.
65
+ - Provide accessible `<title>` and `<desc>` in any trusted SVG surface, plus
66
+ visible labels. Accessibility text must explain the same relationships.
67
+ - Use 0.5px default strokes, boundary-anchored connectors, symmetric padding,
68
+ and named geometry constants. Nothing clips or floats outside its owner.
69
+ - Maintain stable density: consistent node heights, spacing rhythm, label
70
+ lengths, and connector clearance across peer clusters.
71
+
72
+ ## Validator quality floors (stable svg-* rejections)
73
+
74
+ The frozen whitelist audit also rejects objectively unreadable figures:
75
+ svg-too-sparse (<3 visible shapes), svg-monochrome (<2 distinct shape fills,
76
+ backdrop excluded), svg-contrast (text vs container below the 3.0 WCAG
77
+ large-text floor), svg-text-overflow (label width outside x∈[40, width-40]),
78
+ svg-stroke-floor (authored stroke-width <0.5), svg-unlabeled (zero visible
79
+ labels). Each message names the element to fix — repair, never argue.
80
+
81
+ ## Copy-first authoring loop
82
+
83
+ ```text
84
+ 1. copy the skeleton below into ONE `prismer-svg` element (wrapper carries
85
+ width/height/viewBox; the markup inside is the <svg> block)
86
+ 2. replace labels, coordinates and colors — ramp hexes from the table only
87
+ 3. run `pkf_svg_check({"svg":"<complete svg markup>"})` and fix every svg-*
88
+ error (one round: each diagnostic names the element/attribute to change)
89
+ 4. only then `pkf_validate` the complete PKF and persist
90
+ ```
91
+
92
+ `pkf_svg_check` is a pure local tool: write → check → fix without spending a
93
+ persist round. If the runtime does not offer it, fall back to `pkf_validate`
94
+ on the whole document.
95
+
96
+ ## Skeleton — 680×480, three layers (copy verbatim)
97
+
98
+ ```svg
99
+ <svg viewBox="0 0 680 480" role="img" aria-label="Skeleton: two clusters with one orthogonal edge">
100
+ <title>Skeleton: two clusters, one orthogonal edge</title>
101
+ <desc>Copyable 680x480 skeleton in three layers: backdrop (neutral canvas plus figure title), edges (orthogonal connectors), nodes (clusters, node rects, labels). Replace labels, coordinates and ramp colors.</desc>
102
+ <g id="sk-backdrop">
103
+ <rect x="0" y="0" width="680" height="480" rx="12" fill="#F1EFE8" stroke="#B4B2A9" stroke-width="0.5"></rect>
104
+ <text x="40" y="32" font-size="13" font-weight="500" fill="#2C2C2A">Figure title — replace</text>
105
+ </g>
106
+ <g id="sk-edges">
107
+ <line x1="248" y1="170" x2="432" y2="170" stroke="#5F5E5A" stroke-width="0.5"></line>
108
+ <circle cx="248" cy="170" r="2.5" fill="#5F5E5A"></circle>
109
+ <circle cx="432" cy="170" r="2.5" fill="#5F5E5A"></circle>
110
+ <text x="340" y="158" font-size="11" fill="#444441" text-anchor="middle">relates</text>
111
+ </g>
112
+ <g id="sk-nodes">
113
+ <rect x="40" y="72" width="208" height="196" rx="10" fill="#E6F1FB" stroke="#185FA5" stroke-width="0.5"></rect>
114
+ <text x="56" y="94" font-size="12" font-weight="500" fill="#0C447C">Cluster A · blue · system</text>
115
+ <rect x="56" y="106" width="176" height="34" rx="6" fill="#FFFFFF" stroke="#185FA5" stroke-width="0.5"></rect>
116
+ <text x="64" y="127" font-size="12" fill="#0C447C">Node label one</text>
117
+ <rect x="56" y="152" width="176" height="34" rx="6" fill="#FFFFFF" stroke="#185FA5" stroke-width="0.5"></rect>
118
+ <text x="64" y="173" font-size="12" fill="#0C447C">Node label two</text>
119
+ <rect x="432" y="72" width="208" height="196" rx="10" fill="#E1F5EE" stroke="#0F6E56" stroke-width="0.5"></rect>
120
+ <text x="448" y="94" font-size="12" font-weight="500" fill="#085041">Cluster B · teal · ready</text>
121
+ <rect x="448" y="106" width="176" height="34" rx="6" fill="#FFFFFF" stroke="#0F6E56" stroke-width="0.5"></rect>
122
+ <text x="456" y="127" font-size="12" fill="#085041">Node label one</text>
123
+ <rect x="448" y="152" width="176" height="34" rx="6" fill="#FFFFFF" stroke="#0F6E56" stroke-width="0.5"></rect>
124
+ <text x="456" y="173" font-size="12" fill="#085041">Node label two</text>
125
+ </g>
126
+ <text x="40" y="452" font-size="11" fill="#444441">Fallback caption — describe the same relationships in words.</text>
127
+ </svg>
128
+ ```
129
+
130
+ Layer contract: `sk-backdrop` (neutral canvas + figure title), `sk-edges`
131
+ (orthogonal connectors between clusters), `sk-nodes` (cluster frames, node
132
+ rects, labels). Safe area x=40..640; bottom-most element ≥20px above y=480.
133
+
134
+ ## Fragments — cluster / node / orthogonal edge
135
+
136
+ Each fragment is standalone-valid; copy the inner layer you need into the
137
+ skeleton and re-check with `pkf_svg_check` after editing.
138
+
139
+ ```svg
140
+ <svg viewBox="0 0 240 150" role="img" aria-label="Cluster frame fragment">
141
+ <title>Cluster frame fragment</title>
142
+ <desc>One bounded-context frame with a title row and one node slot.</desc>
143
+ <rect x="0" y="0" width="240" height="150" rx="8" fill="#F1EFE8"></rect>
144
+ <rect x="40" y="24" width="160" height="96" rx="10" fill="#E6F1FB" stroke="#185FA5" stroke-width="0.5"></rect>
145
+ <text x="52" y="44" font-size="12" font-weight="500" fill="#0C447C">Cluster · context</text>
146
+ <rect x="52" y="56" width="136" height="30" rx="6" fill="#FFFFFF" stroke="#185FA5" stroke-width="0.5"></rect>
147
+ <text x="60" y="76" font-size="12" fill="#0C447C">Node label</text>
148
+ </svg>
149
+ ```
150
+
151
+ ```svg
152
+ <svg viewBox="0 0 240 150" role="img" aria-label="Node and status fragment">
153
+ <title>Node and status fragment</title>
154
+ <desc>One node rect plus a status chip from a second ramp family.</desc>
155
+ <rect x="0" y="0" width="240" height="150" rx="8" fill="#F1EFE8"></rect>
156
+ <rect x="40" y="28" width="136" height="34" rx="6" fill="#FFFFFF" stroke="#185FA5" stroke-width="0.5"></rect>
157
+ <text x="52" y="49" font-size="12" fill="#0C447C">Node label</text>
158
+ <rect x="40" y="72" width="136" height="22" rx="5" fill="#FAEEDA" stroke="#854F0B" stroke-width="0.5"></rect>
159
+ <text x="52" y="87" font-size="11" font-weight="500" fill="#633806">attention note</text>
160
+ </svg>
161
+ ```
162
+
163
+ ```svg
164
+ <svg viewBox="0 0 300 120" role="img" aria-label="Orthogonal edge fragment">
165
+ <title>Orthogonal edge fragment</title>
166
+ <desc>Two nodes joined by an orthogonal polyline with endpoint dots and a label.</desc>
167
+ <rect x="0" y="0" width="300" height="120" rx="8" fill="#F1EFE8"></rect>
168
+ <rect x="40" y="40" width="80" height="36" rx="6" fill="#E6F1FB" stroke="#185FA5" stroke-width="0.5"></rect>
169
+ <text x="52" y="62" font-size="12" fill="#0C447C">source</text>
170
+ <polyline points="120,58 160,58 160,80 204,80" fill="none" stroke="#5F5E5A" stroke-width="0.5"></polyline>
171
+ <rect x="204" y="62" width="80" height="36" rx="6" fill="#E1F5EE" stroke="#0F6E56" stroke-width="0.5"></rect>
172
+ <text x="216" y="84" font-size="12" fill="#085041">target</text>
173
+ <text x="160" y="48" font-size="11" fill="#444441" text-anchor="middle">relates</text>
174
+ </svg>
175
+ ```
176
+
177
+ ## Semantic ramp hex table (host tokens — hex only, never CSS variables)
178
+
179
+ | family | 50 | 100 | 200 | 400 | 600 | 800 | 900 |
180
+ | --- | --- | --- | --- | --- | --- | --- | --- |
181
+ | purple | #EEEDFE | #CECBF6 | #AFA9EC | #7F77DD | #534AB7 | #3C3489 | #26215C |
182
+ | teal | #E1F5EE | #9FE1CB | #5DCAA5 | #1D9E75 | #0F6E56 | #085041 | #04342C |
183
+ | coral | #FAECE7 | #F5C4B3 | #F0997B | #D85A30 | #993C1D | #712B13 | #4A1B0C |
184
+ | pink | #FBEAF0 | #F4C0D1 | #ED93B1 | #D4537E | #993556 | #72243E | #4B1528 |
185
+ | gray | #F1EFE8 | #D3D1C7 | #B4B2A9 | #888780 | #5F5E5A | #444441 | #2C2C2A |
186
+ | blue | #E6F1FB | #B5D4F4 | #85B7EB | #378ADD | #185FA5 | #0C447C | #042C53 |
187
+ | green | #EAF3DE | #C0DD97 | #97C459 | #639922 | #3B6D11 | #27500A | #173404 |
188
+ | amber | #FAEEDA | #FAC775 | #EF9F27 | #BA7517 | #854F0B | #633806 | #412402 |
189
+ | red | #FCEBEB | #F7C1C1 | #F09595 | #E24B4A | #A32D2D | #791F1F | #501313 |
190
+
191
+ Light mode = 50 fill + 600 stroke + 800 title; dark = 800 fill + 200 stroke
192
+ + 100 title (same table, different usage). The svg-monochrome floor requires
193
+ ≥2 distinct families among shape fills.
194
+
195
+ ## Coordinate grid reference
196
+
197
+ - x columns at 60px rhythm: 40, 100, 160, 220, 280, 340, 400, 460, 520, 580,
198
+ 640 — labels start at a column, nodes span 3 columns (176px at 56px inset).
199
+ - y bands: figure title 32, cluster title 94, node rows 127 / 173 (34px tall,
200
+ 46px pitch), legend 316..346, fallback caption 378..394, bottom ≥460.
201
+
202
+ ## Semantic color and complexity
203
+
204
+ - Palette ramps: purple/teal/coral/pink/gray/blue/green/amber/red; use host
205
+ tokens, never improvised hex values. Shape/size/color changes encode meaning.
206
+ - Stable defaults: blue = system/deployment, teal = approved/ready/success,
207
+ purple = control/rollback, amber = attention/reversible action, and red =
208
+ risk/blocker only. Use gray for annotation, never to weaken a main branch.
209
+ - Dark surfaces preserve depth: map light 50 → dark 800 and light 100 →
210
+ dark 900; keep text/connector contrast explicit instead of auto-inverting.
211
+ - Ordinary figure default: ≤2 ramps per figure.
212
+ - Complex topology/architecture exception: group by bounded context and use
213
+ up to 4 domain ramps, plus 1 reserved status/risk ramp. Each visual group
214
+ remains ≤2 ramps. Color must express category or status and carry a text cue;
215
+ color alone is never the only signal.
216
+ - A figure containing two small flows keeps each of the two small flows ≤2
217
+ ramps; do not borrow the topology exception for decorative variety.
218
+ - ≤4 boxes per horizontal tier, ≤5 nodes per simple flow, nesting ≤3,
219
+ subtitles ≤5 words, and ≥60px between flow boxes.
220
+
221
+ ## Typography and composition
222
+
223
+ - Weights 400/500 only; minimum 11px; sentence case; no emoji as iconography.
224
+ - One reading direction and one focal story. Use primary/secondary/annotation
225
+ rhythm; do not distribute motifs merely to fill the canvas.
226
+ - Labels remain inside their owning container and outside the object they name.
227
+ - Legends reuse rendered token colors and pair every swatch with a label.
228
+
229
+ ## Safety and accessibility gate
230
+
231
+ - The host allowlist is authoritative. Never emit `script`, `foreignObject`,
232
+ event handler (`on*`), external URL/reference, remote CSS/font, animation,
233
+ iframe, image, or untrusted `use` content.
234
+ - v1.2 wire: the frozen validator whitelist (elements {svg,g,rect,circle,
235
+ ellipse,line,path,polyline,polygon,text,tspan,title,desc}, geometry/paint/
236
+ text attributes, budgets 512 elements / 2048 attributes / viewBox ≤4096) is
237
+ enforced by the production reader — author inside it, never around it.
238
+ - Internal fragment IDs must be unique and namespaced; references stay local.
239
+ - Every connector has a visible endpoint and a textual relationship cue.
240
+ - On rejection or unsupported surfaces, fail closed to source/prose/static
241
+ fallback; never claim a sanitized or dropped figure was persisted.
242
+
243
+ ## Self-check
244
+
245
+ - Correct surface and scenario? v1.2 controlled prismer-svg stays inside the
246
+ frozen whitelist — script/foreignObject/on*/external refs/animations absent,
247
+ title+desc present, ids unique — and is never free/raw?
248
+ - Copied the skeleton, kept three information layers, 680 safe area,
249
+ title+desc, 0.5px, stable density — and `pkf_svg_check` is green?
250
+ - Ordinary ≤2 ramps, or a justified bounded-context exception within caps?
251
+ - Color has semantic meaning plus a text cue; each visual group remains ≤2?
252
+ - One reading direction, boundary anchors, no clipping, stable peer rhythm?
253
+ - Unsafe tags/attributes/external references absent; fallback remains readable?
@@ -0,0 +1,236 @@
1
+ ---
2
+ name: pkf-writing
3
+ scope: common
4
+ description: Author, update, convert, validate, persist, and render PKF (`.pkf`) content through message-inline, Library Asset, or Memory Page carriers. Use for structured reports, knowledge pages, delivery cards, or any `.pkf` body. NOT for recall, memory-graph placement, or curation decisions — those belong to the `memory` skill.
5
+ ---
6
+
7
+ # pkf-writing
8
+
9
+ PKF is the workspace long-content format: sanitized HTML plus frontmatter,
10
+ typed links, and controlled media/data/math/interactive elements. This skill
11
+ owns PKF authoring and carrier discipline. The `memory` skill decides what to
12
+ remember and where; domain workflows decide when a deliverable is required.
13
+
14
+ ## Choose exactly one carrier
15
+
16
+ | Carrier | Authority | Validation, persist, and readback | Reply |
17
+ | --- | --- | --- | --- |
18
+ | Message inline | PKF bytes delivered mechanically by `pkf_reply_inline`; the attached inline ContentBlock is durable with the message | validate the complete file BEFORE the call; the Runtime re-reads, re-validates, and attaches it for you; inspect the extracted/rendered receipt | Markdown projection is the reply text; never paste sentinel comments, never attach the .pkf as a file |
19
+ | Library `.pkf` Asset | Library asset bytes + content hash/revision + scoped URI | dependency-free: host Library writer; dependency-bearing: atomic `pkf_bundle_commit`; read back authoritative root and graph | link the root asset and include a short projection |
20
+ | Memory Page | Memory Page body + page revision | ask `memory` to choose/create the page; validate before its domain writer; read back the page and revision | summarize the remembered fact and canonical page |
21
+
22
+ Carrier authority is exclusive. Markdown projection is a readable derivative,
23
+ never canonical authority. Never report success from local draft bytes alone.
24
+ When the user asks for an article/report in chat and does not explicitly ask
25
+ for a downloadable file or Memory page, choose Message inline. Do not create
26
+ an attachment merely because the task workspace exposes an artifacts folder.
27
+
28
+ ### Message-inline delivery (pkf_reply_inline)
29
+
30
+ Deliver mechanically, never by pasting wire bytes: save the validated PKF to a file in
31
+ the task scratch dir, then call `pkf_reply_inline({"path":"memo.pkf"})` exactly once and
32
+ reply in Markdown projection; the Runtime attaches the ContentBlock. If validation is
33
+ not green, do not deliver at all.
34
+ Never paste sentinel comments into the reply; never attach the .pkf as a file; the
35
+ Runtime still extracts the bytes between the two sentinels
36
+ `<!-- prismer-pkf:inline:start -->` / `<!-- prismer-pkf:inline:end -->` for legacy agents that predate the tool — do not hand-write that region.
37
+
38
+ ## Authoring loop (all carriers)
39
+
40
+ ```text
41
+ 1. choose carrier + authority → message inline | Library Asset | Memory Page
42
+ 2. inspect source and refs → copy real resolved URIs; never fabricate
43
+ 3. mint + author + validate → `pkf_mint_sids` once; repair every error; resolve referenced assets
44
+ 4. persist through owner → `pkf_reply_inline` | Library/bundle writer | memory writer
45
+ 5. readback + project → URI/revision/hash + resolved validation; concise Markdown projection
46
+ ```
47
+
48
+ **Never fabricate a URI.** Copy scoped `prismer://workspace/<ws>/asset/<sha256>` values
49
+ from browse/resolve results. Inside one atomic bundle, reference bundle files by their
50
+ bundle-relative path (e.g. `manifest="manifest.json"`, `src="data.csv"`); the Runtime
51
+ normalizer computes every SHA-256 content hash, SRI and source hash, generates the harness
52
+ manifest from `harnessDecl`, and rewrites those references into host-bound scoped asset URIs
53
+ before the commit. Do not compute or hand-type hashes yourself — supply content (`bytesBase64` or
54
+ `text`), paths, mime and usage only; a self-supplied hash is verified locally and a mismatch fails fast.
55
+ Do not pass actor or workspace arguments to the commit tool; the host binds authority. If
56
+ host-bound scope is unavailable, stop instead of guessing it. No base64/data-URI assets,
57
+ remote scripts/fonts, or new bare `prismer://asset/<id>` references. If persistence or
58
+ readback is unavailable, say so and retain a draft; never fake a revision.
59
+
60
+ ## Real command matrix and editing lanes
61
+
62
+ | Need | Structured/runtime | Native/Cloud CLI |
63
+ | --- | --- | --- |
64
+ | mint section ids | `pkf_mint_sids` | n/a |
65
+ | inspect | `pkf_outline`, `pkf_search`, `pkf_read` | `cloud pkf inspect` or ordinary UTF-8 read |
66
+ | edit local draft | normal file tools | `cloud pkf patch`, `cloud pkf diff` |
67
+ | validate | `pkf_validate` | `cloud pkf validate` |
68
+ | deliver message-inline | `pkf_reply_inline` (task scratch/workdir file path) | n/a |
69
+ | persist Library Asset | host Library writer | `cloud asset upload` only when the host exposes it; require its receipt |
70
+ | persist logical bundle | `pkf_bundle_commit` | one atomic root + dependency graph; require readback |
71
+ | persist Memory Page | `memory_browse` → `memory_write` → `memory_load` | n/a |
72
+ | project/export | host projection | `cloud pkf project`, `cloud pkf render` |
73
+ | harness assets | n/a | `cloud pkf pack-harness` |
74
+
75
+ `pkf_mint_sids`/`pkf_validate`/`pkf_outline`/`pkf_search`/`pkf_read`/
76
+ `pkf_bundle_commit`/`pkf_reply_inline` are native **function-call tools** —
77
+ not shell executables. Call them through the tool API with JSON arguments;
78
+ never `command -v`, terminal probes, Python imports, or hand-written SID/validator
79
+ replacements. The shell lane is only `cloud …`. If a required native tool and
80
+ `cloud` are both unavailable, keep a draft and report the Runtime capability error.
81
+
82
+ The `.pkf` file is ordinary UTF-8. Validate the whole page after every edit;
83
+ a 409/412 means re-read and re-target, never force. After persistence, read
84
+ back canonical bytes/receipt and run resolved validation where supported.
85
+
86
+ ## Report quality floor
87
+
88
+ Before `pkf_reply_inline` or any carrier persist, run a quality self-check.
89
+ A valid PKF shell can still be an unacceptable deliverable: strict validation
90
+ only proves the carrier is parseable. For substantive research memos,
91
+ playbooks, and architecture reviews, unless the user asks plain text, include:
92
+ - five or more semantic sections, including decision/summary and action/checklist;
93
+ - at least two rich affordances chosen by need: comparison/risk/ownership table,
94
+ `<prismer-diagram ...>`, `<prismer-data ...>`, `<prismer-widget ...>`, or
95
+ CONTROLLED `prismer-svg` via `pkf-svg` + `pkf_svg_check`;
96
+ - caption/alt text that explains what each visual proves, not decoration.
97
+
98
+ If no visual/data/widget is useful, state that in the Markdown projection after readback; never add ornamental content just to satisfy the checklist.
99
+
100
+ ## Core format (PKF v1.1 strict)
101
+
102
+ Canonical MIME: `application/vnd.prismer.pkf+html`.
103
+
104
+ ```html
105
+ <script type="application/prismer+json">
106
+ {"type":"note","title":"Database choice","description":"Chose PostgreSQL over MySQL.","tags":["db","decision"],"timestamp":"2026-06-29T00:00:00Z","visibility":"workspace","sensitivity":"none","pkfVersion":"1.1","presentation":{"theme":"knowledge","density":"comfortable","fontProfile":"auto","locale":"zh-CN"}}
107
+ </script>
108
+ <section><h2 id="decision" data-sid="sec_01k2f6m8v7q4x9a3b5c6d7e8f9">Decision</h2><p>…</p></section>
109
+ ```
110
+
111
+ - `description` is required and feeds previews/TOC. Presentation theme is
112
+ `knowledge|editorial|technical`; density `compact|comfortable`; fontProfile
113
+ `auto|sans|serif`; locale is BCP-47. Font profiles never accept URLs.
114
+ - Each `<section>` first direct heading carries `id` + stable `data-sid` (`sec_` + 26
115
+ lowercase Crockford base32). Mint once; renames do not change it.
116
+ - Typed relations: `derived-from|contradicts|supports|child-of|related|references|cites`.
117
+ Copy hrefs from browse/search results. `child-of` points from child to hub.
118
+ - Strict errors: scripts/styles, inline handlers/style, javascript URLs, bare
119
+ asset URIs, malformed frontmatter, duplicate/illegal section identities.
120
+
121
+ ## Semantic content and security
122
+
123
+ Use headings, paragraphs, lists, blockquotes, code/pre, tables, figure/figcaption,
124
+ details/summary, footnote roles, and optional `data-pkf-layout="columns-2|wide|full-bleed"`.
125
+ Every media figure has alt text or figcaption. Sanitization does not grant permission:
126
+ rejected content must not be persisted as successful PKF; a raw upload may remain
127
+ quarantined but must never render active or be reported as a successful canonical write.
128
+
129
+ - Media pointers use scoped resolved URIs; never embed copies or remote media.
130
+ - `<prismer-file src="…" name="guide.pdf" mime="application/pdf" bytes="476356">`
131
+ uses a pathless name; unknown MIME degrades to a generic card.
132
+ - `<prismer-data format="csv" view="table" caption="…">…</prismer-data>`; formats
133
+ `csv|tsv|json|ndjson|parquet|arrow|npz`, views
134
+ `table|line|bar|scatter|area|heatmap|json-tree|chart-bar|chart-line|chart-pie`.
135
+ - `<prismer-math format="tex" display="inline|block">E = mc^2</prismer-math>`;
136
+ TeX only, KaTeX trust=false, ≤16 KiB; unsafe/unknown macros fall back to source.
137
+
138
+ ## Visual capabilities: content → visual selection, delegate the grammar
139
+
140
+ Content → visual selection (一图胜千言 — pick by content shape); structured
141
+ reports plan visuals in the outline, never decorate afterwards:
142
+
143
+ | Content shape | Visual | Carrier |
144
+ | --- | --- | --- |
145
+ | Entities + relationships (architecture, topology, integrations) | diagram | `<prismer-diagram format="mermaid">` (`flowchart`/`erDiagram`) |
146
+ | Decision paths, state machines, protocols | diagram | `<prismer-diagram format="mermaid">` (`flowchart`/`sequenceDiagram`) |
147
+ | Who does what when (handoffs, orchestration) | sequence diagram | `<prismer-diagram format="mermaid">` |
148
+ | Numbers compared across categories (gaps, scores, counts) | bar chart | `<prismer-data view="chart-bar">` |
149
+ | Trend over stages/time (adoption, latency, cost) | line chart | `<prismer-data view="chart-line">` |
150
+ | Part-to-whole (share of count/risk/effort) | pie chart | `<prismer-data view="chart-pie">` |
151
+ | Maturity/phases/gates | flowchart or table | `<prismer-diagram>` / table |
152
+
153
+ A report with ≥3 major sections and zero visuals is a smell — justify prose-only in one
154
+ sentence or add the missing visual; never duplicate (chart OR table OR prose enumeration);
155
+ every caption states the takeaway, not the mechanics, and prose carries interpretation only.
156
+
157
+ Load `pkf-svg` for visual planning, widget composition, accessibility, and quality review;
158
+ it owns visual/SVG grammar, this skill only routes the carrier. Simple diagrams stay on
159
+ `<prismer-diagram format="mermaid" caption="…">` (Mermaid
160
+ `erDiagram|flowchart|sequenceDiagram|xychart-beta`); data stay on d3-backed
161
+ `chart-bar|chart-line|chart-pie`.
162
+
163
+ ### Visual SOURCES — four lanes, one rule: the pointer must be a scoped URI
164
+
165
+ 1. **Draw it natively (preferred for facts)** — Mermaid diagrams and `prismer-data` charts
166
+ from YOUR structured data: deterministic, editable, theme-consistent, zero external
167
+ dependency. Prefer it whenever the visual encodes facts the report states.
168
+ 2. **Author controlled SVG** (PKF v1.2 CONTROLLED `prismer-svg`, pkf209 D19 activated
169
+ 2026-08-18; grammar owned by `pkf-svg`) — for topology/complex hierarchy Mermaid cannot
170
+ express: copy the pkf-svg skeleton, verify with `pkf_svg_check({"svg":"…"})` until green.
171
+ 3. **AI-generate imagery** (`image-generate` skill) — concept/mood visuals only (metaphor,
172
+ hero, illustration), never for facts. `cloud deliver` it into the workspace, read back
173
+ the asset id/hash, reference the scoped URI in the body
174
+ (`<figure><img src="prismer://workspace/<ws>/asset/<hash>">`), caption as generated.
175
+ 4. **Web imagery** (`web_load`/web search) — licensed/public imagery must be DOWNLOADED and
176
+ materialized as a workspace asset first (same scoped-URI path as lane 3); remote URLs
177
+ never render. Public-domain/permissive sources only; attribute in the caption.
178
+
179
+ Selection order: facts → lane 1; Mermaid-inexpressible structure → lane 2; concept/mood →
180
+ lane 3; real-world photos/screenshots → lane 4 (or lane 3 when nothing suitable exists).
181
+ If `pkf-svg` is unavailable, fallback to Mermaid for diagrams, d3 for data, semantic
182
+ HTML/prose, or a reviewed static asset. Do not hand-roll free SVG.
183
+
184
+ - Mermaid fences from imported markdown serialize into the same diagram element:
185
+ `PKF_EXAMPLE_INLINE_DIAGRAM`, `PKF_EXAMPLE_ER_DIAGRAM`, `PKF_EXAMPLE_MERMAID_IMPORT`;
186
+ data/image/model: `PKF_EXAMPLE_CHARTS`, `PKF_EXAMPLE_AI_IMAGE`, `PKF_EXAMPLE_MODEL_3D`,
187
+ `PKF_EXAMPLE_MIXED` — all in `src/lib/pkf/examples.ts` (`PKF_EXAMPLE_CAPABILITIES`).
188
+ AI text-to-image output is a reviewed PNG asset with a resolved scoped URI, never an inline substitute or hand-drawn SVG.
189
+ - `<prismer-model format="primitives" caption="…">`: declarative `box|sphere|cylinder|torus|plane`
190
+ JSON, ≤50 objects, zero script; renders as a static frame today.
191
+
192
+ ## Interactive content: widgets first, harness only for custom JS
193
+
194
+ For ordinary interaction (tabbed sections, tag filtering, counters, timelines, checklists)
195
+ use the declarative `<prismer-widget>` — the reader renders it natively with
196
+ zero JS and zero iframe. At most one widget per document, ≤32 entries each, ≤8 KiB total; types
197
+ `tabs|filter|counter|timeline|checklist`.
198
+
199
+ ```html
200
+ <prismer-widget type="tabs">{"tabs":[{"label":"Plan","content":"Phase A complete."},{"label":"Risk","content":"Phase B risk: cache staleness."}]}</prismer-widget>
201
+ ```
202
+ ```html
203
+ <prismer-widget type="checklist">{"title":"Launch gate","items":[{"text":"Tests green","done":true},{"text":"Docs updated","done":false}]}</prismer-widget>
204
+ ```
205
+
206
+ Seed/onboarding PKF must be self-contained: one canonical tour page, stable ids/SIDs, real scoped
207
+ URIs from manifest or bundle readback, no remote URLs/data URIs/base64/invented hashes; success is
208
+ proven by persisted assets, ledger rows, Memory receipts, and DOM/readback — not welcome wording.
209
+
210
+ Only when custom JS is genuinely required — knowing the host mount is NOT implemented yet (a bundle packs and validates but does not render) — use the JS harness below and let the Runtime compute its hashes and manifest.
211
+
212
+ ## Interactive harness
213
+
214
+ Any PKF with JS, CSS, media, CSV, or other support files is one logical bundle. Call
215
+ `pkf_bundle_commit` once with one atomic logical bundle: the PKF root and all dependencies,
216
+ using one stable idempotency key across retries. Completion requires canonical readback of
217
+ the receipt, root, and resource relation graph. Never upload JS, CSS, media, CSV, or
218
+ dependencies separately; never use prose to claim resource relations or attachment associations.
219
+
220
+ `<prismer-interactive manifest="prismer://workspace/<ws>/asset/<sha256>">` points to a versioned
221
+ manifest whose scripts/styles use scoped URIs and real sha256 integrity; the pack command rejects
222
+ traversal, symlinks, remote imports, and oversize; sandbox is allow-scripts without
223
+ allow-same-origin under CSP. Always provide a static no-JS fallback; non-empty actions require governance.
224
+
225
+ ## Validation, readback, projection, export
226
+
227
+ ```text
228
+ native tool: pkf_validate({"source":"<complete PKF>","level":"structure"})
229
+ cloud pkf validate <file> [--level resolved] [--json]
230
+ ```
231
+
232
+ - Every error blocks persistence. Resource refs remain unverified until the
233
+ authority readback resolves them. Structure-only success is not completion.
234
+ - Markdown projection is read-only degradation, never executable or canonical.
235
+ - Standalone export contains no bearer/presigned URLs; private refs degrade to
236
+ labels, interactive content to static fallback, and math uses pinned KaTeX.