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.
- package/LICENSE +21 -0
- package/README.md +338 -0
- package/bin/install.js +358 -0
- package/bin/uninstall.js +485 -0
- package/commands/wtfp/analyze-bib.md +326 -0
- package/commands/wtfp/check-refs.md +205 -0
- package/commands/wtfp/create-outline.md +275 -0
- package/commands/wtfp/discuss-section.md +71 -0
- package/commands/wtfp/export-latex.md +216 -0
- package/commands/wtfp/help.md +342 -0
- package/commands/wtfp/insert-section.md +130 -0
- package/commands/wtfp/list-assumptions.md +109 -0
- package/commands/wtfp/map-project.md +197 -0
- package/commands/wtfp/new-paper.md +443 -0
- package/commands/wtfp/pause-writing.md +145 -0
- package/commands/wtfp/plan-revision.md +180 -0
- package/commands/wtfp/plan-section.md +247 -0
- package/commands/wtfp/polish-prose.md +177 -0
- package/commands/wtfp/progress.md +325 -0
- package/commands/wtfp/remove-section.md +147 -0
- package/commands/wtfp/research-gap.md +235 -0
- package/commands/wtfp/resume-writing.md +142 -0
- package/commands/wtfp/review-section.md +409 -0
- package/commands/wtfp/submit-milestone.md +211 -0
- package/commands/wtfp/write-section.md +273 -0
- package/package.json +40 -0
- package/write-the-f-paper/references/checkpoints.md +213 -0
- package/write-the-f-paper/references/continuation-format.md +223 -0
- package/write-the-f-paper/references/git-integration.md +241 -0
- package/write-the-f-paper/references/imrad-structure.md +212 -0
- package/write-the-f-paper/references/length-estimation.md +148 -0
- package/write-the-f-paper/references/plan-format.md +361 -0
- package/write-the-f-paper/references/principles.md +158 -0
- package/write-the-f-paper/references/questioning.md +132 -0
- package/write-the-f-paper/references/research-pitfalls.md +208 -0
- package/write-the-f-paper/templates/config.json +30 -0
- package/write-the-f-paper/templates/context.md +179 -0
- package/write-the-f-paper/templates/continue-here.md +142 -0
- package/write-the-f-paper/templates/data-inventory.md +142 -0
- package/write-the-f-paper/templates/discovery.md +146 -0
- package/write-the-f-paper/templates/issues.md +59 -0
- package/write-the-f-paper/templates/manuscript.md +253 -0
- package/write-the-f-paper/templates/narrative-arc.md +227 -0
- package/write-the-f-paper/templates/outline.md +274 -0
- package/write-the-f-paper/templates/phase-prompt.md +348 -0
- package/write-the-f-paper/templates/prior-drafts.md +204 -0
- package/write-the-f-paper/templates/project-context/argument-structure.md +267 -0
- package/write-the-f-paper/templates/project-context/bibliography.md +152 -0
- package/write-the-f-paper/templates/project-context/gaps.md +122 -0
- package/write-the-f-paper/templates/project-context/imrad.md +140 -0
- package/write-the-f-paper/templates/project-context/peer-review.md +152 -0
- package/write-the-f-paper/templates/project-context/style-guide.md +198 -0
- package/write-the-f-paper/templates/project-context/tools.md +170 -0
- package/write-the-f-paper/templates/project.md +185 -0
- package/write-the-f-paper/templates/research.md +384 -0
- package/write-the-f-paper/templates/review-comments.md +253 -0
- package/write-the-f-paper/templates/revision-issues.md +169 -0
- package/write-the-f-paper/templates/roadmap.md +187 -0
- package/write-the-f-paper/templates/section-archive.md +178 -0
- package/write-the-f-paper/templates/section-context.md +114 -0
- package/write-the-f-paper/templates/section.md +128 -0
- package/write-the-f-paper/templates/state.md +244 -0
- package/write-the-f-paper/templates/summary.md +277 -0
- package/write-the-f-paper/venues/acm-cs.yaml +102 -0
- package/write-the-f-paper/venues/arxiv-ml.yaml +103 -0
- package/write-the-f-paper/venues/ieee-cs.yaml +100 -0
- package/write-the-f-paper/venues/nature.yaml +81 -0
- package/write-the-f-paper/venues/thesis-chapter.yaml +101 -0
- package/write-the-f-paper/workflows/create-outline.md +462 -0
- package/write-the-f-paper/workflows/create-outline.wcn.md +194 -0
- package/write-the-f-paper/workflows/discuss-section.md +249 -0
- package/write-the-f-paper/workflows/discuss-section.wcn.md +63 -0
- package/write-the-f-paper/workflows/execute-section.md +704 -0
- package/write-the-f-paper/workflows/execute-section.wcn.md +219 -0
- package/write-the-f-paper/workflows/list-assumptions.md +183 -0
- package/write-the-f-paper/workflows/list-assumptions.wcn.md +42 -0
- package/write-the-f-paper/workflows/lit-review-phase.md +281 -0
- package/write-the-f-paper/workflows/lit-review-phase.wcn.md +92 -0
- package/write-the-f-paper/workflows/map-project.md +359 -0
- package/write-the-f-paper/workflows/map-project.wcn.md +73 -0
- package/write-the-f-paper/workflows/plan-section.md +409 -0
- package/write-the-f-paper/workflows/plan-section.wcn.md +236 -0
- package/write-the-f-paper/workflows/research-gap.md +469 -0
- package/write-the-f-paper/workflows/research-gap.wcn.md +119 -0
- package/write-the-f-paper/workflows/resume-paper.md +274 -0
- package/write-the-f-paper/workflows/resume-paper.wcn.md +93 -0
- package/write-the-f-paper/workflows/review-section.md +329 -0
- package/write-the-f-paper/workflows/review-section.wcn.md +91 -0
- package/write-the-f-paper/workflows/submit-draft.md +368 -0
- package/write-the-f-paper/workflows/submit-draft.wcn.md +69 -0
- package/write-the-f-paper/workflows/transition.md +375 -0
- package/write-the-f-paper/workflows/transition.wcn.md +113 -0
|
@@ -0,0 +1,704 @@
|
|
|
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 name="load_project_state" priority="first">
|
|
12
|
+
Before any operation, read project state:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
cat .planning/STATE.md 2>/dev/null
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**If file exists:** Parse and internalize:
|
|
19
|
+
|
|
20
|
+
- Current position (section, plan, status)
|
|
21
|
+
- Word count progress (current vs target)
|
|
22
|
+
- Argument strength (what's been established)
|
|
23
|
+
- Open questions (things to watch for)
|
|
24
|
+
|
|
25
|
+
**If file missing but .planning/ exists:**
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
STATE.md missing but planning artifacts exist.
|
|
29
|
+
Options:
|
|
30
|
+
1. Reconstruct from existing artifacts
|
|
31
|
+
2. Continue without project state (may lose accumulated context)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**If .planning/ doesn't exist:** Error - project not initialized.
|
|
35
|
+
|
|
36
|
+
This ensures every writing session has full project context.
|
|
37
|
+
</step>
|
|
38
|
+
|
|
39
|
+
<step name="identify_plan">
|
|
40
|
+
Find the next plan to execute:
|
|
41
|
+
- Check roadmap for "In progress" section
|
|
42
|
+
- Find plans in that section directory
|
|
43
|
+
- Identify first plan without corresponding SUMMARY
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
cat .planning/ROADMAP.md
|
|
47
|
+
# Look for section with "In progress" status
|
|
48
|
+
# Then find plans in that section
|
|
49
|
+
ls .planning/sections/XX-name/*-PLAN.md 2>/dev/null | sort
|
|
50
|
+
ls .planning/sections/XX-name/*-SUMMARY.md 2>/dev/null | sort
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Logic:**
|
|
54
|
+
|
|
55
|
+
- If `01-01-PLAN.md` exists but `01-01-SUMMARY.md` doesn't → execute 01-01
|
|
56
|
+
- If `01-01-SUMMARY.md` exists but `01-02-SUMMARY.md` doesn't → execute 01-02
|
|
57
|
+
- Pattern: Find first PLAN file without matching SUMMARY file
|
|
58
|
+
|
|
59
|
+
Confirm with user if ambiguous.
|
|
60
|
+
|
|
61
|
+
<config-check>
|
|
62
|
+
```bash
|
|
63
|
+
cat .planning/config.json 2>/dev/null
|
|
64
|
+
```
|
|
65
|
+
</config-check>
|
|
66
|
+
|
|
67
|
+
<if mode="yolo">
|
|
68
|
+
```
|
|
69
|
+
Auto-approved: Execute {section}-{plan}-PLAN.md
|
|
70
|
+
[Plan X of Y for Section Z]
|
|
71
|
+
|
|
72
|
+
Starting writing session...
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Proceed directly to load_prompt step.
|
|
76
|
+
</if>
|
|
77
|
+
|
|
78
|
+
<if mode="interactive" OR="custom with gates.execute_next_plan true">
|
|
79
|
+
Present:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
Found plan to execute: {section}-{plan}-PLAN.md
|
|
83
|
+
[Plan X of Y for Section Z]
|
|
84
|
+
|
|
85
|
+
Proceed with writing?
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Wait for confirmation before proceeding.
|
|
89
|
+
</if>
|
|
90
|
+
</step>
|
|
91
|
+
|
|
92
|
+
<step name="record_start_time">
|
|
93
|
+
Record execution start time for performance tracking:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
PLAN_START_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
97
|
+
PLAN_START_EPOCH=$(date +%s)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Store in shell variables for duration calculation at completion.
|
|
101
|
+
</step>
|
|
102
|
+
|
|
103
|
+
<step name="load_prompt">
|
|
104
|
+
Read the plan prompt:
|
|
105
|
+
```bash
|
|
106
|
+
cat .planning/sections/XX-name/{section}-{plan}-PLAN.md
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
This IS the execution instructions. Follow it exactly.
|
|
110
|
+
|
|
111
|
+
**If plan references CONTEXT.md:**
|
|
112
|
+
The CONTEXT.md file provides the user's vision for this section — how they imagine it reading, what's essential, and what's out of scope. Honor this context throughout writing.
|
|
113
|
+
</step>
|
|
114
|
+
|
|
115
|
+
<step name="previous_section_check">
|
|
116
|
+
Before writing, check if previous section had issues:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# Find previous section summary
|
|
120
|
+
ls .planning/sections/*/SUMMARY.md 2>/dev/null | sort -r | head -2 | tail -1
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
If previous section SUMMARY.md has "Issues Encountered" != "None" or "Next Section Readiness" mentions blockers:
|
|
124
|
+
|
|
125
|
+
Use AskUserQuestion:
|
|
126
|
+
|
|
127
|
+
- header: "Previous Issues"
|
|
128
|
+
- question: "Previous section had unresolved items: [summary]. How to proceed?"
|
|
129
|
+
- options:
|
|
130
|
+
- "Proceed anyway" - Issues won't block this section
|
|
131
|
+
- "Address first" - Let's resolve before continuing
|
|
132
|
+
- "Review previous" - Show me the full summary
|
|
133
|
+
</step>
|
|
134
|
+
|
|
135
|
+
<step name="execute">
|
|
136
|
+
Execute each task in the prompt. **Adjustments are normal** - handle them automatically using embedded rules below.
|
|
137
|
+
|
|
138
|
+
1. Read the @context files listed in the prompt
|
|
139
|
+
|
|
140
|
+
2. For each task:
|
|
141
|
+
|
|
142
|
+
**If `type="auto"`:**
|
|
143
|
+
|
|
144
|
+
- Determine writing mode from task (co-author, scaffold, reviewer)
|
|
145
|
+
- Execute the writing action specified
|
|
146
|
+
- **If mode="co-author":** Write the prose directly
|
|
147
|
+
- **If mode="scaffold":** Create detailed outline for user to fill
|
|
148
|
+
- **If mode="reviewer":** Analyze existing text, provide feedback
|
|
149
|
+
- Run the verification (citation check, coherence check)
|
|
150
|
+
- Confirm done criteria met
|
|
151
|
+
- **Commit the task** (see `<task_commit>` below)
|
|
152
|
+
- Track task completion and word count for Summary
|
|
153
|
+
- Continue to next task
|
|
154
|
+
|
|
155
|
+
**If `type="checkpoint:*"`:**
|
|
156
|
+
|
|
157
|
+
- STOP immediately (do not continue to next task)
|
|
158
|
+
- Execute checkpoint_protocol (see below)
|
|
159
|
+
- Wait for user response
|
|
160
|
+
- Only after user confirmation: continue to next task
|
|
161
|
+
|
|
162
|
+
3. Run overall verification checks from `<verification>` section
|
|
163
|
+
4. Confirm all success criteria from `<success_criteria>` section met
|
|
164
|
+
5. Document all adjustments in Summary
|
|
165
|
+
</step>
|
|
166
|
+
|
|
167
|
+
<writing_modes>
|
|
168
|
+
## Writing Mode Execution
|
|
169
|
+
|
|
170
|
+
**Co-Author Mode (Claude drafts):**
|
|
171
|
+
- Write complete prose following outline/structure
|
|
172
|
+
- Match user's voice from prior sections
|
|
173
|
+
- Flag claims needing citations with [CITE: topic]
|
|
174
|
+
- Flag uncertain statements with [VERIFY: claim]
|
|
175
|
+
- Aim for word target specified in task
|
|
176
|
+
|
|
177
|
+
**Scaffold Mode (Claude outlines):**
|
|
178
|
+
- Create detailed paragraph-level outline
|
|
179
|
+
- Specify what each paragraph should accomplish
|
|
180
|
+
- Identify where citations should go
|
|
181
|
+
- Note transition needs between paragraphs
|
|
182
|
+
- Leave actual prose writing to user
|
|
183
|
+
|
|
184
|
+
**Reviewer Mode (Claude critiques):**
|
|
185
|
+
- Read existing text carefully
|
|
186
|
+
- Identify strengths first
|
|
187
|
+
- Note logical gaps or weak arguments
|
|
188
|
+
- Suggest specific improvements
|
|
189
|
+
- Ask clarifying questions before major changes
|
|
190
|
+
</writing_modes>
|
|
191
|
+
|
|
192
|
+
<deviation_rules>
|
|
193
|
+
|
|
194
|
+
## Automatic Adjustment Handling
|
|
195
|
+
|
|
196
|
+
**While writing, you WILL discover issues.** This is normal.
|
|
197
|
+
|
|
198
|
+
Apply these rules automatically. Track all adjustments for Summary documentation.
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
**RULE 1: Auto-fix factual errors**
|
|
203
|
+
|
|
204
|
+
**Trigger:** Incorrect fact, wrong citation, logical contradiction
|
|
205
|
+
|
|
206
|
+
**Action:** Fix immediately, track for Summary
|
|
207
|
+
|
|
208
|
+
**Examples:**
|
|
209
|
+
- Wrong year on a citation
|
|
210
|
+
- Contradicting a claim from earlier section
|
|
211
|
+
- Misrepresenting a source's findings
|
|
212
|
+
- Logical inconsistency in argument
|
|
213
|
+
|
|
214
|
+
**Process:**
|
|
215
|
+
1. Fix the error inline
|
|
216
|
+
2. Note the correction
|
|
217
|
+
3. Continue writing
|
|
218
|
+
4. Track in adjustments list: `[Rule 1 - Error] [description]`
|
|
219
|
+
|
|
220
|
+
**No user permission needed.** Errors must be fixed for accuracy.
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
**RULE 2: Auto-add missing critical elements**
|
|
225
|
+
|
|
226
|
+
**Trigger:** Required element missing for section completeness
|
|
227
|
+
|
|
228
|
+
**Action:** Add immediately, track for Summary
|
|
229
|
+
|
|
230
|
+
**Examples:**
|
|
231
|
+
- Missing thesis statement in introduction
|
|
232
|
+
- No citation for a key claim
|
|
233
|
+
- Missing transition between paragraphs
|
|
234
|
+
- Required section element not present (e.g., no methods overview)
|
|
235
|
+
|
|
236
|
+
**Process:**
|
|
237
|
+
1. Add the missing element inline
|
|
238
|
+
2. Note what was added
|
|
239
|
+
3. Continue writing
|
|
240
|
+
4. Track in adjustments list: `[Rule 2 - Missing] [description]`
|
|
241
|
+
|
|
242
|
+
**Critical = required for section to function in the document.**
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
**RULE 3: Auto-fix blocking issues**
|
|
247
|
+
|
|
248
|
+
**Trigger:** Something prevents completing the writing task
|
|
249
|
+
|
|
250
|
+
**Action:** Fix immediately to unblock, track for Summary
|
|
251
|
+
|
|
252
|
+
**Examples:**
|
|
253
|
+
- Source document can't be accessed
|
|
254
|
+
- Prior section missing content this builds on
|
|
255
|
+
- Conflicting guidance in structure docs
|
|
256
|
+
|
|
257
|
+
**Process:**
|
|
258
|
+
1. Fix or work around the blocker
|
|
259
|
+
2. Note the workaround
|
|
260
|
+
3. Continue writing
|
|
261
|
+
4. Track in adjustments list: `[Rule 3 - Blocking] [description]`
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
**RULE 4: Ask about structural changes**
|
|
266
|
+
|
|
267
|
+
**Trigger:** Writing requires significant restructuring
|
|
268
|
+
|
|
269
|
+
**Action:** STOP, present to user, wait for decision
|
|
270
|
+
|
|
271
|
+
**Examples:**
|
|
272
|
+
- Need to reorganize entire section
|
|
273
|
+
- Argument requires different approach than planned
|
|
274
|
+
- Word budget significantly exceeded/underrun
|
|
275
|
+
- Need to add/remove major subsections
|
|
276
|
+
|
|
277
|
+
**Process:**
|
|
278
|
+
1. STOP current task
|
|
279
|
+
2. Present clearly:
|
|
280
|
+
|
|
281
|
+
```
|
|
282
|
+
Structural Decision Needed
|
|
283
|
+
|
|
284
|
+
Current task: [task name]
|
|
285
|
+
Discovery: [what you found]
|
|
286
|
+
Proposed change: [structural modification]
|
|
287
|
+
Why needed: [rationale]
|
|
288
|
+
Impact: [what this affects - word count, flow, other sections]
|
|
289
|
+
|
|
290
|
+
Proceed with proposed change? (yes / different approach / defer)
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
3. WAIT for user response
|
|
294
|
+
4. If approved: implement, track as `[Rule 4 - Structural] [description]`
|
|
295
|
+
5. If different approach: discuss and implement
|
|
296
|
+
6. If deferred: log to notes, continue without change
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
**RULE 5: Log enhancement ideas**
|
|
301
|
+
|
|
302
|
+
**Trigger:** Improvement that would enhance writing but isn't essential now
|
|
303
|
+
|
|
304
|
+
**Action:** Add to notes automatically, continue writing
|
|
305
|
+
|
|
306
|
+
**Examples:**
|
|
307
|
+
- Could add more supporting evidence
|
|
308
|
+
- Prose could be more elegant
|
|
309
|
+
- Additional example would strengthen point
|
|
310
|
+
- Nice-to-have transition improvement
|
|
311
|
+
|
|
312
|
+
**Process:**
|
|
313
|
+
1. Note the enhancement idea
|
|
314
|
+
2. Brief notification: `Noted enhancement: [brief]`
|
|
315
|
+
3. Continue writing without implementing
|
|
316
|
+
4. Include in Summary under "Enhancements for Revision"
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
**RULE PRIORITY (when multiple could apply):**
|
|
321
|
+
|
|
322
|
+
1. **If Rule 4 applies** → STOP and ask (structural decision)
|
|
323
|
+
2. **If Rules 1-3 apply** → Fix automatically, track for Summary
|
|
324
|
+
3. **If Rule 5 applies** → Log for later, continue
|
|
325
|
+
|
|
326
|
+
</deviation_rules>
|
|
327
|
+
|
|
328
|
+
<three_layer_verification>
|
|
329
|
+
## Verification During Execution
|
|
330
|
+
|
|
331
|
+
After each task, run verification checks:
|
|
332
|
+
|
|
333
|
+
**1. Citation Check (Mechanical)**
|
|
334
|
+
- All claims have citations or are clearly original claims
|
|
335
|
+
- Citations formatted correctly
|
|
336
|
+
- No [CITE: ] placeholders remaining
|
|
337
|
+
- Page numbers where style requires
|
|
338
|
+
|
|
339
|
+
**2. Argument Coherence (Logical)**
|
|
340
|
+
- Claims follow from evidence
|
|
341
|
+
- No logical contradictions with prior sections
|
|
342
|
+
- Thesis supported by content
|
|
343
|
+
- Flow between paragraphs makes sense
|
|
344
|
+
|
|
345
|
+
**3. Rubric Check (Requirements)**
|
|
346
|
+
- Word count within target range
|
|
347
|
+
- Required elements present
|
|
348
|
+
- Formatting requirements met
|
|
349
|
+
- Section accomplishes its goal
|
|
350
|
+
</three_layer_verification>
|
|
351
|
+
|
|
352
|
+
<task_commit>
|
|
353
|
+
## Task Commit Protocol
|
|
354
|
+
|
|
355
|
+
After each task completes (verification passed, done criteria met), commit immediately:
|
|
356
|
+
|
|
357
|
+
**1. Identify modified files:**
|
|
358
|
+
|
|
359
|
+
Track files changed during this specific task:
|
|
360
|
+
|
|
361
|
+
```bash
|
|
362
|
+
git status --short
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
**2. Stage only task-related files:**
|
|
366
|
+
|
|
367
|
+
```bash
|
|
368
|
+
# Example - adjust to actual files modified
|
|
369
|
+
git add paper/sections/introduction.md
|
|
370
|
+
git add paper/references.bib
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
**3. Determine commit type:**
|
|
374
|
+
|
|
375
|
+
| Type | When to Use | Example |
|
|
376
|
+
|------|-------------|---------|
|
|
377
|
+
| `content` | New prose, new paragraphs | content(02-01): draft introduction hook |
|
|
378
|
+
| `cite` | Adding/fixing citations | cite(02-01): add Smith2023 to literature review |
|
|
379
|
+
| `revise` | Revising existing text | revise(02-01): strengthen thesis statement |
|
|
380
|
+
| `fix` | Fixing errors | fix(02-01): correct misattributed quote |
|
|
381
|
+
| `structure` | Reorganizing | structure(02-01): reorder methods subsections |
|
|
382
|
+
|
|
383
|
+
**4. Craft commit message:**
|
|
384
|
+
|
|
385
|
+
```bash
|
|
386
|
+
git commit -m "{type}({section}-{plan}): {task description}
|
|
387
|
+
|
|
388
|
+
- {key change 1}
|
|
389
|
+
- {key change 2}
|
|
390
|
+
"
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
**5. Record commit hash for SUMMARY.md**
|
|
394
|
+
</task_commit>
|
|
395
|
+
|
|
396
|
+
<step name="checkpoint_protocol">
|
|
397
|
+
When encountering `type="checkpoint:*"`:
|
|
398
|
+
|
|
399
|
+
**Display checkpoint clearly:**
|
|
400
|
+
|
|
401
|
+
```
|
|
402
|
+
════════════════════════════════════════
|
|
403
|
+
CHECKPOINT: [Type]
|
|
404
|
+
════════════════════════════════════════
|
|
405
|
+
|
|
406
|
+
Task [X] of [Y]: [What was written/needs review]
|
|
407
|
+
|
|
408
|
+
[Display task-specific content based on type]
|
|
409
|
+
|
|
410
|
+
[Resume signal instruction]
|
|
411
|
+
════════════════════════════════════════
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
**For checkpoint:human-verify (most common):**
|
|
415
|
+
|
|
416
|
+
```
|
|
417
|
+
I wrote: [summary of what was drafted]
|
|
418
|
+
|
|
419
|
+
Please review:
|
|
420
|
+
1. [Specific aspect to check]
|
|
421
|
+
2. [Another aspect]
|
|
422
|
+
3. [Expected quality]
|
|
423
|
+
|
|
424
|
+
Type 'approved' or describe issues
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
**For checkpoint:decision (voice/framing choices):**
|
|
428
|
+
|
|
429
|
+
```
|
|
430
|
+
Decision needed: [choice]
|
|
431
|
+
|
|
432
|
+
Context: [why this matters]
|
|
433
|
+
|
|
434
|
+
Options:
|
|
435
|
+
1. [option-id]: [description]
|
|
436
|
+
2. [option-id]: [description]
|
|
437
|
+
|
|
438
|
+
Select: option-id
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
**After displaying:** WAIT for user response. Do NOT continue to next task.
|
|
442
|
+
|
|
443
|
+
**After user responds:**
|
|
444
|
+
- If approved: continue to next task
|
|
445
|
+
- If issues: address and re-present
|
|
446
|
+
</step>
|
|
447
|
+
|
|
448
|
+
<step name="verification_failure_gate">
|
|
449
|
+
If any verification fails:
|
|
450
|
+
|
|
451
|
+
STOP. Do not continue to next task.
|
|
452
|
+
|
|
453
|
+
Present inline:
|
|
454
|
+
"Verification failed for Task [X]: [task name]
|
|
455
|
+
|
|
456
|
+
Expected: [verification criteria]
|
|
457
|
+
Actual: [what happened]
|
|
458
|
+
|
|
459
|
+
How to proceed?
|
|
460
|
+
|
|
461
|
+
1. Retry - Try the task again
|
|
462
|
+
2. Skip - Mark as incomplete, continue
|
|
463
|
+
3. Stop - Pause writing, investigate"
|
|
464
|
+
|
|
465
|
+
Wait for user decision.
|
|
466
|
+
|
|
467
|
+
If user chose "Skip", note it in SUMMARY.md under "Issues Encountered".
|
|
468
|
+
</step>
|
|
469
|
+
|
|
470
|
+
<step name="record_completion_time">
|
|
471
|
+
Record execution end time and calculate duration:
|
|
472
|
+
|
|
473
|
+
```bash
|
|
474
|
+
PLAN_END_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
475
|
+
PLAN_END_EPOCH=$(date +%s)
|
|
476
|
+
|
|
477
|
+
DURATION_SEC=$(( PLAN_END_EPOCH - PLAN_START_EPOCH ))
|
|
478
|
+
DURATION_MIN=$(( DURATION_SEC / 60 ))
|
|
479
|
+
```
|
|
480
|
+
</step>
|
|
481
|
+
|
|
482
|
+
<step name="create_summary">
|
|
483
|
+
Create `{section}-{plan}-SUMMARY.md` as specified in the prompt's `<output>` section.
|
|
484
|
+
Use ~/.claude/write-the-f-paper/templates/summary.md for structure.
|
|
485
|
+
|
|
486
|
+
**File location:** `.planning/sections/XX-name/{section}-{plan}-SUMMARY.md`
|
|
487
|
+
|
|
488
|
+
**Frontmatter population:**
|
|
489
|
+
|
|
490
|
+
1. **Basic identification:**
|
|
491
|
+
- section: From PLAN.md frontmatter
|
|
492
|
+
- plan: From PLAN.md frontmatter
|
|
493
|
+
- subsection: Topic focus of this plan
|
|
494
|
+
|
|
495
|
+
2. **Content tracking:**
|
|
496
|
+
- words-written: Count from this session
|
|
497
|
+
- words-target: From PLAN.md
|
|
498
|
+
- key-claims: What arguments were made
|
|
499
|
+
- sources-cited: Which citations were added
|
|
500
|
+
|
|
501
|
+
3. **Quality assessment:**
|
|
502
|
+
- argument-strength: How solid is this section's contribution
|
|
503
|
+
- verification-status: Which checks passed
|
|
504
|
+
|
|
505
|
+
**Title format:** `# Section [X] Plan [Y]: [Name] Summary`
|
|
506
|
+
|
|
507
|
+
The one-liner must be SUBSTANTIVE:
|
|
508
|
+
- Good: "Introduction hook establishing AI safety gap with 3 key citations"
|
|
509
|
+
- Bad: "Introduction written"
|
|
510
|
+
|
|
511
|
+
**Include:**
|
|
512
|
+
- Duration: `$DURATION`
|
|
513
|
+
- Words written: (count from execution)
|
|
514
|
+
- Tasks completed: (count from execution)
|
|
515
|
+
- Sources cited: (list from execution)
|
|
516
|
+
|
|
517
|
+
**Next Step section:**
|
|
518
|
+
- If more plans exist in this section: "Ready for {section}-{next-plan}-PLAN.md"
|
|
519
|
+
- If this is the last plan: "Section complete, ready for transition"
|
|
520
|
+
</step>
|
|
521
|
+
|
|
522
|
+
<step name="update_state">
|
|
523
|
+
Update STATE.md:
|
|
524
|
+
|
|
525
|
+
**Current Position:**
|
|
526
|
+
```markdown
|
|
527
|
+
Section: [current] of [total] ([section name])
|
|
528
|
+
Plan: [just completed] of [total in section]
|
|
529
|
+
Status: [In progress / Section complete]
|
|
530
|
+
Last activity: [today] - Completed {section}-{plan}-PLAN.md
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
**Word Count:**
|
|
534
|
+
```markdown
|
|
535
|
+
Target: [total target] words
|
|
536
|
+
Current: [updated count] words
|
|
537
|
+
Remaining: [updated remaining] words
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
**Section Progress table:** Update words and status for current section.
|
|
541
|
+
|
|
542
|
+
**Argument Strength:** Update if this section strengthened/weakened the thesis.
|
|
543
|
+
</step>
|
|
544
|
+
|
|
545
|
+
<step name="update_roadmap">
|
|
546
|
+
Update the roadmap file:
|
|
547
|
+
|
|
548
|
+
**If more plans remain in this section:**
|
|
549
|
+
- Update plan count: "2/3 plans complete"
|
|
550
|
+
- Keep section status as "In progress"
|
|
551
|
+
|
|
552
|
+
**If this was the last plan in the section:**
|
|
553
|
+
- Mark section complete: status → "Complete"
|
|
554
|
+
- Add completion date
|
|
555
|
+
- Update word count
|
|
556
|
+
</step>
|
|
557
|
+
|
|
558
|
+
<step name="git_commit_metadata">
|
|
559
|
+
Commit execution metadata (SUMMARY + STATE + ROADMAP):
|
|
560
|
+
|
|
561
|
+
```bash
|
|
562
|
+
git add .planning/sections/XX-name/{section}-{plan}-SUMMARY.md
|
|
563
|
+
git add .planning/STATE.md
|
|
564
|
+
git add .planning/ROADMAP.md
|
|
565
|
+
|
|
566
|
+
git commit -m "$(cat <<'EOF'
|
|
567
|
+
docs({section}-{plan}): complete [plan-name] plan
|
|
568
|
+
|
|
569
|
+
Tasks completed: [N]/[N]
|
|
570
|
+
Words written: [count]
|
|
571
|
+
- [Task 1 name]
|
|
572
|
+
- [Task 2 name]
|
|
573
|
+
|
|
574
|
+
SUMMARY: .planning/sections/XX-name/{section}-{plan}-SUMMARY.md
|
|
575
|
+
EOF
|
|
576
|
+
)"
|
|
577
|
+
```
|
|
578
|
+
</step>
|
|
579
|
+
|
|
580
|
+
<step name="offer_next">
|
|
581
|
+
**MANDATORY: Verify remaining work before presenting next steps.**
|
|
582
|
+
|
|
583
|
+
**Step 1: Count plans and summaries in current section**
|
|
584
|
+
|
|
585
|
+
```bash
|
|
586
|
+
ls -1 .planning/sections/[current-section-dir]/*-PLAN.md 2>/dev/null | wc -l
|
|
587
|
+
ls -1 .planning/sections/[current-section-dir]/*-SUMMARY.md 2>/dev/null | wc -l
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
**Step 2: Route based on plan completion**
|
|
591
|
+
|
|
592
|
+
| Condition | Meaning | Action |
|
|
593
|
+
|-----------|---------|--------|
|
|
594
|
+
| summaries < plans | More plans remain | **Route A** |
|
|
595
|
+
| summaries = plans | Section complete | Go to Step 3 |
|
|
596
|
+
|
|
597
|
+
---
|
|
598
|
+
|
|
599
|
+
**Route A: More plans remain in this section**
|
|
600
|
+
|
|
601
|
+
```
|
|
602
|
+
Plan {section}-{plan} complete.
|
|
603
|
+
Summary: .planning/sections/{section-dir}/{section}-{plan}-SUMMARY.md
|
|
604
|
+
|
|
605
|
+
{Y} of {X} plans complete for Section {Z}.
|
|
606
|
+
|
|
607
|
+
---
|
|
608
|
+
|
|
609
|
+
## Next Up
|
|
610
|
+
|
|
611
|
+
**{section}-{next-plan}: [Plan Name]** — [objective from next PLAN.md]
|
|
612
|
+
|
|
613
|
+
`/wtfp:write-section .planning/sections/{section-dir}/{section}-{next-plan}-PLAN.md`
|
|
614
|
+
|
|
615
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
616
|
+
|
|
617
|
+
---
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
---
|
|
621
|
+
|
|
622
|
+
**Step 3: Check document status (only when all plans in section complete)**
|
|
623
|
+
|
|
624
|
+
Read ROADMAP.md to identify next section.
|
|
625
|
+
|
|
626
|
+
**Route B: Section complete, more sections remain**
|
|
627
|
+
|
|
628
|
+
```
|
|
629
|
+
Plan {section}-{plan} complete.
|
|
630
|
+
Summary: .planning/sections/{section-dir}/{section}-{plan}-SUMMARY.md
|
|
631
|
+
|
|
632
|
+
## Section {Z}: {Section Name} Complete
|
|
633
|
+
|
|
634
|
+
All {Y} plans finished. {word-count} words written.
|
|
635
|
+
|
|
636
|
+
---
|
|
637
|
+
|
|
638
|
+
## Next Up
|
|
639
|
+
|
|
640
|
+
**Section {Z+1}: {Next Section Name}** — {Goal from ROADMAP.md}
|
|
641
|
+
|
|
642
|
+
`/wtfp:plan-section {Z+1}`
|
|
643
|
+
|
|
644
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
645
|
+
|
|
646
|
+
---
|
|
647
|
+
|
|
648
|
+
**Also available:**
|
|
649
|
+
- `/wtfp:review-section {Z}` — verify section before continuing
|
|
650
|
+
- `/wtfp:discuss-section {Z+1}` — gather context first
|
|
651
|
+
- Review section before continuing
|
|
652
|
+
|
|
653
|
+
---
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
---
|
|
657
|
+
|
|
658
|
+
**Route C: Document complete (all sections done)**
|
|
659
|
+
|
|
660
|
+
```
|
|
661
|
+
DOCUMENT COMPLETE!
|
|
662
|
+
|
|
663
|
+
Plan {section}-{plan} complete.
|
|
664
|
+
|
|
665
|
+
## Section {Z}: {Section Name} Complete
|
|
666
|
+
|
|
667
|
+
════════════════════════════════════════
|
|
668
|
+
All {N} sections complete!
|
|
669
|
+
Total words: {word-count}
|
|
670
|
+
Document is ready for review.
|
|
671
|
+
════════════════════════════════════════
|
|
672
|
+
|
|
673
|
+
---
|
|
674
|
+
|
|
675
|
+
## Next Up
|
|
676
|
+
|
|
677
|
+
**Submit Draft** — prepare for submission
|
|
678
|
+
|
|
679
|
+
`/wtfp:submit-draft`
|
|
680
|
+
|
|
681
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
682
|
+
|
|
683
|
+
---
|
|
684
|
+
|
|
685
|
+
**Also available:**
|
|
686
|
+
- `/wtfp:review-section` — full document verification
|
|
687
|
+
- Review accomplishments before submitting
|
|
688
|
+
|
|
689
|
+
---
|
|
690
|
+
```
|
|
691
|
+
|
|
692
|
+
</step>
|
|
693
|
+
|
|
694
|
+
</process>
|
|
695
|
+
|
|
696
|
+
<success_criteria>
|
|
697
|
+
|
|
698
|
+
- All tasks from PLAN.md completed
|
|
699
|
+
- All verifications pass (citation, coherence, rubric)
|
|
700
|
+
- SUMMARY.md created with substantive content
|
|
701
|
+
- STATE.md updated (position, word count, argument strength)
|
|
702
|
+
- ROADMAP.md updated
|
|
703
|
+
- Paper content committed with meaningful messages
|
|
704
|
+
</success_criteria>
|