wtf-p 0.7.3 → 0.7.4

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 (164) hide show
  1. package/README.md +15 -11
  2. package/bin/lib/adapter-compiler.js +13 -2
  3. package/package.json +1 -1
  4. package/protocol/actions/research-gap.json +1 -1
  5. package/protocol/roles/research-synthesizer.md +1 -1
  6. package/protocol/skills/wtfp-plan-section/references/actions.md +1 -1
  7. package/protocol/skills/wtfp-research-literature/references/actions.md +1 -1
  8. package/protocol/skills/wtfp-write-section/references/actions.md +1 -1
  9. package/protocol/workflows/plan-section.md +3 -2
  10. package/protocol/workflows/research-gap.md +2 -2
  11. package/protocol/workflows/write-section.md +1 -1
  12. package/vendors/antigravity/.wtfp-generated.json +18 -14
  13. package/vendors/antigravity/actions/research-gap.json +1 -1
  14. package/vendors/antigravity/agents/wtfp-research-synthesizer.md +1 -1
  15. package/vendors/antigravity/commands/wtfp-plan-section.md +3 -2
  16. package/vendors/antigravity/commands/wtfp-write-section.md +1 -1
  17. package/vendors/antigravity/plugin.json +1 -1
  18. package/vendors/antigravity/roles/research-synthesizer.md +1 -1
  19. package/vendors/antigravity/skills/wtfp-plan-section/references/actions.md +1 -1
  20. package/vendors/antigravity/skills/wtfp-research-literature/references/actions.md +1 -1
  21. package/vendors/antigravity/skills/wtfp-write-section/references/actions.md +1 -1
  22. package/vendors/antigravity/tools/README.md +1 -1
  23. package/vendors/antigravity/tools/package.json +1 -0
  24. package/vendors/antigravity/workflows/plan-section.md +3 -2
  25. package/vendors/antigravity/workflows/research-gap.md +2 -2
  26. package/vendors/antigravity/workflows/write-section.md +1 -1
  27. package/vendors/claude/.claude-plugin/marketplace.json +2 -2
  28. package/vendors/claude/.claude-plugin/plugin.json +1 -1
  29. package/vendors/claude/.wtfp-generated.json +33 -29
  30. package/vendors/claude/actions/research-gap.json +1 -1
  31. package/vendors/claude/agents/wtfp-research-synthesizer.md +1 -1
  32. package/vendors/claude/ai.iowarp.clio/agents/wtfp-research-synthesizer.md +1 -1
  33. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/analyze-bib.md +2 -0
  34. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/check-refs.md +2 -0
  35. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/create-outline.md +2 -0
  36. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/execute-outline.md +2 -0
  37. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/help.md +1 -1
  38. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/plan-section.md +5 -2
  39. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/polish-prose.md +2 -0
  40. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/quick.md +2 -0
  41. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/research-gap.md +8 -2
  42. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/review-section.md +2 -0
  43. package/vendors/claude/ai.iowarp.clio/prompts/wtfp/write-section.md +3 -1
  44. package/vendors/claude/commands/plan-section.md +3 -2
  45. package/vendors/claude/commands/research-gap.md +2 -2
  46. package/vendors/claude/commands/write-section.md +1 -1
  47. package/vendors/claude/plugin.json +1 -1
  48. package/vendors/claude/roles/research-synthesizer.md +1 -1
  49. package/vendors/claude/skills/wtfp-plan-section/references/actions.md +1 -1
  50. package/vendors/claude/skills/wtfp-research-literature/references/actions.md +1 -1
  51. package/vendors/claude/skills/wtfp-write-section/references/actions.md +1 -1
  52. package/vendors/claude/tools/README.md +1 -1
  53. package/vendors/claude/tools/package.json +1 -0
  54. package/vendors/claude/workflows/plan-section.md +3 -2
  55. package/vendors/claude/workflows/research-gap.md +2 -2
  56. package/vendors/claude/workflows/write-section.md +1 -1
  57. package/vendors/codex/plugins/wtfp/.codex-plugin/plugin.json +1 -1
  58. package/vendors/codex/plugins/wtfp/.wtfp-generated.json +17 -13
  59. package/vendors/codex/plugins/wtfp/actions/research-gap.json +1 -1
  60. package/vendors/codex/plugins/wtfp/agents/wtfp-research-synthesizer.toml +1 -1
  61. package/vendors/codex/plugins/wtfp/plugin.json +1 -1
  62. package/vendors/codex/plugins/wtfp/roles/research-synthesizer.md +1 -1
  63. package/vendors/codex/plugins/wtfp/skills/wtfp-plan-section/references/actions.md +1 -1
  64. package/vendors/codex/plugins/wtfp/skills/wtfp-research-literature/references/actions.md +1 -1
  65. package/vendors/codex/plugins/wtfp/skills/wtfp-write-section/references/actions.md +1 -1
  66. package/vendors/codex/plugins/wtfp/tools/README.md +1 -1
  67. package/vendors/codex/plugins/wtfp/tools/package.json +1 -0
  68. package/vendors/codex/plugins/wtfp/workflows/plan-section.md +3 -2
  69. package/vendors/codex/plugins/wtfp/workflows/research-gap.md +2 -2
  70. package/vendors/codex/plugins/wtfp/workflows/write-section.md +1 -1
  71. package/vendors/copilot/.wtfp-generated.json +14 -14
  72. package/vendors/copilot/marketplace.json +2 -2
  73. package/vendors/copilot/plugins/wtfp/.claude-plugin/plugin.json +1 -1
  74. package/vendors/copilot/plugins/wtfp/.wtfp-generated.json +18 -14
  75. package/vendors/copilot/plugins/wtfp/actions/research-gap.json +1 -1
  76. package/vendors/copilot/plugins/wtfp/agents/wtfp-research-synthesizer.md +1 -1
  77. package/vendors/copilot/plugins/wtfp/commands/wtfp-plan-section.md +3 -2
  78. package/vendors/copilot/plugins/wtfp/commands/wtfp-write-section.md +1 -1
  79. package/vendors/copilot/plugins/wtfp/roles/research-synthesizer.md +1 -1
  80. package/vendors/copilot/plugins/wtfp/skills/wtfp-plan-section/references/actions.md +1 -1
  81. package/vendors/copilot/plugins/wtfp/skills/wtfp-research-literature/references/actions.md +1 -1
  82. package/vendors/copilot/plugins/wtfp/skills/wtfp-write-section/references/actions.md +1 -1
  83. package/vendors/copilot/plugins/wtfp/tools/README.md +1 -1
  84. package/vendors/copilot/plugins/wtfp/tools/package.json +1 -0
  85. package/vendors/copilot/plugins/wtfp/workflows/plan-section.md +3 -2
  86. package/vendors/copilot/plugins/wtfp/workflows/research-gap.md +2 -2
  87. package/vendors/copilot/plugins/wtfp/workflows/write-section.md +1 -1
  88. package/vendors/copilot/project/.github/agents/wtfp-research-synthesizer.agent.md +1 -1
  89. package/vendors/copilot/project/.github/skills/wtfp-plan-section/references/actions.md +1 -1
  90. package/vendors/copilot/project/.github/skills/wtfp-research-literature/references/actions.md +1 -1
  91. package/vendors/copilot/project/.github/skills/wtfp-write-section/references/actions.md +1 -1
  92. package/vendors/copilot/project/.github/wtfp/actions/research-gap.json +1 -1
  93. package/vendors/copilot/project/.github/wtfp/roles/research-synthesizer.md +1 -1
  94. package/vendors/copilot/project/.github/wtfp/skills/wtfp-plan-section/references/actions.md +1 -1
  95. package/vendors/copilot/project/.github/wtfp/skills/wtfp-research-literature/references/actions.md +1 -1
  96. package/vendors/copilot/project/.github/wtfp/skills/wtfp-write-section/references/actions.md +1 -1
  97. package/vendors/copilot/project/.github/wtfp/workflows/plan-section.md +3 -2
  98. package/vendors/copilot/project/.github/wtfp/workflows/research-gap.md +2 -2
  99. package/vendors/copilot/project/.github/wtfp/workflows/write-section.md +1 -1
  100. package/vendors/gemini/.wtfp-generated.json +24 -20
  101. package/vendors/gemini/actions/research-gap.json +1 -1
  102. package/vendors/gemini/agents/wtfp-research-synthesizer.md +1 -1
  103. package/vendors/gemini/commands/wtfp/discuss-section.toml +1 -1
  104. package/vendors/gemini/commands/wtfp/execute-outline.toml +1 -1
  105. package/vendors/gemini/commands/wtfp/insert-section.toml +1 -1
  106. package/vendors/gemini/commands/wtfp/list-assumptions.toml +1 -1
  107. package/vendors/gemini/commands/wtfp/plan-revision.toml +1 -1
  108. package/vendors/gemini/commands/wtfp/plan-section.toml +4 -3
  109. package/vendors/gemini/commands/wtfp/quick.toml +1 -1
  110. package/vendors/gemini/commands/wtfp/write-section.toml +2 -2
  111. package/vendors/gemini/gemini-extension.json +1 -1
  112. package/vendors/gemini/roles/research-synthesizer.md +1 -1
  113. package/vendors/gemini/skills/wtfp-plan-section/references/actions.md +1 -1
  114. package/vendors/gemini/skills/wtfp-research-literature/references/actions.md +1 -1
  115. package/vendors/gemini/skills/wtfp-write-section/references/actions.md +1 -1
  116. package/vendors/gemini/tools/README.md +1 -1
  117. package/vendors/gemini/tools/package.json +1 -0
  118. package/vendors/gemini/workflows/plan-section.md +3 -2
  119. package/vendors/gemini/workflows/research-gap.md +2 -2
  120. package/vendors/gemini/workflows/write-section.md +1 -1
  121. package/vendors/opencode/.wtfp-generated.json +23 -19
  122. package/vendors/opencode/actions/research-gap.json +1 -1
  123. package/vendors/opencode/agents/wtfp/research-synthesizer.md +1 -1
  124. package/vendors/opencode/commands/wtfp/discuss-section.md +1 -1
  125. package/vendors/opencode/commands/wtfp/execute-outline.md +1 -1
  126. package/vendors/opencode/commands/wtfp/insert-section.md +1 -1
  127. package/vendors/opencode/commands/wtfp/list-assumptions.md +1 -1
  128. package/vendors/opencode/commands/wtfp/plan-revision.md +1 -1
  129. package/vendors/opencode/commands/wtfp/plan-section.md +4 -3
  130. package/vendors/opencode/commands/wtfp/quick.md +1 -1
  131. package/vendors/opencode/commands/wtfp/write-section.md +2 -2
  132. package/vendors/opencode/roles/research-synthesizer.md +1 -1
  133. package/vendors/opencode/skills/wtfp-plan-section/references/actions.md +1 -1
  134. package/vendors/opencode/skills/wtfp-research-literature/references/actions.md +1 -1
  135. package/vendors/opencode/skills/wtfp-write-section/references/actions.md +1 -1
  136. package/vendors/opencode/tools/README.md +1 -1
  137. package/vendors/opencode/tools/package.json +1 -0
  138. package/vendors/opencode/workflows/plan-section.md +3 -2
  139. package/vendors/opencode/workflows/research-gap.md +2 -2
  140. package/vendors/opencode/workflows/write-section.md +1 -1
  141. package/vendors/plugin/.wtfp-generated.json +27 -23
  142. package/vendors/plugin/actions/research-gap.json +1 -1
  143. package/vendors/plugin/ai.iowarp.clio/agents/wtfp-research-synthesizer.md +1 -1
  144. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/analyze-bib.md +2 -0
  145. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/check-refs.md +2 -0
  146. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/create-outline.md +2 -0
  147. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/execute-outline.md +2 -0
  148. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/help.md +1 -1
  149. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/plan-section.md +5 -2
  150. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/polish-prose.md +2 -0
  151. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/quick.md +2 -0
  152. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/research-gap.md +8 -2
  153. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/review-section.md +2 -0
  154. package/vendors/plugin/ai.iowarp.clio/prompts/wtfp/write-section.md +3 -1
  155. package/vendors/plugin/plugin.json +1 -1
  156. package/vendors/plugin/roles/research-synthesizer.md +1 -1
  157. package/vendors/plugin/skills/wtfp-plan-section/references/actions.md +1 -1
  158. package/vendors/plugin/skills/wtfp-research-literature/references/actions.md +1 -1
  159. package/vendors/plugin/skills/wtfp-write-section/references/actions.md +1 -1
  160. package/vendors/plugin/tools/README.md +1 -1
  161. package/vendors/plugin/tools/package.json +1 -0
  162. package/vendors/plugin/workflows/plan-section.md +3 -2
  163. package/vendors/plugin/workflows/research-gap.md +2 -2
  164. package/vendors/plugin/workflows/write-section.md +1 -1
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.7.4` 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,13 +56,13 @@ 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.4.7 or newer) | `npx --yes --package=wtf-p@0.7.4 -- 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.4 -- 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.4 -- 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.4 -- 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.4 -- 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.4 -- wtf-p install antigravity` | `agy plugin install <root>/sources/wtfp` | 1.2.5 |
65
+ | Gemini CLI | `npx --yes --package=wtf-p@0.7.4 -- 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
@@ -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.7.4 -- 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
 
@@ -605,6 +605,15 @@ function clioUserGateBody(action) {
605
605
  ].join('\n');
606
606
  }
607
607
 
608
+ function clioResearchConnectionBody(action) {
609
+ if (action.id !== 'research-gap') return '';
610
+ return [
611
+ '## Clio CiteNexus binding',
612
+ '',
613
+ '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.'
614
+ ].join('\n');
615
+ }
616
+
608
617
  // Workflow order for the operator-facing reference. Group membership comes from
609
618
  // the catalog; only the reading order of the groups is fixed here.
610
619
  const HELP_GROUP_ORDER = Object.freeze([
@@ -713,7 +722,8 @@ function renderMarkdownCommand(action, workflowBody, target, availability) {
713
722
  }
714
723
  }
715
724
  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') : '';
725
+ 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') : '';
717
727
  lines.push(
718
728
  '---',
719
729
  '',
@@ -1701,6 +1711,7 @@ function addToolBundle(plan) {
1701
1711
  rows.push(`- \`${tool.implementation}\` → \`${outputPath}\` (legacy module \`${tool.legacyName}.js\`)`);
1702
1712
  }
1703
1713
  addFile(plan, 'tools/wtfp-tool.js', toolDispatcher(byToolId, effectsByToolId));
1714
+ addFile(plan, 'tools/package.json', '{"type":"commonjs"}\n');
1704
1715
  addFile(plan, 'tools/README.md', [
1705
1716
  '# WTF-P bundled tools',
1706
1717
  '',
@@ -1723,7 +1734,7 @@ function addToolBundle(plan) {
1723
1734
  '',
1724
1735
  ...TOOL_COMMANDS.map((entry) => `- \`${entry.usage}\` → \`${entry.tool}\` (${effectsByToolId.get(entry.tool).length > 0 ? effectsByToolId.get(entry.tool).join(', ') : 'no declared effects'})`),
1725
1736
  '',
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.',
1737
+ '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
1738
  '',
1728
1739
  '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
1740
  ''
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wtf-p",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "description": "Portable, evidence-grounded academic writing workflows (papers, proposals, posters, presentations) for Clio Coder, Claude Code, Codex, GitHub Copilot CLI, OpenCode, Antigravity CLI, and Gemini CLI.",
5
5
  "bin": {
6
6
  "wtfp": "bin/install.js",
@@ -96,7 +96,7 @@
96
96
  },
97
97
  {
98
98
  "id": "user.gate",
99
- "scope": "the external providers, bounded query set, and research scope and depth"
99
+ "scope": "unapproved or paid external providers and bounded query set, plus author-owned research scope and depth decisions"
100
100
  }
101
101
  ]
102
102
  }
@@ -42,7 +42,7 @@ Investigate the literature needed to plan and write a specific section well. The
42
42
  ## Boundaries
43
43
 
44
44
  - This is a `mutation-report` role. It may write only the research and suggestion artifacts authorized by the invoking action.
45
- - When external literature search is approved, `citation-search` may run with `--backend=cite-nexus` and an explicit `--providers` list after the gate. Returned results stay candidates, and this role never performs a bibliography write.
45
+ - An operator-configured, trusted read-only CiteNexus MCP connection may search bounded public scholarly metadata without a second per-query gate. In an explicitly selected full-auto host session for this research action, `citation-search --backend=cite-nexus` may also search `crossref`, `datacite`, `europe_pmc`, or `arxiv` without another gate. Other providers or modes require explicit network approval naming providers and query bounds. Honor offline flags and host refusals. Returned results stay candidates, and this role never performs a bibliography write.
46
46
  - Never fabricate a citation, identifier, quotation, metadata field, source conclusion, or claim of exhaustive coverage.
47
47
  - Never overwrite an existing `project://sources/{source}` record. Additions remain provisional until identity and provenance are verified by an authorized action.
48
48
  - Do not explore alternatives that author decisions explicitly deferred or rejected.
@@ -46,7 +46,7 @@ Contract: [protocol/actions/plan-section.json](../../../actions/plan-section.jso
46
46
  2. Read the complete planning context before decomposing work: manifest, config, state, decisions, outline, section record, context, research, source/evidence records, relevant prior summaries, and the bounded `project://validations/*` collection.
47
47
  3. Before any specialist dispatch, filter the validation records to candidates whose `subject_uri` is exactly `project://structure/outline` and whose `action_id` is exactly `create-outline`. A candidate is current only when `executed_at >= outline.updated_at`. Because the v1 validation schema carries no outline revision or content hash, disclose that this timestamp test is a conservative freshness proxy.
48
48
  4. Require exactly one current candidate and require its `status` to be `passed`. Separately verify that the current outline and target section are consistent with all current locked and deferred author choices: honor locked choices and do not treat deferred choices as resolved. A missing, stale, ambiguous, or non-passing candidate, or a decision contradiction, blocks all specialist dispatch and every plan, section, state, or validation write. Only a recovery checkpoint may be proposed on this blocked path, and it may be written only after a complete record preview and explicit author approval.
49
- 5. If the section is literature-heavy and research obligations remain empty, offer `research-gap`; do not manufacture citations to keep planning moving.
49
+ 5. If the section is literature-heavy, require a section-specific research artifact and resolvable source/evidence records for its planned claims before dispatch or approval. Run `research-gap` with the configured CiteNexus backend when available; if coverage remains insufficient, record a research checkpoint and stop. Search candidates alone are not verified citations. Do not manufacture citations to keep planning moving.
50
50
  6. Summarize the section goal, claims, evidence, manuscript artifact, dependencies, and open decisions at `config.gates.confirm_plan`.
51
51
  7. After the prerequisites pass, require `section-planner` in a bounded delegated pass to create one or more immutable Markdown `project://sections/{section}/plans/{plan}` artifacts. Each plan must declare:
52
52
  - stable section and plan identifiers;
@@ -14,7 +14,7 @@ Contract: [protocol/actions/research-gap.json](../../../actions/research-gap.jso
14
14
  - `standard`: run a focused, reproducible search across the most relevant categories;
15
15
  - `deep`: map foundational, recent, competing, gap-defining, and methodological work, including important disagreements and intellectual lineage.
16
16
  5. Form search questions and inclusion criteria before searching. Record databases or corpora, query strings, date, filters, and stopping rule.
17
- 6. Search authoritative scholarly sources only after disclosing and receiving approval for the external providers and bounded query set. When using the bundled dispatcher, `citation-search` may run with `--backend=cite-nexus` and an explicit `--providers` list after this gate. Returned results stay candidates, and this action performs no bibliography write. Deduplicate candidates by persistent identifier, then normalized title.
17
+ 6. Search authoritative scholarly sources with bounded queries. Two routes need no second per-query author gate: a host connection the operator already configured and authorized for read-only public scholarly metadata search, or the bundled CiteNexus dispatcher in a host session explicitly set to full-auto for this research action when every selected provider is a free, no-key public index (`crossref`, `datacite`, `europe_pmc`, or `arxiv`). Record provider IDs, query strings, date, and result limits in the research artifact. Do not send unpublished manuscript text, private notes, or credentials as search terms. Outside those routes, first disclose the providers and bounded query set and obtain explicit author approval. The dispatcher runs only `citation-search --backend=cite-nexus` with an explicit `--providers` list; honor an operator-set offline flag or any host refusal. Returned results stay candidates, and this action performs no bibliography write. Deduplicate candidates by persistent identifier, then normalized title.
18
18
  7. Verify each retained source from its primary record or publication. Create a `project://sources/{source}` record with title, creators, year, source kind, identifiers, citation key, status, provenance, inspection depth, and verification time.
19
19
  8. Read enough of each source to distinguish its actual claim, method, population, result, and limitation. Do not cite an abstract-only impression as full-paper evidence.
20
20
  9. Create `project://evidence/{evidence}` separately for each retained claim-level interpretation, with relation, locator, limitations, confidence, and inspection depth. Synthesize by question rather than listing papers; identify consensus, disagreement, methodological differences, missing evidence, and defensible positioning.
@@ -8,7 +8,7 @@ Contract: [protocol/actions/write-section.json](../../../actions/write-section.j
8
8
 
9
9
  1. Require an exact `project://sections/{section}/plans/{plan}` artifact linked from `project://sections/{section}` and verify its declared inputs, outputs, dependencies, validation, and approval state.
10
10
  2. If a corresponding summary or manuscript output exists, show the overwrite or merge impact and require explicit re-execution approval.
11
- 3. Read the plan, `project://manifest`, `project://state`, `project://decisions`, `project://structure/outline`, section context and research, relevant source/evidence records, and enough neighboring prose to maintain continuity.
11
+ 3. Read the plan, `project://manifest`, `project://state`, `project://decisions`, `project://structure/outline`, section context and research, relevant source/evidence records, and enough neighboring prose to maintain continuity. For a literature-heavy section, require research and verified source/evidence coverage of the plan's factual claims before drafting. Route missing coverage through `research-gap` and a checkpoint; do not substitute model memory or search candidates for source records.
12
12
  4. Present the plan objective, output path, target words, evidence obligations, and checkpoints at the configured writing gate.
13
13
  5. Execute tasks in order against the exact `project://paper/{artifact}` output. For each task:
14
14
  - establish the paragraph or subsection's rhetorical job;
@@ -24,8 +24,9 @@ Manuscript prose and supporting context, research, plan, review, summary, handof
24
24
  1. Resolve one section record, load its linked context, research, evidence, decisions, and outline constraints, and enumerate the bounded `project://validations/*` collection before any specialist dispatch.
25
25
  2. Filter those records to candidates whose `subject_uri` is exactly `project://structure/outline` and whose `action_id` is exactly `create-outline`. A candidate is current only when `executed_at >= outline.updated_at`. Because the v1 validation schema carries no outline revision or content hash, disclose that this timestamp test is a conservative freshness proxy.
26
26
  3. Require exactly one current candidate and require its `status` to be `passed`. Separately verify that the current outline and target section are consistent with all current locked and deferred author choices: honor locked choices and do not treat deferred choices as resolved. A missing, stale, ambiguous, or non-passing candidate, or a decision contradiction, blocks all specialist dispatch and every plan, section, state, or validation write. Only a recovery checkpoint may be proposed on this blocked path, and it may be written only after a complete record preview and explicit author approval.
27
- 4. Only after those prerequisites pass, delegate a bounded plan to `section-planner`, then require a fresh `plan-checker` pass over claim coverage, dependencies, file scope, citations, and decision fidelity.
28
- 5. At confirm_plan, preview the plan and validation; on approval link the plan, update section status to planned, and reconcile state. Create a checkpoint for unresolved judgment instead of bypassing the required checker.
27
+ 4. For a literature-heavy section, first require a section-specific research artifact plus resolvable source/evidence records that cover the planned claims. If they are absent or insufficient, run `research-gap` with the configured CiteNexus backend when available, verify candidate metadata against the returned records, and stop planning with an explicit research checkpoint if evidence remains insufficient. Never invent citations or treat search candidates as verified sources.
28
+ 5. Only after those prerequisites pass, delegate a bounded plan to `section-planner`, then require a fresh `plan-checker` pass over claim coverage, dependencies, file scope, citations, and decision fidelity. Dispatch the exact WTF-P specialist roles; generic coder and verifier roles do not satisfy this workflow.
29
+ 6. At confirm_plan, preview the plan and validation; on approval link the plan, update section status to planned, and reconcile state. Create a checkpoint for unresolved judgment instead of bypassing the required checker.
29
30
 
30
31
  ## Safety and completion
31
32
 
@@ -22,7 +22,7 @@ Manuscript prose and supporting context, research, plan, review, summary, handof
22
22
  ## Procedure
23
23
 
24
24
  1. Resolve the research question and section scope against locked/deferred decisions; agree on depth and source constraints.
25
- 2. Search declared scholarly services only after the gate names the providers and bounded query set. When using the bundled dispatcher, `citation-search` may run with `--backend=cite-nexus` and an explicit `--providers` list after this gate. Returned results stay candidates, and this action performs no bibliography write. Verify source identity and inspection depth, and separate source records from claim-level evidence.
25
+ 2. Prefer an operator-configured, trusted read-only CiteNexus MCP connection for bounded public metadata searches when the host has already authorized it. In an explicitly selected full-auto host session for this research action, the bundled CiteNexus dispatcher may also search the free no-key public indexes `crossref`, `datacite`, `europe_pmc`, and `arxiv` without a second per-query author gate; use only selected relevant indexes with an explicit `--providers` list. Record provider IDs, queries, date, and result limits; never send unpublished manuscript text or private notes as search terms. For any other route, first obtain explicit author approval naming the providers and bounded query set. Results remain candidates and this action performs no bibliography write. Verify source identity and inspection depth, and separate source records from claim-level evidence.
26
26
  3. Synthesize supported, conflicting, and missing evidence into a Markdown research artifact; link new records and disclose limitations.
27
27
 
28
28
  ## Bundled tool execution
@@ -33,7 +33,7 @@ The declared `tool.execute` effect authorises exactly one command, run from the
33
33
  node protocol://tools/wtfp-tool.js [--offline] <command> [arguments]
34
34
  ```
35
35
 
36
- Run it with `list` first to read the declared commands, their arguments, their bounds, and the effects each one applies; `protocol://tools/README.md` carries the same table. A command whose effects include `network.*` performs outbound requests. Until network use has been approved for this run, pass `--offline` (or set `WTFP_TOOL_OFFLINE=1`), which makes the dispatcher refuse those commands instead of relying on prose restraint. Never execute another module in this package, never pass a logical `project://` or `wtfp://` URI as a shell argument, and treat every returned record as candidate evidence until it is verified and written to a source or evidence record.
36
+ Run it with `list` first to read the declared commands, their arguments, their bounds, and the effects each one applies; `protocol://tools/README.md` carries the same table. A command whose effects include `network.*` performs outbound requests. Pass `--offline` (or set `WTFP_TOOL_OFFLINE=1`) until the provider/query gate is approved, except for this action's explicit full-auto public-index route. On that route omit `--offline` only for `citation-search --backend=cite-nexus` with bounded queries and `--providers` drawn from `crossref,datacite,europe_pmc,arxiv`; never override an operator-set offline flag or a host refusal. Never execute another module in this package, never pass a logical `project://` or `wtfp://` URI as a shell argument, and treat every returned record as candidate evidence until it is verified and written to a source or evidence record.
37
37
 
38
38
  ## Safety and completion
39
39
 
@@ -22,7 +22,7 @@ Manuscript prose and supporting context, research, plan, review, summary, handof
22
22
  ## Procedure
23
23
 
24
24
  1. Require one approved plan and resolve all linked context, research, source/evidence records, decisions, prior summary, existing target, and necessary neighboring prose before choosing create or update.
25
- 2. Draft only the declared manuscript artifact; cite only resolvable sources, preserve author constraints, and stop at blocking decisions.
25
+ 2. Before drafting a literature-heavy section, verify that its linked research artifact and source/evidence records cover the plan's factual claims. If coverage is missing, use the declared research workflow and pause at a checkpoint until verified records exist. Draft only the declared manuscript artifact; cite only resolvable sources, preserve author constraints, and stop at blocking decisions. A plausible bibliography entry, search candidate, or model memory is not a verified citation.
26
26
  3. Read the persisted manuscript text back and calculate its actual body word count with one deterministic method; never copy a worker self-report, plan target, or summary count into project records. Validate the persisted draft against its plan and word budget.
27
27
  4. Create or update the required Markdown summary with that measured count, then read back both manuscript and summary. Missing, empty, or inconsistent output is a failed completion condition, not permission to link a path that does not exist.
28
28
  5. Persist the validation, synchronize the manuscript URI in `manifest.artifacts.manuscripts`, and reconcile section/state records only after manuscript, summary, and validation readback succeeds. If blocked, create the declared checkpoint and stop; do not commit or merge automatically.
@@ -2,7 +2,7 @@
2
2
  "schema": "wtfp.generated-adapter/v1",
3
3
  "generatorVersion": 5,
4
4
  "target": "antigravity",
5
- "sourceHash": "dac5b9dd1327d76dd4f80be73efcb4b9ccc4afc0e740103b33b7bdd34fc3da63",
5
+ "sourceHash": "e6be36fb1d333a4a58170b6ea1066f3ccc8306e0b86b164e0eabca2aaa5f168a",
6
6
  "files": [
7
7
  {
8
8
  "path": "actions/add-todo.json",
@@ -118,7 +118,7 @@
118
118
  },
119
119
  {
120
120
  "path": "actions/research-gap.json",
121
- "sha256": "80659531e18fb60dd46620c8b35aa27ce0f966c467f0d3073ae8c6519084153e"
121
+ "sha256": "0c26fa663f1d2526cbefcc9750b0a176ddf1ca538a46585a1de48c763fbb1a13"
122
122
  },
123
123
  {
124
124
  "path": "actions/resume-writing.json",
@@ -178,7 +178,7 @@
178
178
  },
179
179
  {
180
180
  "path": "agents/wtfp-research-synthesizer.md",
181
- "sha256": "2adec7aab0cad7e9cc66312b14f8ee8824d269ad499319ad47094cfe4936f04a"
181
+ "sha256": "e50c44188d1f655268c35044760a1a314d8d7bf9ece2e9595778c1560b779114"
182
182
  },
183
183
  {
184
184
  "path": "agents/wtfp-section-planner.md",
@@ -286,7 +286,7 @@
286
286
  },
287
287
  {
288
288
  "path": "commands/wtfp-plan-section.md",
289
- "sha256": "919ba047726a4c454329c054c415613a1aefdf904ddca13f0bc56426ec6798ae"
289
+ "sha256": "f36084563180ac559b8e5ff792565a8db6ea9a7c2031bd06ad57ad54f0be94ba"
290
290
  },
291
291
  {
292
292
  "path": "commands/wtfp-polish-prose.md",
@@ -342,7 +342,7 @@
342
342
  },
343
343
  {
344
344
  "path": "commands/wtfp-write-section.md",
345
- "sha256": "82dae8583d3d300e64e68157b10c13ef9b8ba37d9c7bf947770cefe76874ef21"
345
+ "sha256": "100af3ef4be44fe3981023ec5f46bd7a8a3c5a956bb2ec50835ef3a823047275"
346
346
  },
347
347
  {
348
348
  "path": "compatibility/action-availability.json",
@@ -362,7 +362,7 @@
362
362
  },
363
363
  {
364
364
  "path": "plugin.json",
365
- "sha256": "c6260cf5a7455c7c684661ad8704fc7a37c7034ee99b9c34a3d6c2c5bffd82cd"
365
+ "sha256": "198d10a8df114d382642abc9f200ef30826f5ed28c5698b8d33030f9d78349a1"
366
366
  },
367
367
  {
368
368
  "path": "project/README.md",
@@ -486,7 +486,7 @@
486
486
  },
487
487
  {
488
488
  "path": "roles/research-synthesizer.md",
489
- "sha256": "011feaa1fdb967c267713f4fa4b0c45b27e66a62f71d1f24c4f44360442aef57"
489
+ "sha256": "7aa6922f5f819918374b1a87dbda5c12fa6d424be64fc13b4019c380e011306c"
490
490
  },
491
491
  {
492
492
  "path": "roles/section-planner.md",
@@ -558,7 +558,7 @@
558
558
  },
559
559
  {
560
560
  "path": "skills/wtfp-plan-section/references/actions.md",
561
- "sha256": "5732b2faf9640e6663f1342ebce264a877f813570765c847216ff0e40b8ba6e6"
561
+ "sha256": "11d5d27f450857d9a2cd2e06184ba66b4d581e56f6530bd97c82404c8eb06e99"
562
562
  },
563
563
  {
564
564
  "path": "skills/wtfp-plan-section/SKILL.md",
@@ -570,7 +570,7 @@
570
570
  },
571
571
  {
572
572
  "path": "skills/wtfp-research-literature/references/actions.md",
573
- "sha256": "83cb1dbc27563a02bb35fbb995fe54d37e5afe523821b5cb5b6c3baf2fa72d50"
573
+ "sha256": "7d2137fa9638782444d88cccf7161ee3afbb5ce9c95bd85fcad57e61b8265d79"
574
574
  },
575
575
  {
576
576
  "path": "skills/wtfp-research-literature/SKILL.md",
@@ -606,7 +606,7 @@
606
606
  },
607
607
  {
608
608
  "path": "skills/wtfp-write-section/references/actions.md",
609
- "sha256": "367b9144ce76b4e6116d9a2566c02070e80bbb57325a43bf5aa22447e6cb83f5"
609
+ "sha256": "1fe6f8d50a1abd7a0b338772560317404942874ddd67be458ca24182ea20f7a4"
610
610
  },
611
611
  {
612
612
  "path": "skills/wtfp-write-section/SKILL.md",
@@ -664,9 +664,13 @@
664
664
  "path": "tools/citation/semantic-scholar.js",
665
665
  "sha256": "df4c1f3d69a28e06dd5285ba46c116bb2731aa940e16b9438c822846f38646f5"
666
666
  },
667
+ {
668
+ "path": "tools/package.json",
669
+ "sha256": "dbf8353f77358bc12169b7bb7301e1978d5b503e002ee927229a8993672818fc"
670
+ },
667
671
  {
668
672
  "path": "tools/README.md",
669
- "sha256": "997889703a61599a3d6267b1ddbd571ac354b55e7fe3a9dc2ebbf00b6c6d2106"
673
+ "sha256": "eb99d2ef30209b409e8c0dbfccaabdf301b6bc50f17013cd8fa381c3c1d69ae2"
670
674
  },
671
675
  {
672
676
  "path": "tools/support/cite-nexus-client.js",
@@ -762,7 +766,7 @@
762
766
  },
763
767
  {
764
768
  "path": "workflows/plan-section.md",
765
- "sha256": "02311226aa784dea4a6a5219ef59fcea6c904f92566318e3327aa4e883228446"
769
+ "sha256": "831c20c8afd147a8ba149a46f54591b6f07732983ee916a56c66701c8c701aa2"
766
770
  },
767
771
  {
768
772
  "path": "workflows/polish-prose.md",
@@ -790,7 +794,7 @@
790
794
  },
791
795
  {
792
796
  "path": "workflows/research-gap.md",
793
- "sha256": "a1736edb7e739708a92e5ef11c2d7c7a87fe8e6e4d6586e8ce9b1db3ae5bb428"
797
+ "sha256": "02ffe236ba7de12e4b3abbac308c0e1cfc409147147d509616b95baec3fef012"
794
798
  },
795
799
  {
796
800
  "path": "workflows/resume-writing.md",
@@ -818,7 +822,7 @@
818
822
  },
819
823
  {
820
824
  "path": "workflows/write-section.md",
821
- "sha256": "cfb3a0f9c61830d62cebdf8be5dacd17cef996d99cbab1df18267313ca05aacc"
825
+ "sha256": "5a2f0efcd11d7f41d941f54b80798ad481773820907fee68bea47f28b7af7bc3"
822
826
  }
823
827
  ]
824
828
  }
@@ -96,7 +96,7 @@
96
96
  },
97
97
  {
98
98
  "id": "user.gate",
99
- "scope": "the external providers, bounded query set, and research scope and depth"
99
+ "scope": "unapproved or paid external providers and bounded query set, plus author-owned research scope and depth decisions"
100
100
  }
101
101
  ]
102
102
  }
@@ -48,7 +48,7 @@ Investigate the literature needed to plan and write a specific section well. The
48
48
  ## Boundaries
49
49
 
50
50
  - This is a `mutation-report` role. It may write only the research and suggestion artifacts authorized by the invoking action.
51
- - When external literature search is approved, `citation-search` may run with `--backend=cite-nexus` and an explicit `--providers` list after the gate. Returned results stay candidates, and this role never performs a bibliography write.
51
+ - An operator-configured, trusted read-only CiteNexus MCP connection may search bounded public scholarly metadata without a second per-query gate. In an explicitly selected full-auto host session for this research action, `citation-search --backend=cite-nexus` may also search `crossref`, `datacite`, `europe_pmc`, or `arxiv` without another gate. Other providers or modes require explicit network approval naming providers and query bounds. Honor offline flags and host refusals. Returned results stay candidates, and this role never performs a bibliography write.
52
52
  - Never fabricate a citation, identifier, quotation, metadata field, source conclusion, or claim of exhaustive coverage.
53
53
  - Never overwrite an existing `project://sources/{source}` record. Additions remain provisional until identity and provenance are verified by an authorized action.
54
54
  - Do not explore alternatives that author decisions explicitly deferred or rejected.
@@ -32,8 +32,9 @@ Manuscript prose and supporting context, research, plan, review, summary, handof
32
32
  1. Resolve one section record, load its linked context, research, evidence, decisions, and outline constraints, and enumerate the bounded `project://validations/*` collection before any specialist dispatch.
33
33
  2. Filter those records to candidates whose `subject_uri` is exactly `project://structure/outline` and whose `action_id` is exactly `create-outline`. A candidate is current only when `executed_at >= outline.updated_at`. Because the v1 validation schema carries no outline revision or content hash, disclose that this timestamp test is a conservative freshness proxy.
34
34
  3. Require exactly one current candidate and require its `status` to be `passed`. Separately verify that the current outline and target section are consistent with all current locked and deferred author choices: honor locked choices and do not treat deferred choices as resolved. A missing, stale, ambiguous, or non-passing candidate, or a decision contradiction, blocks all specialist dispatch and every plan, section, state, or validation write. Only a recovery checkpoint may be proposed on this blocked path, and it may be written only after a complete record preview and explicit author approval.
35
- 4. Only after those prerequisites pass, delegate a bounded plan to `section-planner`, then require a fresh `plan-checker` pass over claim coverage, dependencies, file scope, citations, and decision fidelity.
36
- 5. At confirm_plan, preview the plan and validation; on approval link the plan, update section status to planned, and reconcile state. Create a checkpoint for unresolved judgment instead of bypassing the required checker.
35
+ 4. For a literature-heavy section, first require a section-specific research artifact plus resolvable source/evidence records that cover the planned claims. If they are absent or insufficient, run `research-gap` with the configured CiteNexus backend when available, verify candidate metadata against the returned records, and stop planning with an explicit research checkpoint if evidence remains insufficient. Never invent citations or treat search candidates as verified sources.
36
+ 5. Only after those prerequisites pass, delegate a bounded plan to `section-planner`, then require a fresh `plan-checker` pass over claim coverage, dependencies, file scope, citations, and decision fidelity. Dispatch the exact WTF-P specialist roles; generic coder and verifier roles do not satisfy this workflow.
37
+ 6. At confirm_plan, preview the plan and validation; on approval link the plan, update section status to planned, and reconcile state. Create a checkpoint for unresolved judgment instead of bypassing the required checker.
37
38
 
38
39
  ## Safety and completion
39
40
 
@@ -30,7 +30,7 @@ Manuscript prose and supporting context, research, plan, review, summary, handof
30
30
  ## Procedure
31
31
 
32
32
  1. Require one approved plan and resolve all linked context, research, source/evidence records, decisions, prior summary, existing target, and necessary neighboring prose before choosing create or update.
33
- 2. Draft only the declared manuscript artifact; cite only resolvable sources, preserve author constraints, and stop at blocking decisions.
33
+ 2. Before drafting a literature-heavy section, verify that its linked research artifact and source/evidence records cover the plan's factual claims. If coverage is missing, use the declared research workflow and pause at a checkpoint until verified records exist. Draft only the declared manuscript artifact; cite only resolvable sources, preserve author constraints, and stop at blocking decisions. A plausible bibliography entry, search candidate, or model memory is not a verified citation.
34
34
  3. Read the persisted manuscript text back and calculate its actual body word count with one deterministic method; never copy a worker self-report, plan target, or summary count into project records. Validate the persisted draft against its plan and word budget.
35
35
  4. Create or update the required Markdown summary with that measured count, then read back both manuscript and summary. Missing, empty, or inconsistent output is a failed completion condition, not permission to link a path that does not exist.
36
36
  5. Persist the validation, synchronize the manuscript URI in `manifest.artifacts.manuscripts`, and reconcile section/state records only after manuscript, summary, and validation readback succeeds. If blocked, create the declared checkpoint and stop; do not commit or merge automatically.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "$schema": "https://antigravity.google/schemas/v1/plugin.json",
3
3
  "name": "wtfp",
4
- "description": "Portable academic research and writing workflows (WTF-P 0.7.3)."
4
+ "description": "Portable academic research and writing workflows (WTF-P 0.7.4)."
5
5
  }
@@ -42,7 +42,7 @@ Investigate the literature needed to plan and write a specific section well. The
42
42
  ## Boundaries
43
43
 
44
44
  - This is a `mutation-report` role. It may write only the research and suggestion artifacts authorized by the invoking action.
45
- - When external literature search is approved, `citation-search` may run with `--backend=cite-nexus` and an explicit `--providers` list after the gate. Returned results stay candidates, and this role never performs a bibliography write.
45
+ - An operator-configured, trusted read-only CiteNexus MCP connection may search bounded public scholarly metadata without a second per-query gate. In an explicitly selected full-auto host session for this research action, `citation-search --backend=cite-nexus` may also search `crossref`, `datacite`, `europe_pmc`, or `arxiv` without another gate. Other providers or modes require explicit network approval naming providers and query bounds. Honor offline flags and host refusals. Returned results stay candidates, and this role never performs a bibliography write.
46
46
  - Never fabricate a citation, identifier, quotation, metadata field, source conclusion, or claim of exhaustive coverage.
47
47
  - Never overwrite an existing `project://sources/{source}` record. Additions remain provisional until identity and provenance are verified by an authorized action.
48
48
  - Do not explore alternatives that author decisions explicitly deferred or rejected.
@@ -62,7 +62,7 @@ Contract: [protocol/actions/plan-section.json](../../../actions/plan-section.jso
62
62
  2. Read the complete planning context before decomposing work: manifest, config, state, decisions, outline, section record, context, research, source/evidence records, relevant prior summaries, and the bounded `project://validations/*` collection.
63
63
  3. Before any specialist dispatch, filter the validation records to candidates whose `subject_uri` is exactly `project://structure/outline` and whose `action_id` is exactly `create-outline`. A candidate is current only when `executed_at >= outline.updated_at`. Because the v1 validation schema carries no outline revision or content hash, disclose that this timestamp test is a conservative freshness proxy.
64
64
  4. Require exactly one current candidate and require its `status` to be `passed`. Separately verify that the current outline and target section are consistent with all current locked and deferred author choices: honor locked choices and do not treat deferred choices as resolved. A missing, stale, ambiguous, or non-passing candidate, or a decision contradiction, blocks all specialist dispatch and every plan, section, state, or validation write. Only a recovery checkpoint may be proposed on this blocked path, and it may be written only after a complete record preview and explicit author approval.
65
- 5. If the section is literature-heavy and research obligations remain empty, offer `research-gap`; do not manufacture citations to keep planning moving.
65
+ 5. If the section is literature-heavy, require a section-specific research artifact and resolvable source/evidence records for its planned claims before dispatch or approval. Run `research-gap` with the configured CiteNexus backend when available; if coverage remains insufficient, record a research checkpoint and stop. Search candidates alone are not verified citations. Do not manufacture citations to keep planning moving.
66
66
  6. Summarize the section goal, claims, evidence, manuscript artifact, dependencies, and open decisions at `config.gates.confirm_plan`.
67
67
  7. After the prerequisites pass, require `section-planner` in a bounded delegated pass to create one or more immutable Markdown `project://sections/{section}/plans/{plan}` artifacts. Each plan must declare:
68
68
  - stable section and plan identifiers;
@@ -54,7 +54,7 @@ Contract: [protocol/actions/research-gap.json](../../../actions/research-gap.jso
54
54
  - `standard`: run a focused, reproducible search across the most relevant categories;
55
55
  - `deep`: map foundational, recent, competing, gap-defining, and methodological work, including important disagreements and intellectual lineage.
56
56
  5. Form search questions and inclusion criteria before searching. Record databases or corpora, query strings, date, filters, and stopping rule.
57
- 6. Search authoritative scholarly sources only after disclosing and receiving approval for the external providers and bounded query set. When using the bundled dispatcher, `citation-search` may run with `--backend=cite-nexus` and an explicit `--providers` list after this gate. Returned results stay candidates, and this action performs no bibliography write. Deduplicate candidates by persistent identifier, then normalized title.
57
+ 6. Search authoritative scholarly sources with bounded queries. Two routes need no second per-query author gate: a host connection the operator already configured and authorized for read-only public scholarly metadata search, or the bundled CiteNexus dispatcher in a host session explicitly set to full-auto for this research action when every selected provider is a free, no-key public index (`crossref`, `datacite`, `europe_pmc`, or `arxiv`). Record provider IDs, query strings, date, and result limits in the research artifact. Do not send unpublished manuscript text, private notes, or credentials as search terms. Outside those routes, first disclose the providers and bounded query set and obtain explicit author approval. The dispatcher runs only `citation-search --backend=cite-nexus` with an explicit `--providers` list; honor an operator-set offline flag or any host refusal. Returned results stay candidates, and this action performs no bibliography write. Deduplicate candidates by persistent identifier, then normalized title.
58
58
  7. Verify each retained source from its primary record or publication. Create a `project://sources/{source}` record with title, creators, year, source kind, identifiers, citation key, status, provenance, inspection depth, and verification time.
59
59
  8. Read enough of each source to distinguish its actual claim, method, population, result, and limitation. Do not cite an abstract-only impression as full-paper evidence.
60
60
  9. Create `project://evidence/{evidence}` separately for each retained claim-level interpretation, with relation, locator, limitations, confidence, and inspection depth. Synthesize by question rather than listing papers; identify consensus, disagreement, methodological differences, missing evidence, and defensible positioning.
@@ -8,7 +8,7 @@ Contract: [protocol/actions/write-section.json](../../../actions/write-section.j
8
8
 
9
9
  1. Require an exact `project://sections/{section}/plans/{plan}` artifact linked from `project://sections/{section}` and verify its declared inputs, outputs, dependencies, validation, and approval state.
10
10
  2. If a corresponding summary or manuscript output exists, show the overwrite or merge impact and require explicit re-execution approval.
11
- 3. Read the plan, `project://manifest`, `project://state`, `project://decisions`, `project://structure/outline`, section context and research, relevant source/evidence records, and enough neighboring prose to maintain continuity.
11
+ 3. Read the plan, `project://manifest`, `project://state`, `project://decisions`, `project://structure/outline`, section context and research, relevant source/evidence records, and enough neighboring prose to maintain continuity. For a literature-heavy section, require research and verified source/evidence coverage of the plan's factual claims before drafting. Route missing coverage through `research-gap` and a checkpoint; do not substitute model memory or search candidates for source records.
12
12
  4. Present the plan objective, output path, target words, evidence obligations, and checkpoints at the configured writing gate.
13
13
  5. Execute tasks in order against the exact `project://paper/{artifact}` output. For each task:
14
14
  - establish the paragraph or subsection's rhetorical job;
@@ -31,6 +31,6 @@ Run it with no argument, or with `list`, to print the declared command set as JS
31
31
  - `s2-search --query=<text> [--limit=<1-25>] [--year=<yyyy>] [--timeout=<seconds>]` → `citation.semantic-scholar` (network.fetch, network.search)
32
32
  - `rank <papers.json> [--intent=<seminal|recent|balanced>]` → `citation.rank` (no declared effects)
33
33
 
34
- 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.
34
+ 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.
35
35
 
36
36
  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.
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -24,8 +24,9 @@ Manuscript prose and supporting context, research, plan, review, summary, handof
24
24
  1. Resolve one section record, load its linked context, research, evidence, decisions, and outline constraints, and enumerate the bounded `project://validations/*` collection before any specialist dispatch.
25
25
  2. Filter those records to candidates whose `subject_uri` is exactly `project://structure/outline` and whose `action_id` is exactly `create-outline`. A candidate is current only when `executed_at >= outline.updated_at`. Because the v1 validation schema carries no outline revision or content hash, disclose that this timestamp test is a conservative freshness proxy.
26
26
  3. Require exactly one current candidate and require its `status` to be `passed`. Separately verify that the current outline and target section are consistent with all current locked and deferred author choices: honor locked choices and do not treat deferred choices as resolved. A missing, stale, ambiguous, or non-passing candidate, or a decision contradiction, blocks all specialist dispatch and every plan, section, state, or validation write. Only a recovery checkpoint may be proposed on this blocked path, and it may be written only after a complete record preview and explicit author approval.
27
- 4. Only after those prerequisites pass, delegate a bounded plan to `section-planner`, then require a fresh `plan-checker` pass over claim coverage, dependencies, file scope, citations, and decision fidelity.
28
- 5. At confirm_plan, preview the plan and validation; on approval link the plan, update section status to planned, and reconcile state. Create a checkpoint for unresolved judgment instead of bypassing the required checker.
27
+ 4. For a literature-heavy section, first require a section-specific research artifact plus resolvable source/evidence records that cover the planned claims. If they are absent or insufficient, run `research-gap` with the configured CiteNexus backend when available, verify candidate metadata against the returned records, and stop planning with an explicit research checkpoint if evidence remains insufficient. Never invent citations or treat search candidates as verified sources.
28
+ 5. Only after those prerequisites pass, delegate a bounded plan to `section-planner`, then require a fresh `plan-checker` pass over claim coverage, dependencies, file scope, citations, and decision fidelity. Dispatch the exact WTF-P specialist roles; generic coder and verifier roles do not satisfy this workflow.
29
+ 6. At confirm_plan, preview the plan and validation; on approval link the plan, update section status to planned, and reconcile state. Create a checkpoint for unresolved judgment instead of bypassing the required checker.
29
30
 
30
31
  ## Safety and completion
31
32
 
@@ -22,7 +22,7 @@ Manuscript prose and supporting context, research, plan, review, summary, handof
22
22
  ## Procedure
23
23
 
24
24
  1. Resolve the research question and section scope against locked/deferred decisions; agree on depth and source constraints.
25
- 2. Search declared scholarly services only after the gate names the providers and bounded query set. When using the bundled dispatcher, `citation-search` may run with `--backend=cite-nexus` and an explicit `--providers` list after this gate. Returned results stay candidates, and this action performs no bibliography write. Verify source identity and inspection depth, and separate source records from claim-level evidence.
25
+ 2. Prefer an operator-configured, trusted read-only CiteNexus MCP connection for bounded public metadata searches when the host has already authorized it. In an explicitly selected full-auto host session for this research action, the bundled CiteNexus dispatcher may also search the free no-key public indexes `crossref`, `datacite`, `europe_pmc`, and `arxiv` without a second per-query author gate; use only selected relevant indexes with an explicit `--providers` list. Record provider IDs, queries, date, and result limits; never send unpublished manuscript text or private notes as search terms. For any other route, first obtain explicit author approval naming the providers and bounded query set. Results remain candidates and this action performs no bibliography write. Verify source identity and inspection depth, and separate source records from claim-level evidence.
26
26
  3. Synthesize supported, conflicting, and missing evidence into a Markdown research artifact; link new records and disclose limitations.
27
27
 
28
28
  ## Bundled tool execution
@@ -33,7 +33,7 @@ The declared `tool.execute` effect authorises exactly one command, run from the
33
33
  node protocol://tools/wtfp-tool.js [--offline] <command> [arguments]
34
34
  ```
35
35
 
36
- Run it with `list` first to read the declared commands, their arguments, their bounds, and the effects each one applies; `protocol://tools/README.md` carries the same table. A command whose effects include `network.*` performs outbound requests. Until network use has been approved for this run, pass `--offline` (or set `WTFP_TOOL_OFFLINE=1`), which makes the dispatcher refuse those commands instead of relying on prose restraint. Never execute another module in this package, never pass a logical `project://` or `wtfp://` URI as a shell argument, and treat every returned record as candidate evidence until it is verified and written to a source or evidence record.
36
+ Run it with `list` first to read the declared commands, their arguments, their bounds, and the effects each one applies; `protocol://tools/README.md` carries the same table. A command whose effects include `network.*` performs outbound requests. Pass `--offline` (or set `WTFP_TOOL_OFFLINE=1`) until the provider/query gate is approved, except for this action's explicit full-auto public-index route. On that route omit `--offline` only for `citation-search --backend=cite-nexus` with bounded queries and `--providers` drawn from `crossref,datacite,europe_pmc,arxiv`; never override an operator-set offline flag or a host refusal. Never execute another module in this package, never pass a logical `project://` or `wtfp://` URI as a shell argument, and treat every returned record as candidate evidence until it is verified and written to a source or evidence record.
37
37
 
38
38
  ## Safety and completion
39
39
 
@@ -22,7 +22,7 @@ Manuscript prose and supporting context, research, plan, review, summary, handof
22
22
  ## Procedure
23
23
 
24
24
  1. Require one approved plan and resolve all linked context, research, source/evidence records, decisions, prior summary, existing target, and necessary neighboring prose before choosing create or update.
25
- 2. Draft only the declared manuscript artifact; cite only resolvable sources, preserve author constraints, and stop at blocking decisions.
25
+ 2. Before drafting a literature-heavy section, verify that its linked research artifact and source/evidence records cover the plan's factual claims. If coverage is missing, use the declared research workflow and pause at a checkpoint until verified records exist. Draft only the declared manuscript artifact; cite only resolvable sources, preserve author constraints, and stop at blocking decisions. A plausible bibliography entry, search candidate, or model memory is not a verified citation.
26
26
  3. Read the persisted manuscript text back and calculate its actual body word count with one deterministic method; never copy a worker self-report, plan target, or summary count into project records. Validate the persisted draft against its plan and word budget.
27
27
  4. Create or update the required Markdown summary with that measured count, then read back both manuscript and summary. Missing, empty, or inconsistent output is a failed completion condition, not permission to link a path that does not exist.
28
28
  5. Persist the validation, synchronize the manuscript URI in `manifest.artifacts.manuscripts`, and reconcile section/state records only after manuscript, summary, and validation readback succeeds. If blocked, create the declared checkpoint and stop; do not commit or merge automatically.
@@ -5,14 +5,14 @@
5
5
  },
6
6
  "metadata": {
7
7
  "description": "WTF-P evidence-grounded academic workflow plugin.",
8
- "version": "0.7.3"
8
+ "version": "0.7.4"
9
9
  },
10
10
  "plugins": [
11
11
  {
12
12
  "name": "wtfp",
13
13
  "source": "./",
14
14
  "description": "Portable academic research and writing workflows.",
15
- "version": "0.7.3",
15
+ "version": "0.7.4",
16
16
  "author": {
17
17
  "name": "akougkas"
18
18
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wtfp",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "description": "Portable academic research and writing workflows with stable wtfp actions.",
5
5
  "author": {
6
6
  "name": "akougkas",