Skip to content

port pstack 0.15.30 statechart skill - #30

Merged
caelaxie merged 1 commit into
mainfrom
cursor/port-statechart-0-15-30-d59b
Oct 23, 2026
Merged

caelaxie merged 1 commit into
mainfrom
cursor/port-statechart-0-15-30-d59b

Conversation

@caelaxie

@caelaxie caelaxie commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Ports upstream pstack/ from 88d4751 to 4ec7ffa (0.15.30).

Upstream commits

  • eb4db2b feat(pstack): add the statechart skill to draw TLA+ models as charts (#741)
  • 7698375 fix(pstack): bring the statechart skill up to date with six fixes (#776)
  • 4ec7ffa refactor(pstack): delete statechart comments that repeat the code, and rename helpers (#779)

No other pstack/ files changed in that range. .cursor-plugin/plugin.json only bumps the version, and this port does not ship that Cursor manifest.

Droid deviations

None inside the skill. skills/statechart/ is a byte-for-byte copy of upstream pstack/skills/statechart/ at 4ec7ffa. The new README row, guide section, and poteto-help row are the upstream lines unchanged. The skill text does not mention .cursor/skills/ or any other Cursor-only path, so nothing was rewritten.

The only repo-local edits are the version pin:

  • plugin.json and .factory-plugin/plugin.json: 0.15.29 → 0.15.30
  • README header pin: 0.15.29 → 0.15.30

Harness proof

Droid CLI 0.248.0. Head 0e520801452131757116d08cde5dcc7d6c11dccd.

droid plugin marketplace add pstack-ports/droid-pstack#cursor/port-statechart-0-15-30-d59b
Successfully added marketplace: droid-pstack@cursor-port-statechart-0-15-30-d59b

droid plugin install pstack@droid-pstack@cursor-port-statechart-0-15-30-d59b --scope user
Successfully installed pstack@droid-pstack@cursor-port-statechart-0-15-30-d59b (0e52080)

droid plugin list
Installed plugins:
Enabled:
  pstack@droid-pstack@cursor-port-statechart-0-15-30-d59b  [user]  0e52080

The # ref is rewritten (/ becomes -), so the install id is pstack@droid-pstack@cursor-port-statechart-0-15-30-d59b, not pstack@droid-pstack. Installed commit matches this PR head. Cached manifests are 0.15.30.

Installed statechart skill:

/tmp/tmp.OQZRlM6khI/.factory/plugins/cache/droid-pstack@cursor-port-statechart-0-15-30-d59b-c7c5e6a8f1f8/pstack-7171b73fae68/0e5208014521/skills/statechart/SKILL.md

---
name: statechart
description: "Draw what an app's user sees as a Mermaid statechart from a TLA+ model. States are gray if they work, red if still wrong, and green if fixed. Each bug TLC finds is a numbered path. Use for /statechart, \"show the PM the bug\", or to turn an agreed chart into a TLA+ skeleton."
disable-model-invocation: true
---

diff -rq of that installed tree against upstream pstack/skills/statechart at 4ec7ffa is empty.

Installed poteto-help (the other changed skill), same cache root .../0e5208014521/skills/poteto-help/SKILL.md. Diff against this repo's main is only the upstream row:

+| Show a PM or designer what the user sees as a chart checked by a model, with each bug drawn as a numbered path, turn an agreed chart into a TLA+ skeleton, or audit the code against its TLA+ spec | [`/statechart`](../statechart/SKILL.md) |

That line matches upstream. The rest of the file is the existing Droid port.

node statechart.mjs --help exits 0. from-chart on the bundled sync.mmd fixture, with tla2tools.jar v1.7.4, exits 1 because the fixture rule is broken and writes the chart:

Wrote NotesApp.tla, NotesApp.cfg, and NotesApp.map.mjs from notes-app.mmd.
TLC on NotesApp.tla with NotesApp.cfg:
  TypeOK holds.
  NeverSyncedWhileOffline is broken.
  TLC ran 4 times in 3.1 s.

Chart: 4 states and 8 transitions from 4 model states.
3 work, 1 breaks a rule.

## 1. Offline | Synced

Rule broken: You never see "Synced" while you are offline.
This is the only way to get here in the model.

0. Start: Online | Synced
1. The network drops. Now: Offline | Waiting to sync
2. The server confirms. Now: Offline | Synced

The spec draws notes-app.mmd back unchanged.

Wrote chart.mmd, bug-1.mmd, stories.md, summary.json in out.

node --test skills/statechart/scripts/test/statechart.test.mjs on the installed copy: 67 pass, 0 fail.

droid exec on the installed skill (no FACTORY_API_KEY), exit 1, stdout empty, stderr verbatim:

Skill "statechart" activated
Error during droid execution: Authentication failed. Please log in using /login or set a valid FACTORY_API_KEY environment variable.

Validate plugin on this PR: success (39885577354).

Open in Web Open in Cursor 

Copies the statechart skill and the README, guide, and poteto-help index lines from cursor/plugins 88d4751..4ec7ffa.

Co-authored-by: Kaitian Xie <caelaxie@users.noreply.github.com>

@caelaxie caelaxie left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verdict: changes requested (comment review, since author and reviewer share an account).

checked at head 0e52080:

  • all 12 files under skills/statechart/ are byte-identical to upstream pstack/skills/statechart/ at 4ec7ffa1.
  • readme row, guide section, and poteto-help row match upstream; version bumps to 0.15.30 in plugin.json and .factory-plugin/plugin.json match upstream.
  • no cursor-only files or paths added. ci (validate plugin) is green.
  • no linked issue needed for a release port.

blocking: harness proof is still pending. add to the body or a comment, run against this exact head: droid plugin marketplace add of this branch, droid plugin install pstack@droid-pstack, droid plugin list showing pstack 0.15.30, and the installed skills/statechart/SKILL.md path + frontmatter. if droid exec is blocked only by auth, paste the verbatim error; install+list+installed copy is enough for this text-only change. i'll merge once that's up.

@cursor

cursor Bot commented Oct 23, 2026

Copy link
Copy Markdown

Harness proof against head 0e520801452131757116d08cde5dcc7d6c11dccd (Droid CLI 0.248.0, fresh HOME). Marketplace checkout git rev-parse HEAD is that same sha.

$ droid plugin marketplace add pstack-ports/droid-pstack#cursor/port-statechart-0-15-30-d59b
Successfully added marketplace: droid-pstack@cursor-port-statechart-0-15-30-d59b
$ droid plugin install pstack@droid-pstack@cursor-port-statechart-0-15-30-d59b --scope user
Successfully installed pstack@droid-pstack@cursor-port-statechart-0-15-30-d59b (0e52080)
$ droid plugin list
Installed plugins:
Enabled:
  pstack@droid-pstack@cursor-port-statechart-0-15-30-d59b  [user]  0e52080

droid plugin list prints the git commit (0e52080), not the manifest version. The installed manifests at that commit are 0.15.30:

$ grep -n '"version"' "$INSTALL/plugin.json" "$INSTALL/.factory-plugin/plugin.json"
.../0e5208014521/plugin.json:4:  "version": "0.15.30",
.../0e5208014521/.factory-plugin/plugin.json:4:  "version": "0.15.30",

Installed statechart skill ($INSTALL is /tmp/tmp.m1nYBP9BLL/.factory/plugins/cache/droid-pstack@cursor-port-statechart-0-15-30-d59b-c7c5e6a8f1f8/pstack-7171b73fae68/0e5208014521):

$ sed -n '1,6p' "$INSTALL/skills/statechart/SKILL.md"
---
name: statechart
description: "Draw what an app's user sees as a Mermaid statechart from a TLA+ model. States are gray if they work, red if still wrong, and green if fixed. Each bug TLC finds is a numbered path. Use for /statechart, \"show the PM the bug\", or to turn an agreed chart into a TLA+ skeleton."
disable-model-invocation: true
---
$ droid exec --cwd /workspace "/statechart what the user sees when they edit a note offline"

exit 1, stdout empty, stderr:

Skill "statechart" activated
Error during droid execution: Authentication failed. Please log in using /login or set a valid FACTORY_API_KEY environment variable.

@caelaxie caelaxie left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pass. statechart matches upstream 4ec7ffa byte-for-byte, version 0.15.30, ci green on 0e52080, and harness proof (marketplace add + install + list at that head; statechart activated then auth-blocked) is on the pr. squash-merging.

@caelaxie
caelaxie merged commit 72b8a5c into main Oct 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants