whetstonehq 0.3.0__tar.gz

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 (239) hide show
  1. whetstonehq-0.3.0/.claude/skills/prd-generator/SKILL.md +158 -0
  2. whetstonehq-0.3.0/.claude/skills/prd-interview/SKILL.md +134 -0
  3. whetstonehq-0.3.0/.claude/skills/tech-plan/SKILL.md +117 -0
  4. whetstonehq-0.3.0/.claude/skills/whetstone-begin/SKILL.md +79 -0
  5. whetstonehq-0.3.0/.claude/skills/whetstone-begin/references/proposals.md +99 -0
  6. whetstonehq-0.3.0/.claude/skills/whetstone-begin-fast/SKILL.md +141 -0
  7. whetstonehq-0.3.0/.claude/skills/whetstone-begin-fast/references/gather-context.md +111 -0
  8. whetstonehq-0.3.0/.claude/skills/whetstone-end/SKILL.md +57 -0
  9. whetstonehq-0.3.0/.claude/skills/whetstone-end-fast/SKILL.md +134 -0
  10. whetstonehq-0.3.0/.claude/skills/whetstone-next/SKILL.md +149 -0
  11. whetstonehq-0.3.0/.claude/skills/whetstone-report/SKILL.md +115 -0
  12. whetstonehq-0.3.0/.claude/skills/whetstone-worktrees/SKILL.md +145 -0
  13. whetstonehq-0.3.0/.github/workflows/ci.yml +101 -0
  14. whetstonehq-0.3.0/.github/workflows/release.yml +165 -0
  15. whetstonehq-0.3.0/.gitignore +33 -0
  16. whetstonehq-0.3.0/.python-version +1 -0
  17. whetstonehq-0.3.0/CHANGELOG.md +416 -0
  18. whetstonehq-0.3.0/CLAUDE.md +471 -0
  19. whetstonehq-0.3.0/CODE_OF_CONDUCT.md +39 -0
  20. whetstonehq-0.3.0/CONTRIBUTING.md +78 -0
  21. whetstonehq-0.3.0/LICENSE +201 -0
  22. whetstonehq-0.3.0/PKG-INFO +260 -0
  23. whetstonehq-0.3.0/PREREGISTRATION.md +436 -0
  24. whetstonehq-0.3.0/README.md +249 -0
  25. whetstonehq-0.3.0/RELEASING.md +105 -0
  26. whetstonehq-0.3.0/SECURITY.md +57 -0
  27. whetstonehq-0.3.0/VISION.md +85 -0
  28. whetstonehq-0.3.0/assets/logo.svg +11 -0
  29. whetstonehq-0.3.0/docs/ROADMAP.md +618 -0
  30. whetstonehq-0.3.0/docs/planning/_card/issue.md +161 -0
  31. whetstonehq-0.3.0/docs/planning/_card/understanding.md +274 -0
  32. whetstonehq-0.3.0/docs/planning/p0-scaffold/prd.md +234 -0
  33. whetstonehq-0.3.0/docs/planning/p0-scaffold/scaffold/plan_20260727.md +315 -0
  34. whetstonehq-0.3.0/docs/planning/p0-scaffold/scaffold/spec.md +93 -0
  35. whetstonehq-0.3.0/docs/planning/p1-baseline-bakeoff/doc-corrections/spec.md +98 -0
  36. whetstonehq-0.3.0/docs/planning/p1-baseline-bakeoff/generation/plan_20260731.md +271 -0
  37. whetstonehq-0.3.0/docs/planning/p1-baseline-bakeoff/generation/spec.md +113 -0
  38. whetstonehq-0.3.0/docs/planning/p1-baseline-bakeoff/prd.md +318 -0
  39. whetstonehq-0.3.0/docs/planning/p1-baseline-bakeoff/report/spec.md +132 -0
  40. whetstonehq-0.3.0/docs/planning/p1-baseline-bakeoff/scoring-harness/spec.md +140 -0
  41. whetstonehq-0.3.0/docs/planning/p1-baseline-bakeoff/the-run/spec.md +100 -0
  42. whetstonehq-0.3.0/docs/planning/p1-baseline-bakeoff/understanding.md +303 -0
  43. whetstonehq-0.3.0/docs/planning/p1-preregistration/card.md +98 -0
  44. whetstonehq-0.3.0/docs/planning/p1-preregistration/prd.md +253 -0
  45. whetstonehq-0.3.0/docs/planning/p1-preregistration/preregistration/plan_20260729.md +149 -0
  46. whetstonehq-0.3.0/docs/planning/p1-preregistration/understanding.md +196 -0
  47. whetstonehq-0.3.0/docs/planning/p1-task-ingestion/prd.md +437 -0
  48. whetstonehq-0.3.0/docs/planning/p1-task-ingestion/source-a-filter/spec.md +83 -0
  49. whetstonehq-0.3.0/docs/planning/p1-task-ingestion/source-b-miner/plan_20260728.md +199 -0
  50. whetstonehq-0.3.0/docs/planning/p1-task-ingestion/source-b-miner/spec.md +80 -0
  51. whetstonehq-0.3.0/docs/planning/p1-task-ingestion/task-format/plan_20260728.md +308 -0
  52. whetstonehq-0.3.0/docs/planning/p1-task-ingestion/task-format/spec.md +77 -0
  53. whetstonehq-0.3.0/docs/planning/p1-verifier-core/prd.md +436 -0
  54. whetstonehq-0.3.0/docs/planning/p1-verifier-core/verifier-core/plan_20260728.md +471 -0
  55. whetstonehq-0.3.0/docs/planning/p1-verifier-core/verifier-core/spec.md +107 -0
  56. whetstonehq-0.3.0/docs/planning/p2-diff-autopsy/autopsy/plan_20260809.md +424 -0
  57. whetstonehq-0.3.0/docs/planning/p2-diff-autopsy/autopsy/spec.md +89 -0
  58. whetstonehq-0.3.0/docs/planning/p2-diff-autopsy/card.md +70 -0
  59. whetstonehq-0.3.0/docs/planning/p2-diff-autopsy/dig-code.md +336 -0
  60. whetstonehq-0.3.0/docs/planning/p2-diff-autopsy/dig-transcripts.md +388 -0
  61. whetstonehq-0.3.0/docs/planning/p2-diff-autopsy/finding.md +117 -0
  62. whetstonehq-0.3.0/docs/planning/p2-diff-autopsy/prd.md +327 -0
  63. whetstonehq-0.3.0/docs/planning/p2-diff-autopsy/understanding.md +175 -0
  64. whetstonehq-0.3.0/docs/planning/p2-format-hardening/card.md +46 -0
  65. whetstonehq-0.3.0/docs/planning/p2-format-hardening/contract-report/plan_20260809.md +114 -0
  66. whetstonehq-0.3.0/docs/planning/p2-format-hardening/contract-report/spec.md +85 -0
  67. whetstonehq-0.3.0/docs/planning/p2-format-hardening/diffcheck/plan_20260809.md +132 -0
  68. whetstonehq-0.3.0/docs/planning/p2-format-hardening/diffcheck/spec.md +93 -0
  69. whetstonehq-0.3.0/docs/planning/p2-format-hardening/measured-arm/plan_20260809.md +142 -0
  70. whetstonehq-0.3.0/docs/planning/p2-format-hardening/measured-arm/runbook.md +144 -0
  71. whetstonehq-0.3.0/docs/planning/p2-format-hardening/measured-arm/spec.md +88 -0
  72. whetstonehq-0.3.0/docs/planning/p2-format-hardening/prd.md +379 -0
  73. whetstonehq-0.3.0/docs/planning/p2-format-hardening/retry-loop/plan_20260809.md +135 -0
  74. whetstonehq-0.3.0/docs/planning/p2-format-hardening/retry-loop/spec.md +109 -0
  75. whetstonehq-0.3.0/docs/planning/p2-format-hardening/understanding.md +170 -0
  76. whetstonehq-0.3.0/docs/planning/p2-yield-probe/card.md +66 -0
  77. whetstonehq-0.3.0/docs/planning/p2-yield-probe/instrumentation/plan_20260805.md +303 -0
  78. whetstonehq-0.3.0/docs/planning/p2-yield-probe/instrumentation/spec.md +109 -0
  79. whetstonehq-0.3.0/docs/planning/p2-yield-probe/prd.md +261 -0
  80. whetstonehq-0.3.0/docs/planning/p2-yield-probe/understanding.md +172 -0
  81. whetstonehq-0.3.0/docs/planning/roadmap-and-task-family/prd.md +330 -0
  82. whetstonehq-0.3.0/pyproject.toml +71 -0
  83. whetstonehq-0.3.0/reports/baseline/cost.json +38 -0
  84. whetstonehq-0.3.0/reports/baseline/report.json +142 -0
  85. whetstonehq-0.3.0/reports/baseline/report.md +107 -0
  86. whetstonehq-0.3.0/reports/format-hardening/cost.json +4 -0
  87. whetstonehq-0.3.0/reports/format-hardening/report.json +7 -0
  88. whetstonehq-0.3.0/reports/format-hardening/report.md +11 -0
  89. whetstonehq-0.3.0/src/whetstone/__init__.py +20 -0
  90. whetstonehq-0.3.0/src/whetstone/bakeoff/__init__.py +41 -0
  91. whetstonehq-0.3.0/src/whetstone/bakeoff/attribution.py +553 -0
  92. whetstonehq-0.3.0/src/whetstone/bakeoff/autopsy.py +970 -0
  93. whetstonehq-0.3.0/src/whetstone/bakeoff/control.py +505 -0
  94. whetstonehq-0.3.0/src/whetstone/bakeoff/diffcheck.py +176 -0
  95. whetstonehq-0.3.0/src/whetstone/bakeoff/generator.py +117 -0
  96. whetstonehq-0.3.0/src/whetstone/bakeoff/journal.py +216 -0
  97. whetstonehq-0.3.0/src/whetstone/bakeoff/mlx_runtime.py +315 -0
  98. whetstonehq-0.3.0/src/whetstone/bakeoff/patch.py +323 -0
  99. whetstonehq-0.3.0/src/whetstone/bakeoff/preanalysis.py +574 -0
  100. whetstonehq-0.3.0/src/whetstone/bakeoff/rendering.py +282 -0
  101. whetstonehq-0.3.0/src/whetstone/bakeoff/report.py +1138 -0
  102. whetstonehq-0.3.0/src/whetstone/bakeoff/retry.py +245 -0
  103. whetstonehq-0.3.0/src/whetstone/bakeoff/run.py +1118 -0
  104. whetstonehq-0.3.0/src/whetstone/bakeoff/scoring.py +569 -0
  105. whetstonehq-0.3.0/src/whetstone/bakeoff/selection.py +168 -0
  106. whetstonehq-0.3.0/src/whetstone/bakeoff/sources.py +536 -0
  107. whetstonehq-0.3.0/src/whetstone/bakeoff/sweep.py +186 -0
  108. whetstonehq-0.3.0/src/whetstone/bakeoff/transcript.py +319 -0
  109. whetstonehq-0.3.0/src/whetstone/bakeoff/weights.py +388 -0
  110. whetstonehq-0.3.0/src/whetstone/cli.py +401 -0
  111. whetstonehq-0.3.0/src/whetstone/tasks/__init__.py +11 -0
  112. whetstonehq-0.3.0/src/whetstone/tasks/derive.py +303 -0
  113. whetstonehq-0.3.0/src/whetstone/tasks/donor.py +286 -0
  114. whetstonehq-0.3.0/src/whetstone/tasks/draw.py +155 -0
  115. whetstonehq-0.3.0/src/whetstone/tasks/environment.py +591 -0
  116. whetstonehq-0.3.0/src/whetstone/tasks/fetch.py +465 -0
  117. whetstonehq-0.3.0/src/whetstone/tasks/gates.py +868 -0
  118. whetstonehq-0.3.0/src/whetstone/tasks/held.py +156 -0
  119. whetstonehq-0.3.0/src/whetstone/tasks/ledger.py +238 -0
  120. whetstonehq-0.3.0/src/whetstone/tasks/liveness.py +214 -0
  121. whetstonehq-0.3.0/src/whetstone/tasks/manifest.py +88 -0
  122. whetstonehq-0.3.0/src/whetstone/tasks/mine.py +458 -0
  123. whetstonehq-0.3.0/src/whetstone/tasks/public.py +589 -0
  124. whetstonehq-0.3.0/src/whetstone/verify/__init__.py +8 -0
  125. whetstonehq-0.3.0/src/whetstone/verify/repo.py +195 -0
  126. whetstonehq-0.3.0/src/whetstone/verify/sandbox.py +317 -0
  127. whetstonehq-0.3.0/src/whetstone/verify/strict.py +548 -0
  128. whetstonehq-0.3.0/src/whetstone/verify/task.py +520 -0
  129. whetstonehq-0.3.0/src/whetstone/verify/verdict.py +110 -0
  130. whetstonehq-0.3.0/src/whetstone/verify/weak.py +152 -0
  131. whetstonehq-0.3.0/tasks/README.md +199 -0
  132. whetstonehq-0.3.0/tasks/local-ledger.json +995 -0
  133. whetstonehq-0.3.0/tasks/public/.gitkeep +0 -0
  134. whetstonehq-0.3.0/tasks/public/era-pins.json +31 -0
  135. whetstonehq-0.3.0/tasks/public/ineligible.json +1524 -0
  136. whetstonehq-0.3.0/tasks/public/instances/pallets__flask-4045.json +93 -0
  137. whetstonehq-0.3.0/tasks/public/pool.json +29483 -0
  138. whetstonehq-0.3.0/tasks/recipes/.gitkeep +0 -0
  139. whetstonehq-0.3.0/tasks/recipes/donor-a.json +18 -0
  140. whetstonehq-0.3.0/tasks/recipes/donor-b.json +18 -0
  141. whetstonehq-0.3.0/tests/adversarial/__init__.py +18 -0
  142. whetstonehq-0.3.0/tests/adversarial/corpus.py +247 -0
  143. whetstonehq-0.3.0/tests/adversarial/test_cheats.py +564 -0
  144. whetstonehq-0.3.0/tests/adversarial/test_inert_checkout.py +157 -0
  145. whetstonehq-0.3.0/tests/bakeoff/__init__.py +13 -0
  146. whetstonehq-0.3.0/tests/bakeoff/test_attribution.py +561 -0
  147. whetstonehq-0.3.0/tests/bakeoff/test_attribution_cli.py +160 -0
  148. whetstonehq-0.3.0/tests/bakeoff/test_autopsy_cli.py +495 -0
  149. whetstonehq-0.3.0/tests/bakeoff/test_autopsy_guards.py +256 -0
  150. whetstonehq-0.3.0/tests/bakeoff/test_autopsy_mapping.py +454 -0
  151. whetstonehq-0.3.0/tests/bakeoff/test_autopsy_markers.py +393 -0
  152. whetstonehq-0.3.0/tests/bakeoff/test_autopsy_partition.py +652 -0
  153. whetstonehq-0.3.0/tests/bakeoff/test_autopsy_walk_fixes.py +503 -0
  154. whetstonehq-0.3.0/tests/bakeoff/test_control.py +492 -0
  155. whetstonehq-0.3.0/tests/bakeoff/test_dev_subset_mechanism.py +115 -0
  156. whetstonehq-0.3.0/tests/bakeoff/test_diffcheck.py +469 -0
  157. whetstonehq-0.3.0/tests/bakeoff/test_diffcheck_credulity.py +335 -0
  158. whetstonehq-0.3.0/tests/bakeoff/test_extraction.py +760 -0
  159. whetstonehq-0.3.0/tests/bakeoff/test_format_hardening_frozen.py +158 -0
  160. whetstonehq-0.3.0/tests/bakeoff/test_generator_contract.py +281 -0
  161. whetstonehq-0.3.0/tests/bakeoff/test_mlx_runtime.py +708 -0
  162. whetstonehq-0.3.0/tests/bakeoff/test_oracle_sources.py +609 -0
  163. whetstonehq-0.3.0/tests/bakeoff/test_preanalysis.py +746 -0
  164. whetstonehq-0.3.0/tests/bakeoff/test_prompt_contract.py +564 -0
  165. whetstonehq-0.3.0/tests/bakeoff/test_provisioning_from_pins.py +112 -0
  166. whetstonehq-0.3.0/tests/bakeoff/test_recording_generator.py +224 -0
  167. whetstonehq-0.3.0/tests/bakeoff/test_report.py +1415 -0
  168. whetstonehq-0.3.0/tests/bakeoff/test_reproduction.py +120 -0
  169. whetstonehq-0.3.0/tests/bakeoff/test_retry.py +684 -0
  170. whetstonehq-0.3.0/tests/bakeoff/test_retry_seal.py +317 -0
  171. whetstonehq-0.3.0/tests/bakeoff/test_run.py +582 -0
  172. whetstonehq-0.3.0/tests/bakeoff/test_run_contract_flags.py +113 -0
  173. whetstonehq-0.3.0/tests/bakeoff/test_run_task_roots.py +110 -0
  174. whetstonehq-0.3.0/tests/bakeoff/test_run_transcript.py +492 -0
  175. whetstonehq-0.3.0/tests/bakeoff/test_scoring.py +687 -0
  176. whetstonehq-0.3.0/tests/bakeoff/test_selection.py +174 -0
  177. whetstonehq-0.3.0/tests/bakeoff/test_sweep.py +264 -0
  178. whetstonehq-0.3.0/tests/bakeoff/test_transcript.py +197 -0
  179. whetstonehq-0.3.0/tests/bakeoff/test_transcript_locality.py +114 -0
  180. whetstonehq-0.3.0/tests/bakeoff/test_transcript_retries.py +193 -0
  181. whetstonehq-0.3.0/tests/bakeoff/test_weights.py +234 -0
  182. whetstonehq-0.3.0/tests/conftest.py +82 -0
  183. whetstonehq-0.3.0/tests/fixtures/__init__.py +1 -0
  184. whetstonehq-0.3.0/tests/fixtures/pkgindex/README.md +67 -0
  185. whetstonehq-0.3.0/tests/fixtures/pkgindex/sources/1.0.0/pyproject.toml +13 -0
  186. whetstonehq-0.3.0/tests/fixtures/pkgindex/sources/1.0.0/src/whetstone_fixture_dep/__init__.py +15 -0
  187. whetstonehq-0.3.0/tests/fixtures/pkgindex/sources/2.0.0/pyproject.toml +13 -0
  188. whetstonehq-0.3.0/tests/fixtures/pkgindex/sources/2.0.0/src/whetstone_fixture_dep/__init__.py +15 -0
  189. whetstonehq-0.3.0/tests/fixtures/pkgindex/whetstone_fixture_dep-1.0.0-py3-none-any.whl +0 -0
  190. whetstonehq-0.3.0/tests/fixtures/pkgindex/whetstone_fixture_dep-2.0.0-py3-none-any.whl +0 -0
  191. whetstonehq-0.3.0/tests/fixtures/pool.py +66 -0
  192. whetstonehq-0.3.0/tests/fixtures/repos/__init__.py +390 -0
  193. whetstonehq-0.3.0/tests/fixtures/repos/donor.py +490 -0
  194. whetstonehq-0.3.0/tests/fixtures/repos/locked.py +113 -0
  195. whetstonehq-0.3.0/tests/fixtures/repos/mined.py +223 -0
  196. whetstonehq-0.3.0/tests/fixtures/repos/packaged.py +223 -0
  197. whetstonehq-0.3.0/tests/fixtures/runner.py +44 -0
  198. whetstonehq-0.3.0/tests/fixtures/wheelhouse/README.md +92 -0
  199. whetstonehq-0.3.0/tests/fixtures/wheelhouse/exceptiongroup-1.3.1-py3-none-any.whl +0 -0
  200. whetstonehq-0.3.0/tests/fixtures/wheelhouse/iniconfig-2.3.0-py3-none-any.whl +0 -0
  201. whetstonehq-0.3.0/tests/fixtures/wheelhouse/packaging-26.2-py3-none-any.whl +0 -0
  202. whetstonehq-0.3.0/tests/fixtures/wheelhouse/pluggy-1.6.0-py3-none-any.whl +0 -0
  203. whetstonehq-0.3.0/tests/fixtures/wheelhouse/pygments-2.20.0-py3-none-any.whl +0 -0
  204. whetstonehq-0.3.0/tests/fixtures/wheelhouse/pytest-9.1.1-py3-none-any.whl +0 -0
  205. whetstonehq-0.3.0/tests/fixtures/wheelhouse/tomli-2.4.1-py3-none-any.whl +0 -0
  206. whetstonehq-0.3.0/tests/fixtures/wheelhouse/typing_extensions-4.16.0-py3-none-any.whl +0 -0
  207. whetstonehq-0.3.0/tests/test_bakeoff_layout.py +166 -0
  208. whetstonehq-0.3.0/tests/test_cli.py +82 -0
  209. whetstonehq-0.3.0/tests/test_console_script.py +55 -0
  210. whetstonehq-0.3.0/tests/test_derive.py +221 -0
  211. whetstonehq-0.3.0/tests/test_docs.py +851 -0
  212. whetstonehq-0.3.0/tests/test_donor.py +144 -0
  213. whetstonehq-0.3.0/tests/test_environment_capture.py +470 -0
  214. whetstonehq-0.3.0/tests/test_environment_pins.py +573 -0
  215. whetstonehq-0.3.0/tests/test_held_set.py +147 -0
  216. whetstonehq-0.3.0/tests/test_ledger.py +260 -0
  217. whetstonehq-0.3.0/tests/test_liveness.py +165 -0
  218. whetstonehq-0.3.0/tests/test_mine_cli.py +342 -0
  219. whetstonehq-0.3.0/tests/test_no_inference_on_reward_path.py +483 -0
  220. whetstonehq-0.3.0/tests/test_node_ids.py +71 -0
  221. whetstonehq-0.3.0/tests/test_packaging.py +62 -0
  222. whetstonehq-0.3.0/tests/test_public_collectability_gate.py +175 -0
  223. whetstonehq-0.3.0/tests/test_public_corpus.py +157 -0
  224. whetstonehq-0.3.0/tests/test_public_draw.py +235 -0
  225. whetstonehq-0.3.0/tests/test_public_environment_gate.py +300 -0
  226. whetstonehq-0.3.0/tests/test_public_fetch.py +405 -0
  227. whetstonehq-0.3.0/tests/test_public_filter.py +378 -0
  228. whetstonehq-0.3.0/tests/test_public_gates.py +274 -0
  229. whetstonehq-0.3.0/tests/test_reward_path_scope_is_partitioned.py +390 -0
  230. whetstonehq-0.3.0/tests/test_runner_wheelhouse.py +202 -0
  231. whetstonehq-0.3.0/tests/test_sandbox.py +395 -0
  232. whetstonehq-0.3.0/tests/test_strict.py +694 -0
  233. whetstonehq-0.3.0/tests/test_task_contract.py +540 -0
  234. whetstonehq-0.3.0/tests/test_tasks_layout.py +164 -0
  235. whetstonehq-0.3.0/tests/test_verdict.py +67 -0
  236. whetstonehq-0.3.0/tests/test_verify_cli.py +424 -0
  237. whetstonehq-0.3.0/tests/test_version.py +20 -0
  238. whetstonehq-0.3.0/tests/test_weak.py +434 -0
  239. whetstonehq-0.3.0/uv.lock +1315 -0
@@ -0,0 +1,158 @@
1
+ ---
2
+ name: prd-generator
3
+ description: Generate, critique, and refine PRDs, spec files, and roadmaps for initiative-level planning. Use to pressure-test and strengthen a PRD before planning. Triggers on "prd-generator", "prd generator".
4
+ tags:
5
+ - documentation
6
+ - planning
7
+ metadata:
8
+ status: trial
9
+ ---
10
+
11
+ # PRD Generator
12
+
13
+ ## Philosophy
14
+
15
+ This skill is framework-neutral. When coaching, always present multiple applicable frameworks, explain tradeoffs between them, and let the user choose. Never prescribe a single "right" methodology — pick the right tool for the context.
16
+
17
+ Default to **critical feedback over validation**. A coach that just agrees is useless. Always identify gaps, challenge assumptions, and ask hard questions — then offer constructive paths forward.
18
+
19
+ ## Context
20
+
21
+ This skill supports planning at initiative scope — features, epics, or projects spanning one or more cycles. In the `whetstone-begin-fast` pipeline it is Phase 4: refine and self-critique the `prd.md` that `prd-interview` produced, then surface the gaps before the review gate.
22
+
23
+ For collaborative PRD creation from a brief, use the `prd-interview` skill.
24
+ Planning artifacts live in `docs/planning/{slug}/` — see `prd-interview` for the directory convention.
25
+
26
+ ## Capabilities
27
+
28
+ | Capability | Trigger Phrases | Output |
29
+ |-----------|----------------|--------|
30
+ | **Critique PRDs/Specs** | "review my PRD", "critique this spec", "what's missing" | Structured critique with severity ratings |
31
+ | **Generate PRDs** | "write a PRD for", "create a spec", "draft requirements" | Complete PRD document (markdown) |
32
+ | **Coach on Frameworks** | "how should I prioritize", "explain RICE", "opportunity sizing" | Framework comparison with worked examples |
33
+ | **Review Roadmaps** | "review my roadmap", "prioritization feedback", "sequencing" | Prioritization analysis with alternative orderings |
34
+
35
+ ## Workflow 1: Critique PRDs/Specs
36
+
37
+ When the user provides a PRD or spec for review:
38
+
39
+ ### Step 1 — Read the full document
40
+
41
+ If a file is referenced, read it completely before responding. Never critique based on partial reads.
42
+
43
+ ### Step 2 — Score across dimensions
44
+
45
+ Rate each dimension as 🔴 Critical Gap, 🟡 Needs Work, or 🟢 Strong:
46
+
47
+ 1. **Problem Definition** — Is the problem clearly stated? Is there evidence it's real and worth solving?
48
+ 2. **User Understanding** — Are target users defined? Are their needs validated, not assumed?
49
+ 3. **Success Metrics** — Are KPIs defined? Are they measurable, time-bound, and tied to outcomes? Is the held-out set they'd be measured on named?
50
+ 4. **Scope Clarity** — Is the boundary between in-scope and out-of-scope explicit? Hidden assumptions?
51
+ 5. **Edge Cases & Risks** — Are failure modes, dependencies, and technical risks identified?
52
+ 6. **Stakeholder Alignment** — Is it clear who approves, who builds, and who is impacted?
53
+ 7. **Feasibility Signal** — Has the engineering reality been considered? Rough effort estimates?
54
+ 8. **Reward Integrity & Never-Regress** *(Whetstone-specific)* — Does the reward stay execution-grounded (deterministic re-execution, observed-vs-claimed state) rather than resting on any model's opinion? Does the PRD say how a policy would try to cheat this, and why it can't? Does the promotion gate still require a proven gain on a held-out verified set, with an explicit `UNVERIFIED` path that is never counted as a win? Does the work stay local, and does it get *better* as open base models improve rather than being made redundant by them?
55
+
56
+ ### Step 3 — Identify the top 3 gaps
57
+
58
+ Rank the most critical issues. For each: state what's missing or weak, explain WHY it matters (what goes wrong if not addressed), and suggest a specific fix or question to answer.
59
+
60
+ ### Step 4 — Ask the hard question
61
+
62
+ End every critique with ONE pointed question the author probably hasn't considered. Frame it as: "The question I'd want answered before greenlighting this..."
63
+
64
+ ## Workflow 2: Generate PRDs
65
+
66
+ When asked to generate a PRD, use progressive disclosure — ask clarifying questions first, then generate.
67
+
68
+ ### Step 1 — Gather inputs (minimum viable context)
69
+
70
+ Ask the user for (skip any already provided): what problem, for whom; what success looks like (metrics/outcomes); known constraints (timeline, tech, dependencies); any prior art or competitive context.
71
+
72
+ ### Step 2 — Select PRD depth
73
+
74
+ Offer the user a choice based on context:
75
+
76
+ | Template | Best For | Depth |
77
+ |----------|----------|-------|
78
+ | **Lightweight Brief** | Small features, experiments, internal tools | 1-2 pages |
79
+ | **Standard PRD** | Mid-size features shipping to users | 3-5 pages |
80
+ | **Full Spec** | Large initiatives, platform changes, new products | 5-10+ pages |
81
+
82
+ All three share the same section spine — they differ in depth, not structure:
83
+ Problem Statement → Goals & Success Metrics → Users & Scenarios → Requirements (must/should/nice) → Technical Considerations (incl. reward integrity / promotion-gate impact) → Risks & Mitigations → Out of Scope. The Lightweight Brief collapses these to one-liners; the Full Spec adds Data Model, Task/Reward/Checkpoint Contracts, and Non-Functional Requirements.
84
+
85
+ ### Step 3 — Generate the PRD
86
+
87
+ Write it following the chosen depth. Always include: explicit assumptions (labeled as such), open questions that still need answers (don't paper over gaps), and a "Risks & Mitigations" section (never skip this). Name the core-loop element (① verifier, ② nightly loop, ③ promotion gate, ④ morning report, ⑤ local/private — `CLAUDE.md`) the work belongs to, and place it in `docs/ROADMAP.md` once that file exists (it doesn't yet — say so rather than inventing a phase).
88
+
89
+ **Never invent a number.** Targets are labeled as targets; only the verifier produces a result. `CLAUDE.md` lists the grounded external facts available to cite — anything beyond those is unverified and must be labeled as such.
90
+
91
+ ### Step 4 — Self-critique
92
+
93
+ After generating, run the Critique workflow (Workflow 1) against your own output. Flag any 🔴 or 🟡 areas and note them at the end as "Areas to strengthen before sharing." In the `whetstone-begin-fast` pipeline these flagged gaps are exactly what you present at the ⛔ review gate.
94
+
95
+ ## Workflow 3: Coach on Frameworks
96
+
97
+ When the user asks about frameworks or needs help choosing an approach:
98
+
99
+ 1. **Understand the decision context** — ask what decision they're trying to make.
100
+ 2. **Present relevant frameworks (always 2-3 minimum)** — for each: what it is (one sentence), when it shines, what to watch out for, and a worked example on their actual situation.
101
+ 3. **Recommend (but don't prescribe)** — state which you'd lean toward and why, framed as a recommendation.
102
+
103
+ Quick index to draw from:
104
+
105
+ - **Prioritization:** RICE, ICE, MoSCoW, Kano, Weighted Scoring, Cost of Delay / WSJF
106
+ - **Problem discovery:** Jobs-to-Be-Done, Opportunity Solution Trees, Double Diamond, Problem Stack Ranking
107
+ - **Strategy:** Porter's Five Forces, Blue Ocean, Playing to Win, Wardley Mapping
108
+ - **Sizing:** TAM/SAM/SOM, Bottom-up opportunity sizing, Fermi estimation
109
+
110
+ ## Workflow 4: Review Roadmaps & Prioritization
111
+
112
+ 1. **Understand context** — time horizon, top goals/OKRs, constraints (team size, dependencies, deadlines).
113
+ 2. **Analyze current prioritization** — per item: alignment to a stated goal, sequencing logic (dependencies, "why now"), portfolio balance (quick wins / strategic / tech debt / experiments), and what's missing.
114
+ 3. **Propose alternative orderings** — at least 2:
115
+
116
+ | Approach | Optimizes For | Tradeoff |
117
+ |----------|--------------|----------|
118
+ | **Impact-first** | Maximum outcome per unit time | May defer foundational work |
119
+ | **De-risk first** | Reduce uncertainty early | Slower visible progress |
120
+ | **Quick wins first** | Momentum and confidence | May delay strategic bets |
121
+ | **Dependencies-first** | Unblock parallel work | Front-loads less exciting work |
122
+
123
+ 4. **Challenge the roadmap** — "What happens if you cut the bottom 20%?", "Which item are you least confident about, and why is it still on the list?", "If you could only ship ONE thing this cycle, which?"
124
+
125
+ ## Visual-First Preview (Always Do This)
126
+
127
+ Before generating any document or detailed analysis, produce a compact visual preview first so the user can validate structure before committing to a full document. A PRD-structure tree is usually enough:
128
+
129
+ ```
130
+ PRD: {slug}
131
+ ├─ Problem ........... {one line}
132
+ ├─ Goals/Metrics ..... {one line}
133
+ ├─ Users/Scenarios ... {one line}
134
+ ├─ Requirements ...... must:{n} should:{n} nice:{n}
135
+ ├─ Technical ......... {reward/gate impact in a phrase}
136
+ ├─ Risks ............. {top risk}
137
+ └─ Out of scope ...... {one line}
138
+ ```
139
+
140
+ Rules: show the visual BEFORE the full document; wait for confirmation/adjustments; keep it to one screen; use it as a conversation starter, then generate the full document.
141
+
142
+ ## Output Format
143
+
144
+ - Default document format is **markdown** (`.md`) into `docs/planning/{slug}/`.
145
+ - Keep coaching responses focused and actionable — avoid walls of text.
146
+ - Use tables for comparisons and severity indicators (🔴🟡🟢) for assessments.
147
+ - Always end coaching responses with a clear next step or question.
148
+
149
+ ## Anti-Patterns (Never Do These)
150
+
151
+ 1. **Never just validate** — if the PRD is solid, say so, but still find at least one area to push on.
152
+ 2. **Never prescribe a single framework** — always present alternatives with tradeoffs.
153
+ 3. **Never generate a PRD without flagging its own gaps** — self-critique is mandatory.
154
+ 4. **Never give generic advice** — tie everything to the user's specific context.
155
+ 5. **Never skip the hard question** — every review ends with a challenging, specific question.
156
+ 6. **Never wave through base-model drift** — if a PRD's core value is training a frontier base model rather than sharpening an open one on the user's tasks, flag it against the `CLAUDE.md` wedge before approving.
157
+ 7. **Never wave through a judge dressed as a reward** — if a PRD's reward rests on a model's opinion rather than deterministic re-execution, or lets the gate promote on an unproven gain, or renders `UNVERIFIED` as a win, that's a 🔴 regardless of how good the rest is.
158
+ 8. **Never wave through a number the verifier didn't produce** — a projected gain presented as a result is a 🔴, and so is a success metric with no named held-out set behind it.
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: prd-interview
3
+ description: Conduct a collaborative product requirements interview between PM and engineering. Use when turning a brief or feature idea into a structured PRD and aspect-level specs through guided discovery and pressure-testing. Triggers on "prd interview", "requirements interview", "prd-interview".
4
+ tags:
5
+ - documentation
6
+ - planning
7
+ metadata:
8
+ status: trial
9
+ ---
10
+
11
+ # PRD Interview
12
+
13
+ Conduct a structured product requirements interview to turn a brief or feature idea into a complete PRD.
14
+ This is a collaborative exercise — the PM hat brings product context, the engineering hat brings technical reality.
15
+ Challenge assumptions. Pressure-test scope. Document what survives.
16
+
17
+ Do not create files until the Document phase.
18
+ If the tool supports a read-only or plan mode, switch to it now.
19
+
20
+ ## Context
21
+
22
+ This skill is the first step in the brief-to-code pipeline (it's Phase 3 of `whetstone-begin-fast`).
23
+ Input is typically the gathered issue/brief dump at `docs/planning/_card/issue.md` plus the deep-dig understanding note.
24
+ Output is a structured PRD plus aspect-level specs that feed directly into `tech-plan`.
25
+
26
+ **Whetstone guardrail:** before documenting, sanity-check the work against `CLAUDE.md`. The moat is the **verified self-improvement loop** — the execution-grounded verifier, the never-regress promotion gate, and the accumulated verified-improvement data. It is **not** a frontier base model (we sharpen an open base on the user's tasks), and it is **not** an LLM judge (a model may help *distill*; only execution may *reward*). If the requirements drift toward training a base model, toward scoring the policy by a model's opinion, or toward anything that needs the user's data or training to leave the machine, flag it in the interview, not after.
27
+
28
+ ## Discover & Challenge
29
+
30
+ Read the user's input — the issue dump, brief, or pasted requirements.
31
+ Read key files to understand the current architecture. Whetstone is **greenfield**: today that means `CLAUDE.md` (the wedge, the five core-loop elements, the guardrails) and `VISION.md`. `docs/ROADMAP.md`, `docs/technical/ARCHITECTURE.md`, and `docs/product/PRODUCT_SPEC.md` are named in `CLAUDE.md` but **not yet written** — read them if they now exist, and say plainly that they don't if they don't. The loop will live under `src/whetstone/` once it exists.
32
+ Ask if the user is aware of prior art or similar internal/external solutions — offer to search if not.
33
+
34
+ Then pressure-test. Do not soften these. Frame as collaborative due diligence, not criticism.
35
+
36
+ - "What happens if we don't build this?"
37
+ - "Imagine this launched 6 months ago and failed. What went wrong?"
38
+ - "What are we choosing NOT to build if we build this?"
39
+ - "How would a policy cheat at this?" — the reward-hacking question. Ask it about any work that touches the reward, and treat "it can't" as an unfinished answer.
40
+
41
+ If the user has heard the challenge and wants to proceed, proceed.
42
+
43
+ Fill remaining gaps with focused questions, 2-3 at a time, grouped by topic:
44
+
45
+ - **Users & Problem**: Who has this problem? What's the cost of the status quo?
46
+ - **Success**: How will we measure it? Target numbers? What is the held-out set the number comes from?
47
+ - **Scope**: What is explicitly out of scope?
48
+ - **Requirements**: Must-have vs. should-have vs. nice-to-have?
49
+ - **Technical Fit**: Stack constraints? Which core-loop element does this belong to (① verifiable task family + verifier, ② nightly improvement loop, ③ never-regress promotion gate, ④ signed morning report, ⑤ local + private), and are its dependencies built? Where does it sit in the tasks → rollouts → reward → distillation → gate → report pipeline?
50
+ - **Reward & gate impact**: Does this change what the reward measures, or what the gate will promote on? If it touches the reward, how does the reward stay execution-grounded — what is *re-executed*, and what observed-vs-claimed state is compared? If it touches the gate, what counts as a win, and what is the explicit `UNVERIFIED` path when the gain can't be evaluated? (`UNVERIFIED` is never a win.)
51
+ - **Locality**: Does anything about this design require the user's tasks, data, or training to leave the box? A BYOK cloud teacher is allowed for distillation only.
52
+
53
+ Skip what you can infer.
54
+ Challenge vague answers — ask for examples, numbers, edge cases.
55
+ Flag technical pitfalls from the code/docs you read — don't wait to be asked.
56
+
57
+ **Stop when** the problem is clear without guessing, success metrics are measurable, must-haves have testable criteria, out-of-scope is explicit, and major technical risks are identified.
58
+
59
+ ## Confirm
60
+
61
+ Summarize: the problem, proposed approach, scope, success criteria, risks, and unresolved concerns.
62
+ If the challenge raised serious doubts, say so directly. The user decides, but with eyes open.
63
+ Ask the user to confirm before writing.
64
+ Confirm the feature slug for the directory name (e.g., `task-verifier`, `promotion-gate`). Do not name the slug `<type>-<id>` — the id lives in the branch/PR.
65
+
66
+ ## Document
67
+
68
+ Omit sections that don't apply — do not write "Not applicable."
69
+
70
+ **Filename:** `prd.md`
71
+ **Location:** `docs/planning/{slug}/` — slug is the feature name confirmed during the Confirm phase.
72
+ Create the directory if needed. User can override location.
73
+ Examples: `docs/planning/task-verifier/prd.md`, `docs/planning/promotion-gate/prd.md`.
74
+
75
+ The feature directory is the workspace for all planning artifacts.
76
+ This skill can continue into aspect decomposition and create `spec.md` files.
77
+ `tech-plan` then creates implementation plans inside those aspect directories:
78
+
79
+ ```
80
+ docs/planning/{slug}/
81
+ ├── prd.md ← this skill's output
82
+ ├── {aspect}/ ← one directory per aspect
83
+ │ ├── spec.md ← this skill's decomposition output
84
+ │ ├── plan_YYYYMMDD.md ← tech-plan output
85
+ │ └── ... ← team additions
86
+ └── ... ← research, design, ADRs, etc.
87
+ ```
88
+
89
+ ### PRD structure
90
+
91
+ - **Problem Statement**: What problem are we solving? For whom? Evidence it's real.
92
+ - **Goals & Success Metrics**: What does success look like? How will it be measured, and on what held-out set? Label any target as a target, never as a result.
93
+ - **User Personas & Scenarios**: Who uses this and in what context? (Whetstone ICP: the engineer who wants a model that's measurably better at *their* tasks by morning, privately, and who won't trust a gain they can't check.)
94
+ - **Requirements**: Core features and behaviors, prioritized as must-have, should-have, nice-to-have.
95
+ - **Technical Considerations**: Architecture fit, constraints, dependencies, integration points. Call out reward-hacking surface and promotion-gate impact explicitly, and name the core-loop element (①–⑤) this belongs to.
96
+ - **Risks & Open Questions**: Unresolved items, potential blockers, what could go wrong. Include the reward-hacking risk explicitly for anything touching the reward.
97
+ - **Out of Scope**: Explicitly excluded features or concerns.
98
+
99
+ Include when relevant: Data Model, Task/Reward/Checkpoint Contracts, Non-Functional Requirements.
100
+
101
+ After writing, surface open questions and unresolved risks.
102
+ Then offer to continue immediately into aspect decomposition (below).
103
+
104
+ ## Aspect Decomposition Mode (same skill)
105
+
106
+ Use this mode after the PRD is confirmed, or when a user comes back later with an existing PRD and asks to break it down.
107
+
108
+ 1. Propose aspect candidates (typically 2-8), each with a one-line boundary.
109
+ 2. Confirm aspect names with the user (`kebab-case` directory names).
110
+ 3. For each confirmed aspect, write or update `docs/planning/{slug}/{aspect}/spec.md`.
111
+ 4. Keep each spec focused and buildable by one engineer (or agent) at a time.
112
+
113
+ Each `spec.md` should include:
114
+
115
+ - Problem slice and user outcome for this aspect
116
+ - In-scope requirements
117
+ - Out-of-scope boundaries
118
+ - Acceptance criteria (testable — the repo is test-first, so these become the failing tests written before the code). For verifier work, include at least one **adversarial** criterion: a case a reward-hacking policy would pass under a weaker check and must fail under this one.
119
+ - Dependencies and sequencing notes
120
+ - Open questions or risks specific to this aspect
121
+
122
+ If the user only wants the PRD now, stop after `prd.md`.
123
+ `tech-plan` can pick up later and request aspect selection if specs are still missing.
124
+
125
+ ## Edge Cases
126
+
127
+ - **Update existing PRD**: Read the file, ask what changed, update in place.
128
+ - **Existing PRD, no aspect specs yet**: Run Aspect Decomposition Mode without re-running full discovery.
129
+ - **User starts with prd-interview only (no prd-generator)**: Continue normally; this skill can produce both `prd.md` and aspect `spec.md` files.
130
+ - **User says "just write it"**: Write from what you have, but flag gaps in Open Questions and still include at least one challenge question.
131
+ - **Detailed spec already provided**: Review against structure, focus on the challenge phase, skip covered sections.
132
+ - **No brief exists**: Run full discovery from conversation. Note that the PRD is based on discussion rather than an artifact.
133
+ - **Greenfield with no code to read**: Expected today. Ground the technical section in `CLAUDE.md` and `VISION.md` and say plainly that no implementation exists yet rather than describing one that doesn't.
134
+ - **No roadmap to place the work in**: `docs/ROADMAP.md` isn't written yet. Place the work on the core loop (①–⑤) instead, and note the missing roadmap as an open question rather than inventing a phase.
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: tech-plan
3
+ description: Create a phased technical implementation plan from planning artifacts in docs/planning (PRD + aspect spec). Use after prd-interview when ready to execute a specific aspect. Triggers on "tech plan", "implementation plan", "plan from PRD".
4
+ tags:
5
+ - planning
6
+ - documentation
7
+ metadata:
8
+ status: trial
9
+ ---
10
+
11
+ Create a phased technical implementation plan from planning artifacts under `docs/planning/{slug}/`.
12
+ Inputs can come directly from `prd-interview`; do not require `prd-generator`.
13
+ This is Phase 5 of `whetstone-begin-fast` — the plan it produces is executed in Phase 6 through the agents team under strict TDD.
14
+
15
+ If the user provided artifacts in context (attached file, pasted content, or referenced path), use them directly.
16
+ Otherwise, search the workspace for:
17
+
18
+ - PRDs matching `docs/planning/*/prd.md`
19
+ - Aspect specs matching `docs/planning/*/*/spec.md`
20
+
21
+ Analyze the current codebase, then create a detailed **Implementation Plan** optimized for autonomous agent execution.
22
+ Whetstone is **greenfield**: today the authoritative reading is `CLAUDE.md` (the wedge, the five core-loop elements, the guardrails) and `VISION.md`. `docs/ROADMAP.md`, `docs/technical/ARCHITECTURE.md`, and `docs/product/PRODUCT_SPEC.md` are named in `CLAUDE.md` but not yet written — read them if they now exist and say plainly that they don't if they don't. The loop will live under `src/whetstone/`.
23
+ The plan should be structured so the agent team can work through it systematically with minimal human intervention.
24
+
25
+ ## Handoff Contract
26
+
27
+ - **Feature requirements source:** `docs/planning/{slug}/prd.md`
28
+ - **Aspect requirements source (preferred):** `docs/planning/{slug}/{aspect}/spec.md`
29
+ - **Plan output (required):** `docs/planning/{slug}/{aspect}/plan_YYYYMMDD.md`
30
+
31
+ Plan one aspect at a time. If a feature has multiple aspects, create one plan file per aspect.
32
+
33
+ **Filename:** `plan_YYYYMMDD.md` (YYYYMMDD is today's date, e.g., `plan_20260726.md`)
34
+ **Location:** the aspect directory (e.g., `docs/planning/task-verifier/reward-contract/plan_20260726.md`). Create it if needed.
35
+ If the user provided an aspect spec from a different location, write the plan alongside that spec.
36
+ If only a PRD is provided (no aspect spec), ask which aspect to plan, create or update `spec.md` for that aspect, then write the plan in that aspect directory.
37
+ If the PRD was pasted or attached (no file path), ask the user to confirm both feature slug and aspect name, then write to `docs/planning/{slug}/{aspect}/plan_YYYYMMDD.md`.
38
+
39
+ ## Deliverables
40
+
41
+ ### 1. Project Setup Checklist
42
+
43
+ - Directory/module structure to create (under `src/whetstone/`, `tests/`, or the dashboard once it exists)
44
+ - Configuration needed (pyproject entries, env, pinned tool versions and pinned model/runtime versions for reproducible training and eval)
45
+ - Dependencies to add (with specific versions where critical) — Python via `uv add`, dashboard via `npm install`
46
+ - **Greenfield:** if `pyproject.toml` / `uv.lock` / `src/` don't exist yet, scaffolding them is part of the plan's first phase — say so explicitly rather than assuming `uv sync` works. Test-first still holds: the failing test comes before the package.
47
+
48
+ ### 2. Implementation Phases
49
+
50
+ Break the build into sequential phases that can be executed autonomously. For each phase:
51
+
52
+ **Phase N: [Name]**
53
+
54
+ - **Goal:** What this phase accomplishes
55
+ - **Prerequisites:** What must exist before starting
56
+ - **Files to create/modify:** Explicit list
57
+ - **Validation:** How to verify the phase is complete (`uv run pytest <path>`, expected outputs; the dashboard's test/build commands for UI work)
58
+ - **Commit message:** Suggested commit message for this phase
59
+
60
+ Each phase is a unit the agents team can own end-to-end under TDD (RED → GREEN → REFACTOR).
61
+
62
+ ### 3. File-by-File Build Order
63
+
64
+ Ordered list of every file to create, with: filepath, one-line purpose, key functions/components it exports, and dependencies on other files.
65
+
66
+ ### 4. Testing Strategy
67
+
68
+ - Unit tests to write (mapped to implementation phases) — these are written **first** in Phase 6
69
+ - Integration tests
70
+ - Manual verification steps
71
+ - Test commands: `uv run pytest` (Python core), dashboard test/build commands for UI
72
+ - **Adversarial tests are mandatory for anything touching the reward.** A verifier is worth what it rejects. For each reward or gate change, plan the test that a cheating policy would pass under a weaker check and must fail under this one — degenerate solutions, edited timers/asserts, mutated fixtures, claimed-but-not-observed state. "Accepts a correct answer" is half a test.
73
+ - **Tests are deterministic and run with no network.** Fixed seeds, fixed task inputs, no wall-clock dependence. Any model call (the BYOK teacher used in distillation) sits behind an injectable seam and never runs in CI. A test whose result depends on a live model is not a test.
74
+ - Lift acceptance criteria from the aspect `spec.md` rather than inventing parallel ones.
75
+
76
+ ### 5. Environment, Determinism & Locality
77
+
78
+ - Environment variables needed (BYOK teacher keys, if any — for distillation only, never for the reward)
79
+ - External tools/services to configure (and how they're pinned): local runtime (Ollama / vLLM / transformers), model weights and revisions
80
+ - Local setup: `uv sync`; dashboard `npm install`
81
+ - Note determinism requirements explicitly — a reported gain has to be reproducible or it isn't a gain. Pin seeds, model revisions, and task sets; record them alongside any result. A number produced by an unpinned run is `UNVERIFIED`.
82
+ - **Note the train/held-out boundary.** State which data the phase touches and confirm nothing from the held-out verified set can reach training. Leakage is silent and it invalidates every number downstream — plan the check, don't assume it.
83
+ - Confirm nothing in the plan requires the user's tasks, data, or training to leave the machine.
84
+
85
+ ### 6. Edge Cases & Error Handling
86
+
87
+ - Known edge cases to handle
88
+ - Error states to account for, and **what outcome each produces**. Given Whetstone's contract, name the explicit `UNVERIFIED` path with its cause for anything that can fail to evaluate (verifier can't execute the task, run crashed mid-eval, non-deterministic result, held-out set unavailable, checkpoint won't load). A silent pass, or a fallback that promotes anyway, is never acceptable — the gate's default is *don't promote*.
89
+ - Fallback behaviors
90
+
91
+ ### 7. Agent Execution Notes
92
+
93
+ - Suggested checkpoints for human review
94
+ - Areas likely to need iteration or debugging
95
+ - Sections where the agent should ask for clarification before proceeding
96
+
97
+ ## Guidelines
98
+
99
+ - Be extremely explicit — assume no implicit knowledge
100
+ - Prefer small, testable increments over large monolithic steps
101
+ - Each phase should result in runnable (even if incomplete) code, with the suite kept green
102
+ - Flag any spec ambiguities that could block implementation
103
+ - Note assumptions clearly
104
+ - Optimize for autonomous execution by the agents team with minimal back-and-forth
105
+ - Don't plan work that trains a frontier base model, or that rewards the policy with a model's opinion instead of re-execution — flag it against the `CLAUDE.md` wedge instead
106
+ - Don't plan a capability whose dependencies aren't built. The verifier comes first: the loop, the gate, and the report are all downstream of it. Abstractions are earned by the second implementation, not designed for the first.
107
+ - Don't plan a second task family before the first one's verifier is airtight
108
+
109
+ ## Edge Cases
110
+
111
+ - **Greenfield vs. existing codebase**: For greenfield, include full setup. For existing code, skip scaffolding and focus on integration points and impact analysis. Whetstone is greenfield today — expect the setup path.
112
+ - **No aspect spec exists yet**: Derive a candidate aspect list from the PRD, ask the user to choose one, draft `spec.md`, confirm, then plan.
113
+ - **Incomplete PRD**: If the PRD lacks testable acceptance criteria or measurable metrics, flag this and recommend running `prd-interview` before planning.
114
+ - **PRD with no named held-out set**: For anything that claims an improvement, the plan can't validate without one. Flag it and get the eval set defined before planning the phase that would report a number.
115
+ - **Multiple PRDs**: Separate plans per PRD unless they share infrastructure, in which case note shared phases.
116
+ - **Multiple planning sessions**: If an aspect has multiple `plan_YYYYMMDD.md` files, base the new plan on the current `prd.md` + `spec.md`. Create a new plan file with today's date.
117
+ - **PRD with flagged gaps**: If `prd-interview` produced the PRD via the "just write it" path, gaps may be marked. Note these in the plan and recommend resolution before the affected phase.
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: whetstone-begin
3
+ description: Use when starting work on a Whetstone unit of work (a GitHub issue id or an inline brief) and you need stakeholder proposals (technical + non-technical PDFs with diagrams) before planning. Triggers on "whetstone-begin", "wb", "wb bug 12", "wb feat task-verifier", "begin full".
4
+ arguments: "type id"
5
+ ---
6
+
7
+ # Whetstone Begin (Full Track)
8
+
9
+ ## Overview
10
+
11
+ Same pipeline as `whetstone-begin-fast`, plus a **proposal phase**: after the PRD is approved, produce diagrams and two review PDFs (technical + non-technical) for stakeholders, get approval, then plan.
12
+
13
+ **Invocation:** `wb <type> <id>` — e.g. `wb bug 12`, `wb feat task-verifier`.
14
+ Arguments and conventions (type set, `<type>/<id>/aliz` branch, descriptive slug, worktree from `master`, GitHub-issue-or-inline-brief source) are identical to `whetstone-begin-fast`.
15
+
16
+ The two non-negotiables carry over from `whetstone-begin-fast`: **always work through the agents team** (every phase, including diagrams and the two proposals), and **implementation is test-first** via `superpowers:test-driven-development`, executed by the agents team.
17
+
18
+ ## Pipeline
19
+
20
+ **REQUIRED SUB-SKILL:** Use `whetstone-begin-fast` for the base pipeline.
21
+
22
+ Run its **Phase 0 → Phase 4 and the ⛔ PRD review gate exactly as written** (worktree → gather context → deep dig → `prd-interview` → `prd-generator` → stop for PRD approval).
23
+
24
+ **Then, instead of going straight to tech-plan, insert Phase A below. Only after Phase A's approval gate do you run `whetstone-begin-fast`'s Phase 5 (tech-plan) and Phase 6 (implement — TDD via the agents team).**
25
+
26
+ ### Phase A — Proposals (diagrams → PDFs)
27
+
28
+ Detailed steps, proposal structure, and `md-to-pdf` invocation: see `references/proposals.md`.
29
+
30
+ 1. **Diagram** — Use `excalidraw`. From the approved PRD, draw as many diagrams as the work needs (system/architecture, data flow, sequence, before/after, etc.). Save to `docs/planning/{slug}/diagrams/*.excalidraw`.
31
+ 2. **Export** — Use `excalidraw-to-svg` to render every diagram to `.svg` alongside the source.
32
+ 3. **Write two proposals** (markdown, in `docs/planning/{slug}/proposals/`), embedding the SVGs. Both filenames are prefixed with the type and id so stakeholders can identify the source at a glance:
33
+ - `<type>-<id>-technical-proposal.md` (e.g. `feat-task-verifier-technical-proposal.md`) — for engineers: architecture, components, data flow, risks, effort.
34
+ - `<type>-<id>-non-technical-proposal.md` — for stakeholders: problem, value, what changes for users, timeline, plain language.
35
+ Generate the two in parallel (see Agents team).
36
+ 4. **PDF** — Use `md-to-pdf` to produce `<type>-<id>-technical-proposal.pdf` and `<type>-<id>-non-technical-proposal.pdf`.
37
+
38
+ ### ⛔ Approval gate — STOP
39
+
40
+ Present both PDFs. **Wait for the user's explicit approval** of the proposals before planning. Do not auto-advance.
41
+
42
+ ### Final phases — Plan & implement
43
+
44
+ Run `whetstone-begin-fast`'s **Phase 5 (tech-plan)** → `docs/planning/{slug}/{aspect}/plan_YYYYMMDD.md`, then its **Phase 6 (implement)** — strict TDD (`superpowers:test-driven-development`) executed through the agents team (`superpowers:subagent-driven-development`), one agent per plan task, branch kept green (`uv run pytest`, once the Python core exists).
45
+
46
+ ## Artifact layout (inside the worktree)
47
+
48
+ ```
49
+ docs/planning/
50
+ ├── _card/issue.md ← gh dump or inline brief
51
+ ├── {slug}/prd.md ← PRD (approved at the first gate)
52
+ ├── {slug}/diagrams/*.excalidraw|.svg ← Phase A
53
+ ├── {slug}/proposals/<type>-<id>-technical-proposal.{md,pdf}
54
+ ├── {slug}/proposals/<type>-<id>-non-technical-proposal.{md,pdf}
55
+ └── {slug}/{aspect}/plan_*.md ← tech-plan
56
+ ```
57
+
58
+ ## Agents team (mandatory)
59
+
60
+ Run **every** phase through the agents team — never serially in the main thread.
61
+
62
+ **REQUIRED SUB-SKILL:** Use `superpowers:dispatching-parallel-agents`; use `superpowers:subagent-driven-development` for Phase 6.
63
+
64
+ - Base pipeline: fan out context-gathering across related issues/PRs (as in `whetstone-begin-fast`).
65
+ - Phase A: generate independent diagrams with parallel agents; write the technical and non-technical proposals concurrently (two agents, same PRD + SVGs).
66
+ - Phase 6: one agent per independent plan task, each in strict TDD.
67
+
68
+ ## Common mistakes
69
+
70
+ | Mistake | Fix |
71
+ |---|---|
72
+ | Writing proposals before the PRD is approved | Phase A starts only after the first ⛔ gate |
73
+ | One proposal for both audiences | Always two: technical and non-technical |
74
+ | Embedding `.excalidraw` instead of `.svg` | PDFs embed the exported SVGs |
75
+ | Skipping the proposal approval gate | Proposals must be approved before tech-plan |
76
+ | Diagrams/PDFs outside the worktree | Everything lives under the worktree's `docs/planning/{slug}/` |
77
+ | Drawing a projected gain as if it were measured | A proposal states the target and says it's unmeasured; only the verifier produces a real delta |
78
+ | A diagram whose reward arrow ends at a model | The reward comes from execution, never from a judge — draw it that way |
79
+ | Implementing serially or test-after | Phase 6 is agents-team + strict TDD (RED before GREEN) |
@@ -0,0 +1,99 @@
1
+ # Phase A — Diagrams & proposal PDFs
2
+
3
+ Runs after the PRD approval gate. Everything is written inside the worktree under
4
+ `docs/planning/{slug}/`.
5
+
6
+ ## 1. Diagrams (`excalidraw`)
7
+
8
+ Use the `excalidraw` skill. Decide how many diagrams the work actually needs —
9
+ don't pad. Typical set for Whetstone:
10
+
11
+ | Diagram | When to include |
12
+ |---|---|
13
+ | System / architecture | Almost always — where the change lives in the nightly loop: task family → verifier → self-play/RL → distillation → promotion gate → morning report |
14
+ | Data flow | Data moves across steps (user's tasks → rollouts → execution-grounded reward → training set → checkpoint → held-out eval → report) |
15
+ | Sequence | A multi-step interaction matters (a night: sample tasks, roll out, verify, train, evaluate, promote-or-discard, report) |
16
+ | Before / after | Behavior or structure changes visibly |
17
+ | State machine | A checkpoint lifecycle changes (candidate → evaluated → promoted / rejected / `UNVERIFIED`) |
18
+
19
+ Save sources to `docs/planning/{slug}/diagrams/`, descriptive names
20
+ (e.g. `architecture.excalidraw`, `nightly-loop.excalidraw`).
21
+
22
+ **Every text element must set `fontFamily: 2` (Helvetica)** — the excalidraw default is hand-drawn (Virgil/Excalifont) and unreadable in stakeholder PDFs. See the excalidraw skill's Rule 5.
23
+
24
+ **Diagram the loop honestly.** Two rules, and they are the whole product:
25
+
26
+ - **The reward arrow ends at execution, never at a model.** If a diagram shows where the reward comes from, it comes from re-execution against the verifier. A cloud teacher model may appear — but only on the *distillation* path, never on the reward path. A diagram that shows a model scoring the policy is drawing a different product.
27
+ - **The gate has three exits, not one.** Promotion is `promoted` / `rejected` / `UNVERIFIED`, and `UNVERIFIED` is never collapsed into `promoted` for visual tidiness. If the diagram shows a gain, label whether it's a *target* (unmeasured) or a *measured* delta on the held-out verified set.
28
+
29
+ ## 2. Export to SVG (`excalidraw-to-svg`)
30
+
31
+ Use the `excalidraw-to-svg` skill to render every `.excalidraw` to a sibling `.svg`.
32
+ Batch-export the whole `diagrams/` directory. SVG (not PNG) keeps text crisp in the PDF.
33
+
34
+ ## 3. Write the two proposals
35
+
36
+ Markdown, in `docs/planning/{slug}/proposals/`. Embed the SVGs with **relative** paths
37
+ (`../diagrams/architecture.svg`) so `md-to-pdf` inlines them. Generate the two
38
+ concurrently — same PRD + diagrams, different audience.
39
+
40
+ ### `<type>-<id>-technical-proposal.md` (engineers)
41
+
42
+ Filename is prefixed with the type and id (e.g. `feat-task-verifier-technical-proposal.md`) so stakeholders can identify which unit of work a proposal belongs to at a glance.
43
+
44
+ - **Summary** — one paragraph: what we're building and why.
45
+ - **Current state** — how it works today (link before/after diagram).
46
+ - **Proposed design** — architecture + components (embed architecture/data-flow/sequence SVGs).
47
+ - **Data & interface changes** — task format, verifier contract, reward signal, checkpoint/eval artifacts, report schema.
48
+ - **Risks & trade-offs** — failure modes, reward-hacking surface introduced or closed, alternatives considered.
49
+ - **Effort & sequencing** — rough phases, dependencies. Name which core-loop element (① verifier, ② nightly loop, ③ promotion gate, ④ morning report, ⑤ local/private — `CLAUDE.md`) this belongs to, and the roadmap phase once `docs/ROADMAP.md` exists.
50
+ - **Open questions** — carried from the PRD.
51
+
52
+ ### `<type>-<id>-non-technical-proposal.md` (stakeholders)
53
+
54
+ Same naming convention (e.g. `feat-task-verifier-non-technical-proposal.md`).
55
+
56
+ - **The problem** — in plain language, no jargon.
57
+ - **What we'll do** — the solution at a high level (embed a simplified diagram).
58
+ - **Why it matters** — value to someone who wants their model to get better at their own work, overnight, without trusting a number they can't check.
59
+ - **What changes for users** — visible impact.
60
+ - **Timeline** — rough, in weeks, not story points.
61
+ - **Risks** — stated honestly, in plain terms.
62
+
63
+ Keep the non-technical version free of stack names, code, and acronyms unless defined (spell out RL, RLVR, LoRA, distillation the first time, or drop them). Don't claim the loop proves more than it checks: a projected improvement is a target, not a result. If the honest answer is "we don't know the size of the gain yet, that's what this measures", say exactly that — an unhyped number is the product's whole positioning.
64
+
65
+ ## 4. Convert to PDF (`md-to-pdf`)
66
+
67
+ Use the `md-to-pdf` skill. On macOS, point Puppeteer at system Chrome. Output lands
68
+ next to the input as `<name>.pdf`.
69
+
70
+ ⚠️ **The proposals embed `../diagrams/*.svg`, which sits ABOVE the `proposals/` folder.**
71
+ md-to-pdf's file server is rooted at the markdown's own directory by default, so `../` paths
72
+ **silently render as broken images**. You MUST pass `--basedir ..` (the `{slug}` dir, which
73
+ contains both `proposals/` and `diagrams/`):
74
+
75
+ ```bash
76
+ cd docs/planning/{slug}/proposals
77
+ PUPPETEER_EXECUTABLE_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
78
+ md-to-pdf <type>-<id>-technical-proposal.md --basedir ..
79
+ PUPPETEER_EXECUTABLE_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
80
+ md-to-pdf <type>-<id>-non-technical-proposal.md --basedir ..
81
+ ```
82
+
83
+ Result: `<type>-<id>-technical-proposal.pdf` and `<type>-<id>-non-technical-proposal.pdf`.
84
+
85
+ **Verify before the approval gate (do not skip):** a missing image does NOT fail the command,
86
+ so you must *look* at the output. Render a page to an image and inspect it:
87
+
88
+ ```bash
89
+ pdftoppm -png -r 70 -f 1 -l 1 <type>-<id>-technical-proposal.pdf /tmp/check # then Read /tmp/check-1.png
90
+ ```
91
+
92
+ Both PDFs must exist, be non-trivial in size, and show the diagrams (not broken-image icons).
93
+ If an image is broken, the path escaped the basedir — fix `--basedir`/filenames (URL-encode
94
+ spaces as `%20`) and re-run.
95
+
96
+ ## 5. Approval gate
97
+
98
+ Present both PDFs to the user and **stop**. Only after explicit approval continue to the
99
+ `tech-plan` phase.