wtf-p 0.4.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 (175) hide show
  1. package/README.md +146 -226
  2. package/bin/commands/doctor.js +88 -2
  3. package/bin/commands/install-logic.js +121 -26
  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/checkpoint.js +183 -0
  8. package/bin/lib/context-primer.js +214 -0
  9. package/bin/lib/manifest.js +62 -2
  10. package/bin/lib/utils.js +22 -1
  11. package/bin/uninstall.js +270 -111
  12. package/core/write-the-f-paper/references/agent-model-matrix.md +62 -0
  13. package/core/write-the-f-paper/references/checkpoints.md +160 -9
  14. package/core/write-the-f-paper/references/context-fidelity.md +153 -0
  15. package/core/write-the-f-paper/references/deviation-rules.md +150 -0
  16. package/core/write-the-f-paper/references/git-integration.md +80 -0
  17. package/core/write-the-f-paper/references/orchestrator-pattern.md +167 -0
  18. package/core/write-the-f-paper/references/planning-config.md +135 -0
  19. package/core/write-the-f-paper/references/ui-brand.md +186 -0
  20. package/core/write-the-f-paper/templates/UAT.md +80 -0
  21. package/core/write-the-f-paper/templates/base-prefs.yaml +42 -0
  22. package/core/write-the-f-paper/templates/config.json +31 -5
  23. package/core/write-the-f-paper/workflows/create-outline.wcn.md +1 -1
  24. package/core/write-the-f-paper/workflows/execute-outline.md +163 -0
  25. package/core/write-the-f-paper/workflows/execute-outline.wcn.md +73 -0
  26. package/core/write-the-f-paper/workflows/execute-section.wcn.md +141 -169
  27. package/core/write-the-f-paper/workflows/plan-section.wcn.md +96 -103
  28. package/core/write-the-f-paper/workflows/research-gap.md +27 -3
  29. package/core/write-the-f-paper/workflows/research-gap.wcn.md +18 -1
  30. package/core/write-the-f-paper/workflows/verify-work.md +251 -0
  31. package/core/write-the-f-paper/workflows/verify-work.wcn.md +74 -0
  32. package/package.json +19 -7
  33. package/vendors/claude/.claude-plugin/plugin.json +2 -2
  34. package/vendors/claude/agents/wtfp/argument-verifier.md +189 -0
  35. package/vendors/claude/agents/wtfp/citation-expert.md +1 -1
  36. package/vendors/claude/agents/wtfp/citation-formatter.md +1 -1
  37. package/vendors/claude/agents/wtfp/coherence-checker.md +167 -0
  38. package/vendors/claude/agents/wtfp/outliner.md +259 -0
  39. package/vendors/claude/agents/wtfp/plan-checker.md +249 -0
  40. package/vendors/claude/agents/wtfp/prose-polisher.md +166 -0
  41. package/vendors/claude/agents/wtfp/research-synthesizer.md +215 -0
  42. package/vendors/claude/agents/wtfp/section-planner.md +364 -0
  43. package/vendors/claude/agents/wtfp/section-reviewer.md +182 -0
  44. package/vendors/claude/agents/wtfp/section-writer.md +312 -0
  45. package/vendors/claude/commands/wtfp/add-todo.md +108 -0
  46. package/vendors/claude/commands/wtfp/analyze-bib.md +58 -236
  47. package/vendors/claude/commands/wtfp/audit-milestone.md +286 -0
  48. package/vendors/claude/commands/wtfp/check-refs.md +60 -133
  49. package/vendors/claude/commands/wtfp/check-todos.md +152 -0
  50. package/vendors/claude/commands/wtfp/checkpoint.md +105 -0
  51. package/vendors/claude/commands/wtfp/contribute.md +1 -1
  52. package/vendors/claude/commands/wtfp/create-outline.md +109 -195
  53. package/vendors/claude/commands/wtfp/create-poster.md +1 -1
  54. package/vendors/claude/commands/wtfp/create-slides.md +1 -1
  55. package/vendors/claude/commands/wtfp/discuss-section.md +1 -1
  56. package/vendors/claude/commands/wtfp/execute-outline.md +257 -0
  57. package/vendors/claude/commands/wtfp/export-latex.md +1 -1
  58. package/vendors/claude/commands/wtfp/help.md +174 -280
  59. package/vendors/claude/commands/wtfp/insert-section.md +1 -1
  60. package/vendors/claude/commands/wtfp/list-assumptions.md +1 -1
  61. package/vendors/claude/commands/wtfp/map-project.md +35 -124
  62. package/vendors/claude/commands/wtfp/new-paper.md +85 -320
  63. package/vendors/claude/commands/wtfp/pause-writing.md +1 -1
  64. package/vendors/claude/commands/wtfp/plan-milestone-gaps.md +255 -0
  65. package/vendors/claude/commands/wtfp/plan-revision.md +1 -1
  66. package/vendors/claude/commands/wtfp/plan-section.md +165 -190
  67. package/vendors/claude/commands/wtfp/polish-prose.md +66 -118
  68. package/vendors/claude/commands/wtfp/progress.md +82 -254
  69. package/vendors/claude/commands/wtfp/quick.md +107 -0
  70. package/vendors/claude/commands/wtfp/remove-section.md +1 -1
  71. package/vendors/claude/commands/wtfp/report-bug.md +1 -1
  72. package/vendors/claude/commands/wtfp/request-feature.md +1 -1
  73. package/vendors/claude/commands/wtfp/research-gap.md +138 -150
  74. package/vendors/claude/commands/wtfp/resume-writing.md +1 -1
  75. package/vendors/claude/commands/wtfp/review-section.md +55 -333
  76. package/vendors/claude/commands/wtfp/settings.md +197 -0
  77. package/vendors/claude/commands/wtfp/submit-milestone.md +248 -99
  78. package/vendors/claude/commands/wtfp/update.md +112 -0
  79. package/vendors/claude/commands/wtfp/verify-work.md +254 -0
  80. package/vendors/claude/commands/wtfp/write-section.md +144 -180
  81. package/vendors/gemini/agents/wtfp/argument-verifier.md +184 -0
  82. package/vendors/gemini/agents/wtfp/citation-expert.md +41 -0
  83. package/vendors/gemini/agents/wtfp/citation-formatter.md +38 -0
  84. package/vendors/gemini/agents/wtfp/coherence-checker.md +162 -0
  85. package/vendors/gemini/agents/wtfp/outliner.md +252 -0
  86. package/vendors/gemini/agents/wtfp/plan-checker.md +244 -0
  87. package/vendors/gemini/agents/wtfp/prose-polisher.md +158 -0
  88. package/vendors/gemini/agents/wtfp/research-synthesizer.md +205 -0
  89. package/vendors/gemini/agents/wtfp/section-planner.md +355 -0
  90. package/vendors/gemini/agents/wtfp/section-reviewer.md +175 -0
  91. package/vendors/gemini/agents/wtfp/section-writer.md +304 -0
  92. package/vendors/gemini/commands/wtfp/add-todo.toml +102 -0
  93. package/vendors/gemini/commands/wtfp/analyze-bib.toml +126 -0
  94. package/vendors/gemini/commands/wtfp/audit-milestone.toml +278 -0
  95. package/vendors/gemini/commands/wtfp/check-refs.toml +123 -0
  96. package/vendors/gemini/commands/wtfp/check-todos.toml +145 -0
  97. package/vendors/gemini/commands/wtfp/checkpoint.toml +96 -0
  98. package/vendors/gemini/commands/wtfp/contribute.toml +269 -0
  99. package/vendors/gemini/commands/wtfp/create-outline.toml +180 -0
  100. package/vendors/gemini/commands/wtfp/create-poster.toml +36 -0
  101. package/vendors/gemini/commands/wtfp/create-slides.toml +35 -0
  102. package/vendors/gemini/commands/wtfp/discuss-section.toml +62 -0
  103. package/vendors/gemini/commands/wtfp/execute-outline.toml +247 -0
  104. package/vendors/gemini/commands/wtfp/export-latex.toml +209 -0
  105. package/vendors/gemini/commands/wtfp/help.toml +184 -0
  106. package/vendors/gemini/commands/wtfp/insert-section.toml +123 -0
  107. package/vendors/gemini/commands/wtfp/list-assumptions.toml +104 -0
  108. package/vendors/gemini/commands/wtfp/map-project.toml +99 -0
  109. package/vendors/gemini/commands/wtfp/new-paper.toml +160 -0
  110. package/vendors/gemini/commands/wtfp/pause-writing.toml +140 -0
  111. package/vendors/gemini/commands/wtfp/plan-milestone-gaps.toml +249 -0
  112. package/vendors/gemini/commands/wtfp/plan-revision.toml +171 -0
  113. package/vendors/gemini/commands/wtfp/plan-section.toml +212 -0
  114. package/vendors/gemini/commands/wtfp/polish-prose.toml +114 -0
  115. package/vendors/gemini/commands/wtfp/progress.toml +145 -0
  116. package/vendors/gemini/commands/wtfp/quick.toml +96 -0
  117. package/vendors/gemini/commands/wtfp/remove-section.toml +140 -0
  118. package/vendors/gemini/commands/wtfp/report-bug.toml +126 -0
  119. package/vendors/gemini/commands/wtfp/request-feature.toml +155 -0
  120. package/vendors/gemini/commands/wtfp/research-gap.toml +214 -0
  121. package/vendors/gemini/commands/wtfp/resume-writing.toml +136 -0
  122. package/vendors/gemini/commands/wtfp/review-section.toml +121 -0
  123. package/vendors/gemini/commands/wtfp/settings.toml +191 -0
  124. package/vendors/gemini/commands/wtfp/submit-milestone.toml +351 -0
  125. package/vendors/gemini/commands/wtfp/update.toml +107 -0
  126. package/vendors/gemini/commands/wtfp/verify-work.toml +245 -0
  127. package/vendors/gemini/commands/wtfp/write-section.toml +228 -0
  128. package/vendors/opencode/agents/wtfp/argument-verifier.md +184 -0
  129. package/vendors/opencode/agents/wtfp/citation-expert.md +41 -0
  130. package/vendors/opencode/agents/wtfp/citation-formatter.md +38 -0
  131. package/vendors/opencode/agents/wtfp/coherence-checker.md +162 -0
  132. package/vendors/opencode/agents/wtfp/outliner.md +252 -0
  133. package/vendors/opencode/agents/wtfp/plan-checker.md +244 -0
  134. package/vendors/opencode/agents/wtfp/prose-polisher.md +158 -0
  135. package/vendors/opencode/agents/wtfp/research-synthesizer.md +205 -0
  136. package/vendors/opencode/agents/wtfp/section-planner.md +355 -0
  137. package/vendors/opencode/agents/wtfp/section-reviewer.md +175 -0
  138. package/vendors/opencode/agents/wtfp/section-writer.md +304 -0
  139. package/vendors/opencode/commands/wtfp/add-todo.md +103 -0
  140. package/vendors/opencode/commands/wtfp/analyze-bib.md +127 -0
  141. package/vendors/opencode/commands/wtfp/audit-milestone.md +279 -0
  142. package/vendors/opencode/commands/wtfp/check-refs.md +124 -0
  143. package/vendors/opencode/commands/wtfp/check-todos.md +146 -0
  144. package/vendors/opencode/commands/wtfp/checkpoint.md +97 -0
  145. package/vendors/opencode/commands/wtfp/contribute.md +266 -0
  146. package/vendors/opencode/commands/wtfp/create-outline.md +181 -0
  147. package/vendors/opencode/commands/wtfp/create-poster.md +37 -0
  148. package/vendors/opencode/commands/wtfp/create-slides.md +36 -0
  149. package/vendors/opencode/commands/wtfp/discuss-section.md +63 -0
  150. package/vendors/opencode/commands/wtfp/execute-outline.md +248 -0
  151. package/vendors/opencode/commands/wtfp/export-latex.md +210 -0
  152. package/vendors/opencode/commands/wtfp/help.md +185 -0
  153. package/vendors/opencode/commands/wtfp/insert-section.md +124 -0
  154. package/vendors/opencode/commands/wtfp/list-assumptions.md +105 -0
  155. package/vendors/opencode/commands/wtfp/map-project.md +100 -0
  156. package/vendors/opencode/commands/wtfp/new-paper.md +161 -0
  157. package/vendors/opencode/commands/wtfp/pause-writing.md +141 -0
  158. package/vendors/opencode/commands/wtfp/plan-milestone-gaps.md +250 -0
  159. package/vendors/opencode/commands/wtfp/plan-revision.md +174 -0
  160. package/vendors/opencode/commands/wtfp/plan-section.md +214 -0
  161. package/vendors/opencode/commands/wtfp/polish-prose.md +115 -0
  162. package/vendors/opencode/commands/wtfp/progress.md +146 -0
  163. package/vendors/opencode/commands/wtfp/quick.md +97 -0
  164. package/vendors/opencode/commands/wtfp/remove-section.md +141 -0
  165. package/vendors/opencode/commands/wtfp/report-bug.md +127 -0
  166. package/vendors/opencode/commands/wtfp/request-feature.md +156 -0
  167. package/vendors/opencode/commands/wtfp/research-gap.md +215 -0
  168. package/vendors/opencode/commands/wtfp/resume-writing.md +137 -0
  169. package/vendors/opencode/commands/wtfp/review-section.md +123 -0
  170. package/vendors/opencode/commands/wtfp/settings.md +192 -0
  171. package/vendors/opencode/commands/wtfp/submit-milestone.md +352 -0
  172. package/vendors/opencode/commands/wtfp/update.md +108 -0
  173. package/vendors/opencode/commands/wtfp/verify-work.md +246 -0
  174. package/vendors/opencode/commands/wtfp/write-section.md +228 -0
  175. package/vendors/claude/agents/wtfp/citation-retriever.md +0 -31
package/README.md CHANGED
@@ -1,282 +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>
96
-
97
- ---
98
-
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.
42
+ Run `/wtfp:help` for the full command list.
111
43
 
112
44
  ---
113
45
 
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
119
-
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
125
-
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
134
- ```
135
-
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
- ---
46
+ ## Runtime Support
158
47
 
159
- ## The Workflow
160
-
161
- ### Starting Fresh
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 | — |
162
53
 
163
54
  ```bash
164
- /wtfp:new-paper # Deep interview about your research
165
- /wtfp:create-outline # Generate section structure + word budgets
55
+ npx wtf-p --global # Claude Code (default)
56
+ npx wtf-p --global --gemini # Gemini CLI
57
+ npx wtf-p --global --opencode # OpenCode
166
58
  ```
167
59
 
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
60
+ ---
172
61
 
173
- ### Writing Sections
62
+ ## Installation
174
63
 
175
64
  ```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
- ```
65
+ # Default: install to Claude Code
66
+ npx wtf-p
180
67
 
181
- Each section gets its own planning documents. Plans are explicit — you see exactly what Claude intends before it writes.
68
+ # Global install (recommended — persists across projects)
69
+ npx wtf-p --global
182
70
 
183
- ### Review and Polish
71
+ # Local to current project only
72
+ npx wtf-p --local
184
73
 
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
189
- ```
74
+ # Specify a custom config directory
75
+ npx wtf-p --global --config-dir ~/research/.claude
190
76
 
191
- ### Export
77
+ # Check what's installed
78
+ npx wtf-p status
192
79
 
193
- ```bash
194
- /wtfp:export-latex # Generate .tex with proper formatting
80
+ # Diagnose issues
81
+ npx wtf-p doctor
195
82
  ```
196
83
 
197
- ---
198
-
199
- ## Reviving Stalled Projects
200
-
201
- Got a half-finished paper? WTF-P can work with existing material.
84
+ ### Upgrading
202
85
 
203
86
  ```bash
204
- /wtfp:map-project # Index your existing files
205
- /wtfp:new-paper # Initialize with awareness of prior work
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
206
91
  ```
207
92
 
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
213
-
214
- ---
215
-
216
- ## Citation Expert (v0.4.0)
217
-
218
- WTF-P includes a specialized tiered pipeline for bibliography management.
93
+ ### Uninstalling
219
94
 
220
95
  ```bash
221
- /wtfp:analyze-bib # Deep analysis of impact (seminal vs rising)
222
- /wtfp:research-gap # Intent-aware search (seminal/recent)
223
- /wtfp:check-refs # Auto-suggest missing citations
96
+ npx wtf-p-uninstall --global
97
+ npx wtf-p-uninstall --global --dry-run # Preview what would be removed
224
98
  ```
225
99
 
226
- Capabilities:
227
- - **Tiered Search:** Integrated Semantic Scholar, SerpAPI (Google Scholar), and CrossRef.
228
- - **Impact Ranking:** Automatically scores papers by citations, velocity, and venue prestige.
229
- - **Deduplication:** universal anchoring via DOI and Scholar Cluster IDs.
230
- - **Provenance:** Entries track their metadata source and verification status.
100
+ Only WTF-P files are removed. Your config files and other tools stay intact.
231
101
 
232
102
  ---
233
103
 
234
104
  ## Command Reference
235
105
 
236
106
  ### Setup
107
+
237
108
  | Command | Purpose |
238
109
  |---------|---------|
239
- | `/wtfp:new-paper` | Initialize paper with deep context gathering |
240
- | `/wtfp:create-outline` | Generate section structure |
241
- | `/wtfp:map-project` | Index existing project materials |
242
- | `/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 |
243
114
 
244
115
  ### Planning
116
+
245
117
  | Command | Purpose |
246
118
  |---------|---------|
247
- | `/wtfp:discuss-section [N]` | Articulate vision before planning |
248
- | `/wtfp:plan-section [N]` | Create execution plan |
249
- | `/wtfp:list-assumptions [N]` | See what Claude plans to write |
250
- | `/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) |
251
123
 
252
124
  ### Writing
125
+
253
126
  | Command | Purpose |
254
127
  |---------|---------|
255
- | `/wtfp:write-section` | Execute a plan |
256
- | `/wtfp:progress` | Status + intelligent next action |
257
- | `/wtfp:pause-writing` | Save state for later |
258
- | `/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 |
259
134
 
260
135
  ### Review
136
+
261
137
  | Command | Purpose |
262
138
  |---------|---------|
263
- | `/wtfp:review-section [N]` | Three-layer verification |
264
- | `/wtfp:plan-revision [N]` | Create fix plan from issues |
265
- | `/wtfp:polish-prose` | Improve readability |
266
- | `/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
267
146
 
268
- ### Export
269
147
  | Command | Purpose |
270
148
  |---------|---------|
271
- | `/wtfp:export-latex` | Generate .tex output |
272
- | `/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
273
155
 
274
- ### Contributing
275
156
  | Command | Purpose |
276
157
  |---------|---------|
277
- | `/wtfp:report-bug` | File a GitHub issue |
278
- | `/wtfp:request-feature` | Request new functionality |
279
- | `/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)
280
207
 
281
208
  ---
282
209
 
@@ -292,50 +219,43 @@ Capabilities:
292
219
 
293
220
  ---
294
221
 
295
- ## WCN Mode (Reduced Tokens)
222
+ ## How It Works
296
223
 
297
- For smaller models or limited context windows, WTF-P includes compressed workflows:
224
+ WTF-P follows a **thin orchestrator → specialized agent → quality loop** architecture:
225
+
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:
298
234
 
299
235
  ```bash
300
236
  ./tools/wcn/swap-workflows.sh wcn # Switch to compressed
301
- ./tools/wcn/swap-workflows.sh verbose # Switch back
237
+ ./tools/wcn/swap-workflows.sh verbose # Switch back
302
238
  ```
303
239
 
304
- 35-50% token reduction with equivalent output quality. Verified on Claude Haiku and Sonnet.
305
-
306
240
  ---
307
241
 
308
242
  ## Origin
309
243
 
310
- WTF-P was built at the [Gnosis Research Center](https://www.intelli-gnosis.com/) at Illinois Tech.
311
-
312
- 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.
313
-
314
- 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.
315
-
316
- 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.
317
245
 
318
246
  ---
319
247
 
320
- ## Contributing
248
+ ## Links
321
249
 
322
- Found a bug? Want a feature? WTF-P includes commands to help:
323
-
324
- ```bash
325
- /wtfp:report-bug # Creates a GitHub issue
326
- /wtfp:request-feature # Submits a feature request
327
- /wtfp:contribute # Guides you through a PR
328
- ```
329
-
330
- 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)
331
255
 
332
256
  ---
333
257
 
334
- ## License
335
-
336
- MIT License. Open source, open science.
337
-
338
258
  <div align="center">
339
259
  <br>
340
- <strong>Stop staring at the cursor. Start shipping papers.</strong>
260
+ <strong>No more excuses. Ship the paper.</strong>
341
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
  }