dsh-pstack 0.1.0 → 0.2.0-beta.3

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 (406) hide show
  1. package/LICENSE +2 -3
  2. package/README.md +174 -148
  3. package/README.zh.md +185 -0
  4. package/assets/logo.png +0 -0
  5. package/cordis.patch.yml +103 -14
  6. package/dist/host-contract-CUPSpeNk.d.mts +22 -0
  7. package/dist/index.d.mts +87 -14
  8. package/dist/index.mjs +370 -143
  9. package/dist/models.d.mts +44 -0
  10. package/dist/models.mjs +201 -0
  11. package/dist/paths-BT77khwm.mjs +48 -0
  12. package/dist/{LICENSE → pstack/LICENSE} +1 -2
  13. package/dist/pstack/README.md +291 -0
  14. package/{assets → dist/pstack}/agents/comment-sicko.md +1 -1
  15. package/dist/pstack/agents/poteto-agent.md +9 -0
  16. package/{assets → dist/pstack}/docs/guide/01-setup.md +11 -9
  17. package/dist/{assets → pstack}/docs/guide/02-poteto-mode.md +2 -2
  18. package/{assets → dist/pstack}/docs/guide/04-design.md +4 -4
  19. package/dist/{assets → pstack}/docs/guide/05-build-and-clean.md +3 -3
  20. package/dist/{assets → pstack}/docs/guide/06-verify-and-ship.md +11 -1
  21. package/{assets → dist/pstack}/docs/guide/07-overnight.md +10 -10
  22. package/dist/{assets → pstack}/docs/guide/09-make-it-yours.md +4 -4
  23. package/{assets → dist/pstack}/docs/guide/10-recipes-and-pitfalls.md +6 -4
  24. package/dist/pstack/docs/guide/images/design.jpg +0 -0
  25. package/dist/pstack/docs/guide/images/overnight.jpg +0 -0
  26. package/dist/pstack/docs/guide/images/recipes.jpg +0 -0
  27. package/dist/pstack/docs/guide/images/router.jpg +0 -0
  28. package/dist/pstack/docs/guide/images/understanding.jpg +0 -0
  29. package/dist/pstack/docs/guide/images/verification.jpg +0 -0
  30. package/dist/pstack/docs/harness/dsh.md +98 -0
  31. package/{assets → dist/pstack}/skills/architect/SKILL.md +5 -5
  32. package/dist/pstack/skills/arena/SKILL.md +50 -0
  33. package/{assets → dist/pstack}/skills/automate-me/SKILL.md +14 -13
  34. package/dist/{assets → pstack}/skills/benchmark-checklist/SKILL.md +1 -3
  35. package/dist/{assets → pstack}/skills/blast-radius/SKILL.md +1 -3
  36. package/{assets → dist/pstack}/skills/bro/SKILL.md +0 -2
  37. package/dist/{assets → pstack}/skills/correct/SKILL.md +1 -3
  38. package/{assets → dist/pstack}/skills/create-formal-verification-skill/SKILL.md +5 -3
  39. package/{assets → dist/pstack}/skills/create-verification-skill/SKILL.md +6 -6
  40. package/{assets → dist/pstack}/skills/figure-it-out/SKILL.md +4 -4
  41. package/dist/{assets → pstack}/skills/how/SKILL.md +4 -4
  42. package/{assets → dist/pstack}/skills/how/references/explainer-prompt.md +1 -1
  43. package/dist/pstack/skills/in-your-own-words/SKILL.md +7 -0
  44. package/dist/pstack/skills/interrogate/SKILL.md +33 -0
  45. package/{assets → dist/pstack}/skills/ketchup/SKILL.md +1 -3
  46. package/dist/pstack/skills/ketchup-video/SKILL.md +29 -0
  47. package/{assets → dist/pstack}/skills/maintain-formal-verification-skill/SKILL.md +2 -2
  48. package/dist/{assets → pstack}/skills/maintain-verification-skill/SKILL.md +3 -3
  49. package/dist/pstack/skills/make-bot-ui/SKILL.md +117 -0
  50. package/{assets → dist/pstack}/skills/no-comments/SKILL.md +4 -4
  51. package/{assets → dist/pstack}/skills/poteto-help/SKILL.md +21 -17
  52. package/dist/{assets → pstack}/skills/poteto-help/references/prompting.md +1 -1
  53. package/dist/{assets → pstack}/skills/poteto-help/references/recipes.md +3 -3
  54. package/{assets → dist/pstack}/skills/poteto-mode/SKILL.md +20 -21
  55. package/dist/{assets → pstack}/skills/poteto-mode/playbooks/authoring-a-skill.md +1 -1
  56. package/dist/{assets → pstack}/skills/poteto-mode/playbooks/autonomous-run.md +2 -2
  57. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/autopilot-full.md +7 -7
  58. package/dist/pstack/skills/poteto-mode/playbooks/autopilot-stack.md +8 -0
  59. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/babysit.md +3 -3
  60. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/bug-fix.md +3 -3
  61. package/dist/{assets → pstack}/skills/poteto-mode/playbooks/eval.md +1 -1
  62. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/feature.md +1 -1
  63. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/hillclimb.md +1 -1
  64. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/multi-phase-plan.md +13 -13
  65. package/dist/{assets → pstack}/skills/poteto-mode/playbooks/opening-a-pr.md +3 -3
  66. package/dist/pstack/skills/poteto-mode/playbooks/orchestrate.md +25 -0
  67. package/dist/{assets → pstack}/skills/poteto-mode/playbooks/perf-issue.md +2 -2
  68. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/prototype.md +1 -1
  69. package/dist/{assets → pstack}/skills/poteto-mode/playbooks/refactoring.md +2 -2
  70. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/runtime-forensics.md +1 -1
  71. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/session-pickup.md +1 -1
  72. package/dist/{assets → pstack}/skills/poteto-mode/playbooks/shipping.md +2 -2
  73. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/visual-parity.md +1 -1
  74. package/dist/{assets → pstack}/skills/poteto-mode/playbooks/worktree-cleanup.md +2 -2
  75. package/{assets → dist/pstack}/skills/poteto-mode/scripts/check-plan.mjs +83 -70
  76. package/dist/{assets/skills/poteto-mode/scripts/check-plan.test.ts → pstack/skills/poteto-mode/scripts/check-plan.test.mjs} +53 -21
  77. package/dist/pstack/skills/poteto-mode/scripts/expect.mjs +254 -0
  78. package/dist/pstack/skills/poteto-mode/scripts/support.mjs +93 -0
  79. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/cli.mjs +123 -0
  80. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/cli.test.mjs +217 -0
  81. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.mjs +119 -0
  82. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/github.mjs +626 -0
  83. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/github.test.mjs +521 -0
  84. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/policy.mjs +657 -0
  85. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/policy.test.mjs +523 -0
  86. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/render.mjs +106 -0
  87. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/types.mjs +9 -0
  88. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/watch-pr.mjs +5 -0
  89. package/dist/pstack/skills/poteto-mode/scripts/worktree-audit.mjs +668 -0
  90. package/dist/pstack/skills/poteto-mode/scripts/worktree-audit.test.mjs +134 -0
  91. package/{assets → dist/pstack}/skills/principle-attack-the-premise/SKILL.md +1 -3
  92. package/{assets → dist/pstack}/skills/principle-boundary-discipline/SKILL.md +1 -3
  93. package/{assets → dist/pstack}/skills/principle-build-the-lever/SKILL.md +0 -3
  94. package/dist/pstack/skills/principle-encode-lessons-in-structure/SKILL.md +11 -0
  95. package/dist/pstack/skills/principle-exhaust-the-design-space/SKILL.md +9 -0
  96. package/{assets → dist/pstack}/skills/principle-experience-first/SKILL.md +1 -3
  97. package/dist/{assets → pstack}/skills/principle-explain-the-number/SKILL.md +3 -4
  98. package/dist/{assets → pstack}/skills/principle-fix-root-causes/SKILL.md +1 -3
  99. package/{assets → dist/pstack}/skills/principle-foundational-thinking/SKILL.md +0 -2
  100. package/dist/{assets → pstack}/skills/principle-guard-the-context-window/SKILL.md +0 -2
  101. package/dist/{assets → pstack}/skills/principle-laziness-protocol/SKILL.md +1 -3
  102. package/dist/{assets → pstack}/skills/principle-make-operations-idempotent/SKILL.md +1 -3
  103. package/dist/{assets → pstack}/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +1 -3
  104. package/{assets → dist/pstack}/skills/principle-minimize-reader-load/SKILL.md +1 -3
  105. package/{assets → dist/pstack}/skills/principle-model-the-domain/SKILL.md +1 -3
  106. package/{assets → dist/pstack}/skills/principle-never-block-on-the-human/SKILL.md +1 -3
  107. package/dist/{assets → pstack}/skills/principle-outcome-oriented-execution/SKILL.md +1 -3
  108. package/{assets → dist/pstack}/skills/principle-prove-it-works/SKILL.md +3 -3
  109. package/dist/{assets → pstack}/skills/principle-redesign-from-first-principles/SKILL.md +1 -3
  110. package/{assets → dist/pstack}/skills/principle-separate-before-serializing-shared-state/SKILL.md +1 -3
  111. package/dist/{assets → pstack}/skills/principle-sequence-verifiable-units/SKILL.md +1 -3
  112. package/dist/{assets → pstack}/skills/principle-subtract-before-you-add/SKILL.md +1 -3
  113. package/{assets → dist/pstack}/skills/principle-test-behavior-not-implementation/SKILL.md +1 -3
  114. package/{assets → dist/pstack}/skills/principle-type-system-discipline/SKILL.md +1 -3
  115. package/dist/{assets → pstack}/skills/recall/SKILL.md +4 -4
  116. package/dist/pstack/skills/reflect/SKILL.md +71 -0
  117. package/{assets → dist/pstack}/skills/reflect/references/divergent-reviewer.md +1 -1
  118. package/{assets → dist/pstack}/skills/reflect/references/judgment-reviewer.md +1 -1
  119. package/{assets → dist/pstack}/skills/reflect/references/synthesizer.md +3 -3
  120. package/dist/{assets → pstack}/skills/reflect/references/tooling-reviewer.md +1 -1
  121. package/dist/pstack/skills/setup-pstack/SKILL.md +80 -0
  122. package/{assets → dist/pstack}/skills/sharpen/SKILL.md +1 -3
  123. package/{assets → dist/pstack}/skills/show-me-your-work/SKILL.md +3 -3
  124. package/dist/pstack/skills/show-me-your-work/scripts/log.mjs +106 -0
  125. package/dist/pstack/skills/show-me-your-work/scripts/log.test.mjs +56 -0
  126. package/dist/pstack/skills/statechart/SKILL.md +82 -0
  127. package/dist/pstack/skills/statechart/references/render.md +93 -0
  128. package/dist/pstack/skills/statechart/scripts/backends/cfg.mjs +31 -0
  129. package/dist/pstack/skills/statechart/scripts/backends/mermaid.mjs +186 -0
  130. package/dist/pstack/skills/statechart/scripts/backends/plain-text.mjs +62 -0
  131. package/dist/pstack/skills/statechart/scripts/backends/report.mjs +84 -0
  132. package/dist/pstack/skills/statechart/scripts/frontends/config.mjs +268 -0
  133. package/dist/pstack/skills/statechart/scripts/frontends/dot.mjs +67 -0
  134. package/dist/pstack/skills/statechart/scripts/frontends/marks.mjs +94 -0
  135. package/dist/pstack/skills/statechart/scripts/frontends/messages.mjs +48 -0
  136. package/dist/pstack/skills/statechart/scripts/frontends/spec.mjs +101 -0
  137. package/dist/pstack/skills/statechart/scripts/frontends/trace.mjs +39 -0
  138. package/dist/pstack/skills/statechart/scripts/frontends/value.mjs +180 -0
  139. package/dist/pstack/skills/statechart/scripts/frontends/verdict.mjs +40 -0
  140. package/dist/pstack/skills/statechart/scripts/frontends/view.mjs +99 -0
  141. package/dist/pstack/skills/statechart/scripts/ir.mjs +277 -0
  142. package/dist/pstack/skills/statechart/scripts/passes/annotate.mjs +92 -0
  143. package/dist/pstack/skills/statechart/scripts/passes/label.mjs +210 -0
  144. package/dist/pstack/skills/statechart/scripts/passes/lift.mjs +84 -0
  145. package/dist/pstack/skills/statechart/scripts/passes/loop-check.mjs +47 -0
  146. package/dist/pstack/skills/statechart/scripts/passes/paths.mjs +72 -0
  147. package/dist/pstack/skills/statechart/scripts/passes/reach.mjs +135 -0
  148. package/dist/pstack/skills/statechart/scripts/passes/region-check.mjs +82 -0
  149. package/dist/pstack/skills/statechart/scripts/passes/regions.mjs +268 -0
  150. package/dist/pstack/skills/statechart/scripts/pipeline.mjs +72 -0
  151. package/dist/pstack/skills/statechart/scripts/run.mjs +440 -0
  152. package/dist/pstack/skills/statechart/scripts/statechart.mjs +155 -0
  153. package/dist/pstack/skills/statechart/scripts/statechart.test.mjs +198 -0
  154. package/dist/pstack/skills/statechart/scripts/worker.mjs +31 -0
  155. package/dist/pstack/skills/swarm/SKILL.md +43 -0
  156. package/{assets → dist/pstack}/skills/tdd/SKILL.md +1 -3
  157. package/{assets → dist/pstack}/skills/teach/SKILL.md +3 -3
  158. package/{assets → dist/pstack}/skills/technical-writing/SKILL.md +2 -2
  159. package/{assets → dist/pstack}/skills/typescript-best-practices/SKILL.md +1 -2
  160. package/{assets → dist/pstack}/skills/unslop/SKILL.md +0 -2
  161. package/dist/{assets → pstack}/skills/why/SKILL.md +9 -9
  162. package/dist/script.d.mts +91 -0
  163. package/dist/script.mjs +485 -0
  164. package/dist/skill.d.mts +38 -0
  165. package/dist/skill.mjs +183 -0
  166. package/dist/skills/authored/decision-audit/SKILL.md +99 -0
  167. package/dist/skills/authored/decision-audit/SKILL.zh.md +99 -0
  168. package/dist/skills/authored/decision-audit/references/recover-commit.md +17 -0
  169. package/dist/skills/authored/decision-audit/references/recover-commit.zh.md +17 -0
  170. package/dist/skills/authored/decision-write/SKILL.md +131 -0
  171. package/dist/skills/authored/decision-write/SKILL.zh.md +131 -0
  172. package/dist/skills/authored/decision-write/references/land.md +48 -0
  173. package/dist/skills/authored/decision-write/references/land.zh.md +48 -0
  174. package/dist/skills/authored/setup-project-docs/SKILL.md +58 -0
  175. package/dist/skills/authored/setup-project-docs/SKILL.zh.md +58 -0
  176. package/dist/skills/authored/setup-project-docs/references/decision-conventions.md +11 -0
  177. package/dist/skills/authored/setup-project-docs/references/decision-conventions.zh.md +11 -0
  178. package/dist/skills/vendored/retro/SKILL.md +44 -0
  179. package/dist/skills/vendored/retro/agents/openai.yaml +5 -0
  180. package/dist/skills/vendored/writing-for-agents/SKILL-MECHANICS.md +22 -0
  181. package/dist/skills/vendored/writing-for-agents/SKILL.md +81 -0
  182. package/dist/skills/vendored/writing-for-agents/agents/openai.yaml +3 -0
  183. package/dist/subagent.d.mts +175 -106
  184. package/dist/subagent.mjs +1012 -344
  185. package/locale/en.json +7 -0
  186. package/locale/zh.json +7 -0
  187. package/package.json +61 -50
  188. package/assets/agents/poteto-agent.md +0 -8
  189. package/assets/docs/guide/02-poteto-mode.md +0 -139
  190. package/assets/docs/guide/05-build-and-clean.md +0 -83
  191. package/assets/docs/guide/06-verify-and-ship.md +0 -152
  192. package/assets/docs/guide/09-make-it-yours.md +0 -100
  193. package/assets/docs/harness/dsh.md +0 -65
  194. package/assets/docs/pstack-models.example.md +0 -23
  195. package/assets/skills/arena/SKILL.md +0 -50
  196. package/assets/skills/benchmark-checklist/SKILL.md +0 -41
  197. package/assets/skills/blast-radius/SKILL.md +0 -52
  198. package/assets/skills/correct/SKILL.md +0 -34
  199. package/assets/skills/how/SKILL.md +0 -38
  200. package/assets/skills/in-your-own-words/SKILL.md +0 -9
  201. package/assets/skills/interrogate/SKILL.md +0 -69
  202. package/assets/skills/interrogate/references/code-quality-review.md +0 -47
  203. package/assets/skills/interrogate/references/lead-judgment.md +0 -39
  204. package/assets/skills/interrogate/references/reviewer-prompt.md +0 -62
  205. package/assets/skills/interrogate/references/rubric.md +0 -77
  206. package/assets/skills/maintain-verification-skill/SKILL.md +0 -41
  207. package/assets/skills/poteto-help/references/prompting.md +0 -51
  208. package/assets/skills/poteto-help/references/recipes.md +0 -51
  209. package/assets/skills/poteto-mode/playbooks/authoring-a-skill.md +0 -12
  210. package/assets/skills/poteto-mode/playbooks/autonomous-run.md +0 -13
  211. package/assets/skills/poteto-mode/playbooks/autopilot-stack.md +0 -12
  212. package/assets/skills/poteto-mode/playbooks/eval.md +0 -25
  213. package/assets/skills/poteto-mode/playbooks/opening-a-pr.md +0 -34
  214. package/assets/skills/poteto-mode/playbooks/orchestrate.md +0 -112
  215. package/assets/skills/poteto-mode/playbooks/perf-issue.md +0 -25
  216. package/assets/skills/poteto-mode/playbooks/refactoring.md +0 -16
  217. package/assets/skills/poteto-mode/playbooks/shipping.md +0 -12
  218. package/assets/skills/poteto-mode/playbooks/worktree-cleanup.md +0 -12
  219. package/assets/skills/poteto-mode/scripts/bootstrap.ts +0 -62
  220. package/assets/skills/poteto-mode/scripts/bun.lock +0 -67
  221. package/assets/skills/poteto-mode/scripts/check-plan.test.ts +0 -96
  222. package/assets/skills/poteto-mode/scripts/orch/orch.test.ts +0 -761
  223. package/assets/skills/poteto-mode/scripts/orch/orch.ts +0 -590
  224. package/assets/skills/poteto-mode/scripts/orch/store.ts +0 -1677
  225. package/assets/skills/poteto-mode/scripts/package.json +0 -16
  226. package/assets/skills/poteto-mode/scripts/watch-pr/cli.test.ts +0 -224
  227. package/assets/skills/poteto-mode/scripts/watch-pr/cli.ts +0 -223
  228. package/assets/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +0 -129
  229. package/assets/skills/poteto-mode/scripts/watch-pr/github.test.ts +0 -436
  230. package/assets/skills/poteto-mode/scripts/watch-pr/github.ts +0 -718
  231. package/assets/skills/poteto-mode/scripts/watch-pr/policy.test.ts +0 -420
  232. package/assets/skills/poteto-mode/scripts/watch-pr/policy.ts +0 -836
  233. package/assets/skills/poteto-mode/scripts/watch-pr/render.ts +0 -169
  234. package/assets/skills/poteto-mode/scripts/watch-pr/tsconfig.json +0 -13
  235. package/assets/skills/poteto-mode/scripts/watch-pr/types.compile.ts +0 -93
  236. package/assets/skills/poteto-mode/scripts/watch-pr/types.ts +0 -413
  237. package/assets/skills/poteto-mode/scripts/watch-pr/watch-pr +0 -6
  238. package/assets/skills/poteto-mode/scripts/worktree-audit.sh +0 -127
  239. package/assets/skills/principle-encode-lessons-in-structure/SKILL.md +0 -13
  240. package/assets/skills/principle-exhaust-the-design-space/SKILL.md +0 -11
  241. package/assets/skills/principle-explain-the-number/SKILL.md +0 -19
  242. package/assets/skills/principle-fix-root-causes/SKILL.md +0 -23
  243. package/assets/skills/principle-guard-the-context-window/SKILL.md +0 -14
  244. package/assets/skills/principle-laziness-protocol/SKILL.md +0 -12
  245. package/assets/skills/principle-make-operations-idempotent/SKILL.md +0 -24
  246. package/assets/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +0 -16
  247. package/assets/skills/principle-outcome-oriented-execution/SKILL.md +0 -23
  248. package/assets/skills/principle-redesign-from-first-principles/SKILL.md +0 -18
  249. package/assets/skills/principle-sequence-verifiable-units/SKILL.md +0 -19
  250. package/assets/skills/principle-subtract-before-you-add/SKILL.md +0 -20
  251. package/assets/skills/recall/SKILL.md +0 -37
  252. package/assets/skills/reflect/SKILL.md +0 -70
  253. package/assets/skills/reflect/references/tooling-reviewer.md +0 -48
  254. package/assets/skills/setup-pstack/SKILL.md +0 -76
  255. package/assets/skills/show-me-your-work/scripts/log.sh +0 -42
  256. package/assets/skills/swarm/SKILL.md +0 -41
  257. package/assets/skills/why/SKILL.md +0 -100
  258. package/dist/README.md +0 -159
  259. package/dist/assets/agents/comment-sicko.md +0 -32
  260. package/dist/assets/agents/poteto-agent.md +0 -8
  261. package/dist/assets/docs/guide/01-setup.md +0 -64
  262. package/dist/assets/docs/guide/03-understand.md +0 -79
  263. package/dist/assets/docs/guide/04-design.md +0 -133
  264. package/dist/assets/docs/guide/07-overnight.md +0 -122
  265. package/dist/assets/docs/guide/08-principles.md +0 -72
  266. package/dist/assets/docs/guide/10-recipes-and-pitfalls.md +0 -180
  267. package/dist/assets/docs/guide/README.md +0 -38
  268. package/dist/assets/docs/harness/dsh.md +0 -65
  269. package/dist/assets/docs/pstack-models.example.md +0 -23
  270. package/dist/assets/skills/architect/SKILL.md +0 -81
  271. package/dist/assets/skills/architect/references/design-red-flags.md +0 -57
  272. package/dist/assets/skills/architect/references/rationale-template.md +0 -35
  273. package/dist/assets/skills/architect/references/runner-prompt.md +0 -20
  274. package/dist/assets/skills/arena/SKILL.md +0 -50
  275. package/dist/assets/skills/automate-me/SKILL.md +0 -105
  276. package/dist/assets/skills/bro/SKILL.md +0 -9
  277. package/dist/assets/skills/create-formal-verification-skill/SKILL.md +0 -43
  278. package/dist/assets/skills/create-verification-skill/SKILL.md +0 -46
  279. package/dist/assets/skills/create-verification-skill/references/feature-map-example/README.md +0 -47
  280. package/dist/assets/skills/create-verification-skill/references/feature-map-example/create-note.md +0 -39
  281. package/dist/assets/skills/create-verification-skill/references/feature-map-example/search.md +0 -45
  282. package/dist/assets/skills/figure-it-out/SKILL.md +0 -54
  283. package/dist/assets/skills/how/references/explainer-prompt.md +0 -55
  284. package/dist/assets/skills/how/references/explorer-prompt.md +0 -35
  285. package/dist/assets/skills/in-your-own-words/SKILL.md +0 -9
  286. package/dist/assets/skills/interrogate/SKILL.md +0 -69
  287. package/dist/assets/skills/interrogate/references/code-quality-review.md +0 -47
  288. package/dist/assets/skills/interrogate/references/lead-judgment.md +0 -39
  289. package/dist/assets/skills/interrogate/references/reviewer-prompt.md +0 -62
  290. package/dist/assets/skills/interrogate/references/rubric.md +0 -77
  291. package/dist/assets/skills/ketchup/SKILL.md +0 -45
  292. package/dist/assets/skills/maintain-formal-verification-skill/SKILL.md +0 -60
  293. package/dist/assets/skills/no-comments/SKILL.md +0 -26
  294. package/dist/assets/skills/poteto-help/SKILL.md +0 -161
  295. package/dist/assets/skills/poteto-mode/SKILL.md +0 -153
  296. package/dist/assets/skills/poteto-mode/playbooks/autopilot-full.md +0 -25
  297. package/dist/assets/skills/poteto-mode/playbooks/autopilot-stack.md +0 -12
  298. package/dist/assets/skills/poteto-mode/playbooks/babysit.md +0 -23
  299. package/dist/assets/skills/poteto-mode/playbooks/bug-fix.md +0 -15
  300. package/dist/assets/skills/poteto-mode/playbooks/feature.md +0 -21
  301. package/dist/assets/skills/poteto-mode/playbooks/hillclimb.md +0 -21
  302. package/dist/assets/skills/poteto-mode/playbooks/investigation.md +0 -14
  303. package/dist/assets/skills/poteto-mode/playbooks/multi-phase-plan.md +0 -155
  304. package/dist/assets/skills/poteto-mode/playbooks/orchestrate.md +0 -112
  305. package/dist/assets/skills/poteto-mode/playbooks/pause-safely.md +0 -10
  306. package/dist/assets/skills/poteto-mode/playbooks/prototype.md +0 -14
  307. package/dist/assets/skills/poteto-mode/playbooks/runtime-forensics.md +0 -11
  308. package/dist/assets/skills/poteto-mode/playbooks/session-pickup.md +0 -11
  309. package/dist/assets/skills/poteto-mode/playbooks/trace-forensics.md +0 -14
  310. package/dist/assets/skills/poteto-mode/playbooks/visual-parity.md +0 -11
  311. package/dist/assets/skills/poteto-mode/references/bugbot-triage.md +0 -142
  312. package/dist/assets/skills/poteto-mode/scripts/bootstrap.ts +0 -62
  313. package/dist/assets/skills/poteto-mode/scripts/bun.lock +0 -67
  314. package/dist/assets/skills/poteto-mode/scripts/check-plan.mjs +0 -205
  315. package/dist/assets/skills/poteto-mode/scripts/orch/orch.test.ts +0 -761
  316. package/dist/assets/skills/poteto-mode/scripts/orch/orch.ts +0 -590
  317. package/dist/assets/skills/poteto-mode/scripts/orch/store.ts +0 -1677
  318. package/dist/assets/skills/poteto-mode/scripts/package.json +0 -16
  319. package/dist/assets/skills/poteto-mode/scripts/watch-pr/cli.test.ts +0 -224
  320. package/dist/assets/skills/poteto-mode/scripts/watch-pr/cli.ts +0 -223
  321. package/dist/assets/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +0 -129
  322. package/dist/assets/skills/poteto-mode/scripts/watch-pr/github.test.ts +0 -436
  323. package/dist/assets/skills/poteto-mode/scripts/watch-pr/github.ts +0 -718
  324. package/dist/assets/skills/poteto-mode/scripts/watch-pr/policy.test.ts +0 -420
  325. package/dist/assets/skills/poteto-mode/scripts/watch-pr/policy.ts +0 -836
  326. package/dist/assets/skills/poteto-mode/scripts/watch-pr/render.ts +0 -169
  327. package/dist/assets/skills/poteto-mode/scripts/watch-pr/tsconfig.json +0 -13
  328. package/dist/assets/skills/poteto-mode/scripts/watch-pr/types.compile.ts +0 -93
  329. package/dist/assets/skills/poteto-mode/scripts/watch-pr/types.ts +0 -413
  330. package/dist/assets/skills/poteto-mode/scripts/watch-pr/watch-pr +0 -6
  331. package/dist/assets/skills/poteto-mode/scripts/worktree-audit.sh +0 -127
  332. package/dist/assets/skills/principle-attack-the-premise/SKILL.md +0 -23
  333. package/dist/assets/skills/principle-boundary-discipline/SKILL.md +0 -36
  334. package/dist/assets/skills/principle-build-the-lever/SKILL.md +0 -26
  335. package/dist/assets/skills/principle-encode-lessons-in-structure/SKILL.md +0 -13
  336. package/dist/assets/skills/principle-exhaust-the-design-space/SKILL.md +0 -11
  337. package/dist/assets/skills/principle-experience-first/SKILL.md +0 -21
  338. package/dist/assets/skills/principle-foundational-thinking/SKILL.md +0 -23
  339. package/dist/assets/skills/principle-minimize-reader-load/SKILL.md +0 -20
  340. package/dist/assets/skills/principle-model-the-domain/SKILL.md +0 -26
  341. package/dist/assets/skills/principle-never-block-on-the-human/SKILL.md +0 -17
  342. package/dist/assets/skills/principle-prove-it-works/SKILL.md +0 -24
  343. package/dist/assets/skills/principle-separate-before-serializing-shared-state/SKILL.md +0 -18
  344. package/dist/assets/skills/principle-test-behavior-not-implementation/SKILL.md +0 -22
  345. package/dist/assets/skills/principle-type-system-discipline/SKILL.md +0 -15
  346. package/dist/assets/skills/reflect/SKILL.md +0 -70
  347. package/dist/assets/skills/reflect/references/divergent-reviewer.md +0 -38
  348. package/dist/assets/skills/reflect/references/judgment-reviewer.md +0 -37
  349. package/dist/assets/skills/reflect/references/synthesizer.md +0 -56
  350. package/dist/assets/skills/setup-pstack/SKILL.md +0 -76
  351. package/dist/assets/skills/sharpen/SKILL.md +0 -18
  352. package/dist/assets/skills/show-me-your-work/SKILL.md +0 -84
  353. package/dist/assets/skills/show-me-your-work/references/decision-log-template.tsv +0 -1
  354. package/dist/assets/skills/show-me-your-work/scripts/log.sh +0 -42
  355. package/dist/assets/skills/swarm/SKILL.md +0 -41
  356. package/dist/assets/skills/tdd/SKILL.md +0 -44
  357. package/dist/assets/skills/teach/SKILL.md +0 -23
  358. package/dist/assets/skills/technical-writing/SKILL.md +0 -108
  359. package/dist/assets/skills/typescript-best-practices/SKILL.md +0 -32
  360. package/dist/assets/skills/typescript-best-practices/references/patterns.md +0 -328
  361. package/dist/assets/skills/unslop/SKILL.md +0 -64
  362. package/dist/assets/skills/why/references/epistemics.md +0 -71
  363. package/dist/assets/skills/why/references/investigator-prompt.md +0 -84
  364. package/dist/assets/skills/why/references/source-playbook.md +0 -17
  365. package/dist/assets/skills/why/references/sources/code-archaeology.md +0 -51
  366. package/dist/assets/skills/why/references/sources/databricks.md +0 -70
  367. package/dist/assets/skills/why/references/sources/datadog.md +0 -97
  368. package/dist/assets/skills/why/references/sources/incident-postmortem.md +0 -5
  369. package/dist/assets/skills/why/references/sources/linear.md +0 -48
  370. package/dist/assets/skills/why/references/sources/notion.md +0 -55
  371. package/dist/assets/skills/why/references/sources/sentry.md +0 -66
  372. package/dist/assets/skills/why/references/sources/slack.md +0 -17
  373. package/dist/assets/skills/why/references/synthesizer-prompt.md +0 -129
  374. package/dist/cordis.patch.yml +0 -20
  375. package/dist/index.mjs.map +0 -1
  376. package/dist/paths-Bbai4CaT.mjs +0 -16
  377. package/dist/paths-Bbai4CaT.mjs.map +0 -1
  378. package/dist/subagent.mjs.map +0 -1
  379. /package/{assets → dist/pstack}/docs/guide/03-understand.md +0 -0
  380. /package/{assets → dist/pstack}/docs/guide/08-principles.md +0 -0
  381. /package/{assets → dist/pstack}/docs/guide/README.md +0 -0
  382. /package/{assets → dist/pstack}/skills/architect/references/design-red-flags.md +0 -0
  383. /package/{assets → dist/pstack}/skills/architect/references/rationale-template.md +0 -0
  384. /package/{assets → dist/pstack}/skills/architect/references/runner-prompt.md +0 -0
  385. /package/{assets → dist/pstack}/skills/create-verification-skill/references/feature-map-example/README.md +0 -0
  386. /package/{assets → dist/pstack}/skills/create-verification-skill/references/feature-map-example/create-note.md +0 -0
  387. /package/{assets → dist/pstack}/skills/create-verification-skill/references/feature-map-example/search.md +0 -0
  388. /package/{assets → dist/pstack}/skills/how/references/explorer-prompt.md +0 -0
  389. /package/{assets → dist/pstack}/skills/poteto-mode/playbooks/investigation.md +0 -0
  390. /package/{assets → dist/pstack}/skills/poteto-mode/playbooks/pause-safely.md +0 -0
  391. /package/{assets → dist/pstack}/skills/poteto-mode/playbooks/trace-forensics.md +0 -0
  392. /package/{assets → dist/pstack}/skills/poteto-mode/references/bugbot-triage.md +0 -0
  393. /package/{assets → dist/pstack}/skills/show-me-your-work/references/decision-log-template.tsv +0 -0
  394. /package/{assets → dist/pstack}/skills/typescript-best-practices/references/patterns.md +0 -0
  395. /package/{assets → dist/pstack}/skills/why/references/epistemics.md +0 -0
  396. /package/{assets → dist/pstack}/skills/why/references/investigator-prompt.md +0 -0
  397. /package/{assets → dist/pstack}/skills/why/references/source-playbook.md +0 -0
  398. /package/{assets → dist/pstack}/skills/why/references/sources/code-archaeology.md +0 -0
  399. /package/{assets → dist/pstack}/skills/why/references/sources/databricks.md +0 -0
  400. /package/{assets → dist/pstack}/skills/why/references/sources/datadog.md +0 -0
  401. /package/{assets → dist/pstack}/skills/why/references/sources/incident-postmortem.md +0 -0
  402. /package/{assets → dist/pstack}/skills/why/references/sources/linear.md +0 -0
  403. /package/{assets → dist/pstack}/skills/why/references/sources/notion.md +0 -0
  404. /package/{assets → dist/pstack}/skills/why/references/sources/sentry.md +0 -0
  405. /package/{assets → dist/pstack}/skills/why/references/sources/slack.md +0 -0
  406. /package/{assets → dist/pstack}/skills/why/references/synthesizer-prompt.md +0 -0
@@ -1,328 +0,0 @@
1
- # TypeScript patterns
2
-
3
- Code examples for each rule in `SKILL.md`. The underlying principles are language-agnostic. See the **type-system-discipline** and **boundary-discipline** principle skills.
4
-
5
- ## Branded types
6
-
7
- Brand primitives so they can't be mixed up. Validate once at the boundary. Downstream code trusts the type.
8
-
9
- ```ts
10
- type AgentId = string & { readonly __brand: "AgentId" };
11
-
12
- function isAgentId(input: string): input is AgentId {
13
- return isUUID(input);
14
- }
15
-
16
- function parseAgentId(input: string): AgentId {
17
- if (!isAgentId(input)) throw new Error(`Invalid agent id: ${input}`);
18
- return input;
19
- }
20
-
21
- function focusAgent(id: AgentId): void {
22
- /* input is trusted */
23
- }
24
- ```
25
-
26
- Match the `readonly __brand: 'X'` shape. Don't invent a new convention.
27
-
28
- ## Discriminated unions
29
-
30
- Model variants with a literal discriminant. Every variant shares the field name and each variant's value is unique, so impossible combos can't be represented.
31
-
32
- ```ts
33
- // Don't. Boolean + optionals lets contradictory states exist.
34
- type DiffState = { loading: boolean; diff?: GitDiff; error?: string };
35
-
36
- // Do. Only valid states exist.
37
- type DiffState =
38
- | { kind: "loading" }
39
- | { kind: "ready"; diff: GitDiff }
40
- | { kind: "error"; error: string };
41
- ```
42
-
43
- Pick one discriminant name (`kind`, `type`, `tag`) and stick to it.
44
-
45
- ## Constructive modeling
46
-
47
- Build the type from parts that are all legal instead of restricting a loose type with runtime checks.
48
-
49
- Non-empty, via a variadic tuple:
50
-
51
- ```ts
52
- type NonEmpty<T> = [T, ...T[]];
53
-
54
- // Don't: T[] plus a length check every caller must repeat
55
- function pickWinner(entries: string[]): string {
56
- if (entries.length === 0) throw new Error("no entries");
57
- return entries[Math.floor(Math.random() * entries.length)];
58
- }
59
-
60
- // Do: an empty value of the type can't exist
61
- function pickWinner(entries: NonEmpty<string>): string {
62
- return entries[Math.floor(Math.random() * entries.length)];
63
- }
64
- ```
65
-
66
- Where a plain `T[]` arrives, narrow once with a guard. The fact then travels in the type:
67
-
68
- ```ts
69
- const isNonEmpty = <T>(arr: T[]): arr is NonEmpty<T> => arr.length > 0;
70
- ```
71
-
72
- Even length, as pairs:
73
-
74
- ```ts
75
- type Pairs<T> = [T, T][];
76
- ```
77
-
78
- A time range, as start plus duration:
79
-
80
- ```ts
81
- // Don't: a comment holds the invariant
82
- type TimeRange = { start: Date; end: Date }; // start <= end
83
-
84
- // Do: a negative range can't be written; derive end when needed
85
- type TimeRange = { start: Date; durationMs: number };
86
- ```
87
-
88
- Keep `durationMs` a plain number. Brand it (per Branded types) only if a raw number could be passed where a duration is expected, not by reflex. Pick the representation that makes the bad state unconstructable, then expose the reading you need on top (`pairs.flat()`, a `rangeEnd()` helper).
89
-
90
- ## Simplest total type
91
-
92
- Don't strengthen everything. Keep `T[]` when every operation on it is total:
93
-
94
- ```ts
95
- const sum = (xs: number[]) => xs.reduce((a, b) => a + b, 0); // [] is 0, fine
96
- ```
97
-
98
- Strengthen when the loose type forces a lie at a use site. The tells are `!`, `arr[0] as T`, and a "should never happen" throw:
99
-
100
- ```ts
101
- // Don't: partiality smuggled past the compiler
102
- function newestSession(sessions: Session[]): Session {
103
- return sessions.at(0)!;
104
- }
105
-
106
- // Do: strengthen the input; the assertion disappears
107
- function newestSession(sessions: NonEmpty<Session>): Session {
108
- return sessions[0];
109
- }
110
- ```
111
-
112
- Weakening the result to `Session | undefined` is the other total signature.
113
-
114
- ## `unknown` over `any`
115
-
116
- External data is always `unknown`. Narrow before use.
117
-
118
- ```ts
119
- // Don't
120
- function handle(input: any) {
121
- return input.foo.bar;
122
- }
123
-
124
- // Do
125
- function handle(input: unknown) {
126
- if (typeof input === "object" && input !== null && "foo" in input) {
127
- // narrowed; compiler verifies access
128
- }
129
- }
130
- ```
131
-
132
- External sources include RPC payloads, `JSON.parse`, `postMessage`, IPC, file contents, environment variables, database results.
133
-
134
- ## Schemas before hand-rolled guards
135
-
136
- Before writing a property-by-property type guard for external data, look for the repository's runtime schema library and existing schemas. Let one schema own validation and derive the TypeScript type from it. Do not maintain a schema, a duplicate interface, and a guard that can drift apart.
137
-
138
- ```ts
139
- import { z } from "zod";
140
-
141
- const UserSchema = z.object({
142
- id: z.string().uuid(),
143
- role: z.enum(["admin", "member"]),
144
- });
145
-
146
- type User = z.infer<typeof UserSchema>;
147
-
148
- function parseUser(input: unknown): User {
149
- return UserSchema.parse(input);
150
- }
151
- ```
152
-
153
- Use `safeParse` when failure is an expected branch. Use the equivalent inference helper when the repository uses another schema library. Do not add a new schema dependency for one guard. This rule prefers the schema system the codebase already trusts.
154
-
155
- ## No `as` casts
156
-
157
- Every `as` is a potential runtime crash. Cast only after the type system has verified the claim.
158
-
159
- ```ts
160
- import { z } from "zod";
161
-
162
- // Don't
163
- const user = data as User;
164
-
165
- // Don't
166
- function isUser(data: unknown): data is User {
167
- return typeof data === "object" && data !== null && "id" in data;
168
- }
169
-
170
- // Do
171
- const userSchema = z.object({ id: z.string(), name: z.string() });
172
- type User = z.infer<typeof userSchema>;
173
-
174
- function parseUser(data: unknown): User {
175
- return userSchema.parse(data);
176
- }
177
- ```
178
-
179
- When the type comes first, annotate the validator with the type it proves. The compiler then rejects a validator that proves less than the type. Remove `name` from the object below and the assignment fails to compile.
180
-
181
- ```ts
182
- type User = { id: string; name: string };
183
-
184
- const userSchema: z.ZodType<User> = z.object({ id: z.string(), name: z.string() });
185
- ```
186
-
187
- When refactoring an `as` out of existing code, identify why TypeScript can't infer:
188
-
189
- - Missing discriminant: add one, switch to a discriminated union.
190
- - Overly wide source type (e.g. `Record<string, unknown>`): narrow it.
191
- - Untyped boundary: parse with the schema that owns the shape. Add a schema only where none exists.
192
- - Genuinely inexpressible: use a branded type or `satisfies`.
193
-
194
- ## Narrowing hierarchy
195
-
196
- From best to last-resort:
197
-
198
- 1. **Discriminated union switch / if.** Compiler narrows automatically.
199
- 2. **`in` operator.** `"key" in obj` narrows to variants containing that key.
200
- 3. **`typeof` / `instanceof`.** For primitives and class instances.
201
- 4. **User-defined type guard.** When the above aren't enough.
202
- 5. **`as` cast.** Only after validation.
203
-
204
- ```ts
205
- function area(s: Shape): number {
206
- if ("radius" in s) return Math.PI * s.radius ** 2; // narrowed to circle
207
- return s.width * s.height; // narrowed to rect
208
- }
209
- ```
210
-
211
- ## Type guards
212
-
213
- A guard must actually verify the claim. A lying guard is worse than `as`.
214
-
215
- ```ts
216
- function isCircle(s: Shape): s is Shape & { kind: "circle" } {
217
- return s.kind === "circle";
218
- }
219
- ```
220
-
221
- Prefer discriminant narrowing when possible.
222
-
223
- ## Exhaustiveness
224
-
225
- In default arms, assign the discriminant to a `never`-typed local.
226
-
227
- ```ts
228
- // Value-returning switch
229
- function area(s: Shape): number {
230
- switch (s.kind) {
231
- case "circle":
232
- return Math.PI * s.radius ** 2;
233
- case "rect":
234
- return s.width * s.height;
235
- default: {
236
- const _exhaustive: never = s;
237
- return _exhaustive;
238
- }
239
- }
240
- }
241
-
242
- // Void switch
243
- function handle(s: Shape): void {
244
- switch (s.kind) {
245
- case "circle":
246
- drawCircle(s);
247
- break;
248
- case "rect":
249
- drawRect(s);
250
- break;
251
- default: {
252
- const _exhaustive: never = s;
253
- void _exhaustive;
254
- }
255
- }
256
- }
257
- ```
258
-
259
- Return-style in value-returning switches, void-style in statement switches.
260
-
261
- ## `satisfies` over `as`
262
-
263
- `satisfies` validates without widening literal types.
264
-
265
- ```ts
266
- // Don't. Widens, loses literal types.
267
- const config = { theme: "dark", cols: 3 } as Config;
268
-
269
- // Do. Validates AND preserves literal types.
270
- const config = { theme: "dark", cols: 3 } satisfies Config;
271
- // config.theme is "dark" (literal), not string
272
- ```
273
-
274
- ## Boundary validation
275
-
276
- Validate once where data crosses in. Trust types inside. See the **boundary-discipline** principle skill.
277
-
278
- - **Wire formats** (proto, JSON-RPC): parse with `ignoreUnknownFields` so forward-compatible changes don't break old clients.
279
- - **Persisted JSON:** versioned blob with a try/catch around the parse.
280
- - **Don't re-validate** deep in call chains.
281
-
282
- ## Schema-derived types
283
-
284
- When a `.proto`, OpenAPI spec, GraphQL schema, or database migration already defines a shape, derive from the generated types instead of duplicating them.
285
-
286
- ```ts
287
- // Don't. Duplicate shape, drifts when the schema changes.
288
- type CheckSummary = {
289
- totalCount: number;
290
- checks: { name: string; status: string }[];
291
- };
292
- function renderChecks(s: CheckSummary) {
293
- /* ... */
294
- }
295
-
296
- // Do. Derive from the generated schema type.
297
- import type { ChecksMessage } from "<generated module>";
298
- function renderChecks(s: Pick<ChecksMessage, "totalCount" | "checks">) {
299
- /* ... */
300
- }
301
- ```
302
-
303
- Reach for `Pick`, `Omit`, `Parameters`, `ReturnType`, `Awaited`, `typeof` before writing a new interface.
304
-
305
- ## Object args
306
-
307
- ```ts
308
- // Don't. Swap two args, still compiles.
309
- openFile(uri, {
310
- startLineNumber: 10,
311
- startColumn: 1,
312
- endLineNumber: 10,
313
- endColumn: 1,
314
- });
315
-
316
- // Do. Order-independent, self-documenting.
317
- openFile({
318
- uri,
319
- selection: {
320
- startLineNumber: 10,
321
- startColumn: 1,
322
- endLineNumber: 10,
323
- endColumn: 1,
324
- },
325
- });
326
- ```
327
-
328
- Skip on hot paths: per-frame render, tokenizers, parsers, anything in a tight loop where the allocation cost matters.
@@ -1,64 +0,0 @@
1
- ---
2
- name: unslop
3
- description: Cut AI tells from any writing.
4
- disable-model-invocation: true
5
- ---
6
-
7
- > DSH port of pstack. `pstack_subagent` replaces Cursor's `Task` tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
8
-
9
- # Unslop
10
-
11
- Edit text to remove AI patterns. Scan for the patterns below, then rewrite. Preserve meaning and match the intended tone.
12
-
13
- ## Patterns to detect and fix
14
-
15
- Rule numbers are stable ids that other skills cite. A removed rule leaves a gap.
16
-
17
- ### Content
18
-
19
- 3. **Superficial -ing phrases.** "highlighting...", "ensuring...", "reflecting...", "showcasing...", "fostering...". Delete or expand with real sources.
20
- 5. **Vague attributions.** "Experts believe", "Industry reports suggest", "Some critics argue". Name the source or delete.
21
-
22
- ### Language
23
-
24
- 7. **AI vocabulary.** Additionally, crucial, delve, enduring, enhance, fostering, garner, interplay, intricate, landscape (abstract), pivotal, showcase, tapestry (abstract), testament, underscore, vibrant. Replace with plain words.
25
- 8. **Fancy ways to say "is".** "serves as", "stands as", "boasts", "features". Say "is" or "has".
26
- 9. **"Not just X, but Y."** State the point directly instead.
27
- 10. **Rule of three.** Don't force ideas into groups of three. Use the natural number.
28
- 11. **Synonym cycling.** Protagonist, main character, central figure, hero all in one paragraph. Pick one, repeat it.
29
- 12. **False ranges.** "from X to Y" where X and Y aren't on a meaningful scale. List topics directly.
30
-
31
- ### Style
32
-
33
- 13. **Em dash overuse.** Avoid em dashes entirely. Use periods or commas only (no parentheses, no en dashes, no hyphen-as-dash substitutes). If a thought needs separation, end the sentence or use a comma.
34
- 14. **Colon overuse.** Colons are fine before a list or example, not as mid-sentence connectors. "If you're coming from traditional automation: instead of registering event handlers, you describe conditions" adds nothing with the colon. Rewrite to let the point stand on its own without comparison framing. "Describing when the scheduler should fire works best as plain English." Same meaning, no crutch punctuation.
35
- 15. **Boldface overuse.** Don't bold every proper noun or acronym.
36
- 16. **Inline-header lists.** The tell is a bold label and colon that restates the line: "**Performance:** Performance improved...". Convert those to prose. A bold lead-in that ends in a period, names the item, and is followed by genuinely new detail ("**Schema in TypeScript.** Tables live in one file.") is fine, not a tell.
37
- 17. **Title case headings.** Use sentence case.
38
- 18. **Decorative emojis.** Remove from headings and bullets.
39
- 19. **Curly quotes.** Use straight quotes.
40
-
41
- ### Communication artifacts
42
-
43
- 20. **Chatbot phrases.** "I hope this helps!", "Let me know if...", "Of course!", "Certainly!", "Found the smoking gun!" Remove.
44
- 22. **Sycophantic tone.** "Great question! You're absolutely right!" Respond directly.
45
-
46
- ### Filler
47
-
48
- 23. **Filler phrases.** "In order to" becomes "To". "Due to the fact that" becomes "Because". Delete "It is important to note that".
49
- 24. **Excessive hedging.** "could potentially possibly be argued that it might" becomes "may".
50
- 25. **Generic conclusions.** "The future looks bright." State specific plans or facts.
51
-
52
- ### Jargon
53
-
54
- 26. **Abstract metaphor nouns.** Substrate (base), wedge, wedge in (add), vector (way, method), locus, vantage, nexus, primitive as a noun, harness as a metaphor, surface as in "API surface", bedrock, scaffolding as a metaphor, modality, paradigm, gold-plating (more than the job needs), ratchet as a metaphor (the mechanism's real name, or a limit that only tightens), evacuate for moving code (move out), endgame (the last phase), north star, flywheel. These read as technical but usually have a plainer concrete word. Pick the concrete word.
55
-
56
- ### Plain speech
57
-
58
- 27. **Say what it does, not how it feels.** "the database stays close at hand", "SQL you can read", "types that follow your schema" name a feeling. The fix names the mechanism or a number: "`.toSQL()` returns the exact string sent to the database", "a column rename fails the build". Ask what the sentence tells the reader to do or know, then write that. If you can't restate it as a concrete instruction, fact, or number, cut it. One more check: if the sentence could appear unchanged in another project's docs, it says nothing about this one. Cut it.
59
- 28. **Shorten or split dense sentences.** If the reader has to backtrack to parse a sentence, break it in two or drop clauses. One idea per sentence.
60
- 29. **Active voice.** Prefer it. Catch "is/are/was/were + past participle" and name the actor: "queries are validated" becomes "the compiler validates queries", "the file is parsed by the loader" becomes "the loader parses the file". Passive is fine only when the actor is unknown or genuinely doesn't matter.
61
- 30. **Cut adverbs, or use a stronger verb.** "runs quickly" becomes "is fast" or the number, and "significantly improves" becomes the measured delta. An adverb propping up a weak verb means the verb is wrong.
62
- 31. **Prefer the plain word.** "utilize" and "leverage" become "use", "facilitate" becomes "help", "numerous" becomes "many", "in the event that" becomes "if". The fancier synonym is rarely clearer.
63
- 32. **Mannered prose.** Metaphor or flourish where a literal phrase exists: aphorisms ("wire it or delete it"), rhetorical fragments for effect, personified code ("the plan holds it"), figurative verbs ("rides along", "stands on"), stock framing phrases. "A dial worth turning" becomes "a parameter worth varying". Say what you mean. Rule 26 covers the metaphor nouns.
64
- 33. **Over-compression.** Dropped articles, verbless fragments, symbol-speak, and abbreviations that make the reader decode instead of read. "Parser rejects bad date → exit 2, no write" becomes "The parser rejects a bad date, exits with code 2, and writes nothing." Write whole sentences with their articles and verbs, and spell out arrows and abbreviations.
@@ -1,71 +0,0 @@
1
- # Epistemics
2
-
3
- How to reason about confidence when evidence is historical, fragmentary, and sometimes contradictory, and how to tell the user without flattening it into false certainty. Code shows what it does, not *why it exists*. The why lives in commits, PRs, tickets, docs, and conversations, all incomplete, biased, and sometimes missing. Pretending otherwise produces confident-sounding guesses that mislead the user.
4
-
5
- ## Confidence Tiers
6
-
7
- Every claim in the output must sit in one tier. The tier sets its section and its phrasing.
8
-
9
- ### 1. Direct
10
-
11
- An explicit, textual citation answers the question: something an author actually *wrote* that says why, not "the code does X so the author must have wanted X." For example, a PR description "this fixes the bug where users with >1000 items couldn't paginate", a ticket "we're adding this because customer Acme requested it in their security review", a code comment "// clamp to 100 because the upstream API rejects larger values", a design doc "we chose option A over option B because we need persistence across restarts", or a chat message from the author "switching to this approach since the old one was flaky in tests".
12
-
13
- Phrasing: confident, present tense, cited. "This exists because X."
14
-
15
- ### 2. Supported
16
-
17
- Multiple pieces of indirect evidence converge on one conclusion. No single source states it explicitly, but the pattern across sources makes it likely. For example, the PR title says "improve performance", the ticket is labeled "perf", and the surrounding commits all touch the same hot path. Or several tests added with the change all exercise very large inputs. Or the author's other PRs from the same week all name the same incident.
18
-
19
- Phrasing: confident but clearly derived, citing each item. "The evidence points strongly to X: [the specific pieces]."
20
-
21
- ### 3. Inferred
22
-
23
- A reasonable reading of the context that nothing explicitly supports. It is *your interpretation*, not a fact from the record. For example, the PR doesn't say why, but the error was happening in production (per the incident channel timing) and the fix was rushed (merged the same day), so it was likely a hotfix. Or the function name suggests retry logic, and its retry count of 3 matches the team's 3-retry convention elsewhere in the codebase.
24
-
25
- Phrasing: hedged, with the chain explicit. "Given A and B, C seems likely because D."
26
-
27
- ### 4. Speculative
28
-
29
- A plausible hypothesis on thin evidence, where other explanations fit equally well. Worth presenting, since the user may know which is right, but mark it as a guess. For example, "This might be a workaround for a browser bug that's since been fixed, but we found no contemporary evidence of that", or "It's possible this threshold was chosen to match an SLA commitment, but no SLA doc references it."
30
-
31
- Phrasing: "One possibility is X, but we have no direct evidence." Usually lives in Competing Hypotheses, alongside other possibilities.
32
-
33
- ### 5. Unknown
34
-
35
- You looked and couldn't find out. A valid, important outcome. Document it.
36
-
37
- Phrasing: "We searched X, Y, and Z and found no evidence of why." Be specific about *what* you searched. "We couldn't find out" is less useful than "We searched the ticket tracker with keywords A and B, scanned the 6 PRs that touched this file since 2023, and grep'd the repo for string literals matching the threshold. None surfaced a rationale."
38
-
39
- ## Phrasing Guide
40
-
41
- **Confidence words** imply Direct or Supported evidence and need a citation immediately adjacent. Never use them for inferences: "because", "the reason is", "was designed to" (claims author intent), "fixes" / "addresses" / "solves" (claims the change achieved its goal), "the team decided" (claims a group decision happened).
42
-
43
- **Hedges** signal interpretation, not report. Use them liberally in What We Can Reasonably Infer: "appears to", "seems to", "likely", "suggests", "is consistent with", "one reading is", "plausibly", "may have been", "the evidence points toward".
44
-
45
- **Words to avoid:**
46
-
47
- - "obviously". If it were obvious, the user wouldn't be asking
48
- - "clearly". Almost always precedes a claim that isn't clear
49
- - "of course". Same
50
- - "just" (as in "it's just X for performance"). Dismissive and usually hides uncertainty
51
- - "I think" / "I believe". You're synthesizing evidence, not giving a personal opinion. Use "the evidence suggests" instead.
52
-
53
- ## Avoid Rationalization
54
-
55
- Code that "makes sense" today may have been written for reasons that no longer apply, or that were wrong at the time. Don't retrofit a clean rationale onto messy history. Don't assume the author did the "right" thing and work backward to justify it. Don't assume a consistent pattern was intentional when it might be copy-paste. Don't turn an absence of evidence into evidence of absence ("no one mentioned security concerns, so it must not have been a concern").
56
-
57
- ## The Sycophancy Trap
58
-
59
- Users often embed a hypothesis: "Why do we do it this way, I assume it's for performance?" Don't simply confirm it. The guess is a prompt for investigation, not a conclusion to validate. Treat it as one candidate among others and check the evidence independently. If the evidence supports it, say so with citations. If not, say so, and present what the evidence *does* support.
60
-
61
- ## When Evidence Contradicts
62
-
63
- Surface both sources in the output, with citations. Don't pick the one that fits a tidier narrative. For example, the ticket says "we need this for customer X's compliance requirement" and the PR says "cleaning up tech debt in this area". Both may be true (the ticket motivated the work, the PR gave the author's framing), or one may be wrong. Let the user make the call.
64
-
65
- ## When Evidence Is Missing
66
-
67
- An honest "we don't know" is one of the most valuable outputs. The user learns the answer isn't in the obvious places, that they'll need to ask a human (the original author, the product owner, the team lead), or that they can decide the question isn't worth pursuing further. Failing to mark a gap, and instead filling it with a confident guess, actively harms the user, because they'll act on the guess. Name each gap concretely: the question, the sources searched, what you searched for in each, and what you found (nothing, or only tangential material).
68
-
69
- ## Before Finalizing
70
-
71
- Before the synthesizer delivers the output, it checks every claim in "What We Found" and "What We Can Reasonably Infer". Each claim has a citation or moves to Inferred or Hypotheses. Its phrasing matches its tier. It doesn't treat code as evidence for its own intent (if it does, remove or reclassify it). The output has a "What We Don't Know" section. If no gaps are mentioned, that's suspicious. Either the evidence was unusually complete or something is being swept under the rug.
@@ -1,84 +0,0 @@
1
- # Investigator Prompt Template
2
-
3
- Fill in the placeholders. Append the one category playbook `sources/<source>.md` for this investigator's evidence category (index: `source-playbook.md`). If the target code looks defensive (null checks, retry logic, timeout handling, rate limiting, feature flags, egress guards, OOM handlers), also append `sources/incident-postmortem.md` so the investigator runs incident-flavored queries inside its own source.
4
-
5
- ---
6
-
7
- You are investigating the historical context and motivation behind a piece of code. Other investigators search other sources in parallel, and a separate synthesizer combines all findings into the final answer. Go deep on your assigned source only. Gather evidence accurately rather than writing prose.
8
-
9
- Work like a **careful, cautious, and precise investigator**. Surface evidence and describe it accurately, including the parts that don't fit a tidy story. Boring and exact beats plausible. One verbatim quote with a precise citation is worth more than a paragraph of summary.
10
-
11
- ## The Question
12
-
13
- > {QUESTION}
14
-
15
- ## The Code Anchor
16
-
17
- **Target files:** {FILES_WITH_LINE_RANGES}
18
-
19
- **Key symbols:** {SYMBOLS}
20
-
21
- **Initial commits touching this code (most recent first):**
22
- {COMMIT_LIST}
23
-
24
- **PR numbers extracted from commit messages:** {PR_NUMBERS}
25
-
26
- **Ticket IDs mentioned in commits or PR bodies (if any):** {TICKET_IDS}
27
-
28
- ## Your Assigned Source
29
-
30
- {SOURCE_NAME}
31
-
32
- {SOURCE_PLAYBOOK_SECTION}
33
-
34
- ## Investigation Loop
35
-
36
- 1. **Cast a wide net first** so you don't miss related context. Only then narrow in on specific items.
37
- 2. **Read the whole thing.** Read each PR, ticket, doc, or thread fully, not just the title or summary. The key evidence is often in a comment, a subtask, or a follow-up.
38
- 3. **Follow links within your source only.** Pull the PR or commit a PR references, the parent or sibling of a ticket, the doc a doc links. Do NOT chase a cross-source reference. Record it under Additional Leads for that source's investigator. The one-investigator-per-category design depends on this. Chasing it duplicates work and confuses scope.
39
- 4. **Quote verbatim**, with the exact location (PR number, ticket ID, URL, commit hash, file:line), so the reader can confirm the claim in seconds.
40
- 5. **Record what you searched, not just what you found.** Write queries verbatim. An empty search is a finding.
41
- 6. **Resist the story.** If two items in your source disagree, record both. Don't suppress the inconvenient one. If three items line up and a fourth contradicts them, the contradiction is the most interesting finding.
42
-
43
- Before reporting a finding as strong, ask whether you would expect to find it if your current reading were wrong, and how the evidence would differ. **Never invent.** If you're tempted to round a partial finding up into a confident statement, stop and label it partial. The synthesizer counts on your output being accurate.
44
-
45
- ## Epistemic Discipline
46
-
47
- - **Mechanics are not motivation.** A commit changing `limit = 50` to `limit = 100` shows the change, not necessarily why. Look for the reason in the commit message, PR description, linked ticket, or review comments.
48
- - **No intent from code behavior or style.** You may read code to learn what the target *is*. "The author chose a functional approach" is an observation about code, not evidence of intent. Claim intent only where the author stated it.
49
- - **Preserve uncertainty.** Say when evidence is ambiguous, or when one reading is more plausible but not certain. Don't collapse ambiguity to look decisive.
50
- - **No silent substitutions.** If the question is about feature X and you only find evidence about feature Y, don't present Y's evidence as if it answers X.
51
- - **Gather, don't conclude.** Collect the raw material honestly and completely. Don't answer the question, form a final opinion on "the why", or pick sides in contradictions. Don't speculate beyond what the evidence supports. A hunch with no evidence isn't evidence. The synthesizer does the reasoning.
52
-
53
- ## Output Format
54
-
55
- Return your findings in this structure. The synthesizer reads it directly.
56
-
57
- ### Source
58
- Which source you investigated (source control, issue / ticket tracker, long-form documents, real-time team chat, infrastructure observability, error / exception tracking, product analytics warehouse, code comments, etc.).
59
-
60
- ### What I Searched
61
- The queries you ran, items you opened, and places you looked. Be specific. This shows how thorough the search was and what is still unsearched.
62
-
63
- ### Direct Evidence Found
64
- For each item that explicitly addresses the question:
65
- - **What it says**: verbatim quote or accurate paraphrase
66
- - **Where it's from**: PR #123, ticket ID, doc URL, chat permalink, commit hash, or file:line
67
- - **Author and date** (if available)
68
- - **Relevance**: one sentence on how it bears on the question
69
-
70
- ### Indirect / Circumstantial Evidence
71
- For each item that bears on the question without answering it:
72
- - **What it is**: brief description
73
- - **Where it's from**: location
74
- - **What it suggests**: what a careful reader might infer, and the inference chain
75
- - **Alternative readings**: if the same evidence could support a different interpretation, note it
76
-
77
- ### Contradictions
78
- Items that disagree with each other, with both citations.
79
-
80
- ### Gaps
81
- What you searched for and didn't find, specifically: "Searched the issue tracker for [query] across [time range]. No matching issues."
82
-
83
- ### Additional Leads
84
- Anything that suggests further investigation in a different source, for its investigator or a follow-up pass. For example, a chat thread that a PR mentions.
@@ -1,17 +0,0 @@
1
- # Source playbooks
2
-
3
- The why skill spawns one investigator per available evidence category, each reading a single source-specific playbook below. The playbooks are concrete examples for common MCPs. Adapt them for a different MCP in the same category.
4
-
5
- | Category | Playbook | Example MCP it documents |
6
- |---|---|---|
7
- | Source control history | [`code-archaeology.md`](./sources/code-archaeology.md) | git, `gh` |
8
- | Issue / ticket tracker | [`linear.md`](./sources/linear.md) | Linear (adapt for Jira, GitHub Issues, Plane, Shortcut) |
9
- | Long-form documents | [`notion.md`](./sources/notion.md) | Notion (adapt for Confluence, Google Docs, Coda) |
10
- | Real-time team chat | [`slack.md`](./sources/slack.md) | Slack (adapt for Discord, Microsoft Teams, Mattermost) |
11
- | Infrastructure observability | [`datadog.md`](./sources/datadog.md) | Datadog (adapt for New Relic, Honeycomb, Grafana, Splunk) |
12
- | Error / exception tracking | [`sentry.md`](./sources/sentry.md) | Sentry (adapt for Rollbar, Bugsnag, Airbrake) |
13
- | Product analytics warehouse | [`databricks.md`](./sources/databricks.md) | Databricks SQL (adapt for Snowflake, BigQuery, ClickHouse, dbt) |
14
-
15
- Cross-cutting:
16
-
17
- - [`incident-postmortem.md`](./sources/incident-postmortem.md). Add this if the target code looks defensive (null checks, retry, timeout, rate limit, feature flag, egress guard, OOM handler).
@@ -1,51 +0,0 @@
1
- # Code Archaeology (git + in-repo)
2
-
3
- ## What this source contains
4
-
5
- - Commit history (messages, dates, authors, diffs)
6
- - PR descriptions, review comments, and discussion threads (via `gh`)
7
- - Inline code comments, TODOs, FIXMEs, deprecation notes
8
- - ADRs (architectural decision records) if the repo keeps them
9
- - Tests, whose names and assertions often encode the edge cases that motivated a change
10
- - Related files modified in the same commits (co-change signal)
11
- - CHANGELOG entries and release notes in the repo
12
- - Issue/ticket IDs in commit messages and PR bodies
13
-
14
- The most trustworthy source, tied directly to the code, and the most complete. Everything that went through the repo should be here.
15
-
16
- ## How to search it
17
-
18
- Expand the seed commit list:
19
-
20
- ```bash
21
- # History through renames
22
- git log --follow --oneline -- <file>
23
-
24
- # Pickaxe: commits that added or removed this exact text
25
- git log -S '<exact_string_from_code>' -- <file>
26
-
27
- # Or for patterns:
28
- git log -G '<regex>' -- <file>
29
-
30
- # Who wrote each line and when
31
- git blame -L <start>,<end> <file>
32
-
33
- # One commit's full diff
34
- git show <hash>
35
-
36
- # Commits between two points affecting this file
37
- git log <old>..<new> -p -- <file>
38
- ```
39
-
40
- Look for out-of-band docs:
41
-
42
- ```bash
43
- # ADRs often live in docs/adr/ or similar
44
- rg -l -i 'architecture.decision' --glob '*.md'
45
-
46
- # TODOs and FIXMEs near the target
47
- rg -n -C2 '(TODO|FIXME|HACK|XXX|NOTE)' <target_file>
48
-
49
- # Related tests
50
- rg -l '<symbol>' --glob '*test*'
51
- ```