Repository navigation
Add /statechart-diagram and call it after /statechart - #6
Merged
Merged
Conversation
…r /statechart A new fork skill, statechart-diagram, draws the chart.mmd and report.md that /statechart writes as a square plate in pen and coloured pencil on paper, after Kevin Ngo's statechart-art: Pele lays the chart out in a hand font, scripts/plate.mjs draws it with @napi-rs/canvas, objects from the reader's world sit beside the states, and TLC's marks become red cards, red paths and a "rule broken" stamp. It runs on Node 20 or later; npm install in its scripts/ on first use fetches Pele, the canvas and two Open Font License fonts. A PostToolUse hook on Bash, hooks/after-statechart through run-hook.cmd, reads each tool call and, once the /statechart runner has written chart.mmd, adds one note asking for the plate. It is silent otherwise and exits 0 without Node. /statechart's hand-off asks for the plate too, so the chain holds where hooks do not run. README, docs/reference, poteto-help and the verifier registry list the skill. The version stamp moves to 1.16.0-adam.20261102 in the three manifests and UPSTREAM.md; CHANGES.md, FORK.md, NOTICE.md and the UPSTREAM.md ledger record the addition. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018K2CamEQdNUQF8dFWpj3V8
…-runtime The coverage test walks every tracked plugin file and fails closed on one the registry does not place. The new skill's example chart and its eval prompts change no runtime behaviour, so they join nonRuntime beside the docs and the test files. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018K2CamEQdNUQF8dFWpj3V8
fitziboy3-source
marked this pull request as ready for review
November 2, 2026 01:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #
What changed
plugins/pstack/skills/statechart-diagram/. Draws thechart.mmdandreport.mdthat/statechartwrites as a square plate in pen and coloured pencil on paper, after Kevin Ngo's statechart-art (MIT; this is an independent re-implementation). Pele lays the chart out in a hand font,scripts/plate.mjsdraws it with@napi-rs/canvas(no browser), objects from the reader's world (--near s3=stamp:APPROVED) sit beside the states they belong to, and TLC's marks become red cards, red paths and a "rule broken" stamp. The small line under the title reports what TLC checked. Node 20 or later;npm installin itsscripts/on first use. Model-invocable;/statechartstays typed only.PostToolUseon Bash runshooks/after-statechartthrough the existingrun-hook.cmdwrapper (with acommandWindowsentry likesession-start). The Node script reads the tool call and, once the/statechartrunner has writtenchart.mmd, adds oneadditionalContextnote asking for the plate. On every other command it is silent (about 35 ms); without Node it exits 0./statecharthand-off. One added sentence asks for the plate once, so the chain also holds where hooks do not run (recorded in theUPSTREAM.mdledger as a port patch).README.md,docs/reference.md,poteto-helpand the verifier'sfeatures/registry.jsonname the skill;CHANGES.md,FORK.md(patch 8) andNOTICE.mdrecord the addition. Version stamp1.16.0-adam.20261102in the three manifests andUPSTREAM.md.Roll-out after merge: bump the date in each cloud environment's pasted
cloud-setup.shso the kit re-installs, and reinstall the plugin on the Mac lanes. The first plate in a session runsnpm installin the skill'sscripts/(the skill says so when fonts are missing).Verification
bun run static: JSON manifests, skill-collision invariants, sync-port test). Strict typecheck passes (bun run typecheck). Bun tests: 514 of 515 pass; the one failure,runLane > terminalizes catchable failures after reserving output paths, fails identically on untouchedadam/releasein this environment and is unrelated to this change. Plugin validation (claude plugin validate) was not available in the build environment./statechartrun reported through itsWrote <dir>line, a run with only--outin the command, acd dir && …form, an unrelated command, the plate command itself, a run whose folder has nochart.mmd, and malformed input; throughrun-hook.cmdand with Node absent from PATH./statechartoutput, a chart with a parent state, two regions and a broken rule, and a plain Mermaid file; a fresh Claude agent given onlySKILL.mdproduced a correct plate and leftchart.mmduntouched./statecharton a model in a session with this head installed and confirm the plate is drawn without being asked.live-gatestatus on the final head links the evidence comment (installed version, surface, action, observed result).Mergify does not queue a pull request without
live-gateon its exact head. Do not merge, tag, release, or roll out without it.Generated by Claude Code