@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,471 @@
1
+ ---
2
+ name: memory
3
+ scope: common
4
+ aliases:
5
+ - memory-curation
6
+ description: Persist and retrieve agent memory across sessions — recall via the three-stage protocol (structure route → semantic search → navigation fallback), read via memory_load, see the wiki structure via memory_browse, write well-placed pages via memory_write (including section-level append/rewrite), maintain via memory_curate. Use whenever the user asks to remember/forget something, when you need to look up past decisions or context, or when episodic state matters beyond the current turn. Primary surface is the NATIVE memory_* tools (a `prismer memory` CLI appendix exists for code agents running in a shell).
7
+ ---
8
+
9
+ # Memory
10
+
11
+ Use this skill for **durable episodic memory** — facts, decisions, feedback, and project
12
+ context that need to survive across sessions. Memory has four canonical types: `user`,
13
+ `feedback`, `project`, `reference`. Pages live at semantic paths and are organized as a
14
+ wiki: an `INDEX.pkf` at the top, **hub** pages per topic, and **leaf** pages under hubs.
15
+
16
+ **Richness is the goal.** A memory page should be complete enough that a future session
17
+ works FROM the page instead of re-reading the raw file or the internet. There is no
18
+ length budget on ordinary pages — the only waste is *repetition* (re-extracting what is
19
+ already distilled, re-querying pages already in your context).
20
+
21
+ > **Seam — memory content is PKF; the write invariants are embedded below.** The full
22
+ > body syntax (sections, data views, media, math, harness), validation and projection
23
+ > belong to the **`pkf-writing`** skill, but this skill carries the MANDATORY write
24
+ > invariants inline (see *PKF body standard* below) so a write is safe even when
25
+ > `pkf-writing` is not loaded. **This skill decides WHAT to remember, WHERE it goes, and
26
+ > HOW the graph is maintained.**
27
+
28
+ ## Recall protocol — three stages, in order
29
+
30
+ Answer a workspace-knowledge question by walking these stages. Stop at the first stage
31
+ that answers it; never skip straight to guessing.
32
+
33
+ **STAGE 1 — STRUCTURE ROUTE (first round is hybrid).** The first round of any recall is
34
+ **hybrid — two calls in the same round**, never one instead of the other:
35
+
36
+ - **Parameterless `memory_browse`** — the root structure surface: `{index,
37
+ hubs[{path,title,pageType,snippet,updatedAt}], hubsByRecent[], nearest[]}`. Hub order
38
+ has two views: `hubs[]` is the **structural order** (the order the workspace
39
+ publishes; today hub rows are ordered by the hub's own `updatedAt` DESC — that IS the
40
+ structural-order baseline); within a hub, its children come `updatedAt` DESC. Each hub
41
+ row carries **subtree freshness** — `updatedAt` = the most recent write under that hub
42
+ (the hub row's own `updatedAt` spread with its direct children's). `hubsByRecent[]`
43
+ repeats the **same hub set in recency order** (subtree `updatedAt` DESC) — the "what
44
+ changed" signal; the two orders differ exactly when a child page was written more
45
+ recently than its hub row. **There is no `memory_recent` tool** — recency is a signal
46
+ ON browse results, not a query surface. Hubs are *routing* pages: their job is to tell
47
+ you which leaf to open.
48
+ - **Batch `memory_search`** — extract ≥2 phrasings of the turn's terms into `queries[]`
49
+ (≤8, returned grouped in `resultsByQuery`): one round trip, several recall intents.
50
+ When the turn has no lexical terms ("what changed recently?", "what's the team up
51
+ to?"), the batch **degrades but still runs** — the signal query executes anyway.
52
+
53
+ **Both question types are covered in one round.** Term-bearing questions are covered by
54
+ the batch search; termless questions have exactly the structure surface as their search
55
+ space — term extraction necessarily spins empty on them, so the root browse is what
56
+ catches them.
57
+
58
+ **Exemption — one, and tight: the digest names the answer.** The stable memory map
59
+ (INDEX-TOC + one line per hub) injected at turn start under "Memory Map (auto — stable
60
+ digest)" lets you skip the hybrid round ONLY when it **names the answer outright** — the
61
+ exact hub or page the answer lives in, loadable directly. **A passing one-line mention
62
+ is NOT coverage**: if the digest only mentions the hub or topic, the hybrid first round
63
+ still runs. Structural facts the digest itself states (which topics exist, what a hub
64
+ covers, where a topic's children live) are answered from the map, and `memory_browse`
65
+ with the topic as `query` serves follow-up structure questions on demand.
66
+
67
+ **STAGE 2 — SEMANTIC SEARCH (the hybrid round's hits).** The batch `queries[]` leg
68
+ answered the term-bearing side; its hits are your **decision payload** — hop-decision
69
+ fields tell direct-read vs multi-hop, and the browse-root live structure (including its
70
+ recency signals) tells where to wander next. Read each hit's hop-decision fields before
71
+ deciding what to do:
72
+
73
+ | Field | What it tells you |
74
+ |---|---|
75
+ | `tier` | `wiki` = distilled/curated page (highest trust); `asset` = a raw span a distilled page already cites via `derived-from` (middle); `raw` = the upload's own text, no synthesis (lowest — verify before relying on it) |
76
+ | `hubPath` | the hub this page hangs under — a `wiki` hit is context for its whole hub, so a near-miss here often means the ANSWER is a sibling leaf |
77
+ | `childrenCount` | how many pages fan out under this hit (>0 ⇒ it is a hub you can walk down) |
78
+ | `outboundPreview` / `inboundLinkCount` | where the page points / how linked it is — the cheap next hop |
79
+ | `sectionAnchor` + `sectionPreview` | the exact section that matched — read THAT, not the whole page |
80
+
81
+ `memory_search` returns **ranked hits with lexical evidence** (the query matched the
82
+ page). A high-rank `wiki` hit is usually the answer; `memory_load` the page (or just the
83
+ `#section`) when the snippet is not enough.
84
+
85
+ **STAGE 3 — NAVIGATION FALLBACK (miss).** When your wording matched nothing — or only
86
+ grazed unrelated pages — the response carries **`navigation`** instead of a longer hit
87
+ list:
88
+
89
+ ```
90
+ navigation: { reason: 'text-miss',
91
+ startPoints: [{ path, title, pageType: 'index'|'hub', childrenCount, why: 'structural-entry' }],
92
+ guidance: '…' }
93
+ ```
94
+
95
+ `startPoints` are **starts, not answers** — there is no rank among them, so never read
96
+ them as scored hits and never quote one as the answer. They are the workspace's routing
97
+ entries (INDEX + hubs, children-rich first). Walk them:
98
+
99
+ 1. **Look at the children** of the start point closest to your topic (`memory_browse`
100
+ with the hub as `query`, or `memory_load` the hub — its TOC lists its children).
101
+ 2. **Batch-read the candidates**: one `memory_search` with the candidate topics as
102
+ `queries[]`, or `memory_load` each page. Load the section, not the whole page, when
103
+ the TOC gives you an anchor.
104
+ 3. **Follow links** (`memory_load` returns the page's `links`) until a page actually
105
+ carries the answer.
106
+
107
+ If the walk finds nothing, the knowledge does not exist yet — say so, and consider
108
+ writing it (see *Write flow*) rather than answering from thin air.
109
+
110
+ ## Tool surface (native tools — your primary interface)
111
+
112
+ | Tool | What it does |
113
+ |---|---|
114
+ | `memory_search {query, queries?, limit?, pageType?}` | Semantic/FTS recall + batch; ranked hits with the hop-decision payload, or `navigation` start points on a miss |
115
+ | `memory_load {uri?, path?}` | Read one page (or one section via `#anchor` in the uri) → `{page, content, links}` — `links` are the page's outbound graph edges |
116
+ | `memory_browse {query?}` | **See the structure BEFORE writing** → `{index, hubs[{path,title,pageType,snippet,updatedAt}], hubsByRecent[], nearest[]}` |
117
+ | `memory_write {path, content, title?, parentHubPath?, relation?, op?, section?}` | Create, extend, or section-edit a page; `parentHubPath` attaches it under a hub; `op="append-section"` / `op="rewrite-section"` + `section` edit ONE section (see *Write flow*) |
118
+ | `memory_curate {op, ...}` | Maintenance verbs — see the **memory-dream** skill (write ops are orchestrator-gated) |
119
+
120
+ <!-- GENERATED:tool-params:start -->
121
+ <!-- ⚠️ GENERATED BLOCK — do not hand-edit. -->
122
+ <!-- Regenerate: npx tsx scripts/memory211/generate-memory-tool-contract.ts -->
123
+
124
+ Parameter names below are EXACTLY what the tools accept (trailing `*` = required).
125
+
126
+ - **`memory_search`**: `query*` · `queries[]` · `limit` · `pageType[]`
127
+ - **`memory_load`**: `uri` · `workspaceId` · `path`
128
+ - **`memory_browse`**: `query`
129
+ - **`memory_write`**: `path*` · `content*` · `title` · `parentHubPath` · `relation` (child-of|related) · `op` (replace|append-section|rewrite-section) · `section` · `visibility`
130
+ - **`memory_curate`**: `op*` · `pageId` · `childPaths[]` · `reason` · `kind` · `limit` · `section` · `targetSection` · `sourcePageId` · `sourceSection` · `mergedContent` · `supersededByPageId` · `supersededBySection` · `linkId` · `toPageId` · `toPath` · `toSection`
131
+
132
+ <!-- END GENERATED BLOCK -->
133
+ <!-- GENERATED:tool-params:end -->
134
+
135
+ `web_load` (the workspace URL loader) also accepts `prismer://asset/…` and
136
+ `prismer://…/file/…` URIs — when a memory page points at an asset, load the asset
137
+ on demand through it instead of asking the user to re-attach the file.
138
+
139
+ ## PKF carrier → Memory: automatic durable distillation, explicit exact copy
140
+
141
+ **PKF is the content format, not a fourth carrier.** A valid PKF report remains
142
+ authoritative in its message-inline block or Library Asset. For message-inline delivery,
143
+ the Runtime passes the validated PKF source and its Markdown projection into the normal
144
+ post-turn Memory classifier automatically: durable conclusions are distilled through
145
+ the same browse-first placement flow, while transient report content yields no Page.
146
+ Do not ask the user for a second format choice and do not exact-copy the report merely
147
+ because it is PKF. Dream still reads authoritative **Memory Pages only**.
148
+
149
+ - **Distill durable knowledge (normal path):** inline PKF enters the Runtime post-turn
150
+ classifier automatically; explicit Asset handling or user-requested writes extract only
151
+ surviving conclusions through the browse-first `memory_write` flow — typed source
152
+ pointer, never the whole report.
153
+ - **Preserve the exact inline PKF as Memory (exception):** only when the user explicitly
154
+ wants those exact bytes as the Memory authority — `cloud pkf materialize` (message/block
155
+ revision, source hash, explicit `.pkf` path, idempotency key, `--confirm-path`); no
156
+ native `memory_*` shortcut, no generic Asset→Memory exact-copy. Read back the receipt;
157
+ exact-copy is an exceptional authority transition, not the searchability path.
158
+
159
+ Once either route creates/updates a Memory Page, curation operates on that Page's graph,
160
+ revisions and PKF body—not on its former carrier.
161
+
162
+ ## Deliverable adoption — copy + reference (memory211 轴A)
163
+ A deliverable YOU produced this turn gets an immediate three-way decision: extend the existing page at section granularity, attach a new leaf under the best hub, or SKIP — skipping is a first-class outcome (a one-off answer is not knowledge). Deliverable-derived pages follow the **copy + reference** doctrine: they may carry the source's near-full content so a future session works FROM the page instead of re-opening the asset, and they MUST carry the typed references — exactly ONE `<a rel="derived-from" href="prismer://asset/<assetId>">` pointer, section-anchored `<a rel>` edges, and the source's own vocabulary (proper nouns, codes/numbers, thresholds verbatim) so a paraphrase of the source is still findable. There is no length budget: token usage is recorded, never constrained. Pass `deliverableSource: {assetId, contentHash, sizeBytes}` on `memory_write` — the gate enforces the pointer (422 `deliverable_pointer_missing`), short-circuits a same-deliverable replay as a dedupe-hit, and routes an oversized source to sharding (422 `sharding_required`) instead of one giant page. `memory_search` an existing topic first and extend/supersede any page whose pointer cites a prior revision, never fork.
164
+
165
+ ## Sharding — one page per 64K characters (memory211 §6.9)
166
+
167
+ A **source over 64K characters** never becomes one page, and a distilled **page stays
168
+ under 64K characters**. The write gate rejects an oversized page with
169
+ 422 `sharding_required`; the ingest pipeline plans the split for you (one structural
170
+ **index page** above a run of **shard pages**, `shards/<stem>/shard-000.pkf` …, boundaries
171
+ on content edges). The reference chain is mandatory and is what keeps a shard set
172
+ navigable:
173
+
174
+ ```
175
+ index page --derived-from--> the source asset
176
+ shard page --child-of------> the index page
177
+ ```
178
+
179
+ Write one page per shard (same copy + reference rules), then the index page with its
180
+ TOC. Never merge shards back into a single giant page.
181
+
182
+ ## When to use
183
+
184
+ - The user explicitly says **"remember X"** or **"forget X"** → write or delete immediately.
185
+ - The user references a past decision, preference, or detail you don't have in current context → recall first (three-stage protocol above).
186
+ - **Before answering anything about workspace knowledge you did not just read, run
187
+ the hybrid first round — batch `memory_search` + parameterless `memory_browse`.**
188
+ Attached files are raw sources — check memory for existing
189
+ distilled knowledge before re-reading them. A memory hit is cheaper and already
190
+ synthesized; fall back to the raw asset only when memory misses (`tier: 'raw'` tells
191
+ you that you are reading the source, not the synthesis).
192
+ - After a non-obvious clarification or correction lands, write it so the next session keeps the lesson.
193
+ - After you read/ingest a document and extract durable conclusions, **persist them as a
194
+ placed page in the same turn** — don't leave the knowledge only in your reply.
195
+
196
+ ## Path convention
197
+
198
+ Paths are workspace-relative and **prefix-free** — do NOT add a leading `memory/`:
199
+
200
+ ```
201
+ decisions/llm-provider.pkf ← a leaf under the decisions topic
202
+ projects/desktop-202/decisions.pkf ← nested topic path
203
+ reference/platform.pkf ← a hub page
204
+ ```
205
+
206
+ The platform-owned onboarding seed uses reserved `memory/onboarding/...` paths; that is
207
+ not a pattern for agent-authored pages. Always reuse an existing returned seed path
208
+ verbatim if you extend one.
209
+
210
+ When extending or linking to an existing page, **use its path exactly as returned by
211
+ `memory_browse` / `memory_search`** — never re-derive or hand-normalize a path you saw
212
+ elsewhere. Path drift (adding/dropping a `memory/` prefix, guessing `.pkf` suffixes) is
213
+ the top cause of dead links and dropped edges.
214
+
215
+ ## Write flow (browse-first)
216
+
217
+ Writing memory is **browse → decide placement → write → verify**. Never write blind.
218
+
219
+ **STEP 1 — CONSTRUCT.** Extract the durable knowledge from the conversation and author
220
+ the page body in full (via `pkf-writing`: frontmatter with its one-sentence
221
+ `description` + sections + any rich content). Don't write a path-shaped stub.
222
+
223
+ **STEP 2 — BROWSE.** Call `memory_browse` with your topic as the query.
224
+
225
+ **STEP 3 — DECIDE placement** from what browse returned — exactly one of:
226
+
227
+ - **(a) A page on this topic already exists** (in `nearest`) → **you MUST extend it,
228
+ never fork a near-duplicate page.** Decide at *section* granularity:
229
+ - the page has a section whose topic matches your fact → merge into that section
230
+ (`op="rewrite-section"` with that section's id);
231
+ - the page matches but has no section for this fact → add one
232
+ (`op="append-section"` with a new section id).
233
+ - **(b) It fits under an existing hub** (in `hubs`) → write a **new leaf attached to that
234
+ hub**: pass the hub's path as `parentHubPath`.
235
+ - **(c) Genuinely new topic** (no hub fits) → first create the topic **hub page** (type
236
+ `hub`, a short `#overview` "what this topic covers" body), then write the leaf with
237
+ `parentHubPath` pointing at your new hub.
238
+
239
+ **NEVER write an orphan leaf** — a new page with no hub attachment that extends nothing.
240
+ The platform rejects an unanchored new leaf with a `placement_required` error listing
241
+ the available hubs; if you see that error, re-browse and attach — do not retry verbatim.
242
+
243
+ **STEP 4 — WRITE** with the placement declared structurally, and **validate the body via
244
+ `pkf_validate` BEFORE persisting** (authoring loop from `pkf-writing`).
245
+
246
+ `memory_write` is a mutation: a response containing `{"ok":true}` means that revision
247
+ has already been written. For the same fact/path, **do not call `memory_write` again in
248
+ this turn** to polish, reformat, or “make sure”; that creates another authoritative
249
+ revision. Continue to STEP 5 and use the read surface for verification.
250
+
251
+ **STEP 5 — VERIFY (optional but cheap).** Use `memory_load` on the exact returned path
252
+ (or `memory_search` a key phrase) and confirm it comes back. Verification is read-only;
253
+ never rewrite a successful revision merely to verify it. Then report path + placement +
254
+ one-line description to the user.
255
+
256
+ ## PKF body standard (embedded — MANDATORY)
257
+
258
+ Full syntax lives in the single-file `pkf-writing` SKILL.md; these four invariants a write must never violate:
259
+
260
+ 1. **REQUIRED frontmatter `description` (one sentence)** — in the PKF frontmatter block alongside `type` (`user|feedback|project|reference`), `title`, `pkfVersion "1.1"`; the description feeds previews/TOC — never omit it (frontmatter 写法见 `pkf-writing` skill)。
261
+ 2. **Typed links target what actually exists** — copy hrefs VERBATIM from `memory_browse`/`memory_search`/`memory_load` or asset resolver results, never hand-type; `child-of` points FROM child TO hub.
262
+ 3. **`pkf_validate` BEFORE `memory_write` — every time** — repair ALL errors, then persist (the write gate rejects invalid v1.1 bodies anyway).
263
+ 4. **Browse-first + append governance** (your operating directive's rules) — extend an existing page at section granularity (`op="append-section"`/`op="rewrite-section"`); new pages attach under a hub (`parentHubPath`); never orphan leaves or whole-page-rewrite another agent's page.
264
+
265
+ If a `pkf_validate`-clean body is not achievable, **do not persist it**. Keep the draft in
266
+ the current response/working file, report the validation or capability failure, and
267
+ leave Memory unchanged; never fake a revision or bypass the write gate.
268
+
269
+ ## Structural edges — how pages relate
270
+
271
+ Relationships between pages are **graph edges**, not prose. Declare them structurally:
272
+
273
+ - `parentHubPath` on `memory_write` — attaches the written page under a hub. Default
274
+ `relation` is `child-of`; pass `relation="related"` for a non-hierarchical association.
275
+ - `childPaths` on `memory_curate(op="promote_to_hub")` — attaches existing pages under a
276
+ newly promoted hub in one call (orchestrator convergence; see **memory-dream**).
277
+ - In-content typed links (rel vocabulary from `pkf-writing`) **with canonical hrefs
278
+ copied from browse/search/load results** are also materialized into edges — fine for
279
+ `supports` / `contradicts` / `related` / `references` / `cites` cross-refs inside
280
+ prose. For hub attachment, prefer the structural parameters.
281
+
282
+ **Direction matters for `child-of`: the edge points FROM the child TO the hub.**
283
+ `parentHubPath` gets this right automatically (the page you are writing is the child).
284
+ If you ever hand-write a `child-of` content link, it goes **in the child page's body,
285
+ pointing at the hub** — never the reverse. Hubs never declare child-of links.
286
+
287
+ ## INDEX & hubs — ownership is asymmetric
288
+
289
+ - **Top `INDEX.pkf`:** its authored semantic sections are agent/editor territory. Its
290
+ visible Contents is derived live from the `child-of` graph; Dream does **not** store
291
+ or rewrite an INDEX `#toc`. Change the graph, not a copied list.
292
+ - **Hub `#overview`:** agent-owned prose—what the topic covers and how children relate.
293
+ - **Hub `#toc`:** machine-owned strict PKF section, regenerated by
294
+ `memory_curate(op="rebuild_index")` from graph membership. Never hand-edit it.
295
+
296
+ Thus `rebuild_index` is a legacy verb name: it rewrites hub TOCs and refreshes derived
297
+ structure, while INDEX Contents remains a read-time projection.
298
+
299
+ ## Extending pages (and other agents' pages) — section ops
300
+
301
+ To add knowledge to an existing page, **edit at section granularity — do not rewrite the
302
+ whole page**. Whole-page rewrites of pages another agent authored create version
303
+ conflicts and clobber their content. The section ops splice ONE section cloud-side:
304
+
305
+ ```
306
+ memory_write(path="decisions/database-choice.pkf", op="append-section",
307
+ section="revisit-2026-07", content="<section body per pkf-writing>")
308
+ ```
309
+
310
+ Default `op` is `replace` (whole page) — reserve it for pages you authored yourself.
311
+
312
+ ## Size discipline (a discipline, not a limit)
313
+
314
+ - **INDEX and hubs: keep them lean** — overview prose + TOC, nothing else. Every recall
315
+ hop reads them. Nothing enforces this — when a hub outgrows itself it surfaces as a
316
+ `memory_curate(op="candidates", kind="oversized")` split *suggestion*.
317
+ - **Ordinary pages: no budget, but a hard ceiling at 64K characters** — above that the
318
+ source must be sharded (see *Sharding*), never squeezed. Rich is right: full tables,
319
+ exact numbers, media pointers, rationale prose.
320
+ - **The only token rules are anti-waste:** don't re-extract content that is already
321
+ distilled into a page (extend it instead), and don't re-query pages already in your
322
+ context (circular recall).
323
+
324
+ ## Memory Types
325
+
326
+ | Type | What it is | When to write |
327
+ |---|---|---|
328
+ | `user` | Who the user is, role, preferences, expertise | When you learn role/responsibility/preference details that should shape future behavior |
329
+ | `feedback` | Approach corrections + validated approaches | After a correction ("don't do X") OR a non-obvious approval ("yes that was right") |
330
+ | `project` | Goals, deadlines, decisions, ongoing initiatives | When you learn who/what/why/by-when that isn't derivable from code |
331
+ | `reference` | Pointers to external systems (Linear, Slack, dashboards) | When the user names a tool/channel and its purpose |
332
+
333
+ The type goes in the PKF frontmatter `type` field (the four canonical types above, or an
334
+ OKF subtype like `decision`) — the exact frontmatter shape is taught by `pkf-writing`.
335
+
336
+ ## Operating Rules
337
+
338
+ ### Write
339
+
340
+ - **Follow the browse-first flow** above. Never write an orphan leaf, never guess a path.
341
+ - **Don't save secrets, credentials, personal data, or one-off debugging chatter.**
342
+ - Don't save **generic programming advice** that isn't tied to this project.
343
+ - Don't save **ephemeral task state** (in-progress work, current-conversation context).
344
+ - Don't save things derivable from the **current project state** (file paths,
345
+ conventions, git history). Reading the code is authoritative.
346
+ - Don't save things already in **CLAUDE.md**.
347
+ - **Always rich, always validated**: body authored per `pkf-writing`, `pkf_validate`
348
+ passes before `memory_write` (a v1.1 invalid body is rejected at the write gate).
349
+ - For `feedback` and `project` types, include a **Why** section and a **How to apply**
350
+ section so future-you can judge edge cases.
351
+ - Convert relative dates to **absolute dates** before writing.
352
+ - If a fact may become stale, embed the condition or date that makes it valid.
353
+
354
+ ### Read / Recall
355
+
356
+ - Follow the **three-stage recall protocol** above: structure route → semantic search →
357
+ navigation fallback. Never re-derive structure the injected digest already answered.
358
+ - On a miss, read `navigation.startPoints` as **routing**, never as results, and walk
359
+ them (children → batch read → links). Do not quote a start point as an answer.
360
+ - Treat recall results as **leads, not evidence**. `tier` tells you what kind of lead:
361
+ `wiki` is curated, `raw` is somebody's upload — verify a `raw` hit before relying on it.
362
+ - `memory_load` returns the page's outbound `links` — follow them to navigate the graph.
363
+ - **No circular recall:** pages already in your context are known — do not re-query them.
364
+ - Don't let memory **override explicit current user instructions** — trust the current
365
+ input and update or remove the stale entry.
366
+ - Before recommending action based on memory that names a specific function/file/flag,
367
+ **verify it still exists** (grep / read). Memory is frozen in time.
368
+ - For *current* or *recent* state ("what changed this week"), prefer `git log` over
369
+ recalling activity-log memories.
370
+
371
+ ### Delete / Maintain
372
+
373
+ - When updating an outdated memory, **prefer extending/editing** over deleting + rewriting.
374
+ - When the user says "forget X", search first, confirm the match, then delete. Don't
375
+ silently fail if recall finds nothing — tell the user.
376
+ - **Consolidation / Dream** (merge duplicates, promote hubs, rebuild hub TOCs,
377
+ maintain overviews, split oversized hubs) is a separate, orchestrator-gated
378
+ capability — see the **memory-dream** skill. Do not consolidate from this skill.
379
+
380
+ ## Authority & role boundaries (product209/16 MA-2)
381
+
382
+ Memory reads/writes are adjudicated per request by the workspace Memory
383
+ authority. The verdict you receive is final for that request:
384
+
385
+ - **owner (human)** — full authority: decides cross-scope approvals (202
386
+ deferrals), grants read / read+write ACLs; curate and replicate rights
387
+ originate here.
388
+ - **orchestrator (appointed agent, `orchestratorAgentId`)** — may curate the
389
+ shared graph (promote / supersede / rebuild — see **memory-dream**). It does
390
+ NOT automatically pierce member/deputy private scopes.
391
+ - **deputy** — represents exactly its active bound member (a human principal).
392
+ Its authority IS the member's — never the owner's, never the workspace's.
393
+ - **member / member's deputy** — own private pages + workspace-shared pages;
394
+ cannot read or curate another member's private pages.
395
+ - **unbound specialist** — has NO owner/member mapping. Only a live
396
+ role/task/council scope grants reads; outside that scope, expect deny.
397
+
398
+ Outcome discipline:
399
+
400
+ - **`403 deny`** — final for this request. Do NOT retry verbatim, do NOT ask
401
+ another agent to read the target for you.
402
+ - **`202 approval deferred`** — the request waits on the data owner. Do NOT
403
+ re-issue it; the approval record already exists and re-submitting spams the
404
+ owner.
405
+ - **local replica states** (`suspended` / `reconciling` / `stale` / authority
406
+ lease expired) — local reads fail closed until the replica reconciles.
407
+ Retry after reconcile; a fail-closed read is never "memory is empty".
408
+
409
+ Role templates do not automatically grant a human principal: an agent whose
410
+ role mentions curation still needs the appointed orchestrator binding before
411
+ `memory_curate` write verbs succeed.
412
+
413
+ ## Anti-patterns
414
+
415
+ - ❌ **Re-reading a raw file or the internet when memory already distills it.**
416
+ - ❌ **Circular recall** — re-querying pages already in your context.
417
+ - ❌ **Counting a one-line digest mention as covered** — the exemption is the digest
418
+ naming the exact hub/page that answers; anything less runs the hybrid first round.
419
+ - ❌ **Duplicate extraction** — writing a near-duplicate page when browse/recall showed
420
+ an existing page on the topic. Extend it (`append-section` / `rewrite-section`).
421
+ - ❌ **Copying an Asset/inline PKF body into a page just because it is PKF.** Distill
422
+ durable knowledge, or use explicit exact inline materialization when requested.
423
+ - ❌ **Hand-editing a hub's `#toc`** or storing a duplicate INDEX TOC.
424
+ - ❌ Orphan leaves, guessed paths.
425
+ - ❌ Whole-page-rewriting a page another agent authored — section ops exist; use them.
426
+ - ❌ Persisting a body that failed `pkf_validate` (the write gate will reject it anyway
427
+ — fix the diagnostics instead of retrying verbatim).
428
+ - ❌ **Reading `navigation.startPoints` as a ranked answer** — they are routing entries;
429
+ the answer comes from walking them.
430
+ - ❌ **Squeezing an oversized source into one page** — shard it (422 `sharding_required`
431
+ is the gate telling you so), never truncate the knowledge to fit.
432
+
433
+ ## Output reporting
434
+
435
+ After writing memory, echo the path, type, placement (which hub it attached under, or
436
+ which page/section it extended), and one-line description back to the user so they can
437
+ verify what got persisted.
438
+
439
+ After recalling, list match titles + paths + scores; do **not** paste full page content
440
+ unless the user asks — follow up with `memory_load` for any specific hit. If you
441
+ navigated from `navigation.startPoints`, say which start point led to the answer.
442
+
443
+ ## CLI appendix (code agents in a shell)
444
+
445
+ Code agents (claude-code / codex / opencode) running in a shell can use the `prismer
446
+ memory` CLI — workspace + identity default from the agent env, output is JSON:
447
+
448
+ ```bash
449
+ prismer memory recall "what database did we choose?" # = memory_search
450
+ prismer memory search --queries '["q1","q2"]' # batch recall, one call (daemon cuts at 8 + flags `truncated`)
451
+ prismer memory read "decisions/database-choice.pkf" # = memory_load (also path#section)
452
+ prismer memory load-batch <path1> <path2> ... # up to 10 pages in one call, per-path verdict
453
+ prismer memory list --page-type hub # hub listing
454
+ prismer memory write --path "<path>" --content '<PKF>' # = memory_write (content also via stdin)
455
+ prismer memory delete <pageId>
456
+ ```
457
+
458
+ `prismer memory curate` carries the maintenance verbs (`candidates`, `promote-to-hub
459
+ --child-paths`, `supersede`, `rebuild-index`) plus the section-level ones
460
+ (`section-merge`, `section-supersede`, `rewire`) — `--help` lists each command's flags.
461
+
462
+ > The CLI currently lags the native tools on browse (`memory_browse` has no CLI
463
+ > subcommand yet), so on the shell surface decide placement with
464
+ > `list --page-type hub` + `recall`. Every OTHER write parameter exists on the CLI
465
+ > under its kebab-case name.
466
+
467
+ ## Backing capabilities (D22 mapping)
468
+
469
+ Replaces these v1.x built-in skills: `memory-read`, `memory-write`, `memory-recall`.
470
+ Compatibility alias: `memory-curation` (old slug/skillId/ACK resolves to this skill —
471
+ one canonical delivery).