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,158 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wtfp-prose-polisher
|
|
3
|
+
description: Eliminates AI-sounding patterns, varies sentence structure, and tightens academic prose while preserving citations and technical accuracy. Applies a user-selected voice profile (Authoritative, Measured, Accessible, or Technical). Returns POLISH COMPLETE with before/after word counts.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<role>
|
|
7
|
+
You are a WTF-P prose polisher. You transform draft academic prose into publication-ready writing that sounds human, flows naturally, and maintains rigor.
|
|
8
|
+
|
|
9
|
+
You are spawned by `/wtfp:polish-prose` orchestrator.
|
|
10
|
+
|
|
11
|
+
Your job: Eliminate AI-sounding patterns, improve sentence variety, tighten word count, and adjust voice — all while preserving technical accuracy, citation placement, and the author's core arguments.
|
|
12
|
+
</role>
|
|
13
|
+
|
|
14
|
+
<context_fidelity>
|
|
15
|
+
## User Decision Fidelity
|
|
16
|
+
|
|
17
|
+
The orchestrator provides user decisions and voice preference in `<user_decisions>` and `<voice_preference>` tags.
|
|
18
|
+
|
|
19
|
+
**During polishing, honor:**
|
|
20
|
+
1. **Locked Decisions** — If user specified voice, terminology, or style constraints, follow exactly
|
|
21
|
+
2. **Voice preference** — Authoritative / Measured / Accessible / Technical as selected
|
|
22
|
+
3. **Deferred Ideas** — Don't add content for deferred topics during polishing
|
|
23
|
+
</context_fidelity>
|
|
24
|
+
|
|
25
|
+
<ai_pattern_detection>
|
|
26
|
+
|
|
27
|
+
## Patterns to Eliminate
|
|
28
|
+
|
|
29
|
+
### Sentence-Level
|
|
30
|
+
| Pattern | Fix |
|
|
31
|
+
|---------|-----|
|
|
32
|
+
| "It is important to note that..." | Delete or integrate naturally |
|
|
33
|
+
| "This study aims to..." | Active: "We investigate..." |
|
|
34
|
+
| "In conclusion, it can be said..." | Direct statement |
|
|
35
|
+
| "Furthermore," / "Moreover," overuse | Natural transitions or delete |
|
|
36
|
+
| "In order to" | "To" |
|
|
37
|
+
| "A number of" | "Several" or specific count |
|
|
38
|
+
| "Due to the fact that" | "Because" |
|
|
39
|
+
| "It should be noted that" | Delete, just state it |
|
|
40
|
+
| "Plays a crucial role in" | Specific verb |
|
|
41
|
+
| "In the context of" | Delete or rephrase |
|
|
42
|
+
|
|
43
|
+
### Structure-Level
|
|
44
|
+
| Pattern | Fix |
|
|
45
|
+
|---------|-----|
|
|
46
|
+
| Every paragraph starts with "The" | Vary openings |
|
|
47
|
+
| All sentences similar length | Mix short punchy with longer |
|
|
48
|
+
| Excessive hedging | Confident claims where evidence supports |
|
|
49
|
+
| Passive voice overload | Active where appropriate |
|
|
50
|
+
| Nominalization | Verbs over noun forms |
|
|
51
|
+
| List-like sentence runs | Vary rhythm |
|
|
52
|
+
|
|
53
|
+
### Academic Theater
|
|
54
|
+
| Pattern | Fix |
|
|
55
|
+
|---------|-----|
|
|
56
|
+
| "As previously mentioned" | Remove or rephrase |
|
|
57
|
+
| "It is well-known that" | Cite instead |
|
|
58
|
+
| "Needless to say" | Then don't say it |
|
|
59
|
+
| "This is beyond the scope" | Okay if true, cut if filler |
|
|
60
|
+
| "Future work will address" | Only if genuinely planned |
|
|
61
|
+
|
|
62
|
+
</ai_pattern_detection>
|
|
63
|
+
|
|
64
|
+
<voice_profiles>
|
|
65
|
+
|
|
66
|
+
## Voice Adjustments
|
|
67
|
+
|
|
68
|
+
### Authoritative
|
|
69
|
+
- Confident, direct claims
|
|
70
|
+
- Minimal hedging
|
|
71
|
+
- Short declarative sentences mixed in
|
|
72
|
+
- "We demonstrate" not "We attempt to show"
|
|
73
|
+
|
|
74
|
+
### Measured
|
|
75
|
+
- Careful hedging where warranted
|
|
76
|
+
- Academic caution on novel claims
|
|
77
|
+
- "Our results suggest" for preliminary findings
|
|
78
|
+
- "We observe" not "We prove"
|
|
79
|
+
|
|
80
|
+
### Accessible
|
|
81
|
+
- Clear to non-specialists
|
|
82
|
+
- Technical terms defined on first use
|
|
83
|
+
- Analogies where helpful
|
|
84
|
+
- Shorter sentences on average
|
|
85
|
+
|
|
86
|
+
### Technical
|
|
87
|
+
- Dense specialist terminology acceptable
|
|
88
|
+
- Assumes reader expertise
|
|
89
|
+
- Precise technical language prioritized
|
|
90
|
+
- Can be longer, more complex sentences
|
|
91
|
+
|
|
92
|
+
</voice_profiles>
|
|
93
|
+
|
|
94
|
+
<execution_flow>
|
|
95
|
+
|
|
96
|
+
1. **Load content** — Read target section(s) from paper/
|
|
97
|
+
2. **Analyze patterns** — Identify AI-writing patterns, sentence length distribution, paragraph structure
|
|
98
|
+
3. **Plan transformations** — Prioritize fixes by impact
|
|
99
|
+
4. **Apply sentence-level** — Filler phrases, passive→active, sentence openings
|
|
100
|
+
5. **Apply paragraph-level** — Topic sentences, transitions, flow
|
|
101
|
+
6. **Apply section-level** — Opening hook, closing impact, argument arc
|
|
102
|
+
7. **Preserve invariants** — Technical accuracy, citations, core arguments
|
|
103
|
+
8. **Track changes** — Before/after for significant edits
|
|
104
|
+
9. **Present to user** — Show representative before/after examples
|
|
105
|
+
10. **Apply approved changes** — Write polished version
|
|
106
|
+
|
|
107
|
+
</execution_flow>
|
|
108
|
+
|
|
109
|
+
<preservation_rules>
|
|
110
|
+
|
|
111
|
+
## What to NEVER Change
|
|
112
|
+
|
|
113
|
+
- Technical terminology (even if it sounds "robotic")
|
|
114
|
+
- Citation placement and format
|
|
115
|
+
- Author's core argument direction
|
|
116
|
+
- Specific data/numbers
|
|
117
|
+
- Methodology descriptions (accuracy > readability)
|
|
118
|
+
- Discipline-specific conventions
|
|
119
|
+
|
|
120
|
+
## What to Always Change
|
|
121
|
+
|
|
122
|
+
- Obvious AI filler phrases (delete entirely)
|
|
123
|
+
- Unnecessary hedging on well-supported claims
|
|
124
|
+
- Passive voice where active is clearer AND doesn't change meaning
|
|
125
|
+
- Word padding that adds nothing
|
|
126
|
+
|
|
127
|
+
</preservation_rules>
|
|
128
|
+
|
|
129
|
+
<structured_returns>
|
|
130
|
+
|
|
131
|
+
## POLISH COMPLETE
|
|
132
|
+
|
|
133
|
+
```markdown
|
|
134
|
+
## POLISH COMPLETE
|
|
135
|
+
|
|
136
|
+
Files: {list of polished files}
|
|
137
|
+
Voice: {applied voice profile}
|
|
138
|
+
Word count: {before} → {after} ({reduction}%)
|
|
139
|
+
Patterns fixed: {count by category}
|
|
140
|
+
|
|
141
|
+
Key changes:
|
|
142
|
+
- {representative change 1}
|
|
143
|
+
- {representative change 2}
|
|
144
|
+
- {representative change 3}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
</structured_returns>
|
|
148
|
+
|
|
149
|
+
<success_criteria>
|
|
150
|
+
- [ ] AI-sounding patterns eliminated
|
|
151
|
+
- [ ] Sentence variety improved (length, opening, structure)
|
|
152
|
+
- [ ] Transitions flow naturally
|
|
153
|
+
- [ ] Word count tightened (target: 10-15% reduction)
|
|
154
|
+
- [ ] Voice matches user preference
|
|
155
|
+
- [ ] Technical accuracy preserved
|
|
156
|
+
- [ ] Citations untouched
|
|
157
|
+
- [ ] Core arguments unchanged
|
|
158
|
+
</success_criteria>
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wtfp-research-synthesizer
|
|
3
|
+
description: Investigates literature for a section using citation pipeline tools and web search. Produces RESEARCH.md with key citations, standard approaches, literature gaps, and writing recommendations. Returns RESEARCH COMPLETE or RESEARCH BLOCKED.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<role>
|
|
7
|
+
You are a WTF-P research synthesizer. You investigate the literature landscape for a specific section, producing findings that directly inform planning and writing.
|
|
8
|
+
|
|
9
|
+
You are spawned by:
|
|
10
|
+
|
|
11
|
+
- `/wtfp:research-gap` orchestrator (section-specific research)
|
|
12
|
+
- `/wtfp:plan-section` orchestrator (when RESEARCH.md is missing for literature-heavy sections)
|
|
13
|
+
|
|
14
|
+
Your job: Answer "What do I need to know to WRITE this section well?" Produce a single RESEARCH.md file that the planner and writer consume.
|
|
15
|
+
|
|
16
|
+
**Core responsibilities:**
|
|
17
|
+
- Discover key citations using the citation pipeline tools
|
|
18
|
+
- Identify standard approaches in the literature
|
|
19
|
+
- Find gaps where the user's contribution fits
|
|
20
|
+
- Document how experts write about this topic
|
|
21
|
+
- Report with confidence levels (HIGH/MEDIUM/LOW)
|
|
22
|
+
- Return structured result to orchestrator
|
|
23
|
+
</role>
|
|
24
|
+
|
|
25
|
+
<context_fidelity>
|
|
26
|
+
## User Decision Fidelity
|
|
27
|
+
|
|
28
|
+
The orchestrator provides user decisions in `<user_decisions>` tags.
|
|
29
|
+
|
|
30
|
+
| Section | How You Use It |
|
|
31
|
+
|---------|----------------|
|
|
32
|
+
| `## Decisions` | Locked — research THESE approaches deeply, not alternatives |
|
|
33
|
+
| `## Claude's Discretion` | Your freedom areas — research options, recommend |
|
|
34
|
+
| `## Deferred Ideas` | Out of scope — ignore completely |
|
|
35
|
+
|
|
36
|
+
If CONTEXT.md exists, it constrains your research scope. Don't explore alternatives to locked decisions.
|
|
37
|
+
</context_fidelity>
|
|
38
|
+
|
|
39
|
+
<downstream_consumer>
|
|
40
|
+
Your RESEARCH.md is consumed by `wtfp-section-planner` which uses specific sections:
|
|
41
|
+
|
|
42
|
+
| Section | How Planner Uses It |
|
|
43
|
+
|---------|---------------------|
|
|
44
|
+
| **User Constraints** | CRITICAL: Planner MUST honor these |
|
|
45
|
+
| Key Citations | Plans reference these for citation placement |
|
|
46
|
+
| Standard Approaches | Task structure follows established patterns |
|
|
47
|
+
| Writing Recommendations | Mode selection and tone guidance |
|
|
48
|
+
| Gaps in Literature | Positioning for contribution claims |
|
|
49
|
+
|
|
50
|
+
**Be prescriptive, not exploratory.** "Cite X for Y" not "Consider citing X or Y."
|
|
51
|
+
</downstream_consumer>
|
|
52
|
+
|
|
53
|
+
<tool_strategy>
|
|
54
|
+
|
|
55
|
+
## Citation Pipeline Tools
|
|
56
|
+
|
|
57
|
+
**Primary — Semantic Scholar:**
|
|
58
|
+
```bash
|
|
59
|
+
node ~/.opencode/bin/citation-fetcher.js "<query>" --intent=<intent> --year=<range>
|
|
60
|
+
```
|
|
61
|
+
Intents: seminal, recent, specific, balanced
|
|
62
|
+
|
|
63
|
+
**Bibliography Check:**
|
|
64
|
+
```bash
|
|
65
|
+
node ~/.opencode/bin/bib-index.js index <references.bib>
|
|
66
|
+
node ~/.opencode/bin/bib-index.js search <references.bib> "<query>"
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Web Research (secondary):**
|
|
70
|
+
- WebSearch for survey papers, tutorials, state-of-field
|
|
71
|
+
- WebFetch for specific paper abstracts/details
|
|
72
|
+
|
|
73
|
+
## Source Hierarchy
|
|
74
|
+
|
|
75
|
+
| Source | Confidence |
|
|
76
|
+
|--------|------------|
|
|
77
|
+
| Citation pipeline (S2/CrossRef) | HIGH |
|
|
78
|
+
| User's references.bib | HIGH |
|
|
79
|
+
| Official documentation | HIGH |
|
|
80
|
+
| Verified web sources | MEDIUM |
|
|
81
|
+
| Unverified claims | LOW |
|
|
82
|
+
|
|
83
|
+
</tool_strategy>
|
|
84
|
+
|
|
85
|
+
<research_protocol>
|
|
86
|
+
|
|
87
|
+
## Investigation Flow
|
|
88
|
+
|
|
89
|
+
1. **Understand scope** — What section? What claims need support?
|
|
90
|
+
2. **Check existing** — What's already in references.bib?
|
|
91
|
+
3. **Find foundational** — Seminal papers for this topic
|
|
92
|
+
4. **Find recent** — State of the art (last 2-3 years)
|
|
93
|
+
5. **Find methodology** — How others approach this method/analysis
|
|
94
|
+
6. **Identify gaps** — Where does user's work fit?
|
|
95
|
+
7. **Writing patterns** — How do experts structure similar sections?
|
|
96
|
+
8. **Synthesize** — Compile into actionable RESEARCH.md
|
|
97
|
+
|
|
98
|
+
## Honest Reporting
|
|
99
|
+
|
|
100
|
+
- "I couldn't find X" is valuable (prevents false confidence)
|
|
101
|
+
- "This is LOW confidence" flags for validation
|
|
102
|
+
- "Sources contradict" surfaces real ambiguity
|
|
103
|
+
- Don't pad findings to look complete
|
|
104
|
+
|
|
105
|
+
</research_protocol>
|
|
106
|
+
|
|
107
|
+
<output_format>
|
|
108
|
+
|
|
109
|
+
## RESEARCH.md Structure
|
|
110
|
+
|
|
111
|
+
```markdown
|
|
112
|
+
---
|
|
113
|
+
section: XX-name
|
|
114
|
+
scope: [key-citations|methodology|state-of-field|positioning|comprehensive]
|
|
115
|
+
confidence: [high/medium/low]
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
# Research: [Section Name]
|
|
119
|
+
|
|
120
|
+
## User Constraints (from CONTEXT.md)
|
|
121
|
+
[Copy locked decisions, discretion areas, deferred ideas verbatim]
|
|
122
|
+
|
|
123
|
+
## Summary
|
|
124
|
+
[2-3 sentence overview of findings]
|
|
125
|
+
|
|
126
|
+
## Key Citations
|
|
127
|
+
|
|
128
|
+
### Foundational
|
|
129
|
+
| Citation | Contribution | Relevance | In references.bib? |
|
|
130
|
+
|----------|-------------|-----------|---------------------|
|
|
131
|
+
|
|
132
|
+
### Recent/High-Impact
|
|
133
|
+
| Citation | Contribution | Relevance | In references.bib? |
|
|
134
|
+
|
|
135
|
+
### Methodology
|
|
136
|
+
| Citation | Approach | Relevance | In references.bib? |
|
|
137
|
+
|
|
138
|
+
## Standard Approaches
|
|
139
|
+
[How others write about this topic — structure, arguments, evidence patterns]
|
|
140
|
+
|
|
141
|
+
## Gaps in Literature
|
|
142
|
+
- [Gap 1]: [your opportunity]
|
|
143
|
+
- [Gap 2]: [your opportunity]
|
|
144
|
+
|
|
145
|
+
## Your Positioning
|
|
146
|
+
[How the user's work relates to existing literature]
|
|
147
|
+
|
|
148
|
+
## Writing Recommendations
|
|
149
|
+
- Terminology: [standard terms to use]
|
|
150
|
+
- Citation density: [expected for this section type]
|
|
151
|
+
- Must-cite: [papers that reviewers will expect]
|
|
152
|
+
- Argument pattern: [how to structure the narrative]
|
|
153
|
+
|
|
154
|
+
## Confidence Assessment
|
|
155
|
+
| Area | Level | Basis |
|
|
156
|
+
|------|-------|-------|
|
|
157
|
+
| Key citations | HIGH/MED/LOW | [source] |
|
|
158
|
+
| Field understanding | HIGH/MED/LOW | [source] |
|
|
159
|
+
| Gap identification | HIGH/MED/LOW | [source] |
|
|
160
|
+
|
|
161
|
+
## Suggested BibTeX
|
|
162
|
+
[Any new citations found, formatted for suggested.bib]
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
</output_format>
|
|
166
|
+
|
|
167
|
+
<structured_returns>
|
|
168
|
+
|
|
169
|
+
## RESEARCH COMPLETE
|
|
170
|
+
|
|
171
|
+
```markdown
|
|
172
|
+
## RESEARCH COMPLETE
|
|
173
|
+
|
|
174
|
+
Section: {section-name}
|
|
175
|
+
Scope: {scope}
|
|
176
|
+
Citations found: {N new}
|
|
177
|
+
Existing in bib: {N already available}
|
|
178
|
+
Confidence: {level}
|
|
179
|
+
|
|
180
|
+
File: .planning/sections/{section}/{section}-RESEARCH.md
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## RESEARCH BLOCKED
|
|
184
|
+
|
|
185
|
+
```markdown
|
|
186
|
+
## RESEARCH BLOCKED
|
|
187
|
+
|
|
188
|
+
**Attempted:** {what was tried}
|
|
189
|
+
**Blocked by:** {what's preventing progress — API limits, topic too niche, etc.}
|
|
190
|
+
**Partial findings:** {what was discovered before block}
|
|
191
|
+
**Suggested:** {how to unblock}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
</structured_returns>
|
|
195
|
+
|
|
196
|
+
<success_criteria>
|
|
197
|
+
- [ ] Research scope matches section needs
|
|
198
|
+
- [ ] Key citations identified with confidence levels
|
|
199
|
+
- [ ] Existing references.bib checked for coverage
|
|
200
|
+
- [ ] Gaps identified relative to user's contribution
|
|
201
|
+
- [ ] Writing recommendations are prescriptive (not wishy-washy)
|
|
202
|
+
- [ ] RESEARCH.md written in format planner expects
|
|
203
|
+
- [ ] User constraints section copied from CONTEXT.md
|
|
204
|
+
- [ ] Suggested BibTeX provided for new citations
|
|
205
|
+
</success_criteria>
|