From b87f39499c38b30bf7e6b95e5bb38dc288d96518 Mon Sep 17 00:00:00 2001 From: mdsmithaustin Date: Sat, 24 Oct 2026 10:03:24 -0600 Subject: [PATCH 1/6] sync(upstream): port eb4db2b..e73df47 (statechart update, ketchup-video, script fixes) Port upstream cursor/plugins commits touching pstack/ from eb4db2b to e73df47: - 7698375 (#776), 4ec7ffa (#779), 076f4b2 (#791): statechart skill and scripts brought to upstream; tests stay under tests/skills/statechart. - 00d5dec (#794): create-formal-verification-skill points generated TLA+ verify skills at the statechart skill. - 3c0fdb4 (#797): new ketchup-video skill, gated through agents/openai.yaml. - 7054003 (#800): reflect never edits an installed skill copy (needs judgment). - 96dec8e (#801), fe096ef (#802): watch-pr fork heads and deadline sleeps. - 86c2448 (#803): check-plan matching inline code delimiters. - 3c596e7 (#804): orch prefers a branch's open PR, Origin path only. - e73df47 (#807): swarm Phase D wording. Not ported: b1a1298/642289e version bumps, a0b0ad9 (#806) Claude Code marketplace note, f83fbe6 (#805) worktree-audit stat/date (the port already reads mtimes with Python). --- PORTING.md | 4 +- README.md | 1 + docs/guide/10-recipes-and-pitfalls.md | 2 + evals/promises/ledger.json | 80 +- evals/promises/test_static.py | 2 +- .../create-formal-verification-skill/SKILL.md | 2 + skills/ketchup-video/SKILL.md | 22 + skills/ketchup-video/agents/openai.yaml | 2 + skills/poteto-help/SKILL.md | 1 + skills/poteto-mode/scripts/check-plan.mjs | 2 +- skills/poteto-mode/scripts/orch/store.ts | 10 +- skills/poteto-mode/scripts/watch-pr/github.ts | 12 +- skills/poteto-mode/scripts/watch-pr/policy.ts | 10 +- skills/poteto-mode/scripts/watch-pr/types.ts | 1 + skills/reflect/SKILL.md | 2 + skills/setup-pstack/scripts/skill-listing.py | 2 +- skills/statechart/SKILL.md | 28 +- skills/statechart/scripts/bug-states.mjs | 81 + skills/statechart/scripts/chart-edges.mjs | 68 + skills/statechart/scripts/chart-parts.mjs | 21 + skills/statechart/scripts/chart-to-tla.mjs | 39 +- skills/statechart/scripts/compare-charts.mjs | 44 +- skills/statechart/scripts/lib.mjs | 325 +- skills/statechart/scripts/map-view.mjs | 92 + .../statechart/scripts/model/OutputFolder.cfg | 6 - .../scripts/model/OutputFolder.map.mjs | 106 - .../statechart/scripts/model/OutputFolder.tla | 176 - skills/statechart/scripts/property-loop.mjs | 60 + skills/statechart/scripts/read-check.mjs | 79 + skills/statechart/scripts/regions-chart.mjs | 307 + skills/statechart/scripts/render.mjs | 531 ++ skills/statechart/scripts/rule-book.mjs | 84 + skills/statechart/scripts/second-replay.mjs | 122 + skills/statechart/scripts/snapshot.mjs | 74 + skills/statechart/scripts/spec-text.mjs | 126 + skills/statechart/scripts/statechart-help.mjs | 350 ++ skills/statechart/scripts/statechart.mjs | 876 +-- .../statechart/scripts/tlc-to-chart-args.mjs | 52 + skills/statechart/scripts/tlc-to-chart.mjs | 1143 +--- skills/statechart/scripts/tlc-tools.mjs | 69 + skills/statechart/scripts/ways-in.mjs | 69 + skills/swarm/SKILL.md | 2 +- .../poteto-mode/scripts/check-plan.test.ts | 14 + .../poteto-mode/scripts/orch/orch.test.ts | 38 +- .../scripts/watch-pr/github.test.ts | 62 + .../scripts/watch-pr/policy.test.ts | 61 + tests/skills/statechart/scripts/test/band.mmd | 15 + .../statechart/scripts/test/regions.mmd | 62 + .../scripts/test/statechart.test.mjs | 5532 ++++++++++++++--- tools/skill-references.py | 1 + tools/skill-trigger-cases.json | 3 +- 51 files changed, 8487 insertions(+), 2386 deletions(-) create mode 100644 skills/ketchup-video/SKILL.md create mode 100644 skills/ketchup-video/agents/openai.yaml create mode 100644 skills/statechart/scripts/bug-states.mjs create mode 100644 skills/statechart/scripts/chart-edges.mjs create mode 100644 skills/statechart/scripts/chart-parts.mjs create mode 100644 skills/statechart/scripts/map-view.mjs delete mode 100644 skills/statechart/scripts/model/OutputFolder.cfg delete mode 100644 skills/statechart/scripts/model/OutputFolder.map.mjs delete mode 100644 skills/statechart/scripts/model/OutputFolder.tla create mode 100644 skills/statechart/scripts/property-loop.mjs create mode 100644 skills/statechart/scripts/read-check.mjs create mode 100644 skills/statechart/scripts/regions-chart.mjs create mode 100644 skills/statechart/scripts/render.mjs create mode 100644 skills/statechart/scripts/rule-book.mjs create mode 100644 skills/statechart/scripts/second-replay.mjs create mode 100644 skills/statechart/scripts/snapshot.mjs create mode 100644 skills/statechart/scripts/spec-text.mjs create mode 100644 skills/statechart/scripts/statechart-help.mjs create mode 100644 skills/statechart/scripts/tlc-to-chart-args.mjs create mode 100644 skills/statechart/scripts/tlc-tools.mjs create mode 100644 skills/statechart/scripts/ways-in.mjs create mode 100644 tests/skills/statechart/scripts/test/band.mmd create mode 100644 tests/skills/statechart/scripts/test/regions.mmd diff --git a/PORTING.md b/PORTING.md index a2436429..6ff60846 100644 --- a/PORTING.md +++ b/PORTING.md @@ -31,7 +31,7 @@ Upstream is the source of truth for the workflows themselves. This file records | Opening a PR, Verification: "a link to the arena or swarm directory for the rest" | "a link to the rest. After the PR opens, post the swarm report or the arena synthesis note as a PR comment, leaving out any finding that `playbooks/shipping.md` step 1 keeps off the PR, and link that comment when you finalize the body." Swarm returns its report in the reply, and arena deletes its run directory when the run ends, so neither leaves a directory to link | | arena Phase C: "Prefer a different model family from the parent's." | "Prefer a different model family or capability tier from the parent's." The default pool is `fable`, `opus`, and `sonnet`, which are one family, so a different tier is often the only difference available | | Cursor `/visualize` charts in ketchup ("a chart or diagram from `/visualize`", "a `/visualize` chart for numbers") | "a rendered chart or diagram" and "a rendered chart for numbers". The port's harnesses have no `/visualize` built-in | -| Cursor's Claude Code plugin install (`/plugin marketplace add cursor/plugins`, `/pstack:` prefixes, `~/.claude/rules/pstack-models.md`) and `docs/harness/claude-code.md` (upstream #637, #705) | not ported. The port installs natively through `npx skills`, and the **pstack-harness** skill maps Cursor names to Claude Code. The README, guide page 1, and poteto-help keep the port's install and harness text | +| Cursor's Claude Code plugin install (`/plugin marketplace add cursor/plugins`, `/pstack:` prefixes, `~/.claude/rules/pstack-models.md`) and `docs/harness/claude-code.md` (upstream #637, #705), and its note on enabling marketplace auto-update (upstream #806) | not ported. The port installs natively through `npx skills`, and the **pstack-harness** skill maps Cursor names to Claude Code. The README, guide page 1, and poteto-help keep the port's install and harness text | | poteto-mode's "Bundled skills live at `..//SKILL.md` from this file" line and poteto-agent's `~/.cursor/plugins/` search for poteto-mode (upstream #577, #597) | not ported. The **pstack-harness** skill's **use named sibling skills yourself** rule locates siblings, and the generated persona wrappers carry installed skill paths | | `cursor-grok-*` and `composer-*` slug families in arena's and interrogate's rejected-entry fallbacks (upstream #613) | not ported. The port's entries are aliases or harness model names, and **Spawn a role** owns rejection handling | @@ -81,7 +81,7 @@ Upstream is the source of truth for the workflows themselves. This file records - The models config carries reasoning effort and per-harness sections (port addition, 2026-09): an entry is `model` or `model@effort`; `## codex`, `## claude-code`, `## grok`, and `## hermes` sections override the flat lines for that harness; the layering, the effort policy (floor `high` on Codex and Hermes, `xhigh` there for the hardest roles, `inherit-parent` where subagents inherit the session effort, `max`/`ultra` only when written), and the Codex alias translation (`fable` → `gpt-6-sol@max`, `opus` → `gpt-6-sol@xhigh`, `sonnet` → `gpt-6-sol@high`, `haiku` → `gpt-6-luna@high`, since 2026-10 each run on the newest gpt-6 release Codex lists; Grok Build, since 2026-10, maps every alias to `grok-4.7` and takes effort like Claude Code) are written once, in `skills/setup-pstack/references/models-config.md`, and applied by `check-models-config.py --resolve` (port addition, 2026-10). The **pstack-harness** skill points at the resolver, and every reader points at pstack-harness instead of restating the layering. Since 2026-10 a role's model and effort come from one line, a harness section beats a flat line in either file, and the Codex and Hermes floor applies only when the line names a model, because a full-history fork inherits the parent's effort. `skills/setup-pstack/scripts/check-models-config.py` lints the file (unknown roles, bad efforts, per-model effort support, duplicate roles and sections, `none` or `ultra` under `## claude-code`, and any effort but `low` through `xhigh` under `## grok`); `skills/setup-pstack/examples/pstack-models.md` is the shipped default and CI lints it. On sync, point any new reader upstream adds at **Spawn a role** in the **pstack-harness** skill instead of a per-skill copy of the layering, defaults, or fallbacks. Upstream's setup-pstack budget ask (upstream #366: `unlimited`, `large`, `medium`, `small`) ports onto this grammar: the budget rewrites the `@effort` suffix of every real entry, harness sections and suffixed aliases included, instead of the effort token inside a Cursor slug; `unlimited` pins `max`, which matches upstream since #511, when upstream's defaults dropped to `xhigh` and its label changed from `keep max` to `max reasoning`; the port adds a fifth option, `default — keep as written`, that applies no budget, because it is the only option that keeps every per-role effort as written, and on Claude Code, where the effort policy leaves an unwritten effort at the session effort, it changes nothing; and the `# budget: