From a73b2cb9662edb0cc8011ca70e49fe2bb9581f73 Mon Sep 17 00:00:00 2001 From: Eric Litman Date: Tue, 25 Aug 2026 22:46:34 -0400 Subject: [PATCH 1/4] test(pstack): cover Node bootstrap diagnostics --- .../poteto-mode/scripts/bootstrap.test.ts | 21 +++++++++++++++++++ .../skills/poteto-mode/scripts/package.json | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 plugins/pstack/skills/poteto-mode/scripts/bootstrap.test.ts diff --git a/plugins/pstack/skills/poteto-mode/scripts/bootstrap.test.ts b/plugins/pstack/skills/poteto-mode/scripts/bootstrap.test.ts new file mode 100644 index 0000000..2c6816a --- /dev/null +++ b/plugins/pstack/skills/poteto-mode/scripts/bootstrap.test.ts @@ -0,0 +1,21 @@ +import { describe, expect, it } from "bun:test"; +import { join } from "node:path"; + +const nodeEntryPoints = [ + ["bootstrap", "bootstrap.ts"], + ["watch-pr", "watch-pr/watch-pr"], +] as const; + +describe("Bun runtime guard", () => { + for (const [name, path] of nodeEntryPoints) { + it(`rejects Node before ${name} uses Bun-only APIs`, () => { + const result = Bun.spawnSync(["node", join(import.meta.dir, path)]); + + expect(result.exitCode).toBe(1); + expect(result.stdout.toString()).toBe(""); + expect(result.stderr.toString()).toBe( + "pstack poteto-mode tooling requires Bun (https://bun.sh). Install Bun, then re-run.\n" + ); + }); + } +}); diff --git a/plugins/pstack/skills/poteto-mode/scripts/package.json b/plugins/pstack/skills/poteto-mode/scripts/package.json index d58c648..22a39a9 100644 --- a/plugins/pstack/skills/poteto-mode/scripts/package.json +++ b/plugins/pstack/skills/poteto-mode/scripts/package.json @@ -3,7 +3,7 @@ "private": true, "type": "module", "scripts": { - "test": "\"$npm_execpath\" test --parallel orch watch-pr runner", + "test": "\"$npm_execpath\" test --parallel bootstrap orch watch-pr runner", "typecheck": "tsc --project watch-pr/tsconfig.json --noEmit --strict && tsc --project runner/tsconfig.json --noEmit --strict" }, "dependencies": { From cbaeada2dd7f4ce637228e6fcf593a04f2f84c54 Mon Sep 17 00:00:00 2001 From: Eric Litman Date: Tue, 25 Aug 2026 22:47:20 -0400 Subject: [PATCH 2/4] fix(pstack): reject Node at bootstrap boundary --- NOTICE.md | 2 +- plugins/pstack/skills/poteto-mode/scripts/bootstrap.ts | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/NOTICE.md b/NOTICE.md index 811d488..a828b45 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -29,7 +29,7 @@ Summary of structural changes: - The native `plugins/pstack/skills/` tree is the only user-facing workflow surface. Claude Code and Codex invoke those skills directly. - Seven skills imported from `cursor-team-kit`: `deslop`, `thermo-nuclear-code-quality-review`, `make-pr-easy-to-review`, `fix-ci`, `fix-merge-conflicts`, `get-pr-comments`, `what-did-i-get-done`. All copied verbatim — no rewiring needed. - `plugins/pstack/skills/babysit/` is independently authored as the Claude Code analog of Cursor's `/babysit` built-in. It has no upstream pstack equivalent; its workflow is informed by Cursor's public `/babysit` behavior. No code or prose was copied from any source. -- `plugins/pstack/skills/poteto-mode/scripts/` is vendored from upstream (`watch-pr`, `orch`, `bootstrap.ts`, `worktree-audit.sh`, `package.json`, `bun.lock`) with three edits: `worktree-audit.sh` reads `~/.claude/projects/` instead of Cursor's transcript directory and warns when `jq` or `rg` is missing (their absence silently blanks the columns the prune decision reads), and the private workspace package is named `@open-pstack/poteto-mode-tools`. Everything else is upstream's code under the same MIT license. +- `plugins/pstack/skills/poteto-mode/scripts/` is vendored from upstream (`watch-pr`, `orch`, `bootstrap.ts`, `worktree-audit.sh`, `package.json`, `bun.lock`) with four edits: `worktree-audit.sh` reads `~/.claude/projects/` instead of Cursor's transcript directory and warns when `jq` or `rg` is missing (their absence silently blanks the columns the prune decision reads), the private workspace package is named `@open-pstack/poteto-mode-tools`, and `bootstrap.ts` rejects Node before it reads Bun-only APIs. Everything else is upstream's code under the same MIT license. - `plugins/pstack/agents/comment-sicko.md` is upstream's `Comment Sicko` agent, renamed to `comment-sicko` so the name works as a Claude Code `subagent_type`. The body is verbatim. - Claude-native Fable and Opus lanes are port-authored agent definitions. They pin model plus requested effort for every selectable Claude-native pair in the provider-dispatch model matrix. - A Codex build shares the same `skills/` tree. It adds `plugins/pstack/.codex-plugin/plugin.json`, a root `.agents/plugins/marketplace.json`, and `plugins/pstack/skills/poteto-mode/references/codex-tools.md` (the Claude-to-Codex tool, model, and built-in map), plus a one-line Platform note in the skills that name a Claude primitive. The skill content itself is unchanged. See [CHANGES.md](CHANGES.md#codex-port). diff --git a/plugins/pstack/skills/poteto-mode/scripts/bootstrap.ts b/plugins/pstack/skills/poteto-mode/scripts/bootstrap.ts index d9c63e2..64e86d4 100644 --- a/plugins/pstack/skills/poteto-mode/scripts/bootstrap.ts +++ b/plugins/pstack/skills/poteto-mode/scripts/bootstrap.ts @@ -2,6 +2,13 @@ import { createHash } from "node:crypto"; import { existsSync, readFileSync, writeFileSync } from "node:fs"; import { join } from "node:path"; +if (typeof Bun === "undefined") { + console.error( + "pstack poteto-mode tooling requires Bun (https://bun.sh). Install Bun, then re-run." + ); + process.exit(1); +} + const scriptsDirectory = import.meta.dir; const nodeModulesDirectory = join(scriptsDirectory, "node_modules"); const commanderPackagePath = join( From fbddd8e259ada760d3f92b6b6dfd23415b3f2637 Mon Sep 17 00:00:00 2001 From: Eric Litman Date: Tue, 25 Aug 2026 22:48:22 -0400 Subject: [PATCH 3/4] docs(no-comments): deduplicate Codex dispatch guidance --- plugins/pstack/skills/no-comments/SKILL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/pstack/skills/no-comments/SKILL.md b/plugins/pstack/skills/no-comments/SKILL.md index d8e5447..75bc02f 100644 --- a/plugins/pstack/skills/no-comments/SKILL.md +++ b/plugins/pstack/skills/no-comments/SKILL.md @@ -9,7 +9,7 @@ Spawn comment-sicko. Act on accepted findings. Authoring agents defend comments. Defer to comment-sicko's fresh perspective. -**Platform note.** On Codex or another non-Claude runtime, there is no `comment-sicko` subagent type; dispatch a `spawn_agent` told to read `agents/comment-sicko.md` first. Resolve the tool names via [`codex-tools.md`](../poteto-mode/references/codex-tools.md). +**Platform note.** On Codex or another non-Claude runtime, the `comment-sicko` subagent and the Claude tool names below are Claude defaults. Resolve them via [`codex-tools.md`](../poteto-mode/references/codex-tools.md). ## Scope From 8b8741bca172afa5a1ab41e7b28dbcaa0d27ed7c Mon Sep 17 00:00:00 2001 From: Eric Litman Date: Tue, 25 Aug 2026 23:02:19 -0400 Subject: [PATCH 4/4] fix(pstack): pin Node bootstrap test runtime --- .github/workflows/ci.yml | 3 +++ NOTICE.md | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47898cb..126d94b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22.23.2 - uses: oven-sh/setup-bun@v2 with: bun-version: 1.4.0 diff --git a/NOTICE.md b/NOTICE.md index a828b45..ff3f4f7 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -29,7 +29,7 @@ Summary of structural changes: - The native `plugins/pstack/skills/` tree is the only user-facing workflow surface. Claude Code and Codex invoke those skills directly. - Seven skills imported from `cursor-team-kit`: `deslop`, `thermo-nuclear-code-quality-review`, `make-pr-easy-to-review`, `fix-ci`, `fix-merge-conflicts`, `get-pr-comments`, `what-did-i-get-done`. All copied verbatim — no rewiring needed. - `plugins/pstack/skills/babysit/` is independently authored as the Claude Code analog of Cursor's `/babysit` built-in. It has no upstream pstack equivalent; its workflow is informed by Cursor's public `/babysit` behavior. No code or prose was copied from any source. -- `plugins/pstack/skills/poteto-mode/scripts/` is vendored from upstream (`watch-pr`, `orch`, `bootstrap.ts`, `worktree-audit.sh`, `package.json`, `bun.lock`) with four edits: `worktree-audit.sh` reads `~/.claude/projects/` instead of Cursor's transcript directory and warns when `jq` or `rg` is missing (their absence silently blanks the columns the prune decision reads), the private workspace package is named `@open-pstack/poteto-mode-tools`, and `bootstrap.ts` rejects Node before it reads Bun-only APIs. Everything else is upstream's code under the same MIT license. +- `plugins/pstack/skills/poteto-mode/scripts/` is vendored from upstream (`watch-pr`, `orch`, `bootstrap.ts`, `worktree-audit.sh`, `package.json`, `bun.lock`) with five edits and one port-authored test: `worktree-audit.sh` reads `~/.claude/projects/` instead of Cursor's transcript directory and warns when `jq` or `rg` is missing (their absence silently blanks the columns the prune decision reads), the private workspace package is named `@open-pstack/poteto-mode-tools`, `bootstrap.ts` rejects Node before it reads Bun-only APIs, and `package.json` includes `bootstrap.test.ts` in `bun run test`. The `bootstrap.test.ts` file is authored for this port. Everything else is upstream's code under the same MIT license. - `plugins/pstack/agents/comment-sicko.md` is upstream's `Comment Sicko` agent, renamed to `comment-sicko` so the name works as a Claude Code `subagent_type`. The body is verbatim. - Claude-native Fable and Opus lanes are port-authored agent definitions. They pin model plus requested effort for every selectable Claude-native pair in the provider-dispatch model matrix. - A Codex build shares the same `skills/` tree. It adds `plugins/pstack/.codex-plugin/plugin.json`, a root `.agents/plugins/marketplace.json`, and `plugins/pstack/skills/poteto-mode/references/codex-tools.md` (the Claude-to-Codex tool, model, and built-in map), plus a one-line Platform note in the skills that name a Claude primitive. The skill content itself is unchanged. See [CHANGES.md](CHANGES.md#codex-port). @@ -45,6 +45,7 @@ Files authored for this port (not derived from upstream): - `plugins/pstack/.codex-plugin/plugin.json` - `.agents/plugins/marketplace.json` (repo root) - `plugins/pstack/skills/poteto-mode/references/codex-tools.md` +- `plugins/pstack/skills/poteto-mode/scripts/bootstrap.test.ts` - `plugins/pstack/skills/babysit/SKILL.md` (independently authored; workflow informed by Cursor's public `/babysit` behavior) - `plugins/pstack/agents/pstack-fable-*.md` and `plugins/pstack/agents/pstack-opus-*.md` (Claude-native frontier lanes at each selectable effort) - `plugins/pstack/hooks/hooks.json`, `plugins/pstack/hooks/session-start`, and `plugins/pstack/hooks/session-start-context.md` (the auto-fire hook and its mandate)