wtf-p 0.1.0 → 0.3.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 +215 -230
- package/bin/commands/doctor.js +100 -0
- package/bin/commands/install-logic.js +235 -0
- package/bin/commands/list.js +88 -0
- package/bin/commands/status.js +85 -0
- package/bin/commands/update.js +50 -0
- package/bin/install.js +157 -309
- package/bin/lib/manifest.js +41 -0
- package/bin/lib/utils.js +338 -0
- package/bin/lib/wcn-compiler.js +226 -0
- package/bin/uninstall.js +202 -206
- package/core/write-the-f-paper/references/github-contrib.md +216 -0
- package/core/write-the-f-paper/templates/posters/basic.md +34 -0
- package/core/write-the-f-paper/templates/slides/basic.md +31 -0
- package/package.json +14 -4
- package/vendors/claude/.claude-plugin/plugin.json +12 -0
- package/vendors/claude/commands/wtfp/contribute.md +278 -0
- package/vendors/claude/commands/wtfp/create-poster.md +42 -0
- package/vendors/claude/commands/wtfp/create-slides.md +41 -0
- package/{commands → vendors/claude/commands}/wtfp/help.md +28 -0
- package/vendors/claude/commands/wtfp/report-bug.md +131 -0
- package/vendors/claude/commands/wtfp/request-feature.md +160 -0
- package/vendors/claude/skills/wtfp/echarts/SKILL.md +47 -0
- package/vendors/claude/skills/wtfp/marp/SKILL.md +49 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/references/checkpoints.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/references/continuation-format.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/references/git-integration.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/references/imrad-structure.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/references/length-estimation.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/references/plan-format.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/references/principles.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/references/questioning.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/references/research-pitfalls.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/config.json +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/context.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/continue-here.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/data-inventory.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/discovery.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/issues.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/manuscript.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/narrative-arc.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/outline.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/phase-prompt.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/prior-drafts.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/project-context/argument-structure.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/project-context/bibliography.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/project-context/gaps.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/project-context/imrad.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/project-context/peer-review.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/project-context/style-guide.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/project-context/tools.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/project.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/research.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/review-comments.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/revision-issues.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/roadmap.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/section-archive.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/section-context.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/section.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/state.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/templates/summary.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/venues/acm-cs.yaml +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/venues/arxiv-ml.yaml +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/venues/ieee-cs.yaml +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/venues/nature.yaml +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/venues/thesis-chapter.yaml +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/create-outline.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/create-outline.wcn.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/discuss-section.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/discuss-section.wcn.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/execute-section.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/execute-section.wcn.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/list-assumptions.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/list-assumptions.wcn.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/lit-review-phase.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/lit-review-phase.wcn.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/map-project.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/map-project.wcn.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/plan-section.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/plan-section.wcn.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/research-gap.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/research-gap.wcn.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/resume-paper.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/resume-paper.wcn.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/review-section.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/review-section.wcn.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/submit-draft.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/submit-draft.wcn.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/transition.md +0 -0
- /package/{write-the-f-paper → core/write-the-f-paper}/workflows/transition.wcn.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/analyze-bib.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/check-refs.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/create-outline.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/discuss-section.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/export-latex.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/insert-section.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/list-assumptions.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/map-project.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/new-paper.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/pause-writing.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/plan-revision.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/plan-section.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/polish-prose.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/progress.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/remove-section.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/research-gap.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/resume-writing.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/review-section.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/submit-milestone.md +0 -0
- /package/{commands → vendors/claude/commands}/wtfp/write-section.md +0 -0
package/README.md
CHANGED
|
@@ -1,338 +1,323 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# WTF-P
|
|
4
4
|
|
|
5
|
-
**The
|
|
5
|
+
**Write The Freaking...**
|
|
6
|
+
- **P**aper
|
|
7
|
+
- **P**roposal
|
|
8
|
+
- **P**resentation
|
|
9
|
+
- **P**oster
|
|
10
|
+
|
|
11
|
+
**Context engineering for academic writing with Claude Code.**
|
|
6
12
|
|
|
7
13
|
```bash
|
|
8
|
-
npx
|
|
14
|
+
npx wtf-p
|
|
9
15
|
```
|
|
10
16
|
|
|
11
|
-
|
|
12
|
-
*(You need LaTeX and BibTeX or you're NGMI)*
|
|
13
|
-
|
|
14
|
-
> "Bro, if you have the data, this ships the manuscript. Zero writer's block."
|
|
17
|
+
</div>
|
|
15
18
|
|
|
16
|
-
|
|
19
|
+
---
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
## What This Does
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
WTF-P turns Claude Code into a structured academic writing system. Instead of chatting with AI and hoping for the best, you get:
|
|
21
24
|
|
|
22
|
-
|
|
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
|
|
23
29
|
|
|
24
|
-
|
|
30
|
+
The philosophy: **context engineering beats prompt engineering**. The files you prepare matter more than what you type.
|
|
25
31
|
|
|
26
32
|
---
|
|
27
33
|
|
|
28
|
-
##
|
|
34
|
+
## Quick Start
|
|
29
35
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
```bash
|
|
37
|
+
npx wtf-p
|
|
38
|
+
```
|
|
33
39
|
|
|
34
|
-
|
|
40
|
+
Then in Claude Code:
|
|
35
41
|
|
|
36
|
-
|
|
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
|
+
```
|
|
37
48
|
|
|
38
|
-
|
|
49
|
+
Run `/wtfp:help` for the full command reference.
|
|
39
50
|
|
|
40
|
-
|
|
51
|
+
<details>
|
|
52
|
+
<summary><strong>Installation Options</strong></summary>
|
|
41
53
|
|
|
42
|
-
|
|
43
|
-
|
|
54
|
+
```bash
|
|
55
|
+
# Global install (recommended)
|
|
56
|
+
npx wtf-p --global
|
|
44
57
|
|
|
45
|
-
|
|
46
|
-
|
|
58
|
+
# Local to current project
|
|
59
|
+
npx wtf-p --local
|
|
47
60
|
|
|
48
|
-
|
|
61
|
+
# Custom Claude config directory
|
|
62
|
+
npx wtf-p --global --config-dir ~/research/.claude
|
|
49
63
|
|
|
50
|
-
|
|
64
|
+
# Check installation status
|
|
65
|
+
npx wtf-p status
|
|
51
66
|
|
|
52
|
-
|
|
53
|
-
npx
|
|
67
|
+
# Diagnose issues
|
|
68
|
+
npx wtf-p doctor
|
|
54
69
|
```
|
|
55
|
-
|
|
56
|
-
Boom. Done. Check `/wtfp:help` if you're lost.
|
|
70
|
+
</details>
|
|
57
71
|
|
|
58
72
|
<details>
|
|
59
|
-
<summary><strong>
|
|
73
|
+
<summary><strong>Upgrading</strong></summary>
|
|
60
74
|
|
|
61
75
|
```bash
|
|
62
|
-
|
|
63
|
-
npx
|
|
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
|
|
64
83
|
```
|
|
65
84
|
</details>
|
|
66
85
|
|
|
67
86
|
<details>
|
|
68
|
-
<summary><strong>
|
|
87
|
+
<summary><strong>Uninstalling</strong></summary>
|
|
69
88
|
|
|
70
89
|
```bash
|
|
71
|
-
|
|
72
|
-
npx
|
|
73
|
-
|
|
74
|
-
# Or use environment variable
|
|
75
|
-
CLAUDE_CONFIG_DIR=~/research/.claude npx wtfp --global
|
|
90
|
+
npx wtf-p-uninstall --global
|
|
91
|
+
npx wtf-p-uninstall --global --dry-run # Preview first
|
|
76
92
|
```
|
|
93
|
+
|
|
94
|
+
Only WTF-P files are removed. Your `CLAUDE.md` and other configs stay intact.
|
|
77
95
|
</details>
|
|
78
96
|
|
|
79
|
-
|
|
80
|
-
<summary><strong>Upgrade / Reinstall (For the cautious)</strong></summary>
|
|
97
|
+
---
|
|
81
98
|
|
|
82
|
-
|
|
99
|
+
## Why AI Writing Tools Fail Researchers
|
|
83
100
|
|
|
84
|
-
|
|
85
|
-
# Interactive: prompts for each conflict (overwrite/skip/backup)
|
|
86
|
-
npx wtfp --global
|
|
101
|
+
Most researchers using AI for writing hit the same walls:
|
|
87
102
|
|
|
88
|
-
|
|
89
|
-
|
|
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 |
|
|
90
109
|
|
|
91
|
-
|
|
92
|
-
npx wtfp --global --backup-all
|
|
93
|
-
```
|
|
94
|
-
</details>
|
|
110
|
+
WTF-P solves these by treating academic writing as a **specification problem**, not a generation problem.
|
|
95
111
|
|
|
96
|
-
|
|
97
|
-
<summary><strong>Uninstall (For the tidy)</strong></summary>
|
|
112
|
+
---
|
|
98
113
|
|
|
99
|
-
|
|
100
|
-
# Interactive uninstall
|
|
101
|
-
npx wtf-p-uninstall --global
|
|
114
|
+
## The Approach: Context Engineering
|
|
102
115
|
|
|
103
|
-
|
|
104
|
-
npx wtf-p-uninstall --global --dry-run
|
|
116
|
+
The insight behind WTF-P: **what you prepare matters more than what you prompt**.
|
|
105
117
|
|
|
106
|
-
|
|
107
|
-
npx wtf-p-uninstall --global --backup
|
|
118
|
+
### 1. Specification First
|
|
108
119
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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
|
|
112
125
|
|
|
113
|
-
|
|
114
|
-
</details>
|
|
126
|
+
This becomes your `PROJECT.md` — the grounding document that keeps every section aligned.
|
|
115
127
|
|
|
116
|
-
|
|
117
|
-
<summary><strong>Dev Mode (For the builders)</strong></summary>
|
|
128
|
+
### 2. Hierarchical Planning
|
|
118
129
|
|
|
119
|
-
|
|
130
|
+
Papers aren't written in one shot. WTF-P breaks them down:
|
|
120
131
|
|
|
121
|
-
```bash
|
|
122
|
-
git clone https://github.com/akougkas/wtfp.git
|
|
123
|
-
cd wtfp
|
|
124
|
-
node bin/install.js --local
|
|
125
132
|
```
|
|
126
|
-
|
|
133
|
+
Paper Vision → Section Outline → Section Plan → Paragraph Execution
|
|
134
|
+
```
|
|
127
135
|
|
|
128
|
-
|
|
129
|
-
WTF-P is designed for flow state. Don't let permissions slow you down.
|
|
136
|
+
Each level has its own document. Each document is version-controlled. You always know where you are.
|
|
130
137
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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?)
|
|
134
154
|
|
|
135
|
-
|
|
136
|
-
> This is the way. Stopping to approve `cat research_notes.txt` 50 times is strictly for amateurs.
|
|
155
|
+
The system flags issues. You fix them. Iterate until solid.
|
|
137
156
|
|
|
138
157
|
---
|
|
139
158
|
|
|
140
159
|
## The Workflow
|
|
141
160
|
|
|
142
|
-
###
|
|
161
|
+
### Starting Fresh
|
|
162
|
+
|
|
143
163
|
```bash
|
|
144
|
-
/wtfp:new-paper
|
|
164
|
+
/wtfp:new-paper # Deep interview about your research
|
|
165
|
+
/wtfp:create-outline # Generate section structure + word budgets
|
|
145
166
|
```
|
|
146
|
-
It grills you until it gets the alpha—your research questions, methods, findings. Creates `MANUSCRIPT.md`.
|
|
147
167
|
|
|
148
|
-
|
|
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
|
|
172
|
+
|
|
173
|
+
### Writing Sections
|
|
174
|
+
|
|
149
175
|
```bash
|
|
150
|
-
/wtfp:
|
|
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
|
|
151
179
|
```
|
|
152
|
-
Generates:
|
|
153
|
-
- `OUTLINE.md` — The IMRaD backbone.
|
|
154
|
-
- `ARGUMENT.md` — The logic flow.
|
|
155
|
-
- `REFS.md` — Citations mapped to sections. **No hallucinations allowed.**
|
|
156
180
|
|
|
157
|
-
|
|
181
|
+
Each section gets its own planning documents. Plans are explicit — you see exactly what Claude intends before it writes.
|
|
182
|
+
|
|
183
|
+
### Review and Polish
|
|
184
|
+
|
|
158
185
|
```bash
|
|
159
|
-
/wtfp:
|
|
160
|
-
/wtfp:
|
|
186
|
+
/wtfp:review-section 1 # Three-layer verification
|
|
187
|
+
/wtfp:polish-prose # Remove AI-speak, improve flow
|
|
188
|
+
/wtfp:check-refs # BibTeX audit
|
|
161
189
|
```
|
|
162
|
-
Each section runs in a fresh subagent context. 200k tokens of pure synthesis. No degradation. It reads only what it needs. Surgical precision.
|
|
163
190
|
|
|
164
|
-
###
|
|
191
|
+
### Export
|
|
192
|
+
|
|
165
193
|
```bash
|
|
166
|
-
/wtfp:
|
|
167
|
-
/wtfp:check-refs # BibTeX audit
|
|
168
|
-
/wtfp:export-latex # LaTeX injection
|
|
194
|
+
/wtfp:export-latex # Generate .tex with proper formatting
|
|
169
195
|
```
|
|
170
|
-
Ship the draft to your advisor. Get roasted. Iterate. The system is modular—you never get stuck in a monolithic doc.
|
|
171
196
|
|
|
172
197
|
---
|
|
173
198
|
|
|
174
|
-
##
|
|
199
|
+
## Reviving Stalled Projects
|
|
175
200
|
|
|
176
|
-
Got a paper
|
|
201
|
+
Got a half-finished paper? WTF-P can work with existing material.
|
|
177
202
|
|
|
178
|
-
### 1. Context Maxxing
|
|
179
203
|
```bash
|
|
180
|
-
/wtfp:map-project
|
|
204
|
+
/wtfp:map-project # Index your existing files
|
|
205
|
+
/wtfp:new-paper # Initialize with awareness of prior work
|
|
181
206
|
```
|
|
182
|
-
Spawns agents to raid your directory. Creates `.planning/context/`:
|
|
183
207
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
| `STYLE_GUIDE.md` | Nature/IEEE specs. |
|
|
190
|
-
| `GAPS.md` | Where you messed up. |
|
|
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
|
|
191
213
|
|
|
192
|
-
|
|
193
|
-
```bash
|
|
194
|
-
/wtfp:new-paper
|
|
195
|
-
```
|
|
196
|
-
Same as fresh, but now it knows your history.
|
|
214
|
+
---
|
|
197
215
|
|
|
198
|
-
|
|
199
|
-
|
|
216
|
+
## Command Reference
|
|
217
|
+
|
|
218
|
+
### Setup
|
|
219
|
+
| Command | Purpose |
|
|
220
|
+
|---------|---------|
|
|
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 |
|
|
225
|
+
|
|
226
|
+
### Planning
|
|
227
|
+
| Command | Purpose |
|
|
228
|
+
|---------|---------|
|
|
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 |
|
|
233
|
+
|
|
234
|
+
### Writing
|
|
235
|
+
| Command | Purpose |
|
|
236
|
+
|---------|---------|
|
|
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 |
|
|
241
|
+
|
|
242
|
+
### Review
|
|
243
|
+
| Command | Purpose |
|
|
244
|
+
|---------|---------|
|
|
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 |
|
|
249
|
+
|
|
250
|
+
### Export
|
|
251
|
+
| Command | Purpose |
|
|
252
|
+
|---------|---------|
|
|
253
|
+
| `/wtfp:export-latex` | Generate .tex output |
|
|
254
|
+
| `/wtfp:submit-milestone` | Archive submission version |
|
|
255
|
+
|
|
256
|
+
### Contributing
|
|
257
|
+
| Command | Purpose |
|
|
258
|
+
|---------|---------|
|
|
259
|
+
| `/wtfp:report-bug` | File a GitHub issue |
|
|
260
|
+
| `/wtfp:request-feature` | Request new functionality |
|
|
261
|
+
| `/wtfp:contribute` | Submit a pull request |
|
|
200
262
|
|
|
201
263
|
---
|
|
202
264
|
|
|
203
|
-
##
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
|
210
|
-
|
|
|
211
|
-
| `
|
|
212
|
-
| `OUTLINE.md` | The Backbone. |
|
|
213
|
-
| `FLOW.md` | The Rhetoric. |
|
|
214
|
-
| `DRAFT_PLAN.md` | The Battle Plan. |
|
|
215
|
-
| `CRITIQUE.md` | Reviewer #2 Simulator. |
|
|
216
|
-
|
|
217
|
-
### XML Prompts (The Secret Sauce)
|
|
218
|
-
We use structured XML so Claude doesn't go off the rails:
|
|
219
|
-
|
|
220
|
-
```xml
|
|
221
|
-
<section type="synthesis">
|
|
222
|
-
<title>3.2 Neural Architecture Search</title>
|
|
223
|
-
<inputs>
|
|
224
|
-
<file>data/results_table_3.csv</file>
|
|
225
|
-
</inputs>
|
|
226
|
-
<citations>
|
|
227
|
-
<cite>vaswani2017attention</cite>
|
|
228
|
-
</citations>
|
|
229
|
-
<instruction>
|
|
230
|
-
Describe the modified ResNet block.
|
|
231
|
-
Tone: Objective, technical, gigabrain.
|
|
232
|
-
</instruction>
|
|
233
|
-
</section>
|
|
234
|
-
```
|
|
235
|
-
Precise. No hallucinations. Pure signal.
|
|
265
|
+
## Venue Templates
|
|
266
|
+
|
|
267
|
+
| Template | Structure |
|
|
268
|
+
|----------|-----------|
|
|
269
|
+
| `acm-cs` | Intro → Background → Approach → Evaluation → Related Work → Conclusion |
|
|
270
|
+
| `ieee-cs` | Intro → Background → Design → Implementation → Evaluation → Conclusion |
|
|
271
|
+
| `arxiv-ml` | Intro → Related Work → Preliminaries → Method → Experiments → Conclusion |
|
|
272
|
+
| `nature` | Intro → Methods → Results → Discussion |
|
|
273
|
+
| `thesis` | Flexible chapter structure |
|
|
236
274
|
|
|
237
|
-
|
|
238
|
-
Writing 10k words? Context windows get full. The AI gets dumb.
|
|
239
|
-
WTF-P prevents this. Every section = Fresh Agent.
|
|
275
|
+
---
|
|
240
276
|
|
|
241
|
-
|
|
242
|
-
| :--- | :--- | :--- |
|
|
243
|
-
| Intro | Fresh | 🔥 |
|
|
244
|
-
| Methods | Fresh | 🔥 |
|
|
245
|
-
| Discussion | Fresh | 🔥 |
|
|
277
|
+
## WCN Mode (Reduced Tokens)
|
|
246
278
|
|
|
247
|
-
|
|
279
|
+
For smaller models or limited context windows, WTF-P includes compressed workflows:
|
|
248
280
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
abc123f text(intro): complete problem statement
|
|
253
|
-
def456g text(methods): draft experimental setup
|
|
281
|
+
```bash
|
|
282
|
+
./tools/wcn/swap-workflows.sh wcn # Switch to compressed
|
|
283
|
+
./tools/wcn/swap-workflows.sh verbose # Switch back
|
|
254
284
|
```
|
|
255
285
|
|
|
256
|
-
|
|
257
|
-
> **Benefits:** Version control for your thesis. If a draft is mid, `git revert`.
|
|
286
|
+
35-50% token reduction with equivalent output quality. Verified on Claude Haiku and Sonnet.
|
|
258
287
|
|
|
259
|
-
|
|
260
|
-
Running on smaller models? Limited context window? Free-tier Claude?
|
|
288
|
+
---
|
|
261
289
|
|
|
262
|
-
|
|
290
|
+
## Origin
|
|
263
291
|
|
|
264
|
-
|
|
265
|
-
# Switch to compressed workflows
|
|
266
|
-
./tools/wcn/swap-workflows.sh wcn
|
|
292
|
+
WTF-P was built at the [Gnosis Research Center](https://www.intelli-gnosis.com/) at Illinois Tech.
|
|
267
293
|
|
|
268
|
-
|
|
269
|
-
./tools/wcn/swap-workflows.sh verbose
|
|
270
|
-
```
|
|
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.
|
|
271
295
|
|
|
272
|
-
|
|
273
|
-
| :--- | :--- | :--- | :--- |
|
|
274
|
-
| Verbose | 13,029 chars | 13,655 chars | Opus, unlimited plans |
|
|
275
|
-
| WCN | 6,676 chars | 8,863 chars | Haiku, Sonnet, free tiers |
|
|
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.
|
|
276
297
|
|
|
277
|
-
|
|
278
|
-
> WCN uses structured notation (`[step:]`, `IF→`, `RUN:`) that smaller models parse just as well. You lose nothing but tokens.
|
|
298
|
+
The result: papers that ship.
|
|
279
299
|
|
|
280
300
|
---
|
|
281
301
|
|
|
282
|
-
##
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
### Writing & Execution
|
|
294
|
-
| Command | Payload |
|
|
295
|
-
| :--- | :--- |
|
|
296
|
-
| `/wtfp:plan-section [N]` | Tactical planning. |
|
|
297
|
-
| `/wtfp:write-section` | Execute the draft. |
|
|
298
|
-
| `/wtfp:progress` | Stats check. |
|
|
299
|
-
| `/wtfp:insert-section [N]` | Add missing sauce. |
|
|
300
|
-
| `/wtfp:remove-section [N]` | Kill your darlings. |
|
|
301
|
-
| `/wtfp:research-gap` | Find the holes in literature. |
|
|
302
|
-
| `/wtfp:list-assumptions` | Logic check. |
|
|
303
|
-
|
|
304
|
-
### Review & Polish
|
|
305
|
-
| Command | Payload |
|
|
306
|
-
| :--- | :--- |
|
|
307
|
-
| `/wtfp:review-section [N]` | Reviewer personas: Hostile, Area Chair, Editor, Mentor. |
|
|
308
|
-
| `/wtfp:plan-revision [N]` | Fix the damage. |
|
|
309
|
-
| `/wtfp:polish-prose` | De-robotize the text. Kill AI-speak. |
|
|
310
|
-
| `/wtfp:check-refs` | BibTeX audit. Find missing/unused citations. |
|
|
311
|
-
|
|
312
|
-
### Export & State
|
|
313
|
-
| Command | Payload |
|
|
314
|
-
| :--- | :--- |
|
|
315
|
-
| `/wtfp:export-latex` | Generate .tex (The final boss). |
|
|
316
|
-
| `/wtfp:submit-milestone` | Version lock. |
|
|
317
|
-
| `/wtfp:pause-writing` | Save state. |
|
|
318
|
-
| `/wtfp:resume-writing` | Load state. |
|
|
319
|
-
| `/wtfp:help` | RTFM. |
|
|
320
|
-
|
|
321
|
-
### Venue Templates
|
|
322
|
-
| Template | Structure |
|
|
323
|
-
| :--- | :--- |
|
|
324
|
-
| `acm-cs` | Intro → Background → Approach → Eval → Related → Conclusion |
|
|
325
|
-
| `ieee-cs` | Intro → Background/Related → Design → Impl → Eval → Conclusion |
|
|
326
|
-
| `arxiv-ml` | Intro → Related → Prelim → Method → Experiments → Conclusion |
|
|
327
|
-
| `nature` | Intro → Methods → Results → Discussion (classic IMRaD) |
|
|
328
|
-
| `thesis` | Flexible chapter structure for dissertations |
|
|
302
|
+
## Contributing
|
|
303
|
+
|
|
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).
|
|
329
313
|
|
|
330
314
|
---
|
|
331
315
|
|
|
332
316
|
## License
|
|
317
|
+
|
|
333
318
|
MIT License. Open source, open science.
|
|
334
319
|
|
|
335
320
|
<div align="center">
|
|
336
|
-
|
|
337
|
-
|
|
321
|
+
<br>
|
|
322
|
+
<strong>Stop staring at the cursor. Start shipping papers.</strong>
|
|
338
323
|
</div>
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { getClaudeDir, normalizePath, getPathLabel, detectInstallation } = require('../lib/utils');
|
|
4
|
+
|
|
5
|
+
async function runDoctor(options) {
|
|
6
|
+
const { out, explicitConfigDir } = options;
|
|
7
|
+
const c = out.colors;
|
|
8
|
+
|
|
9
|
+
out.log(` ${c.yellow('WTF-P Installation Doctor')}\n`);
|
|
10
|
+
|
|
11
|
+
const issues = [];
|
|
12
|
+
const checks = [];
|
|
13
|
+
|
|
14
|
+
// Check 1: Node.js version
|
|
15
|
+
const nodeVersion = process.version;
|
|
16
|
+
const nodeMajor = parseInt(nodeVersion.slice(1).split('.')[0], 10);
|
|
17
|
+
if (nodeMajor < 16) {
|
|
18
|
+
issues.push(`Node.js ${nodeVersion} is below minimum (16.7.0)`);
|
|
19
|
+
checks.push({ name: 'Node.js version', status: 'fail', detail: nodeVersion });
|
|
20
|
+
} else {
|
|
21
|
+
checks.push({ name: 'Node.js version', status: 'pass', detail: nodeVersion });
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Check 2: Claude directory exists
|
|
25
|
+
const globalDir = getClaudeDir(explicitConfigDir, true);
|
|
26
|
+
if (fs.existsSync(globalDir)) {
|
|
27
|
+
checks.push({ name: 'Claude config directory', status: 'pass', detail: getPathLabel(globalDir, true) });
|
|
28
|
+
} else {
|
|
29
|
+
checks.push({ name: 'Claude config directory', status: 'warn', detail: 'Does not exist (will be created on install)' });
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Check 3: Write permissions
|
|
33
|
+
const testDir = globalDir.replace(/\.claude$/, '.claude-test-' + Date.now());
|
|
34
|
+
try {
|
|
35
|
+
fs.mkdirSync(testDir, { recursive: true });
|
|
36
|
+
fs.writeFileSync(path.join(testDir, 'test'), 'test');
|
|
37
|
+
fs.rmSync(testDir, { recursive: true });
|
|
38
|
+
checks.push({ name: 'Write permissions', status: 'pass', detail: 'Can write to config directory' });
|
|
39
|
+
} catch (err) {
|
|
40
|
+
issues.push(`Cannot write to ${getPathLabel(globalDir, true)}: ${err.message}`);
|
|
41
|
+
checks.push({ name: 'Write permissions', status: 'fail', detail: err.message });
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Check 4: Installation state
|
|
45
|
+
const detection = detectInstallation(globalDir);
|
|
46
|
+
if (detection.hasCommands || detection.hasWorkflows || detection.hasSkills) {
|
|
47
|
+
if (detection.partial) {
|
|
48
|
+
issues.push('Partial installation detected - some files are missing');
|
|
49
|
+
checks.push({ name: 'Installation integrity', status: 'warn', detail: 'Partial install' });
|
|
50
|
+
} else if (detection.corrupt) {
|
|
51
|
+
issues.push('Version file is corrupt - reinstall recommended');
|
|
52
|
+
checks.push({ name: 'Installation integrity', status: 'warn', detail: 'Corrupt version file' });
|
|
53
|
+
} else {
|
|
54
|
+
checks.push({ name: 'Installation integrity', status: 'pass', detail: `v${detection.version}` });
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
checks.push({ name: 'Installation integrity', status: 'info', detail: 'Not installed' });
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Check 5: CLAUDE_CONFIG_DIR env var
|
|
61
|
+
const configDirEnv = process.env.CLAUDE_CONFIG_DIR;
|
|
62
|
+
if (configDirEnv) {
|
|
63
|
+
const expanded = normalizePath(configDirEnv);
|
|
64
|
+
if (fs.existsSync(expanded)) {
|
|
65
|
+
checks.push({ name: 'CLAUDE_CONFIG_DIR', status: 'pass', detail: expanded });
|
|
66
|
+
} else {
|
|
67
|
+
issues.push(`CLAUDE_CONFIG_DIR points to non-existent path: ${configDirEnv}`);
|
|
68
|
+
checks.push({ name: 'CLAUDE_CONFIG_DIR', status: 'warn', detail: `${configDirEnv} (does not exist)` });
|
|
69
|
+
}
|
|
70
|
+
} else {
|
|
71
|
+
checks.push({ name: 'CLAUDE_CONFIG_DIR', status: 'info', detail: 'Not set (using default)' });
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Output results
|
|
75
|
+
for (const check of checks) {
|
|
76
|
+
let icon, color;
|
|
77
|
+
switch (check.status) {
|
|
78
|
+
case 'pass': icon = '✓'; color = c.green; break;
|
|
79
|
+
case 'fail': icon = '✗'; color = c.red; break;
|
|
80
|
+
case 'warn': icon = '⚠'; color = c.yellow; break;
|
|
81
|
+
default: icon = 'ℹ'; color = c.cyan;
|
|
82
|
+
}
|
|
83
|
+
out.log(` ${color(icon)} ${check.name}: ${c.dim(check.detail)}`);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
out.log('');
|
|
87
|
+
|
|
88
|
+
if (issues.length > 0) {
|
|
89
|
+
out.log(` ${c.yellow('Issues found:')}`);
|
|
90
|
+
for (const issue of issues) {
|
|
91
|
+
out.log(` ${c.yellow('•')} ${issue}`);
|
|
92
|
+
}
|
|
93
|
+
out.log('');
|
|
94
|
+
out.log(` ${c.dim('Run')} ${c.cyan('npx wtf-p --global --force')} ${c.dim('to reinstall')}\n`);
|
|
95
|
+
} else {
|
|
96
|
+
out.log(` ${c.green('No issues found!')}\n`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
module.exports = runDoctor;
|