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
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: wtfp:map-project
3
- description: Map existing source materials for brownfield writing projects
3
+ description: Index existing drafts, data, and references for a project
4
4
  allowed-tools:
5
5
  - Read
6
6
  - Bash
@@ -8,172 +8,86 @@ allowed-tools:
8
8
  - Glob
9
9
  - Grep
10
10
  - Task
11
+ - AskUserQuestion
11
12
  ---
12
13
 
14
+ <execution_context>
15
+ @~/.claude/write-the-f-paper/workflows/map-project.md
16
+ </execution_context>
17
+
13
18
  <objective>
14
19
  Index existing source materials (literature, data, prior drafts) for a writing project.
15
20
 
16
- Creates `.planning/sources/` with organized references covering:
17
- - literature.md (bibliography index)
18
- - data.md (figures, tables, evidence inventory)
19
- - prior-drafts.md (existing material to incorporate)
21
+ **Orchestrator role:** Detect existing materials, resolve model profile, create `.planning/sources/` with organized references, commit.
20
22
 
21
23
  Use before `/wtfp:new-paper` on existing writing projects.
22
24
  </objective>
23
25
 
24
- <execution_context>
25
- @~/.claude/write-the-f-paper/workflows/map-project.md
26
- </execution_context>
26
+ <context>
27
+ No arguments. Scans current directory for existing materials.
28
+ </context>
27
29
 
28
30
  <process>
29
31
 
30
- <step name="detect">
31
- **Detect existing materials:**
32
+ ## 1. Validate Environment and Resolve Model Profile
32
33
 
33
34
  ```bash
34
- # Find bibliography files
35
- find . -name "*.bib" -o -name "references.md" -o -name "bibliography.md" 2>/dev/null | head -20
35
+ MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
36
+ ```
36
37
 
37
- # Find existing drafts
38
- find . -name "*.tex" -o -name "*.md" -o -name "*.docx" 2>/dev/null | grep -v node_modules | grep -v .planning | head -20
38
+ ## 2. Detect Existing Materials
39
39
 
40
- # Find data files
40
+ ```bash
41
+ find . -name "*.bib" -o -name "references.md" -o -name "bibliography.md" 2>/dev/null | head -20
42
+ find . -name "*.tex" -o -name "*.md" -o -name "*.docx" 2>/dev/null | grep -v node_modules | grep -v .planning | head -20
41
43
  find . -name "*.csv" -o -name "*.json" -o -name "*.xlsx" 2>/dev/null | head -20
42
-
43
- # Find figures
44
44
  find . -name "*.png" -o -name "*.pdf" -o -name "*.svg" -o -name "*.jpg" 2>/dev/null | head -20
45
45
  ```
46
46
 
47
- </step>
48
-
49
- <step name="create_structure">
50
- **Create sources directory:**
47
+ ## 3. Create Sources Directory
51
48
 
52
49
  ```bash
53
50
  mkdir -p .planning/sources
54
51
  ```
55
52
 
56
- </step>
57
-
58
- <step name="literature">
59
- **Index literature sources:**
60
-
61
- If .bib files found:
62
- - Parse BibTeX entries
63
- - Extract: key, title, authors, year, relevance
64
-
65
- Create `.planning/sources/literature.md`:
53
+ ## 4. Index Literature
66
54
 
67
- ```markdown
68
- # Literature Index
69
-
70
- ## Core References (cite in paper)
71
- | Key | Citation | Relevance | Status |
72
- |-----|----------|-----------|--------|
73
- | [key] | [Author (Year)] | [why relevant] | Available |
74
-
75
- ## Background Reading
76
- | Key | Citation | Notes |
77
- |-----|----------|-------|
78
-
79
- ## To Find
80
- - [ ] [Missing citations needed]
81
-
82
- ## Sources
83
- - [path to .bib file]
84
- - [other source files]
85
-
86
- ---
87
- *Indexed: [date]*
88
- ```
55
+ If .bib files found, parse via `node ~/.claude/bin/bib-index.js index [file]`.
89
56
 
90
- </step>
57
+ Write `.planning/sources/literature.md`: Core References table (key, citation, relevance, status), Background Reading, To Find list, source paths.
91
58
 
92
- <step name="data">
93
- **Index data and evidence:**
59
+ ## 5. Index Data and Evidence
94
60
 
95
61
  Scan for figures, tables, data files.
96
62
 
97
- Create `.planning/sources/data.md`:
98
-
99
- ```markdown
100
- # Data & Evidence Inventory
101
-
102
- ## Figures
103
- | ID | File | Description | Status | Target Section |
104
- |----|------|-------------|--------|----------------|
105
- | fig1 | [path] | [description] | Ready/Needs work | [section] |
106
-
107
- ## Tables
108
- | ID | File/Location | Description | Status |
109
- |----|---------------|-------------|--------|
110
-
111
- ## Data Files
112
- | File | Format | Description | Use |
113
- |------|--------|-------------|-----|
114
-
115
- ## Statistics
116
- [Any statistical results to report]
63
+ Write `.planning/sources/data.md`: Figures table (ID, file, description, status, target section), Tables, Data Files, Statistics.
117
64
 
118
- ---
119
- *Indexed: [date]*
120
- ```
121
-
122
- </step>
123
-
124
- <step name="drafts">
125
- **Index prior drafts:**
65
+ ## 6. Index Prior Drafts
126
66
 
127
67
  Scan for existing writing.
128
68
 
129
- Create `.planning/sources/prior-drafts.md`:
130
-
131
- ```markdown
132
- # Prior Drafts & Notes
133
-
134
- ## Existing Documents
135
- | File | Type | Description | Usable? | Target Section |
136
- |------|------|-------------|---------|----------------|
137
- | [path] | [draft/notes/outline] | [description] | [yes/partial/no] | [section] |
69
+ Write `.planning/sources/prior-drafts.md`: Existing Documents table (file, type, description, usable, target section), Key Passages, Material to Avoid.
138
70
 
139
- ## Key Passages to Incorporate
140
- [Notable excerpts worth keeping]
71
+ ## 7. Commit
141
72
 
142
- ## Material to Avoid
143
- [Content that shouldn't be reused]
144
-
145
- ---
146
- *Indexed: [date]*
147
- ```
148
-
149
- </step>
150
-
151
- <step name="commit">
152
73
  ```bash
153
74
  git add .planning/sources/
154
- git commit -m "$(cat <<'EOF'
155
- docs: index source materials
156
-
157
- Literature: [N] references
158
- Data: [N] figures, [N] tables
159
- Prior drafts: [N] documents
160
- EOF
161
- )"
75
+ git commit -m "docs: index source materials"
162
76
  ```
163
77
 
164
- </step>
78
+ </process>
165
79
 
166
- <step name="done">
167
- **Present completion:**
80
+ <offer_next>
168
81
 
169
- ```
170
- Sources indexed:
82
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
83
+ WTF-P ► SOURCES INDEXED ✓
84
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
171
85
 
172
86
  - Literature: .planning/sources/literature.md ([N] references)
173
87
  - Data: .planning/sources/data.md ([N] figures, [N] tables)
174
88
  - Prior Drafts: .planning/sources/prior-drafts.md ([N] documents)
175
89
 
176
- ---
90
+ ───────────────────────────────────────────
177
91
 
178
92
  ## ▶ Next Up
179
93
 
@@ -181,12 +95,9 @@ Sources indexed:
181
95
 
182
96
  `/wtfp:new-paper`
183
97
 
184
- ---
185
- ```
186
-
187
- </step>
98
+ ───────────────────────────────────────────
188
99
 
189
- </process>
100
+ </offer_next>
190
101
 
191
102
  <success_criteria>
192
103
  - [ ] All existing materials discovered