wtf-p 0.4.0 → 0.5.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 (175) hide show
  1. package/README.md +146 -226
  2. package/bin/commands/doctor.js +88 -2
  3. package/bin/commands/install-logic.js +121 -26
  4. package/bin/commands/status.js +22 -4
  5. package/bin/commands/update.js +5 -4
  6. package/bin/install.js +66 -26
  7. package/bin/lib/checkpoint.js +183 -0
  8. package/bin/lib/context-primer.js +214 -0
  9. package/bin/lib/manifest.js +62 -2
  10. package/bin/lib/utils.js +22 -1
  11. package/bin/uninstall.js +270 -111
  12. package/core/write-the-f-paper/references/agent-model-matrix.md +62 -0
  13. package/core/write-the-f-paper/references/checkpoints.md +160 -9
  14. package/core/write-the-f-paper/references/context-fidelity.md +153 -0
  15. package/core/write-the-f-paper/references/deviation-rules.md +150 -0
  16. package/core/write-the-f-paper/references/git-integration.md +80 -0
  17. package/core/write-the-f-paper/references/orchestrator-pattern.md +167 -0
  18. package/core/write-the-f-paper/references/planning-config.md +135 -0
  19. package/core/write-the-f-paper/references/ui-brand.md +186 -0
  20. package/core/write-the-f-paper/templates/UAT.md +80 -0
  21. package/core/write-the-f-paper/templates/base-prefs.yaml +42 -0
  22. package/core/write-the-f-paper/templates/config.json +31 -5
  23. package/core/write-the-f-paper/workflows/create-outline.wcn.md +1 -1
  24. package/core/write-the-f-paper/workflows/execute-outline.md +163 -0
  25. package/core/write-the-f-paper/workflows/execute-outline.wcn.md +73 -0
  26. package/core/write-the-f-paper/workflows/execute-section.wcn.md +141 -169
  27. package/core/write-the-f-paper/workflows/plan-section.wcn.md +96 -103
  28. package/core/write-the-f-paper/workflows/research-gap.md +27 -3
  29. package/core/write-the-f-paper/workflows/research-gap.wcn.md +18 -1
  30. package/core/write-the-f-paper/workflows/verify-work.md +251 -0
  31. package/core/write-the-f-paper/workflows/verify-work.wcn.md +74 -0
  32. package/package.json +19 -7
  33. package/vendors/claude/.claude-plugin/plugin.json +2 -2
  34. package/vendors/claude/agents/wtfp/argument-verifier.md +189 -0
  35. package/vendors/claude/agents/wtfp/citation-expert.md +1 -1
  36. package/vendors/claude/agents/wtfp/citation-formatter.md +1 -1
  37. package/vendors/claude/agents/wtfp/coherence-checker.md +167 -0
  38. package/vendors/claude/agents/wtfp/outliner.md +259 -0
  39. package/vendors/claude/agents/wtfp/plan-checker.md +249 -0
  40. package/vendors/claude/agents/wtfp/prose-polisher.md +166 -0
  41. package/vendors/claude/agents/wtfp/research-synthesizer.md +215 -0
  42. package/vendors/claude/agents/wtfp/section-planner.md +364 -0
  43. package/vendors/claude/agents/wtfp/section-reviewer.md +182 -0
  44. package/vendors/claude/agents/wtfp/section-writer.md +312 -0
  45. package/vendors/claude/commands/wtfp/add-todo.md +108 -0
  46. package/vendors/claude/commands/wtfp/analyze-bib.md +58 -236
  47. package/vendors/claude/commands/wtfp/audit-milestone.md +286 -0
  48. package/vendors/claude/commands/wtfp/check-refs.md +60 -133
  49. package/vendors/claude/commands/wtfp/check-todos.md +152 -0
  50. package/vendors/claude/commands/wtfp/checkpoint.md +105 -0
  51. package/vendors/claude/commands/wtfp/contribute.md +1 -1
  52. package/vendors/claude/commands/wtfp/create-outline.md +109 -195
  53. package/vendors/claude/commands/wtfp/create-poster.md +1 -1
  54. package/vendors/claude/commands/wtfp/create-slides.md +1 -1
  55. package/vendors/claude/commands/wtfp/discuss-section.md +1 -1
  56. package/vendors/claude/commands/wtfp/execute-outline.md +257 -0
  57. package/vendors/claude/commands/wtfp/export-latex.md +1 -1
  58. package/vendors/claude/commands/wtfp/help.md +174 -280
  59. package/vendors/claude/commands/wtfp/insert-section.md +1 -1
  60. package/vendors/claude/commands/wtfp/list-assumptions.md +1 -1
  61. package/vendors/claude/commands/wtfp/map-project.md +35 -124
  62. package/vendors/claude/commands/wtfp/new-paper.md +85 -320
  63. package/vendors/claude/commands/wtfp/pause-writing.md +1 -1
  64. package/vendors/claude/commands/wtfp/plan-milestone-gaps.md +255 -0
  65. package/vendors/claude/commands/wtfp/plan-revision.md +1 -1
  66. package/vendors/claude/commands/wtfp/plan-section.md +165 -190
  67. package/vendors/claude/commands/wtfp/polish-prose.md +66 -118
  68. package/vendors/claude/commands/wtfp/progress.md +82 -254
  69. package/vendors/claude/commands/wtfp/quick.md +107 -0
  70. package/vendors/claude/commands/wtfp/remove-section.md +1 -1
  71. package/vendors/claude/commands/wtfp/report-bug.md +1 -1
  72. package/vendors/claude/commands/wtfp/request-feature.md +1 -1
  73. package/vendors/claude/commands/wtfp/research-gap.md +138 -150
  74. package/vendors/claude/commands/wtfp/resume-writing.md +1 -1
  75. package/vendors/claude/commands/wtfp/review-section.md +55 -333
  76. package/vendors/claude/commands/wtfp/settings.md +197 -0
  77. package/vendors/claude/commands/wtfp/submit-milestone.md +248 -99
  78. package/vendors/claude/commands/wtfp/update.md +112 -0
  79. package/vendors/claude/commands/wtfp/verify-work.md +254 -0
  80. package/vendors/claude/commands/wtfp/write-section.md +144 -180
  81. package/vendors/gemini/agents/wtfp/argument-verifier.md +184 -0
  82. package/vendors/gemini/agents/wtfp/citation-expert.md +41 -0
  83. package/vendors/gemini/agents/wtfp/citation-formatter.md +38 -0
  84. package/vendors/gemini/agents/wtfp/coherence-checker.md +162 -0
  85. package/vendors/gemini/agents/wtfp/outliner.md +252 -0
  86. package/vendors/gemini/agents/wtfp/plan-checker.md +244 -0
  87. package/vendors/gemini/agents/wtfp/prose-polisher.md +158 -0
  88. package/vendors/gemini/agents/wtfp/research-synthesizer.md +205 -0
  89. package/vendors/gemini/agents/wtfp/section-planner.md +355 -0
  90. package/vendors/gemini/agents/wtfp/section-reviewer.md +175 -0
  91. package/vendors/gemini/agents/wtfp/section-writer.md +304 -0
  92. package/vendors/gemini/commands/wtfp/add-todo.toml +102 -0
  93. package/vendors/gemini/commands/wtfp/analyze-bib.toml +126 -0
  94. package/vendors/gemini/commands/wtfp/audit-milestone.toml +278 -0
  95. package/vendors/gemini/commands/wtfp/check-refs.toml +123 -0
  96. package/vendors/gemini/commands/wtfp/check-todos.toml +145 -0
  97. package/vendors/gemini/commands/wtfp/checkpoint.toml +96 -0
  98. package/vendors/gemini/commands/wtfp/contribute.toml +269 -0
  99. package/vendors/gemini/commands/wtfp/create-outline.toml +180 -0
  100. package/vendors/gemini/commands/wtfp/create-poster.toml +36 -0
  101. package/vendors/gemini/commands/wtfp/create-slides.toml +35 -0
  102. package/vendors/gemini/commands/wtfp/discuss-section.toml +62 -0
  103. package/vendors/gemini/commands/wtfp/execute-outline.toml +247 -0
  104. package/vendors/gemini/commands/wtfp/export-latex.toml +209 -0
  105. package/vendors/gemini/commands/wtfp/help.toml +184 -0
  106. package/vendors/gemini/commands/wtfp/insert-section.toml +123 -0
  107. package/vendors/gemini/commands/wtfp/list-assumptions.toml +104 -0
  108. package/vendors/gemini/commands/wtfp/map-project.toml +99 -0
  109. package/vendors/gemini/commands/wtfp/new-paper.toml +160 -0
  110. package/vendors/gemini/commands/wtfp/pause-writing.toml +140 -0
  111. package/vendors/gemini/commands/wtfp/plan-milestone-gaps.toml +249 -0
  112. package/vendors/gemini/commands/wtfp/plan-revision.toml +171 -0
  113. package/vendors/gemini/commands/wtfp/plan-section.toml +212 -0
  114. package/vendors/gemini/commands/wtfp/polish-prose.toml +114 -0
  115. package/vendors/gemini/commands/wtfp/progress.toml +145 -0
  116. package/vendors/gemini/commands/wtfp/quick.toml +96 -0
  117. package/vendors/gemini/commands/wtfp/remove-section.toml +140 -0
  118. package/vendors/gemini/commands/wtfp/report-bug.toml +126 -0
  119. package/vendors/gemini/commands/wtfp/request-feature.toml +155 -0
  120. package/vendors/gemini/commands/wtfp/research-gap.toml +214 -0
  121. package/vendors/gemini/commands/wtfp/resume-writing.toml +136 -0
  122. package/vendors/gemini/commands/wtfp/review-section.toml +121 -0
  123. package/vendors/gemini/commands/wtfp/settings.toml +191 -0
  124. package/vendors/gemini/commands/wtfp/submit-milestone.toml +351 -0
  125. package/vendors/gemini/commands/wtfp/update.toml +107 -0
  126. package/vendors/gemini/commands/wtfp/verify-work.toml +245 -0
  127. package/vendors/gemini/commands/wtfp/write-section.toml +228 -0
  128. package/vendors/opencode/agents/wtfp/argument-verifier.md +184 -0
  129. package/vendors/opencode/agents/wtfp/citation-expert.md +41 -0
  130. package/vendors/opencode/agents/wtfp/citation-formatter.md +38 -0
  131. package/vendors/opencode/agents/wtfp/coherence-checker.md +162 -0
  132. package/vendors/opencode/agents/wtfp/outliner.md +252 -0
  133. package/vendors/opencode/agents/wtfp/plan-checker.md +244 -0
  134. package/vendors/opencode/agents/wtfp/prose-polisher.md +158 -0
  135. package/vendors/opencode/agents/wtfp/research-synthesizer.md +205 -0
  136. package/vendors/opencode/agents/wtfp/section-planner.md +355 -0
  137. package/vendors/opencode/agents/wtfp/section-reviewer.md +175 -0
  138. package/vendors/opencode/agents/wtfp/section-writer.md +304 -0
  139. package/vendors/opencode/commands/wtfp/add-todo.md +103 -0
  140. package/vendors/opencode/commands/wtfp/analyze-bib.md +127 -0
  141. package/vendors/opencode/commands/wtfp/audit-milestone.md +279 -0
  142. package/vendors/opencode/commands/wtfp/check-refs.md +124 -0
  143. package/vendors/opencode/commands/wtfp/check-todos.md +146 -0
  144. package/vendors/opencode/commands/wtfp/checkpoint.md +97 -0
  145. package/vendors/opencode/commands/wtfp/contribute.md +266 -0
  146. package/vendors/opencode/commands/wtfp/create-outline.md +181 -0
  147. package/vendors/opencode/commands/wtfp/create-poster.md +37 -0
  148. package/vendors/opencode/commands/wtfp/create-slides.md +36 -0
  149. package/vendors/opencode/commands/wtfp/discuss-section.md +63 -0
  150. package/vendors/opencode/commands/wtfp/execute-outline.md +248 -0
  151. package/vendors/opencode/commands/wtfp/export-latex.md +210 -0
  152. package/vendors/opencode/commands/wtfp/help.md +185 -0
  153. package/vendors/opencode/commands/wtfp/insert-section.md +124 -0
  154. package/vendors/opencode/commands/wtfp/list-assumptions.md +105 -0
  155. package/vendors/opencode/commands/wtfp/map-project.md +100 -0
  156. package/vendors/opencode/commands/wtfp/new-paper.md +161 -0
  157. package/vendors/opencode/commands/wtfp/pause-writing.md +141 -0
  158. package/vendors/opencode/commands/wtfp/plan-milestone-gaps.md +250 -0
  159. package/vendors/opencode/commands/wtfp/plan-revision.md +174 -0
  160. package/vendors/opencode/commands/wtfp/plan-section.md +214 -0
  161. package/vendors/opencode/commands/wtfp/polish-prose.md +115 -0
  162. package/vendors/opencode/commands/wtfp/progress.md +146 -0
  163. package/vendors/opencode/commands/wtfp/quick.md +97 -0
  164. package/vendors/opencode/commands/wtfp/remove-section.md +141 -0
  165. package/vendors/opencode/commands/wtfp/report-bug.md +127 -0
  166. package/vendors/opencode/commands/wtfp/request-feature.md +156 -0
  167. package/vendors/opencode/commands/wtfp/research-gap.md +215 -0
  168. package/vendors/opencode/commands/wtfp/resume-writing.md +137 -0
  169. package/vendors/opencode/commands/wtfp/review-section.md +123 -0
  170. package/vendors/opencode/commands/wtfp/settings.md +192 -0
  171. package/vendors/opencode/commands/wtfp/submit-milestone.md +352 -0
  172. package/vendors/opencode/commands/wtfp/update.md +108 -0
  173. package/vendors/opencode/commands/wtfp/verify-work.md +246 -0
  174. package/vendors/opencode/commands/wtfp/write-section.md +228 -0
  175. package/vendors/claude/agents/wtfp/citation-retriever.md +0 -31
@@ -0,0 +1,123 @@
1
+ description = "Insert a new section between existing sections"
2
+
3
+ prompt = '''
4
+ <objective>
5
+ Insert a new section between existing sections as a decimal phase.
6
+
7
+ Creates intermediate section (e.g., 3.1 between sections 3 and 4).
8
+
9
+ Useful for discovered gaps that must be addressed mid-draft.
10
+
11
+ Maintains section ordering without renumbering.
12
+ </objective>
13
+
14
+ <process>
15
+
16
+ <step name="parse">
17
+ **Parse arguments:**
18
+
19
+ Expect: `<after> <description>`
20
+ - after: Section number to insert after (e.g., 3)
21
+ - description: Brief description of new section
22
+
23
+ Example: `/wtfp:insert-section 3 "Add methodology validation subsection"`
24
+ </step>
25
+
26
+ <step name="verify">
27
+ **Verify project exists:**
28
+
29
+ ```bash
30
+ [ ! -f .planning/ROADMAP.md ] && echo "ERROR: No roadmap found. Run /wtfp:create-outline first" && exit 1
31
+ ```
32
+
33
+ Check that "after" section exists in ROADMAP.md.
34
+ </step>
35
+
36
+ <step name="determine_number">
37
+ **Determine new section number:**
38
+
39
+ Check for existing decimal sections after the target:
40
+ - If 3.1 doesn't exist → new section is 3.1
41
+ - If 3.1 exists but 3.2 doesn't → new section is 3.2
42
+ - Continue until finding available slot
43
+ </step>
44
+
45
+ <step name="confirm">
46
+ **Confirm with user:**
47
+
48
+ Use interactive prompting:
49
+ - header: "Insert Section"
50
+ - question: "Insert Section [X.Y]: [description] after Section [X]?"
51
+ - options:
52
+ - "Yes, create it" — Insert the section
53
+ - "Different position" — Let me specify another location
54
+ - "Cancel" — Don't insert
55
+
56
+ </step>
57
+
58
+ <step name="create">
59
+ **Create section:**
60
+
61
+ 1. Create directory:
62
+ ```bash
63
+ mkdir -p ".planning/sections/[XX.Y]-[section-name-slug]"
64
+ ```
65
+
66
+ 2. Update ROADMAP.md:
67
+ - Insert new section entry after section [X]
68
+ - Include goal, word target, status
69
+
70
+ 3. Update STATE.md if needed.
71
+
72
+ </step>
73
+
74
+ <step name="commit">
75
+ ```bash
76
+ git add .planning/ROADMAP.md .planning/sections/
77
+ git commit -m "$(cat <<'EOF'
78
+ docs: insert Section [X.Y] - [name]
79
+
80
+ [Description]
81
+
82
+ Inserted between Section [X] and Section [X+1]
83
+ EOF
84
+ )"
85
+ ```
86
+
87
+ </step>
88
+
89
+ <step name="done">
90
+ **Present completion:**
91
+
92
+ ```
93
+ Section inserted:
94
+
95
+ - Section [X.Y]: [Name]
96
+ - Directory: .planning/sections/[XX.Y]-[name]/
97
+ - ROADMAP.md updated
98
+
99
+ ---
100
+
101
+ ## ▶ Next Up
102
+
103
+ **Plan new section** — create writing plan
104
+
105
+ `/wtfp:plan-section [X.Y]`
106
+
107
+ <sub>`/clear` first → fresh context window</sub>
108
+
109
+ ---
110
+ ```
111
+
112
+ </step>
113
+
114
+ </process>
115
+
116
+ <success_criteria>
117
+ - [ ] New section number determined (no conflicts)
118
+ - [ ] Directory created
119
+ - [ ] ROADMAP.md updated with new section
120
+ - [ ] Ordering preserved
121
+ - [ ] Committed to git
122
+ </success_criteria>
123
+ '''
@@ -0,0 +1,104 @@
1
+ description = "Preview intended approach for a section before writing"
2
+
3
+ prompt = '''
4
+ <objective>
5
+ Show Claude's intended approach for a section before planning begins.
6
+
7
+ Lets you course-correct if Claude misunderstood your vision.
8
+
9
+ No files created - conversational output only.
10
+ </objective>
11
+
12
+ <process>
13
+
14
+ <step name="verify">
15
+ **Verify project exists:**
16
+
17
+ ```bash
18
+ [ ! -f .planning/PROJECT.md ] && echo "ERROR: No project found. Run /wtfp:new-paper first" && exit 1
19
+ [ ! -f .planning/ROADMAP.md ] && echo "ERROR: No outline found. Run /wtfp:create-outline first" && exit 1
20
+ ```
21
+
22
+ </step>
23
+
24
+ <step name="load">
25
+ **Load all relevant context:**
26
+
27
+ - Read PROJECT.md for paper vision
28
+ - Read ROADMAP.md for section goal
29
+ - Read argument-map.md for relevant claims
30
+ - Read outline.md for structure expectations
31
+ - Read narrative-arc.md for story context
32
+ - Read any prior SUMMARY.md files
33
+ - Check for CONTEXT.md or RESEARCH.md in section directory
34
+ </step>
35
+
36
+ <step name="present">
37
+ **Present assumptions in 5 areas:**
38
+
39
+ ```
40
+ # Assumptions for Section [N]: [Name]
41
+
42
+ ## 1. Content Approach
43
+ Based on the section goal and argument map, I plan to:
44
+ - [Main point 1]
45
+ - [Main point 2]
46
+ - [Main point 3]
47
+
48
+ Key claims I'll develop:
49
+ - [Claim from argument-map]
50
+ - [Claim from argument-map]
51
+
52
+ ## 2. Structure
53
+ I'm planning to organize this section as:
54
+ 1. [Opening approach]
55
+ 2. [Body structure]
56
+ 3. [Closing approach]
57
+
58
+ Word allocation:
59
+ - [Part 1]: ~[X] words
60
+ - [Part 2]: ~[Y] words
61
+ - [Part 3]: ~[Z] words
62
+
63
+ ## 3. Writing Mode
64
+ Based on the section type, I recommend:
65
+ - Mode: [Co-Author/Scaffold/Reviewer]
66
+ - Reason: [Why this mode fits]
67
+
68
+ ## 4. Dependencies
69
+ This section relies on:
70
+ - Prior sections: [What must be established first]
71
+ - Citations needed: [Key references]
72
+ - Evidence: [Data/figures to reference]
73
+
74
+ This section sets up:
75
+ - Following sections: [What this enables]
76
+
77
+ ## 5. Potential Challenges
78
+ I anticipate:
79
+ - [Challenge 1]: [How I'd address it]
80
+ - [Challenge 2]: [How I'd address it]
81
+
82
+ ## Questions for You
83
+ - [Any clarifications needed]
84
+ - [Decisions that need your input]
85
+
86
+ ---
87
+
88
+ **Does this match your vision?**
89
+ - If yes: Run `/wtfp:plan-section [section]`
90
+ - If concerns: Tell me what to adjust
91
+ - If major changes: Run `/wtfp:discuss-section [section]`
92
+ ```
93
+
94
+ </step>
95
+
96
+ </process>
97
+
98
+ <success_criteria>
99
+ - [ ] All 5 assumption areas covered
100
+ - [ ] Based on actual project context
101
+ - [ ] Clear path to course-correct
102
+ - [ ] No files created (conversational only)
103
+ </success_criteria>
104
+ '''
@@ -0,0 +1,99 @@
1
+ description = "Index existing drafts, data, and references for a project"
2
+
3
+ prompt = '''
4
+ <execution_context>
5
+ @~/.config/gemini/write-the-f-paper/workflows/map-project.md
6
+ </execution_context>
7
+
8
+ <objective>
9
+ Index existing source materials (literature, data, prior drafts) for a writing project.
10
+
11
+ **Orchestrator role:** Detect existing materials, resolve model profile, create `.planning/sources/` with organized references, commit.
12
+
13
+ Use before `/wtfp:new-paper` on existing writing projects.
14
+ </objective>
15
+
16
+ <context>
17
+ No arguments. Scans current directory for existing materials.
18
+ </context>
19
+
20
+ <process>
21
+
22
+ ## 1. Validate Environment and Resolve Model Profile
23
+
24
+ ```bash
25
+ MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
26
+ ```
27
+
28
+ ## 2. Detect Existing Materials
29
+
30
+ ```bash
31
+ find . -name "*.bib" -o -name "references.md" -o -name "bibliography.md" 2>/dev/null | head -20
32
+ find . -name "*.tex" -o -name "*.md" -o -name "*.docx" 2>/dev/null | grep -v node_modules | grep -v .planning | head -20
33
+ find . -name "*.csv" -o -name "*.json" -o -name "*.xlsx" 2>/dev/null | head -20
34
+ find . -name "*.png" -o -name "*.pdf" -o -name "*.svg" -o -name "*.jpg" 2>/dev/null | head -20
35
+ ```
36
+
37
+ ## 3. Create Sources Directory
38
+
39
+ ```bash
40
+ mkdir -p .planning/sources
41
+ ```
42
+
43
+ ## 4. Index Literature
44
+
45
+ If .bib files found, parse via `node ~/.config/gemini/bin/bib-index.js index [file]`.
46
+
47
+ Write `.planning/sources/literature.md`: Core References table (key, citation, relevance, status), Background Reading, To Find list, source paths.
48
+
49
+ ## 5. Index Data and Evidence
50
+
51
+ Scan for figures, tables, data files.
52
+
53
+ Write `.planning/sources/data.md`: Figures table (ID, file, description, status, target section), Tables, Data Files, Statistics.
54
+
55
+ ## 6. Index Prior Drafts
56
+
57
+ Scan for existing writing.
58
+
59
+ Write `.planning/sources/prior-drafts.md`: Existing Documents table (file, type, description, usable, target section), Key Passages, Material to Avoid.
60
+
61
+ ## 7. Commit
62
+
63
+ ```bash
64
+ git add .planning/sources/
65
+ git commit -m "docs: index source materials"
66
+ ```
67
+
68
+ </process>
69
+
70
+ <offer_next>
71
+
72
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
73
+ WTF-P ► SOURCES INDEXED ✓
74
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
75
+
76
+ - Literature: .planning/sources/literature.md ([N] references)
77
+ - Data: .planning/sources/data.md ([N] figures, [N] tables)
78
+ - Prior Drafts: .planning/sources/prior-drafts.md ([N] documents)
79
+
80
+ ───────────────────────────────────────────
81
+
82
+ ## ▶ Next Up
83
+
84
+ **Initialize paper** — capture vision and structure
85
+
86
+ `/wtfp:new-paper`
87
+
88
+ ───────────────────────────────────────────
89
+
90
+ </offer_next>
91
+
92
+ <success_criteria>
93
+ - [ ] All existing materials discovered
94
+ - [ ] literature.md indexes all citations
95
+ - [ ] data.md inventories figures and evidence
96
+ - [ ] prior-drafts.md catalogs existing writing
97
+ - [ ] All committed to git
98
+ </success_criteria>
99
+ '''
@@ -0,0 +1,160 @@
1
+ description = "Start a new paper with guided interview and setup"
2
+
3
+ prompt = '''
4
+ <execution_context>
5
+ @~/.config/gemini/write-the-f-paper/references/principles.md
6
+ @~/.config/gemini/write-the-f-paper/references/questioning.md
7
+ @~/.config/gemini/write-the-f-paper/templates/project.md
8
+ @~/.config/gemini/write-the-f-paper/templates/config.json
9
+ @~/.config/gemini/write-the-f-paper/venues/
10
+ </execution_context>
11
+
12
+ <objective>
13
+ Initialize a new academic paper through comprehensive context gathering.
14
+
15
+ **Orchestrator role:** Check preconditions, detect brownfield projects, gather paper vision through batched questioning, synthesize PROJECT.md + config.json + structure documents, commit.
16
+
17
+ Creates `.planning/` with PROJECT.md, config.json, and structure documents.
18
+ </objective>
19
+
20
+ <context>
21
+ No arguments. Runs in current directory.
22
+ </context>
23
+
24
+ <process>
25
+
26
+ ## 1. Validate Environment
27
+
28
+ ```bash
29
+ [ -f .planning/PROJECT.md ] && echo "ERROR: Paper already initialized. Use /wtfp:progress" && exit 1
30
+ ```
31
+
32
+ Initialize git if needed:
33
+ ```bash
34
+ [ -d .git ] || [ -f .git ] || git init
35
+ ```
36
+
37
+ ## 2. Brownfield Detection
38
+
39
+ ```bash
40
+ WRITING_FILES=$(find . -name "*.tex" -o -name "*.md" -o -name "*.bib" -o -name "*.docx" 2>/dev/null | grep -v node_modules | grep -v .git | grep -v .planning | head -20)
41
+ HAS_SOURCES=$([ -d sources ] || [ -d references ] || [ -d literature ] && echo "yes")
42
+ HAS_SOURCE_MAP=$([ -d .planning/sources ] && echo "yes")
43
+ ```
44
+
45
+ **If materials detected and no source map:** Offer `/wtfp:map-project` first via interactive prompting.
46
+
47
+ ## 3. Gather Core Context (Batched)
48
+
49
+ Use interactive prompting — collect foundations in one turn:
50
+ - header: "Paper Foundations"
51
+ - question: "1. **Type** (Research paper, Grant, Thesis)\n2. **Venue** (NeurIPS, CHI, Nature, etc.)\n3. **Core Argument** (one thing you're proving)\n4. **Audience** (who is this for?)"
52
+ - options: "I provided the details" | "Guide me step-by-step"
53
+
54
+ If step-by-step selected, ask Type → Venue → Argument sequentially.
55
+
56
+ ## 4. Venue Template Selection
57
+
58
+ If ambiguous, ask via interactive prompting:
59
+ - header: "Venue Structure"
60
+ - options: "ACM CS" | "IEEE CS" | "ML/AI" | "Nature/Science" | "Thesis"
61
+
62
+ Load corresponding YAML from `~/.config/gemini/write-the-f-paper/venues/`.
63
+
64
+ ## 5. Sharpen Core Argument
65
+
66
+ If core_argument was weak, drill down:
67
+ - header: "Refine Core"
68
+ - question: "If reviewers remember ONE thing, what is it?"
69
+ - options: "The Method" | "The Findings" | "The Theory" | "The System"
70
+
71
+ ## 6. Gather Constraints
72
+
73
+ - header: "Scope & Limits"
74
+ - question: "1. **Out of Scope?** 2. **Hard Constraints?** (page limits, deadlines)"
75
+ - options: "Provided details" | "No constraints"
76
+
77
+ ## 7. Synthesize PROJECT.md
78
+
79
+ Write `.planning/PROJECT.md` using template from `~/.config/gemini/write-the-f-paper/templates/project.md`.
80
+
81
+ Populate: What This Is, Core Argument, Requirements (Must/Should/Out of Scope), Target Audience, Constraints, Key Decisions.
82
+
83
+ ## 8. Create Structure Documents
84
+
85
+ Create `.planning/structure/` with:
86
+ - **argument-map.md** — Central thesis, supporting claims, logical flow, gaps
87
+ - **outline.md** — Venue template sections, word budget table
88
+ - **narrative-arc.md** — Problem/Journey/Resolution, reader experience
89
+
90
+ ## 9. Workflow Mode & Config
91
+
92
+ Ask mode (Interactive / Flow) and depth (Quick / Standard / Comprehensive) via interactive prompting.
93
+
94
+ ## 9b. Git & Planning Settings
95
+
96
+ Ask about git tracking via interactive prompting:
97
+ - header: "Git & Planning"
98
+ - question: "Track planning documents in git?"
99
+ - options:
100
+ - "Yes (default)" -- commit_docs: true, planning artifacts are version-controlled
101
+ - "No" -- commit_docs: false, only paper content is committed
102
+
103
+ Use the answer to set `planning.commit_docs` in config.json.
104
+
105
+ Ask about branching strategy via interactive prompting:
106
+ - header: "Git Branching"
107
+ - question: "Branch strategy for git history?"
108
+ - options:
109
+ - "None (default)" -- all commits on current branch, git.branching_strategy: "none"
110
+ - "Section branches" -- one branch per section, merged on review pass, git.branching_strategy: "section"
111
+ - "Submission branches" -- branch per milestone/submission target, git.branching_strategy: "submission"
112
+
113
+ Use the answer to set `git.branching_strategy` in config.json.
114
+
115
+ ## 9c. Write Config
116
+
117
+ Write `.planning/config.json` with the full v0.5.0 schema: mode, depth, document_type, output_format, model_profile ("balanced"), venue_template, gates (8 gate types: confirm_outline, confirm_plan, confirm_write, confirm_review, execute_next_section, issues_review, confirm_transition, confirm_submission), writing, workflow, verification, planning (commit_docs, search_gitignored), parallelization, safety (always_confirm_destructive, always_confirm_external_services, backup_before_major_edits), git (branching_strategy, section_branch_template, submission_branch_template, squash_on_merge).
118
+
119
+ ## 10. Commit
120
+
121
+ ```bash
122
+ git add .planning/PROJECT.md .planning/config.json .planning/structure/
123
+ git commit -m "docs: initialize [paper-title]"
124
+ ```
125
+
126
+ </process>
127
+
128
+ <offer_next>
129
+
130
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
131
+ WTF-P ► PAPER INITIALIZED ✓
132
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
133
+
134
+ - Project: .planning/PROJECT.md
135
+ - Config: .planning/config.json (mode: [chosen])
136
+ - Structure: .planning/structure/
137
+
138
+ ───────────────────────────────────────────
139
+
140
+ ## ▶ Next Up
141
+
142
+ **Create section outline**
143
+
144
+ `/wtfp:create-outline`
145
+
146
+ <sub>`/clear` first → fresh context window</sub>
147
+
148
+ ───────────────────────────────────────────
149
+
150
+ </offer_next>
151
+
152
+ <success_criteria>
153
+ - [ ] Deep questioning completed (not rushed)
154
+ - [ ] PROJECT.md captures paper vision with core argument
155
+ - [ ] Structure documents created (argument-map, outline, narrative-arc)
156
+ - [ ] config.json has gates, safety, planning, and git sections
157
+ - [ ] config.json has workflow mode and model_profile
158
+ - [ ] All committed to git
159
+ </success_criteria>
160
+ '''
@@ -0,0 +1,140 @@
1
+ description = "Save current progress so you can resume later"
2
+
3
+ prompt = '''
4
+ <objective>
5
+ Create context handoff file when pausing work mid-section.
6
+
7
+ Captures current state so next session can resume seamlessly.
8
+
9
+ Creates .continue-here.md with current state and updates STATE.md.
10
+ </objective>
11
+
12
+ <process>
13
+
14
+ <step name="verify">
15
+ **Verify project exists:**
16
+
17
+ ```bash
18
+ [ ! -f .planning/STATE.md ] && echo "ERROR: No project state found" && exit 1
19
+ ```
20
+
21
+ </step>
22
+
23
+ <step name="gather">
24
+ **Gather current state:**
25
+
26
+ - Read STATE.md for current position
27
+ - Find any in-progress PLAN.md files
28
+ - Check for uncommitted changes
29
+ - Identify what was being worked on
30
+ </step>
31
+
32
+ <step name="handoff">
33
+ **Create .continue-here.md:**
34
+
35
+ In the current section directory:
36
+
37
+ ```markdown
38
+ ---
39
+ section: XX-name
40
+ task: [current task number]
41
+ total_tasks: [total]
42
+ status: [in_progress/blocked/almost_done]
43
+ last_updated: [ISO timestamp]
44
+ ---
45
+
46
+ # Continue Here: [Section Name]
47
+
48
+ ## Current State
49
+ [What's currently happening - in progress, waiting for input, etc.]
50
+
51
+ ## Completed Work
52
+ - [Task 1]: [done]
53
+ - [Task 2]: [done]
54
+ - [Task 3]: [in progress - description of where stopped]
55
+
56
+ ## Remaining Work
57
+ - [Task 4]: [not started]
58
+ - [Task 5]: [not started]
59
+
60
+ ## Decisions Made
61
+ | Decision | Rationale |
62
+ |----------|-----------|
63
+ | [choice] | [why] |
64
+
65
+ ## Blockers (if any)
66
+ - [What's blocking progress]
67
+
68
+ ## Context Notes
69
+ [Any important context for resuming:
70
+ - Why work was paused
71
+ - What was being figured out
72
+ - Any insights not yet captured elsewhere]
73
+
74
+ ## Next Action
75
+ [Exactly what to do when resuming]
76
+
77
+ ---
78
+ *Paused: [timestamp]*
79
+ ```
80
+
81
+ </step>
82
+
83
+ <step name="update_state">
84
+ **Update STATE.md:**
85
+
86
+ Add to Session Continuity section:
87
+ ```markdown
88
+ ## Session Continuity
89
+ - Last session: [timestamp]
90
+ - Handoff: .planning/sections/XX-name/.continue-here.md
91
+ - Status: [in_progress/blocked]
92
+ ```
93
+
94
+ </step>
95
+
96
+ <step name="commit">
97
+ ```bash
98
+ git add .planning/sections/XX-name/.continue-here.md .planning/STATE.md
99
+ git commit -m "$(cat <<'EOF'
100
+ wip: pause [section name]
101
+
102
+ Task [X] of [Y] in progress
103
+ EOF
104
+ )"
105
+ ```
106
+
107
+ </step>
108
+
109
+ <step name="done">
110
+ **Present completion:**
111
+
112
+ ```
113
+ Work paused:
114
+
115
+ - Handoff: .planning/sections/XX-name/.continue-here.md
116
+ - State: .planning/STATE.md updated
117
+ - Position: Task [X] of [Y]
118
+
119
+ ## To Resume
120
+
121
+ `/wtfp:resume-writing`
122
+
123
+ This will restore full context and continue from task [X].
124
+
125
+ ---
126
+ ```
127
+
128
+ </step>
129
+
130
+ </process>
131
+
132
+ <success_criteria>
133
+ - [ ] .continue-here.md captures current state
134
+ - [ ] Completed work documented
135
+ - [ ] Remaining work listed
136
+ - [ ] Next action is clear and actionable
137
+ - [ ] STATE.md updated with handoff reference
138
+ - [ ] All committed to git
139
+ </success_criteria>
140
+ '''