open-pstack 0.0.0-stage → 0.9.150

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (651) hide show
  1. package/LICENSE +22 -0
  2. package/LICENSE-cursor-team-kit +21 -0
  3. package/LICENSE-thermos +21 -0
  4. package/NOTICE-skills.md +13 -0
  5. package/NOTICE.md +62 -0
  6. package/bin/open-pstack.mjs +4 -0
  7. package/lib/bundle.mjs +42 -0
  8. package/lib/cli.mjs +211 -0
  9. package/lib/detect.mjs +28 -0
  10. package/lib/harnesses.mjs +136 -0
  11. package/lib/steps.mjs +93 -0
  12. package/package.json +30 -4
  13. package/plugin/.antigravity-plugin/plugin.json +8 -0
  14. package/plugin/.claude-plugin/icon.png +0 -0
  15. package/plugin/.claude-plugin/plugin.json +31 -0
  16. package/plugin/.codex-plugin/plugin.json +52 -0
  17. package/plugin/.github/plugin/plugin.json +15 -0
  18. package/plugin/.grok-plugin/plugin.json +9 -0
  19. package/plugin/.muse-plugin/plugin.json +381 -0
  20. package/plugin/LICENSE +22 -0
  21. package/plugin/README.md +27 -0
  22. package/plugin/agents/comment-sicko.md +34 -0
  23. package/plugin/agents/poteto-agent.md +8 -0
  24. package/plugin/agents/thermo-nuclear-code-quality-review-subagent.md +23 -0
  25. package/plugin/agents/thermo-nuclear-review-subagent.md +28 -0
  26. package/plugin/assets/pstack-icon.png +0 -0
  27. package/plugin/assets/pstack-icon.prompt.txt +8 -0
  28. package/plugin/grok/skills/pstack-routing/SKILL.md +8 -0
  29. package/plugin/hooks/agy-context.awk +9 -0
  30. package/plugin/hooks/codex-hooks.json +17 -0
  31. package/plugin/hooks/copilot-context.awk +44 -0
  32. package/plugin/hooks/copilot-hooks.json +29 -0
  33. package/plugin/hooks/hooks.json +16 -0
  34. package/plugin/hooks/json.awk +164 -0
  35. package/plugin/hooks/kimi-instructions.md +17 -0
  36. package/plugin/hooks/muse-context.awk +31 -0
  37. package/plugin/hooks/pre-tool-use.awk +152 -0
  38. package/plugin/hooks/pre-tool-use.sh +16 -0
  39. package/plugin/hooks/script-contracts.awk +53 -0
  40. package/plugin/hooks/session-start-agy.md +17 -0
  41. package/plugin/hooks/session-start-context.md +15 -0
  42. package/plugin/hooks/session-start-copilot-setup.md +1 -0
  43. package/plugin/hooks/session-start-copilot-sheet.md +1 -0
  44. package/plugin/hooks/session-start-copilot.md +3 -0
  45. package/plugin/hooks/session-start-minimax.md +17 -0
  46. package/plugin/hooks/session-start-muse-sheet.md +1 -0
  47. package/plugin/hooks/session-start-muse.md +17 -0
  48. package/plugin/hooks/session-start-opencode.md +17 -0
  49. package/plugin/hooks/session-start.ps1 +169 -0
  50. package/plugin/hooks/session-start.sh +107 -0
  51. package/plugin/hooks.json +10 -0
  52. package/plugin/models.json +60 -0
  53. package/plugin/omp/index.mjs +34 -0
  54. package/plugin/opencode/index.js +49 -0
  55. package/plugin/package.json +8 -0
  56. package/plugin/pi/agent-files.ts +117 -0
  57. package/plugin/pi/agent-text.ts +99 -0
  58. package/plugin/pi/agent-tools.ts +148 -0
  59. package/plugin/pi/agents.ts +510 -0
  60. package/plugin/pi/ask.ts +87 -0
  61. package/plugin/pi/child.ts +313 -0
  62. package/plugin/pi/config.ts +208 -0
  63. package/plugin/pi/hc-child.ts +210 -0
  64. package/plugin/pi/index.ts +45 -0
  65. package/plugin/pi/one-shot.ts +90 -0
  66. package/plugin/pi/path-skills.ts +54 -0
  67. package/plugin/pi/prompt.ts +39 -0
  68. package/plugin/pi/schedule.ts +254 -0
  69. package/plugin/pi/slash.ts +106 -0
  70. package/plugin/pi/sleep-wait.ts +76 -0
  71. package/plugin/pi/worktree.ts +87 -0
  72. package/plugin/skills/architect/SKILL.md +20 -0
  73. package/plugin/skills/arena/SKILL.md +66 -0
  74. package/plugin/skills/automate-me/SKILL.md +111 -0
  75. package/plugin/skills/babysit/SKILL.md +68 -0
  76. package/plugin/skills/benchmark-checklist/SKILL.md +38 -0
  77. package/plugin/skills/blast-radius/SKILL.md +49 -0
  78. package/plugin/skills/bro/SKILL.md +6 -0
  79. package/plugin/skills/correct/SKILL.md +31 -0
  80. package/plugin/skills/create-formal-verification-skill/SKILL.md +50 -0
  81. package/plugin/skills/create-verification-skill/SKILL.md +51 -0
  82. package/plugin/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
  83. package/plugin/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
  84. package/plugin/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
  85. package/plugin/skills/deslop/SKILL.md +24 -0
  86. package/plugin/skills/figure-it-out/SKILL.md +51 -0
  87. package/plugin/skills/fix-ci/SKILL.md +29 -0
  88. package/plugin/skills/fix-merge-conflicts/SKILL.md +32 -0
  89. package/plugin/skills/get-pr-comments/SKILL.md +23 -0
  90. package/plugin/skills/how/SKILL.md +28 -0
  91. package/plugin/skills/in-your-own-words/SKILL.md +6 -0
  92. package/plugin/skills/interrogate/SKILL.md +48 -0
  93. package/plugin/skills/ketchup/SKILL.md +42 -0
  94. package/plugin/skills/ketchup-video/SKILL.md +28 -0
  95. package/plugin/skills/maintain-formal-verification-skill/SKILL.md +65 -0
  96. package/plugin/skills/maintain-verification-skill/SKILL.md +46 -0
  97. package/plugin/skills/make-pr-easy-to-review/SKILL.md +59 -0
  98. package/plugin/skills/no-comments/SKILL.md +45 -0
  99. package/plugin/skills/poteto-help/SKILL.md +148 -0
  100. package/plugin/skills/poteto-help/references/prompting.md +51 -0
  101. package/plugin/skills/poteto-help/references/recipes.md +51 -0
  102. package/plugin/skills/poteto-mode/SKILL.md +132 -0
  103. package/plugin/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
  104. package/plugin/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
  105. package/plugin/skills/poteto-mode/playbooks/autopilot-full.md +31 -0
  106. package/plugin/skills/poteto-mode/playbooks/autopilot-stack.md +8 -0
  107. package/plugin/skills/poteto-mode/playbooks/babysit.md +10 -0
  108. package/plugin/skills/poteto-mode/playbooks/bug-fix.md +32 -0
  109. package/plugin/skills/poteto-mode/playbooks/eval.md +25 -0
  110. package/plugin/skills/poteto-mode/playbooks/feature.md +21 -0
  111. package/plugin/skills/poteto-mode/playbooks/hillclimb.md +21 -0
  112. package/plugin/skills/poteto-mode/playbooks/investigation.md +14 -0
  113. package/plugin/skills/poteto-mode/playbooks/multi-phase-plan.md +13 -0
  114. package/plugin/skills/poteto-mode/playbooks/opening-a-pr.md +9 -0
  115. package/plugin/skills/poteto-mode/playbooks/pause-safely.md +11 -0
  116. package/plugin/skills/poteto-mode/playbooks/perf-issue.md +25 -0
  117. package/plugin/skills/poteto-mode/playbooks/prototype.md +14 -0
  118. package/plugin/skills/poteto-mode/playbooks/refactoring.md +18 -0
  119. package/plugin/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
  120. package/plugin/skills/poteto-mode/playbooks/session-pickup.md +11 -0
  121. package/plugin/skills/poteto-mode/playbooks/shipping.md +16 -0
  122. package/plugin/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
  123. package/plugin/skills/poteto-mode/playbooks/visual-parity.md +11 -0
  124. package/plugin/skills/poteto-mode/playbooks/worktree-cleanup.md +12 -0
  125. package/plugin/skills/poteto-mode/references/agents/comment-sicko.md +34 -0
  126. package/plugin/skills/poteto-mode/references/agy-tools.md +100 -0
  127. package/plugin/skills/poteto-mode/references/bugbot-triage.md +142 -0
  128. package/plugin/skills/poteto-mode/references/cloud-session-pr-reads.md +29 -0
  129. package/plugin/skills/poteto-mode/references/codex-tools.md +110 -0
  130. package/plugin/skills/poteto-mode/references/copilot-tools.md +144 -0
  131. package/plugin/skills/poteto-mode/references/dsh-tools.md +51 -0
  132. package/plugin/skills/poteto-mode/references/grok.md +50 -0
  133. package/plugin/skills/poteto-mode/references/kimi-tools.md +40 -0
  134. package/plugin/skills/poteto-mode/references/licenses/LICENSE +22 -0
  135. package/plugin/skills/poteto-mode/references/licenses/LICENSE-cursor-team-kit +21 -0
  136. package/plugin/skills/poteto-mode/references/licenses/LICENSE-thermos +21 -0
  137. package/plugin/skills/poteto-mode/references/licenses/NOTICE.md +13 -0
  138. package/plugin/skills/poteto-mode/references/merge-safety.md +43 -0
  139. package/plugin/skills/poteto-mode/references/minimax-tools.md +93 -0
  140. package/plugin/skills/poteto-mode/references/muse-tools.md +105 -0
  141. package/plugin/skills/poteto-mode/references/omp-tools.md +45 -0
  142. package/plugin/skills/poteto-mode/references/opencode-tools.md +30 -0
  143. package/plugin/skills/poteto-mode/references/pi-tools.md +120 -0
  144. package/plugin/skills/poteto-mode/references/resume-storage.md +20 -0
  145. package/plugin/skills/poteto-mode/scripts/.prettierignore +19 -0
  146. package/plugin/skills/poteto-mode/scripts/.prettierrc.json +3 -0
  147. package/plugin/skills/poteto-mode/scripts/bootstrap.ts +71 -0
  148. package/plugin/skills/poteto-mode/scripts/bun.lock +67 -0
  149. package/plugin/skills/poteto-mode/scripts/check-playbooks.mjs +165 -0
  150. package/plugin/skills/poteto-mode/scripts/codex-session-effort.mjs +94 -0
  151. package/plugin/skills/poteto-mode/scripts/package.json +16 -0
  152. package/plugin/skills/poteto-mode/scripts/resume.mjs +139 -0
  153. package/plugin/skills/poteto-mode/scripts/tsconfig.json +14 -0
  154. package/plugin/skills/poteto-mode/scripts/watch-pr/check-suites.ts +203 -0
  155. package/plugin/skills/poteto-mode/scripts/watch-pr/cli.port.test.ts +88 -0
  156. package/plugin/skills/poteto-mode/scripts/watch-pr/cli.test.ts +383 -0
  157. package/plugin/skills/poteto-mode/scripts/watch-pr/cli.ts +283 -0
  158. package/plugin/skills/poteto-mode/scripts/watch-pr/deadline.ts +20 -0
  159. package/plugin/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +163 -0
  160. package/plugin/skills/poteto-mode/scripts/watch-pr/fresh-install.test.ts +35 -0
  161. package/plugin/skills/poteto-mode/scripts/watch-pr/github.port.test.ts +1119 -0
  162. package/plugin/skills/poteto-mode/scripts/watch-pr/github.test.ts +506 -0
  163. package/plugin/skills/poteto-mode/scripts/watch-pr/github.ts +979 -0
  164. package/plugin/skills/poteto-mode/scripts/watch-pr/head-checks.ts +37 -0
  165. package/plugin/skills/poteto-mode/scripts/watch-pr/integrity.test.ts +887 -0
  166. package/plugin/skills/poteto-mode/scripts/watch-pr/landing.ts +92 -0
  167. package/plugin/skills/poteto-mode/scripts/watch-pr/live-merge-safety.mjs +142 -0
  168. package/plugin/skills/poteto-mode/scripts/watch-pr/policy.port.test.ts +945 -0
  169. package/plugin/skills/poteto-mode/scripts/watch-pr/policy.test.ts +492 -0
  170. package/plugin/skills/poteto-mode/scripts/watch-pr/policy.ts +966 -0
  171. package/plugin/skills/poteto-mode/scripts/watch-pr/query-error.ts +36 -0
  172. package/plugin/skills/poteto-mode/scripts/watch-pr/render.ts +211 -0
  173. package/plugin/skills/poteto-mode/scripts/watch-pr/ship-pr +6 -0
  174. package/plugin/skills/poteto-mode/scripts/watch-pr/shipping-cli.test.ts +159 -0
  175. package/plugin/skills/poteto-mode/scripts/watch-pr/shipping-cli.ts +65 -0
  176. package/plugin/skills/poteto-mode/scripts/watch-pr/shipping.test-helper.ts +48 -0
  177. package/plugin/skills/poteto-mode/scripts/watch-pr/shipping.test.ts +360 -0
  178. package/plugin/skills/poteto-mode/scripts/watch-pr/shipping.ts +235 -0
  179. package/plugin/skills/poteto-mode/scripts/watch-pr/transport.test.ts +588 -0
  180. package/plugin/skills/poteto-mode/scripts/watch-pr/tsconfig.json +13 -0
  181. package/plugin/skills/poteto-mode/scripts/watch-pr/types.compile.ts +109 -0
  182. package/plugin/skills/poteto-mode/scripts/watch-pr/types.ts +502 -0
  183. package/plugin/skills/poteto-mode/scripts/watch-pr/watch-pr +6 -0
  184. package/plugin/skills/poteto-mode/scripts/watch-pr/workflow-runs.ts +217 -0
  185. package/plugin/skills/poteto-mode/scripts/watch-pr/wrapper.test.ts +20 -0
  186. package/plugin/skills/poteto-mode/scripts/worktree-audit.mjs +492 -0
  187. package/plugin/skills/poteto-mode/worker.md +11 -0
  188. package/plugin/skills/principle-attack-the-premise/SKILL.md +15 -0
  189. package/plugin/skills/principle-boundary-discipline/SKILL.md +11 -0
  190. package/plugin/skills/principle-build-the-lever/SKILL.md +15 -0
  191. package/plugin/skills/principle-encode-lessons-in-structure/SKILL.md +11 -0
  192. package/plugin/skills/principle-exhaust-the-design-space/SKILL.md +9 -0
  193. package/plugin/skills/principle-experience-first/SKILL.md +19 -0
  194. package/plugin/skills/principle-explain-the-number/SKILL.md +14 -0
  195. package/plugin/skills/principle-fix-root-causes/SKILL.md +14 -0
  196. package/plugin/skills/principle-foundational-thinking/SKILL.md +13 -0
  197. package/plugin/skills/principle-guard-the-context-window/SKILL.md +12 -0
  198. package/plugin/skills/principle-laziness-protocol/SKILL.md +10 -0
  199. package/plugin/skills/principle-make-operations-idempotent/SKILL.md +15 -0
  200. package/plugin/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +14 -0
  201. package/plugin/skills/principle-minimize-reader-load/SKILL.md +15 -0
  202. package/plugin/skills/principle-model-the-domain/SKILL.md +15 -0
  203. package/plugin/skills/principle-never-block-on-the-human/SKILL.md +15 -0
  204. package/plugin/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
  205. package/plugin/skills/principle-prove-it-works/SKILL.md +17 -0
  206. package/plugin/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
  207. package/plugin/skills/principle-separate-before-serializing-shared-state/SKILL.md +11 -0
  208. package/plugin/skills/principle-sequence-verifiable-units/SKILL.md +13 -0
  209. package/plugin/skills/principle-subtract-before-you-add/SKILL.md +18 -0
  210. package/plugin/skills/principle-test-behavior-not-implementation/SKILL.md +16 -0
  211. package/plugin/skills/principle-type-system-discipline/SKILL.md +15 -0
  212. package/plugin/skills/recall/SKILL.md +43 -0
  213. package/plugin/skills/reflect/SKILL.md +33 -0
  214. package/plugin/skills/reflect/scripts/claude-project-dir.mjs +121 -0
  215. package/plugin/skills/reflect/scripts/find-transcript.mjs +218 -0
  216. package/plugin/skills/setup-pstack/SKILL.md +104 -0
  217. package/plugin/skills/setup-pstack/copilot.md +88 -0
  218. package/plugin/skills/setup-pstack/references/runtimes.md +77 -0
  219. package/plugin/skills/setup-pstack/scripts/check-sheet.awk +10 -0
  220. package/plugin/skills/setup-pstack/scripts/check-sheet.sh +20 -0
  221. package/plugin/skills/setup-pstack/scripts/read-sheet.sh +24 -0
  222. package/plugin/skills/setup-pstack/scripts/sheet.awk +152 -0
  223. package/plugin/skills/sharpen/SKILL.md +15 -0
  224. package/plugin/skills/show-me-your-work/SKILL.md +89 -0
  225. package/plugin/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
  226. package/plugin/skills/show-me-your-work/scripts/log.sh +58 -0
  227. package/plugin/skills/statechart/SKILL.md +81 -0
  228. package/plugin/skills/statechart/references/render.md +93 -0
  229. package/plugin/skills/statechart/scripts/backends/cfg.ts +33 -0
  230. package/plugin/skills/statechart/scripts/backends/mermaid.ts +249 -0
  231. package/plugin/skills/statechart/scripts/backends/plain-text.ts +72 -0
  232. package/plugin/skills/statechart/scripts/backends/report.ts +177 -0
  233. package/plugin/skills/statechart/scripts/bun.lock +17 -0
  234. package/plugin/skills/statechart/scripts/frontends/config.ts +276 -0
  235. package/plugin/skills/statechart/scripts/frontends/dot.ts +77 -0
  236. package/plugin/skills/statechart/scripts/frontends/marks.ts +93 -0
  237. package/plugin/skills/statechart/scripts/frontends/messages.ts +52 -0
  238. package/plugin/skills/statechart/scripts/frontends/spec.ts +114 -0
  239. package/plugin/skills/statechart/scripts/frontends/trace.ts +24 -0
  240. package/plugin/skills/statechart/scripts/frontends/value.ts +166 -0
  241. package/plugin/skills/statechart/scripts/frontends/verdict.ts +40 -0
  242. package/plugin/skills/statechart/scripts/frontends/view.ts +119 -0
  243. package/plugin/skills/statechart/scripts/ir.ts +547 -0
  244. package/plugin/skills/statechart/scripts/janitor.ts +13 -0
  245. package/plugin/skills/statechart/scripts/kill.ts +15 -0
  246. package/plugin/skills/statechart/scripts/package.json +11 -0
  247. package/plugin/skills/statechart/scripts/passes/annotate.ts +128 -0
  248. package/plugin/skills/statechart/scripts/passes/label.ts +269 -0
  249. package/plugin/skills/statechart/scripts/passes/lift.ts +85 -0
  250. package/plugin/skills/statechart/scripts/passes/loop-check.ts +68 -0
  251. package/plugin/skills/statechart/scripts/passes/paths.ts +60 -0
  252. package/plugin/skills/statechart/scripts/passes/reach.ts +135 -0
  253. package/plugin/skills/statechart/scripts/passes/region-check.ts +97 -0
  254. package/plugin/skills/statechart/scripts/passes/regions.ts +295 -0
  255. package/plugin/skills/statechart/scripts/pipeline.ts +76 -0
  256. package/plugin/skills/statechart/scripts/run.ts +545 -0
  257. package/plugin/skills/statechart/scripts/statechart +29 -0
  258. package/plugin/skills/statechart/scripts/statechart.ts +166 -0
  259. package/plugin/skills/statechart/scripts/test/ConfigOracle.java +63 -0
  260. package/plugin/skills/statechart/scripts/test/chart.test.ts +1253 -0
  261. package/plugin/skills/statechart/scripts/test/charts/Braces.mmd +7 -0
  262. package/plugin/skills/statechart/scripts/test/charts/Escapes.mmd +11 -0
  263. package/plugin/skills/statechart/scripts/test/charts/Phases.mmd +29 -0
  264. package/plugin/skills/statechart/scripts/test/child-env.test.ts +15 -0
  265. package/plugin/skills/statechart/scripts/test/cli.test.ts +1353 -0
  266. package/plugin/skills/statechart/scripts/test/config-fuzz.test.ts +263 -0
  267. package/plugin/skills/statechart/scripts/test/corpus/Counter/ChartRun.out +57 -0
  268. package/plugin/skills/statechart/scripts/test/corpus/Counter/Counter.cfg +3 -0
  269. package/plugin/skills/statechart/scripts/test/corpus/Counter/Counter.tla +10 -0
  270. package/plugin/skills/statechart/scripts/test/corpus/Counter/chart.mmd +9 -0
  271. package/plugin/skills/statechart/scripts/test/corpus/Counter/graph.dot +16 -0
  272. package/plugin/skills/statechart/scripts/test/corpus/Counter/report.md +7 -0
  273. package/plugin/skills/statechart/scripts/test/corpus/Counter/sany.out +2 -0
  274. package/plugin/skills/statechart/scripts/test/corpus/Counter/verdict-1.out +49 -0
  275. package/plugin/skills/statechart/scripts/test/corpus/CounterAction/ChartRun.out +60 -0
  276. package/plugin/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.cfg +4 -0
  277. package/plugin/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.tla +22 -0
  278. package/plugin/skills/statechart/scripts/test/corpus/CounterAction/chart.mmd +26 -0
  279. package/plugin/skills/statechart/scripts/test/corpus/CounterAction/graph.dot +19 -0
  280. package/plugin/skills/statechart/scripts/test/corpus/CounterAction/report.md +20 -0
  281. package/plugin/skills/statechart/scripts/test/corpus/CounterAction/sany.out +2 -0
  282. package/plugin/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.exit +1 -0
  283. package/plugin/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.out +56 -0
  284. package/plugin/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.exit +1 -0
  285. package/plugin/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.out +82 -0
  286. package/plugin/skills/statechart/scripts/test/corpus/CounterAction/verdict-3.out +57 -0
  287. package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/ChartRun.out +59 -0
  288. package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.cfg +3 -0
  289. package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.tla +11 -0
  290. package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/chart.mmd +22 -0
  291. package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/graph.dot +16 -0
  292. package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/report.md +17 -0
  293. package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/sany.out +2 -0
  294. package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.exit +1 -0
  295. package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.out +56 -0
  296. package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.exit +1 -0
  297. package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.out +77 -0
  298. package/plugin/skills/statechart/scripts/test/corpus/CounterFan/ChartRun.out +69 -0
  299. package/plugin/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.cfg +2 -0
  300. package/plugin/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.tla +11 -0
  301. package/plugin/skills/statechart/scripts/test/corpus/CounterFan/chart.mmd +85 -0
  302. package/plugin/skills/statechart/scripts/test/corpus/CounterFan/graph.dot +70 -0
  303. package/plugin/skills/statechart/scripts/test/corpus/CounterFan/report.md +12 -0
  304. package/plugin/skills/statechart/scripts/test/corpus/CounterFan/sany.out +2 -0
  305. package/plugin/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.exit +1 -0
  306. package/plugin/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.out +67 -0
  307. package/plugin/skills/statechart/scripts/test/corpus/CounterFan/verdict-2.out +57 -0
  308. package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.exit +1 -0
  309. package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.out +85 -0
  310. package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.cfg +6 -0
  311. package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.tla +13 -0
  312. package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/chart.mmd +5 -0
  313. package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/graph.dot +10 -0
  314. package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/report.md +31 -0
  315. package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/sany.out +2 -0
  316. package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.exit +1 -0
  317. package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.out +64 -0
  318. package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.exit +1 -0
  319. package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.out +77 -0
  320. package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/ChartRun.out +55 -0
  321. package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.cfg +3 -0
  322. package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.tla +10 -0
  323. package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/chart.mmd +12 -0
  324. package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/graph.dot +6 -0
  325. package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/report.md +12 -0
  326. package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/sany.out +2 -0
  327. package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.exit +1 -0
  328. package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.out +33 -0
  329. package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-2.out +54 -0
  330. package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/ChartRun.out +54 -0
  331. package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.cfg +3 -0
  332. package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.tla +10 -0
  333. package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/chart.mmd +1 -0
  334. package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/graph.dot +6 -0
  335. package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/report.md +7 -0
  336. package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/sany.out +2 -0
  337. package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/verdict-1.out +46 -0
  338. package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/ChartRun.out +59 -0
  339. package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.cfg +2 -0
  340. package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.tla +10 -0
  341. package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/CounterSteps.tla +6 -0
  342. package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/chart.mmd +17 -0
  343. package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/graph.dot +15 -0
  344. package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/report.md +14 -0
  345. package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/sany.out +3 -0
  346. package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.exit +1 -0
  347. package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.out +78 -0
  348. package/plugin/skills/statechart/scripts/test/corpus/CounterJump/ChartRun.out +59 -0
  349. package/plugin/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.cfg +3 -0
  350. package/plugin/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.tla +19 -0
  351. package/plugin/skills/statechart/scripts/test/corpus/CounterJump/chart.mmd +26 -0
  352. package/plugin/skills/statechart/scripts/test/corpus/CounterJump/graph.dot +22 -0
  353. package/plugin/skills/statechart/scripts/test/corpus/CounterJump/report.md +12 -0
  354. package/plugin/skills/statechart/scripts/test/corpus/CounterJump/sany.out +2 -0
  355. package/plugin/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.exit +1 -0
  356. package/plugin/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.out +58 -0
  357. package/plugin/skills/statechart/scripts/test/corpus/CounterJump/verdict-2.out +57 -0
  358. package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/ChartRun.out +57 -0
  359. package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.cfg +2 -0
  360. package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.tla +11 -0
  361. package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/chart.mmd +17 -0
  362. package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/graph.dot +15 -0
  363. package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/report.md +14 -0
  364. package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/sany.out +2 -0
  365. package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.exit +1 -0
  366. package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.out +76 -0
  367. package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/ChartRun.out +59 -0
  368. package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.cfg +3 -0
  369. package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.tla +11 -0
  370. package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/chart.mmd +19 -0
  371. package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/graph.dot +10 -0
  372. package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/report.md +15 -0
  373. package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/sany.out +2 -0
  374. package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.exit +1 -0
  375. package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.out +56 -0
  376. package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.exit +1 -0
  377. package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.out +67 -0
  378. package/plugin/skills/statechart/scripts/test/corpus/CounterRules/ChartRun.out +62 -0
  379. package/plugin/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.cfg +6 -0
  380. package/plugin/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.tla +24 -0
  381. package/plugin/skills/statechart/scripts/test/corpus/CounterRules/Moves.tla +5 -0
  382. package/plugin/skills/statechart/scripts/test/corpus/CounterRules/chart.mmd +22 -0
  383. package/plugin/skills/statechart/scripts/test/corpus/CounterRules/graph.dot +10 -0
  384. package/plugin/skills/statechart/scripts/test/corpus/CounterRules/report.md +23 -0
  385. package/plugin/skills/statechart/scripts/test/corpus/CounterRules/sany.out +3 -0
  386. package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.exit +1 -0
  387. package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.out +58 -0
  388. package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.exit +1 -0
  389. package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.out +66 -0
  390. package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.exit +1 -0
  391. package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.out +74 -0
  392. package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-4.out +59 -0
  393. package/plugin/skills/statechart/scripts/test/corpus/CounterStart/ChartRun.out +58 -0
  394. package/plugin/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.cfg +3 -0
  395. package/plugin/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.tla +15 -0
  396. package/plugin/skills/statechart/scripts/test/corpus/CounterStart/chart.mmd +18 -0
  397. package/plugin/skills/statechart/scripts/test/corpus/CounterStart/graph.dot +13 -0
  398. package/plugin/skills/statechart/scripts/test/corpus/CounterStart/report.md +11 -0
  399. package/plugin/skills/statechart/scripts/test/corpus/CounterStart/sany.out +2 -0
  400. package/plugin/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.exit +1 -0
  401. package/plugin/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.out +33 -0
  402. package/plugin/skills/statechart/scripts/test/corpus/CounterStart/verdict-2.out +57 -0
  403. package/plugin/skills/statechart/scripts/test/corpus/CounterStop/ChartRun.out +57 -0
  404. package/plugin/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.cfg +3 -0
  405. package/plugin/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.tla +15 -0
  406. package/plugin/skills/statechart/scripts/test/corpus/CounterStop/chart.mmd +7 -0
  407. package/plugin/skills/statechart/scripts/test/corpus/CounterStop/graph.dot +13 -0
  408. package/plugin/skills/statechart/scripts/test/corpus/CounterStop/report.md +6 -0
  409. package/plugin/skills/statechart/scripts/test/corpus/CounterStop/sany.out +2 -0
  410. package/plugin/skills/statechart/scripts/test/corpus/CounterStop/verdict-1.out +49 -0
  411. package/plugin/skills/statechart/scripts/test/corpus/CounterTie/ChartRun.out +61 -0
  412. package/plugin/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.cfg +4 -0
  413. package/plugin/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.tla +14 -0
  414. package/plugin/skills/statechart/scripts/test/corpus/CounterTie/chart.mmd +30 -0
  415. package/plugin/skills/statechart/scripts/test/corpus/CounterTie/graph.dot +19 -0
  416. package/plugin/skills/statechart/scripts/test/corpus/CounterTie/report.md +27 -0
  417. package/plugin/skills/statechart/scripts/test/corpus/CounterTie/sany.out +2 -0
  418. package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.exit +1 -0
  419. package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.out +56 -0
  420. package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.exit +1 -0
  421. package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.out +64 -0
  422. package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.exit +1 -0
  423. package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.out +87 -0
  424. package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-4.out +57 -0
  425. package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/ChartRun.out +60 -0
  426. package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.cfg +3 -0
  427. package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.tla +12 -0
  428. package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/chart.mmd +23 -0
  429. package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/graph.dot +19 -0
  430. package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/report.md +11 -0
  431. package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/sany.out +2 -0
  432. package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.exit +1 -0
  433. package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.out +56 -0
  434. package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-2.out +57 -0
  435. package/plugin/skills/statechart/scripts/test/corpus/CounterView/ChartRun.out +61 -0
  436. package/plugin/skills/statechart/scripts/test/corpus/CounterView/CounterView.cfg +4 -0
  437. package/plugin/skills/statechart/scripts/test/corpus/CounterView/CounterView.tla +14 -0
  438. package/plugin/skills/statechart/scripts/test/corpus/CounterView/chart.mmd +23 -0
  439. package/plugin/skills/statechart/scripts/test/corpus/CounterView/graph.dot +19 -0
  440. package/plugin/skills/statechart/scripts/test/corpus/CounterView/report.md +27 -0
  441. package/plugin/skills/statechart/scripts/test/corpus/CounterView/sany.out +2 -0
  442. package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-1.exit +1 -0
  443. package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-1.out +56 -0
  444. package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-2.exit +1 -0
  445. package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-2.out +64 -0
  446. package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-3.exit +1 -0
  447. package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-3.out +87 -0
  448. package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-4.out +57 -0
  449. package/plugin/skills/statechart/scripts/test/corpus/CounterView/view.mjs +1 -0
  450. package/plugin/skills/statechart/scripts/test/corpus/DieHard/ChartRun.out +59 -0
  451. package/plugin/skills/statechart/scripts/test/corpus/DieHard/DieHard.cfg +4 -0
  452. package/plugin/skills/statechart/scripts/test/corpus/DieHard/DieHard.tla +38 -0
  453. package/plugin/skills/statechart/scripts/test/corpus/DieHard/chart.mmd +92 -0
  454. package/plugin/skills/statechart/scripts/test/corpus/DieHard/graph.dot +126 -0
  455. package/plugin/skills/statechart/scripts/test/corpus/DieHard/report.md +17 -0
  456. package/plugin/skills/statechart/scripts/test/corpus/DieHard/sany.out +2 -0
  457. package/plugin/skills/statechart/scripts/test/corpus/DieHard/verdict-1.exit +1 -0
  458. package/plugin/skills/statechart/scripts/test/corpus/DieHard/verdict-1.out +91 -0
  459. package/plugin/skills/statechart/scripts/test/corpus/DieHard/verdict-2.out +57 -0
  460. package/plugin/skills/statechart/scripts/test/corpus/FirstRule/ChartRun.out +61 -0
  461. package/plugin/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.cfg +6 -0
  462. package/plugin/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.tla +11 -0
  463. package/plugin/skills/statechart/scripts/test/corpus/FirstRule/chart.mmd +22 -0
  464. package/plugin/skills/statechart/scripts/test/corpus/FirstRule/graph.dot +16 -0
  465. package/plugin/skills/statechart/scripts/test/corpus/FirstRule/report.md +25 -0
  466. package/plugin/skills/statechart/scripts/test/corpus/FirstRule/sany.out +2 -0
  467. package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.exit +1 -0
  468. package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.out +56 -0
  469. package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.exit +1 -0
  470. package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.out +64 -0
  471. package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.exit +1 -0
  472. package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.out +64 -0
  473. package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.exit +1 -0
  474. package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.out +77 -0
  475. package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/ChartRun.out +57 -0
  476. package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.cfg +4 -0
  477. package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.tla +11 -0
  478. package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/chart.mmd +13 -0
  479. package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/graph.dot +12 -0
  480. package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/report.md +11 -0
  481. package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/sany.out +2 -0
  482. package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.exit +1 -0
  483. package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.out +72 -0
  484. package/plugin/skills/statechart/scripts/test/corpus/Login/ChartRun.out +57 -0
  485. package/plugin/skills/statechart/scripts/test/corpus/Login/Login.cfg +3 -0
  486. package/plugin/skills/statechart/scripts/test/corpus/Login/Login.tla +62 -0
  487. package/plugin/skills/statechart/scripts/test/corpus/Login/chart.mmd +28 -0
  488. package/plugin/skills/statechart/scripts/test/corpus/Login/graph.dot +40 -0
  489. package/plugin/skills/statechart/scripts/test/corpus/Login/report.md +7 -0
  490. package/plugin/skills/statechart/scripts/test/corpus/Login/sany.out +1 -0
  491. package/plugin/skills/statechart/scripts/test/corpus/Login/verdict-1.out +47 -0
  492. package/plugin/skills/statechart/scripts/test/corpus/Login/view.mjs +1 -0
  493. package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/ChartRun.out +57 -0
  494. package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.cfg +2 -0
  495. package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.tla +64 -0
  496. package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/chart.mmd +28 -0
  497. package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/graph.dot +37 -0
  498. package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/report.md +8 -0
  499. package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/sany.out +1 -0
  500. package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/verdict-1.out +47 -0
  501. package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/view.mjs +1 -0
  502. package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/ChartRun.out +60 -0
  503. package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.cfg +3 -0
  504. package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.tla +64 -0
  505. package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/chart.mmd +44 -0
  506. package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/graph.dot +58 -0
  507. package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/report.md +17 -0
  508. package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/sany.out +1 -0
  509. package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.exit +1 -0
  510. package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.out +83 -0
  511. package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/verdict-2.out +57 -0
  512. package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/view.mjs +1 -0
  513. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/ChartRun.out +60 -0
  514. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.cfg +3 -0
  515. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.tla +103 -0
  516. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/chart.mmd +43 -0
  517. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/graph.dot +93 -0
  518. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/report.md +14 -0
  519. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/sany.out +1 -0
  520. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.exit +1 -0
  521. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.out +59 -0
  522. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-2.out +72 -0
  523. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/view.mjs +3 -0
  524. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/ChartRun.out +57 -0
  525. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.cfg +2 -0
  526. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.tla +100 -0
  527. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/chart.mmd +31 -0
  528. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/graph.dot +85 -0
  529. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/report.md +9 -0
  530. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/sany.out +1 -0
  531. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/verdict-1.out +47 -0
  532. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/view.mjs +3 -0
  533. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/ChartRun.out +59 -0
  534. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayer.tla +103 -0
  535. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.cfg +3 -0
  536. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.tla +6 -0
  537. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/chart.mmd +42 -0
  538. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/graph.dot +93 -0
  539. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/report.md +19 -0
  540. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/sany.out +2 -0
  541. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.exit +1 -0
  542. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.out +61 -0
  543. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-2.out +59 -0
  544. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-3.out +61 -0
  545. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.exit +1 -0
  546. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.out +66 -0
  547. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.exit +1 -0
  548. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.out +58 -0
  549. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-6.out +49 -0
  550. package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/view.mjs +3 -0
  551. package/plugin/skills/statechart/scripts/test/corpus/PickWorker/ChartRun.out +57 -0
  552. package/plugin/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.cfg +6 -0
  553. package/plugin/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.tla +11 -0
  554. package/plugin/skills/statechart/scripts/test/corpus/PickWorker/chart.mmd +5 -0
  555. package/plugin/skills/statechart/scripts/test/corpus/PickWorker/graph.dot +11 -0
  556. package/plugin/skills/statechart/scripts/test/corpus/PickWorker/report.md +7 -0
  557. package/plugin/skills/statechart/scripts/test/corpus/PickWorker/sany.out +5 -0
  558. package/plugin/skills/statechart/scripts/test/corpus/PickWorker/verdict-1.out +70 -0
  559. package/plugin/skills/statechart/scripts/test/corpus/Shadow/ChartRun.out +61 -0
  560. package/plugin/skills/statechart/scripts/test/corpus/Shadow/Shadow.cfg +4 -0
  561. package/plugin/skills/statechart/scripts/test/corpus/Shadow/Shadow.tla +11 -0
  562. package/plugin/skills/statechart/scripts/test/corpus/Shadow/ShadowLib.tla +6 -0
  563. package/plugin/skills/statechart/scripts/test/corpus/Shadow/ShadowSub.tla +3 -0
  564. package/plugin/skills/statechart/scripts/test/corpus/Shadow/chart.mmd +9 -0
  565. package/plugin/skills/statechart/scripts/test/corpus/Shadow/graph.dot +16 -0
  566. package/plugin/skills/statechart/scripts/test/corpus/Shadow/report.md +8 -0
  567. package/plugin/skills/statechart/scripts/test/corpus/Shadow/sany.out +4 -0
  568. package/plugin/skills/statechart/scripts/test/corpus/Shadow/verdict-1.out +65 -0
  569. package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/ChartRun.out +59 -0
  570. package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.cfg +2 -0
  571. package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.tla +9 -0
  572. package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/chart.mmd +23 -0
  573. package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/graph.dot +17 -0
  574. package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/report.md +15 -0
  575. package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/sany.out +1 -0
  576. package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.exit +1 -0
  577. package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.out +65 -0
  578. package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.exit +1 -0
  579. package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.out +75 -0
  580. package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/ChartRun.out +69 -0
  581. package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.cfg +3 -0
  582. package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.tla +75 -0
  583. package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/chart.mmd +60 -0
  584. package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/graph.dot +297 -0
  585. package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/report.md +20 -0
  586. package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/sany.out +1 -0
  587. package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.exit +1 -0
  588. package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.out +95 -0
  589. package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/verdict-2.out +57 -0
  590. package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/view.mjs +1 -0
  591. package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/ChartRun.out +57 -0
  592. package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.cfg +3 -0
  593. package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.tla +75 -0
  594. package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/chart.mmd +37 -0
  595. package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/graph.dot +223 -0
  596. package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/report.md +11 -0
  597. package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/sany.out +1 -0
  598. package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/verdict-1.out +47 -0
  599. package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/view.mjs +1 -0
  600. package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.exit +1 -0
  601. package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.out +75 -0
  602. package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.cfg +5 -0
  603. package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.tla +11 -0
  604. package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/chart.mmd +18 -0
  605. package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/graph.dot +14 -0
  606. package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/report.md +29 -0
  607. package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/sany.out +2 -0
  608. package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.exit +1 -0
  609. package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.out +64 -0
  610. package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.exit +1 -0
  611. package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.out +75 -0
  612. package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/ChartRun.out +58 -0
  613. package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.cfg +2 -0
  614. package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.tla +8 -0
  615. package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/chart.mmd +22 -0
  616. package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/graph.dot +16 -0
  617. package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/report.md +15 -0
  618. package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/sany.out +2 -0
  619. package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.exit +1 -0
  620. package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.out +56 -0
  621. package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.exit +1 -0
  622. package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.out +77 -0
  623. package/plugin/skills/statechart/scripts/test/corpus.test.ts +453 -0
  624. package/plugin/skills/statechart/scripts/test/differential.test.ts +565 -0
  625. package/plugin/skills/statechart/scripts/test/drawn.ts +20 -0
  626. package/plugin/skills/statechart/scripts/test/grid/Grid.cfg +2 -0
  627. package/plugin/skills/statechart/scripts/test/grid/Grid.tla +9 -0
  628. package/plugin/skills/statechart/scripts/test/grid/sany.out +2 -0
  629. package/plugin/skills/statechart/scripts/test/java.ts +63 -0
  630. package/plugin/skills/statechart/scripts/test/labels.ts +648 -0
  631. package/plugin/skills/statechart/scripts/test/messages.test.ts +226 -0
  632. package/plugin/skills/statechart/scripts/test/pipeline.test.ts +270 -0
  633. package/plugin/skills/statechart/scripts/test/plain-tlc.test.ts +255 -0
  634. package/plugin/skills/statechart/scripts/test/render.test.ts +145 -0
  635. package/plugin/skills/statechart/scripts/test/tlc-out.test.ts +90 -0
  636. package/plugin/skills/statechart/scripts/test/tlc.ts +158 -0
  637. package/plugin/skills/statechart/scripts/tsconfig.json +11 -0
  638. package/plugin/skills/statechart/scripts/worker.ts +35 -0
  639. package/plugin/skills/swarm/SKILL.md +58 -0
  640. package/plugin/skills/tdd/SKILL.md +41 -0
  641. package/plugin/skills/teach/SKILL.md +28 -0
  642. package/plugin/skills/technical-writing/SKILL.md +69 -0
  643. package/plugin/skills/thermo-nuclear-code-quality-review/SKILL.md +201 -0
  644. package/plugin/skills/thermo-nuclear-review/SKILL.md +50 -0
  645. package/plugin/skills/thermos/SKILL.md +40 -0
  646. package/plugin/skills/typescript-best-practices/SKILL.md +32 -0
  647. package/plugin/skills/typescript-best-practices/references/patterns.md +328 -0
  648. package/plugin/skills/unslop/SKILL.md +39 -0
  649. package/plugin/skills/what-did-i-get-done/SKILL.md +31 -0
  650. package/plugin/skills/why/SKILL.md +16 -0
  651. package/README.md +0 -3
@@ -0,0 +1,492 @@
1
+ #!/usr/bin/env node
2
+ // Read-only worktree prune audit. Classifies every git worktree by size, merge
3
+ // state, uncommitted work, ignored files outside build and cache directories,
4
+ // commits only its HEAD reflog reaches, remote/PR state, and the most recent chat that
5
+ // operated in it, then prints a table sorted by size with a suggested bucket.
6
+ // Never deletes anything; deletion stays a human-gated step in the playbook.
7
+ //
8
+ // node worktree-audit.mjs [repo-path] [transcripts-path ...]
9
+ //
10
+ // Without a transcripts path it scans every runtime's transcripts directory
11
+ // that exists: Claude Code's projects under $CLAUDE_CONFIG_DIR, Codex's sessions
12
+ // and archived_sessions under $CODEX_HOME, and Pi's sessions and pstack subagent
13
+ // sessions under $PI_CODING_AGENT_DIR (defaults: ~/.claude, ~/.codex, ~/.pi/agent).
14
+ //
15
+ // Compressed rollouts use native Zstd when it reads complete streams. Other
16
+ // runtimes fall back to zstd on PATH. A decode failure makes the whole chat
17
+ // scan unknown, so no worktree can be declared safe from that scan.
18
+ //
19
+ // Every probe yields a Fact, { known: true, value } or { known: false }. A hold
20
+ // bucket needs only its own fact; `safe` needs every fact known.
21
+ import { execFileSync } from "node:child_process";
22
+ import { readdirSync, readFileSync, realpathSync, statSync } from "node:fs";
23
+ import { homedir } from "node:os";
24
+ import { basename, dirname, join } from "node:path";
25
+ import process from "node:process";
26
+ import { fileURLToPath } from "node:url";
27
+ import zlib from "node:zlib";
28
+
29
+ import { candidates, rethrowUnlessRemoved } from "../../reflect/scripts/find-transcript.mjs";
30
+
31
+ const known = (value) => ({ known: true, value });
32
+ const UNKNOWN = Object.freeze({ known: false });
33
+ const probe = (read) => {
34
+ try {
35
+ return known(read());
36
+ } catch {
37
+ return UNKNOWN;
38
+ }
39
+ };
40
+ const bind = (fact, next) => (fact.known ? next(fact.value) : UNKNOWN);
41
+
42
+ const DAY = 86400;
43
+ const RECENT_DAYS = 4;
44
+ const HEADER = ["SIZE", "AGE", "MERGED", "DIRTY", "REMOTE", "PR", "LAST_CHAT", "BUCKET", "LOCKED", "WORKTREE"];
45
+ // Merged and closed PRs drop out of gh's default open-only listing.
46
+ const GH_PR_LIST = ["pr", "list", "--author", "@me", "--state", "all", "--limit", "1000",
47
+ "--json", "number,state,headRefName,headRefOid"];
48
+ // An ignored path under one of these names is a rebuildable build or cache
49
+ // artifact. Any other ignored path, such as `.env`, may exist nowhere else.
50
+ export const DISPOSABLE = new Set([
51
+ ".build", ".cache", ".dart_tool", ".DS_Store", ".gradle", ".lake", ".lycheecache", ".mypy_cache", ".next", ".nuxt",
52
+ ".parcel-cache", ".pytest_cache", ".ruff_cache", ".svelte-kit", ".tox", ".turbo", ".venv", "__pycache__", "build",
53
+ "coverage", "DerivedData", "dist", "node_modules", "target", "venv",
54
+ ]);
55
+
56
+ export function classify(facts) {
57
+ const { locked, dirty, orphans, pr, recent, ancestry, head } = facts;
58
+ if (locked.known && locked.value !== null) return "hold-locked";
59
+ if (dirty.known && dirty.value.wip > 0) return "hold-wip";
60
+ if (dirty.known && dirty.value.untracked > 0) return "hold-untracked";
61
+ if (orphans.known && orphans.value > 0) return "hold-reflog";
62
+ if (dirty.known && dirty.value.ignored > 0) return "hold-ignored";
63
+ if (pr.known && pr.value?.state === "OPEN") return "hold-open-pr";
64
+ if (recent.known && recent.value) return "verify-recent-chat";
65
+ if (Object.values(facts).some((fact) => !fact.known)) return "review";
66
+ if (ancestry.value) return "safe";
67
+ if (pr.value?.state === "MERGED" && pr.value.headRefOid === head.value) return "safe";
68
+ return "review";
69
+ }
70
+
71
+ // The default 1 MiB buffer fails a status that lists several thousand untracked files.
72
+ function git(cwd, ...args) {
73
+ return execFileSync("git", args, { cwd, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"], maxBuffer: Infinity })
74
+ .replace(/\n+$/, "");
75
+ }
76
+
77
+ const runGh = (args, cwd) =>
78
+ execFileSync("gh", args, { cwd, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] });
79
+
80
+ // `--porcelain -z` output: NUL-separated fields, one record per worktree, the
81
+ // primary worktree first.
82
+ export function parseWorktrees(output) {
83
+ const worktrees = [];
84
+ for (const field of output.split("\0")) {
85
+ if (field.startsWith("worktree ")) worktrees.push({ path: field.slice("worktree ".length), prunable: false, locked: null });
86
+ else if (field.startsWith("prunable")) worktrees.at(-1).prunable = true;
87
+ else if (field.startsWith("locked")) worktrees.at(-1).locked = field.slice("locked ".length);
88
+ }
89
+ return worktrees;
90
+ }
91
+
92
+ export function defaultTranscriptRoots({
93
+ claudeConfigDir = process.env.CLAUDE_CONFIG_DIR,
94
+ codexHome = process.env.CODEX_HOME,
95
+ piAgentDir = process.env.PI_CODING_AGENT_DIR,
96
+ copilotHome = process.env.COPILOT_HOME,
97
+ home = homedir(),
98
+ stat = statSync,
99
+ } = {}) {
100
+ const claude = join(claudeConfigDir || join(home, ".claude"), "projects");
101
+ const codex = codexHome || join(home, ".codex");
102
+ const piAgent = piAgentDir || join(home, ".pi", "agent");
103
+ const copilot = join(copilotHome || join(home, ".copilot"), "session-state");
104
+ const found = [claude, join(codex, "sessions"), join(codex, "archived_sessions"),
105
+ join(piAgent, "sessions"), join(piAgent, "pstack"), copilot].filter((root) => {
106
+ try {
107
+ return stat(root, { throwIfNoEntry: false }) !== undefined;
108
+ } catch (error) {
109
+ return !["ENOENT", "ENOTDIR"].includes(error.code);
110
+ }
111
+ });
112
+ return found.length ? found : [claude];
113
+ }
114
+
115
+ // APFS inode numbers pass 2^53, where two of them read as one number.
116
+ const fileId = (path, stat) => {
117
+ const { dev, ino } = stat(path, { bigint: true });
118
+ return `${dev}:${ino}`;
119
+ };
120
+
121
+ // A link is known by the identity stat reports for what it lands on, and by
122
+ // the name realpathSync gives it when it gives one. The name alone misses
123
+ // links: node resolves `..` in a target before the links in it and keeps a
124
+ // firmlink route as written, and bun opens the target to name it, which macOS
125
+ // refuses for its autofs /home or can hang there. A dangling or looping link (ENOENT, ELOOP)
126
+ // spells nothing. When stat fails any other way the route is closed to this
127
+ // process and the link could land anywhere, so the error propagates and the
128
+ // caller leaves the worktree's chat fact unknown.
129
+ export function symlinkTargets(dir, stat = statSync) {
130
+ return readdirSync(dir, { withFileTypes: true }).filter((entry) => entry.isSymbolicLink()).flatMap((entry) => {
131
+ const link = join(dir, entry.name);
132
+ try {
133
+ return [[link, { id: fileId(link, stat), name: process.platform === "darwin" && process.versions.bun ? undefined : probe(() => realpathSync(link)).value }]];
134
+ } catch (error) {
135
+ if (["ENOENT", "ELOOP"].includes(error.code)) return [];
136
+ throw error;
137
+ }
138
+ });
139
+ }
140
+
141
+ // Git reports a worktree by its resolved path, while a session may name it
142
+ // through a symlink in an ancestor directory, as macOS spells /private/tmp/x
143
+ // as /tmp/x, or through several, as /tmp/link/x when /private/tmp/link points
144
+ // at /private/tmp/real. A worktree whose directory is gone keeps git's spelling.
145
+ export function pathSpellings(path, linksIn = symlinkTargets, stat = statSync) {
146
+ let resolved;
147
+ try {
148
+ resolved = realpathSync(path);
149
+ } catch (error) {
150
+ if (error.code === "ENOENT") return [path];
151
+ throw error;
152
+ }
153
+ const ancestors = [];
154
+ for (let dir = dirname(resolved); ; dir = dirname(dir)) {
155
+ ancestors.unshift(dir);
156
+ if (dir === dirname(dir)) break;
157
+ }
158
+ const onPath = [...ancestors, resolved];
159
+ // A link lands on every directory that it names or that shares its identity:
160
+ // a filesystem may report one identity for several, and a spare spelling
161
+ // costs a hold where a missed one can cost the worktree.
162
+ const links = ancestors.flatMap((dir) => linksIn(dir).flatMap(([link, { id, name }]) =>
163
+ onPath.filter((target) => target === name || fileId(target, stat) === id).map((target) => [dir, link, target])));
164
+ // Spell each directory from the root down, so a link's own directory is
165
+ // already spelled when the link is applied. A link back up to an ancestor of
166
+ // its directory is applied through that directory's resolved spelling only,
167
+ // which keeps the set finite.
168
+ const spelled = new Map();
169
+ for (const dir of onPath) {
170
+ const parent = dirname(dir);
171
+ const forms = new Set(parent === dir ? [dir] : spelled.get(parent).map((form) => join(form, basename(dir))));
172
+ for (const [home, link, target] of links) {
173
+ if (target === dir) for (const form of spelled.get(home) ?? [home]) forms.add(join(form, basename(link)));
174
+ }
175
+ spelled.set(dir, [...forms]);
176
+ }
177
+ return [...new Set([path, ...spelled.get(resolved)])];
178
+ }
179
+
180
+ // A transcript names a worktree up to a boundary byte or the end of the JSON
181
+ // string, never a bare prefix, so `/x/candidate` does not inherit a chat that
182
+ // ran in `/x/candidate-long`. Only JSONL is scanned, so the path appears
183
+ // JSON-escaped and a `\` after it opens the escape of a quote, backslash, or
184
+ // control byte. `.` counts only before another boundary (a sentence-final
185
+ // path), because `/x/candidate.bak` is a plausible sibling. `*`, `$`, and `{`
186
+ // stay out: they extend a path by glob or expansion. `?` globs too, but it
187
+ // also ends a question or a URL's path, and a false match costs only a hold.
188
+ const BOUNDARY = new Set(Buffer.from("/\\\"' `:;),|&<>]}?!"));
189
+ const DOT = ".".charCodeAt(0);
190
+ const bounded = (text, at) => at === text.length || BOUNDARY.has(text[at]);
191
+ function mentions(text, needle) {
192
+ for (let at = text.indexOf(needle); at !== -1; at = text.indexOf(needle, at + 1)) {
193
+ const end = at + needle.length;
194
+ if (bounded(text, end) || (text[end] === DOT && bounded(text, end + 1))) return true;
195
+ }
196
+ return false;
197
+ }
198
+
199
+ // Git on Windows may spell a path with forward slashes while the session uses backslashes.
200
+ function transcriptNeedles(spellings) {
201
+ const forms = spellings.flatMap((spelling) => (/^(?:[a-z]:[\\/]|\\\\|\/\/)/i.test(spelling)
202
+ ? [spelling.replaceAll("\\", "/"), spelling.replaceAll("/", "\\")]
203
+ : [spelling]));
204
+ return [...new Set(forms)].map((form) => Buffer.from(JSON.stringify(form).slice(1, -1)));
205
+ }
206
+
207
+ // Bun 1.4.4 returns the partial output of a truncated frame without an error,
208
+ // and nodejs/node#64592 reports the same for Node. The check also turns down a
209
+ // decoder that stops after the first frame. It runs once, not once per transcript.
210
+ function nativeZstdDecoder() {
211
+ const decode = zlib.zstdDecompressSync;
212
+ if (typeof decode !== "function") return undefined;
213
+ // A complete Zstd frame containing "a", independent of compressor availability.
214
+ const frame = Buffer.from("28b52ffd200109000061", "hex");
215
+ const joined = Buffer.concat([frame, frame]);
216
+ try {
217
+ if (decode(joined).toString() !== "aa") return undefined;
218
+ } catch {
219
+ return undefined;
220
+ }
221
+ for (const partial of [frame.subarray(0, -1), joined.subarray(0, -1)]) {
222
+ try {
223
+ decode(partial);
224
+ return undefined;
225
+ } catch { /* A complete-stream decoder must reject an unfinished frame. */ }
226
+ }
227
+ return decode;
228
+ }
229
+
230
+ const decodeZstd = nativeZstdDecoder() ?? ((input) => execFileSync("zstd", ["-d", "-c"], {
231
+ input, stdio: ["pipe", "pipe", "pipe"], maxBuffer: Infinity, timeout: 30_000,
232
+ }));
233
+
234
+ // `spellings` maps each worktree path to every spelling a session could use.
235
+ export function lastChats(roots, spellings) {
236
+ const needles = [...spellings].map(([path, forms]) => [path, transcriptNeedles(forms)]);
237
+ const latest = new Map();
238
+ for (const { path: file } of roots.flatMap((root) => candidates(root, Infinity, { includeCompressed: true }))) {
239
+ let text, mtime;
240
+ try {
241
+ text = readFileSync(file);
242
+ // A session can resume after enumeration. Its new content must use its
243
+ // current timestamp, not the old one used to order the candidates.
244
+ mtime = Math.floor(statSync(file).mtimeMs / 1000);
245
+ } catch (error) {
246
+ rethrowUnlessRemoved(error);
247
+ continue;
248
+ }
249
+ if (file.endsWith(".jsonl.zst")) {
250
+ try {
251
+ text = decodeZstd(text);
252
+ } catch (error) {
253
+ // A missing fallback executable is not a transcript removed during enumeration.
254
+ const hint = error.code === "ENOENT" ? " Use a runtime with complete native Zstd support or install zstd." : "";
255
+ throw new Error(`cannot decode ${file}: ${String(error.stderr ?? "").trim() || error.message}${hint}`);
256
+ }
257
+ }
258
+ for (const [path, forms] of needles) {
259
+ if (mtime > (latest.get(path) ?? 0) && forms.some((needle) => mentions(text, needle))) latest.set(path, mtime);
260
+ }
261
+ }
262
+ return latest;
263
+ }
264
+
265
+ // Take one advertisement for all rows, including deletions that a cached ref misses.
266
+ function advertisedBranches(repo) {
267
+ const refs = git(repo, "ls-remote", "--symref", "origin", "HEAD", "refs/heads/*");
268
+ const trunk = /^ref: refs\/heads\/(.+)\tHEAD$/m.exec(refs)?.[1] ?? "main";
269
+ const tips = new Map();
270
+ for (const match of refs.matchAll(/^([0-9a-f]+)\trefs\/heads\/(.+)$/gm)) tips.set(match[2], match[1]);
271
+ return { trunk, tips };
272
+ }
273
+
274
+ function isAncestor(repo, head, trunk) {
275
+ try {
276
+ git(repo, "merge-base", "--is-ancestor", head, `refs/remotes/origin/${trunk}`);
277
+ return true;
278
+ } catch (error) {
279
+ if (error.status === 1) return false;
280
+ throw error;
281
+ }
282
+ }
283
+
284
+ // `--ignored=matching` prints an ignored directory once, as `!! node_modules/`,
285
+ // and an ignored file inside a tracked directory by its own path.
286
+ function dirtyState(path) {
287
+ const lines = git(path, "status", "--porcelain", "--untracked-files=all", "--ignored=matching", "--ignore-submodules=none")
288
+ .split("\n").filter(Boolean);
289
+ const untracked = lines.filter((line) => line.startsWith("??")).length;
290
+ const ignoredLines = lines.filter((line) => line.startsWith("!!"));
291
+ const keepIgnored = (name) => !name.split("/").some((part) => DISPOSABLE.has(part));
292
+ let ignored = ignoredLines.filter((line) => keepIgnored(line.slice(3).replace(/^"|"$/g, ""))).length;
293
+ // Superproject status omits ignored files in initialized submodules, even with --ignore-submodules=none.
294
+ if (statSync(join(path, ".gitmodules"), { throwIfNoEntry: false })) {
295
+ const nested = git(path, "submodule", "foreach", "--quiet", "--recursive",
296
+ "git ls-files --others --ignored --exclude-standard --directory --no-empty-directory -z");
297
+ ignored += nested.split("\0").filter((name) => name && keepIgnored(name)).length;
298
+ }
299
+ return { wip: lines.length - untracked - ignoredLines.length, untracked, ignored };
300
+ }
301
+
302
+ // Counts commits that only this worktree's HEAD reflog reaches, which
303
+ // `git worktree remove` deletes. A commit a branch reflog also lists, such as
304
+ // a rebased branch's old tip, lives in the shared logs and survives removal.
305
+ function reflogOnly(path, branchLogged) {
306
+ const visited = new Set(git(path, "rev-list", "--walk-reflogs", "HEAD").split("\n").filter(Boolean));
307
+ const input = [...visited, ...[...branchLogged].map((sha) => `^${sha}`)].join("\n");
308
+ // `--not` before `--stdin` leaves the stdin revisions unnegated.
309
+ return Number(execFileSync("git", ["rev-list", "--count", "--not", "--branches", "--tags", "--remotes", "--stdin"], {
310
+ cwd: path, encoding: "utf8", input: `${input}\n`, stdio: ["pipe", "pipe", "pipe"], maxBuffer: Infinity,
311
+ }).trim());
312
+ }
313
+
314
+ function remoteState(path, branch, head, tips) {
315
+ const sha = tips.get(branch);
316
+ if (!sha) return "no-remote";
317
+ if (sha === head) return "pushed";
318
+ // Only download history when this checkout lacks the advertised commit. Leave local tracking refs alone.
319
+ if (!probe(() => git(path, "cat-file", "-e", sha)).known) {
320
+ git(path, "fetch", "--no-tags", "--no-write-fetch-head", "--recurse-submodules=no", "--refmap=", "origin", `refs/heads/${branch}`);
321
+ }
322
+ // `--left-right` prints the remote-only count, then the HEAD-only count.
323
+ const [behind, ahead] = git(path, "rev-list", "--left-right", "--count", `${sha}...${head}`).split(/\s+/).map(Number);
324
+ return [ahead > 0 && `ahead${ahead}`, behind > 0 && `behind${behind}`].filter(Boolean).join(",");
325
+ }
326
+
327
+ export function duSize(output) {
328
+ return output.trim().split(/\s/)[0];
329
+ }
330
+
331
+ function size(path) {
332
+ try {
333
+ return duSize(execFileSync("du", ["-sh", path], { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }));
334
+ } catch {
335
+ return "?";
336
+ }
337
+ }
338
+
339
+ // Orders du's human-readable sizes the way `sort -h` does.
340
+ function sizeKey(label) {
341
+ const match = /^(\d+(?:\.\d+)?)([KMGTPE]?)/.exec(label);
342
+ if (!match) return 0;
343
+ return Number(match[1]) * 1024 ** (match[2] ? "KMGTPE".indexOf(match[2]) + 1 : 0);
344
+ }
345
+
346
+ function dirtyLabel({ wip, untracked, ignored }, orphans) {
347
+ return [
348
+ wip > 0 && `wip:${wip}`,
349
+ untracked > 0 && `untracked:${untracked}`,
350
+ ignored > 0 && `ignored:${ignored}`,
351
+ orphans.known && orphans.value > 0 && `reflog:${orphans.value}`,
352
+ ].filter(Boolean).join(",") || "clean";
353
+ }
354
+
355
+ // `--porcelain -z` hands over the lock reason raw, newlines included.
356
+ function lockedLabel(locked) {
357
+ if (locked === null) return "-";
358
+ return locked.replace(/\s+/g, " ").trim() || "locked";
359
+ }
360
+
361
+ function auditWorktree({ path, locked }, { repo, trunk, fetched, advertised, prs, chats, branchLogs, now }) {
362
+ const head = probe(() => git(path, "rev-parse", "HEAD"));
363
+ const age = bind(head, () => probe(() => Math.trunc((now - Number(git(path, "log", "-1", "--format=%ct", "HEAD"))) / DAY)));
364
+ const ancestry = bind(head, (sha) => probe(() => isAncestor(repo, sha, trunk)));
365
+ const dirty = probe(() => dirtyState(path));
366
+ const orphans = bind(head, () => bind(branchLogs, (logged) => probe(() => reflogOnly(path, logged))));
367
+ const branch = probe(() => {
368
+ const name = git(path, "rev-parse", "--abbrev-ref", "HEAD");
369
+ return name === "HEAD" ? null : name;
370
+ });
371
+ const remote = bind(branch, (name) => {
372
+ if (name === null) return known("detached");
373
+ if (!head.known || !advertised.known) return UNKNOWN;
374
+ return probe(() => remoteState(path, name, head.value, advertised.value.tips));
375
+ });
376
+ const pr = bind(prs, (list) => bind(branch, (name) => {
377
+ const matching = list.filter((entry) => name !== null && entry.headRefName === name);
378
+ // A branch can target several bases; a newer closed PR does not end an older open one.
379
+ return known(matching.find((entry) => entry.state === "OPEN") ?? matching[0] ?? null);
380
+ }));
381
+ const lastChat = chats.get(path);
382
+ const recent = bind(lastChat, (ts) => known(ts !== null && Math.trunc((now - ts) / DAY) <= RECENT_DAYS));
383
+ const bucket = classify({ trunk: fetched, head, age, ancestry, dirty, orphans, remote, pr, recent, locked: known(locked) });
384
+ return [
385
+ size(path),
386
+ age.known ? `${age.value}d` : "?",
387
+ ancestry.known ? (ancestry.value ? "YES" : "no") : "?",
388
+ dirty.known ? dirtyLabel(dirty.value, orphans) : "unknown",
389
+ remote.known ? remote.value : "unknown",
390
+ pr.known && pr.value ? `#${pr.value.number}/${pr.value.state}` : "-",
391
+ lastChat.known && lastChat.value !== null ? new Date(lastChat.value * 1000).toISOString().slice(0, 10) : "-",
392
+ bucket,
393
+ lockedLabel(locked),
394
+ path,
395
+ ];
396
+ }
397
+
398
+ // Discovery failures keep the table printing, but leave their facts unknown so
399
+ // no row they touch can reach `safe`.
400
+ export function audit({
401
+ repo,
402
+ transcripts,
403
+ gh = runGh,
404
+ warn = (line) => console.error(line),
405
+ now = Math.floor(Date.now() / 1000),
406
+ }) {
407
+ const discover = (read, message) => {
408
+ try {
409
+ return known(read());
410
+ } catch (error) {
411
+ warn(`warn: ${message}: ${String(error.stderr ?? "").trim() || error.message}`);
412
+ return UNKNOWN;
413
+ }
414
+ };
415
+ const advertised = probe(() => advertisedBranches(repo));
416
+ const trunk = advertised.known ? advertised.value.trunk : "main";
417
+ // An explicit refspec updates the ref even where a single-branch clone does not track it.
418
+ const fetched = discover(
419
+ () => git(repo, "fetch", "origin", `+refs/heads/${trunk}:refs/remotes/origin/${trunk}`),
420
+ `could not fetch origin/${trunk}; merged column may be stale`,
421
+ );
422
+ const prs = discover(() => {
423
+ const list = JSON.parse(gh(GH_PR_LIST, repo));
424
+ if (!Array.isArray(list)) throw new Error("gh returned JSON that is not an array");
425
+ return list;
426
+ }, "gh pr list failed; PR column will be empty");
427
+
428
+ const worktrees = parseWorktrees(git(repo, "worktree", "list", "--porcelain", "-z")).slice(1);
429
+ const live = worktrees.filter((worktree) => !worktree.prunable).map((worktree) => worktree.path);
430
+ // Worktrees share ancestors, so each directory's links are read once.
431
+ const links = new Map();
432
+ const linksIn = (dir) => links.get(dir) ?? links.set(dir, symlinkTargets(dir)).get(dir);
433
+ const spellings = new Map(live.map((path) => [
434
+ path,
435
+ discover(() => pathSpellings(path, linksIn), `could not resolve the spellings of ${path}; LAST_CHAT column will be empty`),
436
+ ]));
437
+ const scanFailed = "transcript scan failed; LAST_CHAT column will be empty";
438
+ const missing = discover(
439
+ () => transcripts.filter((root) => !statSync(root, { throwIfNoEntry: false })?.isDirectory()),
440
+ scanFailed,
441
+ );
442
+ // Every root must be readable: a chat the scan could not see might be recent.
443
+ const found = bind(missing, (roots) => {
444
+ for (const root of roots) warn(`warn: ${root} not found; LAST_CHAT column will be empty`);
445
+ if (roots.length) return UNKNOWN;
446
+ const knownSpellings = new Map([...spellings].filter(([, fact]) => fact.known).map(([path, fact]) => [path, fact.value]));
447
+ return discover(() => lastChats(transcripts, knownSpellings), scanFailed);
448
+ });
449
+ const chats = new Map(live.map((path) => [
450
+ path,
451
+ bind(spellings.get(path), () => bind(found, (latest) => known(latest.get(path) ?? null))),
452
+ ]));
453
+
454
+ const branchLogs = discover(
455
+ () => new Set(git(repo, "rev-list", "--walk-reflogs", "--branches").split("\n").filter(Boolean)),
456
+ "could not read branch reflogs; no worktree can reach safe",
457
+ );
458
+ const context = { repo, trunk, fetched, advertised, prs, chats, branchLogs, now };
459
+ const rows = worktrees.map((worktree) =>
460
+ worktree.prunable
461
+ ? ["-", "?", "-", "-", "-", "-", "-", "prunable", "-", worktree.path]
462
+ : auditWorktree(worktree, context),
463
+ );
464
+ rows.sort((a, b) => sizeKey(b[0]) - sizeKey(a[0]) || (a.join("\t") < b.join("\t") ? 1 : -1));
465
+ return [HEADER, ...rows].map((row) => `${row.join("\t")}\n`).join("");
466
+ }
467
+
468
+ function main(argv) {
469
+ const [repoArg, ...transcriptsArgs] = argv;
470
+ const repo = probe(() => git(repoArg || process.cwd(), "rev-parse", "--show-toplevel"));
471
+ if (!repo.known) {
472
+ console.error("not in a git repo; pass a repo path");
473
+ return 1;
474
+ }
475
+ const transcripts = transcriptsArgs.length ? transcriptsArgs : defaultTranscriptRoots();
476
+ process.stdout.write(audit({ repo: repo.value, transcripts }));
477
+ return 0;
478
+ }
479
+
480
+ // node leaves argv[1] unresolved and may set it to a non-file (`node -e ... arg`).
481
+ function invokedDirectly() {
482
+ if (!process.argv[1]) return false;
483
+ try {
484
+ return fileURLToPath(import.meta.url) === realpathSync(process.argv[1]);
485
+ } catch {
486
+ return false;
487
+ }
488
+ }
489
+
490
+ if (invokedDirectly()) {
491
+ process.exitCode = main(process.argv.slice(2));
492
+ }
@@ -0,0 +1,11 @@
1
+ You are working for the operator. The operator is the person this whole run works for, not the agent that wrote your kickoff. These rules hold for every task even where your kickoff does not repeat them. Your kickoff overrides one only when it says so in so many words.
2
+
3
+ - If you start an agent, the first line of its kickoff is `Read <path>/worker.md before anything else.`, with `<path>` the absolute path of the folder that holds this file.
4
+ - The bar in your kickoff is the whole bar. Add no check, gate, sign-off or review round above it.
5
+ - With no bar stated, the change must be no worse than its base and pass its own tests.
6
+ - Hold or block only for a failing run at this head or a bug a user would hit. Report a problem the base already has in one line.
7
+ - Never call a tool that shows a person a question. Make any choice you can undo, then say what you chose and why. Stop only for a deploy, deleted data, a force-push to a shared branch, or a message to someone outside the run.
8
+ - Open every PR ready for review, never as a draft.
9
+ - PR title: `type(scope): subject`.
10
+ - PR body: 40 lines at most, with these `##` headings in this order, empty ones dropped: `Why`, `What changed`, `Scope`, `Tradeoffs`, `Blast Radius`, `Verification`.
11
+ - Put evidence logs, run histories and long tables in a file or a PR comment, and link to them from the body.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: principle-attack-the-premise
3
+ description: "Apply when two or more fixes that share one premise have failed the same gate. Write the premise down and test it directly before you write another fix that assumes it."
4
+ user-invocable: false
5
+ ---
6
+
7
+ # Attack the Premise
8
+
9
+ When two or more fixes that share one premise have failed the same gate, suspect the premise, not the fixes.
10
+
11
+ - Write the premise down: the one sentence every failed fix assumed.
12
+ - Test it before the next fix. Find an observation that would come out differently if the premise were false, and make it. Look at how the failures are distributed, not only at how large they are.
13
+ - If the evidence contradicts the premise, look for what the failures share that it did not predict. If one part always lands on the losing side, change what puts it there instead of adding a mechanism that cleans up after it.
14
+
15
+ Do not start the next fix before the premise is written down and tested.
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: principle-boundary-discipline
3
+ description: "Apply when wiring validation, error handling, or framework adapters. Concentrate guards at system boundaries (CLI, config, network, external APIs); trust internal types and keep business logic in pure functions."
4
+ user-invocable: false
5
+ ---
6
+
7
+ # Boundary Discipline
8
+
9
+ Validate, narrow types, and handle errors where data crosses a system boundary (CLI args, config files, external APIs, network). Inside, trust the types: no re-validation and no redundant nil checks. Parse raw data into domain types at the boundary, and keep transport and framework types out of the public surface. Business logic lives in pure functions with no framework dependencies. The shell that calls them is thin.
10
+
11
+ Two tests. Is this data crossing a boundary right now? If not, the validation is redundant. Can this be a pure function the shell just calls? If yes, extract it.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: principle-build-the-lever
3
+ description: "Apply to any non-trivial work, not just bulk work: edits, migrations, analyses, checks. Build the tool that does it or proves it (codemod, script, generator, or a skill your subagents follow) instead of working by hand. The tool is the artifact a reviewer can rerun."
4
+ user-invocable: false
5
+ ---
6
+
7
+ # Build the Lever
8
+
9
+ When the work isn't trivial, build the tool that does it (a codemod, script, generator, or rerunnable check) instead of doing it by hand. The bar is triviality, not repetition. Skip the tool only for a couple of obvious edits.
10
+
11
+ - Do the first unit by hand, then build the tool and prove it by rerunning it on that unit. Make it safe to rerun.
12
+ - For a comparison tool, seed one known-bad change for each output it claims to compare, and confirm the tool reports each mismatch. If required input is missing, the tool must refuse or report the result as inconclusive, never as a match. Keep these controls with the experiment and rerun them before you trust its results.
13
+ - A deterministic tool beats fan-out. When you do fan out, write the recipe, the verification contract, and the fences as one skill the delegates read and cannot edit.
14
+ - Applying this produces a file. No script, codemod, generator, or delegate skill in the diff means you didn't apply it. Commit it when the work outlives the session.
15
+ - Build the smallest script that does or proves the job, never a framework.
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: principle-encode-lessons-in-structure
3
+ description: "Apply when you catch yourself writing the same instruction a second time, or notice a recurring correction. Encode the rule as a lint, metadata flag, runtime check, or script instead of more text."
4
+ user-invocable: false
5
+ ---
6
+
7
+ # Encode Lessons in Structure
8
+
9
+ If the lesson needs judgment and cannot be encoded, make the instruction more prominent and add an example of the failure mode.
10
+
11
+ **Corollary:** If the fix is structural, only use the structural fix. The instruction is the symptom.
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: principle-exhaust-the-design-space
3
+ description: "Apply when facing a novel UI interaction or architectural decision with no precedent in the codebase. Build 2-3 competing prototypes and compare side by side before committing."
4
+ user-invocable: false
5
+ ---
6
+
7
+ # Exhaust the Design Space
8
+
9
+ It also applies to product design decisions where user experience depends on feel, not logic.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: principle-experience-first
3
+ description: "Apply when product, UX, or feature-scope tradeoffs come up. Choose user delight over implementation convenience; ship fewer polished features over more rough ones."
4
+ user-invocable: false
5
+ ---
6
+
7
+ # Experience First
8
+
9
+ When implementation convenience conflicts with user delight, choose delight.
10
+
11
+ - Every feature, control, and option must be justified
12
+ - Ship less, ship better (polished experience with three features beats rough one with ten)
13
+ - Prototype before committing (design decisions are cheaper in throwaway HTML than production code)
14
+ - Get the details right (transitions, alignment, spacing, feedback, error states)
15
+ - Tighten the core loop (every feature should serve the central workflow or get out of the way)
16
+
17
+ The user is whoever consumes the work. For a UI that is the end user. For a library or an internal API it is the colleague who imports it. The engineer who maintains the code next is a user too. Weigh their experience the same way, and explain impact from their perspective.
18
+
19
+ Foundations should serve the experience. Foundational thinking governs the *sequence* of work. This principle governs the *target*.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: principle-explain-the-number
3
+ description: "Apply before you measure, and before you trust, report, or act on a number you measured: a speedup, a regression, a throughput, a latency, or an eval result. Find what limits it, and rule out that it measured something other than the work you think."
4
+ user-invocable: false
5
+ ---
6
+
7
+ # Explain the Number
8
+
9
+ - **Write the decision before you run.** Name the result that would change it, and the noise floor. Stop when the run-to-run spread is larger than the effect.
10
+ - **Ask "why not double?"** Name the resource or code path that bounds the result, from a profile or counters taken during a run. A guess from reading the code is not a limiter.
11
+ - **List what else the number could be measuring** (errors, skipped or cached work, code that never ran, an untuned side, noise, a piece too small to matter) and rule out each one with evidence.
12
+ - **Keep the run count, the spread, and the limiter with the number.**
13
+
14
+ For a performance number, run the [benchmark-checklist](../benchmark-checklist/SKILL.md) skill. For an eval result, ask whether every run did the task, whether the gap holds across trials and models, and whether the scenario matters.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: principle-fix-root-causes
3
+ description: "Apply when debugging. Trace each symptom back to the first place the system went wrong and fix it there. A guard is a fix only when the state it handles is legitimate."
4
+ user-invocable: false
5
+ ---
6
+
7
+ # Fix Root Causes
8
+
9
+ Fix the fault, not the place where it surfaced. The root cause is the first place the system did something it should not do, or failed to handle a state it should handle.
10
+
11
+ - Reproduce first. Ask "why" until the answer is a wrong decision in the code. When stuck, instrument and read the actual state.
12
+ - Ask whether the state that triggered the symptom is legitimate. If it is, handle it where the code broke. If it should never exist, a check there hides the bug, so find what produced it. Guards, retries, swallowed errors, clamped values, and discarded state are the usual ways to hide a bug.
13
+ - Fix the pattern, not the instance. Find every place with the same fault.
14
+ - If the deciding fact took a deep dig, propose the cheap, always-on signal that would have shown it at first look.
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: principle-foundational-thinking
3
+ description: "Apply before writing logic: choosing core types and data structures, sequencing scaffold-vs-feature work, asking what concurrent actors share. Get the data structures right so downstream code becomes obvious."
4
+ user-invocable: false
5
+ ---
6
+
7
+ # Foundational Thinking
8
+
9
+ Get the data shape right before writing logic. Define core types early, trace every access pattern, and choose structures that match the dominant paths. DRY the structure, not every line.
10
+
11
+ Before sharing state between actors, ask what happens if another actor modifies it concurrently. If the answer is not "nothing", isolate.
12
+
13
+ Scaffold first. Whatever helps every later phase (CI, tests, shared types) goes first, after removing dead code. Keep commits small and single-purpose.
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: principle-guard-the-context-window
3
+ description: "Apply when context is filling up: large outputs, long files, repeated reads, fan-out planning. Route bulk to subagents; keep summaries in the main thread, not raw payloads."
4
+ user-invocable: false
5
+ ---
6
+
7
+ # Guard the Context Window
8
+
9
+ **Why:** Context overflow degrades reasoning quality, creates compression artifacts, and halts progress.
10
+
11
+ **Pattern:**
12
+ - **Size phases and cap scope.** Limit files per phase, set turn budgets, account for mechanism costs.