From 7791942c1f494a84f903c3b151f4a47b5f759726 Mon Sep 17 00:00:00 2001 From: Eric Litman Date: Wed, 21 Oct 2026 10:38:43 -0400 Subject: [PATCH 01/59] ci, docs: land on green and delete unbacked live-gate assertions (#241) Mergify now merges on verify and live-gate. Only a PR that touches .github/ or the Mergify config also waits for Unfret, and a workflow resolves the threads Unfret starts so only other reviewers' threads hold a merge. REVIEW.md answers an unbacked live-gate assertion by deleting it and treats a behavior no recipe checks as an advisory. AGENTS.md carries the live-proof scope and the release rule. Closes #241 Co-Authored-By: Claude Opus 5.5 --- .../verify-open-pstack/features/registry.json | 2 +- .github/workflows/unfret-threads.yml | 42 +++++++++++++++++++ .mergify.yml | 13 ++++-- AGENTS.md | 8 +++- CHANGES.md | 2 +- REVIEW.md | 5 ++- UPSTREAM.md | 6 +-- 7 files changed, 67 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/unfret-threads.yml diff --git a/.claude/skills/verify-open-pstack/features/registry.json b/.claude/skills/verify-open-pstack/features/registry.json index 88ad664d..dcacfbfd 100644 --- a/.claude/skills/verify-open-pstack/features/registry.json +++ b/.claude/skills/verify-open-pstack/features/registry.json @@ -79,7 +79,7 @@ "nonRuntime": [ "README.md", "REVIEW.md", "CHANGES.md", "LICENSE", "LICENSE.md", "UPSTREAM.md", "NOTICE.md", "README-UPSTREAM.md", "LICENSE-cursor-team-kit", "LICENSE-superpowers", - ".gitignore", ".mergify.yml", "docs/**", "assets/**", + ".gitignore", ".mergify.yml", ".github/workflows/unfret-threads.yml", "docs/**", "assets/**", "plugins/pstack/skills/poteto-mode/scripts/bootstrap.test.ts", "plugins/pstack/skills/poteto-mode/scripts/check-plan.test.ts", "plugins/pstack/skills/poteto-mode/scripts/resolve-codex-transcript.test.ts", "scripts/release.py", "scripts/release_test.py" diff --git a/.github/workflows/unfret-threads.yml b/.github/workflows/unfret-threads.yml new file mode 100644 index 00000000..ab6be656 --- /dev/null +++ b/.github/workflows/unfret-threads.yml @@ -0,0 +1,42 @@ +name: Unfret threads + +on: + pull_request_review: + types: [submitted] + +permissions: + pull-requests: write + +jobs: + resolve: + if: github.event.review.user.login == 'unfret-eal[bot]' + runs-on: ubuntu-latest + steps: + - name: Resolve the threads Unfret started + shell: bash + env: + GH_TOKEN: ${{ github.token }} + REPOSITORY: ${{ github.repository }} + PR: ${{ github.event.pull_request.number }} + run: | + gh api graphql --paginate \ + -f owner="${REPOSITORY%/*}" -f name="${REPOSITORY#*/}" -F number="$PR" \ + -f query='query($owner: String!, $name: String!, $number: Int!, $endCursor: String) { + repository(owner: $owner, name: $name) { + pullRequest(number: $number) { + reviewThreads(first: 100, after: $endCursor) { + pageInfo { hasNextPage endCursor } + nodes { id isResolved comments(first: 1) { nodes { author { login } } } } + } + } + } + }' \ + --jq '.data.repository.pullRequest.reviewThreads.nodes[] + | select(.isResolved | not) + | select(.comments.nodes[0].author.login == "unfret-eal") + | .id' | + while read -r thread; do + gh api graphql -f thread="$thread" \ + -f query='mutation($thread: ID!) { resolveReviewThread(input: {threadId: $thread}) { thread { id } } }' \ + > /dev/null + done diff --git a/.mergify.yml b/.mergify.yml index a7d6e5ad..ff71cb46 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -8,8 +8,8 @@ queue_rules: merge_method: merge queue_conditions: - -draft + - -label = hold - check-success=verify - - check-success=Unfret - check-success=live-gate - "#review-threads-unresolved = 0" merge_conditions: [] @@ -21,15 +21,22 @@ merge_protections_settings: merge_protections: - name: Queue ready pull requests - description: Automatically queue non-draft pull requests targeting main after verify, Unfret, and live-gate pass on the head and every review thread is resolved. + description: Automatically queue non-draft pull requests targeting main without a hold label after verify and live-gate pass on the head and every review thread is resolved. if: - base = main success_conditions: - -draft + - -label = hold - check-success=verify - - check-success=Unfret - check-success=live-gate - "#review-threads-unresolved = 0" + - name: Unfret on risky paths + description: Pull requests that touch .github/ or the Mergify config also wait for Unfret. + if: + - base = main + - files ~= ^(\.github/|\.mergify(\.ya?ml\Z|/)) + success_conditions: + - check-success = @unfret-eal/Unfret commands_restrictions: requeue: diff --git a/AGENTS.md b/AGENTS.md index 02abcc79..74d6bd94 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,8 +8,14 @@ Code this repository owns explains itself. `UPSTREAM.md`, `CHANGES.md` and `NOTI Before opening a pull request, run the Bun tests, strict typecheck, static invariants, and plugin validation. -Nothing merges, tags, releases, or rolls out until the exact candidate is installed and the changed behavior passes a live test from the real user surface in every affected harness. Unit tests, validators, source inspection, and self-reports do not satisfy this gate. The record is the `live-gate` commit status on that exact head, which links an evidence comment naming the installed version, surface, action, and observed result. Mergify does not queue a pull request without it. A pull request may be ready for review before its live test, but every new head, including a queue-created head, needs its own. +Nothing merges, tags, releases, or rolls out until the exact candidate is installed and the changed behavior passes a live test from the real user surface in every affected harness. Unit tests, validators, source inspection, and self-reports do not satisfy this gate. The live test covers the changed behavior, not every changed file or branch. `verify-open-pstack`'s rule picks the features and never defaults to a full sweep. A representative selection is the default, not a coverage gap to escalate. One stand-in covers a sentence repeated verbatim across many skills: the cheapest skill that carries it, never one that runs several models at high effort, such as `interrogate`, `swarm` or `arena`. The record is the `live-gate` commit status on that exact head, which links an evidence comment naming the installed version, surface, action, and observed result. Mergify does not queue a pull request without it. A pull request may be ready for review before its live test, but every new head, including a queue-created head, needs its own. For Open Pstack PRs, use the shared repository-local `.claude/skills/verify-open-pstack/` skill (Codex: `.agents/skills/verify-open-pstack`). Verifier-changing PRs run from a checkout of their reviewed candidate head, with the publisher revision equal to the candidate SHA; all other PRs run from trusted `main`. Record the publisher revision separately from the candidate SHA. Reuse the operator's existing logins without credential source flags, extra logins, or credential reading/copying. Claude uses normal operator config with session-only `--plugin-dir /plugins/pstack --settings '{"enabledPlugins":{"pstack@open-pstack":false}}'`. Codex installs the exact-head candidate in a run-owned `CODEX_HOME`, with `auth.json` symlinked to the operator's `${CODEX_HOME:-$HOME/.codex}/auth.json`; absent file-based auth fails closed. Removing the run home removes only the symlink, never its target. Setup alone snapshots real `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/pstack-models.md` and `CLAUDE.md`, restores their exact bytes or original absence afterwards, and verifies restoration before any publication; restoration failure publishes nothing. Preserve private mode-0700 raw evidence through merge. Publication is one structured evidence comment plus exact-SHA `live-gate`; no credential parsing, token registration, or exact-secret comment checks. No PR-body, ready/draft, reversal, or compensation writes, publisher-code attestation, or OS filesystem-denial claims are permitted. Builders do not publish the gate, queue, or merge. +Merge policy: land on green + +Mergify merges a pull request once `verify` and `live-gate` pass on its head, it has no `hold` label, and no review thread is unresolved. Unfret reviews every head in parallel and usually publishes its verdict after the merge. `.github/workflows/unfret-threads.yml` resolves each thread Unfret starts, so only other reviewers' threads hold a merge. A pull request that touches `.github/**` or the Mergify config also waits for `Unfret`; the risky-path rule in `.mergify.yml` lists those paths, and the verifier is not one of them. A pull request that touches `.github/**` also needs an operator to queue it. A material Unfret finding on a merged head gets a fix-forward pull request: a new, small pull request under the same flow, whose issue carries `Introduced by: `. The `hold` label is the operator's pause, and only the operator removes it. + +Publish a release only when every pull request merged since the previous release has an Unfret verdict on its merged head and each material finding among them has a merged fix-forward pull request. Then run `python3 scripts/release.py publish` from a clean checkout of `main`. + Do not add an implicit runtime timeout or a weaker-model fallback. diff --git a/CHANGES.md b/CHANGES.md index c9d9a4da..30240cba 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,6 @@ # CHANGES — applied substitutions -Mergify auto-queue is live: ready PRs to main require passing verify, Unfret and exact-head live-gate, and no unresolved review thread; workflow changes require operator queueing. +Open Pstack lands on green: Mergify merges a ready PR to main once verify and exact-head live-gate pass and no review thread is unresolved, and a workflow resolves Unfret's own threads. A PR that touches `.github/` or the Mergify config also waits for Unfret, and workflow changes require operator queueing. This port applies the Cursor → Claude Code substitutions in skill bodies. Earlier drafts left them flagged; this revision resolves them. A later pass added a Codex build that shares the same skills; see [Codex port](#codex-port) below. ## 1.16.0 syncs to Cursor pstack 0.15.29 diff --git a/REVIEW.md b/REVIEW.md index ba1ff664..c945240e 100644 --- a/REVIEW.md +++ b/REVIEW.md @@ -31,7 +31,8 @@ This repository has two surfaces. Shipped plugin code, `plugins/pstack/**`, runs - Contract (`.claude/skills/verify-open-pstack/scripts/harness.ts`, `features/recipes.ts`): the verifier names each fixture directory `state//fixtures/` inside the run root, and generates per-run fixture markers with `crypto.randomUUID()`. - Contract (`plugins/pstack/skills/poteto-mode/references/provider-dispatch.md`): it names no CLI version range. A runner lane requires the assigned provider CLI installed and authenticated as the launcher's preflight checks, a parent sandbox that lets that CLI reach its network and state, and, on Linux, Landlock and `bwrap` for Grok's bounded profiles. A lane that lacks one of these ends as a named dropout or a failed receipt, never a fallback. - Contract (`docs/reference.md`, Dependencies): shipped tooling uses `gh` (or Origin's `origin`), `bun`, `node`, and the provider CLIs in the user's model sheet; `gt` only for the Orchestrate playbook; `jq` and `rg` only for `worktree-audit.sh`, which warns without them. -- Contract (`.claude/skills/verify-open-pstack/features/recipes.ts`, runner and Reflect assertions): the live gate's evidence is the harness-recorded command naming the installed tool, plus a receipt or output that carries this run's paths, markers or results. It guards against model claims; it does not attest that a file executed. Operator policy (2026-10-11, PR #151 step-back decision): this is the gate's evidence standard. A false gate decision that an honest run can reach stays material. +- Contract (`.claude/skills/verify-open-pstack/features/recipes.ts`, runner and Reflect assertions): the live gate's evidence is the harness-recorded command naming the installed tool, plus a receipt or output that carries this run's paths, markers or results. It guards against model claims; it does not attest that a file executed. Operator policy (2026-10-11, PR #151 step-back decision): this is the gate's evidence standard. Operator policy (2026-10-21, #240): an assertion the live gate publishes that can pass without the behavior it names is material, and its correction is to delete the assertion and list the behavior under the PR's Not verified. A behavior no recipe asserts is a coverage gap: an advisory listed under Not verified. +- Contract (`.mergify.yml`; operator policy 2026-10-21, #241): this repository lands on green. Only a pull request that touches `.github/**` or the Mergify config waits for `Unfret` before it merges, and the verifier, `.claude/skills/verify-open-pstack/**`, is not a risky path. Unfret reviews every other head in parallel, usually after the merge, and a material finding on a merged head gets a fix-forward pull request. ## Entry-point scope (read by the review panel as a mandate) @@ -41,7 +42,7 @@ Each scoped sentence in this section names a concrete entry point or bounded sur - `verify.sh doctor` and `verify.sh run` serve only the operator's Mac, which `doctor.ts` and `harness.ts` enforce as Darwin; a live-gate failure that needs a non-Darwin host is out of scope, but the verifier's unit tests and typecheck in Ubuntu CI stay in scope. - The verifier's `--output` run root is `$SESSION/live` in a directory the documented launch recipe makes with `mktemp -d` under the operator's `TMPDIR`, and the verifier refuses an existing path; a failure that needs a hand-named run root is out of scope, but any path an inherited `TMPDIR` gives stays in scope. - Fixture directories and per-run markers in `.claude/skills/verify-open-pstack/**` are generated by `harness.ts` and `features/recipes.ts`; a failure that needs a fixture or marker name chosen by hand is out of scope. -- The live gate in `.claude/skills/verify-open-pstack/**` must reject model claims and reach a correct gate decision on every honest run; a failure that needs the model under test to deliberately forge a tool's output, such as rebuilding a runner or resolver result with other commands, is out of scope. +- The live gate in `.claude/skills/verify-open-pstack/**` must reject model claims, and every assertion it publishes must be backed by its retained evidence; a failure that needs the model under test to deliberately forge a tool's output, such as rebuilding a runner or resolver result with other commands, is out of scope. - In `.claude/skills/verify-open-pstack/**`, a failure that needs the model under test to deliberately evade a recipe, such as a crafted shell spelling, a value hidden in a variable or a report echoed without its lookup, is out of scope even when it would change the gate decision; a wrong decision on an honest run stays in scope. - In `plugins/pstack/**`, a failure that needs a host missing a prerequisite named in `docs/reference.md` (Dependencies) or `provider-dispatch.md` (Host and parent prerequisites) is out of scope, except for the behavior those files promise on such a host. - On such a host, `plugins/pstack/**` must keep the promised behavior: `worktree-audit.sh` warns without `jq` or `rg`, a blocked external CLI is a loud dropout, and a Grok lane without Landlock or `bwrap` ends `child-failed` with Grok's refusal in its receipt. diff --git a/UPSTREAM.md b/UPSTREAM.md index 30e5de1f..6740a51e 100644 --- a/UPSTREAM.md +++ b/UPSTREAM.md @@ -49,7 +49,7 @@ The table above is the current Cursor sync point. Open Pstack 1.16.0 imported th - **#157 — role pointers**: Cursor names model descriptors in the Arena, Architect, How, Interrogate, and Swarm skills, the bug-fix, feature, hillclimb, perf-issue, and refactoring playbooks, poteto-mode's delegation defaults, and setup's probe table and first-run sheet. The port replaces each with a role pointer: the role's backticked sheet label and a link to `plugins/pstack/skills/poteto-mode/references/model-catalog.md#role-defaults`, which `registry/render.ts` generates from `plugins/pstack/skills/poteto-mode/scripts/runner/registry/models.ts`. Interrogate's reviewer table and setup's probe table and example sheet are deleted. When an upstream sync changes a model slug on one of these lines, keep the port's line and put the model change in `registry/models.ts`. `runner/registry.test.ts` enforces the rule: `ROLE_POINTERS` names each file's roles, and its text scan rejects any descriptor or versioned model name in `plugins/pstack/**/*.md`, `README.md`, and `docs/reference.md` outside the generated catalog and agents. -- **#46 — quiet setup reruns**: Upstream's setup has no keep-roles, per-family effort, or write-confirmation questions, so this is a port patch. `setup-pstack/SKILL.md` states one qualifying-rerun exception before step 2's keep-roles question. On a rerun whose sheet loaded with one valid setting line, with no change named and no inconsistency or kept-predecessor proposal that needs a choice, setup validates in step 3, keeps and prints the roles and efforts instead of asking steps 2 and 4, and writes without step 7's confirmation when every step 5 probe passes. Steps 4, 7 and 8 and the offers in steps 10 and 11 each name the exception. It skips no validation, permission check, snapshot, readback, or the step 9 smoke test, and a failed probe still stops without writing. `poteto-help` says the same for reruns. The verifier's `keep-setting` case gives no answers and requires the sheet and Codex mirror to keep their bytes with no `AskUserQuestion` call. Preserve this divergence during upstream syncs. +- **#46 — quiet setup reruns**: Upstream's setup has no keep-roles, per-family effort, or write-confirmation questions, so this is a port patch. `setup-pstack/SKILL.md` states one qualifying-rerun exception before step 2's keep-roles question. On a rerun whose sheet loaded with one valid setting line, with no change named and no inconsistency or kept-predecessor proposal that needs a choice, setup validates in step 3, keeps and prints the roles and efforts instead of asking steps 2 and 4, and writes without step 7's confirmation when every step 5 probe passes. Steps 4, 7 and 8 and the offers in steps 10 and 11 each name the exception. It skips no validation, permission check, snapshot, readback, or the step 9 smoke test, and a failed probe still stops without writing. `poteto-help` says the same for reruns. Preserve this divergence during upstream syncs. - **#191 — landing playbooks and per-spawn effort**: `ce649c0` cuts Shipping to six steps and both autopilots to principles. The port takes the cut's rules and reasons but keeps the landing procedure from 1.3.0: Shipping keeps steps 1 to 9, Autopilot-full step 2 holds the guarded rebase and push, and Autopilot-stack step 2 holds the fork and topology rules. Those steps disarm auto-merge and merge-queue entries before verification and before any rewrite, keep the verdict head and base apart from the landing head and base, resolve the base fetch remote apart from the head push URL, bind each push to a captured SHA, and merge only through a server-enforced expected head. The named landing invariants in `tests/skill-collision-repro.sh` check those rules by step and phrase, so a sync that moves them updates the invariants in the same change. `ce649c0`'s Match the model to the job rule is taken with port adaptations: the starting level is the role's configured effort, an unlisted effort moves to the nearest effort the catalog row lists, a configured `ultra` stays, and the fast and standard speed sentences are dropped because the port's descriptors carry no speed selector. @@ -87,9 +87,9 @@ No output means the tracked pstack tree has not changed. This comparison does no The merge checks out files the port never changed, merges the rest three ways, and prints counts of verbatim, clean, review and unmapped paths. It exits 1 when any path needs review. 4. Resolve each review row by hand. A conflict hunk keeps the port's adaptation and takes upstream's new intent beside it. A change to an excluded path stays out and extends that exclusion's line in this file. Each unmapped path, such as a Cursor manifest or the guide, is excluded or mapped by a decision in step 2. Record every hand resolution and every new adaptation or exclusion in this file. 5. Keep one shared `plugins/pstack/skills/` tree. Put harness translation in the existing `codex-tools.md` and provider routing in `provider-dispatch.md`; do not fork a skill per harness. -6. Add every new skill to the `skills` list in `.claude/skills/verify-open-pstack/features/registry.json`. When the sync changes what a skill with its own recipe does, such as `setup-pstack`, update that recipe in `features/recipes.ts`, its unit tests under `scripts/`, and its feature page. +6. Add every new skill to the `skills` list in `.claude/skills/verify-open-pstack/features/registry.json`. 7. Update the commit and version in this file, add a provenance row to `NOTICE.md`, and take `README-UPSTREAM.md` when upstream changes its README. 8. Run CI-equivalent checks locally, then run the installed Claude Code and Codex behavioral lanes required by the changed surface with `verify-open-pstack`. A sync that edits the verifier runs from the candidate head with `--self-test`. A run above the session limit needs `--wide ""`. Unit tests alone are not a release gate. -9. Merge the reviewed PR before tagging the next open-pstack release. Publish the release with `python3 scripts/release.py publish` from a clean checkout of `main`. +9. Merge the reviewed PR before tagging the next open-pstack release. Publish a release only when every PR merged since the previous release has an Unfret verdict on its merged head and each material finding among them has a merged fix-forward PR. Publish it with `python3 scripts/release.py publish` from a clean checkout of `main`. Cursor's version and open-pstack's version are independent. Cursor's version identifies the imported content; open-pstack's version identifies the cross-harness distribution. From 986c49aac0b90f2b1606ff943fbca6193c53c184 Mon Sep 17 00:00:00 2001 From: Eric Litman Date: Wed, 21 Oct 2026 11:04:38 -0400 Subject: [PATCH 02/59] fix(ci): let the thread workflow resolve, and drop the hold label (#241) The Actions token needs contents: write for resolveReviewThread: the workflow's run on 7791942c failed FORBIDDEN under pull-requests: write alone, and a probe resolved an Unfret thread once contents: write was added. Mergify cannot tell who removed a hold label, so the pause is a draft pull request instead. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/unfret-threads.yml | 2 ++ .mergify.yml | 4 +--- AGENTS.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unfret-threads.yml b/.github/workflows/unfret-threads.yml index ab6be656..70a0902b 100644 --- a/.github/workflows/unfret-threads.yml +++ b/.github/workflows/unfret-threads.yml @@ -5,6 +5,8 @@ on: types: [submitted] permissions: + # GitHub refuses resolveReviewThread to the Actions token without contents: write. + contents: write pull-requests: write jobs: diff --git a/.mergify.yml b/.mergify.yml index ff71cb46..a09ce350 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -8,7 +8,6 @@ queue_rules: merge_method: merge queue_conditions: - -draft - - -label = hold - check-success=verify - check-success=live-gate - "#review-threads-unresolved = 0" @@ -21,12 +20,11 @@ merge_protections_settings: merge_protections: - name: Queue ready pull requests - description: Automatically queue non-draft pull requests targeting main without a hold label after verify and live-gate pass on the head and every review thread is resolved. + description: Automatically queue non-draft pull requests targeting main after verify and live-gate pass on the head and every review thread is resolved. if: - base = main success_conditions: - -draft - - -label = hold - check-success=verify - check-success=live-gate - "#review-threads-unresolved = 0" diff --git a/AGENTS.md b/AGENTS.md index 74d6bd94..5903f99d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -14,7 +14,7 @@ For Open Pstack PRs, use the shared repository-local `.claude/skills/verify-open Merge policy: land on green -Mergify merges a pull request once `verify` and `live-gate` pass on its head, it has no `hold` label, and no review thread is unresolved. Unfret reviews every head in parallel and usually publishes its verdict after the merge. `.github/workflows/unfret-threads.yml` resolves each thread Unfret starts, so only other reviewers' threads hold a merge. A pull request that touches `.github/**` or the Mergify config also waits for `Unfret`; the risky-path rule in `.mergify.yml` lists those paths, and the verifier is not one of them. A pull request that touches `.github/**` also needs an operator to queue it. A material Unfret finding on a merged head gets a fix-forward pull request: a new, small pull request under the same flow, whose issue carries `Introduced by: `. The `hold` label is the operator's pause, and only the operator removes it. +Mergify merges a pull request once `verify` and `live-gate` pass on its head and no review thread is unresolved. Unfret reviews every head in parallel and usually publishes its verdict after the merge. `.github/workflows/unfret-threads.yml` resolves each thread Unfret starts, so only other reviewers' threads hold a merge. A pull request that touches `.github/**` or the Mergify config also waits for `Unfret`; the risky-path rule in `.mergify.yml` lists those paths, and the verifier is not one of them. A pull request that touches `.github/**` also needs an operator to queue it. A material Unfret finding on a merged head gets a fix-forward pull request: a new, small pull request under the same flow, whose issue carries `Introduced by: `. Mergify reads no `hold` label here: to keep a pull request from landing, keep it a draft. Publish a release only when every pull request merged since the previous release has an Unfret verdict on its merged head and each material finding among them has a merged fix-forward pull request. Then run `python3 scripts/release.py publish` from a clean checkout of `main`. From 64302cf81ceb298a977d0b9f67c0e88c7f66a6a0 Mon Sep 17 00:00:00 2001 From: Eric Litman Date: Wed, 21 Oct 2026 18:17:07 -0400 Subject: [PATCH 03/59] MASTRA-1135: keep this repository's run-these and babysit-pr steps in .agents/ Co-Authored-By: Claude Opus 5.5 --- .agents/babysit-pr.md | 17 +++++++++++ .agents/run-these.md | 29 +++++++++++++++++++ .../verify-open-pstack/features/registry.json | 1 + 3 files changed, 47 insertions(+) create mode 100644 .agents/babysit-pr.md create mode 100644 .agents/run-these.md diff --git a/.agents/babysit-pr.md b/.agents/babysit-pr.md new file mode 100644 index 00000000..490aed6f --- /dev/null +++ b/.agents/babysit-pr.md @@ -0,0 +1,17 @@ +# babysit-pr in this repository + +## Checks + +```json +{ + "workflows": [ + { + "name": "CI", + "checks": ["verify"], + "rerunOn": ["failure", "cancelled", "timed_out", "action_required"] + } + ] +} +``` + +`live-gate` is a commit status that the `verify-open-pstack` skill publishes on each head; no workflow reruns it. diff --git a/.agents/run-these.md b/.agents/run-these.md new file mode 100644 index 00000000..8d8db532 --- /dev/null +++ b/.agents/run-these.md @@ -0,0 +1,29 @@ +# run-these in this repository + +## Setup + +Nothing beyond `AGENTS.md`. The package scripts install their own dependencies. + +## Gate + +`AGENTS.md` names the four checks to run before opening a pull request. From the repository root: `bun run test`, `bun run typecheck`, `bun run static` and `claude plugin validate plugins/pstack`. + +## Live proof + +`AGENTS.md`: every head needs its own `live-gate` commit status from the `verify-open-pstack` skill, whose rule picks the features. A docs-only path still needs a registry entry in that skill's `features/registry.json`, because an unmapped path fails closed. + +## Review and merge + +`AGENTS.md`: this repository lands on green once `verify` and `live-gate` pass and no review thread is unresolved. Mergify reads no `hold` label here; keep a pull request a draft to stop it landing. `.github/workflows/unfret-threads.yml` resolves Unfret's threads. Before posting `live-gate`, read the other reviewers' threads with `watch-pr --status-only`, then fix or answer each one and resolve it. + +## Deploy or release + +`AGENTS.md`: once every pull request merged since the previous release has an Unfret verdict on its merged head and each material finding has a merged fix-forward pull request, run `python3 scripts/release.py publish` from a clean checkout of `main`. Cut the release whenever merged changes are user-facing. + +## Ticket states after merge + +Work is tracked in this repository's GitHub Issues. The live proof comes before the merge here, so a merged pull request closes its issue. Confirm that each merged pull request closed its issue, or that its body says why it did not. + +## Closeout + +Records go in `~/projects/docs/projects/open-pstack/records/-batch-/`. diff --git a/.claude/skills/verify-open-pstack/features/registry.json b/.claude/skills/verify-open-pstack/features/registry.json index dcacfbfd..df303783 100644 --- a/.claude/skills/verify-open-pstack/features/registry.json +++ b/.claude/skills/verify-open-pstack/features/registry.json @@ -79,6 +79,7 @@ "nonRuntime": [ "README.md", "REVIEW.md", "CHANGES.md", "LICENSE", "LICENSE.md", "UPSTREAM.md", "NOTICE.md", "README-UPSTREAM.md", "LICENSE-cursor-team-kit", "LICENSE-superpowers", + ".agents/run-these.md", ".agents/babysit-pr.md", ".gitignore", ".mergify.yml", ".github/workflows/unfret-threads.yml", "docs/**", "assets/**", "plugins/pstack/skills/poteto-mode/scripts/bootstrap.test.ts", "plugins/pstack/skills/poteto-mode/scripts/check-plan.test.ts", From fca9e98bb0c04cc366112be32fd6c4eae98061cc Mon Sep 17 00:00:00 2001 From: Eric Litman Date: Wed, 21 Oct 2026 18:26:12 -0400 Subject: [PATCH 04/59] docs(MASTRA-1142): keep this repository's triage-backlog settings in .agents/triage-backlog.md The shared triage-backlog skill stops holding repository-specific settings and reads this file instead. Co-Authored-By: Claude Opus 5.5 --- .agents/triage-backlog.md | 45 +++++++++++++++++++ .../verify-open-pstack/features/registry.json | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 .agents/triage-backlog.md diff --git a/.agents/triage-backlog.md b/.agents/triage-backlog.md new file mode 100644 index 00000000..46bd1799 --- /dev/null +++ b/.agents/triage-backlog.md @@ -0,0 +1,45 @@ +# Triage backlog: open-pstack + +The `triage-backlog` skill reads this file. open-pstack is a one-repository project. + +## Repositories + +| Repository | Tracker | Verify skill | +|---|---|---| +| ericlitman/open-pstack | GitHub Issues | `.claude/skills/verify-open-pstack` | + +## Session hosts + +pro14, studio2 + +## Records + +`~/projects/docs/projects/open-pstack/records/` + +## Additions + +### After step 4 (Sweep blockers): upstream lens + +```sh +git remote | grep -qx cursor || git remote add cursor https://github.com/cursor/plugins.git; git fetch cursor main +git worktree add --detach /port origin/main && cd /port +python3 scripts/upstream-audit.py --port origin/main --upstream cursor/main > /audit.json +python3 scripts/upstream-merge.py /audit.json; echo "exit $?" +cd - && git worktree remove --force /port +``` + +`upstream-merge.py` has no dry-run mode and writes files, so this second throwaway worktree is the dry run. Report its verbatim, clean-merge and needs-review counts. Exit 1 means review is needed. Exit 2 means the script refused its input. Report the two apart. + +Tag each item port-only or Cursor-derived, by the paths it edits (a PR's files) or names, as `UPSTREAM.md` and `NOTICE.md` map them; an item that names none is tagged from its subject, and the tag says so. Before a local fix to a Cursor-derived file is scheduled, check the source that `UPSTREAM.md` or `NOTICE.md` names for that path for an existing fix, such as `git log cursor/main -- pstack/` for the pstack tree. An "upstream first" disposition is finished only when the authorized upstream action exists and its link is in the plan. For an issue already closed upstream-first, record whether the upstream PR exists, and act only when its reopen condition fired. Route a new tool as an external provider, not as a parent harness. Done when the counts, the exit code and a tag for each item are in the plan. + +### Steps 2 (Collect) and 5 (Release lag): model snapshot, release procedure and model lag + +The release procedure is `python3 scripts/release.py publish`, which tags the live-gated head. + +After the step-2 collector, save the Codex model list: `codex debug models > /codex-models.txt 2>&1`, and record `codex --version` in the plan. Claude has no model-list command, so the plan says its list is unavailable. At step 5, compare `codex-models.txt` with the registry source `plugins/pstack/skills/poteto-mode/scripts/runner/registry/models.ts`. A gap recommends a change to the registry source, because `model-catalog.md` is generated from it. Done when each model gap is in the plan. + +### Step 6 (Set dispositions): live gate + +The live proof is the `live-gate` status in each PR's `checks`. Before scheduling, confirm the item can be live-gated: a same-repository PR, a Darwin host (`uname -s`), and every path it changes mapped in `.claude/skills/verify-open-pstack/features/registry.json`, because the live gate fails closed on an unmapped path. For a provider item, `command -v `: an absent CLI cannot be live-gated. Run `.claude/skills/verify-open-pstack/scripts/verify.sh doctor --output `. A failure becomes an evidence-plan question; a Claude `loggedIn: false` is repaired by Eric logging in from the Claude app's Terminal panel on that host, not over SSH. + +A fork PR cannot get a `live-gate`. Port it to a same-repository branch with `Co-authored-by`, or close it with a pointer. diff --git a/.claude/skills/verify-open-pstack/features/registry.json b/.claude/skills/verify-open-pstack/features/registry.json index df303783..95ec4ed4 100644 --- a/.claude/skills/verify-open-pstack/features/registry.json +++ b/.claude/skills/verify-open-pstack/features/registry.json @@ -79,7 +79,7 @@ "nonRuntime": [ "README.md", "REVIEW.md", "CHANGES.md", "LICENSE", "LICENSE.md", "UPSTREAM.md", "NOTICE.md", "README-UPSTREAM.md", "LICENSE-cursor-team-kit", "LICENSE-superpowers", - ".agents/run-these.md", ".agents/babysit-pr.md", + ".agents/run-these.md", ".agents/babysit-pr.md", ".agents/triage-backlog.md", ".gitignore", ".mergify.yml", ".github/workflows/unfret-threads.yml", "docs/**", "assets/**", "plugins/pstack/skills/poteto-mode/scripts/bootstrap.test.ts", "plugins/pstack/skills/poteto-mode/scripts/check-plan.test.ts", From f04d96f8b04bac2447654ab06ace390665118392 Mon Sep 17 00:00:00 2001 From: Eric Litman Date: Thu, 22 Oct 2026 02:58:13 -0400 Subject: [PATCH 05/59] docs: refresh the README and reference for 1.16.0 (#245) Co-Authored-By: Claude Opus 5.5 --- README.md | 34 +++++++++++++++------------------- docs/reference.md | 14 +++++++------- 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 0c02a8d4..b5c9157c 100644 --- a/README.md +++ b/README.md @@ -10,17 +10,17 @@ Lauren built pstack from the skills she uses to ship code at Cursor. In a [55-mi > If you want to go fast, go deep first. -Open Pstack is an unofficial community project that makes pstack work in Claude Code and Codex. If Cursor is your main coding environment, use [Lauren's original pstack](https://github.com/cursor/plugins/tree/main/pstack). If Claude Code or Codex is your main coding environment, use this repository. +Open Pstack is an unofficial community project. In Cursor, use [Lauren's original pstack](https://github.com/cursor/plugins/tree/main/pstack). In Codex, use Open Pstack. In Claude Code, you have two choices. Lauren's `pstack@cursor-plugins` has Claude models only and runs the Grok and GPT roles on the session's Claude model. Open Pstack also runs in Codex, and runs other providers' models through their own command-line tools. Install only one of the two in Claude Code, because both use the `pstack:` prefix. ## What Open Pstack adds -Beyond translating pstack for Claude Code and Codex, Open Pstack adds: +Compared with Lauren's pstack, Open Pstack adds: - **A model and provider registry.** Models, efforts and providers live in one typed [registry](plugins/pstack/skills/poteto-mode/scripts/runner/registry/). The [model catalog](plugins/pstack/skills/poteto-mode/references/model-catalog.md) and the Claude-native agent files are generated from it, and the skills point at the catalog's role defaults instead of naming models. A new model is one registry entry. A new command-line provider is one adapter module and one line in the provider list. See the [design](docs/plans/2026-10-11-model-provider-registry.md). -- **One skill tree for Claude Code and Codex.** Both apps read the same skills, and one [reference](plugins/pstack/skills/poteto-mode/references/codex-tools.md) maps how each app starts them. See [Claude Code and Codex](#claude-code-and-codex) below. -- **Models from other providers.** Claude, Codex and Grok each run through their own signed-in command-line tool, started by one [runner](plugins/pstack/skills/poteto-mode/references/provider-dispatch.md). Each run leaves a receipt with the exact model flags and, where the provider reports it, the model that answered. Grok gets only an allowlisted environment, and a Claude lane that writes files runs in Claude Code's Bash sandbox, with writes to the shared Git directory denied. A model that cannot run fails visibly; the runner never switches to a weaker model. -- **A checked model sheet.** [`setup-pstack`](plugins/pstack/skills/setup-pstack/SKILL.md) records each role as `provider:model@effort`, asks for one effort per model family, and runs each chosen model once before it saves anything. -- **Three-model panels.** Review and comparison skills default to Opus, Sol and Grok. Upstream pstack moved to two models; Open Pstack keeps three ([UPSTREAM.md](UPSTREAM.md)). +- **One skill tree for Claude Code and Codex.** Both apps read the same skills, and one [reference](plugins/pstack/skills/poteto-mode/references/codex-tools.md) maps how each app starts them. Lauren's pstack does not run in Codex. See [Claude Code and Codex](#claude-code-and-codex) below. +- **Models from other providers.** Claude Code and Codex hand work to other providers' models through each provider's own signed-in command-line tool, started by one [runner](plugins/pstack/skills/poteto-mode/references/provider-dispatch.md). The runner supports nine providers. Claude, Codex and Grok run lanes that read or write files. Devin, DeepSeek Harness, Antigravity, OpenCode, Amp and Cursor CLI run read-only lanes. The model catalog's [routes table](plugins/pstack/skills/poteto-mode/references/model-catalog.md#routes) lists how each one starts. Each run leaves a receipt with the exact model flags and, where the provider reports it, the model that answered. Every provider except Claude and Codex gets only an allowlisted environment. A Claude lane that writes files runs in Claude Code's Bash sandbox, with writes to the shared Git directory denied. A model that cannot run fails visibly; the runner never switches to a weaker model. +- **A checked model sheet.** [`setup-pstack`](plugins/pstack/skills/setup-pstack/SKILL.md) records each role as `provider:model@effort`, asks for one effort per model family, and probes each chosen model before it saves anything. A rerun that changes nothing keeps the sheet without asking again. +- **Three-model panels.** `arena`, `architect` and `interrogate` default to Opus, Sol and Grok. Lauren's pstack defaults to Opus 5.5 and Grok; Open Pstack keeps three ([UPSTREAM.md](UPSTREAM.md)). - **Changes tested where they run.** Before a change merges, the exact candidate is installed in each app it affects and the changed behavior is tested there. The pull request records the result ([AGENTS.md](AGENTS.md)). ## What pstack does @@ -43,7 +43,7 @@ pstack does not ask you to trust an agent on day one. It helps the agent leave e ## Install -You need a current Claude Code or Codex installation. For the full three-model review, install and sign in to the Claude Code, Codex, and Grok command-line tools. [Bun](https://bun.sh) runs the small local tool that starts models outside the app you are using. You can still use the core workflows with fewer models. +You need a current Claude Code or Codex installation. For the full three-model review, install and sign in to the Claude Code, Codex, and Grok command-line tools. [Bun](https://bun.sh) runs the small local tool that starts models outside the app you are using. You can still use the core workflows with fewer models. You need another provider's command-line tool only when your model sheet assigns that provider. ### Claude Code @@ -91,11 +91,9 @@ In Codex, ask: Use pstack:setup-pstack to configure pstack. ``` -Setup checks the models you can actually run, shows how each one will start, and asks before saving the choices. The default review panel uses Opus, Sol, and Grok, and setup probes only the models your roles use. Fable, Sonnet, Luna, Haiku 5.5 and an exact Opus pin remain available. +Setup checks the role assignments, shows how each model will start, and probes each assigned model before saving. The default review panel uses Opus, Sol and Grok. The [model catalog](plugins/pstack/skills/poteto-mode/references/model-catalog.md) lists every other choice. -An older model sheet starts using the rolling aliases in memory as soon as this release is installed. Run setup once after updating to persist that migration. It replaces versioned entries of a rolling-alias family, such as Opus, while preserving every role assignment and effort selection. A registered exact pin is kept. - -A model sheet from an earlier release keeps its panel. To take the new defaults, delete those role lines and run setup again; setup fills missing roles from the defaults. An entry for a model that a later release replaced keeps running until the next setup run asks you to replace it. +The first run asks before saving. A rerun also asks when you name a change, or when it finds an invalid sheet or a choice only you can make. A failed probe stops setup before it saves anything. A rerun that changes nothing prints what it kept and saves without asking. After its smoke test, setup offers to generate a verification skill and a formal verification skill when the project has none. ### 2. Use poteto-mode @@ -141,9 +139,9 @@ Plugin skills include `pstack:` in their name. In Claude Code, invoke a native s ## Models and token use -Some pstack workflows use one model. Skills such as `architect`, `arena`, and `interrogate` can run several models in parallel. Each model run uses the subscription and token allowance of its own command-line tool. +Some pstack workflows use one model. Skills such as `architect`, `arena`, and `interrogate` can run several models in parallel. Each model run uses the account and allowance of the tool that runs it. -`setup-pstack` lets you choose the models, one requested effort per model family you assign, and how many run in parallel. A model from the app you are using runs inside that app. Other models run through their own command-line tools. Open Pstack does not quietly replace a failed model with a weaker one. +`setup-pstack` lets you choose the models, one requested effort per model family you assign, and how many run in parallel. A model from the app you are using runs inside that app. Other models run through their own command-line tools, as the [routes table](plugins/pstack/skills/poteto-mode/references/model-catalog.md#routes) shows. Open Pstack does not quietly replace a failed model with a weaker one. ## Claude Code and Codex @@ -152,11 +150,11 @@ Both apps read the same pstack skills. Only the way they start those skills and | | Claude Code | Codex | | --- | --- | --- | | Start poteto-mode | Claude loads a small startup instruction that can route non-trivial work into it. You can also run `/pstack:poteto-mode` yourself. | Ask for `pstack:poteto-mode` by name. Codex does not load the Claude startup instruction. | -| Runs inside the app | Claude models stay inside Claude Code. | The Sol model stays inside Codex. | -| Other models | Codex and Grok run through their signed-in command-line tools. | Claude and Grok run through their signed-in command-line tools. | +| Runs inside the app | Claude models stay inside Claude Code. | Codex models, such as Sol, stay inside Codex. | +| Other models | Codex, Grok and the read-only providers run through their signed-in command-line tools ([routes](plugins/pstack/skills/poteto-mode/references/model-catalog.md#routes)). | Claude, Grok and the read-only providers run through their signed-in command-line tools ([routes](plugins/pstack/skills/poteto-mode/references/model-catalog.md#routes)). | | Skills and workflows | Shared with Codex. | Shared with Claude Code. | -Grok can take part in a multi-model review. You cannot use Grok as the main app running pstack. +The other providers take part only through the runner. pstack itself runs inside Claude Code or Codex. ## Learn from the original @@ -176,9 +174,7 @@ Open Pstack 1.16.0 tracks pstack 0.15.29 at Cursor commit [`88d47514b82e7c44f00f The two projects have separate version numbers. The pstack version identifies Lauren's upstream content. The Open Pstack version identifies the Claude Code and Codex package built from it. -In this repository, “upstream” means Lauren's original pstack. Open Pstack does not promise instant updates. It records the exact version it follows, reviews new changes in order, and changes only what Claude Code and Codex require. New pstack behavior belongs in Lauren's project first whenever possible. - -Cursor's pstack now installs in Claude Code as `pstack@cursor-plugins`, with Claude models only and no Codex. Install only one of the two, because both use the `pstack:` prefix. +In this repository, “upstream” means Lauren's original pstack. Open Pstack does not promise instant updates. It records the exact version it follows, reviews new changes in order, and lists each adaptation and each upstream change it leaves out in [UPSTREAM.md](UPSTREAM.md). New pstack behavior belongs in Lauren's project first whenever possible. ## Contributing diff --git a/docs/reference.md b/docs/reference.md index 94bf510a..8ac0362f 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -2,7 +2,7 @@ This page contains the full skill, dependency, runtime, and porting reference. For the plain-English introduction and quick start, see the [main README](../README.md). -[Poteto](https://x.com/poteto)'s [pstack](https://github.com/cursor/plugins/tree/main/pstack), adapted to run in Claude Code and Codex without Cursor. One shared skill tree serves both harnesses; Grok remains available as a model-provider lane. Version 1.16.0 is synced to Cursor pstack v0.15.29 at `88d47514b82e7c44f00f2b2a72ff6dd12158038c`. See [UPSTREAM.md](../UPSTREAM.md) for the exact sync contract. +[Poteto](https://x.com/poteto)'s [pstack](https://github.com/cursor/plugins/tree/main/pstack), adapted to run in Claude Code and Codex without Cursor. One shared skill tree serves both harnesses; Grok and six read-only providers run as lanes through the bundled runner. Version 1.16.0 is synced to Cursor pstack v0.15.29 at `88d47514b82e7c44f00f2b2a72ff6dd12158038c`. See [UPSTREAM.md](../UPSTREAM.md) for the exact sync contract. Original by Lauren Tan. This distribution builds on Michael Denyer's [pstack-claude](https://github.com/michael-denyer/pstack-claude) port and retains its history and MIT attribution. It imports seven MIT-licensed skills from [cursor-team-kit](https://github.com/cursor/plugins/tree/main/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`. @@ -83,10 +83,10 @@ The Codex build shares one `skills/` tree with the Claude Code build. Nothing is - **Skill invocation.** Codex loads `SKILL.md` natively. There is no `Skill` tool. You invoke a skill by name (ask for it, or pick `pstack:poteto-mode` from the list). - **Package surface.** The native `skills/` tree is the only workflow source. The plugin ships no `commands/` layer and does not link prompts into `~/.codex/prompts/`. Codex would migrate such files into duplicate source-command skills while loading the native skill tree. The 24 `principle-*` leaves declare `user-invocable: false`. Claude keeps them out of its user picker; Codex 0.149.0 currently shows them despite that metadata ([#8](https://github.com/ericlitman/open-pstack/issues/8)). -- **Tool and built-in mapping.** Claude tool names and built-in skills resolve through [`codex-tools.md`](../plugins/pstack/skills/poteto-mode/references/codex-tools.md). Model execution resolves separately through [`provider-dispatch.md`](../plugins/pstack/skills/poteto-mode/references/provider-dispatch.md), so Codex can keep Sol native while invoking Claude and Grok externally. -- **Subagents.** The `Agent` tool maps to Codex `spawn_agent` / `wait_agent`, enabled by `multi_agent = true`. Parallel fan-out is multiple `spawn_agent` calls in one turn. If the native Codex lane is unavailable, record that lane as a dropout; external Claude and Grok lanes still run, and no provider is silently substituted. There is no `poteto-agent` subagent type on Codex; route ad-hoc subagents by dispatching a `spawn_agent` told to read `poteto-mode` first. +- **Tool and built-in mapping.** Claude tool names and built-in skills resolve through [`codex-tools.md`](../plugins/pstack/skills/poteto-mode/references/codex-tools.md). Model execution resolves separately through [`provider-dispatch.md`](../plugins/pstack/skills/poteto-mode/references/provider-dispatch.md), so Codex models stay native while other providers run through the external runner. +- **Subagents.** The `Agent` tool maps to Codex `spawn_agent` / `wait_agent`, enabled by `multi_agent = true`. Parallel fan-out is multiple `spawn_agent` calls in one turn. If the native Codex lane is unavailable, record that lane as a dropout; the configured external lanes still run, and no provider is silently substituted. There is no `poteto-agent` subagent type on Codex; route ad-hoc subagents by dispatching a `spawn_agent` told to read `poteto-mode` first. - **Auto-fire.** The `hooks/` SessionStart injection is Claude Code-only; Codex has no plugin hook runtime. Enter `pstack:poteto-mode` by name, or add a standing instruction to `~/.codex/AGENTS.md` if you want the same always-on routing. -- **Models.** `/setup-pstack` writes provider-qualified descriptors and asks one requested effort per assigned family (`low`, `medium`, `high`, `xhigh`, `max`, and `ultra` where the model's CLI lists it, today only Sol). The first-run sheet is the model catalog's [role defaults](../plugins/pstack/skills/poteto-mode/references/model-catalog.md#role-defaults), with a panel of Opus, Sol, and Grok; Fable, Sonnet, Luna, Haiku 5.5 and an exact Opus pin stay selectable. Fable, Opus and Sonnet use Claude's rolling aliases; a registered exact pin keeps its own model. Runtime dispatch normalizes older versioned descriptors in memory, so an installed sheet stops pinning immediately. A setup rerun persists that migration while keeping each role's family and effort. In Codex, Codex families such as Sol use native `spawn_agent`; Claude and Grok use the deterministic external runner. In Claude Code, Claude families use native agents; Codex and Grok families use the runner. A Codex writer that the runner launches stays in Codex's `workspace-write` sandbox unless the sheet opts in with the line `codex writer sandbox: full-access`, which setup asks about once. Full access lets the writer launch a browser and write dot-folders such as `.agents/`, and removes every sandbox limit. Children never detect the parent or reroute themselves. The `bug-fix`, `perf-issue`, and `hillclimb` roles stay on Sol instead of upstream's Grok default. +- **Models.** `/setup-pstack` writes provider-qualified descriptors and asks one requested effort per assigned family (`low`, `medium`, `high`, `xhigh`, `max`, and `ultra` where the model's CLI lists it, today only Sol). The first-run sheet is the model catalog's [role defaults](../plugins/pstack/skills/poteto-mode/references/model-catalog.md#role-defaults), with a panel of Opus, Sol, and Grok; Fable, Sonnet, Luna, Haiku 5.5 and an exact Opus pin stay selectable. Fable, Opus and Sonnet use Claude's rolling aliases; a registered exact pin keeps its own model. Runtime dispatch normalizes older versioned descriptors in memory, so an installed sheet stops pinning immediately. A setup rerun persists that migration while keeping each role's family and effort. In Codex, Codex families such as Sol use native `spawn_agent`; every other provider uses the deterministic external runner. In Claude Code, Claude families use native agents; every other provider uses the runner. A Codex writer that the runner launches stays in Codex's `workspace-write` sandbox unless the sheet opts in with the line `codex writer sandbox: full-access`, which setup asks about once. Full access lets the writer launch a browser and write dot-folders such as `.agents/`, and removes every sandbox limit. Children never detect the parent or reroute themselves. The `bug-fix`, `perf-issue`, and `hillclimb` roles stay on Sol instead of upstream's Grok default. Verified in fresh installed Claude Code and Codex sessions: the user-facing skills are discovered and namespaced under `pstack`; both parents fan out the configured panel through the documented native/external route table, retain long-running handles without a default timeout, and cross-judge only after every candidate is terminal. The `principle-*` leaves remain available for `poteto-mode` to read by path. Claude honors their `user-invocable: false` metadata; Codex 0.149.0 does not ([#8](https://github.com/ericlitman/open-pstack/issues/8)). @@ -197,17 +197,17 @@ The port is editorial, not mechanical. Anywhere upstream pstack assumed Cursor-s | Cursor's built-in `/create-skill` | `plugin-dev:skill-development` skill | | `cursor-team-kit` `control-cli` (CLI/TUI driver) | Claude Code's `run` skill | | `cursor-team-kit` `control-ui` (browser/Electron driver) | Claude Code's `verify` skill | -| Transcripts at `~/.cursor/projects/*/` or `agent-transcripts/` | `~/.claude/projects//*.jsonl` (where `` is the workspace cwd with `/` → `-`) | +| Transcripts at `~/.cursor/projects/*/` or `agent-transcripts/` | `~/.claude/projects//*.jsonl` (where `` is the workspace path with each `/` and each `.` changed to `-`) | | Skill paths `.cursor/skills/`, `~/.cursor/plugins/` | `.claude/skills/`, `~/.claude/plugins/` | | MCP discovery via Cursor's `mcps/` directory | Tool list at top of system prompt (`mcp____` entries), or `.mcp.json`, or `claude mcp list` | | Cursor cloud agents (`environment: "cloud"`, `cloud_base_branch`) | Local background subagents (`run_in_background: true`), isolated by git worktree | | The Cursor agent store (path in the system prompt) | `~/.claude/orchestrate//`, which survives the session restarts a multi-day program expects | | Model rule `~/.cursor/rules/pstack-models.mdc` | Override sheet `~/.claude/pstack-models.md`, included from `CLAUDE.md` | -| Multi-model panels (arena, architect, interrogate) | Provider dispatch runs the upstream three-model panel of Opus, Sol, and Grok from the model catalog's [role defaults](../plugins/pstack/skills/poteto-mode/references/model-catalog.md#role-defaults). Same-provider lanes stay native; external lanes use the bundled runner. | +| Multi-model panels (arena, architect, interrogate) | Provider dispatch runs Open Pstack's default three-model panel of Opus, Sol, and Grok from the model catalog's [role defaults](../plugins/pstack/skills/poteto-mode/references/model-catalog.md#role-defaults). Same-provider lanes stay native; external lanes use the bundled runner. Lauren's pstack now defaults to Opus 5.5 and Grok. | ### Cross-vendor dispatch -The earlier port collapsed panels to Claude-only models. The bundled runner restores upstream's cross-provider judgment signal without adding a daemon or model-router service. Claude Code shells out to Codex and Grok; Codex shells out to Claude and Grok. The top-level parent chooses every route and each external process receives a complete task directly, so there is no supervising model invocation and no child-side harness detection. +The earlier port collapsed panels to Claude-only models. The bundled runner restores upstream's cross-provider judgment signal without adding a daemon or model-router service. Claude Code shells out to Codex, Grok and the read-only providers; Codex shells out to Claude, Grok and the read-only providers. The [route table](../plugins/pstack/skills/poteto-mode/references/model-catalog.md#routes) lists each provider. The top-level parent chooses every route and each external process receives a complete task directly, so there is no supervising model invocation and no child-side harness detection. ### What's deliberately kept From d585f45f7a7f3a391a776570e5a5eaca4120e96c Mon Sep 17 00:00:00 2001 From: Eric Litman Date: Thu, 22 Oct 2026 03:26:51 -0400 Subject: [PATCH 06/59] docs: correct six sentences from the 1.16.0 README refresh (#247) Co-Authored-By: Claude Opus 5.5 --- README.md | 12 ++++++------ docs/reference.md | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b5c9157c..962cf4dc 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Compared with Lauren's pstack, Open Pstack adds: - **A model and provider registry.** Models, efforts and providers live in one typed [registry](plugins/pstack/skills/poteto-mode/scripts/runner/registry/). The [model catalog](plugins/pstack/skills/poteto-mode/references/model-catalog.md) and the Claude-native agent files are generated from it, and the skills point at the catalog's role defaults instead of naming models. A new model is one registry entry. A new command-line provider is one adapter module and one line in the provider list. See the [design](docs/plans/2026-10-11-model-provider-registry.md). - **One skill tree for Claude Code and Codex.** Both apps read the same skills, and one [reference](plugins/pstack/skills/poteto-mode/references/codex-tools.md) maps how each app starts them. Lauren's pstack does not run in Codex. See [Claude Code and Codex](#claude-code-and-codex) below. -- **Models from other providers.** Claude Code and Codex hand work to other providers' models through each provider's own signed-in command-line tool, started by one [runner](plugins/pstack/skills/poteto-mode/references/provider-dispatch.md). The runner supports nine providers. Claude, Codex and Grok run lanes that read or write files. Devin, DeepSeek Harness, Antigravity, OpenCode, Amp and Cursor CLI run read-only lanes. The model catalog's [routes table](plugins/pstack/skills/poteto-mode/references/model-catalog.md#routes) lists how each one starts. Each run leaves a receipt with the exact model flags and, where the provider reports it, the model that answered. Every provider except Claude and Codex gets only an allowlisted environment. A Claude lane that writes files runs in Claude Code's Bash sandbox, with writes to the shared Git directory denied. A model that cannot run fails visibly; the runner never switches to a weaker model. +- **Models from other providers.** Claude Code and Codex hand work to other providers' models through each provider's own command-line tool, started by one [runner](plugins/pstack/skills/poteto-mode/references/provider-dispatch.md). The runner supports nine providers. Claude, Codex and Grok run lanes that read or write files. Devin, DeepSeek Harness, Antigravity, OpenCode, Amp and Cursor CLI run read-only lanes. The model catalog's [routes table](plugins/pstack/skills/poteto-mode/references/model-catalog.md#routes) lists how each one starts. Each run leaves a receipt with the exact model flags and, where the provider reports it, the model that answered. Every provider except Claude and Codex gets only an allowlisted environment. A Claude lane that writes files runs in Claude Code's Bash sandbox, with writes to the shared Git directory denied. A model that cannot run fails visibly; the runner never switches to a weaker model. - **A checked model sheet.** [`setup-pstack`](plugins/pstack/skills/setup-pstack/SKILL.md) records each role as `provider:model@effort`, asks for one effort per model family, and probes each chosen model before it saves anything. A rerun that changes nothing keeps the sheet without asking again. - **Three-model panels.** `arena`, `architect` and `interrogate` default to Opus, Sol and Grok. Lauren's pstack defaults to Opus 5.5 and Grok; Open Pstack keeps three ([UPSTREAM.md](UPSTREAM.md)). - **Changes tested where they run.** Before a change merges, the exact candidate is installed in each app it affects and the changed behavior is tested there. The pull request records the result ([AGENTS.md](AGENTS.md)). @@ -43,7 +43,7 @@ pstack does not ask you to trust an agent on day one. It helps the agent leave e ## Install -You need a current Claude Code or Codex installation. For the full three-model review, install and sign in to the Claude Code, Codex, and Grok command-line tools. [Bun](https://bun.sh) runs the small local tool that starts models outside the app you are using. You can still use the core workflows with fewer models. You need another provider's command-line tool only when your model sheet assigns that provider. +You need a current Claude Code or Codex installation. For the default three-model review, install and authenticate the Claude Code, Codex, and Grok command-line tools. [Bun](https://bun.sh) runs the small local tool that starts models outside the app you are using. You can still use the core workflows with fewer models. You need another provider's command-line tool only when your model sheet assigns that provider. ### Claude Code @@ -93,7 +93,7 @@ Use pstack:setup-pstack to configure pstack. Setup checks the role assignments, shows how each model will start, and probes each assigned model before saving. The default review panel uses Opus, Sol and Grok. The [model catalog](plugins/pstack/skills/poteto-mode/references/model-catalog.md) lists every other choice. -The first run asks before saving. A rerun also asks when you name a change, or when it finds an invalid sheet or a choice only you can make. A failed probe stops setup before it saves anything. A rerun that changes nothing prints what it kept and saves without asking. After its smoke test, setup offers to generate a verification skill and a formal verification skill when the project has none. +The first run asks before saving. A rerun also asks when you name a change, or when it finds an invalid sheet or a choice only you can make. A failed probe stops setup before it saves anything. A rerun that changes nothing prints what it kept and saves without asking. After its smoke test, setup offers to generate a verification skill when the project has no way to drive the real app for proof, and a formal verification skill when it has none. A rerun that changes nothing only mentions each offer. ### 2. Use poteto-mode @@ -151,10 +151,10 @@ Both apps read the same pstack skills. Only the way they start those skills and | --- | --- | --- | | Start poteto-mode | Claude loads a small startup instruction that can route non-trivial work into it. You can also run `/pstack:poteto-mode` yourself. | Ask for `pstack:poteto-mode` by name. Codex does not load the Claude startup instruction. | | Runs inside the app | Claude models stay inside Claude Code. | Codex models, such as Sol, stay inside Codex. | -| Other models | Codex, Grok and the read-only providers run through their signed-in command-line tools ([routes](plugins/pstack/skills/poteto-mode/references/model-catalog.md#routes)). | Claude, Grok and the read-only providers run through their signed-in command-line tools ([routes](plugins/pstack/skills/poteto-mode/references/model-catalog.md#routes)). | +| Other models | Codex, Grok and the read-only providers run through their command-line tools ([routes](plugins/pstack/skills/poteto-mode/references/model-catalog.md#routes)). | Claude, Grok and the read-only providers run through their command-line tools ([routes](plugins/pstack/skills/poteto-mode/references/model-catalog.md#routes)). | | Skills and workflows | Shared with Codex. | Shared with Claude Code. | -The other providers take part only through the runner. pstack itself runs inside Claude Code or Codex. +The other providers take part only through the runner. Open Pstack itself runs inside Claude Code or Codex. ## Learn from the original @@ -174,7 +174,7 @@ Open Pstack 1.16.0 tracks pstack 0.15.29 at Cursor commit [`88d47514b82e7c44f00f The two projects have separate version numbers. The pstack version identifies Lauren's upstream content. The Open Pstack version identifies the Claude Code and Codex package built from it. -In this repository, “upstream” means Lauren's original pstack. Open Pstack does not promise instant updates. It records the exact version it follows, reviews new changes in order, and lists each adaptation and each upstream change it leaves out in [UPSTREAM.md](UPSTREAM.md). New pstack behavior belongs in Lauren's project first whenever possible. +In this repository, “upstream” means Lauren's original pstack. Open Pstack does not promise instant updates. It records the exact version it follows and each upstream change it leaves out in [UPSTREAM.md](UPSTREAM.md), reviews new changes in order, and describes its adaptations in [CHANGES.md](CHANGES.md). New pstack behavior belongs in Lauren's project first whenever possible. ## Contributing diff --git a/docs/reference.md b/docs/reference.md index 8ac0362f..3cd85268 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -2,7 +2,7 @@ This page contains the full skill, dependency, runtime, and porting reference. For the plain-English introduction and quick start, see the [main README](../README.md). -[Poteto](https://x.com/poteto)'s [pstack](https://github.com/cursor/plugins/tree/main/pstack), adapted to run in Claude Code and Codex without Cursor. One shared skill tree serves both harnesses; Grok and six read-only providers run as lanes through the bundled runner. Version 1.16.0 is synced to Cursor pstack v0.15.29 at `88d47514b82e7c44f00f2b2a72ff6dd12158038c`. See [UPSTREAM.md](../UPSTREAM.md) for the exact sync contract. +[Poteto](https://x.com/poteto)'s [pstack](https://github.com/cursor/plugins/tree/main/pstack), adapted to run in Claude Code and Codex without Cursor. One shared skill tree serves both harnesses; lanes on other providers' models, including Grok and six read-only providers, run through the bundled runner. Version 1.16.0 is synced to Cursor pstack v0.15.29 at `88d47514b82e7c44f00f2b2a72ff6dd12158038c`. See [UPSTREAM.md](../UPSTREAM.md) for the exact sync contract. Original by Lauren Tan. This distribution builds on Michael Denyer's [pstack-claude](https://github.com/michael-denyer/pstack-claude) port and retains its history and MIT attribution. It imports seven MIT-licensed skills from [cursor-team-kit](https://github.com/cursor/plugins/tree/main/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`. From b5a5df0aee92b559dad593d3eb8d3ddb9f7a97dc Mon Sep 17 00:00:00 2001 From: Eric Litman Date: Fri, 6 Nov 2026 05:58:49 -0500 Subject: [PATCH 07/59] sync: import statechart and ketchup-video Statechart takes upstream's final compiler, launcher, Pele renderer instructions and test corpus (eb4db2b through 519d36a). Ketchup-video comes from 3c0fdb4. Both stay typed-only. poteto-help gets both rows, and create-formal-verification-skill tells the next agent to read and follow the typed-only statechart skill (00d5dec). Root test and typecheck now run statechart's suite. Statechart gets a lockfile, pinned typescript and @types/node, and fixes for three type errors and one macOS tmpdir symlink failure in upstream's code. Refs #262 Co-Authored-By: Claude Opus 5.5 --- .gitignore | 2 + package.json | 4 +- .../create-formal-verification-skill/SKILL.md | 2 + plugins/pstack/skills/ketchup-video/SKILL.md | 29 + plugins/pstack/skills/poteto-help/SKILL.md | 2 + plugins/pstack/skills/statechart/SKILL.md | 82 + .../skills/statechart/references/render.md | 93 ++ .../skills/statechart/scripts/backends/cfg.ts | 33 + .../statechart/scripts/backends/mermaid.ts | 201 +++ .../statechart/scripts/backends/plain-text.ts | 72 + .../statechart/scripts/backends/report.ts | 177 +++ .../pstack/skills/statechart/scripts/bun.lock | 65 + .../statechart/scripts/frontends/config.ts | 276 ++++ .../statechart/scripts/frontends/dot.ts | 74 + .../statechart/scripts/frontends/marks.ts | 93 ++ .../statechart/scripts/frontends/messages.ts | 52 + .../statechart/scripts/frontends/spec.ts | 114 ++ .../statechart/scripts/frontends/trace.ts | 24 + .../statechart/scripts/frontends/value.ts | 166 +++ .../statechart/scripts/frontends/verdict.ts | 40 + .../statechart/scripts/frontends/view.ts | 119 ++ .../pstack/skills/statechart/scripts/ir.ts | 547 +++++++ .../skills/statechart/scripts/package.json | 14 + .../statechart/scripts/passes/annotate.ts | 128 ++ .../skills/statechart/scripts/passes/label.ts | 269 ++++ .../skills/statechart/scripts/passes/lift.ts | 85 ++ .../statechart/scripts/passes/loop-check.ts | 68 + .../skills/statechart/scripts/passes/paths.ts | 60 + .../skills/statechart/scripts/passes/reach.ts | 135 ++ .../statechart/scripts/passes/region-check.ts | 97 ++ .../statechart/scripts/passes/regions.ts | 295 ++++ .../skills/statechart/scripts/pipeline.ts | 76 + .../pstack/skills/statechart/scripts/run.ts | 481 ++++++ .../skills/statechart/scripts/statechart | 29 + .../skills/statechart/scripts/statechart.ts | 164 ++ .../statechart/scripts/test/ConfigOracle.java | 63 + .../statechart/scripts/test/chart.test.ts | 1210 +++++++++++++++ .../statechart/scripts/test/charts/Braces.mmd | 7 + .../scripts/test/charts/Escapes.mmd | 11 + .../statechart/scripts/test/charts/Phases.mmd | 29 + .../statechart/scripts/test/cli.test.ts | 1316 +++++++++++++++++ .../scripts/test/config-fuzz.test.ts | 263 ++++ .../statechart/scripts/test/corpus.test.ts | 403 +++++ .../scripts/test/corpus/Counter/ChartRun.out | 57 + .../scripts/test/corpus/Counter/Counter.cfg | 3 + .../scripts/test/corpus/Counter/Counter.tla | 10 + .../scripts/test/corpus/Counter/chart.mmd | 9 + .../scripts/test/corpus/Counter/graph.dot | 16 + .../scripts/test/corpus/Counter/report.md | 7 + .../scripts/test/corpus/Counter/sany.out | 2 + .../scripts/test/corpus/Counter/verdict-1.out | 49 + .../test/corpus/CounterAction/ChartRun.out | 60 + .../corpus/CounterAction/CounterAction.cfg | 4 + .../corpus/CounterAction/CounterAction.tla | 22 + .../test/corpus/CounterAction/chart.mmd | 26 + .../test/corpus/CounterAction/graph.dot | 19 + .../test/corpus/CounterAction/report.md | 20 + .../test/corpus/CounterAction/sany.out | 2 + .../test/corpus/CounterAction/verdict-1.exit | 1 + .../test/corpus/CounterAction/verdict-1.out | 56 + .../test/corpus/CounterAction/verdict-2.exit | 1 + .../test/corpus/CounterAction/verdict-2.out | 82 + .../test/corpus/CounterAction/verdict-3.out | 57 + .../test/corpus/CounterDeadlock/ChartRun.out | 59 + .../CounterDeadlock/CounterDeadlock.cfg | 3 + .../CounterDeadlock/CounterDeadlock.tla | 11 + .../test/corpus/CounterDeadlock/chart.mmd | 22 + .../test/corpus/CounterDeadlock/graph.dot | 16 + .../test/corpus/CounterDeadlock/report.md | 17 + .../test/corpus/CounterDeadlock/sany.out | 2 + .../corpus/CounterDeadlock/verdict-1.exit | 1 + .../test/corpus/CounterDeadlock/verdict-1.out | 56 + .../corpus/CounterDeadlock/verdict-2.exit | 1 + .../test/corpus/CounterDeadlock/verdict-2.out | 77 + .../test/corpus/CounterFan/ChartRun.out | 69 + .../test/corpus/CounterFan/CounterFan.cfg | 2 + .../test/corpus/CounterFan/CounterFan.tla | 11 + .../scripts/test/corpus/CounterFan/chart.mmd | 85 ++ .../scripts/test/corpus/CounterFan/graph.dot | 70 + .../scripts/test/corpus/CounterFan/report.md | 12 + .../scripts/test/corpus/CounterFan/sany.out | 2 + .../test/corpus/CounterFan/verdict-1.exit | 1 + .../test/corpus/CounterFan/verdict-1.out | 67 + .../test/corpus/CounterFan/verdict-2.out | 57 + .../test/corpus/CounterGuard/ChartRun.exit | 1 + .../test/corpus/CounterGuard/ChartRun.out | 85 ++ .../test/corpus/CounterGuard/CounterGuard.cfg | 6 + .../test/corpus/CounterGuard/CounterGuard.tla | 13 + .../test/corpus/CounterGuard/chart.mmd | 5 + .../test/corpus/CounterGuard/graph.dot | 10 + .../test/corpus/CounterGuard/report.md | 31 + .../scripts/test/corpus/CounterGuard/sany.out | 2 + .../test/corpus/CounterGuard/verdict-1.exit | 1 + .../test/corpus/CounterGuard/verdict-1.out | 64 + .../test/corpus/CounterGuard/verdict-2.exit | 1 + .../test/corpus/CounterGuard/verdict-2.out | 77 + .../test/corpus/CounterInitPast/ChartRun.out | 55 + .../CounterInitPast/CounterInitPast.cfg | 3 + .../CounterInitPast/CounterInitPast.tla | 10 + .../test/corpus/CounterInitPast/chart.mmd | 12 + .../test/corpus/CounterInitPast/graph.dot | 6 + .../test/corpus/CounterInitPast/report.md | 12 + .../test/corpus/CounterInitPast/sany.out | 2 + .../corpus/CounterInitPast/verdict-1.exit | 1 + .../test/corpus/CounterInitPast/verdict-1.out | 33 + .../test/corpus/CounterInitPast/verdict-2.out | 54 + .../corpus/CounterInitPastHolds/ChartRun.out | 54 + .../CounterInitPastHolds.cfg | 3 + .../CounterInitPastHolds.tla | 10 + .../corpus/CounterInitPastHolds/chart.mmd | 1 + .../corpus/CounterInitPastHolds/graph.dot | 6 + .../corpus/CounterInitPastHolds/report.md | 7 + .../test/corpus/CounterInitPastHolds/sany.out | 2 + .../corpus/CounterInitPastHolds/verdict-1.out | 46 + .../test/corpus/CounterInstance/ChartRun.out | 59 + .../CounterInstance/CounterInstance.cfg | 2 + .../CounterInstance/CounterInstance.tla | 10 + .../corpus/CounterInstance/CounterSteps.tla | 6 + .../test/corpus/CounterInstance/chart.mmd | 17 + .../test/corpus/CounterInstance/graph.dot | 15 + .../test/corpus/CounterInstance/report.md | 14 + .../test/corpus/CounterInstance/sany.out | 3 + .../corpus/CounterInstance/verdict-1.exit | 1 + .../test/corpus/CounterInstance/verdict-1.out | 78 + .../test/corpus/CounterJump/ChartRun.out | 59 + .../test/corpus/CounterJump/CounterJump.cfg | 3 + .../test/corpus/CounterJump/CounterJump.tla | 19 + .../scripts/test/corpus/CounterJump/chart.mmd | 26 + .../scripts/test/corpus/CounterJump/graph.dot | 22 + .../scripts/test/corpus/CounterJump/report.md | 12 + .../scripts/test/corpus/CounterJump/sany.out | 2 + .../test/corpus/CounterJump/verdict-1.exit | 1 + .../test/corpus/CounterJump/verdict-1.out | 58 + .../test/corpus/CounterJump/verdict-2.out | 57 + .../test/corpus/CounterLoop/ChartRun.out | 57 + .../test/corpus/CounterLoop/CounterLoop.cfg | 2 + .../test/corpus/CounterLoop/CounterLoop.tla | 11 + .../scripts/test/corpus/CounterLoop/chart.mmd | 17 + .../scripts/test/corpus/CounterLoop/graph.dot | 15 + .../scripts/test/corpus/CounterLoop/report.md | 14 + .../scripts/test/corpus/CounterLoop/sany.out | 2 + .../test/corpus/CounterLoop/verdict-1.exit | 1 + .../test/corpus/CounterLoop/verdict-1.out | 76 + .../test/corpus/CounterOrder/ChartRun.out | 59 + .../test/corpus/CounterOrder/CounterOrder.cfg | 3 + .../test/corpus/CounterOrder/CounterOrder.tla | 11 + .../test/corpus/CounterOrder/chart.mmd | 19 + .../test/corpus/CounterOrder/graph.dot | 10 + .../test/corpus/CounterOrder/report.md | 15 + .../scripts/test/corpus/CounterOrder/sany.out | 2 + .../test/corpus/CounterOrder/verdict-1.exit | 1 + .../test/corpus/CounterOrder/verdict-1.out | 56 + .../test/corpus/CounterOrder/verdict-2.exit | 1 + .../test/corpus/CounterOrder/verdict-2.out | 67 + .../test/corpus/CounterRules/ChartRun.out | 62 + .../test/corpus/CounterRules/CounterRules.cfg | 6 + .../test/corpus/CounterRules/CounterRules.tla | 24 + .../test/corpus/CounterRules/Moves.tla | 5 + .../test/corpus/CounterRules/chart.mmd | 22 + .../test/corpus/CounterRules/graph.dot | 10 + .../test/corpus/CounterRules/report.md | 23 + .../scripts/test/corpus/CounterRules/sany.out | 3 + .../test/corpus/CounterRules/verdict-1.exit | 1 + .../test/corpus/CounterRules/verdict-1.out | 58 + .../test/corpus/CounterRules/verdict-2.exit | 1 + .../test/corpus/CounterRules/verdict-2.out | 66 + .../test/corpus/CounterRules/verdict-3.exit | 1 + .../test/corpus/CounterRules/verdict-3.out | 74 + .../test/corpus/CounterRules/verdict-4.out | 59 + .../test/corpus/CounterStart/ChartRun.out | 58 + .../test/corpus/CounterStart/CounterStart.cfg | 3 + .../test/corpus/CounterStart/CounterStart.tla | 15 + .../test/corpus/CounterStart/chart.mmd | 18 + .../test/corpus/CounterStart/graph.dot | 13 + .../test/corpus/CounterStart/report.md | 11 + .../scripts/test/corpus/CounterStart/sany.out | 2 + .../test/corpus/CounterStart/verdict-1.exit | 1 + .../test/corpus/CounterStart/verdict-1.out | 33 + .../test/corpus/CounterStart/verdict-2.out | 57 + .../test/corpus/CounterStop/ChartRun.out | 57 + .../test/corpus/CounterStop/CounterStop.cfg | 3 + .../test/corpus/CounterStop/CounterStop.tla | 15 + .../scripts/test/corpus/CounterStop/chart.mmd | 7 + .../scripts/test/corpus/CounterStop/graph.dot | 13 + .../scripts/test/corpus/CounterStop/report.md | 6 + .../scripts/test/corpus/CounterStop/sany.out | 2 + .../test/corpus/CounterStop/verdict-1.out | 49 + .../test/corpus/CounterTie/ChartRun.out | 61 + .../test/corpus/CounterTie/CounterTie.cfg | 4 + .../test/corpus/CounterTie/CounterTie.tla | 14 + .../scripts/test/corpus/CounterTie/chart.mmd | 30 + .../scripts/test/corpus/CounterTie/graph.dot | 19 + .../scripts/test/corpus/CounterTie/report.md | 27 + .../scripts/test/corpus/CounterTie/sany.out | 2 + .../test/corpus/CounterTie/verdict-1.exit | 1 + .../test/corpus/CounterTie/verdict-1.out | 56 + .../test/corpus/CounterTie/verdict-2.exit | 1 + .../test/corpus/CounterTie/verdict-2.out | 64 + .../test/corpus/CounterTie/verdict-3.exit | 1 + .../test/corpus/CounterTie/verdict-3.out | 87 ++ .../test/corpus/CounterTie/verdict-4.out | 57 + .../corpus/CounterTieInGraph/ChartRun.out | 60 + .../CounterTieInGraph/CounterTieInGraph.cfg | 3 + .../CounterTieInGraph/CounterTieInGraph.tla | 12 + .../test/corpus/CounterTieInGraph/chart.mmd | 23 + .../test/corpus/CounterTieInGraph/graph.dot | 19 + .../test/corpus/CounterTieInGraph/report.md | 11 + .../test/corpus/CounterTieInGraph/sany.out | 2 + .../corpus/CounterTieInGraph/verdict-1.exit | 1 + .../corpus/CounterTieInGraph/verdict-1.out | 56 + .../corpus/CounterTieInGraph/verdict-2.out | 57 + .../test/corpus/CounterView/ChartRun.out | 61 + .../test/corpus/CounterView/CounterView.cfg | 4 + .../test/corpus/CounterView/CounterView.tla | 14 + .../scripts/test/corpus/CounterView/chart.mmd | 23 + .../scripts/test/corpus/CounterView/graph.dot | 19 + .../scripts/test/corpus/CounterView/report.md | 27 + .../scripts/test/corpus/CounterView/sany.out | 2 + .../test/corpus/CounterView/verdict-1.exit | 1 + .../test/corpus/CounterView/verdict-1.out | 56 + .../test/corpus/CounterView/verdict-2.exit | 1 + .../test/corpus/CounterView/verdict-2.out | 64 + .../test/corpus/CounterView/verdict-3.exit | 1 + .../test/corpus/CounterView/verdict-3.out | 87 ++ .../test/corpus/CounterView/verdict-4.out | 57 + .../scripts/test/corpus/CounterView/view.mjs | 1 + .../scripts/test/corpus/DieHard/ChartRun.out | 59 + .../scripts/test/corpus/DieHard/DieHard.cfg | 4 + .../scripts/test/corpus/DieHard/DieHard.tla | 38 + .../scripts/test/corpus/DieHard/chart.mmd | 92 ++ .../scripts/test/corpus/DieHard/graph.dot | 126 ++ .../scripts/test/corpus/DieHard/report.md | 17 + .../scripts/test/corpus/DieHard/sany.out | 2 + .../test/corpus/DieHard/verdict-1.exit | 1 + .../scripts/test/corpus/DieHard/verdict-1.out | 91 ++ .../scripts/test/corpus/DieHard/verdict-2.out | 57 + .../test/corpus/FirstRule/ChartRun.out | 61 + .../test/corpus/FirstRule/FirstRule.cfg | 6 + .../test/corpus/FirstRule/FirstRule.tla | 11 + .../scripts/test/corpus/FirstRule/chart.mmd | 22 + .../scripts/test/corpus/FirstRule/graph.dot | 16 + .../scripts/test/corpus/FirstRule/report.md | 25 + .../scripts/test/corpus/FirstRule/sany.out | 2 + .../test/corpus/FirstRule/verdict-1.exit | 1 + .../test/corpus/FirstRule/verdict-1.out | 56 + .../test/corpus/FirstRule/verdict-2.exit | 1 + .../test/corpus/FirstRule/verdict-2.out | 64 + .../test/corpus/FirstRule/verdict-3.exit | 1 + .../test/corpus/FirstRule/verdict-3.out | 64 + .../test/corpus/FirstRule/verdict-4.exit | 1 + .../test/corpus/FirstRule/verdict-4.out | 77 + .../test/corpus/HiddenClock/ChartRun.out | 57 + .../test/corpus/HiddenClock/HiddenClock.cfg | 4 + .../test/corpus/HiddenClock/HiddenClock.tla | 11 + .../scripts/test/corpus/HiddenClock/chart.mmd | 13 + .../scripts/test/corpus/HiddenClock/graph.dot | 12 + .../scripts/test/corpus/HiddenClock/report.md | 11 + .../scripts/test/corpus/HiddenClock/sany.out | 2 + .../test/corpus/HiddenClock/verdict-1.exit | 1 + .../test/corpus/HiddenClock/verdict-1.out | 72 + .../scripts/test/corpus/Login/ChartRun.out | 57 + .../scripts/test/corpus/Login/Login.cfg | 3 + .../scripts/test/corpus/Login/Login.tla | 62 + .../scripts/test/corpus/Login/chart.mmd | 27 + .../scripts/test/corpus/Login/graph.dot | 40 + .../scripts/test/corpus/Login/report.md | 7 + .../scripts/test/corpus/Login/sany.out | 1 + .../scripts/test/corpus/Login/verdict-1.out | 47 + .../scripts/test/corpus/Login/view.mjs | 1 + .../test/corpus/LoginGuarded/ChartRun.out | 57 + .../test/corpus/LoginGuarded/LoginGuarded.cfg | 2 + .../test/corpus/LoginGuarded/LoginGuarded.tla | 64 + .../test/corpus/LoginGuarded/chart.mmd | 28 + .../test/corpus/LoginGuarded/graph.dot | 37 + .../test/corpus/LoginGuarded/report.md | 8 + .../scripts/test/corpus/LoginGuarded/sany.out | 1 + .../test/corpus/LoginGuarded/verdict-1.out | 47 + .../scripts/test/corpus/LoginGuarded/view.mjs | 1 + .../test/corpus/LoginParallel/ChartRun.out | 60 + .../corpus/LoginParallel/LoginParallel.cfg | 3 + .../corpus/LoginParallel/LoginParallel.tla | 64 + .../test/corpus/LoginParallel/chart.mmd | 44 + .../test/corpus/LoginParallel/graph.dot | 58 + .../test/corpus/LoginParallel/report.md | 17 + .../test/corpus/LoginParallel/sany.out | 1 + .../test/corpus/LoginParallel/verdict-1.exit | 1 + .../test/corpus/LoginParallel/verdict-1.out | 83 ++ .../test/corpus/LoginParallel/verdict-2.out | 57 + .../test/corpus/LoginParallel/view.mjs | 1 + .../test/corpus/MediaPlayer/ChartRun.out | 60 + .../test/corpus/MediaPlayer/MediaPlayer.cfg | 3 + .../test/corpus/MediaPlayer/MediaPlayer.tla | 103 ++ .../scripts/test/corpus/MediaPlayer/chart.mmd | 43 + .../scripts/test/corpus/MediaPlayer/graph.dot | 93 ++ .../scripts/test/corpus/MediaPlayer/report.md | 14 + .../scripts/test/corpus/MediaPlayer/sany.out | 1 + .../test/corpus/MediaPlayer/verdict-1.exit | 1 + .../test/corpus/MediaPlayer/verdict-1.out | 59 + .../test/corpus/MediaPlayer/verdict-2.out | 72 + .../scripts/test/corpus/MediaPlayer/view.mjs | 3 + .../test/corpus/MediaPlayerFixed/ChartRun.out | 57 + .../MediaPlayerFixed/MediaPlayerFixed.cfg | 2 + .../MediaPlayerFixed/MediaPlayerFixed.tla | 100 ++ .../test/corpus/MediaPlayerFixed/chart.mmd | 31 + .../test/corpus/MediaPlayerFixed/graph.dot | 85 ++ .../test/corpus/MediaPlayerFixed/report.md | 9 + .../test/corpus/MediaPlayerFixed/sany.out | 1 + .../corpus/MediaPlayerFixed/verdict-1.out | 47 + .../test/corpus/MediaPlayerFixed/view.mjs | 3 + .../test/corpus/MediaPlayerProps/ChartRun.out | 59 + .../corpus/MediaPlayerProps/MediaPlayer.tla | 103 ++ .../MediaPlayerProps/MediaPlayerProps.cfg | 3 + .../MediaPlayerProps/MediaPlayerProps.tla | 6 + .../test/corpus/MediaPlayerProps/chart.mmd | 42 + .../test/corpus/MediaPlayerProps/graph.dot | 93 ++ .../test/corpus/MediaPlayerProps/report.md | 19 + .../test/corpus/MediaPlayerProps/sany.out | 2 + .../corpus/MediaPlayerProps/verdict-1.exit | 1 + .../corpus/MediaPlayerProps/verdict-1.out | 61 + .../corpus/MediaPlayerProps/verdict-2.out | 59 + .../corpus/MediaPlayerProps/verdict-3.out | 61 + .../corpus/MediaPlayerProps/verdict-4.exit | 1 + .../corpus/MediaPlayerProps/verdict-4.out | 66 + .../corpus/MediaPlayerProps/verdict-5.exit | 1 + .../corpus/MediaPlayerProps/verdict-5.out | 58 + .../corpus/MediaPlayerProps/verdict-6.out | 49 + .../test/corpus/MediaPlayerProps/view.mjs | 3 + .../test/corpus/PickWorker/ChartRun.out | 57 + .../test/corpus/PickWorker/PickWorker.cfg | 6 + .../test/corpus/PickWorker/PickWorker.tla | 11 + .../scripts/test/corpus/PickWorker/chart.mmd | 5 + .../scripts/test/corpus/PickWorker/graph.dot | 11 + .../scripts/test/corpus/PickWorker/report.md | 7 + .../scripts/test/corpus/PickWorker/sany.out | 5 + .../test/corpus/PickWorker/verdict-1.out | 70 + .../scripts/test/corpus/Shadow/ChartRun.out | 61 + .../scripts/test/corpus/Shadow/Shadow.cfg | 4 + .../scripts/test/corpus/Shadow/Shadow.tla | 11 + .../scripts/test/corpus/Shadow/ShadowLib.tla | 6 + .../scripts/test/corpus/Shadow/ShadowSub.tla | 3 + .../scripts/test/corpus/Shadow/chart.mmd | 9 + .../scripts/test/corpus/Shadow/graph.dot | 16 + .../scripts/test/corpus/Shadow/report.md | 8 + .../scripts/test/corpus/Shadow/sany.out | 4 + .../scripts/test/corpus/Shadow/verdict-1.out | 65 + .../test/corpus/SpacedNames/ChartRun.out | 59 + .../test/corpus/SpacedNames/SpacedNames.cfg | 2 + .../test/corpus/SpacedNames/SpacedNames.tla | 9 + .../scripts/test/corpus/SpacedNames/chart.mmd | 23 + .../scripts/test/corpus/SpacedNames/graph.dot | 17 + .../scripts/test/corpus/SpacedNames/report.md | 15 + .../scripts/test/corpus/SpacedNames/sany.out | 1 + .../test/corpus/SpacedNames/verdict-1.exit | 1 + .../test/corpus/SpacedNames/verdict-1.out | 65 + .../test/corpus/SpacedNames/verdict-2.exit | 1 + .../test/corpus/SpacedNames/verdict-2.out | 75 + .../scripts/test/corpus/TwoPhase/ChartRun.out | 69 + .../scripts/test/corpus/TwoPhase/TwoPhase.cfg | 3 + .../scripts/test/corpus/TwoPhase/TwoPhase.tla | 75 + .../scripts/test/corpus/TwoPhase/chart.mmd | 60 + .../scripts/test/corpus/TwoPhase/graph.dot | 297 ++++ .../scripts/test/corpus/TwoPhase/report.md | 20 + .../scripts/test/corpus/TwoPhase/sany.out | 1 + .../test/corpus/TwoPhase/verdict-1.exit | 1 + .../test/corpus/TwoPhase/verdict-1.out | 95 ++ .../test/corpus/TwoPhase/verdict-2.out | 57 + .../scripts/test/corpus/TwoPhase/view.mjs | 1 + .../test/corpus/TwoPhaseFixed/ChartRun.out | 57 + .../corpus/TwoPhaseFixed/TwoPhaseFixed.cfg | 3 + .../corpus/TwoPhaseFixed/TwoPhaseFixed.tla | 75 + .../test/corpus/TwoPhaseFixed/chart.mmd | 37 + .../test/corpus/TwoPhaseFixed/graph.dot | 223 +++ .../test/corpus/TwoPhaseFixed/report.md | 11 + .../test/corpus/TwoPhaseFixed/sany.out | 1 + .../test/corpus/TwoPhaseFixed/verdict-1.out | 47 + .../test/corpus/TwoPhaseFixed/view.mjs | 1 + .../test/corpus/TypeGuard/ChartRun.exit | 1 + .../test/corpus/TypeGuard/ChartRun.out | 75 + .../test/corpus/TypeGuard/TypeGuard.cfg | 5 + .../test/corpus/TypeGuard/TypeGuard.tla | 11 + .../scripts/test/corpus/TypeGuard/chart.mmd | 18 + .../scripts/test/corpus/TypeGuard/graph.dot | 14 + .../scripts/test/corpus/TypeGuard/report.md | 29 + .../scripts/test/corpus/TypeGuard/sany.out | 2 + .../test/corpus/TypeGuard/verdict-1.exit | 1 + .../test/corpus/TypeGuard/verdict-1.out | 64 + .../test/corpus/TypeGuard/verdict-2.exit | 1 + .../test/corpus/TypeGuard/verdict-2.out | 75 + .../test/corpus/UserNoDeadlock/ChartRun.out | 58 + .../corpus/UserNoDeadlock/UserNoDeadlock.cfg | 2 + .../corpus/UserNoDeadlock/UserNoDeadlock.tla | 8 + .../test/corpus/UserNoDeadlock/chart.mmd | 22 + .../test/corpus/UserNoDeadlock/graph.dot | 16 + .../test/corpus/UserNoDeadlock/report.md | 15 + .../test/corpus/UserNoDeadlock/sany.out | 2 + .../test/corpus/UserNoDeadlock/verdict-1.exit | 1 + .../test/corpus/UserNoDeadlock/verdict-1.out | 56 + .../test/corpus/UserNoDeadlock/verdict-2.exit | 1 + .../test/corpus/UserNoDeadlock/verdict-2.out | 77 + .../scripts/test/differential.test.ts | 565 +++++++ .../statechart/scripts/test/grid/Grid.cfg | 2 + .../statechart/scripts/test/grid/Grid.tla | 9 + .../statechart/scripts/test/grid/sany.out | 2 + .../skills/statechart/scripts/test/java.ts | 63 + .../skills/statechart/scripts/test/labels.ts | 643 ++++++++ .../statechart/scripts/test/messages.test.ts | 212 +++ .../statechart/scripts/test/pipeline.test.ts | 270 ++++ .../statechart/scripts/test/plain-tlc.test.ts | 255 ++++ .../statechart/scripts/test/render.test.ts | 81 + .../statechart/scripts/test/tlc-out.test.ts | 90 ++ .../skills/statechart/scripts/test/tlc.ts | 158 ++ .../skills/statechart/scripts/tsconfig.json | 11 + .../skills/statechart/scripts/worker.ts | 35 + 413 files changed, 20134 insertions(+), 2 deletions(-) create mode 100644 plugins/pstack/skills/ketchup-video/SKILL.md create mode 100644 plugins/pstack/skills/statechart/SKILL.md create mode 100644 plugins/pstack/skills/statechart/references/render.md create mode 100644 plugins/pstack/skills/statechart/scripts/backends/cfg.ts create mode 100644 plugins/pstack/skills/statechart/scripts/backends/mermaid.ts create mode 100644 plugins/pstack/skills/statechart/scripts/backends/plain-text.ts create mode 100644 plugins/pstack/skills/statechart/scripts/backends/report.ts create mode 100644 plugins/pstack/skills/statechart/scripts/bun.lock create mode 100644 plugins/pstack/skills/statechart/scripts/frontends/config.ts create mode 100644 plugins/pstack/skills/statechart/scripts/frontends/dot.ts create mode 100644 plugins/pstack/skills/statechart/scripts/frontends/marks.ts create mode 100644 plugins/pstack/skills/statechart/scripts/frontends/messages.ts create mode 100644 plugins/pstack/skills/statechart/scripts/frontends/spec.ts create mode 100644 plugins/pstack/skills/statechart/scripts/frontends/trace.ts create mode 100644 plugins/pstack/skills/statechart/scripts/frontends/value.ts create mode 100644 plugins/pstack/skills/statechart/scripts/frontends/verdict.ts create mode 100644 plugins/pstack/skills/statechart/scripts/frontends/view.ts create mode 100644 plugins/pstack/skills/statechart/scripts/ir.ts create mode 100644 plugins/pstack/skills/statechart/scripts/package.json create mode 100644 plugins/pstack/skills/statechart/scripts/passes/annotate.ts create mode 100644 plugins/pstack/skills/statechart/scripts/passes/label.ts create mode 100644 plugins/pstack/skills/statechart/scripts/passes/lift.ts create mode 100644 plugins/pstack/skills/statechart/scripts/passes/loop-check.ts create mode 100644 plugins/pstack/skills/statechart/scripts/passes/paths.ts create mode 100644 plugins/pstack/skills/statechart/scripts/passes/reach.ts create mode 100644 plugins/pstack/skills/statechart/scripts/passes/region-check.ts create mode 100644 plugins/pstack/skills/statechart/scripts/passes/regions.ts create mode 100644 plugins/pstack/skills/statechart/scripts/pipeline.ts create mode 100644 plugins/pstack/skills/statechart/scripts/run.ts create mode 100755 plugins/pstack/skills/statechart/scripts/statechart create mode 100644 plugins/pstack/skills/statechart/scripts/statechart.ts create mode 100644 plugins/pstack/skills/statechart/scripts/test/ConfigOracle.java create mode 100644 plugins/pstack/skills/statechart/scripts/test/chart.test.ts create mode 100644 plugins/pstack/skills/statechart/scripts/test/charts/Braces.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/charts/Escapes.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/charts/Phases.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/cli.test.ts create mode 100644 plugins/pstack/skills/statechart/scripts/test/config-fuzz.test.ts create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus.test.ts create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Counter/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Counter/Counter.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Counter/Counter.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Counter/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Counter/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Counter/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Counter/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Counter/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-3.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterSteps.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/Moves.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-4.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-4.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/CounterView.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/CounterView.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-2.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-3.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-3.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-4.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/view.mjs create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/DieHard.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/DieHard.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Login/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Login/Login.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Login/Login.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Login/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Login/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Login/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Login/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Login/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Login/view.mjs create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/view.mjs create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/view.mjs create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/view.mjs create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/view.mjs create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayer.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-3.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-6.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/view.mjs create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/Shadow.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/Shadow.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/ShadowLib.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/ShadowSub.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/view.mjs create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/view.mjs create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/ChartRun.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/chart.mmd create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/graph.dot create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/report.md create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/sany.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.exit create mode 100644 plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.out create mode 100644 plugins/pstack/skills/statechart/scripts/test/differential.test.ts create mode 100644 plugins/pstack/skills/statechart/scripts/test/grid/Grid.cfg create mode 100644 plugins/pstack/skills/statechart/scripts/test/grid/Grid.tla create mode 100644 plugins/pstack/skills/statechart/scripts/test/grid/sany.out create mode 100755 plugins/pstack/skills/statechart/scripts/test/java.ts create mode 100644 plugins/pstack/skills/statechart/scripts/test/labels.ts create mode 100644 plugins/pstack/skills/statechart/scripts/test/messages.test.ts create mode 100644 plugins/pstack/skills/statechart/scripts/test/pipeline.test.ts create mode 100644 plugins/pstack/skills/statechart/scripts/test/plain-tlc.test.ts create mode 100644 plugins/pstack/skills/statechart/scripts/test/render.test.ts create mode 100644 plugins/pstack/skills/statechart/scripts/test/tlc-out.test.ts create mode 100644 plugins/pstack/skills/statechart/scripts/test/tlc.ts create mode 100644 plugins/pstack/skills/statechart/scripts/tsconfig.json create mode 100644 plugins/pstack/skills/statechart/scripts/worker.ts diff --git a/.gitignore b/.gitignore index b91c35f6..28c9a0b6 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ plugins/pstack/skills/poteto-mode/scripts/node_modules/ .claude/skills/verify-open-pstack/node_modules/ + +plugins/pstack/skills/statechart/scripts/node_modules/ diff --git a/package.json b/package.json index 4560426a..89600043 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "private": true, "packageManager": "bun@1.4.0", "scripts": { - "test": "cd plugins/pstack/skills/poteto-mode/scripts && bun install --frozen-lockfile && bun run test", - "typecheck": "cd plugins/pstack/skills/poteto-mode/scripts && bun install --frozen-lockfile && bun run typecheck", + "test": "cd plugins/pstack/skills/poteto-mode/scripts && bun install --frozen-lockfile && bun run test && cd ../../statechart/scripts && bun install --frozen-lockfile && bun run test", + "typecheck": "cd plugins/pstack/skills/poteto-mode/scripts && bun install --frozen-lockfile && bun run typecheck && cd ../../statechart/scripts && bun install --frozen-lockfile && bun run typecheck", "static": "bun -e 'for (const path of process.argv.slice(1)) JSON.parse(await Bun.file(path).text())' .claude-plugin/marketplace.json .agents/plugins/marketplace.json plugins/pstack/.claude-plugin/plugin.json plugins/pstack/.codex-plugin/plugin.json && PSTACK_STATIC_ONLY=1 bash tests/skill-collision-repro.sh" } } diff --git a/plugins/pstack/skills/create-formal-verification-skill/SKILL.md b/plugins/pstack/skills/create-formal-verification-skill/SKILL.md index a950e12d..4b6c93e1 100644 --- a/plugins/pstack/skills/create-formal-verification-skill/SKILL.md +++ b/plugins/pstack/skills/create-formal-verification-skill/SKILL.md @@ -31,6 +31,8 @@ Pick the tool that answers the question at the lowest cost: a model checker, a p Write a project-local skill with frontmatter that names the area and says when to use it. Without frontmatter, the skill never registers. From the skill alone, the next agent must be able to tell whether a change touches the verified code, run the check, tell a real bug from a modeling error, and update the verification when a change is intended. Put the coverage record and the sync commit in the skill, and tell the next agent to move the sync commit forward only after it confirms that the verification describes the code at the new commit. Use this repo's real commands, paths, and nouns, and leave no placeholders. +If the check is a TLA+ model, tell the next agent to read every result with the pstack [`statechart`](../statechart/SKILL.md) skill: read its `SKILL.md` and follow it, because it runs only when typed. It shows each invariant violation the checker finds as its shortest path in plain words. When the check passes, `statechart` draws a chart of how the system moves between states. Refer to `statechart` by name. Its commands, options, and file paths change between releases and machines, so copy none of them into the generated skill or its scripts. + ## Prove it before you hand off Follow the generated skill once, as the next agent would, on a scratch change that breaks the property in the real code. It must catch the break. Then drop the scratch change and confirm that the check is back where it started: passing, or failing only on the findings you will report. A verify skill that was never run is a draft. If the skill misses the break or a step does not run, fix the skill or the verification, not the scratch change. diff --git a/plugins/pstack/skills/ketchup-video/SKILL.md b/plugins/pstack/skills/ketchup-video/SKILL.md new file mode 100644 index 00000000..c0c61428 --- /dev/null +++ b/plugins/pstack/skills/ketchup-video/SKILL.md @@ -0,0 +1,29 @@ +--- +name: ketchup-video +description: "Catch the user up like /ketchup, with a short subtitled video of slides for what happened and the waiting calls as text under it. Use for /ketchup-video." +disable-model-invocation: true +--- + +# Ketchup video + +Follow [`/ketchup`](../ketchup/SKILL.md), but show what happened in a short subtitled video instead of its summary and visuals. Its window starts at the last message the user wrote before `/ketchup-video`, not before any earlier `/ketchup`. Writing and rendering the video, outside the repo, is the one exception to its read-only rule. The reply is ketchup's opening sentence, the embedded video, one line naming any work left that you can do yourself, and the action items. When the video shows a call's options, call each option by the name the video gives it. If the render fails, say so in one line and give only the calls. + +## Slides + +Use the screenshots, recordings, diffs, and data the work produced, not the chat's prose about them. Before you draw, write the one sentence the user should leave with and one line per slide. Drop each slide that does not change what the user knows. Use at most 10 slides, and fewer is better. Neither note goes in the reply. + +Each slide makes one point. Build the slides on one picture and change it from slide to slide, rather than cut to an unrelated one. A color or shape means the same thing on every slide. Show the work in pictures, such as how a system works, a PR stack with each PR's state, a before and after of a fix, or options side by side. Point at what changed with arrows, highlights, and motion. A slide is never a bullet list, a status list, a table, or boxes with nothing connecting them. + +Keep text to the minimum. Put each label on the thing it names, in plain words a person would say, not tags like "Tests: pass". Never caption what a picture shows, and never give a fact twice, across slides or in the text under them. + +Show what came of each thing the user asked for, and whether it is done, still running, failed, or not checked. Never show something done that still waits on the user. Show any bug found and fixed on the way. If a visible change has no screenshot, say so on its slide and name what changed on screen. Draw only from facts you have. Never invent a number, and never draw a screen you did not capture. + +## Subtitles + +Give each slide one short subtitle line, about ten words, that says its point the way you would tell the user, from only what that slide shows. Say what the picture means rather than read out its labels. Put the subtitle in a strip below the slide, the same height on every slide and empty except for the subtitle, so it never covers the slide. Set it small, but readable when the video plays at chat size. + +## Render + +Render one silent landscape video, such as an mp4, with motion between slides. Every frame is the slide itself, edge to edge, above its subtitle strip. Make the frames from the slides, never by recording a screen, and burn each subtitle into its slide's frames so it stays on screen for the slide's whole hold. The hold is the time a slide is fully on screen, not counting the motion into or out of it. Hold each slide long enough to read the words it adds, at least one second for each three words. A slide adds its subtitle and each word that was not on the slide before it, including a label it changes. The first slide adds all its words. Words inside a screenshot do not count. + +Before you embed the video, check the rendered file. Look at one frame from each slide at chat size, and check that its subtitle is readable and covers nothing. Measure each hold by matching the file's frames to the slide, not with a still-frame detector, which counts the faint ends of a fade as still. Count the words each slide adds against its measured hold. Fix any slide you cannot read in that time, render again, and check again. diff --git a/plugins/pstack/skills/poteto-help/SKILL.md b/plugins/pstack/skills/poteto-help/SKILL.md index 63610b96..defaeca0 100644 --- a/plugins/pstack/skills/poteto-help/SKILL.md +++ b/plugins/pstack/skills/poteto-help/SKILL.md @@ -71,6 +71,7 @@ The default answer is `/poteto-mode`, which runs most of the others when its ste | Understand a change or subsystem, explained plainly | [`/teach`](../teach/SKILL.md) | | Catch up on their own recent work on a topic | [`/recall`](../recall/SKILL.md) | | Catch up on what changed in this chat since their last message, in plain words and small visuals, with every item waiting on them listed and decidable from the reply alone | [`/ketchup`](../ketchup/SKILL.md) | +| Catch up like `/ketchup`, in a short subtitled video of slides, with the waiting calls as text under it | [`/ketchup-video`](../ketchup-video/SKILL.md) | | Know what a small diff could break outside itself | [`/blast-radius`](../blast-radius/SKILL.md) | | Settle types and module shape before code that crosses a function boundary | [`/architect`](../architect/SKILL.md) | | Get several attempts at one brief, merged into the best one | [`/arena`](../arena/SKILL.md) | @@ -86,6 +87,7 @@ The default answer is `/poteto-mode`, which runs most of the others when its ste | Bring a verification skill and its feature map back in line with the app | [`/maintain-verification-skill`](../maintain-verification-skill/SKILL.md) | | Formally verify a race, invariant, or other property that tests rarely reach | [`/create-formal-verification-skill`](../create-formal-verification-skill/SKILL.md) | | Bring a formal verification back in line after the code it covers changed, and learn whether a failure is drift or a bug | [`/maintain-formal-verification-skill`](../maintain-formal-verification-skill/SKILL.md) | +| Show a PM or designer what the user sees as a chart checked by a TLA+ model, with the shortest path to each state that breaks a rule | [`/statechart`](../statechart/SKILL.md) | | Vet a performance number before reporting or acting on it | [`/benchmark-checklist`](../benchmark-checklist/SKILL.md) | | Run a large or cross-cutting change, or one to review after stepping away | [`/figure-it-out`](../figure-it-out/SKILL.md) | | Keep a decision log during a run, and review it afterward | [`/show-me-your-work`](../show-me-your-work/SKILL.md) | diff --git a/plugins/pstack/skills/statechart/SKILL.md b/plugins/pstack/skills/statechart/SKILL.md new file mode 100644 index 00000000..f5a64a8d --- /dev/null +++ b/plugins/pstack/skills/statechart/SKILL.md @@ -0,0 +1,82 @@ +--- +name: statechart +description: "Check a TLA+ model of a system that moves between states, such as a product flow, a protocol, or a service, and draw it as a Mermaid statechart. The report gives the shortest path to each state that breaks a rule. Use for /statechart, or to show a bug as a path through states." +disable-model-invocation: true +--- + +# Statechart + +The chart shows how a system moves between states, in the words of the person who reads it. That person, the reader, decides whether the behavior is right. + +## Run + +Work in a scratch folder outside the repo. Write a TLA+ spec and its config. Then run: + +```sh +/scripts/statechart SPEC.tla [--config FILE] [--view FILE] [--out DIR] +``` + +`scripts/statechart.ts` is TypeScript, so run it with a runtime that can execute TypeScript. + +The first run installs TLC and Java with mise and needs the network. + +## Write the spec + +- Write each rule that the reader agrees to as an INVARIANT. A rule can be about a screen, a result, a stored value, or a message. If the model has no variable for a rule, add the variable. Never weaken a rule to make it hold. +- Write `Next` as a disjunction of the actions, such as `YouPressPlay \/ YouPressStop`. If you do not, TLC names every step `Next`. +- A state with no step out breaks `NoDeadlock`, also when it is a correct end state. When an INVARIANT or a PROPERTY already has that name, the rule is `CHECK_DEADLOCK`. Add to `Next` an action that is true only in the end states and changes nothing, such as `Done == phase \in {"paid", "failed"} /\ UNCHANGED vars`, and give it a label in `step()`. + +## Pick the chart + +You do the work that needs judgment: the words on each state and arrow, the phases and their colors, the title, and the report to the reader. Put your work in a view module, and give it with `--view`. + +To show the reader's words, the view exports `state(vars)`. The value that `state()` returns picks the form: + +- A string gives a flat chart: `export const state = (v) => (v.paid ? "Paid" : "Paying");` +- An array gives parent states: `export const state = (v) => v.main.split(".");` +- An object gives one parallel region for each key: `export const state = (v) => ({ Playback: v.playback, Volume: v.volume });` + +Label each state with what the reader can see or cares about, such as "Paying" or "Lease held, write pending". Keep variable names out of labels. In `vars`, a TLA+ sequence is an object with keys from 1, so `v.pc[1]` is `pc[1]`. A set is an array. + +The view can also export `step(action, from, to)`. It gets the TLC action name and the values before and after the step, and it returns the label of the arrow. Write each step label as the user sees it happen, such as "you press play" or "the connect fails". Do not name the code or the TLA+ action. Two actions that end the same in the chart get the same label, so that they share one arrow. + +When a step can occur only in some conditions, end its label with the condition in brackets, in the reader's words, such as `you press play [while the file loads]`. In a regions chart, the command writes the condition on the other regions on the arrow, in the words of their labels, such as `[when Offline]`. Your brackets replace it, and two arrows from one state can then look the same. So in a regions chart, do not write brackets for a condition on another region. When a value that no label shows decides where a step goes, name the result in the label, such as "the roster read fails". + +The view can also export these: + +- `group(vars)` returns the name of a phase. Each chart state gets the color of its group. When the model states behind one chart state are in different groups, that state gets no color. +- `colors` gives each group name a color class. +- `title` is a string that the chart shows at the top. + +The command calls `state()` and `group()` at most once for each model state, and `step()` at most once for each step. The chart and the report both use those answers. So make each function depend only on its arguments. + +The chart does not draw a step that stays in one label. Split a label when the reader must see such a step. + +Aim for about 20 arrows or fewer, because a busier chart is hard to read. First return coarser labels from `state()`. Give one label to values that act the same, and leave out a detail that the reader does not need, such as a call in flight whose return changes nothing. Keep each state of a bug path, and keep each mark. When a merge changes a `breaks` state to `mayBreak`, it hides where a rule breaks. Do not merge two states that break different rules, because the reader then cannot see which rule breaks where. If the chart is still too busy, return `null` from `step()` for the steps that the reader does not need, such as a reset that every state has, or a step whose arrow repeats what other arrows show. Obey these rules when you hide steps: + +- Keep each chart state reachable by arrows from a start state. +- Keep at least one arrow out of each chart state that has a step out in the model. +- Hide all the steps of an arrow, or none of them. When you hide only some, its condition gets narrower. +- In the hand-off, say which steps the chart hides. + +## Read the report + +- In the chart, a state that breaks a rule has the class `breaks`. When only some model states behind it break the rule, it has the class `mayBreak`. The Legend names the rules of each mark. When two rules break, it names both on one mark, so say in the hand-off which state breaks which rule. In a regions chart, a state gets a mark when each combination of region states that includes it can break a rule. When a combination can break a rule and none of its states has a mark, each state in that combination gets a mark. +- TLC goes past a state that breaks a rule, so the chart shows the states after a bug. +- Because TLC goes past bugs, a model with no limit on its states can run without end. Keep the constants small, or add a CONSTRAINT. +- With a VIEW or a SYMMETRY, TLC counts states that it treats as the same as one state, and the chart draws that one state. An arrow can lead to it rather than to the state that the step reaches, and the report says so. +- TLC checks the rules in each state past a CONSTRAINT or an ACTION_CONSTRAINT, but it does not explore that state or check it for deadlock. When TLC's shortest path for a rule ends in such a state, the chart draws that state, and the report gives that path. The chart does not draw the other states past the bound. A deadlock in such a state does not show. TLC also checks the rules after each step that an ACTION_CONSTRAINT excludes, also when it reaches the next state another way. When TLC's shortest path for a rule ends with such a step, the chart draws that step. +- The command checks the rules with TLC on the config as written, with one worker. When a rule breaks, the command removes that rule and runs TLC again, until no rule breaks. After the first break, each run stops at 100,000 distinct states, so that a large model does not run without end. When a run reaches that bound or stops on an error, the report lists the rules that it did not check under "Rules not checked", and the chart does not mark them. A rule that is not checked can hold or break. To check it, remove the rules that break from the config, or make the model smaller. The bound adds a module that changes TLC's order of the variables, so for a property TLC can find a different counterexample than a run without the bound. +- `tlc.out` is what TLC printed on the config as written. When the chart does not show the bug path of a rule that breaks, `tlc-RULE.out` is what TLC printed for the run that found it. When TLC repeats its first warning, plain TLC prints it twice, but `tlc.out` shows it once, because TLC leaves the second copy out of the output that this command reads. That happens only when Java runs with `-XX:+UseParallelGC`, since otherwise TLC's first warning is its advice to pass that flag, which it prints once. + +## Show the chart + +Show `chart.mmd` to the user as a `mermaid` code block. The chart has a budget of 500 states, counted by TLC on the config as written. Above that, the chart draws only the paths to the rules that break, and when no rule breaks, the command writes no `chart.mmd`. It still checks each rule, and the report gives the state count and each bug path. To see the whole graph, make the model smaller. + +Render charts with Pele. When the user asks for an image, or a chart is too large to read as text, follow `references/render.md`. Do not use a different renderer unless the user asks for it. + +## Hand off + +Give each chart and its Mermaid text to the person who must decide. Add one line for each bug: the rule, the reader's sentence for that rule, and the path as the report numbers it. Say what the model leaves out. Give the command that makes the files again, with a new `--out` folder. + +When the model describes code, replay each bug path against the real code, as a test or a live repro, one step for each action. If a bug does not occur, think that the model is wrong until you show that it is not. diff --git a/plugins/pstack/skills/statechart/references/render.md b/plugins/pstack/skills/statechart/references/render.md new file mode 100644 index 00000000..5ef0519d --- /dev/null +++ b/plugins/pstack/skills/statechart/references/render.md @@ -0,0 +1,93 @@ +# Render a chart + +Render each `.mmd` file that you show with the npm package `pele@1.9.0`, and give the user the SVG. Install Pele once, outside the repo. Write each SVG next to its `.mmd` file, with the same name. The API is at https://pele.run/api. Pass `{ limit: 1_000_000, outputLimit: 8_000_000, maxEdges: 10_000 }` as the options of `render`. Pele's defaults are smaller than a chart of 500 states can be. When Pele throws a `PeleError`, show the user the Mermaid text and the error. + +## Colors + +Pele ignores Mermaid `theme` and `themeVariables`. Set its `--pele-*` CSS variables on `.pele`. https://pele.run/theming lists them. The command gives each state the color class of its group, such as `class sN teal`. It marks each bad state with `class sN breaks` or `class sN mayBreak`, each state on the shortest path to a bug with `class sN bugPath`, and each state that a PROPERTY counterexample repeats forever with `class sN repeats`. Pele puts these classes on the state's node. Color the classes with CSS. + +The `.mmd` file has a `classDef` line for `breaks` and for `mayBreak`, so that any Mermaid viewer shows the bug marks. It has no `classDef` for the group colors, `bugPath`, or `repeats`. Pele writes each `classDef` color as a `style` attribute on the node, and a `style` attribute wins over a normal CSS rule. So the rules for the marks below use `!important`. Without it, a dark theme keeps the light mark colors. A bug mark sets the fill and the text, and `bugPath` and `repeats` set the border. Put the mark rules after the group colors, so that a mark shows over the group color. + +These colors are suggestions. They are the colors of the old skill. Put them in a `