wtf-p 0.4.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 (175) hide show
  1. package/README.md +146 -226
  2. package/bin/commands/doctor.js +88 -2
  3. package/bin/commands/install-logic.js +121 -26
  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/checkpoint.js +183 -0
  8. package/bin/lib/context-primer.js +214 -0
  9. package/bin/lib/manifest.js +62 -2
  10. package/bin/lib/utils.js +22 -1
  11. package/bin/uninstall.js +270 -111
  12. package/core/write-the-f-paper/references/agent-model-matrix.md +62 -0
  13. package/core/write-the-f-paper/references/checkpoints.md +160 -9
  14. package/core/write-the-f-paper/references/context-fidelity.md +153 -0
  15. package/core/write-the-f-paper/references/deviation-rules.md +150 -0
  16. package/core/write-the-f-paper/references/git-integration.md +80 -0
  17. package/core/write-the-f-paper/references/orchestrator-pattern.md +167 -0
  18. package/core/write-the-f-paper/references/planning-config.md +135 -0
  19. package/core/write-the-f-paper/references/ui-brand.md +186 -0
  20. package/core/write-the-f-paper/templates/UAT.md +80 -0
  21. package/core/write-the-f-paper/templates/base-prefs.yaml +42 -0
  22. package/core/write-the-f-paper/templates/config.json +31 -5
  23. package/core/write-the-f-paper/workflows/create-outline.wcn.md +1 -1
  24. package/core/write-the-f-paper/workflows/execute-outline.md +163 -0
  25. package/core/write-the-f-paper/workflows/execute-outline.wcn.md +73 -0
  26. package/core/write-the-f-paper/workflows/execute-section.wcn.md +141 -169
  27. package/core/write-the-f-paper/workflows/plan-section.wcn.md +96 -103
  28. package/core/write-the-f-paper/workflows/research-gap.md +27 -3
  29. package/core/write-the-f-paper/workflows/research-gap.wcn.md +18 -1
  30. package/core/write-the-f-paper/workflows/verify-work.md +251 -0
  31. package/core/write-the-f-paper/workflows/verify-work.wcn.md +74 -0
  32. package/package.json +19 -7
  33. package/vendors/claude/.claude-plugin/plugin.json +2 -2
  34. package/vendors/claude/agents/wtfp/argument-verifier.md +189 -0
  35. package/vendors/claude/agents/wtfp/citation-expert.md +1 -1
  36. package/vendors/claude/agents/wtfp/citation-formatter.md +1 -1
  37. package/vendors/claude/agents/wtfp/coherence-checker.md +167 -0
  38. package/vendors/claude/agents/wtfp/outliner.md +259 -0
  39. package/vendors/claude/agents/wtfp/plan-checker.md +249 -0
  40. package/vendors/claude/agents/wtfp/prose-polisher.md +166 -0
  41. package/vendors/claude/agents/wtfp/research-synthesizer.md +215 -0
  42. package/vendors/claude/agents/wtfp/section-planner.md +364 -0
  43. package/vendors/claude/agents/wtfp/section-reviewer.md +182 -0
  44. package/vendors/claude/agents/wtfp/section-writer.md +312 -0
  45. package/vendors/claude/commands/wtfp/add-todo.md +108 -0
  46. package/vendors/claude/commands/wtfp/analyze-bib.md +58 -236
  47. package/vendors/claude/commands/wtfp/audit-milestone.md +286 -0
  48. package/vendors/claude/commands/wtfp/check-refs.md +60 -133
  49. package/vendors/claude/commands/wtfp/check-todos.md +152 -0
  50. package/vendors/claude/commands/wtfp/checkpoint.md +105 -0
  51. package/vendors/claude/commands/wtfp/contribute.md +1 -1
  52. package/vendors/claude/commands/wtfp/create-outline.md +109 -195
  53. package/vendors/claude/commands/wtfp/create-poster.md +1 -1
  54. package/vendors/claude/commands/wtfp/create-slides.md +1 -1
  55. package/vendors/claude/commands/wtfp/discuss-section.md +1 -1
  56. package/vendors/claude/commands/wtfp/execute-outline.md +257 -0
  57. package/vendors/claude/commands/wtfp/export-latex.md +1 -1
  58. package/vendors/claude/commands/wtfp/help.md +174 -280
  59. package/vendors/claude/commands/wtfp/insert-section.md +1 -1
  60. package/vendors/claude/commands/wtfp/list-assumptions.md +1 -1
  61. package/vendors/claude/commands/wtfp/map-project.md +35 -124
  62. package/vendors/claude/commands/wtfp/new-paper.md +85 -320
  63. package/vendors/claude/commands/wtfp/pause-writing.md +1 -1
  64. package/vendors/claude/commands/wtfp/plan-milestone-gaps.md +255 -0
  65. package/vendors/claude/commands/wtfp/plan-revision.md +1 -1
  66. package/vendors/claude/commands/wtfp/plan-section.md +165 -190
  67. package/vendors/claude/commands/wtfp/polish-prose.md +66 -118
  68. package/vendors/claude/commands/wtfp/progress.md +82 -254
  69. package/vendors/claude/commands/wtfp/quick.md +107 -0
  70. package/vendors/claude/commands/wtfp/remove-section.md +1 -1
  71. package/vendors/claude/commands/wtfp/report-bug.md +1 -1
  72. package/vendors/claude/commands/wtfp/request-feature.md +1 -1
  73. package/vendors/claude/commands/wtfp/research-gap.md +138 -150
  74. package/vendors/claude/commands/wtfp/resume-writing.md +1 -1
  75. package/vendors/claude/commands/wtfp/review-section.md +55 -333
  76. package/vendors/claude/commands/wtfp/settings.md +197 -0
  77. package/vendors/claude/commands/wtfp/submit-milestone.md +248 -99
  78. package/vendors/claude/commands/wtfp/update.md +112 -0
  79. package/vendors/claude/commands/wtfp/verify-work.md +254 -0
  80. package/vendors/claude/commands/wtfp/write-section.md +144 -180
  81. package/vendors/gemini/agents/wtfp/argument-verifier.md +184 -0
  82. package/vendors/gemini/agents/wtfp/citation-expert.md +41 -0
  83. package/vendors/gemini/agents/wtfp/citation-formatter.md +38 -0
  84. package/vendors/gemini/agents/wtfp/coherence-checker.md +162 -0
  85. package/vendors/gemini/agents/wtfp/outliner.md +252 -0
  86. package/vendors/gemini/agents/wtfp/plan-checker.md +244 -0
  87. package/vendors/gemini/agents/wtfp/prose-polisher.md +158 -0
  88. package/vendors/gemini/agents/wtfp/research-synthesizer.md +205 -0
  89. package/vendors/gemini/agents/wtfp/section-planner.md +355 -0
  90. package/vendors/gemini/agents/wtfp/section-reviewer.md +175 -0
  91. package/vendors/gemini/agents/wtfp/section-writer.md +304 -0
  92. package/vendors/gemini/commands/wtfp/add-todo.toml +102 -0
  93. package/vendors/gemini/commands/wtfp/analyze-bib.toml +126 -0
  94. package/vendors/gemini/commands/wtfp/audit-milestone.toml +278 -0
  95. package/vendors/gemini/commands/wtfp/check-refs.toml +123 -0
  96. package/vendors/gemini/commands/wtfp/check-todos.toml +145 -0
  97. package/vendors/gemini/commands/wtfp/checkpoint.toml +96 -0
  98. package/vendors/gemini/commands/wtfp/contribute.toml +269 -0
  99. package/vendors/gemini/commands/wtfp/create-outline.toml +180 -0
  100. package/vendors/gemini/commands/wtfp/create-poster.toml +36 -0
  101. package/vendors/gemini/commands/wtfp/create-slides.toml +35 -0
  102. package/vendors/gemini/commands/wtfp/discuss-section.toml +62 -0
  103. package/vendors/gemini/commands/wtfp/execute-outline.toml +247 -0
  104. package/vendors/gemini/commands/wtfp/export-latex.toml +209 -0
  105. package/vendors/gemini/commands/wtfp/help.toml +184 -0
  106. package/vendors/gemini/commands/wtfp/insert-section.toml +123 -0
  107. package/vendors/gemini/commands/wtfp/list-assumptions.toml +104 -0
  108. package/vendors/gemini/commands/wtfp/map-project.toml +99 -0
  109. package/vendors/gemini/commands/wtfp/new-paper.toml +160 -0
  110. package/vendors/gemini/commands/wtfp/pause-writing.toml +140 -0
  111. package/vendors/gemini/commands/wtfp/plan-milestone-gaps.toml +249 -0
  112. package/vendors/gemini/commands/wtfp/plan-revision.toml +171 -0
  113. package/vendors/gemini/commands/wtfp/plan-section.toml +212 -0
  114. package/vendors/gemini/commands/wtfp/polish-prose.toml +114 -0
  115. package/vendors/gemini/commands/wtfp/progress.toml +145 -0
  116. package/vendors/gemini/commands/wtfp/quick.toml +96 -0
  117. package/vendors/gemini/commands/wtfp/remove-section.toml +140 -0
  118. package/vendors/gemini/commands/wtfp/report-bug.toml +126 -0
  119. package/vendors/gemini/commands/wtfp/request-feature.toml +155 -0
  120. package/vendors/gemini/commands/wtfp/research-gap.toml +214 -0
  121. package/vendors/gemini/commands/wtfp/resume-writing.toml +136 -0
  122. package/vendors/gemini/commands/wtfp/review-section.toml +121 -0
  123. package/vendors/gemini/commands/wtfp/settings.toml +191 -0
  124. package/vendors/gemini/commands/wtfp/submit-milestone.toml +351 -0
  125. package/vendors/gemini/commands/wtfp/update.toml +107 -0
  126. package/vendors/gemini/commands/wtfp/verify-work.toml +245 -0
  127. package/vendors/gemini/commands/wtfp/write-section.toml +228 -0
  128. package/vendors/opencode/agents/wtfp/argument-verifier.md +184 -0
  129. package/vendors/opencode/agents/wtfp/citation-expert.md +41 -0
  130. package/vendors/opencode/agents/wtfp/citation-formatter.md +38 -0
  131. package/vendors/opencode/agents/wtfp/coherence-checker.md +162 -0
  132. package/vendors/opencode/agents/wtfp/outliner.md +252 -0
  133. package/vendors/opencode/agents/wtfp/plan-checker.md +244 -0
  134. package/vendors/opencode/agents/wtfp/prose-polisher.md +158 -0
  135. package/vendors/opencode/agents/wtfp/research-synthesizer.md +205 -0
  136. package/vendors/opencode/agents/wtfp/section-planner.md +355 -0
  137. package/vendors/opencode/agents/wtfp/section-reviewer.md +175 -0
  138. package/vendors/opencode/agents/wtfp/section-writer.md +304 -0
  139. package/vendors/opencode/commands/wtfp/add-todo.md +103 -0
  140. package/vendors/opencode/commands/wtfp/analyze-bib.md +127 -0
  141. package/vendors/opencode/commands/wtfp/audit-milestone.md +279 -0
  142. package/vendors/opencode/commands/wtfp/check-refs.md +124 -0
  143. package/vendors/opencode/commands/wtfp/check-todos.md +146 -0
  144. package/vendors/opencode/commands/wtfp/checkpoint.md +97 -0
  145. package/vendors/opencode/commands/wtfp/contribute.md +266 -0
  146. package/vendors/opencode/commands/wtfp/create-outline.md +181 -0
  147. package/vendors/opencode/commands/wtfp/create-poster.md +37 -0
  148. package/vendors/opencode/commands/wtfp/create-slides.md +36 -0
  149. package/vendors/opencode/commands/wtfp/discuss-section.md +63 -0
  150. package/vendors/opencode/commands/wtfp/execute-outline.md +248 -0
  151. package/vendors/opencode/commands/wtfp/export-latex.md +210 -0
  152. package/vendors/opencode/commands/wtfp/help.md +185 -0
  153. package/vendors/opencode/commands/wtfp/insert-section.md +124 -0
  154. package/vendors/opencode/commands/wtfp/list-assumptions.md +105 -0
  155. package/vendors/opencode/commands/wtfp/map-project.md +100 -0
  156. package/vendors/opencode/commands/wtfp/new-paper.md +161 -0
  157. package/vendors/opencode/commands/wtfp/pause-writing.md +141 -0
  158. package/vendors/opencode/commands/wtfp/plan-milestone-gaps.md +250 -0
  159. package/vendors/opencode/commands/wtfp/plan-revision.md +174 -0
  160. package/vendors/opencode/commands/wtfp/plan-section.md +214 -0
  161. package/vendors/opencode/commands/wtfp/polish-prose.md +115 -0
  162. package/vendors/opencode/commands/wtfp/progress.md +146 -0
  163. package/vendors/opencode/commands/wtfp/quick.md +97 -0
  164. package/vendors/opencode/commands/wtfp/remove-section.md +141 -0
  165. package/vendors/opencode/commands/wtfp/report-bug.md +127 -0
  166. package/vendors/opencode/commands/wtfp/request-feature.md +156 -0
  167. package/vendors/opencode/commands/wtfp/research-gap.md +215 -0
  168. package/vendors/opencode/commands/wtfp/resume-writing.md +137 -0
  169. package/vendors/opencode/commands/wtfp/review-section.md +123 -0
  170. package/vendors/opencode/commands/wtfp/settings.md +192 -0
  171. package/vendors/opencode/commands/wtfp/submit-milestone.md +352 -0
  172. package/vendors/opencode/commands/wtfp/update.md +108 -0
  173. package/vendors/opencode/commands/wtfp/verify-work.md +246 -0
  174. package/vendors/opencode/commands/wtfp/write-section.md +228 -0
  175. package/vendors/claude/agents/wtfp/citation-retriever.md +0 -31
@@ -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,181 +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:
50
- ```
51
- No .bib file found.
52
-
53
- Create one or specify path: /wtfp:check-refs path/to/refs.bib
40
+ ```bash
41
+ MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
54
42
  ```
55
- </step>
56
43
 
57
- <step name="parse_bib">
58
- **Extract BibTeX Keys:**
44
+ | Agent | quality | balanced | budget |
45
+ |-------|---------|----------|--------|
46
+ | citation-formatter | sonnet | sonnet | haiku |
59
47
 
60
- Use the deterministic indexer to get an accurate list of keys from the .bib file.
48
+ ## 2. Run Deterministic Indexer
61
49
 
62
50
  ```bash
63
- node ~/.claude/bin/bib-index.js index "$ARGUMENTS"
51
+ node ~/.claude/bin/bib-index.js index "$BIB_FILE"
64
52
  ```
65
- *(Use the file found/selected in step 1)*
66
-
67
- Build inventory from the JSON output:
68
- - Entry key
69
- - Title
70
- - Year
71
- </step>
72
-
73
- <step name="parse_citations">
74
- **Extract all in-text citations:**
75
-
76
- LaTeX style: `\cite{key}`, `\citep{key}`, `\citet{key}`, `\cite{key1,key2}`
77
- Markdown style: `[@key]`, `[@key1; @key2]`
78
-
79
- Build list of all citation keys used in text.
80
- </step>
81
53
 
82
- <step name="cross_reference">
83
- **Compare citations vs BibTeX:**
54
+ ## 3. Spawn citation-formatter Agent
84
55
 
85
- | Check | Status |
86
- |-------|--------|
87
- | Cited but no BibTeX entry | ❌ MISSING |
88
- | BibTeX entry but never cited | ⚠️ UNUSED |
89
- | Entry missing required fields | ⚠️ INCOMPLETE |
90
- | Duplicate keys | ❌ DUPLICATE |
91
- | Year out of range (< 1900 or > current) | ⚠️ SUSPICIOUS |
92
-
93
- **Required fields by type:**
94
-
95
- | Type | Required |
96
- |------|----------|
97
- | @article | author, title, journal, year |
98
- | @inproceedings | author, title, booktitle, year |
99
- | @book | author/editor, title, publisher, year |
100
- | @phdthesis | author, title, school, year |
101
- | @misc | author, title, year, howpublished/url |
102
- </step>
103
-
104
- <step name="report">
105
- **Present findings:**
56
+ ```
57
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
58
+ WTF-P ► AUDITING CITATIONS
59
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
60
+ ```
106
61
 
107
62
  ```
108
- ## 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
+ ```
109
70
 
110
- ### ❌ Missing BibTeX Entries (cited but not in .bib)
111
- - `smith2023` — cited in intro.tex:45
112
- - `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.
113
72
 
114
- ### ⚠️ Unused References (in .bib but never cited)
115
- - `oldpaper1999` — consider removing or citing
116
- - `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.
117
74
 
118
- ### ⚠️ Incomplete Entries (missing required fields)
119
- - `chen2021` — missing: journal
120
- - `kumar2022` — missing: booktitle
75
+ ## 4. Handle Formatter Return
121
76
 
122
- ### ✓ Valid Citations: [N]
123
- ### ✓ Valid BibTeX Entries: [N]
124
- ```
125
- </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
126
82
 
127
- <step name="offer_fixes">
128
- **For fixable issues:**
83
+ **`## AUDIT BLOCKED`:** Present blocker (no .bib found, no .tex/.md to scan), ask user to provide file paths.
129
84
 
130
- Use AskUserQuestion:
85
+ ## 5. Offer Fixes
86
+
87
+ Ask via AskUserQuestion:
131
88
  - header: "Fixes"
132
89
  - question: "How should I handle unused references?"
133
- - options:
134
- - "Remove unused" — Delete entries not cited in text
135
- - "Keep all" — Leave .bib unchanged
136
- - "Comment out" — Keep but mark as unused
90
+ - options: "Remove unused" | "Keep all" | "Comment out"
137
91
 
138
- For missing entries, offer to find them:
139
- 1. **Search:** Run `node ~/.claude/bin/citation-fetcher.js "title or author"` (uses Semantic Scholar + CrossRef) to find the correct BibTeX.
140
- 2. **Create:** If found, append the new entry to the .bib file.
141
- 3. **Flag:** If not found, flag for manual resolution.
142
- </step>
92
+ For missing entries, search using `node ~/.claude/bin/citation-fetcher.js "title"`.
143
93
 
144
- <step name="apply_fixes">
145
- Apply approved fixes to .bib file.
94
+ ## 6. Apply Fixes and Commit
146
95
 
147
- If removing unused:
148
96
  ```bash
149
- # Backup first
150
97
  cp references.bib references.bib.backup
98
+ # Apply approved edits
99
+ git add *.bib
100
+ git commit -m "refs: audit and clean bibliography"
151
101
  ```
152
102
 
153
- Apply edits.
154
- </step>
103
+ </process>
155
104
 
156
- <step name="commit">
157
- ```bash
158
- git add *.bib
159
- git commit -m "$(cat <<'EOF'
160
- refs: audit and clean bibliography
161
-
162
- - Verified [N] citations against BibTeX
163
- - Removed [N] unused entries (if applicable)
164
- - Fixed [N] incomplete entries (if applicable)
165
- - [N] issues flagged for manual review
166
- EOF
167
- )"
168
- ```
169
- </step>
105
+ <offer_next>
170
106
 
171
- <step name="done">
172
- ```
173
- Citation audit complete:
107
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
108
+ WTF-P ► CITATION AUDIT COMPLETE ✓
109
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
174
110
 
175
111
  - Citations in text: [N]
176
112
  - BibTeX entries: [N]
177
113
  - Issues fixed: [N]
178
114
  - Issues flagged: [N]
179
115
 
180
- ---
181
-
182
- ## Manual Action Required (if any)
183
-
184
- [List of issues requiring user intervention]
185
-
186
- ---
116
+ ───────────────────────────────────────────
187
117
 
188
118
  ## Next Up
189
119
 
@@ -191,17 +121,14 @@ Citation audit complete:
191
121
  - `/wtfp:export-latex` — Generate LaTeX
192
122
  - `/wtfp:review-section` — Get reviewer feedback
193
123
 
194
- ---
195
- ```
196
- </step>
124
+ ───────────────────────────────────────────
197
125
 
198
- </process>
126
+ </offer_next>
199
127
 
200
128
  <success_criteria>
201
- - All in-text citations have corresponding BibTeX entries
202
- - All BibTeX entries have required fields
203
- - Unused references identified (removed or flagged)
204
- - No duplicate keys
205
- - Changes committed to git
206
- - 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
207
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