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
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wtfp:contribute
|
|
3
|
+
description: Walk through contributing code to WTF-P via pull request
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<objective>
|
|
7
|
+
Guide the user through the complete process of contributing code to WTF-P, from fork to Pull Request.
|
|
8
|
+
</objective>
|
|
9
|
+
|
|
10
|
+
<context>
|
|
11
|
+
@~/.opencode/write-the-f-paper/references/github-contrib.md
|
|
12
|
+
@~/.opencode/CONTRIBUTING.md
|
|
13
|
+
</context>
|
|
14
|
+
|
|
15
|
+
<process>
|
|
16
|
+
|
|
17
|
+
## Step 1: Verify Prerequisites
|
|
18
|
+
|
|
19
|
+
Check tools are available:
|
|
20
|
+
```bash
|
|
21
|
+
gh auth status 2>&1
|
|
22
|
+
git --version
|
|
23
|
+
node --version
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
If `gh` not authenticated:
|
|
27
|
+
> Run `gh auth login` to authenticate with GitHub.
|
|
28
|
+
|
|
29
|
+
## Step 2: Understand Contribution Type
|
|
30
|
+
|
|
31
|
+
Use the question tool:
|
|
32
|
+
|
|
33
|
+
**Question 1: What are you contributing?**
|
|
34
|
+
- Header: "Type"
|
|
35
|
+
- Options:
|
|
36
|
+
- "New command" - Add a /wtfp:* slash command
|
|
37
|
+
- "Bug fix" - Fix an existing issue
|
|
38
|
+
- "Workflow improvement" - Enhance a writing workflow
|
|
39
|
+
- "Documentation" - Improve docs or add examples
|
|
40
|
+
- "Other" - Something else
|
|
41
|
+
|
|
42
|
+
**Question 2: Do you have an existing issue?**
|
|
43
|
+
- Header: "Issue"
|
|
44
|
+
- Options:
|
|
45
|
+
- "Yes, issue #___" - Link to existing issue
|
|
46
|
+
- "No, creating fresh" - New contribution without issue
|
|
47
|
+
- "I'll create one first" - Redirect to /wtfp:request-feature
|
|
48
|
+
|
|
49
|
+
## Step 3: Setup Repository
|
|
50
|
+
|
|
51
|
+
Check current state:
|
|
52
|
+
```bash
|
|
53
|
+
git remote -v
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**If in wtf-p repo (maintainer):**
|
|
57
|
+
```bash
|
|
58
|
+
git checkout main
|
|
59
|
+
git pull origin main
|
|
60
|
+
git checkout -b [BRANCH_TYPE]/[SHORT_NAME]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**If not in wtf-p repo (external contributor):**
|
|
64
|
+
```bash
|
|
65
|
+
# Fork and clone
|
|
66
|
+
gh repo fork akougkas/wtf-p --clone
|
|
67
|
+
cd wtf-p
|
|
68
|
+
|
|
69
|
+
# Create branch
|
|
70
|
+
git checkout -b [BRANCH_TYPE]/[SHORT_NAME]
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Branch naming:
|
|
74
|
+
- `feat/add-citation-check` for features
|
|
75
|
+
- `fix/install-path-spaces` for bugs
|
|
76
|
+
- `docs/improve-readme` for documentation
|
|
77
|
+
|
|
78
|
+
## Step 4: Guide Implementation
|
|
79
|
+
|
|
80
|
+
Based on contribution type:
|
|
81
|
+
|
|
82
|
+
### For New Command
|
|
83
|
+
|
|
84
|
+
1. Show command template:
|
|
85
|
+
```markdown
|
|
86
|
+
---
|
|
87
|
+
name: wtfp:command-name
|
|
88
|
+
description: Brief description
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
<objective>
|
|
92
|
+
What this command accomplishes.
|
|
93
|
+
</objective>
|
|
94
|
+
|
|
95
|
+
<context>
|
|
96
|
+
@~/.opencode/write-the-f-paper/references/[relevant].md
|
|
97
|
+
</context>
|
|
98
|
+
|
|
99
|
+
<process>
|
|
100
|
+
## Step 1: ...
|
|
101
|
+
## Step 2: ...
|
|
102
|
+
</process>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
2. Create file in `commands/wtfp/[name].md`
|
|
106
|
+
|
|
107
|
+
3. Follow naming conventions:
|
|
108
|
+
- `new-*` for creation
|
|
109
|
+
- `create-*` for generation
|
|
110
|
+
- `plan-*` for planning
|
|
111
|
+
- `write-*` for execution
|
|
112
|
+
- `review-*` for review
|
|
113
|
+
- `check-*` for validation
|
|
114
|
+
- `export-*` for output
|
|
115
|
+
|
|
116
|
+
### For Bug Fix
|
|
117
|
+
|
|
118
|
+
1. Identify the file(s) to modify
|
|
119
|
+
2. Make minimal, focused changes
|
|
120
|
+
3. Add test coverage if applicable
|
|
121
|
+
|
|
122
|
+
### For Workflow Improvement
|
|
123
|
+
|
|
124
|
+
1. Edit file in `write-the-f-paper/workflows/`
|
|
125
|
+
2. If WCN version exists, update both `.md` and `.wcn.md`
|
|
126
|
+
|
|
127
|
+
## Step 5: Test Changes
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# Run existing tests
|
|
131
|
+
npm test
|
|
132
|
+
|
|
133
|
+
# Install locally for manual testing
|
|
134
|
+
node bin/install.js --local --force
|
|
135
|
+
|
|
136
|
+
# Test in Claude Code
|
|
137
|
+
# /wtfp:your-new-command
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Ask user to verify:
|
|
141
|
+
- Does the feature work as expected?
|
|
142
|
+
- Any edge cases to handle?
|
|
143
|
+
- Error messages clear?
|
|
144
|
+
|
|
145
|
+
## Step 6: Commit Changes
|
|
146
|
+
|
|
147
|
+
Stage files:
|
|
148
|
+
```bash
|
|
149
|
+
git add [FILES]
|
|
150
|
+
git status
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Commit with conventional message:
|
|
154
|
+
```bash
|
|
155
|
+
git commit -m "[TYPE]([SCOPE]): [DESCRIPTION]
|
|
156
|
+
|
|
157
|
+
[Optional body explaining why]
|
|
158
|
+
|
|
159
|
+
[Closes #XX if applicable]"
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Examples:
|
|
163
|
+
- `feat(commands): add citation-check command`
|
|
164
|
+
- `fix(cli): handle paths with spaces`
|
|
165
|
+
- `docs(readme): clarify installation steps`
|
|
166
|
+
|
|
167
|
+
## Step 7: Push and Create PR
|
|
168
|
+
|
|
169
|
+
Push branch:
|
|
170
|
+
```bash
|
|
171
|
+
git push -u origin [BRANCH_NAME]
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Create PR:
|
|
175
|
+
```bash
|
|
176
|
+
gh pr create \
|
|
177
|
+
--repo akougkas/wtf-p \
|
|
178
|
+
--title "[TYPE]([SCOPE]): [DESCRIPTION]" \
|
|
179
|
+
--body "$(cat <<'EOF'
|
|
180
|
+
## Summary
|
|
181
|
+
[What this PR does]
|
|
182
|
+
|
|
183
|
+
## Changes
|
|
184
|
+
- [Change 1]
|
|
185
|
+
- [Change 2]
|
|
186
|
+
|
|
187
|
+
## Testing
|
|
188
|
+
- [ ] `npm test` passes
|
|
189
|
+
- [ ] Manually tested in Claude Code
|
|
190
|
+
- [ ] [Specific test scenario]
|
|
191
|
+
|
|
192
|
+
## Related Issues
|
|
193
|
+
[Closes #XX or References #XX]
|
|
194
|
+
EOF
|
|
195
|
+
)"
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Step 8: Post-PR Guidance
|
|
199
|
+
|
|
200
|
+
After PR is created:
|
|
201
|
+
|
|
202
|
+
1. **Show PR URL** to user
|
|
203
|
+
2. **Explain review process:**
|
|
204
|
+
- Maintainer will review within a few days
|
|
205
|
+
- May request changes or ask questions
|
|
206
|
+
- Once approved, will be merged to main
|
|
207
|
+
|
|
208
|
+
3. **Next steps:**
|
|
209
|
+
- Watch for review comments
|
|
210
|
+
- Respond to feedback
|
|
211
|
+
- Update PR if changes requested
|
|
212
|
+
|
|
213
|
+
</process>
|
|
214
|
+
|
|
215
|
+
<templates>
|
|
216
|
+
|
|
217
|
+
## PR Title Format
|
|
218
|
+
```
|
|
219
|
+
<type>(<scope>): <description>
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Types: feat, fix, docs, refactor, test, chore
|
|
223
|
+
Scopes: commands, workflows, cli, templates
|
|
224
|
+
|
|
225
|
+
## PR Body Template
|
|
226
|
+
```markdown
|
|
227
|
+
## Summary
|
|
228
|
+
Brief description of what this PR accomplishes.
|
|
229
|
+
|
|
230
|
+
## Changes
|
|
231
|
+
- Added/Modified/Removed X
|
|
232
|
+
- Updated Y to do Z
|
|
233
|
+
|
|
234
|
+
## Testing
|
|
235
|
+
How to verify this works:
|
|
236
|
+
1. Install locally: `node bin/install.js --local`
|
|
237
|
+
2. Run: `/wtfp:command`
|
|
238
|
+
3. Expected: [outcome]
|
|
239
|
+
|
|
240
|
+
## Screenshots (if UI changes)
|
|
241
|
+
[Paste screenshots here]
|
|
242
|
+
|
|
243
|
+
## Related Issues
|
|
244
|
+
Closes #XX
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
</templates>
|
|
248
|
+
|
|
249
|
+
<error-handling>
|
|
250
|
+
|
|
251
|
+
**Fork already exists:** Use existing fork
|
|
252
|
+
```bash
|
|
253
|
+
gh repo sync [USERNAME]/wtf-p
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
**Branch already exists:**
|
|
257
|
+
```bash
|
|
258
|
+
git checkout [BRANCH]
|
|
259
|
+
git pull origin main
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
**Push rejected:** Need to pull first or force push (with caution)
|
|
263
|
+
|
|
264
|
+
**PR creation fails:** Check if branch was pushed, verify gh auth
|
|
265
|
+
|
|
266
|
+
</error-handling>
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wtfp:create-outline
|
|
3
|
+
description: Build section outline, argument map, and word budgets
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<execution_context>
|
|
7
|
+
@~/.opencode/write-the-f-paper/workflows/create-outline.md
|
|
8
|
+
@~/.opencode/write-the-f-paper/templates/roadmap.md
|
|
9
|
+
@~/.opencode/write-the-f-paper/templates/state.md
|
|
10
|
+
@~/.opencode/write-the-f-paper/references/imrad-structure.md
|
|
11
|
+
</execution_context>
|
|
12
|
+
|
|
13
|
+
<objective>
|
|
14
|
+
Create the document outline and section roadmap for an initialized paper.
|
|
15
|
+
|
|
16
|
+
**Orchestrator role:** Validate environment, load project context, resolve model profile, spawn outliner agent to produce structure artifacts, create STATE.md, create section directories, commit, present results.
|
|
17
|
+
|
|
18
|
+
**Why subagent:** Outlining requires significant reasoning about document structure, argument decomposition, and wave assignment. A fresh outliner agent gets peak quality for these creative decisions.
|
|
19
|
+
</objective>
|
|
20
|
+
|
|
21
|
+
<context>
|
|
22
|
+
No arguments. Requires `.planning/PROJECT.md` to exist.
|
|
23
|
+
</context>
|
|
24
|
+
|
|
25
|
+
<process>
|
|
26
|
+
|
|
27
|
+
## 1. Validate Environment and Resolve Model Profile
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
[ ! -f .planning/PROJECT.md ] && echo "ERROR: No project. Run /wtfp:new-paper" && exit 1
|
|
31
|
+
[ -f .planning/ROADMAP.md ] && echo "ERROR: Outline exists. Use /wtfp:progress" && exit 1
|
|
32
|
+
ls .planning/ 2>/dev/null
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Resolve model profile:**
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Model lookup table:**
|
|
42
|
+
|
|
43
|
+
| Agent | quality | balanced | budget |
|
|
44
|
+
|-------|---------|----------|--------|
|
|
45
|
+
| outliner | opus | sonnet | sonnet |
|
|
46
|
+
|
|
47
|
+
**Resolve gate flag:**
|
|
48
|
+
```bash
|
|
49
|
+
GATE_CONFIRM_OUTLINE=$(cat .planning/config.json 2>/dev/null | grep -o '"confirm_outline"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## 2. Read Context Files
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
PROJECT_CONTENT=$(cat .planning/PROJECT.md)
|
|
56
|
+
CONFIG_CONTENT=$(cat .planning/config.json 2>/dev/null)
|
|
57
|
+
EXISTING_STRUCTURE=$(cat .planning/structure/*.md 2>/dev/null)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## 3. Ensure Structure Directory
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
mkdir -p .planning/structure
|
|
64
|
+
mkdir -p .planning/sections
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## 4. Gate Check: Confirm Before Outlining
|
|
68
|
+
|
|
69
|
+
**If GATE_CONFIRM_OUTLINE is "true" (default):**
|
|
70
|
+
Present project summary to user via the question tool and wait for confirmation before proceeding.
|
|
71
|
+
|
|
72
|
+
**If GATE_CONFIRM_OUTLINE is "false":**
|
|
73
|
+
Skip confirmation and proceed directly to outlining.
|
|
74
|
+
|
|
75
|
+
## 5. Spawn wtfp-outliner Agent
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
79
|
+
WTF-P ► OUTLINING DOCUMENT
|
|
80
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Fill prompt with inlined content and spawn:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
Task(
|
|
87
|
+
prompt="First, read ~/.opencode/agents/wtfp/outliner.md for your role and instructions.\n\n" + filled_outlining_prompt,
|
|
88
|
+
subagent_type="general-purpose",
|
|
89
|
+
model="{outliner_model}",
|
|
90
|
+
description="Create Document Outline"
|
|
91
|
+
)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Outlining prompt includes: `<project_context>` with PROJECT.md content, config.json settings, any existing structure files.
|
|
95
|
+
|
|
96
|
+
## 6. Handle Outliner Return
|
|
97
|
+
|
|
98
|
+
**`## OUTLINING COMPLETE`:** Proceed to STATE.md creation and directory setup.
|
|
99
|
+
|
|
100
|
+
**`## CHECKPOINT REACHED`:** Present to user, get response, re-spawn outliner with decision.
|
|
101
|
+
|
|
102
|
+
**`## OUTLINING BLOCKED`:** Show blocker, offer options.
|
|
103
|
+
|
|
104
|
+
## 7. Post-Outliner Setup
|
|
105
|
+
|
|
106
|
+
After successful outlining, the orchestrator handles:
|
|
107
|
+
|
|
108
|
+
**Create STATE.md** using template from `~/.opencode/write-the-f-paper/templates/state.md`:
|
|
109
|
+
- Initialize position (section 1 of N), word count (0)
|
|
110
|
+
- Set argument strength from outliner's argument-map
|
|
111
|
+
- Set open questions from PROJECT.md
|
|
112
|
+
|
|
113
|
+
**Create section directories** from ROADMAP.md sections:
|
|
114
|
+
```bash
|
|
115
|
+
mkdir -p .planning/sections/01-[section-slug]
|
|
116
|
+
mkdir -p .planning/sections/02-[section-slug]
|
|
117
|
+
# ... for all sections listed in ROADMAP.md
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## 8. Commit (with commit_docs Guard)
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
COMMIT_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**If commit_docs = "true" (default):**
|
|
127
|
+
```bash
|
|
128
|
+
git add .planning/ROADMAP.md .planning/STATE.md .planning/sections/ .planning/structure/
|
|
129
|
+
git commit -m "docs: create document outline -- [N] sections, [X] words target"
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**If commit_docs = "false":**
|
|
133
|
+
Skip git add and commit for planning docs. Log: "Skipping planning docs commit (commit_docs: false)"
|
|
134
|
+
|
|
135
|
+
## 9. Present Final Status
|
|
136
|
+
|
|
137
|
+
</process>
|
|
138
|
+
|
|
139
|
+
<offer_next>
|
|
140
|
+
|
|
141
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
142
|
+
WTF-P ► OUTLINE CREATED ✓
|
|
143
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
144
|
+
|
|
145
|
+
- Roadmap: .planning/ROADMAP.md ([N] sections, [X] words)
|
|
146
|
+
- State: .planning/STATE.md
|
|
147
|
+
- Structure: .planning/structure/ (outline, argument-map, narrative-arc)
|
|
148
|
+
- Sections: .planning/sections/ ([N] directories)
|
|
149
|
+
|
|
150
|
+
| # | Section | Words | Wave |
|
|
151
|
+
|---|---------|-------|------|
|
|
152
|
+
[table from ROADMAP.md]
|
|
153
|
+
|
|
154
|
+
───────────────────────────────────────────
|
|
155
|
+
|
|
156
|
+
## ▶ Next Up
|
|
157
|
+
|
|
158
|
+
**Section 1: [Name]** — [goal]
|
|
159
|
+
|
|
160
|
+
`/wtfp:plan-section 1`
|
|
161
|
+
|
|
162
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
163
|
+
|
|
164
|
+
───────────────────────────────────────────
|
|
165
|
+
|
|
166
|
+
**Also available:**
|
|
167
|
+
- `/wtfp:discuss-section 1` — gather context first
|
|
168
|
+
- `/wtfp:research-gap 1` — investigate literature needs
|
|
169
|
+
- `/wtfp:execute-outline` — write all sections in wave-based parallel execution
|
|
170
|
+
|
|
171
|
+
</offer_next>
|
|
172
|
+
|
|
173
|
+
<success_criteria>
|
|
174
|
+
- [ ] Outliner agent spawned with full project context
|
|
175
|
+
- [ ] 4 artifacts created (outline.md, argument-map.md, narrative-arc.md, ROADMAP.md)
|
|
176
|
+
- [ ] STATE.md initialized with correct position
|
|
177
|
+
- [ ] Section directories created
|
|
178
|
+
- [ ] Word budget totals match target
|
|
179
|
+
- [ ] All committed to git
|
|
180
|
+
- [ ] User knows next steps
|
|
181
|
+
</success_criteria>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wtfp:create-poster
|
|
3
|
+
description: Generate academic poster from paper content
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<objective>
|
|
7
|
+
Generate an academic poster based on the current project's PROJECT.md and findings.
|
|
8
|
+
Uses the wtfp-marp skill to compile to HTML.
|
|
9
|
+
</objective>
|
|
10
|
+
|
|
11
|
+
<context>
|
|
12
|
+
@~/.opencode/write-the-f-paper/references/principles.md
|
|
13
|
+
@~/.opencode/write-the-f-paper/templates/posters/basic.md
|
|
14
|
+
</context>
|
|
15
|
+
|
|
16
|
+
<process>
|
|
17
|
+
## Step 1: Content Synthesis
|
|
18
|
+
- Read `.planning/PROJECT.md` and any drafted sections.
|
|
19
|
+
- Identify key findings, methodology, and conclusion.
|
|
20
|
+
|
|
21
|
+
## Step 2: User Interview
|
|
22
|
+
the question tool to determine:
|
|
23
|
+
- Poster title (default to project title)
|
|
24
|
+
- Authors
|
|
25
|
+
- Key visuals/charts needed
|
|
26
|
+
- Target audience
|
|
27
|
+
|
|
28
|
+
## Step 3: Markdown Generation
|
|
29
|
+
- Create `poster.md` using Marp format.
|
|
30
|
+
- Integrate synthesized content.
|
|
31
|
+
|
|
32
|
+
## Step 4: Compilation
|
|
33
|
+
- Use `wtfp-marp` skill: `npx @marp-team/marp-cli poster.md -o poster.html`
|
|
34
|
+
|
|
35
|
+
## Step 5: Review
|
|
36
|
+
- Present the generated poster.html path to the user.
|
|
37
|
+
</process>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wtfp:create-slides
|
|
3
|
+
description: Generate presentation slides from paper content
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<objective>
|
|
7
|
+
Generate presentation slides based on the current project's PROJECT.md and findings.
|
|
8
|
+
Uses the wtfp-marp skill to compile to PDF.
|
|
9
|
+
</objective>
|
|
10
|
+
|
|
11
|
+
<context>
|
|
12
|
+
@~/.opencode/write-the-f-paper/references/principles.md
|
|
13
|
+
@~/.opencode/write-the-f-paper/templates/slides/
|
|
14
|
+
</context>
|
|
15
|
+
|
|
16
|
+
<process>
|
|
17
|
+
## Step 1: Content Synthesis
|
|
18
|
+
- Read `.planning/PROJECT.md` and any drafted sections.
|
|
19
|
+
- Identify the core narrative and supporting claims.
|
|
20
|
+
|
|
21
|
+
## Step 2: User Interview
|
|
22
|
+
the question tool to determine:
|
|
23
|
+
- Presentation duration/target number of slides
|
|
24
|
+
- Specific focus areas
|
|
25
|
+
- Audience background
|
|
26
|
+
|
|
27
|
+
## Step 3: Markdown Generation
|
|
28
|
+
- Create `slides.md` using Marp format.
|
|
29
|
+
- Separate slides with `---`.
|
|
30
|
+
|
|
31
|
+
## Step 4: Compilation
|
|
32
|
+
- Use `wtfp-marp` skill: `npx @marp-team/marp-cli slides.md -o slides.pdf`
|
|
33
|
+
|
|
34
|
+
## Step 5: Review
|
|
35
|
+
- Present the generated slides.pdf path to the user.
|
|
36
|
+
</process>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wtfp:discuss-section
|
|
3
|
+
description: Discuss your vision for a section before planning it
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<objective>
|
|
7
|
+
Gather section context through collaborative thinking before planning.
|
|
8
|
+
|
|
9
|
+
Purpose: Help the user articulate their vision for how a section should read, what it needs to accomplish, and what makes it effective.
|
|
10
|
+
Output: CONTEXT.md file in the section directory capturing vision, essential content, and boundaries.
|
|
11
|
+
</objective>
|
|
12
|
+
|
|
13
|
+
<execution_context>
|
|
14
|
+
@~/.opencode/write-the-f-paper/workflows/discuss-section.md
|
|
15
|
+
@~/.opencode/write-the-f-paper/templates/context.md
|
|
16
|
+
</execution_context>
|
|
17
|
+
|
|
18
|
+
<context>
|
|
19
|
+
Section number: $ARGUMENTS (required)
|
|
20
|
+
|
|
21
|
+
**Load project state first:**
|
|
22
|
+
@.planning/STATE.md
|
|
23
|
+
|
|
24
|
+
**Load roadmap:**
|
|
25
|
+
@.planning/ROADMAP.md
|
|
26
|
+
|
|
27
|
+
**Load structure documents:**
|
|
28
|
+
@.planning/structure/argument-map.md
|
|
29
|
+
@.planning/structure/outline.md
|
|
30
|
+
</context>
|
|
31
|
+
|
|
32
|
+
<process>
|
|
33
|
+
|
|
34
|
+
<step name="verify">
|
|
35
|
+
1. Check .planning/ directory exists (error if not - user should run /wtfp:new-paper)
|
|
36
|
+
2. Validate section number provided via $ARGUMENTS
|
|
37
|
+
3. Validate section exists in roadmap
|
|
38
|
+
</step>
|
|
39
|
+
|
|
40
|
+
<step name="execute_workflow">
|
|
41
|
+
Execute the discuss-section workflow from execution_context.
|
|
42
|
+
|
|
43
|
+
The workflow will:
|
|
44
|
+
- Validate section against roadmap
|
|
45
|
+
- Check for existing CONTEXT.md
|
|
46
|
+
- Gather vision through the question tool (not interrogation)
|
|
47
|
+
- Write CONTEXT.md capturing user's vision
|
|
48
|
+
- Commit to git
|
|
49
|
+
</step>
|
|
50
|
+
|
|
51
|
+
<step name="done">
|
|
52
|
+
Workflow outputs next steps to user (typically: research or plan the section).
|
|
53
|
+
</step>
|
|
54
|
+
|
|
55
|
+
</process>
|
|
56
|
+
|
|
57
|
+
<success_criteria>
|
|
58
|
+
- Section validated against roadmap
|
|
59
|
+
- Vision gathered through collaborative thinking
|
|
60
|
+
- CONTEXT.md created in section directory
|
|
61
|
+
- CONTEXT.md committed to git
|
|
62
|
+
- User knows next steps
|
|
63
|
+
</success_criteria>
|