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
@@ -0,0 +1,134 @@
1
+ import { expect } from "./expect.mjs";
2
+ import "./support.mjs";
3
+ import { ageColumn, bucketFor, dirtyColumn, formatSize, lastChatColumn, mergedColumn, prColumn, remoteColumn, renderTable, sizeColumn, sortRows } from "./worktree-audit.mjs";
4
+ import { mkdirSync, mkdtempSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
5
+ import { tmpdir } from "node:os";
6
+ import { join } from "node:path";
7
+ import { test } from "node:test";
8
+ // runtime/skills/poteto-mode/scripts/worktree-audit.test.ts
9
+ const now = Date.UTC(2026, 9, 28, 12, 0, 0) / 1e3;
10
+ test("renders the documented worktree columns", () => {
11
+ const table = renderTable(sortRows([{
12
+ size: "2.0G",
13
+ age: "1d",
14
+ merged: "YES",
15
+ dirty: "clean",
16
+ remote: "pushed",
17
+ pr: "#12/OPEN",
18
+ lastChat: "2026-10-28",
19
+ bucket: "hold-open-pr",
20
+ worktree: "/repo/wt-a"
21
+ }, {
22
+ size: "10.0M",
23
+ age: "10d",
24
+ merged: "NO",
25
+ dirty: "wip:2",
26
+ remote: "ahead1",
27
+ pr: "-",
28
+ lastChat: "-",
29
+ bucket: "hold-wip",
30
+ worktree: "/repo/wt-b"
31
+ }]), "origin/main");
32
+ expect(table.split("\n")[0]).toBe("# base: origin/main");
33
+ expect(table).toContain("SIZE AGE MERGED DIRTY REMOTE PR LAST_CHAT BUCKET WORKTREE");
34
+ expect(table).toContain("/repo/wt-a");
35
+ expect(table).toContain("/repo/wt-b");
36
+ });
37
+ test("classifies the individual columns", () => {
38
+ expect(formatSize(2 * 1024 ** 3)).toBe("2.0G");
39
+ expect(ageColumn(now - 86400, now)).toBe("1d");
40
+ expect(dirtyColumn("")).toBe("clean");
41
+ expect(dirtyColumn(" M a\n?? b\n")).toBe("wip:1");
42
+ expect(dirtyColumn("?? b\n")).toBe("scratch:1");
43
+ expect(mergedColumn(true)).toBe("YES");
44
+ expect(mergedColumn(false)).toBe("no");
45
+ expect(remoteColumn({
46
+ branch: "feature/x",
47
+ hasRemote: true,
48
+ remoteSha: "abc",
49
+ head: "abc",
50
+ aheadCount: 0
51
+ })).toBe("pushed");
52
+ expect(remoteColumn({
53
+ branch: "feature/x",
54
+ hasRemote: true,
55
+ remoteSha: "abc",
56
+ head: "def",
57
+ aheadCount: 2
58
+ })).toBe("ahead2");
59
+ expect(remoteColumn({
60
+ branch: "feature/x",
61
+ hasRemote: false,
62
+ remoteSha: void 0,
63
+ head: "def",
64
+ aheadCount: 2
65
+ })).toBe("no-remote");
66
+ expect(remoteColumn({
67
+ branch: void 0,
68
+ hasRemote: true,
69
+ remoteSha: "abc",
70
+ head: "abc",
71
+ aheadCount: 0
72
+ })).toBe("detached");
73
+ expect(prColumn("feature/x", [{
74
+ number: 12,
75
+ head: "feature/x",
76
+ state: "OPEN"
77
+ }])).toBe("#12/OPEN");
78
+ expect(lastChatColumn({
79
+ sessionId: "s-1",
80
+ lastEventTime: Date.UTC(2026, 9, 27, 23, 30) / 1e3
81
+ })).toBe("2026-10-27");
82
+ expect(lastChatColumn({ sessionId: "s-1" })).toBe("-");
83
+ expect(lastChatColumn(void 0)).toBe("-");
84
+ });
85
+ test("never marks an unknown usage signal safe", () => {
86
+ expect(bucketFor({
87
+ merged: "YES",
88
+ dirty: "clean",
89
+ pr: "-",
90
+ usageKnown: false,
91
+ usedRecently: false
92
+ })).toBe("unknown-usage");
93
+ expect(bucketFor({
94
+ merged: "YES",
95
+ dirty: "clean",
96
+ pr: "-",
97
+ usageKnown: true,
98
+ usedRecently: true
99
+ })).toBe("verify-recent-chat");
100
+ });
101
+ const sizeInBytes = (text) => {
102
+ const match = /^([\d.]+)([BKMGTP]?)$/.exec(text);
103
+ if (match === null) throw new Error(`cannot read size ${text}`);
104
+ const power = {
105
+ "": 0,
106
+ B: 0,
107
+ K: 1,
108
+ M: 2,
109
+ G: 3,
110
+ T: 4,
111
+ P: 5
112
+ }[match[2]] ?? 0;
113
+ return Number(match[1]) * 1024 ** power;
114
+ };
115
+ test("counts a directory symlink as its own entry and never traverses it", () => {
116
+ const root = mkdtempSync(join(tmpdir(), "worktree-audit-size-"));
117
+ try {
118
+ const external = join(root, "external");
119
+ mkdirSync(external);
120
+ writeFileSync(join(external, "big.bin"), Buffer.alloc(2097152, 1));
121
+ const worktree = join(root, "worktree");
122
+ mkdirSync(worktree);
123
+ writeFileSync(join(worktree, "small.txt"), "small");
124
+ symlinkSync(external, join(worktree, "external-link"), "dir");
125
+ expect(sizeInBytes(sizeColumn(external)) >= 2097152).toBe(true);
126
+ expect(sizeInBytes(sizeColumn(worktree)) < 1048576).toBe(true);
127
+ } finally {
128
+ rmSync(root, {
129
+ recursive: true,
130
+ force: true
131
+ });
132
+ }
133
+ });
134
+ export {};
@@ -1,11 +1,9 @@
1
1
  ---
2
2
  name: principle-attack-the-premise
3
- description: Apply when two or more fixes that share one premise have failed the same gate. Write the premise down and test it directly before you write another fix that assumes it.
3
+ description: "Apply when two or more fixes that share one premise have failed the same gate. Write the premise down and test it directly before you write another fix that assumes it."
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Attack the Premise
10
8
 
11
9
  When two or more fixes that share one premise have failed the same gate, suspect the premise, not the fixes.
@@ -1,11 +1,9 @@
1
1
  ---
2
2
  name: principle-boundary-discipline
3
- description: Apply when wiring validation, error handling, or framework adapters. Concentrate guards at system boundaries (CLI, config, network, external APIs); trust internal types and keep business logic in pure functions.
3
+ description: "Apply when wiring validation, error handling, or framework adapters. Concentrate guards at system boundaries (CLI, config, network, external APIs); trust internal types and keep business logic in pure functions."
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Boundary Discipline
10
8
 
11
9
  Place validation, type narrowing, and error handling at system boundaries. Trust internal code unconditionally. Business logic lives in pure functions. The shell is thin and mechanical.
@@ -3,9 +3,6 @@ name: principle-build-the-lever
3
3
  description: "Apply to any non-trivial work, not just bulk work: edits, migrations, analyses, checks. Build the tool that does it or proves it (codemod, script, generator, or a skill your subagents follow) instead of working by hand. The tool is the artifact a reviewer can rerun."
4
4
  disable-model-invocation: true
5
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
6
  # Build the Lever
10
7
 
11
8
  When the work isn't trivial, build the tool that does it instead of doing it by hand.
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: principle-encode-lessons-in-structure
3
+ description: "Apply when you catch yourself writing the same instruction a second time, or notice a recurring correction. Encode the rule as a lint, metadata flag, runtime check, or script instead of more text."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Encode Lessons in Structure
8
+
9
+ If the lesson needs judgment and cannot be encoded, make the instruction more prominent and add an example of the failure mode.
10
+
11
+ **Corollary:** If the fix is structural, only use the structural fix. The instruction is the symptom.
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: principle-exhaust-the-design-space
3
+ description: "Apply when facing a novel UI interaction or architectural decision with no precedent in the codebase. Build 2-3 competing prototypes and compare side by side before committing."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Exhaust the Design Space
8
+
9
+ It also applies to product design decisions where user experience depends on feel, not logic.
@@ -1,11 +1,9 @@
1
1
  ---
2
2
  name: principle-experience-first
3
- description: Apply when product, UX, or feature-scope tradeoffs come up. Choose user delight over implementation convenience; ship fewer polished features over more rough ones.
3
+ description: "Apply when product, UX, or feature-scope tradeoffs come up. Choose user delight over implementation convenience; ship fewer polished features over more rough ones."
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Experience First
10
8
 
11
9
  When implementation convenience conflicts with user delight, choose delight.
@@ -1,19 +1,18 @@
1
1
  ---
2
2
  name: principle-explain-the-number
3
- description: "Apply before you trust, report, or act on a number you measured: a speedup, a regression, a throughput, a latency, or an eval result. Find what limits it, and rule out that it measured something other than the work you think."
3
+ description: "Apply before you measure, and before you trust, report, or act on a number you measured: a speedup, a regression, a throughput, a latency, or an eval result. Find what limits it, and rule out that it measured something other than the work you think."
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Explain the Number
10
8
 
9
+ - **Write the decision before you run.** Name the result that would change a decision, and the noise floor. Stop when the run-to-run spread is larger than the effect.
11
10
  - **Ask "why not double?"** Name the resource or code path that bounds the result, such as a core, a lock, the disk, the network, or the load generator itself. Get it from a profile or from system counters taken during a run, then map it to source. A guess from reading the code is not a limiter. If you cannot say why the number is not twice as good, you do not know what you measured.
12
11
  - **List what else the number could be measuring, and rule out each one with evidence.** The usual suspects are errors, skipped or cached work, code that never ran, an untuned side (one left on default settings), noise, and a piece too small to matter end to end.
13
12
  - **Keep the evidence with the number.** Put the run count, the spread, and the limiter in the notes or a linked artifact.
14
13
 
15
14
  For a performance number, run the full procedure with the [benchmark-checklist](../benchmark-checklist/SKILL.md) skill. For an eval result, ask the same of the trials: did every run do the task, does the gap hold across trials and models, and does the scenario matter.
16
15
 
17
- You skipped this when the evidence behind a number has no run count, no spread, or no named limiter, or when the time saved is larger than the time the changed piece took.
16
+ You skipped this when a run started without the result that would change a decision, when the evidence behind a number has no run count, no spread, or no named limiter, or when the time saved is larger than the time the changed piece took.
18
17
 
19
18
  Distinct from [Prove It Works](../principle-prove-it-works/SKILL.md), which checks that an output is real.
@@ -1,11 +1,9 @@
1
1
  ---
2
2
  name: principle-fix-root-causes
3
- description: Apply when debugging. Trace each symptom back to the first place the system went wrong and fix it there. A guard is a fix only when the state it handles is legitimate.
3
+ description: "Apply when debugging. Trace each symptom back to the first place the system went wrong and fix it there. A guard is a fix only when the state it handles is legitimate."
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Fix Root Causes
10
8
 
11
9
  When debugging, fix the fault, not the place where it surfaced. The symptom is where a wrong state became visible. The root cause is the first place the system did something it should not do, or failed to handle a state it should handle.
@@ -4,8 +4,6 @@ description: "Apply before writing logic: choosing core types and data structure
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Foundational Thinking
10
8
 
11
9
  **Structural decisions** protect option value. **Code-level decisions** protect simplicity.
@@ -4,8 +4,6 @@ description: "Apply when context is filling up: large outputs, long files, repea
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Guard the Context Window
10
8
 
11
9
  **Why:** Context overflow degrades reasoning quality, creates compression artifacts, and halts progress.
@@ -1,11 +1,9 @@
1
1
  ---
2
2
  name: principle-laziness-protocol
3
- description: Apply when refactoring, evaluating diff size, or tempted to add abstractions, layers, or signal threading. Bias toward deletion and the smallest change that solves the problem.
3
+ description: "Apply when refactoring, evaluating diff size, or tempted to add abstractions, layers, or signal threading. Bias toward deletion and the smallest change that solves the problem."
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Laziness Protocol
10
8
 
11
9
  - **Consolidate decisions.** Do not repeat the same choice in several places. Put it behind one source of truth and pass the result as a simple flag.
@@ -1,11 +1,9 @@
1
1
  ---
2
2
  name: principle-make-operations-idempotent
3
- description: Apply when designing commands, lifecycle steps, or processing loops that run amid crashes, restarts, and retries. Converge to the same end state regardless of partial prior runs.
3
+ description: "Apply when designing commands, lifecycle steps, or processing loops that run amid crashes, restarts, and retries. Converge to the same end state regardless of partial prior runs."
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Make Operations Idempotent
10
8
 
11
9
  Design operations so they converge to the correct state regardless of how many times they run or where the previous run stopped. Every state-mutating operation should answer: "What happens if this runs twice? What happens if the previous run crashed halfway?"
@@ -1,11 +1,9 @@
1
1
  ---
2
2
  name: principle-migrate-callers-then-delete-legacy-apis
3
- description: Apply when introducing a new internal API while old callers still exist. Migrate callers and delete the old API in the same wave instead of preserving compatibility layers.
3
+ description: "Apply when introducing a new internal API while old callers still exist. Migrate callers and delete the old API in the same wave instead of preserving compatibility layers."
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Migrate Callers Then Delete Legacy APIs
10
8
 
11
9
  - Update tests to assert the new contract, and delete tests that only protect pre-refactor implementation details
@@ -1,11 +1,9 @@
1
1
  ---
2
2
  name: principle-minimize-reader-load
3
- description: Apply when reviewing or shaping code that's hard to trace. Count layers between question and answer, and hidden state in the reader's head; collapse one-caller wrappers and shrink mutable scope.
3
+ description: "Apply when reviewing or shaping code that's hard to trace. Count layers between question and answer, and hidden state in the reader's head; collapse one-caller wrappers and shrink mutable scope."
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Minimize Reader Load
10
8
 
11
9
  Maintainability is the work a reader must do to understand code. Track two axes: **layers to trace** (indirections between the question and the answer) and **state to hold** (hidden or mutable context the reader must keep in their head). LOC, cyclomatic complexity, and "clean architecture" are proxies. Reader load is the thing that matters. The two axes are independent. A flat file with 50 globals can be as hard to reason about as a 6-layer adapter stack. Guard both. This is the human analog of [Guard the Context Window](../principle-guard-the-context-window/SKILL.md). Working memory is finite for readers too.
@@ -1,11 +1,9 @@
1
1
  ---
2
2
  name: principle-model-the-domain
3
- description: Apply when writing stateful logic, or when code branches a lot or repeats a shape assumption across files.
3
+ description: "Apply when writing stateful logic, or when code branches a lot or repeats a shape assumption across files."
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Model the Domain
10
8
 
11
9
  Encode the real domain in a data structure instead of scattering it across conditionals. A structure that matches the domain makes invalid states unrepresentable and deletes branches. Choosing it at write time is cheap. Recovering it later reads as a refactor and gets deferred.
@@ -1,11 +1,9 @@
1
1
  ---
2
2
  name: principle-never-block-on-the-human
3
- description: Apply when tempted to ask 'should I do X?' on reversible work.
3
+ description: "Apply when tempted to ask 'should I do X?' on reversible work."
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Never Block on the Human
10
8
 
11
9
  The human supervises asynchronously. Agents must stay unblocked. Make reasonable decisions, proceed, and let the human course-correct after the fact. Since code changes are reversible and reviewable, a wrong decision usually costs less than blocking.
@@ -1,11 +1,9 @@
1
1
  ---
2
2
  name: principle-outcome-oriented-execution
3
- description: Apply during planned rewrites and migrations with explicit phase boundaries. Converge on the target architecture; don't preserve smooth intermediate states with throwaway compatibility code.
3
+ description: "Apply during planned rewrites and migrations with explicit phase boundaries. Converge on the target architecture; don't preserve smooth intermediate states with throwaway compatibility code."
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Outcome-Oriented Execution
10
8
 
11
9
  Optimize for the intended, verifiable end state rather than preserving smooth intermediate states.
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: principle-prove-it-works
3
- description: Apply after completing a task, before declaring done. Verify against the real artifact (run the feature, read the actual value, inspect the diff), not a proxy, self-report, or 'it compiles.'
3
+ description: "Apply after completing a task, before declaring done. Verify against the real artifact (run the feature, read the actual value, inspect the diff), not a proxy, self-report, or 'it compiles.'"
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Prove It Works
10
8
 
9
+ In DeepSeek Harness, read [the DSH adapter](../../docs/harness/dsh.md) once per session before you follow this skill. It maps the Cursor names in pstack skills to DeepSeek Harness.
10
+
11
11
  Verify every task output by checking the real thing directly. Do not infer from proxies, self-reports, or "it compiles."
12
12
 
13
13
  **Why:** Unverified work has unknown correctness. Indirect verification (file mtimes, output freshness, agent self-reports, cached screenshots) feels cheaper than direct observation. Acting on a wrong inference costs far more than checking the source.
@@ -1,11 +1,9 @@
1
1
  ---
2
2
  name: principle-redesign-from-first-principles
3
- description: Apply when integrating a new requirement into an existing design.
3
+ description: "Apply when integrating a new requirement into an existing design."
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Redesign From First Principles
10
8
 
11
9
  When integrating a change, don't bolt it onto the existing design. Redesign as if the requirement had been a foundational assumption from the start.
@@ -1,11 +1,9 @@
1
1
  ---
2
2
  name: principle-separate-before-serializing-shared-state
3
- description: Apply when concurrent actors might write to the same file, branch, key, or state object. Eliminate the sharing first; serialize structurally only when one shared writer is a real invariant.
3
+ description: "Apply when concurrent actors might write to the same file, branch, key, or state object. Eliminate the sharing first; serialize structurally only when one shared writer is a real invariant."
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Separate Before Serializing Shared State
10
8
 
11
9
  When concurrent actors might share mutable state, first ask whether they need the same mutable object. If not, eliminate the sharing. When sharing is real, enforce serialization structurally: lockfiles, sequential phases, exclusive ownership. Instructions and conventions are not concurrency control.
@@ -1,11 +1,9 @@
1
1
  ---
2
2
  name: principle-sequence-verifiable-units
3
- description: Apply to multi-step work (sweeps, migrations, runs of similar edits) and to how you stack commits and PRs. Break work into small units that each end in a verifiable state, check each before the next, and order delivery so the sequence proves itself to a reviewer.
3
+ description: "Apply to multi-step work (sweeps, migrations, runs of similar edits) and to how you stack commits and PRs. Break work into small units that each end in a verifiable state, check each before the next, and order delivery so the sequence proves itself to a reviewer."
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Sequence work into verifiable units
10
8
 
11
9
  Order work as a sequence of small units, each ending in a state you can check, and don't advance until the current one is green.
@@ -1,11 +1,9 @@
1
1
  ---
2
2
  name: principle-subtract-before-you-add
3
- description: Apply when sequencing an addition, refactor, or rewrite. Remove dead code, redundant validators, and stub references first, then build on the simpler base.
3
+ description: "Apply when sequencing an addition, refactor, or rewrite. Remove dead code, redundant validators, and stub references first, then build on the simpler base."
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Subtract Before You Add
10
8
 
11
9
  When evolving a system, remove complexity first, then build. Default to subtraction.
@@ -1,11 +1,9 @@
1
1
  ---
2
2
  name: principle-test-behavior-not-implementation
3
- description: Apply when you write, change, or keep a test. Assert what the code's users can observe, so that the test fails when that behavior breaks and keeps passing when only the internals change.
3
+ description: "Apply when you write, change, or keep a test. Assert what the code's users can observe, so that the test fails when that behavior breaks and keeps passing when only the internals change."
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Test Behavior, Not Implementation
10
8
 
11
9
  A test is a claim about what the code does for its users: a caller, an end user, or another service. Behavior is what those users can observe through the interface they use. That includes return values, errors, state they can read back, and effects on systems outside the code, such as a request sent, a row written, or a message emitted. Implementation is what they cannot observe: private helpers, internal call order, intermediate data, and which internal collaborator did the work.
@@ -1,11 +1,9 @@
1
1
  ---
2
2
  name: principle-type-system-discipline
3
- description: Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, exhaust variants, derive from authoritative schemas.
3
+ description: "Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, exhaust variants, derive from authoritative schemas."
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Type System Discipline
10
8
 
11
9
  Make the compiler reject impossible states, mismatched primitives, and unhandled variants. Prefer defining errors and special cases out of existence over proliferating handlers. For TypeScript syntax, see the `typescript-best-practices` skill.
@@ -1,20 +1,20 @@
1
1
  ---
2
2
  name: recall
3
- description: Reconstruct your recent working context from your own chat history, live state, and the shared record (user reports, prior fixes, incidents), then hand back a tight current-state brief. Use for 'recall my work on X', 'catch me up', 'what have I been working on', 'where did I leave off', before starting or resuming work.
3
+ description: "Reconstruct your recent working context from your own chat history, live state, and the shared record (user reports, prior fixes, incidents), then hand back a tight current-state brief. Use for 'recall my work on X', 'catch me up', 'what have I been working on', 'where did I leave off', before starting or resuming work."
4
4
  disable-model-invocation: true
5
5
  ---
6
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
7
  # Recall
10
8
 
9
+ In DeepSeek Harness, read [the DSH adapter](../../docs/harness/dsh.md) once per session before you follow this skill. It maps the Cursor names in pstack skills to DeepSeek Harness.
10
+
11
11
  **Before you start or resume work, you rebuild the user's recent working context and hand back a tight capsule of where things stand now and what to do next.**
12
12
 
13
13
  Keep it tight and on-topic. Read only what the in-scope threads need, then stop.
14
14
 
15
15
  Your context lives in two records. Your own chat history holds what you did and decided. The shared record holds everything that happened around the same code under other names: the symptoms users keep reporting, the fixes that shipped and got reverted, the errors still firing in prod. That second record is what the **why** skill searches, across source control, the issue tracker, chat and issue channels, long-form docs, and error tracking. A feature with a long bug tail keeps most of its story there, so don't reconstruct it from your transcripts alone.
16
16
 
17
- Session logs live under `$DSH_HOME/sessions/<workspace-slug>/<session-id>/session.v*.jsonl*`. The slug is derived from the workspace path. Every line is one event; user and assistant text blocks are the chat messages.
17
+ Transcripts live at `~/.cursor/projects/<slug>/agent-transcripts/<uuid>/<uuid>.jsonl`, where `<slug>` is the workspace path with the leading slash dropped and each "/" turned into "-" (so `/Users/you/proj` becomes `Users-you-proj`). Every line is one chat message.
18
18
 
19
19
  1. Classify, then route. One specific prior chat to resume is the `session-pickup` playbook, not this. Turning habits into a durable skill is `automate-me`. A human-readable summary of your work is a different task. Recall loads working context across recent chats before you act. If the user already gave you a full state capsule (paths, branch, the change), use it and skip the mining.
20
20
  2. Lock the scope before searching. Pin the window ("recent" is a real range, default the last 7 days), the topic if named, and the workspace (default the active one. Never read another project's transcripts without being asked). State the scope back. Never quietly turn "all" into "recent N".
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: reflect
3
+ description: Spawn three parallel review subagents over the active transcript, surface learnings, and route each to a concrete edit on an existing skill. Use when the user says reflect.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Reflect
8
+
9
+ In DeepSeek Harness, read [the DSH adapter](../../docs/harness/dsh.md) once per session before you follow this skill. It maps the Cursor names in pstack skills to DeepSeek Harness.
10
+
11
+ Mine the current conversation for durable learnings, then route them into skill edits.
12
+
13
+ Invoke when the user says "reflect" or "/reflect". Skip when the conversation is trivial, off-topic, or already covered by an existing skill the parent followed correctly. One-offs are not learnings.
14
+
15
+ ## 1. Locate the active transcript
16
+
17
+ Before fanning out, find this conversation's transcript in the `agent-transcripts/` directory the system prompt names. Do not glob across `~/.cursor/projects/*/`. That crosses workspace boundaries and reads private chats from unrelated projects.
18
+
19
+ ```bash
20
+ ls -t <agent-transcripts>/*.jsonl <agent-transcripts>/*/*.jsonl <agent-transcripts>/*/subagents/*.jsonl 2>/dev/null | head -10
21
+ ```
22
+
23
+ That covers the legacy flat (`<id>.jsonl`), current nested (`<id>/<id>.jsonl`), and subagent (`<parent>/subagents/<child>.jsonl`) layouts. For each candidate, read the first JSONL line. Take the file whose `message.content[0].text` contains the conversation's opening user prompt. If none matches, pass a tight digest of the session instead.
24
+
25
+ ## 2. Spawn three reviewers in parallel
26
+
27
+ One message, three `Task` calls, `subagent_type: generalPurpose`, agent mode (`readonly: false`). Reviewers need MCP access to look up the tickets, chat threads, and observability traces the transcript references, and readonly strips MCPs.
28
+
29
+ Each reviewer and the synthesizer name a role line in the `pstack-models.mdc` rule and a default. Set `model` to that line's value, or to the default if the rule or the line is missing. Leave `model` unset when the value is `auto` or `inherit-parent`. If the Task tool rejects a slug, use the default and say so. If it rejects the default, use the closest valid slug of the same family from its error message. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the **poteto-mode** skill.
30
+
31
+ | Lens | Role line | Default `model` | Prompt template |
32
+ |---|---|---|---|
33
+ | Judgment | `reflect judgment, divergent, synthesizer` | `claude-opus-5-5-xhigh` | `references/judgment-reviewer.md` |
34
+ | Tooling | `reflect tooling` | `grok-4.7-xhigh-fast` | `references/tooling-reviewer.md` |
35
+ | Divergent | `reflect judgment, divergent, synthesizer` | `claude-opus-5-5-xhigh` | `references/divergent-reviewer.md` |
36
+
37
+ Pass each template verbatim, substituting the transcript path or digest where marked. Reviewers return findings in the `Task` response body.
38
+
39
+ ## 3. Synthesize
40
+
41
+ One `Task` call, `subagent_type: generalPurpose`, `model` from the `reflect judgment, divergent, synthesizer` line (default `claude-opus-5-5-xhigh`), agent mode (`readonly: false`). It spot-verifies citations through MCP, and readonly strips MCPs. Pass `references/synthesizer.md` verbatim, with each reviewer's full output inlined where marked. It returns an Accepted / Rejected / Backlog list.
42
+
43
+ ## 4. Structural enforcement check
44
+
45
+ Move any Accepted item that a lint rule, script, metadata flag, or runtime check would enforce more reliably to Backlog. See the **encode-lessons-in-structure** principle skill.
46
+
47
+ ## 5. Apply
48
+
49
+ Present the synthesizer's full Accepted / Rejected / Backlog output and wait for explicit approval before applying any Accepted edit. The user picks the subset and may redirect routings. Skill changes affect every future agent in the org. Do not auto-apply.
50
+
51
+ File each Backlog item to your team's devex or backlog tracker without waiting. Only the Accepted list waits for approval.
52
+
53
+ Never edit a skill under `plugins/cache/`. Before approval, show its destination, `.cursor/skills/<skill>/` or `~/.cursor/skills/<skill>/`. After approval, copy the skill folder there and edit the copy. Never open a PR or push.
54
+
55
+ Follow each approved row's Routing exactly:
56
+
57
+ - Trivial existing-skill edit (a one-line bullet, a tightened sentence, a stale fact corrected): the parent does it directly.
58
+ - Substantive existing-skill edit (a new section, a new pattern table, more than ~10 lines): hand to Cursor's built-in `create-skill` skill and run its draft / test / iterate loop.
59
+ - `tune description: <skill path>` (the skill exists but didn't trigger when it should have): hand to `create-skill` and run its description-optimization loop.
60
+ - `new skill via create-skill: <kebab-name>`: hand creation to `create-skill`. Do not invent the shape ad hoc.
61
+
62
+ If your environment ships a SKILL.md validator, run it on every touched skill before declaring done.
63
+
64
+ ## 6. Summarize for the user
65
+
66
+ Short list, no preamble:
67
+
68
+ - Edits applied: `<skill path>`. What changed, one line each.
69
+ - New skills created: `<skill path>`. One line each (rare).
70
+ - Backlog filed to the devex tracker: `<issue title>` (`<tags>`). One line each.
71
+ - Dropped: one line per rejected finding + reason from the synthesizer.
@@ -18,7 +18,7 @@ Scan for:
18
18
 
19
19
  ## Scope to skills and tools the session actually used
20
20
 
21
- Route findings only to skills, tools, or MCPs this transcript used. A skill counts as used when the transcript shows a `read` of its `SKILL.md` (under `.dsh/skills/`, `~/.dsh/skills/`, or `~/.dsh/plugins/`), a `pstack_subagent` prompt naming its path, or a tool call (`bash`, `grep`, MCP, etc.) matching its documented commands. Speculative routings to skills the parent never opened do not count.
21
+ Route findings only to skills, tools, or MCPs this transcript used. A skill counts as used when the transcript shows a `Read` of its `SKILL.md` (under `.cursor/skills/`, `~/.cursor/skills/`, or `~/.cursor/plugins/`), a `Task` prompt naming its path, or a tool call (Shell, Grep, MCP, etc.) matching its documented commands. Speculative routings to skills the parent never opened do not count.
22
22
 
23
23
  Two finding shapes are valid:
24
24
  - The parent invoked the skill and you found a real gap in its body. Route to the skill's relevant section.
@@ -17,7 +17,7 @@ Scan for:
17
17
 
18
18
  ## Scope to skills and tools the session actually used
19
19
 
20
- Route findings only to skills, tools, or MCPs this transcript used. A skill counts as used when the transcript shows a `read` of its `SKILL.md` (under `.dsh/skills/`, `~/.dsh/skills/`, or `~/.dsh/plugins/`), a `pstack_subagent` prompt naming its path, or a tool call (`bash`, `grep`, MCP, etc.) matching its documented commands. Speculative routings to skills the parent never opened do not count.
20
+ Route findings only to skills, tools, or MCPs this transcript used. A skill counts as used when the transcript shows a `Read` of its `SKILL.md` (under `.cursor/skills/`, `~/.cursor/skills/`, or `~/.cursor/plugins/`), a `Task` prompt naming its path, or a tool call (Shell, Grep, MCP, etc.) matching its documented commands. Speculative routings to skills the parent never opened do not count.
21
21
 
22
22
  Two finding shapes are valid:
23
23
  - The parent invoked the skill and you found a real gap in its body. Route to the skill's relevant section.