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,249 @@
|
|
|
1
|
+
description = "Create fix plans for gaps found by audit-milestone"
|
|
2
|
+
|
|
3
|
+
prompt = '''
|
|
4
|
+
<objective>
|
|
5
|
+
Read MILESTONE-AUDIT.md and create targeted fix plans for each gap.
|
|
6
|
+
|
|
7
|
+
Each gap becomes a fix plan in the appropriate section directory.
|
|
8
|
+
Plans follow the standard plan-format.md structure.
|
|
9
|
+
User can execute fix plans with existing writing commands.
|
|
10
|
+
</objective>
|
|
11
|
+
|
|
12
|
+
<process>
|
|
13
|
+
|
|
14
|
+
<step name="validate">
|
|
15
|
+
**Step 1: Validate Audit Exists**
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
[ ! -f .planning/MILESTONE-AUDIT.md ] && echo "ERROR: No MILESTONE-AUDIT.md found. Run /wtfp:audit-milestone first." && exit 1
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
</step>
|
|
22
|
+
|
|
23
|
+
<step name="banner">
|
|
24
|
+
**Step 2: Display Banner**
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
28
|
+
WTF-P ► PLANNING GAP FIXES
|
|
29
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
30
|
+
|
|
31
|
+
Reading MILESTONE-AUDIT.md...
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
</step>
|
|
35
|
+
|
|
36
|
+
<step name="parse_audit">
|
|
37
|
+
**Step 3: Parse MILESTONE-AUDIT.md**
|
|
38
|
+
|
|
39
|
+
Read `.planning/MILESTONE-AUDIT.md`.
|
|
40
|
+
|
|
41
|
+
Extract all gaps (sections under "## Gaps" with "Status: gap"):
|
|
42
|
+
- Gap name (check name)
|
|
43
|
+
- Finding (what's missing)
|
|
44
|
+
- Affected (sections/claims/files)
|
|
45
|
+
- Recommendation (what to do)
|
|
46
|
+
|
|
47
|
+
If no gaps found (Overall: PASS):
|
|
48
|
+
```
|
|
49
|
+
No gaps found in audit. Paper is ready for submission.
|
|
50
|
+
Run /wtfp:submit-milestone {version} to archive.
|
|
51
|
+
```
|
|
52
|
+
Exit early.
|
|
53
|
+
|
|
54
|
+
</step>
|
|
55
|
+
|
|
56
|
+
<step name="classify_gaps">
|
|
57
|
+
**Step 4: Classify Gaps by Fix Type**
|
|
58
|
+
|
|
59
|
+
For each gap, determine fix type:
|
|
60
|
+
|
|
61
|
+
| Gap Type | Fix Type | Action |
|
|
62
|
+
|----------|----------|--------|
|
|
63
|
+
| Section incomplete | section-write | Generate writing plan for incomplete section |
|
|
64
|
+
| Argument not covered | targeted-write | Generate task to address specific claim in relevant section |
|
|
65
|
+
| Word count over | revision-trim | Generate revision task to reduce word count |
|
|
66
|
+
| Word count under | revision-expand | Generate revision task to expand content |
|
|
67
|
+
| Citation undefined | citation-fix | Generate task to add missing citation |
|
|
68
|
+
| Citation uncited | citation-fix | Generate task to cite or remove reference |
|
|
69
|
+
| Section unreviewed | review-route | Route to /wtfp:review-section |
|
|
70
|
+
|
|
71
|
+
</step>
|
|
72
|
+
|
|
73
|
+
<step name="group_gaps">
|
|
74
|
+
**Step 5: Group Related Gaps**
|
|
75
|
+
|
|
76
|
+
Group gaps that affect the same section:
|
|
77
|
+
- Multiple issues in Section 2 -> one fix plan for Section 2
|
|
78
|
+
- Word count + argument issues in same section -> combined plan
|
|
79
|
+
|
|
80
|
+
Create plan groupings:
|
|
81
|
+
```
|
|
82
|
+
PLAN_1: Section 02 - {word count issue, argument issue}
|
|
83
|
+
PLAN_2: Section 04 - {incomplete}
|
|
84
|
+
PLAN_3: Citations - {undefined citations across multiple sections}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
</step>
|
|
88
|
+
|
|
89
|
+
<step name="generate_plans">
|
|
90
|
+
**Step 6: Generate Fix Plans**
|
|
91
|
+
|
|
92
|
+
For each grouped plan, create a fix plan file.
|
|
93
|
+
|
|
94
|
+
**Location:** `.planning/sections/XX-name/{section}-fix-{N}-PLAN.md`
|
|
95
|
+
|
|
96
|
+
**Plan structure (following plan-format.md):**
|
|
97
|
+
|
|
98
|
+
```markdown
|
|
99
|
+
---
|
|
100
|
+
section: {section-number}
|
|
101
|
+
plan: fix-{N}
|
|
102
|
+
type: revision
|
|
103
|
+
depends_on: []
|
|
104
|
+
files_modified:
|
|
105
|
+
- {paper content file}
|
|
106
|
+
autonomous: true
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
<objective>
|
|
110
|
+
Fix {N} gap(s) identified in milestone audit:
|
|
111
|
+
- {gap 1 summary}
|
|
112
|
+
- {gap 2 summary}
|
|
113
|
+
|
|
114
|
+
Purpose: Address audit findings before submission.
|
|
115
|
+
</objective>
|
|
116
|
+
|
|
117
|
+
<context>
|
|
118
|
+
@.planning/MILESTONE-AUDIT.md
|
|
119
|
+
@.planning/sections/XX-name/{relevant summaries}
|
|
120
|
+
@{paper content file}
|
|
121
|
+
</context>
|
|
122
|
+
|
|
123
|
+
<tasks>
|
|
124
|
+
|
|
125
|
+
<task type="auto">
|
|
126
|
+
<name>{fix task name}</name>
|
|
127
|
+
<files>
|
|
128
|
+
{file to modify}
|
|
129
|
+
</files>
|
|
130
|
+
<action>
|
|
131
|
+
{Specific fix instructions based on gap type:}
|
|
132
|
+
|
|
133
|
+
**For section incomplete:**
|
|
134
|
+
Complete the section draft following the outline.
|
|
135
|
+
- Address all planned subsections
|
|
136
|
+
- Meet word target: {X} words
|
|
137
|
+
- Include required citations
|
|
138
|
+
|
|
139
|
+
**For argument not covered:**
|
|
140
|
+
Add content to address claim: "{claim}"
|
|
141
|
+
- Insert in section: {section}
|
|
142
|
+
- Location: {suggested location}
|
|
143
|
+
- Approximate addition: {X} words
|
|
144
|
+
|
|
145
|
+
**For word count over:**
|
|
146
|
+
Reduce word count in {section} by {N} words.
|
|
147
|
+
- Current: {X} words
|
|
148
|
+
- Target: {Y} words
|
|
149
|
+
- Suggested cuts: {areas}
|
|
150
|
+
|
|
151
|
+
**For word count under:**
|
|
152
|
+
Expand content in {section} by {N} words.
|
|
153
|
+
- Current: {X} words
|
|
154
|
+
- Target: {Y} words
|
|
155
|
+
- Suggested expansions: {areas}
|
|
156
|
+
|
|
157
|
+
**For citation undefined:**
|
|
158
|
+
Add citation for: {key}
|
|
159
|
+
- Add to bibliography file
|
|
160
|
+
- Verify citation format matches style guide
|
|
161
|
+
|
|
162
|
+
**For citation uncited:**
|
|
163
|
+
Either cite or remove: {key}
|
|
164
|
+
- If relevant: add citation in appropriate section
|
|
165
|
+
- If not relevant: remove from bibliography
|
|
166
|
+
</action>
|
|
167
|
+
<verify>
|
|
168
|
+
{Verification for fix type:}
|
|
169
|
+
|
|
170
|
+
For section: Word count meets target, all subsections complete.
|
|
171
|
+
For argument: Claim is now addressed in text.
|
|
172
|
+
For word count: Section is within +/- 15% of target.
|
|
173
|
+
For citation: Citation resolves correctly.
|
|
174
|
+
</verify>
|
|
175
|
+
<done>
|
|
176
|
+
{Done criteria: Gap resolved per audit check}
|
|
177
|
+
</done>
|
|
178
|
+
</task>
|
|
179
|
+
|
|
180
|
+
</tasks>
|
|
181
|
+
|
|
182
|
+
<verification>
|
|
183
|
+
- Gap addressed per MILESTONE-AUDIT.md finding
|
|
184
|
+
- No new issues introduced
|
|
185
|
+
</verification>
|
|
186
|
+
|
|
187
|
+
<success_criteria>
|
|
188
|
+
- [ ] {Gap 1} resolved
|
|
189
|
+
- [ ] {Gap 2} resolved
|
|
190
|
+
</success_criteria>
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**For unreviewed sections (review-route):**
|
|
194
|
+
|
|
195
|
+
Don't generate a fix plan. Instead, note:
|
|
196
|
+
```
|
|
197
|
+
Section {X} needs review. Run: /wtfp:review-section {section}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
</step>
|
|
201
|
+
|
|
202
|
+
<step name="summary">
|
|
203
|
+
**Step 7: Present Summary**
|
|
204
|
+
|
|
205
|
+
```
|
|
206
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
207
|
+
WTF-P ► GAP PLANS CREATED ✓
|
|
208
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
209
|
+
|
|
210
|
+
Plans created: {N}
|
|
211
|
+
|
|
212
|
+
| Plan | Section | Gaps Addressed |
|
|
213
|
+
|------|---------|----------------|
|
|
214
|
+
| {path} | {section} | {gap list} |
|
|
215
|
+
| {path} | {section} | {gap list} |
|
|
216
|
+
|
|
217
|
+
{If any review-route gaps:}
|
|
218
|
+
Sections needing review (no plan created):
|
|
219
|
+
- Section {X}: Run `/wtfp:review-section {section}`
|
|
220
|
+
|
|
221
|
+
───────────────────────────────────────────
|
|
222
|
+
|
|
223
|
+
## Next Up
|
|
224
|
+
|
|
225
|
+
Execute fix plans:
|
|
226
|
+
`/wtfp:write-section {path-to-fix-plan}`
|
|
227
|
+
|
|
228
|
+
Or fix one at a time:
|
|
229
|
+
Read the plan, then execute tasks manually
|
|
230
|
+
|
|
231
|
+
After all fixes:
|
|
232
|
+
`/wtfp:audit-milestone` - Re-run audit to verify
|
|
233
|
+
|
|
234
|
+
───────────────────────────────────────────
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
</step>
|
|
238
|
+
|
|
239
|
+
</process>
|
|
240
|
+
|
|
241
|
+
<success_criteria>
|
|
242
|
+
- [ ] MILESTONE-AUDIT.md parsed successfully
|
|
243
|
+
- [ ] Gaps classified by fix type
|
|
244
|
+
- [ ] Related gaps grouped by section
|
|
245
|
+
- [ ] Fix plans created for each gap group
|
|
246
|
+
- [ ] Plans follow plan-format.md structure
|
|
247
|
+
- [ ] User knows which plans to execute next
|
|
248
|
+
</success_criteria>
|
|
249
|
+
'''
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
description = "Create revision plan from review issues"
|
|
2
|
+
|
|
3
|
+
prompt = '''
|
|
4
|
+
<objective>
|
|
5
|
+
Create targeted revision plan from review issues.
|
|
6
|
+
|
|
7
|
+
Reads ISSUES.md and creates a REVISION.md plan to address identified problems.
|
|
8
|
+
|
|
9
|
+
Prioritizes blockers, then major issues, then minor issues.
|
|
10
|
+
</objective>
|
|
11
|
+
|
|
12
|
+
<execution_context>
|
|
13
|
+
@~/.config/gemini/write-the-f-paper/workflows/plan-section.md
|
|
14
|
+
@~/.config/gemini/write-the-f-paper/references/plan-format.md
|
|
15
|
+
</execution_context>
|
|
16
|
+
|
|
17
|
+
<process>
|
|
18
|
+
|
|
19
|
+
<step name="verify">
|
|
20
|
+
**Verify issues exist:**
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
ISSUES_FILE=".planning/sections/[section-dir]/{{args}}-ISSUES.md"
|
|
24
|
+
[ ! -f "$ISSUES_FILE" ] && echo "ERROR: No issues file found at $ISSUES_FILE" && exit 1
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
</step>
|
|
28
|
+
|
|
29
|
+
<step name="load">
|
|
30
|
+
**Load context:**
|
|
31
|
+
|
|
32
|
+
- Read the ISSUES.md file
|
|
33
|
+
- Read original PLAN.md for context
|
|
34
|
+
- Read SUMMARY.md for what was written
|
|
35
|
+
- Read the actual section content (paper/[section].md)
|
|
36
|
+
- Read PROJECT.md for requirements reference
|
|
37
|
+
</step>
|
|
38
|
+
|
|
39
|
+
<step name="triage">
|
|
40
|
+
**Triage issues:**
|
|
41
|
+
|
|
42
|
+
Group by severity:
|
|
43
|
+
- **Blockers:** Must fix before submission
|
|
44
|
+
- **Major:** Should fix, impacts quality
|
|
45
|
+
- **Minor:** Nice to fix if time allows
|
|
46
|
+
|
|
47
|
+
Use interactive prompting:
|
|
48
|
+
- header: "Revision Scope"
|
|
49
|
+
- question: "Which issues should we address?"
|
|
50
|
+
- options:
|
|
51
|
+
- "Blockers only" — Fix critical issues
|
|
52
|
+
- "Blockers + Major" — Fix important issues
|
|
53
|
+
- "All issues" — Comprehensive revision
|
|
54
|
+
- "Let me select" — I'll specify which
|
|
55
|
+
|
|
56
|
+
</step>
|
|
57
|
+
|
|
58
|
+
<step name="create_revision">
|
|
59
|
+
**Create REVISION.md:**
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
---
|
|
63
|
+
section: XX-name
|
|
64
|
+
plan: YY-REVISION
|
|
65
|
+
issues_addressed: [list of issue IDs]
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
<objective>
|
|
69
|
+
Address review issues from [section] verification.
|
|
70
|
+
|
|
71
|
+
Fixes: [N] issues ([blockers] blockers, [major] major, [minor] minor)
|
|
72
|
+
</objective>
|
|
73
|
+
|
|
74
|
+
<execution_context>
|
|
75
|
+
@~/.config/gemini/write-the-f-paper/workflows/execute-section.md
|
|
76
|
+
</execution_context>
|
|
77
|
+
|
|
78
|
+
<context>
|
|
79
|
+
@.planning/sections/XX-name/XX-YY-ISSUES.md
|
|
80
|
+
@.planning/sections/XX-name/XX-YY-SUMMARY.md
|
|
81
|
+
@paper/[section].md
|
|
82
|
+
</context>
|
|
83
|
+
|
|
84
|
+
<tasks>
|
|
85
|
+
|
|
86
|
+
<task type="auto">
|
|
87
|
+
<name>Fix [ISSUE-ID]: [description]</name>
|
|
88
|
+
<issue>[Full issue description]</issue>
|
|
89
|
+
<location>[Where in document]</location>
|
|
90
|
+
<action>
|
|
91
|
+
[Specific fix instructions]
|
|
92
|
+
</action>
|
|
93
|
+
<verify>
|
|
94
|
+
- [ ] Issue resolved
|
|
95
|
+
- [ ] No new issues introduced
|
|
96
|
+
</verify>
|
|
97
|
+
</task>
|
|
98
|
+
|
|
99
|
+
[... task per issue ...]
|
|
100
|
+
|
|
101
|
+
</tasks>
|
|
102
|
+
|
|
103
|
+
<verification>
|
|
104
|
+
- [ ] All addressed issues resolved
|
|
105
|
+
- [ ] No regression in other checks
|
|
106
|
+
- [ ] Word count still within target
|
|
107
|
+
</verification>
|
|
108
|
+
|
|
109
|
+
<success_criteria>
|
|
110
|
+
- [ ] [N] issues fixed
|
|
111
|
+
- [ ] Section passes re-verification
|
|
112
|
+
</success_criteria>
|
|
113
|
+
|
|
114
|
+
- Updated paper/[section].md
|
|
115
|
+
- REVISION-SUMMARY.md
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
</step>
|
|
119
|
+
|
|
120
|
+
<step name="commit">
|
|
121
|
+
```bash
|
|
122
|
+
git add .planning/sections/XX-name/XX-YY-REVISION.md
|
|
123
|
+
git commit -m "$(cat <<'EOF'
|
|
124
|
+
plan(XX-YY): revision plan
|
|
125
|
+
|
|
126
|
+
Addresses: [N] issues
|
|
127
|
+
Scope: [blockers/major/all]
|
|
128
|
+
EOF
|
|
129
|
+
)"
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
</step>
|
|
133
|
+
|
|
134
|
+
<step name="done">
|
|
135
|
+
**Present completion:**
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
Revision plan created:
|
|
139
|
+
|
|
140
|
+
- Plan: .planning/sections/XX-name/XX-YY-REVISION.md
|
|
141
|
+
- Issues addressed: [N]
|
|
142
|
+
- Scope: [blockers/major/all]
|
|
143
|
+
|
|
144
|
+
## Issues to Fix
|
|
145
|
+
[List of issues]
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## ▶ Next Up
|
|
150
|
+
|
|
151
|
+
**Execute revision** — apply fixes
|
|
152
|
+
|
|
153
|
+
`/wtfp:write-section .planning/sections/XX-name/XX-YY-REVISION.md`
|
|
154
|
+
|
|
155
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
</step>
|
|
161
|
+
|
|
162
|
+
</process>
|
|
163
|
+
|
|
164
|
+
<success_criteria>
|
|
165
|
+
- [ ] Issues triaged by severity
|
|
166
|
+
- [ ] User selected scope
|
|
167
|
+
- [ ] REVISION.md created with specific fixes
|
|
168
|
+
- [ ] Each issue has a targeted task
|
|
169
|
+
- [ ] Clear verification criteria
|
|
170
|
+
</success_criteria>
|
|
171
|
+
'''
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
description = "Create detailed writing plan for a section"
|
|
2
|
+
|
|
3
|
+
prompt = '''
|
|
4
|
+
<execution_context>
|
|
5
|
+
@~/.config/gemini/write-the-f-paper/references/plan-format.md
|
|
6
|
+
@~/.config/gemini/write-the-f-paper/references/length-estimation.md
|
|
7
|
+
</execution_context>
|
|
8
|
+
|
|
9
|
+
<objective>
|
|
10
|
+
Create executable writing plan with context injection and task breakdown.
|
|
11
|
+
|
|
12
|
+
**Orchestrator role:** Parse arguments, validate section, load context, resolve model profile, spawn section-planner agent, optionally verify plans with plan-checker, iterate until plans pass, present results.
|
|
13
|
+
|
|
14
|
+
**Why subagents:** Planning and verification burn context fast. Fresh agents get peak quality. User sees flow between agents in main context.
|
|
15
|
+
</objective>
|
|
16
|
+
|
|
17
|
+
<context>
|
|
18
|
+
Section number: {{args}} (optional - auto-detects next unplanned section if not provided)
|
|
19
|
+
</context>
|
|
20
|
+
|
|
21
|
+
<process>
|
|
22
|
+
|
|
23
|
+
## 1. Validate Environment and Resolve Model Profile
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
ls .planning/ 2>/dev/null
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**If not found:** Error - user should run `/wtfp:new-paper` first.
|
|
30
|
+
|
|
31
|
+
**Resolve model profile:**
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Model lookup table:**
|
|
38
|
+
|
|
39
|
+
| Agent | quality | balanced | budget |
|
|
40
|
+
|-------|---------|----------|--------|
|
|
41
|
+
| section-planner | opus | opus | sonnet |
|
|
42
|
+
| plan-checker | sonnet | sonnet | haiku |
|
|
43
|
+
|
|
44
|
+
**Resolve gate flag:**
|
|
45
|
+
```bash
|
|
46
|
+
# Gate: confirm_plan — skip confirmation if false
|
|
47
|
+
GATE_CONFIRM_PLAN=$(cat .planning/config.json 2>/dev/null | grep -o '"confirm_plan"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 1b. Git Branch Setup
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
BRANCH_STRATEGY=$(cat .planning/config.json 2>/dev/null | grep -o '"branching_strategy"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "none")
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**If branching_strategy = "section":**
|
|
57
|
+
|
|
58
|
+
1. Read section_branch_template from config (default: `wtfp/section-{section}-{slug}`)
|
|
59
|
+
2. Replace `{section}` with zero-padded section number (e.g., `01`, `02`)
|
|
60
|
+
3. Replace `{slug}` with slugified section name (lowercase, hyphens)
|
|
61
|
+
4. Store current branch as base branch for later merge:
|
|
62
|
+
```bash
|
|
63
|
+
BASE_BRANCH=$(git branch --show-current 2>/dev/null || echo "main")
|
|
64
|
+
echo "$BASE_BRANCH" > .planning/.section_base_branch
|
|
65
|
+
```
|
|
66
|
+
5. Create and checkout section branch:
|
|
67
|
+
```bash
|
|
68
|
+
SECTION_BRANCH_TEMPLATE=$(cat .planning/config.json 2>/dev/null | grep -o '"section_branch_template"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "wtfp/section-{section}-{slug}")
|
|
69
|
+
BRANCH_NAME=$(echo "$SECTION_BRANCH_TEMPLATE" | sed "s/{section}/${SECTION_NUM}/" | sed "s/{slug}/${SECTION_SLUG}/")
|
|
70
|
+
git checkout -b "$BRANCH_NAME"
|
|
71
|
+
```
|
|
72
|
+
6. Log: "Created section branch: $BRANCH_NAME"
|
|
73
|
+
|
|
74
|
+
**If branching_strategy = "none" or "submission":** No branch action in plan-section.
|
|
75
|
+
|
|
76
|
+
## 2. Parse and Normalize Arguments
|
|
77
|
+
|
|
78
|
+
Extract section number from {{args}}. If no section number, detect next unplanned section from roadmap.
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
ls .planning/sections/*/ 2>/dev/null | head -10
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## 3. Validate Section
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
grep -A5 "Section" .planning/ROADMAP.md 2>/dev/null
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Extract section number, name, description.
|
|
91
|
+
|
|
92
|
+
## 4. Ensure Section Directory and Load CONTEXT.md
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
SECTION_DIR=$(ls -d .planning/sections/${SECTION}-* 2>/dev/null | head -1)
|
|
96
|
+
CONTEXT_CONTENT=$(cat "${SECTION_DIR}"/*-CONTEXT.md 2>/dev/null)
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**CRITICAL:** Store CONTEXT_CONTENT now. Pass to ALL downstream agents.
|
|
100
|
+
|
|
101
|
+
## 5. Read Context Files
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
STATE_CONTENT=$(cat .planning/STATE.md)
|
|
105
|
+
ROADMAP_CONTENT=$(cat .planning/ROADMAP.md)
|
|
106
|
+
PROJECT_CONTENT=$(cat .planning/PROJECT.md)
|
|
107
|
+
ARGMAP_CONTENT=$(cat .planning/structure/argument-map.md 2>/dev/null)
|
|
108
|
+
OUTLINE_CONTENT=$(cat .planning/structure/outline.md 2>/dev/null)
|
|
109
|
+
RESEARCH_CONTENT=$(cat "${SECTION_DIR}"/*-RESEARCH.md 2>/dev/null)
|
|
110
|
+
PRIOR_SUMMARIES=$(cat .planning/sections/*/SUMMARY.md 2>/dev/null | head -200)
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
If RESEARCH.md missing for a literature-heavy section, suggest `/wtfp:research-gap` first.
|
|
114
|
+
|
|
115
|
+
## 6. Gate Check: Confirm Before Planning
|
|
116
|
+
|
|
117
|
+
**If GATE_CONFIRM_PLAN is "true" (default):**
|
|
118
|
+
Present section context summary to user via interactive prompting and wait for confirmation before proceeding.
|
|
119
|
+
|
|
120
|
+
**If GATE_CONFIRM_PLAN is "false":**
|
|
121
|
+
Skip confirmation and proceed directly to planning.
|
|
122
|
+
|
|
123
|
+
## 7. Spawn wtfp-section-planner Agent
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
127
|
+
WTF-P ► PLANNING SECTION {X}
|
|
128
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Fill prompt with inlined content and spawn:
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
Task(
|
|
135
|
+
prompt="First, read ~/.config/gemini/agents/wtfp/section-planner.md for your role and instructions.\n\n" + filled_planning_prompt,
|
|
136
|
+
subagent_type="general-purpose",
|
|
137
|
+
model="{planner_model}",
|
|
138
|
+
description="Plan Section {X}"
|
|
139
|
+
)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Planning prompt includes: `<planning_context>` with STATE, ROADMAP, PROJECT, argument-map, outline, RESEARCH, prior summaries. `<user_decisions>` with CONTEXT_CONTENT. `<output>` with target directory path.
|
|
143
|
+
|
|
144
|
+
## 8. Handle Planner Return
|
|
145
|
+
|
|
146
|
+
**`## PLANNING COMPLETE`:** Display plan count, proceed to verification check.
|
|
147
|
+
|
|
148
|
+
**`## CHECKPOINT REACHED`:** Present to user, get response.
|
|
149
|
+
|
|
150
|
+
**`## PLANNING INCONCLUSIVE`:** Show what was attempted, offer options.
|
|
151
|
+
|
|
152
|
+
## 8. Plan-Check-Revise Loop (if enabled)
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
WORKFLOW_PLAN_CHECK=$(cat .planning/config.json 2>/dev/null | grep -o '"plan_check"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**If plan_check is true:**
|
|
159
|
+
|
|
160
|
+
Read plans for checker:
|
|
161
|
+
```bash
|
|
162
|
+
PLANS_CONTENT=$(cat "${SECTION_DIR}"/*-PLAN.md 2>/dev/null)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Spawn `wtfp-plan-checker` with plans + ROADMAP + argument-map + CONTEXT.
|
|
166
|
+
|
|
167
|
+
**If VERIFICATION PASSED:** Proceed to done.
|
|
168
|
+
|
|
169
|
+
**If ISSUES FOUND and iteration < 3:** Spawn planner in revision mode with issues. Re-check. Increment iteration.
|
|
170
|
+
|
|
171
|
+
**If iteration >= 3:** Present remaining issues to user with options: force proceed, provide guidance, abandon.
|
|
172
|
+
|
|
173
|
+
## 9. Present Final Status
|
|
174
|
+
|
|
175
|
+
</process>
|
|
176
|
+
|
|
177
|
+
<offer_next>
|
|
178
|
+
|
|
179
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
180
|
+
WTF-P ► SECTION {X} PLANNED ✓
|
|
181
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
182
|
+
|
|
183
|
+
**Section {X}: {Name}** — {N} plan(s), {W} words target
|
|
184
|
+
|
|
185
|
+
Verification: {Passed | Passed with override | Skipped}
|
|
186
|
+
|
|
187
|
+
───────────────────────────────────────────
|
|
188
|
+
|
|
189
|
+
## ▶ Next Up
|
|
190
|
+
|
|
191
|
+
**Execute writing** — run the plan
|
|
192
|
+
|
|
193
|
+
`/wtfp:write-section .planning/sections/XX-name/XX-YY-PLAN.md`
|
|
194
|
+
|
|
195
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
196
|
+
|
|
197
|
+
───────────────────────────────────────────
|
|
198
|
+
|
|
199
|
+
</offer_next>
|
|
200
|
+
|
|
201
|
+
<success_criteria>
|
|
202
|
+
- [ ] .planning/ directory validated
|
|
203
|
+
- [ ] Section validated against roadmap
|
|
204
|
+
- [ ] CONTEXT.md loaded early and passed to ALL agents
|
|
205
|
+
- [ ] RESEARCH.md auto-loaded if exists
|
|
206
|
+
- [ ] Section-planner spawned with full context
|
|
207
|
+
- [ ] Plans created (PLANNING COMPLETE or CHECKPOINT handled)
|
|
208
|
+
- [ ] Plan-checker spawned (if workflow.plan_check enabled)
|
|
209
|
+
- [ ] Verification passed OR user override OR max iterations
|
|
210
|
+
- [ ] User knows next steps
|
|
211
|
+
</success_criteria>
|
|
212
|
+
'''
|