@justjoshn/pi-pstack-v2 0.0.0-stage → 0.1.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 (576) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +66 -2
  3. package/agents/ci-watcher.md +26 -0
  4. package/agents/comment-sicko.md +32 -0
  5. package/agents/poteto-agent.md +8 -0
  6. package/agents/thermo-nuclear-code-quality-review.md +23 -0
  7. package/docs/guide/01-setup.md +81 -0
  8. package/docs/guide/02-poteto-mode.md +137 -0
  9. package/docs/guide/03-understand.md +79 -0
  10. package/docs/guide/04-design.md +133 -0
  11. package/docs/guide/05-build-and-clean.md +83 -0
  12. package/docs/guide/06-verify-and-ship.md +162 -0
  13. package/docs/guide/07-overnight.md +121 -0
  14. package/docs/guide/08-principles.md +72 -0
  15. package/docs/guide/09-make-it-yours.md +100 -0
  16. package/docs/guide/10-recipes-and-pitfalls.md +182 -0
  17. package/docs/guide/README.md +38 -0
  18. package/docs/guide/images/design.jpg +0 -0
  19. package/docs/guide/images/overnight.jpg +0 -0
  20. package/docs/guide/images/recipes.jpg +0 -0
  21. package/docs/guide/images/router.jpg +0 -0
  22. package/docs/guide/images/understanding.jpg +0 -0
  23. package/docs/guide/images/verification.jpg +0 -0
  24. package/docs/pi-mechanisms.md +101 -0
  25. package/package.json +49 -4
  26. package/rules/no-inline-imports.md +8 -0
  27. package/rules/typescript-exhaustive-switch.md +6 -0
  28. package/skills/architect/SKILL.md +81 -0
  29. package/skills/architect/references/design-red-flags.md +57 -0
  30. package/skills/architect/references/rationale-template.md +35 -0
  31. package/skills/architect/references/runner-prompt.md +20 -0
  32. package/skills/arena/SKILL.md +48 -0
  33. package/skills/automate-me/SKILL.md +104 -0
  34. package/skills/benchmark-checklist/SKILL.md +39 -0
  35. package/skills/blast-radius/SKILL.md +50 -0
  36. package/skills/bro/SKILL.md +7 -0
  37. package/skills/check-compiler-errors/SKILL.md +23 -0
  38. package/skills/control-cli/SKILL.md +110 -0
  39. package/skills/control-ui/SKILL.md +109 -0
  40. package/skills/correct/SKILL.md +32 -0
  41. package/skills/create-formal-verification-skill/SKILL.md +43 -0
  42. package/skills/create-verification-skill/SKILL.md +44 -0
  43. package/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
  44. package/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
  45. package/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
  46. package/skills/deslop/SKILL.md +22 -0
  47. package/skills/figure-it-out/SKILL.md +54 -0
  48. package/skills/fix-ci/SKILL.md +29 -0
  49. package/skills/fix-merge-conflicts/SKILL.md +32 -0
  50. package/skills/get-pr-comments/SKILL.md +23 -0
  51. package/skills/how/SKILL.md +21 -0
  52. package/skills/in-your-own-words/SKILL.md +7 -0
  53. package/skills/interrogate/SKILL.md +35 -0
  54. package/skills/ketchup/SKILL.md +43 -0
  55. package/skills/ketchup-video/SKILL.md +29 -0
  56. package/skills/loop-on-ci/SKILL.md +50 -0
  57. package/skills/maintain-formal-verification-skill/SKILL.md +58 -0
  58. package/skills/maintain-verification-skill/SKILL.md +39 -0
  59. package/skills/make-bot-ui/SKILL.md +98 -0
  60. package/skills/make-pr-easy-to-review/SKILL.md +59 -0
  61. package/skills/new-branch-and-pr/SKILL.md +29 -0
  62. package/skills/no-comments/SKILL.md +26 -0
  63. package/skills/poteto-help/SKILL.md +159 -0
  64. package/skills/poteto-help/references/prompting.md +51 -0
  65. package/skills/poteto-help/references/recipes.md +51 -0
  66. package/skills/poteto-mode/SKILL.md +151 -0
  67. package/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
  68. package/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
  69. package/skills/poteto-mode/playbooks/autopilot-full.md +25 -0
  70. package/skills/poteto-mode/playbooks/autopilot-stack.md +8 -0
  71. package/skills/poteto-mode/playbooks/babysit.md +23 -0
  72. package/skills/poteto-mode/playbooks/bug-fix.md +15 -0
  73. package/skills/poteto-mode/playbooks/eval.md +25 -0
  74. package/skills/poteto-mode/playbooks/feature.md +21 -0
  75. package/skills/poteto-mode/playbooks/hillclimb.md +21 -0
  76. package/skills/poteto-mode/playbooks/investigation.md +14 -0
  77. package/skills/poteto-mode/playbooks/multi-phase-plan.md +155 -0
  78. package/skills/poteto-mode/playbooks/opening-a-pr.md +32 -0
  79. package/skills/poteto-mode/playbooks/orchestrate.md +25 -0
  80. package/skills/poteto-mode/playbooks/pause-safely.md +10 -0
  81. package/skills/poteto-mode/playbooks/perf-issue.md +25 -0
  82. package/skills/poteto-mode/playbooks/prototype.md +14 -0
  83. package/skills/poteto-mode/playbooks/refactoring.md +16 -0
  84. package/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
  85. package/skills/poteto-mode/playbooks/session-pickup.md +11 -0
  86. package/skills/poteto-mode/playbooks/shipping.md +12 -0
  87. package/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
  88. package/skills/poteto-mode/playbooks/visual-parity.md +11 -0
  89. package/skills/poteto-mode/playbooks/worktree-cleanup.md +12 -0
  90. package/skills/poteto-mode/references/bugbot-triage.md +142 -0
  91. package/skills/poteto-mode/scripts/bootstrap.ts +62 -0
  92. package/skills/poteto-mode/scripts/bun.lock +67 -0
  93. package/skills/poteto-mode/scripts/check-plan.mjs +205 -0
  94. package/skills/poteto-mode/scripts/check-plan.test.ts +110 -0
  95. package/skills/poteto-mode/scripts/package.json +16 -0
  96. package/skills/poteto-mode/scripts/watch-pr/cli.test.ts +224 -0
  97. package/skills/poteto-mode/scripts/watch-pr/cli.ts +223 -0
  98. package/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +129 -0
  99. package/skills/poteto-mode/scripts/watch-pr/github.test.ts +498 -0
  100. package/skills/poteto-mode/scripts/watch-pr/github.ts +726 -0
  101. package/skills/poteto-mode/scripts/watch-pr/policy.test.ts +482 -0
  102. package/skills/poteto-mode/scripts/watch-pr/policy.ts +842 -0
  103. package/skills/poteto-mode/scripts/watch-pr/render.ts +169 -0
  104. package/skills/poteto-mode/scripts/watch-pr/tsconfig.json +13 -0
  105. package/skills/poteto-mode/scripts/watch-pr/types.compile.ts +93 -0
  106. package/skills/poteto-mode/scripts/watch-pr/types.ts +414 -0
  107. package/skills/poteto-mode/scripts/watch-pr/watch-pr +6 -0
  108. package/skills/poteto-mode/scripts/worktree-audit.sh +146 -0
  109. package/skills/pr-review-canvas/SKILL.md +170 -0
  110. package/skills/pr-review-canvas/renderer.js +170 -0
  111. package/skills/pr-review-canvas/styles.css +96 -0
  112. package/skills/pr-review-canvas/template.html +18 -0
  113. package/skills/principle-attack-the-premise/SKILL.md +21 -0
  114. package/skills/principle-boundary-discipline/SKILL.md +34 -0
  115. package/skills/principle-build-the-lever/SKILL.md +23 -0
  116. package/skills/principle-encode-lessons-in-structure/SKILL.md +11 -0
  117. package/skills/principle-exhaust-the-design-space/SKILL.md +9 -0
  118. package/skills/principle-experience-first/SKILL.md +19 -0
  119. package/skills/principle-explain-the-number/SKILL.md +18 -0
  120. package/skills/principle-fix-root-causes/SKILL.md +21 -0
  121. package/skills/principle-foundational-thinking/SKILL.md +21 -0
  122. package/skills/principle-guard-the-context-window/SKILL.md +12 -0
  123. package/skills/principle-laziness-protocol/SKILL.md +10 -0
  124. package/skills/principle-make-operations-idempotent/SKILL.md +22 -0
  125. package/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +14 -0
  126. package/skills/principle-minimize-reader-load/SKILL.md +18 -0
  127. package/skills/principle-model-the-domain/SKILL.md +24 -0
  128. package/skills/principle-never-block-on-the-human/SKILL.md +15 -0
  129. package/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
  130. package/skills/principle-prove-it-works/SKILL.md +22 -0
  131. package/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
  132. package/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
  133. package/skills/principle-sequence-verifiable-units/SKILL.md +17 -0
  134. package/skills/principle-subtract-before-you-add/SKILL.md +18 -0
  135. package/skills/principle-test-behavior-not-implementation/SKILL.md +20 -0
  136. package/skills/principle-type-system-discipline/SKILL.md +13 -0
  137. package/skills/recall/SKILL.md +37 -0
  138. package/skills/reflect/SKILL.md +69 -0
  139. package/skills/reflect/references/divergent-reviewer.md +38 -0
  140. package/skills/reflect/references/judgment-reviewer.md +37 -0
  141. package/skills/reflect/references/synthesizer.md +56 -0
  142. package/skills/reflect/references/tooling-reviewer.md +48 -0
  143. package/skills/review-and-ship/SKILL.md +41 -0
  144. package/skills/run-smoke-tests/SKILL.md +42 -0
  145. package/skills/setup-pstack/SKILL.md +79 -0
  146. package/skills/sharpen/SKILL.md +16 -0
  147. package/skills/show-me-your-work/SKILL.md +82 -0
  148. package/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
  149. package/skills/show-me-your-work/scripts/log.sh +42 -0
  150. package/skills/statechart/SKILL.md +82 -0
  151. package/skills/statechart/references/render.md +93 -0
  152. package/skills/statechart/scripts/backends/cfg.ts +33 -0
  153. package/skills/statechart/scripts/backends/mermaid.ts +249 -0
  154. package/skills/statechart/scripts/backends/plain-text.ts +72 -0
  155. package/skills/statechart/scripts/backends/report.ts +177 -0
  156. package/skills/statechart/scripts/frontends/config.ts +276 -0
  157. package/skills/statechart/scripts/frontends/dot.ts +74 -0
  158. package/skills/statechart/scripts/frontends/marks.ts +93 -0
  159. package/skills/statechart/scripts/frontends/messages.ts +52 -0
  160. package/skills/statechart/scripts/frontends/spec.ts +114 -0
  161. package/skills/statechart/scripts/frontends/trace.ts +24 -0
  162. package/skills/statechart/scripts/frontends/value.ts +166 -0
  163. package/skills/statechart/scripts/frontends/verdict.ts +40 -0
  164. package/skills/statechart/scripts/frontends/view.ts +119 -0
  165. package/skills/statechart/scripts/ir.ts +547 -0
  166. package/skills/statechart/scripts/package.json +11 -0
  167. package/skills/statechart/scripts/passes/annotate.ts +128 -0
  168. package/skills/statechart/scripts/passes/label.ts +269 -0
  169. package/skills/statechart/scripts/passes/lift.ts +85 -0
  170. package/skills/statechart/scripts/passes/loop-check.ts +68 -0
  171. package/skills/statechart/scripts/passes/paths.ts +60 -0
  172. package/skills/statechart/scripts/passes/reach.ts +135 -0
  173. package/skills/statechart/scripts/passes/region-check.ts +97 -0
  174. package/skills/statechart/scripts/passes/regions.ts +295 -0
  175. package/skills/statechart/scripts/pipeline.ts +76 -0
  176. package/skills/statechart/scripts/run.ts +506 -0
  177. package/skills/statechart/scripts/statechart +29 -0
  178. package/skills/statechart/scripts/statechart.ts +164 -0
  179. package/skills/statechart/scripts/test/ConfigOracle.java +63 -0
  180. package/skills/statechart/scripts/test/chart.test.ts +1253 -0
  181. package/skills/statechart/scripts/test/charts/Braces.mmd +7 -0
  182. package/skills/statechart/scripts/test/charts/Escapes.mmd +11 -0
  183. package/skills/statechart/scripts/test/charts/Phases.mmd +29 -0
  184. package/skills/statechart/scripts/test/cli.test.ts +1315 -0
  185. package/skills/statechart/scripts/test/config-fuzz.test.ts +263 -0
  186. package/skills/statechart/scripts/test/corpus/Counter/ChartRun.out +57 -0
  187. package/skills/statechart/scripts/test/corpus/Counter/Counter.cfg +3 -0
  188. package/skills/statechart/scripts/test/corpus/Counter/Counter.tla +10 -0
  189. package/skills/statechart/scripts/test/corpus/Counter/chart.mmd +9 -0
  190. package/skills/statechart/scripts/test/corpus/Counter/graph.dot +16 -0
  191. package/skills/statechart/scripts/test/corpus/Counter/report.md +7 -0
  192. package/skills/statechart/scripts/test/corpus/Counter/sany.out +2 -0
  193. package/skills/statechart/scripts/test/corpus/Counter/verdict-1.out +49 -0
  194. package/skills/statechart/scripts/test/corpus/CounterAction/ChartRun.out +60 -0
  195. package/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.cfg +4 -0
  196. package/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.tla +22 -0
  197. package/skills/statechart/scripts/test/corpus/CounterAction/chart.mmd +26 -0
  198. package/skills/statechart/scripts/test/corpus/CounterAction/graph.dot +19 -0
  199. package/skills/statechart/scripts/test/corpus/CounterAction/report.md +20 -0
  200. package/skills/statechart/scripts/test/corpus/CounterAction/sany.out +2 -0
  201. package/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.exit +1 -0
  202. package/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.out +56 -0
  203. package/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.exit +1 -0
  204. package/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.out +82 -0
  205. package/skills/statechart/scripts/test/corpus/CounterAction/verdict-3.out +57 -0
  206. package/skills/statechart/scripts/test/corpus/CounterDeadlock/ChartRun.out +59 -0
  207. package/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.cfg +3 -0
  208. package/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.tla +11 -0
  209. package/skills/statechart/scripts/test/corpus/CounterDeadlock/chart.mmd +22 -0
  210. package/skills/statechart/scripts/test/corpus/CounterDeadlock/graph.dot +16 -0
  211. package/skills/statechart/scripts/test/corpus/CounterDeadlock/report.md +17 -0
  212. package/skills/statechart/scripts/test/corpus/CounterDeadlock/sany.out +2 -0
  213. package/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.exit +1 -0
  214. package/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.out +56 -0
  215. package/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.exit +1 -0
  216. package/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.out +77 -0
  217. package/skills/statechart/scripts/test/corpus/CounterFan/ChartRun.out +69 -0
  218. package/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.cfg +2 -0
  219. package/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.tla +11 -0
  220. package/skills/statechart/scripts/test/corpus/CounterFan/chart.mmd +85 -0
  221. package/skills/statechart/scripts/test/corpus/CounterFan/graph.dot +70 -0
  222. package/skills/statechart/scripts/test/corpus/CounterFan/report.md +12 -0
  223. package/skills/statechart/scripts/test/corpus/CounterFan/sany.out +2 -0
  224. package/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.exit +1 -0
  225. package/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.out +67 -0
  226. package/skills/statechart/scripts/test/corpus/CounterFan/verdict-2.out +57 -0
  227. package/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.exit +1 -0
  228. package/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.out +85 -0
  229. package/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.cfg +6 -0
  230. package/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.tla +13 -0
  231. package/skills/statechart/scripts/test/corpus/CounterGuard/chart.mmd +5 -0
  232. package/skills/statechart/scripts/test/corpus/CounterGuard/graph.dot +10 -0
  233. package/skills/statechart/scripts/test/corpus/CounterGuard/report.md +31 -0
  234. package/skills/statechart/scripts/test/corpus/CounterGuard/sany.out +2 -0
  235. package/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.exit +1 -0
  236. package/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.out +64 -0
  237. package/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.exit +1 -0
  238. package/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.out +77 -0
  239. package/skills/statechart/scripts/test/corpus/CounterInitPast/ChartRun.out +55 -0
  240. package/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.cfg +3 -0
  241. package/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.tla +10 -0
  242. package/skills/statechart/scripts/test/corpus/CounterInitPast/chart.mmd +12 -0
  243. package/skills/statechart/scripts/test/corpus/CounterInitPast/graph.dot +6 -0
  244. package/skills/statechart/scripts/test/corpus/CounterInitPast/report.md +12 -0
  245. package/skills/statechart/scripts/test/corpus/CounterInitPast/sany.out +2 -0
  246. package/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.exit +1 -0
  247. package/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.out +33 -0
  248. package/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-2.out +54 -0
  249. package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/ChartRun.out +54 -0
  250. package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.cfg +3 -0
  251. package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.tla +10 -0
  252. package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/chart.mmd +1 -0
  253. package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/graph.dot +6 -0
  254. package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/report.md +7 -0
  255. package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/sany.out +2 -0
  256. package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/verdict-1.out +46 -0
  257. package/skills/statechart/scripts/test/corpus/CounterInstance/ChartRun.out +59 -0
  258. package/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.cfg +2 -0
  259. package/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.tla +10 -0
  260. package/skills/statechart/scripts/test/corpus/CounterInstance/CounterSteps.tla +6 -0
  261. package/skills/statechart/scripts/test/corpus/CounterInstance/chart.mmd +17 -0
  262. package/skills/statechart/scripts/test/corpus/CounterInstance/graph.dot +15 -0
  263. package/skills/statechart/scripts/test/corpus/CounterInstance/report.md +14 -0
  264. package/skills/statechart/scripts/test/corpus/CounterInstance/sany.out +3 -0
  265. package/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.exit +1 -0
  266. package/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.out +78 -0
  267. package/skills/statechart/scripts/test/corpus/CounterJump/ChartRun.out +59 -0
  268. package/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.cfg +3 -0
  269. package/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.tla +19 -0
  270. package/skills/statechart/scripts/test/corpus/CounterJump/chart.mmd +26 -0
  271. package/skills/statechart/scripts/test/corpus/CounterJump/graph.dot +22 -0
  272. package/skills/statechart/scripts/test/corpus/CounterJump/report.md +12 -0
  273. package/skills/statechart/scripts/test/corpus/CounterJump/sany.out +2 -0
  274. package/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.exit +1 -0
  275. package/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.out +58 -0
  276. package/skills/statechart/scripts/test/corpus/CounterJump/verdict-2.out +57 -0
  277. package/skills/statechart/scripts/test/corpus/CounterLoop/ChartRun.out +57 -0
  278. package/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.cfg +2 -0
  279. package/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.tla +11 -0
  280. package/skills/statechart/scripts/test/corpus/CounterLoop/chart.mmd +17 -0
  281. package/skills/statechart/scripts/test/corpus/CounterLoop/graph.dot +15 -0
  282. package/skills/statechart/scripts/test/corpus/CounterLoop/report.md +14 -0
  283. package/skills/statechart/scripts/test/corpus/CounterLoop/sany.out +2 -0
  284. package/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.exit +1 -0
  285. package/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.out +76 -0
  286. package/skills/statechart/scripts/test/corpus/CounterOrder/ChartRun.out +59 -0
  287. package/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.cfg +3 -0
  288. package/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.tla +11 -0
  289. package/skills/statechart/scripts/test/corpus/CounterOrder/chart.mmd +19 -0
  290. package/skills/statechart/scripts/test/corpus/CounterOrder/graph.dot +10 -0
  291. package/skills/statechart/scripts/test/corpus/CounterOrder/report.md +15 -0
  292. package/skills/statechart/scripts/test/corpus/CounterOrder/sany.out +2 -0
  293. package/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.exit +1 -0
  294. package/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.out +56 -0
  295. package/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.exit +1 -0
  296. package/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.out +67 -0
  297. package/skills/statechart/scripts/test/corpus/CounterRules/ChartRun.out +62 -0
  298. package/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.cfg +6 -0
  299. package/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.tla +24 -0
  300. package/skills/statechart/scripts/test/corpus/CounterRules/Moves.tla +5 -0
  301. package/skills/statechart/scripts/test/corpus/CounterRules/chart.mmd +22 -0
  302. package/skills/statechart/scripts/test/corpus/CounterRules/graph.dot +10 -0
  303. package/skills/statechart/scripts/test/corpus/CounterRules/report.md +23 -0
  304. package/skills/statechart/scripts/test/corpus/CounterRules/sany.out +3 -0
  305. package/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.exit +1 -0
  306. package/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.out +58 -0
  307. package/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.exit +1 -0
  308. package/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.out +66 -0
  309. package/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.exit +1 -0
  310. package/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.out +74 -0
  311. package/skills/statechart/scripts/test/corpus/CounterRules/verdict-4.out +59 -0
  312. package/skills/statechart/scripts/test/corpus/CounterStart/ChartRun.out +58 -0
  313. package/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.cfg +3 -0
  314. package/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.tla +15 -0
  315. package/skills/statechart/scripts/test/corpus/CounterStart/chart.mmd +18 -0
  316. package/skills/statechart/scripts/test/corpus/CounterStart/graph.dot +13 -0
  317. package/skills/statechart/scripts/test/corpus/CounterStart/report.md +11 -0
  318. package/skills/statechart/scripts/test/corpus/CounterStart/sany.out +2 -0
  319. package/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.exit +1 -0
  320. package/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.out +33 -0
  321. package/skills/statechart/scripts/test/corpus/CounterStart/verdict-2.out +57 -0
  322. package/skills/statechart/scripts/test/corpus/CounterStop/ChartRun.out +57 -0
  323. package/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.cfg +3 -0
  324. package/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.tla +15 -0
  325. package/skills/statechart/scripts/test/corpus/CounterStop/chart.mmd +7 -0
  326. package/skills/statechart/scripts/test/corpus/CounterStop/graph.dot +13 -0
  327. package/skills/statechart/scripts/test/corpus/CounterStop/report.md +6 -0
  328. package/skills/statechart/scripts/test/corpus/CounterStop/sany.out +2 -0
  329. package/skills/statechart/scripts/test/corpus/CounterStop/verdict-1.out +49 -0
  330. package/skills/statechart/scripts/test/corpus/CounterTie/ChartRun.out +61 -0
  331. package/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.cfg +4 -0
  332. package/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.tla +14 -0
  333. package/skills/statechart/scripts/test/corpus/CounterTie/chart.mmd +30 -0
  334. package/skills/statechart/scripts/test/corpus/CounterTie/graph.dot +19 -0
  335. package/skills/statechart/scripts/test/corpus/CounterTie/report.md +27 -0
  336. package/skills/statechart/scripts/test/corpus/CounterTie/sany.out +2 -0
  337. package/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.exit +1 -0
  338. package/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.out +56 -0
  339. package/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.exit +1 -0
  340. package/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.out +64 -0
  341. package/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.exit +1 -0
  342. package/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.out +87 -0
  343. package/skills/statechart/scripts/test/corpus/CounterTie/verdict-4.out +57 -0
  344. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/ChartRun.out +60 -0
  345. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.cfg +3 -0
  346. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.tla +12 -0
  347. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/chart.mmd +23 -0
  348. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/graph.dot +19 -0
  349. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/report.md +11 -0
  350. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/sany.out +2 -0
  351. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.exit +1 -0
  352. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.out +56 -0
  353. package/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-2.out +57 -0
  354. package/skills/statechart/scripts/test/corpus/CounterView/ChartRun.out +61 -0
  355. package/skills/statechart/scripts/test/corpus/CounterView/CounterView.cfg +4 -0
  356. package/skills/statechart/scripts/test/corpus/CounterView/CounterView.tla +14 -0
  357. package/skills/statechart/scripts/test/corpus/CounterView/chart.mmd +23 -0
  358. package/skills/statechart/scripts/test/corpus/CounterView/graph.dot +19 -0
  359. package/skills/statechart/scripts/test/corpus/CounterView/report.md +27 -0
  360. package/skills/statechart/scripts/test/corpus/CounterView/sany.out +2 -0
  361. package/skills/statechart/scripts/test/corpus/CounterView/verdict-1.exit +1 -0
  362. package/skills/statechart/scripts/test/corpus/CounterView/verdict-1.out +56 -0
  363. package/skills/statechart/scripts/test/corpus/CounterView/verdict-2.exit +1 -0
  364. package/skills/statechart/scripts/test/corpus/CounterView/verdict-2.out +64 -0
  365. package/skills/statechart/scripts/test/corpus/CounterView/verdict-3.exit +1 -0
  366. package/skills/statechart/scripts/test/corpus/CounterView/verdict-3.out +87 -0
  367. package/skills/statechart/scripts/test/corpus/CounterView/verdict-4.out +57 -0
  368. package/skills/statechart/scripts/test/corpus/CounterView/view.mjs +1 -0
  369. package/skills/statechart/scripts/test/corpus/DieHard/ChartRun.out +59 -0
  370. package/skills/statechart/scripts/test/corpus/DieHard/DieHard.cfg +4 -0
  371. package/skills/statechart/scripts/test/corpus/DieHard/DieHard.tla +38 -0
  372. package/skills/statechart/scripts/test/corpus/DieHard/chart.mmd +92 -0
  373. package/skills/statechart/scripts/test/corpus/DieHard/graph.dot +126 -0
  374. package/skills/statechart/scripts/test/corpus/DieHard/report.md +17 -0
  375. package/skills/statechart/scripts/test/corpus/DieHard/sany.out +2 -0
  376. package/skills/statechart/scripts/test/corpus/DieHard/verdict-1.exit +1 -0
  377. package/skills/statechart/scripts/test/corpus/DieHard/verdict-1.out +91 -0
  378. package/skills/statechart/scripts/test/corpus/DieHard/verdict-2.out +57 -0
  379. package/skills/statechart/scripts/test/corpus/FirstRule/ChartRun.out +61 -0
  380. package/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.cfg +6 -0
  381. package/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.tla +11 -0
  382. package/skills/statechart/scripts/test/corpus/FirstRule/chart.mmd +22 -0
  383. package/skills/statechart/scripts/test/corpus/FirstRule/graph.dot +16 -0
  384. package/skills/statechart/scripts/test/corpus/FirstRule/report.md +25 -0
  385. package/skills/statechart/scripts/test/corpus/FirstRule/sany.out +2 -0
  386. package/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.exit +1 -0
  387. package/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.out +56 -0
  388. package/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.exit +1 -0
  389. package/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.out +64 -0
  390. package/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.exit +1 -0
  391. package/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.out +64 -0
  392. package/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.exit +1 -0
  393. package/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.out +77 -0
  394. package/skills/statechart/scripts/test/corpus/HiddenClock/ChartRun.out +57 -0
  395. package/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.cfg +4 -0
  396. package/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.tla +11 -0
  397. package/skills/statechart/scripts/test/corpus/HiddenClock/chart.mmd +13 -0
  398. package/skills/statechart/scripts/test/corpus/HiddenClock/graph.dot +12 -0
  399. package/skills/statechart/scripts/test/corpus/HiddenClock/report.md +11 -0
  400. package/skills/statechart/scripts/test/corpus/HiddenClock/sany.out +2 -0
  401. package/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.exit +1 -0
  402. package/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.out +72 -0
  403. package/skills/statechart/scripts/test/corpus/Login/ChartRun.out +57 -0
  404. package/skills/statechart/scripts/test/corpus/Login/Login.cfg +3 -0
  405. package/skills/statechart/scripts/test/corpus/Login/Login.tla +62 -0
  406. package/skills/statechart/scripts/test/corpus/Login/chart.mmd +28 -0
  407. package/skills/statechart/scripts/test/corpus/Login/graph.dot +40 -0
  408. package/skills/statechart/scripts/test/corpus/Login/report.md +7 -0
  409. package/skills/statechart/scripts/test/corpus/Login/sany.out +1 -0
  410. package/skills/statechart/scripts/test/corpus/Login/verdict-1.out +47 -0
  411. package/skills/statechart/scripts/test/corpus/Login/view.mjs +1 -0
  412. package/skills/statechart/scripts/test/corpus/LoginGuarded/ChartRun.out +57 -0
  413. package/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.cfg +2 -0
  414. package/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.tla +64 -0
  415. package/skills/statechart/scripts/test/corpus/LoginGuarded/chart.mmd +28 -0
  416. package/skills/statechart/scripts/test/corpus/LoginGuarded/graph.dot +37 -0
  417. package/skills/statechart/scripts/test/corpus/LoginGuarded/report.md +8 -0
  418. package/skills/statechart/scripts/test/corpus/LoginGuarded/sany.out +1 -0
  419. package/skills/statechart/scripts/test/corpus/LoginGuarded/verdict-1.out +47 -0
  420. package/skills/statechart/scripts/test/corpus/LoginGuarded/view.mjs +1 -0
  421. package/skills/statechart/scripts/test/corpus/LoginParallel/ChartRun.out +60 -0
  422. package/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.cfg +3 -0
  423. package/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.tla +64 -0
  424. package/skills/statechart/scripts/test/corpus/LoginParallel/chart.mmd +44 -0
  425. package/skills/statechart/scripts/test/corpus/LoginParallel/graph.dot +58 -0
  426. package/skills/statechart/scripts/test/corpus/LoginParallel/report.md +17 -0
  427. package/skills/statechart/scripts/test/corpus/LoginParallel/sany.out +1 -0
  428. package/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.exit +1 -0
  429. package/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.out +83 -0
  430. package/skills/statechart/scripts/test/corpus/LoginParallel/verdict-2.out +57 -0
  431. package/skills/statechart/scripts/test/corpus/LoginParallel/view.mjs +1 -0
  432. package/skills/statechart/scripts/test/corpus/MediaPlayer/ChartRun.out +60 -0
  433. package/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.cfg +3 -0
  434. package/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.tla +103 -0
  435. package/skills/statechart/scripts/test/corpus/MediaPlayer/chart.mmd +43 -0
  436. package/skills/statechart/scripts/test/corpus/MediaPlayer/graph.dot +93 -0
  437. package/skills/statechart/scripts/test/corpus/MediaPlayer/report.md +14 -0
  438. package/skills/statechart/scripts/test/corpus/MediaPlayer/sany.out +1 -0
  439. package/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.exit +1 -0
  440. package/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.out +59 -0
  441. package/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-2.out +72 -0
  442. package/skills/statechart/scripts/test/corpus/MediaPlayer/view.mjs +3 -0
  443. package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/ChartRun.out +57 -0
  444. package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.cfg +2 -0
  445. package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.tla +100 -0
  446. package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/chart.mmd +31 -0
  447. package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/graph.dot +85 -0
  448. package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/report.md +9 -0
  449. package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/sany.out +1 -0
  450. package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/verdict-1.out +47 -0
  451. package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/view.mjs +3 -0
  452. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/ChartRun.out +59 -0
  453. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayer.tla +103 -0
  454. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.cfg +3 -0
  455. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.tla +6 -0
  456. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/chart.mmd +42 -0
  457. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/graph.dot +93 -0
  458. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/report.md +19 -0
  459. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/sany.out +2 -0
  460. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.exit +1 -0
  461. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.out +61 -0
  462. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-2.out +59 -0
  463. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-3.out +61 -0
  464. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.exit +1 -0
  465. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.out +66 -0
  466. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.exit +1 -0
  467. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.out +58 -0
  468. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-6.out +49 -0
  469. package/skills/statechart/scripts/test/corpus/MediaPlayerProps/view.mjs +3 -0
  470. package/skills/statechart/scripts/test/corpus/PickWorker/ChartRun.out +57 -0
  471. package/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.cfg +6 -0
  472. package/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.tla +11 -0
  473. package/skills/statechart/scripts/test/corpus/PickWorker/chart.mmd +5 -0
  474. package/skills/statechart/scripts/test/corpus/PickWorker/graph.dot +11 -0
  475. package/skills/statechart/scripts/test/corpus/PickWorker/report.md +7 -0
  476. package/skills/statechart/scripts/test/corpus/PickWorker/sany.out +5 -0
  477. package/skills/statechart/scripts/test/corpus/PickWorker/verdict-1.out +70 -0
  478. package/skills/statechart/scripts/test/corpus/Shadow/ChartRun.out +61 -0
  479. package/skills/statechart/scripts/test/corpus/Shadow/Shadow.cfg +4 -0
  480. package/skills/statechart/scripts/test/corpus/Shadow/Shadow.tla +11 -0
  481. package/skills/statechart/scripts/test/corpus/Shadow/ShadowLib.tla +6 -0
  482. package/skills/statechart/scripts/test/corpus/Shadow/ShadowSub.tla +3 -0
  483. package/skills/statechart/scripts/test/corpus/Shadow/chart.mmd +9 -0
  484. package/skills/statechart/scripts/test/corpus/Shadow/graph.dot +16 -0
  485. package/skills/statechart/scripts/test/corpus/Shadow/report.md +8 -0
  486. package/skills/statechart/scripts/test/corpus/Shadow/sany.out +4 -0
  487. package/skills/statechart/scripts/test/corpus/Shadow/verdict-1.out +65 -0
  488. package/skills/statechart/scripts/test/corpus/SpacedNames/ChartRun.out +59 -0
  489. package/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.cfg +2 -0
  490. package/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.tla +9 -0
  491. package/skills/statechart/scripts/test/corpus/SpacedNames/chart.mmd +23 -0
  492. package/skills/statechart/scripts/test/corpus/SpacedNames/graph.dot +17 -0
  493. package/skills/statechart/scripts/test/corpus/SpacedNames/report.md +15 -0
  494. package/skills/statechart/scripts/test/corpus/SpacedNames/sany.out +1 -0
  495. package/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.exit +1 -0
  496. package/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.out +65 -0
  497. package/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.exit +1 -0
  498. package/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.out +75 -0
  499. package/skills/statechart/scripts/test/corpus/TwoPhase/ChartRun.out +69 -0
  500. package/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.cfg +3 -0
  501. package/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.tla +75 -0
  502. package/skills/statechart/scripts/test/corpus/TwoPhase/chart.mmd +60 -0
  503. package/skills/statechart/scripts/test/corpus/TwoPhase/graph.dot +297 -0
  504. package/skills/statechart/scripts/test/corpus/TwoPhase/report.md +20 -0
  505. package/skills/statechart/scripts/test/corpus/TwoPhase/sany.out +1 -0
  506. package/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.exit +1 -0
  507. package/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.out +95 -0
  508. package/skills/statechart/scripts/test/corpus/TwoPhase/verdict-2.out +57 -0
  509. package/skills/statechart/scripts/test/corpus/TwoPhase/view.mjs +1 -0
  510. package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/ChartRun.out +57 -0
  511. package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.cfg +3 -0
  512. package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.tla +75 -0
  513. package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/chart.mmd +37 -0
  514. package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/graph.dot +223 -0
  515. package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/report.md +11 -0
  516. package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/sany.out +1 -0
  517. package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/verdict-1.out +47 -0
  518. package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/view.mjs +1 -0
  519. package/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.exit +1 -0
  520. package/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.out +75 -0
  521. package/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.cfg +5 -0
  522. package/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.tla +11 -0
  523. package/skills/statechart/scripts/test/corpus/TypeGuard/chart.mmd +18 -0
  524. package/skills/statechart/scripts/test/corpus/TypeGuard/graph.dot +14 -0
  525. package/skills/statechart/scripts/test/corpus/TypeGuard/report.md +29 -0
  526. package/skills/statechart/scripts/test/corpus/TypeGuard/sany.out +2 -0
  527. package/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.exit +1 -0
  528. package/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.out +64 -0
  529. package/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.exit +1 -0
  530. package/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.out +75 -0
  531. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/ChartRun.out +58 -0
  532. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.cfg +2 -0
  533. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.tla +8 -0
  534. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/chart.mmd +22 -0
  535. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/graph.dot +16 -0
  536. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/report.md +15 -0
  537. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/sany.out +2 -0
  538. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.exit +1 -0
  539. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.out +56 -0
  540. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.exit +1 -0
  541. package/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.out +77 -0
  542. package/skills/statechart/scripts/test/corpus.test.ts +441 -0
  543. package/skills/statechart/scripts/test/differential.test.ts +565 -0
  544. package/skills/statechart/scripts/test/drawn.ts +20 -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 +648 -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 +145 -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 +23 -0
  561. package/skills/technical-writing/SKILL.md +106 -0
  562. package/skills/thermo-nuclear-code-quality-review/SKILL.md +192 -0
  563. package/skills/typescript-best-practices/SKILL.md +32 -0
  564. package/skills/typescript-best-practices/references/patterns.md +328 -0
  565. package/skills/unslop/SKILL.md +62 -0
  566. package/skills/verify-this/SKILL.md +74 -0
  567. package/skills/weekly-review/SKILL.md +32 -0
  568. package/skills/what-did-i-get-done/SKILL.md +31 -0
  569. package/skills/why/SKILL.md +9 -0
  570. package/skills/workflow-from-chats/SKILL.md +50 -0
  571. package/src/credentials.ts +156 -0
  572. package/src/index.ts +663 -0
  573. package/src/jobs.ts +436 -0
  574. package/src/sandbox.ts +232 -0
  575. package/src/sweep.ts +132 -0
  576. package/src/transcript.ts +66 -0
@@ -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 /skill: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
+ Write `TODO.md` 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 the `pstack-models` system-prompt section. Each entry is a `provider/id` model and a thinking level. If that line is missing, every runner runs on the session model, so omit `model`, and the arena is one model sampled N times. Say so plainly and never present it as a diverse panel. An `auto` or `inherit-parent` entry in this line means the session model, so omit `model` for it. If `pi_spawn` rejects a configured entry, run that seat on the session model and say so. Families go by the model id, not the provider, and the longest matching prefix wins: `claude-fable-*`, `claude-*`, and `gemini-*`. Any other model's family is its id before the first hyphen, such as `gpt` or `glm`. 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 on the session 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 worker's `thinking` level for the job, per the Spawned Pi workers section of the **poteto-mode** skill.
18
+ 4. Give each candidate its own output location (a git worktree where possible, otherwise a directory inside the project that you pass as `cwd`). A worker cannot write shared `/tmp`. For a worktree, spawn the runner with `worktree: "arena-<slug>-<n>"` and `base: "<ref>"`. The worker commits its output there, and the worktree is at `<agent dir>/pstack-v2/jobs/<job id>/worktree`, per the **separate-before-serializing-shared-state** principle skill.
19
+
20
+ ## Phase B: Fan out
21
+
22
+ Spawn all N workers in one message with N `pi_spawn` calls, each with the task, the path to the shared grounding, its own output path, and instructions to produce the artifact and a short rationale naming the alternatives it considered and what it rejected.
23
+
24
+ Each runner wakes you with its report when it exits. End your turn and let the wakes arrive before Phase C. 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 the `pstack-models` system-prompt section. Spawn one judge with `pi_spawn` and `readonly: true`. The judge is never from the session model's vendor. A vendor is a family as Phase A step 3 defines families, except that `claude-fable-*` and `claude-*` are one vendor. Try only the entries from another vendor, in pool order. An `auto` or `inherit-parent` entry is the session model, so it never judges. If `pi_spawn` rejects an entry, move to the next one. If that line is missing, or no entry from another vendor runs, skip the judge, pick the base alone in Phase D, and say so. If you do not know the session model, try the pool's entries in pool order and say that the vendor 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 to Pi's skills spec with unslop, optionally pulling fresh evidence from recent Pi sessions."
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), Pi's skills spec (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 in plain text with numbered options, then end your turn (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 sessions before fanning out. They are the `*.jsonl` files in `~/.pi/agent/sessions/--<cwd with / as ->--/` (unless `sessionDir` or `$PI_CODING_AGENT_SESSION_DIR` moves sessions), and each spawned worker keeps its own in `~/.pi/agent/pstack-v2/jobs/<id>/session/`. Keep only jobs whose `job.json` `cwd` is inside this workspace. Use only that directory. Don't glob across `~/.pi/agent/sessions/*/`. That crosses workspace boundaries and reads private chats from unrelated projects.
30
+
31
+ Survey recent agent conversations within that scope for recurring patterns. Spawn multiple parallel Pi workers with `pi_spawn` across slices of history (e.g. last 2-4 weeks, split into 3 slices so each has enough material). Pick each worker's model and thinking level for the job, per the Spawned Pi workers section of the **poteto-mode** skill. Each slice mining worker reads sessions from the workspace-scoped path the brief names, 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 (spawned workers, 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. Ask in plain text with numbered options rather than asking the user to type from scratch, then end your turn.
45
+
46
+ Shape: one or two questions with 4-6 numbered options each, and tell the user they can pick several 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
+ - **Spawned workers**: 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
+ Write the skill to Pi's skills spec (the Agent Skills format), run `/reload`, then check it loads with `/skill:<handle>-mode`. 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 + `/skill:<handle>-mode` + "work in their style", not on generic keywords like "write code" or "review PR".
72
+ - Frontmatter formatting: follow the Agent Skills frontmatter 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 Pi's skills guidance on writing 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 test and iterate benchmark loop, as for a task skill, 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): write it to Pi's skills spec 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
+
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: benchmark-checklist
3
+ description: "Vet a perf measurement (limiter, tuning, limits, errors, repeatability, relevance, and whether the work happened) before you report or act on it. Use when you run a benchmark or report a speedup or regression you measured."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Benchmark checklist
8
+
9
+ Use this when you produce a performance number: a PR's before and after, a regression claim, a hillclimb harness, or a library or config choice. Answer each question with evidence from a run, not a guess about the code.
10
+
11
+ For a quick ballpark the user asked for, one run is enough. Still check questions 4 and 7, and say that it is one run. Skip the rest unless that run looks wrong. A choice between options is never a ballpark.
12
+
13
+ ## Before you run anything
14
+
15
+ - Write down the claim you expect to make, in the words you would ship ("export is 30% faster at p50 on the 60k-row dataset"). The questions test that sentence.
16
+ - Read the measurement script. Note what it times, counts, and ignores.
17
+ - Check the load average with `uptime` and the core count with `nproc`. If the machine is busy, find out what is running. If you cannot stop it, interleave the sides so both see the same noise, and say so in the report. In the pstack sandbox `ps` and `top` are refused, so report the load from `uptime` and ask the session that started you what is running.
18
+
19
+ ## The questions
20
+
21
+ 1. **Why not double?** Name the limiter. Profile in a run you do not report, because profilers and tracers slow the work down. Use CPU per process (`top`, `pidstat`), a runtime profiler (`node --cpu-prof`, `py-spy`, `perf`), I/O wait, and syscall counts (`strace -c` on Linux), then map the hot spot to source. Watch the load generator too: if it saturates first, you measured the load generator. If a change did not move the number, the limiter explains why, so find it before you call the change useless.
22
+ 2. **Was it tuned?** Run every side the way production runs it: release builds, production flags and env, batching and transaction settings, connection pools, caches as warm or cold as production sees them, and the same versions and data. If one side runs on defaults, you compared configurations, not implementations. A limiter that is a setting (a commit per row, a debug build, a missing index) means that side is untuned. Tune it and measure again before you pick a winner. If you cannot tune it, do not pick a winner from that run. When the user is choosing what to adopt, narrowing the claim to the code as it ships today does not fix this, because they adopt the option, not today's settings.
23
+ 3. **Did it break limits?** Do the arithmetic. Compare bytes per second with disk and network bandwidth, operations per second times cost per operation with your cores, and the time saved with the time the changed piece took. Removing a piece that takes 10% of the run can make the run at most about 11% faster. A result past a limit measured something other than the work, such as a cache, a no-op, or a bug.
24
+ 4. **Did it error?** Count failures and non-success responses, and check that outputs are correct, not just present. Rejections are often fast, and timeouts and retries are slow. If the script does not count errors, add the count.
25
+ 5. **Does it reproduce?** Run each side at least 5 times, alternating (A, B, A, B, and so on) so warmup, lazy initialization, caches, and drift favor neither. Report the median and range. A gap smaller than the run-to-run variation is no measurable difference. When the call is close, use a rank-sum test or the harness's own statistics.
26
+ 6. **Does it matter?** Next to any micro result, measure the end-to-end path a user waits on, with realistic data sizes and concurrency, and report the micro result as a share of the whole. A helper that takes 1% of a request can make the request at most 1% faster, however fast the helper gets.
27
+ 7. **Did it even happen?** Confirm the work ran inside the timed region: the request reached the server, the rows were written, the bytes were read, and the code used the result. Lazy code (generators nobody iterates, promises nobody awaits, results the JIT can discard) and timeouts produce numbers for work that never happened.
28
+
29
+ ## Report
30
+
31
+ - Lead with the verdict: faster, slower, no measurable difference, or inconclusive.
32
+ - Give the number with its unit, the run count, the range, and the limiter. For example, "p50 41 ms → 33 ms, median of 7 runs per side, range 32 to 35 ms after, bound by JSON parsing on one core."
33
+ - Call the verdict inconclusive when you claim a difference but cannot name the limiter, when a side ran untuned, or when you could not check questions 4 and 7. Name the gap.
34
+ - Keep a PR body to one primary number, per the **Opening a PR** playbook. Put the runs, range, and limiter evidence in a linked artifact or notes file.
35
+
36
+ ## Other perf material
37
+
38
+ - Vet the **Perf issue** playbook's baseline before the playbook plans from it, and every number after that.
39
+ - Vet the **Hillclimb** playbook's harness before it is frozen. The frozen harness then prints error and work counts, so each keep-or-revert checks questions 4 and 7 for free.
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: blast-radius
3
+ description: "Find what a change could break somewhere else before it ships, beyond the diff, and prove the one fact it's safe because of by running real code instead of writing it up. Use for 'blast radius of X', 'what could this break', or reviewing a small diff you don't trust."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Blast radius
8
+
9
+ Find what a change breaks somewhere else, before it ships. Use for "blast radius of X", "what could this break", or reviewing a small diff you don't trust yet.
10
+
11
+ Companion to `how` and `why`. `how` tells you what the code does. `why` tells you why it's shaped that way. Blast radius tells you what it breaks somewhere else.
12
+
13
+ Listing the callers is not the job. The agent can grep those in a second. The job is the breakage grep won't show you.
14
+
15
+ ## Don't trust your own writeup
16
+
17
+ A blast-radius writeup that sounds right is worthless. It reads as convincing whether or not it's true. So don't hand back the writeup. Find the one or two facts the whole thing depends on and prove them by running code.
18
+
19
+ ### How sure are you
20
+
21
+ For each fact the change's safety depends on, get it as far down this list as is cheap, and say where it stopped.
22
+
23
+ 1. You said so. Worthless on its own.
24
+ 2. You pointed at the line. A real `file:line`, or the library's own source.
25
+ 3. You showed the bad case can't happen. You walked the failure step by step and it doesn't reach.
26
+ 4. You ran it. A script or test that calls the real code and fails loud if you're wrong.
27
+ 5. You reproduced it in the running app.
28
+
29
+ Step 4 is usually one small script that imports the same library the app ships and calls the exact function you're worried about.
30
+
31
+ ## Steps
32
+
33
+ 1. Read the change. The diff, the symbols it adds, changes, and deletes, and what it now does differently, including the part the diff doesn't spell out. Pull the PR and its commits.
34
+ 2. Find the one fact it's safe because of. Most changes that look risky are safe because of a single fact, like "this call only drops already-dead cache entries and does nothing else". Find that fact. If it holds, most risky cases are cleared at once. Spend your time here, not on a long list of maybes.
35
+ 3. Look where grep stops. Read the source of the library you call, and check its pinned version and any local patch. Work out when things run: microtasks, unmount and teardown, Solid versus React. Follow what a symbol search misses: the JSON an API returns, a DB column, a wire format, another language reading the same bytes, a feature flag, code three hops downstream.
36
+ 4. Be honest about each risk. Give it a real chance of happening and a real cost if it does. Keep the risks you confirmed. List the ones you checked and cleared separately. Cite a real `file:line`, a search that finds nothing is still an answer, and never make up a caller or an API.
37
+ 5. Prove the one fact. Write a script or test that runs the real code, run it, and paste what happened.
38
+ 6. For a big or wide change, run it as an `arena`. Ask more than one model the same question and merge the answers. Different models catch different real bugs.
39
+
40
+ ## What to hand back
41
+
42
+ - **What it does.** What changed, including the part that isn't obvious.
43
+ - **The one fact it's safe because of.** State it, say which step you got it to, and show the proof. If you couldn't prove it, write unproven.
44
+ - **Risks.** Each names how it breaks, the `file:line`, how likely and how bad, and how to check. Paste the proof for the ones that matter.
45
+ - **Cleared.** What you checked and why it's fine.
46
+ - **Before you merge.** The cheapest test or repro that catches the real bug, including the script you wrote.
47
+
48
+ Write it through `unslop`, cite real code, and strip anything private before it goes anywhere public.
49
+
50
+ **Reply:** the writeup above, with the one safety fact either proven or marked unproven.
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: bro
3
+ description: Restate the last message in plain human language, with no jargon.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Restate your last message. Stop using jargon and speak coherently. State it more simply and concisely, like one human talking to another.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: check-compiler-errors
3
+ description: Run compile and type-check commands and report failures
4
+ ---
5
+
6
+ # Check compiler errors
7
+
8
+ ## Trigger
9
+
10
+ Compile or type-check failures are blocking local validation or CI.
11
+
12
+ ## Workflow
13
+
14
+ 1. Run the repo's compile and type-check commands.
15
+ 2. Summarize errors by file and type.
16
+ 3. Fix the highest-confidence issues first.
17
+ 4. Re-run checks until clean or blocked.
18
+
19
+ ## Output
20
+
21
+ - Current compile and type-check status
22
+ - Error summary grouped by file and category
23
+ - Fixes applied and remaining blockers
@@ -0,0 +1,110 @@
1
+ ---
2
+ name: control-cli
3
+ description: Build or adapt a local harness to drive, inspect, and profile an interactive CLI or TUI without external services. Use for CLI UX checks, startup regressions, memory leaks, hangs, prompt flows, or terminal demos.
4
+ ---
5
+
6
+ # Control CLI
7
+
8
+ Use a repeatable local harness to exercise an interactive CLI instead of poking at it manually. First reuse the repo's own test/demo harness if it exists; otherwise assemble a temporary harness from standard local tools.
9
+
10
+ ## What It Is Used For
11
+
12
+ - Reproducing CLI/TUI bugs with deterministic input.
13
+ - Verifying keyboard flows, prompts, interrupts, resize behavior, and terminal layout.
14
+ - Capturing before/after transcripts for bug fixes.
15
+ - Profiling startup time, slow operations, hangs, or memory growth.
16
+ - Recording a short terminal demo when output is easier to show than explain.
17
+
18
+ ## Harness Loop
19
+
20
+ 1. Identify the command under test and the smallest reproducible workspace.
21
+ 2. Discover existing local harnesses: package scripts, e2e tests, demo recorders, expect scripts, or PTY helpers.
22
+ 3. If no harness exists, launch the CLI in an isolated terminal session with deterministic env vars.
23
+ 4. Capture the current screen before interacting.
24
+ 5. Send one action at a time: text, Enter, arrows, Escape, Ctrl-C, resize.
25
+ 6. Wait for a concrete screen pattern or prompt before the next action.
26
+ 7. Save the transcript and any profile artifacts.
27
+ 8. Kill the session cleanly.
28
+
29
+ ## Harness Options
30
+
31
+ - Repo-native harness: prefer checked-in scripts because they know the app's startup, env, and prompts.
32
+ - `tmux`: managed sessions, `capture-pane`, `send-keys`, attach/detach.
33
+ - PTY probe: use a short Python, Node, or Expect script when tmux is unavailable.
34
+ - Runtime inspector: use Node or Bun inspector for CPU profiles, heap snapshots, and live evaluation.
35
+ - Terminal recorder: use repo-local demo tools or asciinema-compatible tools when the user asks for a demo.
36
+
37
+ ## Minimal tmux Harness
38
+
39
+ ```bash
40
+ SESSION="cli-harness-$(date +%s)"
41
+ SOCK="${TMPDIR:-/tmp}/cli-harness.sock"
42
+ tmux -S "$SOCK" new-session -d -s "$SESSION" -- <command-under-test>
43
+ tmux -S "$SOCK" capture-pane -pt "$SESSION"
44
+ tmux -S "$SOCK" send-keys -t "$SESSION" "help" Enter
45
+ tmux -S "$SOCK" capture-pane -pt "$SESSION"
46
+ tmux -S "$SOCK" kill-session -t "$SESSION"
47
+ ```
48
+
49
+ For Node CLIs:
50
+
51
+ ```bash
52
+ NODE_OPTIONS="--inspect=127.0.0.1:0" tmux -S "$SOCK" new-session -d -s "$SESSION" -- <node-cli-command>
53
+ ```
54
+
55
+ Read the terminal output to find the inspector URL, then use Chrome DevTools-compatible tooling if profiling is needed.
56
+
57
+ ## Minimal PTY Harness
58
+
59
+ Use a PTY script when you need deterministic waits in a repo that does not have tmux or a demo harness. Keep it temporary unless the user asks to add a reusable test.
60
+
61
+ ```python
62
+ import os
63
+ import pty
64
+ import select
65
+ import subprocess
66
+ import time
67
+
68
+ master_fd, slave_fd = pty.openpty()
69
+ proc = subprocess.Popen(
70
+ ["<command>", "<arg>"],
71
+ stdin=slave_fd,
72
+ stdout=slave_fd,
73
+ stderr=slave_fd,
74
+ close_fds=True,
75
+ )
76
+ os.close(slave_fd)
77
+
78
+ deadline = time.time() + 30
79
+ buffer = b""
80
+ while time.time() < deadline:
81
+ ready, _, _ = select.select([master_fd], [], [], 0.25)
82
+ if not ready:
83
+ continue
84
+ chunk = os.read(master_fd, 4096)
85
+ buffer += chunk
86
+ if b"<ready text>" in buffer:
87
+ os.write(master_fd, b"help\n")
88
+ break
89
+
90
+ print(buffer.decode(errors="replace"))
91
+ proc.terminate()
92
+ os.close(master_fd)
93
+ ```
94
+
95
+ If the CLI needs richer terminal control, use `pty.fork()` or an existing PTY library.
96
+
97
+ ## Profiling Recipes
98
+
99
+ - Startup regression: capture baseline and treatment startup timings under the same machine, env, and command.
100
+ - Slow operation: start a CPU profile, perform the operation, stop the profile, and compare top self-time functions.
101
+ - Memory leak: force GC if available, take a heap snapshot, perform the operation repeatedly, force GC again, and take another snapshot.
102
+ - Hang: capture the screen, active handles/resources, and a stack/CPU sample before interrupting.
103
+
104
+ ## Guardrails
105
+
106
+ - Prefer deterministic waits over sleeps. If you must sleep, explain why.
107
+ - Do not send credentials or destructive commands into a controlled session.
108
+ - Keep the harness in `$TMPDIR` (or `/tmp` outside a worker) unless the repo already has a testing/demo harness.
109
+ - Do not hard-code paths from another repository. Adapt commands to the current repo's scripts and runtime.
110
+ - Clean up tmux sessions, temp dirs, inspector processes, and demo artifacts unless the user asks to keep them.
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: control-ui
3
+ description: Build or adapt a local browser/CDP harness to drive and inspect a web, IDE, or Electron UI. Use for local UI verification, screenshots, accessibility snapshots, perf profiles, visual diffs, or reproducing UI bugs.
4
+ ---
5
+
6
+ # Control UI
7
+
8
+ Use local browser automation to verify UI behavior with evidence. First reuse the repo's own Playwright, browser, or Electron harness if it exists; otherwise assemble a temporary local harness around the app's dev server or Chromium debug port.
9
+
10
+ ## What It Is Used For
11
+
12
+ - Reproducing UI bugs that depend on real browser focus, keyboard input, scrolling, resizing, or rendering.
13
+ - Verifying visual or accessibility changes with screenshots and snapshots.
14
+ - Checking local web, IDE, or Electron behavior before shipping.
15
+ - Capturing console logs, network logs, CPU profiles, traces, or heap snapshots.
16
+ - Creating before/after evidence for `verify-this`.
17
+
18
+ ## Setup Pattern
19
+
20
+ 1. Start the app locally with `tmux_run`, using the repo's documented dev command.
21
+ 2. Discover existing local harnesses: Playwright tests, Cypress specs, Storybook, browser scripts, Electron launch scripts, or snapshot tools.
22
+ 3. For a web app, connect to the local URL with the existing browser tooling.
23
+ 4. For Electron/Chromium, enable a remote debugging port when supported.
24
+ 5. Select the correct page by stable app markers, not by tab order alone.
25
+ 6. Prefer accessibility roles, labels, and stable `data-*` selectors over coordinates.
26
+
27
+ ## Generic Web Harness
28
+
29
+ Use the repo's installed browser tooling when possible. If the repo already has Playwright, a minimal one-off probe looks like:
30
+
31
+ ```javascript
32
+ import { chromium } from "playwright";
33
+
34
+ const browser = await chromium.launch();
35
+ const page = await browser.newPage({ viewport: { width: 1280, height: 800 } });
36
+ await page.goto("http://127.0.0.1:<port>");
37
+ await page.getByRole("button", { name: /submit/i }).click();
38
+ await page.screenshot({ path: `${process.env.TMPDIR ?? "/tmp"}/ui-harness-after.png`, fullPage: true });
39
+ await browser.close();
40
+ ```
41
+
42
+ Do not add Playwright as a project dependency just for this probe unless the user asks. Prefer existing dev dependencies or external browser tools already available in the environment.
43
+
44
+ ## Generic CDP Harness
45
+
46
+ For Electron or a Chromium app launched with `--remote-debugging-port=<port>`, connect over CDP:
47
+
48
+ ```javascript
49
+ import { chromium } from "playwright";
50
+
51
+ const browser = await chromium.connectOverCDP("http://127.0.0.1:<debug-port>");
52
+ const pages = browser.contexts().flatMap((context) => context.pages());
53
+ let page;
54
+ for (const candidate of pages) {
55
+ if (await candidate.locator("<app-root-selector>").count()) {
56
+ page = candidate;
57
+ break;
58
+ }
59
+ }
60
+
61
+ if (!page) {
62
+ console.log(await Promise.all(pages.map(async (p) => ({
63
+ title: await p.title(),
64
+ url: p.url(),
65
+ }))));
66
+ throw new Error("No matching app page found");
67
+ }
68
+
69
+ await page.screenshot({ path: `${process.env.TMPDIR ?? "/tmp"}/ui-harness-cdp.png`, fullPage: true });
70
+ await browser.close();
71
+ ```
72
+
73
+ Replace `<app-root-selector>` with a stable marker from the current repo, such as a root app node, landmark, or product-specific `data-*` attribute.
74
+
75
+ ## Interaction Loop
76
+
77
+ 1. Capture a page snapshot or screenshot before acting.
78
+ 2. Choose a target from the latest page structure.
79
+ 3. Perform exactly one structural action: click, type, keypress, drag, scroll, navigate, or resize.
80
+ 4. Capture a fresh snapshot/screenshot.
81
+ 5. Verify the expected state change.
82
+ 6. Save artifacts for before/after comparisons when the user asked for proof.
83
+
84
+ ## CDP Capabilities
85
+
86
+ Use raw CDP only when higher-level browser APIs are insufficient:
87
+
88
+ - Performance: CPU profiles, traces, paint flashing, FPS meter, layout shift inspection.
89
+ - Memory: heap snapshots and forced GC for leak investigations.
90
+ - Network: request blocking, throttling, cache disablement, request/response logs.
91
+ - Rendering: viewport changes, color scheme emulation, reduced motion, accessibility checks.
92
+ - Debugging: console streaming, exception capture, DOM snapshots.
93
+
94
+ ## Page Selection
95
+
96
+ When multiple app windows/tabs share a debug port:
97
+
98
+ - Prefer a positive marker for the surface under test, such as an app root selector.
99
+ - Use a negative marker to avoid the wrong surface when necessary.
100
+ - If no page matches, list available page titles and URLs instead of guessing.
101
+
102
+ ## Guardrails
103
+
104
+ - Do not rely on stale element references after navigation or structural changes.
105
+ - Avoid coordinate clicks unless a fresh screenshot was captured immediately before the click.
106
+ - Keep test data local and disposable.
107
+ - Do not store screenshots or heap snapshots from privacy-sensitive workspaces unless the user explicitly agrees.
108
+ - Do not hard-code selectors, ports, or script paths from another repository. Discover the current repo's local app markers.
109
+ - Stop dev servers with `tmux_jobs` `stop`, and clean up debug sessions and temp profiles when done.
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: correct
3
+ description: "Find the mistakes agents keep repeating in this repo and make each one impossible. Try architecture first, then types, then a lint whose error names the fix, then a test, and write docs last. Prove each check fails on a real past mistake. Repeat this each time the operator corrects you. Use for /skill:correct."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Correct
8
+
9
+ The operator keeps correcting agents in this repo for the same mistakes. Change the repo so the next agent can't make them.
10
+
11
+ Assume every contributor is an agent that sees only the files it opened, copies the nearest example, and takes the shortest path that compiles. Design the repo so a change that looks right from one file is right for the whole repo.
12
+
13
+ ## Find the mistake classes
14
+
15
+ First, read recent commits, reverts, review comments, agent instruction files, and comments that explain workarounds. Group the mistakes into classes. A class counts once it has happened twice.
16
+
17
+ ## Fix each class at the highest level that works
18
+
19
+ 1. **Eliminate it with architecture.** Give each piece of state one owner and each task one supported way. Hide internals so the wrong import fails. Replace hand-synced lists with one source of truth. Delete old ways and dead code an agent would copy.
20
+ 2. **Enforce it with types so the bad state can't be written.** If bad code still compiles, add a lint or CI check whose error names the file, type, or function to use instead. If the pattern is already common, fail only when a change adds more.
21
+ 3. **Test the behavior.** Fix or delete any test that still passes when the behavior it checks breaks, or that fails when only the internals change.
22
+ 4. **Write docs or agent rules last, only for judgment calls.** Nothing fails when an agent skips them.
23
+
24
+ ## Fix and prove
25
+
26
+ Then fix the most frequent classes now, one commit each. Prove each new check fails on a real past mistake. Run the same command locally and in CI. Exceptions go on the offending line with a reason, an expiry date, and a human's approval.
27
+
28
+ ## Keep the rule table
29
+
30
+ Last, keep a table in the agent instruction file that pairs each rule with what enforces it. When the operator corrects you, fix the mistake and add the rule. If the rule was already there and nothing enforces it, that's a repeat, so fix it at the highest level in the same change. Drop a rule once its mistake can't happen.
31
+
32
+ **Reply:** each class with its evidence, the level you picked, and why a higher level didn't work.
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: create-formal-verification-skill
3
+ description: "Generate a project-local skill that formally verifies the code where a bug costs the most and tests reach the least, in any language, with whichever verification tool fits. Use for /skill:create-formal-verification-skill, \"model-check this race\", \"prove this invariant\", or when concurrency, retries, state machines, parsers, or unsafe code need more than tests."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Create a formal verification skill
8
+
9
+ A test checks the cases that someone thought to write. Formal verification checks every case in a stated scope: every order of steps in a model, every input up to a bound, or every input. This skill finds the part of the repo where that matters most, verifies one property of it, and leaves a project-local skill that lets the next agent check a change against that property. Write that skill for an agent who reads it cold, mid-change, and has never seen your work. The user must be able to trust the result and act on it without learning the verification language.
10
+
11
+ ## Choose the target from the code
12
+
13
+ Answer from the codebase, and ask the user only what you cannot observe. If the user named an area or a bug, start there.
14
+
15
+ A good target is a promise the code makes, where a break harms users and tests rarely reach the case that breaks it. Choose the strongest such target in the repo, not the one that is easiest to verify.
16
+
17
+ ## Let the question choose the tool
18
+
19
+ Pick the tool that answers the question at the lowest cost: a model checker, a proof assistant, an SMT-backed verifier, or another tool. Whether events can happen in a bad order usually suits a model checker over a small model of the design, and TLA+ is the default for that in any language. Whether the code itself behaves for every input, as with memory safety, overflow, or a data-structure invariant, usually suits a verifier that runs on the code. If no verifier runs on this language, say so, and test the real code with generated inputs, not a hand model of the function. A property that must hold at every size, where a bound is not enough, can need a proof. Prefer a tool that the repo's developers can install and run, and tell the user why you chose it.
20
+
21
+ ## What makes it good
22
+
23
+ - **True to the code.** Every part of the model or proof points to code that a reviewer can open. What the verification treats as one indivisible step is one indivisible step in the code. Names come from this repo.
24
+ - **Able to fail.** A check that you have never seen fail proves nothing. Show each property failing on a broken variant of the code it guards, such as a removed check or a reordered step.
25
+ - **Findings stay findings.** When the current code breaks the property, report it with the counterexample in the code's terms. Do not weaken the property or the model until it passes, and do not change product code unless the user asks.
26
+ - **Honest about scope.** Say what is verified, under which bounds and assumptions, and what is left out. A pass covers the model or the bound, not the whole system.
27
+ - **Readable without the tool.** State the property and the harm in one plain sentence each. Tell a counterexample as a short sequence of steps in the code's words.
28
+ - **Cheap to rerun.** One command, a reproducible tool version, and a run short enough that the next agent will use it on every relevant change.
29
+ - **Kept in step with the code.** Record which files and functions each check covers, and the commit at which you last confirmed that the verification describes them. When the covered code changes after that commit, the next agent can see that the verification needs another look.
30
+
31
+ ## Generate the verify skill
32
+
33
+ Write a project-local skill with frontmatter that names the area and says when to use it. Without frontmatter, the skill never registers. From the skill alone, the next agent must be able to tell whether a change touches the verified code, run the check, tell a real bug from a modeling error, and update the verification when a change is intended. Put the coverage record and the sync commit in the skill, and tell the next agent to move the sync commit forward only after it confirms that the verification describes the code at the new commit. Use this repo's real commands, paths, and nouns, and leave no placeholders.
34
+
35
+ If the check is a TLA+ model, tell the next agent to read every result with the pstack [`/skill:statechart`](../statechart/SKILL.md) skill. It shows each invariant violation the checker finds as its shortest path in plain words. When the check passes, `/skill:statechart` draws a chart of how the system moves between states. Refer to `/skill:statechart` by name. Its commands, options, and file paths change between releases and machines, so copy none of them into the generated skill or its scripts.
36
+
37
+ ## Prove it before you hand off
38
+
39
+ Follow the generated skill once, as the next agent would, on a scratch change that breaks the property in the real code. It must catch the break. Then drop the scratch change and confirm that the check is back where it started: passing, or failing only on the findings you will report. A verify skill that was never run is a draft. If the skill misses the break or a step does not run, fix the skill or the verification, not the scratch change.
40
+
41
+ ## Hand off
42
+
43
+ Tell the user what you verified, which tool you used and why, the bounds, what the check found in plain words, how to run it, and what it does not cover. Suggest a second target only if you found a close one. Point the user at `/skill:maintain-formal-verification-skill` for bringing the verification back in line after changes that did not recheck it.
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: create-verification-skill
3
+ description: "Generate a project-local verification skill that drives your app the way a user does — any language, framework, or platform. Use for /skill:create-verification-skill, \"make a control skill for this repo\", or when a project has no scripted way to prove UI/CLI/service behavior."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Create a verification skill
8
+
9
+ Every serious project needs a scripted way to drive the real app and prove behavior: launch it, exercise a feature the way a user would, and capture evidence. This skill generates that as a project-local skill (`.pi/skills/verify-<app>/`) tailored to the repo. You write the generator's output for the next agent, not for a human: it will be read cold, mid-task, by an agent that has never seen the app.
10
+
11
+ ## 1. Interview the repo, not the user
12
+
13
+ Answer these from the codebase and only ask the user what you cannot observe:
14
+
15
+ - **Surface:** what does a user actually touch? A web UI, a CLI/TUI, a desktop app, an API, a mobile app, a library? A repo can have several; pick the primary one and note the rest.
16
+ - **Run:** how does the app start locally? Prefer the repo's own documented dev command (package scripts, Makefile, README quickstart). Note ports, env vars, seed data, auth.
17
+ - **Drive:** how can an agent interact with it programmatically? Existing harnesses first — Playwright/Cypress specs, expect scripts, PTY helpers, curl-able endpoints, a debug port. Only then pick a generic recipe: browser/CDP for web and Electron, a tmux/PTY harness for CLI/TUI, plain HTTP for services.
18
+ - **Observe:** what evidence can be captured? Screenshots, terminal transcripts, response bodies, logs, exit codes, DB state.
19
+ - **Isolate:** can two instances run side by side (ports, data dirs, profiles)? If not, say so in the generated skill: refusing to double-drive a shared instance beats corrupting the user's session.
20
+
21
+ If the checkout doesn't build or start as-is, fix that first (or report it precisely) before generating; a skill written against a broken base teaches wrong steps. When an irrelevant missing asset blocks startup (a static dir the API never serves, a sample config), the generated skill may create it, clearly marked as verification scaffolding, and remove it in cleanup.
22
+
23
+ ## 2. Generate the skill
24
+
25
+ Write `.pi/skills/verify-<app>/SKILL.md` (run `/reload` afterward so Pi loads it) with YAML frontmatter (`name: verify-<app>` and a `description` that names the app, the surface, and when to reach for it — without frontmatter the skill never registers) and these sections, each grounded in what the interview actually found (no placeholders left):
26
+
27
+ - **Launch:** the exact command that starts the app for verification, and how to tell it's ready (a log line, a prompt). Launch must reach a usable state from an empty data dir, including any migrations and seed data. Ready means usable, not just that a process answers. A database health check can pass while its init scripts are still running. Run a long-lived server through `tmux_run` and stop it with `tmux_jobs` `stop`. Include teardown. For a short-lived CLI or TUI there is no server to keep alive: launch means build the binary (or install deps) once, then start each drive in its own isolated PTY or tmux session.
28
+ - **Doctor:** one read-only check that answers "is this instance worth driving?" — process up, right version/build, port owned by us, auth valid. An agent runs this first whenever anything looks off.
29
+ - **Drive:** the harness recipe with real selectors/commands from this repo, not examples. Prefer stable handles (ARIA labels, data attributes, prompt strings, route paths) over coordinates and tab order.
30
+ - **Evidence:** what to capture for a proof and where it goes. State the proof standards: exercise the real user path, not internal setters or test-only endpoints; capture the action and the resulting state, not just the final screen; verify side effects (files written, rows inserted, messages sent) alongside what's visible; mocks only where a production boundary already isolates the external system. When the safe path is a dry-run or test mode, verify what it actually skips by observing (files, network, git refs) rather than trusting its name: some dry-runs still touch the network or open a browser.
31
+ - **Cleanup:** how to tear down instances the run created. Never kill by process name; kill what you started. Cleanup removes instances and scratch state, never the evidence: proof artifacts survive the teardown, in a location the skill names.
32
+ - **Helpers:** any script the skill ships is executable and its invocation is shown in the skill body. A helper the reader has to reverse-engineer is not a helper.
33
+
34
+ ## 3. Seed the feature map
35
+
36
+ Create `.pi/skills/verify-<app>/features/README.md` plus one file per user-facing feature you can identify (aim for the top 3-5 to start, from routes, commands, menus, or docs). Follow the shape in [`references/feature-map-example/`](references/feature-map-example/), with a README index and one file per feature. Each file answers, from the user's point of view: what the feature is, how to reach it, how to drive it with the harness, and what observable end state proves it works. The four H2s are `Sub-features`, `How to get to it (user POV)`, `Driving it with <harness>`, and `Gotchas`. If the seed data lacks a precondition that a journey needs, the journey reports a failure and the reason goes in that feature's `Gotchas`. Never weaken the journey to make it pass. The map is the repo's maintained verification source; a proof that drives one convenient entry point is incomplete when the map lists others.
37
+
38
+ ## 4. Prove the generated skill before handing it over
39
+
40
+ Run its own instructions end to end once: launch, doctor, drive ONE mapped feature (one is enough; the map exists so later runs can cover the rest), capture evidence, clean up. After cleanup, confirm the evidence still exists at the named location — a cleanup that eats the proof fails this step. Fix what fails, and run the generated cleanup after every failed iteration too, so broken attempts don't strand processes and ports. A generated skill that was never executed is a draft, not a deliverable. If you proved it in a stand-in for the real target (a container in place of a fresh VM, a local stack in place of a remote one), list every setup step the stand-in did that the target will not. Those steps stay unverified until a run on the real target covers them.
41
+
42
+ ## 5. Offer the maintenance loop
43
+
44
+ Point the user at `/skill:maintain-verification-skill` for keeping the map honest as the app changes. Suggest a cadence only if they ask.