wtf-p 0.7.4 → 0.8.1

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 (516) hide show
  1. package/README.md +10 -10
  2. package/bin/commands/install-logic.js +1 -1
  3. package/bin/lib/adapter-compiler.js +305 -78
  4. package/bin/lib/clio-registration.js +159 -41
  5. package/bin/lib/manifest.js +11 -3
  6. package/bin/uninstall.js +22 -6
  7. package/package.json +3 -3
  8. package/protocol/actions/checkpoint.json +10 -1
  9. package/protocol/actions/execute-outline.json +10 -2
  10. package/protocol/actions/export-latex.json +15 -2
  11. package/protocol/actions/plan-revision.json +17 -4
  12. package/protocol/actions/polish-prose.json +13 -3
  13. package/protocol/actions/research-gap.json +16 -3
  14. package/protocol/actions/verify-work.json +7 -2
  15. package/protocol/project/README.md +37 -0
  16. package/protocol/project/schemas/interaction.schema.json +100 -0
  17. package/protocol/project/templates/interaction.json +16 -0
  18. package/protocol/skills/wtfp-deliver-research/SKILL.md +1 -1
  19. package/protocol/skills/wtfp-deliver-research/references/actions.md +2 -2
  20. package/protocol/skills/wtfp-plan-section/SKILL.md +1 -1
  21. package/protocol/skills/wtfp-plan-section/references/actions.md +4 -3
  22. package/protocol/skills/wtfp-research-literature/SKILL.md +1 -1
  23. package/protocol/skills/wtfp-review-manuscript/SKILL.md +1 -1
  24. package/protocol/skills/wtfp-write-section/SKILL.md +1 -1
  25. package/protocol/skills/wtfp-write-section/references/actions.md +1 -1
  26. package/protocol/workflows/checkpoint.md +2 -2
  27. package/protocol/workflows/execute-outline.md +2 -2
  28. package/protocol/workflows/export-latex.md +4 -4
  29. package/protocol/workflows/plan-revision.md +4 -3
  30. package/protocol/workflows/plan-section.md +2 -2
  31. package/protocol/workflows/polish-prose.md +3 -3
  32. package/protocol/workflows/research-gap.md +2 -2
  33. package/protocol/workflows/verify-work.md +3 -3
  34. package/protocol/workflows/write-section.md +2 -2
  35. package/vendors/antigravity/.wtfp-generated.json +172 -172
  36. package/vendors/antigravity/actions/checkpoint.json +10 -1
  37. package/vendors/antigravity/actions/execute-outline.json +10 -2
  38. package/vendors/antigravity/actions/export-latex.json +15 -2
  39. package/vendors/antigravity/actions/plan-revision.json +17 -4
  40. package/vendors/antigravity/actions/polish-prose.json +13 -3
  41. package/vendors/antigravity/actions/research-gap.json +16 -3
  42. package/vendors/antigravity/actions/verify-work.json +7 -2
  43. package/vendors/antigravity/plugin.json +2 -1
  44. package/vendors/antigravity/project/README.md +37 -0
  45. package/vendors/antigravity/project/schemas/interaction.schema.json +100 -0
  46. package/vendors/antigravity/project/templates/interaction.json +16 -0
  47. package/vendors/antigravity/rules/wtfp-project-state.md +41 -1
  48. package/vendors/antigravity/{commands/wtfp-add-todo.md → skills/wtfp-add-todo/SKILL.md} +2 -1
  49. package/vendors/antigravity/{commands/wtfp-analyze-bib.md → skills/wtfp-analyze-bib/SKILL.md} +2 -1
  50. package/vendors/antigravity/{commands/wtfp-audit-milestone.md → skills/wtfp-audit-milestone/SKILL.md} +2 -1
  51. package/vendors/antigravity/{commands/wtfp-check-refs.md → skills/wtfp-check-refs/SKILL.md} +2 -1
  52. package/vendors/antigravity/{commands/wtfp-check-todos.md → skills/wtfp-check-todos/SKILL.md} +2 -1
  53. package/vendors/antigravity/{commands/wtfp-checkpoint.md → skills/wtfp-checkpoint/SKILL.md} +4 -3
  54. package/vendors/antigravity/{commands/wtfp-contribute.md → skills/wtfp-contribute/SKILL.md} +2 -1
  55. package/vendors/antigravity/{commands/wtfp-create-outline.md → skills/wtfp-create-outline/SKILL.md} +2 -1
  56. package/vendors/antigravity/{commands/wtfp-create-poster.md → skills/wtfp-create-poster/SKILL.md} +2 -1
  57. package/vendors/antigravity/{commands/wtfp-create-slides.md → skills/wtfp-create-slides/SKILL.md} +2 -1
  58. package/vendors/antigravity/skills/wtfp-deliver-research/SKILL.md +1 -1
  59. package/vendors/antigravity/skills/wtfp-deliver-research/references/actions.md +2 -2
  60. package/vendors/antigravity/{commands/wtfp-discuss-section.md → skills/wtfp-discuss-section/SKILL.md} +2 -1
  61. package/vendors/antigravity/{commands/wtfp-execute-outline.md → skills/wtfp-execute-outline/SKILL.md} +4 -3
  62. package/vendors/antigravity/{commands/wtfp-export-latex.md → skills/wtfp-export-latex/SKILL.md} +2 -1
  63. package/vendors/antigravity/{commands/wtfp-help.md → skills/wtfp-help/SKILL.md} +3 -2
  64. package/vendors/antigravity/{commands/wtfp-insert-section.md → skills/wtfp-insert-section/SKILL.md} +2 -1
  65. package/vendors/antigravity/{commands/wtfp-list-assumptions.md → skills/wtfp-list-assumptions/SKILL.md} +2 -1
  66. package/vendors/antigravity/{commands/wtfp-map-project.md → skills/wtfp-map-project/SKILL.md} +2 -1
  67. package/vendors/antigravity/{commands/wtfp-new-paper.md → skills/wtfp-new-paper/SKILL.md} +2 -1
  68. package/vendors/antigravity/{commands/wtfp-pause-writing.md → skills/wtfp-pause-writing/SKILL.md} +2 -1
  69. package/vendors/antigravity/{commands/wtfp-plan-milestone-gaps.md → skills/wtfp-plan-milestone-gaps/SKILL.md} +2 -1
  70. package/vendors/antigravity/{commands/wtfp-plan-revision.md → skills/wtfp-plan-revision/SKILL.md} +10 -4
  71. package/vendors/antigravity/skills/wtfp-plan-section/SKILL.md +1 -1
  72. package/vendors/antigravity/skills/wtfp-plan-section/references/actions.md +4 -3
  73. package/vendors/antigravity/{commands/wtfp-polish-prose.md → skills/wtfp-polish-prose/SKILL.md} +9 -4
  74. package/vendors/antigravity/{commands/wtfp-progress.md → skills/wtfp-progress/SKILL.md} +2 -1
  75. package/vendors/antigravity/{commands/wtfp-quick.md → skills/wtfp-quick/SKILL.md} +2 -1
  76. package/vendors/antigravity/{commands/wtfp-remove-section.md → skills/wtfp-remove-section/SKILL.md} +2 -1
  77. package/vendors/antigravity/{commands/wtfp-report-bug.md → skills/wtfp-report-bug/SKILL.md} +2 -1
  78. package/vendors/antigravity/{commands/wtfp-request-feature.md → skills/wtfp-request-feature/SKILL.md} +2 -1
  79. package/vendors/antigravity/{commands/wtfp-research-gap.md → skills/wtfp-research-gap/SKILL.md} +2 -1
  80. package/vendors/antigravity/skills/wtfp-research-literature/SKILL.md +1 -1
  81. package/vendors/antigravity/{commands/wtfp-resume-writing.md → skills/wtfp-resume-writing/SKILL.md} +2 -1
  82. package/vendors/antigravity/skills/wtfp-review-manuscript/SKILL.md +1 -1
  83. package/vendors/antigravity/{commands/wtfp-review-section.md → skills/wtfp-review-section/SKILL.md} +2 -1
  84. package/vendors/antigravity/{commands/wtfp-settings.md → skills/wtfp-settings/SKILL.md} +2 -1
  85. package/vendors/antigravity/{commands/wtfp-submit-milestone.md → skills/wtfp-submit-milestone/SKILL.md} +2 -1
  86. package/vendors/antigravity/{commands/wtfp-update.md → skills/wtfp-update/SKILL.md} +2 -1
  87. package/vendors/antigravity/{commands/wtfp-verify-work.md → skills/wtfp-verify-work/SKILL.md} +5 -4
  88. package/vendors/antigravity/skills/wtfp-write-section/SKILL.md +1 -1
  89. package/vendors/antigravity/skills/wtfp-write-section/references/actions.md +1 -1
  90. package/vendors/antigravity/workflows/checkpoint.md +2 -2
  91. package/vendors/antigravity/workflows/execute-outline.md +2 -2
  92. package/vendors/antigravity/workflows/export-latex.md +4 -4
  93. package/vendors/antigravity/workflows/plan-revision.md +4 -3
  94. package/vendors/antigravity/workflows/plan-section.md +2 -2
  95. package/vendors/antigravity/workflows/polish-prose.md +3 -3
  96. package/vendors/antigravity/workflows/research-gap.md +2 -2
  97. package/vendors/antigravity/workflows/verify-work.md +3 -3
  98. package/vendors/antigravity/workflows/write-section.md +2 -2
  99. package/vendors/claude/.claude-plugin/marketplace.json +2 -2
  100. package/vendors/claude/.claude-plugin/plugin.json +1 -1
  101. package/vendors/claude/.wtfp-generated.json +84 -76
  102. package/vendors/claude/actions/checkpoint.json +10 -1
  103. package/vendors/claude/actions/execute-outline.json +10 -2
  104. package/vendors/claude/actions/export-latex.json +15 -2
  105. package/vendors/claude/actions/plan-revision.json +17 -4
  106. package/vendors/claude/actions/polish-prose.json +13 -3
  107. package/vendors/claude/actions/research-gap.json +16 -3
  108. package/vendors/claude/actions/verify-work.json +7 -2
  109. package/vendors/claude/ai.iowarp.clio/agents/wtfp-argument-verifier.md +3 -3
  110. package/vendors/claude/ai.iowarp.clio/agents/wtfp-coherence-checker.md +3 -3
  111. package/vendors/claude/ai.iowarp.clio/agents/wtfp-plan-checker.md +3 -3
  112. package/vendors/claude/ai.iowarp.clio/agents/wtfp-section-reviewer.md +3 -3
  113. package/vendors/claude/ai.iowarp.clio/fleets/wtfp-draft-review.md +1 -1
  114. package/vendors/claude/ai.iowarp.clio/fleets/wtfp-plan-section.md +1 -1
  115. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/add-todo.md +8 -0
  116. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/analyze-bib.md +22 -0
  117. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/audit-milestone.md +10 -0
  118. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/check-refs.md +22 -0
  119. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/check-todos.md +9 -0
  120. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/checkpoint.md +11 -2
  121. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/create-outline.md +21 -0
  122. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/create-poster.md +9 -0
  123. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/create-slides.md +9 -0
  124. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/discuss-section.md +9 -0
  125. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/execute-outline.md +24 -3
  126. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/export-latex.md +14 -4
  127. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/help.md +1 -1
  128. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/insert-section.md +9 -0
  129. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/list-assumptions.md +6 -0
  130. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/map-project.md +8 -0
  131. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/new-paper.md +9 -0
  132. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/pause-writing.md +8 -0
  133. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/plan-milestone-gaps.md +9 -0
  134. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/plan-revision.md +17 -3
  135. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/plan-section.md +24 -3
  136. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/polish-prose.md +28 -3
  137. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/progress.md +7 -0
  138. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/quick.md +21 -0
  139. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/research-gap.md +25 -2
  140. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/resume-writing.md +9 -0
  141. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/review-section.md +19 -1
  142. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/settings.md +9 -0
  143. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/submit-milestone.md +9 -0
  144. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/verify-work.md +12 -3
  145. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/write-section.md +24 -3
  146. package/vendors/claude/commands/checkpoint.md +2 -2
  147. package/vendors/claude/commands/execute-outline.md +2 -2
  148. package/vendors/claude/commands/export-latex.md +4 -4
  149. package/vendors/claude/commands/plan-revision.md +8 -3
  150. package/vendors/claude/commands/plan-section.md +2 -2
  151. package/vendors/claude/commands/polish-prose.md +7 -3
  152. package/vendors/claude/commands/research-gap.md +2 -2
  153. package/vendors/claude/commands/verify-work.md +3 -3
  154. package/vendors/claude/commands/write-section.md +2 -2
  155. package/vendors/claude/output-styles/wtfp-academic-writing.md +5 -5
  156. package/vendors/claude/plugin.json +1 -1
  157. package/vendors/claude/project/README.md +37 -0
  158. package/vendors/claude/project/schemas/interaction.schema.json +100 -0
  159. package/vendors/claude/project/templates/interaction.json +16 -0
  160. package/vendors/claude/skills/wtfp-deliver-research/SKILL.md +1 -1
  161. package/vendors/claude/skills/wtfp-deliver-research/references/actions.md +2 -2
  162. package/vendors/claude/skills/wtfp-plan-section/SKILL.md +1 -1
  163. package/vendors/claude/skills/wtfp-plan-section/references/actions.md +4 -3
  164. package/vendors/claude/skills/wtfp-research-literature/SKILL.md +1 -1
  165. package/vendors/claude/skills/wtfp-review-manuscript/SKILL.md +1 -1
  166. package/vendors/claude/skills/wtfp-write-section/SKILL.md +1 -1
  167. package/vendors/claude/skills/wtfp-write-section/references/actions.md +1 -1
  168. package/vendors/claude/workflows/checkpoint.md +2 -2
  169. package/vendors/claude/workflows/execute-outline.md +2 -2
  170. package/vendors/claude/workflows/export-latex.md +4 -4
  171. package/vendors/claude/workflows/plan-revision.md +4 -3
  172. package/vendors/claude/workflows/plan-section.md +2 -2
  173. package/vendors/claude/workflows/polish-prose.md +3 -3
  174. package/vendors/claude/workflows/research-gap.md +2 -2
  175. package/vendors/claude/workflows/verify-work.md +3 -3
  176. package/vendors/claude/workflows/write-section.md +2 -2
  177. package/vendors/clio-extension/.wtfp-generated.json +240 -0
  178. package/vendors/clio-extension/actions/add-todo.json +52 -0
  179. package/vendors/clio-extension/actions/analyze-bib.json +97 -0
  180. package/vendors/clio-extension/actions/audit-milestone.json +63 -0
  181. package/vendors/clio-extension/actions/check-refs.json +80 -0
  182. package/vendors/clio-extension/actions/check-todos.json +52 -0
  183. package/vendors/clio-extension/actions/checkpoint.json +85 -0
  184. package/vendors/clio-extension/actions/contribute.json +57 -0
  185. package/vendors/clio-extension/actions/create-outline.json +84 -0
  186. package/vendors/clio-extension/actions/create-poster.json +54 -0
  187. package/vendors/clio-extension/actions/create-slides.json +54 -0
  188. package/vendors/clio-extension/actions/discuss-section.json +76 -0
  189. package/vendors/clio-extension/actions/execute-outline.json +124 -0
  190. package/vendors/clio-extension/actions/export-latex.json +78 -0
  191. package/vendors/clio-extension/actions/help.json +30 -0
  192. package/vendors/clio-extension/actions/insert-section.json +61 -0
  193. package/vendors/clio-extension/actions/list-assumptions.json +35 -0
  194. package/vendors/clio-extension/actions/map-project.json +71 -0
  195. package/vendors/clio-extension/actions/new-paper.json +70 -0
  196. package/vendors/clio-extension/actions/pause-writing.json +71 -0
  197. package/vendors/clio-extension/actions/plan-milestone-gaps.json +57 -0
  198. package/vendors/clio-extension/actions/plan-revision.json +71 -0
  199. package/vendors/clio-extension/actions/plan-section.json +100 -0
  200. package/vendors/clio-extension/actions/polish-prose.json +79 -0
  201. package/vendors/clio-extension/actions/progress.json +51 -0
  202. package/vendors/clio-extension/actions/quick.json +70 -0
  203. package/vendors/clio-extension/actions/remove-section.json +63 -0
  204. package/vendors/clio-extension/actions/report-bug.json +47 -0
  205. package/vendors/clio-extension/actions/request-feature.json +47 -0
  206. package/vendors/clio-extension/actions/research-gap.json +115 -0
  207. package/vendors/clio-extension/actions/resume-writing.json +65 -0
  208. package/vendors/clio-extension/actions/review-section.json +83 -0
  209. package/vendors/clio-extension/actions/settings.json +47 -0
  210. package/vendors/clio-extension/actions/submit-milestone.json +77 -0
  211. package/vendors/clio-extension/actions/update.json +42 -0
  212. package/vendors/clio-extension/actions/verify-work.json +68 -0
  213. package/vendors/clio-extension/actions/write-section.json +115 -0
  214. package/vendors/clio-extension/clio-coder-extension.yaml +76 -0
  215. package/vendors/clio-extension/compatibility/action-availability.json +295 -0
  216. package/vendors/clio-extension/project/schemas/checkpoint.schema.json +102 -0
  217. package/vendors/clio-extension/project/schemas/common.schema.json +33 -0
  218. package/vendors/clio-extension/project/schemas/config.schema.json +69 -0
  219. package/vendors/clio-extension/project/schemas/decisions.schema.json +31 -0
  220. package/vendors/clio-extension/project/schemas/evidence.schema.json +48 -0
  221. package/vendors/clio-extension/project/schemas/interaction.schema.json +100 -0
  222. package/vendors/clio-extension/project/schemas/manifest.schema.json +102 -0
  223. package/vendors/clio-extension/project/schemas/outline.schema.json +67 -0
  224. package/vendors/clio-extension/project/schemas/section.schema.json +95 -0
  225. package/vendors/clio-extension/project/schemas/source.schema.json +73 -0
  226. package/vendors/clio-extension/project/schemas/state.schema.json +58 -0
  227. package/vendors/clio-extension/project/schemas/validation.schema.json +74 -0
  228. package/vendors/clio-extension/runtime/claim-coverage.cjs +332 -0
  229. package/vendors/clio-extension/runtime/desk-trust.cjs +112 -0
  230. package/vendors/clio-extension/runtime/extension.test.ts +1567 -0
  231. package/vendors/clio-extension/runtime/extension.ts +3074 -0
  232. package/vendors/clio-extension/runtime/json-schema.cjs +304 -0
  233. package/vendors/clio-extension/runtime/package.json +3 -0
  234. package/vendors/clio-extension/runtime/write-guard.json +566 -0
  235. package/vendors/clio-extension/skins/wtfp.json +20 -0
  236. package/vendors/codex/plugins/wtfp/.codex-plugin/plugin.json +1 -1
  237. package/vendors/codex/plugins/wtfp/.wtfp-generated.json +36 -28
  238. package/vendors/codex/plugins/wtfp/actions/checkpoint.json +10 -1
  239. package/vendors/codex/plugins/wtfp/actions/execute-outline.json +10 -2
  240. package/vendors/codex/plugins/wtfp/actions/export-latex.json +15 -2
  241. package/vendors/codex/plugins/wtfp/actions/plan-revision.json +17 -4
  242. package/vendors/codex/plugins/wtfp/actions/polish-prose.json +13 -3
  243. package/vendors/codex/plugins/wtfp/actions/research-gap.json +16 -3
  244. package/vendors/codex/plugins/wtfp/actions/verify-work.json +7 -2
  245. package/vendors/codex/plugins/wtfp/plugin.json +1 -1
  246. package/vendors/codex/plugins/wtfp/project/README.md +37 -0
  247. package/vendors/codex/plugins/wtfp/project/schemas/interaction.schema.json +100 -0
  248. package/vendors/codex/plugins/wtfp/project/templates/interaction.json +16 -0
  249. package/vendors/codex/plugins/wtfp/skills/wtfp-deliver-research/SKILL.md +1 -1
  250. package/vendors/codex/plugins/wtfp/skills/wtfp-deliver-research/references/actions.md +2 -2
  251. package/vendors/codex/plugins/wtfp/skills/wtfp-plan-section/SKILL.md +1 -1
  252. package/vendors/codex/plugins/wtfp/skills/wtfp-plan-section/references/actions.md +4 -3
  253. package/vendors/codex/plugins/wtfp/skills/wtfp-research-literature/SKILL.md +1 -1
  254. package/vendors/codex/plugins/wtfp/skills/wtfp-review-manuscript/SKILL.md +1 -1
  255. package/vendors/codex/plugins/wtfp/skills/wtfp-write-section/SKILL.md +1 -1
  256. package/vendors/codex/plugins/wtfp/skills/wtfp-write-section/references/actions.md +1 -1
  257. package/vendors/codex/plugins/wtfp/workflows/checkpoint.md +2 -2
  258. package/vendors/codex/plugins/wtfp/workflows/execute-outline.md +2 -2
  259. package/vendors/codex/plugins/wtfp/workflows/export-latex.md +4 -4
  260. package/vendors/codex/plugins/wtfp/workflows/plan-revision.md +4 -3
  261. package/vendors/codex/plugins/wtfp/workflows/plan-section.md +2 -2
  262. package/vendors/codex/plugins/wtfp/workflows/polish-prose.md +3 -3
  263. package/vendors/codex/plugins/wtfp/workflows/research-gap.md +2 -2
  264. package/vendors/codex/plugins/wtfp/workflows/verify-work.md +3 -3
  265. package/vendors/codex/plugins/wtfp/workflows/write-section.md +2 -2
  266. package/vendors/copilot/.wtfp-generated.json +43 -35
  267. package/vendors/copilot/marketplace.json +2 -2
  268. package/vendors/copilot/plugins/wtfp/.claude-plugin/plugin.json +1 -1
  269. package/vendors/copilot/plugins/wtfp/.wtfp-generated.json +42 -34
  270. package/vendors/copilot/plugins/wtfp/actions/checkpoint.json +10 -1
  271. package/vendors/copilot/plugins/wtfp/actions/execute-outline.json +10 -2
  272. package/vendors/copilot/plugins/wtfp/actions/export-latex.json +15 -2
  273. package/vendors/copilot/plugins/wtfp/actions/plan-revision.json +17 -4
  274. package/vendors/copilot/plugins/wtfp/actions/polish-prose.json +13 -3
  275. package/vendors/copilot/plugins/wtfp/actions/research-gap.json +16 -3
  276. package/vendors/copilot/plugins/wtfp/actions/verify-work.json +7 -2
  277. package/vendors/copilot/plugins/wtfp/commands/wtfp-checkpoint.md +2 -2
  278. package/vendors/copilot/plugins/wtfp/commands/wtfp-execute-outline.md +2 -2
  279. package/vendors/copilot/plugins/wtfp/commands/wtfp-plan-revision.md +8 -3
  280. package/vendors/copilot/plugins/wtfp/commands/wtfp-plan-section.md +2 -2
  281. package/vendors/copilot/plugins/wtfp/commands/wtfp-polish-prose.md +7 -3
  282. package/vendors/copilot/plugins/wtfp/commands/wtfp-verify-work.md +3 -3
  283. package/vendors/copilot/plugins/wtfp/commands/wtfp-write-section.md +2 -2
  284. package/vendors/copilot/plugins/wtfp/project/README.md +37 -0
  285. package/vendors/copilot/plugins/wtfp/project/schemas/interaction.schema.json +100 -0
  286. package/vendors/copilot/plugins/wtfp/project/templates/interaction.json +16 -0
  287. package/vendors/copilot/plugins/wtfp/skills/wtfp-deliver-research/SKILL.md +1 -1
  288. package/vendors/copilot/plugins/wtfp/skills/wtfp-deliver-research/references/actions.md +2 -2
  289. package/vendors/copilot/plugins/wtfp/skills/wtfp-plan-section/SKILL.md +1 -1
  290. package/vendors/copilot/plugins/wtfp/skills/wtfp-plan-section/references/actions.md +4 -3
  291. package/vendors/copilot/plugins/wtfp/skills/wtfp-research-literature/SKILL.md +1 -1
  292. package/vendors/copilot/plugins/wtfp/skills/wtfp-review-manuscript/SKILL.md +1 -1
  293. package/vendors/copilot/plugins/wtfp/skills/wtfp-write-section/SKILL.md +1 -1
  294. package/vendors/copilot/plugins/wtfp/skills/wtfp-write-section/references/actions.md +1 -1
  295. package/vendors/copilot/plugins/wtfp/workflows/checkpoint.md +2 -2
  296. package/vendors/copilot/plugins/wtfp/workflows/execute-outline.md +2 -2
  297. package/vendors/copilot/plugins/wtfp/workflows/export-latex.md +4 -4
  298. package/vendors/copilot/plugins/wtfp/workflows/plan-revision.md +4 -3
  299. package/vendors/copilot/plugins/wtfp/workflows/plan-section.md +2 -2
  300. package/vendors/copilot/plugins/wtfp/workflows/polish-prose.md +3 -3
  301. package/vendors/copilot/plugins/wtfp/workflows/research-gap.md +2 -2
  302. package/vendors/copilot/plugins/wtfp/workflows/verify-work.md +3 -3
  303. package/vendors/copilot/plugins/wtfp/workflows/write-section.md +2 -2
  304. package/vendors/copilot/project/.github/skills/wtfp-deliver-research/SKILL.md +1 -1
  305. package/vendors/copilot/project/.github/skills/wtfp-deliver-research/references/actions.md +2 -2
  306. package/vendors/copilot/project/.github/skills/wtfp-plan-section/SKILL.md +1 -1
  307. package/vendors/copilot/project/.github/skills/wtfp-plan-section/references/actions.md +4 -3
  308. package/vendors/copilot/project/.github/skills/wtfp-research-literature/SKILL.md +1 -1
  309. package/vendors/copilot/project/.github/skills/wtfp-review-manuscript/SKILL.md +1 -1
  310. package/vendors/copilot/project/.github/skills/wtfp-write-section/SKILL.md +1 -1
  311. package/vendors/copilot/project/.github/skills/wtfp-write-section/references/actions.md +1 -1
  312. package/vendors/copilot/project/.github/wtfp/actions/checkpoint.json +10 -1
  313. package/vendors/copilot/project/.github/wtfp/actions/execute-outline.json +10 -2
  314. package/vendors/copilot/project/.github/wtfp/actions/export-latex.json +15 -2
  315. package/vendors/copilot/project/.github/wtfp/actions/plan-revision.json +17 -4
  316. package/vendors/copilot/project/.github/wtfp/actions/polish-prose.json +13 -3
  317. package/vendors/copilot/project/.github/wtfp/actions/research-gap.json +16 -3
  318. package/vendors/copilot/project/.github/wtfp/actions/verify-work.json +7 -2
  319. package/vendors/copilot/project/.github/wtfp/project/README.md +37 -0
  320. package/vendors/copilot/project/.github/wtfp/project/schemas/interaction.schema.json +100 -0
  321. package/vendors/copilot/project/.github/wtfp/project/templates/interaction.json +16 -0
  322. package/vendors/copilot/project/.github/wtfp/skills/wtfp-deliver-research/SKILL.md +1 -1
  323. package/vendors/copilot/project/.github/wtfp/skills/wtfp-deliver-research/references/actions.md +2 -2
  324. package/vendors/copilot/project/.github/wtfp/skills/wtfp-plan-section/SKILL.md +1 -1
  325. package/vendors/copilot/project/.github/wtfp/skills/wtfp-plan-section/references/actions.md +4 -3
  326. package/vendors/copilot/project/.github/wtfp/skills/wtfp-research-literature/SKILL.md +1 -1
  327. package/vendors/copilot/project/.github/wtfp/skills/wtfp-review-manuscript/SKILL.md +1 -1
  328. package/vendors/copilot/project/.github/wtfp/skills/wtfp-write-section/SKILL.md +1 -1
  329. package/vendors/copilot/project/.github/wtfp/skills/wtfp-write-section/references/actions.md +1 -1
  330. package/vendors/copilot/project/.github/wtfp/workflows/checkpoint.md +2 -2
  331. package/vendors/copilot/project/.github/wtfp/workflows/execute-outline.md +2 -2
  332. package/vendors/copilot/project/.github/wtfp/workflows/export-latex.md +4 -4
  333. package/vendors/copilot/project/.github/wtfp/workflows/plan-revision.md +4 -3
  334. package/vendors/copilot/project/.github/wtfp/workflows/plan-section.md +2 -2
  335. package/vendors/copilot/project/.github/wtfp/workflows/polish-prose.md +3 -3
  336. package/vendors/copilot/project/.github/wtfp/workflows/research-gap.md +2 -2
  337. package/vendors/copilot/project/.github/wtfp/workflows/verify-work.md +3 -3
  338. package/vendors/copilot/project/.github/wtfp/workflows/write-section.md +2 -2
  339. package/vendors/gemini/.wtfp-generated.json +61 -53
  340. package/vendors/gemini/actions/checkpoint.json +10 -1
  341. package/vendors/gemini/actions/execute-outline.json +10 -2
  342. package/vendors/gemini/actions/export-latex.json +15 -2
  343. package/vendors/gemini/actions/plan-revision.json +17 -4
  344. package/vendors/gemini/actions/polish-prose.json +13 -3
  345. package/vendors/gemini/actions/research-gap.json +16 -3
  346. package/vendors/gemini/actions/verify-work.json +7 -2
  347. package/vendors/gemini/commands/wtfp/add-todo.toml +37 -0
  348. package/vendors/gemini/commands/wtfp/check-todos.toml +37 -0
  349. package/vendors/gemini/commands/wtfp/checkpoint.toml +49 -3
  350. package/vendors/gemini/commands/wtfp/create-outline.toml +37 -0
  351. package/vendors/gemini/commands/wtfp/create-poster.toml +40 -3
  352. package/vendors/gemini/commands/wtfp/create-slides.toml +40 -3
  353. package/vendors/gemini/commands/wtfp/discuss-section.toml +42 -4
  354. package/vendors/gemini/commands/wtfp/execute-outline.toml +51 -6
  355. package/vendors/gemini/commands/wtfp/help.toml +37 -0
  356. package/vendors/gemini/commands/wtfp/insert-section.toml +42 -4
  357. package/vendors/gemini/commands/wtfp/list-assumptions.toml +42 -4
  358. package/vendors/gemini/commands/wtfp/map-project.toml +37 -0
  359. package/vendors/gemini/commands/wtfp/new-paper.toml +37 -0
  360. package/vendors/gemini/commands/wtfp/pause-writing.toml +37 -0
  361. package/vendors/gemini/commands/wtfp/plan-milestone-gaps.toml +38 -1
  362. package/vendors/gemini/commands/wtfp/plan-revision.toml +310 -11
  363. package/vendors/gemini/commands/wtfp/plan-section.toml +44 -6
  364. package/vendors/gemini/commands/wtfp/polish-prose.toml +281 -7
  365. package/vendors/gemini/commands/wtfp/progress.toml +37 -0
  366. package/vendors/gemini/commands/wtfp/quick.toml +39 -2
  367. package/vendors/gemini/commands/wtfp/resume-writing.toml +37 -0
  368. package/vendors/gemini/commands/wtfp/review-section.toml +38 -1
  369. package/vendors/gemini/commands/wtfp/settings.toml +37 -0
  370. package/vendors/gemini/commands/wtfp/submit-milestone.toml +40 -3
  371. package/vendors/gemini/commands/wtfp/verify-work.toml +48 -6
  372. package/vendors/gemini/commands/wtfp/write-section.toml +41 -4
  373. package/vendors/gemini/gemini-extension.json +1 -1
  374. package/vendors/gemini/project/README.md +37 -0
  375. package/vendors/gemini/project/schemas/interaction.schema.json +100 -0
  376. package/vendors/gemini/project/templates/interaction.json +16 -0
  377. package/vendors/gemini/skills/wtfp-deliver-research/SKILL.md +1 -1
  378. package/vendors/gemini/skills/wtfp-deliver-research/references/actions.md +2 -2
  379. package/vendors/gemini/skills/wtfp-plan-section/SKILL.md +1 -1
  380. package/vendors/gemini/skills/wtfp-plan-section/references/actions.md +4 -3
  381. package/vendors/gemini/skills/wtfp-research-literature/SKILL.md +1 -1
  382. package/vendors/gemini/skills/wtfp-review-manuscript/SKILL.md +1 -1
  383. package/vendors/gemini/skills/wtfp-write-section/SKILL.md +1 -1
  384. package/vendors/gemini/skills/wtfp-write-section/references/actions.md +1 -1
  385. package/vendors/gemini/workflows/checkpoint.md +2 -2
  386. package/vendors/gemini/workflows/execute-outline.md +2 -2
  387. package/vendors/gemini/workflows/export-latex.md +4 -4
  388. package/vendors/gemini/workflows/plan-revision.md +4 -3
  389. package/vendors/gemini/workflows/plan-section.md +2 -2
  390. package/vendors/gemini/workflows/polish-prose.md +3 -3
  391. package/vendors/gemini/workflows/research-gap.md +2 -2
  392. package/vendors/gemini/workflows/verify-work.md +3 -3
  393. package/vendors/gemini/workflows/write-section.md +2 -2
  394. package/vendors/opencode/.wtfp-generated.json +60 -52
  395. package/vendors/opencode/actions/checkpoint.json +10 -1
  396. package/vendors/opencode/actions/execute-outline.json +10 -2
  397. package/vendors/opencode/actions/export-latex.json +15 -2
  398. package/vendors/opencode/actions/plan-revision.json +17 -4
  399. package/vendors/opencode/actions/polish-prose.json +13 -3
  400. package/vendors/opencode/actions/research-gap.json +16 -3
  401. package/vendors/opencode/actions/verify-work.json +7 -2
  402. package/vendors/opencode/commands/wtfp/add-todo.md +37 -0
  403. package/vendors/opencode/commands/wtfp/check-todos.md +37 -0
  404. package/vendors/opencode/commands/wtfp/checkpoint.md +49 -3
  405. package/vendors/opencode/commands/wtfp/create-outline.md +37 -0
  406. package/vendors/opencode/commands/wtfp/create-poster.md +40 -3
  407. package/vendors/opencode/commands/wtfp/create-slides.md +40 -3
  408. package/vendors/opencode/commands/wtfp/discuss-section.md +42 -4
  409. package/vendors/opencode/commands/wtfp/execute-outline.md +51 -6
  410. package/vendors/opencode/commands/wtfp/help.md +37 -0
  411. package/vendors/opencode/commands/wtfp/insert-section.md +42 -4
  412. package/vendors/opencode/commands/wtfp/list-assumptions.md +42 -4
  413. package/vendors/opencode/commands/wtfp/map-project.md +37 -0
  414. package/vendors/opencode/commands/wtfp/new-paper.md +37 -0
  415. package/vendors/opencode/commands/wtfp/pause-writing.md +37 -0
  416. package/vendors/opencode/commands/wtfp/plan-milestone-gaps.md +38 -1
  417. package/vendors/opencode/commands/wtfp/plan-revision.md +310 -11
  418. package/vendors/opencode/commands/wtfp/plan-section.md +44 -6
  419. package/vendors/opencode/commands/wtfp/polish-prose.md +281 -7
  420. package/vendors/opencode/commands/wtfp/progress.md +37 -0
  421. package/vendors/opencode/commands/wtfp/quick.md +39 -2
  422. package/vendors/opencode/commands/wtfp/resume-writing.md +37 -0
  423. package/vendors/opencode/commands/wtfp/review-section.md +38 -1
  424. package/vendors/opencode/commands/wtfp/settings.md +37 -0
  425. package/vendors/opencode/commands/wtfp/submit-milestone.md +40 -3
  426. package/vendors/opencode/commands/wtfp/verify-work.md +48 -6
  427. package/vendors/opencode/commands/wtfp/write-section.md +41 -4
  428. package/vendors/opencode/project/README.md +37 -0
  429. package/vendors/opencode/project/schemas/interaction.schema.json +100 -0
  430. package/vendors/opencode/project/templates/interaction.json +16 -0
  431. package/vendors/opencode/skills/wtfp-deliver-research/SKILL.md +1 -1
  432. package/vendors/opencode/skills/wtfp-deliver-research/references/actions.md +2 -2
  433. package/vendors/opencode/skills/wtfp-plan-section/SKILL.md +1 -1
  434. package/vendors/opencode/skills/wtfp-plan-section/references/actions.md +4 -3
  435. package/vendors/opencode/skills/wtfp-research-literature/SKILL.md +1 -1
  436. package/vendors/opencode/skills/wtfp-review-manuscript/SKILL.md +1 -1
  437. package/vendors/opencode/skills/wtfp-write-section/SKILL.md +1 -1
  438. package/vendors/opencode/skills/wtfp-write-section/references/actions.md +1 -1
  439. package/vendors/opencode/workflows/checkpoint.md +2 -2
  440. package/vendors/opencode/workflows/execute-outline.md +2 -2
  441. package/vendors/opencode/workflows/export-latex.md +4 -4
  442. package/vendors/opencode/workflows/plan-revision.md +4 -3
  443. package/vendors/opencode/workflows/plan-section.md +2 -2
  444. package/vendors/opencode/workflows/polish-prose.md +3 -3
  445. package/vendors/opencode/workflows/research-gap.md +2 -2
  446. package/vendors/opencode/workflows/verify-work.md +3 -3
  447. package/vendors/opencode/workflows/write-section.md +2 -2
  448. package/vendors/plugin/.wtfp-generated.json +75 -67
  449. package/vendors/plugin/actions/checkpoint.json +10 -1
  450. package/vendors/plugin/actions/execute-outline.json +10 -2
  451. package/vendors/plugin/actions/export-latex.json +15 -2
  452. package/vendors/plugin/actions/plan-revision.json +17 -4
  453. package/vendors/plugin/actions/polish-prose.json +13 -3
  454. package/vendors/plugin/actions/research-gap.json +16 -3
  455. package/vendors/plugin/actions/verify-work.json +7 -2
  456. package/vendors/plugin/ai.iowarp.clio/agents/wtfp-argument-verifier.md +3 -3
  457. package/vendors/plugin/ai.iowarp.clio/agents/wtfp-coherence-checker.md +3 -3
  458. package/vendors/plugin/ai.iowarp.clio/agents/wtfp-plan-checker.md +3 -3
  459. package/vendors/plugin/ai.iowarp.clio/agents/wtfp-section-reviewer.md +3 -3
  460. package/vendors/plugin/ai.iowarp.clio/{fleets → playbooks}/wtfp-draft-review.md +1 -1
  461. package/vendors/plugin/ai.iowarp.clio/{fleets → playbooks}/wtfp-plan-section.md +1 -1
  462. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/add-todo.md +19 -12
  463. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/analyze-bib.md +34 -19
  464. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/audit-milestone.md +22 -25
  465. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/check-refs.md +34 -15
  466. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/check-todos.md +23 -13
  467. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/checkpoint.md +23 -29
  468. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/create-outline.md +33 -25
  469. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/create-poster.md +9 -0
  470. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/create-slides.md +9 -0
  471. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/discuss-section.md +21 -17
  472. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/execute-outline.md +38 -30
  473. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/export-latex.md +26 -21
  474. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/help.md +2 -2
  475. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/insert-section.md +21 -13
  476. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/list-assumptions.md +6 -0
  477. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/map-project.md +19 -14
  478. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/new-paper.md +21 -17
  479. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/pause-writing.md +19 -18
  480. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/plan-milestone-gaps.md +21 -15
  481. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/plan-revision.md +25 -18
  482. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/plan-section.md +36 -30
  483. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/polish-prose.md +38 -18
  484. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/progress.md +7 -0
  485. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/quick.md +35 -15
  486. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/research-gap.md +37 -23
  487. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/resume-writing.md +21 -23
  488. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/review-section.md +31 -20
  489. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/settings.md +21 -9
  490. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/submit-milestone.md +21 -25
  491. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/verify-work.md +24 -18
  492. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/write-section.md +38 -31
  493. package/vendors/plugin/compatibility/action-availability.json +18 -3
  494. package/vendors/plugin/plugin.json +7 -7
  495. package/vendors/plugin/project/README.md +37 -0
  496. package/vendors/plugin/project/schemas/interaction.schema.json +100 -0
  497. package/vendors/plugin/project/templates/interaction.json +16 -0
  498. package/vendors/plugin/skills/wtfp-deliver-research/SKILL.md +1 -1
  499. package/vendors/plugin/skills/wtfp-deliver-research/references/actions.md +2 -2
  500. package/vendors/plugin/skills/wtfp-plan-section/SKILL.md +1 -1
  501. package/vendors/plugin/skills/wtfp-plan-section/references/actions.md +4 -3
  502. package/vendors/plugin/skills/wtfp-research-literature/SKILL.md +1 -1
  503. package/vendors/plugin/skills/wtfp-review-manuscript/SKILL.md +1 -1
  504. package/vendors/plugin/skills/wtfp-write-section/SKILL.md +1 -1
  505. package/vendors/plugin/skills/wtfp-write-section/references/actions.md +1 -1
  506. package/vendors/plugin/workflows/checkpoint.md +2 -2
  507. package/vendors/plugin/workflows/execute-outline.md +2 -2
  508. package/vendors/plugin/workflows/export-latex.md +4 -4
  509. package/vendors/plugin/workflows/plan-revision.md +4 -3
  510. package/vendors/plugin/workflows/plan-section.md +2 -2
  511. package/vendors/plugin/workflows/polish-prose.md +3 -3
  512. package/vendors/plugin/workflows/research-gap.md +2 -2
  513. package/vendors/plugin/workflows/verify-work.md +3 -3
  514. package/vendors/plugin/workflows/write-section.md +2 -2
  515. package/vendors/antigravity/commands/wtfp-plan-section.md +0 -78
  516. package/vendors/antigravity/commands/wtfp-write-section.md +0 -77
@@ -7,6 +7,8 @@ const { GENERATOR_VERSION } = require('./adapter-metadata');
7
7
 
8
8
  const ROOT = path.resolve(__dirname, '../..');
9
9
  const PROTOCOL_ROOT = path.join(ROOT, 'protocol');
10
+ // Human-edited source of the standalone Clio extension; see clio/README.md.
11
+ const CLIO_RUNTIME_ROOT = path.join(ROOT, 'clio');
10
12
  const INVENTORY_NAME = '.wtfp-generated.json';
11
13
 
12
14
  const TARGET_ROOTS = Object.freeze({
@@ -200,14 +202,14 @@ const TARGET_POLICIES = Object.freeze({
200
202
 
201
203
  // Availability says that a target has a native binding for every required
202
204
  // capability and effect. It does not imply that every host can narrow its
203
- // main-agent tool surface for one prompt. Clio plugin prompt templates expand
204
- // into an ordinary user turn and therefore inherit the session tool surface.
205
- // Keep that limitation machine-readable so an evaluation cannot mistake a
206
- // semantic binding for action-scoped enforcement.
205
+ // main-agent tool surface for one prompt; keep that machine-readable so an
206
+ // evaluation cannot mistake a declaration for enforcement. Clio prompts
207
+ // declare allowed-tools and delegated-tools per action, and Clio 0.6.3, which
208
+ // the desk requires, narrows a template turn to them and caps its workers.
207
209
  const TARGET_HOST_TOOL_ENFORCEMENT = Object.freeze({
208
210
  clio: Object.freeze({
209
- actionScoped: false,
210
- surface: 'clio:session-tools',
211
+ actionScoped: true,
212
+ surface: 'clio:template-allowed-tools',
211
213
  certificationAutonomy: Object.freeze(['read-only', 'suggest']),
212
214
  undeclaredToolCall: 'fail'
213
215
  })
@@ -463,6 +465,11 @@ function nativeWorkflowBody(workflowBody, target) {
463
465
  body = body.replaceAll('protocol://', '.github/wtfp/');
464
466
  } else if (target === 'antigravity') {
465
467
  body = body.replaceAll('protocol://', '${PLUGIN_ROOT}/');
468
+ // Antigravity exposes plugin actions only as skills, invoked by skill name.
469
+ body = body.replace(
470
+ "this host's own invocation syntax, `/wtfp:<action>`. Do not invent a second spelling, a bare `wtfp-<action>` form, or a host-specific prefix.",
471
+ "Antigravity's invocation syntax, `/wtfp-<action>`, because Antigravity loads plugin actions as skills. Do not invent a second spelling."
472
+ );
466
473
  } else if (target === 'gemini' || target === 'opencode' || target === 'codex') {
467
474
  // None of these hosts exposes a reliable runtime variable for resolving
468
475
  // files in command/agent prompt text. Embed the referenced resources so
@@ -494,7 +501,7 @@ function projectSchemasForAction(action) {
494
501
  return [...schemas].sort((left, right) => left.localeCompare(right));
495
502
  }
496
503
 
497
- function nativeCommandBody(action, workflowBody, target) {
504
+ function nativeCommandBody(action, workflowBody, target, deskTools = false) {
498
505
  const argumentToken = target === 'gemini'
499
506
  ? '{{args}}'
500
507
  : target === 'copilot-cloud'
@@ -503,17 +510,17 @@ function nativeCommandBody(action, workflowBody, target) {
503
510
  const schemas = projectSchemasForAction(action);
504
511
  const protocolIncludes = [
505
512
  `@protocol://actions/${action.id}.json`,
506
- ...(schemas.length > 0 ? ['@protocol://project/schemas/common.schema.json'] : []),
507
- ...schemas.flatMap((schema) => [
513
+ ...(!deskTools && schemas.length > 0 ? ['@protocol://project/schemas/common.schema.json'] : []),
514
+ ...(!deskTools ? schemas : []).flatMap((schema) => [
508
515
  `@protocol://project/schemas/${schema}.schema.json`,
509
516
  `@protocol://project/templates/${schema}.json`
510
517
  ])
511
518
  ];
512
519
  return [
513
520
  nativeWorkflowBody([
514
- workflowBody,
521
+ deskTools ? clioDeskWorkflowBody(action, workflowBody) : workflowBody,
515
522
  '',
516
- '## Bound action contract and schemas',
523
+ deskTools ? '## Bound action contract' : '## Bound action contract and schemas',
517
524
  '',
518
525
  ...protocolIncludes
519
526
  ].join('\n'), target),
@@ -596,8 +603,13 @@ function generatedScriptBanner(kind, id) {
596
603
  return `// Generated by WTF-P adapter compiler v${GENERATOR_VERSION} from ${kind}/${id}; do not edit.`;
597
604
  }
598
605
 
599
- function clioUserGateBody(action) {
606
+ function clioUserGateBody(action, deskTools = false) {
600
607
  if (!action.effects.some((effect) => effect.id === 'user.gate')) return '';
608
+ if (deskTools) return [
609
+ '## Clio user-gate binding',
610
+ '',
611
+ 'For a pending checkpoint in the declared gate\'s exact scope, call `extension_wtfp__gate` with its ID; the desk shows it to the author and seals the answer. Create a missing pending checkpoint through `extension_wtfp__record` only when this action declares checkpoint creation; otherwise use `ask_user` for the unpersisted author decision and do not invent an undeclared output. Only the structured author answer satisfies the gate; cancelled, kept or expired checkpoints authorize nothing. Never write `resolution.resolved_by: author`, never resolve, unblock or expire a blocking checkpoint, and never infer approval from invocation text, prose or silence. A plan is approved only by an `approve` answer on a checkpoint scoped to that plan\'s URI, for its current bytes. Read back a persisted resolution with `extension_wtfp__read_record`, which reports whether the desk attests it, before applying its gated mutation. A record change that turns a gate off waits for the author\'s confirmation, which the record tool asks for itself.'
612
+ ].join('\n');
601
613
  return [
602
614
  '## Clio user-gate binding',
603
615
  '',
@@ -605,6 +617,32 @@ function clioUserGateBody(action) {
605
617
  ].join('\n');
606
618
  }
607
619
 
620
+ // Only the canonical Clio namespace prefers the optional desk. The unrooted
621
+ // phase-1 projection remains intact for the Claude envelope and other hosts.
622
+ function clioDeskWorkflowBody(action, workflowBody) {
623
+ let body = workflowBody
624
+ .replace(/^@protocol:\/\/project\/README\.md\n/gm, '')
625
+ .replace(/^@protocol:\/\/skills\/[^\n]+\/references\/actions\.md\n/gm, '')
626
+ .replace(/^Resolve every logical URI through the host adapter\.[^\n]+$/m,
627
+ 'Use `extension_wtfp__record` for each declared JSON record write. Read an existing record first with `extension_wtfp__read_record` and pass back the version it returns: `expect_revision` for state, outline and decisions, `expect_sha256` for every other record; a create passes neither. When one transition changes several records, such as a checkpoint and the state that lists it, pass them together as `writes` so they commit together. The tool validates, bumps revisions and timestamps, commits under the project lock and reads back. It refuses author resolutions and any record this action does not declare; preserve stable IDs and author decisions.')
628
+ .replace(/^Manuscript prose and supporting context,[^\n]+$/m,
629
+ 'Write prose and linked artifacts with native file tools; keep their authored formats. The record tool handles JSON records only, never manuscript text, deletion or archives.');
630
+ if (action.id === 'write-section') body = body.replace(/^3\. Read the persisted manuscript text back[^\n]+$/m,
631
+ '3. Read back the persisted manuscript, call `extension_wtfp__measure_section` with its section ID, and use the returned body count and target tolerance for validation and the summary; never use a worker self-report or hand-count words.');
632
+ if (action.id === 'check-todos') body = body
633
+ .replace(/^2\. Ask the user[^\n]+$/m, '2. Call `extension_wtfp__gate` for each selected pending checkpoint; the parked interview records the author\'s answer.')
634
+ .replace(/^3\. Apply only[^\n]+$/m, '3. Read back the resulting checkpoint and state; retained or cancelled gates remain pending.');
635
+ const bindings = [
636
+ 'Discover the named tools with `gateway(op="describe", capability="extension_wtfp__record")` (and the corresponding `read_record`, `readiness`, `measure_section` or `gate` name), then use `gateway(op="call", capability="<exact name>", args={...})`. A present tool\'s error or refusal stops the action; never bypass it with a manual write or shell script.',
637
+ ...(action.produces.some((output) => output.uri.startsWith('project://paper'))
638
+ ? ['Before drafting or dispatching a writer for a section, call `extension_wtfp__readiness` with its ID. If it reports the section not ready, stop and report its reasons; never draft around them. Give each dispatched writer `intent.write_roots` naming only its section\'s manuscript and summary; the desk narrows or refuses anything wider.'] : []),
639
+ ...(action.produces.some((output) => output.uri.startsWith('project://paper')) && action.id !== 'write-section'
640
+ ? ['After changing a linked section manuscript, call `extension_wtfp__measure_section` with that section ID; it persists the desk\'s body-word count in the section and state.'] : []),
641
+ `If desk tools are absent, follow \`\${pluginRoot}/workflows/${action.id}.md\` and \`\${pluginRoot}/project/README.md\` with native tools and \`ask_user\` gates.`
642
+ ];
643
+ return `${body}\n\n${bindings.join('\n')}`;
644
+ }
645
+
608
646
  function clioResearchConnectionBody(action) {
609
647
  if (action.id !== 'research-gap') return '';
610
648
  return [
@@ -645,7 +683,8 @@ function helpArgumentHint(action) {
645
683
  // Clio renders a display-only prompt by printing its first fenced block to the
646
684
  // operator without a model call. The block is a self-contained reference:
647
685
  // no includes, no procedure, only what a human needs to pick the next action.
648
- function clioHelpCard(model, availabilityById) {
686
+ // `legacyFleetNames` renders the pre-playbook wording the Claude envelope keeps.
687
+ function clioHelpCard(model, availabilityById, legacyFleetNames = false) {
649
688
  const byId = new Map(model.actions.map((action) => [action.id, action]));
650
689
  const line = (id) => {
651
690
  const action = byId.get(id);
@@ -661,7 +700,7 @@ function clioHelpCard(model, availabilityById) {
661
700
  if (!groupIds.has(skill.id)) throw new Error(`help card has no group order for skill ${skill.id}`);
662
701
  }
663
702
  for (const id of HELP_START_SEQUENCE) if (!byId.has(id)) throw new Error(`help card start sequence names an unknown action: ${id}`);
664
- const fleets = fs.readdirSync(path.join(PROTOCOL_ROOT, 'fleets'))
703
+ const playbooks = fs.readdirSync(path.join(PROTOCOL_ROOT, 'fleets'))
665
704
  .filter((file) => file.endsWith('.json')).sort()
666
705
  .map((file) => readJson(path.join(PROTOCOL_ROOT, 'fleets', file)));
667
706
  const card = [
@@ -677,8 +716,10 @@ function clioHelpCard(model, availabilityById) {
677
716
  'Product operations',
678
717
  ...model.catalog.operations.actions.map(line),
679
718
  '',
680
- 'Fleets (clio-coder fleet run <fleet> --var section=<section>; explicit fleet primitives, not auto-routed)',
681
- ...fleets.map((fleet) => ` ${fleet.id}\n ${fleet.description}`),
719
+ legacyFleetNames
720
+ ? 'Fleets (clio-coder fleet run <fleet> --var section=<section>; explicit fleet primitives, not auto-routed)'
721
+ : 'Playbooks (clio-coder fleet run <playbook> --var section=<section>; run explicitly, never auto-routed)',
722
+ ...playbooks.map((playbook) => ` ${playbook.id}\n ${playbook.description}`),
682
723
  '',
683
724
  'Each action reads .planning/ records and paper/ artifacts, asks before any gated write, and never runs Git or publishes.',
684
725
  'An unavailable action fails closed with WTFP_ACTION_UNAVAILABLE and returns a manual handoff instead.'
@@ -699,7 +740,7 @@ function clioHelpCard(model, availabilityById) {
699
740
  ].join('\n');
700
741
  }
701
742
 
702
- function renderMarkdownCommand(action, workflowBody, target, availability) {
743
+ function renderMarkdownCommand(action, workflowBody, target, availability, deskTools = false, reviewers = new Set()) {
703
744
  const lines = ['---'];
704
745
  // Claude derives the stable command name from the plugin id and flat file
705
746
  // name. Repeating either in frontmatter creates names such as
@@ -721,9 +762,21 @@ function renderMarkdownCommand(action, workflowBody, target, availability) {
721
762
  for (const tool of tools) lines.push(` - ${tool}`);
722
763
  }
723
764
  }
724
- const nativeBody = nativeCommandBody(action, workflowBody, target);
765
+ if (target === 'clio') {
766
+ lines.push('allowed-tools:');
767
+ for (const tool of clioActionTools(action, deskTools)) lines.push(` - ${tool}`);
768
+ const delegated = clioDelegatedTools(action, reviewers);
769
+ if (delegated.length > 0) {
770
+ lines.push('delegated-tools:');
771
+ for (const tool of delegated) lines.push(` - ${tool}`);
772
+ }
773
+ }
774
+ const nativeBody = nativeCommandBody(action, workflowBody, target, deskTools);
725
775
  const clioRoles = action.delegation.map((entry) => `\`wtfp-${entry.role}\``).join(', ');
726
- const userGateBody = target === 'clio' ? [clioUserGateBody(action), clioResearchConnectionBody(action), action.delegation.length ? `## Clio role-result binding\n\nDispatch the declared specialist roles using these exact Clio agent IDs: ${clioRoles}. Do not substitute generic coder or verifier agents. If a named agent is unavailable, report that blocker and stop instead of silently changing roles.\n\nRead the single wtfp.role-result entry in native validations/checks and parse its evidence string as portable role-result JSON. Validate its schema, role and action against the dispatched task. Missing, duplicate or malformed outcomes fail closed. On needs_input ask the author through ask_user and redispatch with the response; on blocked or failed stop and report the issue. Only completed permits downstream work, and it never substitutes for an author gate or artifact readback.` : ''].filter(Boolean).join('\n\n') : '';
776
+ // Clio refuses a read-only recipe a task it reads as a change; a task that reads as a review never is.
777
+ const clioReviewers = action.delegation.filter((entry) => reviewers.has(entry.role)).map((entry) => `\`wtfp-${entry.role}\``);
778
+ const reviewerPhrasing = clioReviewers.length ? ` ${clioReviewers.join(', ')} ${clioReviewers.length === 1 ? 'is' : 'are'} read-only: begin each task for ${clioReviewers.length === 1 ? 'it' : 'them'} with "Review", because Clio refuses a read-only agent a task it reads as a change.` : '';
779
+ const userGateBody = target === 'clio' ? [clioUserGateBody(action, deskTools), clioResearchConnectionBody(action), action.delegation.length ? `## Clio role-result binding\n\nDispatch the declared specialist roles using these exact Clio agent IDs: ${clioRoles}. Do not substitute generic coder or verifier agents. If a named agent is unavailable, report that blocker and stop instead of silently changing roles.${reviewerPhrasing}\n\nRead the single wtfp.role-result entry in native validations/checks and parse its evidence string as portable role-result JSON. Validate its schema, role and action against the dispatched task. Missing, duplicate or malformed outcomes fail closed. On needs_input ask the author through ask_user and redispatch with the response; on blocked or failed stop and report the issue. Only completed permits downstream work, and it never substitutes for an author gate or artifact readback.` : ''].filter(Boolean).join('\n\n') : '';
727
780
  lines.push(
728
781
  '---',
729
782
  '',
@@ -735,6 +788,13 @@ function renderMarkdownCommand(action, workflowBody, target, availability) {
735
788
  return lines.join('\n');
736
789
  }
737
790
 
791
+ function renderAntigravityActionSkill(action, workflowBody, availability) {
792
+ const command = renderMarkdownCommand(action, workflowBody, 'antigravity', availability);
793
+ const prefix = `---\nname: wtfp:${action.id}\n`;
794
+ if (!command.startsWith(prefix)) throw new Error(`Antigravity action ${action.id} has an unexpected command header`);
795
+ return `---\nname: wtfp-${action.id}\ndisable-model-invocation: true\n${command.slice(prefix.length)}`;
796
+ }
797
+
738
798
  function renderGeminiCommand(action, workflowBody, availability) {
739
799
  const body = availability.available
740
800
  ? nativeCommandBody(action, workflowBody, 'gemini')
@@ -888,14 +948,60 @@ function renderCopilotCloudRole(role, slug) {
888
948
  ].join('\n');
889
949
  }
890
950
 
951
+ // The tools a Clio role recipe declares. Verifier roles judge text and run
952
+ // nothing, so their recipes are Clio's read-only class: no write, no shell and
953
+ // no verify, whose checks run commands from files a writer could have planted.
954
+ // Clio refuses a skill load in a read-only run, so they bind none; the recipe
955
+ // body is the role's whole contract, and the orchestrator holds the action's skill.
956
+ function clioRoleTools(verifier) {
957
+ return verifier
958
+ ? { required: ['read'], optional: ['context', 'grep', 'find', 'ls', 'ledger'] }
959
+ : { required: ['read', 'context', 'limitation', { anyOf: ['write', 'edit'] }], optional: ['grep', 'find', 'ls', 'ledger'] };
960
+ }
961
+
962
+ function clioToolList(entries) {
963
+ return `[${entries.map((entry) => (typeof entry === 'string' ? entry : `{anyOf: [${entry.anyOf.join(', ')}]}`)).join(', ')}]`;
964
+ }
965
+
966
+ const CLIO_DESK_TOOLS = Object.freeze(['record', 'read_record', 'readiness', 'measure_section', 'gate'].map((tool) => `extension_wtfp__${tool}`));
967
+
968
+ // The tools one Clio prompt's turn may hold (allowed-tools), from the Clio
969
+ // bindings of the action's declared capabilities. Clio 0.6.3 narrows a
970
+ // template turn to them; 0.6.2 ignores the field. Only the bundled citation
971
+ // dispatcher needs a shell, so an action holds bash only when it declares
972
+ // tool.execute or network.search, and never run_script, job, git or verify.
973
+ function clioActionTools(action, deskTools) {
974
+ const capabilities = new Set(action.requirements.capabilities);
975
+ const tools = ['read', 'grep', 'find', 'ls', 'context'];
976
+ if (capabilities.has('filesystem.write') || capabilities.has('filesystem.delete')) tools.push('write', 'edit');
977
+ if (capabilities.has('user.interaction')) tools.push('ask_user');
978
+ if (capabilities.has('agent.delegate') || capabilities.has('agent.parallel')) tools.push('dispatch', 'monitor');
979
+ if (capabilities.has('network.fetch')) tools.push('web_fetch');
980
+ if (capabilities.has('tool.execute') || capabilities.has('network.search')) tools.push('bash');
981
+ if (deskTools) tools.push(...CLIO_DESK_TOOLS);
982
+ return tools;
983
+ }
984
+
985
+ // The tools the action's workers may hold (delegated-tools): every tool its
986
+ // delegated roles' recipes declare, since Clio refuses a worker whose recipe
987
+ // declares more than the ceiling, and without this field the turn's own
988
+ // allowed-tools would be that ceiling.
989
+ function clioDelegatedTools(action, reviewers) {
990
+ const tools = new Set();
991
+ for (const entry of action.delegation) {
992
+ const declared = clioRoleTools(reviewers.has(entry.role));
993
+ for (const item of [...declared.required, ...declared.optional]) {
994
+ for (const tool of typeof item === 'string' ? [item] : item.anyOf) tools.add(tool);
995
+ }
996
+ }
997
+ return [...tools].sort();
998
+ }
999
+
891
1000
  function renderClioRole(role, slug) {
892
1001
  const verifier = role.fields.execution_class === 'verifier-report';
893
- const required = verifier
894
- ? '[verify, context]'
895
- : '[read, context, limitation, {anyOf: [write, edit]}]';
896
- const optional = verifier
897
- ? '[read, grep, find, ls, ledger]'
898
- : '[grep, find, ls, ledger]';
1002
+ const declared = clioRoleTools(verifier);
1003
+ const required = clioToolList(declared.required);
1004
+ const optional = clioToolList(declared.optional);
899
1005
  const nativeResult = verifier
900
1006
  ? 'Your entire final response must be one compact JSON object: {"verdict":"pass|fail","checks":[{"name":"...","passed":true,"evidence":"..."}]}. The verdict must agree with every check. Return at most 12 non-duplicate checks, keep each ordinary evidence value to one short sentence (the wtfp.role-result entry contains compact serialized JSON), keep the complete UTF-8 response at or below 4096 bytes, and emit no Markdown, code fence, analysis, or text outside the object.'
901
1007
  : 'Your entire final response must be one JSON object: {"mutatedPaths":["..."],"validations":[{"name":"...","passed":true,"evidence":"..."}]}. Report only paths changed in this run and validations actually performed.';
@@ -905,10 +1011,10 @@ function renderClioRole(role, slug) {
905
1011
  `name: ${yamlScalar(role.fields.name)}`,
906
1012
  `description: ${yamlScalar(roleDescription(role))}`,
907
1013
  `tools: {required: ${required}, optional: ${optional}}`,
908
- `skills: [${ROLE_SKILLS[slug]}]`,
1014
+ `skills: [${verifier ? '' : ROLE_SKILLS[slug]}]`,
909
1015
  'audience: custom',
910
1016
  `category: ${verifier ? 'quality' : slug.includes('citation') || slug.includes('research') ? 'research' : slug.includes('plan') || slug === 'outliner' ? 'plan' : 'implement'}`,
911
- `capabilityClass: ${verifier ? 'verification' : 'workspace-edit'}`,
1017
+ `capabilityClass: ${verifier ? 'read-only' : 'workspace-edit'}`,
912
1018
  `latencyClass: ${verifier ? 'fast' : 'balanced'}`,
913
1019
  'projectContextTier: bounded',
914
1020
  `budget: {toolCalls: ${verifier ? 24 : 64}, readReserve: ${verifier ? 4 : 8}, synthesis: true}`,
@@ -948,8 +1054,49 @@ function standardPluginManifest(version, name = 'wtfp', clioExtension) {
948
1054
  });
949
1055
  }
950
1056
 
1057
+ const CLIO_PLAYBOOKS = ['wtfp-plan-section', 'wtfp-draft-review'];
1058
+
1059
+ // The root manifest with the Clio namespace. Clio runs fleet contracts as
1060
+ // playbooks. `legacyFleetNames` keeps the pre-playbook `fleets` key, kind and
1061
+ // directory for the Claude envelope, whose Clio copy Clio no longer adopts.
1062
+ function clioPluginManifest(model, legacyFleetNames = false) {
1063
+ const playbookRoot = `ai.iowarp.clio/${legacyFleetNames ? 'fleets' : 'playbooks'}`;
1064
+ const components = [];
1065
+ for (const action of model.actions) components.push({
1066
+ kind: 'prompt', id: action.id,
1067
+ path: `ai.iowarp.clio/prompts/wtfp/${action.id}.md`,
1068
+ requires: action.delegation.map(item => `agent:${item.role}`)
1069
+ });
1070
+ for (const role of model.roles) components.push({
1071
+ kind: 'agent', id: role.slug, path: `ai.iowarp.clio/agents/wtfp-${role.slug}.md`,
1072
+ requires: [`skill:${ROLE_SKILLS[role.slug]}`]
1073
+ });
1074
+ for (const skill of model.catalog.skills) components.push({
1075
+ kind: 'skill', id: skill.id, path: `skills/${skill.id}/SKILL.md`, requires: []
1076
+ });
1077
+ for (const id of CLIO_PLAYBOOKS) components.push({
1078
+ kind: legacyFleetNames ? 'fleet' : 'playbook', id, path: `${playbookRoot}/${id}.md`, requires: []
1079
+ });
1080
+ return standardPluginManifest(model.version, 'wtfp', {
1081
+ manifestVersion: 1,
1082
+ // The Claude copy keeps its pre-playbook floor. The plugin installs with
1083
+ // the desk, which judges only what Clio 0.6.3 sends a hook, and its
1084
+ // prompts scope their tools only from 0.6.3.
1085
+ compatibility: { clio: legacyFleetNames ? '>=0.4.7' : '>=0.6.3' },
1086
+ resources: {
1087
+ skills: 'skills', prompts: 'ai.iowarp.clio/prompts', agents: 'ai.iowarp.clio/agents',
1088
+ [legacyFleetNames ? 'fleets' : 'playbooks']: playbookRoot
1089
+ },
1090
+ components
1091
+ });
1092
+ }
1093
+
1094
+ // Playbook write boundaries are literal paths, so `{section}` cannot be
1095
+ // substituted. Section artifacts project to `.planning/sections/`, which keeps
1096
+ // workers away from checkpoints, interactions, state and config.
951
1097
  function clioFleetWriteBoundary(resource, fleetId) {
952
1098
  if (/^project:\/\/paper(?:\/|$)/u.test(resource)) return 'paper/';
1099
+ if (/^project:\/\/sections\//u.test(resource)) return '.planning/sections/';
953
1100
  if (/^project:\/\//u.test(resource)) return '.planning/';
954
1101
  throw new Error(`fleet ${fleetId} has no Clio write-boundary projection for ${resource}`);
955
1102
  }
@@ -1103,28 +1250,34 @@ function claudeCompatibleManifest(version, name = 'wtfp') {
1103
1250
  }
1104
1251
 
1105
1252
  // The published Antigravity CLI manifest schema
1106
- // (https://antigravity.google/schemas/v1/plugin.json) allows exactly `name`
1107
- // and `description` with additionalProperties false; components are found by
1108
- // their fixed directories (skills/, agents/, rules/, hooks.json, mcp_config.json).
1253
+ // (https://antigravity.google/schemas/v1/plugin.json) has additionalProperties
1254
+ // false; Antigravity 1.5 added `version` to it and warns when it is missing.
1255
+ // Components are found by their fixed directories (skills/, agents/, rules/,
1256
+ // hooks.json, mcp_config.json).
1109
1257
  function antigravityManifest(version) {
1110
1258
  return stableJson({
1111
1259
  $schema: 'https://antigravity.google/schemas/v1/plugin.json',
1112
1260
  name: 'wtfp',
1261
+ version,
1113
1262
  description: `Portable academic research and writing workflows (WTF-P ${version}).`
1114
1263
  });
1115
1264
  }
1116
1265
 
1117
- // Antigravity rules are always-on constraints. Project the portable project
1118
- // protocol so the agent knows what `.planning/` and `paper/` are before any
1119
- // skill is selected.
1266
+ // Project the portable project protocol as an always-on rule so the agent
1267
+ // knows what `.planning/` and `paper/` are before any skill is selected. A
1268
+ // named rule needs a `trigger` in its frontmatter; Antigravity 1.5 never
1269
+ // applies one without it.
1120
1270
  function antigravityRule() {
1121
1271
  const readme = fs.readFileSync(path.join(PROTOCOL_ROOT, 'project', 'README.md'), 'utf8').trim();
1122
1272
  return [
1273
+ '---',
1274
+ 'trigger: always_on',
1275
+ '---',
1123
1276
  generatedBanner('protocol/project', 'README.md'),
1124
1277
  '',
1125
1278
  '# WTF-P project state rules',
1126
1279
  '',
1127
- 'When a workspace contains `.planning/` or `paper/`, treat it as a WTF-P research project. Route academic requests through the `wtfp-*` skills, invoke actions as `/wtfp:<action>`, never fabricate citations, results, or evidence, and never run Git or publish operations as a side effect.',
1280
+ 'When a workspace contains `.planning/` or `paper/`, treat it as a WTF-P research project. Route academic requests through the `wtfp-*` skills, invoke actions as `/wtfp-<action>`, never fabricate citations, results, or evidence, and never run Git or publish operations as a side effect.',
1128
1281
  '',
1129
1282
  readme,
1130
1283
  ''
@@ -1198,15 +1351,51 @@ function actionWriteRoots(action) {
1198
1351
  return [...roots].sort((left, right) => left.localeCompare(right));
1199
1352
  }
1200
1353
 
1201
- // The Claude write guard arms on the manuscript-writing actions (those that
1202
- // produce `project://paper/...`), confines Write/Edit calls for the rest of that
1203
- // prompt to the roots the action declares, and disarms when the turn stops.
1204
- function claudeWriteGuard(model, availabilityById) {
1354
+ // The manuscript-writing actions (those that produce `project://paper/...`)
1355
+ // available on one host, each with the project roots it declares. Both write
1356
+ // guards arm on exactly these.
1357
+ function manuscriptGuardActions(model, availabilityById, host) {
1205
1358
  const guarded = model.actions
1206
1359
  .filter((action) => availabilityById.get(action.id).available)
1207
1360
  .filter((action) => action.produces.some((output) => output.uri.startsWith('project://paper')))
1208
1361
  .map((action) => [action.id, actionWriteRoots(action)]);
1209
- if (guarded.length === 0) throw new Error('no manuscript-writing action is available on Claude');
1362
+ if (guarded.length === 0) throw new Error(`no manuscript-writing action is available on ${host}`);
1363
+ return guarded;
1364
+ }
1365
+
1366
+ // The Clio desk arms on every available action. Each entry carries the
1367
+ // action's exact declared outputs: the desk derives file roots from them,
1368
+ // substitutes the section an invocation names, and refuses record writes the
1369
+ // contract does not declare. `paperWriters` are the Clio agent IDs of the
1370
+ // writing roles that manuscript-producing actions dispatch; the desk confines
1371
+ // them to manuscripts whose sections are ready to draft. Clio reports which
1372
+ // workers run read-only, the verifier roles' read-only recipes among them, so
1373
+ // the guard names none.
1374
+ function clioWriteGuard(model, availabilityById) {
1375
+ const available = model.actions.filter((action) => availabilityById.get(action.id).available);
1376
+ if (!available.some((action) => action.produces.some((output) => output.uri.startsWith('project://paper')))) {
1377
+ throw new Error('no manuscript-writing action is available on Clio');
1378
+ }
1379
+ const verifiers = new Set(model.roles.filter((role) => role.fields.execution_class === 'verifier-report').map((role) => role.slug));
1380
+ const paperWriters = new Set();
1381
+ for (const action of available) {
1382
+ if (!action.produces.some((output) => output.uri.startsWith('project://paper'))) continue;
1383
+ for (const entry of action.delegation) if (!verifiers.has(entry.role)) paperWriters.add(`wtfp-${entry.role}`);
1384
+ }
1385
+ return stableJson({
1386
+ schema: 'wtfp.clio-write-guard/v4',
1387
+ actions: Object.fromEntries(available.map((action) => [action.id, {
1388
+ produces: action.produces.map((output) => ({ uri: output.uri, mode: output.mode }))
1389
+ }])),
1390
+ paperWriters: [...paperWriters].sort()
1391
+ });
1392
+ }
1393
+
1394
+ // The Claude write guard arms on the manuscript-writing actions, confines
1395
+ // Write/Edit calls for the rest of that prompt to the roots the action
1396
+ // declares, and disarms when the turn stops.
1397
+ function claudeWriteGuard(model, availabilityById) {
1398
+ const guarded = manuscriptGuardActions(model, availabilityById, 'Claude');
1210
1399
  const manifest = stableJson({
1211
1400
  schema: 'wtfp.claude-write-guard/v1',
1212
1401
  actions: Object.fromEntries(guarded)
@@ -1338,6 +1527,30 @@ function geminiManifest(version) {
1338
1527
  });
1339
1528
  }
1340
1529
 
1530
+ // The Clio extension is installed and consented independently of the content
1531
+ // plugin. Every file its runtime reads belongs to this package; the plugin
1532
+ // link controls prompt takeover, not filesystem access to another install.
1533
+ function addClioRuntime(plan, model, availabilityById) {
1534
+ const source = (relative) => fs.readFileSync(path.join(CLIO_RUNTIME_ROOT, relative), 'utf8');
1535
+ const manifest = source('clio-coder-extension.yaml').replace(/^(?:#.*\n)+/, '');
1536
+ if (!/^version: .*$/m.test(manifest)) throw new Error('clio/clio-coder-extension.yaml must declare a version line');
1537
+ addFile(plan, 'clio-coder-extension.yaml', [
1538
+ `# Generated by WTF-P adapter compiler v${GENERATOR_VERSION} from clio/clio-coder-extension.yaml; do not edit.`,
1539
+ manifest.replace(/^version: .*$/m, `version: ${model.version}`)
1540
+ ].join('\n'));
1541
+ addFile(plan, 'runtime/extension.ts', `${generatedScriptBanner('clio', 'runtime/extension.ts')}\n${source('runtime/extension.ts')}`);
1542
+ // `clio-coder extensions test vendors/clio-extension` runs the package tests from here.
1543
+ addFile(plan, 'runtime/extension.test.ts', `${generatedScriptBanner('clio', 'runtime/extension.test.ts')}\n${source('runtime/extension.test.ts')}`);
1544
+ addFile(plan, 'runtime/package.json', source('runtime/package.json'));
1545
+ addFile(plan, 'runtime/json-schema.cjs', `${generatedScriptBanner('evaluation', 'lib/json-schema.js')}\n${fs.readFileSync(path.join(ROOT, 'evaluation', 'lib', 'json-schema.js'), 'utf8')}`);
1546
+ addFile(plan, 'runtime/claim-coverage.cjs', `${generatedScriptBanner('evaluation', 'lib/claim-coverage.js')}\n${fs.readFileSync(path.join(ROOT, 'evaluation', 'lib', 'claim-coverage.js'), 'utf8')}`);
1547
+ addFile(plan, 'runtime/desk-trust.cjs', `${generatedScriptBanner('evaluation', 'lib/desk-trust.js')}\n${fs.readFileSync(path.join(ROOT, 'evaluation', 'lib', 'desk-trust.js'), 'utf8')}`);
1548
+ addFile(plan, 'runtime/write-guard.json', clioWriteGuard(model, availabilityById));
1549
+ addFile(plan, 'skins/wtfp.json', source('skins/wtfp.json'));
1550
+ copyTree(plan, path.join(PROTOCOL_ROOT, 'project', 'schemas'), 'project/schemas');
1551
+ copyTree(plan, path.join(PROTOCOL_ROOT, 'actions'), 'actions');
1552
+ }
1553
+
1341
1554
  function makePlan(id, root) {
1342
1555
  return { id, root, files: new Map() };
1343
1556
  }
@@ -1800,11 +2013,11 @@ function compilePlans(options = {}) {
1800
2013
  availabilityByTarget.set(plan.id, addActionAvailability(plan, model, plan.id, targetPolicies));
1801
2014
  }
1802
2015
 
1803
- for (const fleetId of ['wtfp-plan-section', 'wtfp-draft-review']) {
2016
+ for (const fleetId of CLIO_PLAYBOOKS) {
1804
2017
  if (!clio.files.delete(`fleets/${fleetId}.json`)) {
1805
2018
  throw new Error(`cannot project missing canonical fleet for Clio: ${fleetId}`);
1806
2019
  }
1807
- addFile(clio, `fleets/${fleetId}.md`, clioFleet(fleetId));
2020
+ addFile(clio, `playbooks/${fleetId}.md`, clioFleet(fleetId));
1808
2021
  }
1809
2022
 
1810
2023
  const claude = byId.get('claude');
@@ -1855,14 +2068,20 @@ function compilePlans(options = {}) {
1855
2068
  addFile(gemini, 'gemini-extension.json', geminiManifest(model.version));
1856
2069
  addFile(gemini, 'GEMINI.md', '# WTF-P\n\nUse the bundled Agent Skills and portable protocol for evidence-grounded academic work.\n');
1857
2070
 
2071
+ const reviewers = new Set(model.roles.filter((role) => role.fields.execution_class === 'verifier-report').map((role) => role.slug));
1858
2072
  for (const action of model.actions) {
1859
2073
  addFile(clio, `prompts/wtfp/${action.id}.md`, action.id === 'help'
1860
2074
  ? clioHelpCard(model, availabilityByTarget.get('clio'))
1861
- : renderMarkdownCommand(action, action.workflowBody, 'clio', availabilityByTarget.get('clio').get(action.id)));
2075
+ : renderMarkdownCommand(action, action.workflowBody, 'clio', availabilityByTarget.get('clio').get(action.id), false, reviewers));
1862
2076
  addFile(claude, `commands/${action.id}.md`, renderMarkdownCommand(action, action.workflowBody, 'claude', availabilityByTarget.get('claude').get(action.id)));
1863
2077
  addFile(copilot, `commands/wtfp-${action.id}.md`, renderMarkdownCommand(action, action.workflowBody, 'copilot', availabilityByTarget.get('copilot').get(action.id)));
1864
2078
  addFile(byId.get('opencode'), `commands/wtfp/${action.id}.md`, renderMarkdownCommand(action, action.workflowBody, 'opencode', availabilityByTarget.get('opencode').get(action.id)));
1865
- addFile(antigravity, `commands/wtfp-${action.id}.md`, renderMarkdownCommand(action, action.workflowBody, 'antigravity', availabilityByTarget.get('antigravity').get(action.id)));
2079
+ // Antigravity 1.5 plugins load no commands/ directory, so each action is
2080
+ // an explicitly invoked skill. A router skill that already has the name
2081
+ // (wtfp-write-section, wtfp-plan-section) serves that action instead.
2082
+ if (!model.catalog.skills.some((skill) => skill.id === `wtfp-${action.id}`)) {
2083
+ addFile(antigravity, `skills/wtfp-${action.id}/SKILL.md`, renderAntigravityActionSkill(action, action.workflowBody, availabilityByTarget.get('antigravity').get(action.id)));
2084
+ }
1866
2085
  addFile(gemini, `commands/wtfp/${action.id}.toml`, renderGeminiCommand(action, action.workflowBody, availabilityByTarget.get('gemini').get(action.id)));
1867
2086
  }
1868
2087
 
@@ -1883,47 +2102,53 @@ function compilePlans(options = {}) {
1883
2102
  addFile(codex, `agents/wtfp-${role.slug}.toml`, renderCodexAgent(role, role.slug));
1884
2103
  }
1885
2104
 
1886
- // The canonical package. Everything Clio consumes ships here and nowhere else.
2105
+ // The canonical content-only plugin. Its prompts also work without the desk.
1887
2106
  const portable = makePlan('portable-plugin', path.join(ROOT, 'vendors', 'plugin'));
1888
2107
  for (const [file, content] of clio.files) {
1889
- const native = /^(prompts|agents|fleets)\//.test(file);
1890
- addFile(portable, native ? `ai.iowarp.clio/${file}` : file, content);
1891
- }
1892
- const components = [];
1893
- for (const action of model.actions) components.push({
1894
- kind: 'prompt', id: action.id,
1895
- path: `ai.iowarp.clio/prompts/wtfp/${action.id}.md`,
1896
- requires: action.delegation.map(item => `agent:${item.role}`)
1897
- });
1898
- for (const role of model.roles) components.push({
1899
- kind: 'agent', id: role.slug, path: `ai.iowarp.clio/agents/wtfp-${role.slug}.md`,
1900
- requires: [`skill:${ROLE_SKILLS[role.slug]}`]
1901
- });
1902
- for (const skill of model.catalog.skills) components.push({
1903
- kind: 'skill', id: skill.id, path: `skills/${skill.id}/SKILL.md`, requires: []
1904
- });
1905
- for (const id of ['wtfp-plan-section', 'wtfp-draft-review']) components.push({
1906
- kind: 'fleet', id, path: `ai.iowarp.clio/fleets/${id}.md`, requires: []
1907
- });
1908
- const portableManifest = standardPluginManifest(model.version, 'wtfp', {
1909
- manifestVersion: 1,
1910
- compatibility: { clio: '>=0.4.7' },
1911
- resources: { skills: 'skills', prompts: 'ai.iowarp.clio/prompts', agents: 'ai.iowarp.clio/agents', fleets: 'ai.iowarp.clio/fleets' },
1912
- components
1913
- });
1914
- addFile(portable, 'plugin.json', portableManifest);
2108
+ const native = /^(prompts|agents|playbooks)\//.test(file);
2109
+ const actionId = /^prompts\/wtfp\/([a-z-]+)\.md$/.exec(file)?.[1];
2110
+ const action = actionId && model.actions.find((entry) => entry.id === actionId);
2111
+ const usesRecords = action && action.produces.some((output) =>
2112
+ /^project:\/\/(?:manifest|config|state|decisions|structure\/outline|(?:sections|sources|evidence|checkpoints|validations)\/[^/]+)$/.test(output.uri));
2113
+ const projected = usesRecords && availabilityByTarget.get('clio').get(actionId).available
2114
+ ? renderMarkdownCommand(action, action.workflowBody, 'clio', availabilityByTarget.get('clio').get(actionId), true, reviewers)
2115
+ : content;
2116
+ addFile(portable, native ? `ai.iowarp.clio/${file}` : file, projected);
2117
+ }
2118
+ addFile(portable, 'plugin.json', clioPluginManifest(model));
2119
+ const availability = JSON.parse(portable.files.get('compatibility/action-availability.json'));
2120
+ // Base bindings remain usable with the content plugin alone. The separately
2121
+ // installed desk supplies these preferred bindings when its tools are live.
2122
+ availability.runtimeBindings = {
2123
+ plugin: 'wtfp', extension: 'wtfp',
2124
+ capabilities: { 'user.interaction': 'clio:extension-interview' },
2125
+ approvals: { explicit: 'clio:extension-interview' },
2126
+ tools: { record: 'extension_wtfp__record', measure_section: 'extension_wtfp__measure_section', gate: 'extension_wtfp__gate' }
2127
+ };
2128
+ replaceFile(portable, 'compatibility/action-availability.json', stableJson(availability));
1915
2129
  plans.push(portable);
1916
2130
 
1917
- // Clio adopts an installed Claude plugin through the same portable root
1918
- // manifest, and it verifies every declared component path on disk. The
1919
- // Claude envelope therefore carries the identical `plugin.json` and the
1920
- // Clio component graph beside Claude's own `.claude-plugin/` surface. Claude
1921
- // Code reads neither file; its commands, agents, skills, hooks, and output
1922
- // style stay where its loader looks.
2131
+ const extension = makePlan('clio-extension', path.join(ROOT, 'vendors', 'clio-extension'));
2132
+ addClioRuntime(extension, model, availabilityByTarget.get('clio'));
2133
+ addFile(extension, 'compatibility/action-availability.json', clio.files.get('compatibility/action-availability.json'));
2134
+ plans.push(extension);
2135
+
2136
+ // The Claude envelope keeps its pre-playbook Clio namespace: a root `plugin.json`
2137
+ // and the phase 1 prompts, agents and fleets it names, beside Claude's own
2138
+ // `.claude-plugin/` surface. Clio no longer adopts a Claude-installed WTF-P;
2139
+ // it labels the copy older and points to `vendors/plugin`. Claude Code reads
2140
+ // neither file; its commands, agents, skills, hooks, and output style stay
2141
+ // where its loader looks.
1923
2142
  for (const [file, content] of clio.files) {
1924
- if (/^(prompts|agents|fleets)\//.test(file)) addFile(claude, `ai.iowarp.clio/${file}`, content);
2143
+ if (file === 'prompts/wtfp/help.md') {
2144
+ addFile(claude, `ai.iowarp.clio/${file}`, clioHelpCard(model, availabilityByTarget.get('clio'), true));
2145
+ } else if (/^(prompts|agents)\//.test(file)) {
2146
+ addFile(claude, `ai.iowarp.clio/${file}`, content);
2147
+ } else if (file.startsWith('playbooks/')) {
2148
+ addFile(claude, `ai.iowarp.clio/fleets/${file.slice('playbooks/'.length)}`, content);
2149
+ }
1925
2150
  }
1926
- addFile(claude, 'plugin.json', portableManifest);
2151
+ addFile(claude, 'plugin.json', clioPluginManifest(model, true));
1927
2152
 
1928
2153
  const codexMarketplace = makePlan('codex-marketplace', path.join(ROOT, 'vendors', 'codex'));
1929
2154
  addFile(codexMarketplace, '.agents/plugins/marketplace.json', stableJson({
@@ -2116,6 +2341,8 @@ function compileAdapters(options = {}) {
2116
2341
  module.exports = {
2117
2342
  GENERATOR_VERSION,
2118
2343
  TARGET_POLICIES,
2344
+ clioActionTools,
2345
+ clioDelegatedTools,
2119
2346
  TARGET_ROOTS,
2120
2347
  compileAdapters,
2121
2348
  compilePlans,