pstack-claude-mirror 0.0.0-stage → 0.9.133

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 (664) hide show
  1. package/.claude-plugin/marketplace.json +16 -0
  2. package/CHANGES.md +1110 -0
  3. package/LICENSE +22 -0
  4. package/LICENSE-cursor-team-kit +21 -0
  5. package/LICENSE-mirror +27 -0
  6. package/LICENSE-thermos +21 -0
  7. package/NOTICE-skills.md +13 -0
  8. package/NOTICE.md +62 -0
  9. package/README.md +84 -2
  10. package/UPSTREAM-README.md +243 -0
  11. package/bin/pstack-claude.mjs +183 -0
  12. package/docs/reference.md +247 -0
  13. package/package.json +88 -4
  14. package/plugins/pstack/.antigravity-plugin/plugin.json +8 -0
  15. package/plugins/pstack/.claude-plugin/icon.png +0 -0
  16. package/plugins/pstack/.claude-plugin/plugin.json +31 -0
  17. package/plugins/pstack/.codex-plugin/plugin.json +52 -0
  18. package/plugins/pstack/.github/plugin/plugin.json +15 -0
  19. package/plugins/pstack/.grok-plugin/plugin.json +9 -0
  20. package/plugins/pstack/.muse-plugin/plugin.json +381 -0
  21. package/plugins/pstack/README.md +27 -0
  22. package/plugins/pstack/agents/comment-sicko.md +34 -0
  23. package/plugins/pstack/agents/poteto-agent.md +8 -0
  24. package/plugins/pstack/agents/thermo-nuclear-code-quality-review-subagent.md +23 -0
  25. package/plugins/pstack/agents/thermo-nuclear-review-subagent.md +28 -0
  26. package/plugins/pstack/assets/pstack-icon.png +0 -0
  27. package/plugins/pstack/assets/pstack-icon.prompt.txt +8 -0
  28. package/plugins/pstack/grok/skills/pstack-routing/SKILL.md +8 -0
  29. package/plugins/pstack/hooks/agy-context.awk +9 -0
  30. package/plugins/pstack/hooks/codex-hooks.json +17 -0
  31. package/plugins/pstack/hooks/copilot-context.awk +44 -0
  32. package/plugins/pstack/hooks/copilot-hooks.json +27 -0
  33. package/plugins/pstack/hooks/hooks.json +16 -0
  34. package/plugins/pstack/hooks/json.awk +164 -0
  35. package/plugins/pstack/hooks/kimi-instructions.md +17 -0
  36. package/plugins/pstack/hooks/muse-context.awk +31 -0
  37. package/plugins/pstack/hooks/pre-tool-use.awk +152 -0
  38. package/plugins/pstack/hooks/pre-tool-use.sh +16 -0
  39. package/plugins/pstack/hooks/script-contracts.awk +55 -0
  40. package/plugins/pstack/hooks/session-start-agy.md +17 -0
  41. package/plugins/pstack/hooks/session-start-context.md +15 -0
  42. package/plugins/pstack/hooks/session-start-copilot-setup.md +1 -0
  43. package/plugins/pstack/hooks/session-start-copilot-sheet.md +1 -0
  44. package/plugins/pstack/hooks/session-start-copilot.md +3 -0
  45. package/plugins/pstack/hooks/session-start-minimax.md +17 -0
  46. package/plugins/pstack/hooks/session-start-muse-sheet.md +1 -0
  47. package/plugins/pstack/hooks/session-start-muse.md +17 -0
  48. package/plugins/pstack/hooks/session-start-opencode.md +17 -0
  49. package/plugins/pstack/hooks/session-start.ps1 +105 -0
  50. package/plugins/pstack/hooks/session-start.sh +95 -0
  51. package/plugins/pstack/hooks.json +10 -0
  52. package/plugins/pstack/models.json +67 -0
  53. package/plugins/pstack/omp/index.mjs +34 -0
  54. package/plugins/pstack/opencode/index.js +49 -0
  55. package/plugins/pstack/package.json +8 -0
  56. package/plugins/pstack/pi/agent-files.ts +117 -0
  57. package/plugins/pstack/pi/agent-text.ts +99 -0
  58. package/plugins/pstack/pi/agent-tools.ts +148 -0
  59. package/plugins/pstack/pi/agents.ts +486 -0
  60. package/plugins/pstack/pi/ask.ts +87 -0
  61. package/plugins/pstack/pi/child.ts +310 -0
  62. package/plugins/pstack/pi/config.ts +178 -0
  63. package/plugins/pstack/pi/index.ts +44 -0
  64. package/plugins/pstack/pi/one-shot.ts +90 -0
  65. package/plugins/pstack/pi/path-skills.ts +54 -0
  66. package/plugins/pstack/pi/prompt.ts +39 -0
  67. package/plugins/pstack/pi/schedule.ts +254 -0
  68. package/plugins/pstack/pi/slash.ts +92 -0
  69. package/plugins/pstack/pi/sleep-wait.ts +76 -0
  70. package/plugins/pstack/pi/worktree.ts +74 -0
  71. package/plugins/pstack/skills/architect/SKILL.md +100 -0
  72. package/plugins/pstack/skills/architect/references/design-red-flags.md +57 -0
  73. package/plugins/pstack/skills/architect/references/rationale-template.md +39 -0
  74. package/plugins/pstack/skills/architect/references/runner-prompt.md +20 -0
  75. package/plugins/pstack/skills/arena/SKILL.md +66 -0
  76. package/plugins/pstack/skills/automate-me/SKILL.md +111 -0
  77. package/plugins/pstack/skills/babysit/SKILL.md +68 -0
  78. package/plugins/pstack/skills/benchmark-checklist/SKILL.md +38 -0
  79. package/plugins/pstack/skills/blast-radius/SKILL.md +49 -0
  80. package/plugins/pstack/skills/bro/SKILL.md +6 -0
  81. package/plugins/pstack/skills/correct/SKILL.md +31 -0
  82. package/plugins/pstack/skills/create-formal-verification-skill/SKILL.md +50 -0
  83. package/plugins/pstack/skills/create-verification-skill/SKILL.md +51 -0
  84. package/plugins/pstack/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
  85. package/plugins/pstack/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
  86. package/plugins/pstack/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
  87. package/plugins/pstack/skills/deslop/SKILL.md +24 -0
  88. package/plugins/pstack/skills/figure-it-out/SKILL.md +51 -0
  89. package/plugins/pstack/skills/fix-ci/SKILL.md +29 -0
  90. package/plugins/pstack/skills/fix-merge-conflicts/SKILL.md +32 -0
  91. package/plugins/pstack/skills/get-pr-comments/SKILL.md +23 -0
  92. package/plugins/pstack/skills/how/SKILL.md +54 -0
  93. package/plugins/pstack/skills/how/references/explainer-prompt.md +55 -0
  94. package/plugins/pstack/skills/how/references/explorer-prompt.md +35 -0
  95. package/plugins/pstack/skills/in-your-own-words/SKILL.md +6 -0
  96. package/plugins/pstack/skills/interrogate/SKILL.md +48 -0
  97. package/plugins/pstack/skills/ketchup/SKILL.md +42 -0
  98. package/plugins/pstack/skills/ketchup-video/SKILL.md +28 -0
  99. package/plugins/pstack/skills/maintain-formal-verification-skill/SKILL.md +65 -0
  100. package/plugins/pstack/skills/maintain-verification-skill/SKILL.md +46 -0
  101. package/plugins/pstack/skills/make-pr-easy-to-review/SKILL.md +59 -0
  102. package/plugins/pstack/skills/no-comments/SKILL.md +45 -0
  103. package/plugins/pstack/skills/poteto-help/SKILL.md +149 -0
  104. package/plugins/pstack/skills/poteto-help/references/prompting.md +51 -0
  105. package/plugins/pstack/skills/poteto-help/references/recipes.md +51 -0
  106. package/plugins/pstack/skills/poteto-mode/SKILL.md +174 -0
  107. package/plugins/pstack/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
  108. package/plugins/pstack/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
  109. package/plugins/pstack/skills/poteto-mode/playbooks/autopilot-full.md +31 -0
  110. package/plugins/pstack/skills/poteto-mode/playbooks/autopilot-stack.md +8 -0
  111. package/plugins/pstack/skills/poteto-mode/playbooks/babysit.md +23 -0
  112. package/plugins/pstack/skills/poteto-mode/playbooks/bug-fix.md +15 -0
  113. package/plugins/pstack/skills/poteto-mode/playbooks/eval.md +25 -0
  114. package/plugins/pstack/skills/poteto-mode/playbooks/feature.md +21 -0
  115. package/plugins/pstack/skills/poteto-mode/playbooks/hillclimb.md +21 -0
  116. package/plugins/pstack/skills/poteto-mode/playbooks/investigation.md +14 -0
  117. package/plugins/pstack/skills/poteto-mode/playbooks/multi-phase-plan.md +158 -0
  118. package/plugins/pstack/skills/poteto-mode/playbooks/opening-a-pr.md +34 -0
  119. package/plugins/pstack/skills/poteto-mode/playbooks/orchestrate.md +27 -0
  120. package/plugins/pstack/skills/poteto-mode/playbooks/pause-safely.md +11 -0
  121. package/plugins/pstack/skills/poteto-mode/playbooks/perf-issue.md +25 -0
  122. package/plugins/pstack/skills/poteto-mode/playbooks/prototype.md +14 -0
  123. package/plugins/pstack/skills/poteto-mode/playbooks/refactoring.md +18 -0
  124. package/plugins/pstack/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
  125. package/plugins/pstack/skills/poteto-mode/playbooks/session-pickup.md +11 -0
  126. package/plugins/pstack/skills/poteto-mode/playbooks/shipping.md +16 -0
  127. package/plugins/pstack/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
  128. package/plugins/pstack/skills/poteto-mode/playbooks/visual-parity.md +11 -0
  129. package/plugins/pstack/skills/poteto-mode/playbooks/worktree-cleanup.md +12 -0
  130. package/plugins/pstack/skills/poteto-mode/references/agents/comment-sicko.md +34 -0
  131. package/plugins/pstack/skills/poteto-mode/references/agy-tools.md +99 -0
  132. package/plugins/pstack/skills/poteto-mode/references/bugbot-triage.md +142 -0
  133. package/plugins/pstack/skills/poteto-mode/references/codex-tools.md +109 -0
  134. package/plugins/pstack/skills/poteto-mode/references/copilot-tools.md +143 -0
  135. package/plugins/pstack/skills/poteto-mode/references/grok.md +50 -0
  136. package/plugins/pstack/skills/poteto-mode/references/kimi-tools.md +40 -0
  137. package/plugins/pstack/skills/poteto-mode/references/licenses/LICENSE +22 -0
  138. package/plugins/pstack/skills/poteto-mode/references/licenses/LICENSE-cursor-team-kit +21 -0
  139. package/plugins/pstack/skills/poteto-mode/references/licenses/LICENSE-thermos +21 -0
  140. package/plugins/pstack/skills/poteto-mode/references/licenses/NOTICE.md +13 -0
  141. package/plugins/pstack/skills/poteto-mode/references/merge-safety.md +43 -0
  142. package/plugins/pstack/skills/poteto-mode/references/minimax-tools.md +93 -0
  143. package/plugins/pstack/skills/poteto-mode/references/muse-tools.md +105 -0
  144. package/plugins/pstack/skills/poteto-mode/references/omp-tools.md +39 -0
  145. package/plugins/pstack/skills/poteto-mode/references/opencode-tools.md +29 -0
  146. package/plugins/pstack/skills/poteto-mode/references/pi-tools.md +117 -0
  147. package/plugins/pstack/skills/poteto-mode/references/resume-storage.md +20 -0
  148. package/plugins/pstack/skills/poteto-mode/scripts/.prettierignore +23 -0
  149. package/plugins/pstack/skills/poteto-mode/scripts/.prettierrc.json +3 -0
  150. package/plugins/pstack/skills/poteto-mode/scripts/bootstrap.ts +71 -0
  151. package/plugins/pstack/skills/poteto-mode/scripts/bun.lock +67 -0
  152. package/plugins/pstack/skills/poteto-mode/scripts/check-plan.mjs +214 -0
  153. package/plugins/pstack/skills/poteto-mode/scripts/check-plan.test.ts +115 -0
  154. package/plugins/pstack/skills/poteto-mode/scripts/check-playbooks.mjs +71 -0
  155. package/plugins/pstack/skills/poteto-mode/scripts/codex-session-effort.mjs +66 -0
  156. package/plugins/pstack/skills/poteto-mode/scripts/package.json +16 -0
  157. package/plugins/pstack/skills/poteto-mode/scripts/resume.mjs +139 -0
  158. package/plugins/pstack/skills/poteto-mode/scripts/tsconfig.json +14 -0
  159. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/cli.test.ts +383 -0
  160. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/cli.ts +266 -0
  161. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/deadline.ts +20 -0
  162. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +157 -0
  163. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/fresh-install.test.ts +35 -0
  164. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/github.test.ts +902 -0
  165. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/github.ts +922 -0
  166. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/integrity.test.ts +887 -0
  167. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/landing.ts +92 -0
  168. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/live-merge-safety.mjs +142 -0
  169. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/policy.test.ts +1151 -0
  170. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/policy.ts +956 -0
  171. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/render.ts +200 -0
  172. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/ship-pr +6 -0
  173. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/shipping-cli.test.ts +159 -0
  174. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/shipping-cli.ts +65 -0
  175. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/shipping.test-helper.ts +48 -0
  176. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/shipping.test.ts +360 -0
  177. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/shipping.ts +235 -0
  178. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/transport.test.ts +211 -0
  179. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/tsconfig.json +13 -0
  180. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/types.compile.ts +108 -0
  181. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/types.ts +474 -0
  182. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/watch-pr +6 -0
  183. package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/wrapper.test.ts +20 -0
  184. package/plugins/pstack/skills/poteto-mode/scripts/worktree-audit.mjs +434 -0
  185. package/plugins/pstack/skills/principle-attack-the-premise/SKILL.md +21 -0
  186. package/plugins/pstack/skills/principle-boundary-discipline/SKILL.md +34 -0
  187. package/plugins/pstack/skills/principle-build-the-lever/SKILL.md +24 -0
  188. package/plugins/pstack/skills/principle-encode-lessons-in-structure/SKILL.md +11 -0
  189. package/plugins/pstack/skills/principle-exhaust-the-design-space/SKILL.md +9 -0
  190. package/plugins/pstack/skills/principle-experience-first/SKILL.md +19 -0
  191. package/plugins/pstack/skills/principle-explain-the-number/SKILL.md +18 -0
  192. package/plugins/pstack/skills/principle-fix-root-causes/SKILL.md +21 -0
  193. package/plugins/pstack/skills/principle-foundational-thinking/SKILL.md +21 -0
  194. package/plugins/pstack/skills/principle-guard-the-context-window/SKILL.md +12 -0
  195. package/plugins/pstack/skills/principle-laziness-protocol/SKILL.md +10 -0
  196. package/plugins/pstack/skills/principle-make-operations-idempotent/SKILL.md +22 -0
  197. package/plugins/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +14 -0
  198. package/plugins/pstack/skills/principle-minimize-reader-load/SKILL.md +18 -0
  199. package/plugins/pstack/skills/principle-model-the-domain/SKILL.md +24 -0
  200. package/plugins/pstack/skills/principle-never-block-on-the-human/SKILL.md +15 -0
  201. package/plugins/pstack/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
  202. package/plugins/pstack/skills/principle-prove-it-works/SKILL.md +27 -0
  203. package/plugins/pstack/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
  204. package/plugins/pstack/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
  205. package/plugins/pstack/skills/principle-sequence-verifiable-units/SKILL.md +17 -0
  206. package/plugins/pstack/skills/principle-subtract-before-you-add/SKILL.md +18 -0
  207. package/plugins/pstack/skills/principle-test-behavior-not-implementation/SKILL.md +20 -0
  208. package/plugins/pstack/skills/principle-type-system-discipline/SKILL.md +13 -0
  209. package/plugins/pstack/skills/recall/SKILL.md +43 -0
  210. package/plugins/pstack/skills/reflect/SKILL.md +89 -0
  211. package/plugins/pstack/skills/reflect/references/divergent-reviewer.md +38 -0
  212. package/plugins/pstack/skills/reflect/references/judgment-reviewer.md +37 -0
  213. package/plugins/pstack/skills/reflect/references/synthesizer.md +56 -0
  214. package/plugins/pstack/skills/reflect/references/tooling-reviewer.md +48 -0
  215. package/plugins/pstack/skills/reflect/scripts/claude-project-dir.mjs +121 -0
  216. package/plugins/pstack/skills/reflect/scripts/find-transcript.mjs +218 -0
  217. package/plugins/pstack/skills/setup-pstack/SKILL.md +109 -0
  218. package/plugins/pstack/skills/setup-pstack/copilot.md +88 -0
  219. package/plugins/pstack/skills/setup-pstack/references/runtimes.md +75 -0
  220. package/plugins/pstack/skills/setup-pstack/scripts/check-sheet.awk +10 -0
  221. package/plugins/pstack/skills/setup-pstack/scripts/check-sheet.sh +20 -0
  222. package/plugins/pstack/skills/setup-pstack/scripts/read-sheet.sh +24 -0
  223. package/plugins/pstack/skills/setup-pstack/scripts/sheet.awk +160 -0
  224. package/plugins/pstack/skills/sharpen/SKILL.md +15 -0
  225. package/plugins/pstack/skills/show-me-your-work/SKILL.md +89 -0
  226. package/plugins/pstack/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
  227. package/plugins/pstack/skills/show-me-your-work/scripts/log.sh +58 -0
  228. package/plugins/pstack/skills/statechart/SKILL.md +81 -0
  229. package/plugins/pstack/skills/statechart/references/render.md +93 -0
  230. package/plugins/pstack/skills/statechart/scripts/backends/cfg.ts +33 -0
  231. package/plugins/pstack/skills/statechart/scripts/backends/mermaid.ts +201 -0
  232. package/plugins/pstack/skills/statechart/scripts/backends/plain-text.ts +72 -0
  233. package/plugins/pstack/skills/statechart/scripts/backends/report.ts +177 -0
  234. package/plugins/pstack/skills/statechart/scripts/bun.lock +17 -0
  235. package/plugins/pstack/skills/statechart/scripts/frontends/config.ts +276 -0
  236. package/plugins/pstack/skills/statechart/scripts/frontends/dot.ts +74 -0
  237. package/plugins/pstack/skills/statechart/scripts/frontends/marks.ts +93 -0
  238. package/plugins/pstack/skills/statechart/scripts/frontends/messages.ts +52 -0
  239. package/plugins/pstack/skills/statechart/scripts/frontends/spec.ts +114 -0
  240. package/plugins/pstack/skills/statechart/scripts/frontends/trace.ts +24 -0
  241. package/plugins/pstack/skills/statechart/scripts/frontends/value.ts +166 -0
  242. package/plugins/pstack/skills/statechart/scripts/frontends/verdict.ts +40 -0
  243. package/plugins/pstack/skills/statechart/scripts/frontends/view.ts +119 -0
  244. package/plugins/pstack/skills/statechart/scripts/ir.ts +547 -0
  245. package/plugins/pstack/skills/statechart/scripts/janitor.ts +12 -0
  246. package/plugins/pstack/skills/statechart/scripts/package.json +11 -0
  247. package/plugins/pstack/skills/statechart/scripts/passes/annotate.ts +128 -0
  248. package/plugins/pstack/skills/statechart/scripts/passes/label.ts +269 -0
  249. package/plugins/pstack/skills/statechart/scripts/passes/lift.ts +85 -0
  250. package/plugins/pstack/skills/statechart/scripts/passes/loop-check.ts +68 -0
  251. package/plugins/pstack/skills/statechart/scripts/passes/paths.ts +60 -0
  252. package/plugins/pstack/skills/statechart/scripts/passes/reach.ts +135 -0
  253. package/plugins/pstack/skills/statechart/scripts/passes/region-check.ts +97 -0
  254. package/plugins/pstack/skills/statechart/scripts/passes/regions.ts +295 -0
  255. package/plugins/pstack/skills/statechart/scripts/pipeline.ts +76 -0
  256. package/plugins/pstack/skills/statechart/scripts/run.ts +526 -0
  257. package/plugins/pstack/skills/statechart/scripts/statechart +29 -0
  258. package/plugins/pstack/skills/statechart/scripts/statechart.ts +171 -0
  259. package/plugins/pstack/skills/statechart/scripts/test/ConfigOracle.java +63 -0
  260. package/plugins/pstack/skills/statechart/scripts/test/chart.test.ts +1210 -0
  261. package/plugins/pstack/skills/statechart/scripts/test/charts/Braces.mmd +7 -0
  262. package/plugins/pstack/skills/statechart/scripts/test/charts/Escapes.mmd +11 -0
  263. package/plugins/pstack/skills/statechart/scripts/test/charts/Phases.mmd +29 -0
  264. package/plugins/pstack/skills/statechart/scripts/test/child-env.test.ts +15 -0
  265. package/plugins/pstack/skills/statechart/scripts/test/cli.test.ts +1323 -0
  266. package/plugins/pstack/skills/statechart/scripts/test/config-fuzz.test.ts +263 -0
  267. package/plugins/pstack/skills/statechart/scripts/test/corpus/Counter/ChartRun.out +57 -0
  268. package/plugins/pstack/skills/statechart/scripts/test/corpus/Counter/Counter.cfg +3 -0
  269. package/plugins/pstack/skills/statechart/scripts/test/corpus/Counter/Counter.tla +10 -0
  270. package/plugins/pstack/skills/statechart/scripts/test/corpus/Counter/chart.mmd +9 -0
  271. package/plugins/pstack/skills/statechart/scripts/test/corpus/Counter/graph.dot +16 -0
  272. package/plugins/pstack/skills/statechart/scripts/test/corpus/Counter/report.md +7 -0
  273. package/plugins/pstack/skills/statechart/scripts/test/corpus/Counter/sany.out +2 -0
  274. package/plugins/pstack/skills/statechart/scripts/test/corpus/Counter/verdict-1.out +49 -0
  275. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/ChartRun.out +60 -0
  276. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.cfg +4 -0
  277. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.tla +22 -0
  278. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/chart.mmd +26 -0
  279. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/graph.dot +19 -0
  280. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/report.md +20 -0
  281. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/sany.out +2 -0
  282. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.exit +1 -0
  283. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.out +56 -0
  284. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.exit +1 -0
  285. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.out +82 -0
  286. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-3.out +57 -0
  287. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/ChartRun.out +59 -0
  288. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.cfg +3 -0
  289. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.tla +11 -0
  290. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/chart.mmd +22 -0
  291. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/graph.dot +16 -0
  292. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/report.md +17 -0
  293. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/sany.out +2 -0
  294. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.exit +1 -0
  295. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.out +56 -0
  296. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.exit +1 -0
  297. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.out +77 -0
  298. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/ChartRun.out +69 -0
  299. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.cfg +2 -0
  300. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.tla +11 -0
  301. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/chart.mmd +85 -0
  302. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/graph.dot +70 -0
  303. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/report.md +12 -0
  304. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/sany.out +2 -0
  305. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.exit +1 -0
  306. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.out +67 -0
  307. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-2.out +57 -0
  308. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.exit +1 -0
  309. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.out +85 -0
  310. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.cfg +6 -0
  311. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.tla +13 -0
  312. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/chart.mmd +5 -0
  313. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/graph.dot +10 -0
  314. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/report.md +31 -0
  315. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/sany.out +2 -0
  316. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.exit +1 -0
  317. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.out +64 -0
  318. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.exit +1 -0
  319. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.out +77 -0
  320. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/ChartRun.out +55 -0
  321. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.cfg +3 -0
  322. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.tla +10 -0
  323. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/chart.mmd +12 -0
  324. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/graph.dot +6 -0
  325. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/report.md +12 -0
  326. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/sany.out +2 -0
  327. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.exit +1 -0
  328. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.out +33 -0
  329. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-2.out +54 -0
  330. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/ChartRun.out +54 -0
  331. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.cfg +3 -0
  332. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.tla +10 -0
  333. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/chart.mmd +1 -0
  334. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/graph.dot +6 -0
  335. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/report.md +7 -0
  336. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/sany.out +2 -0
  337. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/verdict-1.out +46 -0
  338. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/ChartRun.out +59 -0
  339. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.cfg +2 -0
  340. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.tla +10 -0
  341. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterSteps.tla +6 -0
  342. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/chart.mmd +17 -0
  343. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/graph.dot +15 -0
  344. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/report.md +14 -0
  345. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/sany.out +3 -0
  346. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.exit +1 -0
  347. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.out +78 -0
  348. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/ChartRun.out +59 -0
  349. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.cfg +3 -0
  350. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.tla +19 -0
  351. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/chart.mmd +26 -0
  352. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/graph.dot +22 -0
  353. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/report.md +12 -0
  354. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/sany.out +2 -0
  355. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.exit +1 -0
  356. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.out +58 -0
  357. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-2.out +57 -0
  358. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/ChartRun.out +57 -0
  359. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.cfg +2 -0
  360. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.tla +11 -0
  361. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/chart.mmd +17 -0
  362. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/graph.dot +15 -0
  363. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/report.md +14 -0
  364. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/sany.out +2 -0
  365. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.exit +1 -0
  366. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.out +76 -0
  367. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/ChartRun.out +59 -0
  368. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.cfg +3 -0
  369. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.tla +11 -0
  370. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/chart.mmd +19 -0
  371. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/graph.dot +10 -0
  372. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/report.md +15 -0
  373. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/sany.out +2 -0
  374. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.exit +1 -0
  375. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.out +56 -0
  376. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.exit +1 -0
  377. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.out +67 -0
  378. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/ChartRun.out +62 -0
  379. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.cfg +6 -0
  380. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.tla +24 -0
  381. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/Moves.tla +5 -0
  382. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/chart.mmd +22 -0
  383. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/graph.dot +10 -0
  384. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/report.md +23 -0
  385. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/sany.out +3 -0
  386. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.exit +1 -0
  387. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.out +58 -0
  388. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.exit +1 -0
  389. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.out +66 -0
  390. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.exit +1 -0
  391. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.out +74 -0
  392. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-4.out +59 -0
  393. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/ChartRun.out +58 -0
  394. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.cfg +3 -0
  395. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.tla +15 -0
  396. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/chart.mmd +18 -0
  397. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/graph.dot +13 -0
  398. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/report.md +11 -0
  399. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/sany.out +2 -0
  400. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.exit +1 -0
  401. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.out +33 -0
  402. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-2.out +57 -0
  403. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/ChartRun.out +57 -0
  404. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.cfg +3 -0
  405. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.tla +15 -0
  406. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/chart.mmd +7 -0
  407. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/graph.dot +13 -0
  408. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/report.md +6 -0
  409. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/sany.out +2 -0
  410. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/verdict-1.out +49 -0
  411. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/ChartRun.out +61 -0
  412. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.cfg +4 -0
  413. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.tla +14 -0
  414. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/chart.mmd +30 -0
  415. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/graph.dot +19 -0
  416. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/report.md +27 -0
  417. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/sany.out +2 -0
  418. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.exit +1 -0
  419. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.out +56 -0
  420. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.exit +1 -0
  421. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.out +64 -0
  422. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.exit +1 -0
  423. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.out +87 -0
  424. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-4.out +57 -0
  425. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/ChartRun.out +60 -0
  426. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.cfg +3 -0
  427. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.tla +12 -0
  428. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/chart.mmd +23 -0
  429. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/graph.dot +19 -0
  430. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/report.md +11 -0
  431. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/sany.out +2 -0
  432. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.exit +1 -0
  433. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.out +56 -0
  434. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-2.out +57 -0
  435. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/ChartRun.out +61 -0
  436. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/CounterView.cfg +4 -0
  437. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/CounterView.tla +14 -0
  438. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/chart.mmd +23 -0
  439. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/graph.dot +19 -0
  440. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/report.md +27 -0
  441. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/sany.out +2 -0
  442. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-1.exit +1 -0
  443. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-1.out +56 -0
  444. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-2.exit +1 -0
  445. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-2.out +64 -0
  446. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-3.exit +1 -0
  447. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-3.out +87 -0
  448. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-4.out +57 -0
  449. package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/view.mjs +1 -0
  450. package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/ChartRun.out +59 -0
  451. package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/DieHard.cfg +4 -0
  452. package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/DieHard.tla +38 -0
  453. package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/chart.mmd +92 -0
  454. package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/graph.dot +126 -0
  455. package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/report.md +17 -0
  456. package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/sany.out +2 -0
  457. package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-1.exit +1 -0
  458. package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-1.out +91 -0
  459. package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-2.out +57 -0
  460. package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/ChartRun.out +61 -0
  461. package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.cfg +6 -0
  462. package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.tla +11 -0
  463. package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/chart.mmd +22 -0
  464. package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/graph.dot +16 -0
  465. package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/report.md +25 -0
  466. package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/sany.out +2 -0
  467. package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.exit +1 -0
  468. package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.out +56 -0
  469. package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.exit +1 -0
  470. package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.out +64 -0
  471. package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.exit +1 -0
  472. package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.out +64 -0
  473. package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.exit +1 -0
  474. package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.out +77 -0
  475. package/plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/ChartRun.out +57 -0
  476. package/plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.cfg +4 -0
  477. package/plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.tla +11 -0
  478. package/plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/chart.mmd +13 -0
  479. package/plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/graph.dot +12 -0
  480. package/plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/report.md +11 -0
  481. package/plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/sany.out +2 -0
  482. package/plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.exit +1 -0
  483. package/plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.out +72 -0
  484. package/plugins/pstack/skills/statechart/scripts/test/corpus/Login/ChartRun.out +57 -0
  485. package/plugins/pstack/skills/statechart/scripts/test/corpus/Login/Login.cfg +3 -0
  486. package/plugins/pstack/skills/statechart/scripts/test/corpus/Login/Login.tla +62 -0
  487. package/plugins/pstack/skills/statechart/scripts/test/corpus/Login/chart.mmd +27 -0
  488. package/plugins/pstack/skills/statechart/scripts/test/corpus/Login/graph.dot +40 -0
  489. package/plugins/pstack/skills/statechart/scripts/test/corpus/Login/report.md +7 -0
  490. package/plugins/pstack/skills/statechart/scripts/test/corpus/Login/sany.out +1 -0
  491. package/plugins/pstack/skills/statechart/scripts/test/corpus/Login/verdict-1.out +47 -0
  492. package/plugins/pstack/skills/statechart/scripts/test/corpus/Login/view.mjs +1 -0
  493. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/ChartRun.out +57 -0
  494. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.cfg +2 -0
  495. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.tla +64 -0
  496. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/chart.mmd +28 -0
  497. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/graph.dot +37 -0
  498. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/report.md +8 -0
  499. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/sany.out +1 -0
  500. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/verdict-1.out +47 -0
  501. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/view.mjs +1 -0
  502. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/ChartRun.out +60 -0
  503. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.cfg +3 -0
  504. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.tla +64 -0
  505. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/chart.mmd +44 -0
  506. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/graph.dot +58 -0
  507. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/report.md +17 -0
  508. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/sany.out +1 -0
  509. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.exit +1 -0
  510. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.out +83 -0
  511. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-2.out +57 -0
  512. package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/view.mjs +1 -0
  513. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/ChartRun.out +60 -0
  514. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.cfg +3 -0
  515. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.tla +103 -0
  516. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/chart.mmd +43 -0
  517. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/graph.dot +93 -0
  518. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/report.md +14 -0
  519. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/sany.out +1 -0
  520. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.exit +1 -0
  521. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.out +59 -0
  522. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-2.out +72 -0
  523. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/view.mjs +3 -0
  524. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/ChartRun.out +57 -0
  525. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.cfg +2 -0
  526. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.tla +100 -0
  527. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/chart.mmd +31 -0
  528. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/graph.dot +85 -0
  529. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/report.md +9 -0
  530. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/sany.out +1 -0
  531. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/verdict-1.out +47 -0
  532. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/view.mjs +3 -0
  533. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/ChartRun.out +59 -0
  534. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayer.tla +103 -0
  535. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.cfg +3 -0
  536. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.tla +6 -0
  537. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/chart.mmd +42 -0
  538. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/graph.dot +93 -0
  539. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/report.md +19 -0
  540. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/sany.out +2 -0
  541. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.exit +1 -0
  542. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.out +61 -0
  543. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-2.out +59 -0
  544. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-3.out +61 -0
  545. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.exit +1 -0
  546. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.out +66 -0
  547. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.exit +1 -0
  548. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.out +58 -0
  549. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-6.out +49 -0
  550. package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/view.mjs +3 -0
  551. package/plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/ChartRun.out +57 -0
  552. package/plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.cfg +6 -0
  553. package/plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.tla +11 -0
  554. package/plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/chart.mmd +5 -0
  555. package/plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/graph.dot +11 -0
  556. package/plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/report.md +7 -0
  557. package/plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/sany.out +5 -0
  558. package/plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/verdict-1.out +70 -0
  559. package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/ChartRun.out +61 -0
  560. package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/Shadow.cfg +4 -0
  561. package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/Shadow.tla +11 -0
  562. package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/ShadowLib.tla +6 -0
  563. package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/ShadowSub.tla +3 -0
  564. package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/chart.mmd +9 -0
  565. package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/graph.dot +16 -0
  566. package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/report.md +8 -0
  567. package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/sany.out +4 -0
  568. package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/verdict-1.out +65 -0
  569. package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/ChartRun.out +59 -0
  570. package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.cfg +2 -0
  571. package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.tla +9 -0
  572. package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/chart.mmd +23 -0
  573. package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/graph.dot +17 -0
  574. package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/report.md +15 -0
  575. package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/sany.out +1 -0
  576. package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.exit +1 -0
  577. package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.out +65 -0
  578. package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.exit +1 -0
  579. package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.out +75 -0
  580. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/ChartRun.out +69 -0
  581. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.cfg +3 -0
  582. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.tla +75 -0
  583. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/chart.mmd +60 -0
  584. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/graph.dot +297 -0
  585. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/report.md +20 -0
  586. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/sany.out +1 -0
  587. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.exit +1 -0
  588. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.out +95 -0
  589. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-2.out +57 -0
  590. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/view.mjs +1 -0
  591. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/ChartRun.out +57 -0
  592. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.cfg +3 -0
  593. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.tla +75 -0
  594. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/chart.mmd +37 -0
  595. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/graph.dot +223 -0
  596. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/report.md +11 -0
  597. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/sany.out +1 -0
  598. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/verdict-1.out +47 -0
  599. package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/view.mjs +1 -0
  600. package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.exit +1 -0
  601. package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.out +75 -0
  602. package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.cfg +5 -0
  603. package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.tla +11 -0
  604. package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/chart.mmd +18 -0
  605. package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/graph.dot +14 -0
  606. package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/report.md +29 -0
  607. package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/sany.out +2 -0
  608. package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.exit +1 -0
  609. package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.out +64 -0
  610. package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.exit +1 -0
  611. package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.out +75 -0
  612. package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/ChartRun.out +58 -0
  613. package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.cfg +2 -0
  614. package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.tla +8 -0
  615. package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/chart.mmd +22 -0
  616. package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/graph.dot +16 -0
  617. package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/report.md +15 -0
  618. package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/sany.out +2 -0
  619. package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.exit +1 -0
  620. package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.out +56 -0
  621. package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.exit +1 -0
  622. package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.out +77 -0
  623. package/plugins/pstack/skills/statechart/scripts/test/corpus.test.ts +415 -0
  624. package/plugins/pstack/skills/statechart/scripts/test/differential.test.ts +565 -0
  625. package/plugins/pstack/skills/statechart/scripts/test/grid/Grid.cfg +2 -0
  626. package/plugins/pstack/skills/statechart/scripts/test/grid/Grid.tla +9 -0
  627. package/plugins/pstack/skills/statechart/scripts/test/grid/sany.out +2 -0
  628. package/plugins/pstack/skills/statechart/scripts/test/java.ts +63 -0
  629. package/plugins/pstack/skills/statechart/scripts/test/labels.ts +643 -0
  630. package/plugins/pstack/skills/statechart/scripts/test/messages.test.ts +227 -0
  631. package/plugins/pstack/skills/statechart/scripts/test/pipeline.test.ts +270 -0
  632. package/plugins/pstack/skills/statechart/scripts/test/plain-tlc.test.ts +255 -0
  633. package/plugins/pstack/skills/statechart/scripts/test/render.test.ts +81 -0
  634. package/plugins/pstack/skills/statechart/scripts/test/tlc-out.test.ts +90 -0
  635. package/plugins/pstack/skills/statechart/scripts/test/tlc.ts +158 -0
  636. package/plugins/pstack/skills/statechart/scripts/tsconfig.json +11 -0
  637. package/plugins/pstack/skills/statechart/scripts/worker.ts +35 -0
  638. package/plugins/pstack/skills/swarm/SKILL.md +58 -0
  639. package/plugins/pstack/skills/tdd/SKILL.md +41 -0
  640. package/plugins/pstack/skills/teach/SKILL.md +28 -0
  641. package/plugins/pstack/skills/technical-writing/SKILL.md +105 -0
  642. package/plugins/pstack/skills/thermo-nuclear-code-quality-review/SKILL.md +201 -0
  643. package/plugins/pstack/skills/thermo-nuclear-review/SKILL.md +50 -0
  644. package/plugins/pstack/skills/thermos/SKILL.md +40 -0
  645. package/plugins/pstack/skills/typescript-best-practices/SKILL.md +32 -0
  646. package/plugins/pstack/skills/typescript-best-practices/references/patterns.md +328 -0
  647. package/plugins/pstack/skills/unslop/SKILL.md +61 -0
  648. package/plugins/pstack/skills/what-did-i-get-done/SKILL.md +31 -0
  649. package/plugins/pstack/skills/why/SKILL.md +116 -0
  650. package/plugins/pstack/skills/why/references/epistemics.md +79 -0
  651. package/plugins/pstack/skills/why/references/investigator-prompt.md +86 -0
  652. package/plugins/pstack/skills/why/references/source-playbook.md +17 -0
  653. package/plugins/pstack/skills/why/references/sources/code-archaeology.md +51 -0
  654. package/plugins/pstack/skills/why/references/sources/databricks.md +70 -0
  655. package/plugins/pstack/skills/why/references/sources/datadog.md +97 -0
  656. package/plugins/pstack/skills/why/references/sources/incident-postmortem.md +5 -0
  657. package/plugins/pstack/skills/why/references/sources/linear.md +48 -0
  658. package/plugins/pstack/skills/why/references/sources/notion.md +55 -0
  659. package/plugins/pstack/skills/why/references/sources/sentry.md +66 -0
  660. package/plugins/pstack/skills/why/references/sources/slack.md +17 -0
  661. package/plugins/pstack/skills/why/references/synthesizer-prompt.md +130 -0
  662. package/tools/forks.json +398 -0
  663. package/tools/substitutions.json +646 -0
  664. package/tools/upstream.json +53 -0
@@ -0,0 +1,121 @@
1
+ #!/usr/bin/env node
2
+ // Print Claude Code's transcripts directory for this session.
3
+ //
4
+ // node claude-project-dir.mjs [workspace]
5
+ //
6
+ // The directory is <config>/projects/<name>, where <config> is
7
+ // $CLAUDE_CONFIG_DIR or ~/.claude. Claude Code sets $CLAUDE_CODE_SESSION_ID in
8
+ // its shell, so the directory holding <id>.jsonl or <id>/<id>.jsonl is this
9
+ // session's, wherever the shell has moved since; only names are read. With a
10
+ // workspace argument, or without a session id, <name> is derived from the
11
+ // workspace, the current directory by default, which must be the directory the
12
+ // session started in. Claude Code
13
+ // derives <name> from that path by turning every character other than an ASCII
14
+ // letter or digit into "-". A name longer than 200 characters keeps its first 200 and gains "-"
15
+ // and a base-36 hash of the path. $CLAUDE_CODE_PROJECT_DIR_NAME replaces <name>
16
+ // when $CLAUDE_CONFIG_DIR is set too and the name is 1 to 64 letters, digits,
17
+ // "_" or "-" other than a Windows reserved device name. If the derived
18
+ // directory is missing, the one directory that shares the first 200 characters
19
+ // is taken instead, so a hash that changes in a later Claude Code release still
20
+ // resolves. Exits 1 when no directory exists.
21
+ import { existsSync, readdirSync, realpathSync } from "node:fs";
22
+ import { homedir } from "node:os";
23
+ import { join, resolve } from "node:path";
24
+ import process from "node:process";
25
+ import { fileURLToPath } from "node:url";
26
+
27
+ const MAX_NAME = 200;
28
+ // The names Claude Code 2.1.296 accepts from CLAUDE_CODE_PROJECT_DIR_NAME.
29
+ const CHOSEN_NAME = /^[A-Za-z0-9_-]{1,64}$/;
30
+ const RESERVED_NAME = /^(?:con|prn|aux|nul|com[0-9]|lpt[0-9])$/i;
31
+ // A session id names a file, so it never holds a path separator or "..".
32
+ const SESSION_ID = /^[A-Za-z0-9-]+$/;
33
+
34
+ // Claude Code 2.1.296's string hash, a 32-bit Java-style hash.
35
+ function hash(text) {
36
+ let h = 0;
37
+ for (let i = 0; i < text.length; i++) h = ((h << 5) - h + text.charCodeAt(i)) | 0;
38
+ return h;
39
+ }
40
+
41
+ export function projectDirName(workspace) {
42
+ const name = workspace.replace(/[^a-zA-Z0-9]/g, "-");
43
+ if (name.length <= MAX_NAME) return name;
44
+ return `${name.slice(0, MAX_NAME)}-${Math.abs(hash(workspace)).toString(36)}`;
45
+ }
46
+
47
+ function sessionDir(projects, sessionId) {
48
+ if (!sessionId || !SESSION_ID.test(sessionId) || !existsSync(projects)) return null;
49
+ const dirs = readdirSync(projects, { withFileTypes: true })
50
+ .filter((entry) => entry.isDirectory())
51
+ .map((entry) => join(projects, entry.name));
52
+ // A bare <id>/ is not enough: Claude Code's Workflow tool creates one under
53
+ // the shell's current project, which may be another project.
54
+ const transcript = (dir) =>
55
+ existsSync(join(dir, `${sessionId}.jsonl`)) || existsSync(join(dir, sessionId, `${sessionId}.jsonl`));
56
+ return dirs.find(transcript) ?? null;
57
+ }
58
+
59
+ export function projectDir(
60
+ workspace,
61
+ {
62
+ config = process.env.CLAUDE_CONFIG_DIR,
63
+ home = process.env.HOME,
64
+ sessionId = process.env.CLAUDE_CODE_SESSION_ID,
65
+ chosenName = process.env.CLAUDE_CODE_PROJECT_DIR_NAME,
66
+ } = {},
67
+ ) {
68
+ const projects = join(config || join(home || homedir(), ".claude"), "projects");
69
+ const session = sessionDir(projects, sessionId);
70
+ if (session) return session;
71
+ const chosen = config ? chosenName : undefined;
72
+ const valid = chosen && CHOSEN_NAME.test(chosen) && !RESERVED_NAME.test(chosen);
73
+ const name = valid ? chosen : projectDirName(workspace);
74
+ const derived = join(projects, name);
75
+ if (existsSync(derived)) return derived;
76
+ if (name.length <= MAX_NAME) return null;
77
+ const prefix = `${name.slice(0, MAX_NAME)}-`;
78
+ const matches = existsSync(projects) ? readdirSync(projects).filter((entry) => entry.startsWith(prefix)) : [];
79
+ return matches.length === 1 ? join(projects, matches[0]) : null;
80
+ }
81
+
82
+ // Claude Code names a session by its start directory's real path, and keeps the
83
+ // path as given when that directory has since been removed.
84
+ function resolvedPath(path) {
85
+ try {
86
+ return realpathSync(path);
87
+ } catch (error) {
88
+ if (error.code !== "ENOENT") throw error;
89
+ return resolve(path);
90
+ }
91
+ }
92
+
93
+ function main(argv) {
94
+ if (argv.length > 1) {
95
+ console.error("usage: claude-project-dir.mjs [workspace]");
96
+ return 2;
97
+ }
98
+ const workspace = argv[0] ? resolvedPath(argv[0]) : process.cwd();
99
+ // A directory argument asks for that workspace's sessions, not this session's.
100
+ const dir = projectDir(workspace, argv[0] ? { sessionId: null, chosenName: null } : {});
101
+ if (!dir) {
102
+ console.error(`no Claude Code transcripts directory for ${workspace}`);
103
+ return 1;
104
+ }
105
+ console.log(dir);
106
+ return 0;
107
+ }
108
+
109
+ // node leaves argv[1] unresolved and may set it to a non-file (`node -e ... arg`).
110
+ function invokedDirectly() {
111
+ if (!process.argv[1]) return false;
112
+ try {
113
+ return fileURLToPath(import.meta.url) === realpathSync(process.argv[1]);
114
+ } catch {
115
+ return false;
116
+ }
117
+ }
118
+
119
+ if (invokedDirectly()) {
120
+ process.exitCode = main(process.argv.slice(2));
121
+ }
@@ -0,0 +1,218 @@
1
+ #!/usr/bin/env node
2
+ // Locate the transcript whose opening user prompt carries a fragment.
3
+ //
4
+ // node find-transcript.mjs <transcripts-dir> <opening-prompt-fragment> [workspace]
5
+ //
6
+ // Prints the newest matching path, or exits 1 with "no transcript". Covers
7
+ // Claude Code's three layouts under one per-project directory (flat
8
+ // <id>.jsonl, nested <id>/<id>.jsonl, subagent <id>/subagents/<child>.jsonl)
9
+ // Pi's <iso>_<id>.jsonl under its per-cwd sessions directory, and GitHub
10
+ // Copilot's <id>/events.jsonl under its session-state directory, told apart by
11
+ // Pi's session header line and Copilot's session.start event. Each candidate is
12
+ // streamed line by line; a Claude Code or Copilot transcript is abandoned at its
13
+ // first typed user record. Copilot searches compare the session header's cwd
14
+ // with the workspace (the current directory by default) before reading user
15
+ // messages. A Pi session is read to its last entry to find
16
+ // the active branch. A Codex rollout is refused by name rather than read as an
17
+ // empty Claude transcript.
18
+ import { createReadStream, readdirSync, realpathSync, statSync } from "node:fs";
19
+ import { isAbsolute, join } from "node:path";
20
+ import process from "node:process";
21
+ import { fileURLToPath } from "node:url";
22
+
23
+ // readline also breaks on U+2028 and U+2029, which JSON leaves unescaped.
24
+ async function* jsonlLines(stream) {
25
+ let rest = "";
26
+ for await (const chunk of stream) {
27
+ const parts = (rest + chunk).split("\n");
28
+ rest = parts.pop();
29
+ yield* parts;
30
+ }
31
+ if (rest) yield rest;
32
+ }
33
+
34
+ // Session cleanup can delete a transcript or its session directory while a
35
+ // search runs. Anything under the root that vanishes after it was listed is
36
+ // skipped; a missing root still throws.
37
+ export function rethrowUnlessRemoved(error) {
38
+ if (error.code !== "ENOENT") throw error;
39
+ }
40
+
41
+ export function candidates(projectsDir, maxDepth = 2) {
42
+ const files = [];
43
+ const walk = (dir, depth) => {
44
+ for (const entry of readdirSync(dir, { withFileTypes: true })) {
45
+ const full = join(dir, entry.name);
46
+ if (entry.isFile() && entry.name.endsWith(".jsonl")) files.push(full);
47
+ else if (entry.isDirectory() && depth < maxDepth) {
48
+ try {
49
+ walk(full, depth + 1);
50
+ } catch (error) {
51
+ rethrowUnlessRemoved(error);
52
+ }
53
+ }
54
+ }
55
+ };
56
+ walk(projectsDir, 0);
57
+ return files
58
+ .flatMap((path) => {
59
+ const stat = statSync(path, { throwIfNoEntry: false });
60
+ return stat ? [{ path, mtime: stat.mtimeMs }] : [];
61
+ })
62
+ .sort((a, b) => b.mtime - a.mtime);
63
+ }
64
+
65
+ function text(content) {
66
+ if (typeof content === "string") return content;
67
+ if (Array.isArray(content)) {
68
+ return content
69
+ .filter((block) => typeof block?.text === "string")
70
+ .map((block) => block.text)
71
+ .join("\n");
72
+ }
73
+ return null;
74
+ }
75
+
76
+ // `user` records Claude Code writes for a local command (/clear, !cmd) and its
77
+ // output, not a prompt the user typed. A skill invocation leads with
78
+ // <command-message> and is kept: its <command-args> carry what the user typed.
79
+ const LOCAL_COMMAND = /^\s*<(?:command-name|local-command-stdout|bash-input)>/u;
80
+
81
+ // A Pi session opens with this header line; Claude Code transcripts never do.
82
+ const isPiHeader = (record) =>
83
+ record?.type === "session" && Number.isInteger(record.version) && typeof record.cwd === "string";
84
+ // A Codex rollout opens with its session metadata.
85
+ const isCodexHeader = (record) => record?.type === "session_meta";
86
+
87
+ // A Copilot events.jsonl opens with this event and records each prompt the
88
+ // user typed as a `user.message` event.
89
+ const isCopilotHeader = (record) => record?.type === "session.start" && typeof record.data === "object";
90
+
91
+ async function copilotOpening(head, records, workspace) {
92
+ if (workspace !== undefined) {
93
+ const cwd = head.data?.context?.cwd;
94
+ if (typeof cwd !== "string" || !isAbsolute(cwd)) return null;
95
+ try {
96
+ if (realpathSync(cwd) !== realpathSync(workspace)) return null;
97
+ } catch {
98
+ // A removed or inaccessible workspace cannot identify this session.
99
+ return null;
100
+ }
101
+ }
102
+ for await (const record of records) {
103
+ if (record?.type !== "user.message") continue;
104
+ const prompt = text(record.data?.content);
105
+ if (prompt) return prompt;
106
+ }
107
+ return null;
108
+ }
109
+
110
+ async function* parsed(lines) {
111
+ for await (const line of lines) {
112
+ try {
113
+ yield JSON.parse(line);
114
+ } catch {}
115
+ }
116
+ }
117
+
118
+ async function* prepend(head, rest) {
119
+ yield head;
120
+ yield* rest;
121
+ }
122
+
123
+ // A Claude Code transcript opens with the first prompt the user typed.
124
+ async function claudeOpening(records) {
125
+ for await (const record of records) {
126
+ if (record?.type !== "user" || record.isMeta) continue;
127
+ const prompt = text(record.message?.content);
128
+ if (prompt && !LOCAL_COMMAND.test(prompt)) return prompt;
129
+ }
130
+ return null;
131
+ }
132
+
133
+ // Pi branches in place: every entry is appended to one file and linked to its
134
+ // parent by id, and the last entry is the current leaf. The opening prompt is
135
+ // the first user message on the path from that leaf to its root, which may not
136
+ // be the first one in file order.
137
+ async function piOpening(records) {
138
+ const entries = new Map();
139
+ let leaf = null;
140
+ for await (const record of records) {
141
+ if (typeof record?.id !== "string") continue;
142
+ const isUser = record.type === "message" && record.message?.role === "user";
143
+ entries.set(record.id, { parentId: record.parentId ?? null, prompt: isUser ? text(record.message.content) || null : null });
144
+ leaf = record.id;
145
+ }
146
+ let prompt = null;
147
+ const seen = new Set();
148
+ for (let id = leaf; entries.has(id) && !seen.has(id); id = entries.get(id).parentId) {
149
+ seen.add(id);
150
+ prompt = entries.get(id).prompt ?? prompt;
151
+ }
152
+ return prompt;
153
+ }
154
+
155
+ // Readers by opening record. Claude Code writes no header, so its row is last
156
+ // and takes every file the others do not claim.
157
+ const READERS = [
158
+ [isPiHeader, (head, rest) => piOpening(rest)],
159
+ [isCopilotHeader, (head, rest, path, workspace) => copilotOpening(head, rest, workspace)],
160
+ [isCodexHeader, (head, rest, path) => {
161
+ throw new Error(`${path} is a Codex rollout, which find-transcript does not read; pass the session digest instead`);
162
+ }],
163
+ [() => true, (head, rest) => claudeOpening(prepend(head, rest))],
164
+ ];
165
+
166
+ export async function openingPrompt(path, workspace) {
167
+ const stream = createReadStream(path, { encoding: "utf8" });
168
+ try {
169
+ const records = parsed(jsonlLines(stream));
170
+ const { value: head, done } = await records.next();
171
+ if (done) return null;
172
+ const [, read] = READERS.find(([matches]) => matches(head));
173
+ return await read(head, records, path, workspace);
174
+ } finally {
175
+ stream.destroy();
176
+ }
177
+ }
178
+
179
+ export async function findTranscript(projectsDir, fragment, workspace = process.cwd()) {
180
+ for (const { path } of candidates(projectsDir)) {
181
+ try {
182
+ const prompt = await openingPrompt(path, workspace);
183
+ if (prompt?.includes(fragment)) return path;
184
+ } catch (error) {
185
+ rethrowUnlessRemoved(error);
186
+ }
187
+ }
188
+ return null;
189
+ }
190
+
191
+ async function main(argv) {
192
+ const [projectsDir, fragment, workspace] = argv;
193
+ if (!projectsDir || !fragment || argv.length > 3) {
194
+ console.error("usage: find-transcript.mjs <transcripts-dir> <opening-prompt-fragment> [workspace]");
195
+ return 2;
196
+ }
197
+ const path = await findTranscript(projectsDir, fragment, workspace);
198
+ if (!path) {
199
+ console.error(`no transcript under ${projectsDir} opens with ${JSON.stringify(fragment)}`);
200
+ return 1;
201
+ }
202
+ console.log(path);
203
+ return 0;
204
+ }
205
+
206
+ // node leaves argv[1] unresolved and may set it to a non-file (`node -e ... arg`).
207
+ function invokedDirectly() {
208
+ if (!process.argv[1]) return false;
209
+ try {
210
+ return fileURLToPath(import.meta.url) === realpathSync(process.argv[1]);
211
+ } catch {
212
+ return false;
213
+ }
214
+ }
215
+
216
+ if (invokedDirectly()) {
217
+ process.exitCode = await main(process.argv.slice(2));
218
+ }
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: setup-pstack
3
+ description: Configure which models pstack uses per role. Detects available models and writes the current runtime's override sheet. Use for /setup-pstack, "configure pstack models", changing pstack's model choices, or turning the SessionStart hook on or off.
4
+ ---
5
+
6
+ # Setup pstack
7
+
8
+ On Codex, read the [platform mapping](../poteto-mode/references/codex-tools.md), including its per-skill notes, before following this skill.
9
+
10
+ On GitHub Copilot, read the [platform mapping](../poteto-mode/references/copilot-tools.md), including its per-skill notes, before following this skill.
11
+
12
+ On Muse, read the [platform mapping](../poteto-mode/references/muse-tools.md), including its per-skill notes, before following this skill.
13
+
14
+ On Antigravity, read the [platform mapping](../poteto-mode/references/agy-tools.md), including its per-skill notes, before following this skill.
15
+
16
+ Write the current runtime's per-role model override sheet. Each pstack skill names a default model inline; the override sheet adapts those defaults to the models you actually have access to.
17
+
18
+ On any runtime other than Claude Code, read [Other runtimes](references/runtimes.md) first. Its table gives the sheet path, how the sheet loads, and how to list models, and your runtime's section says which steps change. The rest of this file describes Claude Code.
19
+
20
+ On Claude Code the config directory is `$CLAUDE_CONFIG_DIR` when that variable is set and `~/.claude` otherwise. This skill calls it `<config>`, and the sheet is `<config>/pstack-models.md`. Claude Code has no auto-applied "rules" mechanism like Cursor's `.mdc`, so inclusion is explicit: the user adds a line to `<config>/CLAUDE.md` (or their project `CLAUDE.md`) such as:
21
+
22
+ ```text
23
+ @<config>/pstack-models.md
24
+ ```
25
+
26
+ with `<config>` written as the resolved path, so the file is loaded as context for every session.
27
+
28
+ ## Steps
29
+
30
+ ### 1. Detect available models
31
+
32
+ Enumerate the model names the `Agent` tool's `model` parameter accepts in this session. That is the dependable source. On Claude Code they are the family names listed in [Models](#models) below, each running that family's current model, and a full model ID is rejected. The default panel is listed there too. The panel is chosen for cross-family diversity. Ask the user to confirm or paste any additional slugs they want available. Never write a real slug you have not confirmed is available. The aliases `inherit-parent` and `auto` are always valid even though they are not detected slugs. Both mean the role runs on the parent session's model, which the `Agent` call expresses by omitting `model`.
33
+
34
+ ### 2. Load current state
35
+
36
+ The default role-to-model mapping is the rule shape shown in the Write the override sheet step below. If the current runtime's sheet already exists, read it and treat its values as the current choices. Otherwise start from those defaults. A line whose role is not in that shape, such as `how critics`, is from a retired role. Drop it. An older sheet may name full model IDs that start with `claude-`, which the `Agent` tool rejects. Replace each with its family name, the word after `claude-`.
37
+
38
+ ### 3. Map and confirm
39
+
40
+ Show every role with its current model, marking any real slug not in the detected set as needing a choice. Also list each line step 2 dropped or rewrote. Ask whether to accept as-is or change specific roles, offering the detected models plus `inherit-parent` and `auto` as the options. Prefer `AskUserQuestion` over free text. For panel roles (arena runners, architect runners, interrogate reviewers) the value is a list, and one subagent runs per entry, alias entries included, so the list length sets the count. `arena cross-judge pool` is also a list, but Arena runs one judge. It tries only values from a family other than the parent's, in list order, so order it by preference. An `inherit-parent` or `auto` value never judges. `swarm workers` is the default model for every worker unless a race or comparison assigns another model per arm.
41
+
42
+ Then ask for the default reasoning effort, the `default effort` line. It is `session`, which keeps the parent session's effort, or one of the levels in [Models](#models). Start from the default listed there. Every role value without a suffix runs at it. Then ask whether any role should run at another level. A role value may carry one after its slug, as in `<slug> @xhigh`; panel entries take their own, as in `<slug> @xhigh, <slug> @max`. Each level is passed as the dispatch's effort, so the choice holds without changing the session. Leave the suffix off for the default effort.
43
+
44
+ ### 4. Choose whether the session hook routes tasks
45
+
46
+ On Claude Code, the plugin's `SessionStart` hook injects the poteto-mode mandate on startup, resume, clear, and compact. Ask whether to keep the hook. The default is on. The answer is the `session hook` line in the current runtime's sheet: `on` or `off`. With no sheet or no line, the hook injects. The line is inert on other runtimes without a pstack routing hook.
47
+
48
+ ### 5. Validate
49
+
50
+ Every real slug written must be in the detected set. `inherit-parent` and `auto` always pass. Validate the slug without any `@<level>` suffix, and the level against the effort levels in [Models](#models). The `default effort` value is one of those levels or `session`. If a chosen real slug or level is not available, stop and ask again.
51
+
52
+ ### 6. Write the override sheet
53
+
54
+ Write the current runtime's sheet with the shape below. Overwrite the whole file so re-runs stay idempotent.
55
+
56
+ ```markdown
57
+ # pstack model configuration
58
+
59
+ Per-role model overrides for pstack skills. Each pstack SKILL.md names its defaults in a Models section; the values here override those defaults. Delete a line to fall back to the skill default. A value of `inherit-parent` or `auto` runs that role on the parent session's model (the `Agent` call omits `model`); an alias entry in a panel list still counts toward that panel's fan-out. A model may carry a reasoning effort, as in `opus @xhigh` (levels: low, medium, high, xhigh, max); the role's subagent then runs at that level, each entry of a panel list on its own. `default effort` sets the level for a value without one; `session` uses the runtime's platform mapping to start from the parent session's effort. On Codex this requires active-turn metadata or an explicit effort choice. `session hook: off` stops the supported runtime's pstack routing hook from injecting the poteto-mode mandate; any other value, or no line, leaves it on.
60
+
61
+ feature, refactoring: sonnet
62
+ bug-fix: opus
63
+ perf-issue: opus
64
+ hillclimb: opus
65
+ judgment and prose: opus
66
+ strongest judgment: fable
67
+ how explorer: opus
68
+ how explainer: opus
69
+ why investigators: opus
70
+ why synthesizer: opus
71
+ reflect tooling: opus
72
+ reflect judgment, divergent, synthesizer: opus
73
+ arena runners: opus, fable, sonnet, haiku
74
+ arena cross-judge pool: opus, fable, sonnet, haiku
75
+ swarm workers: opus
76
+ architect runners: opus, fable, sonnet, haiku
77
+ interrogate reviewers: opus, fable, sonnet, haiku
78
+ thermos reviewers: opus
79
+ no-comments reviewer: opus
80
+
81
+ default effort: session
82
+ session hook: on
83
+ ```
84
+
85
+ ### 7. Wire it in
86
+
87
+ On Claude Code, if `<config>/CLAUDE.md` does not already include `<config>/pstack-models.md`, append an `@` line naming the sheet's resolved path, such as `@~/.claude/pstack-models.md`, so the model rows load on every session. If the user prefers project scope, add the include to the project's `CLAUDE.md` instead.
88
+
89
+ ### 8. Confirm
90
+
91
+ Tell the user where the override was written, how its model rows load, and whether the plugin hook is on. Re-running this skill updates the override sheet.
92
+
93
+ ### 9. Offer a verification skill (optional)
94
+
95
+ Check whether the project has a way to drive the real app for proof (a project `verify` or `verify-*` skill, or an existing harness). If not, offer once: "want a project-local verification skill, so agents can drive the app the way a user does and prove changes work? I can generate one with /create-verification-skill." On yes, invoke [`/create-verification-skill`](../create-verification-skill/SKILL.md). On no, move on without pushing.
96
+
97
+ ### 10. Offer a formal verification skill (optional)
98
+
99
+ Check whether the project already has a formal verification skill (a project skill that runs a model checker, a proof, or another verifier against the code). If not, offer once: "want a formal verification skill, so agents can prove a key property of your code holds in every case in scope, not only the cases tests reach? I can generate one with /create-formal-verification-skill." On yes, invoke [`/create-formal-verification-skill`](../create-formal-verification-skill/SKILL.md). On no, move on without pushing.
100
+
101
+ ## Models
102
+
103
+ Stamped from `plugins/pstack/models.json` (edit there, rerun `tools/generate.mjs`).
104
+
105
+ - Available Claude models: `opus`, `fable`, `sonnet`, `haiku`
106
+ - Default panel: `opus`, `fable`, `sonnet`, `haiku`
107
+ - Reasoning effort levels: `low`, `medium`, `high`, `xhigh`, `max`
108
+ - Default reasoning effort: `session`
109
+ - Single-role default: `opus`
@@ -0,0 +1,88 @@
1
+ # Setup pstack on GitHub Copilot
2
+
3
+ On GitHub Copilot this file replaces the model, effort, and hook questions in steps 1, 3, and 4 of [setup-pstack](SKILL.md), the sheet header in step 6, and step 7. Steps 2, 5, 8, 9, and 10 still apply. pstack ships no Copilot model defaults, so every model in the sheet comes from the user's answers. Never pick a model the user has not chosen, and never write the Claude Code names in [Models](SKILL.md#models) or step 6's values into a Copilot sheet.
4
+
5
+ Run setup on a model at least as strong as gpt-5.4-mini or a Sonnet-class Claude model. On a Haiku-class model, setup picked models the user never chose in about half of the smoke runs.
6
+
7
+ ## Asking
8
+
9
+ Copilot's `ask_user` takes one question per call with a fixed choice list. That list is a `choices` list, or one `oneOf` string property of a `requestedSchema` where `ask_user` takes an elicitation form. Its UI adds a free-text option on its own. Treat it as single-select, because the Copilot app's `ask_user` has no multi-select. Ask every model question through `ask_user` with a `choices` list. Never ask for models as one open question, such as which roles should change and to what, and never bundle two questions into one call. Emulate multi-select with sequential single-select questions, as the panel slots below do.
10
+
11
+ - Do not propose, pre-select, or label any model `(Recommended)`. A first setup has no default to recommend.
12
+ - On a re-run, put step 2's saved value for the question first, labeled `(current)`. Picking it keeps that value.
13
+ - A typed answer counts only when it is a detected model ID or `inherit-parent`; otherwise ask the same question again.
14
+ - An answer the user already gave in the request counts. Ask only the questions it leaves open.
15
+ - When `ask_user` is not available (a `-p` run, or `--no-ask-user`) and a model question is still open, do not choose for the user and do not write the sheet. Tell the user to run `setup-pstack` in an interactive session, and run this session's roles as `inherit-parent`.
16
+
17
+ ## Current state
18
+
19
+ On Copilot, step 2's saved values are the role lines the plugin hook put in context. When the context says this Copilot home has no pstack model sheet yet, or that the sheet is invalid, there are none. Read the sheet only when none of these is in context, as in a skills-only install. Do not test for the sheet or its directory with `bash`. Each such command touches a path outside the workspace and asks for access. `${COPILOT_HOME:-~/.copilot}` exists whenever Copilot runs, so do not create it.
20
+
21
+ ## Sheet header
22
+
23
+ A Copilot sheet uses step 6's role lines and settings under this header in place of step 6's paragraph, because every role keeps a line and `check-sheet.sh` checks that:
24
+
25
+ ```markdown
26
+ # pstack model configuration
27
+
28
+ Per-role model choices for pstack skills on GitHub Copilot, written by setup-pstack. Every role keeps its line; rerun setup-pstack to change one. A value of `inherit-parent` or `auto` runs that role on the parent session's model (the `task` call omits `model`); an alias entry in a panel list still counts toward that panel's fan-out. A model may carry a reasoning effort, as in `gpt-5.5 @xhigh` (levels: low, medium, high, xhigh, max), which the `task` call passes as `reasoning_effort`. `default effort` sets the level for a value without one; `session` keeps the parent session's effort. `session hook: off` stops the SessionStart hook from injecting the poteto-mode mandate; any other value, or no line, leaves it on. `panel vendors: any` records that the user kept a panel whose models come from one vendor.
29
+ ```
30
+
31
+ ## Detect models
32
+
33
+ The detected set is the `model` enum of the `task` tool, with full IDs exactly as the enum lists them. Never shorten one to a family name. If this session has no `task` tool or its enum is not visible, write `inherit-parent` for every role, skip the model questions, and tell the user to rerun `setup-pstack` in a session with the `task` tool. The Claude Code names in [Models](SKILL.md#models) and the values in step 6's sheet shape are not Copilot model IDs; never write them into a Copilot sheet.
34
+
35
+ Group the detected IDs by vendor, from each ID's text before its first hyphen. `claude` is Claude, `gpt` is GPT, `gemini` is Gemini, `grok` is Grok, `kimi` is Kimi, and any other ID is Other. Keep the enum's order within a vendor.
36
+
37
+ ## Choosing one model
38
+
39
+ Each model question below picks one value in two `ask_user` calls, so no choices list holds the whole enum:
40
+
41
+ 1. **Vendor.** One choice per vendor with its model count, such as `GPT (12 models)`, then `inherit-parent (run on the session's model)`. A vendor with a single model shows that model's ID instead, and picking it ends the question.
42
+ 2. **Model.** That vendor's IDs, then `Back to vendors`.
43
+
44
+ When the detected set plus `inherit-parent` is 8 choices or fewer, skip the vendor step and list every ID in one question. `auto` means the same as `inherit-parent` in pstack, so it is not a separate choice; a saved `auto` shows as `auto (current)` on a re-run.
45
+
46
+ ## Roles by tier
47
+
48
+ Each tier question below writes every role in its row. The panel row's roles each take the whole panel list.
49
+
50
+ | Tier | Roles |
51
+ | --- | --- |
52
+ | Default | `bug-fix`, `perf-issue`, `hillclimb`, `judgment and prose`, `how explorer`, `how explainer`, `why investigators`, `why synthesizer`, `reflect tooling`, `reflect judgment, divergent, synthesizer`, `swarm workers`, `thermos reviewers`, `no-comments reviewer` |
53
+ | Strongest | `strongest judgment` |
54
+ | Worker | `feature, refactoring` |
55
+ | Panel | `arena runners`, `arena cross-judge pool`, `architect runners`, `interrogate reviewers` |
56
+
57
+ ## Question sequence
58
+
59
+ Ask in this order. Each model question is the vendor and model pair above; every other question is one `ask_user` call.
60
+
61
+ 0. **Session model.** "Run every pstack role on this session's model?" with `Yes, use the session's model for every role` and `No, choose models by tier`. This is for a plan that offers one model or only automatic selection, and for anyone who wants no per-role choices. On a re-run, put the choice that matches the saved sheet first, labeled `(current)`. Yes skips questions 1 through 7 and the model detection. Set every role line to `inherit-parent`, with three `inherit-parent` entries in each panel role. Ask questions 8 and 9, then say in step 8 that the panels' diversity is reduced and that panel entries can differ only by reasoning effort. This path needs no `panel vendors: any` line, because a panel of only `inherit-parent` needs no vendor check. No answers the questions below.
62
+ 1. **Default model.** "Default model: runs <the Default row's roles>." It writes every role in the Default row.
63
+ 2. **Worker model.** "Worker model: runs <the Worker row's roles>." It writes every role in the Worker row.
64
+ 3. **Strongest model.** "Strongest model: runs <the Strongest row's roles>." It writes every role in the Strongest row.
65
+ 4. **Panel model 1 of 3**, then **panel model 2 of 3**, then **panel model 3 of 3**, as three separate questions. "Panel model N of 3: panels run one subagent per model, and models from different vendors catch different mistakes." In slots 2 and 3, list the vendors not yet in the panel first, then the rest, then `inherit-parent`. Do not offer a model already in the panel.
66
+ 5. **More panel models.** "Add a 4th panel model?" with `Done` as the first choice and `Add a 4th` second. Adding asks one more slot the same way, then asks again for a 5th. Stop offering at 5 models.
67
+ 6. **Vendor check.** When the panel's model IDs, not counting `inherit-parent`, all come from one vendor and more than one vendor is detected, ask "The panel is single-vendor (Claude), so its cross-checks share blind spots." with `Pick the panel again` and `Keep it anyway`. Picking again returns to panel model 1. `Keep it anyway` writes the line `panel vendors: any` after the `session hook` line. When only one vendor is detected, skip this question, write `panel vendors: any`, and say in step 8 that the panel's diversity is reduced. A panel of only `inherit-parent` needs no check.
68
+ 7. **Overrides.** "Override any individual role?" with `No, write the sheet (Recommended)` first, then one choice per tier row, with the row's current value in its label, as `Strongest (<its model ID>)`. Picking a row asks which of its roles to change, then asks one model for that role as in [Choosing one model](#choosing-one-model), with its value first as `(current)`. A panel role asks its list's slots as in questions 4 through 6 instead. After each override, ask this question again, until the answer is `No, write the sheet`.
69
+ 8. **Session hook.** "Keep the session hook that routes tasks to poteto-mode?" with `On (default)` and `Off`. On a re-run, the saved value comes first as `(current)`.
70
+ 9. **Default effort.** "Default reasoning effort for pstack subagents?" with `session (keep the parent's effort)` first, then `low`, `medium`, `high`, `xhigh`, and `max`. It writes the `default effort` line. On a re-run, the saved value comes first as `(current)`. Ask no per-role effort; a saved `@<level>` suffix on a role value stays as written.
71
+
72
+ The panel from questions 4 through 6 writes every panel role, in slot order. On a re-run, the saved value for each tier question is the first role in its row, and for panel model N the Nth entry of the first panel role. A role whose saved value differs from its question's saved value keeps it, and question 6 shows it.
73
+
74
+ ## Write and check
75
+
76
+ Validate as step 5 describes. Copilot's file tools expand neither `~` nor variables, so print the sheet's absolute path with `echo "${COPILOT_HOME:-$HOME/.copilot}/pstack-models.md"` in `bash`, and write the whole sheet to exactly that path in one tool call, so the write asks for path access at most once.
77
+
78
+ Then run `sh <this skill's directory>/scripts/check-sheet.sh` through `bash`, with the directory's absolute path and no arguments. It checks the Copilot sheet as the plugin hook does at session start: every role has a line, every entry is `inherit-parent`, `auto`, or a model ID with an optional `@<level>`, and each panel names models from two vendors unless the sheet has `panel vendors: any`. It prints `sheet ok`, or `sheet invalid:` and each problem. On `sheet invalid`, fix those lines and write the whole sheet again, then rerun the check. The plugin hook approves the check without a prompt.
79
+
80
+ For the rest of this session, use the values you just wrote; do not read the sheet back. Later sessions get them from the plugin hook and do not ask again.
81
+
82
+ ## Wire it in
83
+
84
+ Add no include line: Copilot does not expand `@~/` paths in user instructions, and the plugin hook injects the sheet's role lines at session start. If the hook is on but this session's context lacks the routing mandate (the block that opens `You have pstack.`), another hook or a skills-only install has displaced it. Offer to append this standing instruction to `~/.copilot/copilot-instructions.md` instead:
85
+
86
+ ```text
87
+ pstack: for a task that touches more than one file, changes a signature other files call, involves a design choice, or is a bug with an unknown cause or a performance issue, load the poteto-mode skill and follow it. Resolve Claude tool and model names through poteto-mode's references/copilot-tools.md; role models are in ~/.copilot/pstack-models.md.
88
+ ```
@@ -0,0 +1,75 @@
1
+ # Other runtimes
2
+
3
+ The role lines are the same everywhere. What differs is the sheet path, how the runtime loads it, and how you list models. Detect models with the runtime's own tool and never write a slug you have not seen listed. A runtime whose subagent call has no model parameter still gets the sheet, as the record of the user's choice, and applies it where it can. The `session hook` line applies to the Claude Code, Codex, GitHub Copilot, Muse, MiniMax Code, Antigravity, OMP, and OpenCode 2 plugins and to the pstack Pi extension.
4
+
5
+ `<codex-home>` is `$CODEX_HOME` when that variable is set and `~/.codex` otherwise.
6
+
7
+ | Runtime | Sheet | Load | List models | Status |
8
+ | --- | --- | --- | --- | --- |
9
+ | Claude Code | `<config>/pstack-models.md` | `@<config>/pstack-models.md` in `<config>/CLAUDE.md` | the `Agent` tool's model parameter | verified live |
10
+ | Codex | `<codex-home>/pstack-models.md` | model rows: paste into `<codex-home>/AGENTS.md`; hook setting: read by the plugin | your configured Codex models, see [codex-tools.md](../../poteto-mode/references/codex-tools.md#model-names) | hook contract tested; discovery verified |
11
+ | Pi | `pstack-models.md` in the Pi agent directory, `$PI_CODING_AGENT_DIR` or `~/.pi/agent` | read by the pstack Pi extension, model rows and hook setting both; no include line | `pi --list-models`, see [pi-tools.md](../../poteto-mode/references/pi-tools.md#model-names) and its `setup-pstack` note | extension contract tested offline; live results in the repository's `docs/pi-equivalence.md` |
12
+ | GitHub Copilot (CLI and app) | `${COPILOT_HOME:-~/.copilot}/pstack-models.md` | the plugin hook checks it and injects its role lines at session start; skills-only installs read it with `view` | the `task` tool's `model` enum, see [copilot-tools.md](../../poteto-mode/references/copilot-tools.md#model-names) | hook contract tested; CLI install smoke-tested |
13
+ | Muse | `${XDG_CONFIG_HOME:-~/.config}/muse/pstack-models.md` | the plugin hook reads it and injects its role lines at session start, once hooks are approved; no include line | the model catalog (`muse model-profile show <model>` names each one), see [muse-tools.md](../../poteto-mode/references/muse-tools.md#model-names) | hook contract tested; plugin install verified |
14
+ | MiniMax Code | `~/.minimax/pstack-models.md`, even when `MINIMAX_DATA_DIR` moves MiniMax's data directory, since MiniMax Code withholds that variable from hooks and its `bash` tool | model rows: read by the agent before a role-model skill, or paste into `AGENTS.md` in MiniMax Code's data directory; hook setting: read by the plugin | `mcode provider list` or the `model` slash command, see [minimax-tools.md](../../poteto-mode/references/minimax-tools.md#model-names) | hook contract tested; plugin load smoke-tested on 0.7.4; no live session |
15
+ | Kimi Code CLI | `<KIMI_CODE_HOME>/pstack-models.md`, or `~/.kimi-code/pstack-models.md` when unset | read by the agent before a role-model skill; no hook setting | the `Agent` tool's model parameter when available, see [kimi-tools.md](../../poteto-mode/references/kimi-tools.md#model-names) | installation and synthetic-provider context delivery checked on Kimi 2.4.1 for macOS; model compliance untested |
16
+ | Antigravity (`agy`) | `~/.gemini/config/pstack-models.md` | model rows: read by the agent before a role-model skill, or paste into `~/.gemini/config/AGENTS.md`; hook setting: read by the plugin's `SessionStart` hook | `invoke_subagent`'s `Model` enum (`inherit`, `flash_lite`, `flash`, `pro`), see [agy-tools.md](../../poteto-mode/references/agy-tools.md#model-names) | tested with `agy` 1.5.0 on macOS: plugin install, hook on/off, full skill read and a live subagent reply; Windows untested |
17
+ | OMP | `~/.omp/pstack-models.md` (global across profiles; hook only) | read by the OMP plugin for routing | `omp models --kind chat`; model roles use OMP configuration, see [omp-tools.md](../../poteto-mode/references/omp-tools.md#model-names) | installation, skill access, and the routing toggle checked on OMP 18.16.0 with a synthetic provider; model compliance untested |
18
+ | Grok Build | `${GROK_HOME:-~/.grok}/pstack-models.md` | read by the agent before a role-model skill; the `session hook` line does not control the Grok routing hint | the `spawn_subagent` tool's advertised models; use overrides only at the user's explicit request; see [grok.md](../../poteto-mode/references/grok.md#model-names) | synthetic-provider plugin and skill loading tested |
19
+ | OpenCode 2 | `${XDG_CONFIG_HOME:-~/.config}/opencode/pstack-models.md` | add the path to the `instructions` array in `opencode.jsonc`; the plugin reads the hook setting directly | the `models` command in the session; see [opencode-tools.md](../../poteto-mode/references/opencode-tools.md#model-names) | native skill activation and routing tested on 2.2.5 with a loopback provider |
20
+ | Gemini CLI | `~/.gemini/pstack-models.md` | `@~/.gemini/pstack-models.md` in `~/.gemini/GEMINI.md` | the `model` slash command in the session | from published docs, no live session |
21
+ | Prime Agent | no documented sheet path; Prime's configuration chooses models | | | no live session |
22
+
23
+ Every runtime uses its row above in place of the Claude Code paths and step 7's include line. A section below exists only for a step change the table cannot express.
24
+
25
+ ## Codex
26
+
27
+ - **Step 3 (map and confirm).** `session` effort requires the current thread's active-turn metadata, which some hosts do not expose. The platform mapping's helper reads it; when it is unavailable, an explicit effort choice is required before dispatching. Offer a fixed default level for those hosts instead of promising automatic inheritance.
28
+ - **Step 4 (session hook).** The plugin's `SessionStart` hook injects the mandate as on Claude Code, after the user trusts plugin hooks through `/hooks`.
29
+ - **Step 5 (validate).** The effort levels are the `reasoning_effort` values your Codex models accept.
30
+ - **Step 7 (wire it in).** Paste the `default effort` line into `<codex-home>/AGENTS.md` with the model rows, but not the `session hook` line: the plugin hook reads that from the sheet.
31
+
32
+ ## GitHub Copilot
33
+
34
+ Follow [the Copilot setup](../copilot.md); its opening names the steps it replaces.
35
+
36
+ ## Muse
37
+
38
+ - **Step 4 (session hook).** The native plugin's `SessionStart` hook injects the mandate and the role lines only after the user approves the plugin's hooks with `muse plugins approve pstack`. In step 8, name that command when it has not run yet.
39
+
40
+ ## Pi
41
+
42
+ - **Step 4 (session hook).** The pstack extension adds the mandate to the system prompt at every agent start.
43
+
44
+ ## OpenCode 2
45
+
46
+ - **Steps 3 and 5 (effort, validate).** The `subagent` tool has no effort field. Skip the effort questions in step 3 and effort validation in step 5, and omit the `default effort` line and `@<level>` suffixes. A variant the user asks for goes in the model ID as `providerID/modelID#variant`.
47
+ - **Step 4 (session hook).** The native plugin adds the mandate to root-session model requests.
48
+
49
+ ## Antigravity
50
+
51
+ - **Steps 3 and 5 (effort, validate).** `invoke_subagent` takes a `Model` and no effort parameter. Skip the effort questions in step 3 and effort validation in step 5, and omit the `default effort` line and `@<level>` suffixes.
52
+
53
+ ## Kimi Code CLI
54
+
55
+ - **Steps 1 and 6 (detect models, write the sheet).** Describe `inherit-parent` and `auto` as omitting `model`: Kimi uses the configured subagent default when present, otherwise the parent's model. Write that meaning in the sheet header. If the `Agent` tool has no `model` parameter, offer only these aliases.
56
+ - **Step 2 (load current state).** Preserve model aliases exactly, including ones starting with `claude-`; do not apply the Claude Code family-name rewrite.
57
+ - **Steps 3, 4, and 5 (effort, session hook, validate).** Skip step 4, the effort questions in step 3, and effort validation in step 5. Omit effort and `session hook` lines and suffixes from the sheet.
58
+ - **Step 8 (confirm).** Explain that routing is controlled by the plugin's enabled state instead of reporting a hook setting.
59
+
60
+ ## Grok Build
61
+
62
+ Read the [platform mapping](../../poteto-mode/references/grok.md) first.
63
+
64
+ - **Step 1 (detect models).** Use the models advertised by `spawn_subagent` and ask the user to confirm choices; the session model selector is supplementary. If the tool exposes no `model` parameter, explain that per-call model selection is unavailable and offer only `inherit-parent` and `auto`; both omit `model`, and configured subagent overrides may still apply. Write that meaning in the sheet header.
65
+ - **Step 2 (load current state).** Preserve full `claude-` IDs and validate them against the tool's advertised models instead of rewriting them to family names.
66
+ - **Steps 3, 4, and 5 (effort, session hook, validate).** Skip step 4, the effort questions in step 3, and effort validation in step 5. Omit effort and `session hook` lines and suffixes from the sheet. Grok exposes no per-call effort parameter.
67
+ - **Step 8 (confirm).** Explain that the enabled plugin supplies a model-followed routing hint that the `session hook` setting does not control.
68
+
69
+ ## OMP
70
+
71
+ Follow [OMP setup](../../poteto-mode/references/omp-tools.md#model-names) instead of steps 1 through 8. OMP uses native model roles and agent overrides; its global pstack sheet controls only the session hook.
72
+
73
+ 1. Ask whether main-session routing should be on or off for all OMP profiles.
74
+ 2. In `~/.omp/pstack-models.md`, replace all `session hook:` lines with one exact `session hook: on` or `session hook: off` line, preserving other lines and the existing encoding.
75
+ 3. Confirm the global scope and restart the session to clear earlier context.
@@ -0,0 +1,10 @@
1
+ # check-sheet.sh's program: run after sheet.awk with the sheet as input.
2
+ { sheet_add($0) }
3
+ END {
4
+ problems = sheet_problems()
5
+ if (problems != "") {
6
+ print "sheet invalid: " problems
7
+ exit 1
8
+ }
9
+ print "sheet ok"
10
+ }