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:check-refs
3
- description: BibTeX audit - verify citations are complete and consistent
3
+ description: Audit BibTeX for missing, duplicate, or broken references
4
4
  argument-hint: "[bib-file]"
5
5
  allowed-tools:
6
6
  - Read
@@ -9,179 +9,111 @@ allowed-tools:
9
9
  - Edit
10
10
  - Glob
11
11
  - Grep
12
+ - Task
13
+ - AskUserQuestion
12
14
  ---
13
15
 
14
16
  <objective>
15
17
  Audit citations for completeness and consistency.
16
18
 
17
- Purpose: Ensure all in-text citations have BibTeX entries, all BibTeX entries are cited, and references are properly formatted.
18
- Output: Report of citation issues with fixes applied or flagged for user action.
19
- </objective>
19
+ **Orchestrator role:** Locate bib and draft files, run deterministic indexer, resolve model profile, spawn citation-formatter agent for cross-referencing, present results, apply fixes.
20
20
 
21
- <execution_context>
22
- @~/.claude/write-the-f-paper/references/citation-formats.md
23
- </execution_context>
21
+ Ensures all in-text citations have BibTeX entries, all entries are cited, and references are properly formatted.
22
+ </objective>
24
23
 
25
24
  <context>
26
- BibTeX file: $ARGUMENTS (optional - auto-detects .bib files if not provided)
25
+ BibTeX file: $ARGUMENTS (optional — auto-detects .bib files)
27
26
 
28
27
  **Load project state:**
29
28
  @.planning/STATE.md
30
-
31
- **Scan for:**
32
- - .bib files in project root and common locations
33
- - Draft files with citations (\cite{}, [@...], etc.)
34
29
  </context>
35
30
 
36
31
  <process>
37
32
 
38
- <step name="locate_files">
39
- 1. Find BibTeX file(s):
40
- ```bash
41
- find . -name "*.bib" -type f 2>/dev/null | head -20
42
- ```
33
+ ## 1. Validate Environment and Resolve Model Profile
43
34
 
44
- 2. Find files with citations:
45
35
  ```bash
36
+ find . -name "*.bib" -type f 2>/dev/null | head -20
46
37
  grep -rl "\\\\cite\|\\[@\|\\[.*\\]" --include="*.tex" --include="*.md" . 2>/dev/null
47
38
  ```
48
39
 
49
- 3. If no .bib found, error:
40
+ ```bash
41
+ MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
50
42
  ```
51
- No .bib file found.
52
43
 
53
- Create one or specify path: /wtfp:check-refs path/to/refs.bib
54
- ```
55
- </step>
44
+ | Agent | quality | balanced | budget |
45
+ |-------|---------|----------|--------|
46
+ | citation-formatter | sonnet | sonnet | haiku |
56
47
 
57
- <step name="parse_bib">
58
- **Extract all BibTeX keys:**
48
+ ## 2. Run Deterministic Indexer
59
49
 
60
50
  ```bash
61
- grep -E "^@[a-zA-Z]+\{" *.bib | sed 's/.*{\([^,]*\),.*/\1/'
51
+ node ~/.claude/bin/bib-index.js index "$BIB_FILE"
62
52
  ```
63
53
 
64
- Build inventory:
65
- - Entry key
66
- - Entry type (@article, @inproceedings, etc.)
67
- - Required fields present/missing
68
- - Year
69
- </step>
54
+ ## 3. Spawn citation-formatter Agent
70
55
 
71
- <step name="parse_citations">
72
- **Extract all in-text citations:**
73
-
74
- LaTeX style: `\cite{key}`, `\citep{key}`, `\citet{key}`, `\cite{key1,key2}`
75
- Markdown style: `[@key]`, `[@key1; @key2]`
76
-
77
- Build list of all citation keys used in text.
78
- </step>
79
-
80
- <step name="cross_reference">
81
- **Compare citations vs BibTeX:**
82
-
83
- | Check | Status |
84
- |-------|--------|
85
- | Cited but no BibTeX entry | ❌ MISSING |
86
- | BibTeX entry but never cited | ⚠️ UNUSED |
87
- | Entry missing required fields | ⚠️ INCOMPLETE |
88
- | Duplicate keys | ❌ DUPLICATE |
89
- | Year out of range (< 1900 or > current) | ⚠️ SUSPICIOUS |
90
-
91
- **Required fields by type:**
92
-
93
- | Type | Required |
94
- |------|----------|
95
- | @article | author, title, journal, year |
96
- | @inproceedings | author, title, booktitle, year |
97
- | @book | author/editor, title, publisher, year |
98
- | @phdthesis | author, title, school, year |
99
- | @misc | author, title, year, howpublished/url |
100
- </step>
101
-
102
- <step name="report">
103
- **Present findings:**
56
+ ```
57
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
58
+ WTF-P ► AUDITING CITATIONS
59
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
60
+ ```
104
61
 
105
62
  ```
106
- ## Citation Audit
63
+ Task(
64
+ prompt="First, read ~/.claude/agents/wtfp/citation-formatter.md for your role.\n\n" + audit_prompt,
65
+ subagent_type="general-purpose",
66
+ model="{formatter_model}",
67
+ description="Audit citations"
68
+ )
69
+ ```
107
70
 
108
- ### ❌ Missing BibTeX Entries (cited but not in .bib)
109
- - `smith2023` — cited in intro.tex:45
110
- - `jones2022deep` — cited in methods.md:112
71
+ Audit prompt includes: `<bib_index>` with parsed entries, `<draft_files>` with paths to files containing citations, `<state>` with STATE.md.
111
72
 
112
- ### ⚠️ Unused References (in .bib but never cited)
113
- - `oldpaper1999` — consider removing or citing
114
- - `tangential2020` — consider removing or citing
73
+ Agent performs: extract in-text citations, cross-reference vs BibTeX keys, check required fields by entry type, identify duplicates, flag suspicious years.
115
74
 
116
- ### ⚠️ Incomplete Entries (missing required fields)
117
- - `chen2021` — missing: journal
118
- - `kumar2022` — missing: booktitle
75
+ ## 4. Handle Formatter Return
119
76
 
120
- ### ✓ Valid Citations: [N]
121
- ### ✓ Valid BibTeX Entries: [N]
122
- ```
123
- </step>
77
+ Present findings:
78
+ - Missing BibTeX entries (cited but not in .bib)
79
+ - Unused references (in .bib but never cited)
80
+ - Incomplete entries (missing required fields)
81
+ - Valid citation count
82
+
83
+ **`## AUDIT BLOCKED`:** Present blocker (no .bib found, no .tex/.md to scan), ask user to provide file paths.
124
84
 
125
- <step name="offer_fixes">
126
- **For fixable issues:**
85
+ ## 5. Offer Fixes
127
86
 
128
- Use AskUserQuestion:
87
+ Ask via AskUserQuestion:
129
88
  - header: "Fixes"
130
89
  - question: "How should I handle unused references?"
131
- - options:
132
- - "Remove unused" — Delete entries not cited in text
133
- - "Keep all" — Leave .bib unchanged
134
- - "Comment out" — Keep but mark as unused
90
+ - options: "Remove unused" | "Keep all" | "Comment out"
135
91
 
136
- For missing entries, offer to:
137
- - Search for DOI/metadata (if WebFetch available)
138
- - Create skeleton entry for user to complete
139
- - Flag for manual resolution
140
- </step>
92
+ For missing entries, search using `node ~/.claude/bin/citation-fetcher.js "title"`.
141
93
 
142
- <step name="apply_fixes">
143
- Apply approved fixes to .bib file.
94
+ ## 6. Apply Fixes and Commit
144
95
 
145
- If removing unused:
146
96
  ```bash
147
- # Backup first
148
97
  cp references.bib references.bib.backup
98
+ # Apply approved edits
99
+ git add *.bib
100
+ git commit -m "refs: audit and clean bibliography"
149
101
  ```
150
102
 
151
- Apply edits.
152
- </step>
103
+ </process>
153
104
 
154
- <step name="commit">
155
- ```bash
156
- git add *.bib
157
- git commit -m "$(cat <<'EOF'
158
- refs: audit and clean bibliography
159
-
160
- - Verified [N] citations against BibTeX
161
- - Removed [N] unused entries (if applicable)
162
- - Fixed [N] incomplete entries (if applicable)
163
- - [N] issues flagged for manual review
164
- EOF
165
- )"
166
- ```
167
- </step>
105
+ <offer_next>
168
106
 
169
- <step name="done">
170
- ```
171
- Citation audit complete:
107
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
108
+ WTF-P ► CITATION AUDIT COMPLETE ✓
109
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
172
110
 
173
111
  - Citations in text: [N]
174
112
  - BibTeX entries: [N]
175
113
  - Issues fixed: [N]
176
114
  - Issues flagged: [N]
177
115
 
178
- ---
179
-
180
- ## Manual Action Required (if any)
181
-
182
- [List of issues requiring user intervention]
183
-
184
- ---
116
+ ───────────────────────────────────────────
185
117
 
186
118
  ## Next Up
187
119
 
@@ -189,17 +121,14 @@ Citation audit complete:
189
121
  - `/wtfp:export-latex` — Generate LaTeX
190
122
  - `/wtfp:review-section` — Get reviewer feedback
191
123
 
192
- ---
193
- ```
194
- </step>
124
+ ───────────────────────────────────────────
195
125
 
196
- </process>
126
+ </offer_next>
197
127
 
198
128
  <success_criteria>
199
- - All in-text citations have corresponding BibTeX entries
200
- - All BibTeX entries have required fields
201
- - Unused references identified (removed or flagged)
202
- - No duplicate keys
203
- - Changes committed to git
204
- - User knows what manual fixes remain
129
+ - [ ] All in-text citations cross-referenced
130
+ - [ ] Missing entries identified and searched
131
+ - [ ] Incomplete entries flagged
132
+ - [ ] Unused references handled per user choice
133
+ - [ ] Changes committed to git
205
134
  </success_criteria>
@@ -0,0 +1,152 @@
1
+ ---
2
+ name: wtfp:check-todos
3
+ description: Review pending todos and act on, defer, or dismiss each
4
+ allowed-tools:
5
+ - Read
6
+ - Bash
7
+ - Write
8
+ - Glob
9
+ - AskUserQuestion
10
+ ---
11
+
12
+ <objective>
13
+ Review pending todos. For each, user decides: act on it, defer it, dismiss it, or mark done.
14
+ </objective>
15
+
16
+ <context>
17
+ No arguments. Reads from .planning/todos/pending/.
18
+ </context>
19
+
20
+ <process>
21
+
22
+ ## 1. Validate Environment
23
+
24
+ ```bash
25
+ ls .planning/ 2>/dev/null
26
+ ```
27
+
28
+ If `.planning/` does not exist, output error and exit:
29
+ ```
30
+ Error: No project found. Run /wtfp:new-paper first.
31
+ ```
32
+
33
+ ## 2. List Pending Todos
34
+
35
+ ```bash
36
+ ls -1 .planning/todos/pending/*.md 2>/dev/null
37
+ ```
38
+
39
+ If no files found:
40
+ ```
41
+ No pending todos.
42
+ ```
43
+ Exit.
44
+
45
+ ## 3. Display Banner
46
+
47
+ ```
48
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
49
+ WTF-P ► PENDING TODOS ({N})
50
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
51
+ ```
52
+
53
+ ## 4. Process Each Todo
54
+
55
+ Initialize counters:
56
+ - acted = 0
57
+ - deferred = 0
58
+ - dismissed = 0
59
+ - done = 0
60
+
61
+ For each file in `.planning/todos/pending/`:
62
+
63
+ 1. Read the file. Parse frontmatter (created, context) and body (description).
64
+
65
+ 2. Present via AskUserQuestion:
66
+ - header: "Todo #{N}"
67
+ - question: "{todo description}\n\nCreated: {date} | Context: {context}"
68
+ - options:
69
+ - "Act on it now"
70
+ - "Defer"
71
+ - "Dismiss"
72
+ - "Done"
73
+ - "Skip rest"
74
+
75
+ 3. Handle response:
76
+
77
+ **"Act on it now":**
78
+ - Display the full todo content
79
+ - Output: "What would you like to do with this? (describe action or command)"
80
+ - Let user take action manually
81
+ - Increment acted counter
82
+ - Keep file in pending (user will mark done when complete)
83
+
84
+ **"Defer":**
85
+ - Keep file in pending
86
+ - Increment deferred counter
87
+ - Continue to next
88
+
89
+ **"Dismiss":**
90
+ ```bash
91
+ mkdir -p .planning/todos/dismissed
92
+ mv {file} .planning/todos/dismissed/
93
+ ```
94
+ - Increment dismissed counter
95
+ - Continue to next
96
+
97
+ **"Done":**
98
+ ```bash
99
+ mkdir -p .planning/todos/done
100
+ mv {file} .planning/todos/done/
101
+ ```
102
+ - Increment done counter
103
+ - Continue to next
104
+
105
+ **"Skip rest":**
106
+ - Break out of loop
107
+ - All remaining todos stay deferred
108
+
109
+ ## 5. Update STATE.md
110
+
111
+ Count remaining pending todos:
112
+ ```bash
113
+ ls -1 .planning/todos/pending/*.md 2>/dev/null | wc -l
114
+ ```
115
+
116
+ Read STATE.md. Update "### Pending Todos" section with new count:
117
+ ```
118
+ ### Pending Todos
119
+
120
+ {N} pending todo(s).
121
+ ```
122
+
123
+ Or if N = 0:
124
+ ```
125
+ ### Pending Todos
126
+
127
+ None.
128
+ ```
129
+
130
+ ## 6. Summary
131
+
132
+ ```
133
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
134
+ WTF-P ► TODOS REVIEWED ✓
135
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
136
+
137
+ Acted on: {N}
138
+ Deferred: {N}
139
+ Dismissed: {N}
140
+ Done: {N}
141
+ Still pending: {N}
142
+ ```
143
+
144
+ </process>
145
+
146
+ <success_criteria>
147
+ - [ ] Pending todos listed with count
148
+ - [ ] Each todo presented with act/defer/dismiss/done/skip options
149
+ - [ ] Files moved to dismissed/ or done/ subdirectories as appropriate
150
+ - [ ] STATE.md pending count updated after review
151
+ - [ ] Summary shows actions taken
152
+ </success_criteria>
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: wtfp:checkpoint
3
+ description: Save, restore, or list paper state snapshots
4
+ argument-hint: "[save|restore|list] [label]"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Write
9
+ - Glob
10
+ - Grep
11
+ - AskUserQuestion
12
+ ---
13
+
14
+ <objective>
15
+ Save full paper state as a git-tagged checkpoint or restore from a previous one.
16
+
17
+ **Orchestrator role:** Parse subcommand, execute checkpoint operation via bin/lib/checkpoint.js, report result.
18
+
19
+ Enables session continuity — save state before `/clear`, restore in next session.
20
+ </objective>
21
+
22
+ <context>
23
+ Subcommand: $ARGUMENTS
24
+ - `save [label]` — Create checkpoint with label (e.g., "pre-discussion", "draft-1")
25
+ - `restore [tag]` — Restore from a checkpoint tag
26
+ - `list` — Show available checkpoints
27
+
28
+ **Load project state:**
29
+ @.planning/STATE.md
30
+ </context>
31
+
32
+ <process>
33
+
34
+ ## 1. Parse Subcommand
35
+
36
+ Extract subcommand and arguments from $ARGUMENTS.
37
+
38
+ Default: `save` if no subcommand provided, with auto-generated label from STATE.md position.
39
+
40
+ ## 2. Execute Operation
41
+
42
+ ### Save
43
+
44
+ ```bash
45
+ node -e "
46
+ const cp = require('$HOME/.claude/bin/lib/checkpoint.js');
47
+ const result = cp.createCheckpoint({
48
+ planningDir: '.planning',
49
+ label: '[label]',
50
+ note: '[current position from STATE.md]'
51
+ });
52
+ console.log(JSON.stringify(result));
53
+ "
54
+ ```
55
+
56
+ ### Restore
57
+
58
+ If no tag provided, list checkpoints and ask via AskUserQuestion:
59
+ - header: "Checkpoint"
60
+ - question: "Which checkpoint to restore?"
61
+ - options: [list of available checkpoints]
62
+
63
+ ```bash
64
+ node -e "
65
+ const cp = require('$HOME/.claude/bin/lib/checkpoint.js');
66
+ cp.restoreCheckpoint('[tag]');
67
+ "
68
+ ```
69
+
70
+ ### List
71
+
72
+ ```bash
73
+ node -e "
74
+ const cp = require('$HOME/.claude/bin/lib/checkpoint.js');
75
+ const list = cp.listCheckpoints();
76
+ list.forEach(c => console.log(c.tag + ' — ' + c.message));
77
+ "
78
+ ```
79
+
80
+ ## 3. Present Result
81
+
82
+ </process>
83
+
84
+ <offer_next>
85
+
86
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
87
+ WTF-P ► CHECKPOINT [SAVED|RESTORED] ✓
88
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
89
+
90
+ Tag: [tag]
91
+ Files: [N]
92
+
93
+ ───────────────────────────────────────────
94
+
95
+ Resume with `/wtfp:progress` after restoring.
96
+
97
+ ───────────────────────────────────────────
98
+
99
+ </offer_next>
100
+
101
+ <success_criteria>
102
+ - [ ] Checkpoint created/restored/listed successfully
103
+ - [ ] Git tag created (for save)
104
+ - [ ] State verified after restore
105
+ </success_criteria>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: wtfp:contribute
3
- description: Guide through contributing code to WTF-P via Pull Request
3
+ description: Walk through contributing code to WTF-P via pull request
4
4
  allowed-tools:
5
5
  - Bash
6
6
  - Read