wtf-p 0.1.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 (92) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +338 -0
  3. package/bin/install.js +358 -0
  4. package/bin/uninstall.js +485 -0
  5. package/commands/wtfp/analyze-bib.md +326 -0
  6. package/commands/wtfp/check-refs.md +205 -0
  7. package/commands/wtfp/create-outline.md +275 -0
  8. package/commands/wtfp/discuss-section.md +71 -0
  9. package/commands/wtfp/export-latex.md +216 -0
  10. package/commands/wtfp/help.md +342 -0
  11. package/commands/wtfp/insert-section.md +130 -0
  12. package/commands/wtfp/list-assumptions.md +109 -0
  13. package/commands/wtfp/map-project.md +197 -0
  14. package/commands/wtfp/new-paper.md +443 -0
  15. package/commands/wtfp/pause-writing.md +145 -0
  16. package/commands/wtfp/plan-revision.md +180 -0
  17. package/commands/wtfp/plan-section.md +247 -0
  18. package/commands/wtfp/polish-prose.md +177 -0
  19. package/commands/wtfp/progress.md +325 -0
  20. package/commands/wtfp/remove-section.md +147 -0
  21. package/commands/wtfp/research-gap.md +235 -0
  22. package/commands/wtfp/resume-writing.md +142 -0
  23. package/commands/wtfp/review-section.md +409 -0
  24. package/commands/wtfp/submit-milestone.md +211 -0
  25. package/commands/wtfp/write-section.md +273 -0
  26. package/package.json +40 -0
  27. package/write-the-f-paper/references/checkpoints.md +213 -0
  28. package/write-the-f-paper/references/continuation-format.md +223 -0
  29. package/write-the-f-paper/references/git-integration.md +241 -0
  30. package/write-the-f-paper/references/imrad-structure.md +212 -0
  31. package/write-the-f-paper/references/length-estimation.md +148 -0
  32. package/write-the-f-paper/references/plan-format.md +361 -0
  33. package/write-the-f-paper/references/principles.md +158 -0
  34. package/write-the-f-paper/references/questioning.md +132 -0
  35. package/write-the-f-paper/references/research-pitfalls.md +208 -0
  36. package/write-the-f-paper/templates/config.json +30 -0
  37. package/write-the-f-paper/templates/context.md +179 -0
  38. package/write-the-f-paper/templates/continue-here.md +142 -0
  39. package/write-the-f-paper/templates/data-inventory.md +142 -0
  40. package/write-the-f-paper/templates/discovery.md +146 -0
  41. package/write-the-f-paper/templates/issues.md +59 -0
  42. package/write-the-f-paper/templates/manuscript.md +253 -0
  43. package/write-the-f-paper/templates/narrative-arc.md +227 -0
  44. package/write-the-f-paper/templates/outline.md +274 -0
  45. package/write-the-f-paper/templates/phase-prompt.md +348 -0
  46. package/write-the-f-paper/templates/prior-drafts.md +204 -0
  47. package/write-the-f-paper/templates/project-context/argument-structure.md +267 -0
  48. package/write-the-f-paper/templates/project-context/bibliography.md +152 -0
  49. package/write-the-f-paper/templates/project-context/gaps.md +122 -0
  50. package/write-the-f-paper/templates/project-context/imrad.md +140 -0
  51. package/write-the-f-paper/templates/project-context/peer-review.md +152 -0
  52. package/write-the-f-paper/templates/project-context/style-guide.md +198 -0
  53. package/write-the-f-paper/templates/project-context/tools.md +170 -0
  54. package/write-the-f-paper/templates/project.md +185 -0
  55. package/write-the-f-paper/templates/research.md +384 -0
  56. package/write-the-f-paper/templates/review-comments.md +253 -0
  57. package/write-the-f-paper/templates/revision-issues.md +169 -0
  58. package/write-the-f-paper/templates/roadmap.md +187 -0
  59. package/write-the-f-paper/templates/section-archive.md +178 -0
  60. package/write-the-f-paper/templates/section-context.md +114 -0
  61. package/write-the-f-paper/templates/section.md +128 -0
  62. package/write-the-f-paper/templates/state.md +244 -0
  63. package/write-the-f-paper/templates/summary.md +277 -0
  64. package/write-the-f-paper/venues/acm-cs.yaml +102 -0
  65. package/write-the-f-paper/venues/arxiv-ml.yaml +103 -0
  66. package/write-the-f-paper/venues/ieee-cs.yaml +100 -0
  67. package/write-the-f-paper/venues/nature.yaml +81 -0
  68. package/write-the-f-paper/venues/thesis-chapter.yaml +101 -0
  69. package/write-the-f-paper/workflows/create-outline.md +462 -0
  70. package/write-the-f-paper/workflows/create-outline.wcn.md +194 -0
  71. package/write-the-f-paper/workflows/discuss-section.md +249 -0
  72. package/write-the-f-paper/workflows/discuss-section.wcn.md +63 -0
  73. package/write-the-f-paper/workflows/execute-section.md +704 -0
  74. package/write-the-f-paper/workflows/execute-section.wcn.md +219 -0
  75. package/write-the-f-paper/workflows/list-assumptions.md +183 -0
  76. package/write-the-f-paper/workflows/list-assumptions.wcn.md +42 -0
  77. package/write-the-f-paper/workflows/lit-review-phase.md +281 -0
  78. package/write-the-f-paper/workflows/lit-review-phase.wcn.md +92 -0
  79. package/write-the-f-paper/workflows/map-project.md +359 -0
  80. package/write-the-f-paper/workflows/map-project.wcn.md +73 -0
  81. package/write-the-f-paper/workflows/plan-section.md +409 -0
  82. package/write-the-f-paper/workflows/plan-section.wcn.md +236 -0
  83. package/write-the-f-paper/workflows/research-gap.md +469 -0
  84. package/write-the-f-paper/workflows/research-gap.wcn.md +119 -0
  85. package/write-the-f-paper/workflows/resume-paper.md +274 -0
  86. package/write-the-f-paper/workflows/resume-paper.wcn.md +93 -0
  87. package/write-the-f-paper/workflows/review-section.md +329 -0
  88. package/write-the-f-paper/workflows/review-section.wcn.md +91 -0
  89. package/write-the-f-paper/workflows/submit-draft.md +368 -0
  90. package/write-the-f-paper/workflows/submit-draft.wcn.md +69 -0
  91. package/write-the-f-paper/workflows/transition.md +375 -0
  92. package/write-the-f-paper/workflows/transition.wcn.md +113 -0
@@ -0,0 +1,359 @@
1
+ <purpose>
2
+ Analyze existing source materials and prior work to produce structured documents
3
+ in .planning/sources/
4
+
5
+ For brownfield writing projects where materials already exist: prior drafts, notes,
6
+ data files, literature PDFs, etc.
7
+ </purpose>
8
+
9
+ <philosophy>
10
+ **Why map existing materials:**
11
+ - Avoid duplicating work already done
12
+ - Find usable prose from prior drafts
13
+ - Understand what sources are already available
14
+ - Identify gaps in existing materials
15
+ - Create actionable index for planning
16
+
17
+ **Document quality over brevity:**
18
+ Include enough detail to be useful during writing. A thorough literature.md
19
+ with organized sources is more valuable than a sparse list.
20
+
21
+ **Always include file paths:**
22
+ Documents are reference material for Claude when planning/writing. Vague descriptions
23
+ are not actionable. Always include actual file paths to source materials.
24
+ </philosophy>
25
+
26
+ <process>
27
+
28
+ <step name="check_existing" priority="first">
29
+ Check if .planning/sources/ already exists:
30
+
31
+ ```bash
32
+ ls -la .planning/sources/ 2>/dev/null
33
+ ```
34
+
35
+ **If exists:**
36
+
37
+ ```
38
+ .planning/sources/ already exists with these documents:
39
+ [List files found]
40
+
41
+ What's next?
42
+ 1. Refresh - Delete existing and remap sources
43
+ 2. Update - Keep existing, only update specific documents
44
+ 3. Skip - Use existing source map as-is
45
+ ```
46
+
47
+ Wait for user response.
48
+
49
+ If "Refresh": Delete .planning/sources/, continue to create_structure
50
+ If "Update": Ask which documents to update, continue to analyze_sources (filtered)
51
+ If "Skip": Exit workflow
52
+
53
+ **If doesn't exist:**
54
+ Continue to create_structure.
55
+ </step>
56
+
57
+ <step name="create_structure">
58
+ Create .planning/sources/ directory:
59
+
60
+ ```bash
61
+ mkdir -p .planning/sources
62
+ ```
63
+
64
+ **Expected output files:**
65
+ - literature.md (bibliography and source index)
66
+ - data.md (figures, tables, statistics inventory)
67
+ - prior-drafts.md (existing written material)
68
+
69
+ Continue to scan_materials.
70
+ </step>
71
+
72
+ <step name="scan_materials">
73
+ Scan the project for existing materials.
74
+
75
+ **Look for these types of files:**
76
+
77
+ **1. Prior written content:**
78
+ ```bash
79
+ # Look for draft documents
80
+ find . -name "*.md" -o -name "*.tex" -o -name "*.docx" -o -name "*.txt" 2>/dev/null | head -20
81
+ ```
82
+
83
+ **2. Data and figures:**
84
+ ```bash
85
+ # Look for data files
86
+ find . -name "*.csv" -o -name "*.xlsx" -o -name "*.json" -o -name "*.png" -o -name "*.pdf" 2>/dev/null | head -20
87
+ ```
88
+
89
+ **3. Literature and references:**
90
+ ```bash
91
+ # Look for bibliography and reference files
92
+ find . -name "*.bib" -o -name "*references*" -o -name "*bibliography*" 2>/dev/null
93
+ ```
94
+
95
+ **4. Notes and planning:**
96
+ ```bash
97
+ # Look for notes
98
+ find . -name "*notes*" -o -name "*outline*" -o -name "*plan*" 2>/dev/null | head -10
99
+ ```
100
+
101
+ Present findings:
102
+ ```
103
+ Source materials found:
104
+
105
+ Prior drafts: [N] files
106
+ - [file1.md]
107
+ - [file2.tex]
108
+
109
+ Data/Figures: [N] files
110
+ - [data.csv]
111
+ - [figure1.png]
112
+
113
+ Bibliography: [N] files
114
+ - [references.bib]
115
+
116
+ Notes: [N] files
117
+ - [notes.md]
118
+
119
+ Proceeding to analyze each category...
120
+ ```
121
+ </step>
122
+
123
+ <step name="analyze_literature">
124
+ **Analyze bibliography and literature sources:**
125
+
126
+ If .bib file exists:
127
+ ```bash
128
+ cat references.bib 2>/dev/null | head -100
129
+ ```
130
+
131
+ Parse and organize:
132
+ - Extract all citations
133
+ - Group by theme/topic if possible
134
+ - Identify which are core vs background
135
+ - Note any gaps
136
+
137
+ **Create literature.md:**
138
+
139
+ ```markdown
140
+ # Literature Index
141
+
142
+ ## Source Files
143
+ - `references.bib` - [N] entries
144
+ - [Other bibliography files]
145
+
146
+ ## Core References (cite in paper)
147
+
148
+ | Key | Citation | Relevance | Cite In |
149
+ |-----|----------|-----------|---------|
150
+ | smith2023 | Smith et al. (2023) Title... | foundational method | Methods |
151
+ | jones2022 | Jones (2022) Title... | contrasting view | Discussion |
152
+
153
+ ## Background Reading (inform writing)
154
+
155
+ | Key | Citation | Notes |
156
+ |-----|----------|-------|
157
+ | [key] | [citation] | [how it informs] |
158
+
159
+ ## By Theme
160
+
161
+ ### [Theme 1]
162
+ - [source1]
163
+ - [source2]
164
+
165
+ ### [Theme 2]
166
+ - [source3]
167
+
168
+ ## To Find
169
+ - [ ] [Missing citation needed for claim X]
170
+ - [ ] [Gap in coverage of topic Y]
171
+
172
+ ## Notes
173
+ [Any observations about the literature base]
174
+ ```
175
+ </step>
176
+
177
+ <step name="analyze_data">
178
+ **Analyze data files and figures:**
179
+
180
+ For each data/figure file found:
181
+ - What does it contain?
182
+ - Is it ready to use?
183
+ - Where would it go in the document?
184
+
185
+ **Create data.md:**
186
+
187
+ ```markdown
188
+ # Data & Evidence Inventory
189
+
190
+ ## Source Files
191
+ [List all data files found]
192
+
193
+ ## Figures
194
+
195
+ | ID | File | Description | Status | Placement |
196
+ |----|------|-------------|--------|-----------|
197
+ | fig1 | `figures/main_result.png` | Main result visualization | ready | Results |
198
+ | fig2 | `figures/method.png` | Method diagram | needs work | Methods |
199
+
200
+ ## Tables
201
+
202
+ | ID | Source | Description | Status | Placement |
203
+ |----|--------|-------------|--------|-----------|
204
+ | tab1 | `data/results.csv` | Summary statistics | needs formatting | Results |
205
+
206
+ ## Statistics
207
+
208
+ | Finding | Test | Result | Source File |
209
+ |---------|------|--------|-------------|
210
+ | [Main effect] | [ANOVA] | [F(2,45)=3.2, p<.05] | `analysis.R` |
211
+
212
+ ## Raw Data
213
+ | File | Description | Status |
214
+ |------|-------------|--------|
215
+ | `data/raw.csv` | Participant responses | cleaned |
216
+
217
+ ## Gaps
218
+ - [ ] [Missing figure for X]
219
+ - [ ] [Need to run analysis for Y]
220
+ ```
221
+ </step>
222
+
223
+ <step name="analyze_drafts">
224
+ **Analyze prior written content:**
225
+
226
+ For each draft file found:
227
+ - Read first ~50 lines to understand content
228
+ - Assess quality and usability
229
+ - Identify which sections it maps to
230
+
231
+ **Create prior-drafts.md:**
232
+
233
+ ```markdown
234
+ # Prior Drafts & Notes
235
+
236
+ ## Source Files
237
+ [List all draft files found]
238
+
239
+ ## Usable Material
240
+
241
+ | Source | Description | Quality | Target Section |
242
+ |--------|-------------|---------|----------------|
243
+ | `drafts/proposal.md` | Original proposal | Good intro | Introduction |
244
+ | `notes/methods.txt` | Method notes | Rough | Methods |
245
+ | `drafts/lit_review.md` | Literature review | Partial | Related Work |
246
+
247
+ ## Key Passages to Incorporate
248
+
249
+ ### From `drafts/proposal.md`
250
+ > "[Key passage that captures thesis well]"
251
+ Target: Introduction thesis statement
252
+
253
+ ### From `notes/methods.txt`
254
+ > "[Description of procedure]"
255
+ Target: Methods - Procedure section
256
+
257
+ ## Quality Assessment
258
+
259
+ | File | Prose Quality | Accuracy | Completeness |
260
+ |------|--------------|----------|--------------|
261
+ | `proposal.md` | Good | Current | Partial |
262
+ | `methods.txt` | Rough notes | Current | Complete |
263
+
264
+ ## Gaps in Prior Work
265
+ - [ ] No prior draft of Discussion
266
+ - [ ] Results section needs writing from scratch
267
+ - [ ] Abstract not yet attempted
268
+
269
+ ## Notes
270
+ [Observations about what can be reused vs needs rewriting]
271
+ ```
272
+ </step>
273
+
274
+ <step name="verify_output">
275
+ Verify all documents created successfully:
276
+
277
+ ```bash
278
+ ls -la .planning/sources/
279
+ wc -l .planning/sources/*.md
280
+ ```
281
+
282
+ **Verification checklist:**
283
+ - All 3 documents exist
284
+ - No empty documents
285
+ - Materials properly indexed
286
+
287
+ Continue to commit_source_map.
288
+ </step>
289
+
290
+ <step name="commit_source_map">
291
+ Commit the source map:
292
+
293
+ ```bash
294
+ git add .planning/sources/*.md
295
+ git commit -m "$(cat <<'EOF'
296
+ docs: map existing source materials
297
+
298
+ - literature.md - Bibliography and sources index
299
+ - data.md - Figures, tables, statistics inventory
300
+ - prior-drafts.md - Existing written content
301
+ EOF
302
+ )"
303
+ ```
304
+
305
+ Continue to offer_next.
306
+ </step>
307
+
308
+ <step name="offer_next">
309
+ Present completion summary and next steps.
310
+
311
+ ```
312
+ Source mapping complete.
313
+
314
+ Created .planning/sources/:
315
+ - literature.md ([N] sources indexed)
316
+ - data.md ([N] figures/tables inventoried)
317
+ - prior-drafts.md ([N] prior drafts analyzed)
318
+
319
+ **Reusable content found:**
320
+ - [Summary of what can be reused]
321
+
322
+ **Gaps identified:**
323
+ - [Summary of what's missing]
324
+
325
+ ---
326
+
327
+ ## Next Up
328
+
329
+ **Initialize project** — use source context for planning
330
+
331
+ `/wtfp:new-paper`
332
+
333
+ <sub>`/clear` first → fresh context window</sub>
334
+
335
+ ---
336
+
337
+ **Also available:**
338
+ - Re-run mapping: `/wtfp:map-project`
339
+ - Review specific file: `cat .planning/sources/literature.md`
340
+ - Edit any document before proceeding
341
+
342
+ ---
343
+ ```
344
+
345
+ End workflow.
346
+ </step>
347
+
348
+ </process>
349
+
350
+ <success_criteria>
351
+ - .planning/sources/ directory created
352
+ - All source material types scanned
353
+ - literature.md created with bibliography index
354
+ - data.md created with figures/tables inventory
355
+ - prior-drafts.md created with usable content identified
356
+ - Gaps in materials identified
357
+ - Documents committed to git
358
+ - User offered clear next steps
359
+ </success_criteria>
@@ -0,0 +1,73 @@
1
+ <purpose>
2
+ Analyze existing source materials and prior work to produce structured documents
3
+ in .planning/sources/
4
+
5
+ For brownfield writing projects where materials already exist: prior drafts, notes,
6
+ data files, literature PDFs, etc.
7
+ </purpose>
8
+
9
+ <philosophy>
10
+ **Why map existing materials:**
11
+ - Avoid duplicating work already done
12
+ - Find usable prose from prior drafts
13
+ - Understand what sources are already available
14
+ - Identify gaps in existing materials
15
+ - Create actionable index for planning
16
+
17
+ **Document quality over brevity:**
18
+ Include enough detail to be useful during writing. A thorough literature.md
19
+ with organized sources is more valuable than a sparse list.
20
+
21
+ **Always include file paths:**
22
+ Documents are reference material for Claude when planning/writing. Vague descriptions
23
+ are not actionable. Always include actual file paths to source materials.
24
+ </philosophy>
25
+
26
+ <process>
27
+
28
+ [step:check_existing p=1]
29
+ RUN: ls -la .planning/sources/ 2>/dev/null
30
+ IF exists → ```
31
+ IF doesnt_exist → Continue to create_structure.
32
+ [/step]
33
+
34
+ [step:create_structure]
35
+ RUN: mkdir -p .planning/sources
36
+ [/step]
37
+
38
+ [step:scan_materials]
39
+ [/step]
40
+
41
+ [step:analyze_literature]
42
+ RUN: cat references.bib 2>/dev/null | head -100
43
+ [/step]
44
+
45
+ [step:analyze_data]
46
+ [/step]
47
+
48
+ [step:analyze_drafts]
49
+ [/step]
50
+
51
+ [step:verify_output]
52
+ RUN: ls -la .planning/sources/
53
+ [/step]
54
+
55
+ [step:commit_source_map]
56
+ RUN: git add .planning/sources/*.md
57
+ [/step]
58
+
59
+ [step:offer_next]
60
+ [/step]
61
+
62
+ </process>
63
+
64
+ <success_criteria>
65
+ - .planning/sources/ directory created
66
+ - All source material types scanned
67
+ - literature.md created with bibliography index
68
+ - data.md created with figures/tables inventory
69
+ - prior-drafts.md created with usable content identified
70
+ - Gaps in materials identified
71
+ - Documents committed to git
72
+ - User offered clear next steps
73
+ </success_criteria>