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.
- package/README.md +146 -208
- package/bin/commands/doctor.js +88 -2
- package/bin/commands/install-logic.js +127 -36
- package/bin/commands/status.js +22 -4
- package/bin/commands/update.js +5 -4
- package/bin/install.js +66 -26
- package/bin/lib/analyze-impact.js +105 -0
- package/bin/lib/bib-format.js +161 -0
- package/bin/lib/bib-index.js +104 -0
- package/bin/lib/checkpoint.js +183 -0
- package/bin/lib/citation-fetcher.js +299 -0
- package/bin/lib/citation-ranker.js +133 -0
- package/bin/lib/context-primer.js +214 -0
- package/bin/lib/manifest.js +80 -2
- package/bin/lib/scholar-lookup.js +188 -0
- package/bin/lib/semantic-scholar.js +184 -0
- package/bin/lib/utils.js +22 -1
- package/bin/uninstall.js +270 -111
- package/core/write-the-f-paper/references/agent-model-matrix.md +62 -0
- package/core/write-the-f-paper/references/checkpoints.md +160 -9
- package/core/write-the-f-paper/references/context-fidelity.md +153 -0
- package/core/write-the-f-paper/references/deviation-rules.md +150 -0
- package/core/write-the-f-paper/references/git-integration.md +80 -0
- package/core/write-the-f-paper/references/orchestrator-pattern.md +167 -0
- package/core/write-the-f-paper/references/planning-config.md +135 -0
- package/core/write-the-f-paper/references/ui-brand.md +186 -0
- package/core/write-the-f-paper/templates/UAT.md +80 -0
- package/core/write-the-f-paper/templates/base-prefs.yaml +42 -0
- package/core/write-the-f-paper/templates/config.json +31 -5
- package/core/write-the-f-paper/workflows/create-outline.wcn.md +1 -1
- package/core/write-the-f-paper/workflows/execute-outline.md +163 -0
- package/core/write-the-f-paper/workflows/execute-outline.wcn.md +73 -0
- package/core/write-the-f-paper/workflows/execute-section.wcn.md +141 -169
- package/core/write-the-f-paper/workflows/plan-section.wcn.md +96 -103
- package/core/write-the-f-paper/workflows/research-gap.md +27 -3
- package/core/write-the-f-paper/workflows/research-gap.wcn.md +18 -1
- package/core/write-the-f-paper/workflows/verify-work.md +251 -0
- package/core/write-the-f-paper/workflows/verify-work.wcn.md +74 -0
- package/package.json +19 -7
- package/vendors/claude/.claude-plugin/plugin.json +2 -2
- package/vendors/claude/agents/wtfp/argument-verifier.md +189 -0
- package/vendors/claude/agents/wtfp/citation-expert.md +45 -0
- package/vendors/claude/agents/wtfp/citation-formatter.md +42 -0
- package/vendors/claude/agents/wtfp/coherence-checker.md +167 -0
- package/vendors/claude/agents/wtfp/outliner.md +259 -0
- package/vendors/claude/agents/wtfp/plan-checker.md +249 -0
- package/vendors/claude/agents/wtfp/prose-polisher.md +166 -0
- package/vendors/claude/agents/wtfp/research-synthesizer.md +215 -0
- package/vendors/claude/agents/wtfp/section-planner.md +364 -0
- package/vendors/claude/agents/wtfp/section-reviewer.md +182 -0
- package/vendors/claude/agents/wtfp/section-writer.md +312 -0
- package/vendors/claude/commands/wtfp/add-todo.md +108 -0
- package/vendors/claude/commands/wtfp/analyze-bib.md +60 -249
- package/vendors/claude/commands/wtfp/audit-milestone.md +286 -0
- package/vendors/claude/commands/wtfp/check-refs.md +60 -131
- package/vendors/claude/commands/wtfp/check-todos.md +152 -0
- package/vendors/claude/commands/wtfp/checkpoint.md +105 -0
- package/vendors/claude/commands/wtfp/contribute.md +1 -1
- package/vendors/claude/commands/wtfp/create-outline.md +109 -195
- package/vendors/claude/commands/wtfp/create-poster.md +1 -1
- package/vendors/claude/commands/wtfp/create-slides.md +1 -1
- package/vendors/claude/commands/wtfp/discuss-section.md +1 -1
- package/vendors/claude/commands/wtfp/execute-outline.md +257 -0
- package/vendors/claude/commands/wtfp/export-latex.md +1 -1
- package/vendors/claude/commands/wtfp/help.md +174 -280
- package/vendors/claude/commands/wtfp/insert-section.md +1 -1
- package/vendors/claude/commands/wtfp/list-assumptions.md +1 -1
- package/vendors/claude/commands/wtfp/map-project.md +35 -124
- package/vendors/claude/commands/wtfp/new-paper.md +88 -362
- package/vendors/claude/commands/wtfp/pause-writing.md +1 -1
- package/vendors/claude/commands/wtfp/plan-milestone-gaps.md +255 -0
- package/vendors/claude/commands/wtfp/plan-revision.md +1 -1
- package/vendors/claude/commands/wtfp/plan-section.md +165 -190
- package/vendors/claude/commands/wtfp/polish-prose.md +66 -118
- package/vendors/claude/commands/wtfp/progress.md +82 -254
- package/vendors/claude/commands/wtfp/quick.md +107 -0
- package/vendors/claude/commands/wtfp/remove-section.md +1 -1
- package/vendors/claude/commands/wtfp/report-bug.md +1 -1
- package/vendors/claude/commands/wtfp/request-feature.md +1 -1
- package/vendors/claude/commands/wtfp/research-gap.md +138 -151
- package/vendors/claude/commands/wtfp/resume-writing.md +1 -1
- package/vendors/claude/commands/wtfp/review-section.md +55 -333
- package/vendors/claude/commands/wtfp/settings.md +197 -0
- package/vendors/claude/commands/wtfp/submit-milestone.md +248 -99
- package/vendors/claude/commands/wtfp/update.md +112 -0
- package/vendors/claude/commands/wtfp/verify-work.md +254 -0
- package/vendors/claude/commands/wtfp/write-section.md +144 -180
- package/vendors/claude/mcp/research-server/package.json +13 -0
- package/vendors/claude/mcp/research-server/src/index.js +133 -0
- package/vendors/gemini/agents/wtfp/argument-verifier.md +184 -0
- package/vendors/gemini/agents/wtfp/citation-expert.md +41 -0
- package/vendors/gemini/agents/wtfp/citation-formatter.md +38 -0
- package/vendors/gemini/agents/wtfp/coherence-checker.md +162 -0
- package/vendors/gemini/agents/wtfp/outliner.md +252 -0
- package/vendors/gemini/agents/wtfp/plan-checker.md +244 -0
- package/vendors/gemini/agents/wtfp/prose-polisher.md +158 -0
- package/vendors/gemini/agents/wtfp/research-synthesizer.md +205 -0
- package/vendors/gemini/agents/wtfp/section-planner.md +355 -0
- package/vendors/gemini/agents/wtfp/section-reviewer.md +175 -0
- package/vendors/gemini/agents/wtfp/section-writer.md +304 -0
- package/vendors/gemini/commands/wtfp/add-todo.toml +102 -0
- package/vendors/gemini/commands/wtfp/analyze-bib.toml +126 -0
- package/vendors/gemini/commands/wtfp/audit-milestone.toml +278 -0
- package/vendors/gemini/commands/wtfp/check-refs.toml +123 -0
- package/vendors/gemini/commands/wtfp/check-todos.toml +145 -0
- package/vendors/gemini/commands/wtfp/checkpoint.toml +96 -0
- package/vendors/gemini/commands/wtfp/contribute.toml +269 -0
- package/vendors/gemini/commands/wtfp/create-outline.toml +180 -0
- package/vendors/gemini/commands/wtfp/create-poster.toml +36 -0
- package/vendors/gemini/commands/wtfp/create-slides.toml +35 -0
- package/vendors/gemini/commands/wtfp/discuss-section.toml +62 -0
- package/vendors/gemini/commands/wtfp/execute-outline.toml +247 -0
- package/vendors/gemini/commands/wtfp/export-latex.toml +209 -0
- package/vendors/gemini/commands/wtfp/help.toml +184 -0
- package/vendors/gemini/commands/wtfp/insert-section.toml +123 -0
- package/vendors/gemini/commands/wtfp/list-assumptions.toml +104 -0
- package/vendors/gemini/commands/wtfp/map-project.toml +99 -0
- package/vendors/gemini/commands/wtfp/new-paper.toml +160 -0
- package/vendors/gemini/commands/wtfp/pause-writing.toml +140 -0
- package/vendors/gemini/commands/wtfp/plan-milestone-gaps.toml +249 -0
- package/vendors/gemini/commands/wtfp/plan-revision.toml +171 -0
- package/vendors/gemini/commands/wtfp/plan-section.toml +212 -0
- package/vendors/gemini/commands/wtfp/polish-prose.toml +114 -0
- package/vendors/gemini/commands/wtfp/progress.toml +145 -0
- package/vendors/gemini/commands/wtfp/quick.toml +96 -0
- package/vendors/gemini/commands/wtfp/remove-section.toml +140 -0
- package/vendors/gemini/commands/wtfp/report-bug.toml +126 -0
- package/vendors/gemini/commands/wtfp/request-feature.toml +155 -0
- package/vendors/gemini/commands/wtfp/research-gap.toml +214 -0
- package/vendors/gemini/commands/wtfp/resume-writing.toml +136 -0
- package/vendors/gemini/commands/wtfp/review-section.toml +121 -0
- package/vendors/gemini/commands/wtfp/settings.toml +191 -0
- package/vendors/gemini/commands/wtfp/submit-milestone.toml +351 -0
- package/vendors/gemini/commands/wtfp/update.toml +107 -0
- package/vendors/gemini/commands/wtfp/verify-work.toml +245 -0
- package/vendors/gemini/commands/wtfp/write-section.toml +228 -0
- package/vendors/opencode/agents/wtfp/argument-verifier.md +184 -0
- package/vendors/opencode/agents/wtfp/citation-expert.md +41 -0
- package/vendors/opencode/agents/wtfp/citation-formatter.md +38 -0
- package/vendors/opencode/agents/wtfp/coherence-checker.md +162 -0
- package/vendors/opencode/agents/wtfp/outliner.md +252 -0
- package/vendors/opencode/agents/wtfp/plan-checker.md +244 -0
- package/vendors/opencode/agents/wtfp/prose-polisher.md +158 -0
- package/vendors/opencode/agents/wtfp/research-synthesizer.md +205 -0
- package/vendors/opencode/agents/wtfp/section-planner.md +355 -0
- package/vendors/opencode/agents/wtfp/section-reviewer.md +175 -0
- package/vendors/opencode/agents/wtfp/section-writer.md +304 -0
- package/vendors/opencode/commands/wtfp/add-todo.md +103 -0
- package/vendors/opencode/commands/wtfp/analyze-bib.md +127 -0
- package/vendors/opencode/commands/wtfp/audit-milestone.md +279 -0
- package/vendors/opencode/commands/wtfp/check-refs.md +124 -0
- package/vendors/opencode/commands/wtfp/check-todos.md +146 -0
- package/vendors/opencode/commands/wtfp/checkpoint.md +97 -0
- package/vendors/opencode/commands/wtfp/contribute.md +266 -0
- package/vendors/opencode/commands/wtfp/create-outline.md +181 -0
- package/vendors/opencode/commands/wtfp/create-poster.md +37 -0
- package/vendors/opencode/commands/wtfp/create-slides.md +36 -0
- package/vendors/opencode/commands/wtfp/discuss-section.md +63 -0
- package/vendors/opencode/commands/wtfp/execute-outline.md +248 -0
- package/vendors/opencode/commands/wtfp/export-latex.md +210 -0
- package/vendors/opencode/commands/wtfp/help.md +185 -0
- package/vendors/opencode/commands/wtfp/insert-section.md +124 -0
- package/vendors/opencode/commands/wtfp/list-assumptions.md +105 -0
- package/vendors/opencode/commands/wtfp/map-project.md +100 -0
- package/vendors/opencode/commands/wtfp/new-paper.md +161 -0
- package/vendors/opencode/commands/wtfp/pause-writing.md +141 -0
- package/vendors/opencode/commands/wtfp/plan-milestone-gaps.md +250 -0
- package/vendors/opencode/commands/wtfp/plan-revision.md +174 -0
- package/vendors/opencode/commands/wtfp/plan-section.md +214 -0
- package/vendors/opencode/commands/wtfp/polish-prose.md +115 -0
- package/vendors/opencode/commands/wtfp/progress.md +146 -0
- package/vendors/opencode/commands/wtfp/quick.md +97 -0
- package/vendors/opencode/commands/wtfp/remove-section.md +141 -0
- package/vendors/opencode/commands/wtfp/report-bug.md +127 -0
- package/vendors/opencode/commands/wtfp/request-feature.md +156 -0
- package/vendors/opencode/commands/wtfp/research-gap.md +215 -0
- package/vendors/opencode/commands/wtfp/resume-writing.md +137 -0
- package/vendors/opencode/commands/wtfp/review-section.md +123 -0
- package/vendors/opencode/commands/wtfp/settings.md +192 -0
- package/vendors/opencode/commands/wtfp/submit-milestone.md +352 -0
- package/vendors/opencode/commands/wtfp/update.md +108 -0
- package/vendors/opencode/commands/wtfp/verify-work.md +246 -0
- package/vendors/opencode/commands/wtfp/write-section.md +228 -0
|
@@ -1,443 +1,169 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wtfp:new-paper
|
|
3
|
-
description:
|
|
3
|
+
description: Start a new paper with guided interview and setup
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Read
|
|
6
6
|
- Bash
|
|
7
7
|
- Write
|
|
8
|
+
- Glob
|
|
9
|
+
- Grep
|
|
10
|
+
- Task
|
|
8
11
|
- AskUserQuestion
|
|
9
12
|
---
|
|
10
13
|
|
|
11
|
-
<objective>
|
|
12
|
-
|
|
13
|
-
Initialize a new academic paper through comprehensive context gathering.
|
|
14
|
-
|
|
15
|
-
This is the most leveraged moment in any writing project. Deep questioning here means better structure, better arguments, better outcomes.
|
|
16
|
-
|
|
17
|
-
Creates `.planning/` with PROJECT.md, config.json, and structure documents.
|
|
18
|
-
|
|
19
|
-
</objective>
|
|
20
|
-
|
|
21
14
|
<execution_context>
|
|
22
|
-
|
|
23
15
|
@~/.claude/write-the-f-paper/references/principles.md
|
|
24
16
|
@~/.claude/write-the-f-paper/references/questioning.md
|
|
25
17
|
@~/.claude/write-the-f-paper/templates/project.md
|
|
26
18
|
@~/.claude/write-the-f-paper/templates/config.json
|
|
27
19
|
@~/.claude/write-the-f-paper/venues/
|
|
28
|
-
|
|
29
20
|
</execution_context>
|
|
30
21
|
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
<step name="setup">
|
|
34
|
-
|
|
35
|
-
**MANDATORY FIRST STEP — Execute these checks before ANY user interaction:**
|
|
36
|
-
|
|
37
|
-
1. **Abort if project exists:**
|
|
38
|
-
```bash
|
|
39
|
-
[ -f .planning/PROJECT.md ] && echo "ERROR: Paper already initialized. Use /wtfp:progress" && exit 1
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
2. **Initialize git repo in THIS directory** (required for version tracking):
|
|
43
|
-
```bash
|
|
44
|
-
if [ -d .git ] || [ -f .git ]; then
|
|
45
|
-
echo "Git repo exists in current directory"
|
|
46
|
-
else
|
|
47
|
-
git init
|
|
48
|
-
echo "Initialized new git repo"
|
|
49
|
-
fi
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
3. **Detect existing writing materials (brownfield detection):**
|
|
53
|
-
```bash
|
|
54
|
-
# Check for existing writing files
|
|
55
|
-
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)
|
|
56
|
-
HAS_SOURCES=$([ -d sources ] || [ -d references ] || [ -d literature ] && echo "yes")
|
|
57
|
-
HAS_SOURCE_MAP=$([ -d .planning/sources ] && echo "yes")
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
**You MUST run all bash commands above using the Bash tool before proceeding.**
|
|
22
|
+
<objective>
|
|
23
|
+
Initialize a new academic paper through comprehensive context gathering.
|
|
61
24
|
|
|
62
|
-
|
|
25
|
+
**Orchestrator role:** Check preconditions, detect brownfield projects, gather paper vision through batched questioning, synthesize PROJECT.md + config.json + structure documents, commit.
|
|
63
26
|
|
|
64
|
-
|
|
27
|
+
Creates `.planning/` with PROJECT.md, config.json, and structure documents.
|
|
28
|
+
</objective>
|
|
65
29
|
|
|
66
|
-
|
|
30
|
+
<context>
|
|
31
|
+
No arguments. Runs in current directory.
|
|
32
|
+
</context>
|
|
67
33
|
|
|
68
|
-
|
|
69
|
-
- If `WRITING_FILES` is non-empty OR `HAS_SOURCES` is "yes"
|
|
70
|
-
- AND `HAS_SOURCE_MAP` is NOT "yes"
|
|
34
|
+
<process>
|
|
71
35
|
|
|
72
|
-
|
|
73
|
-
- header: "Existing Material"
|
|
74
|
-
- question: "I detected existing writing materials. Would you like to map them first?"
|
|
75
|
-
- options:
|
|
76
|
-
- "Map sources first" — Run /wtfp:map-project to index existing literature/drafts (Recommended)
|
|
77
|
-
- "Skip mapping" — Proceed with paper initialization
|
|
36
|
+
## 1. Validate Environment
|
|
78
37
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
Run `/wtfp:map-project` first, then return to `/wtfp:new-paper`
|
|
38
|
+
```bash
|
|
39
|
+
[ -f .planning/PROJECT.md ] && echo "ERROR: Paper already initialized. Use /wtfp:progress" && exit 1
|
|
82
40
|
```
|
|
83
|
-
Exit command.
|
|
84
|
-
|
|
85
|
-
**If "Skip mapping":** Continue to type step.
|
|
86
|
-
|
|
87
|
-
**If no existing materials detected OR sources already mapped:** Continue to type step.
|
|
88
|
-
|
|
89
|
-
</step>
|
|
90
|
-
|
|
91
|
-
<step name="type">
|
|
92
|
-
|
|
93
|
-
**Ask paper type:**
|
|
94
|
-
|
|
95
|
-
Use AskUserQuestion:
|
|
96
|
-
- header: "Paper Type"
|
|
97
|
-
- question: "What type of document are you writing?"
|
|
98
|
-
- options:
|
|
99
|
-
- "Research paper" — Journal article or conference paper
|
|
100
|
-
- "Grant proposal" — Funding application (NSF, NIH, etc.)
|
|
101
|
-
- "Thesis chapter" — Dissertation or thesis section
|
|
102
|
-
- "Other" — Essay, report, or something else
|
|
103
|
-
|
|
104
|
-
Store the document type for later structure decisions.
|
|
105
|
-
|
|
106
|
-
</step>
|
|
107
|
-
|
|
108
|
-
<step name="venue_template">
|
|
109
|
-
|
|
110
|
-
**Select venue template (for research papers):**
|
|
111
|
-
|
|
112
|
-
If document type is "Research paper", ask for venue template:
|
|
113
|
-
|
|
114
|
-
Use AskUserQuestion:
|
|
115
|
-
- header: "Venue"
|
|
116
|
-
- question: "What's your target venue or field?"
|
|
117
|
-
- options:
|
|
118
|
-
- "ACM CS" — Systems, databases, architecture (SIGMOD, OSDI, SOSP)
|
|
119
|
-
- "IEEE CS" — HPC, parallel systems, storage (SC, IPDPS, TPDS)
|
|
120
|
-
- "ML/AI" — NeurIPS, ICML, ICLR style
|
|
121
|
-
- "Nature/Science" — Classic IMRaD for life sciences
|
|
122
|
-
- "Other" — Custom structure
|
|
123
|
-
|
|
124
|
-
**Load venue template:**
|
|
125
|
-
|
|
126
|
-
Based on selection, read the corresponding venue template:
|
|
127
|
-
- ACM CS → `~/.claude/write-the-f-paper/venues/acm-cs.yaml`
|
|
128
|
-
- IEEE CS → `~/.claude/write-the-f-paper/venues/ieee-cs.yaml`
|
|
129
|
-
- ML/AI → `~/.claude/write-the-f-paper/venues/arxiv-ml.yaml`
|
|
130
|
-
- Nature/Science → `~/.claude/write-the-f-paper/venues/nature.yaml`
|
|
131
|
-
- Other → Ask user to describe structure
|
|
132
|
-
|
|
133
|
-
If document type is "Thesis chapter":
|
|
134
|
-
- Load `~/.claude/write-the-f-paper/venues/thesis-chapter.yaml`
|
|
135
|
-
|
|
136
|
-
Store the selected venue template for use in structure step.
|
|
137
|
-
|
|
138
|
-
</step>
|
|
139
|
-
|
|
140
|
-
<step name="question">
|
|
141
|
-
|
|
142
|
-
**1. Open (FREEFORM — do NOT use AskUserQuestion):**
|
|
143
|
-
|
|
144
|
-
Ask inline: "What is the core argument or contribution of your paper?"
|
|
145
|
-
|
|
146
|
-
Wait for their freeform response. This gives you the context needed to ask intelligent follow-up questions.
|
|
147
|
-
|
|
148
|
-
**2. Follow the thread (NOW use AskUserQuestion):**
|
|
149
|
-
|
|
150
|
-
Based on their response, use AskUserQuestion with options that probe what they mentioned:
|
|
151
|
-
- header: "[Topic they mentioned]"
|
|
152
|
-
- question: "You mentioned [X] — how would you describe the key insight?"
|
|
153
|
-
- options: 2-3 interpretations + "Something else"
|
|
154
|
-
|
|
155
|
-
**3. Target venue:**
|
|
156
|
-
|
|
157
|
-
Use AskUserQuestion:
|
|
158
|
-
- header: "Venue"
|
|
159
|
-
- question: "What's the target venue or format?"
|
|
160
|
-
- options: Common venues for their field + "Undecided" + "Let me specify"
|
|
161
|
-
|
|
162
|
-
**4. Sharpen the core:**
|
|
163
41
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
-
|
|
167
|
-
- options: Key aspects they've mentioned + "The methodology" + "The findings" + "Something else"
|
|
168
|
-
|
|
169
|
-
**5. Find boundaries:**
|
|
170
|
-
|
|
171
|
-
Use AskUserQuestion:
|
|
172
|
-
- header: "Scope"
|
|
173
|
-
- question: "What's explicitly NOT in this paper?"
|
|
174
|
-
- options: Tempting tangents + "Nothing specific" + "Let me list them"
|
|
175
|
-
|
|
176
|
-
**6. Constraints:**
|
|
177
|
-
|
|
178
|
-
Use AskUserQuestion:
|
|
179
|
-
- header: "Constraints"
|
|
180
|
-
- question: "Any hard constraints?"
|
|
181
|
-
- options:
|
|
182
|
-
- "Page/word limit" — Strict length requirements
|
|
183
|
-
- "Deadline" — Submission deadline pressure
|
|
184
|
-
- "Data limitations" — Working with specific dataset
|
|
185
|
-
- "None" — Flexible constraints
|
|
186
|
-
- "Multiple constraints" — Let me explain
|
|
187
|
-
|
|
188
|
-
**7. Decision gate:**
|
|
189
|
-
|
|
190
|
-
Use AskUserQuestion:
|
|
191
|
-
- header: "Ready?"
|
|
192
|
-
- question: "Ready to create PROJECT.md, or explore more?"
|
|
193
|
-
- options (ALL THREE REQUIRED):
|
|
194
|
-
- "Create PROJECT.md" — Finalize and continue
|
|
195
|
-
- "Ask more questions" — I'll dig deeper
|
|
196
|
-
- "Let me add context" — You have more to share
|
|
197
|
-
|
|
198
|
-
If "Ask more questions" → return to step 2.
|
|
199
|
-
If "Let me add context" → receive input via their response → return to step 2.
|
|
200
|
-
Loop until "Create PROJECT.md" selected.
|
|
201
|
-
|
|
202
|
-
</step>
|
|
203
|
-
|
|
204
|
-
<step name="project">
|
|
205
|
-
|
|
206
|
-
Synthesize all context into `.planning/PROJECT.md`:
|
|
207
|
-
|
|
208
|
-
```markdown
|
|
209
|
-
# [Paper Title]
|
|
210
|
-
|
|
211
|
-
## What This Is
|
|
212
|
-
[Paper type, target venue, approximate length]
|
|
213
|
-
|
|
214
|
-
## Core Argument
|
|
215
|
-
[The thesis in 1-2 sentences — the one thing reviewers should remember]
|
|
216
|
-
|
|
217
|
-
## Requirements
|
|
218
|
-
|
|
219
|
-
### Must Have
|
|
220
|
-
- [ ] [Required element 1]
|
|
221
|
-
- [ ] [Required element 2]
|
|
222
|
-
- [ ] [Required element 3]
|
|
223
|
-
|
|
224
|
-
### Should Have
|
|
225
|
-
- [ ] [Desired element 1]
|
|
226
|
-
- [ ] [Desired element 2]
|
|
227
|
-
|
|
228
|
-
### Out of Scope
|
|
229
|
-
- [Exclusion 1] — [why]
|
|
230
|
-
- [Exclusion 2] — [why]
|
|
231
|
-
|
|
232
|
-
## Target Audience
|
|
233
|
-
[Who reads this, what they care about, what they already know]
|
|
234
|
-
|
|
235
|
-
## Constraints
|
|
236
|
-
- [Constraint 1]: [detail]
|
|
237
|
-
- [Constraint 2]: [detail]
|
|
238
|
-
|
|
239
|
-
## Key Decisions
|
|
240
|
-
|
|
241
|
-
| Decision | Rationale | Outcome |
|
|
242
|
-
|----------|-----------|---------|
|
|
243
|
-
| [Choice from questioning] | [Why] | — Pending |
|
|
244
|
-
|
|
245
|
-
---
|
|
246
|
-
*Last updated: [date] after initialization*
|
|
42
|
+
Initialize git if needed:
|
|
43
|
+
```bash
|
|
44
|
+
[ -d .git ] || [ -f .git ] || git init
|
|
247
45
|
```
|
|
248
46
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
</step>
|
|
252
|
-
|
|
253
|
-
<step name="structure">
|
|
47
|
+
## 2. Brownfield Detection
|
|
254
48
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
```markdown
|
|
261
|
-
# Argument Map
|
|
262
|
-
|
|
263
|
-
## Central Thesis
|
|
264
|
-
[From core argument above]
|
|
49
|
+
```bash
|
|
50
|
+
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)
|
|
51
|
+
HAS_SOURCES=$([ -d sources ] || [ -d references ] || [ -d literature ] && echo "yes")
|
|
52
|
+
HAS_SOURCE_MAP=$([ -d .planning/sources ] && echo "yes")
|
|
53
|
+
```
|
|
265
54
|
|
|
266
|
-
|
|
267
|
-
### Claim 1: [Statement]
|
|
268
|
-
- Evidence: [What will support this]
|
|
269
|
-
- Strength: [to be determined]
|
|
55
|
+
**If materials detected and no source map:** Offer `/wtfp:map-project` first via AskUserQuestion.
|
|
270
56
|
|
|
271
|
-
|
|
272
|
-
- Evidence: [What will support this]
|
|
273
|
-
- Strength: [to be determined]
|
|
57
|
+
## 3. Gather Core Context (Batched)
|
|
274
58
|
|
|
275
|
-
|
|
276
|
-
|
|
59
|
+
Use AskUserQuestion — collect foundations in one turn:
|
|
60
|
+
- header: "Paper Foundations"
|
|
61
|
+
- 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?)"
|
|
62
|
+
- options: "I provided the details" | "Guide me step-by-step"
|
|
277
63
|
|
|
278
|
-
|
|
279
|
-
- [Claims needing evidence]
|
|
280
|
-
- [Logical leaps to address]
|
|
281
|
-
```
|
|
64
|
+
If step-by-step selected, ask Type → Venue → Argument sequentially.
|
|
282
65
|
|
|
283
|
-
|
|
284
|
-
```markdown
|
|
285
|
-
# Document Outline
|
|
66
|
+
## 4. Venue Template Selection
|
|
286
67
|
|
|
287
|
-
|
|
68
|
+
If ambiguous, ask via AskUserQuestion:
|
|
69
|
+
- header: "Venue Structure"
|
|
70
|
+
- options: "ACM CS" | "IEEE CS" | "ML/AI" | "Nature/Science" | "Thesis"
|
|
288
71
|
|
|
289
|
-
|
|
290
|
-
[Generated from venue template - see ~/.claude/write-the-f-paper/venues/]
|
|
72
|
+
Load corresponding YAML from `~/.claude/write-the-f-paper/venues/`.
|
|
291
73
|
|
|
292
|
-
|
|
293
|
-
|---|---------|---------|------------|
|
|
294
|
-
[Populated from venue template structure]
|
|
74
|
+
## 5. Sharpen Core Argument
|
|
295
75
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
|
300
|
-
| [Section 1 from template] | [X] | 0 |
|
|
301
|
-
| [Section 2 from template] | [X] | 0 |
|
|
302
|
-
| [...] | | |
|
|
303
|
-
| Total | [X] | 0 |
|
|
76
|
+
If core_argument was weak, drill down:
|
|
77
|
+
- header: "Refine Core"
|
|
78
|
+
- question: "If reviewers remember ONE thing, what is it?"
|
|
79
|
+
- options: "The Method" | "The Findings" | "The Theory" | "The System"
|
|
304
80
|
|
|
305
|
-
##
|
|
306
|
-
[From venue template notes field - venue-specific guidance]
|
|
307
|
-
```
|
|
81
|
+
## 6. Gather Constraints
|
|
308
82
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
83
|
+
- header: "Scope & Limits"
|
|
84
|
+
- question: "1. **Out of Scope?** 2. **Hard Constraints?** (page limits, deadlines)"
|
|
85
|
+
- options: "Provided details" | "No constraints"
|
|
312
86
|
|
|
313
|
-
##
|
|
314
|
-
- World state: [Current understanding]
|
|
315
|
-
- Tension: [What's missing]
|
|
316
|
-
- Stakes: [Why it matters]
|
|
87
|
+
## 7. Synthesize PROJECT.md
|
|
317
88
|
|
|
318
|
-
|
|
319
|
-
- Approach: [How you tackled it]
|
|
320
|
-
- Discovery: [What you found]
|
|
89
|
+
Write `.planning/PROJECT.md` using template from `~/.claude/write-the-f-paper/templates/project.md`.
|
|
321
90
|
|
|
322
|
-
|
|
323
|
-
- Insight: [What it means]
|
|
324
|
-
- Transformation: [How understanding changes]
|
|
91
|
+
Populate: What This Is, Core Argument, Requirements (Must/Should/Out of Scope), Target Audience, Constraints, Key Decisions.
|
|
325
92
|
|
|
326
|
-
##
|
|
327
|
-
- Hook: [Why they keep reading]
|
|
328
|
-
- Payoff: [The "aha" moment]
|
|
329
|
-
```
|
|
93
|
+
## 8. Create Structure Documents
|
|
330
94
|
|
|
331
|
-
|
|
95
|
+
Create `.planning/structure/` with:
|
|
96
|
+
- **argument-map.md** — Central thesis, supporting claims, logical flow, gaps
|
|
97
|
+
- **outline.md** — Venue template sections, word budget table
|
|
98
|
+
- **narrative-arc.md** — Problem/Journey/Resolution, reader experience
|
|
332
99
|
|
|
333
|
-
|
|
100
|
+
## 9. Workflow Mode & Config
|
|
334
101
|
|
|
335
|
-
Ask
|
|
102
|
+
Ask mode (Interactive / Flow) and depth (Quick / Standard / Comprehensive) via AskUserQuestion.
|
|
336
103
|
|
|
337
|
-
|
|
104
|
+
## 9b. Git & Planning Settings
|
|
338
105
|
|
|
339
|
-
|
|
340
|
-
-
|
|
106
|
+
Ask about git tracking via AskUserQuestion:
|
|
107
|
+
- header: "Git & Planning"
|
|
108
|
+
- question: "Track planning documents in git?"
|
|
341
109
|
- options:
|
|
342
|
-
- "
|
|
343
|
-
- "
|
|
110
|
+
- "Yes (default)" -- commit_docs: true, planning artifacts are version-controlled
|
|
111
|
+
- "No" -- commit_docs: false, only paper content is committed
|
|
344
112
|
|
|
345
|
-
|
|
113
|
+
Use the answer to set `planning.commit_docs` in config.json.
|
|
346
114
|
|
|
347
|
-
|
|
115
|
+
Ask about branching strategy via AskUserQuestion:
|
|
116
|
+
- header: "Git Branching"
|
|
117
|
+
- question: "Branch strategy for git history?"
|
|
118
|
+
- options:
|
|
119
|
+
- "None (default)" -- all commits on current branch, git.branching_strategy: "none"
|
|
120
|
+
- "Section branches" -- one branch per section, merged on review pass, git.branching_strategy: "section"
|
|
121
|
+
- "Submission branches" -- branch per milestone/submission target, git.branching_strategy: "submission"
|
|
348
122
|
|
|
349
|
-
|
|
123
|
+
Use the answer to set `git.branching_strategy` in config.json.
|
|
350
124
|
|
|
351
|
-
|
|
125
|
+
## 9c. Write Config
|
|
352
126
|
|
|
353
|
-
|
|
354
|
-
- question: "How thorough should section planning be?"
|
|
355
|
-
- options:
|
|
356
|
-
- "Quick" — Draft fast, iterate later (minimal planning)
|
|
357
|
-
- "Standard" — Balanced planning and writing
|
|
358
|
-
- "Comprehensive" — Thorough outlines before writing
|
|
359
|
-
|
|
360
|
-
Create `.planning/config.json`:
|
|
361
|
-
```json
|
|
362
|
-
{
|
|
363
|
-
"mode": "[chosen mode]",
|
|
364
|
-
"depth": "[chosen depth]",
|
|
365
|
-
"document_type": "[paper/grant/thesis/other]",
|
|
366
|
-
"venue_template": "[acm-cs/ieee-cs/arxiv-ml/nature/thesis/custom]",
|
|
367
|
-
"citation_style": "[from venue template]",
|
|
368
|
-
"gates": {
|
|
369
|
-
"confirm_project": true,
|
|
370
|
-
"confirm_sections": true,
|
|
371
|
-
"confirm_outline": true,
|
|
372
|
-
"confirm_plan": true,
|
|
373
|
-
"review_before_submit": true
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
```
|
|
127
|
+
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).
|
|
377
128
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
<step name="commit">
|
|
129
|
+
## 10. Commit
|
|
381
130
|
|
|
382
131
|
```bash
|
|
383
132
|
git add .planning/PROJECT.md .planning/config.json .planning/structure/
|
|
384
|
-
git commit -m "
|
|
385
|
-
docs: initialize [paper-title]
|
|
386
|
-
|
|
387
|
-
[One-liner core argument]
|
|
388
|
-
|
|
389
|
-
Creates PROJECT.md with paper vision and structure documents.
|
|
390
|
-
EOF
|
|
391
|
-
)"
|
|
133
|
+
git commit -m "docs: initialize [paper-title]"
|
|
392
134
|
```
|
|
393
135
|
|
|
394
|
-
</
|
|
395
|
-
|
|
396
|
-
<step name="done">
|
|
136
|
+
</process>
|
|
397
137
|
|
|
398
|
-
|
|
138
|
+
<offer_next>
|
|
399
139
|
|
|
400
|
-
|
|
401
|
-
|
|
140
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
141
|
+
WTF-P ► PAPER INITIALIZED ✓
|
|
142
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
402
143
|
|
|
403
144
|
- Project: .planning/PROJECT.md
|
|
404
|
-
- Config: .planning/config.json (mode: [chosen
|
|
405
|
-
- Structure: .planning/structure/
|
|
406
|
-
[If .planning/sources/ exists:] - Sources: .planning/sources/ (literature, data, prior-drafts)
|
|
145
|
+
- Config: .planning/config.json (mode: [chosen])
|
|
146
|
+
- Structure: .planning/structure/
|
|
407
147
|
|
|
408
|
-
|
|
148
|
+
───────────────────────────────────────────
|
|
409
149
|
|
|
410
150
|
## ▶ Next Up
|
|
411
151
|
|
|
412
|
-
**
|
|
152
|
+
**Create section outline**
|
|
413
153
|
|
|
414
154
|
`/wtfp:create-outline`
|
|
415
155
|
|
|
416
156
|
<sub>`/clear` first → fresh context window</sub>
|
|
417
157
|
|
|
418
|
-
|
|
419
|
-
```
|
|
158
|
+
───────────────────────────────────────────
|
|
420
159
|
|
|
421
|
-
</
|
|
422
|
-
|
|
423
|
-
</process>
|
|
424
|
-
|
|
425
|
-
<output>
|
|
426
|
-
|
|
427
|
-
- `.planning/PROJECT.md`
|
|
428
|
-
- `.planning/config.json`
|
|
429
|
-
- `.planning/structure/argument-map.md`
|
|
430
|
-
- `.planning/structure/outline.md`
|
|
431
|
-
- `.planning/structure/narrative-arc.md`
|
|
432
|
-
|
|
433
|
-
</output>
|
|
160
|
+
</offer_next>
|
|
434
161
|
|
|
435
162
|
<success_criteria>
|
|
436
|
-
|
|
437
163
|
- [ ] Deep questioning completed (not rushed)
|
|
438
164
|
- [ ] PROJECT.md captures paper vision with core argument
|
|
439
165
|
- [ ] Structure documents created (argument-map, outline, narrative-arc)
|
|
440
|
-
- [ ] config.json has
|
|
166
|
+
- [ ] config.json has gates, safety, planning, and git sections
|
|
167
|
+
- [ ] config.json has workflow mode and model_profile
|
|
441
168
|
- [ ] All committed to git
|
|
442
|
-
|
|
443
169
|
</success_criteria>
|