@jiroamato/pstack 0.0.0-stage → 0.15.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +78 -2
  3. package/bin/pstack.js +95 -0
  4. package/lib/install.js +103 -0
  5. package/lib/prompt.js +77 -0
  6. package/lib/targets.js +43 -0
  7. package/package.json +38 -5
  8. package/pstack/.claude-plugin/plugin.json +26 -0
  9. package/pstack/.codex-plugin/plugin.json +36 -0
  10. package/pstack/LICENSE +21 -0
  11. package/pstack/LICENSE-cursor-team-kit +21 -0
  12. package/pstack/NOTICE +8 -0
  13. package/pstack/README.md +300 -0
  14. package/pstack/agents/comment-sicko.md +34 -0
  15. package/pstack/agents/poteto-agent.md +10 -0
  16. package/pstack/automations/benny/FOR_AGENTS.md +92 -0
  17. package/pstack/automations/benny/README.md +28 -0
  18. package/pstack/automations/benny/skills/reproduce-and-fix-issues/SKILL.md +313 -0
  19. package/pstack/automations/benny/skills/reproduce-and-fix-issues/references/control-adapter.md +169 -0
  20. package/pstack/automations/benny/skills/reproduce-and-fix-issues/references/feature-map.example.md +205 -0
  21. package/pstack/automations/benny/skills/reproduce-and-fix-issues/references/verify-existing-fix.md +93 -0
  22. package/pstack/automations/benny/skills/setup-benny/SKILL.md +271 -0
  23. package/pstack/automations/benny/skills/triage-issue-reports/SKILL.md +240 -0
  24. package/pstack/automations/benny/skills/triage-issue-reports/references/routing.example.md +61 -0
  25. package/pstack/automations/benny/templates/configuration.example.yaml +84 -0
  26. package/pstack/automations/benny/templates/reproduce-automation-prompt.md +33 -0
  27. package/pstack/automations/benny/templates/triage-automation-prompt.md +39 -0
  28. package/pstack/codex/agents/comment-sicko.toml +36 -0
  29. package/pstack/codex/agents/poteto-agent.toml +11 -0
  30. package/pstack/docs/guide/01-setup.md +80 -0
  31. package/pstack/docs/guide/02-poteto-mode.md +131 -0
  32. package/pstack/docs/guide/03-understand.md +79 -0
  33. package/pstack/docs/guide/04-design.md +133 -0
  34. package/pstack/docs/guide/05-build-and-clean.md +83 -0
  35. package/pstack/docs/guide/06-verify-and-ship.md +130 -0
  36. package/pstack/docs/guide/07-overnight.md +120 -0
  37. package/pstack/docs/guide/08-principles.md +72 -0
  38. package/pstack/docs/guide/09-make-it-yours.md +100 -0
  39. package/pstack/docs/guide/10-recipes-and-pitfalls.md +156 -0
  40. package/pstack/docs/guide/README.md +38 -0
  41. package/pstack/skills/architect/SKILL.md +85 -0
  42. package/pstack/skills/architect/agents/openai.yaml +2 -0
  43. package/pstack/skills/architect/references/design-red-flags.md +57 -0
  44. package/pstack/skills/architect/references/rationale-template.md +35 -0
  45. package/pstack/skills/architect/references/runner-prompt.md +20 -0
  46. package/pstack/skills/arena/SKILL.md +75 -0
  47. package/pstack/skills/arena/agents/openai.yaml +2 -0
  48. package/pstack/skills/automate-me/SKILL.md +104 -0
  49. package/pstack/skills/automate-me/agents/openai.yaml +2 -0
  50. package/pstack/skills/benchmark-checklist/SKILL.md +39 -0
  51. package/pstack/skills/benchmark-checklist/agents/openai.yaml +2 -0
  52. package/pstack/skills/blast-radius/SKILL.md +52 -0
  53. package/pstack/skills/blast-radius/agents/openai.yaml +2 -0
  54. package/pstack/skills/bro/SKILL.md +7 -0
  55. package/pstack/skills/bro/agents/openai.yaml +2 -0
  56. package/pstack/skills/control-cli/SKILL.md +55 -0
  57. package/pstack/skills/control-cli/agents/openai.yaml +2 -0
  58. package/pstack/skills/control-ui/SKILL.md +72 -0
  59. package/pstack/skills/control-ui/agents/openai.yaml +2 -0
  60. package/pstack/skills/correct/SKILL.md +34 -0
  61. package/pstack/skills/correct/agents/openai.yaml +2 -0
  62. package/pstack/skills/create-verification-skill/SKILL.md +47 -0
  63. package/pstack/skills/create-verification-skill/agents/openai.yaml +2 -0
  64. package/pstack/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
  65. package/pstack/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
  66. package/pstack/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
  67. package/pstack/skills/deslop/SKILL.md +30 -0
  68. package/pstack/skills/deslop/agents/openai.yaml +2 -0
  69. package/pstack/skills/figure-it-out/SKILL.md +55 -0
  70. package/pstack/skills/figure-it-out/agents/openai.yaml +2 -0
  71. package/pstack/skills/how/SKILL.md +58 -0
  72. package/pstack/skills/how/agents/openai.yaml +2 -0
  73. package/pstack/skills/how/references/explainer-prompt.md +55 -0
  74. package/pstack/skills/how/references/explorer-prompt.md +52 -0
  75. package/pstack/skills/interrogate/SKILL.md +111 -0
  76. package/pstack/skills/interrogate/agents/openai.yaml +2 -0
  77. package/pstack/skills/interrogate/references/code-quality-review.md +47 -0
  78. package/pstack/skills/interrogate/references/lead-judgment.md +58 -0
  79. package/pstack/skills/interrogate/references/reviewer-prompt.md +70 -0
  80. package/pstack/skills/interrogate/references/rubric.md +77 -0
  81. package/pstack/skills/maintain-verification-skill/SKILL.md +41 -0
  82. package/pstack/skills/maintain-verification-skill/agents/openai.yaml +2 -0
  83. package/pstack/skills/make-bot-ui/SKILL.md +289 -0
  84. package/pstack/skills/make-bot-ui/agents/openai.yaml +2 -0
  85. package/pstack/skills/no-comments/SKILL.md +24 -0
  86. package/pstack/skills/no-comments/agents/openai.yaml +2 -0
  87. package/pstack/skills/poteto-help/SKILL.md +156 -0
  88. package/pstack/skills/poteto-help/agents/openai.yaml +2 -0
  89. package/pstack/skills/poteto-help/references/prompting.md +51 -0
  90. package/pstack/skills/poteto-help/references/recipes.md +47 -0
  91. package/pstack/skills/poteto-mode/SKILL.md +143 -0
  92. package/pstack/skills/poteto-mode/agents/openai.yaml +2 -0
  93. package/pstack/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
  94. package/pstack/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
  95. package/pstack/skills/poteto-mode/playbooks/autopilot-full.md +13 -0
  96. package/pstack/skills/poteto-mode/playbooks/autopilot-stack.md +16 -0
  97. package/pstack/skills/poteto-mode/playbooks/babysit.md +29 -0
  98. package/pstack/skills/poteto-mode/playbooks/bug-fix.md +15 -0
  99. package/pstack/skills/poteto-mode/playbooks/eval.md +25 -0
  100. package/pstack/skills/poteto-mode/playbooks/feature.md +21 -0
  101. package/pstack/skills/poteto-mode/playbooks/hillclimb.md +21 -0
  102. package/pstack/skills/poteto-mode/playbooks/investigation.md +14 -0
  103. package/pstack/skills/poteto-mode/playbooks/multi-phase-plan.md +155 -0
  104. package/pstack/skills/poteto-mode/playbooks/opening-a-pr.md +38 -0
  105. package/pstack/skills/poteto-mode/playbooks/orchestrate.md +114 -0
  106. package/pstack/skills/poteto-mode/playbooks/pause-safely.md +10 -0
  107. package/pstack/skills/poteto-mode/playbooks/perf-issue.md +25 -0
  108. package/pstack/skills/poteto-mode/playbooks/prototype.md +14 -0
  109. package/pstack/skills/poteto-mode/playbooks/refactoring.md +16 -0
  110. package/pstack/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
  111. package/pstack/skills/poteto-mode/playbooks/session-pickup.md +11 -0
  112. package/pstack/skills/poteto-mode/playbooks/shipping.md +17 -0
  113. package/pstack/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
  114. package/pstack/skills/poteto-mode/playbooks/visual-parity.md +11 -0
  115. package/pstack/skills/poteto-mode/playbooks/worktree-cleanup.md +14 -0
  116. package/pstack/skills/poteto-mode/references/bugbot-triage.md +142 -0
  117. package/pstack/skills/poteto-mode/scripts/bootstrap.ts +62 -0
  118. package/pstack/skills/poteto-mode/scripts/bun.lock +67 -0
  119. package/pstack/skills/poteto-mode/scripts/check-plan.mjs +185 -0
  120. package/pstack/skills/poteto-mode/scripts/orch/orch.test.ts +634 -0
  121. package/pstack/skills/poteto-mode/scripts/orch/orch.ts +578 -0
  122. package/pstack/skills/poteto-mode/scripts/orch/store.ts +1607 -0
  123. package/pstack/skills/poteto-mode/scripts/package.json +16 -0
  124. package/pstack/skills/poteto-mode/scripts/watch-pr/cli.test.ts +224 -0
  125. package/pstack/skills/poteto-mode/scripts/watch-pr/cli.ts +223 -0
  126. package/pstack/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +118 -0
  127. package/pstack/skills/poteto-mode/scripts/watch-pr/github.test.ts +306 -0
  128. package/pstack/skills/poteto-mode/scripts/watch-pr/github.ts +699 -0
  129. package/pstack/skills/poteto-mode/scripts/watch-pr/policy.test.ts +420 -0
  130. package/pstack/skills/poteto-mode/scripts/watch-pr/policy.ts +832 -0
  131. package/pstack/skills/poteto-mode/scripts/watch-pr/render.ts +169 -0
  132. package/pstack/skills/poteto-mode/scripts/watch-pr/tsconfig.json +13 -0
  133. package/pstack/skills/poteto-mode/scripts/watch-pr/types.compile.ts +93 -0
  134. package/pstack/skills/poteto-mode/scripts/watch-pr/types.ts +401 -0
  135. package/pstack/skills/poteto-mode/scripts/watch-pr/watch-pr +6 -0
  136. package/pstack/skills/poteto-mode/scripts/worktree-audit.sh +92 -0
  137. package/pstack/skills/principle-attack-the-premise/SKILL.md +23 -0
  138. package/pstack/skills/principle-attack-the-premise/agents/openai.yaml +2 -0
  139. package/pstack/skills/principle-boundary-discipline/SKILL.md +34 -0
  140. package/pstack/skills/principle-boundary-discipline/agents/openai.yaml +2 -0
  141. package/pstack/skills/principle-build-the-lever/SKILL.md +23 -0
  142. package/pstack/skills/principle-build-the-lever/agents/openai.yaml +2 -0
  143. package/pstack/skills/principle-encode-lessons-in-structure/SKILL.md +31 -0
  144. package/pstack/skills/principle-encode-lessons-in-structure/agents/openai.yaml +2 -0
  145. package/pstack/skills/principle-exhaust-the-design-space/SKILL.md +21 -0
  146. package/pstack/skills/principle-exhaust-the-design-space/agents/openai.yaml +2 -0
  147. package/pstack/skills/principle-experience-first/SKILL.md +19 -0
  148. package/pstack/skills/principle-experience-first/agents/openai.yaml +2 -0
  149. package/pstack/skills/principle-explain-the-number/SKILL.md +23 -0
  150. package/pstack/skills/principle-explain-the-number/agents/openai.yaml +2 -0
  151. package/pstack/skills/principle-fix-root-causes/SKILL.md +23 -0
  152. package/pstack/skills/principle-fix-root-causes/agents/openai.yaml +2 -0
  153. package/pstack/skills/principle-foundational-thinking/SKILL.md +21 -0
  154. package/pstack/skills/principle-foundational-thinking/agents/openai.yaml +2 -0
  155. package/pstack/skills/principle-guard-the-context-window/SKILL.md +16 -0
  156. package/pstack/skills/principle-guard-the-context-window/agents/openai.yaml +2 -0
  157. package/pstack/skills/principle-laziness-protocol/SKILL.md +18 -0
  158. package/pstack/skills/principle-laziness-protocol/agents/openai.yaml +2 -0
  159. package/pstack/skills/principle-make-operations-idempotent/SKILL.md +24 -0
  160. package/pstack/skills/principle-make-operations-idempotent/agents/openai.yaml +2 -0
  161. package/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +22 -0
  162. package/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/agents/openai.yaml +2 -0
  163. package/pstack/skills/principle-minimize-reader-load/SKILL.md +23 -0
  164. package/pstack/skills/principle-minimize-reader-load/agents/openai.yaml +2 -0
  165. package/pstack/skills/principle-model-the-domain/SKILL.md +26 -0
  166. package/pstack/skills/principle-model-the-domain/agents/openai.yaml +2 -0
  167. package/pstack/skills/principle-never-block-on-the-human/SKILL.md +20 -0
  168. package/pstack/skills/principle-never-block-on-the-human/agents/openai.yaml +2 -0
  169. package/pstack/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
  170. package/pstack/skills/principle-outcome-oriented-execution/agents/openai.yaml +2 -0
  171. package/pstack/skills/principle-prove-it-works/SKILL.md +22 -0
  172. package/pstack/skills/principle-prove-it-works/agents/openai.yaml +2 -0
  173. package/pstack/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
  174. package/pstack/skills/principle-redesign-from-first-principles/agents/openai.yaml +2 -0
  175. package/pstack/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
  176. package/pstack/skills/principle-separate-before-serializing-shared-state/agents/openai.yaml +2 -0
  177. package/pstack/skills/principle-sequence-verifiable-units/SKILL.md +17 -0
  178. package/pstack/skills/principle-sequence-verifiable-units/agents/openai.yaml +2 -0
  179. package/pstack/skills/principle-subtract-before-you-add/SKILL.md +21 -0
  180. package/pstack/skills/principle-subtract-before-you-add/agents/openai.yaml +2 -0
  181. package/pstack/skills/principle-test-behavior-not-implementation/SKILL.md +25 -0
  182. package/pstack/skills/principle-test-behavior-not-implementation/agents/openai.yaml +2 -0
  183. package/pstack/skills/principle-type-system-discipline/SKILL.md +31 -0
  184. package/pstack/skills/principle-type-system-discipline/agents/openai.yaml +2 -0
  185. package/pstack/skills/pstack-harness/SKILL.md +67 -0
  186. package/pstack/skills/recall/SKILL.md +35 -0
  187. package/pstack/skills/recall/agents/openai.yaml +2 -0
  188. package/pstack/skills/reflect/SKILL.md +76 -0
  189. package/pstack/skills/reflect/agents/openai.yaml +2 -0
  190. package/pstack/skills/reflect/references/divergent-reviewer.md +43 -0
  191. package/pstack/skills/reflect/references/judgment-reviewer.md +42 -0
  192. package/pstack/skills/reflect/references/synthesizer.md +56 -0
  193. package/pstack/skills/reflect/references/tooling-reviewer.md +55 -0
  194. package/pstack/skills/setup-pstack/SKILL.md +110 -0
  195. package/pstack/skills/show-me-your-work/SKILL.md +82 -0
  196. package/pstack/skills/show-me-your-work/agents/openai.yaml +2 -0
  197. package/pstack/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
  198. package/pstack/skills/show-me-your-work/scripts/log.sh +42 -0
  199. package/pstack/skills/swarm/SKILL.md +48 -0
  200. package/pstack/skills/swarm/agents/openai.yaml +2 -0
  201. package/pstack/skills/tdd/SKILL.md +44 -0
  202. package/pstack/skills/tdd/agents/openai.yaml +2 -0
  203. package/pstack/skills/teach/SKILL.md +21 -0
  204. package/pstack/skills/teach/agents/openai.yaml +2 -0
  205. package/pstack/skills/technical-writing/SKILL.md +106 -0
  206. package/pstack/skills/technical-writing/agents/openai.yaml +2 -0
  207. package/pstack/skills/typescript-best-practices/SKILL.md +31 -0
  208. package/pstack/skills/typescript-best-practices/agents/openai.yaml +2 -0
  209. package/pstack/skills/typescript-best-practices/references/patterns.md +324 -0
  210. package/pstack/skills/unslop/SKILL.md +67 -0
  211. package/pstack/skills/unslop/agents/openai.yaml +2 -0
  212. package/pstack/skills/why/SKILL.md +158 -0
  213. package/pstack/skills/why/agents/openai.yaml +2 -0
  214. package/pstack/skills/why/references/epistemics.md +144 -0
  215. package/pstack/skills/why/references/investigator-prompt.md +103 -0
  216. package/pstack/skills/why/references/source-playbook.md +17 -0
  217. package/pstack/skills/why/references/sources/code-archaeology.md +88 -0
  218. package/pstack/skills/why/references/sources/databricks.md +70 -0
  219. package/pstack/skills/why/references/sources/datadog.md +99 -0
  220. package/pstack/skills/why/references/sources/incident-postmortem.md +15 -0
  221. package/pstack/skills/why/references/sources/linear.md +48 -0
  222. package/pstack/skills/why/references/sources/notion.md +55 -0
  223. package/pstack/skills/why/references/sources/sentry.md +100 -0
  224. package/pstack/skills/why/references/sources/slack.md +54 -0
  225. package/pstack/skills/why/references/synthesizer-prompt.md +135 -0
@@ -0,0 +1,67 @@
1
+ {
2
+ "lockfileVersion": 1,
3
+ "configVersion": 1,
4
+ "workspaces": {
5
+ "": {
6
+ "name": "@cursor-skill/poteto-mode-tools",
7
+ "dependencies": {
8
+ "commander": "14.0.0",
9
+ },
10
+ "devDependencies": {
11
+ "bun-types": "latest",
12
+ "typescript": "latest",
13
+ },
14
+ },
15
+ },
16
+ "packages": {
17
+ "@types/node": ["@types/node@26.1.2", "", { "dependencies": { "undici-types": "~8.3.0" } }, "sha512-Vu4a5UFA9rIIFJ7rB/Vaafh9lrCQszopTCx6KjFboXTGQbPNasehVR5TEiithSDGyd1DEiUByggTZsg8jukeIg=="],
18
+
19
+ "@typescript/typescript-aix-ppc64": ["@typescript/typescript-aix-ppc64@7.0.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ=="],
20
+
21
+ "@typescript/typescript-darwin-arm64": ["@typescript/typescript-darwin-arm64@7.0.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA=="],
22
+
23
+ "@typescript/typescript-darwin-x64": ["@typescript/typescript-darwin-x64@7.0.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA=="],
24
+
25
+ "@typescript/typescript-freebsd-arm64": ["@typescript/typescript-freebsd-arm64@7.0.2", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ=="],
26
+
27
+ "@typescript/typescript-freebsd-x64": ["@typescript/typescript-freebsd-x64@7.0.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw=="],
28
+
29
+ "@typescript/typescript-linux-arm": ["@typescript/typescript-linux-arm@7.0.2", "", { "os": "linux", "cpu": "arm" }, "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ=="],
30
+
31
+ "@typescript/typescript-linux-arm64": ["@typescript/typescript-linux-arm64@7.0.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ=="],
32
+
33
+ "@typescript/typescript-linux-loong64": ["@typescript/typescript-linux-loong64@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ=="],
34
+
35
+ "@typescript/typescript-linux-mips64el": ["@typescript/typescript-linux-mips64el@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA=="],
36
+
37
+ "@typescript/typescript-linux-ppc64": ["@typescript/typescript-linux-ppc64@7.0.2", "", { "os": "linux", "cpu": "ppc64" }, "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA=="],
38
+
39
+ "@typescript/typescript-linux-riscv64": ["@typescript/typescript-linux-riscv64@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ=="],
40
+
41
+ "@typescript/typescript-linux-s390x": ["@typescript/typescript-linux-s390x@7.0.2", "", { "os": "linux", "cpu": "s390x" }, "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw=="],
42
+
43
+ "@typescript/typescript-linux-x64": ["@typescript/typescript-linux-x64@7.0.2", "", { "os": "linux", "cpu": "x64" }, "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A=="],
44
+
45
+ "@typescript/typescript-netbsd-arm64": ["@typescript/typescript-netbsd-arm64@7.0.2", "", { "os": "none", "cpu": "arm64" }, "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA=="],
46
+
47
+ "@typescript/typescript-netbsd-x64": ["@typescript/typescript-netbsd-x64@7.0.2", "", { "os": "none", "cpu": "x64" }, "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA=="],
48
+
49
+ "@typescript/typescript-openbsd-arm64": ["@typescript/typescript-openbsd-arm64@7.0.2", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ=="],
50
+
51
+ "@typescript/typescript-openbsd-x64": ["@typescript/typescript-openbsd-x64@7.0.2", "", { "os": "openbsd", "cpu": "x64" }, "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg=="],
52
+
53
+ "@typescript/typescript-sunos-x64": ["@typescript/typescript-sunos-x64@7.0.2", "", { "os": "sunos", "cpu": "x64" }, "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g=="],
54
+
55
+ "@typescript/typescript-win32-arm64": ["@typescript/typescript-win32-arm64@7.0.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ=="],
56
+
57
+ "@typescript/typescript-win32-x64": ["@typescript/typescript-win32-x64@7.0.2", "", { "os": "win32", "cpu": "x64" }, "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g=="],
58
+
59
+ "bun-types": ["bun-types@1.3.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-4N0ig0fEomHt5R0KCFWjovxow98rIoRwKolrYdCcknNwMekCXRnWEUvgu5soYV8QXtVsrUD8B95MBOZGPvr6KQ=="],
60
+
61
+ "commander": ["commander@14.0.0", "", {}, "sha512-2uM9rYjPvyq39NwLRqaiLtWHyDC1FvryJDa2ATTVims5YAS4PupsEQsDvP14FqhFr0P49CYDugi59xaxJlTXRA=="],
62
+
63
+ "typescript": ["typescript@7.0.2", "", { "optionalDependencies": { "@typescript/typescript-aix-ppc64": "7.0.2", "@typescript/typescript-darwin-arm64": "7.0.2", "@typescript/typescript-darwin-x64": "7.0.2", "@typescript/typescript-freebsd-arm64": "7.0.2", "@typescript/typescript-freebsd-x64": "7.0.2", "@typescript/typescript-linux-arm": "7.0.2", "@typescript/typescript-linux-arm64": "7.0.2", "@typescript/typescript-linux-loong64": "7.0.2", "@typescript/typescript-linux-mips64el": "7.0.2", "@typescript/typescript-linux-ppc64": "7.0.2", "@typescript/typescript-linux-riscv64": "7.0.2", "@typescript/typescript-linux-s390x": "7.0.2", "@typescript/typescript-linux-x64": "7.0.2", "@typescript/typescript-netbsd-arm64": "7.0.2", "@typescript/typescript-netbsd-x64": "7.0.2", "@typescript/typescript-openbsd-arm64": "7.0.2", "@typescript/typescript-openbsd-x64": "7.0.2", "@typescript/typescript-sunos-x64": "7.0.2", "@typescript/typescript-win32-arm64": "7.0.2", "@typescript/typescript-win32-x64": "7.0.2" }, "bin": { "tsc": "bin/tsc" } }, "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="],
64
+
65
+ "undici-types": ["undici-types@8.3.0", "", {}, "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ=="],
66
+ }
67
+ }
@@ -0,0 +1,185 @@
1
+ #!/usr/bin/env node
2
+ import fs from "node:fs";
3
+ import process from "node:process";
4
+
5
+ const RULE =
6
+ "Tests alone are not sufficient verification. A PR is verified only when its unit, live, and perf boxes are all checked.";
7
+ const LANES = /Ten lanes on `[^`<>]+` at the PR head/;
8
+ const SUB_BLOCKS = [
9
+ "Depends on.",
10
+ "Files.",
11
+ "Build.",
12
+ "You see.",
13
+ "Verify, unit.",
14
+ "Verify, live.",
15
+ "Verify, perf.",
16
+ "Review gate.",
17
+ "Merge.",
18
+ ];
19
+ const PROGRAM_H3 = ["Arm the program", "Spawn owners", "PR mechanics", "Verdict and merge", "Boot recipe"];
20
+ const PROGRAM_MARKERS = ["git show origin/main:", "/loop 1h", "status message"];
21
+ const HOW_TO_READ_MARKERS = [
22
+ "One box is one unit of work",
23
+ "names the evidence",
24
+ "Check a box only when its evidence exists",
25
+ "playbooks/",
26
+ RULE,
27
+ ];
28
+ const PERF_ITEMS = ["Metric.", "Probe.", "Baseline.", "Rule."];
29
+ const BOX = /^\s*- \[[ x]\] (.*)$/;
30
+
31
+ const file = process.argv[2];
32
+ if (!file) {
33
+ console.error("Usage: node check-plan.mjs <plan.md>");
34
+ process.exit(2);
35
+ }
36
+
37
+ const raw = fs.readFileSync(file, "utf8").split(/\r?\n/);
38
+ const problems = [];
39
+ const fail = (line, message) => problems.push(`${file}:${line}: ${message}`);
40
+
41
+ let start = 0;
42
+ if (raw[0] === "---") {
43
+ start = raw.indexOf("---", 1) + 1;
44
+ }
45
+
46
+ const lines = [];
47
+ let fence = false;
48
+ for (let i = start; i < raw.length; i++) {
49
+ const text = raw[i];
50
+ const n = i + 1;
51
+ if (/^```/.test(text)) fence = !fence;
52
+ lines.push({ n, text, code: fence });
53
+ if (fence) continue;
54
+ const prose = text
55
+ .replace(/`[^`]*`/g, "`")
56
+ .replace(/!\[[^\]]*\]\([^)]*\)/g, "")
57
+ .replace(/\]\([^)]*\)/g, "]");
58
+ if (/[\u2013\u2014]/.test(prose)) fail(n, "long dash");
59
+ if (/[\u2018\u2019\u201c\u201d]/.test(prose)) fail(n, "curly quote");
60
+ if (/: \S/.test(prose)) fail(n, "mid-sentence colon");
61
+ }
62
+
63
+ const h2 = (l) => (!l.code && l.text.startsWith("## ") ? l.text.slice(3).trim() : null);
64
+ const sections = [];
65
+ for (const l of lines) {
66
+ const title = h2(l);
67
+ if (title !== null) sections.push({ title, n: l.n, body: [] });
68
+ else if (sections.length) sections.at(-1).body.push(l);
69
+ }
70
+ const find = (title) => sections.find((s) => s.title === title);
71
+ const bodyText = (s) => s.body.map((l) => l.text).join("\n");
72
+ const boxes = (ls) => ls.filter((l) => !l.code && BOX.test(l.text)).map((l) => ({ n: l.n, text: l.text.match(BOX)[1] }));
73
+
74
+ const h1 = lines.findIndex((l) => !l.code && l.text.startsWith("# "));
75
+ if (h1 === -1) fail(1, "no H1 title");
76
+ const howToRead = find("How to read this");
77
+ if (!howToRead) fail(1, 'no "## How to read this" section');
78
+ if (h1 !== -1 && howToRead) {
79
+ const intro = lines.slice(h1 + 1).filter((l) => l.n < howToRead.n && l.text.trim() !== "");
80
+ if (intro.length >= 10) fail(lines[h1].n, `intro is ${intro.length} lines, under ten required`);
81
+ for (const marker of HOW_TO_READ_MARKERS) {
82
+ if (!bodyText(howToRead).includes(marker)) fail(howToRead.n, `How to read this lacks "${marker}"`);
83
+ }
84
+ }
85
+
86
+ const program = find("Program checklist");
87
+ if (!program) fail(1, 'no "## Program checklist" section');
88
+ else {
89
+ const h3s = program.body.filter((l) => !l.code && l.text.startsWith("### ")).map((l) => l.text.slice(4).trim());
90
+ let cursor = 0;
91
+ for (const name of PROGRAM_H3) {
92
+ const at = h3s.findIndex((t, i) => i >= cursor && t.startsWith(name));
93
+ if (at === -1) fail(program.n, `Program checklist lacks "### ${name}" in order`);
94
+ else cursor = at + 1;
95
+ }
96
+ for (const marker of PROGRAM_MARKERS) {
97
+ if (!bodyText(program).includes(marker)) fail(program.n, `Program checklist lacks "${marker}"`);
98
+ }
99
+ }
100
+
101
+ const close = find("Close the program");
102
+ if (!close) fail(1, 'no "## Close the program" section');
103
+ const programIndex = sections.indexOf(program);
104
+ const closeIndex = sections.indexOf(close);
105
+ const prSections = programIndex === -1 || closeIndex === -1 ? [] : sections.slice(programIndex + 1, closeIndex);
106
+ if (prSections.length === 0) fail(1, "no PR sections between Program checklist and Close the program");
107
+
108
+ const report = [];
109
+ for (const pr of prSections) {
110
+ const heads = [];
111
+ for (const l of pr.body) {
112
+ if (l.code) continue;
113
+ const m = l.text.match(/^\*\*([^*]+)\*\*(.*)$/);
114
+ if (m && SUB_BLOCKS.includes(m[1])) heads.push({ name: m[1], n: l.n, rest: m[2].trim(), lines: [] });
115
+ else if (heads.length) heads.at(-1).lines.push(l);
116
+ }
117
+ const names = heads.map((h) => h.name);
118
+ if (names.join("|") !== SUB_BLOCKS.join("|")) {
119
+ fail(pr.n, `${pr.title}: sub-blocks are [${names.join(", ")}], expected [${SUB_BLOCKS.join(", ")}]`);
120
+ }
121
+ const block = (name) => heads.find((h) => h.name === name);
122
+ const counts = {};
123
+ for (const h of heads) counts[h.name] = boxes(h.lines).length;
124
+
125
+ const depends = block("Depends on.");
126
+ if (depends && depends.rest === "") fail(depends.n, `${pr.title}: Depends on names nothing`);
127
+ for (const name of ["Files.", "Build.", "You see.", "Verify, unit.", "Merge."]) {
128
+ const b = block(name);
129
+ if (b && boxes(b.lines).length === 0) fail(b.n, `${pr.title}: ${name} has no box`);
130
+ }
131
+ for (const name of ["Verify, unit.", "Verify, live.", "Verify, perf."]) {
132
+ const b = block(name);
133
+ if (b && !b.rest.startsWith(RULE)) fail(b.n, `${pr.title}: ${name} does not open with the rule`);
134
+ }
135
+
136
+ const live = block("Verify, live.");
137
+ if (live) {
138
+ if (!LANES.test(live.rest)) fail(live.n, `${pr.title}: Verify, live lacks "Ten lanes on \`<swarm workers model>\` at the PR head" with the model filled in`);
139
+ const lanes = boxes(live.lines).map((b) => ({ ...b, m: b.text.match(/^Lane (\d+)\. /) }));
140
+ const numbers = lanes.filter((b) => b.m).map((b) => Number(b.m[1])).sort((a, b) => a - b);
141
+ if (numbers.join(",") !== "1,2,3,4,5,6,7,8,9,10") fail(live.n, `${pr.title}: lanes are [${numbers.join(",")}], expected 1 to 10`);
142
+ for (const lane of lanes) {
143
+ if (!lane.m) fail(lane.n, `${pr.title}: live box is not a lane`);
144
+ else if (!/Save `[^`]+`/.test(lane.text)) fail(lane.n, `${pr.title}: lane ${lane.m[1]} names no screenshot`);
145
+ else if (!lane.text.includes("Pass when")) fail(lane.n, `${pr.title}: lane ${lane.m[1]} has no pass predicate`);
146
+ }
147
+ }
148
+
149
+ const perf = block("Verify, perf.");
150
+ if (perf) {
151
+ const items = boxes(perf.lines).map((b) => b.text.split(" ")[0]);
152
+ if (items.join("|") !== PERF_ITEMS.join("|")) fail(perf.n, `${pr.title}: perf boxes are [${items.join(", ")}], expected [${PERF_ITEMS.join(", ")}]`);
153
+ }
154
+
155
+ const gate = block("Review gate.");
156
+ if (gate) {
157
+ const gateBoxes = boxes(gate.lines);
158
+ if (gate.rest.startsWith("None.")) {
159
+ if (gateBoxes.length) fail(gate.n, `${pr.title}: Review gate says None but has boxes`);
160
+ } else {
161
+ const text = gate.lines.map((l) => l.text).join("\n");
162
+ if (gateBoxes.length === 0) fail(gate.n, `${pr.title}: Review gate has no box`);
163
+ for (const word of ["screenshot", "video", "operator"]) {
164
+ if (!text.includes(word)) fail(gate.n, `${pr.title}: Review gate lacks "${word}"`);
165
+ }
166
+ }
167
+ }
168
+
169
+ const total = boxes(pr.body).length;
170
+ const cells = SUB_BLOCKS.filter((s) => s !== "Depends on.").map((s) => `${s.replace(/[ ,.]+/g, "-").replace(/-$/, "").toLowerCase()}=${counts[s] ?? 0}`);
171
+ report.push(`${pr.title} boxes=${total} ${cells.join(" ")}`);
172
+ }
173
+
174
+ if (closeIndex !== -1) {
175
+ const tail = sections.slice(closeIndex + 1);
176
+ for (const s of tail) {
177
+ if (!s.title.startsWith("Appendix")) fail(s.n, `"## ${s.title}" after Close the program is not an appendix`);
178
+ }
179
+ if (!tail.some((s) => s.title.includes("Prototype evidence"))) fail(close.n, 'no "## Appendix ... Prototype evidence" section');
180
+ }
181
+
182
+ for (const line of report) console.log(line);
183
+ console.log(`${prSections.length} PR sections, ${problems.length} problems`);
184
+ for (const p of problems) console.error(p);
185
+ process.exit(problems.length ? 1 : 0);