wtf-p 0.3.0 → 0.5.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 (183) hide show
  1. package/README.md +146 -208
  2. package/bin/commands/doctor.js +88 -2
  3. package/bin/commands/install-logic.js +127 -36
  4. package/bin/commands/status.js +22 -4
  5. package/bin/commands/update.js +5 -4
  6. package/bin/install.js +66 -26
  7. package/bin/lib/analyze-impact.js +105 -0
  8. package/bin/lib/bib-format.js +161 -0
  9. package/bin/lib/bib-index.js +104 -0
  10. package/bin/lib/checkpoint.js +183 -0
  11. package/bin/lib/citation-fetcher.js +299 -0
  12. package/bin/lib/citation-ranker.js +133 -0
  13. package/bin/lib/context-primer.js +214 -0
  14. package/bin/lib/manifest.js +80 -2
  15. package/bin/lib/scholar-lookup.js +188 -0
  16. package/bin/lib/semantic-scholar.js +184 -0
  17. package/bin/lib/utils.js +22 -1
  18. package/bin/uninstall.js +270 -111
  19. package/core/write-the-f-paper/references/agent-model-matrix.md +62 -0
  20. package/core/write-the-f-paper/references/checkpoints.md +160 -9
  21. package/core/write-the-f-paper/references/context-fidelity.md +153 -0
  22. package/core/write-the-f-paper/references/deviation-rules.md +150 -0
  23. package/core/write-the-f-paper/references/git-integration.md +80 -0
  24. package/core/write-the-f-paper/references/orchestrator-pattern.md +167 -0
  25. package/core/write-the-f-paper/references/planning-config.md +135 -0
  26. package/core/write-the-f-paper/references/ui-brand.md +186 -0
  27. package/core/write-the-f-paper/templates/UAT.md +80 -0
  28. package/core/write-the-f-paper/templates/base-prefs.yaml +42 -0
  29. package/core/write-the-f-paper/templates/config.json +31 -5
  30. package/core/write-the-f-paper/workflows/create-outline.wcn.md +1 -1
  31. package/core/write-the-f-paper/workflows/execute-outline.md +163 -0
  32. package/core/write-the-f-paper/workflows/execute-outline.wcn.md +73 -0
  33. package/core/write-the-f-paper/workflows/execute-section.wcn.md +141 -169
  34. package/core/write-the-f-paper/workflows/plan-section.wcn.md +96 -103
  35. package/core/write-the-f-paper/workflows/research-gap.md +27 -3
  36. package/core/write-the-f-paper/workflows/research-gap.wcn.md +18 -1
  37. package/core/write-the-f-paper/workflows/verify-work.md +251 -0
  38. package/core/write-the-f-paper/workflows/verify-work.wcn.md +74 -0
  39. package/package.json +19 -7
  40. package/vendors/claude/.claude-plugin/plugin.json +2 -2
  41. package/vendors/claude/agents/wtfp/argument-verifier.md +189 -0
  42. package/vendors/claude/agents/wtfp/citation-expert.md +45 -0
  43. package/vendors/claude/agents/wtfp/citation-formatter.md +42 -0
  44. package/vendors/claude/agents/wtfp/coherence-checker.md +167 -0
  45. package/vendors/claude/agents/wtfp/outliner.md +259 -0
  46. package/vendors/claude/agents/wtfp/plan-checker.md +249 -0
  47. package/vendors/claude/agents/wtfp/prose-polisher.md +166 -0
  48. package/vendors/claude/agents/wtfp/research-synthesizer.md +215 -0
  49. package/vendors/claude/agents/wtfp/section-planner.md +364 -0
  50. package/vendors/claude/agents/wtfp/section-reviewer.md +182 -0
  51. package/vendors/claude/agents/wtfp/section-writer.md +312 -0
  52. package/vendors/claude/commands/wtfp/add-todo.md +108 -0
  53. package/vendors/claude/commands/wtfp/analyze-bib.md +60 -249
  54. package/vendors/claude/commands/wtfp/audit-milestone.md +286 -0
  55. package/vendors/claude/commands/wtfp/check-refs.md +60 -131
  56. package/vendors/claude/commands/wtfp/check-todos.md +152 -0
  57. package/vendors/claude/commands/wtfp/checkpoint.md +105 -0
  58. package/vendors/claude/commands/wtfp/contribute.md +1 -1
  59. package/vendors/claude/commands/wtfp/create-outline.md +109 -195
  60. package/vendors/claude/commands/wtfp/create-poster.md +1 -1
  61. package/vendors/claude/commands/wtfp/create-slides.md +1 -1
  62. package/vendors/claude/commands/wtfp/discuss-section.md +1 -1
  63. package/vendors/claude/commands/wtfp/execute-outline.md +257 -0
  64. package/vendors/claude/commands/wtfp/export-latex.md +1 -1
  65. package/vendors/claude/commands/wtfp/help.md +174 -280
  66. package/vendors/claude/commands/wtfp/insert-section.md +1 -1
  67. package/vendors/claude/commands/wtfp/list-assumptions.md +1 -1
  68. package/vendors/claude/commands/wtfp/map-project.md +35 -124
  69. package/vendors/claude/commands/wtfp/new-paper.md +88 -362
  70. package/vendors/claude/commands/wtfp/pause-writing.md +1 -1
  71. package/vendors/claude/commands/wtfp/plan-milestone-gaps.md +255 -0
  72. package/vendors/claude/commands/wtfp/plan-revision.md +1 -1
  73. package/vendors/claude/commands/wtfp/plan-section.md +165 -190
  74. package/vendors/claude/commands/wtfp/polish-prose.md +66 -118
  75. package/vendors/claude/commands/wtfp/progress.md +82 -254
  76. package/vendors/claude/commands/wtfp/quick.md +107 -0
  77. package/vendors/claude/commands/wtfp/remove-section.md +1 -1
  78. package/vendors/claude/commands/wtfp/report-bug.md +1 -1
  79. package/vendors/claude/commands/wtfp/request-feature.md +1 -1
  80. package/vendors/claude/commands/wtfp/research-gap.md +138 -151
  81. package/vendors/claude/commands/wtfp/resume-writing.md +1 -1
  82. package/vendors/claude/commands/wtfp/review-section.md +55 -333
  83. package/vendors/claude/commands/wtfp/settings.md +197 -0
  84. package/vendors/claude/commands/wtfp/submit-milestone.md +248 -99
  85. package/vendors/claude/commands/wtfp/update.md +112 -0
  86. package/vendors/claude/commands/wtfp/verify-work.md +254 -0
  87. package/vendors/claude/commands/wtfp/write-section.md +144 -180
  88. package/vendors/claude/mcp/research-server/package.json +13 -0
  89. package/vendors/claude/mcp/research-server/src/index.js +133 -0
  90. package/vendors/gemini/agents/wtfp/argument-verifier.md +184 -0
  91. package/vendors/gemini/agents/wtfp/citation-expert.md +41 -0
  92. package/vendors/gemini/agents/wtfp/citation-formatter.md +38 -0
  93. package/vendors/gemini/agents/wtfp/coherence-checker.md +162 -0
  94. package/vendors/gemini/agents/wtfp/outliner.md +252 -0
  95. package/vendors/gemini/agents/wtfp/plan-checker.md +244 -0
  96. package/vendors/gemini/agents/wtfp/prose-polisher.md +158 -0
  97. package/vendors/gemini/agents/wtfp/research-synthesizer.md +205 -0
  98. package/vendors/gemini/agents/wtfp/section-planner.md +355 -0
  99. package/vendors/gemini/agents/wtfp/section-reviewer.md +175 -0
  100. package/vendors/gemini/agents/wtfp/section-writer.md +304 -0
  101. package/vendors/gemini/commands/wtfp/add-todo.toml +102 -0
  102. package/vendors/gemini/commands/wtfp/analyze-bib.toml +126 -0
  103. package/vendors/gemini/commands/wtfp/audit-milestone.toml +278 -0
  104. package/vendors/gemini/commands/wtfp/check-refs.toml +123 -0
  105. package/vendors/gemini/commands/wtfp/check-todos.toml +145 -0
  106. package/vendors/gemini/commands/wtfp/checkpoint.toml +96 -0
  107. package/vendors/gemini/commands/wtfp/contribute.toml +269 -0
  108. package/vendors/gemini/commands/wtfp/create-outline.toml +180 -0
  109. package/vendors/gemini/commands/wtfp/create-poster.toml +36 -0
  110. package/vendors/gemini/commands/wtfp/create-slides.toml +35 -0
  111. package/vendors/gemini/commands/wtfp/discuss-section.toml +62 -0
  112. package/vendors/gemini/commands/wtfp/execute-outline.toml +247 -0
  113. package/vendors/gemini/commands/wtfp/export-latex.toml +209 -0
  114. package/vendors/gemini/commands/wtfp/help.toml +184 -0
  115. package/vendors/gemini/commands/wtfp/insert-section.toml +123 -0
  116. package/vendors/gemini/commands/wtfp/list-assumptions.toml +104 -0
  117. package/vendors/gemini/commands/wtfp/map-project.toml +99 -0
  118. package/vendors/gemini/commands/wtfp/new-paper.toml +160 -0
  119. package/vendors/gemini/commands/wtfp/pause-writing.toml +140 -0
  120. package/vendors/gemini/commands/wtfp/plan-milestone-gaps.toml +249 -0
  121. package/vendors/gemini/commands/wtfp/plan-revision.toml +171 -0
  122. package/vendors/gemini/commands/wtfp/plan-section.toml +212 -0
  123. package/vendors/gemini/commands/wtfp/polish-prose.toml +114 -0
  124. package/vendors/gemini/commands/wtfp/progress.toml +145 -0
  125. package/vendors/gemini/commands/wtfp/quick.toml +96 -0
  126. package/vendors/gemini/commands/wtfp/remove-section.toml +140 -0
  127. package/vendors/gemini/commands/wtfp/report-bug.toml +126 -0
  128. package/vendors/gemini/commands/wtfp/request-feature.toml +155 -0
  129. package/vendors/gemini/commands/wtfp/research-gap.toml +214 -0
  130. package/vendors/gemini/commands/wtfp/resume-writing.toml +136 -0
  131. package/vendors/gemini/commands/wtfp/review-section.toml +121 -0
  132. package/vendors/gemini/commands/wtfp/settings.toml +191 -0
  133. package/vendors/gemini/commands/wtfp/submit-milestone.toml +351 -0
  134. package/vendors/gemini/commands/wtfp/update.toml +107 -0
  135. package/vendors/gemini/commands/wtfp/verify-work.toml +245 -0
  136. package/vendors/gemini/commands/wtfp/write-section.toml +228 -0
  137. package/vendors/opencode/agents/wtfp/argument-verifier.md +184 -0
  138. package/vendors/opencode/agents/wtfp/citation-expert.md +41 -0
  139. package/vendors/opencode/agents/wtfp/citation-formatter.md +38 -0
  140. package/vendors/opencode/agents/wtfp/coherence-checker.md +162 -0
  141. package/vendors/opencode/agents/wtfp/outliner.md +252 -0
  142. package/vendors/opencode/agents/wtfp/plan-checker.md +244 -0
  143. package/vendors/opencode/agents/wtfp/prose-polisher.md +158 -0
  144. package/vendors/opencode/agents/wtfp/research-synthesizer.md +205 -0
  145. package/vendors/opencode/agents/wtfp/section-planner.md +355 -0
  146. package/vendors/opencode/agents/wtfp/section-reviewer.md +175 -0
  147. package/vendors/opencode/agents/wtfp/section-writer.md +304 -0
  148. package/vendors/opencode/commands/wtfp/add-todo.md +103 -0
  149. package/vendors/opencode/commands/wtfp/analyze-bib.md +127 -0
  150. package/vendors/opencode/commands/wtfp/audit-milestone.md +279 -0
  151. package/vendors/opencode/commands/wtfp/check-refs.md +124 -0
  152. package/vendors/opencode/commands/wtfp/check-todos.md +146 -0
  153. package/vendors/opencode/commands/wtfp/checkpoint.md +97 -0
  154. package/vendors/opencode/commands/wtfp/contribute.md +266 -0
  155. package/vendors/opencode/commands/wtfp/create-outline.md +181 -0
  156. package/vendors/opencode/commands/wtfp/create-poster.md +37 -0
  157. package/vendors/opencode/commands/wtfp/create-slides.md +36 -0
  158. package/vendors/opencode/commands/wtfp/discuss-section.md +63 -0
  159. package/vendors/opencode/commands/wtfp/execute-outline.md +248 -0
  160. package/vendors/opencode/commands/wtfp/export-latex.md +210 -0
  161. package/vendors/opencode/commands/wtfp/help.md +185 -0
  162. package/vendors/opencode/commands/wtfp/insert-section.md +124 -0
  163. package/vendors/opencode/commands/wtfp/list-assumptions.md +105 -0
  164. package/vendors/opencode/commands/wtfp/map-project.md +100 -0
  165. package/vendors/opencode/commands/wtfp/new-paper.md +161 -0
  166. package/vendors/opencode/commands/wtfp/pause-writing.md +141 -0
  167. package/vendors/opencode/commands/wtfp/plan-milestone-gaps.md +250 -0
  168. package/vendors/opencode/commands/wtfp/plan-revision.md +174 -0
  169. package/vendors/opencode/commands/wtfp/plan-section.md +214 -0
  170. package/vendors/opencode/commands/wtfp/polish-prose.md +115 -0
  171. package/vendors/opencode/commands/wtfp/progress.md +146 -0
  172. package/vendors/opencode/commands/wtfp/quick.md +97 -0
  173. package/vendors/opencode/commands/wtfp/remove-section.md +141 -0
  174. package/vendors/opencode/commands/wtfp/report-bug.md +127 -0
  175. package/vendors/opencode/commands/wtfp/request-feature.md +156 -0
  176. package/vendors/opencode/commands/wtfp/research-gap.md +215 -0
  177. package/vendors/opencode/commands/wtfp/resume-writing.md +137 -0
  178. package/vendors/opencode/commands/wtfp/review-section.md +123 -0
  179. package/vendors/opencode/commands/wtfp/settings.md +192 -0
  180. package/vendors/opencode/commands/wtfp/submit-milestone.md +352 -0
  181. package/vendors/opencode/commands/wtfp/update.md +108 -0
  182. package/vendors/opencode/commands/wtfp/verify-work.md +246 -0
  183. package/vendors/opencode/commands/wtfp/write-section.md +228 -0
package/README.md CHANGED
@@ -1,264 +1,209 @@
1
1
  <div align="center">
2
2
 
3
+ <img src="https://raw.githubusercontent.com/akougkas/wtf-p/main/assets/wtfp-banner.jpg" alt="WTF-P Banner" width="600">
4
+
3
5
  # WTF-P
4
6
 
5
- **Write The Freaking...**
6
- - **P**aper
7
- - **P**roposal
8
- - **P**resentation
9
- - **P**oster
7
+ **Write The F\*\*\*ing Paper.**
10
8
 
11
- **Context engineering for academic writing with Claude Code.**
9
+ Also: Proposal. Presentation. Poster.
12
10
 
13
11
  ```bash
14
12
  npx wtf-p
15
13
  ```
16
14
 
15
+ *Academic writing commands for [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [Gemini CLI](https://github.com/google-gemini/gemini-cli), and [OpenCode](https://github.com/opencode-ai/opencode).*
16
+
17
17
  </div>
18
18
 
19
19
  ---
20
20
 
21
21
  ## What This Does
22
22
 
23
- WTF-P turns Claude Code into a structured academic writing system. Instead of chatting with AI and hoping for the best, you get:
24
-
25
- - **Spec-driven writing** — Define your paper's vision, then execute section by section
26
- - **Grounded output** — BibTeX integration, citation mapping, no hallucinated references
27
- - **State management** — Pause, resume, track progress across sessions
28
- - **Venue templates** — ACM, IEEE, Nature, arXiv-ML structures built in
29
-
30
- The philosophy: **context engineering beats prompt engineering**. The files you prepare matter more than what you type.
23
+ WTF-P installs structured commands into your AI coding assistant that turn it into an academic writing system. You get spec-driven workflows, citation grounding, section isolation, and quality verification — not just "write me a paper." Every section is planned before it's written, verified after, and grounded in your actual BibTeX sources.
31
24
 
32
25
  ---
33
26
 
34
27
  ## Quick Start
35
28
 
36
29
  ```bash
37
- npx wtf-p
38
- ```
39
-
40
- Then in Claude Code:
41
-
42
- ```bash
43
- /wtfp:new-paper # Define your paper
44
- /wtfp:create-outline # Build the structure
45
- /wtfp:plan-section 1 # Plan first section
46
- /wtfp:write-section # Execute the plan
47
- ```
48
-
49
- Run `/wtfp:help` for the full command reference.
50
-
51
- <details>
52
- <summary><strong>Installation Options</strong></summary>
53
-
54
- ```bash
55
- # Global install (recommended)
56
- npx wtf-p --global
57
-
58
- # Local to current project
59
- npx wtf-p --local
60
-
61
- # Custom Claude config directory
62
- npx wtf-p --global --config-dir ~/research/.claude
63
-
64
- # Check installation status
65
- npx wtf-p status
66
-
67
- # Diagnose issues
68
- npx wtf-p doctor
69
- ```
70
- </details>
71
-
72
- <details>
73
- <summary><strong>Upgrading</strong></summary>
74
-
75
- ```bash
76
- # Update existing installation
77
- npx wtf-p update
78
-
79
- # Or reinstall with conflict handling
80
- npx wtf-p --global # Interactive: prompts for conflicts
81
- npx wtf-p --global --force # Overwrite everything
82
- npx wtf-p --global --backup-all # Backup before overwriting
30
+ npx wtf-p # Install commands (Claude Code by default)
83
31
  ```
84
- </details>
85
32
 
86
- <details>
87
- <summary><strong>Uninstalling</strong></summary>
33
+ Then in your AI assistant:
88
34
 
89
35
  ```bash
90
- npx wtf-p-uninstall --global
91
- npx wtf-p-uninstall --global --dry-run # Preview first
36
+ /wtfp:new-paper # Guided interview about your research
37
+ /wtfp:create-outline # Build section structure + word budgets
38
+ /wtfp:plan-section 1 # Plan first section
39
+ /wtfp:write-section # Write the section
92
40
  ```
93
41
 
94
- Only WTF-P files are removed. Your `CLAUDE.md` and other configs stay intact.
95
- </details>
42
+ Run `/wtfp:help` for the full command list.
96
43
 
97
44
  ---
98
45
 
99
- ## Why AI Writing Tools Fail Researchers
100
-
101
- Most researchers using AI for writing hit the same walls:
102
-
103
- | Problem | What Happens |
104
- |---------|--------------|
105
- | **Dump and pray** | Paste a PDF, ask for a lit review, get hallucinated citations |
106
- | **No verification layer** | AI sounds confident, but claims aren't grounded in your actual sources |
107
- | **Monolithic approach** | Try to write 10k words at once, context window fills, quality degrades |
108
- | **No structure** | Generic AI doesn't know IMRaD from a blog post |
109
-
110
- WTF-P solves these by treating academic writing as a **specification problem**, not a generation problem.
111
-
112
- ---
113
-
114
- ## The Approach: Context Engineering
115
-
116
- The insight behind WTF-P: **what you prepare matters more than what you prompt**.
117
-
118
- ### 1. Specification First
46
+ ## Runtime Support
119
47
 
120
- Before any writing, WTF-P interviews you to extract:
121
- - Research questions and hypotheses
122
- - Core argument structure
123
- - Evidence and data inventory
124
- - Target venue requirements
48
+ | Runtime | Commands | Agents | Extras |
49
+ |---------|----------|--------|--------|
50
+ | **Claude Code** | 36 | 11 | Skills, MCP server, plugin manifest |
51
+ | **Gemini CLI** | 36 | 11 | — |
52
+ | **OpenCode** | 36 | 11 | — |
125
53
 
126
- This becomes your `PROJECT.md` — the grounding document that keeps every section aligned.
127
-
128
- ### 2. Hierarchical Planning
129
-
130
- Papers aren't written in one shot. WTF-P breaks them down:
131
-
132
- ```
133
- Paper Vision → Section Outline → Section Plan → Paragraph Execution
54
+ ```bash
55
+ npx wtf-p --global # Claude Code (default)
56
+ npx wtf-p --global --gemini # Gemini CLI
57
+ npx wtf-p --global --opencode # OpenCode
134
58
  ```
135
59
 
136
- Each level has its own document. Each document is version-controlled. You always know where you are.
137
-
138
- ### 3. Isolated Execution
139
-
140
- When writing a section, WTF-P spawns a fresh context with only what's needed:
141
- - The paper vision
142
- - That section's plan
143
- - Relevant citations from your BibTeX
144
- - Prior sections for continuity
145
-
146
- No context pollution. No degradation over long documents.
147
-
148
- ### 4. Human Verification
149
-
150
- AI drafts. Humans verify. Every section goes through:
151
- - Citation audit (are these real? are they relevant?)
152
- - Argument check (does this follow from the evidence?)
153
- - Rubric validation (does this meet venue requirements?)
154
-
155
- The system flags issues. You fix them. Iterate until solid.
156
-
157
60
  ---
158
61
 
159
- ## The Workflow
160
-
161
- ### Starting Fresh
62
+ ## Installation
162
63
 
163
64
  ```bash
164
- /wtfp:new-paper # Deep interview about your research
165
- /wtfp:create-outline # Generate section structure + word budgets
166
- ```
167
-
168
- Creates `.planning/` with your paper's specification:
169
- - `PROJECT.md` — Vision, requirements, constraints
170
- - `ROADMAP.md` — Section breakdown with status
171
- - `STATE.md` — Writing progress and context
65
+ # Default: install to Claude Code
66
+ npx wtf-p
172
67
 
173
- ### Writing Sections
68
+ # Global install (recommended — persists across projects)
69
+ npx wtf-p --global
174
70
 
175
- ```bash
176
- /wtfp:plan-section 1 # Create detailed plan for section 1
177
- /wtfp:write-section # Execute the plan
178
- /wtfp:progress # Check status, get next action
179
- ```
71
+ # Local to current project only
72
+ npx wtf-p --local
180
73
 
181
- Each section gets its own planning documents. Plans are explicit — you see exactly what Claude intends before it writes.
74
+ # Specify a custom config directory
75
+ npx wtf-p --global --config-dir ~/research/.claude
182
76
 
183
- ### Review and Polish
77
+ # Check what's installed
78
+ npx wtf-p status
184
79
 
185
- ```bash
186
- /wtfp:review-section 1 # Three-layer verification
187
- /wtfp:polish-prose # Remove AI-speak, improve flow
188
- /wtfp:check-refs # BibTeX audit
80
+ # Diagnose issues
81
+ npx wtf-p doctor
189
82
  ```
190
83
 
191
- ### Export
84
+ ### Upgrading
192
85
 
193
86
  ```bash
194
- /wtfp:export-latex # Generate .tex with proper formatting
87
+ npx wtf-p update # Check for newer version
88
+ npx wtf-p --global # Reinstall (prompts on conflicts)
89
+ npx wtf-p --global --force # Overwrite everything
90
+ npx wtf-p --global --backup-all # Backup before overwriting
195
91
  ```
196
92
 
197
- ---
198
-
199
- ## Reviving Stalled Projects
200
-
201
- Got a half-finished paper? WTF-P can work with existing material.
93
+ ### Uninstalling
202
94
 
203
95
  ```bash
204
- /wtfp:map-project # Index your existing files
205
- /wtfp:new-paper # Initialize with awareness of prior work
96
+ npx wtf-p-uninstall --global
97
+ npx wtf-p-uninstall --global --dry-run # Preview what would be removed
206
98
  ```
207
99
 
208
- The mapping phase analyzes:
209
- - Existing drafts and their state
210
- - Your BibTeX and how citations are used
211
- - Data files and figures
212
- - What's missing vs. what's done
100
+ Only WTF-P files are removed. Your config files and other tools stay intact.
213
101
 
214
102
  ---
215
103
 
216
104
  ## Command Reference
217
105
 
218
106
  ### Setup
107
+
219
108
  | Command | Purpose |
220
109
  |---------|---------|
221
- | `/wtfp:new-paper` | Initialize paper with deep context gathering |
222
- | `/wtfp:create-outline` | Generate section structure |
223
- | `/wtfp:map-project` | Index existing project materials |
224
- | `/wtfp:analyze-bib` | Deep analysis of your bibliography |
110
+ | `/wtfp:new-paper` | Guided interview to define your paper's vision and requirements |
111
+ | `/wtfp:create-outline` | Build section structure, argument map, and word budgets |
112
+ | `/wtfp:map-project` | Index existing drafts, data, and references |
113
+ | `/wtfp:analyze-bib` | Analyze bibliography and map citations to sections |
225
114
 
226
115
  ### Planning
116
+
227
117
  | Command | Purpose |
228
118
  |---------|---------|
229
- | `/wtfp:discuss-section [N]` | Articulate vision before planning |
230
- | `/wtfp:plan-section [N]` | Create execution plan |
231
- | `/wtfp:list-assumptions [N]` | See what Claude plans to write |
232
- | `/wtfp:research-gap [N]` | Literature analysis for a section |
119
+ | `/wtfp:discuss-section [N]` | Discuss your vision for a section before planning |
120
+ | `/wtfp:plan-section [N]` | Create detailed writing plan with quality validation |
121
+ | `/wtfp:list-assumptions [N]` | Preview intended approach before writing |
122
+ | `/wtfp:research-gap [N]` | Research literature for a section (tiered: Semantic Scholar, Google Scholar, CrossRef) |
233
123
 
234
124
  ### Writing
125
+
235
126
  | Command | Purpose |
236
127
  |---------|---------|
237
- | `/wtfp:write-section` | Execute a plan |
238
- | `/wtfp:progress` | Status + intelligent next action |
239
- | `/wtfp:pause-writing` | Save state for later |
240
- | `/wtfp:resume-writing` | Restore context and continue |
128
+ | `/wtfp:write-section` | Execute a section plan with agent-based writing |
129
+ | `/wtfp:execute-outline` | Write all sections in parallel, then check coherence |
130
+ | `/wtfp:quick` | Minimal-ceremony writing for quick tasks |
131
+ | `/wtfp:progress` | Show writing progress and suggest next step |
132
+ | `/wtfp:pause-writing` | Save current progress for later |
133
+ | `/wtfp:resume-writing` | Resume from a previous session |
241
134
 
242
135
  ### Review
136
+
243
137
  | Command | Purpose |
244
138
  |---------|---------|
245
- | `/wtfp:review-section [N]` | Three-layer verification |
246
- | `/wtfp:plan-revision [N]` | Create fix plan from issues |
247
- | `/wtfp:polish-prose` | Improve readability |
248
- | `/wtfp:check-refs` | Citation audit |
139
+ | `/wtfp:review-section [N]` | Review for citations, coherence, and venue requirements |
140
+ | `/wtfp:verify-work [N]` | Acceptance-test a section against its plan |
141
+ | `/wtfp:plan-revision [N]` | Create revision plan from review issues |
142
+ | `/wtfp:polish-prose` | Improve clarity, flow, and academic voice |
143
+ | `/wtfp:check-refs` | Audit BibTeX for missing, duplicate, or broken references |
144
+
145
+ ### Structure
249
146
 
250
- ### Export
251
147
  | Command | Purpose |
252
148
  |---------|---------|
253
- | `/wtfp:export-latex` | Generate .tex output |
254
- | `/wtfp:submit-milestone` | Archive submission version |
149
+ | `/wtfp:create-poster` | Full poster creation workflow |
150
+ | `/wtfp:create-slides` | Presentation deck workflow |
151
+ | `/wtfp:insert-section` | Add a new section to the outline |
152
+ | `/wtfp:remove-section` | Remove a section from the outline |
153
+
154
+ ### Export & Submission
255
155
 
256
- ### Contributing
257
156
  | Command | Purpose |
258
157
  |---------|---------|
259
- | `/wtfp:report-bug` | File a GitHub issue |
260
- | `/wtfp:request-feature` | Request new functionality |
261
- | `/wtfp:contribute` | Submit a pull request |
158
+ | `/wtfp:export-latex` | Export to LaTeX with bibliography and formatting |
159
+ | `/wtfp:audit-milestone` | Pre-submission checks on sections, citations, and word counts |
160
+ | `/wtfp:plan-milestone-gaps` | Create fix plans for gaps found by audit |
161
+ | `/wtfp:submit-milestone` | Archive a completed draft or submission version |
162
+
163
+ ### Settings & Productivity
164
+
165
+ | Command | Purpose |
166
+ |---------|---------|
167
+ | `/wtfp:settings` | View and edit project settings interactively |
168
+ | `/wtfp:checkpoint` | Save, restore, and list paper state checkpoints |
169
+ | `/wtfp:add-todo` | Capture a quick note or task without breaking flow |
170
+ | `/wtfp:check-todos` | Review pending todos (act, defer, dismiss) |
171
+ | `/wtfp:update` | Check for updates and install newer version |
172
+
173
+ ### Help & Contributing
174
+
175
+ | Command | Purpose |
176
+ |---------|---------|
177
+ | `/wtfp:help` | Full command reference |
178
+ | `/wtfp:report-bug` | Report a bug via GitHub issue |
179
+ | `/wtfp:request-feature` | Request a new feature via GitHub issue |
180
+ | `/wtfp:contribute` | Walk through contributing code via pull request |
181
+
182
+ ---
183
+
184
+ ## Configuration
185
+
186
+ WTF-P uses a `config.json` in your `.planning/` directory. Key settings:
187
+
188
+ ```jsonc
189
+ {
190
+ "model_profile": "balanced", // "quality" | "balanced" | "budget"
191
+ "workflow": {
192
+ "research": true, // Enable research phase
193
+ "plan_check": true, // Pre-write plan validation
194
+ "verifier": true // Post-write verification
195
+ },
196
+ "parallelization": {
197
+ "enabled": false, // Parallel section writing
198
+ "max_concurrent_agents": 3
199
+ }
200
+ }
201
+ ```
202
+
203
+ **Model profiles** route 11 specialized agents to appropriate models:
204
+ - **quality** — best models for all agents (slower, higher cost)
205
+ - **balanced** — strong models for writing, lighter for validation (default)
206
+ - **budget** — fastest models everywhere (good for iteration)
262
207
 
263
208
  ---
264
209
 
@@ -274,50 +219,43 @@ The mapping phase analyzes:
274
219
 
275
220
  ---
276
221
 
277
- ## WCN Mode (Reduced Tokens)
222
+ ## How It Works
223
+
224
+ WTF-P follows a **thin orchestrator → specialized agent → quality loop** architecture:
278
225
 
279
- For smaller models or limited context windows, WTF-P includes compressed workflows:
226
+ 1. **Specification first** — `/wtfp:new-paper` interviews you to extract research questions, argument structure, evidence inventory, and venue requirements into a `PROJECT.md`.
227
+ 2. **Hierarchical planning** — Papers break down: Paper Vision → Section Outline → Section Plan → Paragraph Execution. Each level has its own document.
228
+ 3. **Isolated execution** — Each section is written in a fresh context containing only the paper vision, that section's plan, relevant citations, and prior sections. No context pollution.
229
+ 4. **Quality loops** — Pre-write plan validation (7 dimensions, up to 3 revisions) and post-write goal-backward verification ensure claims match plans and evidence.
230
+
231
+ ### WCN Mode (Reduced Tokens)
232
+
233
+ For smaller models or limited context windows, WTF-P includes compressed workflows with 35-50% token reduction:
280
234
 
281
235
  ```bash
282
236
  ./tools/wcn/swap-workflows.sh wcn # Switch to compressed
283
- ./tools/wcn/swap-workflows.sh verbose # Switch back
237
+ ./tools/wcn/swap-workflows.sh verbose # Switch back
284
238
  ```
285
239
 
286
- 35-50% token reduction with equivalent output quality. Verified on Claude Haiku and Sonnet.
287
-
288
240
  ---
289
241
 
290
242
  ## Origin
291
243
 
292
- WTF-P was built at the [Gnosis Research Center](https://www.intelli-gnosis.com/) at Illinois Tech.
293
-
294
- The problem: research teams with grants to win, papers to publish, and no time to waste on writer's block. Existing AI tools either hallucinated citations or produced generic output that required complete rewrites.
295
-
296
- The solution: treat Claude Code as a **structured writing system**, not a chatbot. Give it proper context, explicit specifications, and verification layers. Let humans focus on ideas while AI handles the mechanical synthesis.
297
-
298
- The result: papers that ship.
244
+ Built at the [Gnosis Research Center](https://www.intelli-gnosis.com/) at Illinois Tech. The problem: research teams with grants to win, papers to publish, and no time for writer's block. The solution: treat your AI coding assistant as a structured writing system — proper context, explicit specs, verification layers.
299
245
 
300
246
  ---
301
247
 
302
- ## Contributing
248
+ ## Links
303
249
 
304
- Found a bug? Want a feature? WTF-P includes commands to help:
305
-
306
- ```bash
307
- /wtfp:report-bug # Creates a GitHub issue
308
- /wtfp:request-feature # Submits a feature request
309
- /wtfp:contribute # Guides you through a PR
310
- ```
311
-
312
- Or visit [github.com/akougkas/wtf-p](https://github.com/akougkas/wtf-p).
250
+ - [Changelog](CHANGELOG.md)
251
+ - [Contributing](CONTRIBUTING.md)
252
+ - [Roadmap](ROADMAP.md)
253
+ - [License](LICENSE) (MIT)
254
+ - [GitHub](https://github.com/akougkas/wtf-p)
313
255
 
314
256
  ---
315
257
 
316
- ## License
317
-
318
- MIT License. Open source, open science.
319
-
320
258
  <div align="center">
321
259
  <br>
322
- <strong>Stop staring at the cursor. Start shipping papers.</strong>
260
+ <strong>No more excuses. Ship the paper.</strong>
323
261
  </div>
@@ -6,7 +6,7 @@ async function runDoctor(options) {
6
6
  const { out, explicitConfigDir } = options;
7
7
  const c = out.colors;
8
8
 
9
- out.log(` ${c.yellow('WTF-P Installation Doctor')}\n`);
9
+ out.log(` ${c.yellow('WTF-P Health Check')}\n`);
10
10
 
11
11
  const issues = [];
12
12
  const checks = [];
@@ -71,6 +71,92 @@ async function runDoctor(options) {
71
71
  checks.push({ name: 'CLAUDE_CONFIG_DIR', status: 'info', detail: 'Not set (using default)' });
72
72
  }
73
73
 
74
+ // Check 6: v0.5.0 components (agents, workflows, commands)
75
+ if (detection.hasCommands || detection.hasWorkflows) {
76
+ const v050Components = {
77
+ agents: [
78
+ 'coherence-checker.md',
79
+ 'section-writer.md',
80
+ 'section-planner.md',
81
+ 'argument-verifier.md'
82
+ ],
83
+ workflows: [
84
+ 'verify-work.md',
85
+ 'execute-outline.md'
86
+ ],
87
+ commands: [
88
+ 'verify-work.md',
89
+ 'execute-outline.md',
90
+ 'settings.md',
91
+ 'add-todo.md',
92
+ 'check-todos.md',
93
+ 'update.md',
94
+ 'audit-milestone.md',
95
+ 'plan-milestone-gaps.md'
96
+ ]
97
+ };
98
+
99
+ // Note: After install, agents/workflows/commands are all under globalDir
100
+ // The installer copies from vendors/ and core/ into the config directory
101
+ const agentsDir = path.join(globalDir, 'agents', 'wtfp');
102
+ const workflowsDir = path.join(globalDir, 'write-the-f-paper', 'workflows');
103
+ const commandsDir = path.join(globalDir, 'commands', 'wtfp');
104
+
105
+ let missingAgents = [];
106
+ let missingWorkflows = [];
107
+ let missingCommands = [];
108
+
109
+ if (fs.existsSync(agentsDir)) {
110
+ for (const agent of v050Components.agents) {
111
+ if (!fs.existsSync(path.join(agentsDir, agent))) {
112
+ missingAgents.push(agent);
113
+ }
114
+ }
115
+ }
116
+
117
+ if (fs.existsSync(workflowsDir)) {
118
+ for (const wf of v050Components.workflows) {
119
+ if (!fs.existsSync(path.join(workflowsDir, wf))) {
120
+ missingWorkflows.push(wf);
121
+ }
122
+ }
123
+ }
124
+
125
+ if (fs.existsSync(commandsDir)) {
126
+ for (const cmd of v050Components.commands) {
127
+ if (!fs.existsSync(path.join(commandsDir, cmd))) {
128
+ missingCommands.push(cmd);
129
+ }
130
+ }
131
+ }
132
+
133
+ const totalMissing = missingAgents.length + missingWorkflows.length + missingCommands.length;
134
+ const totalChecked = v050Components.agents.length + v050Components.workflows.length + v050Components.commands.length;
135
+
136
+ if (totalMissing === 0) {
137
+ checks.push({ name: 'v0.5.0 components', status: 'pass', detail: `${totalChecked} files verified` });
138
+ } else if (totalMissing === totalChecked) {
139
+ checks.push({ name: 'v0.5.0 components', status: 'info', detail: 'Pre-v0.5.0 installation' });
140
+ } else {
141
+ issues.push(`Missing v0.5.0 components: ${missingAgents.concat(missingWorkflows, missingCommands).join(', ')}`);
142
+ checks.push({ name: 'v0.5.0 components', status: 'warn', detail: `${totalMissing} missing` });
143
+ }
144
+ }
145
+
146
+ // Check 7: Dual-installation conflict (global + local both present)
147
+ const localDir = path.join(process.cwd(), '.claude');
148
+ if (localDir !== globalDir) {
149
+ const localDetection = detectInstallation(localDir);
150
+ if (localDetection.hasCommands && detection.hasCommands) {
151
+ issues.push('WTF-P is installed both globally and locally — commands will appear twice');
152
+ checks.push({
153
+ name: 'Dual installation',
154
+ status: 'warn',
155
+ detail: `Found in both ${getPathLabel(globalDir, true)} and ./.claude`
156
+ });
157
+ }
158
+ }
159
+
74
160
  // Output results
75
161
  for (const check of checks) {
76
162
  let icon, color;
@@ -91,7 +177,7 @@ async function runDoctor(options) {
91
177
  out.log(` ${c.yellow('•')} ${issue}`);
92
178
  }
93
179
  out.log('');
94
- out.log(` ${c.dim('Run')} ${c.cyan('npx wtf-p --global --force')} ${c.dim('to reinstall')}\n`);
180
+ out.log(` ${c.dim('To fix, reinstall:')} ${c.cyan('npx wtf-p --global --force')}\n`);
95
181
  } else {
96
182
  out.log(` ${c.green('No issues found!')}\n`);
97
183
  }