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.
- package/README.md +146 -208
- package/bin/commands/doctor.js +88 -2
- package/bin/commands/install-logic.js +127 -36
- package/bin/commands/status.js +22 -4
- package/bin/commands/update.js +5 -4
- package/bin/install.js +66 -26
- package/bin/lib/analyze-impact.js +105 -0
- package/bin/lib/bib-format.js +161 -0
- package/bin/lib/bib-index.js +104 -0
- package/bin/lib/checkpoint.js +183 -0
- package/bin/lib/citation-fetcher.js +299 -0
- package/bin/lib/citation-ranker.js +133 -0
- package/bin/lib/context-primer.js +214 -0
- package/bin/lib/manifest.js +80 -2
- package/bin/lib/scholar-lookup.js +188 -0
- package/bin/lib/semantic-scholar.js +184 -0
- package/bin/lib/utils.js +22 -1
- package/bin/uninstall.js +270 -111
- package/core/write-the-f-paper/references/agent-model-matrix.md +62 -0
- package/core/write-the-f-paper/references/checkpoints.md +160 -9
- package/core/write-the-f-paper/references/context-fidelity.md +153 -0
- package/core/write-the-f-paper/references/deviation-rules.md +150 -0
- package/core/write-the-f-paper/references/git-integration.md +80 -0
- package/core/write-the-f-paper/references/orchestrator-pattern.md +167 -0
- package/core/write-the-f-paper/references/planning-config.md +135 -0
- package/core/write-the-f-paper/references/ui-brand.md +186 -0
- package/core/write-the-f-paper/templates/UAT.md +80 -0
- package/core/write-the-f-paper/templates/base-prefs.yaml +42 -0
- package/core/write-the-f-paper/templates/config.json +31 -5
- package/core/write-the-f-paper/workflows/create-outline.wcn.md +1 -1
- package/core/write-the-f-paper/workflows/execute-outline.md +163 -0
- package/core/write-the-f-paper/workflows/execute-outline.wcn.md +73 -0
- package/core/write-the-f-paper/workflows/execute-section.wcn.md +141 -169
- package/core/write-the-f-paper/workflows/plan-section.wcn.md +96 -103
- package/core/write-the-f-paper/workflows/research-gap.md +27 -3
- package/core/write-the-f-paper/workflows/research-gap.wcn.md +18 -1
- package/core/write-the-f-paper/workflows/verify-work.md +251 -0
- package/core/write-the-f-paper/workflows/verify-work.wcn.md +74 -0
- package/package.json +19 -7
- package/vendors/claude/.claude-plugin/plugin.json +2 -2
- package/vendors/claude/agents/wtfp/argument-verifier.md +189 -0
- package/vendors/claude/agents/wtfp/citation-expert.md +45 -0
- package/vendors/claude/agents/wtfp/citation-formatter.md +42 -0
- package/vendors/claude/agents/wtfp/coherence-checker.md +167 -0
- package/vendors/claude/agents/wtfp/outliner.md +259 -0
- package/vendors/claude/agents/wtfp/plan-checker.md +249 -0
- package/vendors/claude/agents/wtfp/prose-polisher.md +166 -0
- package/vendors/claude/agents/wtfp/research-synthesizer.md +215 -0
- package/vendors/claude/agents/wtfp/section-planner.md +364 -0
- package/vendors/claude/agents/wtfp/section-reviewer.md +182 -0
- package/vendors/claude/agents/wtfp/section-writer.md +312 -0
- package/vendors/claude/commands/wtfp/add-todo.md +108 -0
- package/vendors/claude/commands/wtfp/analyze-bib.md +60 -249
- package/vendors/claude/commands/wtfp/audit-milestone.md +286 -0
- package/vendors/claude/commands/wtfp/check-refs.md +60 -131
- package/vendors/claude/commands/wtfp/check-todos.md +152 -0
- package/vendors/claude/commands/wtfp/checkpoint.md +105 -0
- package/vendors/claude/commands/wtfp/contribute.md +1 -1
- package/vendors/claude/commands/wtfp/create-outline.md +109 -195
- package/vendors/claude/commands/wtfp/create-poster.md +1 -1
- package/vendors/claude/commands/wtfp/create-slides.md +1 -1
- package/vendors/claude/commands/wtfp/discuss-section.md +1 -1
- package/vendors/claude/commands/wtfp/execute-outline.md +257 -0
- package/vendors/claude/commands/wtfp/export-latex.md +1 -1
- package/vendors/claude/commands/wtfp/help.md +174 -280
- package/vendors/claude/commands/wtfp/insert-section.md +1 -1
- package/vendors/claude/commands/wtfp/list-assumptions.md +1 -1
- package/vendors/claude/commands/wtfp/map-project.md +35 -124
- package/vendors/claude/commands/wtfp/new-paper.md +88 -362
- package/vendors/claude/commands/wtfp/pause-writing.md +1 -1
- package/vendors/claude/commands/wtfp/plan-milestone-gaps.md +255 -0
- package/vendors/claude/commands/wtfp/plan-revision.md +1 -1
- package/vendors/claude/commands/wtfp/plan-section.md +165 -190
- package/vendors/claude/commands/wtfp/polish-prose.md +66 -118
- package/vendors/claude/commands/wtfp/progress.md +82 -254
- package/vendors/claude/commands/wtfp/quick.md +107 -0
- package/vendors/claude/commands/wtfp/remove-section.md +1 -1
- package/vendors/claude/commands/wtfp/report-bug.md +1 -1
- package/vendors/claude/commands/wtfp/request-feature.md +1 -1
- package/vendors/claude/commands/wtfp/research-gap.md +138 -151
- package/vendors/claude/commands/wtfp/resume-writing.md +1 -1
- package/vendors/claude/commands/wtfp/review-section.md +55 -333
- package/vendors/claude/commands/wtfp/settings.md +197 -0
- package/vendors/claude/commands/wtfp/submit-milestone.md +248 -99
- package/vendors/claude/commands/wtfp/update.md +112 -0
- package/vendors/claude/commands/wtfp/verify-work.md +254 -0
- package/vendors/claude/commands/wtfp/write-section.md +144 -180
- package/vendors/claude/mcp/research-server/package.json +13 -0
- package/vendors/claude/mcp/research-server/src/index.js +133 -0
- package/vendors/gemini/agents/wtfp/argument-verifier.md +184 -0
- package/vendors/gemini/agents/wtfp/citation-expert.md +41 -0
- package/vendors/gemini/agents/wtfp/citation-formatter.md +38 -0
- package/vendors/gemini/agents/wtfp/coherence-checker.md +162 -0
- package/vendors/gemini/agents/wtfp/outliner.md +252 -0
- package/vendors/gemini/agents/wtfp/plan-checker.md +244 -0
- package/vendors/gemini/agents/wtfp/prose-polisher.md +158 -0
- package/vendors/gemini/agents/wtfp/research-synthesizer.md +205 -0
- package/vendors/gemini/agents/wtfp/section-planner.md +355 -0
- package/vendors/gemini/agents/wtfp/section-reviewer.md +175 -0
- package/vendors/gemini/agents/wtfp/section-writer.md +304 -0
- package/vendors/gemini/commands/wtfp/add-todo.toml +102 -0
- package/vendors/gemini/commands/wtfp/analyze-bib.toml +126 -0
- package/vendors/gemini/commands/wtfp/audit-milestone.toml +278 -0
- package/vendors/gemini/commands/wtfp/check-refs.toml +123 -0
- package/vendors/gemini/commands/wtfp/check-todos.toml +145 -0
- package/vendors/gemini/commands/wtfp/checkpoint.toml +96 -0
- package/vendors/gemini/commands/wtfp/contribute.toml +269 -0
- package/vendors/gemini/commands/wtfp/create-outline.toml +180 -0
- package/vendors/gemini/commands/wtfp/create-poster.toml +36 -0
- package/vendors/gemini/commands/wtfp/create-slides.toml +35 -0
- package/vendors/gemini/commands/wtfp/discuss-section.toml +62 -0
- package/vendors/gemini/commands/wtfp/execute-outline.toml +247 -0
- package/vendors/gemini/commands/wtfp/export-latex.toml +209 -0
- package/vendors/gemini/commands/wtfp/help.toml +184 -0
- package/vendors/gemini/commands/wtfp/insert-section.toml +123 -0
- package/vendors/gemini/commands/wtfp/list-assumptions.toml +104 -0
- package/vendors/gemini/commands/wtfp/map-project.toml +99 -0
- package/vendors/gemini/commands/wtfp/new-paper.toml +160 -0
- package/vendors/gemini/commands/wtfp/pause-writing.toml +140 -0
- package/vendors/gemini/commands/wtfp/plan-milestone-gaps.toml +249 -0
- package/vendors/gemini/commands/wtfp/plan-revision.toml +171 -0
- package/vendors/gemini/commands/wtfp/plan-section.toml +212 -0
- package/vendors/gemini/commands/wtfp/polish-prose.toml +114 -0
- package/vendors/gemini/commands/wtfp/progress.toml +145 -0
- package/vendors/gemini/commands/wtfp/quick.toml +96 -0
- package/vendors/gemini/commands/wtfp/remove-section.toml +140 -0
- package/vendors/gemini/commands/wtfp/report-bug.toml +126 -0
- package/vendors/gemini/commands/wtfp/request-feature.toml +155 -0
- package/vendors/gemini/commands/wtfp/research-gap.toml +214 -0
- package/vendors/gemini/commands/wtfp/resume-writing.toml +136 -0
- package/vendors/gemini/commands/wtfp/review-section.toml +121 -0
- package/vendors/gemini/commands/wtfp/settings.toml +191 -0
- package/vendors/gemini/commands/wtfp/submit-milestone.toml +351 -0
- package/vendors/gemini/commands/wtfp/update.toml +107 -0
- package/vendors/gemini/commands/wtfp/verify-work.toml +245 -0
- package/vendors/gemini/commands/wtfp/write-section.toml +228 -0
- package/vendors/opencode/agents/wtfp/argument-verifier.md +184 -0
- package/vendors/opencode/agents/wtfp/citation-expert.md +41 -0
- package/vendors/opencode/agents/wtfp/citation-formatter.md +38 -0
- package/vendors/opencode/agents/wtfp/coherence-checker.md +162 -0
- package/vendors/opencode/agents/wtfp/outliner.md +252 -0
- package/vendors/opencode/agents/wtfp/plan-checker.md +244 -0
- package/vendors/opencode/agents/wtfp/prose-polisher.md +158 -0
- package/vendors/opencode/agents/wtfp/research-synthesizer.md +205 -0
- package/vendors/opencode/agents/wtfp/section-planner.md +355 -0
- package/vendors/opencode/agents/wtfp/section-reviewer.md +175 -0
- package/vendors/opencode/agents/wtfp/section-writer.md +304 -0
- package/vendors/opencode/commands/wtfp/add-todo.md +103 -0
- package/vendors/opencode/commands/wtfp/analyze-bib.md +127 -0
- package/vendors/opencode/commands/wtfp/audit-milestone.md +279 -0
- package/vendors/opencode/commands/wtfp/check-refs.md +124 -0
- package/vendors/opencode/commands/wtfp/check-todos.md +146 -0
- package/vendors/opencode/commands/wtfp/checkpoint.md +97 -0
- package/vendors/opencode/commands/wtfp/contribute.md +266 -0
- package/vendors/opencode/commands/wtfp/create-outline.md +181 -0
- package/vendors/opencode/commands/wtfp/create-poster.md +37 -0
- package/vendors/opencode/commands/wtfp/create-slides.md +36 -0
- package/vendors/opencode/commands/wtfp/discuss-section.md +63 -0
- package/vendors/opencode/commands/wtfp/execute-outline.md +248 -0
- package/vendors/opencode/commands/wtfp/export-latex.md +210 -0
- package/vendors/opencode/commands/wtfp/help.md +185 -0
- package/vendors/opencode/commands/wtfp/insert-section.md +124 -0
- package/vendors/opencode/commands/wtfp/list-assumptions.md +105 -0
- package/vendors/opencode/commands/wtfp/map-project.md +100 -0
- package/vendors/opencode/commands/wtfp/new-paper.md +161 -0
- package/vendors/opencode/commands/wtfp/pause-writing.md +141 -0
- package/vendors/opencode/commands/wtfp/plan-milestone-gaps.md +250 -0
- package/vendors/opencode/commands/wtfp/plan-revision.md +174 -0
- package/vendors/opencode/commands/wtfp/plan-section.md +214 -0
- package/vendors/opencode/commands/wtfp/polish-prose.md +115 -0
- package/vendors/opencode/commands/wtfp/progress.md +146 -0
- package/vendors/opencode/commands/wtfp/quick.md +97 -0
- package/vendors/opencode/commands/wtfp/remove-section.md +141 -0
- package/vendors/opencode/commands/wtfp/report-bug.md +127 -0
- package/vendors/opencode/commands/wtfp/request-feature.md +156 -0
- package/vendors/opencode/commands/wtfp/research-gap.md +215 -0
- package/vendors/opencode/commands/wtfp/resume-writing.md +137 -0
- package/vendors/opencode/commands/wtfp/review-section.md +123 -0
- package/vendors/opencode/commands/wtfp/settings.md +192 -0
- package/vendors/opencode/commands/wtfp/submit-milestone.md +352 -0
- package/vendors/opencode/commands/wtfp/update.md +108 -0
- package/vendors/opencode/commands/wtfp/verify-work.md +246 -0
- 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
|
|
6
|
-
- **P**aper
|
|
7
|
-
- **P**roposal
|
|
8
|
-
- **P**resentation
|
|
9
|
-
- **P**oster
|
|
7
|
+
**Write The F\*\*\*ing Paper.**
|
|
10
8
|
|
|
11
|
-
|
|
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
|
|
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
|
-
|
|
87
|
-
<summary><strong>Uninstalling</strong></summary>
|
|
33
|
+
Then in your AI assistant:
|
|
88
34
|
|
|
89
35
|
```bash
|
|
90
|
-
|
|
91
|
-
|
|
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
|
-
|
|
95
|
-
</details>
|
|
42
|
+
Run `/wtfp:help` for the full command list.
|
|
96
43
|
|
|
97
44
|
---
|
|
98
45
|
|
|
99
|
-
##
|
|
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
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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
|
-
##
|
|
160
|
-
|
|
161
|
-
### Starting Fresh
|
|
62
|
+
## Installation
|
|
162
63
|
|
|
163
64
|
```bash
|
|
164
|
-
|
|
165
|
-
|
|
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
|
-
|
|
68
|
+
# Global install (recommended — persists across projects)
|
|
69
|
+
npx wtf-p --global
|
|
174
70
|
|
|
175
|
-
|
|
176
|
-
|
|
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
|
-
|
|
74
|
+
# Specify a custom config directory
|
|
75
|
+
npx wtf-p --global --config-dir ~/research/.claude
|
|
182
76
|
|
|
183
|
-
|
|
77
|
+
# Check what's installed
|
|
78
|
+
npx wtf-p status
|
|
184
79
|
|
|
185
|
-
|
|
186
|
-
|
|
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
|
-
###
|
|
84
|
+
### Upgrading
|
|
192
85
|
|
|
193
86
|
```bash
|
|
194
|
-
|
|
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
|
-
|
|
205
|
-
|
|
96
|
+
npx wtf-p-uninstall --global
|
|
97
|
+
npx wtf-p-uninstall --global --dry-run # Preview what would be removed
|
|
206
98
|
```
|
|
207
99
|
|
|
208
|
-
|
|
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` |
|
|
222
|
-
| `/wtfp:create-outline` |
|
|
223
|
-
| `/wtfp:map-project` | Index existing
|
|
224
|
-
| `/wtfp:analyze-bib` |
|
|
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]` |
|
|
230
|
-
| `/wtfp:plan-section [N]` | Create
|
|
231
|
-
| `/wtfp:list-assumptions [N]` |
|
|
232
|
-
| `/wtfp:research-gap [N]` |
|
|
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:
|
|
239
|
-
| `/wtfp:
|
|
240
|
-
| `/wtfp:
|
|
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]` |
|
|
246
|
-
| `/wtfp:
|
|
247
|
-
| `/wtfp:
|
|
248
|
-
| `/wtfp:
|
|
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:
|
|
254
|
-
| `/wtfp:
|
|
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:
|
|
260
|
-
| `/wtfp:
|
|
261
|
-
| `/wtfp:
|
|
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
|
-
##
|
|
222
|
+
## How It Works
|
|
223
|
+
|
|
224
|
+
WTF-P follows a **thin orchestrator → specialized agent → quality loop** architecture:
|
|
278
225
|
|
|
279
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
##
|
|
248
|
+
## Links
|
|
303
249
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
/
|
|
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>
|
|
260
|
+
<strong>No more excuses. Ship the paper.</strong>
|
|
323
261
|
</div>
|
package/bin/commands/doctor.js
CHANGED
|
@@ -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
|
|
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('
|
|
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
|
}
|