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,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wtfp:check-refs
|
|
3
|
-
description: BibTeX
|
|
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
|
-
|
|
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
|
-
|
|
22
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
44
|
+
| Agent | quality | balanced | budget |
|
|
45
|
+
|-------|---------|----------|--------|
|
|
46
|
+
| citation-formatter | sonnet | sonnet | haiku |
|
|
56
47
|
|
|
57
|
-
|
|
58
|
-
**Extract all BibTeX keys:**
|
|
48
|
+
## 2. Run Deterministic Indexer
|
|
59
49
|
|
|
60
50
|
```bash
|
|
61
|
-
|
|
51
|
+
node ~/.claude/bin/bib-index.js index "$BIB_FILE"
|
|
62
52
|
```
|
|
63
53
|
|
|
64
|
-
|
|
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
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
117
|
-
- `chen2021` — missing: journal
|
|
118
|
-
- `kumar2022` — missing: booktitle
|
|
75
|
+
## 4. Handle Formatter Return
|
|
119
76
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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
|
-
|
|
126
|
-
**For fixable issues:**
|
|
85
|
+
## 5. Offer Fixes
|
|
127
86
|
|
|
128
|
-
|
|
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,
|
|
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
|
-
|
|
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
|
-
|
|
152
|
-
</step>
|
|
103
|
+
</process>
|
|
153
104
|
|
|
154
|
-
<
|
|
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
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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
|
-
</
|
|
126
|
+
</offer_next>
|
|
197
127
|
|
|
198
128
|
<success_criteria>
|
|
199
|
-
- All in-text citations
|
|
200
|
-
-
|
|
201
|
-
-
|
|
202
|
-
-
|
|
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>
|