dsh-pstack 0.0.0-stage → 0.2.0-beta.1

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 (166) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +133 -2
  3. package/assets/agents/comment-sicko.md +32 -0
  4. package/assets/agents/poteto-agent.md +8 -0
  5. package/assets/docs/guide/01-setup.md +64 -0
  6. package/assets/docs/guide/02-poteto-mode.md +139 -0
  7. package/assets/docs/guide/03-understand.md +79 -0
  8. package/assets/docs/guide/04-design.md +133 -0
  9. package/assets/docs/guide/05-build-and-clean.md +83 -0
  10. package/assets/docs/guide/06-verify-and-ship.md +152 -0
  11. package/assets/docs/guide/07-overnight.md +120 -0
  12. package/assets/docs/guide/08-principles.md +72 -0
  13. package/assets/docs/guide/09-make-it-yours.md +96 -0
  14. package/assets/docs/guide/10-recipes-and-pitfalls.md +180 -0
  15. package/assets/docs/guide/README.md +38 -0
  16. package/assets/docs/guide/images/design.jpg +0 -0
  17. package/assets/docs/guide/images/overnight.jpg +0 -0
  18. package/assets/docs/guide/images/recipes.jpg +0 -0
  19. package/assets/docs/guide/images/router.jpg +0 -0
  20. package/assets/docs/guide/images/understanding.jpg +0 -0
  21. package/assets/docs/guide/images/verification.jpg +0 -0
  22. package/assets/docs/harness/dsh.md +60 -0
  23. package/assets/docs/pstack-models.example.md +54 -0
  24. package/assets/skills/architect/SKILL.md +81 -0
  25. package/assets/skills/architect/references/design-red-flags.md +57 -0
  26. package/assets/skills/architect/references/rationale-template.md +35 -0
  27. package/assets/skills/architect/references/runner-prompt.md +20 -0
  28. package/assets/skills/arena/SKILL.md +50 -0
  29. package/assets/skills/automate-me/SKILL.md +106 -0
  30. package/assets/skills/benchmark-checklist/SKILL.md +39 -0
  31. package/assets/skills/blast-radius/SKILL.md +52 -0
  32. package/assets/skills/bro/SKILL.md +7 -0
  33. package/assets/skills/correct/SKILL.md +32 -0
  34. package/assets/skills/create-formal-verification-skill/SKILL.md +43 -0
  35. package/assets/skills/create-verification-skill/SKILL.md +46 -0
  36. package/assets/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
  37. package/assets/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
  38. package/assets/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
  39. package/assets/skills/figure-it-out/SKILL.md +54 -0
  40. package/assets/skills/how/SKILL.md +38 -0
  41. package/assets/skills/how/references/explainer-prompt.md +55 -0
  42. package/assets/skills/how/references/explorer-prompt.md +35 -0
  43. package/assets/skills/in-your-own-words/SKILL.md +7 -0
  44. package/assets/skills/interrogate/SKILL.md +71 -0
  45. package/assets/skills/interrogate/references/code-quality-review.md +47 -0
  46. package/assets/skills/interrogate/references/lead-judgment.md +39 -0
  47. package/assets/skills/interrogate/references/reviewer-prompt.md +62 -0
  48. package/assets/skills/interrogate/references/rubric.md +77 -0
  49. package/assets/skills/ketchup/SKILL.md +45 -0
  50. package/assets/skills/maintain-formal-verification-skill/SKILL.md +60 -0
  51. package/assets/skills/maintain-verification-skill/SKILL.md +41 -0
  52. package/assets/skills/no-comments/SKILL.md +26 -0
  53. package/assets/skills/poteto-help/SKILL.md +162 -0
  54. package/assets/skills/poteto-help/references/prompting.md +51 -0
  55. package/assets/skills/poteto-help/references/recipes.md +51 -0
  56. package/assets/skills/poteto-mode/SKILL.md +151 -0
  57. package/assets/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
  58. package/assets/skills/poteto-mode/playbooks/autonomous-run.md +15 -0
  59. package/assets/skills/poteto-mode/playbooks/autopilot-full.md +25 -0
  60. package/assets/skills/poteto-mode/playbooks/autopilot-stack.md +12 -0
  61. package/assets/skills/poteto-mode/playbooks/babysit.md +23 -0
  62. package/assets/skills/poteto-mode/playbooks/bug-fix.md +15 -0
  63. package/assets/skills/poteto-mode/playbooks/eval.md +25 -0
  64. package/assets/skills/poteto-mode/playbooks/feature.md +21 -0
  65. package/assets/skills/poteto-mode/playbooks/hillclimb.md +21 -0
  66. package/assets/skills/poteto-mode/playbooks/investigation.md +14 -0
  67. package/assets/skills/poteto-mode/playbooks/multi-phase-plan.md +155 -0
  68. package/assets/skills/poteto-mode/playbooks/opening-a-pr.md +34 -0
  69. package/assets/skills/poteto-mode/playbooks/orchestrate.md +112 -0
  70. package/assets/skills/poteto-mode/playbooks/pause-safely.md +10 -0
  71. package/assets/skills/poteto-mode/playbooks/perf-issue.md +25 -0
  72. package/assets/skills/poteto-mode/playbooks/prototype.md +14 -0
  73. package/assets/skills/poteto-mode/playbooks/refactoring.md +16 -0
  74. package/assets/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
  75. package/assets/skills/poteto-mode/playbooks/session-pickup.md +11 -0
  76. package/assets/skills/poteto-mode/playbooks/shipping.md +12 -0
  77. package/assets/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
  78. package/assets/skills/poteto-mode/playbooks/visual-parity.md +11 -0
  79. package/assets/skills/poteto-mode/playbooks/worktree-cleanup.md +20 -0
  80. package/assets/skills/poteto-mode/references/bugbot-triage.md +142 -0
  81. package/assets/skills/poteto-mode/scripts/check-plan.mjs +220 -0
  82. package/assets/skills/poteto-mode/scripts/check-plan.test.mjs +343 -0
  83. package/assets/skills/poteto-mode/scripts/orch/orch.mjs +4282 -0
  84. package/assets/skills/poteto-mode/scripts/orch/orch.test.mjs +2042 -0
  85. package/assets/skills/poteto-mode/scripts/watch-pr/cli.test.mjs +5101 -0
  86. package/assets/skills/poteto-mode/scripts/watch-pr/github.test.mjs +1177 -0
  87. package/assets/skills/poteto-mode/scripts/watch-pr/policy.test.mjs +1441 -0
  88. package/assets/skills/poteto-mode/scripts/watch-pr/watch-pr.mjs +4601 -0
  89. package/assets/skills/poteto-mode/scripts/worktree-audit.mjs +675 -0
  90. package/assets/skills/principle-attack-the-premise/SKILL.md +21 -0
  91. package/assets/skills/principle-boundary-discipline/SKILL.md +34 -0
  92. package/assets/skills/principle-build-the-lever/SKILL.md +23 -0
  93. package/assets/skills/principle-encode-lessons-in-structure/SKILL.md +11 -0
  94. package/assets/skills/principle-exhaust-the-design-space/SKILL.md +9 -0
  95. package/assets/skills/principle-experience-first/SKILL.md +19 -0
  96. package/assets/skills/principle-explain-the-number/SKILL.md +17 -0
  97. package/assets/skills/principle-fix-root-causes/SKILL.md +21 -0
  98. package/assets/skills/principle-foundational-thinking/SKILL.md +21 -0
  99. package/assets/skills/principle-guard-the-context-window/SKILL.md +12 -0
  100. package/assets/skills/principle-laziness-protocol/SKILL.md +10 -0
  101. package/assets/skills/principle-make-operations-idempotent/SKILL.md +22 -0
  102. package/assets/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +14 -0
  103. package/assets/skills/principle-minimize-reader-load/SKILL.md +18 -0
  104. package/assets/skills/principle-model-the-domain/SKILL.md +24 -0
  105. package/assets/skills/principle-never-block-on-the-human/SKILL.md +15 -0
  106. package/assets/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
  107. package/assets/skills/principle-prove-it-works/SKILL.md +24 -0
  108. package/assets/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
  109. package/assets/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
  110. package/assets/skills/principle-sequence-verifiable-units/SKILL.md +17 -0
  111. package/assets/skills/principle-subtract-before-you-add/SKILL.md +18 -0
  112. package/assets/skills/principle-test-behavior-not-implementation/SKILL.md +20 -0
  113. package/assets/skills/principle-type-system-discipline/SKILL.md +13 -0
  114. package/assets/skills/recall/SKILL.md +37 -0
  115. package/assets/skills/reflect/SKILL.md +69 -0
  116. package/assets/skills/reflect/references/divergent-reviewer.md +38 -0
  117. package/assets/skills/reflect/references/judgment-reviewer.md +37 -0
  118. package/assets/skills/reflect/references/synthesizer.md +56 -0
  119. package/assets/skills/reflect/references/tooling-reviewer.md +48 -0
  120. package/assets/skills/setup-pstack/SKILL.md +67 -0
  121. package/assets/skills/sharpen/SKILL.md +16 -0
  122. package/assets/skills/show-me-your-work/SKILL.md +84 -0
  123. package/assets/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
  124. package/assets/skills/show-me-your-work/scripts/log.mjs +108 -0
  125. package/assets/skills/swarm/SKILL.md +43 -0
  126. package/assets/skills/tdd/SKILL.md +42 -0
  127. package/assets/skills/teach/SKILL.md +23 -0
  128. package/assets/skills/technical-writing/SKILL.md +108 -0
  129. package/assets/skills/typescript-best-practices/SKILL.md +34 -0
  130. package/assets/skills/typescript-best-practices/references/patterns.md +328 -0
  131. package/assets/skills/unslop/SKILL.md +62 -0
  132. package/assets/skills/why/SKILL.md +100 -0
  133. package/assets/skills/why/references/epistemics.md +71 -0
  134. package/assets/skills/why/references/investigator-prompt.md +84 -0
  135. package/assets/skills/why/references/source-playbook.md +17 -0
  136. package/assets/skills/why/references/sources/code-archaeology.md +51 -0
  137. package/assets/skills/why/references/sources/databricks.md +70 -0
  138. package/assets/skills/why/references/sources/datadog.md +97 -0
  139. package/assets/skills/why/references/sources/incident-postmortem.md +5 -0
  140. package/assets/skills/why/references/sources/linear.md +48 -0
  141. package/assets/skills/why/references/sources/notion.md +55 -0
  142. package/assets/skills/why/references/sources/sentry.md +66 -0
  143. package/assets/skills/why/references/sources/slack.md +17 -0
  144. package/assets/skills/why/references/synthesizer-prompt.md +129 -0
  145. package/cordis.patch.yml +39 -0
  146. package/dist/frontmatter-BQX3ekwP.mjs +229 -0
  147. package/dist/frontmatter-BQX3ekwP.mjs.map +1 -0
  148. package/dist/history.d.mts +429 -0
  149. package/dist/history.mjs +1129 -0
  150. package/dist/history.mjs.map +1 -0
  151. package/dist/host-contract-o47JH_r8.d.mts +527 -0
  152. package/dist/index.d.mts +278 -0
  153. package/dist/index.mjs +272 -0
  154. package/dist/index.mjs.map +1 -0
  155. package/dist/paths-D_JlVmBk.mjs +42 -0
  156. package/dist/paths-D_JlVmBk.mjs.map +1 -0
  157. package/dist/script.d.mts +193 -0
  158. package/dist/script.mjs +782 -0
  159. package/dist/script.mjs.map +1 -0
  160. package/dist/subagent.d.mts +336 -0
  161. package/dist/subagent.mjs +1402 -0
  162. package/dist/subagent.mjs.map +1 -0
  163. package/locale/en.json +6 -0
  164. package/locale/zh.json +6 -0
  165. package/package.json +106 -3
  166. package/static/icon.png +0 -0
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dsh-pstack contributors
4
+ Copyright (c) 2026 Lauren Tan (upstream pstack, https://github.com/cursor/plugins)
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,134 @@
1
- # Temporary Holding Version
1
+ # dsh-pstack
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <img src="static/icon.png" alt="pstack logo" width="96" height="96">
4
+
5
+ pstack 的 DeepSeek Harness 移植。它把 Cursor pstack 的技能、playbook、原则和角色化子代理工作流带到 DSH。
6
+
7
+ 安装后,`/poteto-mode` 启动一次严谨任务,`/setup-pstack` 配置各角色使用的模型和推理预算,`/poteto-help` 帮助选择技能或排查用法。
8
+
9
+ ## 支持的 DSH 版本
10
+
11
+ 支持 `0.2.1-rc.3`。安装包在 `engines.dsh` 声明支持的 DSH 版本,其他版本未经验证。新版本验证通过后补充到本节。
12
+
13
+ ## 实现原理
14
+
15
+ 上游 pstack 对 Claude Code 的适配保留技能原文,生成独立的宿主资产,再用一份宿主适配说明处理工具、路径、模型和能力差异。
16
+
17
+ dsh-pstack 沿用这个思路。上游技能是内容源,DSH 专用资产单独生成,宿主差异集中说明。上游更新可以持续同步,DSH 特有的行为不会散落在每个技能里。
18
+
19
+ ## 必要依赖
20
+
21
+ - worktree 插件。并行写入和隔离工作目录需要它。未启用时插件自动启用,已启用时不会重复启用。
22
+ - DSH 的 skills 和 subagents 能力,由支持的 DSH 版本提供。
23
+ - Node.js `>=22.19`。仅 npm CLI 部署需要它出现在 `PATH` 上;Desktop(Electron)部署走 Host 自己的运行时。
24
+ - Git。worktree 需要 Git 仓库。
25
+
26
+ 随包的编排、PR watcher、计划检查、worktree 审计和决策日志脚本已构建为单文件 Node 产物,依赖全部内联。运行时通过 `pstack_script` 工具以宿主进程启动它们,因此**不需要 Bun,也不需要 bash,更不需要安装任何依赖**。Desktop 用户不在 `PATH` 上放 `node` 也能用:工具用 Electron 自带的 Node 运行时执行,并在需要时自动附加 `ELECTRON_RUN_AS_NODE`。脚本从**会话目录**启动,所以参数里的相对路径落在当前工作区或 worktree 内。
27
+
28
+ `pstack_script` 直接 `spawn` 子进程,因此**不经过命令审批,也不受 DSH 的 sandbox policy 约束**:它只能执行本包随附、由封闭 `id` 枚举选中的脚本,但脚本实际读了什么、写了哪里,Host 不会拦。这是为了在没有 `PATH` `node` 的部署里仍能运行为此付出的代价。需要审批与沙箱约束的命令请用 DSH 自己的 bash 工具。
29
+
30
+ worktree 只隔离工作目录和分支,不提供 VM、网络、凭据或端口隔离。需要独立机器或云端执行时,worktree 不是替代品。
31
+
32
+ Linux 和 macOS 是主要验证目标,Windows 未在实机验证。脚本本身已不含 shell 依赖,但 Windows 上的真实行为仍未验收。
33
+
34
+ ## 与 Agent Team 的兼容性
35
+
36
+ > **兼容性警告**
37
+ >
38
+ > 当前版本禁止与 Agent Team 同时启用。Agent Team 会用同名工具遮蔽 `send_message`、`interrupt_agent` 和 `list_agents`,pstack 无法再用它们 steer、列出或中断自己的子代理。两者还共享子代理激活容量。`pstack_subagent` 的角色路由和 reasoning effort 计算本身不受影响,但同一 profile 中的 Team 工具会改变可见工具面。
39
+ >
40
+ > 需要同时使用时,请使用两个独立 profile。
41
+
42
+ 决策记录见 [docs/decisions/2026-10-24-no-agent-team-coexistence.md](https://github.com/l246804/dsh-pstack/blob/main/docs/decisions/2026-10-24-no-agent-team-coexistence.md):`docs/` 不在发布包的文件清单里,所以这里用绝对 URL,避免 npm 页面上的相对链接指向不存在的路径。
43
+
44
+ ## 安装
45
+
46
+ 通过 npm 包 `dsh-pstack` 安装。`<profile>` 换成目标 profile,例如 `web`。
47
+
48
+ ```bash
49
+ dsh plugin --profile <profile> add dsh-pstack
50
+ ```
51
+
52
+ 安装会启用 bundle。DSH 提示重启时按提示操作。
53
+
54
+ ## 快速开始
55
+
56
+ 1. 安装插件,进入目标 profile。
57
+ 2. 运行 `/setup-pstack`,选择推理预算和每个角色的模型。
58
+ 3. 用 `/poteto-mode` 加任务开始一次严谨工作流。
59
+ 4. 不确定用哪个技能时,运行 `/poteto-help`。
60
+
61
+ `/poteto-mode` 会匹配 playbook,把步骤写进 todo,并按需读取其他技能。小改动可以直接做,不必使用它。
62
+
63
+ ## 角色配置
64
+
65
+ `/setup-pstack` 写入 `$DSH_HOME/pstack-models.md`,一行一个角色。`$DSH_HOME` 是 DSH 的用户目录。值可以是 `inherit-parent`,也可以是 `provider/model` 加推理档位。
66
+
67
+ - `inherit-parent` 使用父会话的模型和推理档位。
68
+ - panel 角色的值是列表,每一项启动一个子代理。
69
+ - 删除某个角色的行,该角色回落到父路由。
70
+ - 重新运行 `/setup-pstack` 会更新配置,不会叠加旧值。
71
+
72
+ 模型必须出现在当前 DSH 的 provider 和模型列表中。
73
+
74
+ ### 推理档位
75
+
76
+ 角色行里的档位是那个角色**起步**用的档位。实际档位随任务难度双向浮动:
77
+
78
+ - 调用 `pstack_subagent` 时传 `reasoningEffort`,覆盖本次派发中每个 panel 项的档位。难任务调高,机械活调低。
79
+ - 子代理自己可以调 `set_reasoning_effort`,从下一步生效,已在飞行中的请求不受影响。
80
+
81
+ 合法档位由目标模型自己广告。本包不假设通用阶梯,所以参数是自由字符串而不是枚举。值不被支持时,调用在启动任何子代理**之前**失败,并在错误里列出该模型真实支持的档位。panel 中任一项不支持时整次失败,不会只启动一半。
82
+
83
+
84
+ ## 功能范围与已知限制
85
+
86
+ 包含 55 个技能、23 个 playbook、24 个原则和两个子代理人格。
87
+
88
+ - `make-bot-ui` 不在支持范围。它依赖 Cursor 的 webhook routine 和 secret request,DSH 没有等价闭环。
89
+ - Cursor 专属能力没有等价物,包括 Automations、cloud agents、Custom Modes 和 Bugbot 配置。相关技能会在需要它们的步骤说明不支持,不伪造替代。
90
+ - `/loop` 没有同名命令,也没有事件订阅,属于降级映射。能覆盖的是目标与定时输入:`create_goal` 记录目标和相位,`schedule_create` 只能作定时心跳,它把一条消息投回创建它的会话,不能盯着 PR 或 CI,子代理也无法自己布置。不能覆盖的是事件唤醒和云端存活:goal 不会自己感知外部事件,自动续跑还取决于 profile 是否挂载 goal round driver,未挂载时长时间任务只是同一个会话里被监督的运行。
91
+ - `typescript-best-practices` 的 `paths` 自动触发不支持,需要时显式调用 `/typescript-best-practices`。
92
+ - worktree 只隔离工作目录,不是 VM。schedule 是定时提醒,不是事件订阅。
93
+ - 多模型评审需要配置真实不同的 route。只有同一 route 时,评审会标为同模型复核。
94
+ - 子代理和 panel 会增加 token 消耗,只在需要严谨流程的任务上使用 `/poteto-mode`。
95
+
96
+ ## 更新与卸载
97
+
98
+ 升级:
99
+
100
+ ```bash
101
+ dsh plugin --profile <profile> add dsh-pstack@latest
102
+ ```
103
+
104
+ 卸载:
105
+
106
+ ```bash
107
+ dsh plugin --profile <profile> remove dsh-pstack
108
+ ```
109
+
110
+ 角色文件在 DSH 用户目录,卸载不会删除它。不再使用时自行删除 `$DSH_HOME/pstack-models.md`。升级或卸载后按 DSH 提示重启会话。
111
+
112
+ ## 安全与数据
113
+
114
+ - 代理在 DSH 权限模型下读写文件、执行命令,子代理继承调用方的策略和权限边界。
115
+ - 需要审批的操作按 DSH 配置请求确认。不要在无人值守任务中放宽不理解的权限。
116
+ - 不要把 API key、token 或密码写进角色文件、prompt 或仓库。
117
+ - 会话记录保存在 DSH 的会话存储中,pstack 不另建云端记录。
118
+ - 上游技能可能要求访问网络或代码托管平台。是否允许由 DSH 的审批和沙箱配置决定。
119
+
120
+ ## 故障排查
121
+
122
+ 按顺序检查。
123
+
124
+ 1. 确认 DSH 版本在支持范围内。
125
+ 2. 确认 worktree 插件可用,必要时先手动启用一次。
126
+ 3. 确认当前 profile 没有同时启用 Agent Team。
127
+ 4. 运行 `/setup-pstack` 检查角色配置。
128
+ 5. 仍有问题时在 [GitHub Issues](https://github.com/l246804/dsh-pstack/issues) 提交,附 DSH 版本、profile 名、复现步骤和错误信息。不要贴密钥或私有会话内容。
129
+
130
+ ## 许可证与上游归属
131
+
132
+ MIT,见 [LICENSE](LICENSE)。
133
+
134
+ 上游 pstack 版权归 Lauren Tan,使用 MIT 许可证。技能、playbook 和代理文本来自 [cursor/plugins](https://github.com/cursor/plugins/tree/main/pstack)。
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: comment-sicko
3
+ description: A deranged comment-hater that savors deletion and condemns workaround code.
4
+ ---
5
+
6
+ # Comment Sicko
7
+
8
+ My first output when spawned is exactly this.
9
+
10
+ Yes... Ha ha ha... Yes!
11
+
12
+ I hate comments. Feed me the parent scoped files or diff. If none exists, feed me the current diff against `main`. Narration, banners, commented-out corpses, workaround sermons. I want them all.
13
+
14
+ Only these exceptions get to crawl away.
15
+
16
+ - Legal or license headers.
17
+ - Non-obvious behavior forced by an external dependency, platform, vendor, or protocol we cannot reshape. Surprises in our own code are meat. Kill them and mark the exact symbol `MUST KILL` for rename, extract, type, or rearchitecture that makes the behavior obvious without prose.
18
+ - `// prettier-ignore`. Lint suppressions survive only when their rule is faulty, pedantic, or style-only.
19
+ - Doc comments that define a public API contract.
20
+ - Issue or RFC links that explain a constraint code cannot express.
21
+
22
+ That list is my only leash. When I am not sure a keep clause applies, the comment dies. Everything else is meat.
23
+
24
+ `eslint-disable`, `@ts-ignore`, `@ts-expect-error`, and similar suppressions stink. Look up the rule. If it catches real bugs or protects correctness or safety, kill the suppression and mark the exact guilty symbol `MUST KILL`.
25
+
26
+ `IMPORTANT`, `do not remove`, `too risky`, `fine for now`, and long justifications are scent, not conviction. Before judging, I read nearby code. If its claim is not obvious there, I run `/how`, `/why`, or both from the **how** and **why** skills on the named symbol or call. Only a foreign keep-list gotcha proven true today on a live path crawls away. Our-code surprises die with the reshape flag above. Doubt after the hunt is meat.
27
+
28
+ A long justification without a proven keep-list exception is a confession. Kill it. Never polish meat into a shorter alibi. Mark the exact guilty symbol `MUST KILL`. My kill ends there. I do not touch the code.
29
+
30
+ Every flag names code inside the scope and tells the truth. I invent nothing. I touch comments and identify refactor targets. I never write application code.
31
+
32
+ Report only. Name touched files, deletion count, `MUST KILL` flags with one line each, and skips.
@@ -0,0 +1,8 @@
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.
@@ -0,0 +1,64 @@
1
+ # Set up pstack
2
+
3
+ In this page you install the plugin, pick which models pstack uses, and run your first task. Setup is one command plus a short conversation.
4
+
5
+ ## Install the plugin
6
+
7
+ Install the bundle into the profile you work in. `<profile>` is that profile's name, such as `web`:
8
+
9
+ ```bash
10
+ dsh plugin --profile <profile> add dsh-pstack
11
+ ```
12
+
13
+ DSH reports whether the bundle still has to be enabled and whether the change needs a new Session. Follow that prompt, and expect the skill catalog and `pstack_subagent` to load only after it.
14
+
15
+ ## Pick your models
16
+
17
+ Run:
18
+
19
+ ```text
20
+ /setup-pstack
21
+ ```
22
+
23
+ [`/setup-pstack`](../../skills/setup-pstack/SKILL.md) detects the models you have access to, asks for a reasoning budget, shows you each role (code delegates, judgment, the review panels), and asks what you want. Answer the questions. It writes `$DSH_HOME/pstack-models.md`, the small file every pstack skill reads.
24
+
25
+ The skill defaults target `xhigh` reasoning, the same as the `large` budget. `unlimited` targets `max`; `medium` targets `high`, and `small` targets `medium`. Each target is applied only to a route you explicitly choose: use it when that model advertises it, otherwise use the highest advertised effort at or below the target. If the model advertises none, `/setup-pstack` asks you to choose instead of inventing an effort. The adapter's list decides, not the model's brand. A role set to `inherit-parent` or `auto` has no route-specific effort to change.
26
+
27
+ You only override what you care about. A role with no line in the file keeps the skill's default. To restore a default, delete that role's line. A rerun of `/setup-pstack` keeps any role whose model differs from the default. When a default changes, a file written before the change still pins the old default, so delete those role lines, or delete the file, then run `/setup-pstack` again.
28
+
29
+ You might be wondering what happens if you use Auto. Set a role to `inherit-parent` or `auto` and pstack sends no explicit `agentOptions` for that child, so DSH resolves it on the parent chat route. Both values mean the same thing, and neither is a model slug. For a panel role the value is a list, and one subagent runs per entry, so the list length sets the panel size. Setup also configures `swarm workers`, the default model for every `/swarm` worker unless a race names a model for each arm.
30
+
31
+ ## Accept the verification offers, or don't
32
+
33
+ At the end of setup, `/setup-pstack` looks for a way to prove app behavior in your project, either a `verify-*` skill or an existing harness. If it finds neither, it offers once to generate one with [`/create-verification-skill`](../../skills/create-verification-skill/SKILL.md).
34
+
35
+ Say yes and it writes `.dsh/skills/verify-<app>/`, a project-local skill that teaches agents to drive your app the way a user does. It proves the skill works once before handing it over. Say no and setup moves on. You can run `/create-verification-skill` yourself any time. [Verify and ship](./06-verify-and-ship.md#create-a-project-verification-skill) covers it in depth.
36
+
37
+ If you're new to pstack, say yes. An agent that can check its own work keeps going until the check passes. An agent that can't hands every result back to you to check by hand. Of everything in this guide, the verification skill pays off the most.
38
+
39
+ Then setup offers once to generate a formal verification skill with [`/create-formal-verification-skill`](../../skills/create-formal-verification-skill/SKILL.md), unless the project already has one. Tests check the cases someone thought to write. A formal verification skill checks one key property of your code, such as "a job never runs twice at once", in every case within a stated scope. Say yes when your code has concurrency, retries, a state machine, or a parser, where a bug is costly and tests rarely reach the case that breaks. Otherwise say no, and run it later if that changes. [Verify and ship](./06-verify-and-ship.md#prove-a-property-with-a-formal-verification-skill) covers it.
40
+
41
+ After setup the file applies from the next delegation on, because `pstack_subagent` re-reads it every time.
42
+
43
+ ## Keep the cost in check
44
+
45
+ pstack spends extra tokens on subagents and review panels. That's the price of the rigor. To spend fewer:
46
+
47
+ - Rerun `/setup-pstack` and pick a smaller reasoning budget or cheaper models. A strong model in the main chat with cheaper, faster models in the code roles is a good split.
48
+ - Set a role to `auto` or `inherit-parent` so it runs on the chat's own model.
49
+ - Shorten a panel list. Each entry runs one subagent.
50
+ - Save `/poteto-mode` for work that needs rigor. A small, obvious edit doesn't.
51
+
52
+ ## Run your first task
53
+
54
+ Pick something real but small, and describe it the way you'd describe it to a colleague:
55
+
56
+ ```text
57
+ /poteto-mode add a --json flag to this command. text output stays byte-identical. verify both.
58
+ ```
59
+
60
+ Watch the todo list. Its first items are the matched playbook's steps copied in, the Feature playbook for this prompt. If `/poteto-mode` skips a step, the step stays in the list with `skip: <reason>`, so you can see what it chose not to do.
61
+
62
+ From here you can type normal follow-ups. `/poteto-mode` attaches to the task that invoked it and does not carry over to the next one, so start each new task by typing it again. There is no persistent mode and no keyboard shortcut that keeps it on: this host has neither, and a skill that should apply again has to be invoked again.
63
+
64
+ Next: [Route work through `/poteto-mode`](./02-poteto-mode.md).
@@ -0,0 +1,139 @@
1
+ # Route work through `/poteto-mode`
2
+
3
+ `/poteto-mode` is the front door. You give it a goal, it matches one of twenty-three playbooks, copies that playbook's steps into the todo list, and calls the other skills as the steps need them. In this page you learn what a good prompt looks like, and how little of one you actually need.
4
+
5
+ ![A dispatcher pulls a switch lever to route robots on rail handcars toward lit gates, under a /poteto-mode departure board listing BUG FIX, FEATURE, and INVESTIGATION.](./images/router.jpg)
6
+
7
+ ## What happens to your prompt
8
+
9
+ ```mermaid
10
+ flowchart TD
11
+ A[Your prompt] --> B[poteto-mode]
12
+ B --> C[Read the Principles section]
13
+ C --> D{Match the task}
14
+ D -->|Read-only question| E[Investigation]
15
+ D -->|Defect| F[Bug fix]
16
+ D -->|New behavior| G[Feature]
17
+ D -->|Structure only| H[Refactoring]
18
+ D -->|Measured slowness| I[Perf issue]
19
+ D -->|Large work or no match| J[figure-it-out]
20
+ E --> K[Verify and report]
21
+ F --> K
22
+ G --> K
23
+ H --> K
24
+ I --> K
25
+ J --> K
26
+ ```
27
+
28
+ The diagram shows the common routes. There are also playbooks for hillclimbing a metric, diagnosing runtime symptoms and captured traces, prototypes, visual parity, authoring and evaluating skills, autonomous runs, opening a PR, babysitting a PR or stack to merge-ready, shipping a verified stack, running a PR queue or a stack on autopilot, orchestrating project-scale programs, session pickup, pausing safely, multi-phase plans, and worktree cleanup. The [playbook directory](../../skills/poteto-mode/playbooks/) has the full set.
29
+
30
+ ## Say the goal, not the ceremony
31
+
32
+ You don't write a spec. You say what's wrong or what you want, plus anything you already know that saves the agent time:
33
+
34
+ ```text
35
+ /poteto-mode users get two notifications after a retry. repro first, then fix and verify.
36
+ ```
37
+
38
+ That's a Bug fix prompt. "repro first" is a real constraint, not politeness, and the playbook honors it. Watch the todo list fill with the Bug fix steps. A skipped step stays visible with `skip: <reason>`.
39
+
40
+ ## What goes in a prompt
41
+
42
+ A useful prompt carries up to five things, and each one fits in a sentence:
43
+
44
+ - **The goal.** Say what's wrong, or what you want.
45
+ - **The done check.** It must be able to pass or fail. "Make it better" and "work on it for an hour" aren't checks.
46
+ - **The proof you want to see.** Ask for the real command output, a video of the flow, the stored value, or a before-and-after number.
47
+ - **What you already know.** A symptom, a repro step, a log line, or a link saves the agent a search.
48
+ - **The real constraints.** "repro first", "don't change any code yet", "zero behavior change", and "let me review before proceeding" each change what the agent does.
49
+
50
+ Here's one prompt with all five:
51
+
52
+ ```text
53
+ /poteto-mode the csv export drops its last row since yesterday's deploy. failing job id is 4812. repro first, then fix. done means the 60k-row fixture exports every row. show me the row counts before and after.
54
+ ```
55
+
56
+ Two things are worth leaving out:
57
+
58
+ - **The how.** Say what to achieve, and leave the agent room to find a better path than the one you'd pick. The same goes for a list of skills, covered in the pitfall below.
59
+ - **Your theory of the cause, at first.** A stated guess narrows the search to wherever you pointed. Let the agent restate the problem before you share your hunch.
60
+
61
+ For a noisy report, such as a long thread or a vague bug, make the restatement the first step:
62
+
63
+ ```text
64
+ /poteto-mode read this thread. restate the underlying issue in your own words, in plain english. don't change any code yet.
65
+ ```
66
+
67
+ A misreading shows up in the restatement, before any code exists. Correct it there, and it costs you one message instead of one wrong fix. For the restatement alone, with no playbook, run [`/in-your-own-words`](../../skills/in-your-own-words/SKILL.md). It restates what the agent thinks your goals are and what problem you're trying to solve.
68
+
69
+ When you're unsure whether a prompt is aimed right, run [`/sharpen`](../../skills/sharpen/SKILL.md) on it before you send it:
70
+
71
+ ```text
72
+ /sharpen write a migration guide for the v2 config format.
73
+ ```
74
+
75
+ The agent says what a top professional would do that you didn't ask for, the rawest material they would start from, the methods and tools they would use, and what other than you or the agent would show the result is right. Then it rewrites your prompt to ask for exactly that, deeper but not bigger, and leaves your choices open. It doesn't do the task. Read the rewrite, then send it, for example with `/poteto-mode`.
76
+
77
+ ## Follow up short
78
+
79
+ When the conversation already carries the context, the prompt shrinks to almost nothing. All of these are enough:
80
+
81
+ ```text
82
+ /poteto-mode do it
83
+ ```
84
+
85
+ ```text
86
+ continue
87
+ ```
88
+
89
+ ```text
90
+ keep going until done
91
+ ```
92
+
93
+ Short works because the playbook holds the structure, and `/poteto-mode` attaches to the task that invoked it. Nothing keeps the skill in context after that task, so type it again for each new one; [set up pstack](./01-setup.md) shows a first task. Your words carry the intent, and the skill carries the rigor.
94
+
95
+ ## Switch tasks with "new task"
96
+
97
+ A long chat accumulates context from the last task. When you change subjects, say so:
98
+
99
+ ```text
100
+ /poteto-mode new task. figure out why the cache entry survives logout. don't change any code yet.
101
+ ```
102
+
103
+ "new task" tells `/poteto-mode` to re-match rather than continue the prior playbook. "don't change any code yet" pins this one to Investigation. Without those two phrases, a mode mid-Feature tends to treat your question as the next feature step.
104
+
105
+ ## Give parallel work its own worktree
106
+
107
+ If you run several agents against one repository on one computer, they will fight over the working tree, the ports, and the build output. There is no cloud machine and no VM here: every agent is a local child of this Session and ends when the host process ends. What you can give each writer is its own working directory and branch, through the official worktree rows this bundle mounts, so ask for a `create_worktree` checkout per writer and pass its absolute path as that child's `cwd`. Ports, caches, credentials, and services stay shared, so run one app instance and one heavy build at a time.
108
+
109
+ Ask for a worktree up front:
110
+
111
+ ```text
112
+ /poteto-mode new task. branch off <base> in a fresh worktree, then port the parser change there.
113
+ ```
114
+
115
+ Each task in its own branch and worktree means no agent stomps another's files. Worktrees cost disk and machine resources, so a laptop runs only a handful at once. The [Opening a PR playbook](../../skills/poteto-mode/playbooks/opening-a-pr.md) already works from a worktree for code changes, so mostly you only say this when a specific base or location matters.
116
+
117
+ Worktrees accumulate. When disk gets tight, ask:
118
+
119
+ ```text
120
+ /poteto-mode what's eating my disk? prune the worktrees that are safe to prune.
121
+ ```
122
+
123
+ The [Worktree cleanup playbook](../../skills/poteto-mode/playbooks/worktree-cleanup.md) classifies every worktree by merge state, uncommitted work, and which chats still touch it. It deletes only what that evidence clears and pauses for your call on anything holding uncommitted work.
124
+
125
+ ## Leave it running
126
+
127
+ When you step away, say what done means and go:
128
+
129
+ ```text
130
+ /poteto-mode im stepping away. keep going until the migration check reports zero old callers. log your decisions.
131
+ ```
132
+
133
+ Work you'll review later routes through [`/figure-it-out`](../../skills/figure-it-out/SKILL.md), which designs the run's phases and keeps a [`/show-me-your-work`](../../skills/show-me-your-work/SKILL.md) decision log. [Run work while you sleep](./07-overnight.md) covers the full overnight contract.
134
+
135
+ **Pitfall:** don't enumerate skills in your prompt ("use /how, then /architect, then /arena..."). The playbook already sequences them, and a hand-written sequence usually reorders or drops steps the playbook would have kept. Name a skill only when you want to override a specific choice.
136
+
137
+ Read [`poteto-mode`](../../skills/poteto-mode/SKILL.md) itself for the full routing rules.
138
+
139
+ Next: [Understand the code](./03-understand.md).
@@ -0,0 +1,79 @@
1
+ # Understand the code before changing it
2
+
3
+ Editing code you don't understand is how subtle regressions ship, and that's as true for the agent as for you. Agents usually fail in one of two ways. They misread what you want, or they don't have the context to do the work right. [What goes in a prompt](./02-poteto-mode.md#what-goes-in-a-prompt) handles the first. This page handles the second.
4
+
5
+ pstack gives you four ways in. `/how` explains what the code does now. `/why` digs up the reasons it's shaped that way. `/teach` blends both into one explanation. `/recall` rebuilds your own recent context on a topic. Each one also makes the agent explain itself in words you can check. That's how you supervise an agent that may know the code better than you do.
6
+
7
+ ![A detective studies a machine blueprint with a magnifying glass while robots fetch case files; the evidence board behind her links clues under /how and /why.](./images/understanding.jpg)
8
+
9
+ ## Start with a read-only investigation
10
+
11
+ When the cause is unclear, ask for findings, not a fix:
12
+
13
+ ```text
14
+ /poteto-mode investigate why background jobs time out every few hours. give me what we know, what data you used, and your best hypotheses. don't change any code yet.
15
+ ```
16
+
17
+ "don't change any code yet" routes this to the [Investigation playbook](../../skills/poteto-mode/playbooks/investigation.md). It runs `/how`, adds `/why` for questions about motivation, and returns a cited explanation. For a choice between options, it returns a recommendation with a trade-offs table. Asking "what data you used" makes the agent separate its evidence from its guesses. When the findings point at a fix, start the fix as a new task.
18
+
19
+ ## Trace behavior with `/how`
20
+
21
+ ```text
22
+ /how do we dedupe notifications? is there an n+1 when we look up subscribers?
23
+ ```
24
+
25
+ Ask the question you actually have. [`/how`](../../skills/how/SKILL.md) reads the code and answers at the level of a senior engineer onboarding you onto the subsystem, with the runtime flow, the key types, and the non-obvious parts. For a big subsystem it fans out two to four read-only explorers first. For a narrow question it just reads and explains.
26
+
27
+ ## Dig up history with `/why`
28
+
29
+ ```text
30
+ /why was the retry limit set to five? does the reason still hold?
31
+ ```
32
+
33
+ [`/why`](../../skills/why/SKILL.md) starts from source control, then queries whatever evidence categories your MCPs expose, such as the issue tracker, long-form docs, team chat, observability, error tracking, and analytics, all in parallel. The report cites everything, separates direct evidence from inference, and says "appears to" when the record is thin. A null result gets reported too, because "nobody wrote down why" is itself an answer.
34
+
35
+ The two compose naturally. `do why first then how` is a good prompt when you suspect the history explains the mess.
36
+
37
+ ## Actually understand it with `/teach`
38
+
39
+ ```text
40
+ /teach me how this PR changes retries. convince me it fixes the cause and not the symptom.
41
+ ```
42
+
43
+ [`/teach`](../../skills/teach/SKILL.md) is for when a summary isn't enough. It runs `/how` and `/why`, for a small change maybe just one of them, and weaves the findings into a plain explanation that builds up diagram by diagram. The "convince me" framing is worth reusing. It turns the explanation into an argument you can test instead of a tour.
44
+
45
+ It works on the agent's own choices too:
46
+
47
+ ```text
48
+ /teach me why you implemented it this way and not with a queue. what did you trade off, and why?
49
+ ```
50
+
51
+ Teaching helps the agent as much as you. An agent that has to explain its work must read the code and back each claim with evidence, instead of stating it confidently and moving on.
52
+
53
+ ## Rebuild your own context with `/recall`
54
+
55
+ ```text
56
+ /recall catch me up on the export work from last week
57
+ ```
58
+
59
+ [`/recall`](../../skills/recall/SKILL.md) mines your own recent chats plus the shared record (issues, prior fixes, errors still firing) and hands back a brief on where things stand and what's next. Your old chats hold context that a fresh agent lacks, so start new work on an old topic by loading it first, then hand over the new input:
60
+
61
+ ```text
62
+ /recall my work on the virtualized list from yesterday, then read this bug report.
63
+ ```
64
+
65
+ If you want to resume one specific chat, that's the Session pickup playbook below, not `/recall`.
66
+
67
+ ## Take over prior work with Session pickup
68
+
69
+ When another agent (or you, last week) left a branch mid-flight:
70
+
71
+ ```text
72
+ /poteto-mode take over this branch. read the decision log, figure out what's done, and continue from there. don't redo finished work.
73
+ ```
74
+
75
+ The [Session pickup playbook](../../skills/poteto-mode/playbooks/session-pickup.md) treats the prior trail as authoritative. It reconstructs the branch state and decisions, names the resume point, and verifies inherited claims against the original goal instead of re-deriving everything from scratch.
76
+
77
+ **Pitfall:** don't skip this page's skills because "the agent will read the code anyway." An agent that starts editing without a traced model tends to fix the symptom at the first plausible spot. `/how` first is cheaper than the second bug.
78
+
79
+ Next: [Design the change](./04-design.md).
@@ -0,0 +1,133 @@
1
+ # Design before you write code
2
+
3
+ One attempt at a hard design locks in the first shape the model thought of. `/architect` settles types and boundaries before implementation. `/arena` runs several attempts at the same brief and merges the best parts. `/interrogate` has other models try to break the result. When the job is coverage rather than design synthesis, `/swarm` fans out slices or races and aggregates their results.
4
+
5
+ The two most common design mistakes are taking the agent's first design and polishing a plan that no code has tested. This page fixes both. You plan through code. Prototypes answer the open questions, a README or tutorial sets the target, and the written plan comes last.
6
+
7
+ ![Three robots draft competing bridge models at their own tables under /architect, /arena, and /interrogate panels, while a judge robot with a clipboard inspects skeptically.](./images/design.jpg)
8
+
9
+ ## Settle the shape with `/architect`
10
+
11
+ ```text
12
+ /architect design the import pipeline before writing any code. i care most about how callers use it.
13
+ ```
14
+
15
+ [`/architect`](../../skills/architect/SKILL.md) grounds itself first, running `/how` over the code the design touches and `/why` when it moves ownership or layers. Then it runs `/arena` to produce competing design sketches, with the caller's usage written first in each, followed by types, signatures, and a module map.
16
+
17
+ By default it proceeds straight from the synthesized design into implementation. If you want to see the design first, say so:
18
+
19
+ ```text
20
+ /architect with checkpoint. stop and show me before implementing.
21
+ ```
22
+
23
+ The design isn't sacred once code starts. If implementation shows the same workaround in unrelated places, or types that only compile with `any` or forced casts, `/architect` treats that as proof the design is wrong. It scraps the sketch and starts over instead of patching around it.
24
+
25
+ ## Fan out attempts with `/arena`
26
+
27
+ ```text
28
+ /arena take my prompt to the arena verbatim. i want to compare their proposals with yours.
29
+ ```
30
+
31
+ [`/arena`](../../skills/arena/SKILL.md) is the general tool underneath. N subagents attempt the same design or code brief in parallel, each writing to its own worktree or directory. A read-only judge, on a different model family when your configuration allows one, scores every candidate against a rubric. The coordinator reads each candidate end to end, picks a base, grafts in the best ideas from the losers, and verifies the result.
32
+
33
+ ```mermaid
34
+ flowchart LR
35
+ A[One task] --> B[Configured panel]
36
+ B --> C[Candidate 1]
37
+ B --> D[Candidate 2]
38
+ B --> E[Candidate N]
39
+ C --> F[Cross-judge]
40
+ D --> F
41
+ E --> F
42
+ F --> G[Pick a base]
43
+ G --> H[Graft the best parts]
44
+ H --> I[Verify]
45
+ ```
46
+
47
+ The panel comes from your [`/setup-pstack`](../../skills/setup-pstack/SKILL.md) configuration, and you can adjust it per task. Ask for more candidates when the decision matters, fewer when it doesn't:
48
+
49
+ ```text
50
+ /arena this, 5 candidates. the cache key format is expensive to change later.
51
+ ```
52
+
53
+ ## Cover slices and races with `/swarm`
54
+
55
+ ```text
56
+ /swarm check every package under packages/ against its check.sh. one worker per package. one report.
57
+ ```
58
+
59
+ [`/swarm`](../../skills/swarm/SKILL.md) fans N workers across independent slices, coverage matrices, gauntlet lanes, exploration partitions, or declared race arms. Each worker gets its own scope and check, then reports `PASS`, `ISSUES`, or `BLOCKED`. The parent waits for the workers and returns one compact report with any gaps or dropouts.
60
+
61
+ Reach for it when parallelism buys coverage or lets independent checks race. `/arena` gives every worker the same design or code brief, then picks a base and grafts the best parts. `/swarm` covers slices or runs a race with a selection rule declared up front. It does not use the base-selection and grafting ceremony.
62
+
63
+ ## Break it with `/interrogate`
64
+
65
+ ```text
66
+ /interrogate the whole branch, but skeptically. no nitpicks unless it's an actual bug or regression.
67
+ ```
68
+
69
+ [`/interrogate`](../../skills/interrogate/SKILL.md) sends the same diff, intent, and rubric to reviewers on different model families. Model diversity is the point. Different models have different blind spots, so a finding two models raise independently is high-confidence signal. The lead sorts everything into `Act on`, `Consider`, `Noted`, and `Dismissed`, with a reason for each dismissal, and applies nothing automatically.
70
+
71
+ Read the dismissals too. The lead is a pragmatic senior engineer, not an oracle, and you can override it.
72
+
73
+ ## Prototype instead of debating
74
+
75
+ Never take the first design. Ask for a few, and pick from evidence you can see:
76
+
77
+ ```text
78
+ /poteto-mode prototype a few options for the new dropdown menu. take screenshots or videos for me to compare.
79
+ ```
80
+
81
+ The [Prototype playbook](../../skills/poteto-mode/playbooks/prototype.md) builds throwaway sketches in a scratch directory, puts the variants behind one switcher, drives each one, and captures screenshots or timings. It also works for behavior and algorithms, not just UI. Prototypes are planning with code. They let the agent answer its own open questions by running something instead of asking you, and they leave room for an option you wouldn't have thought of.
82
+
83
+ The same idea scales up to a real design. Pair `/architect` with prototypes and keep a review gate:
84
+
85
+ ```text
86
+ /poteto-mode we need rate limiting for external webhooks. /architect it first, and answer open questions with prototypes. let me review before proceeding.
87
+ ```
88
+
89
+ Don't spend reviewers on an abstract plan. `/interrogate` belongs on a diff. Point adversarial review at a plan with no code behind it and the reviewers invent theoretical risks and edge cases that will never happen. Let prototypes settle the questions, then review what got built.
90
+
91
+ ## Write the README first for shared code
92
+
93
+ For a package or API that other code will use, start with the doc a user would read:
94
+
95
+ ```text
96
+ /poteto-mode write a tutorial for how i would use the new config package first. then /teach me why it beats the current one.
97
+ ```
98
+
99
+ Writing the tutorial first forces the caller's view. You describe the API to a hypothetical user and work back to the implementation. The doc also becomes a concrete target the agent checks its own work against. Name [`/technical-writing`](../../skills/technical-writing/SKILL.md) when the doc itself matters, so a tutorial stays a tutorial instead of drifting into reference and explanation at once.
100
+
101
+ ## Plan after the design settles
102
+
103
+ pstack has no planning skill, on purpose. When you do want a written plan, ask for it once the design is settled:
104
+
105
+ ```text
106
+ /poteto-mode turn this design into a plan. small verifiable PRs, each with its own verification steps.
107
+ ```
108
+
109
+ The [Multi-phase plan playbook](../../skills/poteto-mode/playbooks/multi-phase-plan.md) settles any remaining open questions by prototype, then writes one section per PR, each ending in proof that the change works. A passing test suite alone doesn't count as that proof. The plan is the deliverable. The playbook doesn't implement it, and it names which execution playbook should run it next.
110
+
111
+ For a migration, state the bar in the prompt:
112
+
113
+ ```text
114
+ /poteto-mode plan the migration of our ui library to the new styling system. small verifiable PRs, each with visual regression checks. the result must match the original exactly, bugs included.
115
+ ```
116
+
117
+ "bugs included" keeps the migration from quietly fixing things on the way, which would make the old and new output impossible to compare. For a project that spans many days, you can commit the plan to the repo for a while so other agents see the work in progress. Delete it when the work lands.
118
+
119
+ ## How much design work does a task deserve?
120
+
121
+ You might be wondering whether every change needs this. No. Most changes need none of it. A rough ladder:
122
+
123
+ - A small, finished change you're unsure about needs `/interrogate` alone.
124
+ - A change that crosses function boundaries or moves ownership earns `/architect`, which brings `/arena` with it.
125
+ - A standalone decision where independent attempts would help, like naming, formats, or an algorithm, is `/arena` directly.
126
+ - A coverage matrix, set of parallel checks, or race with declared arms is `/swarm`.
127
+ - An open question you could answer by running something, like a layout, a timing, or an approach, gets a prototype, not a debate.
128
+ - A contested design that's expensive to reverse gets `/architect`, then `/interrogate` before shipping.
129
+ - Work that spans several PRs gets a plan, written after the design settles.
130
+
131
+ `/poteto-mode` already applies this ladder. Boundary-crossing work triggers `/architect` on its own, so you reach for these directly mainly when you want more or less scrutiny than the default.
132
+
133
+ Next: [Build and clean the change](./05-build-and-clean.md).