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,219 @@
1
+ <purpose>
2
+ Execute a section prompt (PLAN.md) and create the outcome summary (SUMMARY.md).
3
+ </purpose>
4
+
5
+ <required_reading>
6
+ Read STATE.md before any operation to load project context.
7
+ </required_reading>
8
+
9
+ <process>
10
+
11
+ [step:load_project_state p=1]
12
+ RUN: cat .planning/STATE.md 2>/dev/null
13
+ PARSE: current, word, argument, open
14
+ IF file_exists → parse_fields
15
+ IF file_missing_but_.planning/_exists → ```
16
+ IF .planning/_doesnt_exist → ERROR ""
17
+ [/step]
18
+
19
+ [step:identify_plan]
20
+ RUN: cat .planning/ROADMAP.md
21
+ RUN: cat .planning/config.json 2>/dev/null
22
+ [/step]
23
+
24
+ [step:record_start_time]
25
+ RUN: PLAN_START_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
26
+ [/step]
27
+
28
+ [step:load_prompt]
29
+ RUN: cat .planning/sections/XX-name/{section}-{plan}-PLAN.md
30
+ IF plan_references_CONTEXT.md → The CONTEXT.md file provides the user's vision ...
31
+ [/step]
32
+
33
+ [step:previous_section_check]
34
+ [/step]
35
+
36
+ [step:execute]
37
+ IF `type=auto` → - Determine writing mode from task (co-author, ...
38
+ IF mode=co-author → Write the prose directly
39
+ IF mode=scaffold → Create detailed outline for user to fill
40
+ IF mode=reviewer → Analyze existing text, provide feedback
41
+ [/step]
42
+
43
+ <writing_modes>
44
+ ## Writing Mode Execution
45
+
46
+ **Co-Author Mode (Claude drafts):**
47
+ - Write complete prose following outline/structure
48
+ - Match user's voice from prior sections
49
+ - Flag claims needing citations with [CITE: topic]
50
+ - Flag uncertain statements with [VERIFY: claim]
51
+ - Aim for word target specified in task
52
+
53
+ **Scaffold Mode (Claude outlines):**
54
+ - Create detailed paragraph-level outline
55
+ - Specify what each paragraph should accomplish
56
+ - Identify where citations should go
57
+ - Note transition needs between paragraphs
58
+ - Leave actual prose writing to user
59
+
60
+ **Reviewer Mode (Claude critiques):**
61
+ - Read existing text carefully
62
+ - Identify strengths first
63
+ - Note logical gaps or weak arguments
64
+ - Suggest specific improvements
65
+ - Ask clarifying questions before major changes
66
+ </writing_modes>
67
+
68
+ <deviation_rules>
69
+
70
+ ## Automatic Adjustment Handling
71
+
72
+ **While writing, you WILL discover issues.** This is normal.
73
+
74
+ Apply these rules automatically. Track all adjustments for Summary documentation.
75
+
76
+ ---
77
+
78
+ [rule:autofix_factual_errors]
79
+ TRIGGER: incorrect_fact | wrong_citation | logical_contradiction
80
+ ACTION: fix immediately + track for summary
81
+ PERMISSION: none_required
82
+ [/rule]---
83
+
84
+ [rule:autoadd_missing_critical_elements]
85
+ TRIGGER: required_element_missing_for_section_completeness
86
+ ACTION: add immediately + track for summary
87
+ [/rule]---
88
+
89
+ [rule:autofix_blocking_issues]
90
+ TRIGGER: something_prevents_completing_the_writing_task
91
+ ACTION: fix immediately to unblock + track for summary
92
+ [/rule]---
93
+
94
+ [rule:ask_about_structural_changes]
95
+ TRIGGER: writing_requires_significant_restructuring
96
+ ACTION: stop + present to user + wait for decision
97
+ [/rule]---
98
+
99
+ [rule:log_enhancement_ideas]
100
+ TRIGGER: improvement_that_would_enhance_writing_but_isn't_essential_now
101
+ ACTION: add to notes automatically + continue writing
102
+ [/rule]---
103
+
104
+ **RULE PRIORITY (when multiple could apply):**
105
+
106
+ 1. **If Rule 4 applies** → STOP and ask (structural decision)
107
+ 2. **If Rules 1-3 apply** → Fix automatically, track for Summary
108
+ 3. **If Rule 5 applies** → Log for later, continue
109
+
110
+ </deviation_rules>
111
+
112
+ <three_layer_verification>
113
+ ## Verification During Execution
114
+
115
+ After each task, run verification checks:
116
+
117
+ **1. Citation Check (Mechanical)**
118
+ - All claims have citations or are clearly original claims
119
+ - Citations formatted correctly
120
+ - No [CITE: ] placeholders remaining
121
+ - Page numbers where style requires
122
+
123
+ **2. Argument Coherence (Logical)**
124
+ - Claims follow from evidence
125
+ - No logical contradictions with prior sections
126
+ - Thesis supported by content
127
+ - Flow between paragraphs makes sense
128
+
129
+ **3. Rubric Check (Requirements)**
130
+ - Word count within target range
131
+ - Required elements present
132
+ - Formatting requirements met
133
+ - Section accomplishes its goal
134
+ </three_layer_verification>
135
+
136
+ <task_commit>
137
+ ## Task Commit Protocol
138
+
139
+ After each task completes (verification passed, done criteria met), commit immediately:
140
+
141
+ **1. Identify modified files:**
142
+
143
+ Track files changed during this specific task:
144
+
145
+ ```bash
146
+ git status --short
147
+ ```
148
+
149
+ **2. Stage only task-related files:**
150
+
151
+ ```bash
152
+ # Example - adjust to actual files modified
153
+ git add paper/sections/introduction.md
154
+ git add paper/references.bib
155
+ ```
156
+
157
+ **3. Determine commit type:**
158
+
159
+ | Type | When to Use | Example |
160
+ |------|-------------|---------|
161
+ | `content` | New prose, new paragraphs | content(02-01): draft introduction hook |
162
+ | `cite` | Adding/fixing citations | cite(02-01): add Smith2023 to literature review |
163
+ | `revise` | Revising existing text | revise(02-01): strengthen thesis statement |
164
+ | `fix` | Fixing errors | fix(02-01): correct misattributed quote |
165
+ | `structure` | Reorganizing | structure(02-01): reorder methods subsections |
166
+
167
+ **4. Craft commit message:**
168
+
169
+ ```bash
170
+ git commit -m "{type}({section}-{plan}): {task description}
171
+
172
+ - {key change 1}
173
+ - {key change 2}
174
+ "
175
+ ```
176
+
177
+ **5. Record commit hash for SUMMARY.md**
178
+ </task_commit>
179
+
180
+ [step:checkpoint_protocol]
181
+ [/step]
182
+
183
+ [step:verification_failure_gate]
184
+ [/step]
185
+
186
+ [step:record_completion_time]
187
+ RUN: PLAN_END_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
188
+ [/step]
189
+
190
+ [step:create_summary]
191
+ [/step]
192
+
193
+ [step:update_state]
194
+ [/step]
195
+
196
+ [step:update_roadmap]
197
+ IF more_plans_remain_in_this_section → - Update plan count: "2/3 plans complete"
198
+ IF this_was_the_last_plan_in_the_section → - Mark section complete: status → "Complete"
199
+ [/step]
200
+
201
+ [step:git_commit_metadata]
202
+ RUN: git add .planning/sections/XX-name/{section}-{plan}-SUMMARY.md
203
+ [/step]
204
+
205
+ [step:offer_next]
206
+ RUN: ls -1 .planning/sections/[current-section-dir]/*-PLAN.md 2>/dev/null | wc -l
207
+ [/step]
208
+
209
+ </process>
210
+
211
+ <success_criteria>
212
+
213
+ - All tasks from PLAN.md completed
214
+ - All verifications pass (citation, coherence, rubric)
215
+ - SUMMARY.md created with substantive content
216
+ - STATE.md updated (position, word count, argument strength)
217
+ - ROADMAP.md updated
218
+ - Paper content committed with meaningful messages
219
+ </success_criteria>
@@ -0,0 +1,183 @@
1
+ <purpose>
2
+ Surface Claude's assumptions about a section before planning, enabling users to
3
+ correct misconceptions early.
4
+
5
+ Key difference from discuss-section: This is ANALYSIS of what Claude thinks,
6
+ not INTAKE of what user knows. No file output - purely conversational to prompt discussion.
7
+ </purpose>
8
+
9
+ <process>
10
+
11
+ <step name="validate_section" priority="first">
12
+ Section number: $ARGUMENTS (required)
13
+
14
+ **If argument missing:**
15
+
16
+ ```
17
+ Error: Section number required.
18
+
19
+ Usage: /wtfp:list-assumptions [section-number]
20
+ Example: /wtfp:list-assumptions 3
21
+ ```
22
+
23
+ Exit workflow.
24
+
25
+ **If argument provided:**
26
+ Validate section exists in roadmap:
27
+
28
+ ```bash
29
+ cat .planning/ROADMAP.md | grep -i "Section ${SECTION}"
30
+ ```
31
+
32
+ **If section not found:**
33
+
34
+ ```
35
+ Error: Section ${SECTION} not found in roadmap.
36
+
37
+ Available sections:
38
+ [list sections from roadmap]
39
+ ```
40
+
41
+ Exit workflow.
42
+
43
+ **If section found:**
44
+ Parse section details from roadmap:
45
+
46
+ - Section number
47
+ - Section name
48
+ - Section description/goal
49
+ - Word budget
50
+ - Any scope details mentioned
51
+
52
+ Continue to analyze_section.
53
+ </step>
54
+
55
+ <step name="analyze_section">
56
+ Based on roadmap description and project context, identify assumptions across five areas:
57
+
58
+ **1. Content Approach:**
59
+ What content would Claude include in this section?
60
+ - "I'd cover X because..."
61
+ - "I'd emphasize Y because..."
62
+ - "I'd structure this as Z because..."
63
+
64
+ **2. Writing Order:**
65
+ What would Claude write first, second, third?
66
+ - "I'd start with X because it sets up the reader"
67
+ - "Then Y because it follows logically"
68
+ - "Finally Z because..."
69
+
70
+ **3. Scope Boundaries:**
71
+ What's included vs excluded in Claude's interpretation?
72
+ - "This section includes: A, B, C"
73
+ - "This section does NOT include: D, E, F"
74
+ - "Boundary ambiguities: G could go either way"
75
+
76
+ **4. Challenging Areas:**
77
+ Where does Claude expect difficulty?
78
+ - "The tricky part is X because..."
79
+ - "Potential challenges: Y, Z"
80
+ - "I'd watch out for..."
81
+
82
+ **5. Dependencies:**
83
+ What does Claude assume is in place or needed?
84
+ - "This assumes X from previous sections"
85
+ - "This needs sources on: Y, Z"
86
+ - "This will set up: [future sections]"
87
+
88
+ Be honest about uncertainty. Mark assumptions with confidence levels:
89
+ - "Fairly confident: ..." (clear from roadmap)
90
+ - "Assuming: ..." (reasonable inference)
91
+ - "Unclear: ..." (could go multiple ways)
92
+ </step>
93
+
94
+ <step name="present_assumptions">
95
+ Present assumptions in a clear, scannable format:
96
+
97
+ ```
98
+ ## My Assumptions for Section ${SECTION}: ${SECTION_NAME}
99
+
100
+ ### Content Approach
101
+ [List assumptions about what to write]
102
+
103
+ ### Writing Order
104
+ [List assumptions about sequencing paragraphs/subsections]
105
+
106
+ ### Scope Boundaries
107
+ **In scope:** [what's included]
108
+ **Out of scope:** [what's excluded]
109
+ **Ambiguous:** [what could go either way]
110
+
111
+ ### Challenging Areas
112
+ [List anticipated challenges]
113
+
114
+ ### Dependencies
115
+ **From prior sections:** [what's needed]
116
+ **Sources needed:** [literature/data requirements]
117
+ **Sets up:** [what future sections need from this]
118
+
119
+ ---
120
+
121
+ **What do you think?**
122
+
123
+ Are these assumptions accurate? Let me know:
124
+ - What I got right
125
+ - What I got wrong
126
+ - What I'm missing
127
+ ```
128
+
129
+ Wait for user response.
130
+ </step>
131
+
132
+ <step name="gather_feedback">
133
+ **If user provides corrections:**
134
+
135
+ Acknowledge the corrections:
136
+
137
+ ```
138
+ Got it. Key corrections:
139
+ - [correction 1]
140
+ - [correction 2]
141
+
142
+ This changes my understanding. [Summarize new understanding]
143
+ ```
144
+
145
+ **If user confirms assumptions:**
146
+
147
+ ```
148
+ Great, assumptions validated.
149
+ ```
150
+
151
+ Continue to offer_next.
152
+ </step>
153
+
154
+ <step name="offer_next">
155
+ Present next steps:
156
+
157
+ ```
158
+ What's next?
159
+ 1. Discuss context (/wtfp:discuss-section ${SECTION}) - Let me ask you questions to build comprehensive context
160
+ 2. Plan this section (/wtfp:plan-section ${SECTION}) - Create detailed writing plans
161
+ 3. Research literature (/wtfp:research-gap [topic]) - Investigate sources needed
162
+ 4. Re-examine assumptions - I'll analyze again with your corrections
163
+ 5. Done for now
164
+ ```
165
+
166
+ Wait for user selection.
167
+
168
+ If "Discuss context": Note that CONTEXT.md will incorporate any corrections discussed here
169
+ If "Plan this section": Proceed knowing assumptions are understood
170
+ If "Research literature": Route to research-gap workflow
171
+ If "Re-examine": Return to analyze_section with updated understanding
172
+ </step>
173
+
174
+ </process>
175
+
176
+ <success_criteria>
177
+ - Section number validated against roadmap
178
+ - Assumptions surfaced across five areas: content approach, writing order, scope, challenges, dependencies
179
+ - Confidence levels marked where appropriate
180
+ - "What do you think?" prompt presented
181
+ - User feedback acknowledged
182
+ - Clear next steps offered
183
+ </success_criteria>
@@ -0,0 +1,42 @@
1
+ <purpose>
2
+ Surface Claude's assumptions about a section before planning, enabling users to
3
+ correct misconceptions early.
4
+
5
+ Key difference from discuss-section: This is ANALYSIS of what Claude thinks,
6
+ not INTAKE of what user knows. No file output - purely conversational to prompt discussion.
7
+ </purpose>
8
+
9
+ <process>
10
+
11
+ [step:validate_section p=1]
12
+ RUN: cat .planning/ROADMAP.md | grep -i "Section ${SECTION}"
13
+ IF argument_missing → ```
14
+ IF argument_provided → Validate section exists in roadmap:
15
+ IF section_not_found → ```
16
+ IF section_found → parse_fields
17
+ [/step]
18
+
19
+ [step:analyze_section]
20
+ [/step]
21
+
22
+ [step:present_assumptions]
23
+ [/step]
24
+
25
+ [step:gather_feedback]
26
+ IF user_provides_corrections → Acknowledge the corrections:
27
+ IF user_confirms_assumptions → ```
28
+ [/step]
29
+
30
+ [step:offer_next]
31
+ [/step]
32
+
33
+ </process>
34
+
35
+ <success_criteria>
36
+ - Section number validated against roadmap
37
+ - Assumptions surfaced across five areas: content approach, writing order, scope, challenges, dependencies
38
+ - Confidence levels marked where appropriate
39
+ - "What do you think?" prompt presented
40
+ - User feedback acknowledged
41
+ - Clear next steps offered
42
+ </success_criteria>