wtf-p 0.3.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 (183) hide show
  1. package/README.md +146 -208
  2. package/bin/commands/doctor.js +88 -2
  3. package/bin/commands/install-logic.js +127 -36
  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/analyze-impact.js +105 -0
  8. package/bin/lib/bib-format.js +161 -0
  9. package/bin/lib/bib-index.js +104 -0
  10. package/bin/lib/checkpoint.js +183 -0
  11. package/bin/lib/citation-fetcher.js +299 -0
  12. package/bin/lib/citation-ranker.js +133 -0
  13. package/bin/lib/context-primer.js +214 -0
  14. package/bin/lib/manifest.js +80 -2
  15. package/bin/lib/scholar-lookup.js +188 -0
  16. package/bin/lib/semantic-scholar.js +184 -0
  17. package/bin/lib/utils.js +22 -1
  18. package/bin/uninstall.js +270 -111
  19. package/core/write-the-f-paper/references/agent-model-matrix.md +62 -0
  20. package/core/write-the-f-paper/references/checkpoints.md +160 -9
  21. package/core/write-the-f-paper/references/context-fidelity.md +153 -0
  22. package/core/write-the-f-paper/references/deviation-rules.md +150 -0
  23. package/core/write-the-f-paper/references/git-integration.md +80 -0
  24. package/core/write-the-f-paper/references/orchestrator-pattern.md +167 -0
  25. package/core/write-the-f-paper/references/planning-config.md +135 -0
  26. package/core/write-the-f-paper/references/ui-brand.md +186 -0
  27. package/core/write-the-f-paper/templates/UAT.md +80 -0
  28. package/core/write-the-f-paper/templates/base-prefs.yaml +42 -0
  29. package/core/write-the-f-paper/templates/config.json +31 -5
  30. package/core/write-the-f-paper/workflows/create-outline.wcn.md +1 -1
  31. package/core/write-the-f-paper/workflows/execute-outline.md +163 -0
  32. package/core/write-the-f-paper/workflows/execute-outline.wcn.md +73 -0
  33. package/core/write-the-f-paper/workflows/execute-section.wcn.md +141 -169
  34. package/core/write-the-f-paper/workflows/plan-section.wcn.md +96 -103
  35. package/core/write-the-f-paper/workflows/research-gap.md +27 -3
  36. package/core/write-the-f-paper/workflows/research-gap.wcn.md +18 -1
  37. package/core/write-the-f-paper/workflows/verify-work.md +251 -0
  38. package/core/write-the-f-paper/workflows/verify-work.wcn.md +74 -0
  39. package/package.json +19 -7
  40. package/vendors/claude/.claude-plugin/plugin.json +2 -2
  41. package/vendors/claude/agents/wtfp/argument-verifier.md +189 -0
  42. package/vendors/claude/agents/wtfp/citation-expert.md +45 -0
  43. package/vendors/claude/agents/wtfp/citation-formatter.md +42 -0
  44. package/vendors/claude/agents/wtfp/coherence-checker.md +167 -0
  45. package/vendors/claude/agents/wtfp/outliner.md +259 -0
  46. package/vendors/claude/agents/wtfp/plan-checker.md +249 -0
  47. package/vendors/claude/agents/wtfp/prose-polisher.md +166 -0
  48. package/vendors/claude/agents/wtfp/research-synthesizer.md +215 -0
  49. package/vendors/claude/agents/wtfp/section-planner.md +364 -0
  50. package/vendors/claude/agents/wtfp/section-reviewer.md +182 -0
  51. package/vendors/claude/agents/wtfp/section-writer.md +312 -0
  52. package/vendors/claude/commands/wtfp/add-todo.md +108 -0
  53. package/vendors/claude/commands/wtfp/analyze-bib.md +60 -249
  54. package/vendors/claude/commands/wtfp/audit-milestone.md +286 -0
  55. package/vendors/claude/commands/wtfp/check-refs.md +60 -131
  56. package/vendors/claude/commands/wtfp/check-todos.md +152 -0
  57. package/vendors/claude/commands/wtfp/checkpoint.md +105 -0
  58. package/vendors/claude/commands/wtfp/contribute.md +1 -1
  59. package/vendors/claude/commands/wtfp/create-outline.md +109 -195
  60. package/vendors/claude/commands/wtfp/create-poster.md +1 -1
  61. package/vendors/claude/commands/wtfp/create-slides.md +1 -1
  62. package/vendors/claude/commands/wtfp/discuss-section.md +1 -1
  63. package/vendors/claude/commands/wtfp/execute-outline.md +257 -0
  64. package/vendors/claude/commands/wtfp/export-latex.md +1 -1
  65. package/vendors/claude/commands/wtfp/help.md +174 -280
  66. package/vendors/claude/commands/wtfp/insert-section.md +1 -1
  67. package/vendors/claude/commands/wtfp/list-assumptions.md +1 -1
  68. package/vendors/claude/commands/wtfp/map-project.md +35 -124
  69. package/vendors/claude/commands/wtfp/new-paper.md +88 -362
  70. package/vendors/claude/commands/wtfp/pause-writing.md +1 -1
  71. package/vendors/claude/commands/wtfp/plan-milestone-gaps.md +255 -0
  72. package/vendors/claude/commands/wtfp/plan-revision.md +1 -1
  73. package/vendors/claude/commands/wtfp/plan-section.md +165 -190
  74. package/vendors/claude/commands/wtfp/polish-prose.md +66 -118
  75. package/vendors/claude/commands/wtfp/progress.md +82 -254
  76. package/vendors/claude/commands/wtfp/quick.md +107 -0
  77. package/vendors/claude/commands/wtfp/remove-section.md +1 -1
  78. package/vendors/claude/commands/wtfp/report-bug.md +1 -1
  79. package/vendors/claude/commands/wtfp/request-feature.md +1 -1
  80. package/vendors/claude/commands/wtfp/research-gap.md +138 -151
  81. package/vendors/claude/commands/wtfp/resume-writing.md +1 -1
  82. package/vendors/claude/commands/wtfp/review-section.md +55 -333
  83. package/vendors/claude/commands/wtfp/settings.md +197 -0
  84. package/vendors/claude/commands/wtfp/submit-milestone.md +248 -99
  85. package/vendors/claude/commands/wtfp/update.md +112 -0
  86. package/vendors/claude/commands/wtfp/verify-work.md +254 -0
  87. package/vendors/claude/commands/wtfp/write-section.md +144 -180
  88. package/vendors/claude/mcp/research-server/package.json +13 -0
  89. package/vendors/claude/mcp/research-server/src/index.js +133 -0
  90. package/vendors/gemini/agents/wtfp/argument-verifier.md +184 -0
  91. package/vendors/gemini/agents/wtfp/citation-expert.md +41 -0
  92. package/vendors/gemini/agents/wtfp/citation-formatter.md +38 -0
  93. package/vendors/gemini/agents/wtfp/coherence-checker.md +162 -0
  94. package/vendors/gemini/agents/wtfp/outliner.md +252 -0
  95. package/vendors/gemini/agents/wtfp/plan-checker.md +244 -0
  96. package/vendors/gemini/agents/wtfp/prose-polisher.md +158 -0
  97. package/vendors/gemini/agents/wtfp/research-synthesizer.md +205 -0
  98. package/vendors/gemini/agents/wtfp/section-planner.md +355 -0
  99. package/vendors/gemini/agents/wtfp/section-reviewer.md +175 -0
  100. package/vendors/gemini/agents/wtfp/section-writer.md +304 -0
  101. package/vendors/gemini/commands/wtfp/add-todo.toml +102 -0
  102. package/vendors/gemini/commands/wtfp/analyze-bib.toml +126 -0
  103. package/vendors/gemini/commands/wtfp/audit-milestone.toml +278 -0
  104. package/vendors/gemini/commands/wtfp/check-refs.toml +123 -0
  105. package/vendors/gemini/commands/wtfp/check-todos.toml +145 -0
  106. package/vendors/gemini/commands/wtfp/checkpoint.toml +96 -0
  107. package/vendors/gemini/commands/wtfp/contribute.toml +269 -0
  108. package/vendors/gemini/commands/wtfp/create-outline.toml +180 -0
  109. package/vendors/gemini/commands/wtfp/create-poster.toml +36 -0
  110. package/vendors/gemini/commands/wtfp/create-slides.toml +35 -0
  111. package/vendors/gemini/commands/wtfp/discuss-section.toml +62 -0
  112. package/vendors/gemini/commands/wtfp/execute-outline.toml +247 -0
  113. package/vendors/gemini/commands/wtfp/export-latex.toml +209 -0
  114. package/vendors/gemini/commands/wtfp/help.toml +184 -0
  115. package/vendors/gemini/commands/wtfp/insert-section.toml +123 -0
  116. package/vendors/gemini/commands/wtfp/list-assumptions.toml +104 -0
  117. package/vendors/gemini/commands/wtfp/map-project.toml +99 -0
  118. package/vendors/gemini/commands/wtfp/new-paper.toml +160 -0
  119. package/vendors/gemini/commands/wtfp/pause-writing.toml +140 -0
  120. package/vendors/gemini/commands/wtfp/plan-milestone-gaps.toml +249 -0
  121. package/vendors/gemini/commands/wtfp/plan-revision.toml +171 -0
  122. package/vendors/gemini/commands/wtfp/plan-section.toml +212 -0
  123. package/vendors/gemini/commands/wtfp/polish-prose.toml +114 -0
  124. package/vendors/gemini/commands/wtfp/progress.toml +145 -0
  125. package/vendors/gemini/commands/wtfp/quick.toml +96 -0
  126. package/vendors/gemini/commands/wtfp/remove-section.toml +140 -0
  127. package/vendors/gemini/commands/wtfp/report-bug.toml +126 -0
  128. package/vendors/gemini/commands/wtfp/request-feature.toml +155 -0
  129. package/vendors/gemini/commands/wtfp/research-gap.toml +214 -0
  130. package/vendors/gemini/commands/wtfp/resume-writing.toml +136 -0
  131. package/vendors/gemini/commands/wtfp/review-section.toml +121 -0
  132. package/vendors/gemini/commands/wtfp/settings.toml +191 -0
  133. package/vendors/gemini/commands/wtfp/submit-milestone.toml +351 -0
  134. package/vendors/gemini/commands/wtfp/update.toml +107 -0
  135. package/vendors/gemini/commands/wtfp/verify-work.toml +245 -0
  136. package/vendors/gemini/commands/wtfp/write-section.toml +228 -0
  137. package/vendors/opencode/agents/wtfp/argument-verifier.md +184 -0
  138. package/vendors/opencode/agents/wtfp/citation-expert.md +41 -0
  139. package/vendors/opencode/agents/wtfp/citation-formatter.md +38 -0
  140. package/vendors/opencode/agents/wtfp/coherence-checker.md +162 -0
  141. package/vendors/opencode/agents/wtfp/outliner.md +252 -0
  142. package/vendors/opencode/agents/wtfp/plan-checker.md +244 -0
  143. package/vendors/opencode/agents/wtfp/prose-polisher.md +158 -0
  144. package/vendors/opencode/agents/wtfp/research-synthesizer.md +205 -0
  145. package/vendors/opencode/agents/wtfp/section-planner.md +355 -0
  146. package/vendors/opencode/agents/wtfp/section-reviewer.md +175 -0
  147. package/vendors/opencode/agents/wtfp/section-writer.md +304 -0
  148. package/vendors/opencode/commands/wtfp/add-todo.md +103 -0
  149. package/vendors/opencode/commands/wtfp/analyze-bib.md +127 -0
  150. package/vendors/opencode/commands/wtfp/audit-milestone.md +279 -0
  151. package/vendors/opencode/commands/wtfp/check-refs.md +124 -0
  152. package/vendors/opencode/commands/wtfp/check-todos.md +146 -0
  153. package/vendors/opencode/commands/wtfp/checkpoint.md +97 -0
  154. package/vendors/opencode/commands/wtfp/contribute.md +266 -0
  155. package/vendors/opencode/commands/wtfp/create-outline.md +181 -0
  156. package/vendors/opencode/commands/wtfp/create-poster.md +37 -0
  157. package/vendors/opencode/commands/wtfp/create-slides.md +36 -0
  158. package/vendors/opencode/commands/wtfp/discuss-section.md +63 -0
  159. package/vendors/opencode/commands/wtfp/execute-outline.md +248 -0
  160. package/vendors/opencode/commands/wtfp/export-latex.md +210 -0
  161. package/vendors/opencode/commands/wtfp/help.md +185 -0
  162. package/vendors/opencode/commands/wtfp/insert-section.md +124 -0
  163. package/vendors/opencode/commands/wtfp/list-assumptions.md +105 -0
  164. package/vendors/opencode/commands/wtfp/map-project.md +100 -0
  165. package/vendors/opencode/commands/wtfp/new-paper.md +161 -0
  166. package/vendors/opencode/commands/wtfp/pause-writing.md +141 -0
  167. package/vendors/opencode/commands/wtfp/plan-milestone-gaps.md +250 -0
  168. package/vendors/opencode/commands/wtfp/plan-revision.md +174 -0
  169. package/vendors/opencode/commands/wtfp/plan-section.md +214 -0
  170. package/vendors/opencode/commands/wtfp/polish-prose.md +115 -0
  171. package/vendors/opencode/commands/wtfp/progress.md +146 -0
  172. package/vendors/opencode/commands/wtfp/quick.md +97 -0
  173. package/vendors/opencode/commands/wtfp/remove-section.md +141 -0
  174. package/vendors/opencode/commands/wtfp/report-bug.md +127 -0
  175. package/vendors/opencode/commands/wtfp/request-feature.md +156 -0
  176. package/vendors/opencode/commands/wtfp/research-gap.md +215 -0
  177. package/vendors/opencode/commands/wtfp/resume-writing.md +137 -0
  178. package/vendors/opencode/commands/wtfp/review-section.md +123 -0
  179. package/vendors/opencode/commands/wtfp/settings.md +192 -0
  180. package/vendors/opencode/commands/wtfp/submit-milestone.md +352 -0
  181. package/vendors/opencode/commands/wtfp/update.md +108 -0
  182. package/vendors/opencode/commands/wtfp/verify-work.md +246 -0
  183. package/vendors/opencode/commands/wtfp/write-section.md +228 -0
@@ -0,0 +1,269 @@
1
+ description = "Walk through contributing code to WTF-P via pull request"
2
+
3
+ prompt = '''
4
+ <objective>
5
+ Guide the user through the complete process of contributing code to WTF-P, from fork to Pull Request.
6
+ </objective>
7
+
8
+ <context>
9
+ @~/.config/gemini/write-the-f-paper/references/github-contrib.md
10
+ @~/.config/gemini/CONTRIBUTING.md
11
+ </context>
12
+
13
+ <process>
14
+
15
+ ## Step 1: Verify Prerequisites
16
+
17
+ Check tools are available:
18
+ ```bash
19
+ gh auth status 2>&1
20
+ git --version
21
+ node --version
22
+ ```
23
+
24
+ If `gh` not authenticated:
25
+ > Run `gh auth login` to authenticate with GitHub.
26
+
27
+ ## Step 2: Understand Contribution Type
28
+
29
+ Use interactive prompting:
30
+
31
+ **Question 1: What are you contributing?**
32
+ - Header: "Type"
33
+ - Options:
34
+ - "New command" - Add a /wtfp:* slash command
35
+ - "Bug fix" - Fix an existing issue
36
+ - "Workflow improvement" - Enhance a writing workflow
37
+ - "Documentation" - Improve docs or add examples
38
+ - "Other" - Something else
39
+
40
+ **Question 2: Do you have an existing issue?**
41
+ - Header: "Issue"
42
+ - Options:
43
+ - "Yes, issue #___" - Link to existing issue
44
+ - "No, creating fresh" - New contribution without issue
45
+ - "I'll create one first" - Redirect to /wtfp:request-feature
46
+
47
+ ## Step 3: Setup Repository
48
+
49
+ Check current state:
50
+ ```bash
51
+ git remote -v
52
+ ```
53
+
54
+ **If in wtf-p repo (maintainer):**
55
+ ```bash
56
+ git checkout main
57
+ git pull origin main
58
+ git checkout -b [BRANCH_TYPE]/[SHORT_NAME]
59
+ ```
60
+
61
+ **If not in wtf-p repo (external contributor):**
62
+ ```bash
63
+ # Fork and clone
64
+ gh repo fork akougkas/wtf-p --clone
65
+ cd wtf-p
66
+
67
+ # Create branch
68
+ git checkout -b [BRANCH_TYPE]/[SHORT_NAME]
69
+ ```
70
+
71
+ Branch naming:
72
+ - `feat/add-citation-check` for features
73
+ - `fix/install-path-spaces` for bugs
74
+ - `docs/improve-readme` for documentation
75
+
76
+ ## Step 4: Guide Implementation
77
+
78
+ Based on contribution type:
79
+
80
+ ### For New Command
81
+
82
+ 1. Show command template:
83
+ ```markdown
84
+ ---
85
+ name: wtfp:command-name
86
+ description: Brief description
87
+ allowed-tools:
88
+ - Read
89
+ - Write
90
+ - interactive prompting
91
+ ---
92
+
93
+ <objective>
94
+ What this command accomplishes.
95
+ </objective>
96
+
97
+ <context>
98
+ @~/.config/gemini/write-the-f-paper/references/[relevant].md
99
+ </context>
100
+
101
+ <process>
102
+ ## Step 1: ...
103
+ ## Step 2: ...
104
+ </process>
105
+ ```
106
+
107
+ 2. Create file in `commands/wtfp/[name].md`
108
+
109
+ 3. Follow naming conventions:
110
+ - `new-*` for creation
111
+ - `create-*` for generation
112
+ - `plan-*` for planning
113
+ - `write-*` for execution
114
+ - `review-*` for review
115
+ - `check-*` for validation
116
+ - `export-*` for output
117
+
118
+ ### For Bug Fix
119
+
120
+ 1. Identify the file(s) to modify
121
+ 2. Make minimal, focused changes
122
+ 3. Add test coverage if applicable
123
+
124
+ ### For Workflow Improvement
125
+
126
+ 1. Edit file in `write-the-f-paper/workflows/`
127
+ 2. If WCN version exists, update both `.md` and `.wcn.md`
128
+
129
+ ## Step 5: Test Changes
130
+
131
+ ```bash
132
+ # Run existing tests
133
+ npm test
134
+
135
+ # Install locally for manual testing
136
+ node bin/install.js --local --force
137
+
138
+ # Test in Claude Code
139
+ # /wtfp:your-new-command
140
+ ```
141
+
142
+ Ask user to verify:
143
+ - Does the feature work as expected?
144
+ - Any edge cases to handle?
145
+ - Error messages clear?
146
+
147
+ ## Step 6: Commit Changes
148
+
149
+ Stage files:
150
+ ```bash
151
+ git add [FILES]
152
+ git status
153
+ ```
154
+
155
+ Commit with conventional message:
156
+ ```bash
157
+ git commit -m "[TYPE]([SCOPE]): [DESCRIPTION]
158
+
159
+ [Optional body explaining why]
160
+
161
+ [Closes #XX if applicable]"
162
+ ```
163
+
164
+ Examples:
165
+ - `feat(commands): add citation-check command`
166
+ - `fix(cli): handle paths with spaces`
167
+ - `docs(readme): clarify installation steps`
168
+
169
+ ## Step 7: Push and Create PR
170
+
171
+ Push branch:
172
+ ```bash
173
+ git push -u origin [BRANCH_NAME]
174
+ ```
175
+
176
+ Create PR:
177
+ ```bash
178
+ gh pr create \
179
+ --repo akougkas/wtf-p \
180
+ --title "[TYPE]([SCOPE]): [DESCRIPTION]" \
181
+ --body "$(cat <<'EOF'
182
+ ## Summary
183
+ [What this PR does]
184
+
185
+ ## Changes
186
+ - [Change 1]
187
+ - [Change 2]
188
+
189
+ ## Testing
190
+ - [ ] `npm test` passes
191
+ - [ ] Manually tested in Claude Code
192
+ - [ ] [Specific test scenario]
193
+
194
+ ## Related Issues
195
+ [Closes #XX or References #XX]
196
+ EOF
197
+ )"
198
+ ```
199
+
200
+ ## Step 8: Post-PR Guidance
201
+
202
+ After PR is created:
203
+
204
+ 1. **Show PR URL** to user
205
+ 2. **Explain review process:**
206
+ - Maintainer will review within a few days
207
+ - May request changes or ask questions
208
+ - Once approved, will be merged to main
209
+
210
+ 3. **Next steps:**
211
+ - Watch for review comments
212
+ - Respond to feedback
213
+ - Update PR if changes requested
214
+
215
+ </process>
216
+
217
+ <templates>
218
+
219
+ ## PR Title Format
220
+ ```
221
+ <type>(<scope>): <description>
222
+ ```
223
+
224
+ Types: feat, fix, docs, refactor, test, chore
225
+ Scopes: commands, workflows, cli, templates
226
+
227
+ ## PR Body Template
228
+ ```markdown
229
+ ## Summary
230
+ Brief description of what this PR accomplishes.
231
+
232
+ ## Changes
233
+ - Added/Modified/Removed X
234
+ - Updated Y to do Z
235
+
236
+ ## Testing
237
+ How to verify this works:
238
+ 1. Install locally: `node bin/install.js --local`
239
+ 2. Run: `/wtfp:command`
240
+ 3. Expected: [outcome]
241
+
242
+ ## Screenshots (if UI changes)
243
+ [Paste screenshots here]
244
+
245
+ ## Related Issues
246
+ Closes #XX
247
+ ```
248
+
249
+ </templates>
250
+
251
+ <error-handling>
252
+
253
+ **Fork already exists:** Use existing fork
254
+ ```bash
255
+ gh repo sync [USERNAME]/wtf-p
256
+ ```
257
+
258
+ **Branch already exists:**
259
+ ```bash
260
+ git checkout [BRANCH]
261
+ git pull origin main
262
+ ```
263
+
264
+ **Push rejected:** Need to pull first or force push (with caution)
265
+
266
+ **PR creation fails:** Check if branch was pushed, verify gh auth
267
+
268
+ </error-handling>
269
+ '''
@@ -0,0 +1,180 @@
1
+ description = "Build section outline, argument map, and word budgets"
2
+
3
+ prompt = '''
4
+ <execution_context>
5
+ @~/.config/gemini/write-the-f-paper/workflows/create-outline.md
6
+ @~/.config/gemini/write-the-f-paper/templates/roadmap.md
7
+ @~/.config/gemini/write-the-f-paper/templates/state.md
8
+ @~/.config/gemini/write-the-f-paper/references/imrad-structure.md
9
+ </execution_context>
10
+
11
+ <objective>
12
+ Create the document outline and section roadmap for an initialized paper.
13
+
14
+ **Orchestrator role:** Validate environment, load project context, resolve model profile, spawn outliner agent to produce structure artifacts, create STATE.md, create section directories, commit, present results.
15
+
16
+ **Why subagent:** Outlining requires significant reasoning about document structure, argument decomposition, and wave assignment. A fresh outliner agent gets peak quality for these creative decisions.
17
+ </objective>
18
+
19
+ <context>
20
+ No arguments. Requires `.planning/PROJECT.md` to exist.
21
+ </context>
22
+
23
+ <process>
24
+
25
+ ## 1. Validate Environment and Resolve Model Profile
26
+
27
+ ```bash
28
+ [ ! -f .planning/PROJECT.md ] && echo "ERROR: No project. Run /wtfp:new-paper" && exit 1
29
+ [ -f .planning/ROADMAP.md ] && echo "ERROR: Outline exists. Use /wtfp:progress" && exit 1
30
+ ls .planning/ 2>/dev/null
31
+ ```
32
+
33
+ **Resolve model profile:**
34
+
35
+ ```bash
36
+ MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
37
+ ```
38
+
39
+ **Model lookup table:**
40
+
41
+ | Agent | quality | balanced | budget |
42
+ |-------|---------|----------|--------|
43
+ | outliner | opus | sonnet | sonnet |
44
+
45
+ **Resolve gate flag:**
46
+ ```bash
47
+ GATE_CONFIRM_OUTLINE=$(cat .planning/config.json 2>/dev/null | grep -o '"confirm_outline"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
48
+ ```
49
+
50
+ ## 2. Read Context Files
51
+
52
+ ```bash
53
+ PROJECT_CONTENT=$(cat .planning/PROJECT.md)
54
+ CONFIG_CONTENT=$(cat .planning/config.json 2>/dev/null)
55
+ EXISTING_STRUCTURE=$(cat .planning/structure/*.md 2>/dev/null)
56
+ ```
57
+
58
+ ## 3. Ensure Structure Directory
59
+
60
+ ```bash
61
+ mkdir -p .planning/structure
62
+ mkdir -p .planning/sections
63
+ ```
64
+
65
+ ## 4. Gate Check: Confirm Before Outlining
66
+
67
+ **If GATE_CONFIRM_OUTLINE is "true" (default):**
68
+ Present project summary to user via interactive prompting and wait for confirmation before proceeding.
69
+
70
+ **If GATE_CONFIRM_OUTLINE is "false":**
71
+ Skip confirmation and proceed directly to outlining.
72
+
73
+ ## 5. Spawn wtfp-outliner Agent
74
+
75
+ ```
76
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
77
+ WTF-P ► OUTLINING DOCUMENT
78
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
79
+ ```
80
+
81
+ Fill prompt with inlined content and spawn:
82
+
83
+ ```
84
+ Task(
85
+ prompt="First, read ~/.config/gemini/agents/wtfp/outliner.md for your role and instructions.\n\n" + filled_outlining_prompt,
86
+ subagent_type="general-purpose",
87
+ model="{outliner_model}",
88
+ description="Create Document Outline"
89
+ )
90
+ ```
91
+
92
+ Outlining prompt includes: `<project_context>` with PROJECT.md content, config.json settings, any existing structure files.
93
+
94
+ ## 6. Handle Outliner Return
95
+
96
+ **`## OUTLINING COMPLETE`:** Proceed to STATE.md creation and directory setup.
97
+
98
+ **`## CHECKPOINT REACHED`:** Present to user, get response, re-spawn outliner with decision.
99
+
100
+ **`## OUTLINING BLOCKED`:** Show blocker, offer options.
101
+
102
+ ## 7. Post-Outliner Setup
103
+
104
+ After successful outlining, the orchestrator handles:
105
+
106
+ **Create STATE.md** using template from `~/.config/gemini/write-the-f-paper/templates/state.md`:
107
+ - Initialize position (section 1 of N), word count (0)
108
+ - Set argument strength from outliner's argument-map
109
+ - Set open questions from PROJECT.md
110
+
111
+ **Create section directories** from ROADMAP.md sections:
112
+ ```bash
113
+ mkdir -p .planning/sections/01-[section-slug]
114
+ mkdir -p .planning/sections/02-[section-slug]
115
+ # ... for all sections listed in ROADMAP.md
116
+ ```
117
+
118
+ ## 8. Commit (with commit_docs Guard)
119
+
120
+ ```bash
121
+ COMMIT_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
122
+ ```
123
+
124
+ **If commit_docs = "true" (default):**
125
+ ```bash
126
+ git add .planning/ROADMAP.md .planning/STATE.md .planning/sections/ .planning/structure/
127
+ git commit -m "docs: create document outline -- [N] sections, [X] words target"
128
+ ```
129
+
130
+ **If commit_docs = "false":**
131
+ Skip git add and commit for planning docs. Log: "Skipping planning docs commit (commit_docs: false)"
132
+
133
+ ## 9. Present Final Status
134
+
135
+ </process>
136
+
137
+ <offer_next>
138
+
139
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
140
+ WTF-P ► OUTLINE CREATED ✓
141
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
142
+
143
+ - Roadmap: .planning/ROADMAP.md ([N] sections, [X] words)
144
+ - State: .planning/STATE.md
145
+ - Structure: .planning/structure/ (outline, argument-map, narrative-arc)
146
+ - Sections: .planning/sections/ ([N] directories)
147
+
148
+ | # | Section | Words | Wave |
149
+ |---|---------|-------|------|
150
+ [table from ROADMAP.md]
151
+
152
+ ───────────────────────────────────────────
153
+
154
+ ## ▶ Next Up
155
+
156
+ **Section 1: [Name]** — [goal]
157
+
158
+ `/wtfp:plan-section 1`
159
+
160
+ <sub>`/clear` first → fresh context window</sub>
161
+
162
+ ───────────────────────────────────────────
163
+
164
+ **Also available:**
165
+ - `/wtfp:discuss-section 1` — gather context first
166
+ - `/wtfp:research-gap 1` — investigate literature needs
167
+ - `/wtfp:execute-outline` — write all sections in wave-based parallel execution
168
+
169
+ </offer_next>
170
+
171
+ <success_criteria>
172
+ - [ ] Outliner agent spawned with full project context
173
+ - [ ] 4 artifacts created (outline.md, argument-map.md, narrative-arc.md, ROADMAP.md)
174
+ - [ ] STATE.md initialized with correct position
175
+ - [ ] Section directories created
176
+ - [ ] Word budget totals match target
177
+ - [ ] All committed to git
178
+ - [ ] User knows next steps
179
+ </success_criteria>
180
+ '''
@@ -0,0 +1,36 @@
1
+ description = "Generate academic poster from paper content"
2
+
3
+ prompt = '''
4
+ <objective>
5
+ Generate an academic poster based on the current project's PROJECT.md and findings.
6
+ Uses the wtfp-marp skill to compile to HTML.
7
+ </objective>
8
+
9
+ <context>
10
+ @~/.config/gemini/write-the-f-paper/references/principles.md
11
+ @~/.config/gemini/write-the-f-paper/templates/posters/basic.md
12
+ </context>
13
+
14
+ <process>
15
+ ## Step 1: Content Synthesis
16
+ - Read `.planning/PROJECT.md` and any drafted sections.
17
+ - Identify key findings, methodology, and conclusion.
18
+
19
+ ## Step 2: User Interview
20
+ interactive prompting to determine:
21
+ - Poster title (default to project title)
22
+ - Authors
23
+ - Key visuals/charts needed
24
+ - Target audience
25
+
26
+ ## Step 3: Markdown Generation
27
+ - Create `poster.md` using Marp format.
28
+ - Integrate synthesized content.
29
+
30
+ ## Step 4: Compilation
31
+ - Use `wtfp-marp` skill: `npx @marp-team/marp-cli poster.md -o poster.html`
32
+
33
+ ## Step 5: Review
34
+ - Present the generated poster.html path to the user.
35
+ </process>
36
+ '''
@@ -0,0 +1,35 @@
1
+ description = "Generate presentation slides from paper content"
2
+
3
+ prompt = '''
4
+ <objective>
5
+ Generate presentation slides based on the current project's PROJECT.md and findings.
6
+ Uses the wtfp-marp skill to compile to PDF.
7
+ </objective>
8
+
9
+ <context>
10
+ @~/.config/gemini/write-the-f-paper/references/principles.md
11
+ @~/.config/gemini/write-the-f-paper/templates/slides/
12
+ </context>
13
+
14
+ <process>
15
+ ## Step 1: Content Synthesis
16
+ - Read `.planning/PROJECT.md` and any drafted sections.
17
+ - Identify the core narrative and supporting claims.
18
+
19
+ ## Step 2: User Interview
20
+ interactive prompting to determine:
21
+ - Presentation duration/target number of slides
22
+ - Specific focus areas
23
+ - Audience background
24
+
25
+ ## Step 3: Markdown Generation
26
+ - Create `slides.md` using Marp format.
27
+ - Separate slides with `---`.
28
+
29
+ ## Step 4: Compilation
30
+ - Use `wtfp-marp` skill: `npx @marp-team/marp-cli slides.md -o slides.pdf`
31
+
32
+ ## Step 5: Review
33
+ - Present the generated slides.pdf path to the user.
34
+ </process>
35
+ '''
@@ -0,0 +1,62 @@
1
+ description = "Discuss your vision for a section before planning it"
2
+
3
+ prompt = '''
4
+ <objective>
5
+ Gather section context through collaborative thinking before planning.
6
+
7
+ Purpose: Help the user articulate their vision for how a section should read, what it needs to accomplish, and what makes it effective.
8
+ Output: CONTEXT.md file in the section directory capturing vision, essential content, and boundaries.
9
+ </objective>
10
+
11
+ <execution_context>
12
+ @~/.config/gemini/write-the-f-paper/workflows/discuss-section.md
13
+ @~/.config/gemini/write-the-f-paper/templates/context.md
14
+ </execution_context>
15
+
16
+ <context>
17
+ Section number: {{args}} (required)
18
+
19
+ **Load project state first:**
20
+ @.planning/STATE.md
21
+
22
+ **Load roadmap:**
23
+ @.planning/ROADMAP.md
24
+
25
+ **Load structure documents:**
26
+ @.planning/structure/argument-map.md
27
+ @.planning/structure/outline.md
28
+ </context>
29
+
30
+ <process>
31
+
32
+ <step name="verify">
33
+ 1. Check .planning/ directory exists (error if not - user should run /wtfp:new-paper)
34
+ 2. Validate section number provided via {{args}}
35
+ 3. Validate section exists in roadmap
36
+ </step>
37
+
38
+ <step name="execute_workflow">
39
+ Execute the discuss-section workflow from execution_context.
40
+
41
+ The workflow will:
42
+ - Validate section against roadmap
43
+ - Check for existing CONTEXT.md
44
+ - Gather vision through interactive prompting (not interrogation)
45
+ - Write CONTEXT.md capturing user's vision
46
+ - Commit to git
47
+ </step>
48
+
49
+ <step name="done">
50
+ Workflow outputs next steps to user (typically: research or plan the section).
51
+ </step>
52
+
53
+ </process>
54
+
55
+ <success_criteria>
56
+ - Section validated against roadmap
57
+ - Vision gathered through collaborative thinking
58
+ - CONTEXT.md created in section directory
59
+ - CONTEXT.md committed to git
60
+ - User knows next steps
61
+ </success_criteria>
62
+ '''