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,8 +1,8 @@
1
- // Generated by WTF-P adapter compiler v5 from clio/runtime/extension.test.ts; do not edit.
1
+ // Generated by WTF-P adapter compiler v5 from hosts/pancode/runtime/extension.test.ts; do not edit.
2
2
  /**
3
- * Package tests for the WTF-P desk, run by `clio-coder extensions test
4
- * vendors/clio-extension`. Each case builds a small valid project in a
5
- * task-owned TMPDIR and drives the desk the way Clio does: tool calls,
3
+ * Package tests for the WTF-P desk, run by `pancode extensions test
4
+ * pancode/extension`. Each case builds a small valid project in a
5
+ * task-owned TMPDIR and drives the desk the way PanCode does: tool calls,
6
6
  * interviews, hooks and observations. The kit serves no plugin unless a case
7
7
  * passes one. Answers here are simulated interview events, not a human's:
8
8
  * they test the desk's bookkeeping, never an author's judgment.
@@ -15,7 +15,7 @@ import os, { homedir } from "node:os";
15
15
  import path from "node:path";
16
16
  import { test } from "node:test";
17
17
  import { fileURLToPath } from "node:url";
18
- import { createExtensionTestHost } from "@iowarp/clio-coder/extensions/testing";
18
+ import { createExtensionTestHost } from "pancode/sdk/testing";
19
19
 
20
20
  const ROOT = fileURLToPath(new URL("../", import.meta.url));
21
21
  const PROJECT = "desk-test";
@@ -201,7 +201,7 @@ const SERVED = { id: "wtfp", prompts: ["wtfp:check-todos", "wtfp:plan-section",
201
201
 
202
202
  async function withDesk(run: (host: Host, workspace: string) => Promise<void>, plugin: typeof SERVED | null = null): Promise<void> {
203
203
  const workspace = project();
204
- const host = withClioFacts(await createExtensionTestHost(ROOT, { workspace, plugin }), workspace);
204
+ const host = withPanCodeFacts(await createExtensionTestHost(ROOT, { workspace, plugin }), workspace);
205
205
  try {
206
206
  await run(host, workspace);
207
207
  } finally {
@@ -233,12 +233,12 @@ const rewriteOf = (result: { effects?: Array<{ kind: string }> }): Json | null =
233
233
  (result.effects?.find((effect) => effect.kind === "rewrite_tool_input") as { args?: Json } | undefined)?.args ?? null;
234
234
 
235
235
  // --- the host's facts ------------------------------------------------------------
236
- // Clio 0.6.3 sends a before_tool hook where a path-taking tool lands and, for
236
+ // PanCode sends a before_tool hook where a path-taking tool lands and, for
237
237
  // dispatch, the plan admission parsed, and judges a rewritten call again. The
238
- // desk judges only those, so the test host models them as Clio resolves them,
238
+ // desk judges only those, so the test host models them as PanCode resolves them,
239
239
  // with the test process's own access.
240
240
 
241
- /** The WTF-P recipes Clio runs read-only: the reviewers, whose recipes are Clio's read-only class. */
241
+ /** The WTF-P recipes PanCode runs read-only: the reviewers, whose recipes are PanCode's read-only class. */
242
242
  const READ_ONLY_RECIPES = new Set(["wtfp-argument-verifier", "wtfp-coherence-checker", "wtfp-plan-checker", "wtfp-section-reviewer"]);
243
243
 
244
244
  /** A path with its existing part resolved through links; the rest is kept as named. */
@@ -253,13 +253,13 @@ function physical(file: string): string {
253
253
  }
254
254
 
255
255
  /**
256
- * Where a write through `joined` lands, as Clio's canonicalizeRawPath walks it
256
+ * Where a write through `joined` lands, as PanCode's canonicalizeRawPath walks it
257
257
  * (src/core/path-canonical.ts): a link at any component, dangling or not, is
258
258
  * read and the walk goes on from its target, a `..` after a link steps up from
259
259
  * the link's target, and a missing component ends the walk. Null for a loop,
260
260
  * more than 40 links, or a component that cannot be inspected.
261
261
  */
262
- function clioWalk(joined: string): string | null {
262
+ function pancodeWalk(joined: string): string | null {
263
263
  const { root } = path.parse(joined);
264
264
  const parts = joined.slice(root.length).split(path.sep).filter((part) => part !== "" && part !== ".");
265
265
  const up = parts.indexOf("..");
@@ -312,15 +312,15 @@ function clioWalk(joined: string): string | null {
312
312
  return current;
313
313
  }
314
314
 
315
- /** Where Clio lands a tool's path: `@` dropped, Unicode spaces plain, `~` expanded, then Clio's physical walk from the workspace it runs in. */
316
- function clioTarget(raw: string, workspace: string): Json {
315
+ /** Where PanCode lands a tool's path: `@` dropped, Unicode spaces plain, `~` expanded, then PanCode's physical walk from the workspace it runs in. */
316
+ function pancodeTarget(raw: string, workspace: string): Json {
317
317
  let spelled = (raw.startsWith("@") ? raw.slice(1) : raw).replace(/[\u00A0\u2000-\u200A\u202F\u205F\u3000]/gu, " ");
318
318
  if (spelled === "~") spelled = homedir();
319
319
  else if (spelled.startsWith("~/")) spelled = homedir() + spelled.slice(1);
320
320
  const real = realpathSync(workspace);
321
- // Clio runs in the workspace, so its own /proc/self/cwd is the workspace.
321
+ // PanCode runs in the workspace, so its own /proc/self/cwd is the workspace.
322
322
  if (spelled === "/proc/self/cwd" || spelled.startsWith("/proc/self/cwd/")) spelled = real + spelled.slice("/proc/self/cwd".length);
323
- const landed = clioWalk(path.isAbsolute(spelled) ? spelled : `${real}${path.sep}${spelled}`);
323
+ const landed = pancodeWalk(path.isAbsolute(spelled) ? spelled : `${real}${path.sep}${spelled}`);
324
324
  const at = landed ?? (path.isAbsolute(spelled) ? spelled : `${real}${path.sep}${spelled}`);
325
325
  const relative = path.relative(real, at);
326
326
  const inside = landed !== null && relative !== ".." && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative);
@@ -328,19 +328,19 @@ function clioTarget(raw: string, workspace: string): Json {
328
328
  }
329
329
 
330
330
  /**
331
- * A dispatch call as Clio's admission hands it to hooks (src/tools/dispatch-arguments.ts
331
+ * A dispatch call as PanCode's admission hands it to hooks (src/tools/dispatch-arguments.ts
332
332
  * prepareDispatchArguments, src/tools/dispatch-admission.ts): `tasks` an array, a
333
- * lone `task` moved into it, and either Clio's private resolved plan or the
334
- * reason preparation failed. Clio refuses a `./` root and parallel writers
333
+ * lone `task` moved into it, and either PanCode's private resolved plan or the
334
+ * reason preparation failed. PanCode refuses a `./` root and parallel writers
335
335
  * without roots before any hook; these tests send no other failing shape.
336
336
  */
337
- function clioPrepare(args: Json): Json {
337
+ function pancodePrepare(args: Json): Json {
338
338
  const next: Json = { ...args };
339
339
  if (typeof next.tasks === "string" && /^\s*[[{]/u.test(next.tasks)) {
340
340
  try {
341
341
  next.tasks = JSON.parse(next.tasks) as unknown;
342
342
  } catch {
343
- // Clio leaves the string and reports the shape itself.
343
+ // PanCode leaves the string and reports the shape itself.
344
344
  }
345
345
  }
346
346
  if (next.tasks !== undefined && !Array.isArray(next.tasks)) next.tasks = [next.tasks];
@@ -358,7 +358,7 @@ function clioPrepare(args: Json): Json {
358
358
  : writers.length > 1 && declared.some((roots, index) => !READ_ONLY_RECIPES.has(agentOf(items[index] as Json, args)) && roots.filter((root) => !/^\.\/?$/u.test(root.trim())).length === 0)
359
359
  ? "parallel writers need disjoint intent.write_roots"
360
360
  : null;
361
- return failure === null ? { ...next, __clio_resolved_dispatch_plan: { resolvedBy: "clio" } } : { ...next, __clio_dispatch_plan_preparation_error: failure };
361
+ return failure === null ? { ...next, __pancode_resolved_dispatch_plan: { resolvedBy: "pancode" } } : { ...next, __pancode_dispatch_plan_preparation_error: failure };
362
362
  }
363
363
 
364
364
  function agentOf(item: Json, args: Json): string {
@@ -366,8 +366,8 @@ function agentOf(item: Json, args: Json): string {
366
366
  return named.trim() || "coder";
367
367
  }
368
368
 
369
- /** The plan Clio's admission reports for prepared arguments: write roots trimmed, without `.`, deduplicated and sorted, with their physical boundaries. */
370
- function clioPlan(prepared: Json, workspace: string): Json {
369
+ /** The plan PanCode's admission reports for prepared arguments: write roots trimmed, without `.`, deduplicated and sorted, with their physical boundaries. */
370
+ function pancodePlan(prepared: Json, workspace: string): Json {
371
371
  const real = realpathSync(workspace);
372
372
  if (prepared.list === true) return { kind: "list" };
373
373
  if (prepared.apply_winner !== undefined) return { kind: "apply-winner", branch: String((prepared.apply_winner as Json).branch ?? ""), cwd: real };
@@ -380,7 +380,7 @@ function clioPlan(prepared: Json, workspace: string): Json {
380
380
  const spelledCwd = typeof item.cwd === "string" ? item.cwd : typeof prepared.cwd === "string" ? prepared.cwd : ".";
381
381
  const cwd = physical(path.resolve(real, spelledCwd.trim() || "."));
382
382
  const agent = agentOf(item, prepared);
383
- // Clio runs a read-only recipe's worker read-only, with no write roots (src/tools/dispatch.ts writerLanding).
383
+ // PanCode runs a read-only recipe's worker read-only, with no write roots (src/tools/dispatch.ts writerLanding).
384
384
  const readOnly = READ_ONLY_RECIPES.has(agent);
385
385
  const roots = readOnly ? [] : [...new Set((((item.intent as Json | undefined)?.write_roots ?? shared ?? []) as string[]).map((root) => root.trim()).filter((root) => !/^\.\/?$/u.test(root)))].sort();
386
386
  return { role: "task", agent, cwd, writeRoots: roots, writeBoundaries: roots.map((root) => physical(path.resolve(cwd, root))), worktree: item.worktree === true, readOnly };
@@ -388,30 +388,30 @@ function clioPlan(prepared: Json, workspace: string): Json {
388
388
  };
389
389
  }
390
390
 
391
- /** A before_tool event as Clio 0.6.3 sends it, unless the test sent its own facts. */
391
+ /** A before_tool event as PanCode sends it, unless the test sent its own facts. */
392
392
  function withFacts(event: Json, workspace: string): Json {
393
- // Clio sends the same landing at after_tool as at before_tool.
393
+ // PanCode sends the same landing at after_tool as at before_tool.
394
394
  if ((event.point !== "before_tool" && event.point !== "after_tool") || "target" in event || "dispatch" in event) return event;
395
395
  const args = (event.args ?? {}) as Json;
396
396
  if (event.tool === "dispatch") {
397
- const prepared = clioPrepare(args);
398
- return typeof prepared.__clio_dispatch_plan_preparation_error === "string" ? { ...event, args: prepared } : { ...event, args: prepared, dispatch: clioPlan(prepared, workspace) };
397
+ const prepared = pancodePrepare(args);
398
+ return typeof prepared.__pancode_dispatch_plan_preparation_error === "string" ? { ...event, args: prepared } : { ...event, args: prepared, dispatch: pancodePlan(prepared, workspace) };
399
399
  }
400
400
  const raw = args.path ?? args.file_path ?? args.filePath;
401
401
  if (["write", "edit", "artifact"].includes(event.tool as string) && typeof raw === "string" && raw.trim().length > 0)
402
- return { ...event, target: clioTarget(event.tool === "artifact" ? raw.trim() : raw, workspace) };
402
+ return { ...event, target: pancodeTarget(event.tool === "artifact" ? raw.trim() : raw, workspace) };
403
403
  return event;
404
404
  }
405
405
 
406
406
  /**
407
- * The test host as Clio 0.6.3 runs the desk: each before_tool event carries
408
- * Clio's facts; a dispatch Clio could not prepare is refused by Clio with its
407
+ * The test host as PanCode runs the desk: each before_tool event carries
408
+ * PanCode's facts; a dispatch PanCode could not prepare is refused by PanCode with its
409
409
  * own reason when no hook refused it first; and a call the desk rewrites is
410
410
  * admitted afresh, so a plan-scale one, which needs the operator's approval,
411
411
  * is refused, and any other is judged again with the plan of what it starts.
412
- * An event marked `bare` reaches the desk as Clio 0.6.2 sends it.
412
+ * An event marked `bare` reaches the desk as a host that sends no facts sends it.
413
413
  */
414
- function withClioFacts(host: Host, workspace: string): Host {
414
+ function withPanCodeFacts(host: Host, workspace: string): Host {
415
415
  const hook = host.hook.bind(host);
416
416
  const refuse = (reason: string) => ({ effects: [{ kind: "block_tool", reason }] });
417
417
  const judged = async (event: Json, options?: Json) => {
@@ -422,8 +422,8 @@ function withClioFacts(host: Host, workspace: string): Host {
422
422
  const sent = withFacts(event, workspace);
423
423
  const first = await hook(sent as never, options as never);
424
424
  if (event.point !== "before_tool" || event.tool !== "dispatch" || "dispatch" in event) return first;
425
- const failure = (sent.args as Json).__clio_dispatch_plan_preparation_error;
426
- if (typeof failure === "string") return blocked(first) === null ? refuse(`Clio: ${failure}`) : first;
425
+ const failure = (sent.args as Json).__pancode_dispatch_plan_preparation_error;
426
+ if (typeof failure === "string") return blocked(first) === null ? refuse(`PanCode: ${failure}`) : first;
427
427
  const rewritten = rewriteOf(first);
428
428
  if (rewritten === null || blocked(first) !== null) return first;
429
429
  if ((((sent.dispatch as Json).tasks as unknown[]) ?? []).length > 1) return refuse("extension wtfp rewrote dispatch input into a call that would need operator approval");
@@ -532,10 +532,10 @@ test("no record write or file write escapes through a symbolic link", () =>
532
532
  // A link that lands in paper/ is judged where it lands (W2).
533
533
  symlinkSync(path.join(workspace, "paper"), path.join(workspace, "drafts"));
534
534
  assert.match(blocked(await write(host, "drafts/introduction.md")) ?? "", /cannot be written yet/);
535
- // Clio follows a dangling link to its target, here outside the project, and refuses the write if the link changes after the hook.
535
+ // PanCode follows a dangling link to its target, here outside the project, and refuses the write if the link changes after the hook.
536
536
  symlinkSync(path.join(outside, "missing"), path.join(workspace, "paper/dangling.md"));
537
537
  assert.equal(blocked(await write(host, "paper/dangling.md")), null);
538
- // A link Clio cannot resolve, such as a loop, is refused.
538
+ // A link PanCode cannot resolve, such as a loop, is refused.
539
539
  symlinkSync("loop", path.join(workspace, "paper/loop"));
540
540
  assert.match(blocked(await write(host, "paper/loop/draft.md")) ?? "", /could not resolve/);
541
541
  } finally {
@@ -607,7 +607,7 @@ test("an answer that was not offered, replayed, or meant for another desk record
607
607
  const forged = await host.interview({ id: "gate-one", step: "gate.0123456789ab", nav: "next", answers: { choice: "workflow-first" } });
608
608
  assert.match("done" in forged ? forged.text : "", /matches no open question/);
609
609
  const other = project();
610
- const elsewhere = withClioFacts(await createExtensionTestHost(ROOT, { workspace: other }), other);
610
+ const elsewhere = withPanCodeFacts(await createExtensionTestHost(ROOT, { workspace: other }), other);
611
611
  try {
612
612
  const foreign = await elsewhere.interview({ id: "gate-one", step: await ask(host, GATE), nav: "next", answers: { choice: "workflow-first" } });
613
613
  assert.match("done" in foreign ? foreign.text : "", /matches no open question/);
@@ -729,7 +729,7 @@ test("the manuscript waits for an author-approved plan whose exact bytes were ap
729
729
  await answer(host, GATE, "protocol-first");
730
730
  assert.match(blocked(await write(host, "paper/introduction.md")) ?? "", /has not answered "Approve the introduction plan\?"/);
731
731
  const declined = project();
732
- const other = withClioFacts(await createExtensionTestHost(ROOT, { workspace: declined }), declined);
732
+ const other = withPanCodeFacts(await createExtensionTestHost(ROOT, { workspace: declined }), declined);
733
733
  try {
734
734
  await answer(other, GATE, "protocol-first");
735
735
  await answer(other, PLAN_GATE, "revise");
@@ -903,56 +903,18 @@ test("a family URI reads every record of that family in one call, and names what
903
903
  const records = (both.data as Json).records as Json[];
904
904
  assert.deepEqual(records.map((entry) => (entry.record as Json).id), ["source-a", "source-b"]);
905
905
  assert.equal(records[0]?.sha256, (await host.tool("read_record", { uri: "project://sources/source-a" }) as { data: Json }).data.sha256);
906
- // A family too large to return in full lists one digest row per record, with the version to write it back.
907
- put(workspace, ".planning/sources/source-c.json", source("source-c", "C".repeat(20 * 1024)));
908
- const listed = await host.tool("read_record", { uri: "project://sources" });
909
- assert.equal((listed.data as Json).form, "digest");
910
- assert.match(listed.text, /holds 3 records, 2\d KB in full, so this read lists 3 as one digest row each.*Read a record at its uri for every field, or keep one section's records with \?section=<section id>/);
911
- const rows = (listed.data as Json).records as Json[];
912
- assert.deepEqual(rows.map((row) => row.citation_key), ["sourcea", "sourceb", "sourcec"]);
913
- assert.equal(rows[0]?.sha256, records[0]?.sha256);
914
- assert.equal(rows[0]?.record, undefined, "a digest row carries no record body");
915
- assert.ok(String(rows[2]?.title).length <= 160, "a digest row bounds its text");
916
- // Past the page budget, the rest is named for the next page.
917
- for (const id of ["source-d", "source-e", "source-f", "source-g"]) put(workspace, `.planning/sources/${id}.json`, source(id, "x".repeat(20 * 1024)));
918
- const many = Array.from({ length: 300 }, (_, index) => `source-z${index}`);
919
- for (const id of many) put(workspace, `.planning/sources/${id}.json`, source(id, "Z"));
906
+ // A family past the read's budget returns what fits and names the rest.
907
+ put(workspace, ".planning/sources/source-c.json", source("source-c", "C".repeat(60 * 1024)));
920
908
  const capped = await host.tool("read_record", { uri: "project://sources" });
921
- const omitted = (capped.data as Json).omitted as string[];
922
- assert.ok(omitted.length > 0);
923
- const last = String((((capped.data as Json).records as Json[]).at(-1) as Json).uri).split("/").pop();
924
- assert.match(capped.text, new RegExp(`${omitted.length} more not returned, to keep this read small; read the next page with project://sources\\?after=${last}`));
925
- const next = await host.tool("read_record", { uri: `project://sources?after=${last}` });
926
- assert.equal(((next.data as Json).records as Json[])[0]?.uri, `project://sources/${omitted[0]}`);
927
- assert.match((await host.tool("read_record", { uri: "project://sources?sort=year" })).text, /^Not read: .*takes section=<section id> and after=<record id>/);
909
+ assert.deepEqual((capped.data as Json).omitted, ["source-c"]);
910
+ assert.match(capped.text, /1 more not returned, to keep this read small; read the next page with project:\/\/sources\?after=source-b/);
911
+ const next = await host.tool("read_record", { uri: "project://sources?after=source-b" });
912
+ assert.deepEqual(((next.data as Json).records as Json[]).map((entry) => (entry.record as Json).id), ["source-c"]);
928
913
  // Sections are a family too, read from each section's own directory.
929
914
  const sections = await host.tool("read_record", { uri: "project://sections" });
930
915
  assert.deepEqual(((sections.data as Json).records as Json[]).map((entry) => entry.uri), ["project://sections/introduction"]);
931
916
  }, SERVED));
932
917
 
933
- test("a family read narrowed to one section keeps only the records about it", () =>
934
- withDesk(async (host, workspace) => {
935
- const validation = (id: string, subject: string) => ({
936
- schema: "wtfp.project.validation/v1", id, project_id: PROJECT, subject_uri: subject, validator_role: "argument-verifier", action_id: "verify-work",
937
- status: "issues-found", checks: [{ id: "claims", status: "failed", summary: "A claim is unsupported.", evidence: ["paragraph 2"] }], issues: ["unsupported claim"], next_actions: [], effects_applied: [], executed_at: AT,
938
- });
939
- put(workspace, ".planning/validations/introduction-verified.json", validation("introduction-verified", "project://sections/introduction"));
940
- put(workspace, ".planning/validations/introduction-plan-checked.json", validation("introduction-plan-checked", "project://sections/introduction/plans/initial"));
941
- put(workspace, ".planning/validations/methods-verified.json", validation("methods-verified", "project://sections/methods"));
942
- const narrowed = await host.tool("read_record", { uri: "project://validations?section=introduction" });
943
- assert.deepEqual(((narrowed.data as Json).records as Json[]).map((entry) => entry.uri), ["project://validations/introduction-plan-checked", "project://validations/introduction-verified"]);
944
- assert.match(narrowed.text, /holds 2 records about section introduction; 2 returned in full/);
945
- assert.equal((narrowed.data as Json).uri, "project://validations?section=introduction");
946
- // Past the full budget the narrowed family is listed by digest, each row naming its failed checks.
947
- for (let index = 0; index < 12; index++) put(workspace, `.planning/validations/introduction-review-${index}.json`, { ...validation(`introduction-review-${index}`, "project://sections/introduction"), issues: ["x".repeat(2048)] });
948
- const digest = await host.tool("read_record", { uri: "project://validations?section=introduction" });
949
- assert.equal((digest.data as Json).form, "digest");
950
- const row = ((digest.data as Json).records as Json[])[0] as Json;
951
- assert.deepEqual([row.action_id, row.status, row.failed_checks, row.issues], ["verify-work", "issues-found", ["claims"], 1]);
952
- assert.ok(((digest.data as Json).records as Json[]).every((entry) => String(entry.uri).includes("introduction")));
953
- assert.match((await host.tool("read_record", { uri: "project://validations?section=nowhere" })).text, /^Not read: there is no section nowhere/);
954
- }, SERVED));
955
-
956
918
  test("a literature-heavy section that records no claim needing evidence is not covered", () =>
957
919
  withDesk(async (host, workspace) => {
958
920
  const outline = read(workspace, ".planning/structure/outline.json");
@@ -1091,7 +1053,7 @@ test("only an advance turn may ask the desk for a step, and the turn's end ends
1091
1053
  await host.observe({ event: "turn_end", turnId: "t1", outcome: "completed", usage: null });
1092
1054
  assert.equal((await nextStep(host)).isError, true, "the drive ends with its turn");
1093
1055
  await host.hook({ point: "prompt_submit", text: "/wtfp:advance" });
1094
- // Clio continuing the turn after its tool budget or loop guard resumes the drive the turn had.
1056
+ // PanCode continuing the turn after its tool budget or loop guard resumes the drive the turn had.
1095
1057
  assert.equal((await nextStep(host)).data.kind, "gate");
1096
1058
  await host.observe({ event: "turn_end", turnId: "t2", outcome: "completed", usage: null });
1097
1059
  assert.equal((await nextStep(host)).isError, true, "between turns nothing drives");
@@ -1120,7 +1082,7 @@ test("advance puts each gate to the author, then arms exactly the step the ladde
1120
1082
  }
1121
1083
  assert.deepEqual(asked.sort(), [GATE, PLAN_GATE].sort());
1122
1084
  const step = await nextStep(host);
1123
- assert.deepEqual([step.data.kind, step.data.action, step.data.section, step.data.prompt], ["step", "write-section", "introduction", "ai.iowarp.clio/prompts/wtfp/write-section.md"]);
1085
+ assert.deepEqual([step.data.kind, step.data.action, step.data.section, step.data.prompt], ["step", "write-section", "introduction", "dev.pancode/prompts/wtfp/write-section.md"]);
1124
1086
  assert.match(step.text, /armed for write-section introduction only/);
1125
1087
  assert.equal(blocked(await write(host, "paper/introduction.md")), null, "the armed step may write its manuscript");
1126
1088
  assert.ok(blocked(await write(host, ".planning/sections/introduction/plans/second.md")), "but nothing write-section does not declare");
@@ -1160,8 +1122,8 @@ test("every next_step result restates the driver rule, so a compacted turn can c
1160
1122
  const step = await nextStep(host);
1161
1123
  assert.equal(step.data.kind, "step");
1162
1124
  assert.match(step.text, /^Step 1: \/wtfp:write-section introduction\./);
1163
- assert.match(step.text, /Read and follow <plugin root>\/ai\.iowarp\.clio\/prompts\/wtfp\/write-section\.md, where <plugin root> is the WTF-P plugin root \(two directories above the base_dir of the loaded wtfp-manage-project skill/);
1164
- // Live on Clio 0.8.3, the model looked for a tool named audit-milestone and stopped the drive.
1125
+ assert.match(step.text, /Read and follow <plugin root>\/dev\.pancode\/prompts\/wtfp\/write-section\.md, where <plugin root> is the WTF-P plugin root \(two directories above the base_dir of the loaded wtfp-manage-project skill/);
1126
+ // Live on the 0.8.3 host, the model looked for a tool named audit-milestone and stopped the drive.
1165
1127
  assert.match(step.text, /A step is a procedure, not a capability: there is no tool named after its action/);
1166
1128
  assert.match(step.text, /invocation input introduction/);
1167
1129
  assert.equal(ruleOf(step.text), rule);
@@ -1431,7 +1393,7 @@ test("status gives an agent the whole project in one read, matching what the des
1431
1393
  }, SERVED));
1432
1394
 
1433
1395
  // --- the turn_start status reminder ------------------------------------------------
1434
- // Clio fires turn_start once per operator prompt; the desk answers with its status
1396
+ // PanCode fires turn_start once per operator prompt; the desk answers with its status
1435
1397
  // only when that prompt armed a WTF-P action or advance in a project.
1436
1398
 
1437
1399
  const turnStart = (host: Host) => host.hook({ point: "turn_start", turnId: "t1" });
@@ -1460,7 +1422,7 @@ test("a WTF-P turn starts from the desk's status, and no other turn does", () =>
1460
1422
  assert.equal(reminderOf(await turnStart(host)), null, "no project, no reminder");
1461
1423
  }, DRIVEN_PLUGIN));
1462
1424
 
1463
- test("a status too long for one Clio effect is cut to 2,000 characters and points at the status tool", () =>
1425
+ test("a status too long for one PanCode effect is cut to 2,000 characters and points at the status tool", () =>
1464
1426
  withDesk(async (host, workspace) => {
1465
1427
  const outline = read(workspace, ".planning/structure/outline.json");
1466
1428
  const extra = Array.from({ length: 60 }, (_, index) => ({
@@ -1545,7 +1507,7 @@ test("WTF-P workers are dispatched only inside their action and only to manuscri
1545
1507
  await answer(host, PLAN_GATE, "approve");
1546
1508
  const allowed = await dispatch({ agent: "wtfp-section-writer", task: "Draft the introduction." });
1547
1509
  assert.deepEqual(rootsOf(rewriteOf(allowed)), [".planning/sections/introduction/summary.md", "paper/introduction.md", "paper/introduction/"]);
1548
- assert.ok(!Object.keys(rewriteOf(allowed) ?? {}).some((key) => key.startsWith("__clio_")), "Clio recomputes its own admission keys for a rewritten call");
1510
+ assert.ok(!Object.keys(rewriteOf(allowed) ?? {}).some((key) => key.startsWith("__pancode_")), "PanCode recomputes its own admission keys for a rewritten call");
1549
1511
  const narrowed = await dispatch({ agent: "wtfp-section-writer", task: "Draft.", intent: { write_roots: ["."] } });
1550
1512
  assert.deepEqual(rootsOf(rewriteOf(narrowed)), [".planning/sections/introduction/summary.md", "paper/introduction.md", "paper/introduction/"]);
1551
1513
  // Roots that already are the confinement, in any order, need no rewrite.
@@ -1557,7 +1519,7 @@ test("WTF-P workers are dispatched only inside their action and only to manuscri
1557
1519
  );
1558
1520
  assert.match(
1559
1521
  blocked(await dispatch({ tasks: [{ agent: "wtfp-section-writer", task: "a" }, { agent: "wtfp-section-writer", task: "b" }] })) ?? "",
1560
- /Clio: parallel writers need disjoint intent\.write_roots/,
1522
+ /PanCode: parallel writers need disjoint intent\.write_roots/,
1561
1523
  );
1562
1524
  assert.match(blocked(await dispatch({ agent: "coder", task: "x", intent: { write_roots: ["src"] } })) ?? "", /delegates only to wtfp-argument-verifier, wtfp-section-writer, and this call would start coder/);
1563
1525
  assert.ok(existsSync(path.join(workspace, "paper/introduction.md")));
@@ -1566,7 +1528,7 @@ test("WTF-P workers are dispatched only inside their action and only to manuscri
1566
1528
  assert.match(blocked(await dispatch({ agent: "wtfp-section-writer", task: "Draft." })) ?? "", /paper\/introduction\/ does not lead where it reads/);
1567
1529
  }, SERVED));
1568
1530
 
1569
- test("the guard judges the file Clio's tools open, however the path is spelled (W2)", () =>
1531
+ test("the guard judges the file PanCode's tools open, however the path is spelled (W2)", () =>
1570
1532
  withDesk(async (host, workspace) => {
1571
1533
  const manuscript = path.join(workspace, "paper/introduction.md");
1572
1534
  for (const spelling of ["@paper/introduction.md", `~/${path.relative(homedir(), manuscript)}`, "paper/./introduction.md"])
@@ -1581,26 +1543,26 @@ test("the guard judges the file Clio's tools open, however the path is spelled (
1581
1543
  assert.match(blocked(artifact) ?? "", /cannot be written yet/);
1582
1544
  const script = await host.hook({ point: "before_tool", tool: "run_script", turnId: "t1", args: { interpreter: "python3", script: "x.py", args: [".planning/interactions/x.json"] } });
1583
1545
  assert.match(blocked(script) ?? "", /desk's own records/);
1584
- const manifest = readFileSync(path.join(ROOT, "clio-coder-extension.yaml"), "utf8");
1546
+ const manifest = readFileSync(path.join(ROOT, "pancode-extension.yaml"), "utf8");
1585
1547
  const hooked = /on: before_tool, tools: \[([^\]]*)\]/u.exec(manifest)?.[1]?.split(/,\s*/u) ?? [];
1586
1548
  for (const tool of ["write", "edit", "artifact", "dispatch", "bash", "run_script", "job"]) assert.ok(hooked.includes(tool), `${tool} is hooked`);
1587
1549
  }));
1588
1550
 
1589
- test("where Clio resolves a call's landing and dispatch plan, the desk judges what Clio resolved", () =>
1551
+ test("where PanCode resolves a call's landing and dispatch plan, the desk judges what PanCode resolved", () =>
1590
1552
  withDesk(async (host, workspace) => {
1591
1553
  const real = realpathSync(workspace);
1592
1554
  const manuscript = path.join(real, "paper/introduction.md");
1593
1555
  const landed = (args: Json, target: unknown) => host.hook({ point: "before_tool", tool: "write", turnId: "t1", args, target });
1594
- // The landing Clio sends is the file the tool opens, whatever the call spells.
1556
+ // The landing PanCode sends is the file the tool opens, whatever the call spells.
1595
1557
  assert.match(blocked(await landed({ path: "notes.md" }, { arg: "path", path: manuscript, resolved: true, workspacePath: "paper/introduction.md" })) ?? "", /cannot be written yet/);
1596
- // A path the desk could not inspect is judged where Clio says it lands.
1558
+ // A path the desk could not inspect is judged where PanCode says it lands.
1597
1559
  assert.match(blocked(await landed({ path: "/proc/self/cwd/paper/introduction.md" }, { arg: "path", path: manuscript, resolved: true, workspacePath: "paper/introduction.md" })) ?? "", /cannot be written yet/);
1598
1560
  // A worker's write in a task worktree is judged at the checkout path it merges into.
1599
1561
  assert.match(blocked(await landed({ path: "paper/introduction.md" }, { arg: "path", path: "/elsewhere/worktree/paper/introduction.md", resolved: true, workspacePath: "paper/introduction.md" })) ?? "", /cannot be written yet/);
1600
- // Without a workspace path, the desk maps Clio's physical path itself.
1562
+ // Without a workspace path, the desk maps PanCode's physical path itself.
1601
1563
  assert.match(blocked(await landed({ path: "x" }, { arg: "path", path: manuscript, resolved: true })) ?? "", /cannot be written yet/);
1602
1564
  assert.equal(blocked(await landed({ path: "/elsewhere/notes.md" }, { arg: "path", path: "/elsewhere/notes.md", resolved: true, workspacePath: null })), null);
1603
- assert.match(blocked(await landed({ path: "loop/x" }, { arg: "path", path: path.join(real, "loop/x"), resolved: false, workspacePath: null })) ?? "", /Clio could not resolve/);
1565
+ assert.match(blocked(await landed({ path: "loop/x" }, { arg: "path", path: path.join(real, "loop/x"), resolved: false, workspacePath: null })) ?? "", /PanCode could not resolve/);
1604
1566
  assert.match(blocked(await landed({ path: "x" }, { arg: "path", path: 7, resolved: true })) ?? "", /form the desk cannot read/);
1605
1567
 
1606
1568
  const dispatch = (args: Json, plan: unknown) => host.hook({ point: "before_tool", tool: "dispatch", turnId: "t1", args, dispatch: plan });
@@ -1608,7 +1570,7 @@ test("where Clio resolves a call's landing and dispatch plan, the desk judges wh
1608
1570
  const plan = (...tasks: Json[]) => ({ kind: "tasks", mode: "single", tasks });
1609
1571
  const coder = { agent: "coder", task: "x", intent: { write_roots: ["src"] } };
1610
1572
  assert.equal(blocked(await dispatch(coder, plan(task("coder", { writeRoots: ["src"], writeBoundaries: [path.join(real, "src")] })))), null);
1611
- // Clio resolves auto; a WTF-P agent it picks outside its action is refused like one named.
1573
+ // PanCode resolves auto; a WTF-P agent it picks outside its action is refused like one named.
1612
1574
  assert.match(blocked(await dispatch({ agent: "auto", task: "Draft." }, plan(task("wtfp-section-writer")))) ?? "", /run only inside the WTF-P action/);
1613
1575
  assert.match(blocked(await dispatch(coder, plan(task("coder", { cwd: path.join(real, "paper") })))) ?? "", /cwd moves the write roots/);
1614
1576
  assert.match(
@@ -1616,19 +1578,19 @@ test("where Clio resolves a call's landing and dispatch plan, the desk judges wh
1616
1578
  /refuses worktree writers/,
1617
1579
  );
1618
1580
  assert.match(blocked(await dispatch(coder, plan(task("coder", { writeRoots: ["src"] })))) ?? "", /form the desk cannot read/, "every root has its boundary");
1619
- // A root lands where Clio says: one that resolves elsewhere does not lead where it reads, and one on the whole project is no boundary.
1581
+ // A root lands where PanCode says: one that resolves elsewhere does not lead where it reads, and one on the whole project is no boundary.
1620
1582
  assert.match(blocked(await dispatch(coder, plan(task("coder", { writeRoots: ["drafts/"], writeBoundaries: [path.join(real, "paper")] })))) ?? "", /drafts\/ does not lead where it reads/);
1621
1583
  assert.match(blocked(await dispatch(coder, plan(task("coder", { writeRoots: ["src", "."], writeBoundaries: [path.join(real, "src"), real] })))) ?? "", /intent\.write_roots/);
1622
1584
  assert.match(blocked(await dispatch({}, { kind: "apply-winner", branch: "winner", cwd: real })) ?? "", /compete winner/);
1623
1585
  assert.equal(blocked(await dispatch({}, { kind: "list" })), null);
1624
1586
  assert.match(blocked(await dispatch(coder, plan({ agent: "coder" }))) ?? "", /form the desk cannot read/);
1625
1587
  assert.match(blocked(await dispatch(coder, plan(task("coder", { agent: 7 })))) ?? "", /form the desk cannot read/);
1626
- // Outside an action, a worker Clio runs read-only needs no roots either.
1588
+ // Outside an action, a worker PanCode runs read-only needs no roots either.
1627
1589
  assert.equal(blocked(await dispatch({ agent: "auto", task: "Look." }, plan(task("scout", { readOnly: true })))), null);
1628
- // Clio could not prepare this call and refuses it itself, with its own reason.
1629
- assert.equal(blocked(await dispatch({ agent: "coder", task: "x", __clio_dispatch_plan_preparation_error: "write_roots entries may not start with ./" }, undefined)), null);
1630
- // A host that has sent facts once lacks them for a call only when Clio failed on it, and the desk says so.
1631
- assert.match(blocked(await host.hook({ point: "before_tool", tool: "write", turnId: "t1", args: { path: "src/x.md" }, bare: true } as never)) ?? "", /Clio sent no landing for this call/);
1590
+ // PanCode could not prepare this call and refuses it itself, with its own reason.
1591
+ assert.equal(blocked(await dispatch({ agent: "coder", task: "x", __pancode_dispatch_plan_preparation_error: "write_roots entries may not start with ./" }, undefined)), null);
1592
+ // A host that has sent facts once lacks them for a call only when PanCode failed on it, and the desk says so.
1593
+ assert.match(blocked(await host.hook({ point: "before_tool", tool: "write", turnId: "t1", args: { path: "src/x.md" }, bare: true } as never)) ?? "", /PanCode sent no landing for this call/);
1632
1594
  assert.match(blocked(await dispatch(coder, { kind: "council-of-elders", tasks: [] })) ?? "", /form the desk cannot read/, "an unknown plan is no plan");
1633
1595
  // A name that starts with `..` is still inside the project.
1634
1596
  assert.equal(blocked(await dispatch({ ...coder, intent: { write_roots: ["..notes/"] } }, plan(task("coder", { writeRoots: ["..notes/"], writeBoundaries: [path.join(real, "..notes")] })))), null);
@@ -1636,7 +1598,7 @@ test("where Clio resolves a call's landing and dispatch plan, the desk judges wh
1636
1598
  await host.hook({ point: "prompt_submit", text: "/wtfp:write-section introduction" });
1637
1599
  await answer(host, GATE, "protocol-first");
1638
1600
  await answer(host, PLAN_GATE, "approve");
1639
- // Clio admits a rewritten call afresh, without the approval a review loop needs, so the desk names the exact roots instead of rewriting.
1601
+ // PanCode admits a rewritten call afresh, without the approval a review loop needs, so the desk names the exact roots instead of rewriting.
1640
1602
  const roots = [".planning/sections/introduction/summary.md", "paper/introduction.md", "paper/introduction/"];
1641
1603
  const review = [task("wtfp-section-writer", { role: "builder" }), task("wtfp-section-reviewer", { role: "reviewer", readOnly: true })];
1642
1604
  const loop = await dispatch({ agent: "wtfp-section-writer", tasks: [{ task: "Draft the introduction." }], review: { reviewer: "wtfp-section-reviewer" } }, { kind: "tasks", mode: "review", tasks: review });
@@ -1645,39 +1607,39 @@ test("where Clio resolves a call's landing and dispatch plan, the desk judges wh
1645
1607
  const confined = await dispatch({ agent: "wtfp-section-writer", tasks: [{ task: "Draft the introduction.", intent: { write_roots: roots } }], review: { reviewer: "wtfp-section-reviewer" } }, { kind: "tasks", mode: "review", tasks: [sent, review[1]] });
1646
1608
  assert.equal(blocked(confined), null, "a loop that already names its roots runs as approved");
1647
1609
  assert.equal(rewriteOf(confined), null);
1648
- // A worker Clio runs read-only needs no write roots, whatever its recipe is called.
1610
+ // A worker PanCode runs read-only needs no write roots, whatever its recipe is called.
1649
1611
  const reader = await dispatch({ agent: "auto", tasks: [{ task: "Review the introduction." }] }, plan(task("scout", { readOnly: true })));
1650
1612
  assert.equal(blocked(reader), null);
1651
1613
  assert.equal(rewriteOf(reader), null);
1652
- // The desk takes that from Clio: a verifier Clio does not report read-only is confined like any writer.
1614
+ // The desk takes that from PanCode: a verifier PanCode does not report read-only is confined like any writer.
1653
1615
  assert.deepEqual(rootsOf(rewriteOf(await dispatch({ agent: "wtfp-argument-verifier", tasks: [{ task: "Verify." }] }, plan(task("wtfp-argument-verifier"))))), roots);
1654
- // A writer the action does not delegate to is refused by name, as is Clio's default worker when the call names no agent.
1616
+ // A writer the action does not delegate to is refused by name, as is PanCode's default worker when the call names no agent.
1655
1617
  assert.match(blocked(await dispatch({ agent: "wtfp-section-reviewer", tasks: [{ task: "Review." }] }, plan(task("wtfp-section-reviewer")))) ?? "", /delegates only to wtfp-argument-verifier, wtfp-section-writer, and this call would start wtfp-section-reviewer/);
1656
1618
  assert.match(blocked(await dispatch({ tasks: [{ task: "Draft." }] }, plan(task("coder")))) ?? "", /would start coder; name the role with agent \(for example agent: "wtfp-section-writer"\)/);
1657
1619
  assert.match(
1658
1620
  blocked(await dispatch({ agent: "wtfp-argument-verifier", task: "x", intent: { write_roots: ["src"] } }, plan(task("wtfp-argument-verifier", { writeRoots: ["src"], writeBoundaries: [path.join(real, "src")] })))) ?? "",
1659
1621
  /src lie outside what write-section may write/,
1660
1622
  );
1661
- // A declared empty write_roots is no boundary to the worker, and Clio refuses a rewrite that fills it, so the desk names the roots.
1623
+ // A declared empty write_roots is no boundary to the worker, and PanCode refuses a rewrite that fills it, so the desk names the roots.
1662
1624
  assert.match(
1663
1625
  blocked(await dispatch({ agent: "wtfp-section-writer", task: "Draft.", intent: { read_roots: [".planning"], write_roots: [] } }, plan(task("wtfp-section-writer")))) ?? "",
1664
1626
  /intent without write_roots bounds nothing.*Send intent\.write_roots \.planning\/sections\/introduction\/summary\.md, paper\/introduction\.md, paper\/introduction\//,
1665
1627
  );
1666
1628
  assert.match(blocked(await dispatch({ agent: "wtfp-section-writer", task: "Draft.", intent: { read_roots: [".planning"] } }, plan(task("wtfp-section-writer")))) ?? "", /intent without write_roots/);
1667
- // A task Clio keeps as a string is confined as a task object, and Clio's private keys are left for Clio to recompute.
1668
- const spelled = await dispatch({ agent: "wtfp-section-writer", tasks: ["Draft."], __clio_resolved_dispatch_plan: { resolvedBy: "clio" } }, plan(task("wtfp-section-writer")));
1629
+ // A task PanCode keeps as a string is confined as a task object, and PanCode's private keys are left for PanCode to recompute.
1630
+ const spelled = await dispatch({ agent: "wtfp-section-writer", tasks: ["Draft."], __pancode_resolved_dispatch_plan: { resolvedBy: "pancode" } }, plan(task("wtfp-section-writer")));
1669
1631
  assert.deepEqual(rewriteOf(spelled), { agent: "wtfp-section-writer", tasks: [{ task: "Draft.", intent: { write_roots: roots } }] });
1670
- // Clio's own artifact directory is no project file, but a landing elsewhere in the project, such as through a link, is judged there.
1632
+ // PanCode's own artifact directory is no project file, but a landing elsewhere in the project, such as through a link, is judged there.
1671
1633
  const artifact = (target: unknown) => host.hook({ point: "before_tool", tool: "artifact", turnId: "t1", args: { kind: "plan", content: "x" }, target });
1672
- assert.equal(blocked(await artifact({ arg: "path", path: path.join(real, ".clio-coder/artifacts/plan.md"), resolved: true, workspacePath: ".clio-coder/artifacts/plan.md" })), null);
1634
+ assert.equal(blocked(await artifact({ arg: "path", path: path.join(real, ".pancode/artifacts/plan.md"), resolved: true, workspacePath: ".pancode/artifacts/plan.md" })), null);
1673
1635
  assert.match(blocked(await artifact({ arg: "path", path: path.join(real, "src/plan.md"), resolved: true, workspacePath: "src/plan.md" })) ?? "", /may write only under/);
1674
1636
  }, SERVED));
1675
1637
 
1676
- test("a Clio that sends no landing or dispatch plan is refused inside a WTF-P project or action and left alone elsewhere", async () => {
1638
+ test("a PanCode that sends no landing or dispatch plan is refused inside a WTF-P project or action and left alone elsewhere", async () => {
1677
1639
  await withDesk(async (host) => {
1678
1640
  const bare = (tool: string, args: Json) => host.hook({ point: "before_tool", tool, turnId: "t1", args, bare: true } as never);
1679
- assert.match(blocked(await bare("write", { path: "src/notes.md" })) ?? "", /needs Clio 0\.6\.3/);
1680
- assert.match(blocked(await bare("dispatch", { agent: "coder", task: "x", intent: { write_roots: ["src/"] } })) ?? "", /needs Clio 0\.6\.3/);
1641
+ assert.match(blocked(await bare("write", { path: "src/notes.md" })) ?? "", /needs PanCode 0\.9\.0/);
1642
+ assert.match(blocked(await bare("dispatch", { agent: "coder", task: "x", intent: { write_roots: ["src/"] } })) ?? "", /needs PanCode 0\.9\.0/);
1681
1643
  assert.equal(blocked(await bare("dispatch", { list: true })), null);
1682
1644
  assert.equal(blocked(await bare("bash", { command: "ls" })), null);
1683
1645
  });
@@ -1688,25 +1650,25 @@ test("a Clio that sends no landing or dispatch plan is refused inside a WTF-P pr
1688
1650
  assert.equal(blocked(await bare("write", { path: "notes.md" })), null, "a folder that is no WTF-P project is not the desk's to guard");
1689
1651
  assert.equal(blocked(await bare("dispatch", { agent: "coder", task: "x" })), null);
1690
1652
  await host.hook({ point: "prompt_submit", text: "/wtfp:new-paper durable workflows" });
1691
- assert.match(blocked(await bare("write", { path: "notes.md" })) ?? "", /needs Clio 0\.6\.3/, "inside a WTF-P action it is");
1653
+ assert.match(blocked(await bare("write", { path: "notes.md" })) ?? "", /needs PanCode 0\.9\.0/, "inside a WTF-P action it is");
1692
1654
  await host.hook({ point: "prompt_submit", text: "thanks" });
1693
- // With Clio 0.6.3's facts, only the WTF-P recipes are the desk's business there.
1694
- const facts = withClioFacts(host, folder);
1655
+ // With PanCode's facts, only the WTF-P recipes are the desk's business there.
1656
+ const facts = withPanCodeFacts(host, folder);
1695
1657
  symlinkSync(os.tmpdir(), path.join(folder, "elsewhere"));
1696
1658
  assert.equal(blocked(await facts.hook({ point: "before_tool", tool: "dispatch", turnId: "t1", args: { agent: "coder", task: "x", cwd: "..", intent: { write_roots: ["elsewhere/"] } } } as never)), null);
1697
1659
  assert.match(blocked(await facts.hook({ point: "before_tool", tool: "dispatch", turnId: "t1", args: { agent: "wtfp-section-writer", task: "x" } } as never)) ?? "", /run only inside the WTF-P action/);
1698
1660
  assert.equal(blocked(await facts.hook({ point: "before_tool", tool: "dispatch", turnId: "t1", args: { agent: "coder", task: "x" }, dispatch: { kind: "council-of-elders" } } as never)), null, "a plan the desk cannot read is no plan, and this folder is not its to guard");
1699
1661
  assert.equal(blocked(await facts.hook({ point: "before_tool", tool: "write", turnId: "t1", args: { path: "x.md" }, target: { path: 7 } } as never)), null);
1700
- // Once this Clio has sent facts, a call it sends none for failed in Clio, and an armed action says so.
1662
+ // Once this PanCode has sent facts, a call it sends none for failed in PanCode, and an armed action says so.
1701
1663
  await host.hook({ point: "prompt_submit", text: "/wtfp:new-paper durable workflows" });
1702
- assert.match(blocked(await bare("write", { path: "notes.md" })) ?? "", /Clio sent no landing for this call/);
1664
+ assert.match(blocked(await bare("write", { path: "notes.md" })) ?? "", /PanCode sent no landing for this call/);
1703
1665
  } finally {
1704
1666
  await host.dispose();
1705
1667
  rmSync(folder, { recursive: true, force: true });
1706
1668
  }
1707
1669
  });
1708
1670
 
1709
- /** Loads the desk the way Clio's runtime child does, prints the before_tool verdict for each call, then the result of each desk tool call. */
1671
+ /** Loads the desk the way PanCode's runtime child does, prints the before_tool verdict for each call, then the result of each desk tool call. */
1710
1672
  const HARNESS = `
1711
1673
  import { pathToFileURL } from "node:url";
1712
1674
  const [entry, workspace, calls, toolCalls = "[]"] = process.argv.slice(2);
@@ -1738,7 +1700,7 @@ for (const [name, input] of JSON.parse(toolCalls)) {
1738
1700
  console.log(JSON.stringify(toolCalls === "[]" ? verdicts : { verdicts, results }));
1739
1701
  `;
1740
1702
 
1741
- test("under the read and write access Clio grants the desk, it judges every call by the landing and plan Clio sends (W2)", async () => {
1703
+ test("under the read and write access PanCode grants the desk, it judges every call by the landing and plan PanCode sends (W2)", async () => {
1742
1704
  const workspace = project();
1743
1705
  const harness = path.join(process.env.TMPDIR as string, `wtfp-host-harness-${process.pid}-${Date.now()}.mjs`);
1744
1706
  try {
@@ -1746,8 +1708,8 @@ test("under the read and write access Clio grants the desk, it judges every call
1746
1708
  mkdirSync(path.join(workspace, "notes"));
1747
1709
  symlinkSync(path.join(workspace, ".planning"), path.join(workspace, "notes/records"));
1748
1710
  writeFileSync(harness, HARNESS);
1749
- // The flags Clio 0.6.2 builds from the manifest (runtimePermissionArgs in runtime-process-v2.ts).
1750
- const declared = /fs: \{ read: \[([^\]]*)\], write: \[([^\]]*)\] \}/u.exec(readFileSync(path.join(ROOT, "clio-coder-extension.yaml"), "utf8"));
1711
+ // The flags PanCode builds from the manifest (runtimePermissionArgs in runtime-process-v2.ts).
1712
+ const declared = /fs: \{ read: \[([^\]]*)\], write: \[([^\]]*)\] \}/u.exec(readFileSync(path.join(ROOT, "pancode-extension.yaml"), "utf8"));
1751
1713
  assert.ok(declared, "the manifest declares its file access");
1752
1714
  const entries = (list: string): string[] => list.split(",").map((entry) => entry.trim().replace(/^"|"$/gu, "")).filter(Boolean);
1753
1715
  const directory = (root: string): string => (root.endsWith(path.sep) ? root : `${root}${path.sep}`);
@@ -1776,7 +1738,7 @@ test("under the read and write access Clio grants the desk, it judges every call
1776
1738
  }
1777
1739
  });
1778
1740
 
1779
- test("under the write access Clio grants the desk, which refuses every flush, a record write still lands whole", () => {
1741
+ test("under the write access PanCode grants the desk, which refuses every flush, a record write still lands whole", () => {
1780
1742
  const workspace = project();
1781
1743
  const harness = path.join(process.env.TMPDIR as string, `wtfp-host-harness-${process.pid}-${Date.now()}.mjs`);
1782
1744
  try {
@@ -1831,10 +1793,10 @@ test("a manuscript nested under another section's stem is judged by every sectio
1831
1793
  assert.deepEqual(roots, [".planning/sections/introduction/summary.md", "paper/introduction.md"], "no worker root covers the appendix");
1832
1794
  }, SERVED));
1833
1795
 
1834
- test("dispatch is judged as Clio parses it, and no worker gets an unbounded or record-covering root (W3)", () =>
1796
+ test("dispatch is judged as PanCode parses it, and no worker gets an unbounded or record-covering root (W3)", () =>
1835
1797
  withDesk(async (host, workspace) => {
1836
1798
  const dispatch = (args: Json) => host.hook({ point: "before_tool", tool: "dispatch", turnId: "t1", args });
1837
- // Clio trims agent ids and accepts a batch as a JSON string or a single object.
1799
+ // PanCode trims agent ids and accepts a batch as a JSON string or a single object.
1838
1800
  for (const args of [
1839
1801
  { tasks: [{ agent: "wtfp-section-writer ", task: "Draft." }] },
1840
1802
  { tasks: JSON.stringify([{ agent: "wtfp-section-writer", task: "Draft." }]) },
@@ -1851,14 +1813,14 @@ test("dispatch is judged as Clio parses it, and no worker gets an unbounded or r
1851
1813
  // Every spelling the section's manuscript can take is held, not only the file that exists now.
1852
1814
  for (const root of ["paper/introduction.tex", "paper/introduction.typ", "paper/introduction", "paper/introduction.v2.md"])
1853
1815
  assert.match(blocked(await dispatch({ agent: "coder", task: "x", intent: { write_roots: [root] } })) ?? "", /may not change/, root);
1854
- assert.match(blocked(await dispatch({ apply_winner: { branch: "clio-coder/compete/g/1" } })) ?? "", /cannot see what/);
1855
- // Clio resolves write roots against a worker's cwd, and fixes a boundary where a root physically leads.
1816
+ assert.match(blocked(await dispatch({ apply_winner: { branch: "pancode/compete/g/1" } })) ?? "", /cannot see what/);
1817
+ // PanCode resolves write roots against a worker's cwd, and fixes a boundary where a root physically leads.
1856
1818
  assert.match(blocked(await dispatch({ agent: "coder", task: "x", cwd: "paper", intent: { write_roots: ["introduction.md"] } })) ?? "", /cwd/);
1857
1819
  assert.match(blocked(await dispatch({ tasks: [{ agent: "coder", task: "x", cwd: ".planning", intent: { write_roots: ["checkpoints/"] } }] })) ?? "", /cwd/);
1858
1820
  assert.equal(blocked(await dispatch({ agent: "coder", task: "x", cwd: ".", intent: { write_roots: ["src/"] } })), null);
1859
1821
  symlinkSync(path.join(workspace, "paper"), path.join(workspace, "drafts"));
1860
1822
  assert.match(blocked(await dispatch({ agent: "coder", task: "x", intent: { write_roots: ["drafts/"] } })) ?? "", /does not lead where it reads/);
1861
- // An action that declares no file outputs never hands a writer an empty list, which Clio reads as no boundary.
1823
+ // An action that declares no file outputs never hands a writer an empty list, which PanCode reads as no boundary.
1862
1824
  await host.hook({ point: "prompt_submit", text: "/wtfp:progress" });
1863
1825
  assert.match(blocked(await dispatch({ tasks: [{ agent: "wtfp-section-planner", task: "x" }] })) ?? "", /declares no file outputs/);
1864
1826
  const reviewer = await dispatch({ tasks: [{ agent: "wtfp-plan-checker", task: "x" }] });
@@ -1996,7 +1958,7 @@ test("recovery finishes only a journal of the desk's own record writes", () =>
1996
1958
  [{ file: "paper/introduction.md", staging: "notes/draft.md", sha256: digest }],
1997
1959
  [{ file: ".planning/state.json", staging: "notes/draft.md", sha256: digest }],
1998
1960
  ]) {
1999
- put(workspace, ".planning/.wtfp-journal.json", { schema: "wtfp.clio-journal/v1", at: AT, entries });
1961
+ put(workspace, ".planning/.wtfp-journal.json", { schema: "wtfp.pancode-journal/v1", at: AT, entries });
2000
1962
  assert.match((await host.command("validate")).text, /Set aside a journal/);
2001
1963
  }
2002
1964
  assert.equal(sha(workspace, "paper/introduction.md"), before);
@@ -2072,7 +2034,7 @@ test("a failure between paired writes leaves a journal the next write completes;
2072
2034
  test("a fresh process trusts only answers it can verify and reports drift instead of inventing state (L1)", async () => {
2073
2035
  const workspace = project();
2074
2036
  let key: unknown;
2075
- const first = withClioFacts(await createExtensionTestHost(ROOT, { workspace, sessionId: "first" }), workspace);
2037
+ const first = withPanCodeFacts(await createExtensionTestHost(ROOT, { workspace, sessionId: "first" }), workspace);
2076
2038
  try {
2077
2039
  await answer(first, GATE, "protocol-first");
2078
2040
  await answer(first, PLAN_GATE, "approve");
@@ -2081,8 +2043,8 @@ test("a fresh process trusts only answers it can verify and reports drift instea
2081
2043
  } finally {
2082
2044
  await first.dispose();
2083
2045
  }
2084
- const resumed = withClioFacts(await createExtensionTestHost(ROOT, { workspace, sessionId: "resumed" }), workspace);
2085
- const elsewhere = withClioFacts(await createExtensionTestHost(ROOT, { workspace, sessionId: "other-machine" }), workspace);
2046
+ const resumed = withPanCodeFacts(await createExtensionTestHost(ROOT, { workspace, sessionId: "resumed" }), workspace);
2047
+ const elsewhere = withPanCodeFacts(await createExtensionTestHost(ROOT, { workspace, sessionId: "other-machine" }), workspace);
2086
2048
  try {
2087
2049
  await resumed.store.set("seal-key", key);
2088
2050
  assert.equal(blocked(await write(resumed, "paper/introduction.md")), null, "the same machine's key verifies the sealed answers");
@@ -2110,7 +2072,7 @@ test("SIMULATED rehearsal: initialize, outline, reject then approve a plan, draf
2110
2072
  const workspace = mkdtempSync(path.join(process.env.TMPDIR, "wtfp-desk-rehearsal-"));
2111
2073
  const ID = "rehearsal";
2112
2074
  const S = "evaluation";
2113
- let host = withClioFacts(await createExtensionTestHost(ROOT, { workspace, plugin: SERVED, sessionId: "s1" }), workspace);
2075
+ let host = withPanCodeFacts(await createExtensionTestHost(ROOT, { workspace, plugin: SERVED, sessionId: "s1" }), workspace);
2114
2076
  const turn = async (command: string) => {
2115
2077
  await host.observe({ event: "turn_end", turnId: "t", outcome: "completed", usage: null });
2116
2078
  const armed = await host.hook({ point: "prompt_submit", text: command });
@@ -2217,7 +2179,7 @@ test("SIMULATED rehearsal: initialize, outline, reject then approve a plan, draf
2217
2179
  // A fresh process: no session state, the same machine's store.
2218
2180
  const key = (await host.store.get("seal-key")).value;
2219
2181
  await host.dispose();
2220
- host = withClioFacts(await createExtensionTestHost(ROOT, { workspace, plugin: SERVED, sessionId: "s2" }), workspace);
2182
+ host = withPanCodeFacts(await createExtensionTestHost(ROOT, { workspace, plugin: SERVED, sessionId: "s2" }), workspace);
2221
2183
  await host.store.set("seal-key", key);
2222
2184
  const progress = await host.command("progress");
2223
2185
  assert.match(progress.text, /evaluation: writing .* plan approved/);
@@ -2250,7 +2212,7 @@ test("SIMULATED rehearsal: initialize, outline, reject then approve a plan, draf
2250
2212
  test("the desk enters with its four regions and clears its ambient UI when left in a folder with no project", async () => {
2251
2213
  assert.ok(process.env.TMPDIR, "Tests need a task-owned TMPDIR.");
2252
2214
  const workspace = mkdtempSync(path.join(process.env.TMPDIR, "wtfp-desk-empty-"));
2253
- const host = withClioFacts(await createExtensionTestHost(ROOT, { workspace }), workspace);
2215
+ const host = withPanCodeFacts(await createExtensionTestHost(ROOT, { workspace }), workspace);
2254
2216
  try {
2255
2217
  const entered = await host.command("desk");
2256
2218
  assert.deepEqual(entered.workspace, { enter: "desk" });