Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .omp-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
},
"metadata": {
"description": "pstack, poteto's engineering methodology for Cursor, ported to oh-my-pi. Model and provider agnostic.",
"version": "0.15.4804"
"version": "0.15.4900"
},
"plugins": [
{
"name": "pstack",
"description": "60 skills, 22 playbooks, 24 principles, the poteto-mode pin, and two agents. Upstream cursor/plugins pstack 0.15.48 at 9e278fe.",
"version": "0.15.4804",
"description": "60 skills, 22 playbooks, 24 principles, the poteto-mode pin, and two agents. Upstream cursor/plugins pstack 0.15.49 at 4d5593e.",
"version": "0.15.4900",
"category": "development",
"license": "MIT",
"source": "./plugins/pstack"
Expand Down
2 changes: 1 addition & 1 deletion omp-port/RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4
0
2 changes: 1 addition & 1 deletion omp-port/UPSTREAM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9e278fe4d4ecd8bfe98b1b79bf4be662efb338cc
4d5593ed7f5d978ab643800443aad3d8c131d289
2 changes: 1 addition & 1 deletion plugins/pstack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pstack",
"version": "0.15.4804",
"version": "0.15.4900",
"license": "MIT",
"omp": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion plugins/pstack/skills/poteto-help/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,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 | [`/skill:maintain-verification-skill`](../maintain-verification-skill/SKILL.md) |
| Formally verify a race, invariant, or other property that tests rarely reach | [`/skill: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 | [`/skill: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 | [`/skill:statechart`](../statechart/SKILL.md) |
| Show a TLA+ model or a Lean 4 proof as Mermaid charts, with the shortest path to each rule break or unproven gap | [`/skill:statechart`](../statechart/SKILL.md) |
| Vet a performance number before reporting or acting on it | [`/skill:benchmark-checklist`](../benchmark-checklist/SKILL.md) |
| Run a large or cross-cutting change, or one to review after stepping away | [`/skill:figure-it-out`](../figure-it-out/SKILL.md) |
| Keep a decision log during a run, and review it afterward | [`/skill:show-me-your-work`](../show-me-your-work/SKILL.md) |
Expand Down
96 changes: 76 additions & 20 deletions plugins/pstack/skills/statechart/SKILL.md

Large diffs are not rendered by default.

146 changes: 142 additions & 4 deletions plugins/pstack/skills/statechart/references/render.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# 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.
Render each `.mmd` file that you show with the npm package `pele@1.9.0`, and give the operator 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 operator 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.
Pele ignores Mermaid `theme` and `themeVariables`. Set its `--pele-*` CSS variables on `.pele`. https://pele.run/theming lists them.

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.
For TLA+ statecharts (`stateDiagram-v2`), 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`. The `.mmd` file has a `classDef` line for `breaks` and for `mayBreak`, and none for the group colors, `bugPath`, or `repeats`.

These colors are suggestions. They are the colors of the old skill. Put them in a `<style>` element at the start of each SVG. Each SVG then follows the light or dark setting of the viewer.
For Lean 4 proof charts (`flowchart TD`), `lemmas.mmd` and `proof.mmd` emit `classDef` and `class` assignments for `target`, `goalRoot`, `subRoot`, `termRoot`, `closed`, `sorry`, `error`, `open`, `axiom`, `native`, `restsOn`, `doubtPath`, `folded`, `stub`, and `note`. Flowchart nodes render as `rect`, `polygon`, or `circle` depending on shape, so the CSS rules below target all three elements.

Pele writes each `classDef` color as an inline `style` attribute on the node, and a `style` attribute wins over a normal CSS rule. The mark rules below therefore use `!important` so dark themes override the light `classDef` colors. Put the mark rules after the group colors so a mark shows over a group color.

Put this `<style>` block at the start of each SVG so the image follows the light or dark setting of the viewer.

```css
.pele {
Expand Down Expand Up @@ -52,6 +56,79 @@ These colors are suggestions. They are the colors of the old skill. Put them in
stroke-width: 2.5px !important;
stroke-dasharray: 6 3;
}
.pele .target rect, .pele .target polygon, .pele .target circle {
fill: #e8f2ff !important;
stroke: #1680f3 !important;
stroke-width: 2.5px !important;
}
.pele .target text { fill: #0d4ea6 !important; }
.pele .goalRoot rect, .pele .goalRoot polygon, .pele .goalRoot circle {
fill: #e8f2ff !important;
stroke: #1680f3 !important;
stroke-width: 2px !important;
}
.pele .goalRoot text { fill: #0d4ea6 !important; }
.pele .subRoot rect, .pele .subRoot polygon, .pele .subRoot circle {
fill: #eef2ff !important;
stroke: #6366f1 !important;
stroke-width: 2px !important;
}
.pele .subRoot text { fill: #3730a3 !important; }
.pele .termRoot rect, .pele .termRoot polygon, .pele .termRoot circle {
fill: #f0fdfa !important;
stroke: #0d9488 !important;
stroke-width: 2px !important;
}
.pele .termRoot text { fill: #115e59 !important; }
.pele .closed rect, .pele .closed polygon, .pele .closed circle {
fill: #e9f7ef !important;
stroke: #229954 !important;
stroke-width: 1.5px !important;
}
.pele .closed text { fill: #145a32 !important; }
.pele .folded rect, .pele .folded polygon, .pele .folded circle {
fill: #f3ecff !important;
stroke: #8b5cf6 !important;
stroke-width: 1.5px !important;
}
.pele .folded text { fill: #5b21b6 !important; }
.pele .stub rect, .pele .stub polygon, .pele .stub circle {
fill: #f4f4f5 !important;
stroke: #71717a !important;
stroke-width: 1.5px !important;
stroke-dasharray: 5 3;
}
.pele .stub text { fill: #52525b !important; }
.pele .note rect, .pele .note polygon, .pele .note circle {
fill: #fafafa !important;
stroke: #d4d4d8 !important;
stroke-width: 1px !important;
}
.pele .note text { fill: #52525b !important; }
.pele .doubtPath rect, .pele .doubtPath polygon, .pele .doubtPath circle {
stroke: #e72e3b !important;
stroke-width: 2.5px !important;
}
.pele .open rect, .pele .open polygon, .pele .open circle,
.pele .axiom rect, .pele .axiom polygon, .pele .axiom circle,
.pele .restsOn rect, .pele .restsOn polygon, .pele .restsOn circle {
fill: #fff3e6 !important;
stroke: #e8730c !important;
stroke-width: 2.5px !important;
}
.pele .open text, .pele .axiom text, .pele .restsOn text {
fill: #b85a06 !important;
}
.pele .sorry rect, .pele .sorry polygon, .pele .sorry circle,
.pele .error rect, .pele .error polygon, .pele .error circle,
.pele .native rect, .pele .native polygon, .pele .native circle {
fill: #ffecee !important;
stroke: #e72e3b !important;
stroke-width: 2.5px !important;
}
.pele .sorry text, .pele .error text, .pele .native text {
fill: #cd2834 !important;
}
@media (prefers-color-scheme: dark) {
.pele {
--pele-bg: #1f1f1f;
Expand Down Expand Up @@ -89,5 +166,66 @@ These colors are suggestions. They are the colors of the old skill. Put them in
.pele .repeats rect {
stroke: #9a3fcf !important;
}
.pele .target rect, .pele .target polygon, .pele .target circle {
fill: #172d47 !important;
stroke: #4c9aff !important;
}
.pele .target text { fill: #9cc9ff !important; }
.pele .goalRoot rect, .pele .goalRoot polygon, .pele .goalRoot circle {
fill: #172d47 !important;
stroke: #4c9aff !important;
}
.pele .goalRoot text { fill: #9cc9ff !important; }
.pele .subRoot rect, .pele .subRoot polygon, .pele .subRoot circle {
fill: #1e1b4b !important;
stroke: #818cf8 !important;
}
.pele .subRoot text { fill: #c7d2fe !important; }
.pele .termRoot rect, .pele .termRoot polygon, .pele .termRoot circle {
fill: #134e4a !important;
stroke: #2dd4bf !important;
}
.pele .termRoot text { fill: #99f6e4 !important; }
.pele .closed rect, .pele .closed polygon, .pele .closed circle {
fill: #153323 !important;
stroke: #34d399 !important;
}
.pele .closed text { fill: #86efac !important; }
.pele .folded rect, .pele .folded polygon, .pele .folded circle {
fill: #2c1f4a !important;
stroke: #a78bfa !important;
}
.pele .folded text { fill: #ddd6fe !important; }
.pele .stub rect, .pele .stub polygon, .pele .stub circle {
fill: #27272a !important;
stroke: #a1a1aa !important;
}
.pele .stub text { fill: #d4d4d8 !important; }
.pele .note rect, .pele .note polygon, .pele .note circle {
fill: #262626 !important;
stroke: #52525b !important;
}
.pele .note text { fill: #d4d4d8 !important; }
.pele .doubtPath rect, .pele .doubtPath polygon, .pele .doubtPath circle {
stroke: #cf2b35 !important;
}
.pele .open rect, .pele .open polygon, .pele .open circle,
.pele .axiom rect, .pele .axiom polygon, .pele .axiom circle,
.pele .restsOn rect, .pele .restsOn polygon, .pele .restsOn circle {
fill: #2e2619 !important;
stroke: #d0700f !important;
}
.pele .open text, .pele .axiom text, .pele .restsOn text {
fill: #ffa257 !important;
}
.pele .sorry rect, .pele .sorry polygon, .pele .sorry circle,
.pele .error rect, .pele .error polygon, .pele .error circle,
.pele .native rect, .pele .native polygon, .pele .native circle {
fill: #2e2021 !important;
stroke: #cf2b35 !important;
}
.pele .sorry text, .pele .error text, .pele .native text {
fill: #ff6463 !important;
}
}
```
Loading