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,281 @@
1
+ <purpose>
2
+ Execute literature discovery at the appropriate depth level.
3
+ Produces DISCOVERY.md (for Level 2-3) that informs section planning.
4
+
5
+ Called from plan-section.md's mandatory_literature_check step with a depth parameter.
6
+
7
+ NOTE: For comprehensive literature research ("how do I position my work"), use
8
+ /wtfp:research-gap instead, which produces RESEARCH.md.
9
+ </purpose>
10
+
11
+ <depth_levels>
12
+ **This workflow supports three depth levels:**
13
+
14
+ | Level | Name | Time | Output | When |
15
+ | ----- | ---- | ---- | ------ | ---- |
16
+ | 1 | Quick Verify | 2-5 min | No file, proceed with verified source | Confirming a specific citation |
17
+ | 2 | Standard | 15-30 min | DISCOVERY.md | Need multiple sources, typical lit review |
18
+ | 3 | Deep Dive | 1+ hour | Detailed DISCOVERY.md | Comprehensive background, theoretical framework |
19
+
20
+ **Depth is determined by plan-section.md before routing here.**
21
+ </depth_levels>
22
+
23
+ <source_hierarchy>
24
+ **MANDATORY: User's sources BEFORE external search**
25
+
26
+ 1. **User's existing materials** - literature.md, prior-drafts.md, PDFs they have
27
+ 2. **Database search** - Google Scholar, field-specific databases
28
+ 3. **WebSearch LAST** - For recent/emerging work only
29
+
30
+ Prefer sources the user already has access to and has likely read.
31
+ </source_hierarchy>
32
+
33
+ <process>
34
+
35
+ <step name="determine_depth">
36
+ Check the depth parameter passed from plan-section.md:
37
+ - `depth=verify` → Level 1 (Quick Verification)
38
+ - `depth=standard` → Level 2 (Standard Discovery)
39
+ - `depth=deep` → Level 3 (Deep Dive)
40
+
41
+ Route to appropriate level workflow below.
42
+ </step>
43
+
44
+ <step name="level_1_quick_verify">
45
+ **Level 1: Quick Verification (2-5 minutes)**
46
+
47
+ For: Confirming a specific source, verifying a citation is correct.
48
+
49
+ **Process:**
50
+
51
+ 1. Check user's existing sources:
52
+ ```bash
53
+ cat .planning/sources/literature.md 2>/dev/null | grep -i "[search term]"
54
+ ```
55
+
56
+ 2. If found, verify:
57
+ - Citation is complete and correct
58
+ - Source is relevant to the claim
59
+ - No conflicting information
60
+
61
+ 3. **If verified:** Return to plan-section.md with confirmation. No DISCOVERY.md needed.
62
+
63
+ 4. **If concerns found:** Escalate to Level 2.
64
+
65
+ **Output:** Verbal confirmation to proceed, or escalation to Level 2.
66
+ </step>
67
+
68
+ <step name="level_2_standard">
69
+ **Level 2: Standard Discovery (15-30 minutes)**
70
+
71
+ For: Finding sources for a claim, standard literature grounding.
72
+
73
+ **Process:**
74
+
75
+ 1. **Identify what to find:**
76
+ - What claim needs support?
77
+ - What type of source is appropriate?
78
+ - How many sources are needed?
79
+
80
+ 2. **Check existing sources first:**
81
+ ```bash
82
+ cat .planning/sources/literature.md 2>/dev/null
83
+ cat .planning/sources/prior-drafts.md 2>/dev/null
84
+ ```
85
+
86
+ 3. **Search for additional sources:**
87
+ - Academic databases for the topic
88
+ - Recent work (last 3-5 years preferred)
89
+ - Seminal papers if establishing foundation
90
+
91
+ 4. **For each source found:**
92
+ - Full citation
93
+ - Key finding relevant to your claim
94
+ - Where it should be cited
95
+
96
+ 5. **Create DISCOVERY.md:**
97
+ - Summary with sources identified
98
+ - Key findings per source
99
+ - Citation placement recommendations
100
+ - Confidence level (should be MEDIUM-HIGH for Level 2)
101
+
102
+ 6. Return to plan-section.md.
103
+
104
+ **Output:** `.planning/sections/XX-name/DISCOVERY.md`
105
+ </step>
106
+
107
+ <step name="level_3_deep_dive">
108
+ **Level 3: Deep Dive (1+ hour)**
109
+
110
+ For: Comprehensive literature review, theoretical framework, establishing field context.
111
+
112
+ **Process:**
113
+
114
+ 1. **Scope the discovery:**
115
+ - Define what the section needs to establish
116
+ - List specific questions to answer
117
+ - Identify key themes to cover
118
+
119
+ 2. **Exhaustive source search:**
120
+ - All relevant foundational work
121
+ - Comprehensive recent coverage
122
+ - Multiple perspectives/schools of thought
123
+ - Methodological precedents
124
+
125
+ 3. **For each source:**
126
+ - Full citation
127
+ - Key contributions
128
+ - Relationship to your work
129
+ - Where it fits in your argument
130
+
131
+ 4. **Synthesize themes:**
132
+ - Group sources by argument they support
133
+ - Identify consensus and controversy
134
+ - Document the gap your work addresses
135
+
136
+ 5. **Create comprehensive DISCOVERY.md:**
137
+ - Full structure with all sources
138
+ - Thematic organization
139
+ - Gap analysis
140
+ - Citation placement map
141
+ - Confidence by finding
142
+
143
+ 6. **Confidence gate:** If LOW confidence on any critical finding, present options.
144
+
145
+ 7. Return to plan-section.md.
146
+
147
+ **Output:** `.planning/sections/XX-name/DISCOVERY.md` (comprehensive)
148
+ </step>
149
+
150
+ <step name="identify_gaps">
151
+ **For Level 2-3:** Define what literature is needed.
152
+
153
+ Ask: What does the reader need to know from prior work?
154
+
155
+ - What foundational concepts need establishing?
156
+ - What prior approaches exist?
157
+ - What's the current state of knowledge?
158
+ - Where are the gaps?
159
+ </step>
160
+
161
+ <step name="create_discovery_scope">
162
+ Define discovery scope:
163
+
164
+ - Clear objective (what claims need support)
165
+ - Include/exclude boundaries (what's relevant)
166
+ - Source preferences (recency, type, field)
167
+ - Output structure for DISCOVERY.md
168
+ </step>
169
+
170
+ <step name="execute_discovery">
171
+ Run the discovery:
172
+ - Check user's existing sources first
173
+ - Search academic databases
174
+ - Prefer peer-reviewed sources
175
+ - Structure findings for easy citation
176
+ </step>
177
+
178
+ <step name="create_discovery_output">
179
+ Write `.planning/sections/XX-name/DISCOVERY.md`:
180
+
181
+ ```markdown
182
+ # Literature Discovery: [Topic]
183
+
184
+ ## Summary
185
+ **Objective:** [What we needed to find]
186
+ **Sources found:** [N] relevant sources
187
+ **Recommendation:** [Summary of what to cite where]
188
+
189
+ ## Sources by Theme
190
+
191
+ ### [Theme 1]
192
+ | Source | Key Finding | Cite In |
193
+ |--------|-------------|---------|
194
+ | Smith (2023) | [finding] | Introduction |
195
+ | Jones (2022) | [finding] | Discussion |
196
+
197
+ ### [Theme 2]
198
+ [Continue...]
199
+
200
+ ## Gap Documentation
201
+ Based on this literature:
202
+ - [Gap 1]: [What hasn't been addressed]
203
+ - [Gap 2]: [Limitation in current approaches]
204
+
205
+ ## Citation Map
206
+ | Section | Sources to Cite |
207
+ |---------|-----------------|
208
+ | Introduction | Smith 2023, Jones 2022 |
209
+ | Methods | Brown 2021 |
210
+ | Discussion | All above + Lee 2024 |
211
+
212
+ ## Confidence
213
+ **Level:** [HIGH/MEDIUM/LOW]
214
+ **Reason:** [Brief explanation]
215
+
216
+ ## Open Questions
217
+ - [Any remaining uncertainties]
218
+ ```
219
+ </step>
220
+
221
+ <step name="confidence_gate">
222
+ After creating DISCOVERY.md, check confidence level.
223
+
224
+ If confidence is LOW:
225
+ Use AskUserQuestion:
226
+
227
+ - header: "Low Confidence"
228
+ - question: "Literature discovery confidence is LOW: [reason]. How to proceed?"
229
+ - options:
230
+ - "Dig deeper" - Do more research
231
+ - "Proceed anyway" - Accept uncertainty
232
+ - "Pause" - I need to think about this
233
+
234
+ If confidence is MEDIUM:
235
+ Inline: "Discovery complete (medium confidence). [brief reason]. Proceed to planning?"
236
+
237
+ If confidence is HIGH:
238
+ Proceed directly, just note: "Discovery complete (high confidence)."
239
+ </step>
240
+
241
+ <step name="offer_next">
242
+ ```
243
+ Discovery complete: .planning/sections/XX-name/DISCOVERY.md
244
+ Sources found: [N]
245
+ Confidence: [level]
246
+
247
+ What's next?
248
+
249
+ 1. Discuss section context (/wtfp:discuss-section [section])
250
+ 2. Create section plan (/wtfp:plan-section [section])
251
+ 3. Refine discovery (dig deeper)
252
+ 4. Review discovery
253
+ ```
254
+
255
+ NOTE: DISCOVERY.md is NOT committed separately. It will be committed with section completion.
256
+ </step>
257
+
258
+ </process>
259
+
260
+ <success_criteria>
261
+ **Level 1 (Quick Verify):**
262
+ - Existing sources checked
263
+ - Citation verified or concerns escalated
264
+ - Verbal confirmation to proceed (no files)
265
+
266
+ **Level 2 (Standard):**
267
+ - Existing sources checked first
268
+ - Additional sources found if needed
269
+ - DISCOVERY.md created with sources
270
+ - Confidence level MEDIUM or higher
271
+ - Ready to inform PLAN.md creation
272
+
273
+ **Level 3 (Deep Dive):**
274
+ - Discovery scope defined
275
+ - Exhaustive source search completed
276
+ - DISCOVERY.md created with comprehensive analysis
277
+ - Thematic organization provided
278
+ - Gap analysis included
279
+ - Confidence gate passed
280
+ - Ready to inform PLAN.md creation
281
+ </success_criteria>
@@ -0,0 +1,92 @@
1
+ <purpose>
2
+ Execute literature discovery at the appropriate depth level.
3
+ Produces DISCOVERY.md (for Level 2-3) that informs section planning.
4
+
5
+ Called from plan-section.md's mandatory_literature_check step with a depth parameter.
6
+
7
+ NOTE: For comprehensive literature research ("how do I position my work"), use
8
+ /wtfp:research-gap instead, which produces RESEARCH.md.
9
+ </purpose>
10
+
11
+ <depth_levels>
12
+ **This workflow supports three depth levels:**
13
+
14
+ | Level | Name | Time | Output | When |
15
+ | ----- | ---- | ---- | ------ | ---- |
16
+ | 1 | Quick Verify | 2-5 min | No file, proceed with verified source | Confirming a specific citation |
17
+ | 2 | Standard | 15-30 min | DISCOVERY.md | Need multiple sources, typical lit review |
18
+ | 3 | Deep Dive | 1+ hour | Detailed DISCOVERY.md | Comprehensive background, theoretical framework |
19
+
20
+ **Depth is determined by plan-section.md before routing here.**
21
+ </depth_levels>
22
+
23
+ <source_hierarchy>
24
+ **MANDATORY: User's sources BEFORE external search**
25
+
26
+ 1. **User's existing materials** - literature.md, prior-drafts.md, PDFs they have
27
+ 2. **Database search** - Google Scholar, field-specific databases
28
+ 3. **WebSearch LAST** - For recent/emerging work only
29
+
30
+ Prefer sources the user already has access to and has likely read.
31
+ </source_hierarchy>
32
+
33
+ <process>
34
+
35
+ [step:determine_depth]
36
+ [/step]
37
+
38
+ [step:level_1_quick_verify]
39
+ RUN: cat .planning/sources/literature.md 2>/dev/null | grep -i "[search term]"
40
+ IF verified → Return to plan-section.md with confirmation. No...
41
+ IF concerns_found → Escalate to Level 2.
42
+ [/step]
43
+
44
+ [step:level_2_standard]
45
+ RUN: cat .planning/sources/literature.md 2>/dev/null
46
+ [/step]
47
+
48
+ [step:level_3_deep_dive]
49
+ [/step]
50
+
51
+ [step:identify_gaps]
52
+ [/step]
53
+
54
+ [step:create_discovery_scope]
55
+ [/step]
56
+
57
+ [step:execute_discovery]
58
+ [/step]
59
+
60
+ [step:create_discovery_output]
61
+ [/step]
62
+
63
+ [step:confidence_gate]
64
+ [/step]
65
+
66
+ [step:offer_next]
67
+ [/step]
68
+
69
+ </process>
70
+
71
+ <success_criteria>
72
+ **Level 1 (Quick Verify):**
73
+ - Existing sources checked
74
+ - Citation verified or concerns escalated
75
+ - Verbal confirmation to proceed (no files)
76
+
77
+ **Level 2 (Standard):**
78
+ - Existing sources checked first
79
+ - Additional sources found if needed
80
+ - DISCOVERY.md created with sources
81
+ - Confidence level MEDIUM or higher
82
+ - Ready to inform PLAN.md creation
83
+
84
+ **Level 3 (Deep Dive):**
85
+ - Discovery scope defined
86
+ - Exhaustive source search completed
87
+ - DISCOVERY.md created with comprehensive analysis
88
+ - Thematic organization provided
89
+ - Gap analysis included
90
+ - Confidence gate passed
91
+ - Ready to inform PLAN.md creation
92
+ </success_criteria>