dsh-pstack 0.2.0-beta.1 → 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 (261) hide show
  1. package/LICENSE +2 -3
  2. package/README.md +135 -84
  3. package/README.zh.md +185 -0
  4. package/cordis.patch.yml +97 -27
  5. package/dist/host-contract-CUPSpeNk.d.mts +22 -0
  6. package/dist/index.d.mts +49 -238
  7. package/dist/index.mjs +250 -123
  8. package/dist/models.d.mts +44 -0
  9. package/dist/models.mjs +201 -0
  10. package/dist/paths-BT77khwm.mjs +48 -0
  11. package/dist/pstack/LICENSE +21 -0
  12. package/dist/pstack/README.md +291 -0
  13. package/dist/pstack/agents/poteto-agent.md +9 -0
  14. package/{assets → dist/pstack}/docs/guide/01-setup.md +13 -11
  15. package/{assets → dist/pstack}/docs/guide/02-poteto-mode.md +4 -4
  16. package/{assets → dist/pstack}/docs/guide/04-design.md +4 -4
  17. package/{assets → dist/pstack}/docs/guide/05-build-and-clean.md +2 -2
  18. package/{assets → dist/pstack}/docs/guide/06-verify-and-ship.md +13 -3
  19. package/{assets → dist/pstack}/docs/guide/07-overnight.md +15 -13
  20. package/{assets → dist/pstack}/docs/guide/09-make-it-yours.md +6 -2
  21. package/{assets → dist/pstack}/docs/guide/10-recipes-and-pitfalls.md +7 -5
  22. package/{assets → dist/pstack}/docs/guide/README.md +1 -1
  23. package/dist/pstack/docs/harness/dsh.md +98 -0
  24. package/{assets → dist/pstack}/skills/architect/SKILL.md +12 -12
  25. package/dist/pstack/skills/arena/SKILL.md +50 -0
  26. package/{assets → dist/pstack}/skills/automate-me/SKILL.md +14 -14
  27. package/{assets → dist/pstack}/skills/benchmark-checklist/SKILL.md +1 -1
  28. package/{assets → dist/pstack}/skills/blast-radius/SKILL.md +4 -6
  29. package/{assets → dist/pstack}/skills/correct/SKILL.md +1 -1
  30. package/{assets → dist/pstack}/skills/create-formal-verification-skill/SKILL.md +4 -2
  31. package/{assets → dist/pstack}/skills/create-verification-skill/SKILL.md +5 -5
  32. package/dist/pstack/skills/figure-it-out/SKILL.md +54 -0
  33. package/dist/pstack/skills/how/SKILL.md +38 -0
  34. package/{assets → dist/pstack}/skills/in-your-own-words/SKILL.md +1 -1
  35. package/dist/pstack/skills/interrogate/SKILL.md +33 -0
  36. package/{assets → dist/pstack}/skills/ketchup/SKILL.md +3 -5
  37. package/dist/pstack/skills/ketchup-video/SKILL.md +29 -0
  38. package/{assets → dist/pstack}/skills/maintain-formal-verification-skill/SKILL.md +1 -1
  39. package/{assets → dist/pstack}/skills/maintain-verification-skill/SKILL.md +3 -3
  40. package/dist/pstack/skills/make-bot-ui/SKILL.md +117 -0
  41. package/dist/pstack/skills/no-comments/SKILL.md +26 -0
  42. package/{assets → dist/pstack}/skills/poteto-help/SKILL.md +34 -31
  43. package/{assets → dist/pstack}/skills/poteto-help/references/prompting.md +1 -1
  44. package/{assets → dist/pstack}/skills/poteto-help/references/recipes.md +3 -3
  45. package/{assets → dist/pstack}/skills/poteto-mode/SKILL.md +20 -19
  46. package/dist/pstack/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
  47. package/dist/pstack/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
  48. package/dist/pstack/skills/poteto-mode/playbooks/autopilot-full.md +25 -0
  49. package/dist/pstack/skills/poteto-mode/playbooks/autopilot-stack.md +8 -0
  50. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/babysit.md +4 -4
  51. package/dist/pstack/skills/poteto-mode/playbooks/bug-fix.md +15 -0
  52. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/eval.md +3 -3
  53. package/dist/pstack/skills/poteto-mode/playbooks/feature.md +21 -0
  54. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/hillclimb.md +3 -3
  55. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/investigation.md +2 -2
  56. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/multi-phase-plan.md +23 -23
  57. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/opening-a-pr.md +6 -6
  58. package/dist/pstack/skills/poteto-mode/playbooks/orchestrate.md +25 -0
  59. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/pause-safely.md +2 -2
  60. package/dist/pstack/skills/poteto-mode/playbooks/perf-issue.md +25 -0
  61. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/prototype.md +4 -4
  62. package/dist/pstack/skills/poteto-mode/playbooks/refactoring.md +16 -0
  63. package/dist/pstack/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
  64. package/dist/pstack/skills/poteto-mode/playbooks/session-pickup.md +11 -0
  65. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/shipping.md +2 -2
  66. package/{assets → dist/pstack}/skills/poteto-mode/playbooks/trace-forensics.md +2 -2
  67. package/dist/pstack/skills/poteto-mode/playbooks/visual-parity.md +11 -0
  68. package/dist/pstack/skills/poteto-mode/playbooks/worktree-cleanup.md +12 -0
  69. package/{assets → dist/pstack}/skills/poteto-mode/scripts/check-plan.mjs +6 -8
  70. package/dist/pstack/skills/poteto-mode/scripts/check-plan.test.mjs +128 -0
  71. package/{assets/skills/poteto-mode/scripts/check-plan.test.mjs → dist/pstack/skills/poteto-mode/scripts/expect.mjs} +12 -101
  72. package/dist/pstack/skills/poteto-mode/scripts/support.mjs +93 -0
  73. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/cli.mjs +123 -0
  74. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/cli.test.mjs +217 -0
  75. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.mjs +119 -0
  76. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/github.mjs +626 -0
  77. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/github.test.mjs +521 -0
  78. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/policy.mjs +657 -0
  79. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/policy.test.mjs +523 -0
  80. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/render.mjs +106 -0
  81. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/types.mjs +9 -0
  82. package/dist/pstack/skills/poteto-mode/scripts/watch-pr/watch-pr.mjs +5 -0
  83. package/{assets → dist/pstack}/skills/poteto-mode/scripts/worktree-audit.mjs +15 -22
  84. package/dist/pstack/skills/poteto-mode/scripts/worktree-audit.test.mjs +134 -0
  85. package/{assets → dist/pstack}/skills/principle-attack-the-premise/SKILL.md +1 -1
  86. package/{assets → dist/pstack}/skills/principle-boundary-discipline/SKILL.md +1 -1
  87. package/{assets → dist/pstack}/skills/principle-encode-lessons-in-structure/SKILL.md +1 -1
  88. package/{assets → dist/pstack}/skills/principle-exhaust-the-design-space/SKILL.md +1 -1
  89. package/{assets → dist/pstack}/skills/principle-experience-first/SKILL.md +1 -1
  90. package/{assets → dist/pstack}/skills/principle-explain-the-number/SKILL.md +3 -2
  91. package/{assets → dist/pstack}/skills/principle-fix-root-causes/SKILL.md +1 -1
  92. package/{assets → dist/pstack}/skills/principle-laziness-protocol/SKILL.md +1 -1
  93. package/{assets → dist/pstack}/skills/principle-make-operations-idempotent/SKILL.md +1 -1
  94. package/{assets → dist/pstack}/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +1 -1
  95. package/{assets → dist/pstack}/skills/principle-minimize-reader-load/SKILL.md +1 -1
  96. package/{assets → dist/pstack}/skills/principle-model-the-domain/SKILL.md +1 -1
  97. package/{assets → dist/pstack}/skills/principle-never-block-on-the-human/SKILL.md +1 -1
  98. package/{assets → dist/pstack}/skills/principle-outcome-oriented-execution/SKILL.md +1 -1
  99. package/{assets → dist/pstack}/skills/principle-prove-it-works/SKILL.md +2 -2
  100. package/{assets → dist/pstack}/skills/principle-redesign-from-first-principles/SKILL.md +1 -1
  101. package/{assets → dist/pstack}/skills/principle-separate-before-serializing-shared-state/SKILL.md +1 -1
  102. package/{assets → dist/pstack}/skills/principle-sequence-verifiable-units/SKILL.md +1 -1
  103. package/{assets → dist/pstack}/skills/principle-subtract-before-you-add/SKILL.md +1 -1
  104. package/{assets → dist/pstack}/skills/principle-test-behavior-not-implementation/SKILL.md +1 -1
  105. package/{assets → dist/pstack}/skills/principle-type-system-discipline/SKILL.md +1 -1
  106. package/dist/pstack/skills/recall/SKILL.md +37 -0
  107. package/dist/pstack/skills/reflect/SKILL.md +71 -0
  108. package/{assets → dist/pstack}/skills/reflect/references/divergent-reviewer.md +4 -4
  109. package/{assets → dist/pstack}/skills/reflect/references/judgment-reviewer.md +2 -2
  110. package/{assets → dist/pstack}/skills/reflect/references/synthesizer.md +5 -5
  111. package/{assets → dist/pstack}/skills/reflect/references/tooling-reviewer.md +2 -2
  112. package/dist/pstack/skills/setup-pstack/SKILL.md +80 -0
  113. package/{assets → dist/pstack}/skills/sharpen/SKILL.md +1 -1
  114. package/{assets → dist/pstack}/skills/show-me-your-work/SKILL.md +8 -8
  115. package/{assets → dist/pstack}/skills/show-me-your-work/scripts/log.mjs +1 -3
  116. package/dist/pstack/skills/show-me-your-work/scripts/log.test.mjs +56 -0
  117. package/dist/pstack/skills/statechart/SKILL.md +82 -0
  118. package/dist/pstack/skills/statechart/references/render.md +93 -0
  119. package/dist/pstack/skills/statechart/scripts/backends/cfg.mjs +31 -0
  120. package/dist/pstack/skills/statechart/scripts/backends/mermaid.mjs +186 -0
  121. package/dist/pstack/skills/statechart/scripts/backends/plain-text.mjs +62 -0
  122. package/dist/pstack/skills/statechart/scripts/backends/report.mjs +84 -0
  123. package/dist/pstack/skills/statechart/scripts/frontends/config.mjs +268 -0
  124. package/dist/pstack/skills/statechart/scripts/frontends/dot.mjs +67 -0
  125. package/dist/pstack/skills/statechart/scripts/frontends/marks.mjs +94 -0
  126. package/dist/pstack/skills/statechart/scripts/frontends/messages.mjs +48 -0
  127. package/dist/pstack/skills/statechart/scripts/frontends/spec.mjs +101 -0
  128. package/dist/pstack/skills/statechart/scripts/frontends/trace.mjs +39 -0
  129. package/dist/pstack/skills/statechart/scripts/frontends/value.mjs +180 -0
  130. package/dist/pstack/skills/statechart/scripts/frontends/verdict.mjs +40 -0
  131. package/dist/pstack/skills/statechart/scripts/frontends/view.mjs +99 -0
  132. package/dist/pstack/skills/statechart/scripts/ir.mjs +277 -0
  133. package/dist/pstack/skills/statechart/scripts/passes/annotate.mjs +92 -0
  134. package/dist/pstack/skills/statechart/scripts/passes/label.mjs +210 -0
  135. package/dist/pstack/skills/statechart/scripts/passes/lift.mjs +84 -0
  136. package/dist/pstack/skills/statechart/scripts/passes/loop-check.mjs +47 -0
  137. package/dist/pstack/skills/statechart/scripts/passes/paths.mjs +72 -0
  138. package/dist/pstack/skills/statechart/scripts/passes/reach.mjs +135 -0
  139. package/dist/pstack/skills/statechart/scripts/passes/region-check.mjs +82 -0
  140. package/dist/pstack/skills/statechart/scripts/passes/regions.mjs +268 -0
  141. package/dist/pstack/skills/statechart/scripts/pipeline.mjs +72 -0
  142. package/dist/pstack/skills/statechart/scripts/run.mjs +440 -0
  143. package/dist/pstack/skills/statechart/scripts/statechart.mjs +155 -0
  144. package/dist/pstack/skills/statechart/scripts/statechart.test.mjs +198 -0
  145. package/dist/pstack/skills/statechart/scripts/worker.mjs +31 -0
  146. package/dist/pstack/skills/swarm/SKILL.md +43 -0
  147. package/{assets → dist/pstack}/skills/tdd/SKILL.md +1 -1
  148. package/{assets → dist/pstack}/skills/teach/SKILL.md +2 -2
  149. package/{assets → dist/pstack}/skills/technical-writing/SKILL.md +1 -1
  150. package/{assets → dist/pstack}/skills/typescript-best-practices/SKILL.md +3 -6
  151. package/{assets → dist/pstack}/skills/why/SKILL.md +8 -8
  152. package/dist/script.d.mts +9 -111
  153. package/dist/script.mjs +32 -329
  154. package/dist/skill.d.mts +38 -0
  155. package/dist/skill.mjs +183 -0
  156. package/dist/skills/authored/decision-audit/SKILL.md +99 -0
  157. package/dist/skills/authored/decision-audit/SKILL.zh.md +99 -0
  158. package/dist/skills/authored/decision-audit/references/recover-commit.md +17 -0
  159. package/dist/skills/authored/decision-audit/references/recover-commit.zh.md +17 -0
  160. package/dist/skills/authored/decision-write/SKILL.md +131 -0
  161. package/dist/skills/authored/decision-write/SKILL.zh.md +131 -0
  162. package/dist/skills/authored/decision-write/references/land.md +48 -0
  163. package/dist/skills/authored/decision-write/references/land.zh.md +48 -0
  164. package/dist/skills/authored/setup-project-docs/SKILL.md +58 -0
  165. package/dist/skills/authored/setup-project-docs/SKILL.zh.md +58 -0
  166. package/dist/skills/authored/setup-project-docs/references/decision-conventions.md +11 -0
  167. package/dist/skills/authored/setup-project-docs/references/decision-conventions.zh.md +11 -0
  168. package/dist/skills/vendored/retro/SKILL.md +44 -0
  169. package/dist/skills/vendored/retro/agents/openai.yaml +5 -0
  170. package/dist/skills/vendored/writing-for-agents/SKILL-MECHANICS.md +22 -0
  171. package/dist/skills/vendored/writing-for-agents/SKILL.md +81 -0
  172. package/dist/skills/vendored/writing-for-agents/agents/openai.yaml +3 -0
  173. package/dist/subagent.d.mts +56 -193
  174. package/dist/subagent.mjs +443 -741
  175. package/locale/en.json +3 -2
  176. package/locale/zh.json +3 -2
  177. package/package.json +63 -66
  178. package/assets/agents/poteto-agent.md +0 -8
  179. package/assets/docs/harness/dsh.md +0 -60
  180. package/assets/docs/pstack-models.example.md +0 -54
  181. package/assets/skills/arena/SKILL.md +0 -50
  182. package/assets/skills/figure-it-out/SKILL.md +0 -54
  183. package/assets/skills/how/SKILL.md +0 -38
  184. package/assets/skills/interrogate/SKILL.md +0 -71
  185. package/assets/skills/interrogate/references/code-quality-review.md +0 -47
  186. package/assets/skills/interrogate/references/lead-judgment.md +0 -39
  187. package/assets/skills/interrogate/references/reviewer-prompt.md +0 -62
  188. package/assets/skills/interrogate/references/rubric.md +0 -77
  189. package/assets/skills/no-comments/SKILL.md +0 -26
  190. package/assets/skills/poteto-mode/playbooks/authoring-a-skill.md +0 -12
  191. package/assets/skills/poteto-mode/playbooks/autonomous-run.md +0 -15
  192. package/assets/skills/poteto-mode/playbooks/autopilot-full.md +0 -25
  193. package/assets/skills/poteto-mode/playbooks/autopilot-stack.md +0 -12
  194. package/assets/skills/poteto-mode/playbooks/bug-fix.md +0 -15
  195. package/assets/skills/poteto-mode/playbooks/feature.md +0 -21
  196. package/assets/skills/poteto-mode/playbooks/orchestrate.md +0 -112
  197. package/assets/skills/poteto-mode/playbooks/perf-issue.md +0 -25
  198. package/assets/skills/poteto-mode/playbooks/refactoring.md +0 -16
  199. package/assets/skills/poteto-mode/playbooks/runtime-forensics.md +0 -11
  200. package/assets/skills/poteto-mode/playbooks/session-pickup.md +0 -11
  201. package/assets/skills/poteto-mode/playbooks/visual-parity.md +0 -11
  202. package/assets/skills/poteto-mode/playbooks/worktree-cleanup.md +0 -20
  203. package/assets/skills/poteto-mode/scripts/orch/orch.mjs +0 -4282
  204. package/assets/skills/poteto-mode/scripts/orch/orch.test.mjs +0 -2042
  205. package/assets/skills/poteto-mode/scripts/watch-pr/cli.test.mjs +0 -5101
  206. package/assets/skills/poteto-mode/scripts/watch-pr/github.test.mjs +0 -1177
  207. package/assets/skills/poteto-mode/scripts/watch-pr/policy.test.mjs +0 -1441
  208. package/assets/skills/poteto-mode/scripts/watch-pr/watch-pr.mjs +0 -4601
  209. package/assets/skills/recall/SKILL.md +0 -37
  210. package/assets/skills/reflect/SKILL.md +0 -69
  211. package/assets/skills/setup-pstack/SKILL.md +0 -67
  212. package/assets/skills/swarm/SKILL.md +0 -43
  213. package/dist/frontmatter-BQX3ekwP.mjs +0 -229
  214. package/dist/frontmatter-BQX3ekwP.mjs.map +0 -1
  215. package/dist/history.d.mts +0 -429
  216. package/dist/history.mjs +0 -1129
  217. package/dist/history.mjs.map +0 -1
  218. package/dist/host-contract-o47JH_r8.d.mts +0 -527
  219. package/dist/index.mjs.map +0 -1
  220. package/dist/paths-D_JlVmBk.mjs +0 -42
  221. package/dist/paths-D_JlVmBk.mjs.map +0 -1
  222. package/dist/script.mjs.map +0 -1
  223. package/dist/subagent.mjs.map +0 -1
  224. /package/{static/icon.png → assets/logo.png} +0 -0
  225. /package/{assets → dist/pstack}/agents/comment-sicko.md +0 -0
  226. /package/{assets → dist/pstack}/docs/guide/03-understand.md +0 -0
  227. /package/{assets → dist/pstack}/docs/guide/08-principles.md +0 -0
  228. /package/{assets → dist/pstack}/docs/guide/images/design.jpg +0 -0
  229. /package/{assets → dist/pstack}/docs/guide/images/overnight.jpg +0 -0
  230. /package/{assets → dist/pstack}/docs/guide/images/recipes.jpg +0 -0
  231. /package/{assets → dist/pstack}/docs/guide/images/router.jpg +0 -0
  232. /package/{assets → dist/pstack}/docs/guide/images/understanding.jpg +0 -0
  233. /package/{assets → dist/pstack}/docs/guide/images/verification.jpg +0 -0
  234. /package/{assets → dist/pstack}/skills/architect/references/design-red-flags.md +0 -0
  235. /package/{assets → dist/pstack}/skills/architect/references/rationale-template.md +0 -0
  236. /package/{assets → dist/pstack}/skills/architect/references/runner-prompt.md +0 -0
  237. /package/{assets → dist/pstack}/skills/bro/SKILL.md +0 -0
  238. /package/{assets → dist/pstack}/skills/create-verification-skill/references/feature-map-example/README.md +0 -0
  239. /package/{assets → dist/pstack}/skills/create-verification-skill/references/feature-map-example/create-note.md +0 -0
  240. /package/{assets → dist/pstack}/skills/create-verification-skill/references/feature-map-example/search.md +0 -0
  241. /package/{assets → dist/pstack}/skills/how/references/explainer-prompt.md +0 -0
  242. /package/{assets → dist/pstack}/skills/how/references/explorer-prompt.md +0 -0
  243. /package/{assets → dist/pstack}/skills/poteto-mode/references/bugbot-triage.md +0 -0
  244. /package/{assets → dist/pstack}/skills/principle-build-the-lever/SKILL.md +0 -0
  245. /package/{assets → dist/pstack}/skills/principle-foundational-thinking/SKILL.md +0 -0
  246. /package/{assets → dist/pstack}/skills/principle-guard-the-context-window/SKILL.md +0 -0
  247. /package/{assets → dist/pstack}/skills/show-me-your-work/references/decision-log-template.tsv +0 -0
  248. /package/{assets → dist/pstack}/skills/typescript-best-practices/references/patterns.md +0 -0
  249. /package/{assets → dist/pstack}/skills/unslop/SKILL.md +0 -0
  250. /package/{assets → dist/pstack}/skills/why/references/epistemics.md +0 -0
  251. /package/{assets → dist/pstack}/skills/why/references/investigator-prompt.md +0 -0
  252. /package/{assets → dist/pstack}/skills/why/references/source-playbook.md +0 -0
  253. /package/{assets → dist/pstack}/skills/why/references/sources/code-archaeology.md +0 -0
  254. /package/{assets → dist/pstack}/skills/why/references/sources/databricks.md +0 -0
  255. /package/{assets → dist/pstack}/skills/why/references/sources/datadog.md +0 -0
  256. /package/{assets → dist/pstack}/skills/why/references/sources/incident-postmortem.md +0 -0
  257. /package/{assets → dist/pstack}/skills/why/references/sources/linear.md +0 -0
  258. /package/{assets → dist/pstack}/skills/why/references/sources/notion.md +0 -0
  259. /package/{assets → dist/pstack}/skills/why/references/sources/sentry.md +0 -0
  260. /package/{assets → dist/pstack}/skills/why/references/sources/slack.md +0 -0
  261. /package/{assets → dist/pstack}/skills/why/references/synthesizer-prompt.md +0 -0
package/locale/en.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "meta": {
3
- "title": "pstack skills",
4
- "description": "Ships the 55 pstack workflow skills inside this package: the model can load setup-pstack, and the other skills are invoked explicitly with /name."
3
+ "title": "pstack",
4
+ "description": "Rigorous agent workflows for DeepSeek Harness, ported from Cursor's pstack.",
5
+ "detail": "README.md"
5
6
  }
6
7
  }
package/locale/zh.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "meta": {
3
- "title": "pstack 技能",
4
- "description": "在本包内提供 55 个 pstack 工作流技能:模型可加载 setup-pstack,其余技能用 /name 显式调用。"
3
+ "title": "pstack 工作流",
4
+ "description": "把 pstack 的严格代理工作流带进 DeepSeek Harness。",
5
+ "detail": "README.zh.md"
5
6
  }
6
7
  }
package/package.json CHANGED
@@ -1,15 +1,7 @@
1
1
  {
2
2
  "name": "dsh-pstack",
3
- "version": "0.2.0-beta.1",
3
+ "version": "0.2.0-beta.3",
4
4
  "description": "pstack for DeepSeek Harness: rigorous agent workflows ported from cursor/plugins.",
5
- "repository": {
6
- "type": "git",
7
- "url": "git+https://github.com/l246804/dsh-pstack.git"
8
- },
9
- "homepage": "https://github.com/l246804/dsh-pstack#readme",
10
- "bugs": {
11
- "url": "https://github.com/l246804/dsh-pstack/issues"
12
- },
13
5
  "keywords": [
14
6
  "agent-skills",
15
7
  "deepseek-harness",
@@ -19,91 +11,96 @@
19
11
  "pstack",
20
12
  "workflow"
21
13
  ],
14
+ "homepage": "https://github.com/l246804/dsh-pstack#readme",
15
+ "bugs": {
16
+ "url": "https://github.com/l246804/dsh-pstack/issues"
17
+ },
18
+ "license": "MIT",
22
19
  "author": {
23
20
  "name": "leiwang",
24
21
  "email": "leiwang2000@foxmail.com"
25
22
  },
26
- "license": "MIT",
27
- "type": "module",
28
- "icon": "./static/icon.png",
29
- "main": "./dist/index.mjs",
30
- "types": "./dist/index.d.mts",
31
- "exports": {
32
- ".": {
33
- "types": "./dist/index.d.mts",
34
- "default": "./dist/index.mjs"
35
- },
36
- "./subagent": {
37
- "types": "./dist/subagent.d.mts",
38
- "default": "./dist/subagent.mjs"
39
- },
40
- "./history": {
41
- "types": "./dist/history.d.mts",
42
- "default": "./dist/history.mjs"
43
- },
44
- "./script": {
45
- "types": "./dist/script.d.mts",
46
- "default": "./dist/script.mjs"
47
- },
48
- "./cordis.patch.yml": "./cordis.patch.yml",
49
- "./locale/*.json": "./locale/*.json",
50
- "./icon": "./static/icon.png",
51
- "./package.json": "./package.json"
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/l246804/dsh-pstack.git"
52
26
  },
53
27
  "files": [
54
28
  "dist",
55
29
  "assets",
56
30
  "cordis.patch.yml",
57
- "locale/*.json",
58
- "static",
31
+ "locale",
59
32
  "README.md",
60
- "LICENSE"
33
+ "README.zh.md"
61
34
  ],
62
- "dsh": {
63
- "manifestVersion": 1,
64
- "bundle": {
65
- "patch": "./cordis.patch.yml"
66
- }
35
+ "type": "module",
36
+ "types": "./dist/index.d.mts",
37
+ "exports": {
38
+ ".": "./dist/index.mjs",
39
+ "./models": "./dist/models.mjs",
40
+ "./script": "./dist/script.mjs",
41
+ "./skill": "./dist/skill.mjs",
42
+ "./subagent": "./dist/subagent.mjs",
43
+ "./package.json": "./package.json",
44
+ "./locale/*.json": "./locale/*.json"
45
+ },
46
+ "dependencies": {
47
+ "@deepseek-ai/dsh-agent": "0.2.2-alpha.2",
48
+ "@deepseek-ai/dsh-jobs": "0.2.2-alpha.2",
49
+ "@deepseek-ai/dsh-llm": "0.2.2-alpha.2",
50
+ "@deepseek-ai/dsh-session": "0.2.2-alpha.2",
51
+ "@deepseek-ai/dsh-skill": "0.2.2-alpha.2",
52
+ "@deepseek-ai/dsh-subagent": "0.2.2-alpha.2",
53
+ "@deepseek-ai/dsh-system-prompt": "0.2.2-alpha.2",
54
+ "@deepseek-ai/dsh-tools": "0.2.2-alpha.2",
55
+ "@deepseek-ai/dsh-working-directory": "0.2.2-alpha.2",
56
+ "commander": "14.0.0"
67
57
  },
68
58
  "devDependencies": {
69
- "@deepseek-ai/cordis-plugin-include": "~1.0.10",
70
- "@deepseek-ai/cordis-plugin-loader": "~1.0.6",
71
- "@deepseek-ai/dsh-tools": "0.2.1-rc.3",
72
- "@types/js-yaml": "^4.0.9",
73
- "@types/node": "^26.6.5",
59
+ "@types/node": "^24.1.0",
74
60
  "bumpp": "^12.3.0",
75
- "js-yaml": "^4.3.2",
61
+ "js-yaml": "^5.5.0",
62
+ "skills": "^1.7.4",
76
63
  "typescript": "^7.0.2",
77
- "vite-plus": "1.3.0"
64
+ "vite-plus": "1.4.0"
78
65
  },
79
66
  "peerDependencies": {
80
- "@deepseek-ai/cordis": "~4.0.5"
67
+ "@deepseek-ai/cordis": "~4.0.6-alpha.1"
81
68
  },
69
+ "icon": "./assets/logo.png",
82
70
  "devEngines": {
83
71
  "packageManager": {
84
72
  "name": "pnpm",
85
73
  "version": "12.15.0",
86
74
  "onFail": "download"
75
+ },
76
+ "runtime": {
77
+ "name": "node",
78
+ "version": "24.22.1",
79
+ "onFail": "download"
87
80
  }
88
81
  },
89
82
  "engines": {
90
- "node": ">=22.19",
91
- "dsh": "0.2.1-rc.3"
83
+ "dsh": ">=0.2.2-alpha.2",
84
+ "node": ">=24.21.1"
85
+ },
86
+ "dsh": {
87
+ "manifestVersion": 1,
88
+ "bundle": {
89
+ "patch": "./cordis.patch.yml"
90
+ }
92
91
  },
92
+ "skills": [
93
+ {
94
+ "source": "mattpocock/skills",
95
+ "skills": [
96
+ "writing-for-agents",
97
+ "retro"
98
+ ],
99
+ "ref": "59db609eb1e18aaf59b63284d0e52255aff0c63c"
100
+ }
101
+ ],
93
102
  "scripts": {
94
- "build:runtime": "node scripts/build-runtime.ts",
95
- "build:assets": "pnpm run build:runtime && node scripts/sync-upstream.ts",
96
- "build:bundle": "vp pack",
97
- "build": "pnpm run build:assets && pnpm run build:bundle",
98
- "dev": "pnpm run build:assets && vp pack --watch",
99
- "check:upstream": "node scripts/check-upstream-tree.mjs",
100
- "check:runtime": "node scripts/build-runtime.ts --check",
101
- "check:assets": "pnpm run check:runtime && node scripts/sync-upstream.ts --check && node scripts/check-assets.ts",
102
- "check:scripts": "node scripts/check-scripts.ts",
103
- "check:pack": "node scripts/check-pack.ts",
104
- "typecheck": "tsc --noEmit",
105
- "test": "vp test",
106
- "check": "pnpm run check:upstream && pnpm run check:assets && pnpm run check:scripts && pnpm run typecheck && pnpm run test",
103
+ "prerelease": "vp run -r check && vp run -r test",
107
104
  "release": "bumpp"
108
105
  }
109
106
  }
@@ -1,8 +0,0 @@
1
- ---
2
- name: poteto-agent
3
- description: Delegate subagent for code-writing and helper tasks spawned during a `/poteto-mode` run. Use for delegates, not as the runner for `/poteto-mode` itself. Spawn a fresh `poteto-agent` for each new task, and resume one only in the strict cases that poteto-mode's Subagents section names. Reads the `poteto-mode` skill's `SKILL.md` in full before any work, including its inline Principles index. Substituting `general` skips that read and drifts.
4
- ---
5
-
6
- # Poteto subagent
7
-
8
- You are operating as poteto-mode's full agent style. The chat that receives `/poteto-mode` owns the playbook, the todo list, and every `pstack_subagent` spawn. You are one of its delegates. Read the `poteto-mode` skill's `SKILL.md` in full before doing any work, including its inline Principles index. `pstack_subagent` injects that absolute path into your brief. Use the path it gave you and read the file there. Your skill catalog also hides this skill, so a missing catalog entry does not mean pstack is absent. If the brief gave no path and you cannot read the file, stop and tell your parent. Navigate to a leaf `principle-*` skill whenever you apply that principle.
@@ -1,60 +0,0 @@
1
- # DSH harness mapping
2
-
3
- > This package ships its static assets, one bundled skill provider, the `pstack_subagent` delegation tool, the ported workflow skills and playbooks, restricted read-only history through `pstack_history`, `pstack_script` for running the bundled CLIs on the Host's own runtime, the official worktree integration mounted on demand, and a long-running-workflow pass that maps automatic goals, reminder heartbeats, and local watchers onto the host tools that actually exist.
4
- > The tables below are the target contract, not proof that a capability is installed in a profile.
5
-
6
- Generated from `scripts/capabilities.ts` into `assets/docs/harness/dsh.md`. Edit the table, not this file.
7
-
8
- ## Coverage
9
-
10
- - `mapped`: DSH has a direct equivalent, and the port keeps the upstream intent.
11
- - `degraded`: DSH has a partial equivalent, and the row states what is lost.
12
- - `preserved`: the upstream behavior stays as written, inside its narrower scope.
13
- - `excluded`: the feature is not carried, and every skill that needs it is adapted.
14
- - `deferred`: a later unit delivers it, and `Unit` names that unit.
15
-
16
- A row without `mapped` carries a reason and a delivery unit. A numeric unit names when the
17
- capability lands; `not planned` marks a gap this port does not close. Neither is evidence
18
- about this tree.
19
-
20
- ## Tools and fields
21
-
22
- | Upstream | DSH | Coverage | Unit | Note |
23
- | --- | --- | --- | --- | --- |
24
- | `Task` spawn | `pstack_subagent`, which returns a child id and reports by completion notice | mapped | - | Every call starts a managed activation and returns the child id; the result arrives as a completion notice, so nothing polls. A panel role starts one child per configured entry and reports a partial start instead of rolling back. |
25
- | `subagent_type: generalPurpose` | `agent: "general"` | mapped | - | A plain child with no injected preamble. `agent` accepts only the three pstack kinds, never a DSH agent preset id. |
26
- | `subagent_type: poteto-agent` | `agent: "poteto-agent"`, with the preamble injected by the tool | mapped | - | The preamble is read from the packaged asset at an absolute path and the `poteto-mode` instructions path is injected into the brief. A missing preamble blocks that agent type instead of degrading to a plain child. |
27
- | `comment-sicko` subagent | `agent: "comment-sicko"`, briefed read-only | degraded | 3 | The persona preamble is injected, but the no-write rule is brief text rather than a sandbox, so a reviewer's scope still has to be checked. |
28
- | `run_in_background: true` | field removed; children start as activations | mapped | - | `pstack_subagent` takes no background flag: every child is a managed activation and reports through a completion notice. |
29
- | `readonly: true` and `readonly: false` | a no-write constraint in the brief; the field is removed | degraded | 3 | Prose is not a sandbox, so a read-only child has to be checked rather than enforced. |
30
- | `resume` | a fresh child; `send_message` only when state is expensive to move | mapped | - | `pstack_subagent` always starts a fresh child. `send_message` continues a live one; a settled child is never silently resumed. |
31
- | `file_attachments` | real paths listed in the brief | mapped | - | The brief carries real paths; no invented attachment argument exists in the tool schema. |
32
- | `AskQuestion` | `ask_user_question` with `multi_select` | mapped | - | |
33
- | `TodoWrite` | `todo_write` with the full list; a skipped step stays in `content` | mapped | - | |
34
- | `Grep`, `Glob`, `Read`, `Shell` | `grep`, `glob`, `read`, `bash` | mapped | - | |
35
- | built-in `create-skill` | the authoring playbook plus this package's frontmatter, link, and structure checks | degraded | 4 | No Cursor drafting, evaluation, or optimization tool is claimed; the playbook points at the validators this package actually runs. |
36
- | `/name` or the named skill | the `skill` tool for model-invocable skills, `/name` for the rest | mapped | - | The bundled provider lists all 55 skills and loads each body from its absolute path; only `setup-pstack` stays model-invocable, exactly as upstream declares. |
37
- | `bun` + shell scripts under `poteto-mode/scripts/` | `pstack_script`, which runs the bundled CLIs on the Host's own runtime | mapped | - | `id` is a closed enum over the shipped artefacts, so the tool takes no path and no shell string. Each artefact is one dependency-free Node module launched with `process.execPath`, which is why no `bun`, `bash`, or `node` on PATH is needed; `ELECTRON_RUN_AS_NODE=1` is added only under Electron. Each run starts in the Session's own directory. `background: true` needs the jobs service and is refused with a reason when the composition has none. The tool goes through no command approval and no sandbox policy, which its description states. |
38
-
39
- ## Paths, models, and host features
40
-
41
- | Upstream | DSH | Coverage | Unit | Note |
42
- | --- | --- | --- | --- | --- |
43
- | model slug, reasoning effort, `fast` | `role` resolved from `$DSH_HOME/pstack-models.md`, plus `reasoningEffort` per delegation | mapped | - | A role value is `inherit-parent`, `auto`, `<provider>/<model>`, or `<provider>/<model> [effort]`. The value splits at its first `/`, so a model id may keep its own vendor prefix (`gateway/vendor-a/model-x`); no segment may be empty. The role's effort is the level that role starts at, not a ceiling: `pstack_subagent` takes `reasoningEffort` to raise or lower it for one delegation, and a child can change its own with `set_reasoning_effort`, which applies from its next step. Both are validated against the live adapter metadata, per panel entry, before a child starts, and a refusal lists that model's real efforts. No model id is hardcoded in the assets, and no effort ladder is either. |
44
- | `~/.cursor/rules/pstack-models.mdc` | `$DSH_HOME/pstack-models.md`, read for each new delegation | mapped | - | `/setup-pstack` writes the file and `pstack_subagent` re-reads it on every delegation. An unreadable file is an error, not an empty configuration. |
45
- | `.cursor/skills`, `~/.cursor/skills` | `assets/skills/<name>/SKILL.md` inside this package | mapped | - | Skills ship inside the package and are read in place; nothing is copied into `$DSH_HOME/skills`, and no directory is watched. |
46
- | `~/.cursor/plugins`, `.cursor-plugin` | absolute resource paths inside this package | mapped | - | Each candidate carries its own skill directory as the resource base, so `references/` and `scripts/` resolve next to `SKILL.md`. |
47
- | `~/.cursor/projects/.../agent-transcripts` | `pstack_history`, a restricted read of raw `sessionQuery` events | degraded | 5 | The tool pages one fixed observation of the calling session or a reviewable direct child, inside the caller's workspace; there is no transcript directory to read, no arbitrary session id, and no descendant traversal. A cold read from persistence cannot separate the stored log from the read-time interrupted-turn closers rc.3 appends, so per-event provenance is reported undeterminable and a full transcript audit stays unfinished for those sessions. The live/prepared split, pagination, and lease release are unit-tested; no real profile read has run yet. |
48
- | agent store | `.audit/<task-slug>/` or a directory the user names | mapped | - | |
49
- | `paths:` auto-attach globs in SKILL.md | not consumed; skills load by explicit invocation | degraded | not planned | Automatic attachment by file glob has no equivalent, so `typescript-best-practices` is explicit-invocation only and its body says so. The frontmatter field is dropped from the generated skill rather than shipped as a no-op. |
50
- | Custom Mode | an explicit `/poteto-mode` on each new task | degraded | 4 | No persistent mode or keyboard shortcut exists. The ported skills say so at the step where a mode would have applied. |
51
- | `/loop` | `create_goal` for automatic continuation, plus `schedule_create` only as a timed heartbeat | degraded | 6 | There is no command to type and no event subscription. The goal carries a predicate across rounds, and its round driver is a separate host package that a profile may not mount, so a goal can be created while nothing continues on its own. A reminder only delivers a follow-up into the session that created it, refuses a delegated caller, and cannot watch a PR or CI. The event half is a background job whose settlement wakes the session, or a poll the text calls a poll. Nothing here has been exercised on a real profile. |
52
- | Cursor Automations, `update_state`, `SendToUser` | not mapped; routine-style automation is excluded | excluded | 5 | `automate-me` ships, but it drafts a `-mode` skill from authorized history and opens a PR; it does not create a webhook routine, request a secret, or wake an agent. `schedule_create` is not a webhook routine, it refuses a delegated caller, and no secret is ever requested. |
53
- | cloud agent, `cloud_base_branch`, dashboard | a local child with a real `cwd`, started from a local branch or a prepared checkout | degraded | 3 | No VM, cross-device resume, dashboard, or cloud liveness check is promised, and the long-running playbooks now say so in the step that used one. Isolation is the official worktree checkout, which does not cover ports, credentials, or services, and every child ends with the host process. |
54
- | `deslop` | `/no-comments` plus one read-through of the diff | degraded | 4 | It is not the same skill under a new name; the diff read-through replaces the plugin. |
55
- | `control-ui`, `control-cli` | a project verification skill or an existing driver | degraded | 4 | Without a driver the verification result stays unproven, and reading source is not accepted as a substitute. |
56
- | Bugbot | triage of review comments already on a pull request | preserved | 4 | Starting or configuring Bugbot is out of scope; existing review threads are read as ordinary data. |
57
- | built-in pull request tool | resolved `gh`, or an `origin` CLI that is actually available | degraded | 4 | A forge path has to be resolved before the shipping steps can run; there is no built-in PR tool. |
58
- | image generation, `/visualize` | Mermaid, existing screenshots, or a real renderer | degraded | 4 | No image is fabricated when none can be rendered, and a read-only capture stays read-only. |
59
- | worktree isolation | the official worktree rows, mounted by this bundle when the profile lacks them | mapped | - | Two rows mount on demand inside the composed profile and are skipped when an equivalent row is already enabled, so the `worktrees` service is provided exactly once. Isolation covers the working directory and branch only: not ports, network, credentials, caches, or services. The four profile paths are not yet verified at runtime. |
60
- | the `/make-bot-ui` skill | excluded from the port | excluded | 1 | It targets Cursor's Grok Bot webhook and Tailscale flow, and there is no equivalent host feature. |
@@ -1,54 +0,0 @@
1
- # pstack per-role model configuration
2
- #
3
- # `/setup-pstack` writes this file to `$DSH_HOME/pstack-models.md`. `pstack_subagent`
4
- # re-reads it on every delegation, so an edit reaches the next child and never a child
5
- # that already started.
6
- #
7
- # One line per role. The key must match a role in the manifest exactly, commas
8
- # included. Delete a line to inherit the parent route for that role.
9
- #
10
- # Value forms:
11
- #
12
- # - `inherit-parent` or `auto` sends no `agentOptions`, so the child runs on the parent
13
- # route.
14
- # - `<provider>/<model>` is an exact route. It splits at the first `/`: the
15
- # provider is the text before it and the model is everything after it, so
16
- # `gateway/vendor-a/model-x` is provider `gateway` with model
17
- # `vendor-a/model-x`. No segment may be empty.
18
- # - `<provider>/<model> [effort]` sets the starting level for that role. A caller
19
- # raises or lowers it per delegation with `reasoningEffort`, and a running child
20
- # can change its own with `set_reasoning_effort`. The effort must appear in that
21
- # model's supported effort list. This package assumes no ladder of its own, so it
22
- # never invents a token and reports the real ones whenever it refuses one.
23
- #
24
- # `arena runners`, `architect runners`, and `interrogate reviewers` are panels: the
25
- # value is a comma-separated list and one child starts per entry. Two entries on the
26
- # same route are not a cross-model review, and `pstack_subagent` says so in its
27
- # result.
28
- #
29
- # `arena cross-judge pool` is a list too, but it is not fanned out; pass `roleIndex` to
30
- # choose the entry. `swarm workers` is a list as well: its first entry is the default
31
- # route for every worker, `roleIndex` gives one race arm a different entry, and the
32
- # caller still starts each worker itself.
33
- #
34
- # The defaults below are `inherit-parent` because no route is confirmed yet. Replace
35
- # them with routes your own deployment serves.
36
- #
37
- # budget: none (unset)
38
- feature, refactoring: inherit-parent
39
- bug-fix: inherit-parent
40
- perf-issue: inherit-parent
41
- hillclimb: inherit-parent
42
- judgment and prose: inherit-parent
43
- hardest tasks: inherit-parent
44
- how explorer: inherit-parent
45
- how explainer: inherit-parent
46
- why investigators: inherit-parent
47
- why synthesizer: inherit-parent
48
- reflect tooling: inherit-parent
49
- reflect judgment, divergent, synthesizer: inherit-parent
50
- arena runners: inherit-parent
51
- arena cross-judge pool: inherit-parent
52
- swarm workers: inherit-parent
53
- architect runners: inherit-parent
54
- interrogate reviewers: inherit-parent
@@ -1,50 +0,0 @@
1
- ---
2
- name: arena
3
- description: Spawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it. Use for /arena, 'arena this', 'throw it in the arena', or when one attempt at a non-trivial artifact would lock in the wrong shape.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Arena
8
-
9
- > DSH port of pstack. `pstack_subagent` replaces Cursor's Task tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
10
-
11
- Open a `todo_write` list with one entry per phase (Frame, Fan out, Cross-judge, Pick, Graft, Verify) before launching anything.
12
-
13
- ## Phase A: Frame
14
-
15
- Every candidate gets the same prompt, so the prompt is the contract.
16
-
17
- 1. State the artifact each candidate is producing.
18
- 2. Derive the rubric, 3-6 concrete gradeable criteria for what success looks like on *this* task. It is the picker's tool in Phase D. Candidates only see the task.
19
- 3. Pick the runners. Use `role: "arena runners"`: that role is a panel, so one `pstack_subagent` call starts one child per entry in the role file and the result lists every child id with the route it actually got. Read the Subagents section of the `poteto-mode` skill at its absolute resource path first. An entry the file does not name inherits the parent route. An entry whose route does not resolve fails that seat and names the role file; the remaining seats still start and the result records the degradation. Two entries on the same route give you two attempts from one model, not a cross-model arena, and the result says so. Add entries when the arena covers multiple design directions, and repeat one route when the work is generation-bound rather than judgment-sensitive. Start from the level the role line names, raise it for hard work and lower it for routine work by passing `reasoningEffort`; a child that cannot call `set_reasoning_effort` keeps the level you gave it.
20
- 4. Give each candidate its own output location. The child calls `create_worktree({ name })` in its own Session and writes there, or you create the checkouts one at a time first and pass each absolute `path` as that child's `cwd`; `create_worktree` returns the path, branch, pinned commit, and repository root. That isolation covers the working directory and branch only, so ports, credentials, running services, and caches still collide. A scratch directory outside the repository is the fallback when Git isolation is not wanted. This is `principle-separate-before-serializing-shared-state`; read its `SKILL.md` at its absolute resource path.
21
-
22
- ## Phase B: Fan out
23
-
24
- Start all N subagents in one batch of `pstack_subagent` calls, each with the task, the path to the shared grounding, its own output path, and instructions to produce the artifact and a short rationale naming the alternatives it considered and what it rejected. A child is a managed activation, so there is no background flag and nothing polls: each result arrives as a completion notice. A brief that needs a read-only candidate still has to say so, because the tool enforces no such mode.
25
-
26
- If a candidate produces no output, proceed with N-1 and note the dropout. To keep a live candidate's local state, such as its checkout, uncommitted edits, or a running process, send it another instruction with `send_message`; that returns an acceptance, not an answer, and the reply still arrives as the child's own completion notice. Otherwise start a fresh child, because a settled child is never silently resumed.
27
-
28
- ## Phase C: Cross-judge
29
-
30
- After all Phase B candidates complete, choose one entry from `role: "arena cross-judge pool"` with `roleIndex`. That role is a list but is not fanned out: one call starts one judge on the entry you picked. Prefer a route whose provider and model family differ from the parent's, and when you cannot confirm a different family, say plainly that the cross-judge is the same model reviewing itself. Start it with a brief that forbids writes and tells it to check `git status` instead of claiming it wrote nothing. It sees the rubric and the candidates by path label, scores each criterion, and recommends a base with rationale. It runs in parallel with your reading in Phase D. Don't start it while candidates are still writing.
31
-
32
- ## Phase D: Pick a base
33
-
34
- Read every candidate end to end before picking. Score each against the rubric criterion by criterion, not on holistic feel, and compare with the cross-judge. Agreement on the base confirms the pick. Disagreement means one of you is biased or the rubric was ambiguous. Read both rationales before deciding.
35
-
36
- Pick the base a future maintainer can extend most easily without breaking invariants. When two feel tied, prefer the cleaner boundary or smaller API, per `principle-laziness-protocol`; read its `SKILL.md` at its absolute resource path.
37
-
38
- ## Phase E: Graft
39
-
40
- Walk each losing candidate once more for what is worth porting into the base, usually one or two things per candidate, not most of it. Fold each graft in by hand, as `principle-redesign-from-first-principles` requires; read its `SKILL.md` at its absolute resource path, so the result stays coherent under one mental model. Don't paste mechanically.
41
-
42
- If the candidates converge on one shape, that is strong agreement. Note it and ship the consensus shape. No graft is needed. If they wildly diverge, Phase A was under-specified. Reframe and re-run rather than averaging the divergence.
43
-
44
- ## Phase F: Verify
45
-
46
- Verify the synthesized artifact like any other output, as `principle-prove-it-works` requires; read its `SKILL.md` at its absolute resource path. If verification finds a problem the arena missed, either Phase A was wrong (re-frame and re-run) or a candidate caught it and you missed the graft (go back to Phase E). Don't paper over it.
47
-
48
- ## Outputs
49
-
50
- One synthesized artifact, with a short synthesis note alongside naming the base and why, the cross-judge's verdict, each graft with its source candidate, what was rejected and why, any convergence or dropouts, and the verification result.
@@ -1,54 +0,0 @@
1
- ---
2
- name: figure-it-out
3
- description: "Design an auditable playbook when no narrower one fits: a large migration, an ambitious multi-part change, or work a human reviews after stepping away. Scales rigor to the task, runs a hypothesis loop, and logs decisions. Use for /figure-it-out or 'figure it out'."
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Figure it out
8
-
9
- > DSH port of pstack. `pstack_subagent` replaces Cursor's Task tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
10
-
11
- When the task matches no playbook, design one. The deliverable before any code is the workflow itself: a sequence of phases that scales rigor to the task, runs the scientific method, and leaves a decision trail a human can audit after stepping away.
12
-
13
- ## Start
14
-
15
- Open a `todo_write` list whose first item is to read the Principles section of the `poteto-mode` skill, at its absolute resource path. Then add the phases below as items.
16
-
17
- ## Phase A: Frame
18
-
19
- Ground first, then commit. Don't start the run until you can state:
20
-
21
- - The definition of done as a falsifiable predicate, as `principle-prove-it-works` requires; read its `SKILL.md` at its absolute resource path.
22
- - Scope, quantified: rough units and effort, plus the blockers grounding surfaced.
23
- - The rigor level, biased high. One-way doors and high blast radius get more. Reversible low-stakes steps get less. Rigor is gates and artifacts, not "try harder".
24
-
25
- Present the framing and tradeoffs before committing to a long run. Reversible work proceeds, as `principle-never-block-on-the-human` requires; read its `SKILL.md` at its absolute resource path. A multi-hour run earns one checkpoint, asked through `ask_user_question`.
26
-
27
- ## Phase B: Design the workflow
28
-
29
- Decompose into atomic, independently-landable units. Sequence riskiest-unknown-first. Scaffold and verification come before features, as `principle-foundational-thinking` requires; read its `SKILL.md` at its absolute resource path.
30
-
31
- - Build the verification harness before the work, with the baseline captured from the pre-change state, so the check reads as "old value vs new value".
32
- - For one-way-door design decisions, read the `architect` skill's `SKILL.md` at its absolute resource path and run it; it runs `arena` in turn. Skip it for mechanical work whose shape is already concrete. A second arena over a settled design is over-engineering, per `principle-laziness-protocol`.
33
- - Decide what fans out. Parallelize only across seams, and give each worker its own checkout: the worker calls `create_worktree` in its own Session, or you create the checkouts one at a time and pass each absolute `path` as that worker's `cwd`. Read `principle-separate-before-serializing-shared-state` at its absolute resource path. Don't over-fan. Read the Subagents section of the `poteto-mode` skill at its absolute resource path before you spawn anyone. Start from the level the role line names, raise it for hard work and lower it for routine work by passing `reasoningEffort`; a child that cannot call `set_reasoning_effort` keeps the level you gave it.
34
- - Write the designed phase list down. That list is what the human reviews.
35
-
36
- Then execute the design. Add its steps to the `todo_write` list as concrete items between the Phase C and Phase D entries. Run each under the Phase C loop discipline, and weave the Phase D log through them, a row as each step lands, rather than saving the whole trail for the end.
37
-
38
- ## Phase C: Run the loop
39
-
40
- Each unit is an experiment. State the hypothesis, make the smallest change, measure against the predicate on the real artifact, keep it if it advanced, revert it if it didn't. Read `principle-sequence-verifiable-units` at its absolute resource path and verify each unit before starting the next instead of batching checks at the end.
41
-
42
- - Verify by inspecting the artifact, never a self-report. When something passes too easily, suspect the observation method before the system.
43
- - Pair delegated work with a judge: a second `pstack_subagent` child that reads the same artifact and the same predicate, never the worker's own report. If a worker games the gate, reset and harden the contract. If the gate itself is wrong, fix the gate in its own change rather than routing around it.
44
- - A verdict is VERIFIED, NOT VERIFIED, or INCONCLUSIVE. Inconclusive is not a pass. Don't hide a negative.
45
-
46
- ## Phase D: Keep the audit trail
47
-
48
- Log the run as the `show-me-your-work` skill prescribes; read its `SKILL.md` at its absolute resource path. Its session-audit step needs the restricted history tool, which this package does not ship yet, so keep the decision trail inside the repository and report that part of the audit as unverified. figure-it-out's work is usually ambitious enough to commit the trail so the reviewer can read it in the PR. The trail plus the diff is what lets the human come back and trust the work.
49
-
50
- ## Phase E: Verify and hand back
51
-
52
- Check the whole against the Phase A predicate on the real product, not just the harness. Encode any recurring correction as a gate, a lint rule, a check, or a script, as `principle-encode-lessons-in-structure` requires; read its `SKILL.md` at its absolute resource path.
53
-
54
- **Reply:** the playbook you designed, the rigor level and why, the decision-trail path, what's verified against the predicate, and what's still open.
@@ -1,38 +0,0 @@
1
- ---
2
- name: how
3
- description: Use for "how does X work", code walkthroughs before changing something, and placement / ownership / layering questions ("where should this live", "which package owns this", "is this the right layer"). Explains subsystem architecture, runtime flow, onboarding mental models. Use why for motivation.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # How
8
-
9
- > DSH port of pstack. `pstack_subagent` replaces Cursor's Task tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
10
-
11
- Explore the codebase to answer "how does X work?" questions. Produce architectural explanations at the level of a senior engineer onboarding onto a subsystem, enough to build a working mental model, not so much that it reads like annotated source code.
12
-
13
- Every spawn is a `pstack_subagent` call with `agent: "general"` and `role: "how explorer"` or `role: "how explainer"`. Read that role's route from `$DSH_HOME/pstack-models.md`; the tool re-reads the file on every delegation, and a role the file does not name inherits the parent route. Never invent a model id: this package cannot know which routes a deployment serves. An effort is different, because the target model advertises its own list and `pstack_subagent` checks your value against it and names the real values when it refuses, so predict no ladder beyond that. Explorers are read-only by instruction, not by sandbox, so state the no-write rule in each brief and check `git status` after the child reports. Read the Subagents section of the `poteto-mode` skill at its absolute resource path before you spawn anything. Start from the level the role line names, raise it for hard work and lower it for routine work by passing `reasoningEffort`; a child that cannot call `set_reasoning_effort` keeps the level you gave it.
14
-
15
- ## 1. Assess complexity
16
-
17
- If the scope is ambiguous, state your interpretation and explore. The user can redirect.
18
-
19
- - **Simple** (a single module, a small utility, a narrow question such as "how does function X work"): no explorers. Start one explainer child with `references/explainer-prompt.md` and no explorer findings; it explores and explains in one pass. Go to step 4.
20
- - **Complex** (a subsystem spanning multiple files or services, a cross-cutting feature, a full architectural overview): go to step 2.
21
-
22
- When in doubt, take the simple path.
23
-
24
- ## 2. Explore (complex only)
25
-
26
- Decompose the question into 2 to 4 angles, each a distinct slice of the subsystem. Start every explorer as one batch of `pstack_subagent` calls, each with `references/explorer-prompt.md` and its angle filled in. Each call returns a child id and the report arrives as a completion notice, so nothing polls: move on once the notices are in.
27
-
28
- ## 3. Synthesize (complex only)
29
-
30
- Once all explorers have returned, start one explainer child with `references/explainer-prompt.md` and every explorer's findings filled in. Starting it earlier drops whatever had not reported yet.
31
-
32
- ## 4. Present
33
-
34
- Present the explainer's output. Light edits for clarity or context from the conversation are fine. Do not substantially rewrite it.
35
-
36
- ## Output format
37
-
38
- The explanation uses the sections defined in `references/explainer-prompt.md`, dropping any that do not apply: Overview, Key Concepts, How It Works, Where Things Live, Gotchas.
@@ -1,71 +0,0 @@
1
- ---
2
- name: interrogate
3
- description: Use for "interrogate", "adversarial review", "multi-model review", "challenge this", "stress test this code", "find blind spots", or "tear this apart". Multiple LLM reviewers challenge changes from independent angles.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Interrogate
8
-
9
- > DSH port of pstack. `pstack_subagent` replaces Cursor's Task tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
10
-
11
- Spawn one reviewer per configured route to adversarially review code changes. The adversarial signal comes from model diversity, not assigned personas; when two entries resolve to the same route, say plainly that the review is one model reading the diff twice, because that is what it is. The deliverable is a synthesized verdict. Do NOT auto-apply changes.
12
-
13
- ## Step 1, Scope
14
-
15
- Identify what to review from context:
16
-
17
- - If the user points at specific files or a diff, use that.
18
- - If on a feature branch, run `git diff main...HEAD` (or the appropriate base branch) for the full changeset.
19
- - If the user's message references recent work, gather the relevant files.
20
-
21
- Package the diff or file contents with any surrounding context files the reviewers need to understand the code.
22
-
23
- ## Step 2, Intent
24
-
25
- Before spawning reviewers, state the intent in one clear paragraph from the user's message, commit messages, the PR description if one exists, and the code. If you're unsure about the intent, ask the user before proceeding.
26
-
27
- ## Step 3, Spawn Reviewers
28
-
29
- Launch all reviewers in one batch of `pstack_subagent` calls with `role: "interrogate reviewers"`. That role is a panel, so one call starts one child per entry in the role file and the result lists every child id with its actual route; label them Reviewer A, B, and so on to match the entry count. A role the file does not name inherits the parent route, and that is not a different model.
30
-
31
- Each reviewer gets `agent: "general"` and a brief that forbids writes: it may read the diff and run read-only commands, and it must not edit files. That rule is an instruction, not a sandbox, so check `git status` before and after instead of trusting the report. The route comes from the panel entry, and the tool reports the route each reviewer actually got.
32
-
33
- If an entry's route does not resolve, that reviewer does not start: the error names the role file and the bad line, which is the actionable fix. The remaining entries still start, and the report records each reviewer that was skipped and why. Do not substitute a route the user did not configure, and do not let one bad entry stop the review.
34
-
35
- Read `references/reviewer-prompt.md` and fill in the same template for every reviewer with the stated intent, the diff or file contents, the rubric from `references/rubric.md`, and the code-quality lens from `references/code-quality-review.md`. Read the Subagents section of the `poteto-mode` skill at its absolute resource path first. Start from the level the role line names, raise it for hard work and lower it for routine work by passing `reasoningEffort`; a child that cannot call `set_reasoning_effort` keeps the level you gave it.
36
-
37
- ## Step 4, Synthesize
38
-
39
- As results come back, build a unified picture. Parse every reviewer's findings. Merge findings that describe the same issue differently, and note which route raised each one. Findings two or more reviewers raised are the highest signal only when their routes differ: reviewers on one route share the same blind spots, and the report says so instead of calling the overlap independent confirmation. Read a lone reviewer's finding, but weight it accordingly. Note disagreements. If one reviewer flags something and another explicitly says the opposite, that is context for the verdict.
40
-
41
- ## Step 5, Lead Judgment
42
-
43
- You are the lead reviewer, a pragmatic senior engineer, not a neutral aggregator. Read `references/lead-judgment.md` for the full framework. Put every finding in one of four buckets, with the model(s) that raised it and a one-line rationale.
44
-
45
- - **Act on**. Real issues affecting correctness, security, or maintainability given the actual goals. They would block a real PR.
46
- - **Consider**. Legitimate, but you're not sure they outweigh the cost of addressing them now. Worth the user's attention.
47
- - **Noted**. Technically valid but not actionable. Context-dependent, premature optimization, or low-impact at this stage.
48
- - **Dismissed**. Wrong, nitpicky, or missing context, with a brief reason.
49
-
50
- ## Output Format
51
-
52
- ### Intent
53
- > [The stated intent paragraph from Step 2]
54
-
55
- ### Reviewers
56
- - Reviewer [label]: [model name], [N findings] (one bullet per reviewer)
57
-
58
- ### Act On
59
- [Each: description, which models raised it, why it matters.]
60
-
61
- ### Consider
62
- [Each: description, which models raised it, the tradeoff.]
63
-
64
- ### Noted
65
- [Brief list.]
66
-
67
- ### Dismissed
68
- [Each with a brief rationale.]
69
-
70
- ### Agreement Map
71
- [Where models agreed and diverged, and what that pattern tells us.]
@@ -1,47 +0,0 @@
1
- # Code Quality Review
2
-
3
- Each reviewer applies this code-quality lens in addition to the rubric. It is a strict standard focused on implementation quality, maintainability, abstraction quality, and codebase health.
4
-
5
- Above all, be ambitious about code structure. Do not merely identify local cleanup. Actively search for "code judo" moves, restructurings that preserve behavior while making the implementation dramatically simpler, smaller, more direct, and more elegant.
6
-
7
- ## Core Prompt
8
-
9
- Start from this baseline:
10
-
11
- > Perform a deep code quality audit of the current branch's changes.
12
- > Rethink how to structure / implement the changes to meaningfully improve code quality without impacting behavior.
13
- > Work to improve abstractions, modularity, reduce Spaghetti code, improve succinctness and legibility.
14
- > Be ambitious, if there is a clear path to improving the implementation that involves restructuring some of the codebase, go for it.
15
- > Be extremely thorough and rigorous. Measure twice, cut once.
16
-
17
- ## Dimensions
18
-
19
- Each dimension is stated once. Apply the ones that are relevant.
20
-
21
- 0. **Be ambitious about structural simplification.** Do not stop at "this could be a bit cleaner." Look for reframings that make whole branches, helpers, modes, conditionals, or layers disappear. Assume a "code judo" move is often available. It uses the existing architecture more effectively and makes the change dramatically simpler. If you can delete complexity rather than rearrange it, push hard for that.
22
-
23
- 1. **Do not let a PR push a file from under 1k lines to over 1k lines without a very strong reason.** Treat this as a strong smell. Prefer extracting helpers, subcomponents, or modules. If the diff crosses that threshold, ask whether the code should be decomposed first. Waive only for a compelling structural reason where the resulting file stays clearly organized.
24
-
25
- 2. **Do not allow spaghetti growth in existing code.** Be suspicious of new ad-hoc conditionals, scattered special cases, or one-off branches inserted into unrelated flows. Treat "weird if statements in random places" as a design problem, not a style nit. Prefer pushing the logic into a dedicated helper, state machine, or module instead of tangling an existing path.
26
-
27
- 3. **Bias toward cleaning the design, not just accepting working code.** If behavior can stay the same while the structure becomes meaningfully cleaner, push for the cleaner version. Prefer simplifications that remove moving pieces over refactors that spread the same complexity around.
28
-
29
- 4. **Prefer direct, boring, maintainable code over hacky or magical code.** Treat brittle, ad-hoc, or "magic" behavior as a problem. Be skeptical of generic mechanisms that hide simple data-shape assumptions. Flag thin abstractions, identity wrappers, or pass-through helpers that add indirection without buying clarity.
30
-
31
- 5. **Push on type and boundary cleanliness when it affects maintainability.** Question unnecessary optionality, `unknown`, `any`, or cast-heavy code when a clearer type boundary could exist. Prefer explicit typed models over loosely-shaped ad-hoc objects. If a branch leans on a silent fallback to paper over an unclear invariant, ask whether the boundary should be made explicit.
32
-
33
- 6. **Keep logic in the canonical layer and reuse existing helpers.** Call out feature logic leaking into shared paths or implementation details leaking through APIs. Prefer existing canonical utilities over bespoke one-offs. Push code toward the right package, service, or module instead of normalizing drift.
34
-
35
- 7. **Treat unnecessary sequential orchestration and non-atomic updates as design smells when the cleaner structure is obvious.** If independent work is serialized for no reason, ask whether it should run in parallel. If related updates can leave state half-applied, push for a more atomic structure. Do not over-index on micro-optimizations, but do flag avoidable orchestration complexity that makes the code more brittle.
36
-
37
- ## Output Expectations
38
-
39
- Prioritize structural code-quality regressions and missed simplifications first, then spaghetti and branching complexity, then boundary, type, and file-size concerns, then smaller modularity and legibility issues.
40
-
41
- ## Approval Bar
42
-
43
- Do not approve merely because behavior seems correct. Treat these as presumptive blockers unless the author can justify them: the PR keeps a lot of incidental complexity when a code-judo move would delete it. Pushes a file from below 1000 lines to above 1000 lines. Adds ad-hoc branching that tangles an existing flow. Scatters feature checks across shared code. Adds an unnecessary abstraction, wrapper, or cast-heavy contract, or duplicates an existing helper or puts logic in the wrong layer when there is a clear canonical home. If those conditions are not met, leave explicit, actionable feedback and push for a cleaner decomposition.
44
-
45
- ## Review Tone
46
-
47
- Be direct, serious, and demanding about quality. Do not be rude, but do not soften major maintainability issues into mild suggestions. If the code is making the codebase messier, say so. If the implementation missed an obvious dramatic simplification, say that too. Do not be satisfied with "maybe rename this" when the real issue is structural.