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,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wtfp:quick
|
|
3
|
+
description: Run a small writing fix without full planning overhead
|
|
4
|
+
argument-hint: "[task description]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Bash
|
|
8
|
+
- Write
|
|
9
|
+
- Edit
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Task
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<objective>
|
|
17
|
+
Execute a quick writing task with atomic commits and state tracking but skip optional agents (plan-checker, argument-verifier).
|
|
18
|
+
|
|
19
|
+
**Orchestrator role:** Parse task, load minimal context, execute directly or spawn writer agent, commit result.
|
|
20
|
+
|
|
21
|
+
Use for small targeted tasks: fix a paragraph, add a citation, tweak wording, expand a point.
|
|
22
|
+
</objective>
|
|
23
|
+
|
|
24
|
+
<context>
|
|
25
|
+
Task: $ARGUMENTS (natural language description of what to do)
|
|
26
|
+
|
|
27
|
+
**Load project state:**
|
|
28
|
+
@.planning/STATE.md
|
|
29
|
+
@.planning/config.json
|
|
30
|
+
</context>
|
|
31
|
+
|
|
32
|
+
<process>
|
|
33
|
+
|
|
34
|
+
## 1. Validate Environment
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
ls .planning/ 2>/dev/null || echo "No project — will work on files directly"
|
|
38
|
+
ls paper/*.md 2>/dev/null
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 2. Parse Task Intent
|
|
42
|
+
|
|
43
|
+
Classify $ARGUMENTS into task type:
|
|
44
|
+
- **fix** — Correct an error, fix citation, resolve contradiction
|
|
45
|
+
- **add** — Add a paragraph, citation, transition, figure reference
|
|
46
|
+
- **revise** — Rewrite a paragraph, strengthen argument, tighten prose
|
|
47
|
+
- **cite** — Add or fix specific citations
|
|
48
|
+
|
|
49
|
+
## 3. Load Minimal Context
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
|
53
|
+
STATE_CONTENT=$(cat .planning/STATE.md 2>/dev/null)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Only load files directly relevant to the task. No full context dump.
|
|
57
|
+
|
|
58
|
+
## 4. Execute Task
|
|
59
|
+
|
|
60
|
+
**For simple tasks (fix, cite):** Execute directly in orchestrator — read target file, make edit, verify.
|
|
61
|
+
|
|
62
|
+
**For complex tasks (add, revise):** Spawn section-writer agent with focused prompt.
|
|
63
|
+
|
|
64
|
+
| Agent | quality | balanced | budget |
|
|
65
|
+
|-------|---------|----------|--------|
|
|
66
|
+
| section-writer | opus | sonnet | sonnet |
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
Task(
|
|
70
|
+
prompt="First, read ~/.claude/agents/wtfp/section-writer.md for your role.\n\n" + focused_prompt,
|
|
71
|
+
subagent_type="general-purpose",
|
|
72
|
+
model="{writer_model}",
|
|
73
|
+
description="Quick: [task summary]"
|
|
74
|
+
)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Skip:** plan-checker, argument-verifier (quick mode = no verification loop).
|
|
78
|
+
|
|
79
|
+
## 5. Commit and Update State
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
git add paper/
|
|
83
|
+
git commit -m "[type](quick): [task description]"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Update STATE.md word count if changed.
|
|
87
|
+
|
|
88
|
+
</process>
|
|
89
|
+
|
|
90
|
+
<offer_next>
|
|
91
|
+
|
|
92
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
93
|
+
WTF-P ► QUICK TASK DONE ✓
|
|
94
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
95
|
+
|
|
96
|
+
[task summary] — [words changed]
|
|
97
|
+
|
|
98
|
+
───────────────────────────────────────────
|
|
99
|
+
|
|
100
|
+
</offer_next>
|
|
101
|
+
|
|
102
|
+
<success_criteria>
|
|
103
|
+
- [ ] Task executed with minimal context loading
|
|
104
|
+
- [ ] Changes committed atomically
|
|
105
|
+
- [ ] STATE.md word count updated
|
|
106
|
+
- [ ] No unnecessary agent spawning
|
|
107
|
+
</success_criteria>
|
|
@@ -1,235 +1,222 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wtfp:research-gap
|
|
3
|
-
description:
|
|
4
|
-
argument-hint: "[section]"
|
|
3
|
+
description: Research literature and domain knowledge for a section
|
|
4
|
+
argument-hint: "[section] [--depth=quick|standard|deep]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Read
|
|
7
7
|
- Bash
|
|
8
8
|
- Write
|
|
9
|
-
-
|
|
10
|
-
- WebSearch
|
|
11
|
-
- mcp__context7__*
|
|
9
|
+
- Task
|
|
12
10
|
- AskUserQuestion
|
|
13
11
|
---
|
|
14
12
|
|
|
13
|
+
<execution_context>
|
|
14
|
+
@~/.claude/write-the-f-paper/references/research-pitfalls.md
|
|
15
|
+
</execution_context>
|
|
16
|
+
|
|
15
17
|
<objective>
|
|
16
18
|
Perform comprehensive literature/domain research for a specific section.
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
- Key citations needed
|
|
20
|
-
- Standard approaches in the literature
|
|
21
|
-
- Gaps in current research
|
|
22
|
-
- How experts write about this topic
|
|
23
|
-
|
|
24
|
-
Creates RESEARCH.md with "how experts write this" knowledge.
|
|
20
|
+
**Orchestrator role:** Validate project, scope research with user, resolve model profile, spawn research-synthesizer agent, present results.
|
|
25
21
|
|
|
26
|
-
|
|
22
|
+
Creates RESEARCH.md with "how experts write this" knowledge, key citations, gaps, and positioning.
|
|
27
23
|
</objective>
|
|
28
24
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</execution_context>
|
|
25
|
+
<context>
|
|
26
|
+
Section: $ARGUMENTS (section number or name)
|
|
27
|
+
</context>
|
|
33
28
|
|
|
34
29
|
<process>
|
|
35
30
|
|
|
36
|
-
|
|
37
|
-
**Verify project exists:**
|
|
31
|
+
## 1. Validate Environment and Resolve Model Profile
|
|
38
32
|
|
|
39
33
|
```bash
|
|
40
|
-
[ ! -f .planning/PROJECT.md ] && echo "ERROR: No project
|
|
41
|
-
[ ! -f .planning/ROADMAP.md ] && echo "ERROR: No
|
|
34
|
+
[ ! -f .planning/PROJECT.md ] && echo "ERROR: No project. Run /wtfp:new-paper" && exit 1
|
|
35
|
+
[ ! -f .planning/ROADMAP.md ] && echo "ERROR: No roadmap. Run /wtfp:create-outline" && exit 1
|
|
42
36
|
```
|
|
43
37
|
|
|
44
|
-
|
|
38
|
+
```bash
|
|
39
|
+
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
|
40
|
+
```
|
|
45
41
|
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
| Agent | quality | balanced | budget |
|
|
43
|
+
|-------|---------|----------|--------|
|
|
44
|
+
| research-synthesizer | opus | sonnet | haiku |
|
|
48
45
|
|
|
49
|
-
|
|
50
|
-
- Read ROADMAP.md for section goal
|
|
51
|
-
- Read argument-map.md for claims to support
|
|
52
|
-
- Read sources/literature.md for existing citations
|
|
53
|
-
</step>
|
|
46
|
+
## 1b. Parse Depth Flag
|
|
54
47
|
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
Parse --depth from $ARGUMENTS:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Extract depth from arguments (--depth=quick, --depth=standard, or --depth=deep)
|
|
52
|
+
DEPTH_ARG=$(echo "$ARGUMENTS" | grep -oE '\-\-depth=(quick|standard|deep)' | cut -d= -f2)
|
|
53
|
+
|
|
54
|
+
# If no --depth flag, read default from config
|
|
55
|
+
if [ -z "$DEPTH_ARG" ]; then
|
|
56
|
+
DEPTH=$(cat .planning/config.json 2>/dev/null | grep -o '"depth"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "standard")
|
|
57
|
+
else
|
|
58
|
+
DEPTH="$DEPTH_ARG"
|
|
59
|
+
fi
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Depth mapping:**
|
|
63
|
+
|
|
64
|
+
| Depth | Behavior |
|
|
65
|
+
|-------|----------|
|
|
66
|
+
| quick | Quick verbal summary - no RESEARCH.md created, no git commit |
|
|
67
|
+
| standard | Standard research (current behavior) - 10-20 sources, RESEARCH.md created |
|
|
68
|
+
| deep | Exhaustive literature review - 20-50 papers, all categories mandatory |
|
|
69
|
+
|
|
70
|
+
## 2. Define Research Scope
|
|
57
71
|
|
|
58
72
|
Use AskUserQuestion:
|
|
59
73
|
- header: "Research Focus"
|
|
60
|
-
- question: "What specifically do you need to understand for
|
|
74
|
+
- question: "What specifically do you need to understand for this section?"
|
|
61
75
|
- options:
|
|
62
76
|
- "Key citations" — Who are the must-cite authors/papers?
|
|
63
77
|
- "Methodology" — How do others approach this method?
|
|
64
78
|
- "State of field" — What's the current consensus/debate?
|
|
65
79
|
- "Positioning" — How to differentiate from existing work?
|
|
66
|
-
- "All of the above" — Comprehensive research
|
|
67
80
|
|
|
68
|
-
|
|
81
|
+
## 3. Read Context Files
|
|
69
82
|
|
|
70
|
-
|
|
71
|
-
|
|
83
|
+
```bash
|
|
84
|
+
PROJECT_CONTENT=$(cat .planning/PROJECT.md)
|
|
85
|
+
ROADMAP_CONTENT=$(cat .planning/ROADMAP.md)
|
|
86
|
+
ARGMAP_CONTENT=$(cat .planning/structure/argument-map.md 2>/dev/null)
|
|
87
|
+
LITERATURE_CONTENT=$(cat .planning/sources/literature.md 2>/dev/null)
|
|
88
|
+
BIB_INDEX=$(node ~/.claude/bin/bib-index.js index references.bib 2>/dev/null || echo "No references.bib")
|
|
89
|
+
|
|
90
|
+
SECTION_DIR=$(ls -d .planning/sections/${SECTION}-* 2>/dev/null | head -1)
|
|
91
|
+
CONTEXT_CONTENT=$(cat "${SECTION_DIR}"/*-CONTEXT.md 2>/dev/null)
|
|
92
|
+
```
|
|
72
93
|
|
|
73
|
-
|
|
94
|
+
## 3b. Quick Depth: Verbal Summary Only
|
|
74
95
|
|
|
75
|
-
**
|
|
76
|
-
- Identify foundational papers
|
|
77
|
-
- Find recent high-impact work
|
|
78
|
-
- Note methodological papers
|
|
79
|
-
- Track disagreements/debates
|
|
96
|
+
**If DEPTH is "quick":**
|
|
80
97
|
|
|
81
|
-
|
|
82
|
-
- How do others structure similar sections?
|
|
83
|
-
- What's the typical argument flow?
|
|
84
|
-
- What evidence is typically presented?
|
|
98
|
+
Skip agent spawn entirely. Orchestrator provides direct verbal synthesis.
|
|
85
99
|
|
|
86
|
-
|
|
87
|
-
- What's missing in current literature?
|
|
88
|
-
- Where does your work fit?
|
|
89
|
-
- What questions remain unanswered?
|
|
100
|
+
Read available context (PROJECT.md, argument-map, existing literature, CONTEXT_CONTENT) and synthesize a verbal summary directly to user:
|
|
90
101
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
-
|
|
94
|
-
|
|
102
|
+
```
|
|
103
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
104
|
+
WTF-P ► QUICK RESEARCH SYNTHESIS
|
|
105
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
95
106
|
|
|
96
|
-
|
|
107
|
+
Based on available context for Section {X}:
|
|
97
108
|
|
|
98
|
-
|
|
99
|
-
**Create RESEARCH.md:**
|
|
109
|
+
[Synthesize key points from PROJECT, argument-map, and any existing literature.md]
|
|
100
110
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
scope: [research scope]
|
|
105
|
-
confidence: [high/medium/low]
|
|
106
|
-
---
|
|
111
|
+
Key areas:
|
|
112
|
+
- [Area 1]: [Brief synthesis]
|
|
113
|
+
- [Area 2]: [Brief synthesis]
|
|
107
114
|
|
|
108
|
-
|
|
115
|
+
Suggested citations to consider:
|
|
116
|
+
- [If any mentioned in existing sources]
|
|
109
117
|
|
|
110
|
-
|
|
111
|
-
[2-3 sentence overview of findings]
|
|
118
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
112
119
|
|
|
113
|
-
|
|
120
|
+
**Note:** Quick research -- no RESEARCH.md written. Run with `--depth=standard` for persistent research.
|
|
121
|
+
```
|
|
114
122
|
|
|
115
|
-
|
|
116
|
-
| Citation | Contribution | Relevance |
|
|
117
|
-
|----------|--------------|-----------|
|
|
118
|
-
| [Author (Year)] | [What they established] | [Why cite] |
|
|
123
|
+
No RESEARCH.md created. No git commit. Present summary and offer next steps, then exit workflow.
|
|
119
124
|
|
|
120
|
-
|
|
121
|
-
| Citation | Contribution | Relevance |
|
|
122
|
-
|----------|--------------|-----------|
|
|
125
|
+
**If DEPTH is "standard" or "deep":** Continue to Step 4.
|
|
123
126
|
|
|
124
|
-
|
|
125
|
-
| Citation | Approach | Relevance |
|
|
126
|
-
|----------|----------|-----------|
|
|
127
|
+
## 4. Spawn wtfp-research-synthesizer Agent (standard/deep)
|
|
127
128
|
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
```
|
|
130
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
131
|
+
WTF-P ► RESEARCHING SECTION {X} (depth: {DEPTH})
|
|
132
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
133
|
+
```
|
|
130
134
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
-
|
|
135
|
+
```
|
|
136
|
+
Task(
|
|
137
|
+
prompt="First, read ~/.claude/agents/wtfp/research-synthesizer.md for your role and instructions.\n\n" + filled_research_prompt,
|
|
138
|
+
subagent_type="general-purpose",
|
|
139
|
+
model="{researcher_model}",
|
|
140
|
+
description="Research Section {X}"
|
|
141
|
+
)
|
|
142
|
+
```
|
|
134
143
|
|
|
135
|
-
|
|
136
|
-
[What's generally agreed upon]
|
|
144
|
+
Research prompt includes: `<research_scope>` with user-selected scope, `<project_context>` with PROJECT + ROADMAP + argument-map, `<existing_literature>` with bib index and literature.md, `<user_decisions>` with CONTEXT_CONTENT, `<output>` with target RESEARCH.md path, `<depth>` with current depth setting.
|
|
137
145
|
|
|
138
|
-
|
|
139
|
-
[Where experts disagree]
|
|
146
|
+
**Depth-specific instructions in prompt:**
|
|
140
147
|
|
|
141
|
-
|
|
142
|
-
-
|
|
143
|
-
- [Gap 2]: [your opportunity]
|
|
148
|
+
**If DEPTH is "standard":**
|
|
149
|
+
Add `<depth_instruction>Target 10-20 relevant sources across categories. Focus on most impactful papers for each category.</depth_instruction>`
|
|
144
150
|
|
|
145
|
-
|
|
146
|
-
|
|
151
|
+
**If DEPTH is "deep":**
|
|
152
|
+
Add `<depth_instruction>Perform exhaustive literature review. Target 20-50 papers across all categories. Include systematic field mapping: major research groups, funding bodies, key venues, citation networks. Map the intellectual lineage of the field. Identify ALL competing approaches, not just the main ones. Document methodology variations comprehensively. All 5 categories (foundational, recent, competing, gap, methods) are REQUIRED, not optional.</depth_instruction>`
|
|
147
153
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
- Level of detail expected: [...]
|
|
151
|
-
- Citations to definitely include: [...]
|
|
152
|
-
- Arguments to make: [...]
|
|
154
|
+
**Source priority hierarchy (all depths):**
|
|
155
|
+
Add `<source_priority>Source priority: Context7 MCP first (if available), official sources/databases second (Google Scholar, PubMed, IEEE, ACL, arXiv), WebSearch last.</source_priority>`
|
|
153
156
|
|
|
154
|
-
##
|
|
155
|
-
- [Source 1]
|
|
156
|
-
- [Source 2]
|
|
157
|
+
## 5. Handle Researcher Return
|
|
157
158
|
|
|
158
|
-
|
|
159
|
-
- Key citations: [high/medium/low]
|
|
160
|
-
- Field understanding: [high/medium/low]
|
|
161
|
-
- Gap identification: [high/medium/low]
|
|
159
|
+
**`## RESEARCH COMPLETE`:** Present findings summary.
|
|
162
160
|
|
|
163
|
-
|
|
164
|
-
- [Questions that need user input]
|
|
161
|
+
**`## RESEARCH BLOCKED`:** Show blocker, offer alternatives.
|
|
165
162
|
|
|
166
|
-
|
|
167
|
-
*Researched: [date]*
|
|
168
|
-
```
|
|
163
|
+
## 6. Present Results
|
|
169
164
|
|
|
170
|
-
</
|
|
165
|
+
</process>
|
|
171
166
|
|
|
172
|
-
<
|
|
173
|
-
**Update literature index:**
|
|
167
|
+
<offer_next>
|
|
174
168
|
|
|
175
|
-
|
|
169
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
170
|
+
WTF-P ► RESEARCH COMPLETE ✓
|
|
171
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
176
172
|
|
|
177
|
-
|
|
173
|
+
Depth: {DEPTH}
|
|
174
|
+
Citations found: {N}
|
|
175
|
+
Confidence: {level}
|
|
178
176
|
|
|
179
|
-
|
|
180
|
-
```bash
|
|
181
|
-
git add .planning/sections/XX-name/XX-RESEARCH.md .planning/sources/literature.md
|
|
182
|
-
git commit -m "$(cat <<'EOF'
|
|
183
|
-
research(XX): [section name] literature review
|
|
184
|
-
|
|
185
|
-
Scope: [scope]
|
|
186
|
-
Citations found: [N]
|
|
187
|
-
Confidence: [level]
|
|
188
|
-
EOF
|
|
189
|
-
)"
|
|
190
|
-
```
|
|
177
|
+
───────────────────────────────────────────
|
|
191
178
|
|
|
192
|
-
|
|
179
|
+
## ▶ Next Up
|
|
193
180
|
|
|
194
|
-
|
|
195
|
-
**Present completion:**
|
|
181
|
+
**Plan section** — create writing plan with research context
|
|
196
182
|
|
|
197
|
-
|
|
198
|
-
Research complete:
|
|
183
|
+
`/wtfp:plan-section {section}`
|
|
199
184
|
|
|
200
|
-
|
|
201
|
-
- Citations added: [N] new references
|
|
202
|
-
- Confidence: [level]
|
|
185
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
203
186
|
|
|
204
|
-
|
|
205
|
-
[2-3 bullet summary]
|
|
187
|
+
───────────────────────────────────────────
|
|
206
188
|
|
|
207
|
-
|
|
208
|
-
[Based on research]
|
|
189
|
+
</offer_next>
|
|
209
190
|
|
|
210
|
-
|
|
191
|
+
<offer_next_quick>
|
|
192
|
+
|
|
193
|
+
**For quick depth only (no RESEARCH.md written):**
|
|
194
|
+
|
|
195
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
196
|
+
WTF-P ► QUICK RESEARCH COMPLETE
|
|
197
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
198
|
+
|
|
199
|
+
Quick research -- no RESEARCH.md written. Run with `--depth=standard` for persistent research.
|
|
200
|
+
|
|
201
|
+
───────────────────────────────────────────
|
|
211
202
|
|
|
212
203
|
## ▶ Next Up
|
|
213
204
|
|
|
214
|
-
**Plan section** —
|
|
205
|
+
**Plan section** — proceed without literature doc
|
|
215
206
|
|
|
216
|
-
`/wtfp:plan-section
|
|
207
|
+
`/wtfp:plan-section {section}`
|
|
217
208
|
|
|
218
|
-
|
|
209
|
+
**Or deepen research:**
|
|
219
210
|
|
|
220
|
-
|
|
221
|
-
```
|
|
211
|
+
`/wtfp:research-gap {section} --depth=standard`
|
|
222
212
|
|
|
223
|
-
|
|
213
|
+
───────────────────────────────────────────
|
|
224
214
|
|
|
225
|
-
</
|
|
215
|
+
</offer_next_quick>
|
|
226
216
|
|
|
227
217
|
<success_criteria>
|
|
228
218
|
- [ ] Research scope defined with user
|
|
229
|
-
- [ ]
|
|
230
|
-
- [ ]
|
|
231
|
-
- [ ]
|
|
232
|
-
- [ ] Writing recommendations provided
|
|
233
|
-
- [ ] literature.md updated
|
|
234
|
-
- [ ] All committed to git
|
|
219
|
+
- [ ] Research-synthesizer spawned with full context
|
|
220
|
+
- [ ] RESEARCH.md created with key citations and gaps
|
|
221
|
+
- [ ] User knows next steps
|
|
235
222
|
</success_criteria>
|