@justjoshn/pi-pstack 0.0.0-stage → 0.15.36-pi.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (651) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +95 -2
  3. package/agents/comment-sicko.md +32 -0
  4. package/agents/poteto-agent.md +9 -0
  5. package/automations/benny/FOR_AGENTS.md +82 -0
  6. package/automations/benny/README.md +20 -0
  7. package/automations/benny/skills/reproduce-and-fix-issues/SKILL.md +310 -0
  8. package/automations/benny/skills/reproduce-and-fix-issues/references/control-adapter.md +169 -0
  9. package/automations/benny/skills/reproduce-and-fix-issues/references/feature-map.example.md +205 -0
  10. package/automations/benny/skills/reproduce-and-fix-issues/references/verify-existing-fix.md +93 -0
  11. package/automations/benny/skills/setup-benny/SKILL.md +253 -0
  12. package/automations/benny/skills/triage-issue-reports/SKILL.md +240 -0
  13. package/automations/benny/skills/triage-issue-reports/references/routing.example.md +61 -0
  14. package/automations/benny/templates/configuration.example.yaml +113 -0
  15. package/automations/benny/templates/reproduce-automation-prompt.md +49 -0
  16. package/automations/benny/templates/triage-automation-prompt.md +53 -0
  17. package/docs/guide/01-setup.md +67 -0
  18. package/docs/guide/02-poteto-mode.md +139 -0
  19. package/docs/guide/03-understand.md +79 -0
  20. package/docs/guide/04-design.md +133 -0
  21. package/docs/guide/05-build-and-clean.md +83 -0
  22. package/docs/guide/06-verify-and-ship.md +162 -0
  23. package/docs/guide/07-overnight.md +122 -0
  24. package/docs/guide/08-principles.md +72 -0
  25. package/docs/guide/09-make-it-yours.md +100 -0
  26. package/docs/guide/10-recipes-and-pitfalls.md +182 -0
  27. package/docs/guide/README.md +38 -0
  28. package/docs/guide/images/design.jpg +0 -0
  29. package/docs/guide/images/overnight.jpg +0 -0
  30. package/docs/guide/images/recipes.jpg +0 -0
  31. package/docs/guide/images/router.jpg +0 -0
  32. package/docs/guide/images/understanding.jpg +0 -0
  33. package/docs/guide/images/verification.jpg +0 -0
  34. package/docs/native-gaps.md +67 -0
  35. package/licenses/cursor-team-kit.LICENSE +21 -0
  36. package/licenses/pstack.LICENSE +21 -0
  37. package/package.json +51 -4
  38. package/scripts/live-e2e.mjs +257 -0
  39. package/skills/architect/SKILL.md +79 -0
  40. package/skills/architect/references/design-red-flags.md +57 -0
  41. package/skills/architect/references/rationale-template.md +35 -0
  42. package/skills/architect/references/runner-prompt.md +20 -0
  43. package/skills/arena/SKILL.md +48 -0
  44. package/skills/automate-me/SKILL.md +104 -0
  45. package/skills/benchmark-checklist/SKILL.md +39 -0
  46. package/skills/blast-radius/SKILL.md +50 -0
  47. package/skills/bro/SKILL.md +7 -0
  48. package/skills/control-cli/SKILL.md +109 -0
  49. package/skills/control-ui/SKILL.md +109 -0
  50. package/skills/correct/SKILL.md +32 -0
  51. package/skills/create-formal-verification-skill/SKILL.md +43 -0
  52. package/skills/create-skill/SKILL.md +62 -0
  53. package/skills/create-verification-skill/SKILL.md +44 -0
  54. package/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
  55. package/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
  56. package/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
  57. package/skills/deslop/SKILL.md +22 -0
  58. package/skills/figure-it-out/SKILL.md +52 -0
  59. package/skills/how/SKILL.md +36 -0
  60. package/skills/how/references/explainer-prompt.md +55 -0
  61. package/skills/how/references/explorer-prompt.md +35 -0
  62. package/skills/in-your-own-words/SKILL.md +7 -0
  63. package/skills/interrogate/SKILL.md +31 -0
  64. package/skills/ketchup/SKILL.md +43 -0
  65. package/skills/ketchup-video/SKILL.md +29 -0
  66. package/skills/maintain-formal-verification-skill/SKILL.md +58 -0
  67. package/skills/maintain-verification-skill/SKILL.md +39 -0
  68. package/skills/make-bot-ui/SKILL.md +104 -0
  69. package/skills/no-comments/SKILL.md +24 -0
  70. package/skills/poteto-help/SKILL.md +161 -0
  71. package/skills/poteto-help/references/prompting.md +51 -0
  72. package/skills/poteto-help/references/recipes.md +51 -0
  73. package/skills/poteto-mode/SKILL.md +151 -0
  74. package/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
  75. package/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
  76. package/skills/poteto-mode/playbooks/autopilot-full.md +25 -0
  77. package/skills/poteto-mode/playbooks/autopilot-stack.md +8 -0
  78. package/skills/poteto-mode/playbooks/babysit.md +23 -0
  79. package/skills/poteto-mode/playbooks/bug-fix.md +15 -0
  80. package/skills/poteto-mode/playbooks/eval.md +25 -0
  81. package/skills/poteto-mode/playbooks/feature.md +21 -0
  82. package/skills/poteto-mode/playbooks/hillclimb.md +21 -0
  83. package/skills/poteto-mode/playbooks/investigation.md +14 -0
  84. package/skills/poteto-mode/playbooks/multi-phase-plan.md +155 -0
  85. package/skills/poteto-mode/playbooks/opening-a-pr.md +34 -0
  86. package/skills/poteto-mode/playbooks/orchestrate.md +25 -0
  87. package/skills/poteto-mode/playbooks/pause-safely.md +10 -0
  88. package/skills/poteto-mode/playbooks/perf-issue.md +25 -0
  89. package/skills/poteto-mode/playbooks/prototype.md +14 -0
  90. package/skills/poteto-mode/playbooks/refactoring.md +16 -0
  91. package/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
  92. package/skills/poteto-mode/playbooks/session-pickup.md +11 -0
  93. package/skills/poteto-mode/playbooks/shipping.md +12 -0
  94. package/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
  95. package/skills/poteto-mode/playbooks/visual-parity.md +11 -0
  96. package/skills/poteto-mode/playbooks/worktree-cleanup.md +12 -0
  97. package/skills/poteto-mode/references/bugbot-triage.md +142 -0
  98. package/skills/poteto-mode/scripts/bootstrap.ts +62 -0
  99. package/skills/poteto-mode/scripts/bun.lock +67 -0
  100. package/skills/poteto-mode/scripts/check-plan.mjs +205 -0
  101. package/skills/poteto-mode/scripts/check-plan.test.ts +110 -0
  102. package/skills/poteto-mode/scripts/package.json +16 -0
  103. package/skills/poteto-mode/scripts/watch-pr/cli.test.ts +224 -0
  104. package/skills/poteto-mode/scripts/watch-pr/cli.ts +223 -0
  105. package/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +129 -0
  106. package/skills/poteto-mode/scripts/watch-pr/github.test.ts +498 -0
  107. package/skills/poteto-mode/scripts/watch-pr/github.ts +726 -0
  108. package/skills/poteto-mode/scripts/watch-pr/policy.test.ts +482 -0
  109. package/skills/poteto-mode/scripts/watch-pr/policy.ts +842 -0
  110. package/skills/poteto-mode/scripts/watch-pr/render.ts +169 -0
  111. package/skills/poteto-mode/scripts/watch-pr/tsconfig.json +13 -0
  112. package/skills/poteto-mode/scripts/watch-pr/types.compile.ts +93 -0
  113. package/skills/poteto-mode/scripts/watch-pr/types.ts +414 -0
  114. package/skills/poteto-mode/scripts/watch-pr/watch-pr +6 -0
  115. package/skills/poteto-mode/scripts/worktree-audit.sh +156 -0
  116. package/skills/principle-attack-the-premise/SKILL.md +21 -0
  117. package/skills/principle-boundary-discipline/SKILL.md +34 -0
  118. package/skills/principle-build-the-lever/SKILL.md +23 -0
  119. package/skills/principle-encode-lessons-in-structure/SKILL.md +11 -0
  120. package/skills/principle-exhaust-the-design-space/SKILL.md +9 -0
  121. package/skills/principle-experience-first/SKILL.md +19 -0
  122. package/skills/principle-explain-the-number/SKILL.md +18 -0
  123. package/skills/principle-fix-root-causes/SKILL.md +21 -0
  124. package/skills/principle-foundational-thinking/SKILL.md +21 -0
  125. package/skills/principle-guard-the-context-window/SKILL.md +12 -0
  126. package/skills/principle-laziness-protocol/SKILL.md +10 -0
  127. package/skills/principle-make-operations-idempotent/SKILL.md +22 -0
  128. package/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +14 -0
  129. package/skills/principle-minimize-reader-load/SKILL.md +18 -0
  130. package/skills/principle-model-the-domain/SKILL.md +24 -0
  131. package/skills/principle-never-block-on-the-human/SKILL.md +15 -0
  132. package/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
  133. package/skills/principle-prove-it-works/SKILL.md +22 -0
  134. package/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
  135. package/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
  136. package/skills/principle-sequence-verifiable-units/SKILL.md +17 -0
  137. package/skills/principle-subtract-before-you-add/SKILL.md +18 -0
  138. package/skills/principle-test-behavior-not-implementation/SKILL.md +20 -0
  139. package/skills/principle-type-system-discipline/SKILL.md +13 -0
  140. package/skills/recall/SKILL.md +35 -0
  141. package/skills/reflect/SKILL.md +69 -0
  142. package/skills/reflect/references/divergent-reviewer.md +38 -0
  143. package/skills/reflect/references/judgment-reviewer.md +37 -0
  144. package/skills/reflect/references/synthesizer.md +56 -0
  145. package/skills/reflect/references/tooling-reviewer.md +48 -0
  146. package/skills/setup-pstack/SKILL.md +74 -0
  147. package/skills/sharpen/SKILL.md +16 -0
  148. package/skills/show-me-your-work/SKILL.md +82 -0
  149. package/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
  150. package/skills/show-me-your-work/scripts/log.sh +42 -0
  151. package/skills/statechart/SKILL.md +82 -0
  152. package/skills/statechart/references/render.md +93 -0
  153. package/skills/statechart/scripts/backends/cfg.ts +33 -0
  154. package/skills/statechart/scripts/backends/mermaid.ts +201 -0
  155. package/skills/statechart/scripts/backends/plain-text.ts +72 -0
  156. package/skills/statechart/scripts/backends/report.ts +177 -0
  157. package/skills/statechart/scripts/frontends/config.ts +276 -0
  158. package/skills/statechart/scripts/frontends/dot.ts +74 -0
  159. package/skills/statechart/scripts/frontends/marks.ts +93 -0
  160. package/skills/statechart/scripts/frontends/messages.ts +52 -0
  161. package/skills/statechart/scripts/frontends/spec.ts +114 -0
  162. package/skills/statechart/scripts/frontends/trace.ts +24 -0
  163. package/skills/statechart/scripts/frontends/value.ts +166 -0
  164. package/skills/statechart/scripts/frontends/verdict.ts +40 -0
  165. package/skills/statechart/scripts/frontends/view.ts +119 -0
  166. package/skills/statechart/scripts/ir.ts +547 -0
  167. package/skills/statechart/scripts/package.json +11 -0
  168. package/skills/statechart/scripts/passes/annotate.ts +128 -0
  169. package/skills/statechart/scripts/passes/label.ts +269 -0
  170. package/skills/statechart/scripts/passes/lift.ts +85 -0
  171. package/skills/statechart/scripts/passes/loop-check.ts +68 -0
  172. package/skills/statechart/scripts/passes/paths.ts +60 -0
  173. package/skills/statechart/scripts/passes/reach.ts +135 -0
  174. package/skills/statechart/scripts/passes/region-check.ts +97 -0
  175. package/skills/statechart/scripts/passes/regions.ts +295 -0
  176. package/skills/statechart/scripts/pipeline.ts +76 -0
  177. package/skills/statechart/scripts/run.ts +481 -0
  178. package/skills/statechart/scripts/statechart +29 -0
  179. package/skills/statechart/scripts/statechart.ts +164 -0
  180. package/skills/statechart/scripts/test/ConfigOracle.java +63 -0
  181. package/skills/statechart/scripts/test/chart.test.ts +1210 -0
  182. package/skills/statechart/scripts/test/charts/Braces.mmd +7 -0
  183. package/skills/statechart/scripts/test/charts/Escapes.mmd +11 -0
  184. package/skills/statechart/scripts/test/charts/Phases.mmd +29 -0
  185. package/skills/statechart/scripts/test/cli.test.ts +1314 -0
  186. package/skills/statechart/scripts/test/config-fuzz.test.ts +263 -0
  187. package/skills/statechart/scripts/test/corpus/Counter/ChartRun.out +57 -0
  188. package/skills/statechart/scripts/test/corpus/Counter/Counter.cfg +3 -0
  189. package/skills/statechart/scripts/test/corpus/Counter/Counter.tla +10 -0
  190. package/skills/statechart/scripts/test/corpus/Counter/chart.mmd +9 -0
  191. package/skills/statechart/scripts/test/corpus/Counter/graph.dot +16 -0
  192. package/skills/statechart/scripts/test/corpus/Counter/report.md +7 -0
  193. package/skills/statechart/scripts/test/corpus/Counter/sany.out +2 -0
  194. package/skills/statechart/scripts/test/corpus/Counter/verdict-1.out +49 -0
  195. package/skills/statechart/scripts/test/corpus/CounterAction/ChartRun.out +60 -0
  196. package/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.cfg +4 -0
  197. package/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.tla +22 -0
  198. package/skills/statechart/scripts/test/corpus/CounterAction/chart.mmd +26 -0
  199. package/skills/statechart/scripts/test/corpus/CounterAction/graph.dot +19 -0
  200. package/skills/statechart/scripts/test/corpus/CounterAction/report.md +20 -0
  201. package/skills/statechart/scripts/test/corpus/CounterAction/sany.out +2 -0
  202. package/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.exit +1 -0
  203. package/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.out +56 -0
  204. package/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.exit +1 -0
  205. package/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.out +82 -0
  206. package/skills/statechart/scripts/test/corpus/CounterAction/verdict-3.out +57 -0
  207. package/skills/statechart/scripts/test/corpus/CounterDeadlock/ChartRun.out +59 -0
  208. package/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.cfg +3 -0
  209. package/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.tla +11 -0
  210. package/skills/statechart/scripts/test/corpus/CounterDeadlock/chart.mmd +22 -0
  211. package/skills/statechart/scripts/test/corpus/CounterDeadlock/graph.dot +16 -0
  212. package/skills/statechart/scripts/test/corpus/CounterDeadlock/report.md +17 -0
  213. package/skills/statechart/scripts/test/corpus/CounterDeadlock/sany.out +2 -0
  214. package/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.exit +1 -0
  215. package/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.out +56 -0
  216. package/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.exit +1 -0
  217. package/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.out +77 -0
  218. package/skills/statechart/scripts/test/corpus/CounterFan/ChartRun.out +69 -0
  219. package/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.cfg +2 -0
  220. package/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.tla +11 -0
  221. package/skills/statechart/scripts/test/corpus/CounterFan/chart.mmd +85 -0
  222. package/skills/statechart/scripts/test/corpus/CounterFan/graph.dot +70 -0
  223. package/skills/statechart/scripts/test/corpus/CounterFan/report.md +12 -0
  224. package/skills/statechart/scripts/test/corpus/CounterFan/sany.out +2 -0
  225. package/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.exit +1 -0
  226. package/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.out +67 -0
  227. package/skills/statechart/scripts/test/corpus/CounterFan/verdict-2.out +57 -0
  228. package/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.exit +1 -0
  229. package/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.out +85 -0
  230. package/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.cfg +6 -0
  231. package/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.tla +13 -0
  232. package/skills/statechart/scripts/test/corpus/CounterGuard/chart.mmd +5 -0
  233. package/skills/statechart/scripts/test/corpus/CounterGuard/graph.dot +10 -0
  234. package/skills/statechart/scripts/test/corpus/CounterGuard/report.md +31 -0
  235. package/skills/statechart/scripts/test/corpus/CounterGuard/sany.out +2 -0
  236. package/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.exit +1 -0
  237. package/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.out +64 -0
  238. package/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.exit +1 -0
  239. package/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.out +77 -0
  240. package/skills/statechart/scripts/test/corpus/CounterInitPast/ChartRun.out +55 -0
  241. package/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.cfg +3 -0
  242. package/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.tla +10 -0
  243. package/skills/statechart/scripts/test/corpus/CounterInitPast/chart.mmd +12 -0
  244. package/skills/statechart/scripts/test/corpus/CounterInitPast/graph.dot +6 -0
  245. package/skills/statechart/scripts/test/corpus/CounterInitPast/report.md +12 -0
  246. package/skills/statechart/scripts/test/corpus/CounterInitPast/sany.out +2 -0
  247. package/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.exit +1 -0
  248. package/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.out +33 -0
  249. package/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-2.out +54 -0
  250. package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/ChartRun.out +54 -0
  251. package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.cfg +3 -0
  252. package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.tla +10 -0
  253. package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/chart.mmd +1 -0
  254. package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/graph.dot +6 -0
  255. package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/report.md +7 -0
  256. package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/sany.out +2 -0
  257. package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/verdict-1.out +46 -0
  258. package/skills/statechart/scripts/test/corpus/CounterInstance/ChartRun.out +59 -0
  259. package/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.cfg +2 -0
  260. package/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.tla +10 -0
  261. package/skills/statechart/scripts/test/corpus/CounterInstance/CounterSteps.tla +6 -0
  262. package/skills/statechart/scripts/test/corpus/CounterInstance/chart.mmd +17 -0
  263. package/skills/statechart/scripts/test/corpus/CounterInstance/graph.dot +15 -0
  264. package/skills/statechart/scripts/test/corpus/CounterInstance/report.md +14 -0
  265. package/skills/statechart/scripts/test/corpus/CounterInstance/sany.out +3 -0
  266. package/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.exit +1 -0
  267. package/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.out +78 -0
  268. package/skills/statechart/scripts/test/corpus/CounterJump/ChartRun.out +59 -0
  269. package/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.cfg +3 -0
  270. package/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.tla +19 -0
  271. package/skills/statechart/scripts/test/corpus/CounterJump/chart.mmd +26 -0
  272. package/skills/statechart/scripts/test/corpus/CounterJump/graph.dot +22 -0
  273. package/skills/statechart/scripts/test/corpus/CounterJump/report.md +12 -0
  274. package/skills/statechart/scripts/test/corpus/CounterJump/sany.out +2 -0
  275. package/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.exit +1 -0
  276. package/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.out +58 -0
  277. package/skills/statechart/scripts/test/corpus/CounterJump/verdict-2.out +57 -0
  278. package/skills/statechart/scripts/test/corpus/CounterLoop/ChartRun.out +57 -0
  279. package/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.cfg +2 -0
  280. package/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.tla +11 -0
  281. package/skills/statechart/scripts/test/corpus/CounterLoop/chart.mmd +17 -0
  282. package/skills/statechart/scripts/test/corpus/CounterLoop/graph.dot +15 -0
  283. package/skills/statechart/scripts/test/corpus/CounterLoop/report.md +14 -0
  284. package/skills/statechart/scripts/test/corpus/CounterLoop/sany.out +2 -0
  285. package/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.exit +1 -0
  286. package/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.out +76 -0
  287. package/skills/statechart/scripts/test/corpus/CounterOrder/ChartRun.out +59 -0
  288. package/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.cfg +3 -0
  289. package/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.tla +11 -0
  290. package/skills/statechart/scripts/test/corpus/CounterOrder/chart.mmd +19 -0
  291. package/skills/statechart/scripts/test/corpus/CounterOrder/graph.dot +10 -0
  292. package/skills/statechart/scripts/test/corpus/CounterOrder/report.md +15 -0
  293. package/skills/statechart/scripts/test/corpus/CounterOrder/sany.out +2 -0
  294. package/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.exit +1 -0
  295. package/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.out +56 -0
  296. package/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.exit +1 -0
  297. package/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.out +67 -0
  298. package/skills/statechart/scripts/test/corpus/CounterRules/ChartRun.out +62 -0
  299. package/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.cfg +6 -0
  300. package/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.tla +24 -0
  301. package/skills/statechart/scripts/test/corpus/CounterRules/Moves.tla +5 -0
  302. package/skills/statechart/scripts/test/corpus/CounterRules/chart.mmd +22 -0
  303. package/skills/statechart/scripts/test/corpus/CounterRules/graph.dot +10 -0
  304. package/skills/statechart/scripts/test/corpus/CounterRules/report.md +23 -0
  305. package/skills/statechart/scripts/test/corpus/CounterRules/sany.out +3 -0
  306. package/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.exit +1 -0
  307. package/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.out +58 -0
  308. package/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.exit +1 -0
  309. package/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.out +66 -0
  310. package/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.exit +1 -0
  311. package/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.out +74 -0
  312. package/skills/statechart/scripts/test/corpus/CounterRules/verdict-4.out +59 -0
  313. package/skills/statechart/scripts/test/corpus/CounterStart/ChartRun.out +58 -0
  314. package/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.cfg +3 -0
  315. package/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.tla +15 -0
  316. package/skills/statechart/scripts/test/corpus/CounterStart/chart.mmd +18 -0
  317. package/skills/statechart/scripts/test/corpus/CounterStart/graph.dot +13 -0
  318. package/skills/statechart/scripts/test/corpus/CounterStart/report.md +11 -0
  319. package/skills/statechart/scripts/test/corpus/CounterStart/sany.out +2 -0
  320. package/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.exit +1 -0
  321. package/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.out +33 -0
  322. package/skills/statechart/scripts/test/corpus/CounterStart/verdict-2.out +57 -0
  323. package/skills/statechart/scripts/test/corpus/CounterStop/ChartRun.out +57 -0
  324. package/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.cfg +3 -0
  325. package/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.tla +15 -0
  326. package/skills/statechart/scripts/test/corpus/CounterStop/chart.mmd +7 -0
  327. package/skills/statechart/scripts/test/corpus/CounterStop/graph.dot +13 -0
  328. package/skills/statechart/scripts/test/corpus/CounterStop/report.md +6 -0
  329. package/skills/statechart/scripts/test/corpus/CounterStop/sany.out +2 -0
  330. package/skills/statechart/scripts/test/corpus/CounterStop/verdict-1.out +49 -0
  331. package/skills/statechart/scripts/test/corpus/CounterTie/ChartRun.out +61 -0
  332. package/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.cfg +4 -0
  333. package/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.tla +14 -0
  334. package/skills/statechart/scripts/test/corpus/CounterTie/chart.mmd +30 -0
  335. package/skills/statechart/scripts/test/corpus/CounterTie/graph.dot +19 -0
  336. package/skills/statechart/scripts/test/corpus/CounterTie/report.md +27 -0
  337. package/skills/statechart/scripts/test/corpus/CounterTie/sany.out +2 -0
  338. package/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.exit +1 -0
  339. package/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.out +56 -0
  340. package/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.exit +1 -0
  341. package/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.out +64 -0
  342. package/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.exit +1 -0
  343. package/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.out +87 -0
  344. package/skills/statechart/scripts/test/corpus/CounterTie/verdict-4.out +57 -0
  345. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/ChartRun.out +60 -0
  346. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.cfg +3 -0
  347. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.tla +12 -0
  348. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/chart.mmd +23 -0
  349. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/graph.dot +19 -0
  350. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/report.md +11 -0
  351. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/sany.out +2 -0
  352. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.exit +1 -0
  353. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.out +56 -0
  354. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-2.out +57 -0
  355. package/skills/statechart/scripts/test/corpus/CounterView/ChartRun.out +61 -0
  356. package/skills/statechart/scripts/test/corpus/CounterView/CounterView.cfg +4 -0
  357. package/skills/statechart/scripts/test/corpus/CounterView/CounterView.tla +14 -0
  358. package/skills/statechart/scripts/test/corpus/CounterView/chart.mmd +23 -0
  359. package/skills/statechart/scripts/test/corpus/CounterView/graph.dot +19 -0
  360. package/skills/statechart/scripts/test/corpus/CounterView/report.md +27 -0
  361. package/skills/statechart/scripts/test/corpus/CounterView/sany.out +2 -0
  362. package/skills/statechart/scripts/test/corpus/CounterView/verdict-1.exit +1 -0
  363. package/skills/statechart/scripts/test/corpus/CounterView/verdict-1.out +56 -0
  364. package/skills/statechart/scripts/test/corpus/CounterView/verdict-2.exit +1 -0
  365. package/skills/statechart/scripts/test/corpus/CounterView/verdict-2.out +64 -0
  366. package/skills/statechart/scripts/test/corpus/CounterView/verdict-3.exit +1 -0
  367. package/skills/statechart/scripts/test/corpus/CounterView/verdict-3.out +87 -0
  368. package/skills/statechart/scripts/test/corpus/CounterView/verdict-4.out +57 -0
  369. package/skills/statechart/scripts/test/corpus/CounterView/view.mjs +1 -0
  370. package/skills/statechart/scripts/test/corpus/DieHard/ChartRun.out +59 -0
  371. package/skills/statechart/scripts/test/corpus/DieHard/DieHard.cfg +4 -0
  372. package/skills/statechart/scripts/test/corpus/DieHard/DieHard.tla +38 -0
  373. package/skills/statechart/scripts/test/corpus/DieHard/chart.mmd +92 -0
  374. package/skills/statechart/scripts/test/corpus/DieHard/graph.dot +126 -0
  375. package/skills/statechart/scripts/test/corpus/DieHard/report.md +17 -0
  376. package/skills/statechart/scripts/test/corpus/DieHard/sany.out +2 -0
  377. package/skills/statechart/scripts/test/corpus/DieHard/verdict-1.exit +1 -0
  378. package/skills/statechart/scripts/test/corpus/DieHard/verdict-1.out +91 -0
  379. package/skills/statechart/scripts/test/corpus/DieHard/verdict-2.out +57 -0
  380. package/skills/statechart/scripts/test/corpus/FirstRule/ChartRun.out +61 -0
  381. package/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.cfg +6 -0
  382. package/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.tla +11 -0
  383. package/skills/statechart/scripts/test/corpus/FirstRule/chart.mmd +22 -0
  384. package/skills/statechart/scripts/test/corpus/FirstRule/graph.dot +16 -0
  385. package/skills/statechart/scripts/test/corpus/FirstRule/report.md +25 -0
  386. package/skills/statechart/scripts/test/corpus/FirstRule/sany.out +2 -0
  387. package/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.exit +1 -0
  388. package/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.out +56 -0
  389. package/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.exit +1 -0
  390. package/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.out +64 -0
  391. package/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.exit +1 -0
  392. package/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.out +64 -0
  393. package/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.exit +1 -0
  394. package/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.out +77 -0
  395. package/skills/statechart/scripts/test/corpus/HiddenClock/ChartRun.out +57 -0
  396. package/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.cfg +4 -0
  397. package/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.tla +11 -0
  398. package/skills/statechart/scripts/test/corpus/HiddenClock/chart.mmd +13 -0
  399. package/skills/statechart/scripts/test/corpus/HiddenClock/graph.dot +12 -0
  400. package/skills/statechart/scripts/test/corpus/HiddenClock/report.md +11 -0
  401. package/skills/statechart/scripts/test/corpus/HiddenClock/sany.out +2 -0
  402. package/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.exit +1 -0
  403. package/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.out +72 -0
  404. package/skills/statechart/scripts/test/corpus/Login/ChartRun.out +57 -0
  405. package/skills/statechart/scripts/test/corpus/Login/Login.cfg +3 -0
  406. package/skills/statechart/scripts/test/corpus/Login/Login.tla +62 -0
  407. package/skills/statechart/scripts/test/corpus/Login/chart.mmd +27 -0
  408. package/skills/statechart/scripts/test/corpus/Login/graph.dot +40 -0
  409. package/skills/statechart/scripts/test/corpus/Login/report.md +7 -0
  410. package/skills/statechart/scripts/test/corpus/Login/sany.out +1 -0
  411. package/skills/statechart/scripts/test/corpus/Login/verdict-1.out +47 -0
  412. package/skills/statechart/scripts/test/corpus/Login/view.mjs +1 -0
  413. package/skills/statechart/scripts/test/corpus/LoginGuarded/ChartRun.out +57 -0
  414. package/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.cfg +2 -0
  415. package/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.tla +64 -0
  416. package/skills/statechart/scripts/test/corpus/LoginGuarded/chart.mmd +28 -0
  417. package/skills/statechart/scripts/test/corpus/LoginGuarded/graph.dot +37 -0
  418. package/skills/statechart/scripts/test/corpus/LoginGuarded/report.md +8 -0
  419. package/skills/statechart/scripts/test/corpus/LoginGuarded/sany.out +1 -0
  420. package/skills/statechart/scripts/test/corpus/LoginGuarded/verdict-1.out +47 -0
  421. package/skills/statechart/scripts/test/corpus/LoginGuarded/view.mjs +1 -0
  422. package/skills/statechart/scripts/test/corpus/LoginParallel/ChartRun.out +60 -0
  423. package/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.cfg +3 -0
  424. package/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.tla +64 -0
  425. package/skills/statechart/scripts/test/corpus/LoginParallel/chart.mmd +44 -0
  426. package/skills/statechart/scripts/test/corpus/LoginParallel/graph.dot +58 -0
  427. package/skills/statechart/scripts/test/corpus/LoginParallel/report.md +17 -0
  428. package/skills/statechart/scripts/test/corpus/LoginParallel/sany.out +1 -0
  429. package/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.exit +1 -0
  430. package/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.out +83 -0
  431. package/skills/statechart/scripts/test/corpus/LoginParallel/verdict-2.out +57 -0
  432. package/skills/statechart/scripts/test/corpus/LoginParallel/view.mjs +1 -0
  433. package/skills/statechart/scripts/test/corpus/MediaPlayer/ChartRun.out +60 -0
  434. package/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.cfg +3 -0
  435. package/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.tla +103 -0
  436. package/skills/statechart/scripts/test/corpus/MediaPlayer/chart.mmd +43 -0
  437. package/skills/statechart/scripts/test/corpus/MediaPlayer/graph.dot +93 -0
  438. package/skills/statechart/scripts/test/corpus/MediaPlayer/report.md +14 -0
  439. package/skills/statechart/scripts/test/corpus/MediaPlayer/sany.out +1 -0
  440. package/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.exit +1 -0
  441. package/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.out +59 -0
  442. package/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-2.out +72 -0
  443. package/skills/statechart/scripts/test/corpus/MediaPlayer/view.mjs +3 -0
  444. package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/ChartRun.out +57 -0
  445. package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.cfg +2 -0
  446. package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.tla +100 -0
  447. package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/chart.mmd +31 -0
  448. package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/graph.dot +85 -0
  449. package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/report.md +9 -0
  450. package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/sany.out +1 -0
  451. package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/verdict-1.out +47 -0
  452. package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/view.mjs +3 -0
  453. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/ChartRun.out +59 -0
  454. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayer.tla +103 -0
  455. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.cfg +3 -0
  456. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.tla +6 -0
  457. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/chart.mmd +42 -0
  458. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/graph.dot +93 -0
  459. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/report.md +19 -0
  460. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/sany.out +2 -0
  461. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.exit +1 -0
  462. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.out +61 -0
  463. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-2.out +59 -0
  464. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-3.out +61 -0
  465. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.exit +1 -0
  466. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.out +66 -0
  467. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.exit +1 -0
  468. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.out +58 -0
  469. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-6.out +49 -0
  470. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/view.mjs +3 -0
  471. package/skills/statechart/scripts/test/corpus/PickWorker/ChartRun.out +57 -0
  472. package/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.cfg +6 -0
  473. package/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.tla +11 -0
  474. package/skills/statechart/scripts/test/corpus/PickWorker/chart.mmd +5 -0
  475. package/skills/statechart/scripts/test/corpus/PickWorker/graph.dot +11 -0
  476. package/skills/statechart/scripts/test/corpus/PickWorker/report.md +7 -0
  477. package/skills/statechart/scripts/test/corpus/PickWorker/sany.out +5 -0
  478. package/skills/statechart/scripts/test/corpus/PickWorker/verdict-1.out +70 -0
  479. package/skills/statechart/scripts/test/corpus/Shadow/ChartRun.out +61 -0
  480. package/skills/statechart/scripts/test/corpus/Shadow/Shadow.cfg +4 -0
  481. package/skills/statechart/scripts/test/corpus/Shadow/Shadow.tla +11 -0
  482. package/skills/statechart/scripts/test/corpus/Shadow/ShadowLib.tla +6 -0
  483. package/skills/statechart/scripts/test/corpus/Shadow/ShadowSub.tla +3 -0
  484. package/skills/statechart/scripts/test/corpus/Shadow/chart.mmd +9 -0
  485. package/skills/statechart/scripts/test/corpus/Shadow/graph.dot +16 -0
  486. package/skills/statechart/scripts/test/corpus/Shadow/report.md +8 -0
  487. package/skills/statechart/scripts/test/corpus/Shadow/sany.out +4 -0
  488. package/skills/statechart/scripts/test/corpus/Shadow/verdict-1.out +65 -0
  489. package/skills/statechart/scripts/test/corpus/SpacedNames/ChartRun.out +59 -0
  490. package/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.cfg +2 -0
  491. package/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.tla +9 -0
  492. package/skills/statechart/scripts/test/corpus/SpacedNames/chart.mmd +23 -0
  493. package/skills/statechart/scripts/test/corpus/SpacedNames/graph.dot +17 -0
  494. package/skills/statechart/scripts/test/corpus/SpacedNames/report.md +15 -0
  495. package/skills/statechart/scripts/test/corpus/SpacedNames/sany.out +1 -0
  496. package/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.exit +1 -0
  497. package/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.out +65 -0
  498. package/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.exit +1 -0
  499. package/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.out +75 -0
  500. package/skills/statechart/scripts/test/corpus/TwoPhase/ChartRun.out +69 -0
  501. package/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.cfg +3 -0
  502. package/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.tla +75 -0
  503. package/skills/statechart/scripts/test/corpus/TwoPhase/chart.mmd +60 -0
  504. package/skills/statechart/scripts/test/corpus/TwoPhase/graph.dot +297 -0
  505. package/skills/statechart/scripts/test/corpus/TwoPhase/report.md +20 -0
  506. package/skills/statechart/scripts/test/corpus/TwoPhase/sany.out +1 -0
  507. package/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.exit +1 -0
  508. package/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.out +95 -0
  509. package/skills/statechart/scripts/test/corpus/TwoPhase/verdict-2.out +57 -0
  510. package/skills/statechart/scripts/test/corpus/TwoPhase/view.mjs +1 -0
  511. package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/ChartRun.out +57 -0
  512. package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.cfg +3 -0
  513. package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.tla +75 -0
  514. package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/chart.mmd +37 -0
  515. package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/graph.dot +223 -0
  516. package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/report.md +11 -0
  517. package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/sany.out +1 -0
  518. package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/verdict-1.out +47 -0
  519. package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/view.mjs +1 -0
  520. package/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.exit +1 -0
  521. package/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.out +75 -0
  522. package/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.cfg +5 -0
  523. package/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.tla +11 -0
  524. package/skills/statechart/scripts/test/corpus/TypeGuard/chart.mmd +18 -0
  525. package/skills/statechart/scripts/test/corpus/TypeGuard/graph.dot +14 -0
  526. package/skills/statechart/scripts/test/corpus/TypeGuard/report.md +29 -0
  527. package/skills/statechart/scripts/test/corpus/TypeGuard/sany.out +2 -0
  528. package/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.exit +1 -0
  529. package/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.out +64 -0
  530. package/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.exit +1 -0
  531. package/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.out +75 -0
  532. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/ChartRun.out +58 -0
  533. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.cfg +2 -0
  534. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.tla +8 -0
  535. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/chart.mmd +22 -0
  536. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/graph.dot +16 -0
  537. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/report.md +15 -0
  538. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/sany.out +2 -0
  539. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.exit +1 -0
  540. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.out +56 -0
  541. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.exit +1 -0
  542. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.out +77 -0
  543. package/skills/statechart/scripts/test/corpus.test.ts +403 -0
  544. package/skills/statechart/scripts/test/differential.test.ts +565 -0
  545. package/skills/statechart/scripts/test/grid/Grid.cfg +2 -0
  546. package/skills/statechart/scripts/test/grid/Grid.tla +9 -0
  547. package/skills/statechart/scripts/test/grid/sany.out +2 -0
  548. package/skills/statechart/scripts/test/java.ts +63 -0
  549. package/skills/statechart/scripts/test/labels.ts +643 -0
  550. package/skills/statechart/scripts/test/messages.test.ts +212 -0
  551. package/skills/statechart/scripts/test/pipeline.test.ts +270 -0
  552. package/skills/statechart/scripts/test/plain-tlc.test.ts +255 -0
  553. package/skills/statechart/scripts/test/render.test.ts +81 -0
  554. package/skills/statechart/scripts/test/tlc-out.test.ts +90 -0
  555. package/skills/statechart/scripts/test/tlc.ts +158 -0
  556. package/skills/statechart/scripts/tsconfig.json +11 -0
  557. package/skills/statechart/scripts/worker.ts +35 -0
  558. package/skills/swarm/SKILL.md +41 -0
  559. package/skills/tdd/SKILL.md +42 -0
  560. package/skills/teach/SKILL.md +21 -0
  561. package/skills/technical-writing/SKILL.md +106 -0
  562. package/skills/typescript-best-practices/SKILL.md +32 -0
  563. package/skills/typescript-best-practices/references/patterns.md +328 -0
  564. package/skills/unslop/SKILL.md +62 -0
  565. package/skills/why/SKILL.md +98 -0
  566. package/skills/why/references/epistemics.md +71 -0
  567. package/skills/why/references/investigator-prompt.md +84 -0
  568. package/skills/why/references/source-playbook.md +17 -0
  569. package/skills/why/references/sources/code-archaeology.md +51 -0
  570. package/skills/why/references/sources/databricks.md +70 -0
  571. package/skills/why/references/sources/datadog.md +97 -0
  572. package/skills/why/references/sources/incident-postmortem.md +5 -0
  573. package/skills/why/references/sources/linear.md +48 -0
  574. package/skills/why/references/sources/notion.md +55 -0
  575. package/skills/why/references/sources/sentry.md +66 -0
  576. package/skills/why/references/sources/slack.md +17 -0
  577. package/skills/why/references/synthesizer-prompt.md +129 -0
  578. package/src/aliases.ts +64 -0
  579. package/src/ask.ts +131 -0
  580. package/src/autocomplete.ts +21 -0
  581. package/src/child-env.ts +44 -0
  582. package/src/index.ts +123 -0
  583. package/src/loop.ts +189 -0
  584. package/src/mode.ts +156 -0
  585. package/src/modes.ts +8 -0
  586. package/src/paths.ts +72 -0
  587. package/src/plan.ts +141 -0
  588. package/src/readonly-shell.ts +107 -0
  589. package/src/rule.ts +56 -0
  590. package/src/sections.ts +117 -0
  591. package/src/subscriptions/cron.ts +75 -0
  592. package/src/subscriptions/github.ts +149 -0
  593. package/src/subscriptions/index.ts +547 -0
  594. package/src/subscriptions/webhook.ts +209 -0
  595. package/src/task/agents.ts +55 -0
  596. package/src/task/card.ts +32 -0
  597. package/src/task/format.ts +88 -0
  598. package/src/task/models.ts +140 -0
  599. package/src/task/records.ts +232 -0
  600. package/src/task/registry.ts +77 -0
  601. package/src/task/runner.ts +370 -0
  602. package/src/task/status.ts +170 -0
  603. package/src/task/stop.ts +100 -0
  604. package/src/task/tool.ts +491 -0
  605. package/src/task/worktree.ts +67 -0
  606. package/src/todo.ts +122 -0
  607. package/src/visualize.ts +244 -0
  608. package/test/aliases.test.ts +57 -0
  609. package/test/ask.test.ts +85 -0
  610. package/test/autocomplete.test.ts +39 -0
  611. package/test/e2e/aliases.e2e.test.ts +81 -0
  612. package/test/e2e/ask.e2e.test.ts +135 -0
  613. package/test/e2e/harness.ts +179 -0
  614. package/test/e2e/host.e2e.test.ts +193 -0
  615. package/test/e2e/lifecycle.e2e.test.ts +99 -0
  616. package/test/e2e/mode.e2e.test.ts +160 -0
  617. package/test/e2e/package.e2e.test.ts +67 -0
  618. package/test/e2e/task.e2e.test.ts +734 -0
  619. package/test/e2e/todo.e2e.test.ts +59 -0
  620. package/test/fixtures/cursor-askquestion-calls.json +806 -0
  621. package/test/fixtures/fake-pi.mjs +96 -0
  622. package/test/fixtures/image-model.ts +16 -0
  623. package/test/fixtures/list-models.ts +15 -0
  624. package/test/fixtures/readonly-shell-exit.ts +17 -0
  625. package/test/fixtures/scripted-model.ts +113 -0
  626. package/test/loop.test.ts +209 -0
  627. package/test/mode.test.ts +143 -0
  628. package/test/plan.test.ts +126 -0
  629. package/test/readonly-shell-security.test.ts +84 -0
  630. package/test/readonly-shell.test.ts +44 -0
  631. package/test/records.test.ts +143 -0
  632. package/test/registry.test.ts +18 -0
  633. package/test/resources.test.ts +162 -0
  634. package/test/rule.test.ts +92 -0
  635. package/test/scripts.test.ts +182 -0
  636. package/test/sections.test.ts +56 -0
  637. package/test/subscriptions-cron.test.ts +60 -0
  638. package/test/subscriptions.test.ts +598 -0
  639. package/test/task-agents.test.ts +49 -0
  640. package/test/task-card.test.ts +34 -0
  641. package/test/task-fork.test.ts +233 -0
  642. package/test/task-format.test.ts +65 -0
  643. package/test/task-model.test.ts +141 -0
  644. package/test/task-runner.test.ts +259 -0
  645. package/test/task-schema.test.ts +50 -0
  646. package/test/task-status.test.ts +155 -0
  647. package/test/task-worktree.test.ts +106 -0
  648. package/test/todo.test.ts +74 -0
  649. package/test/visualize.test.ts +152 -0
  650. package/tsconfig.json +5 -0
  651. package/vitest.config.ts +16 -0
@@ -0,0 +1,257 @@
1
+ #!/usr/bin/env node
2
+ // Runs pstack scenarios against a real model through the Pi CLI and records what the model did.
3
+ // Usage: live-e2e.mjs [--model provider/id] [--scenario poteto|delegate|nocomments|setup|all] [--out <dir>] [--tag <name>]
4
+ // [--rule <file>] [--providers claude-subscription]
5
+ // --rule copies a pstack-models.md into the throwaway agent directory first, for example to bound subagent cost.
6
+ // --providers loads extra provider packages so their models are available without driving the run.
7
+ // It needs credentials in the user's Pi auth.json. Each scenario uses a throwaway workspace, HOME, and agent
8
+ // directory, and auth.json is symlinked rather than copied. Pi writes refreshed OAuth tokens through that symlink,
9
+ // so an OAuth refresh during a live run updates the user's real auth.json, and its lock file sits beside the
10
+ // symlink rather than the real file; avoid running OAuth-provider scenarios while another Pi session refreshes.
11
+ // The model under test has bash and write tools, so it could read or overwrite the real auth.json through that
12
+ // symlink. Run it only with models and prompts you trust, and review the recorded tool calls in the evidence file.
13
+ import { execFileSync, spawn } from 'node:child_process';
14
+ import { existsSync, mkdirSync, mkdtempSync, readFileSync, realpathSync, rmSync, symlinkSync, writeFileSync } from 'node:fs';
15
+ import { homedir, tmpdir } from 'node:os';
16
+ import { dirname, join, resolve } from 'node:path';
17
+ import { fileURLToPath } from 'node:url';
18
+
19
+ import { resolveSubagentModel } from '../src/task/models.ts';
20
+
21
+ const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');
22
+ const repoRoot = resolve(packageRoot, '../..');
23
+ const cli = join(packageRoot, 'node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli.js');
24
+ const userAgentDir = process.env.PI_CODING_AGENT_DIR ?? join(homedir(), '.pi/agent');
25
+ const ROLES = [
26
+ 'feature, refactoring',
27
+ 'bug-fix',
28
+ 'perf-issue',
29
+ 'hillclimb',
30
+ 'judgment and prose',
31
+ 'hardest tasks',
32
+ 'how explorer',
33
+ 'how explainer',
34
+ 'why investigators',
35
+ 'why synthesizer',
36
+ 'reflect tooling',
37
+ 'reflect judgment, divergent, synthesizer',
38
+ 'arena runners',
39
+ 'arena cross-judge pool',
40
+ 'swarm workers',
41
+ 'architect runners',
42
+ 'interrogate reviewers',
43
+ ];
44
+
45
+ const PROVIDER_PACKAGES = { 'claude-subscription': 'extensions/pi-anthropic-oauth' };
46
+
47
+ function sandbox(model, ruleFile, providers) {
48
+ const root = realpathSync(mkdtempSync(join(tmpdir(), 'pstack-live-')));
49
+ const agentDir = join(root, 'agent');
50
+ const work = join(root, 'work');
51
+ mkdirSync(agentDir);
52
+ mkdirSync(work);
53
+ mkdirSync(join(root, 'home'));
54
+ symlinkSync(join(userAgentDir, 'auth.json'), join(agentDir, 'auth.json'));
55
+ // Only the driver's provider loads, so default role models such as claude-opus-5-5-xhigh cannot bill a subscription unasked.
56
+ const wanted = new Set([model.split('/')[0], ...providers]);
57
+ const packages = [
58
+ packageRoot,
59
+ ...Object.entries(PROVIDER_PACKAGES)
60
+ .filter(([provider]) => wanted.has(provider))
61
+ .map(([, path]) => join(repoRoot, path)),
62
+ ];
63
+ writeFileSync(join(agentDir, 'settings.json'), JSON.stringify({ packages, quietStartup: true, defaultProvider: model.split('/')[0], defaultModel: model.split('/')[1] }));
64
+ if (ruleFile !== undefined) {
65
+ mkdirSync(join(agentDir, 'pstack'));
66
+ writeFileSync(join(agentDir, 'pstack/pstack-models.md'), readFileSync(ruleFile));
67
+ }
68
+ const git = (...args) => execFileSync('git', ['-C', work, ...args], { stdio: 'ignore' });
69
+ git('init', '-q', '-b', 'main');
70
+ return { root, agentDir, work, git, env: { ...process.env, HOME: join(root, 'home'), PI_CODING_AGENT_DIR: agentDir } };
71
+ }
72
+
73
+ function commitAll(box, message) {
74
+ box.git('add', '-A');
75
+ box.git('-c', 'user.email=live@example.com', '-c', 'user.name=live', 'commit', '-qm', message);
76
+ }
77
+
78
+ function runPi(box, model, prompt, timeoutMs) {
79
+ return new Promise((resolveRun) => {
80
+ const started = Date.now();
81
+ const child = spawn(process.execPath, [cli, '--mode', 'json', '--no-session', '--model', model, prompt], { cwd: box.work, env: box.env, stdio: ['ignore', 'pipe', 'pipe'] });
82
+ const events = [];
83
+ let buffer = '';
84
+ let stderr = '';
85
+ const timer = setTimeout(() => child.kill('SIGTERM'), timeoutMs);
86
+ child.stdout.on('data', (chunk) => {
87
+ buffer += chunk.toString('utf8');
88
+ for (let index = buffer.indexOf('\n'); index !== -1; index = buffer.indexOf('\n')) {
89
+ const line = buffer.slice(0, index).trim();
90
+ buffer = buffer.slice(index + 1);
91
+ if (line !== '') events.push(JSON.parse(line));
92
+ }
93
+ });
94
+ child.stderr.on('data', (chunk) => {
95
+ stderr += chunk.toString('utf8');
96
+ });
97
+ child.on('close', (code) => {
98
+ clearTimeout(timer);
99
+ resolveRun({ events, code, stderr: stderr.slice(-4000), seconds: Math.round((Date.now() - started) / 1000) });
100
+ });
101
+ });
102
+ }
103
+
104
+ function toolCalls(events) {
105
+ return events
106
+ .filter((event) => event.type === 'message_end' && event.message?.role === 'assistant')
107
+ .flatMap((event) => event.message.content.filter((part) => part.type === 'toolCall').map((part) => ({ name: part.name, arguments: part.arguments })));
108
+ }
109
+
110
+ function finalText(events) {
111
+ const last = events.filter((event) => event.type === 'message_end' && event.message?.role === 'assistant').at(-1);
112
+ return (last?.message.content ?? [])
113
+ .filter((part) => part.type === 'text')
114
+ .map((part) => part.text)
115
+ .join('')
116
+ .slice(0, 3000);
117
+ }
118
+
119
+ const playbookSteps = (name) =>
120
+ readFileSync(join(packageRoot, `skills/poteto-mode/playbooks/${name}.md`), 'utf8')
121
+ .split('\n')
122
+ .filter((line) => /^\d+\. /.test(line))
123
+ .map((line) => line.replace(/^\d+\. /, ''));
124
+
125
+ const SCENARIOS = {
126
+ poteto: {
127
+ requirement: 'LIVE-001',
128
+ prompt: '/poteto-mode How does add in calc.js treat two numeric strings such as "2" and "3"? This is a read-only question; do not change any files.',
129
+ prepare: (box) => {
130
+ writeFileSync(join(box.work, 'calc.js'), 'export function add(a, b) {\n return a + b;\n}\n');
131
+ commitAll(box, 'calc');
132
+ },
133
+ check: (calls, box) => {
134
+ const steps = playbookSteps('investigation');
135
+ const playbook = 'poteto-mode/playbooks/investigation.md';
136
+ const readPlaybook = calls.some((call) => (call.name === 'read' && String(call.arguments.path ?? '').endsWith(playbook)) || (call.name === 'bash' && String(call.arguments.command ?? '').includes(playbook)));
137
+ const todos = calls.find((call) => call.name === 'TodoWrite')?.arguments.todos ?? [];
138
+ // A todo list is plain text, so Markdown emphasis marks (** and backticks) are dropped before comparing.
139
+ const plain = (text) => text.replace(/\*\*|`/g, '');
140
+ const verbatim = steps.map((step, index) => typeof todos[index]?.content === 'string' && plain(todos[index].content) === plain(step));
141
+ const clean = execFileSync('git', ['-C', box.work, 'status', '--porcelain'], { encoding: 'utf8' }).trim() === '';
142
+ return { readPlaybook, firstTodosAreStepsVerbatim: verbatim.every(Boolean), stepMatches: verbatim, workspaceUnchanged: clean, todos: todos.map((todo) => todo.content) };
143
+ },
144
+ },
145
+ delegate: {
146
+ requirement: 'LIVE-004',
147
+ prompt: '/poteto-mode Delegate to one foreground poteto-agent: find what calc.js exports. Read-only.',
148
+ prepare: (box) => {
149
+ writeFileSync(join(box.work, 'calc.js'), 'export const add = (a, b) => a + b;\n');
150
+ commitAll(box, 'calc');
151
+ },
152
+ check: (calls) => {
153
+ // pstack 0.15.21: the parent puts poteto-mode's absolute SKILL.md path in every poteto-agent prompt.
154
+ const skillPath = join(packageRoot, 'skills/poteto-mode/SKILL.md');
155
+ const delegates = calls.filter((call) => call.name === 'Task' && call.arguments.subagent_type === 'poteto-agent');
156
+ return {
157
+ delegated: delegates.length > 0,
158
+ everyPromptHasSkillPath: delegates.length > 0 && delegates.every((call) => String(call.arguments.prompt ?? '').includes(skillPath)),
159
+ prompts: delegates.map((call) => String(call.arguments.prompt ?? '').slice(0, 400)),
160
+ };
161
+ },
162
+ },
163
+ nocomments: {
164
+ requirement: 'LIVE-002',
165
+ prompt: '/no-comments',
166
+ prepare: (box) => {
167
+ writeFileSync(join(box.work, 'util.js'), 'export function add(a, b) {\n return a + b;\n}\n');
168
+ commitAll(box, 'util');
169
+ writeFileSync(join(box.work, 'util.js'), '// This function adds two numbers together\nexport function add(a, b) {\n // return the sum of a and b\n return a + b;\n}\n');
170
+ },
171
+ check: (calls) => {
172
+ const tasks = calls.filter((call) => call.name === 'Task');
173
+ return { spawnedCommentSicko: tasks.some((call) => call.arguments.subagent_type === 'comment-sicko'), taskTypes: tasks.map((call) => call.arguments.subagent_type ?? '(default)') };
174
+ },
175
+ },
176
+ setup: {
177
+ requirement: 'LIVE-003',
178
+ prompt:
179
+ "/setup-pstack Use the large budget and keep the skill's mapping. For a role whose default model is not available, use the closest available model of the same family, else inherit-parent. Do not ask me anything; write the rule now.",
180
+ prepare: () => undefined,
181
+ check: (_calls, box, model) => {
182
+ const rule = join(box.agentDir, 'pstack/pstack-models.md');
183
+ const text = existsSync(rule) ? readFileSync(rule, 'utf8') : '';
184
+ const missing = ROLES.filter((role) => !text.split('\n').some((line) => line.startsWith(`${role}:`)));
185
+ const values = text
186
+ .split('\n')
187
+ .filter((line) => ROLES.some((role) => line.startsWith(`${role}:`)))
188
+ .flatMap((line) => line.slice(line.indexOf(':') + 1).split(','))
189
+ .map((value) => value.trim());
190
+ const available = listModels(box);
191
+ const parent = { provider: model.split('/')[0], id: model.split('/')[1] };
192
+ const unresolved = values.filter((value) => {
193
+ try {
194
+ resolveSubagentModel(value, available, parent);
195
+ return false;
196
+ } catch {
197
+ return true;
198
+ }
199
+ });
200
+ return {
201
+ ruleWritten: text !== '',
202
+ noFrontmatter: !text.startsWith('---'),
203
+ missingRoles: missing,
204
+ distinctValues: [...new Set(values)],
205
+ unresolvedValues: unresolved,
206
+ rule: text,
207
+ };
208
+ },
209
+ },
210
+ };
211
+
212
+ /** The models the throwaway agent directory exposes, with the thinking levels Pi supports for each, as Task sees them. */
213
+ function listModels(box) {
214
+ const fixture = join(packageRoot, 'test/fixtures/list-models.ts');
215
+ const output = execFileSync(process.execPath, [cli, '-p', '--offline', '--no-session', '-e', fixture, '/list-models'], { cwd: box.work, env: box.env, encoding: 'utf8' });
216
+ return output
217
+ .split('\n')
218
+ .filter((line) => line.startsWith('{'))
219
+ .map((line) => JSON.parse(line));
220
+ }
221
+
222
+ async function runScenario(name, model, outDir, tag, ruleFile, providers) {
223
+ const scenario = SCENARIOS[name];
224
+ const box = sandbox(model, ruleFile, providers);
225
+ try {
226
+ scenario.prepare(box);
227
+ const run = await runPi(box, model, scenario.prompt, 15 * 60_000);
228
+ const calls = toolCalls(run.events);
229
+ const result = {
230
+ scenario: name,
231
+ requirement: scenario.requirement,
232
+ model,
233
+ prompt: scenario.prompt,
234
+ exitCode: run.code,
235
+ seconds: run.seconds,
236
+ checks: scenario.check(calls, box, model),
237
+ toolCalls: calls.map((call) => ({ name: call.name, arguments: JSON.stringify(call.arguments).slice(0, 600) })),
238
+ finalText: finalText(run.events),
239
+ stderrTail: run.stderr,
240
+ };
241
+ writeFileSync(join(outDir, `live-${name}${tag === undefined ? '' : `-${tag}`}.json`), `${JSON.stringify(result, null, 2)}\n`);
242
+ process.stdout.write(`${name}: ${JSON.stringify(result.checks)}\n`);
243
+ } finally {
244
+ rmSync(box.root, { recursive: true, force: true });
245
+ }
246
+ }
247
+
248
+ const argv = process.argv.slice(2);
249
+ const option = (name, fallback) => (argv.includes(name) ? argv[argv.indexOf(name) + 1] : fallback);
250
+ const model = option('--model', 'deepseek/deepseek-flash');
251
+ const outDir = resolve(option('--out', join(repoRoot, 'parity/pi-pstack-two/evidence')));
252
+ const chosen = option('--scenario', 'all');
253
+ const tag = option('--tag', undefined);
254
+ const ruleFile = argv.includes('--rule') ? resolve(option('--rule', '')) : undefined;
255
+ const providers = option('--providers', '').split(',').filter(Boolean);
256
+ mkdirSync(outDir, { recursive: true });
257
+ for (const name of chosen === 'all' ? Object.keys(SCENARIOS) : [chosen]) await runScenario(name, model, outDir, tag, ruleFile, providers);
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: architect
3
+ description: "Sketch types, signatures, and module structure before code, then stay in the loop while implementation fills in. Use for /architect, 'architect this', 'design this', or non-trivial work where jumping to code would lock in the wrong shape."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Architect
8
+
9
+ Sketch types, function signatures, class shapes, and module boundaries with `not implemented` bodies and pseudocode. Synthesize across multiple model perspectives, then fill in code against the chosen sketch.
10
+
11
+ ## Start
12
+
13
+ Open a todolist with one entry per phase before starting.
14
+
15
+ 1. Ground
16
+ 2. Sketch
17
+ 3. Agree
18
+ 4. Implement
19
+ 5. Scrap
20
+
21
+ ## Phase A: Ground the problem
22
+
23
+ Build a real mental model of every system the new code touches. Run the **how** skill over the relevant subsystems. Naming a file isn't grounding. Produce the architectural explanation `how` prescribes. If the design redefines ownership or layering, also run the **why** skill on the existing shape so the rationale becomes a constraint, not a guess.
24
+
25
+ Skip Phase A only when the work is genuinely greenfield with no surrounding system to integrate.
26
+
27
+ ## Phase B: Sketch
28
+
29
+ Run the **arena** skill with the design-sketch task and the Phase A grounding artifacts. Pass `references/runner-prompt.md` as each runner's prompt.
30
+
31
+ Take the runners from the `architect runners` line in the model rule (`~/.pi/agent/pstack/pstack-models.md`), in place of the `arena runners` line. If the rule or that line is missing, use `claude-opus-5-5:xhigh` and `grok-4.7:xhigh`. Alias and rejected entries follow the runner rules in the **arena** skill's Phase A.
32
+
33
+ Design it twice. Require at least two structurally distinct candidates before synthesis, even when the first looks sufficient. This is the **exhaust-the-design-space** principle skill made concrete. Whole-shape alternatives, not point fixes inside one shape.
34
+
35
+ Screen every candidate against [`references/design-red-flags.md`](references/design-red-flags.md) before synthesis. Assume the next contributor is an agent that sees only the files it opened, copies the nearest example, and takes the shortest path that compiles. Prefer the design where a change that looks right from one file is right for the whole repo.
36
+
37
+ Compare viable candidates on interface depth. Prefer the design that hides more complexity behind a smaller, simpler public surface. A rich interface can keep call chains short by concentrating capability instead of scattering it across layers.
38
+
39
+ Arena returns one synthesized design package. Its synthesis decision fills the rationale's "Synthesis decision" section.
40
+
41
+ ## Phase C: Agree (opt-in)
42
+
43
+ Default: proceed directly to implementation with the synthesized design. No human checkpoint.
44
+
45
+ Opt in to a checkpoint when the invoker explicitly asks: "/architect with checkpoint," "stop and show me before implementing," or similar. Then surface the synthesized design and pause for sign-off.
46
+
47
+ The synthesis can ship as its own commit either way, as the "scaffold first" mode of the **foundational-thinking** principle skill. Planned and scoped breakage during fill-in is fine, per the **outcome-oriented-execution** principle skill. For adversarial pressure on the design before implementing, run the **interrogate** skill on the synthesized sketch.
48
+
49
+ If the human pushes back on the shape (in a checkpoint or after the fact), treat that as Phase A evidence. Re-ground and re-run Phase B before writing more code.
50
+
51
+ ## Phase D: Implement against the sketch
52
+
53
+ Replace `not implemented` bodies with code, pseudocode with logic. The synthesized sketch is the contract. Deviations from it are signal to surface, not friction to absorb silently. If a function needs a parameter the sketch didn't anticipate, ask whether the sketch was wrong, the requirement was missed, or the implementation is overreaching.
54
+
55
+ ## Phase E: Scrap when the architecture is wrong
56
+
57
+ If implementation keeps producing friction the sketch can't absorb, throw the sketch out. Don't bolt fixes onto a wrong design, per the **redesign-from-first-principles** and **fix-root-causes** principle skills.
58
+
59
+ The signal is a *pattern*, not single instances. Tells:
60
+
61
+ - The same shape of workaround appearing repeatedly across unrelated code.
62
+ - Multiple unrelated edge cases that all need special-case branches.
63
+ - Types that need escape hatches (`any`, casts, optional fields always set in practice) to compile.
64
+ - The "we need a lock" reflex when the sketch said the state wasn't shared.
65
+ - Callers having to know the abstraction's internal rules to use it.
66
+ - Two or more independent Phase D deviations of the same shape across the implementation.
67
+
68
+ Use judgment. A few edge cases don't condemn an architecture. Some problems are legitimately complex. Complexity in the data is not complexity in the design.
69
+
70
+ When you scrap:
71
+
72
+ 1. Re-run the **how** skill over what's been built.
73
+ 2. Redesign as if the new constraints had been day-one assumptions, per redesign-from-first-principles.
74
+ 3. Subtract before adding, per the **subtract-before-you-add** principle skill. The new sketch should be smaller than the old one before it grows.
75
+ 4. Return to Phase B and re-run arena.
76
+
77
+ ## Outputs
78
+
79
+ The caller's usage is written first and the type sketch derived from it. One file with new types and signatures for small changes. Module map plus type definitions for larger work. The rationale ships alongside, shaped per `references/rationale-template.md`, including the usage sketch and the synthesis decision.
@@ -0,0 +1,57 @@
1
+ # Design red flags
2
+
3
+ Screen every candidate before synthesis. A red flag is a reason to revise or reject the shape.
4
+
5
+ ## Shallow module
6
+
7
+ A shallow module exposes a large interface while hiding little complexity. Judge depth by the capability and policy hidden behind the public surface relative to the size of that surface. Prefer a simple interface backed by substantial behavior.
8
+
9
+ Do not confuse a deep module with a deep call chain. A deep call chain scatters understanding across layers. A deep module concentrates capability behind one interface.
10
+
11
+ Look for these signs:
12
+
13
+ - Callers coordinate several methods to complete one operation.
14
+ - Public options expose internal stages or implementation choices.
15
+ - Learning the interface does not save the caller from learning the implementation.
16
+
17
+ ## Information leakage
18
+
19
+ Information leakage makes multiple modules depend on the same internal decision. A representation, policy, or protocol detail appears in more than one place, so changing it requires coordinated edits.
20
+
21
+ Public re-exports of transport or wire types are leakage. Parse external data into domain types behind the interface. Keep storage schemas, framework objects, and protocol details private.
22
+
23
+ ## Temporal decomposition
24
+
25
+ Temporal decomposition organizes modules by execution order instead of the knowledge they own. Separate load, validate, transform, and save stages often repeat one representation and its invariants across several boundaries.
26
+
27
+ Group code around domain knowledge and ownership. Methods that run at different times can still belong to one module when they protect the same decisions.
28
+
29
+ ## Pass-through method
30
+
31
+ A pass-through method forwards the same arguments to another method with the same shape. It adds a layer without hiding complexity.
32
+
33
+ Remove it or move responsibility to the module that can complete the operation. Keep a forwarding boundary only when it adds policy, adaptation, or a distinct abstraction.
34
+
35
+ ## Split ownership
36
+
37
+ More than one module writes the same state or keeps its own copy of it. An agent that edits one writer can't see the others, so their rules diverge.
38
+
39
+ Give each piece of state one owner. Other modules read it or ask the owner to change it.
40
+
41
+ ## Two ways to do one task
42
+
43
+ The design supports more than one way to do the same task. An agent copies whichever way it finds first, so every way keeps gaining callers.
44
+
45
+ Keep one way. Move callers off the others and delete them in the same change.
46
+
47
+ ## Importable internals
48
+
49
+ A caller can import a module's internals. An agent takes the shortest path that compiles, so it imports them directly and they become part of the interface.
50
+
51
+ Make internals unreachable from outside the module, so an import from outside fails the build.
52
+
53
+ ## Hand-synced list
54
+
55
+ Two or more places list the same items, and adding an item means editing every list. An agent that sees one list updates only that one.
56
+
57
+ Keep one list and derive the others from it. If a list can't be derived, make the build fail when the lists disagree.
@@ -0,0 +1,35 @@
1
+ # Rationale template
2
+
3
+ The prose that ships alongside the type sketch. One page. Sentence-case headings, no boilerplate. Replace the italic notes with actual content.
4
+
5
+ ## Problem
6
+
7
+ *One paragraph. What we're trying to do, and what about the existing system or constraints makes the shape non-obvious. If [Phase A](../SKILL.md#phase-a-ground-the-problem) surfaced constraints the design must honor (existing types to interop with, callers we can't break, invariants that crossed our boundary), name them here so the reader sees the same constraints you saw.*
8
+
9
+ ## Usage (caller's view)
10
+
11
+ *Write this first, before the type sketch. Show the README or quickstart the consumer reads, plus two or three realistic call sites in their own code. What they import, what they call, what comes back. The type sketch in [Shape](#shape) is derived from this. The two must agree. When they diverge, reconcile the sketch to the usage, not the reverse. The caller's experience is the spec. The types serve it.*
12
+
13
+ ## Shape
14
+
15
+ *The recommended architecture. Data structures first. Then how data flows through the signatures. Name the load-bearing decisions. State which invariants are encoded in types, where validation lives, and what the system deliberately does not do. Judge interface depth explicitly. State what complexity the public surface hides, what remains exposed to callers, and why the interface is no larger than needed. Cite the principle behind each decision (e.g., `per boundary-discipline`). Don't restate it.*
16
+
17
+ ## Synthesis decision
18
+
19
+ *Filled in by [arena](../../arena/SKILL.md). Records which candidate became the base and why, what was adapted from each of the others, and what was rejected and why.*
20
+
21
+ ## Tradeoffs accepted
22
+
23
+ *One bullet per tradeoff the chosen shape makes. Form: "we accept X in exchange for Y." Name anything a future reader might mistake for an oversight, including things that look like premature optimization or premature simplification.*
24
+
25
+ ## Alternatives considered
26
+
27
+ *Required. Name at least one concrete alternative shape, with one line on why it lost. Judge each alternative on interface depth, not implementation simplicity alone. Name the complexity it exposes to callers and the complexity it hides. Two or three alternatives belong here when the design space had real contenders. One is fine when the constraints forced the answer, with the conclusion phrased as "this was the only viable shape because..." Avoid listing flavors of the same shape. This section covers design alternatives the chosen shape considered and rejected, not other runner candidates.*
28
+
29
+ ## Open questions and risks
30
+
31
+ *Things you noticed during the sketch that the human needs to weigh in on, and risks worth flagging before implementation starts. Phrase as questions, not assertions, so the human's answer is the resolution rather than a comment.*
32
+
33
+ ## Next implementation step
34
+
35
+ *The first thing to build against the sketch. One sentence. What you'd start writing immediately after synthesis (or after Phase D sign-off, if a checkpoint was opted into).*
@@ -0,0 +1,20 @@
1
+ # Architect runner prompt
2
+
3
+ The orchestrator passes this file through to every parallel candidate runner during Phase B and fills in the variable inputs around it: the task, the Phase A grounding artifacts, the isolated working directory, and the path to write outputs. The working directory is a git worktree when available, otherwise a per-runner subdirectory under the sketch dir. What matters is independence between candidates.
4
+
5
+ You are producing one candidate design in architect's parallel exploration. Read the **architect** skill in full first. That's the workflow you're inside. Output a candidate design package: type sketch, function signatures, module map, and prose rationale shaped per [`rationale-template.md`](rationale-template.md).
6
+
7
+ Apply the following discipline. The orchestrator compares candidates on these axes to pick a base.
8
+
9
+ - Caller's usage first. Write the README-style usage and two or three real call sites before the types, then derive the type sketch from them. The usage is the spec. The two must agree, so reconcile the sketch to the usage, not the reverse.
10
+ - Data structures first. Get the core types right and the code becomes obvious. Trace each dominant access pattern through the proposed structure. If the answer is "we'll add a map / index / cache later," the structure is wrong.
11
+ - Interface depth. Compare the capability hidden behind the public surface relative to the size of that surface. Prefer a simple interface that pulls complexity into the callee, even when the implementation becomes less simple. Do not put transport or wire types on the public API. Parse into domain types behind the interface.
12
+ - Shared state: if two actors might both write, ask "what happens?" If the answer isn't "nothing," default to per-actor state with a merge at the read boundary, per the **separate-before-serializing-shared-state** principle skill.
13
+ - Make boundaries visible. `not implemented` errors for bodies, `// TODO` pseudocode for tricky logic, doc comments stating intent and invariants. A reader should trace data from input to output by reading types and signatures alone.
14
+ - Encode invariants in types: hard-to-misuse types > runtime checks > prose comments, per the **encode-lessons-in-structure** principle skill.
15
+ - Validate at boundaries, trust types inside, per the **boundary-discipline** principle skill. Business logic as pure functions. The shell stays thin.
16
+ - Single source of truth per invariant. Derive instead of sync.
17
+ - Idempotent state transitions where applicable, per the **make-operations-idempotent** principle skill. Ask what happens if the operation runs twice or crashes halfway.
18
+ - Short call chains. If tracing the flow needs more than three files, flatten the hierarchy, per the **laziness-protocol** and **minimize-reader-load** principle skills.
19
+
20
+ You are one of the parallel runners, each on a different model. Produce the best design your model can make. Don't hedge against the others. Differences between candidates are the signal used to pick a base and graft. Converging on a safe-looking middle defeats the exploration.
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: arena
3
+ description: "Spawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it. Use for /arena, 'arena this', 'throw it in the arena', or when one attempt at a non-trivial artifact would lock in the wrong shape."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Arena
8
+
9
+ Open a todolist with one entry per phase (Frame, Fan out, Cross-judge, Pick, Graft, Verify) before launching anything.
10
+
11
+ ## Phase A: Frame
12
+
13
+ Every candidate gets the same prompt, so the prompt is the contract.
14
+
15
+ 1. State the artifact each candidate is producing.
16
+ 2. Derive the rubric, 3-6 concrete gradeable criteria for what success looks like on *this* task. It is the picker's tool in Phase D. Candidates only see the task.
17
+ 3. Pick the runners. Use the `arena runners` line in `~/.pi/agent/pstack/pstack-models.md`. If the rule or that line is missing, default to one each on `claude-opus-5-5:xhigh` and `grok-4.7:xhigh`. An `auto` or `inherit-parent` entry in this line means the parent model, so omit `model` for it. If the Task tool rejects a configured entry, run that seat on its family's default and say so. Families go by the model id after the provider: `claude-*` and `grok-*`. If the family has no default, or the Task tool rejects that default, use the closest valid slug of the same family from its error message, or drop the seat and say so when there is none. If dropped seats leave fewer than two runners, add runners until there are two, or one when the line has one entry. Run each added runner on a remaining runner's model, or omit `model` so it runs on the parent model when none remain, and say so. Spawn more runners when the arena covers multiple design directions. Use the same model N times when the work is generation-bound rather than judgment-sensitive. Pick each subagent's reasoning level (the `:<level>` suffix), and fast or standard speed when the model has a `-fast` variant, for the job, per the Subagents section of the **poteto-mode** skill.
18
+ 4. Give each candidate its own output location (a git worktree where possible, otherwise `/tmp/arena-<slug>/candidate-<n>/`), per the **separate-before-serializing-shared-state** principle skill.
19
+
20
+ ## Phase B: Fan out
21
+
22
+ Spawn all N subagents in one message with `run_in_background: true`, each with the task, the path to the shared grounding, its own output path, and instructions to produce the artifact and a short rationale naming the alternatives it considered and what it rejected.
23
+
24
+ If a candidate produces no output, proceed with N-1 and note the dropout.
25
+
26
+ ## Phase C: Cross-judge
27
+
28
+ After all Phase B candidates complete, choose one model from the `arena cross-judge pool` line in `~/.pi/agent/pstack/pstack-models.md`. If the rule or that line is missing, choose from `claude-opus-5-5:xhigh` and `grok-4.7:xhigh`. Spawn one readonly judge subagent. The judge is never from the parent's family, as Phase A step 3 defines families. Try only the entries from another family, in pool order. An `auto` or `inherit-parent` entry is the parent model, so it never judges. With the default pool, a Claude parent gets `grok-4.7:xhigh`. A parent from any other family gets `claude-opus-5-5:xhigh` first. If the Task tool rejects an entry, use a valid slug of the same model at the closest level or speed from the error message, or move to the next entry when there is none. If no entry from another family runs, try the default pool's entries from another family the same way. If none of those runs, skip the judge, pick the base alone in Phase D, and say so. If you do not know the parent's model, try the pool's real slugs in pool order and say that the family check did not run. The judge sees the rubric and the candidates by path label, scores each criterion, and recommends a base with rationale. It runs in parallel with your reading in Phase D. Don't spawn it while candidates are still writing.
29
+
30
+ ## Phase D: Pick a base
31
+
32
+ Read every candidate end to end before picking. Score each against the rubric criterion by criterion, not on holistic feel, and compare with the cross-judge when Phase C ran one. Agreement on the base confirms the pick. Disagreement means one of you is biased or the rubric was ambiguous. Read both rationales before deciding.
33
+
34
+ Pick the base a future maintainer can extend most easily without breaking invariants. When two feel tied, prefer the cleaner boundary or smaller API, per the Laziness Protocol.
35
+
36
+ ## Phase E: Graft
37
+
38
+ Walk each losing candidate once more for what is worth porting into the base, usually one or two things per candidate, not most of it. Fold each graft in by hand, per the **redesign-from-first-principles** principle skill, so the result stays coherent under one mental model. Don't paste mechanically.
39
+
40
+ If the candidates converge on one shape, that is strong agreement. Note it and ship the consensus shape. No graft is needed. If they wildly diverge, Phase A was under-specified. Reframe and re-run rather than averaging the divergence.
41
+
42
+ ## Phase F: Verify
43
+
44
+ Verify the synthesized artifact like any other output, per the **prove-it-works** principle skill. If verification finds a problem the arena missed, either Phase A was wrong (re-frame and re-run) or a candidate caught it and you missed the graft (go back to Phase E). Don't paper over it.
45
+
46
+ ## Outputs
47
+
48
+ One synthesized artifact, with a short synthesis note alongside naming the base and why, the cross-judge's verdict or that Phase C skipped the judge, each graft with its source candidate, what was rejected and why, any convergence or dropouts, and the verification result.
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: automate-me
3
+ description: "Use for \"automate me\", \"create/update/refresh my -mode skill\", \"turn/capture my preferences or working style into a skill\", or wanting agents to follow how the user works. Drafts or revises a personal -mode skill via create-skill + unslop, optionally pulling fresh evidence from recent transcripts."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Automate me
8
+
9
+ A guided flow for turning the user's working conventions into a skill agents will follow. The output is one `-mode` skill tailored to them (e.g. `jay-mode`, `priya-mode`).
10
+
11
+ This skill orchestrates three others: an inline mining pass (see step 1), the `create-skill` skill that ships with pi-pstack (authoring), and the **unslop** skill (prose discipline). It sequences them. It doesn't replace them.
12
+
13
+ ## Flow
14
+
15
+ ### 0. Check for an existing skill
16
+
17
+ Look recursively for `.pi/skills/**/*-mode/SKILL.md` and `~/.pi/agent/skills/*-mode/SKILL.md` matching the user's handle. Mode skills can live in a personal category directory (`.pi/skills/<handle>/`), not only at the top level. If one exists, confirm intent with `AskQuestion` (unless they already said "update my skill" or similar):
18
+
19
+ - Update the existing skill (default for repeat runs)
20
+ - Start fresh (rare, ask why before doing it)
21
+
22
+ Update mode changes the rest of the flow:
23
+ - Step 1 mines only history since the skill was last edited (`git log -1 --format=%cI <path>`).
24
+ - Step 2 asks what's changed or missing, not what to capture from zero.
25
+ - Step 4 edits the existing file in place. Preserve sections the user hasn't contradicted. Revise ones with new evidence. Add new sections only for genuinely new rules.
26
+
27
+ ### 1. Mine their history
28
+
29
+ Locate the active workspace's transcripts before fanning out. The system prompt names this workspace's Pi session files and its pi-pstack subagent transcripts. Use only those paths. Don't glob across `~/.pi/agent/sessions/*/` or `~/.pi/agent/pstack/workspaces/*/`. That crosses workspace boundaries and reads private chats from unrelated projects.
30
+
31
+ Survey recent agent conversations within that scope for recurring patterns. Run multiple parallel subagents across slices of history (e.g. last 2-4 weeks, split into 3 slices so each has enough material). Pick each subagent's reasoning level, and fast or standard speed when the model has a `-fast` variant, for the job, per the Subagents section of the **poteto-mode** skill. Each slice mining subagent reads transcripts from the workspace-scoped path the parent provides, looks for the signals below, and returns a short structured list of patterns it saw with evidence pointers. Default signals worth hunting:
32
+
33
+ - Response preferences (length, tone, format, "dumb it down" corrections)
34
+ - Delegation habits (subagents, models, specialized workflows, parallelism)
35
+ - Verification posture (what "done" means, unit tests vs live repro, reviewers)
36
+ - Code and prose discipline (style, principles cited, lint/format tools)
37
+ - Process conventions (worktrees, commits, PRs, review/merge tooling)
38
+ - Meta preferences (fixing skills mid-task, proposing new ones)
39
+
40
+ Cross-check across slices before elevating a signal. Patterns seen in 2+ slices are high-confidence. Lone signals are weak and usually get dropped.
41
+
42
+ ### 2. Ask the user directly
43
+
44
+ Mining misses intent that hasn't come up yet. Use the `AskQuestion` tool (structured multi-choice) rather than asking the user to type from scratch.
45
+
46
+ Shape: one or two questions with 4-6 options each, `allow_multiple: true` for category questions. Start broad ("Which areas matter most?"), then follow up on selected areas with specific options. After the structured rounds, one free-form chat question catches anything the options missed.
47
+
48
+ Don't dump 20 questions.
49
+
50
+ ### 3. Cluster findings
51
+
52
+ Group the combined signals into sections. Common ones (use only what applies):
53
+
54
+ - **Response style**: length, tone, format.
55
+ - **Autonomy**: how much to do without asking, MCP tool use.
56
+ - **Understand first**: which skills to reach for when scoping or investigating a change.
57
+ - **Subagents**: default, parallelism, model-to-task, specialized workflows.
58
+ - **Prose / code discipline**: principles, lint tools, style guides.
59
+ - **Review and verify**: repro posture, verification skills, live-testing tools.
60
+ - **Process**: git worktrees, commits, PRs, review/merge tooling.
61
+ - **Skills**: skill-authoring habits, fix-the-skill-first, proposing new skills.
62
+
63
+ The **poteto-mode** skill shows the shape. Read it for granularity. Don't copy its content. The user's rules are not the same as poteto-mode's.
64
+
65
+ ### 4. Draft the skill
66
+
67
+ Use the `create-skill` skill that ships with pi-pstack to author the skill. Placement:
68
+
69
+ - Path: preserve an existing mode skill's category. For a new mode, use `.pi/skills/<handle>/<handle>-mode/SKILL.md` when the repo has an established personal category for that handle. Otherwise default to `.pi/skills/<handle>-mode/SKILL.md` in the project (or `~/.pi/agent/skills/<handle>-mode/` if the user prefers a personal skill).
70
+ - Handle: the user's first name or chosen identifier.
71
+ - Frontmatter `description`: trigger on their name + `/<handle>-mode` + "work in their style", not on generic keywords like "write code" or "review PR".
72
+ - Frontmatter formatting: follow `create-skill`'s YAML rules. Keep `description` as one YAML scalar. Quote it or use `description: >-` with indented continuation lines when punctuation or wrapping requires it.
73
+ - Frontmatter `disable-model-invocation: true` by default. Opt out only if the user explicitly wants their mode to apply on every turn.
74
+
75
+ ### 5. Iterate on prose
76
+
77
+ Apply the **unslop** skill and `create-skill`'s writing guidelines to every line.
78
+
79
+ Show the draft to the user and take feedback. Expect multiple iterations. Cut ruthlessly. A mode skill is not a manual.
80
+
81
+ ### 6. Land it
82
+
83
+ Work in a worktree off main. Commit and open a PR. Don't push to main directly.
84
+
85
+ ## Guardrails
86
+
87
+ - **Don't overfit to one conversation.** A preference stated once and contradicted another time is noise. Require multiple instances before codifying it.
88
+ - **Don't be clever.** Restating other skills' contents, inventing metaphors, or writing "poetic" prose for an agent reader is cost without benefit. Keep it operational.
89
+ - **Reference, don't inline.** Other skills the user relies on should appear as path references, not pasted excerpts. Same for any principle docs they maintain elsewhere.
90
+ - **Keep sections minimal.** Only add a section if the user has a specific, non-default rule there. "Communicate clearly" is not a section. "Short paragraphs. Tables when comparing options. Bullets only when items are genuinely parallel." is.
91
+ - **Name conventions generic.** Use "the user" or "the human" in imperatives, not the author's first name.
92
+ - **Don't force symmetry.** If a user has no process rules worth writing down, skip the Process section entirely.
93
+
94
+ ## Evaluation
95
+
96
+ A `-mode` skill is subjective output. A `create-skill`-style test/iterate benchmark loop isn't useful here. Vibe-check with the user: does it read like them? Did it miss anything? Then ship.
97
+
98
+ Run a description-optimization loop only if the skill's trigger accuracy turns out to be a problem in practice.
99
+
100
+ ## When not to use
101
+
102
+ - User wants a task-specific skill (not working conventions): `create-skill` alone, no mining required.
103
+ - User wants to capture one narrow workflow (e.g. "how I write commit messages"). That's a regular skill, not a mode skill.
104
+