wtf-p 0.8.3 → 0.9.0

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 (363) hide show
  1. package/README.md +26 -25
  2. package/bin/commands/install-logic.js +5 -5
  3. package/bin/install.js +11 -11
  4. package/bin/lib/adapter-compiler.js +211 -208
  5. package/bin/lib/manifest.js +21 -21
  6. package/bin/lib/native-registration.js +25 -10
  7. package/bin/lib/{clio-registration.js → pancode-registration.js} +62 -63
  8. package/bin/lib/utils.js +3 -3
  9. package/bin/uninstall.js +8 -8
  10. package/package.json +6 -4
  11. package/{vendors/clio-extension → pancode/extension}/.wtfp-generated.json +11 -11
  12. package/{vendors/clio-extension → pancode/extension}/compatibility/action-availability.json +14 -14
  13. package/{vendors/clio-extension/clio-coder-extension.yaml → pancode/extension/pancode-extension.yaml} +6 -5
  14. package/{vendors/clio-extension → pancode/extension}/runtime/claim-coverage.cjs +1 -1
  15. package/{vendors/clio-extension → pancode/extension}/runtime/desk-trust.cjs +1 -1
  16. package/{vendors/clio-extension → pancode/extension}/runtime/extension.test.ts +101 -139
  17. package/{vendors/clio-extension → pancode/extension}/runtime/extension.ts +84 -188
  18. package/{vendors/clio-extension → pancode/extension}/runtime/write-guard.json +1 -1
  19. package/{vendors → pancode}/plugin/.wtfp-generated.json +111 -111
  20. package/{vendors → pancode}/plugin/compatibility/action-availability.json +16 -16
  21. package/{vendors/claude/ai.iowarp.clio → pancode/plugin/dev.pancode}/agents/wtfp-argument-verifier.md +3 -3
  22. package/{vendors/claude/ai.iowarp.clio → pancode/plugin/dev.pancode}/agents/wtfp-citation-expert.md +2 -2
  23. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/agents/wtfp-citation-formatter.md +2 -2
  24. package/{vendors/claude/ai.iowarp.clio → pancode/plugin/dev.pancode}/agents/wtfp-coherence-checker.md +3 -3
  25. package/{vendors/claude/ai.iowarp.clio → pancode/plugin/dev.pancode}/agents/wtfp-outliner.md +2 -2
  26. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/agents/wtfp-plan-checker.md +3 -3
  27. package/{vendors/claude/ai.iowarp.clio → pancode/plugin/dev.pancode}/agents/wtfp-prose-polisher.md +2 -2
  28. package/{vendors/claude/ai.iowarp.clio → pancode/plugin/dev.pancode}/agents/wtfp-research-synthesizer.md +2 -2
  29. package/{vendors/claude/ai.iowarp.clio → pancode/plugin/dev.pancode}/agents/wtfp-section-planner.md +2 -2
  30. package/{vendors/claude/ai.iowarp.clio → pancode/plugin/dev.pancode}/agents/wtfp-section-reviewer.md +3 -3
  31. package/{vendors/claude/ai.iowarp.clio → pancode/plugin/dev.pancode}/agents/wtfp-section-writer.md +3 -3
  32. package/{vendors/claude/ai.iowarp.clio/fleets → pancode/plugin/dev.pancode/playbooks}/wtfp-draft-review.md +1 -1
  33. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/add-todo.md +1 -1
  34. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/advance.md +8 -8
  35. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/analyze-bib.md +5 -5
  36. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/audit-milestone.md +3 -3
  37. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/check-refs.md +5 -5
  38. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/check-todos.md +3 -3
  39. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/checkpoint.md +3 -3
  40. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/contribute.md +1 -1
  41. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/create-outline.md +5 -5
  42. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/create-poster.md +3 -3
  43. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/create-slides.md +3 -3
  44. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/discuss-section.md +3 -3
  45. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/execute-outline.md +6 -6
  46. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/export-latex.md +3 -3
  47. package/{vendors/claude/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/help.md +7 -7
  48. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/insert-section.md +3 -3
  49. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/list-assumptions.md +1 -1
  50. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/map-project.md +1 -1
  51. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/new-paper.md +3 -3
  52. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/pause-writing.md +1 -1
  53. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/plan-milestone-gaps.md +3 -3
  54. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/plan-revision.md +3 -3
  55. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/plan-section.md +6 -6
  56. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/polish-prose.md +5 -5
  57. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/progress.md +3 -3
  58. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/quick.md +5 -5
  59. package/{vendors/claude/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/remove-section.md +1 -1
  60. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/report-bug.md +1 -1
  61. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/request-feature.md +1 -1
  62. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/research-gap.md +6 -6
  63. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/resume-writing.md +3 -3
  64. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/review-section.md +6 -6
  65. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/settings.md +3 -3
  66. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/submit-milestone.md +3 -3
  67. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/update.md +1 -1
  68. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/verify-work.md +3 -3
  69. package/{vendors/plugin/ai.iowarp.clio → pancode/plugin/dev.pancode}/prompts/wtfp/write-section.md +6 -6
  70. package/{vendors → pancode}/plugin/plugin.json +56 -56
  71. package/{vendors → pancode}/plugin/repository/CONTRIBUTING.md +5 -2
  72. package/{vendors → pancode}/plugin/skills/wtfp-plan-section/references/actions.md +2 -2
  73. package/vendors/antigravity/.wtfp-generated.json +3 -3
  74. package/vendors/antigravity/plugin.json +2 -2
  75. package/vendors/antigravity/repository/CONTRIBUTING.md +5 -2
  76. package/vendors/claude/.claude-plugin/marketplace.json +2 -2
  77. package/vendors/claude/.claude-plugin/plugin.json +1 -1
  78. package/vendors/claude/.wtfp-generated.json +185 -185
  79. package/vendors/{plugin/ai.iowarp.clio → claude/dev.pancode}/agents/wtfp-argument-verifier.md +3 -3
  80. package/vendors/{plugin/ai.iowarp.clio → claude/dev.pancode}/agents/wtfp-citation-expert.md +2 -2
  81. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/agents/wtfp-citation-formatter.md +2 -2
  82. package/vendors/{plugin/ai.iowarp.clio → claude/dev.pancode}/agents/wtfp-coherence-checker.md +3 -3
  83. package/vendors/{plugin/ai.iowarp.clio → claude/dev.pancode}/agents/wtfp-outliner.md +2 -2
  84. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/agents/wtfp-plan-checker.md +3 -3
  85. package/vendors/{plugin/ai.iowarp.clio → claude/dev.pancode}/agents/wtfp-prose-polisher.md +2 -2
  86. package/vendors/{plugin/ai.iowarp.clio → claude/dev.pancode}/agents/wtfp-research-synthesizer.md +2 -2
  87. package/vendors/{plugin/ai.iowarp.clio → claude/dev.pancode}/agents/wtfp-section-planner.md +2 -2
  88. package/vendors/{plugin/ai.iowarp.clio → claude/dev.pancode}/agents/wtfp-section-reviewer.md +3 -3
  89. package/vendors/{plugin/ai.iowarp.clio → claude/dev.pancode}/agents/wtfp-section-writer.md +3 -3
  90. package/vendors/{plugin/ai.iowarp.clio/playbooks → claude/dev.pancode/fleets}/wtfp-draft-review.md +1 -1
  91. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/advance.md +1 -1
  92. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/analyze-bib.md +4 -4
  93. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/audit-milestone.md +2 -2
  94. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/check-refs.md +4 -4
  95. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/check-todos.md +2 -2
  96. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/checkpoint.md +2 -2
  97. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/contribute.md +1 -1
  98. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/create-outline.md +4 -4
  99. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/create-poster.md +2 -2
  100. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/create-slides.md +2 -2
  101. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/discuss-section.md +2 -2
  102. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/execute-outline.md +5 -5
  103. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/export-latex.md +2 -2
  104. package/vendors/{plugin/ai.iowarp.clio → claude/dev.pancode}/prompts/wtfp/help.md +7 -7
  105. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/insert-section.md +2 -2
  106. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/new-paper.md +2 -2
  107. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/plan-milestone-gaps.md +2 -2
  108. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/plan-revision.md +2 -2
  109. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/plan-section.md +5 -5
  110. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/polish-prose.md +4 -4
  111. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/progress.md +2 -2
  112. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/quick.md +4 -4
  113. package/vendors/{plugin/ai.iowarp.clio → claude/dev.pancode}/prompts/wtfp/remove-section.md +1 -1
  114. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/report-bug.md +1 -1
  115. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/request-feature.md +1 -1
  116. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/research-gap.md +5 -5
  117. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/resume-writing.md +2 -2
  118. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/review-section.md +5 -5
  119. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/settings.md +2 -2
  120. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/submit-milestone.md +2 -2
  121. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/update.md +1 -1
  122. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/verify-work.md +2 -2
  123. package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/write-section.md +5 -5
  124. package/vendors/claude/plugin.json +56 -56
  125. package/vendors/claude/repository/CONTRIBUTING.md +5 -2
  126. package/vendors/codex/plugins/wtfp/.codex-plugin/plugin.json +1 -1
  127. package/vendors/codex/plugins/wtfp/.wtfp-generated.json +4 -4
  128. package/vendors/codex/plugins/wtfp/plugin.json +1 -1
  129. package/vendors/codex/plugins/wtfp/repository/CONTRIBUTING.md +5 -2
  130. package/vendors/copilot/.wtfp-generated.json +2 -2
  131. package/vendors/copilot/marketplace.json +2 -2
  132. package/vendors/copilot/plugins/wtfp/.claude-plugin/plugin.json +1 -1
  133. package/vendors/copilot/plugins/wtfp/.wtfp-generated.json +3 -3
  134. package/vendors/copilot/plugins/wtfp/repository/CONTRIBUTING.md +5 -2
  135. package/vendors/gemini/.wtfp-generated.json +3 -3
  136. package/vendors/gemini/gemini-extension.json +1 -1
  137. package/vendors/gemini/repository/CONTRIBUTING.md +5 -2
  138. package/vendors/opencode/.wtfp-generated.json +2 -2
  139. package/vendors/opencode/repository/CONTRIBUTING.md +5 -2
  140. /package/{vendors/clio-extension → pancode/extension}/actions/add-todo.json +0 -0
  141. /package/{vendors/clio-extension → pancode/extension}/actions/advance.json +0 -0
  142. /package/{vendors/clio-extension → pancode/extension}/actions/analyze-bib.json +0 -0
  143. /package/{vendors/clio-extension → pancode/extension}/actions/audit-milestone.json +0 -0
  144. /package/{vendors/clio-extension → pancode/extension}/actions/check-refs.json +0 -0
  145. /package/{vendors/clio-extension → pancode/extension}/actions/check-todos.json +0 -0
  146. /package/{vendors/clio-extension → pancode/extension}/actions/checkpoint.json +0 -0
  147. /package/{vendors/clio-extension → pancode/extension}/actions/contribute.json +0 -0
  148. /package/{vendors/clio-extension → pancode/extension}/actions/create-outline.json +0 -0
  149. /package/{vendors/clio-extension → pancode/extension}/actions/create-poster.json +0 -0
  150. /package/{vendors/clio-extension → pancode/extension}/actions/create-slides.json +0 -0
  151. /package/{vendors/clio-extension → pancode/extension}/actions/discuss-section.json +0 -0
  152. /package/{vendors/clio-extension → pancode/extension}/actions/execute-outline.json +0 -0
  153. /package/{vendors/clio-extension → pancode/extension}/actions/export-latex.json +0 -0
  154. /package/{vendors/clio-extension → pancode/extension}/actions/help.json +0 -0
  155. /package/{vendors/clio-extension → pancode/extension}/actions/insert-section.json +0 -0
  156. /package/{vendors/clio-extension → pancode/extension}/actions/list-assumptions.json +0 -0
  157. /package/{vendors/clio-extension → pancode/extension}/actions/map-project.json +0 -0
  158. /package/{vendors/clio-extension → pancode/extension}/actions/new-paper.json +0 -0
  159. /package/{vendors/clio-extension → pancode/extension}/actions/pause-writing.json +0 -0
  160. /package/{vendors/clio-extension → pancode/extension}/actions/plan-milestone-gaps.json +0 -0
  161. /package/{vendors/clio-extension → pancode/extension}/actions/plan-revision.json +0 -0
  162. /package/{vendors/clio-extension → pancode/extension}/actions/plan-section.json +0 -0
  163. /package/{vendors/clio-extension → pancode/extension}/actions/polish-prose.json +0 -0
  164. /package/{vendors/clio-extension → pancode/extension}/actions/progress.json +0 -0
  165. /package/{vendors/clio-extension → pancode/extension}/actions/quick.json +0 -0
  166. /package/{vendors/clio-extension → pancode/extension}/actions/remove-section.json +0 -0
  167. /package/{vendors/clio-extension → pancode/extension}/actions/report-bug.json +0 -0
  168. /package/{vendors/clio-extension → pancode/extension}/actions/request-feature.json +0 -0
  169. /package/{vendors/clio-extension → pancode/extension}/actions/research-gap.json +0 -0
  170. /package/{vendors/clio-extension → pancode/extension}/actions/resume-writing.json +0 -0
  171. /package/{vendors/clio-extension → pancode/extension}/actions/review-section.json +0 -0
  172. /package/{vendors/clio-extension → pancode/extension}/actions/settings.json +0 -0
  173. /package/{vendors/clio-extension → pancode/extension}/actions/submit-milestone.json +0 -0
  174. /package/{vendors/clio-extension → pancode/extension}/actions/update.json +0 -0
  175. /package/{vendors/clio-extension → pancode/extension}/actions/verify-work.json +0 -0
  176. /package/{vendors/clio-extension → pancode/extension}/actions/write-section.json +0 -0
  177. /package/{vendors/clio-extension → pancode/extension}/project/schemas/checkpoint.schema.json +0 -0
  178. /package/{vendors/clio-extension → pancode/extension}/project/schemas/common.schema.json +0 -0
  179. /package/{vendors/clio-extension → pancode/extension}/project/schemas/config.schema.json +0 -0
  180. /package/{vendors/clio-extension → pancode/extension}/project/schemas/decisions.schema.json +0 -0
  181. /package/{vendors/clio-extension → pancode/extension}/project/schemas/evidence.schema.json +0 -0
  182. /package/{vendors/clio-extension → pancode/extension}/project/schemas/interaction.schema.json +0 -0
  183. /package/{vendors/clio-extension → pancode/extension}/project/schemas/manifest.schema.json +0 -0
  184. /package/{vendors/clio-extension → pancode/extension}/project/schemas/outline.schema.json +0 -0
  185. /package/{vendors/clio-extension → pancode/extension}/project/schemas/section.schema.json +0 -0
  186. /package/{vendors/clio-extension → pancode/extension}/project/schemas/source.schema.json +0 -0
  187. /package/{vendors/clio-extension → pancode/extension}/project/schemas/state.schema.json +0 -0
  188. /package/{vendors/clio-extension → pancode/extension}/project/schemas/validation.schema.json +0 -0
  189. /package/{vendors/clio-extension → pancode/extension}/project/templates/checkpoint.json +0 -0
  190. /package/{vendors/clio-extension → pancode/extension}/project/templates/config.json +0 -0
  191. /package/{vendors/clio-extension → pancode/extension}/project/templates/decisions.json +0 -0
  192. /package/{vendors/clio-extension → pancode/extension}/project/templates/evidence.json +0 -0
  193. /package/{vendors/clio-extension → pancode/extension}/project/templates/interaction.json +0 -0
  194. /package/{vendors/clio-extension → pancode/extension}/project/templates/manifest.json +0 -0
  195. /package/{vendors/clio-extension → pancode/extension}/project/templates/outline.json +0 -0
  196. /package/{vendors/clio-extension → pancode/extension}/project/templates/section.json +0 -0
  197. /package/{vendors/clio-extension → pancode/extension}/project/templates/source.json +0 -0
  198. /package/{vendors/clio-extension → pancode/extension}/project/templates/state.json +0 -0
  199. /package/{vendors/clio-extension → pancode/extension}/project/templates/validation.json +0 -0
  200. /package/{vendors/clio-extension → pancode/extension}/runtime/json-schema.cjs +0 -0
  201. /package/{vendors/clio-extension → pancode/extension}/runtime/package.json +0 -0
  202. /package/{vendors/clio-extension → pancode/extension}/skins/wtfp.json +0 -0
  203. /package/{vendors → pancode}/plugin/actions/add-todo.json +0 -0
  204. /package/{vendors → pancode}/plugin/actions/advance.json +0 -0
  205. /package/{vendors → pancode}/plugin/actions/analyze-bib.json +0 -0
  206. /package/{vendors → pancode}/plugin/actions/audit-milestone.json +0 -0
  207. /package/{vendors → pancode}/plugin/actions/check-refs.json +0 -0
  208. /package/{vendors → pancode}/plugin/actions/check-todos.json +0 -0
  209. /package/{vendors → pancode}/plugin/actions/checkpoint.json +0 -0
  210. /package/{vendors → pancode}/plugin/actions/contribute.json +0 -0
  211. /package/{vendors → pancode}/plugin/actions/create-outline.json +0 -0
  212. /package/{vendors → pancode}/plugin/actions/create-poster.json +0 -0
  213. /package/{vendors → pancode}/plugin/actions/create-slides.json +0 -0
  214. /package/{vendors → pancode}/plugin/actions/discuss-section.json +0 -0
  215. /package/{vendors → pancode}/plugin/actions/execute-outline.json +0 -0
  216. /package/{vendors → pancode}/plugin/actions/export-latex.json +0 -0
  217. /package/{vendors → pancode}/plugin/actions/help.json +0 -0
  218. /package/{vendors → pancode}/plugin/actions/insert-section.json +0 -0
  219. /package/{vendors → pancode}/plugin/actions/list-assumptions.json +0 -0
  220. /package/{vendors → pancode}/plugin/actions/map-project.json +0 -0
  221. /package/{vendors → pancode}/plugin/actions/new-paper.json +0 -0
  222. /package/{vendors → pancode}/plugin/actions/pause-writing.json +0 -0
  223. /package/{vendors → pancode}/plugin/actions/plan-milestone-gaps.json +0 -0
  224. /package/{vendors → pancode}/plugin/actions/plan-revision.json +0 -0
  225. /package/{vendors → pancode}/plugin/actions/plan-section.json +0 -0
  226. /package/{vendors → pancode}/plugin/actions/polish-prose.json +0 -0
  227. /package/{vendors → pancode}/plugin/actions/progress.json +0 -0
  228. /package/{vendors → pancode}/plugin/actions/quick.json +0 -0
  229. /package/{vendors → pancode}/plugin/actions/remove-section.json +0 -0
  230. /package/{vendors → pancode}/plugin/actions/report-bug.json +0 -0
  231. /package/{vendors → pancode}/plugin/actions/request-feature.json +0 -0
  232. /package/{vendors → pancode}/plugin/actions/research-gap.json +0 -0
  233. /package/{vendors → pancode}/plugin/actions/resume-writing.json +0 -0
  234. /package/{vendors → pancode}/plugin/actions/review-section.json +0 -0
  235. /package/{vendors → pancode}/plugin/actions/settings.json +0 -0
  236. /package/{vendors → pancode}/plugin/actions/submit-milestone.json +0 -0
  237. /package/{vendors → pancode}/plugin/actions/update.json +0 -0
  238. /package/{vendors → pancode}/plugin/actions/verify-work.json +0 -0
  239. /package/{vendors → pancode}/plugin/actions/write-section.json +0 -0
  240. /package/{vendors → pancode}/plugin/aliases.lock.json +0 -0
  241. /package/{vendors → pancode}/plugin/catalog.json +0 -0
  242. /package/{vendors/claude/ai.iowarp.clio/fleets → pancode/plugin/dev.pancode/playbooks}/wtfp-plan-section.md +0 -0
  243. /package/{vendors → pancode}/plugin/effects.json +0 -0
  244. /package/{vendors → pancode}/plugin/project/README.md +0 -0
  245. /package/{vendors → pancode}/plugin/project/schemas/checkpoint.schema.json +0 -0
  246. /package/{vendors → pancode}/plugin/project/schemas/common.schema.json +0 -0
  247. /package/{vendors → pancode}/plugin/project/schemas/config.schema.json +0 -0
  248. /package/{vendors → pancode}/plugin/project/schemas/decisions.schema.json +0 -0
  249. /package/{vendors → pancode}/plugin/project/schemas/evidence.schema.json +0 -0
  250. /package/{vendors → pancode}/plugin/project/schemas/interaction.schema.json +0 -0
  251. /package/{vendors → pancode}/plugin/project/schemas/manifest.schema.json +0 -0
  252. /package/{vendors → pancode}/plugin/project/schemas/outline.schema.json +0 -0
  253. /package/{vendors → pancode}/plugin/project/schemas/section.schema.json +0 -0
  254. /package/{vendors → pancode}/plugin/project/schemas/source.schema.json +0 -0
  255. /package/{vendors → pancode}/plugin/project/schemas/state.schema.json +0 -0
  256. /package/{vendors → pancode}/plugin/project/schemas/validation.schema.json +0 -0
  257. /package/{vendors → pancode}/plugin/project/templates/checkpoint.json +0 -0
  258. /package/{vendors → pancode}/plugin/project/templates/config.json +0 -0
  259. /package/{vendors → pancode}/plugin/project/templates/decisions.json +0 -0
  260. /package/{vendors → pancode}/plugin/project/templates/evidence.json +0 -0
  261. /package/{vendors → pancode}/plugin/project/templates/interaction.json +0 -0
  262. /package/{vendors → pancode}/plugin/project/templates/manifest.json +0 -0
  263. /package/{vendors → pancode}/plugin/project/templates/outline.json +0 -0
  264. /package/{vendors → pancode}/plugin/project/templates/section.json +0 -0
  265. /package/{vendors → pancode}/plugin/project/templates/source.json +0 -0
  266. /package/{vendors → pancode}/plugin/project/templates/state.json +0 -0
  267. /package/{vendors → pancode}/plugin/project/templates/validation.json +0 -0
  268. /package/{vendors → pancode}/plugin/roles/argument-verifier.md +0 -0
  269. /package/{vendors → pancode}/plugin/roles/citation-expert.md +0 -0
  270. /package/{vendors → pancode}/plugin/roles/citation-formatter.md +0 -0
  271. /package/{vendors → pancode}/plugin/roles/coherence-checker.md +0 -0
  272. /package/{vendors → pancode}/plugin/roles/outliner.md +0 -0
  273. /package/{vendors → pancode}/plugin/roles/plan-checker.md +0 -0
  274. /package/{vendors → pancode}/plugin/roles/prose-polisher.md +0 -0
  275. /package/{vendors → pancode}/plugin/roles/research-synthesizer.md +0 -0
  276. /package/{vendors → pancode}/plugin/roles/section-planner.md +0 -0
  277. /package/{vendors → pancode}/plugin/roles/section-reviewer.md +0 -0
  278. /package/{vendors → pancode}/plugin/roles/section-writer.md +0 -0
  279. /package/{vendors → pancode}/plugin/schemas/action.schema.json +0 -0
  280. /package/{vendors → pancode}/plugin/schemas/aliases.schema.json +0 -0
  281. /package/{vendors → pancode}/plugin/schemas/catalog.schema.json +0 -0
  282. /package/{vendors → pancode}/plugin/schemas/effects.schema.json +0 -0
  283. /package/{vendors → pancode}/plugin/schemas/role-result.schema.json +0 -0
  284. /package/{vendors → pancode}/plugin/schemas/tools.schema.json +0 -0
  285. /package/{vendors → pancode}/plugin/skills/wtfp-deliver-research/SKILL.md +0 -0
  286. /package/{vendors → pancode}/plugin/skills/wtfp-deliver-research/agents/openai.yaml +0 -0
  287. /package/{vendors → pancode}/plugin/skills/wtfp-deliver-research/references/actions.md +0 -0
  288. /package/{vendors → pancode}/plugin/skills/wtfp-manage-project/SKILL.md +0 -0
  289. /package/{vendors → pancode}/plugin/skills/wtfp-manage-project/agents/openai.yaml +0 -0
  290. /package/{vendors → pancode}/plugin/skills/wtfp-manage-project/references/actions.md +0 -0
  291. /package/{vendors → pancode}/plugin/skills/wtfp-plan-section/SKILL.md +0 -0
  292. /package/{vendors → pancode}/plugin/skills/wtfp-plan-section/agents/openai.yaml +0 -0
  293. /package/{vendors → pancode}/plugin/skills/wtfp-research-literature/SKILL.md +0 -0
  294. /package/{vendors → pancode}/plugin/skills/wtfp-research-literature/agents/openai.yaml +0 -0
  295. /package/{vendors → pancode}/plugin/skills/wtfp-research-literature/references/actions.md +0 -0
  296. /package/{vendors → pancode}/plugin/skills/wtfp-review-manuscript/SKILL.md +0 -0
  297. /package/{vendors → pancode}/plugin/skills/wtfp-review-manuscript/agents/openai.yaml +0 -0
  298. /package/{vendors → pancode}/plugin/skills/wtfp-review-manuscript/references/actions.md +0 -0
  299. /package/{vendors → pancode}/plugin/skills/wtfp-start-project/SKILL.md +0 -0
  300. /package/{vendors → pancode}/plugin/skills/wtfp-start-project/agents/openai.yaml +0 -0
  301. /package/{vendors → pancode}/plugin/skills/wtfp-start-project/references/actions.md +0 -0
  302. /package/{vendors → pancode}/plugin/skills/wtfp-write-section/SKILL.md +0 -0
  303. /package/{vendors → pancode}/plugin/skills/wtfp-write-section/agents/openai.yaml +0 -0
  304. /package/{vendors → pancode}/plugin/skills/wtfp-write-section/references/actions.md +0 -0
  305. /package/{vendors → pancode}/plugin/templates/README.md +0 -0
  306. /package/{vendors → pancode}/plugin/templates/grant-proposal-outline.md +0 -0
  307. /package/{vendors → pancode}/plugin/templates/paper-outline.md +0 -0
  308. /package/{vendors → pancode}/plugin/templates/poster.md +0 -0
  309. /package/{vendors → pancode}/plugin/templates/slides.md +0 -0
  310. /package/{vendors → pancode}/plugin/tools/README.md +0 -0
  311. /package/{vendors → pancode}/plugin/tools/bibliography/analyze-impact.js +0 -0
  312. /package/{vendors → pancode}/plugin/tools/bibliography/format.js +0 -0
  313. /package/{vendors → pancode}/plugin/tools/bibliography/index.js +0 -0
  314. /package/{vendors → pancode}/plugin/tools/citation/fetch.js +0 -0
  315. /package/{vendors → pancode}/plugin/tools/citation/rank.js +0 -0
  316. /package/{vendors → pancode}/plugin/tools/citation/scholar-lookup.js +0 -0
  317. /package/{vendors → pancode}/plugin/tools/citation/semantic-scholar.js +0 -0
  318. /package/{vendors → pancode}/plugin/tools/package.json +0 -0
  319. /package/{vendors → pancode}/plugin/tools/support/cite-nexus-client.js +0 -0
  320. /package/{vendors → pancode}/plugin/tools/wtfp-tool.js +0 -0
  321. /package/{vendors → pancode}/plugin/tools.json +0 -0
  322. /package/{vendors → pancode}/plugin/workflows/add-todo.md +0 -0
  323. /package/{vendors → pancode}/plugin/workflows/advance.md +0 -0
  324. /package/{vendors → pancode}/plugin/workflows/analyze-bib.md +0 -0
  325. /package/{vendors → pancode}/plugin/workflows/audit-milestone.md +0 -0
  326. /package/{vendors → pancode}/plugin/workflows/check-refs.md +0 -0
  327. /package/{vendors → pancode}/plugin/workflows/check-todos.md +0 -0
  328. /package/{vendors → pancode}/plugin/workflows/checkpoint.md +0 -0
  329. /package/{vendors → pancode}/plugin/workflows/contribute.md +0 -0
  330. /package/{vendors → pancode}/plugin/workflows/create-outline.md +0 -0
  331. /package/{vendors → pancode}/plugin/workflows/create-poster.md +0 -0
  332. /package/{vendors → pancode}/plugin/workflows/create-slides.md +0 -0
  333. /package/{vendors → pancode}/plugin/workflows/discuss-section.md +0 -0
  334. /package/{vendors → pancode}/plugin/workflows/execute-outline.md +0 -0
  335. /package/{vendors → pancode}/plugin/workflows/export-latex.md +0 -0
  336. /package/{vendors → pancode}/plugin/workflows/help.md +0 -0
  337. /package/{vendors → pancode}/plugin/workflows/insert-section.md +0 -0
  338. /package/{vendors → pancode}/plugin/workflows/list-assumptions.md +0 -0
  339. /package/{vendors → pancode}/plugin/workflows/map-project.md +0 -0
  340. /package/{vendors → pancode}/plugin/workflows/new-paper.md +0 -0
  341. /package/{vendors → pancode}/plugin/workflows/pause-writing.md +0 -0
  342. /package/{vendors → pancode}/plugin/workflows/plan-milestone-gaps.md +0 -0
  343. /package/{vendors → pancode}/plugin/workflows/plan-revision.md +0 -0
  344. /package/{vendors → pancode}/plugin/workflows/plan-section.md +0 -0
  345. /package/{vendors → pancode}/plugin/workflows/polish-prose.md +0 -0
  346. /package/{vendors → pancode}/plugin/workflows/progress.md +0 -0
  347. /package/{vendors → pancode}/plugin/workflows/quick.md +0 -0
  348. /package/{vendors → pancode}/plugin/workflows/remove-section.md +0 -0
  349. /package/{vendors → pancode}/plugin/workflows/report-bug.md +0 -0
  350. /package/{vendors → pancode}/plugin/workflows/request-feature.md +0 -0
  351. /package/{vendors → pancode}/plugin/workflows/research-gap.md +0 -0
  352. /package/{vendors → pancode}/plugin/workflows/resume-writing.md +0 -0
  353. /package/{vendors → pancode}/plugin/workflows/review-section.md +0 -0
  354. /package/{vendors → pancode}/plugin/workflows/settings.md +0 -0
  355. /package/{vendors → pancode}/plugin/workflows/submit-milestone.md +0 -0
  356. /package/{vendors → pancode}/plugin/workflows/update.md +0 -0
  357. /package/{vendors → pancode}/plugin/workflows/verify-work.md +0 -0
  358. /package/{vendors → pancode}/plugin/workflows/write-section.md +0 -0
  359. /package/vendors/{plugin/ai.iowarp.clio/playbooks → claude/dev.pancode/fleets}/wtfp-plan-section.md +0 -0
  360. /package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/add-todo.md +0 -0
  361. /package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/list-assumptions.md +0 -0
  362. /package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/map-project.md +0 -0
  363. /package/vendors/claude/{ai.iowarp.clio → dev.pancode}/prompts/wtfp/pause-writing.md +0 -0
@@ -1,11 +1,11 @@
1
- // Generated by WTF-P adapter compiler v5 from clio/runtime/extension.ts; do not edit.
1
+ // Generated by WTF-P adapter compiler v5 from hosts/pancode/runtime/extension.ts; do not edit.
2
2
  /**
3
- * WTF-P writing desk for Clio Coder. Human-edited source; the adapter
4
- * compiler copies it to vendors/clio-extension/runtime/ beside the
3
+ * WTF-P writing desk for PanCode. Human-edited source; the adapter
4
+ * compiler copies it to pancode/extension/runtime/ beside the
5
5
  * generated write-guard.json, json-schema.cjs and claim-coverage.cjs.
6
6
  *
7
7
  * The desk reads the portable `.planning` records and the manuscript and
8
- * draws them. It is also the project's one JSON record writer on Clio: each
8
+ * draws them. It is also the project's one JSON record writer on PanCode: each
9
9
  * write is validated, compared with the version its writer read, and
10
10
  * committed under a project lock, with paired records journaled so a failed
11
11
  * process leaves a state the next write completes. It alone records an
@@ -46,7 +46,7 @@ import type {
46
46
  InterviewStep,
47
47
  View,
48
48
  ViewTone,
49
- } from "@iowarp/clio-coder/extensions";
49
+ } from "pancode/sdk/extension";
50
50
 
51
51
  const require = createRequire(import.meta.url);
52
52
  const { SchemaRegistry, validateInstance } = require("./json-schema.cjs") as {
@@ -104,7 +104,7 @@ function withTemplate(message: string, type: string): string {
104
104
  return template ? `${message}\nA ${type} record looks like this example; replace its ids, project_id and content, and omit ${CREATED_AT[type] ? `updated_at and ${CREATED_AT[type]}, which the desk sets` : "updated_at, which the desk sets"}: ${template}` : message;
105
105
  }
106
106
  interface GuardAction {
107
- /** The Clio agent IDs of the roles the action's contract delegates to. */
107
+ /** The PanCode agent IDs of the roles the action's contract delegates to. */
108
108
  agents: string[];
109
109
  produces: Array<{ uri: string; mode: string }>;
110
110
  }
@@ -249,7 +249,7 @@ interface Desk {
249
249
  audit: { fresh: boolean; errors: number } | null;
250
250
  /** A passed submit-milestone validation that no later draft or record outdates. */
251
251
  delivered: boolean;
252
- /** The WTF-P plugin while Clio serves it; null when it is not installed and enabled. */
252
+ /** The WTF-P plugin while PanCode serves it; null when it is not installed and enabled. */
253
253
  served: ServedPlugin;
254
254
  }
255
255
 
@@ -304,7 +304,7 @@ function contained(workspace: string, relative: string): string | null {
304
304
  return file;
305
305
  }
306
306
 
307
- /** The workspace's real path, against which Clio reports every landing. */
307
+ /** The workspace's real path, against which PanCode reports every landing. */
308
308
  function realWorkspace(workspace: string): string {
309
309
  try {
310
310
  return realpathSync(workspace);
@@ -987,7 +987,7 @@ function withLock<T>(workspace: string, work: () => T): T {
987
987
 
988
988
  /**
989
989
  * Writes a new file and flushes it where the process may. Node's permission
990
- * model, which Clio runs the desk under, refuses every flush (fsync,
990
+ * model, which PanCode runs the desk under, refuses every flush (fsync,
991
991
  * fdatasync, flush: true) with ERR_ACCESS_DENIED, so there a write is still
992
992
  * all-or-nothing by its rename but not durable across power loss. A file that
993
993
  * could not be written whole is removed.
@@ -1158,7 +1158,7 @@ function commit(workspace: string, writes: PendingWrite[]): void {
1158
1158
  fault("before-commit");
1159
1159
  if (staged.length > 1) {
1160
1160
  const journal = `${JOURNAL}.${randomUUID()}.partial`;
1161
- writeDurably(path.join(workspace, journal), `${JSON.stringify({ schema: "wtfp.clio-journal/v1", at: timestamp(), entries: staged }, null, 2)}\n`);
1161
+ writeDurably(path.join(workspace, journal), `${JSON.stringify({ schema: "wtfp.pancode-journal/v1", at: timestamp(), entries: staged }, null, 2)}\n`);
1162
1162
  renameSync(path.join(workspace, journal), path.join(workspace, JOURNAL));
1163
1163
  }
1164
1164
  } catch (error) {
@@ -1692,7 +1692,7 @@ function driveStep(desk: Desk, drive: Drive): DriveDecision {
1692
1692
  kind: "step",
1693
1693
  action: next.action,
1694
1694
  section,
1695
- prompt: `ai.iowarp.clio/prompts/wtfp/${next.action}.md`,
1695
+ prompt: `dev.pancode/prompts/wtfp/${next.action}.md`,
1696
1696
  reason: `Continue ${next.command}; it has not failed. It recorded nothing the next step depends on, so record its outputs for what it found, whatever the outcome (${creates.join(", ")}), then call extension_wtfp__next_step. Do not repeat its work.`,
1697
1697
  finish: true,
1698
1698
  };
@@ -1704,21 +1704,21 @@ function driveStep(desk: Desk, drive: Drive): DriveDecision {
1704
1704
  kind: "step",
1705
1705
  action: next.action,
1706
1706
  section,
1707
- prompt: `ai.iowarp.clio/prompts/wtfp/${next.action}.md`,
1707
+ prompt: `dev.pancode/prompts/wtfp/${next.action}.md`,
1708
1708
  reason: `Continue ${next.command}: it made progress but has not finished, so the desk arms it again on purpose; this is not a loop. ${next.reason}`,
1709
1709
  };
1710
- return { kind: "step", action: next.action, section, prompt: `ai.iowarp.clio/prompts/wtfp/${next.action}.md`, reason: next.reason };
1710
+ return { kind: "step", action: next.action, section, prompt: `dev.pancode/prompts/wtfp/${next.action}.md`, reason: next.reason };
1711
1711
  }
1712
1712
 
1713
1713
  /**
1714
- * Every next_step result ends with this rule, so a turn Clio compacted after
1714
+ * Every next_step result ends with this rule, so a turn PanCode compacted after
1715
1715
  * dropping the advance prompt can still continue from the last result alone.
1716
1716
  */
1717
1717
  const DRIVER_RULE =
1718
1718
  "Driver rule for this /wtfp:advance run: the desk, not you, picks every step, so finish the step it armed and call extension_wtfp__next_step with after naming that step (\"start\" for the first call), call extension_wtfp__gate with the checkpoint it names and then extension_wtfp__next_step, and on a stop, a failed step or a refused call report the steps taken and end the turn without choosing another action.";
1719
1719
 
1720
1720
  /**
1721
- * Live on Clio 0.8.3, the model looked for a capability named after the step's action, found none in the
1721
+ * Live on the 0.8.3 host, the model looked for a capability named after the step's action, found none in the
1722
1722
  * turn's list, and stopped the drive as if the step were forbidden.
1723
1723
  */
1724
1724
  const STEP_IS_A_PROCEDURE =
@@ -2286,10 +2286,10 @@ async function answer(ctx: ExtensionContextV2, stepKey: string, picked: unknown,
2286
2286
  ...(option ? { selected_option: option.id } : {}),
2287
2287
  summary: `${
2288
2288
  option
2289
- ? `The author chose "${shown(checkpoint, option).label}" at the Clio WTF-P desk.`
2289
+ ? `The author chose "${shown(checkpoint, option).label}" at the PanCode WTF-P desk.`
2290
2290
  : picked === WAIVE
2291
- ? "The author waived this gate at the Clio WTF-P desk."
2292
- : "The author marked this done at the Clio WTF-P desk."
2291
+ ? "The author waived this gate at the PanCode WTF-P desk."
2292
+ : "The author marked this done at the PanCode WTF-P desk."
2293
2293
  }${note ? `${NOTE_LEAD}${note}` : ""}`,
2294
2294
  resolved_at: now,
2295
2295
  },
@@ -2516,7 +2516,7 @@ async function recordTool(ctx: ExtensionContextV2, input: Json): Promise<{ text:
2516
2516
 
2517
2517
  /**
2518
2518
  * Authored artifacts keep their own format and are read and written with
2519
- * Clio's file tools; a refusal names the conventional file so the model does
2519
+ * PanCode's file tools; a refusal names the conventional file so the model does
2520
2520
  * not search the workspace for it.
2521
2521
  */
2522
2522
  const ARTIFACT_URIS: ReadonlyArray<{ pattern: RegExp; file: (match: RegExpExecArray) => string }> = [
@@ -2540,83 +2540,13 @@ function notARecord(uri: string): string {
2540
2540
  const FAMILY_LIMIT = 48 * 1024;
2541
2541
 
2542
2542
  /**
2543
- * How much record JSON a family read returns in full. Live, audit-milestone
2544
- * and submit-milestone read every validation of a delivered paper in full,
2545
- * over 100 KB, which every later call of the turn resent; past this budget a
2546
- * family read lists one digest row per record instead.
2543
+ * Every record of one family, such as `project://sources`, in one call: each
2544
+ * as a single read returns it, until the family outgrows FAMILY_LIMIT; the
2545
+ * rest are named so they can be read one at a time.
2547
2546
  */
2548
- const FAMILY_FULL_LIMIT = 16 * 1024;
2549
-
2550
- const FAMILIES = ["sections", "sources", "evidence", "checkpoints", "validations", "interactions"] as const;
2551
- const FAMILY_URI = new RegExp(`^project://(${FAMILIES.join("|")})/?\\*?(?:\\?(.*))?$`, "u");
2552
-
2553
- /** A family read's query: `section` narrows it to one section's records, `after` pages past a record id. */
2554
- function familyQuery(uri: string, query: string | undefined): { section: string | null; after: string | null } {
2555
- const parsed: { section: string | null; after: string | null } = { section: null, after: null };
2556
- for (const pair of (query ?? "").split("&").filter(Boolean)) {
2557
- const [key, value = ""] = pair.split("=");
2558
- if ((key !== "section" && key !== "after") || !new RegExp(`^${IDENTIFIER}$`, "u").test(value))
2559
- throw new Error(`${uri} has an unknown query; a family read takes section=<section id> and after=<record id>, such as project://validations?section=introduction`);
2560
- parsed[key] = value;
2561
- }
2562
- return parsed;
2563
- }
2564
-
2565
- /** The URIs a section owns, and its claims, so a family read can keep only the records about it. */
2566
- function sectionReach(workspace: string, desk: Desk, section: string): { prefix: string; owned: string[]; claims: Set<string>; evidence: Set<string> } {
2567
- const row = desk.sections.find((entry) => entry.id === section);
2568
- if (!row && readBytes(workspace, `.planning/sections/${section}/section.json`) === null)
2569
- throw new Error(`there is no section ${section}; read project://sections for the section ids`);
2570
- const record = readRecord(workspace, `.planning/sections/${section}/section.json`);
2571
- const claims = Array.isArray(record?.claims) ? (record.claims as Json[]) : [];
2572
- return {
2573
- prefix: `project://sections/${section}`,
2574
- owned: scopes(section, row?.manuscript ?? null),
2575
- claims: new Set(claims.map((claim) => text(claim.id)).filter(Boolean)),
2576
- evidence: new Set(claims.flatMap((claim) => (Array.isArray(claim.evidence_uris) ? claim.evidence_uris.map(String) : []))),
2577
- };
2578
- }
2579
-
2580
- function within(uri: unknown, reach: { prefix: string; owned: string[] }): boolean {
2581
- const value = text(uri);
2582
- return value === reach.prefix || value.startsWith(`${reach.prefix}/`) || reach.owned.includes(value);
2583
- }
2584
-
2585
- /** One line of a family listed by digest: what the record is and its outcome, with the version to write it back. */
2586
- function digestRow(collection: string, read: Json): Json {
2587
- const record = (read.record ?? {}) as Json;
2588
- const row: Json = { uri: read.uri, ...(read.revision === null ? {} : { revision: read.revision }), sha256: read.sha256 };
2589
- const pick = (...keys: string[]) => {
2590
- for (const key of keys) {
2591
- const value = record[key];
2592
- if (value !== undefined && value !== null) row[key] = typeof value === "string" && value.length > 160 ? `${value.slice(0, 159)}…` : value;
2593
- }
2594
- };
2595
- if (collection === "validations") {
2596
- pick("action_id", "validator_role", "subject_uri", "status", "executed_at");
2597
- const checks = Array.isArray(record.checks) ? (record.checks as Json[]) : [];
2598
- row.failed_checks = checks.filter((check) => check.status !== "passed").map((check) => check.id);
2599
- row.issues = Array.isArray(record.issues) ? record.issues.length : 0;
2600
- } else if (collection === "checkpoints") {
2601
- pick("kind", "scope_uri", "status", "blocking", "created_at");
2602
- if (read.trust !== undefined) row.trust = read.trust;
2603
- } else if (collection === "sections") pick("title", "status", "word_count", "word_target", "wave");
2604
- else if (collection === "sources") pick("citation_key", "title", "year", "kind", "status");
2605
- else if (collection === "evidence") pick("claim_id", "source_uri", "relation", "confidence", "verified_at");
2606
- else pick("kind", "subject_uri", "outcome", "selected_option", "answered_at");
2607
- return row;
2608
- }
2609
-
2610
- /**
2611
- * The records of one family, such as `project://sources`, in one call: in
2612
- * full while they fit FAMILY_FULL_LIMIT, otherwise one digest row each, so a
2613
- * grown family never floods the turn. `?section=` keeps only one section's
2614
- * records; `?after=` pages past FAMILY_LIMIT.
2615
- */
2616
- function readFamily(ctx: ExtensionContextV2, desk: Desk, collection: string, query: { section: string | null; after: string | null }): { text: string; data: unknown } {
2547
+ function readFamily(ctx: ExtensionContextV2, desk: Desk, collection: string, after: string | null = null): { text: string; data: unknown } {
2617
2548
  const workspace = ctx.snapshot.workspace;
2618
2549
  const identifier = new RegExp(`^${IDENTIFIER}$`, "u");
2619
- const reach = query.section === null ? null : sectionReach(workspace, desk, query.section);
2620
2550
  let ids: string[];
2621
2551
  if (collection === "sections") {
2622
2552
  const directory = contained(workspace, ".planning/sections");
@@ -2628,83 +2558,49 @@ function readFamily(ctx: ExtensionContextV2, desk: Desk, collection: string, que
2628
2558
  .map((entry) => entry.name)
2629
2559
  .sort();
2630
2560
  } else ids = listJson(workspace, `.planning/${collection}`).map((file) => path.posix.basename(file, ".json")).filter((id) => identifier.test(id));
2631
- const reads: Json[] = [];
2561
+ const records: unknown[] = [];
2562
+ const omitted: string[] = [];
2632
2563
  const failed: string[] = [];
2564
+ let size = 0;
2565
+ const total = ids.length;
2566
+ if (after !== null) ids = ids.filter((id) => id > after);
2633
2567
  for (const id of ids) {
2568
+ if (omitted.length > 0) {
2569
+ omitted.push(id);
2570
+ continue;
2571
+ }
2572
+ let one: { data: unknown };
2634
2573
  try {
2635
- reads.push(readTool(ctx, desk, `project://${collection}/${id}`).data as Json);
2574
+ one = readTool(ctx, desk, `project://${collection}/${id}`);
2636
2575
  } catch (error) {
2637
2576
  failed.push(`${id} (${error instanceof Error ? error.message : String(error)})`);
2577
+ continue;
2638
2578
  }
2639
- }
2640
- // Interactions answer checkpoints, so a section's interactions are those about its checkpoints.
2641
- const sectionCheckpoints =
2642
- reach && collection === "interactions"
2643
- ? new Set(listJson(workspace, ".planning/checkpoints").flatMap((file) => {
2644
- const checkpoint = readRecord(workspace, file);
2645
- return checkpoint && within(checkpoint.scope_uri, reach) ? [`project://checkpoints/${path.posix.basename(file, ".json")}`] : [];
2646
- }))
2647
- : null;
2648
- const sectionSources =
2649
- reach && collection === "sources"
2650
- ? new Set(listJson(workspace, ".planning/evidence").flatMap((file) => {
2651
- const evidence = readRecord(workspace, file);
2652
- const uri = `project://evidence/${path.posix.basename(file, ".json")}`;
2653
- return evidence && (reach.claims.has(text(evidence.claim_id)) || reach.evidence.has(uri)) ? [text(evidence.source_uri)] : [];
2654
- }))
2655
- : null;
2656
- const about = (read: Json): boolean => {
2657
- if (!reach) return true;
2658
- const record = (read.record ?? {}) as Json;
2659
- if (collection === "sections") return read.uri === reach.prefix;
2660
- if (collection === "validations") return within(record.subject_uri, reach);
2661
- if (collection === "checkpoints") return within(record.scope_uri, reach);
2662
- if (collection === "evidence") return reach.claims.has(text(record.claim_id)) || reach.evidence.has(text(read.uri));
2663
- if (collection === "sources") return sectionSources?.has(text(read.uri)) ?? false;
2664
- return within(record.subject_uri, reach) || (sectionCheckpoints?.has(text(record.subject_uri)) ?? false);
2665
- };
2666
- const selected = reads.filter(about);
2667
- const total = selected.length;
2668
- const fullSize = selected.reduce((sum, read) => sum + JSON.stringify(read).length, 0);
2669
- const digest = fullSize > FAMILY_FULL_LIMIT;
2670
- const pending = query.after === null ? selected : selected.filter((read) => String(read.uri).split("/").pop()! > (query.after as string));
2671
- const records: Json[] = [];
2672
- const omitted: string[] = [];
2673
- let size = 0;
2674
- for (const read of pending) {
2675
- const entry = digest ? digestRow(collection, read) : read;
2676
- const length = JSON.stringify(entry).length;
2677
- if (omitted.length > 0 || (records.length > 0 && size + length > FAMILY_LIMIT)) {
2678
- omitted.push(String(read.uri).split("/").pop() ?? "");
2579
+ const length = JSON.stringify(one.data).length;
2580
+ if (records.length > 0 && size + length > FAMILY_LIMIT) {
2581
+ omitted.push(id);
2679
2582
  continue;
2680
2583
  }
2681
- records.push(entry);
2584
+ records.push(one.data);
2682
2585
  size += length;
2683
2586
  }
2684
2587
  const uri = `project://${collection}`;
2685
- const scope = query.section === null ? uri : `${uri}?section=${query.section}`;
2686
- const next = [query.section === null ? "" : `section=${query.section}`, `after=${String(records[records.length - 1]?.uri ?? "").split("/").pop()}`].filter(Boolean).join("&");
2687
- const held = query.section === null ? "" : ` about section ${query.section}`;
2688
2588
  return {
2689
2589
  text: [
2690
- total === 0
2691
- ? `${uri} holds no records${held} yet.`
2692
- : digest
2693
- ? `${uri} holds ${total} ${total === 1 ? "record" : "records"}${held}, ${Math.round(fullSize / 1024)} KB in full, so this read lists ${records.length}${query.after !== null ? ` after ${query.after}` : ""} as one digest row each: what it is, its outcome, and the version to pass back to record. Read a record at its uri for every field${query.section === null ? ", or keep one section's records with ?section=<section id>" : ""}.`
2694
- : `${uri} holds ${total} ${total === 1 ? "record" : "records"}${held}; ${records.length}${query.after !== null ? ` after ${query.after}` : ""} returned in full, each with the revision and sha256 to pass back to record.`,
2695
- omitted.length > 0 ? `${omitted.length} more not returned, to keep this read small; read the next page with ${uri}?${next}.` : "",
2590
+ total === 0 ? `${uri} holds no records yet.` : `${uri} holds ${total} ${total === 1 ? "record" : "records"}; ${records.length}${after !== null ? ` after ${after}` : ""} returned in full, each with the revision and sha256 to pass back to record.`,
2591
+ omitted.length > 0 ? `${omitted.length} more not returned, to keep this read small; read the next page with ${uri}?after=${String((records[records.length - 1] as Json | undefined)?.uri ?? "").split("/").pop()}.` : "",
2696
2592
  failed.length > 0 ? `Not readable: ${failed.join("; ")}.` : "",
2697
2593
  ]
2698
2594
  .filter(Boolean)
2699
2595
  .join(" "),
2700
- data: { uri: scope, form: digest ? "digest" : "full", records, omitted, ...(failed.length > 0 ? { failed } : {}) },
2596
+ data: { uri, records, omitted, ...(failed.length > 0 ? { failed } : {}) },
2701
2597
  };
2702
2598
  }
2703
2599
 
2704
2600
  function readTool(ctx: ExtensionContextV2, desk: Desk, uri: string): { text: string; data: unknown } {
2705
2601
  const workspace = ctx.snapshot.workspace;
2706
- const family = FAMILY_URI.exec(uri);
2707
- if (family) return readFamily(ctx, desk, family[1] as string, familyQuery(uri, family[2]));
2602
+ const family = new RegExp(`^project://(sections|sources|evidence|checkpoints|validations|interactions)/?\\*?(?:\\?after=(${IDENTIFIER}))?$`, "u").exec(uri);
2603
+ if (family) return readFamily(ctx, desk, family[1] as string, family[2] ?? null);
2708
2604
  const route = RECORD_URIS.find((entry) => entry.pattern.test(uri));
2709
2605
  if (!route) throw new Error(notARecord(uri));
2710
2606
  const file = route.file(route.pattern.exec(uri)?.[1] ?? "");
@@ -2927,10 +2823,10 @@ function statusDigest(desk: Desk): Json {
2927
2823
  };
2928
2824
  }
2929
2825
 
2930
- /** Clio refuses effect text longer than this many UTF-16 code units. */
2826
+ /** PanCode refuses effect text longer than this many UTF-16 code units. */
2931
2827
  const EFFECT_TEXT_LIMIT = 2000;
2932
2828
 
2933
- /** Text cut to Clio's effect limit with `tail` appended, never splitting a surrogate pair. */
2829
+ /** Text cut to PanCode's effect limit with `tail` appended, never splitting a surrogate pair. */
2934
2830
  function clip(message: string, tail: string): string {
2935
2831
  if (message.length <= EFFECT_TEXT_LIMIT) return message;
2936
2832
  let end = EFFECT_TEXT_LIMIT - tail.length;
@@ -2939,7 +2835,7 @@ function clip(message: string, tail: string): string {
2939
2835
  return `${message.slice(0, end)}${tail}`;
2940
2836
  }
2941
2837
 
2942
- /** The desk's status as one reminder within Clio's effect limit. */
2838
+ /** The desk's status as one reminder within PanCode's effect limit. */
2943
2839
  function statusReminder(desk: Desk): string {
2944
2840
  const gates = openGates(desk);
2945
2841
  const lines = [
@@ -3137,11 +3033,11 @@ function block(reason: string): ExtensionHookResult {
3137
3033
  }
3138
3034
 
3139
3035
  /**
3140
- * What Clio 0.6.3 and later resolve for a tool hook beside its `args`
3036
+ * What PanCode resolve for a tool hook beside its `args`
3141
3037
  * (public-api-v2 ExtensionToolHookLanding): where a path-taking tool lands,
3142
3038
  * and a dispatch call's tasks as admission parsed them. The desk judges only
3143
- * these, never its own reading of a call, so it cannot drift from Clio's
3144
- * grammar. Clio 0.6.2 sends `args` alone; the desk then refuses writes and
3039
+ * these, never its own reading of a call, so it cannot drift from PanCode's
3040
+ * grammar. When a host sends `args` alone, the desk refuses writes and
3145
3041
  * dispatches inside a WTF-P project or action and leaves the rest alone.
3146
3042
  */
3147
3043
  interface HostTarget {
@@ -3171,7 +3067,7 @@ interface HostLanding {
3171
3067
  dispatch?: HostDispatch;
3172
3068
  }
3173
3069
 
3174
- /** Roles that only judge a dispatch's work; Clio runs them read-only with no write roots. */
3070
+ /** Roles that only judge a dispatch's work; PanCode runs them read-only with no write roots. */
3175
3071
  const GATE_ROLES = new Set(["reviewer", "judge", "member", "synthesis"]);
3176
3072
 
3177
3073
  const strings = (value: unknown): value is string[] => Array.isArray(value) && value.every((entry) => typeof entry === "string");
@@ -3271,22 +3167,22 @@ async function projectOrArmed(ctx: ExtensionContextV2): Promise<boolean> {
3271
3167
  }
3272
3168
 
3273
3169
  /** Why a host that sends no landing or dispatch plan cannot be guarded. */
3274
- const NEEDS_HOST_FACTS = "WTF-P needs Clio 0.6.3 or later, which tells the desk where each call lands and what each dispatch starts; this Clio does not, so the desk refuses the call inside a WTF-P project or action.";
3170
+ const NEEDS_HOST_FACTS = "WTF-P needs PanCode 0.9.0 or later, which tells the desk where each call lands and what each dispatch starts; this PanCode does not, so the desk refuses the call inside a WTF-P project or action.";
3275
3171
 
3276
- /** Why a call Clio sent no usable facts for is refused, once this Clio has shown it sends them. */
3172
+ /** Why a call PanCode sent no usable facts for is refused, once this PanCode has shown it sends them. */
3277
3173
  async function missingFacts(ctx: ExtensionContextV2, malformed: string | undefined): Promise<string> {
3278
- if (malformed) return `Clio's ${malformed} for this call is in a form the desk cannot read; refused.`;
3279
- return (await ctx.state.get<boolean>("host-facts")).value ? "Clio sent no landing for this call, so the desk cannot see where it lands; refused." : NEEDS_HOST_FACTS;
3174
+ if (malformed) return `PanCode's ${malformed} for this call is in a form the desk cannot read; refused.`;
3175
+ return (await ctx.state.get<boolean>("host-facts")).value ? "PanCode sent no landing for this call, so the desk cannot see where it lands; refused." : NEEDS_HOST_FACTS;
3280
3176
  }
3281
3177
 
3282
3178
  /**
3283
- * Where a write lands, relative to the project, or null outside it, as Clio
3284
- * resolved it: the file the tool opens, which Clio refuses to change before
3179
+ * Where a write lands, relative to the project, or null outside it, as PanCode
3180
+ * resolved it: the file the tool opens, which PanCode refuses to change before
3285
3181
  * the tool runs, and for a worker in a task worktree the checkout path it
3286
3182
  * merges into.
3287
3183
  */
3288
3184
  function writeLanding(target: string, workspace: string, host: HostTarget): { relative: string | null } | { refused: string } {
3289
- if (!host.resolved) return { refused: `WTF-P write guard: Clio could not resolve where ${target} lands (a link loop, or a component it cannot inspect); refused.` };
3185
+ if (!host.resolved) return { refused: `WTF-P write guard: PanCode could not resolve where ${target} lands (a link loop, or a component it cannot inspect); refused.` };
3290
3186
  if (host.workspacePath !== undefined) return { relative: host.workspacePath };
3291
3187
  const root = realWorkspace(workspace);
3292
3188
  return { relative: inside(root, host.path) ? posix(path.relative(root, host.path)) || "." : null };
@@ -3307,8 +3203,8 @@ async function guardWrite(ctx: ExtensionContextV2, target: string, host?: HostTa
3307
3203
  );
3308
3204
  const desk = loadDesk(workspace, await storedKey(ctx, false));
3309
3205
  const armed = await armedFor(ctx);
3310
- // Clio's own artifact directory is no project file; a link that leads it into the project lands, and is judged, elsewhere.
3311
- if (armed && !under(".clio-coder/artifacts", relative)) {
3206
+ // PanCode's own artifact directory is no project file; a link that leads it into the project lands, and is judged, elsewhere.
3207
+ if (armed && !under(".pancode/artifacts", relative)) {
3312
3208
  const roots = writeRoots(desk, armed);
3313
3209
  if (!roots.some((allowed) => under(allowed, relative)))
3314
3210
  return block(
@@ -3359,13 +3255,13 @@ function narrow(requested: string[], allowed: string[]): string[] {
3359
3255
 
3360
3256
  const WTFP_AGENT = /^wtfp-[a-z-]+$/u;
3361
3257
 
3362
- /** One worker a dispatch names, as Clio parsed it. */
3258
+ /** One worker a dispatch names, as PanCode parsed it. */
3363
3259
  interface DispatchTask {
3364
- /** The agent Clio resolved, `auto` and an omitted agent included. */
3260
+ /** The agent PanCode resolved, `auto` and an omitted agent included. */
3365
3261
  agent: string;
3366
3262
  /** Project-relative write roots, or null when the worker would have no boundary. */
3367
3263
  roots: string[] | null;
3368
- /** True when Clio runs the worker read-only, as it does every read-only recipe's; it then has no write roots. */
3264
+ /** True when PanCode runs the worker read-only, as it does every read-only recipe's; it then has no write roots. */
3369
3265
  readOnly: boolean;
3370
3266
  }
3371
3267
 
@@ -3379,13 +3275,13 @@ function plainSpelling(root: string): string {
3379
3275
  }
3380
3276
 
3381
3277
  /**
3382
- * The workers a dispatch starts, from the plan Clio parsed. Gate roles only
3278
+ * The workers a dispatch starts, from the plan PanCode parsed. Gate roles only
3383
3279
  * judge, so they are left out. Every worker runs from the project root, no
3384
3280
  * writer works in a task worktree whose merge the desk would not see, and a
3385
- * write root must land where it reads: Clio fixes a boundary at the root's
3281
+ * write root must land where it reads: PanCode fixes a boundary at the root's
3386
3282
  * physical location, so a root through a link would let a worker write
3387
3283
  * wherever the link points. A root that lands on the whole project is no
3388
- * boundary. Throws for any of these. Clio judges a rewritten call again, so
3284
+ * boundary. Throws for any of these. PanCode judges a rewritten call again, so
3389
3285
  * the roots the desk itself hands a worker are checked the same way.
3390
3286
  */
3391
3287
  function planTasks(plan: Extract<HostDispatch, { kind: "tasks" }>, workspace: string, present: boolean): DispatchTask[] {
@@ -3415,13 +3311,13 @@ function planTasks(plan: Extract<HostDispatch, { kind: "tasks" }>, workspace: st
3415
3311
  });
3416
3312
  }
3417
3313
 
3418
- /** The call's arguments without Clio's private admission keys, which Clio recomputes for any rewritten call. */
3314
+ /** The call's arguments without PanCode's private admission keys, which PanCode recomputes for any rewritten call. */
3419
3315
  function withoutHostKeys(args: Json): Json {
3420
- return Object.fromEntries(Object.entries(args).filter(([key]) => !key.startsWith("__clio_")));
3316
+ return Object.fromEntries(Object.entries(args).filter(([key]) => !key.startsWith("__pancode_")));
3421
3317
  }
3422
3318
 
3423
3319
  /**
3424
- * The call with each named worker held to its roots, in the shape Clio
3320
+ * The call with each named worker held to its roots, in the shape PanCode
3425
3321
  * prepares for hooks: `tasks` an array of task objects or task strings, one
3426
3322
  * per named worker, whose own intent overrides the shared one.
3427
3323
  */
@@ -3443,8 +3339,8 @@ const sameRoots = (left: string[] | null, right: string[] | null): boolean =>
3443
3339
 
3444
3340
  async function guardDispatch(ctx: ExtensionContextV2, args: Json, host?: HostDispatch, malformed?: string): Promise<ExtensionHookResult> {
3445
3341
  if (args.list === true || host?.kind === "list") return {};
3446
- // Clio could not prepare this call and refuses it itself, with its own reason; nothing of it runs.
3447
- if (!host && typeof args.__clio_dispatch_plan_preparation_error === "string") return {};
3342
+ // PanCode could not prepare this call and refuses it itself, with its own reason; nothing of it runs.
3343
+ if (!host && typeof args.__pancode_dispatch_plan_preparation_error === "string") return {};
3448
3344
  if (!host) return (await projectOrArmed(ctx)) ? block(`WTF-P dispatch guard: ${await missingFacts(ctx, malformed)}`) : {};
3449
3345
  const workspace = ctx.snapshot.workspace;
3450
3346
  const served = ctx.snapshot.plugin ?? null;
@@ -3483,7 +3379,7 @@ async function guardDispatch(ctx: ExtensionContextV2, args: Json, host?: HostDis
3483
3379
  return {};
3484
3380
  }
3485
3381
  const name = actionName(served, armed.action);
3486
- // Inside an action that delegates, a writing worker is one of its roles; a call without agent falls to Clio's default worker.
3382
+ // Inside an action that delegates, a writing worker is one of its roles; a call without agent falls to PanCode's default worker.
3487
3383
  const agents = GUARD.actions[armed.action]?.agents ?? [];
3488
3384
  const stranger = agents.length > 0 ? entries.find((entry) => !entry.readOnly && !agents.includes(entry.agent)) : undefined;
3489
3385
  if (stranger)
@@ -3518,7 +3414,7 @@ async function guardDispatch(ctx: ExtensionContextV2, args: Json, host?: HostDis
3518
3414
  : `WTF-P dispatch guard: ${entry.agent} would have no manuscript it may write. ${notes.length > 0 ? notes.join(" · ") : "Name the section and approve its plan first."}`,
3519
3415
  );
3520
3416
  if (roots.length > 0) return roots;
3521
- // Clio reads an empty write_roots as no boundary at all, so an empty list is refused, never sent.
3417
+ // PanCode reads an empty write_roots as no boundary at all, so an empty list is refused, never sent.
3522
3418
  if (entry.roots !== null && allowed.length > 0)
3523
3419
  throw new Error(`WTF-P dispatch guard: ${entry.roots.join(", ")} lie outside what ${armed.action} may write (${allowed.join(", ")}).`);
3524
3420
  throw new Error(
@@ -3535,7 +3431,7 @@ async function guardDispatch(ctx: ExtensionContextV2, args: Json, host?: HostDis
3535
3431
  // A worker whose roots already are its confinement, in any order, needs no rewrite.
3536
3432
  const needed = narrowed.map((roots, index) => (roots === null || sameRoots(roots, entries[index]?.roots ?? null) ? null : roots));
3537
3433
  if (needed.every((roots) => roots === null)) return {};
3538
- // Clio admits a rewritten call afresh, without the operator's approval of the original, so a call
3434
+ // PanCode admits a rewritten call afresh, without the operator's approval of the original, so a call
3539
3435
  // that needs approval (more than one worker, a review loop, compete) is refused with the exact roots instead.
3540
3436
  if (host.tasks.length > 1)
3541
3437
  return block(
@@ -3543,13 +3439,13 @@ async function guardDispatch(ctx: ExtensionContextV2, args: Json, host?: HostDis
3543
3439
  .map((entry, index) => `task ${index + 1} (${entry.agent}): ${(narrowed[index] ?? []).join(", ") || "none, it only reads"}`)
3544
3440
  .join("; ")}.`,
3545
3441
  );
3546
- // Clio admits an extension's rewrite only as a narrowing. A declared intent without write roots is an empty
3442
+ // PanCode admits an extension's rewrite only as a narrowing. A declared intent without write roots is an empty
3547
3443
  // write ceiling there, although the worker itself treats it as no boundary, so the desk cannot fill the roots in.
3548
3444
  const declaresEmpty = (item: unknown): boolean =>
3549
3445
  isObject(item) && isObject(item.intent) && (!Array.isArray(item.intent.write_roots) || item.intent.write_roots.length === 0);
3550
3446
  if (declaresEmpty(args) || (Array.isArray(args.tasks) && args.tasks.some(declaresEmpty)))
3551
3447
  return block(
3552
- `WTF-P dispatch guard: an intent without write_roots bounds nothing for the worker, and Clio will not let the desk fill them in. Send ${entries
3448
+ `WTF-P dispatch guard: an intent without write_roots bounds nothing for the worker, and PanCode will not let the desk fill them in. Send ${entries
3553
3449
  .map((entry, index) => `${entries.length > 1 ? `task ${index + 1} (${entry.agent}) ` : ""}intent.write_roots ${(needed[index] ?? []).join(", ") || "omitted, since it only reads"}`)
3554
3450
  .join("; ")} in that intent.`,
3555
3451
  );
@@ -3570,7 +3466,7 @@ const BASH_DESK_PATHS = /\.planning\/(?:interactions\b|\.wtfp-)/u;
3570
3466
  const COMMAND_TOOLS = new Set(["bash", "run_script", "job"]);
3571
3467
 
3572
3468
  /**
3573
- * Inside a WTF-P action every question is the author's. Clio answers an
3469
+ * Inside a WTF-P action every question is the author's. PanCode answers an
3574
3470
  * unanswered `ask_user` round with its recommended option after
3575
3471
  * `safety.unattendedAfterSeconds`, unless the question is `operator_only`, so
3576
3472
  * the desk marks a lone question that way and refuses a round that would need
@@ -3582,13 +3478,13 @@ async function guardQuestions(ctx: ExtensionContextV2, input: Json): Promise<Ext
3582
3478
  if (questions.length === 0 || questions.every((question) => (question as Json | null)?.operator_only === true)) return {};
3583
3479
  if (!(await armedFor(ctx))) return {};
3584
3480
  if (questions.length > 1)
3585
- return block("WTF-P: inside a WTF-P action each question is the author's to answer. Ask them one call at a time, each with operator_only: true and its own options, so Clio never answers one for an absent author.");
3481
+ return block("WTF-P: inside a WTF-P action each question is the author's to answer. Ask them one call at a time, each with operator_only: true and its own options, so PanCode never answers one for an absent author.");
3586
3482
  return {
3587
3483
  effects: [
3588
3484
  {
3589
3485
  kind: "rewrite_tool_input",
3590
3486
  args: { ...input, questions: [{ ...(questions[0] as Json), operator_only: true }] },
3591
- reason: "WTF-P asks the author, and only the author may answer: Clio never takes a recommended option for this question.",
3487
+ reason: "WTF-P asks the author, and only the author may answer: PanCode never takes a recommended option for this question.",
3592
3488
  },
3593
3489
  ],
3594
3490
  };
@@ -3605,7 +3501,7 @@ async function guard(ctx: ExtensionContextV2, tool: string, args: unknown, event
3605
3501
  let result: ExtensionHookResult = {};
3606
3502
  try {
3607
3503
  const host = hostLanding(event);
3608
- // A host that sends facts once sends them for every call it can resolve, so a later call without them failed in Clio.
3504
+ // A host that sends facts once sends them for every call it can resolve, so a later call without them failed in PanCode.
3609
3505
  if ((host.target || host.dispatch) && !(await ctx.state.get<boolean>("host-facts")).value) await ctx.state.set("host-facts", true);
3610
3506
  if (tool === "dispatch") result = await guardDispatch(ctx, input, host.dispatch, host.malformed);
3611
3507
  else if (tool === "ask_user") result = await guardQuestions(ctx, input);
@@ -3613,7 +3509,7 @@ async function guard(ctx: ExtensionContextV2, tool: string, args: unknown, event
3613
3509
  if (BASH_DESK_PATHS.test(JSON.stringify(input))) result = block("WTF-P write guard: commands may not touch the desk's own records under .planning.");
3614
3510
  } else {
3615
3511
  const raw = input.path ?? input.file_path ?? input.filePath;
3616
- // The artifact tool trims its path; without one it writes under Clio's own artifact directory, where Clio's landing still says it lands.
3512
+ // The artifact tool trims its path; without one it writes under PanCode's own artifact directory, where PanCode's landing still says it lands.
3617
3513
  const target = typeof raw === "string" ? (tool === "artifact" ? raw.trim() : raw) : "";
3618
3514
  if (target.length > 0 || host.target) result = await guardWrite(ctx, target || "the artifact", host.target, host.malformed);
3619
3515
  }
@@ -3628,7 +3524,7 @@ async function guard(ctx: ExtensionContextV2, tool: string, args: unknown, event
3628
3524
  * action may measure: its recorded word count is stale until measure_section
3629
3525
  * runs. It rides on the tool result, so it spends none of the turn's shared
3630
3526
  * continuation budget, and it reaches a dispatched worker too, whose writes
3631
- * Clio hooks, so it says whose call the measurement is. Each section is noted
3527
+ * PanCode hooks, so it says whose call the measurement is. Each section is noted
3632
3528
  * once until it is measured again.
3633
3529
  */
3634
3530
  async function noteManuscriptWrite(ctx: ExtensionContextV2, event: unknown): Promise<ExtensionHookResult> {
@@ -3955,7 +3851,7 @@ export default function extension(api: ExtensionApiV2): void {
3955
3851
  });
3956
3852
 
3957
3853
  api.hook("prompt_submit", async (event, ctx) => {
3958
- // Clio continuing a stopped yolo turn (tool budget, loop guard, a failure) resumes that turn's drive and armed step.
3854
+ // PanCode continuing a stopped yolo turn (tool budget, loop guard, a failure) resumes that turn's drive and armed step.
3959
3855
  const held = (await ctx.state.get<{ armed?: Armed; drive?: Drive; workspace: string }>("held")).value;
3960
3856
  await ctx.state.delete("held");
3961
3857
  if (event.point === "prompt_submit" && (event as { origin?: string }).origin === "continuation") {
@@ -4020,7 +3916,7 @@ export default function extension(api: ExtensionApiV2): void {
4020
3916
  return { text: recovered ?? "", ...(recovered ? { toast: { text: recovered, tone: "warning" as const } } : {}), ...(await picture(ctx)) };
4021
3917
  });
4022
3918
  api.on("turn_end", async (_event, ctx) => {
4023
- // An action arms for the turn its command starts; nothing it allowed outlives that turn. Clio's own
3919
+ // An action arms for the turn its command starts; nothing it allowed outlives that turn. PanCode's own
4024
3920
  // continuation of the turn may resume it, so the desk holds what it had until the next prompt says whose it is.
4025
3921
  const armed = (await ctx.state.get<Armed>("armed")).value;
4026
3922
  const drive = (await ctx.state.get<Drive>("drive")).value;
@@ -1,5 +1,5 @@
1
1
  {
2
- "schema": "wtfp.clio-write-guard/v4",
2
+ "schema": "wtfp.pancode-write-guard/v4",
3
3
  "actions": {
4
4
  "add-todo": {
5
5
  "agents": [],