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.
Files changed (183) hide show
  1. package/README.md +146 -208
  2. package/bin/commands/doctor.js +88 -2
  3. package/bin/commands/install-logic.js +127 -36
  4. package/bin/commands/status.js +22 -4
  5. package/bin/commands/update.js +5 -4
  6. package/bin/install.js +66 -26
  7. package/bin/lib/analyze-impact.js +105 -0
  8. package/bin/lib/bib-format.js +161 -0
  9. package/bin/lib/bib-index.js +104 -0
  10. package/bin/lib/checkpoint.js +183 -0
  11. package/bin/lib/citation-fetcher.js +299 -0
  12. package/bin/lib/citation-ranker.js +133 -0
  13. package/bin/lib/context-primer.js +214 -0
  14. package/bin/lib/manifest.js +80 -2
  15. package/bin/lib/scholar-lookup.js +188 -0
  16. package/bin/lib/semantic-scholar.js +184 -0
  17. package/bin/lib/utils.js +22 -1
  18. package/bin/uninstall.js +270 -111
  19. package/core/write-the-f-paper/references/agent-model-matrix.md +62 -0
  20. package/core/write-the-f-paper/references/checkpoints.md +160 -9
  21. package/core/write-the-f-paper/references/context-fidelity.md +153 -0
  22. package/core/write-the-f-paper/references/deviation-rules.md +150 -0
  23. package/core/write-the-f-paper/references/git-integration.md +80 -0
  24. package/core/write-the-f-paper/references/orchestrator-pattern.md +167 -0
  25. package/core/write-the-f-paper/references/planning-config.md +135 -0
  26. package/core/write-the-f-paper/references/ui-brand.md +186 -0
  27. package/core/write-the-f-paper/templates/UAT.md +80 -0
  28. package/core/write-the-f-paper/templates/base-prefs.yaml +42 -0
  29. package/core/write-the-f-paper/templates/config.json +31 -5
  30. package/core/write-the-f-paper/workflows/create-outline.wcn.md +1 -1
  31. package/core/write-the-f-paper/workflows/execute-outline.md +163 -0
  32. package/core/write-the-f-paper/workflows/execute-outline.wcn.md +73 -0
  33. package/core/write-the-f-paper/workflows/execute-section.wcn.md +141 -169
  34. package/core/write-the-f-paper/workflows/plan-section.wcn.md +96 -103
  35. package/core/write-the-f-paper/workflows/research-gap.md +27 -3
  36. package/core/write-the-f-paper/workflows/research-gap.wcn.md +18 -1
  37. package/core/write-the-f-paper/workflows/verify-work.md +251 -0
  38. package/core/write-the-f-paper/workflows/verify-work.wcn.md +74 -0
  39. package/package.json +19 -7
  40. package/vendors/claude/.claude-plugin/plugin.json +2 -2
  41. package/vendors/claude/agents/wtfp/argument-verifier.md +189 -0
  42. package/vendors/claude/agents/wtfp/citation-expert.md +45 -0
  43. package/vendors/claude/agents/wtfp/citation-formatter.md +42 -0
  44. package/vendors/claude/agents/wtfp/coherence-checker.md +167 -0
  45. package/vendors/claude/agents/wtfp/outliner.md +259 -0
  46. package/vendors/claude/agents/wtfp/plan-checker.md +249 -0
  47. package/vendors/claude/agents/wtfp/prose-polisher.md +166 -0
  48. package/vendors/claude/agents/wtfp/research-synthesizer.md +215 -0
  49. package/vendors/claude/agents/wtfp/section-planner.md +364 -0
  50. package/vendors/claude/agents/wtfp/section-reviewer.md +182 -0
  51. package/vendors/claude/agents/wtfp/section-writer.md +312 -0
  52. package/vendors/claude/commands/wtfp/add-todo.md +108 -0
  53. package/vendors/claude/commands/wtfp/analyze-bib.md +60 -249
  54. package/vendors/claude/commands/wtfp/audit-milestone.md +286 -0
  55. package/vendors/claude/commands/wtfp/check-refs.md +60 -131
  56. package/vendors/claude/commands/wtfp/check-todos.md +152 -0
  57. package/vendors/claude/commands/wtfp/checkpoint.md +105 -0
  58. package/vendors/claude/commands/wtfp/contribute.md +1 -1
  59. package/vendors/claude/commands/wtfp/create-outline.md +109 -195
  60. package/vendors/claude/commands/wtfp/create-poster.md +1 -1
  61. package/vendors/claude/commands/wtfp/create-slides.md +1 -1
  62. package/vendors/claude/commands/wtfp/discuss-section.md +1 -1
  63. package/vendors/claude/commands/wtfp/execute-outline.md +257 -0
  64. package/vendors/claude/commands/wtfp/export-latex.md +1 -1
  65. package/vendors/claude/commands/wtfp/help.md +174 -280
  66. package/vendors/claude/commands/wtfp/insert-section.md +1 -1
  67. package/vendors/claude/commands/wtfp/list-assumptions.md +1 -1
  68. package/vendors/claude/commands/wtfp/map-project.md +35 -124
  69. package/vendors/claude/commands/wtfp/new-paper.md +88 -362
  70. package/vendors/claude/commands/wtfp/pause-writing.md +1 -1
  71. package/vendors/claude/commands/wtfp/plan-milestone-gaps.md +255 -0
  72. package/vendors/claude/commands/wtfp/plan-revision.md +1 -1
  73. package/vendors/claude/commands/wtfp/plan-section.md +165 -190
  74. package/vendors/claude/commands/wtfp/polish-prose.md +66 -118
  75. package/vendors/claude/commands/wtfp/progress.md +82 -254
  76. package/vendors/claude/commands/wtfp/quick.md +107 -0
  77. package/vendors/claude/commands/wtfp/remove-section.md +1 -1
  78. package/vendors/claude/commands/wtfp/report-bug.md +1 -1
  79. package/vendors/claude/commands/wtfp/request-feature.md +1 -1
  80. package/vendors/claude/commands/wtfp/research-gap.md +138 -151
  81. package/vendors/claude/commands/wtfp/resume-writing.md +1 -1
  82. package/vendors/claude/commands/wtfp/review-section.md +55 -333
  83. package/vendors/claude/commands/wtfp/settings.md +197 -0
  84. package/vendors/claude/commands/wtfp/submit-milestone.md +248 -99
  85. package/vendors/claude/commands/wtfp/update.md +112 -0
  86. package/vendors/claude/commands/wtfp/verify-work.md +254 -0
  87. package/vendors/claude/commands/wtfp/write-section.md +144 -180
  88. package/vendors/claude/mcp/research-server/package.json +13 -0
  89. package/vendors/claude/mcp/research-server/src/index.js +133 -0
  90. package/vendors/gemini/agents/wtfp/argument-verifier.md +184 -0
  91. package/vendors/gemini/agents/wtfp/citation-expert.md +41 -0
  92. package/vendors/gemini/agents/wtfp/citation-formatter.md +38 -0
  93. package/vendors/gemini/agents/wtfp/coherence-checker.md +162 -0
  94. package/vendors/gemini/agents/wtfp/outliner.md +252 -0
  95. package/vendors/gemini/agents/wtfp/plan-checker.md +244 -0
  96. package/vendors/gemini/agents/wtfp/prose-polisher.md +158 -0
  97. package/vendors/gemini/agents/wtfp/research-synthesizer.md +205 -0
  98. package/vendors/gemini/agents/wtfp/section-planner.md +355 -0
  99. package/vendors/gemini/agents/wtfp/section-reviewer.md +175 -0
  100. package/vendors/gemini/agents/wtfp/section-writer.md +304 -0
  101. package/vendors/gemini/commands/wtfp/add-todo.toml +102 -0
  102. package/vendors/gemini/commands/wtfp/analyze-bib.toml +126 -0
  103. package/vendors/gemini/commands/wtfp/audit-milestone.toml +278 -0
  104. package/vendors/gemini/commands/wtfp/check-refs.toml +123 -0
  105. package/vendors/gemini/commands/wtfp/check-todos.toml +145 -0
  106. package/vendors/gemini/commands/wtfp/checkpoint.toml +96 -0
  107. package/vendors/gemini/commands/wtfp/contribute.toml +269 -0
  108. package/vendors/gemini/commands/wtfp/create-outline.toml +180 -0
  109. package/vendors/gemini/commands/wtfp/create-poster.toml +36 -0
  110. package/vendors/gemini/commands/wtfp/create-slides.toml +35 -0
  111. package/vendors/gemini/commands/wtfp/discuss-section.toml +62 -0
  112. package/vendors/gemini/commands/wtfp/execute-outline.toml +247 -0
  113. package/vendors/gemini/commands/wtfp/export-latex.toml +209 -0
  114. package/vendors/gemini/commands/wtfp/help.toml +184 -0
  115. package/vendors/gemini/commands/wtfp/insert-section.toml +123 -0
  116. package/vendors/gemini/commands/wtfp/list-assumptions.toml +104 -0
  117. package/vendors/gemini/commands/wtfp/map-project.toml +99 -0
  118. package/vendors/gemini/commands/wtfp/new-paper.toml +160 -0
  119. package/vendors/gemini/commands/wtfp/pause-writing.toml +140 -0
  120. package/vendors/gemini/commands/wtfp/plan-milestone-gaps.toml +249 -0
  121. package/vendors/gemini/commands/wtfp/plan-revision.toml +171 -0
  122. package/vendors/gemini/commands/wtfp/plan-section.toml +212 -0
  123. package/vendors/gemini/commands/wtfp/polish-prose.toml +114 -0
  124. package/vendors/gemini/commands/wtfp/progress.toml +145 -0
  125. package/vendors/gemini/commands/wtfp/quick.toml +96 -0
  126. package/vendors/gemini/commands/wtfp/remove-section.toml +140 -0
  127. package/vendors/gemini/commands/wtfp/report-bug.toml +126 -0
  128. package/vendors/gemini/commands/wtfp/request-feature.toml +155 -0
  129. package/vendors/gemini/commands/wtfp/research-gap.toml +214 -0
  130. package/vendors/gemini/commands/wtfp/resume-writing.toml +136 -0
  131. package/vendors/gemini/commands/wtfp/review-section.toml +121 -0
  132. package/vendors/gemini/commands/wtfp/settings.toml +191 -0
  133. package/vendors/gemini/commands/wtfp/submit-milestone.toml +351 -0
  134. package/vendors/gemini/commands/wtfp/update.toml +107 -0
  135. package/vendors/gemini/commands/wtfp/verify-work.toml +245 -0
  136. package/vendors/gemini/commands/wtfp/write-section.toml +228 -0
  137. package/vendors/opencode/agents/wtfp/argument-verifier.md +184 -0
  138. package/vendors/opencode/agents/wtfp/citation-expert.md +41 -0
  139. package/vendors/opencode/agents/wtfp/citation-formatter.md +38 -0
  140. package/vendors/opencode/agents/wtfp/coherence-checker.md +162 -0
  141. package/vendors/opencode/agents/wtfp/outliner.md +252 -0
  142. package/vendors/opencode/agents/wtfp/plan-checker.md +244 -0
  143. package/vendors/opencode/agents/wtfp/prose-polisher.md +158 -0
  144. package/vendors/opencode/agents/wtfp/research-synthesizer.md +205 -0
  145. package/vendors/opencode/agents/wtfp/section-planner.md +355 -0
  146. package/vendors/opencode/agents/wtfp/section-reviewer.md +175 -0
  147. package/vendors/opencode/agents/wtfp/section-writer.md +304 -0
  148. package/vendors/opencode/commands/wtfp/add-todo.md +103 -0
  149. package/vendors/opencode/commands/wtfp/analyze-bib.md +127 -0
  150. package/vendors/opencode/commands/wtfp/audit-milestone.md +279 -0
  151. package/vendors/opencode/commands/wtfp/check-refs.md +124 -0
  152. package/vendors/opencode/commands/wtfp/check-todos.md +146 -0
  153. package/vendors/opencode/commands/wtfp/checkpoint.md +97 -0
  154. package/vendors/opencode/commands/wtfp/contribute.md +266 -0
  155. package/vendors/opencode/commands/wtfp/create-outline.md +181 -0
  156. package/vendors/opencode/commands/wtfp/create-poster.md +37 -0
  157. package/vendors/opencode/commands/wtfp/create-slides.md +36 -0
  158. package/vendors/opencode/commands/wtfp/discuss-section.md +63 -0
  159. package/vendors/opencode/commands/wtfp/execute-outline.md +248 -0
  160. package/vendors/opencode/commands/wtfp/export-latex.md +210 -0
  161. package/vendors/opencode/commands/wtfp/help.md +185 -0
  162. package/vendors/opencode/commands/wtfp/insert-section.md +124 -0
  163. package/vendors/opencode/commands/wtfp/list-assumptions.md +105 -0
  164. package/vendors/opencode/commands/wtfp/map-project.md +100 -0
  165. package/vendors/opencode/commands/wtfp/new-paper.md +161 -0
  166. package/vendors/opencode/commands/wtfp/pause-writing.md +141 -0
  167. package/vendors/opencode/commands/wtfp/plan-milestone-gaps.md +250 -0
  168. package/vendors/opencode/commands/wtfp/plan-revision.md +174 -0
  169. package/vendors/opencode/commands/wtfp/plan-section.md +214 -0
  170. package/vendors/opencode/commands/wtfp/polish-prose.md +115 -0
  171. package/vendors/opencode/commands/wtfp/progress.md +146 -0
  172. package/vendors/opencode/commands/wtfp/quick.md +97 -0
  173. package/vendors/opencode/commands/wtfp/remove-section.md +141 -0
  174. package/vendors/opencode/commands/wtfp/report-bug.md +127 -0
  175. package/vendors/opencode/commands/wtfp/request-feature.md +156 -0
  176. package/vendors/opencode/commands/wtfp/research-gap.md +215 -0
  177. package/vendors/opencode/commands/wtfp/resume-writing.md +137 -0
  178. package/vendors/opencode/commands/wtfp/review-section.md +123 -0
  179. package/vendors/opencode/commands/wtfp/settings.md +192 -0
  180. package/vendors/opencode/commands/wtfp/submit-milestone.md +352 -0
  181. package/vendors/opencode/commands/wtfp/update.md +108 -0
  182. package/vendors/opencode/commands/wtfp/verify-work.md +246 -0
  183. package/vendors/opencode/commands/wtfp/write-section.md +228 -0
@@ -0,0 +1,167 @@
1
+ # Thin Orchestrator Pattern
2
+
3
+ All refactored WTF-P commands follow this pattern. Orchestrators are lightweight routers — they validate, load context, resolve models, spawn agents, and handle returns. Heavy work lives in agents.
4
+
5
+ ## Why Thin Orchestrators
6
+
7
+ - **Fresh context**: Agents start with clean context windows, no orchestrator overhead
8
+ - **Peak quality**: Full context budget goes to the actual task, not workflow machinery
9
+ - **Independent verification**: Quality agents (plan-checker, argument-verifier) validate without seeing the generation process
10
+ - **Composability**: Same agent can serve multiple orchestrators
11
+
12
+ ## Command Frontmatter
13
+
14
+ ```yaml
15
+ ---
16
+ name: wtfp:[command-name]
17
+ description: [Brief description]
18
+ argument-hint: "[what user provides]"
19
+ allowed-tools:
20
+ - Read
21
+ - Bash
22
+ - Write
23
+ - Glob
24
+ - Grep
25
+ - Task
26
+ - AskUserQuestion
27
+ ---
28
+ ```
29
+
30
+ ## execution_context
31
+
32
+ References to workflow/reference/template files the orchestrator needs:
33
+
34
+ ```markdown
35
+ <execution_context>
36
+ @~/.claude/write-the-f-paper/workflows/[workflow].md
37
+ @~/.claude/write-the-f-paper/references/[reference].md
38
+ @~/.claude/write-the-f-paper/templates/[template].md
39
+ </execution_context>
40
+ ```
41
+
42
+ ## Objective Section
43
+
44
+ ```markdown
45
+ <objective>
46
+ [Clear statement of what this command does]
47
+
48
+ **Orchestrator role:** Validate → Load context → Resolve model profile → Spawn agent → Handle returns → Present results
49
+
50
+ **Why subagents:** [Rationale — typically context preservation and independent quality checks]
51
+ </objective>
52
+ ```
53
+
54
+ ## Process Structure
55
+
56
+ Every orchestrator follows these phases:
57
+
58
+ ### 1. Validate Environment and Resolve Model Profile
59
+
60
+ ```bash
61
+ ls .planning/ 2>/dev/null
62
+ MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | \
63
+ grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | \
64
+ grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
65
+ ```
66
+
67
+ Include per-command model lookup table (see agent-model-matrix.md).
68
+
69
+ ### 2. Load Context Files
70
+
71
+ ```bash
72
+ STATE_CONTENT=$(cat .planning/STATE.md)
73
+ PROJECT_CONTENT=$(cat .planning/PROJECT.md)
74
+ CONTEXT_CONTENT=$(cat "${SECTION_DIR}"/*-CONTEXT.md 2>/dev/null)
75
+ ```
76
+
77
+ CRITICAL: Store CONTEXT_CONTENT now. Pass to ALL downstream agents.
78
+
79
+ ### 3. Parse Arguments / Validate Section
80
+
81
+ Command-specific validation (section exists, plan exists, dependencies met).
82
+
83
+ ### 4. Spawn Primary Agent
84
+
85
+ ```
86
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
87
+ WTF-P ► [ACTION] SECTION {X}
88
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
89
+ ```
90
+
91
+ Build prompt with inlined content, then spawn:
92
+
93
+ ```
94
+ Task(
95
+ prompt="First, read ~/.claude/agents/wtfp/[agent].md for your role and instructions.\n\n" + filled_prompt,
96
+ subagent_type="general-purpose",
97
+ model="{resolved_model}",
98
+ description="[Action] Section {X}"
99
+ )
100
+ ```
101
+
102
+ The filled prompt includes:
103
+ - `<[context_type]>` with STATE, PROJECT, ROADMAP, structure docs, prior summaries
104
+ - `<user_decisions>` with CONTEXT_CONTENT from CONTEXT.md
105
+ - `<output>` with target file paths
106
+
107
+ ### 5. Handle Agent Return
108
+
109
+ Agents return structured headers that orchestrators parse:
110
+
111
+ | Return Header | Meaning | Orchestrator Action |
112
+ |--------------|---------|-------------------|
113
+ | `## [ACTION] COMPLETE` | Success | Proceed to quality agent or next step |
114
+ | `## CHECKPOINT REACHED` | Needs user input | Present to user, wait, resume |
115
+ | `## [ACTION] BLOCKED` | Cannot proceed | Present blocker, ask user |
116
+
117
+ ### 6. Spawn Quality Agent (if applicable)
118
+
119
+ Commands with quality loops spawn a second agent to verify:
120
+
121
+ | Command | Quality Agent | Checks |
122
+ |---------|--------------|--------|
123
+ | plan-section | plan-checker | 7 dimensions: argument, citation, word budget, outline, CONTEXT.md fidelity, style, task completeness |
124
+ | write-section | argument-verifier | Goal-backward: does output achieve section purpose? |
125
+
126
+ ### 7. Present Final Status
127
+
128
+ ```markdown
129
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
130
+ WTF-P ► [STATUS] ✓
131
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
132
+
133
+ [Summary]
134
+
135
+ ───────────────────────────────────────────
136
+
137
+ ## ▶ Next Up
138
+
139
+ **[Next action]** — [description]
140
+
141
+ `/wtfp:[next-command] [args]`
142
+
143
+ <sub>`/clear` first → fresh context window</sub>
144
+
145
+ ───────────────────────────────────────────
146
+ ```
147
+
148
+ ## Agent Prompt Construction
149
+
150
+ Orchestrators build agent prompts by inlining content, not referencing files:
151
+
152
+ ```
153
+ prompt = "First, read ~/.claude/agents/wtfp/{agent}.md for your role.\n\n"
154
+ + "<planning_context>\n" + STATE + PROJECT + ROADMAP + structure_docs + "\n</planning_context>\n"
155
+ + "<user_decisions>\n" + CONTEXT_CONTENT + "\n</user_decisions>\n"
156
+ + "<output>\n" + target_path + "\n</output>"
157
+ ```
158
+
159
+ The agent file reference (`read ~/.claude/agents/...`) provides role instructions. The inlined content provides runtime context.
160
+
161
+ ## Anti-Patterns
162
+
163
+ - **Fat orchestrator**: Orchestrator doing the actual work (writing, planning) instead of spawning agents
164
+ - **Missing context injection**: Forgetting to pass CONTEXT.md to agents
165
+ - **File references instead of inlining**: Agents can't read files the orchestrator could — inline the content
166
+ - **Ignoring structured returns**: Not parsing the agent's return header for status routing
167
+ - **Skipping quality loop**: Not spawning plan-checker or argument-verifier when config enables them
@@ -0,0 +1,135 @@
1
+ # Planning Configuration Reference
2
+
3
+ Complete documentation of every key in `.planning/config.json`. This is the v0.5.0 schema — the single source of truth for all orchestrator and agent configuration.
4
+
5
+ Template location: `core/write-the-f-paper/templates/config.json`
6
+
7
+ ## Top-Level Settings
8
+
9
+ | Key | Type | Default | Description | Read By |
10
+ |-----|------|---------|-------------|---------|
11
+ | `mode` | string | `"interactive"` | Execution mode. `"interactive"`: confirmations at gates. `"yolo"`: skip all non-safety gates. | All orchestrators |
12
+ | `depth` | string | `"standard"` | Planning depth. `"quick"`: fewer plans, faster. `"standard"`: balanced. `"thorough"`: max detail. | section-planner, plan-checker |
13
+ | `document_type` | string | `"paper"` | Document type. `"paper"`, `"thesis"`, `"proposal"`, `"report"`. Affects templates and defaults. | new-paper, plan-section |
14
+ | `output_format` | string | `"markdown"` | Output file format. `"markdown"` or `"latex"`. Determines how content files are written. | section-writer, prose-polisher |
15
+ | `model_profile` | string | `"balanced"` | Model selection profile. `"quality"`, `"balanced"`, `"budget"`. See agent-model-matrix.md. | All orchestrators (model resolution) |
16
+ | `venue_template` | string\|null | `null` | Venue-specific template name. `null` for generic. When set, loads venue constraints (word limits, formatting). | plan-section, write-section |
17
+
18
+ ## Gates
19
+
20
+ Controls which confirmation prompts appear. When `true`, orchestrator pauses for user confirmation. When `false`, orchestrator proceeds automatically. Mode `"yolo"` overrides all non-safety gates to `false`.
21
+
22
+ | Key | Type | Default | Description | Read By |
23
+ |-----|------|---------|-------------|---------|
24
+ | `gates.confirm_outline` | bool | `true` | Confirm before finalizing outline structure. | create-outline, execute-outline |
25
+ | `gates.confirm_plan` | bool | `true` | Confirm before finalizing section plan. | plan-section |
26
+ | `gates.confirm_write` | bool | `true` | Confirm before executing writing plan. | write-section |
27
+ | `gates.confirm_review` | bool | `true` | Confirm before applying review suggestions. | review-section |
28
+ | `gates.execute_next_section` | bool | `true` | Confirm before auto-advancing to next section. | write-section (section chaining) |
29
+ | `gates.issues_review` | bool | `true` | Confirm before presenting issues for review. | review-section, check-refs |
30
+ | `gates.confirm_transition` | bool | `true` | Confirm before transitioning between writing phases. | write-section (phase transitions) |
31
+ | `gates.confirm_submission` | bool | `true` | Confirm before marking paper as submission-ready. | submit-milestone |
32
+
33
+ ### When to Change
34
+
35
+ - **Solo iterating rapidly**: Set `mode: "yolo"` to skip all gates.
36
+ - **Specific gate annoying**: Set that one gate to `false`, keep others.
37
+ - **Submission safety**: Never set `confirm_submission` to `false` — it is the final human check.
38
+
39
+ ## Writing
40
+
41
+ Controls how Claude assists with writing. Preserved from v0.4.0.
42
+
43
+ | Key | Type | Default | Description | Read By |
44
+ |-----|------|---------|-------------|---------|
45
+ | `writing.claude_mode` | string | `"co-author"` | Claude's writing role. `"co-author"`: Claude drafts prose. `"scaffold"`: Claude outlines, user writes. `"reviewer"`: User writes, Claude reviews. | section-writer, write-section |
46
+ | `writing.citation_style` | string | `"apa"` | Citation format. `"apa"`, `"ieee"`, `"chicago"`, `"mla"`, `"vancouver"`. | citation-formatter, section-writer |
47
+ | `writing.verify_on_complete` | bool | `true` | Run argument-verifier after each writing task completes. When `false`, skips verification. | write-section |
48
+
49
+ ## Workflow
50
+
51
+ Controls which optional workflow steps run. Preserved from v0.4.0.
52
+
53
+ | Key | Type | Default | Description | Read By |
54
+ |-----|------|---------|-------------|---------|
55
+ | `workflow.research` | bool | `true` | Run research-synthesizer before planning. When `false`, skip literature search. | plan-section |
56
+ | `workflow.plan_check` | bool | `true` | Run plan-checker after plan creation. When `false`, skip quality validation. | plan-section |
57
+ | `workflow.verifier` | bool | `true` | Run argument-verifier after writing. When `false`, skip goal-backward verification. | write-section |
58
+
59
+ ## Verification
60
+
61
+ Controls which verification checks run during review. Preserved from v0.4.0.
62
+
63
+ | Key | Type | Default | Description | Read By |
64
+ |-----|------|---------|-------------|---------|
65
+ | `verification.citation_check` | bool | `true` | Verify citations exist, are formatted correctly, and are cited in text. | check-refs, section-reviewer |
66
+ | `verification.coherence_check` | bool | `true` | Check cross-section coherence, argument flow, terminology consistency. | section-reviewer, coherence-checker |
67
+ | `verification.rubric_check` | bool | `true` | Evaluate against venue rubric (if venue_template set) or general quality rubric. | section-reviewer |
68
+
69
+ ## Planning
70
+
71
+ Controls planning document behavior. New in v0.5.0.
72
+
73
+ | Key | Type | Default | Description | Read By |
74
+ |-----|------|---------|-------------|---------|
75
+ | `planning.commit_docs` | bool | `true` | Include planning docs (SUMMARY.md, STATE.md) in git commits. When `false`, planning docs are gitignored. | All orchestrators (commit step) |
76
+ | `planning.search_gitignored` | bool | `false` | Allow searching gitignored files for context. When `true`, agents can read files in .gitignore paths. | research-synthesizer, section-writer |
77
+
78
+ ## Parallelization
79
+
80
+ Controls concurrent execution. Expanded in v0.5.0.
81
+
82
+ | Key | Type | Default | Description | Read By |
83
+ |-----|------|---------|-------------|---------|
84
+ | `parallelization.enabled` | bool | `false` | Master switch for parallel execution. When `false`, all work is sequential. | All orchestrators |
85
+ | `parallelization.plan_level` | bool | `true` | Allow parallel plan execution within a section (when `enabled` is `true`). | write-section |
86
+ | `parallelization.task_level` | bool | `false` | Allow parallel task execution within a plan (when `enabled` is `true`). Experimental. | section-writer |
87
+ | `parallelization.skip_checkpoints` | bool | `true` | Auto-approve checkpoints during parallel execution to avoid blocking. | section-writer |
88
+ | `parallelization.max_concurrent_agents` | int | `3` | Maximum number of concurrent subagents. | All orchestrators (parallel mode) |
89
+ | `parallelization.min_plans_for_parallel` | int | `2` | Minimum number of ready plans before parallel execution activates. | write-section |
90
+
91
+ ## Safety
92
+
93
+ Controls safety confirmations that are never skipped by mode or gate overrides. Expanded in v0.5.0.
94
+
95
+ | Key | Type | Default | Description | Read By |
96
+ |-----|------|---------|-------------|---------|
97
+ | `safety.always_confirm_destructive` | bool | `true` | Always confirm before destructive operations (deleting sections, resetting progress). Never skipped by `mode: "yolo"`. | All orchestrators |
98
+ | `safety.always_confirm_external_services` | bool | `true` | Always confirm before calling external services (API calls, web searches). Never skipped by `mode: "yolo"`. | research-synthesizer, citation-retriever |
99
+ | `safety.backup_before_major_edits` | bool | `true` | Create backup commit before major edits (full section rewrites, structural changes). | write-section, review-section |
100
+
101
+ ### Safety vs Gates
102
+
103
+ Gates are convenience confirmations — skip them to go faster. Safety flags protect against data loss and unintended side effects. `mode: "yolo"` overrides gates but never overrides safety flags.
104
+
105
+ ## Git
106
+
107
+ Controls git integration behavior. New in v0.5.0. See git-integration.md for full branching strategy documentation.
108
+
109
+ | Key | Type | Default | Description | Read By |
110
+ |-----|------|---------|-------------|---------|
111
+ | `git.branching_strategy` | string | `"none"` | Branch strategy. `"none"`: current branch. `"section"`: branch per section. `"submission"`: branch per milestone. | All orchestrators (commit step) |
112
+ | `git.section_branch_template` | string | `"wtfp/section-{section}-{slug}"` | Branch name template for `"section"` strategy. `{section}` = section number, `{slug}` = slugified section name. | plan-section, write-section |
113
+ | `git.submission_branch_template` | string | `"wtfp/{milestone}-{slug}"` | Branch name template for `"submission"` strategy. `{milestone}` = milestone name, `{slug}` = slugified paper title. | submit-milestone |
114
+ | `git.squash_on_merge` | bool | `false` | Squash commits when merging section/submission branches back. When `true`, per-task history is lost on merge. | write-section, submit-milestone |
115
+
116
+ ## Backward Compatibility
117
+
118
+ The following keys are preserved unchanged from v0.4.0:
119
+
120
+ - **`writing`** section: `claude_mode`, `citation_style`, `verify_on_complete` -- same keys, same defaults, same behavior.
121
+ - **`verification`** section: `citation_check`, `coherence_check`, `rubric_check` -- same keys, same defaults, same behavior.
122
+ - **`output_format`**: Same key, same default (`"markdown"`), same behavior.
123
+
124
+ The following keys were renamed or replaced in v0.5.0:
125
+
126
+ | v0.4.0 Key | v0.5.0 Key | Reason |
127
+ |------------|------------|--------|
128
+ | `gates.confirm_project` | Removed | Replaced by `gates.confirm_outline` |
129
+ | `gates.confirm_sections` | Removed | Replaced by `gates.confirm_plan` |
130
+ | `gates.confirm_roadmap` | Removed | No equivalent (roadmap is auto-generated) |
131
+ | `gates.write_next_plan` | `gates.execute_next_section` | Renamed for clarity |
132
+ | `parallelization.min_sections_for_parallel` | `parallelization.min_plans_for_parallel` | Renamed: plans not sections |
133
+ | `safety.backup_before_major_edits` | Kept (+ `always_confirm_external_services` added) | Backward compat |
134
+
135
+ Projects using v0.4.0 config files will work -- orchestrators default missing keys safely. The `new-paper` command generates the full v0.5.0 schema.
@@ -0,0 +1,186 @@
1
+ # WTF-P Visual Identity Reference
2
+
3
+ Visual formatting conventions for all orchestrators and agents. Claude Code output is plain text — these symbols and patterns provide visual hierarchy without ANSI colors.
4
+
5
+ ## Stage Banners
6
+
7
+ The `WTF-P ►` banner marks stage transitions in orchestrator output. Format:
8
+
9
+ ```
10
+ WTF-P ► {STAGE_NAME} {optional_detail}
11
+ ```
12
+
13
+ Rendered inside a box:
14
+
15
+ ```
16
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
17
+ WTF-P ► {STAGE_NAME} {optional_detail}
18
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
19
+ ```
20
+
21
+ ### Stage Names
22
+
23
+ | Stage | Usage | Example |
24
+ |-------|-------|---------|
25
+ | INITIALIZING | Project setup, config load | `WTF-P ► INITIALIZING new-paper` |
26
+ | PLANNING | Section plan creation | `WTF-P ► PLANNING SECTION 2` |
27
+ | RESEARCHING | Literature search, gap analysis | `WTF-P ► RESEARCHING literature gaps` |
28
+ | WRITING | Section draft execution | `WTF-P ► WRITING SECTION 1 PLAN 1` |
29
+ | REVIEWING | Section review, quality checks | `WTF-P ► REVIEWING SECTION 3` |
30
+ | POLISHING | Prose refinement, voice adjustment | `WTF-P ► POLISHING SECTION 1` |
31
+ | VERIFYING | Argument verification, citation check | `WTF-P ► VERIFYING SECTION 2` |
32
+ | CHECKING | Pre-flight checks, plan validation | `WTF-P ► CHECKING plan quality` |
33
+ | COMPLETE | Stage finished successfully | `WTF-P ► COMPLETE ✓` |
34
+
35
+ ### Completion Banner
36
+
37
+ ```
38
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
39
+ WTF-P ► COMPLETE ✓
40
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
41
+
42
+ [Summary of what was done]
43
+
44
+ ───────────────────────────────────────────
45
+
46
+ ## ▶ Next Up
47
+
48
+ **[Next action]** — [description]
49
+
50
+ `/wtfp:[next-command] [args]`
51
+
52
+ <sub>`/clear` first → fresh context window</sub>
53
+
54
+ ───────────────────────────────────────────
55
+ ```
56
+
57
+ ## Checkpoint Boxes
58
+
59
+ How checkpoints render to the user. Three types, same box format:
60
+
61
+ ```
62
+ ════════════════════════════════════════
63
+ CHECKPOINT: {type}
64
+ ════════════════════════════════════════
65
+ Task {X} of {Y}: {Name}
66
+
67
+ {content — varies by checkpoint type}
68
+
69
+ {resume signal}
70
+ ════════════════════════════════════════
71
+ ```
72
+
73
+ ### human-verify Box
74
+
75
+ ```
76
+ ════════════════════════════════════════
77
+ CHECKPOINT: human-verify
78
+ ════════════════════════════════════════
79
+ Task 3 of 5: Review introduction draft
80
+
81
+ What was written:
82
+ Introduction opening paragraph (~200 words)
83
+
84
+ How to verify:
85
+ 1. Captures the problem accurately
86
+ 2. Tone matches your voice
87
+ 3. Hook is compelling
88
+
89
+ Type "approved" or describe what to change.
90
+ ════════════════════════════════════════
91
+ ```
92
+
93
+ ### decision Box
94
+
95
+ ```
96
+ ════════════════════════════════════════
97
+ CHECKPOINT: decision
98
+ ════════════════════════════════════════
99
+ Task 2 of 4: Methodology framing
100
+
101
+ Decision needed:
102
+ How to frame the methodology section
103
+
104
+ Options:
105
+ [a] Emphasize novelty — highlights contribution, may invite scrutiny
106
+ [b] Frame as extension — builds on prior work, may seem incremental
107
+
108
+ Select: a or b
109
+ ════════════════════════════════════════
110
+ ```
111
+
112
+ ### human-action Box
113
+
114
+ ```
115
+ ════════════════════════════════════════
116
+ CHECKPOINT: human-action
117
+ ════════════════════════════════════════
118
+ Task 4 of 6: Insert experimental results
119
+
120
+ What is needed:
121
+ Exact p-value and effect size from your analysis
122
+
123
+ Provide: p-value and effect size
124
+ ════════════════════════════════════════
125
+ ```
126
+
127
+ ## Status Symbols
128
+
129
+ | Symbol | Meaning | Usage |
130
+ |--------|---------|-------|
131
+ | ✓ | Complete | Task finished, verification passed |
132
+ | ► | In progress | Currently executing |
133
+ | ✗ | Failed | Task or verification failed |
134
+ | — | Skipped | Task skipped (gate disabled, not applicable) |
135
+ | ⊘ | Blocked | Cannot proceed (missing dependency, auth) |
136
+
137
+ ### In Task Lists
138
+
139
+ ```
140
+ ✓ Task 1: Draft opening hook
141
+ ✓ Task 2: Establish research gap
142
+ ► Task 3: Present thesis statement
143
+ — Task 4: (skipped — gate disabled)
144
+ ⊘ Task 5: (blocked — needs Task 3)
145
+ ```
146
+
147
+ ## Progress Bars
148
+
149
+ Format: `[{filled}{empty}] {current}/{total} {unit}`
150
+
151
+ ```
152
+ [########............] 4/10 sections
153
+ [####################] 10/10 sections
154
+ [....................] 0/10 sections
155
+ ```
156
+
157
+ Fill character: `#`
158
+ Empty character: `.`
159
+ Bar width: 20 characters (fixed)
160
+
161
+ ### In Section Tracking
162
+
163
+ ```
164
+ Section progress:
165
+ [####................ ] 2/8 sections planned
166
+ [##.................. ] 1/8 sections written
167
+ [.................... ] 0/8 sections reviewed
168
+ ```
169
+
170
+ ### In Task Tracking
171
+
172
+ ```
173
+ Plan 01-02 progress:
174
+ [############........] 3/5 tasks complete
175
+ ```
176
+
177
+ ## Color Note
178
+
179
+ Claude Code renders plain text. All visual hierarchy comes from:
180
+
181
+ - Unicode box-drawing characters (`━`, `═`, `─`) for borders
182
+ - Unicode symbols (`✓`, `✗`, `►`, `⊘`, `—`) for status
183
+ - Indentation and whitespace for structure
184
+ - `#` and `.` for progress bars
185
+
186
+ No ANSI color codes, no terminal escape sequences. These patterns work in any text rendering context.
@@ -0,0 +1,80 @@
1
+ # UAT Template
2
+
3
+ Template for `.planning/sections/XX-name/UAT.md` - section acceptance testing state file.
4
+
5
+ ---
6
+
7
+ ## File Template
8
+
9
+ ```markdown
10
+ ---
11
+ status: testing
12
+ section: XX-name
13
+ started: YYYY-MM-DDTHH:MM:SSZ
14
+ last_test: 0
15
+ ---
16
+
17
+ ## Current Test
18
+
19
+ [Active test content will be displayed here during verification]
20
+
21
+ ## Tests
22
+
23
+ ### 1. [Criterion or claim text]
24
+ result: pending
25
+ reason: ""
26
+
27
+ ### 2. [Criterion or claim text]
28
+ result: pending
29
+ reason: ""
30
+
31
+ [... one entry per test ...]
32
+
33
+ ## Summary
34
+
35
+ total: N | passed: 0 | issues: 0 | skipped: 0
36
+
37
+ ## Gaps
38
+
39
+ [Populated when tests result in "issue"]
40
+
41
+ - claim: "Expected behavior or argument"
42
+ status: issue
43
+ reason: "User reported: ..."
44
+ severity: major
45
+ ```
46
+
47
+ <guidelines>
48
+ **Test sources:**
49
+
50
+ Tests are derived from TWO sources:
51
+ 1. **PLAN.md `<success_criteria>` items** - Each checklist item becomes a test. These verify that the plan's deliverables were achieved.
52
+ 2. **argument-map.md claims mapped to this section** - Each claim assigned to this section becomes a test. These verify that the section fulfills its role in the paper's argument.
53
+
54
+ **Each test is a single verifiable statement.** Do not combine multiple criteria into one test.
55
+
56
+ **Status transitions:**
57
+ - `pending` - Not yet evaluated
58
+ - `pass` - User confirmed criterion is met
59
+ - `skip` - User determined criterion is not applicable
60
+ - `issue` - User identified a problem
61
+
62
+ Transitions are one-way: `pending -> pass | skip | issue`. A test cannot return to pending.
63
+
64
+ **Severity classification for gaps:**
65
+ - `major` - Undermines the section's argument or misses a key claim. Must fix before submission.
66
+ - `minor` - Weakens but does not invalidate. Should fix if time allows.
67
+ - `cosmetic` - Polish issue (word choice, formatting, flow). Fix during final pass.
68
+
69
+ **File location:** UAT.md lives in the section directory alongside PLAN.md and SUMMARY.md:
70
+ ```
71
+ .planning/sections/XX-name/
72
+ XX-YY-PLAN.md
73
+ XX-YY-SUMMARY.md
74
+ UAT.md <-- this file
75
+ ```
76
+
77
+ **Persistence:** UAT.md survives `/clear`. On each invocation, verify-work reads UAT.md, finds the next `pending` test, presents it, records the result, and writes back. This enables verification to span multiple sessions.
78
+
79
+ **Resumption:** The `last_test` field tracks the most recently evaluated test number. On resume, find the first test with `result: pending` (which may differ from last_test + 1 if tests were skipped non-sequentially).
80
+ </guidelines>
@@ -0,0 +1,42 @@
1
+ # WTF-P User Preferences
2
+ # Global defaults — install to ~/.wtfp/base.yaml
3
+ # Per-project overrides in .planning/prefs.yaml
4
+ #
5
+ # Inheritance: base.yaml → .planning/prefs.yaml → config.json (runtime)
6
+ # Values here are defaults. Override per-project as needed.
7
+
8
+ # Writing style preferences
9
+ style:
10
+ voice: measured # authoritative | measured | accessible | technical
11
+ person: third # first | third | passive
12
+ hedging: moderate # minimal | moderate | heavy
13
+ formality: academic # casual | academic | formal
14
+
15
+ # Citation habits
16
+ citations:
17
+ style: apa # apa | ieee | nature | chicago | vancouver
18
+ inline_format: author-year # author-year | numbered | superscript
19
+ self_cite_limit: 3 # max self-citations before flagging
20
+
21
+ # Prose preferences
22
+ prose:
23
+ sentence_length: varied # short | varied | long
24
+ paragraph_length: medium # short (3-5 sentences) | medium (5-8) | long (8-12)
25
+ jargon_level: moderate # minimal | moderate | heavy
26
+ acronym_policy: define_first # define_first | assume_known | footnote
27
+
28
+ # Workflow defaults
29
+ workflow:
30
+ confirm_before_write: true
31
+ auto_commit: true
32
+ backup_on_major_edit: true
33
+ research_before_plan: true
34
+
35
+ # Model preferences (override config.json model_profile)
36
+ # Uncomment to set global default
37
+ # model_profile: balanced # quality | balanced | budget
38
+
39
+ # Editor integration
40
+ editor:
41
+ preferred: none # none | vscode | vim | emacs
42
+ open_after_write: false
@@ -3,28 +3,54 @@
3
3
  "depth": "standard",
4
4
  "document_type": "paper",
5
5
  "output_format": "markdown",
6
+ "model_profile": "balanced",
7
+ "venue_template": null,
6
8
  "gates": {
7
- "confirm_project": true,
8
- "confirm_sections": true,
9
- "confirm_roadmap": true,
10
9
  "confirm_outline": true,
11
10
  "confirm_plan": true,
12
- "write_next_plan": true,
11
+ "confirm_write": true,
12
+ "confirm_review": true,
13
+ "execute_next_section": true,
13
14
  "issues_review": true,
14
- "confirm_transition": true
15
+ "confirm_transition": true,
16
+ "confirm_submission": true
15
17
  },
16
18
  "writing": {
17
19
  "claude_mode": "co-author",
18
20
  "citation_style": "apa",
19
21
  "verify_on_complete": true
20
22
  },
23
+ "workflow": {
24
+ "research": true,
25
+ "plan_check": true,
26
+ "verifier": true
27
+ },
21
28
  "verification": {
22
29
  "citation_check": true,
23
30
  "coherence_check": true,
24
31
  "rubric_check": true
25
32
  },
33
+ "planning": {
34
+ "commit_docs": true,
35
+ "search_gitignored": false
36
+ },
37
+ "parallelization": {
38
+ "enabled": false,
39
+ "plan_level": true,
40
+ "task_level": false,
41
+ "skip_checkpoints": true,
42
+ "max_concurrent_agents": 3,
43
+ "min_plans_for_parallel": 2
44
+ },
26
45
  "safety": {
27
46
  "always_confirm_destructive": true,
47
+ "always_confirm_external_services": true,
28
48
  "backup_before_major_edits": true
49
+ },
50
+ "git": {
51
+ "branching_strategy": "none",
52
+ "section_branch_template": "wtfp/section-{section}-{slug}",
53
+ "submission_branch_template": "wtfp/{milestone}-{slug}",
54
+ "squash_on_merge": false
29
55
  }
30
56
  }
@@ -142,7 +142,7 @@ WRITE: .planning/structure/narrative-arc.md
142
142
  USE: ~/.claude/write-the-f-paper/templates/project-context/narrative-arc.md
143
143
  [/step]
144
144
 
145
- [step:git_commit]
145
+ [step:git_commit_initialization]
146
146
  RUN: git add .planning/PROJECT.md .planning/ROADMAP.md .planning/STATE.md .planning/sections/ .planning/structure/
147
147
  RUN: git add .planning/config.json 2>/dev/null
148
148
  COMMIT: "docs: initialize [title] ([N] sections)"