wtf-p 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +146 -226
- package/bin/commands/doctor.js +88 -2
- package/bin/commands/install-logic.js +121 -26
- package/bin/commands/status.js +22 -4
- package/bin/commands/update.js +5 -4
- package/bin/install.js +66 -26
- package/bin/lib/checkpoint.js +183 -0
- package/bin/lib/context-primer.js +214 -0
- package/bin/lib/manifest.js +62 -2
- 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 +1 -1
- package/vendors/claude/agents/wtfp/citation-formatter.md +1 -1
- 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 +58 -236
- package/vendors/claude/commands/wtfp/audit-milestone.md +286 -0
- package/vendors/claude/commands/wtfp/check-refs.md +60 -133
- 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 +85 -320
- 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 -150
- 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/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
- package/vendors/claude/agents/wtfp/citation-retriever.md +0 -31
|
@@ -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,234 +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
|
-
- **Foundational:** Use `node ~/.claude/bin/citation-fetcher.js "[topic]" --intent=seminal` to find high-impact papers.
|
|
77
|
-
- **Recent:** Use `node ~/.claude/bin/citation-fetcher.js "[topic]" --intent=recent --year=2023-2026` to find state-of-the-art.
|
|
78
|
-
- **Validation:** Use `node ~/.claude/bin/citation-fetcher.js "query"` to verify specific papers.
|
|
96
|
+
**If DEPTH is "quick":**
|
|
79
97
|
|
|
80
|
-
|
|
81
|
-
- How do others structure similar sections?
|
|
82
|
-
- What's the typical argument flow?
|
|
83
|
-
- What evidence is typically presented?
|
|
98
|
+
Skip agent spawn entirely. Orchestrator provides direct verbal synthesis.
|
|
84
99
|
|
|
85
|
-
|
|
86
|
-
- What's missing in current literature?
|
|
87
|
-
- Where does your work fit?
|
|
88
|
-
- What questions remain unanswered?
|
|
100
|
+
Read available context (PROJECT.md, argument-map, existing literature, CONTEXT_CONTENT) and synthesize a verbal summary directly to user:
|
|
89
101
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
-
|
|
93
|
-
|
|
102
|
+
```
|
|
103
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
104
|
+
WTF-P ► QUICK RESEARCH SYNTHESIS
|
|
105
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
94
106
|
|
|
95
|
-
|
|
107
|
+
Based on available context for Section {X}:
|
|
96
108
|
|
|
97
|
-
|
|
98
|
-
**Create RESEARCH.md:**
|
|
109
|
+
[Synthesize key points from PROJECT, argument-map, and any existing literature.md]
|
|
99
110
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
scope: [research scope]
|
|
104
|
-
confidence: [high/medium/low]
|
|
105
|
-
---
|
|
111
|
+
Key areas:
|
|
112
|
+
- [Area 1]: [Brief synthesis]
|
|
113
|
+
- [Area 2]: [Brief synthesis]
|
|
106
114
|
|
|
107
|
-
|
|
115
|
+
Suggested citations to consider:
|
|
116
|
+
- [If any mentioned in existing sources]
|
|
108
117
|
|
|
109
|
-
|
|
110
|
-
[2-3 sentence overview of findings]
|
|
118
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
111
119
|
|
|
112
|
-
|
|
120
|
+
**Note:** Quick research -- no RESEARCH.md written. Run with `--depth=standard` for persistent research.
|
|
121
|
+
```
|
|
113
122
|
|
|
114
|
-
|
|
115
|
-
| Citation | Contribution | Relevance |
|
|
116
|
-
|----------|--------------|-----------|
|
|
117
|
-
| [Author (Year)] | [What they established] | [Why cite] |
|
|
123
|
+
No RESEARCH.md created. No git commit. Present summary and offer next steps, then exit workflow.
|
|
118
124
|
|
|
119
|
-
|
|
120
|
-
| Citation | Contribution | Relevance |
|
|
121
|
-
|----------|--------------|-----------|
|
|
125
|
+
**If DEPTH is "standard" or "deep":** Continue to Step 4.
|
|
122
126
|
|
|
123
|
-
|
|
124
|
-
| Citation | Approach | Relevance |
|
|
125
|
-
|----------|----------|-----------|
|
|
127
|
+
## 4. Spawn wtfp-research-synthesizer Agent (standard/deep)
|
|
126
128
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
+
```
|
|
130
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
131
|
+
WTF-P ► RESEARCHING SECTION {X} (depth: {DEPTH})
|
|
132
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
133
|
+
```
|
|
129
134
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
-
|
|
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
|
+
```
|
|
133
143
|
|
|
134
|
-
|
|
135
|
-
[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.
|
|
136
145
|
|
|
137
|
-
|
|
138
|
-
[Where experts disagree]
|
|
146
|
+
**Depth-specific instructions in prompt:**
|
|
139
147
|
|
|
140
|
-
|
|
141
|
-
-
|
|
142
|
-
- [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>`
|
|
143
150
|
|
|
144
|
-
|
|
145
|
-
|
|
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>`
|
|
146
153
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
- Level of detail expected: [...]
|
|
150
|
-
- Citations to definitely include: [...]
|
|
151
|
-
- 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>`
|
|
152
156
|
|
|
153
|
-
##
|
|
154
|
-
- [Source 1]
|
|
155
|
-
- [Source 2]
|
|
157
|
+
## 5. Handle Researcher Return
|
|
156
158
|
|
|
157
|
-
|
|
158
|
-
- Key citations: [high/medium/low]
|
|
159
|
-
- Field understanding: [high/medium/low]
|
|
160
|
-
- Gap identification: [high/medium/low]
|
|
159
|
+
**`## RESEARCH COMPLETE`:** Present findings summary.
|
|
161
160
|
|
|
162
|
-
|
|
163
|
-
- [Questions that need user input]
|
|
161
|
+
**`## RESEARCH BLOCKED`:** Show blocker, offer alternatives.
|
|
164
162
|
|
|
165
|
-
|
|
166
|
-
*Researched: [date]*
|
|
167
|
-
```
|
|
163
|
+
## 6. Present Results
|
|
168
164
|
|
|
169
|
-
</
|
|
165
|
+
</process>
|
|
170
166
|
|
|
171
|
-
<
|
|
172
|
-
**Update literature index:**
|
|
167
|
+
<offer_next>
|
|
173
168
|
|
|
174
|
-
|
|
169
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
170
|
+
WTF-P ► RESEARCH COMPLETE ✓
|
|
171
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
175
172
|
|
|
176
|
-
|
|
173
|
+
Depth: {DEPTH}
|
|
174
|
+
Citations found: {N}
|
|
175
|
+
Confidence: {level}
|
|
177
176
|
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
git add .planning/sections/XX-name/XX-RESEARCH.md .planning/sources/literature.md
|
|
181
|
-
git commit -m "$(cat <<'EOF'
|
|
182
|
-
research(XX): [section name] literature review
|
|
183
|
-
|
|
184
|
-
Scope: [scope]
|
|
185
|
-
Citations found: [N]
|
|
186
|
-
Confidence: [level]
|
|
187
|
-
EOF
|
|
188
|
-
)"
|
|
189
|
-
```
|
|
177
|
+
───────────────────────────────────────────
|
|
190
178
|
|
|
191
|
-
|
|
179
|
+
## ▶ Next Up
|
|
192
180
|
|
|
193
|
-
|
|
194
|
-
**Present completion:**
|
|
181
|
+
**Plan section** — create writing plan with research context
|
|
195
182
|
|
|
196
|
-
|
|
197
|
-
Research complete:
|
|
183
|
+
`/wtfp:plan-section {section}`
|
|
198
184
|
|
|
199
|
-
|
|
200
|
-
- Citations added: [N] new references
|
|
201
|
-
- Confidence: [level]
|
|
185
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
202
186
|
|
|
203
|
-
|
|
204
|
-
[2-3 bullet summary]
|
|
187
|
+
───────────────────────────────────────────
|
|
205
188
|
|
|
206
|
-
|
|
207
|
-
[Based on research]
|
|
189
|
+
</offer_next>
|
|
208
190
|
|
|
209
|
-
|
|
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
|
+
───────────────────────────────────────────
|
|
210
202
|
|
|
211
203
|
## ▶ Next Up
|
|
212
204
|
|
|
213
|
-
**Plan section** —
|
|
205
|
+
**Plan section** — proceed without literature doc
|
|
214
206
|
|
|
215
|
-
`/wtfp:plan-section
|
|
207
|
+
`/wtfp:plan-section {section}`
|
|
216
208
|
|
|
217
|
-
|
|
209
|
+
**Or deepen research:**
|
|
218
210
|
|
|
219
|
-
|
|
220
|
-
```
|
|
211
|
+
`/wtfp:research-gap {section} --depth=standard`
|
|
221
212
|
|
|
222
|
-
|
|
213
|
+
───────────────────────────────────────────
|
|
223
214
|
|
|
224
|
-
</
|
|
215
|
+
</offer_next_quick>
|
|
225
216
|
|
|
226
217
|
<success_criteria>
|
|
227
218
|
- [ ] Research scope defined with user
|
|
228
|
-
- [ ]
|
|
229
|
-
- [ ]
|
|
230
|
-
- [ ]
|
|
231
|
-
- [ ] Writing recommendations provided
|
|
232
|
-
- [ ] literature.md updated
|
|
233
|
-
- [ ] 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
|
|
234
222
|
</success_criteria>
|