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,375 @@
1
+ <required_reading>
2
+
3
+ **Read these files NOW:**
4
+
5
+ 1. `.planning/STATE.md`
6
+ 2. `.planning/PROJECT.md`
7
+ 3. `.planning/ROADMAP.md`
8
+ 4. Current section's plan files (`*-PLAN.md`)
9
+ 5. Current section's summary files (`*-SUMMARY.md`)
10
+
11
+ </required_reading>
12
+
13
+ <purpose>
14
+
15
+ Mark current section complete and advance to next. This is the natural point
16
+ where progress tracking and PROJECT.md evolution happen.
17
+
18
+ "Planning next section" = "current section is done"
19
+
20
+ </purpose>
21
+
22
+ <process>
23
+
24
+ <step name="load_project_state" priority="first">
25
+
26
+ Before transition, read project state:
27
+
28
+ ```bash
29
+ cat .planning/STATE.md 2>/dev/null
30
+ cat .planning/PROJECT.md 2>/dev/null
31
+ ```
32
+
33
+ Parse current position to verify we're transitioning the right section.
34
+ Note accumulated context that may need updating after transition.
35
+
36
+ </step>
37
+
38
+ <step name="verify_completion">
39
+
40
+ Check current section has all plan summaries:
41
+
42
+ ```bash
43
+ ls .planning/sections/XX-current/*-PLAN.md 2>/dev/null | sort
44
+ ls .planning/sections/XX-current/*-SUMMARY.md 2>/dev/null | sort
45
+ ```
46
+
47
+ **Verification logic:**
48
+
49
+ - Count PLAN files
50
+ - Count SUMMARY files
51
+ - If counts match: all plans complete
52
+ - If counts don't match: incomplete
53
+
54
+ <config-check>
55
+
56
+ ```bash
57
+ cat .planning/config.json 2>/dev/null
58
+ ```
59
+
60
+ </config-check>
61
+
62
+ **If all plans complete:**
63
+
64
+ <if mode="yolo">
65
+
66
+ ```
67
+ Auto-approved: Transition Section [X] → Section [X+1]
68
+ Section [X] complete — all [Y] plans finished.
69
+
70
+ Proceeding to mark done and advance...
71
+ ```
72
+
73
+ Proceed directly to update_word_count step.
74
+
75
+ </if>
76
+
77
+ <if mode="interactive" OR="custom with gates.confirm_transition true">
78
+
79
+ Ask: "Section [X] complete — all [Y] plans finished. Ready to mark done and move to Section [X+1]?"
80
+
81
+ Wait for confirmation before proceeding.
82
+
83
+ </if>
84
+
85
+ **If plans incomplete:**
86
+
87
+ Present:
88
+
89
+ ```
90
+ Section [X] has incomplete plans:
91
+ - {section}-01-SUMMARY.md ✓ Complete
92
+ - {section}-02-SUMMARY.md ✗ Missing
93
+ - {section}-03-SUMMARY.md ✗ Missing
94
+
95
+ Options:
96
+ 1. Continue current section (complete remaining plans)
97
+ 2. Mark complete anyway (skip remaining plans)
98
+ 3. Review what's left
99
+ ```
100
+
101
+ Wait for user decision.
102
+
103
+ </step>
104
+
105
+ <step name="update_word_count">
106
+
107
+ Calculate word count for completed section:
108
+
109
+ ```bash
110
+ # Count words in section output files
111
+ wc -w paper/sections/*.md 2>/dev/null
112
+ ```
113
+
114
+ Update STATE.md word count tracking:
115
+ - Add section's words to current total
116
+ - Update remaining words calculation
117
+ - Update section progress table
118
+
119
+ </step>
120
+
121
+ <step name="cleanup_handoff">
122
+
123
+ Check for lingering handoffs:
124
+
125
+ ```bash
126
+ ls .planning/sections/XX-current/.continue-here*.md 2>/dev/null
127
+ ```
128
+
129
+ If found, delete them — section is complete, handoffs are stale.
130
+
131
+ </step>
132
+
133
+ <step name="update_roadmap">
134
+
135
+ Update the roadmap file:
136
+
137
+ ```bash
138
+ ROADMAP_FILE=".planning/ROADMAP.md"
139
+ ```
140
+
141
+ Update the file:
142
+
143
+ - Mark current section: `[x] Complete`
144
+ - Add completion date
145
+ - Update plan count to final (e.g., "3/3 plans complete")
146
+ - Update word count
147
+ - Keep next section as `[ ] Not started`
148
+
149
+ **Example:**
150
+
151
+ ```markdown
152
+ ## Sections
153
+
154
+ - [x] Section 1: Introduction (completed 2025-01-15, 850 words)
155
+ - [ ] Section 2: Methods ← Next
156
+ - [ ] Section 3: Results
157
+
158
+ ## Progress
159
+
160
+ | Section | Plans Complete | Words | Status | Completed |
161
+ | ------- | -------------- | ----- | ------ | --------- |
162
+ | 1. Introduction | 3/3 | 850 | Complete | 2025-01-15 |
163
+ | 2. Methods | 0/2 | 0 | Not started | - |
164
+ ```
165
+
166
+ </step>
167
+
168
+ <step name="assess_argument_strength">
169
+
170
+ After completing section, assess how it affects argument strength:
171
+
172
+ Read the section's contribution to the thesis:
173
+ - Did it establish what it needed to?
174
+ - Are there gaps in the argument?
175
+ - Does it connect properly to prior sections?
176
+
177
+ Update STATE.md Argument Strength section:
178
+
179
+ ```markdown
180
+ ## Argument Strength
181
+
182
+ Core claim: [developing → solid / still weak / strengthened]
183
+ Evidence gaps: [updated list]
184
+ Logic flow: [coherent / has jumps / improved]
185
+ ```
186
+
187
+ </step>
188
+
189
+ <step name="evolve_project">
190
+
191
+ Evolve PROJECT.md to reflect learnings from completed section.
192
+
193
+ **Read section summaries:**
194
+
195
+ ```bash
196
+ cat .planning/sections/XX-current/*-SUMMARY.md
197
+ ```
198
+
199
+ **Assess changes needed:**
200
+
201
+ 1. **Requirements validated?**
202
+ - Any requirements addressed in this section?
203
+ - Move to Validated: `- ✓ [Requirement] — Section X`
204
+
205
+ 2. **Requirements changed?**
206
+ - Any requirements discovered to be different than expected?
207
+ - Update in Active section
208
+
209
+ 3. **Decisions to log?**
210
+ - Extract decisions from SUMMARY.md files
211
+ - Add to Key Decisions table
212
+
213
+ 4. **Core argument still accurate?**
214
+ - If the thesis has evolved, update the description
215
+
216
+ **Update PROJECT.md:**
217
+
218
+ Update "Last updated" footer:
219
+
220
+ ```markdown
221
+ ---
222
+ *Last updated: [date] after Section [X]*
223
+ ```
224
+
225
+ </step>
226
+
227
+ <step name="update_current_position">
228
+
229
+ Update Current Position section in STATE.md to reflect section completion and transition.
230
+
231
+ **Format:**
232
+
233
+ ```markdown
234
+ Section: [next] of [total] ([Next section name])
235
+ Plan: Not started
236
+ Status: Ready to plan
237
+ Last activity: [today] — Section [X] complete, transitioned to Section [X+1]
238
+
239
+ Progress: [updated progress bar]
240
+ ```
241
+
242
+ </step>
243
+
244
+ <step name="update_session_continuity">
245
+
246
+ Update Session Continuity section in STATE.md.
247
+
248
+ ```markdown
249
+ Last session: [today]
250
+ Stopped at: Section [X] complete, ready to plan Section [X+1]
251
+ Resume file: None
252
+ ```
253
+
254
+ </step>
255
+
256
+ <step name="offer_next_section">
257
+
258
+ **Check if more sections remain in document:**
259
+
260
+ Read ROADMAP.md to identify remaining sections.
261
+
262
+ **Route A: More sections remain**
263
+
264
+ ```
265
+ ## Section {X}: {Section Name} Complete
266
+
267
+ All {Y} plans finished. {word-count} words written.
268
+
269
+ ---
270
+
271
+ ## Next Up
272
+
273
+ **Section {X+1}: {Next Section Name}** — {Goal from ROADMAP.md}
274
+
275
+ `/wtfp:plan-section {X+1}`
276
+
277
+ <sub>`/clear` first → fresh context window</sub>
278
+
279
+ ---
280
+
281
+ **Also available:**
282
+ - `/wtfp:review-section {X}` — verify section before continuing
283
+ - `/wtfp:discuss-section {X+1}` — gather context first
284
+ - `/wtfp:research-gap [topic]` — investigate literature
285
+ - Review section before continuing
286
+
287
+ ---
288
+ ```
289
+
290
+ **Route B: Document complete (all sections done)**
291
+
292
+ ```
293
+ ## Section {X}: {Section Name} Complete
294
+
295
+ DOCUMENT COMPLETE!
296
+
297
+ ════════════════════════════════════════
298
+ All {N} sections complete!
299
+ Total words: {word-count}
300
+ Document is ready for full review.
301
+ ════════════════════════════════════════
302
+
303
+ ---
304
+
305
+ ## Next Up
306
+
307
+ **Submit Draft** — prepare for submission
308
+
309
+ `/wtfp:submit-draft`
310
+
311
+ <sub>`/clear` first → fresh context window</sub>
312
+
313
+ ---
314
+
315
+ **Also available:**
316
+ - `/wtfp:review-section` — full document verification
317
+ - Review accomplishments before submitting
318
+
319
+ ---
320
+ ```
321
+
322
+ </step>
323
+
324
+ </process>
325
+
326
+ <implicit_tracking>
327
+
328
+ Progress tracking is IMPLICIT:
329
+
330
+ - "Plan section 2" → Section 1 must be done (or ask)
331
+ - "Plan section 3" → Sections 1-2 must be done (or ask)
332
+ - Transition workflow makes it explicit in ROADMAP.md
333
+
334
+ No separate "update progress" step. Forward motion IS progress.
335
+
336
+ </implicit_tracking>
337
+
338
+ <partial_completion>
339
+
340
+ If user wants to move on but section isn't fully complete:
341
+
342
+ ```
343
+ Section [X] has incomplete plans:
344
+ - {section}-02-PLAN.md (not executed)
345
+ - {section}-03-PLAN.md (not executed)
346
+
347
+ Options:
348
+ 1. Mark complete anyway (plans weren't needed)
349
+ 2. Defer work to revision phase
350
+ 3. Stay and finish current section
351
+ ```
352
+
353
+ Respect user judgment — they know if content matters.
354
+
355
+ **If marking complete with incomplete plans:**
356
+
357
+ - Update ROADMAP: "2/3 plans complete" (not "3/3")
358
+ - Note in transition message which plans were skipped
359
+
360
+ </partial_completion>
361
+
362
+ <success_criteria>
363
+
364
+ Transition is complete when:
365
+
366
+ - [ ] Current section plan summaries verified (all exist or user chose to skip)
367
+ - [ ] Word count calculated and updated
368
+ - [ ] Any stale handoffs deleted
369
+ - [ ] ROADMAP.md updated with completion status, plan count, word count
370
+ - [ ] Argument strength assessed and updated
371
+ - [ ] PROJECT.md evolved (requirements, decisions if needed)
372
+ - [ ] STATE.md updated (position, word count, session)
373
+ - [ ] User knows next steps
374
+
375
+ </success_criteria>
@@ -0,0 +1,113 @@
1
+ <required_reading>
2
+
3
+ **Read these files NOW:**
4
+
5
+ 1. `.planning/STATE.md`
6
+ 2. `.planning/PROJECT.md`
7
+ 3. `.planning/ROADMAP.md`
8
+ 4. Current section's plan files (`*-PLAN.md`)
9
+ 5. Current section's summary files (`*-SUMMARY.md`)
10
+
11
+ </required_reading>
12
+
13
+ <purpose>
14
+
15
+ Mark current section complete and advance to next. This is the natural point
16
+ where progress tracking and PROJECT.md evolution happen.
17
+
18
+ "Planning next section" = "current section is done"
19
+
20
+ </purpose>
21
+
22
+ <process>
23
+
24
+ [step:load_project_state p=1]
25
+ RUN: cat .planning/STATE.md 2>/dev/null
26
+ [/step]
27
+
28
+ [step:verify_completion]
29
+ RUN: ls .planning/sections/XX-current/*-PLAN.md 2>/dev/null | sort
30
+ RUN: cat .planning/config.json 2>/dev/null
31
+ IF all_plans_complete → <if mode="yolo">
32
+ IF plans_incomplete → Present:
33
+ [/step]
34
+
35
+ [step:update_word_count]
36
+ [/step]
37
+
38
+ [step:cleanup_handoff]
39
+ RUN: ls .planning/sections/XX-current/.continue-here*.md 2>/dev/null
40
+ [/step]
41
+
42
+ [step:update_roadmap]
43
+ RUN: ROADMAP_FILE=".planning/ROADMAP.md"
44
+ [/step]
45
+
46
+ [step:assess_argument_strength]
47
+ [/step]
48
+
49
+ [step:evolve_project]
50
+ RUN: cat .planning/sections/XX-current/*-SUMMARY.md
51
+ [/step]
52
+
53
+ [step:update_current_position]
54
+ [/step]
55
+
56
+ [step:update_session_continuity]
57
+ [/step]
58
+
59
+ [step:offer_next_section]
60
+ [/step]
61
+
62
+ </process>
63
+
64
+ <implicit_tracking>
65
+
66
+ Progress tracking is IMPLICIT:
67
+
68
+ - "Plan section 2" → Section 1 must be done (or ask)
69
+ - "Plan section 3" → Sections 1-2 must be done (or ask)
70
+ - Transition workflow makes it explicit in ROADMAP.md
71
+
72
+ No separate "update progress" step. Forward motion IS progress.
73
+
74
+ </implicit_tracking>
75
+
76
+ <partial_completion>
77
+
78
+ If user wants to move on but section isn't fully complete:
79
+
80
+ ```
81
+ Section [X] has incomplete plans:
82
+ - {section}-02-PLAN.md (not executed)
83
+ - {section}-03-PLAN.md (not executed)
84
+
85
+ Options:
86
+ 1. Mark complete anyway (plans weren't needed)
87
+ 2. Defer work to revision phase
88
+ 3. Stay and finish current section
89
+ ```
90
+
91
+ Respect user judgment — they know if content matters.
92
+
93
+ **If marking complete with incomplete plans:**
94
+
95
+ - Update ROADMAP: "2/3 plans complete" (not "3/3")
96
+ - Note in transition message which plans were skipped
97
+
98
+ </partial_completion>
99
+
100
+ <success_criteria>
101
+
102
+ Transition is complete when:
103
+
104
+ - [ ] Current section plan summaries verified (all exist or user chose to skip)
105
+ - [ ] Word count calculated and updated
106
+ - [ ] Any stale handoffs deleted
107
+ - [ ] ROADMAP.md updated with completion status, plan count, word count
108
+ - [ ] Argument strength assessed and updated
109
+ - [ ] PROJECT.md evolved (requirements, decisions if needed)
110
+ - [ ] STATE.md updated (position, word count, session)
111
+ - [ ] User knows next steps
112
+
113
+ </success_criteria>