wtf-p 0.7.3 → 0.8.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 (241) hide show
  1. package/README.md +16 -12
  2. package/bin/commands/install-logic.js +1 -1
  3. package/bin/lib/adapter-compiler.js +175 -56
  4. package/bin/lib/clio-registration.js +127 -36
  5. package/bin/lib/manifest.js +11 -3
  6. package/bin/uninstall.js +3 -2
  7. package/package.json +1 -1
  8. package/protocol/actions/research-gap.json +1 -1
  9. package/protocol/roles/research-synthesizer.md +1 -1
  10. package/protocol/skills/wtfp-plan-section/references/actions.md +1 -1
  11. package/protocol/skills/wtfp-research-literature/references/actions.md +1 -1
  12. package/protocol/skills/wtfp-write-section/references/actions.md +1 -1
  13. package/protocol/workflows/plan-section.md +3 -2
  14. package/protocol/workflows/research-gap.md +2 -2
  15. package/protocol/workflows/write-section.md +1 -1
  16. package/vendors/antigravity/.wtfp-generated.json +18 -14
  17. package/vendors/antigravity/actions/research-gap.json +1 -1
  18. package/vendors/antigravity/agents/wtfp-research-synthesizer.md +1 -1
  19. package/vendors/antigravity/commands/wtfp-plan-section.md +3 -2
  20. package/vendors/antigravity/commands/wtfp-write-section.md +1 -1
  21. package/vendors/antigravity/plugin.json +1 -1
  22. package/vendors/antigravity/roles/research-synthesizer.md +1 -1
  23. package/vendors/antigravity/skills/wtfp-plan-section/references/actions.md +1 -1
  24. package/vendors/antigravity/skills/wtfp-research-literature/references/actions.md +1 -1
  25. package/vendors/antigravity/skills/wtfp-write-section/references/actions.md +1 -1
  26. package/vendors/antigravity/tools/README.md +1 -1
  27. package/vendors/antigravity/tools/package.json +1 -0
  28. package/vendors/antigravity/workflows/plan-section.md +3 -2
  29. package/vendors/antigravity/workflows/research-gap.md +2 -2
  30. package/vendors/antigravity/workflows/write-section.md +1 -1
  31. package/vendors/claude/.claude-plugin/marketplace.json +2 -2
  32. package/vendors/claude/.claude-plugin/plugin.json +1 -1
  33. package/vendors/claude/.wtfp-generated.json +33 -29
  34. package/vendors/claude/actions/research-gap.json +1 -1
  35. package/vendors/claude/agents/wtfp-research-synthesizer.md +1 -1
  36. package/vendors/claude/ai.iowarp.clio/agents/wtfp-research-synthesizer.md +1 -1
  37. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/analyze-bib.md +2 -0
  38. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/check-refs.md +2 -0
  39. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/create-outline.md +2 -0
  40. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/execute-outline.md +2 -0
  41. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/help.md +1 -1
  42. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/plan-section.md +5 -2
  43. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/polish-prose.md +2 -0
  44. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/quick.md +2 -0
  45. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/research-gap.md +8 -2
  46. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/review-section.md +2 -0
  47. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/write-section.md +3 -1
  48. package/vendors/claude/commands/plan-section.md +3 -2
  49. package/vendors/claude/commands/research-gap.md +2 -2
  50. package/vendors/claude/commands/write-section.md +1 -1
  51. package/vendors/claude/plugin.json +1 -1
  52. package/vendors/claude/roles/research-synthesizer.md +1 -1
  53. package/vendors/claude/skills/wtfp-plan-section/references/actions.md +1 -1
  54. package/vendors/claude/skills/wtfp-research-literature/references/actions.md +1 -1
  55. package/vendors/claude/skills/wtfp-write-section/references/actions.md +1 -1
  56. package/vendors/claude/tools/README.md +1 -1
  57. package/vendors/claude/tools/package.json +1 -0
  58. package/vendors/claude/workflows/plan-section.md +3 -2
  59. package/vendors/claude/workflows/research-gap.md +2 -2
  60. package/vendors/claude/workflows/write-section.md +1 -1
  61. package/vendors/clio-extension/.wtfp-generated.json +228 -0
  62. package/vendors/clio-extension/actions/add-todo.json +52 -0
  63. package/vendors/clio-extension/actions/analyze-bib.json +97 -0
  64. package/vendors/clio-extension/actions/audit-milestone.json +63 -0
  65. package/vendors/clio-extension/actions/check-refs.json +80 -0
  66. package/vendors/clio-extension/actions/check-todos.json +52 -0
  67. package/vendors/clio-extension/actions/checkpoint.json +76 -0
  68. package/vendors/clio-extension/actions/contribute.json +57 -0
  69. package/vendors/clio-extension/actions/create-outline.json +84 -0
  70. package/vendors/clio-extension/actions/create-poster.json +54 -0
  71. package/vendors/clio-extension/actions/create-slides.json +54 -0
  72. package/vendors/clio-extension/actions/discuss-section.json +76 -0
  73. package/vendors/clio-extension/actions/execute-outline.json +116 -0
  74. package/vendors/clio-extension/actions/export-latex.json +65 -0
  75. package/vendors/clio-extension/actions/help.json +30 -0
  76. package/vendors/clio-extension/actions/insert-section.json +61 -0
  77. package/vendors/clio-extension/actions/list-assumptions.json +35 -0
  78. package/vendors/clio-extension/actions/map-project.json +71 -0
  79. package/vendors/clio-extension/actions/new-paper.json +70 -0
  80. package/vendors/clio-extension/actions/pause-writing.json +71 -0
  81. package/vendors/clio-extension/actions/plan-milestone-gaps.json +57 -0
  82. package/vendors/clio-extension/actions/plan-revision.json +58 -0
  83. package/vendors/clio-extension/actions/plan-section.json +100 -0
  84. package/vendors/clio-extension/actions/polish-prose.json +69 -0
  85. package/vendors/clio-extension/actions/progress.json +51 -0
  86. package/vendors/clio-extension/actions/quick.json +70 -0
  87. package/vendors/clio-extension/actions/remove-section.json +63 -0
  88. package/vendors/clio-extension/actions/report-bug.json +47 -0
  89. package/vendors/clio-extension/actions/request-feature.json +47 -0
  90. package/vendors/clio-extension/actions/research-gap.json +102 -0
  91. package/vendors/clio-extension/actions/resume-writing.json +65 -0
  92. package/vendors/clio-extension/actions/review-section.json +83 -0
  93. package/vendors/clio-extension/actions/settings.json +47 -0
  94. package/vendors/clio-extension/actions/submit-milestone.json +77 -0
  95. package/vendors/clio-extension/actions/update.json +42 -0
  96. package/vendors/clio-extension/actions/verify-work.json +63 -0
  97. package/vendors/clio-extension/actions/write-section.json +115 -0
  98. package/vendors/clio-extension/clio-coder-extension.yaml +53 -0
  99. package/vendors/clio-extension/compatibility/action-availability.json +295 -0
  100. package/vendors/clio-extension/project/schemas/checkpoint.schema.json +102 -0
  101. package/vendors/clio-extension/project/schemas/common.schema.json +33 -0
  102. package/vendors/clio-extension/project/schemas/config.schema.json +69 -0
  103. package/vendors/clio-extension/project/schemas/decisions.schema.json +31 -0
  104. package/vendors/clio-extension/project/schemas/evidence.schema.json +48 -0
  105. package/vendors/clio-extension/project/schemas/manifest.schema.json +102 -0
  106. package/vendors/clio-extension/project/schemas/outline.schema.json +67 -0
  107. package/vendors/clio-extension/project/schemas/section.schema.json +95 -0
  108. package/vendors/clio-extension/project/schemas/source.schema.json +73 -0
  109. package/vendors/clio-extension/project/schemas/state.schema.json +58 -0
  110. package/vendors/clio-extension/project/schemas/validation.schema.json +74 -0
  111. package/vendors/clio-extension/runtime/extension.test.ts +248 -0
  112. package/vendors/clio-extension/runtime/extension.ts +1321 -0
  113. package/vendors/clio-extension/runtime/json-schema.cjs +304 -0
  114. package/vendors/clio-extension/runtime/package.json +3 -0
  115. package/vendors/clio-extension/runtime/write-guard.json +21 -0
  116. package/vendors/clio-extension/skins/wtfp.json +20 -0
  117. package/vendors/codex/plugins/wtfp/.codex-plugin/plugin.json +1 -1
  118. package/vendors/codex/plugins/wtfp/.wtfp-generated.json +17 -13
  119. package/vendors/codex/plugins/wtfp/actions/research-gap.json +1 -1
  120. package/vendors/codex/plugins/wtfp/agents/wtfp-research-synthesizer.toml +1 -1
  121. package/vendors/codex/plugins/wtfp/plugin.json +1 -1
  122. package/vendors/codex/plugins/wtfp/roles/research-synthesizer.md +1 -1
  123. package/vendors/codex/plugins/wtfp/skills/wtfp-plan-section/references/actions.md +1 -1
  124. package/vendors/codex/plugins/wtfp/skills/wtfp-research-literature/references/actions.md +1 -1
  125. package/vendors/codex/plugins/wtfp/skills/wtfp-write-section/references/actions.md +1 -1
  126. package/vendors/codex/plugins/wtfp/tools/README.md +1 -1
  127. package/vendors/codex/plugins/wtfp/tools/package.json +1 -0
  128. package/vendors/codex/plugins/wtfp/workflows/plan-section.md +3 -2
  129. package/vendors/codex/plugins/wtfp/workflows/research-gap.md +2 -2
  130. package/vendors/codex/plugins/wtfp/workflows/write-section.md +1 -1
  131. package/vendors/copilot/.wtfp-generated.json +14 -14
  132. package/vendors/copilot/marketplace.json +2 -2
  133. package/vendors/copilot/plugins/wtfp/.claude-plugin/plugin.json +1 -1
  134. package/vendors/copilot/plugins/wtfp/.wtfp-generated.json +18 -14
  135. package/vendors/copilot/plugins/wtfp/actions/research-gap.json +1 -1
  136. package/vendors/copilot/plugins/wtfp/agents/wtfp-research-synthesizer.md +1 -1
  137. package/vendors/copilot/plugins/wtfp/commands/wtfp-plan-section.md +3 -2
  138. package/vendors/copilot/plugins/wtfp/commands/wtfp-write-section.md +1 -1
  139. package/vendors/copilot/plugins/wtfp/roles/research-synthesizer.md +1 -1
  140. package/vendors/copilot/plugins/wtfp/skills/wtfp-plan-section/references/actions.md +1 -1
  141. package/vendors/copilot/plugins/wtfp/skills/wtfp-research-literature/references/actions.md +1 -1
  142. package/vendors/copilot/plugins/wtfp/skills/wtfp-write-section/references/actions.md +1 -1
  143. package/vendors/copilot/plugins/wtfp/tools/README.md +1 -1
  144. package/vendors/copilot/plugins/wtfp/tools/package.json +1 -0
  145. package/vendors/copilot/plugins/wtfp/workflows/plan-section.md +3 -2
  146. package/vendors/copilot/plugins/wtfp/workflows/research-gap.md +2 -2
  147. package/vendors/copilot/plugins/wtfp/workflows/write-section.md +1 -1
  148. package/vendors/copilot/project/.github/agents/wtfp-research-synthesizer.agent.md +1 -1
  149. package/vendors/copilot/project/.github/skills/wtfp-plan-section/references/actions.md +1 -1
  150. package/vendors/copilot/project/.github/skills/wtfp-research-literature/references/actions.md +1 -1
  151. package/vendors/copilot/project/.github/skills/wtfp-write-section/references/actions.md +1 -1
  152. package/vendors/copilot/project/.github/wtfp/actions/research-gap.json +1 -1
  153. package/vendors/copilot/project/.github/wtfp/roles/research-synthesizer.md +1 -1
  154. package/vendors/copilot/project/.github/wtfp/skills/wtfp-plan-section/references/actions.md +1 -1
  155. package/vendors/copilot/project/.github/wtfp/skills/wtfp-research-literature/references/actions.md +1 -1
  156. package/vendors/copilot/project/.github/wtfp/skills/wtfp-write-section/references/actions.md +1 -1
  157. package/vendors/copilot/project/.github/wtfp/workflows/plan-section.md +3 -2
  158. package/vendors/copilot/project/.github/wtfp/workflows/research-gap.md +2 -2
  159. package/vendors/copilot/project/.github/wtfp/workflows/write-section.md +1 -1
  160. package/vendors/gemini/.wtfp-generated.json +24 -20
  161. package/vendors/gemini/actions/research-gap.json +1 -1
  162. package/vendors/gemini/agents/wtfp-research-synthesizer.md +1 -1
  163. package/vendors/gemini/commands/wtfp/discuss-section.toml +1 -1
  164. package/vendors/gemini/commands/wtfp/execute-outline.toml +1 -1
  165. package/vendors/gemini/commands/wtfp/insert-section.toml +1 -1
  166. package/vendors/gemini/commands/wtfp/list-assumptions.toml +1 -1
  167. package/vendors/gemini/commands/wtfp/plan-revision.toml +1 -1
  168. package/vendors/gemini/commands/wtfp/plan-section.toml +4 -3
  169. package/vendors/gemini/commands/wtfp/quick.toml +1 -1
  170. package/vendors/gemini/commands/wtfp/write-section.toml +2 -2
  171. package/vendors/gemini/gemini-extension.json +1 -1
  172. package/vendors/gemini/roles/research-synthesizer.md +1 -1
  173. package/vendors/gemini/skills/wtfp-plan-section/references/actions.md +1 -1
  174. package/vendors/gemini/skills/wtfp-research-literature/references/actions.md +1 -1
  175. package/vendors/gemini/skills/wtfp-write-section/references/actions.md +1 -1
  176. package/vendors/gemini/tools/README.md +1 -1
  177. package/vendors/gemini/tools/package.json +1 -0
  178. package/vendors/gemini/workflows/plan-section.md +3 -2
  179. package/vendors/gemini/workflows/research-gap.md +2 -2
  180. package/vendors/gemini/workflows/write-section.md +1 -1
  181. package/vendors/opencode/.wtfp-generated.json +23 -19
  182. package/vendors/opencode/actions/research-gap.json +1 -1
  183. package/vendors/opencode/agents/wtfp/research-synthesizer.md +1 -1
  184. package/vendors/opencode/commands/wtfp/discuss-section.md +1 -1
  185. package/vendors/opencode/commands/wtfp/execute-outline.md +1 -1
  186. package/vendors/opencode/commands/wtfp/insert-section.md +1 -1
  187. package/vendors/opencode/commands/wtfp/list-assumptions.md +1 -1
  188. package/vendors/opencode/commands/wtfp/plan-revision.md +1 -1
  189. package/vendors/opencode/commands/wtfp/plan-section.md +4 -3
  190. package/vendors/opencode/commands/wtfp/quick.md +1 -1
  191. package/vendors/opencode/commands/wtfp/write-section.md +2 -2
  192. package/vendors/opencode/roles/research-synthesizer.md +1 -1
  193. package/vendors/opencode/skills/wtfp-plan-section/references/actions.md +1 -1
  194. package/vendors/opencode/skills/wtfp-research-literature/references/actions.md +1 -1
  195. package/vendors/opencode/skills/wtfp-write-section/references/actions.md +1 -1
  196. package/vendors/opencode/tools/README.md +1 -1
  197. package/vendors/opencode/tools/package.json +1 -0
  198. package/vendors/opencode/workflows/plan-section.md +3 -2
  199. package/vendors/opencode/workflows/research-gap.md +2 -2
  200. package/vendors/opencode/workflows/write-section.md +1 -1
  201. package/vendors/plugin/.wtfp-generated.json +44 -40
  202. package/vendors/plugin/actions/research-gap.json +1 -1
  203. package/vendors/plugin/ai.iowarp.clio/agents/wtfp-research-synthesizer.md +1 -1
  204. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/add-todo.md +6 -12
  205. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/analyze-bib.md +9 -19
  206. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/audit-milestone.md +7 -25
  207. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/check-refs.md +9 -15
  208. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/check-todos.md +9 -13
  209. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/checkpoint.md +7 -27
  210. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/create-outline.md +9 -25
  211. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/discuss-section.md +7 -17
  212. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/execute-outline.md +10 -27
  213. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/help.md +2 -2
  214. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/insert-section.md +7 -13
  215. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/map-project.md +6 -14
  216. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/new-paper.md +7 -17
  217. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/pause-writing.md +6 -18
  218. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/plan-milestone-gaps.md +7 -15
  219. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/plan-section.md +12 -29
  220. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/polish-prose.md +10 -15
  221. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/quick.md +10 -15
  222. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/research-gap.md +15 -23
  223. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/resume-writing.md +7 -23
  224. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/review-section.md +9 -19
  225. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/settings.md +7 -9
  226. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/submit-milestone.md +7 -25
  227. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/verify-work.md +7 -15
  228. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/write-section.md +11 -29
  229. package/vendors/plugin/compatibility/action-availability.json +16 -1
  230. package/vendors/plugin/plugin.json +7 -7
  231. package/vendors/plugin/roles/research-synthesizer.md +1 -1
  232. package/vendors/plugin/skills/wtfp-plan-section/references/actions.md +1 -1
  233. package/vendors/plugin/skills/wtfp-research-literature/references/actions.md +1 -1
  234. package/vendors/plugin/skills/wtfp-write-section/references/actions.md +1 -1
  235. package/vendors/plugin/tools/README.md +1 -1
  236. package/vendors/plugin/tools/package.json +1 -0
  237. package/vendors/plugin/workflows/plan-section.md +3 -2
  238. package/vendors/plugin/workflows/research-gap.md +2 -2
  239. package/vendors/plugin/workflows/write-section.md +1 -1
  240. /package/vendors/plugin/ai.iowarp.clio/{fleets → playbooks}/wtfp-draft-review.md +0 -0
  241. /package/vendors/plugin/ai.iowarp.clio/{fleets → playbooks}/wtfp-plan-section.md +0 -0
package/README.md CHANGED
@@ -19,7 +19,7 @@ the scientific judgment. The agent keeps the bookkeeping and does bounded jobs.
19
19
 
20
20
  It ships as one canonical [Agent Plugins 1.0.0](https://agent-plugins.org)
21
21
  bundle that a deterministic compiler projects into a native package for seven
22
- coding-agent hosts. Version `0.7.3` is the current stable release and is
22
+ coding-agent hosts. Version `0.8.0` is the current stable release and is
23
23
  what npm `latest` resolves to; v0.5 remains installable by explicit version.
24
24
 
25
25
  **Optional CiteNexus research backend (since 0.7.0):** `citation-search --backend=cite-nexus`
@@ -56,18 +56,18 @@ registers it with the host's native plugin lifecycle where one exists.
56
56
 
57
57
  | Host | Install | Native registration the installer performs | Verified with |
58
58
  | --- | --- | --- | --- |
59
- | Clio Coder (0.4.7 or newer) | `npx --yes --package=wtf-p@0.7.3 -- wtf-p install clio` | `clio-coder library install <staged-bundle> --user`, then `clio-coder library inspect wtfp --user --json` | 0.4.9 (local build) |
60
- | Claude Code | `npx --yes --package=wtf-p@0.7.3 -- wtf-p install claude` | `claude plugin marketplace add <root>/marketplaces/wtfp --scope user`, then `claude plugin install wtfp@wtfp --scope user -y` | 2.1.274 |
61
- | Codex | `npx --yes --package=wtf-p@0.7.3 -- wtf-p install codex` | `codex plugin marketplace add <root>/marketplaces/wtfp`, then `codex plugin add wtfp@wtfp --json`; agents copied to `$CODEX_HOME/agents/` | 0.153.3 |
62
- | GitHub Copilot CLI | `npx --yes --package=wtf-p@0.7.3 -- wtf-p install copilot` | `copilot plugin marketplace add <root>/marketplaces/wtfp`, then `copilot plugin install wtfp@wtfp` | 1.0.85 |
63
- | OpenCode | `npx --yes --package=wtf-p@0.7.3 -- wtf-p install opencode` | Files under the OpenCode config root; OpenCode discovers them by directory | 1.18.31 |
64
- | Antigravity CLI | `npx --yes --package=wtf-p@0.7.3 -- wtf-p install antigravity` | `agy plugin install <root>/sources/wtfp` | 1.2.5 |
65
- | Gemini CLI | `npx --yes --package=wtf-p@0.7.3 -- wtf-p install gemini` | Files under `<root>/extensions/wtfp`; Gemini discovers the extension by directory | 0.60.0 |
59
+ | Clio Coder (0.6.2 or newer) | `npx --yes --package=wtf-p@0.8.0 -- wtf-p install clio` | `clio-coder library install <staged-bundle> --user` and `clio-coder library inspect wtfp --user --json`, then `clio-coder extensions install <staged-extension> --user` and `clio-coder extensions list --user --json` | 0.6.2-dev (local build `89ea1b4`) |
60
+ | Claude Code | `npx --yes --package=wtf-p@0.8.0 -- wtf-p install claude` | `claude plugin marketplace add <root>/marketplaces/wtfp --scope user`, then `claude plugin install wtfp@wtfp --scope user -y` | 2.1.274 |
61
+ | Codex | `npx --yes --package=wtf-p@0.8.0 -- wtf-p install codex` | `codex plugin marketplace add <root>/marketplaces/wtfp`, then `codex plugin add wtfp@wtfp --json`; agents copied to `$CODEX_HOME/agents/` | 0.153.3 |
62
+ | GitHub Copilot CLI | `npx --yes --package=wtf-p@0.8.0 -- wtf-p install copilot` | `copilot plugin marketplace add <root>/marketplaces/wtfp`, then `copilot plugin install wtfp@wtfp` | 1.0.85 |
63
+ | OpenCode | `npx --yes --package=wtf-p@0.8.0 -- wtf-p install opencode` | Files under the OpenCode config root; OpenCode discovers them by directory | 1.18.31 |
64
+ | Antigravity CLI | `npx --yes --package=wtf-p@0.8.0 -- wtf-p install antigravity` | `agy plugin install <root>/sources/wtfp` | 1.2.5 |
65
+ | Gemini CLI | `npx --yes --package=wtf-p@0.8.0 -- wtf-p install gemini` | Files under `<root>/extensions/wtfp`; Gemini discovers the extension by directory | 0.60.0 |
66
66
 
67
67
  "Verified" means native discovery in a disposable profile on this exact
68
68
  envelope, with the commands recorded in
69
69
  [Host capabilities](docs/HOST_CAPABILITIES.md). Clio Coder is published as
70
- `@iowarp/clio-coder`; 0.4.7 and newer carry the plugin engine WTF-P uses.
70
+ `@iowarp/clio-coder`; 0.6.2 and newer carry the plugin and extension engine WTF-P uses.
71
71
  Clio Coder itself requires Node.js 22.19 or newer.
72
72
 
73
73
  Keep the explicit `--package=wtf-p@<version> -- wtf-p` form. On a workstation
@@ -77,9 +77,9 @@ the old executable instead.
77
77
  ## Sixty-second start
78
78
 
79
79
  ```bash
80
- npx --yes --package=wtf-p@0.7.3 -- wtf-p install clio
80
+ npx --yes --package=wtf-p@0.8.0 -- wtf-p install clio
81
81
  cd /path/to/your-paper-or-proposal
82
- clio-coder --autonomy suggest
82
+ clio-coder --autonomy full-auto
83
83
  ```
84
84
 
85
85
  ```text
@@ -134,7 +134,11 @@ action returns `WTFP_ACTION_UNAVAILABLE` instead of improvising:
134
134
 
135
135
  Where the research routes are available, `tool.execute` authorizes exactly one
136
136
  command, the bundled `tools/wtfp-tool.js` dispatcher over seven bibliography
137
- and citation tools. Run it with `--offline` until you approve network use.
137
+ and citation tools. On Clio full-auto, `research-gap` can search free no-key
138
+ public indexes through CiteNexus without another approval for each bounded
139
+ query. An operator-configured read-class CiteNexus MCP connection is preferred
140
+ when the Clio build supports it. Other network routes keep their author gate;
141
+ see [CiteNexus setup](docs/CITE_NEXUS.md).
138
142
 
139
143
  ## What it will not do
140
144
 
@@ -816,7 +816,7 @@ async function install(runtime, isUpdate, options, pkg) {
816
816
  // the installer stages a distinct copy and registers it.
817
817
  const scope = targetDir === path.join(process.cwd(), '.clio-coder') ? 'project' : 'user';
818
818
  const configFlag = explicitConfigDir ? ` --config-dir '${targetDir.replaceAll("'", "'\\''")}'` : '';
819
- out.warn(`Activation is pending: once clio-coder is on PATH, re-run npx wtf-p install clio${configFlag} from this directory to register the ${scope}-scope plugin.`);
819
+ out.warn(`Activation is pending: once clio-coder is on PATH, re-run npx wtf-p install clio${configFlag} from this directory to register the ${scope}-scope plugin and extension.`);
820
820
  }
821
821
  } else if (nativeActivation.status === 'deferred' && !hasQuiet) {
822
822
  out.warn(`${nativeActivation.reason}. The WTF-P bundle is staged but native registration is pending.`);
@@ -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({
@@ -494,7 +496,7 @@ function projectSchemasForAction(action) {
494
496
  return [...schemas].sort((left, right) => left.localeCompare(right));
495
497
  }
496
498
 
497
- function nativeCommandBody(action, workflowBody, target) {
499
+ function nativeCommandBody(action, workflowBody, target, deskTools = false) {
498
500
  const argumentToken = target === 'gemini'
499
501
  ? '{{args}}'
500
502
  : target === 'copilot-cloud'
@@ -503,17 +505,17 @@ function nativeCommandBody(action, workflowBody, target) {
503
505
  const schemas = projectSchemasForAction(action);
504
506
  const protocolIncludes = [
505
507
  `@protocol://actions/${action.id}.json`,
506
- ...(schemas.length > 0 ? ['@protocol://project/schemas/common.schema.json'] : []),
507
- ...schemas.flatMap((schema) => [
508
+ ...(!deskTools && schemas.length > 0 ? ['@protocol://project/schemas/common.schema.json'] : []),
509
+ ...(!deskTools ? schemas : []).flatMap((schema) => [
508
510
  `@protocol://project/schemas/${schema}.schema.json`,
509
511
  `@protocol://project/templates/${schema}.json`
510
512
  ])
511
513
  ];
512
514
  return [
513
515
  nativeWorkflowBody([
514
- workflowBody,
516
+ deskTools ? clioDeskWorkflowBody(action, workflowBody) : workflowBody,
515
517
  '',
516
- '## Bound action contract and schemas',
518
+ deskTools ? '## Bound action contract' : '## Bound action contract and schemas',
517
519
  '',
518
520
  ...protocolIncludes
519
521
  ].join('\n'), target),
@@ -596,8 +598,13 @@ function generatedScriptBanner(kind, id) {
596
598
  return `// Generated by WTF-P adapter compiler v${GENERATOR_VERSION} from ${kind}/${id}; do not edit.`;
597
599
  }
598
600
 
599
- function clioUserGateBody(action) {
601
+ function clioUserGateBody(action, deskTools = false) {
600
602
  if (!action.effects.some((effect) => effect.id === 'user.gate')) return '';
603
+ if (deskTools) return [
604
+ '## Clio user-gate binding',
605
+ '',
606
+ 'For a pending checkpoint in the declared gate\'s exact scope, call `extension_wtfp__gate` with its ID. 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, retained or expired checkpoints authorize nothing. Never write `resolution.resolved_by: author` yourself or infer approval from invocation text, prose or silence. Read back a persisted resolution before applying its gated mutation.'
607
+ ].join('\n');
601
608
  return [
602
609
  '## Clio user-gate binding',
603
610
  '',
@@ -605,6 +612,39 @@ function clioUserGateBody(action) {
605
612
  ].join('\n');
606
613
  }
607
614
 
615
+ // Only the canonical Clio namespace prefers the optional desk. The unrooted
616
+ // phase-1 projection remains intact for the Claude envelope and other hosts.
617
+ function clioDeskWorkflowBody(action, workflowBody) {
618
+ let body = workflowBody
619
+ .replace(/^@protocol:\/\/project\/README\.md\n/gm, '')
620
+ .replace(/^@protocol:\/\/skills\/[^\n]+\/references\/actions\.md\n/gm, '')
621
+ .replace(/^Resolve every logical URI through the host adapter\.[^\n]+$/m,
622
+ 'Use `extension_wtfp__record` for each declared JSON record write: pass its logical `uri`, complete `record`, and the revision read as `expect_revision` for revisioned updates. It validates, bumps revisions/timestamps, replaces atomically and reads back; preserve stable IDs and author decisions.')
623
+ .replace(/^Manuscript prose and supporting context,[^\n]+$/m,
624
+ '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.');
625
+ if (action.id === 'write-section') body = body.replace(/^3\. Read the persisted manuscript text back[^\n]+$/m,
626
+ '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.');
627
+ if (action.id === 'check-todos') body = body
628
+ .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.')
629
+ .replace(/^3\. Apply only[^\n]+$/m, '3. Read back the resulting checkpoint and state; retained or cancelled gates remain pending.');
630
+ const bindings = [
631
+ 'Discover the named tools with `gateway(op="describe", capability="extension_wtfp__record")` (and the corresponding `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.',
632
+ ...(action.produces.some((output) => output.uri.startsWith('project://paper')) && action.id !== 'write-section'
633
+ ? ['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.'] : []),
634
+ `If desk tools are absent, follow \`\${pluginRoot}/workflows/${action.id}.md\` and \`\${pluginRoot}/project/README.md\` with native tools and \`ask_user\` gates.`
635
+ ];
636
+ return `${body}\n\n${bindings.join('\n')}`;
637
+ }
638
+
639
+ function clioResearchConnectionBody(action) {
640
+ if (action.id !== 'research-gap') return '';
641
+ return [
642
+ '## Clio CiteNexus binding',
643
+ '',
644
+ 'In full-auto, the main agent first calls `gateway(op="find", query="cite-nexus")`. If a CiteNexus server is present and its tools are admitted as read-class through the operator\'s user configuration, call `gateway(op="describe", capability="<search-papers capability>")`, then `gateway(op="call", capability="<search-papers capability>", args={...})` with bounded public metadata queries. Use the capability name and argument schema returned by the gateway, not a guessed name. MCP connections are session-owned and unavailable in delegated workers, so pass the returned candidates and provenance to `wtfp-research-synthesizer` instead of asking that worker to discover the MCP server. This user-configured read connection is prior authorization for those searches; do not call `ask_user` again for each query. If no read-class CiteNexus connection is available and no gateway call has been refused, full-auto may instead run the bundled `citation-search --backend=cite-nexus` through its declared dispatcher with bounded public queries and an explicit `--providers` list containing only `crossref`, `datacite`, `europe_pmc`, or `arxiv`; pass those candidates to the same specialist. An operator-set offline flag, unavailable companion, or host refusal stops this route. Other providers and modes follow the declared user gate. Never bypass a gateway refusal by rerunning the same denied request through `bash`. Record the exact provider IDs, queries, limits, date, and provenance; verify each retained candidate before citing it.'
645
+ ].join('\n');
646
+ }
647
+
608
648
  // Workflow order for the operator-facing reference. Group membership comes from
609
649
  // the catalog; only the reading order of the groups is fixed here.
610
650
  const HELP_GROUP_ORDER = Object.freeze([
@@ -636,7 +676,8 @@ function helpArgumentHint(action) {
636
676
  // Clio renders a display-only prompt by printing its first fenced block to the
637
677
  // operator without a model call. The block is a self-contained reference:
638
678
  // no includes, no procedure, only what a human needs to pick the next action.
639
- function clioHelpCard(model, availabilityById) {
679
+ // `legacyFleetNames` renders the pre-playbook wording the Claude envelope keeps.
680
+ function clioHelpCard(model, availabilityById, legacyFleetNames = false) {
640
681
  const byId = new Map(model.actions.map((action) => [action.id, action]));
641
682
  const line = (id) => {
642
683
  const action = byId.get(id);
@@ -652,7 +693,7 @@ function clioHelpCard(model, availabilityById) {
652
693
  if (!groupIds.has(skill.id)) throw new Error(`help card has no group order for skill ${skill.id}`);
653
694
  }
654
695
  for (const id of HELP_START_SEQUENCE) if (!byId.has(id)) throw new Error(`help card start sequence names an unknown action: ${id}`);
655
- const fleets = fs.readdirSync(path.join(PROTOCOL_ROOT, 'fleets'))
696
+ const playbooks = fs.readdirSync(path.join(PROTOCOL_ROOT, 'fleets'))
656
697
  .filter((file) => file.endsWith('.json')).sort()
657
698
  .map((file) => readJson(path.join(PROTOCOL_ROOT, 'fleets', file)));
658
699
  const card = [
@@ -668,8 +709,10 @@ function clioHelpCard(model, availabilityById) {
668
709
  'Product operations',
669
710
  ...model.catalog.operations.actions.map(line),
670
711
  '',
671
- 'Fleets (clio-coder fleet run <fleet> --var section=<section>; explicit fleet primitives, not auto-routed)',
672
- ...fleets.map((fleet) => ` ${fleet.id}\n ${fleet.description}`),
712
+ legacyFleetNames
713
+ ? 'Fleets (clio-coder fleet run <fleet> --var section=<section>; explicit fleet primitives, not auto-routed)'
714
+ : 'Playbooks (clio-coder fleet run <playbook> --var section=<section>; run explicitly, never auto-routed)',
715
+ ...playbooks.map((playbook) => ` ${playbook.id}\n ${playbook.description}`),
673
716
  '',
674
717
  'Each action reads .planning/ records and paper/ artifacts, asks before any gated write, and never runs Git or publishes.',
675
718
  'An unavailable action fails closed with WTFP_ACTION_UNAVAILABLE and returns a manual handoff instead.'
@@ -690,7 +733,7 @@ function clioHelpCard(model, availabilityById) {
690
733
  ].join('\n');
691
734
  }
692
735
 
693
- function renderMarkdownCommand(action, workflowBody, target, availability) {
736
+ function renderMarkdownCommand(action, workflowBody, target, availability, deskTools = false) {
694
737
  const lines = ['---'];
695
738
  // Claude derives the stable command name from the plugin id and flat file
696
739
  // name. Repeating either in frontmatter creates names such as
@@ -712,8 +755,9 @@ function renderMarkdownCommand(action, workflowBody, target, availability) {
712
755
  for (const tool of tools) lines.push(` - ${tool}`);
713
756
  }
714
757
  }
715
- const nativeBody = nativeCommandBody(action, workflowBody, target);
716
- const userGateBody = target === 'clio' ? [clioUserGateBody(action), action.delegation.length ? '## Clio role-result binding\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') : '';
758
+ const nativeBody = nativeCommandBody(action, workflowBody, target, deskTools);
759
+ const clioRoles = action.delegation.map((entry) => `\`wtfp-${entry.role}\``).join(', ');
760
+ 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.\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') : '';
717
761
  lines.push(
718
762
  '---',
719
763
  '',
@@ -938,6 +982,41 @@ function standardPluginManifest(version, name = 'wtfp', clioExtension) {
938
982
  });
939
983
  }
940
984
 
985
+ const CLIO_PLAYBOOKS = ['wtfp-plan-section', 'wtfp-draft-review'];
986
+
987
+ // The root manifest with the Clio namespace. Clio runs fleet contracts as
988
+ // playbooks. `legacyFleetNames` keeps the pre-playbook `fleets` key, kind and
989
+ // directory for the Claude envelope, whose Clio copy Clio no longer adopts.
990
+ function clioPluginManifest(model, legacyFleetNames = false) {
991
+ const playbookRoot = `ai.iowarp.clio/${legacyFleetNames ? 'fleets' : 'playbooks'}`;
992
+ const components = [];
993
+ for (const action of model.actions) components.push({
994
+ kind: 'prompt', id: action.id,
995
+ path: `ai.iowarp.clio/prompts/wtfp/${action.id}.md`,
996
+ requires: action.delegation.map(item => `agent:${item.role}`)
997
+ });
998
+ for (const role of model.roles) components.push({
999
+ kind: 'agent', id: role.slug, path: `ai.iowarp.clio/agents/wtfp-${role.slug}.md`,
1000
+ requires: [`skill:${ROLE_SKILLS[role.slug]}`]
1001
+ });
1002
+ for (const skill of model.catalog.skills) components.push({
1003
+ kind: 'skill', id: skill.id, path: `skills/${skill.id}/SKILL.md`, requires: []
1004
+ });
1005
+ for (const id of CLIO_PLAYBOOKS) components.push({
1006
+ kind: legacyFleetNames ? 'fleet' : 'playbook', id, path: `${playbookRoot}/${id}.md`, requires: []
1007
+ });
1008
+ return standardPluginManifest(model.version, 'wtfp', {
1009
+ manifestVersion: 1,
1010
+ // The Claude copy keeps its pre-playbook floor; Clio 0.6.1 and older reject `playbooks`.
1011
+ compatibility: { clio: legacyFleetNames ? '>=0.4.7' : '>=0.6.2' },
1012
+ resources: {
1013
+ skills: 'skills', prompts: 'ai.iowarp.clio/prompts', agents: 'ai.iowarp.clio/agents',
1014
+ [legacyFleetNames ? 'fleets' : 'playbooks']: playbookRoot
1015
+ },
1016
+ components
1017
+ });
1018
+ }
1019
+
941
1020
  function clioFleetWriteBoundary(resource, fleetId) {
942
1021
  if (/^project:\/\/paper(?:\/|$)/u.test(resource)) return 'paper/';
943
1022
  if (/^project:\/\//u.test(resource)) return '.planning/';
@@ -1188,15 +1267,23 @@ function actionWriteRoots(action) {
1188
1267
  return [...roots].sort((left, right) => left.localeCompare(right));
1189
1268
  }
1190
1269
 
1191
- // The Claude write guard arms on the manuscript-writing actions (those that
1192
- // produce `project://paper/...`), confines Write/Edit calls for the rest of that
1193
- // prompt to the roots the action declares, and disarms when the turn stops.
1194
- function claudeWriteGuard(model, availabilityById) {
1270
+ // The manuscript-writing actions (those that produce `project://paper/...`)
1271
+ // available on one host, each with the project roots it declares. Both write
1272
+ // guards arm on exactly these.
1273
+ function manuscriptGuardActions(model, availabilityById, host) {
1195
1274
  const guarded = model.actions
1196
1275
  .filter((action) => availabilityById.get(action.id).available)
1197
1276
  .filter((action) => action.produces.some((output) => output.uri.startsWith('project://paper')))
1198
1277
  .map((action) => [action.id, actionWriteRoots(action)]);
1199
- if (guarded.length === 0) throw new Error('no manuscript-writing action is available on Claude');
1278
+ if (guarded.length === 0) throw new Error(`no manuscript-writing action is available on ${host}`);
1279
+ return guarded;
1280
+ }
1281
+
1282
+ // The Claude write guard arms on the manuscript-writing actions, confines
1283
+ // Write/Edit calls for the rest of that prompt to the roots the action
1284
+ // declares, and disarms when the turn stops.
1285
+ function claudeWriteGuard(model, availabilityById) {
1286
+ const guarded = manuscriptGuardActions(model, availabilityById, 'Claude');
1200
1287
  const manifest = stableJson({
1201
1288
  schema: 'wtfp.claude-write-guard/v1',
1202
1289
  actions: Object.fromEntries(guarded)
@@ -1328,6 +1415,31 @@ function geminiManifest(version) {
1328
1415
  });
1329
1416
  }
1330
1417
 
1418
+ // The Clio extension is installed and consented independently of the content
1419
+ // plugin. Every file its runtime reads belongs to this package; the plugin
1420
+ // link controls prompt takeover, not filesystem access to another install.
1421
+ function addClioRuntime(plan, model, availabilityById) {
1422
+ const source = (relative) => fs.readFileSync(path.join(CLIO_RUNTIME_ROOT, relative), 'utf8');
1423
+ const manifest = source('clio-coder-extension.yaml').replace(/^(?:#.*\n)+/, '');
1424
+ if (!/^version: .*$/m.test(manifest)) throw new Error('clio/clio-coder-extension.yaml must declare a version line');
1425
+ addFile(plan, 'clio-coder-extension.yaml', [
1426
+ `# Generated by WTF-P adapter compiler v${GENERATOR_VERSION} from clio/clio-coder-extension.yaml; do not edit.`,
1427
+ manifest.replace(/^version: .*$/m, `version: ${model.version}`)
1428
+ ].join('\n'));
1429
+ addFile(plan, 'runtime/extension.ts', `${generatedScriptBanner('clio', 'runtime/extension.ts')}\n${source('runtime/extension.ts')}`);
1430
+ // `clio-coder extensions test vendors/clio-extension` runs the package tests from here.
1431
+ addFile(plan, 'runtime/extension.test.ts', `${generatedScriptBanner('clio', 'runtime/extension.test.ts')}\n${source('runtime/extension.test.ts')}`);
1432
+ addFile(plan, 'runtime/package.json', source('runtime/package.json'));
1433
+ addFile(plan, 'runtime/json-schema.cjs', `${generatedScriptBanner('evaluation', 'lib/json-schema.js')}\n${fs.readFileSync(path.join(ROOT, 'evaluation', 'lib', 'json-schema.js'), 'utf8')}`);
1434
+ addFile(plan, 'runtime/write-guard.json', stableJson({
1435
+ schema: 'wtfp.clio-write-guard/v1',
1436
+ actions: Object.fromEntries(manuscriptGuardActions(model, availabilityById, 'Clio'))
1437
+ }));
1438
+ addFile(plan, 'skins/wtfp.json', source('skins/wtfp.json'));
1439
+ copyTree(plan, path.join(PROTOCOL_ROOT, 'project', 'schemas'), 'project/schemas');
1440
+ copyTree(plan, path.join(PROTOCOL_ROOT, 'actions'), 'actions');
1441
+ }
1442
+
1331
1443
  function makePlan(id, root) {
1332
1444
  return { id, root, files: new Map() };
1333
1445
  }
@@ -1701,6 +1813,7 @@ function addToolBundle(plan) {
1701
1813
  rows.push(`- \`${tool.implementation}\` → \`${outputPath}\` (legacy module \`${tool.legacyName}.js\`)`);
1702
1814
  }
1703
1815
  addFile(plan, 'tools/wtfp-tool.js', toolDispatcher(byToolId, effectsByToolId));
1816
+ addFile(plan, 'tools/package.json', '{"type":"commonjs"}\n');
1704
1817
  addFile(plan, 'tools/README.md', [
1705
1818
  '# WTF-P bundled tools',
1706
1819
  '',
@@ -1723,7 +1836,7 @@ function addToolBundle(plan) {
1723
1836
  '',
1724
1837
  ...TOOL_COMMANDS.map((entry) => `- \`${entry.usage}\` → \`${entry.tool}\` (${effectsByToolId.get(entry.tool).length > 0 ? effectsByToolId.get(entry.tool).join(', ') : 'no declared effects'})`),
1725
1838
  '',
1726
- 'For approved scholarly discovery, `citation-search --backend=cite-nexus --query="<topic>"` uses the separately installed `cite-nexus-wtfp` companion and its real MCP stdio server. Defaults are Crossref, DataCite and Europe PMC. Select optional vendors explicitly with `--providers`; include selected providers and query scope in the action approval. CiteNexus supports only balanced provider ordering, so omit `--intent` or use `--intent=balanced`. Results remain candidates: retain `citeNexus.sources`, field attribution, metrics, warnings and `metadata.errors`; do not infer verification or combine citation counts. The result limit is a displayed total; `metadata.total` counts the fetched deduplicated page, not the full corpus. Unavailable enrichment fails explicitly without falling back to another vendor. `WTFP_CITE_NEXUS_COMMAND` may name an absolute installed companion executable; it is operator configuration, never source content. No package is installed, server registered, or user profile changed by a tool call. Offline mode refuses this backend before process launch. Host capability blockers still apply.',
1839
+ 'For declared scholarly discovery, `citation-search --backend=cite-nexus --query="<topic>"` uses the separately installed `cite-nexus-wtfp` companion and its real MCP stdio server. Defaults are Crossref, DataCite and Europe PMC. Select providers explicitly with `--providers`. The `research-gap` full-auto route may use only free no-key public indexes (`crossref`, `datacite`, `europe_pmc`, `arxiv`) without another per-query gate; other routes require action approval naming providers and query scope. CiteNexus supports only balanced provider ordering, so omit `--intent` or use `--intent=balanced`. Results remain candidates: retain `citeNexus.sources`, field attribution, metrics, warnings and `metadata.errors`; do not infer verification or combine citation counts. The result limit is a displayed total; `metadata.total` counts the fetched deduplicated page, not the full corpus. Unavailable enrichment fails explicitly without falling back to another vendor. `WTFP_CITE_NEXUS_COMMAND` may name an absolute installed companion executable; it is operator configuration, never source content. No package is installed, server registered, or user profile changed by a tool call. Offline mode refuses this backend before process launch. Host capability blockers still apply.',
1727
1840
  '',
1728
1841
  'Every command prints one JSON document on stdout and reports failures as `{"error": "..."}` on stderr with exit status 1. Queries are capped at 512 characters, file paths at 4096, and result limits at 25. A symlinked file is accepted and read through its resolved target, which must be a regular file. Commands whose effects include `network.*` perform outbound requests to the declared scholarly indexes; pass `--offline` or set `WTFP_TOOL_OFFLINE=1` to refuse them, which is the mechanical form of "do not invoke a network-capable bibliography tool through a filesystem-only permission path". Each network command has a hard wall clock, `--timeout=<seconds>` (default 20, maximum 600); on expiry it reports `{"error": "<command> timed out after N s"}` on stderr and exits 124. `bib-impact` reports batch progress on stderr. `bib-index` flags repeated keys with `duplicate: true` and lists them under `duplicates`; `--key` refuses an ambiguous key. `bib-format` emits a standard BibTeX entry (`@article`, `@inproceedings`, ...) by default; `--style=al-folio` selects the Jekyll al-folio projection, which is not valid BibTeX. Do not execute any other module in this package directly, and do not pass a logical `project://` or `wtfp://` URI as a shell argument.',
1729
1842
  ''
@@ -1789,11 +1902,11 @@ function compilePlans(options = {}) {
1789
1902
  availabilityByTarget.set(plan.id, addActionAvailability(plan, model, plan.id, targetPolicies));
1790
1903
  }
1791
1904
 
1792
- for (const fleetId of ['wtfp-plan-section', 'wtfp-draft-review']) {
1905
+ for (const fleetId of CLIO_PLAYBOOKS) {
1793
1906
  if (!clio.files.delete(`fleets/${fleetId}.json`)) {
1794
1907
  throw new Error(`cannot project missing canonical fleet for Clio: ${fleetId}`);
1795
1908
  }
1796
- addFile(clio, `fleets/${fleetId}.md`, clioFleet(fleetId));
1909
+ addFile(clio, `playbooks/${fleetId}.md`, clioFleet(fleetId));
1797
1910
  }
1798
1911
 
1799
1912
  const claude = byId.get('claude');
@@ -1872,47 +1985,53 @@ function compilePlans(options = {}) {
1872
1985
  addFile(codex, `agents/wtfp-${role.slug}.toml`, renderCodexAgent(role, role.slug));
1873
1986
  }
1874
1987
 
1875
- // The canonical package. Everything Clio consumes ships here and nowhere else.
1988
+ // The canonical content-only plugin. Its prompts also work without the desk.
1876
1989
  const portable = makePlan('portable-plugin', path.join(ROOT, 'vendors', 'plugin'));
1877
1990
  for (const [file, content] of clio.files) {
1878
- const native = /^(prompts|agents|fleets)\//.test(file);
1879
- addFile(portable, native ? `ai.iowarp.clio/${file}` : file, content);
1880
- }
1881
- const components = [];
1882
- for (const action of model.actions) components.push({
1883
- kind: 'prompt', id: action.id,
1884
- path: `ai.iowarp.clio/prompts/wtfp/${action.id}.md`,
1885
- requires: action.delegation.map(item => `agent:${item.role}`)
1886
- });
1887
- for (const role of model.roles) components.push({
1888
- kind: 'agent', id: role.slug, path: `ai.iowarp.clio/agents/wtfp-${role.slug}.md`,
1889
- requires: [`skill:${ROLE_SKILLS[role.slug]}`]
1890
- });
1891
- for (const skill of model.catalog.skills) components.push({
1892
- kind: 'skill', id: skill.id, path: `skills/${skill.id}/SKILL.md`, requires: []
1893
- });
1894
- for (const id of ['wtfp-plan-section', 'wtfp-draft-review']) components.push({
1895
- kind: 'fleet', id, path: `ai.iowarp.clio/fleets/${id}.md`, requires: []
1896
- });
1897
- const portableManifest = standardPluginManifest(model.version, 'wtfp', {
1898
- manifestVersion: 1,
1899
- compatibility: { clio: '>=0.4.7' },
1900
- resources: { skills: 'skills', prompts: 'ai.iowarp.clio/prompts', agents: 'ai.iowarp.clio/agents', fleets: 'ai.iowarp.clio/fleets' },
1901
- components
1902
- });
1903
- addFile(portable, 'plugin.json', portableManifest);
1991
+ const native = /^(prompts|agents|playbooks)\//.test(file);
1992
+ const actionId = /^prompts\/wtfp\/([a-z-]+)\.md$/.exec(file)?.[1];
1993
+ const action = actionId && model.actions.find((entry) => entry.id === actionId);
1994
+ const usesRecords = action && action.produces.some((output) =>
1995
+ /^project:\/\/(?:manifest|config|state|decisions|structure\/outline|(?:sections|sources|evidence|checkpoints|validations)\/[^/]+)$/.test(output.uri));
1996
+ const projected = usesRecords && availabilityByTarget.get('clio').get(actionId).available
1997
+ ? renderMarkdownCommand(action, action.workflowBody, 'clio', availabilityByTarget.get('clio').get(actionId), true)
1998
+ : content;
1999
+ addFile(portable, native ? `ai.iowarp.clio/${file}` : file, projected);
2000
+ }
2001
+ addFile(portable, 'plugin.json', clioPluginManifest(model));
2002
+ const availability = JSON.parse(portable.files.get('compatibility/action-availability.json'));
2003
+ // Base bindings remain usable with the content plugin alone. The separately
2004
+ // installed desk supplies these preferred bindings when its tools are live.
2005
+ availability.runtimeBindings = {
2006
+ plugin: 'wtfp', extension: 'wtfp',
2007
+ capabilities: { 'user.interaction': 'clio:extension-interview' },
2008
+ approvals: { explicit: 'clio:extension-interview' },
2009
+ tools: { record: 'extension_wtfp__record', measure_section: 'extension_wtfp__measure_section', gate: 'extension_wtfp__gate' }
2010
+ };
2011
+ replaceFile(portable, 'compatibility/action-availability.json', stableJson(availability));
1904
2012
  plans.push(portable);
1905
2013
 
1906
- // Clio adopts an installed Claude plugin through the same portable root
1907
- // manifest, and it verifies every declared component path on disk. The
1908
- // Claude envelope therefore carries the identical `plugin.json` and the
1909
- // Clio component graph beside Claude's own `.claude-plugin/` surface. Claude
1910
- // Code reads neither file; its commands, agents, skills, hooks, and output
1911
- // style stay where its loader looks.
2014
+ const extension = makePlan('clio-extension', path.join(ROOT, 'vendors', 'clio-extension'));
2015
+ addClioRuntime(extension, model, availabilityByTarget.get('clio'));
2016
+ addFile(extension, 'compatibility/action-availability.json', clio.files.get('compatibility/action-availability.json'));
2017
+ plans.push(extension);
2018
+
2019
+ // The Claude envelope keeps its pre-playbook Clio namespace: a root `plugin.json`
2020
+ // and the phase 1 prompts, agents and fleets it names, beside Claude's own
2021
+ // `.claude-plugin/` surface. Clio no longer adopts a Claude-installed WTF-P;
2022
+ // it labels the copy older and points to `vendors/plugin`. Claude Code reads
2023
+ // neither file; its commands, agents, skills, hooks, and output style stay
2024
+ // where its loader looks.
1912
2025
  for (const [file, content] of clio.files) {
1913
- if (/^(prompts|agents|fleets)\//.test(file)) addFile(claude, `ai.iowarp.clio/${file}`, content);
2026
+ if (file === 'prompts/wtfp/help.md') {
2027
+ addFile(claude, `ai.iowarp.clio/${file}`, clioHelpCard(model, availabilityByTarget.get('clio'), true));
2028
+ } else if (/^(prompts|agents)\//.test(file)) {
2029
+ addFile(claude, `ai.iowarp.clio/${file}`, content);
2030
+ } else if (file.startsWith('playbooks/')) {
2031
+ addFile(claude, `ai.iowarp.clio/fleets/${file.slice('playbooks/'.length)}`, content);
2032
+ }
1914
2033
  }
1915
- addFile(claude, 'plugin.json', portableManifest);
2034
+ addFile(claude, 'plugin.json', clioPluginManifest(model, true));
1916
2035
 
1917
2036
  const codexMarketplace = makePlan('codex-marketplace', path.join(ROOT, 'vendors', 'codex'));
1918
2037
  addFile(codexMarketplace, '.agents/plugins/marketplace.json', stableJson({