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,275 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wtfp:create-outline
|
|
3
|
+
description: Create document outline, section roadmap, and state tracking
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Bash
|
|
7
|
+
- Write
|
|
8
|
+
- AskUserQuestion
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<objective>
|
|
12
|
+
Create the document outline and section roadmap for an initialized paper.
|
|
13
|
+
|
|
14
|
+
Creates ROADMAP.md (section breakdown), STATE.md (writing memory), and section directories.
|
|
15
|
+
|
|
16
|
+
This establishes the structure before section-by-section planning begins.
|
|
17
|
+
</objective>
|
|
18
|
+
|
|
19
|
+
<execution_context>
|
|
20
|
+
@~/.claude/write-the-f-paper/workflows/create-outline.md
|
|
21
|
+
@~/.claude/write-the-f-paper/templates/roadmap.md
|
|
22
|
+
@~/.claude/write-the-f-paper/templates/state.md
|
|
23
|
+
@~/.claude/write-the-f-paper/references/imrad-structure.md
|
|
24
|
+
</execution_context>
|
|
25
|
+
|
|
26
|
+
<process>
|
|
27
|
+
|
|
28
|
+
<step name="verify">
|
|
29
|
+
**Verify project exists:**
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
[ ! -f .planning/PROJECT.md ] && echo "ERROR: No project found. Run /wtfp:new-paper first" && exit 1
|
|
33
|
+
[ -f .planning/ROADMAP.md ] && echo "ERROR: Outline already exists. Use /wtfp:progress" && exit 1
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
</step>
|
|
37
|
+
|
|
38
|
+
<step name="load">
|
|
39
|
+
**Load project context:**
|
|
40
|
+
|
|
41
|
+
- Read `.planning/PROJECT.md` for paper vision, core argument, requirements
|
|
42
|
+
- Read `.planning/config.json` for document type and workflow mode
|
|
43
|
+
- Read `.planning/structure/outline.md` for initial structure sketch
|
|
44
|
+
- Read `.planning/structure/argument-map.md` for logical structure
|
|
45
|
+
</step>
|
|
46
|
+
|
|
47
|
+
<step name="structure">
|
|
48
|
+
**Determine document structure:**
|
|
49
|
+
|
|
50
|
+
Based on document type from config.json:
|
|
51
|
+
|
|
52
|
+
**Research Paper (IMRaD):**
|
|
53
|
+
- Abstract
|
|
54
|
+
- Introduction
|
|
55
|
+
- Methods (or Materials and Methods)
|
|
56
|
+
- Results
|
|
57
|
+
- Discussion
|
|
58
|
+
- Conclusion (sometimes combined with Discussion)
|
|
59
|
+
- References
|
|
60
|
+
|
|
61
|
+
**Grant Proposal (NSF-style):**
|
|
62
|
+
- Specific Aims
|
|
63
|
+
- Background and Significance
|
|
64
|
+
- Preliminary Data
|
|
65
|
+
- Research Design and Methods
|
|
66
|
+
- Timeline
|
|
67
|
+
- Budget Justification
|
|
68
|
+
|
|
69
|
+
**Grant Proposal (NIH-style):**
|
|
70
|
+
- Specific Aims
|
|
71
|
+
- Significance
|
|
72
|
+
- Innovation
|
|
73
|
+
- Approach
|
|
74
|
+
- Timeline and Milestones
|
|
75
|
+
|
|
76
|
+
**Thesis Chapter:**
|
|
77
|
+
- Introduction
|
|
78
|
+
- Literature Review
|
|
79
|
+
- Methodology
|
|
80
|
+
- Results/Findings
|
|
81
|
+
- Discussion
|
|
82
|
+
- Conclusion
|
|
83
|
+
|
|
84
|
+
Use AskUserQuestion if structure needs customization:
|
|
85
|
+
- header: "Structure"
|
|
86
|
+
- question: "The standard structure for [type] is [list]. Any modifications?"
|
|
87
|
+
- options:
|
|
88
|
+
- "Use standard structure" — Apply typical [type] structure
|
|
89
|
+
- "Customize sections" — I have specific sections in mind
|
|
90
|
+
- "Show me options" — What alternatives exist?
|
|
91
|
+
|
|
92
|
+
</step>
|
|
93
|
+
|
|
94
|
+
<step name="roadmap">
|
|
95
|
+
**Create ROADMAP.md:**
|
|
96
|
+
|
|
97
|
+
```markdown
|
|
98
|
+
# Document Roadmap
|
|
99
|
+
|
|
100
|
+
## Document: [Paper Title]
|
|
101
|
+
## Type: [Paper Type]
|
|
102
|
+
## Target: [Venue if known]
|
|
103
|
+
|
|
104
|
+
## Sections
|
|
105
|
+
|
|
106
|
+
### 1. [Section Name]
|
|
107
|
+
- **Goal:** [What this section accomplishes]
|
|
108
|
+
- **Word Target:** [X words]
|
|
109
|
+
- **Status:** Not started
|
|
110
|
+
- **Dependencies:** [Any prerequisites]
|
|
111
|
+
|
|
112
|
+
### 2. [Section Name]
|
|
113
|
+
- **Goal:** [What this section accomplishes]
|
|
114
|
+
- **Word Target:** [X words]
|
|
115
|
+
- **Status:** Not started
|
|
116
|
+
- **Dependencies:** [Section 1 must establish X]
|
|
117
|
+
|
|
118
|
+
[... continue for all sections ...]
|
|
119
|
+
|
|
120
|
+
## Progress
|
|
121
|
+
|
|
122
|
+
| # | Section | Goal | Words | Status |
|
|
123
|
+
|---|---------|------|-------|--------|
|
|
124
|
+
| 1 | [Name] | [1-liner] | 0/[target] | - |
|
|
125
|
+
| 2 | [Name] | [1-liner] | 0/[target] | - |
|
|
126
|
+
| ... | | | | |
|
|
127
|
+
|
|
128
|
+
## Word Budget
|
|
129
|
+
|
|
130
|
+
| Section | Target | Current | % |
|
|
131
|
+
|---------|--------|---------|---|
|
|
132
|
+
| [Name] | [X] | 0 | 0% |
|
|
133
|
+
| ... | | | |
|
|
134
|
+
| **Total** | **[X]** | **0** | **0%** |
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
*Last updated: [date] after outline creation*
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
</step>
|
|
141
|
+
|
|
142
|
+
<step name="state">
|
|
143
|
+
**Create STATE.md:**
|
|
144
|
+
|
|
145
|
+
```markdown
|
|
146
|
+
# Writing State
|
|
147
|
+
|
|
148
|
+
## Project Reference
|
|
149
|
+
- Project: .planning/PROJECT.md
|
|
150
|
+
- Roadmap: .planning/ROADMAP.md
|
|
151
|
+
- Config: .planning/config.json
|
|
152
|
+
|
|
153
|
+
## Current Position
|
|
154
|
+
- Section: 1 of [total]
|
|
155
|
+
- Plan: 0 (not yet planned)
|
|
156
|
+
- Status: Ready to plan first section
|
|
157
|
+
|
|
158
|
+
## Progress
|
|
159
|
+
- Sections: 0/[total] complete
|
|
160
|
+
- Words: 0/[target] ([0]%)
|
|
161
|
+
- Plans executed: 0
|
|
162
|
+
|
|
163
|
+
## Argument Strength
|
|
164
|
+
- Core claim: [from PROJECT.md]
|
|
165
|
+
- Supporting claims: [from argument-map.md]
|
|
166
|
+
- Evidence status: Not yet written
|
|
167
|
+
|
|
168
|
+
## Key Decisions
|
|
169
|
+
| Decision | Rationale | Section |
|
|
170
|
+
|----------|-----------|---------|
|
|
171
|
+
|
|
172
|
+
## Open Questions
|
|
173
|
+
- [Questions from PROJECT.md that need resolution]
|
|
174
|
+
|
|
175
|
+
## Deferred
|
|
176
|
+
- [Nothing yet]
|
|
177
|
+
|
|
178
|
+
## Session Continuity
|
|
179
|
+
- Last session: [date]
|
|
180
|
+
- Handoff: None
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
*Living document — updated after each writing session*
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
</step>
|
|
187
|
+
|
|
188
|
+
<step name="directories">
|
|
189
|
+
**Create section directories:**
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
mkdir -p .planning/sections
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
For each section in ROADMAP.md, create directory:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
mkdir -p .planning/sections/01-[section-name-slug]
|
|
199
|
+
mkdir -p .planning/sections/02-[section-name-slug]
|
|
200
|
+
# ... for all sections
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Use lowercase, hyphenated names (e.g., `01-introduction`, `02-methods`, `03-results`).
|
|
204
|
+
|
|
205
|
+
</step>
|
|
206
|
+
|
|
207
|
+
<step name="commit">
|
|
208
|
+
**Commit outline:**
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
git add .planning/ROADMAP.md .planning/STATE.md .planning/sections/
|
|
212
|
+
git commit -m "$(cat <<'EOF'
|
|
213
|
+
docs: create document outline
|
|
214
|
+
|
|
215
|
+
[N] sections, [X] word target
|
|
216
|
+
|
|
217
|
+
Sections: [list section names]
|
|
218
|
+
EOF
|
|
219
|
+
)"
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
</step>
|
|
223
|
+
|
|
224
|
+
<step name="done">
|
|
225
|
+
**Present completion:**
|
|
226
|
+
|
|
227
|
+
```
|
|
228
|
+
Outline created:
|
|
229
|
+
|
|
230
|
+
- Roadmap: .planning/ROADMAP.md ([N] sections, [X] words target)
|
|
231
|
+
- State: .planning/STATE.md
|
|
232
|
+
- Sections: .planning/sections/ ([N] directories)
|
|
233
|
+
|
|
234
|
+
## Section Structure
|
|
235
|
+
|
|
236
|
+
| # | Section | Words |
|
|
237
|
+
|---|---------|-------|
|
|
238
|
+
[table from ROADMAP.md]
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## ▶ Next Up
|
|
243
|
+
|
|
244
|
+
**Section 1: [Name]** — [goal]
|
|
245
|
+
|
|
246
|
+
`/wtfp:plan-section 1`
|
|
247
|
+
|
|
248
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
**Also available:**
|
|
253
|
+
- `/wtfp:discuss-section 1` — gather context first
|
|
254
|
+
- `/wtfp:research-gap 1` — investigate literature needs
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
</step>
|
|
260
|
+
|
|
261
|
+
</process>
|
|
262
|
+
|
|
263
|
+
<output>
|
|
264
|
+
- `.planning/ROADMAP.md`
|
|
265
|
+
- `.planning/STATE.md`
|
|
266
|
+
- `.planning/sections/XX-name/` directories
|
|
267
|
+
</output>
|
|
268
|
+
|
|
269
|
+
<success_criteria>
|
|
270
|
+
- [ ] ROADMAP.md has all sections with goals and word targets
|
|
271
|
+
- [ ] STATE.md initialized with correct position
|
|
272
|
+
- [ ] Section directories created
|
|
273
|
+
- [ ] Word budget totals match target
|
|
274
|
+
- [ ] All committed to git
|
|
275
|
+
</success_criteria>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wtfp:discuss-section
|
|
3
|
+
description: Gather section context through adaptive questioning before planning
|
|
4
|
+
argument-hint: "[section-number]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Bash
|
|
8
|
+
- Write
|
|
9
|
+
- Glob
|
|
10
|
+
- Grep
|
|
11
|
+
- AskUserQuestion
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<objective>
|
|
15
|
+
Gather section context through collaborative thinking before planning.
|
|
16
|
+
|
|
17
|
+
Purpose: Help the user articulate their vision for how a section should read, what it needs to accomplish, and what makes it effective.
|
|
18
|
+
Output: CONTEXT.md file in the section directory capturing vision, essential content, and boundaries.
|
|
19
|
+
</objective>
|
|
20
|
+
|
|
21
|
+
<execution_context>
|
|
22
|
+
@~/.claude/write-the-f-paper/workflows/discuss-section.md
|
|
23
|
+
@~/.claude/write-the-f-paper/templates/context.md
|
|
24
|
+
</execution_context>
|
|
25
|
+
|
|
26
|
+
<context>
|
|
27
|
+
Section number: $ARGUMENTS (required)
|
|
28
|
+
|
|
29
|
+
**Load project state first:**
|
|
30
|
+
@.planning/STATE.md
|
|
31
|
+
|
|
32
|
+
**Load roadmap:**
|
|
33
|
+
@.planning/ROADMAP.md
|
|
34
|
+
|
|
35
|
+
**Load structure documents:**
|
|
36
|
+
@.planning/structure/argument-map.md
|
|
37
|
+
@.planning/structure/outline.md
|
|
38
|
+
</context>
|
|
39
|
+
|
|
40
|
+
<process>
|
|
41
|
+
|
|
42
|
+
<step name="verify">
|
|
43
|
+
1. Check .planning/ directory exists (error if not - user should run /wtfp:new-paper)
|
|
44
|
+
2. Validate section number provided via $ARGUMENTS
|
|
45
|
+
3. Validate section exists in roadmap
|
|
46
|
+
</step>
|
|
47
|
+
|
|
48
|
+
<step name="execute_workflow">
|
|
49
|
+
Execute the discuss-section workflow from execution_context.
|
|
50
|
+
|
|
51
|
+
The workflow will:
|
|
52
|
+
- Validate section against roadmap
|
|
53
|
+
- Check for existing CONTEXT.md
|
|
54
|
+
- Gather vision through AskUserQuestion (not interrogation)
|
|
55
|
+
- Write CONTEXT.md capturing user's vision
|
|
56
|
+
- Commit to git
|
|
57
|
+
</step>
|
|
58
|
+
|
|
59
|
+
<step name="done">
|
|
60
|
+
Workflow outputs next steps to user (typically: research or plan the section).
|
|
61
|
+
</step>
|
|
62
|
+
|
|
63
|
+
</process>
|
|
64
|
+
|
|
65
|
+
<success_criteria>
|
|
66
|
+
- Section validated against roadmap
|
|
67
|
+
- Vision gathered through collaborative thinking
|
|
68
|
+
- CONTEXT.md created in section directory
|
|
69
|
+
- CONTEXT.md committed to git
|
|
70
|
+
- User knows next steps
|
|
71
|
+
</success_criteria>
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wtfp:export-latex
|
|
3
|
+
description: Export paper to LaTeX format
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Bash
|
|
7
|
+
- Write
|
|
8
|
+
- Glob
|
|
9
|
+
- AskUserQuestion
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<objective>
|
|
13
|
+
Export the paper to LaTeX format.
|
|
14
|
+
|
|
15
|
+
Generates:
|
|
16
|
+
- paper.tex from markdown sections
|
|
17
|
+
- references.bib from literature index
|
|
18
|
+
- Applies journal/conference template
|
|
19
|
+
|
|
20
|
+
Outputs to paper/ directory.
|
|
21
|
+
</objective>
|
|
22
|
+
|
|
23
|
+
<process>
|
|
24
|
+
|
|
25
|
+
<step name="verify">
|
|
26
|
+
**Verify content exists:**
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
[ ! -d paper ] && echo "ERROR: No paper/ directory found. Write sections first." && exit 1
|
|
30
|
+
ls paper/*.md 2>/dev/null || echo "WARNING: No markdown content in paper/"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
</step>
|
|
34
|
+
|
|
35
|
+
<step name="template">
|
|
36
|
+
**Select template:**
|
|
37
|
+
|
|
38
|
+
Use AskUserQuestion:
|
|
39
|
+
- header: "LaTeX Template"
|
|
40
|
+
- question: "Which LaTeX template should we use?"
|
|
41
|
+
- options:
|
|
42
|
+
- "Article (generic)" — Standard article class
|
|
43
|
+
- "IEEE" — IEEE conference/journal format
|
|
44
|
+
- "ACM" — ACM conference format
|
|
45
|
+
- "Custom" — I have a specific template
|
|
46
|
+
- "None" — Plain LaTeX, no special template
|
|
47
|
+
|
|
48
|
+
If "Custom":
|
|
49
|
+
- Ask for template path or template name
|
|
50
|
+
</step>
|
|
51
|
+
|
|
52
|
+
<step name="gather">
|
|
53
|
+
**Gather content:**
|
|
54
|
+
|
|
55
|
+
- Read all section files from paper/
|
|
56
|
+
- Read PROJECT.md for title, authors (if specified)
|
|
57
|
+
- Read sources/literature.md for bibliography
|
|
58
|
+
- Identify figures referenced
|
|
59
|
+
</step>
|
|
60
|
+
|
|
61
|
+
<step name="convert">
|
|
62
|
+
**Convert to LaTeX:**
|
|
63
|
+
|
|
64
|
+
Create paper/paper.tex:
|
|
65
|
+
|
|
66
|
+
```latex
|
|
67
|
+
% Generated by WTF-P
|
|
68
|
+
% [timestamp]
|
|
69
|
+
|
|
70
|
+
\documentclass[template-options]{article-or-template}
|
|
71
|
+
|
|
72
|
+
% Packages
|
|
73
|
+
\usepackage[utf8]{inputenc}
|
|
74
|
+
\usepackage{amsmath}
|
|
75
|
+
\usepackage{graphicx}
|
|
76
|
+
\usepackage{hyperref}
|
|
77
|
+
\usepackage{cite}
|
|
78
|
+
|
|
79
|
+
\title{[Title from PROJECT.md]}
|
|
80
|
+
\author{[Author if specified]}
|
|
81
|
+
\date{[Date]}
|
|
82
|
+
|
|
83
|
+
\begin{document}
|
|
84
|
+
|
|
85
|
+
\maketitle
|
|
86
|
+
|
|
87
|
+
% Abstract
|
|
88
|
+
\begin{abstract}
|
|
89
|
+
[Abstract content]
|
|
90
|
+
\end{abstract}
|
|
91
|
+
|
|
92
|
+
% Sections
|
|
93
|
+
\section{Introduction}
|
|
94
|
+
[Introduction content converted to LaTeX]
|
|
95
|
+
|
|
96
|
+
\section{Methods}
|
|
97
|
+
[Methods content]
|
|
98
|
+
|
|
99
|
+
% ... remaining sections ...
|
|
100
|
+
|
|
101
|
+
% References
|
|
102
|
+
\bibliographystyle{[style]}
|
|
103
|
+
\bibliography{references}
|
|
104
|
+
|
|
105
|
+
\end{document}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Conversion rules:
|
|
109
|
+
- `## Heading` → `\section{Heading}`
|
|
110
|
+
- `### Subheading` → `\subsection{Subheading}`
|
|
111
|
+
- `**bold**` → `\textbf{bold}`
|
|
112
|
+
- `*italic*` → `\textit{italic}`
|
|
113
|
+
- `[citation]` → `\cite{citation}`
|
|
114
|
+
- `` → `\includegraphics{path}` with figure environment
|
|
115
|
+
- Math: `$inline$` → `$inline$`, `$$display$$` → equation environment
|
|
116
|
+
|
|
117
|
+
</step>
|
|
118
|
+
|
|
119
|
+
<step name="bibliography">
|
|
120
|
+
**Generate bibliography:**
|
|
121
|
+
|
|
122
|
+
Create paper/references.bib from sources/literature.md:
|
|
123
|
+
|
|
124
|
+
```bibtex
|
|
125
|
+
@article{key1,
|
|
126
|
+
author = {Author Name},
|
|
127
|
+
title = {Paper Title},
|
|
128
|
+
journal = {Journal Name},
|
|
129
|
+
year = {2024},
|
|
130
|
+
volume = {1},
|
|
131
|
+
pages = {1-10}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
% ... additional entries ...
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
</step>
|
|
138
|
+
|
|
139
|
+
<step name="compile_check">
|
|
140
|
+
**Optional: Test compilation:**
|
|
141
|
+
|
|
142
|
+
Use AskUserQuestion:
|
|
143
|
+
- header: "Compile"
|
|
144
|
+
- question: "Try to compile the LaTeX?"
|
|
145
|
+
- options:
|
|
146
|
+
- "Yes, compile" — Run pdflatex
|
|
147
|
+
- "No, just export" — Skip compilation
|
|
148
|
+
|
|
149
|
+
If yes:
|
|
150
|
+
```bash
|
|
151
|
+
cd paper && pdflatex paper.tex && bibtex paper && pdflatex paper.tex && pdflatex paper.tex
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Report any errors.
|
|
155
|
+
|
|
156
|
+
</step>
|
|
157
|
+
|
|
158
|
+
<step name="commit">
|
|
159
|
+
```bash
|
|
160
|
+
git add paper/paper.tex paper/references.bib
|
|
161
|
+
git commit -m "$(cat <<'EOF'
|
|
162
|
+
export: generate LaTeX output
|
|
163
|
+
|
|
164
|
+
Template: [template]
|
|
165
|
+
Sections: [N]
|
|
166
|
+
References: [N]
|
|
167
|
+
EOF
|
|
168
|
+
)"
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
</step>
|
|
172
|
+
|
|
173
|
+
<step name="done">
|
|
174
|
+
**Present completion:**
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
LaTeX export complete:
|
|
178
|
+
|
|
179
|
+
- Document: paper/paper.tex
|
|
180
|
+
- Bibliography: paper/references.bib
|
|
181
|
+
- Template: [template]
|
|
182
|
+
|
|
183
|
+
## Files Generated
|
|
184
|
+
- paper.tex: [N] sections, [X] words
|
|
185
|
+
- references.bib: [N] entries
|
|
186
|
+
[If compiled:] - paper.pdf: Generated successfully
|
|
187
|
+
|
|
188
|
+
## Manual Steps
|
|
189
|
+
1. Review paper/paper.tex for any conversion issues
|
|
190
|
+
2. Add any custom LaTeX packages needed
|
|
191
|
+
3. Compile: `cd paper && pdflatex paper.tex && bibtex paper && pdflatex paper.tex`
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## ▶ Next Up
|
|
196
|
+
|
|
197
|
+
**Review output** — check formatting and fix issues
|
|
198
|
+
|
|
199
|
+
Or if ready:
|
|
200
|
+
`/wtfp:submit-milestone "draft-1"` — archive this version
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
</step>
|
|
206
|
+
|
|
207
|
+
</process>
|
|
208
|
+
|
|
209
|
+
<success_criteria>
|
|
210
|
+
- [ ] All sections converted to LaTeX
|
|
211
|
+
- [ ] Bibliography generated
|
|
212
|
+
- [ ] Template applied correctly
|
|
213
|
+
- [ ] Figures referenced properly
|
|
214
|
+
- [ ] Citations converted
|
|
215
|
+
- [ ] Committed to git
|
|
216
|
+
</success_criteria>
|