@jiroamato/pstack 0.0.0-stage → 0.15.15

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 (225) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +78 -2
  3. package/bin/pstack.js +95 -0
  4. package/lib/install.js +103 -0
  5. package/lib/prompt.js +77 -0
  6. package/lib/targets.js +43 -0
  7. package/package.json +38 -5
  8. package/pstack/.claude-plugin/plugin.json +26 -0
  9. package/pstack/.codex-plugin/plugin.json +36 -0
  10. package/pstack/LICENSE +21 -0
  11. package/pstack/LICENSE-cursor-team-kit +21 -0
  12. package/pstack/NOTICE +8 -0
  13. package/pstack/README.md +300 -0
  14. package/pstack/agents/comment-sicko.md +34 -0
  15. package/pstack/agents/poteto-agent.md +10 -0
  16. package/pstack/automations/benny/FOR_AGENTS.md +92 -0
  17. package/pstack/automations/benny/README.md +28 -0
  18. package/pstack/automations/benny/skills/reproduce-and-fix-issues/SKILL.md +313 -0
  19. package/pstack/automations/benny/skills/reproduce-and-fix-issues/references/control-adapter.md +169 -0
  20. package/pstack/automations/benny/skills/reproduce-and-fix-issues/references/feature-map.example.md +205 -0
  21. package/pstack/automations/benny/skills/reproduce-and-fix-issues/references/verify-existing-fix.md +93 -0
  22. package/pstack/automations/benny/skills/setup-benny/SKILL.md +271 -0
  23. package/pstack/automations/benny/skills/triage-issue-reports/SKILL.md +240 -0
  24. package/pstack/automations/benny/skills/triage-issue-reports/references/routing.example.md +61 -0
  25. package/pstack/automations/benny/templates/configuration.example.yaml +84 -0
  26. package/pstack/automations/benny/templates/reproduce-automation-prompt.md +33 -0
  27. package/pstack/automations/benny/templates/triage-automation-prompt.md +39 -0
  28. package/pstack/codex/agents/comment-sicko.toml +36 -0
  29. package/pstack/codex/agents/poteto-agent.toml +11 -0
  30. package/pstack/docs/guide/01-setup.md +80 -0
  31. package/pstack/docs/guide/02-poteto-mode.md +131 -0
  32. package/pstack/docs/guide/03-understand.md +79 -0
  33. package/pstack/docs/guide/04-design.md +133 -0
  34. package/pstack/docs/guide/05-build-and-clean.md +83 -0
  35. package/pstack/docs/guide/06-verify-and-ship.md +130 -0
  36. package/pstack/docs/guide/07-overnight.md +120 -0
  37. package/pstack/docs/guide/08-principles.md +72 -0
  38. package/pstack/docs/guide/09-make-it-yours.md +100 -0
  39. package/pstack/docs/guide/10-recipes-and-pitfalls.md +156 -0
  40. package/pstack/docs/guide/README.md +38 -0
  41. package/pstack/skills/architect/SKILL.md +85 -0
  42. package/pstack/skills/architect/agents/openai.yaml +2 -0
  43. package/pstack/skills/architect/references/design-red-flags.md +57 -0
  44. package/pstack/skills/architect/references/rationale-template.md +35 -0
  45. package/pstack/skills/architect/references/runner-prompt.md +20 -0
  46. package/pstack/skills/arena/SKILL.md +75 -0
  47. package/pstack/skills/arena/agents/openai.yaml +2 -0
  48. package/pstack/skills/automate-me/SKILL.md +104 -0
  49. package/pstack/skills/automate-me/agents/openai.yaml +2 -0
  50. package/pstack/skills/benchmark-checklist/SKILL.md +39 -0
  51. package/pstack/skills/benchmark-checklist/agents/openai.yaml +2 -0
  52. package/pstack/skills/blast-radius/SKILL.md +52 -0
  53. package/pstack/skills/blast-radius/agents/openai.yaml +2 -0
  54. package/pstack/skills/bro/SKILL.md +7 -0
  55. package/pstack/skills/bro/agents/openai.yaml +2 -0
  56. package/pstack/skills/control-cli/SKILL.md +55 -0
  57. package/pstack/skills/control-cli/agents/openai.yaml +2 -0
  58. package/pstack/skills/control-ui/SKILL.md +72 -0
  59. package/pstack/skills/control-ui/agents/openai.yaml +2 -0
  60. package/pstack/skills/correct/SKILL.md +34 -0
  61. package/pstack/skills/correct/agents/openai.yaml +2 -0
  62. package/pstack/skills/create-verification-skill/SKILL.md +47 -0
  63. package/pstack/skills/create-verification-skill/agents/openai.yaml +2 -0
  64. package/pstack/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
  65. package/pstack/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
  66. package/pstack/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
  67. package/pstack/skills/deslop/SKILL.md +30 -0
  68. package/pstack/skills/deslop/agents/openai.yaml +2 -0
  69. package/pstack/skills/figure-it-out/SKILL.md +55 -0
  70. package/pstack/skills/figure-it-out/agents/openai.yaml +2 -0
  71. package/pstack/skills/how/SKILL.md +58 -0
  72. package/pstack/skills/how/agents/openai.yaml +2 -0
  73. package/pstack/skills/how/references/explainer-prompt.md +55 -0
  74. package/pstack/skills/how/references/explorer-prompt.md +52 -0
  75. package/pstack/skills/interrogate/SKILL.md +111 -0
  76. package/pstack/skills/interrogate/agents/openai.yaml +2 -0
  77. package/pstack/skills/interrogate/references/code-quality-review.md +47 -0
  78. package/pstack/skills/interrogate/references/lead-judgment.md +58 -0
  79. package/pstack/skills/interrogate/references/reviewer-prompt.md +70 -0
  80. package/pstack/skills/interrogate/references/rubric.md +77 -0
  81. package/pstack/skills/maintain-verification-skill/SKILL.md +41 -0
  82. package/pstack/skills/maintain-verification-skill/agents/openai.yaml +2 -0
  83. package/pstack/skills/make-bot-ui/SKILL.md +289 -0
  84. package/pstack/skills/make-bot-ui/agents/openai.yaml +2 -0
  85. package/pstack/skills/no-comments/SKILL.md +24 -0
  86. package/pstack/skills/no-comments/agents/openai.yaml +2 -0
  87. package/pstack/skills/poteto-help/SKILL.md +156 -0
  88. package/pstack/skills/poteto-help/agents/openai.yaml +2 -0
  89. package/pstack/skills/poteto-help/references/prompting.md +51 -0
  90. package/pstack/skills/poteto-help/references/recipes.md +47 -0
  91. package/pstack/skills/poteto-mode/SKILL.md +143 -0
  92. package/pstack/skills/poteto-mode/agents/openai.yaml +2 -0
  93. package/pstack/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
  94. package/pstack/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
  95. package/pstack/skills/poteto-mode/playbooks/autopilot-full.md +13 -0
  96. package/pstack/skills/poteto-mode/playbooks/autopilot-stack.md +16 -0
  97. package/pstack/skills/poteto-mode/playbooks/babysit.md +29 -0
  98. package/pstack/skills/poteto-mode/playbooks/bug-fix.md +15 -0
  99. package/pstack/skills/poteto-mode/playbooks/eval.md +25 -0
  100. package/pstack/skills/poteto-mode/playbooks/feature.md +21 -0
  101. package/pstack/skills/poteto-mode/playbooks/hillclimb.md +21 -0
  102. package/pstack/skills/poteto-mode/playbooks/investigation.md +14 -0
  103. package/pstack/skills/poteto-mode/playbooks/multi-phase-plan.md +155 -0
  104. package/pstack/skills/poteto-mode/playbooks/opening-a-pr.md +38 -0
  105. package/pstack/skills/poteto-mode/playbooks/orchestrate.md +114 -0
  106. package/pstack/skills/poteto-mode/playbooks/pause-safely.md +10 -0
  107. package/pstack/skills/poteto-mode/playbooks/perf-issue.md +25 -0
  108. package/pstack/skills/poteto-mode/playbooks/prototype.md +14 -0
  109. package/pstack/skills/poteto-mode/playbooks/refactoring.md +16 -0
  110. package/pstack/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
  111. package/pstack/skills/poteto-mode/playbooks/session-pickup.md +11 -0
  112. package/pstack/skills/poteto-mode/playbooks/shipping.md +17 -0
  113. package/pstack/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
  114. package/pstack/skills/poteto-mode/playbooks/visual-parity.md +11 -0
  115. package/pstack/skills/poteto-mode/playbooks/worktree-cleanup.md +14 -0
  116. package/pstack/skills/poteto-mode/references/bugbot-triage.md +142 -0
  117. package/pstack/skills/poteto-mode/scripts/bootstrap.ts +62 -0
  118. package/pstack/skills/poteto-mode/scripts/bun.lock +67 -0
  119. package/pstack/skills/poteto-mode/scripts/check-plan.mjs +185 -0
  120. package/pstack/skills/poteto-mode/scripts/orch/orch.test.ts +634 -0
  121. package/pstack/skills/poteto-mode/scripts/orch/orch.ts +578 -0
  122. package/pstack/skills/poteto-mode/scripts/orch/store.ts +1607 -0
  123. package/pstack/skills/poteto-mode/scripts/package.json +16 -0
  124. package/pstack/skills/poteto-mode/scripts/watch-pr/cli.test.ts +224 -0
  125. package/pstack/skills/poteto-mode/scripts/watch-pr/cli.ts +223 -0
  126. package/pstack/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +118 -0
  127. package/pstack/skills/poteto-mode/scripts/watch-pr/github.test.ts +306 -0
  128. package/pstack/skills/poteto-mode/scripts/watch-pr/github.ts +699 -0
  129. package/pstack/skills/poteto-mode/scripts/watch-pr/policy.test.ts +420 -0
  130. package/pstack/skills/poteto-mode/scripts/watch-pr/policy.ts +832 -0
  131. package/pstack/skills/poteto-mode/scripts/watch-pr/render.ts +169 -0
  132. package/pstack/skills/poteto-mode/scripts/watch-pr/tsconfig.json +13 -0
  133. package/pstack/skills/poteto-mode/scripts/watch-pr/types.compile.ts +93 -0
  134. package/pstack/skills/poteto-mode/scripts/watch-pr/types.ts +401 -0
  135. package/pstack/skills/poteto-mode/scripts/watch-pr/watch-pr +6 -0
  136. package/pstack/skills/poteto-mode/scripts/worktree-audit.sh +92 -0
  137. package/pstack/skills/principle-attack-the-premise/SKILL.md +23 -0
  138. package/pstack/skills/principle-attack-the-premise/agents/openai.yaml +2 -0
  139. package/pstack/skills/principle-boundary-discipline/SKILL.md +34 -0
  140. package/pstack/skills/principle-boundary-discipline/agents/openai.yaml +2 -0
  141. package/pstack/skills/principle-build-the-lever/SKILL.md +23 -0
  142. package/pstack/skills/principle-build-the-lever/agents/openai.yaml +2 -0
  143. package/pstack/skills/principle-encode-lessons-in-structure/SKILL.md +31 -0
  144. package/pstack/skills/principle-encode-lessons-in-structure/agents/openai.yaml +2 -0
  145. package/pstack/skills/principle-exhaust-the-design-space/SKILL.md +21 -0
  146. package/pstack/skills/principle-exhaust-the-design-space/agents/openai.yaml +2 -0
  147. package/pstack/skills/principle-experience-first/SKILL.md +19 -0
  148. package/pstack/skills/principle-experience-first/agents/openai.yaml +2 -0
  149. package/pstack/skills/principle-explain-the-number/SKILL.md +23 -0
  150. package/pstack/skills/principle-explain-the-number/agents/openai.yaml +2 -0
  151. package/pstack/skills/principle-fix-root-causes/SKILL.md +23 -0
  152. package/pstack/skills/principle-fix-root-causes/agents/openai.yaml +2 -0
  153. package/pstack/skills/principle-foundational-thinking/SKILL.md +21 -0
  154. package/pstack/skills/principle-foundational-thinking/agents/openai.yaml +2 -0
  155. package/pstack/skills/principle-guard-the-context-window/SKILL.md +16 -0
  156. package/pstack/skills/principle-guard-the-context-window/agents/openai.yaml +2 -0
  157. package/pstack/skills/principle-laziness-protocol/SKILL.md +18 -0
  158. package/pstack/skills/principle-laziness-protocol/agents/openai.yaml +2 -0
  159. package/pstack/skills/principle-make-operations-idempotent/SKILL.md +24 -0
  160. package/pstack/skills/principle-make-operations-idempotent/agents/openai.yaml +2 -0
  161. package/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +22 -0
  162. package/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/agents/openai.yaml +2 -0
  163. package/pstack/skills/principle-minimize-reader-load/SKILL.md +23 -0
  164. package/pstack/skills/principle-minimize-reader-load/agents/openai.yaml +2 -0
  165. package/pstack/skills/principle-model-the-domain/SKILL.md +26 -0
  166. package/pstack/skills/principle-model-the-domain/agents/openai.yaml +2 -0
  167. package/pstack/skills/principle-never-block-on-the-human/SKILL.md +20 -0
  168. package/pstack/skills/principle-never-block-on-the-human/agents/openai.yaml +2 -0
  169. package/pstack/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
  170. package/pstack/skills/principle-outcome-oriented-execution/agents/openai.yaml +2 -0
  171. package/pstack/skills/principle-prove-it-works/SKILL.md +22 -0
  172. package/pstack/skills/principle-prove-it-works/agents/openai.yaml +2 -0
  173. package/pstack/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
  174. package/pstack/skills/principle-redesign-from-first-principles/agents/openai.yaml +2 -0
  175. package/pstack/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
  176. package/pstack/skills/principle-separate-before-serializing-shared-state/agents/openai.yaml +2 -0
  177. package/pstack/skills/principle-sequence-verifiable-units/SKILL.md +17 -0
  178. package/pstack/skills/principle-sequence-verifiable-units/agents/openai.yaml +2 -0
  179. package/pstack/skills/principle-subtract-before-you-add/SKILL.md +21 -0
  180. package/pstack/skills/principle-subtract-before-you-add/agents/openai.yaml +2 -0
  181. package/pstack/skills/principle-test-behavior-not-implementation/SKILL.md +25 -0
  182. package/pstack/skills/principle-test-behavior-not-implementation/agents/openai.yaml +2 -0
  183. package/pstack/skills/principle-type-system-discipline/SKILL.md +31 -0
  184. package/pstack/skills/principle-type-system-discipline/agents/openai.yaml +2 -0
  185. package/pstack/skills/pstack-harness/SKILL.md +67 -0
  186. package/pstack/skills/recall/SKILL.md +35 -0
  187. package/pstack/skills/recall/agents/openai.yaml +2 -0
  188. package/pstack/skills/reflect/SKILL.md +76 -0
  189. package/pstack/skills/reflect/agents/openai.yaml +2 -0
  190. package/pstack/skills/reflect/references/divergent-reviewer.md +43 -0
  191. package/pstack/skills/reflect/references/judgment-reviewer.md +42 -0
  192. package/pstack/skills/reflect/references/synthesizer.md +56 -0
  193. package/pstack/skills/reflect/references/tooling-reviewer.md +55 -0
  194. package/pstack/skills/setup-pstack/SKILL.md +110 -0
  195. package/pstack/skills/show-me-your-work/SKILL.md +82 -0
  196. package/pstack/skills/show-me-your-work/agents/openai.yaml +2 -0
  197. package/pstack/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
  198. package/pstack/skills/show-me-your-work/scripts/log.sh +42 -0
  199. package/pstack/skills/swarm/SKILL.md +48 -0
  200. package/pstack/skills/swarm/agents/openai.yaml +2 -0
  201. package/pstack/skills/tdd/SKILL.md +44 -0
  202. package/pstack/skills/tdd/agents/openai.yaml +2 -0
  203. package/pstack/skills/teach/SKILL.md +21 -0
  204. package/pstack/skills/teach/agents/openai.yaml +2 -0
  205. package/pstack/skills/technical-writing/SKILL.md +106 -0
  206. package/pstack/skills/technical-writing/agents/openai.yaml +2 -0
  207. package/pstack/skills/typescript-best-practices/SKILL.md +31 -0
  208. package/pstack/skills/typescript-best-practices/agents/openai.yaml +2 -0
  209. package/pstack/skills/typescript-best-practices/references/patterns.md +324 -0
  210. package/pstack/skills/unslop/SKILL.md +67 -0
  211. package/pstack/skills/unslop/agents/openai.yaml +2 -0
  212. package/pstack/skills/why/SKILL.md +158 -0
  213. package/pstack/skills/why/agents/openai.yaml +2 -0
  214. package/pstack/skills/why/references/epistemics.md +144 -0
  215. package/pstack/skills/why/references/investigator-prompt.md +103 -0
  216. package/pstack/skills/why/references/source-playbook.md +17 -0
  217. package/pstack/skills/why/references/sources/code-archaeology.md +88 -0
  218. package/pstack/skills/why/references/sources/databricks.md +70 -0
  219. package/pstack/skills/why/references/sources/datadog.md +99 -0
  220. package/pstack/skills/why/references/sources/incident-postmortem.md +15 -0
  221. package/pstack/skills/why/references/sources/linear.md +48 -0
  222. package/pstack/skills/why/references/sources/notion.md +55 -0
  223. package/pstack/skills/why/references/sources/sentry.md +100 -0
  224. package/pstack/skills/why/references/sources/slack.md +54 -0
  225. package/pstack/skills/why/references/synthesizer-prompt.md +135 -0
@@ -0,0 +1,84 @@
1
+ schema_version: 1
2
+
3
+ automations:
4
+ triage_name: "benny-triage"
5
+ reproduce_name: "benny-reproduce"
6
+
7
+ slack:
8
+ source_channel_id: "SOURCE_CHANNEL_ID"
9
+ operations_channel_id: ""
10
+ triage_identity_user_id: "TRIAGE_IDENTITY_USER_ID"
11
+ read_action: "configured-slack-read-action"
12
+ thread_post_action: "configured-slack-thread-post-action"
13
+ file_download_action: "configured-slack-file-download-action"
14
+ operations_edit_action: "configured-slack-edit-action"
15
+ prefer_harness_actions: true
16
+ optional_bot_token_env: "BENNY_SLACK_BOT_TOKEN"
17
+ allow_source_root_posts: false
18
+ allow_worker_slack_writes: false
19
+
20
+ repository:
21
+ url: "https://github.com/example-org/example-repo"
22
+ default_branch: "main"
23
+ pull_request_action: "configured-draft-pull-request-action"
24
+ pull_request_url_format: "https://github.com/{owner}/{repo}/pull/{number}"
25
+ draft_only: true
26
+
27
+ tracker:
28
+ type: "linear"
29
+ adapter_skill_name: "issue-tracker-adapter-placeholder"
30
+ team: "team-placeholder"
31
+ project: "project-placeholder"
32
+ labels:
33
+ bug: "bug-label-placeholder"
34
+ performance: "performance-label-placeholder"
35
+ intake: "intake-label-placeholder"
36
+ needs_repro: "needs-repro-label-placeholder"
37
+ status: "intake-status-placeholder"
38
+ source_link_title: "Slack report"
39
+ require_compensation_action: true
40
+
41
+ routing:
42
+ map_path: ".pstack/benny/routing.md"
43
+ owner_pings_default: false
44
+ allow_feature_owner_ping: false
45
+ allow_confirmed_regression_author_ping: false
46
+
47
+ control:
48
+ skill_name: "control-target-app"
49
+ feature_map_path: ".pstack/benny/feature-map.md"
50
+ environment: "safe-test-environment-placeholder"
51
+ artifact_directory: "/tmp/benny-artifacts"
52
+ artifact_retention_hours: 24
53
+
54
+ verdict_markers:
55
+ bug: "[benny:bug]"
56
+ performance: "[benny:performance]"
57
+ other: "[benny:other]"
58
+ tracker_attribute: "tracker"
59
+
60
+ status_emoji:
61
+ seen: "👀"
62
+ reproducing: "🔎"
63
+ reproduced: "✅"
64
+ could_not_reproduce: "⚪"
65
+ blocked: "⛔"
66
+ fixing: "🛠️"
67
+ fix_failed: "❌"
68
+ pull_request_opened: "🔗"
69
+
70
+ budgets:
71
+ poll_seconds: 45
72
+ verdict_wait_minutes: 45
73
+ triage_follow_up_minutes: 10
74
+ triage_total_minutes: 30
75
+ repro_minutes: 60
76
+ rejection_window_minutes: 10
77
+ fix_minutes: 90
78
+ operations_follow_up_minutes: 45
79
+
80
+ models:
81
+ triage: "choose-an-available-public-model-slug"
82
+ reproduce: "choose-an-available-public-model-slug"
83
+ code: "choose-an-available-public-model-slug"
84
+ media_review: "choose-an-available-public-model-slug"
@@ -0,0 +1,33 @@
1
+ # Reproduce automation prompt
2
+
3
+ > Source material for the copied setup workflow. Paraphrase this intent into an automation draft after the automation creator confirms that the copied pack is committed in the repository where the automation will run.
4
+
5
+ Read and follow `.pstack/automations/benny/skills/reproduce-and-fix-issues/SKILL.md` for this run.
6
+
7
+ Configuration source. Include this repository-relative path only when it is committed in the same target repository. Otherwise paraphrase the configured values. Never use a plugin source or cache path:
8
+
9
+ ```text
10
+ {{BENNY_CONFIG_PATH}}
11
+ ```
12
+
13
+ Trigger:
14
+
15
+ ```json
16
+ {
17
+ "source_channel_id": "{{SLACK_CHANNEL_ID}}",
18
+ "message_ts": "{{SLACK_MESSAGE_TS}}",
19
+ "thread_ts": "{{SLACK_THREAD_TS_OR_EMPTY}}"
20
+ }
21
+ ```
22
+
23
+ The creation intent should describe this as a new top-level report in the configured source Slack channel. It should include the configured repository, default branch, issue tracker, control adapter, feature map, and draft pull request capability.
24
+
25
+ Treat the source channel and root thread timestamp as immutable. If either is missing or does not match configuration, stop without posting.
26
+
27
+ Wait for a configured triage marker from the configured triage identity in this exact thread. Proceed only for `[benny:bug]` or `[benny:performance]`.
28
+
29
+ Require the configured control-adapter skill before attempting a repro. Reproduce the exact discriminating symptom twice through the real UI. Verify existing pull requests or commits without authoring over them. Attempt a bounded fix only after a confirmed repro and the operational file's fix gate.
30
+
31
+ The coordinator is the only Slack poster. Every child prompt must forbid `SendSlackMessage`, `PostToSlack`, `chat.postMessage`, and all other Slack writes. Children return findings only.
32
+
33
+ Never post a root message in the source channel.
@@ -0,0 +1,39 @@
1
+ # Triage automation prompt
2
+
3
+ > Source material for the copied setup workflow. Paraphrase this intent into an automation draft after the automation creator confirms that the copied pack is committed in the repository where the automation will run.
4
+
5
+ Read and follow `.pstack/automations/benny/skills/triage-issue-reports/SKILL.md` for this run.
6
+
7
+ Configuration source. Include this repository-relative path only when it is committed in the same target repository. Otherwise paraphrase the configured values. Never use a plugin source or cache path:
8
+
9
+ ```text
10
+ {{BENNY_CONFIG_PATH}}
11
+ ```
12
+
13
+ Trigger:
14
+
15
+ ```json
16
+ {
17
+ "source_channel_id": "{{SLACK_CHANNEL_ID}}",
18
+ "message_ts": "{{SLACK_MESSAGE_TS}}",
19
+ "thread_ts": "{{SLACK_THREAD_TS_OR_EMPTY}}"
20
+ }
21
+ ```
22
+
23
+ The creation intent should describe this as a new top-level report in the configured source Slack channel.
24
+
25
+ Treat the source channel and root thread timestamp as immutable. If either is missing or does not match configuration, stop without posting or writing to the issue tracker.
26
+
27
+ The committed operational file owns classification, attachment review, cause tracing, routing, dedupe, tracker writes, and the final verdict. Post no progress messages. Never post a root message in the source channel.
28
+
29
+ The coordinator is the only Slack poster. Any delegated worker must be read-only, return findings only, and receive an explicit ban on every Slack write action.
30
+
31
+ End the single verdict with exactly one configured marker:
32
+
33
+ ```text
34
+ [benny:bug]
35
+ [benny:performance]
36
+ [benny:other]
37
+ ```
38
+
39
+ A bug or performance marker may add `tracker=<URL>`.
@@ -0,0 +1,36 @@
1
+ # Installed into ~/.codex/agents/ by the setup-pstack skill. Codex plugins cannot ship agents,
2
+ # so setup-pstack copies this file there and fills in model and effort.
3
+ name = "comment-sicko"
4
+ description = "Comment Sicko. A deranged comment-hater that savors deletion and condemns workaround code. Read-only. Spawn from the no-comments skill with the scope. Reports deletions and MUST KILL flags, never edits code."
5
+ sandbox_mode = "read-only"
6
+ developer_instructions = """
7
+ # Comment Sicko
8
+
9
+ My first output when spawned is exactly this.
10
+
11
+ Yes... Ha ha ha... Yes!
12
+
13
+ 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.
14
+
15
+ Only these exceptions get to crawl away.
16
+
17
+ - Legal or license headers.
18
+ - 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.
19
+ - `// prettier-ignore`. Lint suppressions survive only when their rule is faulty, pedantic, or style-only.
20
+ - Doc comments that define a public API contract.
21
+ - Issue or RFC links that explain a constraint code cannot express.
22
+
23
+ That list is my only leash. When I am not sure a keep clause applies, the comment dies. Everything else is meat.
24
+
25
+ `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`.
26
+
27
+ `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 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.
28
+
29
+ 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.
30
+
31
+ 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.
32
+
33
+ Report only. Name touched files, deletion count, `MUST KILL` flags with one line each, and skips.
34
+ """
35
+ # model = "<setup-pstack fills this in>"
36
+ # model_reasoning_effort = "<setup-pstack fills this in>"
@@ -0,0 +1,11 @@
1
+ # Installed into ~/.codex/agents/ by the setup-pstack skill. Codex plugins cannot ship agents,
2
+ # so setup-pstack copies this file there and fills in model, effort, and the poteto-mode path.
3
+ name = "poteto-agent"
4
+ description = "Routing target for $poteto-mode and any request for poteto's style. Spawn a fresh poteto-agent for each new task. Reads the poteto-mode skill in full before any work. Substituting default skips that read and drifts."
5
+ developer_instructions = """
6
+ You are operating as poteto-mode's full agent style. Invoke $poteto-mode and read its SKILL.md in full before doing any work, including its inline Principles index. If $poteto-mode is not available, read the file at the path on the last line. Navigate to a leaf principle-* skill whenever you apply that principle. Read the pstack-harness skill before your first spawn, model choice, or structured question.
7
+
8
+ poteto-mode path: <setup-pstack fills this in>
9
+ """
10
+ # model = "<setup-pstack fills this in>"
11
+ # model_reasoning_effort = "<setup-pstack fills this in>"
@@ -0,0 +1,80 @@
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
+ pstack installs as a plugin on Claude Code and on Codex, or copies into a skills directory with npx. Pick one.
8
+
9
+ The quick way, from a shell:
10
+
11
+ ```bash
12
+ npx @jiroamato/pstack
13
+ ```
14
+
15
+ It asks which agent (Claude Code or Codex) and where (this project or your home directory), then copies the skills and the two agents there. Re-run it to update, `npx @jiroamato/pstack uninstall` to remove. Installed this way the skills keep their bare names, so on Claude Code you type `/poteto-mode`.
16
+
17
+ Or as a plugin, which the tool updates for you. Claude Code, from a shell:
18
+
19
+ ```bash
20
+ claude plugin marketplace add jiroamato/pstack
21
+ claude plugin install pstack@pstack-plugins
22
+ ```
23
+
24
+ Codex, from a shell:
25
+
26
+ ```bash
27
+ codex plugin marketplace add jiroamato/pstack
28
+ codex plugin add pstack
29
+ ```
30
+
31
+ Start a new session afterwards. On Claude Code the plugin's skills are namespaced, so type `/pstack:poteto-mode`. On Codex type `$poteto-mode`. The rest of this guide writes `/poteto-mode` for both.
32
+
33
+ ## Pick your models
34
+
35
+ Run:
36
+
37
+ ```text
38
+ /setup-pstack
39
+ ```
40
+
41
+ [`/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 `~/.pstack/models.md`, a small file every pstack skill reads. It has one section per harness.
42
+
43
+ On Codex the defaults run at `xhigh` reasoning, the same as the `large` budget. `unlimited` lifts each model to `max`. `medium` and `small` lower the reasoning and spend fewer tokens. On Claude Code effort is a session setting, so the budget tells you which `/effort` level to set instead of rewriting the roles.
44
+
45
+ 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.
46
+
47
+ You might be wondering what happens if you use Auto. Set a role to `inherit-parent` or `auto` and pstack omits the subagent `model` field, so the subagent inherits your parent chat model. 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.
48
+
49
+ ## Accept the verification offer, or don't
50
+
51
+ 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).
52
+
53
+ Say yes and it writes `verify-<app>/` into the project skills directory (`.claude/skills/` on Claude Code, `.agents/skills/` on Codex), 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.
54
+
55
+ 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.
56
+
57
+ After setup, start a new chat. The models file applies to new sessions.
58
+
59
+ ## Keep the cost in check
60
+
61
+ pstack spends extra tokens on subagents and review panels. That's the price of the rigor. To spend fewer:
62
+
63
+ - 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.
64
+ - Set a role to `auto` or `inherit-parent` so it runs on the chat's own model.
65
+ - Shorten a panel list. Each entry runs one subagent.
66
+ - Save `/poteto-mode` for work that needs rigor. A small, obvious edit doesn't.
67
+
68
+ ## Run your first task
69
+
70
+ Pick something real but small, and describe it the way you'd describe it to a colleague:
71
+
72
+ ```text
73
+ /poteto-mode add a --json flag to this command. text output stays byte-identical. verify both.
74
+ ```
75
+
76
+ 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.
77
+
78
+ From here you can type normal follow-ups. To keep `/poteto-mode` on for the whole session, follow the harness **keep the mode on** row in the [`pstack-harness`](../../skills/pstack-harness/SKILL.md) skill. On Claude Code, start the session as the agent with `claude --agent pstack:poteto-agent`, or add one line to your `CLAUDE.md`: "Apply the pstack:poteto-mode skill to any non-trivial task." On Codex, add the same line with `$poteto-mode` to `AGENTS.md`. Typing the skill once attaches it to that message, and its content stays in context, but a fresh task may not re-match a playbook.
79
+
80
+ Next: [Route work through `/poteto-mode`](./02-poteto-mode.md).
@@ -0,0 +1,131 @@
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, babysitting a PR or stack to merge-ready, shipping a verified stack, running a PR queue 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.
68
+
69
+ ## Follow up short
70
+
71
+ When the conversation already carries the context, the prompt shrinks to almost nothing. All of these are enough:
72
+
73
+ ```text
74
+ /poteto-mode do it
75
+ ```
76
+
77
+ ```text
78
+ continue
79
+ ```
80
+
81
+ ```text
82
+ keep going until done
83
+ ```
84
+
85
+ Short works because the playbook holds the structure, and keeping `/poteto-mode` on holds it in context on every turn. [Set up pstack](./01-setup.md#run-your-first-task) shows how. Your words carry the intent, and the skill carries the rigor.
86
+
87
+ ## Switch tasks with "new task"
88
+
89
+ A long chat accumulates context from the last task. When you change subjects, say so:
90
+
91
+ ```text
92
+ /poteto-mode new task. figure out why the cache entry survives logout. don't change any code yet.
93
+ ```
94
+
95
+ "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.
96
+
97
+ ## Give parallel work its own worktree
98
+
99
+ If you run several agents against one repository on one computer, they will fight over the working tree, the ports, and the build output. The cleanest isolation is a worktree per agent. On Claude Code, subagents take `isolation: "worktree"` and get their own checkout and branch. On Codex, ask for a `git worktree` per worker, or start the thread in the app's worktree mode. The [`pstack-harness`](../../skills/pstack-harness/SKILL.md) **isolation** row has the details.
100
+
101
+ When the work has to stay local, ask for a worktree up front:
102
+
103
+ ```text
104
+ /poteto-mode new task. branch off <base> in a fresh worktree, then port the parser change there.
105
+ ```
106
+
107
+ 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.
108
+
109
+ Worktrees accumulate. When disk gets tight, ask:
110
+
111
+ ```text
112
+ /poteto-mode what's eating my disk? prune the worktrees that are safe to prune.
113
+ ```
114
+
115
+ 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.
116
+
117
+ ## Leave it running
118
+
119
+ When you step away, say what done means and go:
120
+
121
+ ```text
122
+ /poteto-mode im stepping away. keep going until the migration check reports zero old callers. log your decisions.
123
+ ```
124
+
125
+ 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.
126
+
127
+ **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.
128
+
129
+ Read [`poteto-mode`](../../skills/poteto-mode/SKILL.md) itself for the full routing rules.
130
+
131
+ 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) works like a detective on a cold case. It 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 perfectly 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 stealing. It turns the explanation into an argument you can poke at 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).