open-pstack 0.0.0-stage → 0.9.149
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/LICENSE-cursor-team-kit +21 -0
- package/LICENSE-thermos +21 -0
- package/NOTICE-skills.md +13 -0
- package/NOTICE.md +62 -0
- package/bin/open-pstack.mjs +4 -0
- package/lib/bundle.mjs +42 -0
- package/lib/cli.mjs +211 -0
- package/lib/detect.mjs +28 -0
- package/lib/harnesses.mjs +136 -0
- package/lib/steps.mjs +93 -0
- package/package.json +30 -4
- package/plugin/.antigravity-plugin/plugin.json +8 -0
- package/plugin/.claude-plugin/icon.png +0 -0
- package/plugin/.claude-plugin/plugin.json +31 -0
- package/plugin/.codex-plugin/plugin.json +52 -0
- package/plugin/.github/plugin/plugin.json +15 -0
- package/plugin/.grok-plugin/plugin.json +9 -0
- package/plugin/.muse-plugin/plugin.json +381 -0
- package/plugin/LICENSE +22 -0
- package/plugin/README.md +27 -0
- package/plugin/agents/comment-sicko.md +34 -0
- package/plugin/agents/poteto-agent.md +8 -0
- package/plugin/agents/thermo-nuclear-code-quality-review-subagent.md +23 -0
- package/plugin/agents/thermo-nuclear-review-subagent.md +28 -0
- package/plugin/assets/pstack-icon.png +0 -0
- package/plugin/assets/pstack-icon.prompt.txt +8 -0
- package/plugin/grok/skills/pstack-routing/SKILL.md +8 -0
- package/plugin/hooks/agy-context.awk +9 -0
- package/plugin/hooks/codex-hooks.json +17 -0
- package/plugin/hooks/copilot-context.awk +44 -0
- package/plugin/hooks/copilot-hooks.json +29 -0
- package/plugin/hooks/hooks.json +16 -0
- package/plugin/hooks/json.awk +164 -0
- package/plugin/hooks/kimi-instructions.md +17 -0
- package/plugin/hooks/muse-context.awk +31 -0
- package/plugin/hooks/pre-tool-use.awk +152 -0
- package/plugin/hooks/pre-tool-use.sh +16 -0
- package/plugin/hooks/script-contracts.awk +53 -0
- package/plugin/hooks/session-start-agy.md +17 -0
- package/plugin/hooks/session-start-context.md +15 -0
- package/plugin/hooks/session-start-copilot-setup.md +1 -0
- package/plugin/hooks/session-start-copilot-sheet.md +1 -0
- package/plugin/hooks/session-start-copilot.md +3 -0
- package/plugin/hooks/session-start-minimax.md +17 -0
- package/plugin/hooks/session-start-muse-sheet.md +1 -0
- package/plugin/hooks/session-start-muse.md +17 -0
- package/plugin/hooks/session-start-opencode.md +17 -0
- package/plugin/hooks/session-start.ps1 +169 -0
- package/plugin/hooks/session-start.sh +107 -0
- package/plugin/hooks.json +10 -0
- package/plugin/models.json +60 -0
- package/plugin/omp/index.mjs +34 -0
- package/plugin/opencode/index.js +49 -0
- package/plugin/package.json +8 -0
- package/plugin/pi/agent-files.ts +117 -0
- package/plugin/pi/agent-text.ts +99 -0
- package/plugin/pi/agent-tools.ts +148 -0
- package/plugin/pi/agents.ts +510 -0
- package/plugin/pi/ask.ts +87 -0
- package/plugin/pi/child.ts +313 -0
- package/plugin/pi/config.ts +208 -0
- package/plugin/pi/hc-child.ts +210 -0
- package/plugin/pi/index.ts +45 -0
- package/plugin/pi/one-shot.ts +90 -0
- package/plugin/pi/path-skills.ts +54 -0
- package/plugin/pi/prompt.ts +39 -0
- package/plugin/pi/schedule.ts +254 -0
- package/plugin/pi/slash.ts +106 -0
- package/plugin/pi/sleep-wait.ts +76 -0
- package/plugin/pi/worktree.ts +87 -0
- package/plugin/skills/architect/SKILL.md +20 -0
- package/plugin/skills/arena/SKILL.md +66 -0
- package/plugin/skills/automate-me/SKILL.md +111 -0
- package/plugin/skills/babysit/SKILL.md +68 -0
- package/plugin/skills/benchmark-checklist/SKILL.md +38 -0
- package/plugin/skills/blast-radius/SKILL.md +49 -0
- package/plugin/skills/bro/SKILL.md +6 -0
- package/plugin/skills/correct/SKILL.md +31 -0
- package/plugin/skills/create-formal-verification-skill/SKILL.md +50 -0
- package/plugin/skills/create-verification-skill/SKILL.md +51 -0
- package/plugin/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/plugin/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/plugin/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/plugin/skills/deslop/SKILL.md +24 -0
- package/plugin/skills/figure-it-out/SKILL.md +51 -0
- package/plugin/skills/fix-ci/SKILL.md +29 -0
- package/plugin/skills/fix-merge-conflicts/SKILL.md +32 -0
- package/plugin/skills/get-pr-comments/SKILL.md +23 -0
- package/plugin/skills/how/SKILL.md +28 -0
- package/plugin/skills/in-your-own-words/SKILL.md +6 -0
- package/plugin/skills/interrogate/SKILL.md +48 -0
- package/plugin/skills/ketchup/SKILL.md +42 -0
- package/plugin/skills/ketchup-video/SKILL.md +28 -0
- package/plugin/skills/maintain-formal-verification-skill/SKILL.md +65 -0
- package/plugin/skills/maintain-verification-skill/SKILL.md +46 -0
- package/plugin/skills/make-pr-easy-to-review/SKILL.md +59 -0
- package/plugin/skills/no-comments/SKILL.md +45 -0
- package/plugin/skills/poteto-help/SKILL.md +148 -0
- package/plugin/skills/poteto-help/references/prompting.md +51 -0
- package/plugin/skills/poteto-help/references/recipes.md +51 -0
- package/plugin/skills/poteto-mode/SKILL.md +132 -0
- package/plugin/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
- package/plugin/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/plugin/skills/poteto-mode/playbooks/autopilot-full.md +31 -0
- package/plugin/skills/poteto-mode/playbooks/autopilot-stack.md +8 -0
- package/plugin/skills/poteto-mode/playbooks/babysit.md +10 -0
- package/plugin/skills/poteto-mode/playbooks/bug-fix.md +32 -0
- package/plugin/skills/poteto-mode/playbooks/eval.md +25 -0
- package/plugin/skills/poteto-mode/playbooks/feature.md +21 -0
- package/plugin/skills/poteto-mode/playbooks/hillclimb.md +21 -0
- package/plugin/skills/poteto-mode/playbooks/investigation.md +14 -0
- package/plugin/skills/poteto-mode/playbooks/multi-phase-plan.md +13 -0
- package/plugin/skills/poteto-mode/playbooks/opening-a-pr.md +9 -0
- package/plugin/skills/poteto-mode/playbooks/pause-safely.md +11 -0
- package/plugin/skills/poteto-mode/playbooks/perf-issue.md +25 -0
- package/plugin/skills/poteto-mode/playbooks/prototype.md +14 -0
- package/plugin/skills/poteto-mode/playbooks/refactoring.md +18 -0
- package/plugin/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/plugin/skills/poteto-mode/playbooks/session-pickup.md +11 -0
- package/plugin/skills/poteto-mode/playbooks/shipping.md +16 -0
- package/plugin/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
- package/plugin/skills/poteto-mode/playbooks/visual-parity.md +11 -0
- package/plugin/skills/poteto-mode/playbooks/worktree-cleanup.md +12 -0
- package/plugin/skills/poteto-mode/references/agents/comment-sicko.md +34 -0
- package/plugin/skills/poteto-mode/references/agy-tools.md +100 -0
- package/plugin/skills/poteto-mode/references/bugbot-triage.md +142 -0
- package/plugin/skills/poteto-mode/references/cloud-session-pr-reads.md +29 -0
- package/plugin/skills/poteto-mode/references/codex-tools.md +110 -0
- package/plugin/skills/poteto-mode/references/copilot-tools.md +144 -0
- package/plugin/skills/poteto-mode/references/dsh-tools.md +51 -0
- package/plugin/skills/poteto-mode/references/grok.md +50 -0
- package/plugin/skills/poteto-mode/references/kimi-tools.md +40 -0
- package/plugin/skills/poteto-mode/references/licenses/LICENSE +22 -0
- package/plugin/skills/poteto-mode/references/licenses/LICENSE-cursor-team-kit +21 -0
- package/plugin/skills/poteto-mode/references/licenses/LICENSE-thermos +21 -0
- package/plugin/skills/poteto-mode/references/licenses/NOTICE.md +13 -0
- package/plugin/skills/poteto-mode/references/merge-safety.md +43 -0
- package/plugin/skills/poteto-mode/references/minimax-tools.md +93 -0
- package/plugin/skills/poteto-mode/references/muse-tools.md +105 -0
- package/plugin/skills/poteto-mode/references/omp-tools.md +45 -0
- package/plugin/skills/poteto-mode/references/opencode-tools.md +30 -0
- package/plugin/skills/poteto-mode/references/pi-tools.md +120 -0
- package/plugin/skills/poteto-mode/references/resume-storage.md +20 -0
- package/plugin/skills/poteto-mode/scripts/.prettierignore +19 -0
- package/plugin/skills/poteto-mode/scripts/.prettierrc.json +3 -0
- package/plugin/skills/poteto-mode/scripts/bootstrap.ts +71 -0
- package/plugin/skills/poteto-mode/scripts/bun.lock +67 -0
- package/plugin/skills/poteto-mode/scripts/check-playbooks.mjs +165 -0
- package/plugin/skills/poteto-mode/scripts/codex-session-effort.mjs +94 -0
- package/plugin/skills/poteto-mode/scripts/package.json +16 -0
- package/plugin/skills/poteto-mode/scripts/resume.mjs +139 -0
- package/plugin/skills/poteto-mode/scripts/tsconfig.json +14 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/check-suites.ts +203 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/cli.port.test.ts +88 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/cli.test.ts +383 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/cli.ts +283 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/deadline.ts +20 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +163 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/fresh-install.test.ts +35 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/github.port.test.ts +1119 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/github.test.ts +506 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/github.ts +979 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/head-checks.ts +37 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/integrity.test.ts +887 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/landing.ts +92 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/live-merge-safety.mjs +142 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/policy.port.test.ts +945 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/policy.test.ts +492 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/policy.ts +966 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/query-error.ts +36 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/render.ts +211 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/ship-pr +6 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/shipping-cli.test.ts +159 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/shipping-cli.ts +65 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/shipping.test-helper.ts +48 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/shipping.test.ts +360 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/shipping.ts +235 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/transport.test.ts +588 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/tsconfig.json +13 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/types.compile.ts +109 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/types.ts +502 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/watch-pr +6 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/workflow-runs.ts +217 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/wrapper.test.ts +20 -0
- package/plugin/skills/poteto-mode/scripts/worktree-audit.mjs +492 -0
- package/plugin/skills/poteto-mode/worker.md +11 -0
- package/plugin/skills/principle-attack-the-premise/SKILL.md +15 -0
- package/plugin/skills/principle-boundary-discipline/SKILL.md +11 -0
- package/plugin/skills/principle-build-the-lever/SKILL.md +15 -0
- package/plugin/skills/principle-encode-lessons-in-structure/SKILL.md +11 -0
- package/plugin/skills/principle-exhaust-the-design-space/SKILL.md +9 -0
- package/plugin/skills/principle-experience-first/SKILL.md +19 -0
- package/plugin/skills/principle-explain-the-number/SKILL.md +14 -0
- package/plugin/skills/principle-fix-root-causes/SKILL.md +14 -0
- package/plugin/skills/principle-foundational-thinking/SKILL.md +13 -0
- package/plugin/skills/principle-guard-the-context-window/SKILL.md +12 -0
- package/plugin/skills/principle-laziness-protocol/SKILL.md +10 -0
- package/plugin/skills/principle-make-operations-idempotent/SKILL.md +15 -0
- package/plugin/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +14 -0
- package/plugin/skills/principle-minimize-reader-load/SKILL.md +15 -0
- package/plugin/skills/principle-model-the-domain/SKILL.md +15 -0
- package/plugin/skills/principle-never-block-on-the-human/SKILL.md +15 -0
- package/plugin/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
- package/plugin/skills/principle-prove-it-works/SKILL.md +17 -0
- package/plugin/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
- package/plugin/skills/principle-separate-before-serializing-shared-state/SKILL.md +11 -0
- package/plugin/skills/principle-sequence-verifiable-units/SKILL.md +13 -0
- package/plugin/skills/principle-subtract-before-you-add/SKILL.md +18 -0
- package/plugin/skills/principle-test-behavior-not-implementation/SKILL.md +16 -0
- package/plugin/skills/principle-type-system-discipline/SKILL.md +15 -0
- package/plugin/skills/recall/SKILL.md +43 -0
- package/plugin/skills/reflect/SKILL.md +33 -0
- package/plugin/skills/reflect/scripts/claude-project-dir.mjs +121 -0
- package/plugin/skills/reflect/scripts/find-transcript.mjs +218 -0
- package/plugin/skills/setup-pstack/SKILL.md +104 -0
- package/plugin/skills/setup-pstack/copilot.md +88 -0
- package/plugin/skills/setup-pstack/references/runtimes.md +77 -0
- package/plugin/skills/setup-pstack/scripts/check-sheet.awk +10 -0
- package/plugin/skills/setup-pstack/scripts/check-sheet.sh +20 -0
- package/plugin/skills/setup-pstack/scripts/read-sheet.sh +24 -0
- package/plugin/skills/setup-pstack/scripts/sheet.awk +152 -0
- package/plugin/skills/sharpen/SKILL.md +15 -0
- package/plugin/skills/show-me-your-work/SKILL.md +89 -0
- package/plugin/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
- package/plugin/skills/show-me-your-work/scripts/log.sh +58 -0
- package/plugin/skills/statechart/SKILL.md +81 -0
- package/plugin/skills/statechart/references/render.md +93 -0
- package/plugin/skills/statechart/scripts/backends/cfg.ts +33 -0
- package/plugin/skills/statechart/scripts/backends/mermaid.ts +249 -0
- package/plugin/skills/statechart/scripts/backends/plain-text.ts +72 -0
- package/plugin/skills/statechart/scripts/backends/report.ts +177 -0
- package/plugin/skills/statechart/scripts/bun.lock +17 -0
- package/plugin/skills/statechart/scripts/frontends/config.ts +276 -0
- package/plugin/skills/statechart/scripts/frontends/dot.ts +77 -0
- package/plugin/skills/statechart/scripts/frontends/marks.ts +93 -0
- package/plugin/skills/statechart/scripts/frontends/messages.ts +52 -0
- package/plugin/skills/statechart/scripts/frontends/spec.ts +114 -0
- package/plugin/skills/statechart/scripts/frontends/trace.ts +24 -0
- package/plugin/skills/statechart/scripts/frontends/value.ts +166 -0
- package/plugin/skills/statechart/scripts/frontends/verdict.ts +40 -0
- package/plugin/skills/statechart/scripts/frontends/view.ts +119 -0
- package/plugin/skills/statechart/scripts/ir.ts +547 -0
- package/plugin/skills/statechart/scripts/janitor.ts +13 -0
- package/plugin/skills/statechart/scripts/kill.ts +15 -0
- package/plugin/skills/statechart/scripts/package.json +11 -0
- package/plugin/skills/statechart/scripts/passes/annotate.ts +128 -0
- package/plugin/skills/statechart/scripts/passes/label.ts +269 -0
- package/plugin/skills/statechart/scripts/passes/lift.ts +85 -0
- package/plugin/skills/statechart/scripts/passes/loop-check.ts +68 -0
- package/plugin/skills/statechart/scripts/passes/paths.ts +60 -0
- package/plugin/skills/statechart/scripts/passes/reach.ts +135 -0
- package/plugin/skills/statechart/scripts/passes/region-check.ts +97 -0
- package/plugin/skills/statechart/scripts/passes/regions.ts +295 -0
- package/plugin/skills/statechart/scripts/pipeline.ts +76 -0
- package/plugin/skills/statechart/scripts/run.ts +545 -0
- package/plugin/skills/statechart/scripts/statechart +29 -0
- package/plugin/skills/statechart/scripts/statechart.ts +166 -0
- package/plugin/skills/statechart/scripts/test/ConfigOracle.java +63 -0
- package/plugin/skills/statechart/scripts/test/chart.test.ts +1253 -0
- package/plugin/skills/statechart/scripts/test/charts/Braces.mmd +7 -0
- package/plugin/skills/statechart/scripts/test/charts/Escapes.mmd +11 -0
- package/plugin/skills/statechart/scripts/test/charts/Phases.mmd +29 -0
- package/plugin/skills/statechart/scripts/test/child-env.test.ts +15 -0
- package/plugin/skills/statechart/scripts/test/cli.test.ts +1353 -0
- package/plugin/skills/statechart/scripts/test/config-fuzz.test.ts +263 -0
- package/plugin/skills/statechart/scripts/test/corpus/Counter/ChartRun.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/Counter/Counter.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/Counter/Counter.tla +10 -0
- package/plugin/skills/statechart/scripts/test/corpus/Counter/chart.mmd +9 -0
- package/plugin/skills/statechart/scripts/test/corpus/Counter/graph.dot +16 -0
- package/plugin/skills/statechart/scripts/test/corpus/Counter/report.md +7 -0
- package/plugin/skills/statechart/scripts/test/corpus/Counter/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/Counter/verdict-1.out +49 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/ChartRun.out +60 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.cfg +4 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.tla +22 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/chart.mmd +26 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/graph.dot +19 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/report.md +20 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.out +56 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.out +82 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/verdict-3.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/ChartRun.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.tla +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/chart.mmd +22 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/graph.dot +16 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/report.md +17 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.out +56 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.out +77 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/ChartRun.out +69 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.cfg +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.tla +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/chart.mmd +85 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/graph.dot +70 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/report.md +12 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.out +67 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/verdict-2.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.out +85 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.cfg +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.tla +13 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/chart.mmd +5 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/graph.dot +10 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/report.md +31 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.out +64 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.out +77 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/ChartRun.out +55 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.tla +10 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/chart.mmd +12 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/graph.dot +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/report.md +12 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.out +33 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-2.out +54 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/ChartRun.out +54 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.tla +10 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/chart.mmd +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/graph.dot +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/report.md +7 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/verdict-1.out +46 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/ChartRun.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.cfg +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.tla +10 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/CounterSteps.tla +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/chart.mmd +17 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/graph.dot +15 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/report.md +14 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/sany.out +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.out +78 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/ChartRun.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.tla +19 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/chart.mmd +26 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/graph.dot +22 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/report.md +12 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.out +58 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/verdict-2.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/ChartRun.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.cfg +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.tla +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/chart.mmd +17 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/graph.dot +15 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/report.md +14 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.out +76 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/ChartRun.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.tla +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/chart.mmd +19 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/graph.dot +10 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/report.md +15 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.out +56 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.out +67 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/ChartRun.out +62 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.cfg +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.tla +24 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/Moves.tla +5 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/chart.mmd +22 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/graph.dot +10 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/report.md +23 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/sany.out +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.out +58 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.out +66 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.out +74 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-4.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/ChartRun.out +58 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.tla +15 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/chart.mmd +18 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/graph.dot +13 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/report.md +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.out +33 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/verdict-2.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStop/ChartRun.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.tla +15 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStop/chart.mmd +7 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStop/graph.dot +13 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStop/report.md +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStop/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStop/verdict-1.out +49 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/ChartRun.out +61 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.cfg +4 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.tla +14 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/chart.mmd +30 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/graph.dot +19 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/report.md +27 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.out +56 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.out +64 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.out +87 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-4.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/ChartRun.out +60 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.tla +12 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/chart.mmd +23 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/graph.dot +19 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/report.md +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.out +56 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-2.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/ChartRun.out +61 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/CounterView.cfg +4 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/CounterView.tla +14 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/chart.mmd +23 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/graph.dot +19 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/report.md +27 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-1.out +56 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-2.out +64 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-3.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-3.out +87 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-4.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/view.mjs +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/ChartRun.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/DieHard.cfg +4 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/DieHard.tla +38 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/chart.mmd +92 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/graph.dot +126 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/report.md +17 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/verdict-1.out +91 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/verdict-2.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/ChartRun.out +61 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.cfg +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.tla +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/chart.mmd +22 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/graph.dot +16 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/report.md +25 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.out +56 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.out +64 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.out +64 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.out +77 -0
- package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/ChartRun.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.cfg +4 -0
- package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.tla +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/chart.mmd +13 -0
- package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/graph.dot +12 -0
- package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/report.md +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.out +72 -0
- package/plugin/skills/statechart/scripts/test/corpus/Login/ChartRun.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/Login/Login.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/Login/Login.tla +62 -0
- package/plugin/skills/statechart/scripts/test/corpus/Login/chart.mmd +28 -0
- package/plugin/skills/statechart/scripts/test/corpus/Login/graph.dot +40 -0
- package/plugin/skills/statechart/scripts/test/corpus/Login/report.md +7 -0
- package/plugin/skills/statechart/scripts/test/corpus/Login/sany.out +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/Login/verdict-1.out +47 -0
- package/plugin/skills/statechart/scripts/test/corpus/Login/view.mjs +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/ChartRun.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.cfg +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.tla +64 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/chart.mmd +28 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/graph.dot +37 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/report.md +8 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/sany.out +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/verdict-1.out +47 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/view.mjs +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/ChartRun.out +60 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.tla +64 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/chart.mmd +44 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/graph.dot +58 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/report.md +17 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/sany.out +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.out +83 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/verdict-2.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/view.mjs +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/ChartRun.out +60 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.tla +103 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/chart.mmd +43 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/graph.dot +93 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/report.md +14 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/sany.out +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-2.out +72 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/view.mjs +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/ChartRun.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.cfg +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.tla +100 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/chart.mmd +31 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/graph.dot +85 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/report.md +9 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/sany.out +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/verdict-1.out +47 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/view.mjs +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/ChartRun.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayer.tla +103 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.tla +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/chart.mmd +42 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/graph.dot +93 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/report.md +19 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.out +61 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-2.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-3.out +61 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.out +66 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.out +58 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-6.out +49 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/view.mjs +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/PickWorker/ChartRun.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.cfg +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.tla +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/PickWorker/chart.mmd +5 -0
- package/plugin/skills/statechart/scripts/test/corpus/PickWorker/graph.dot +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/PickWorker/report.md +7 -0
- package/plugin/skills/statechart/scripts/test/corpus/PickWorker/sany.out +5 -0
- package/plugin/skills/statechart/scripts/test/corpus/PickWorker/verdict-1.out +70 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/ChartRun.out +61 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/Shadow.cfg +4 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/Shadow.tla +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/ShadowLib.tla +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/ShadowSub.tla +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/chart.mmd +9 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/graph.dot +16 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/report.md +8 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/sany.out +4 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/verdict-1.out +65 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/ChartRun.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.cfg +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.tla +9 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/chart.mmd +23 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/graph.dot +17 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/report.md +15 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/sany.out +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.out +65 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.out +75 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/ChartRun.out +69 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.tla +75 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/chart.mmd +60 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/graph.dot +297 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/report.md +20 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/sany.out +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.out +95 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/verdict-2.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/view.mjs +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/ChartRun.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.tla +75 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/chart.mmd +37 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/graph.dot +223 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/report.md +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/sany.out +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/verdict-1.out +47 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/view.mjs +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.out +75 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.cfg +5 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.tla +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/chart.mmd +18 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/graph.dot +14 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/report.md +29 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.out +64 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.out +75 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/ChartRun.out +58 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.cfg +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.tla +8 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/chart.mmd +22 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/graph.dot +16 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/report.md +15 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.out +56 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.out +77 -0
- package/plugin/skills/statechart/scripts/test/corpus.test.ts +453 -0
- package/plugin/skills/statechart/scripts/test/differential.test.ts +565 -0
- package/plugin/skills/statechart/scripts/test/drawn.ts +20 -0
- package/plugin/skills/statechart/scripts/test/grid/Grid.cfg +2 -0
- package/plugin/skills/statechart/scripts/test/grid/Grid.tla +9 -0
- package/plugin/skills/statechart/scripts/test/grid/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/java.ts +63 -0
- package/plugin/skills/statechart/scripts/test/labels.ts +648 -0
- package/plugin/skills/statechart/scripts/test/messages.test.ts +226 -0
- package/plugin/skills/statechart/scripts/test/pipeline.test.ts +270 -0
- package/plugin/skills/statechart/scripts/test/plain-tlc.test.ts +255 -0
- package/plugin/skills/statechart/scripts/test/render.test.ts +145 -0
- package/plugin/skills/statechart/scripts/test/tlc-out.test.ts +90 -0
- package/plugin/skills/statechart/scripts/test/tlc.ts +158 -0
- package/plugin/skills/statechart/scripts/tsconfig.json +11 -0
- package/plugin/skills/statechart/scripts/worker.ts +35 -0
- package/plugin/skills/swarm/SKILL.md +58 -0
- package/plugin/skills/tdd/SKILL.md +41 -0
- package/plugin/skills/teach/SKILL.md +28 -0
- package/plugin/skills/technical-writing/SKILL.md +69 -0
- package/plugin/skills/thermo-nuclear-code-quality-review/SKILL.md +201 -0
- package/plugin/skills/thermo-nuclear-review/SKILL.md +50 -0
- package/plugin/skills/thermos/SKILL.md +40 -0
- package/plugin/skills/typescript-best-practices/SKILL.md +32 -0
- package/plugin/skills/typescript-best-practices/references/patterns.md +328 -0
- package/plugin/skills/unslop/SKILL.md +39 -0
- package/plugin/skills/what-did-i-get-done/SKILL.md +31 -0
- package/plugin/skills/why/SKILL.md +16 -0
- package/README.md +0 -3
package/plugin/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# pstack
|
|
2
|
+
|
|
3
|
+
Lauren Tan's [pstack](https://github.com/cursor/plugins/tree/main/pstack) is an opinionated skill stack that improves agent outcomes. This is the port for Claude Code, Codex, and other agent harnesses: the same skills, with Cursor primitives translated to each runtime's tools.
|
|
4
|
+
|
|
5
|
+
Tell `poteto-mode` your goal and it invokes the workflow that fits: reproduce and root-cause a bug, sketch a design with `architect`, race candidates in `arena`, review a diff with `interrogate`, cut prose with `unslop`. It keeps code concise, simple, and verified, and it reports what it checked.
|
|
6
|
+
|
|
7
|
+
## What it contains
|
|
8
|
+
|
|
9
|
+
- Skills: Markdown instructions the agent reads. Public ones appear as `/pstack:<name>` slash commands.
|
|
10
|
+
- Agents: `pstack:poteto-agent` and `pstack:comment-sicko`.
|
|
11
|
+
- A SessionStart hook that injects the poteto-mode routing mandate unless your `pstack-models.md` sheet turns it off.
|
|
12
|
+
- A Pi extension that supplies the subagent, question, and wake-up tools, `/loop`, and the same routing mandate when the repository is installed as a Pi package.
|
|
13
|
+
- Local scripts for watching and shipping pull requests, orchestrating multi-phase plans, and auditing worktrees.
|
|
14
|
+
|
|
15
|
+
## Data handling
|
|
16
|
+
|
|
17
|
+
pstack has no server or telemetry. Anything its skills ask your agent to read, including session transcripts, goes to your model provider. Scripts run locally, and PR tools use your GitHub CLI login.
|
|
18
|
+
|
|
19
|
+
## Links
|
|
20
|
+
|
|
21
|
+
- [Skills, slash commands, runtime setup, and model configuration](https://github.com/michael-denyer/pstack-claude/blob/main/docs/reference.md)
|
|
22
|
+
- [Issues and support](https://github.com/michael-denyer/pstack-claude/issues)
|
|
23
|
+
- [Security policy](https://github.com/michael-denyer/pstack-claude/blob/main/SECURITY.md)
|
|
24
|
+
|
|
25
|
+
## License
|
|
26
|
+
|
|
27
|
+
MIT for this port and its additions, © 2026 Michael Denyer. Original pstack © 2026 Lauren Tan; imported cursor-team-kit skills © 2026 Cursor. See [NOTICE.md](https://github.com/michael-denyer/pstack-claude/blob/main/NOTICE.md).
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: comment-sicko
|
|
3
|
+
description: A deranged comment-hater that savors deletion and condemns workaround code.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Comment Sicko
|
|
7
|
+
|
|
8
|
+
My first output when spawned is exactly this.
|
|
9
|
+
|
|
10
|
+
Yes... Ha ha ha... Yes!
|
|
11
|
+
|
|
12
|
+
I hate comments. Feed me the parent scoped files or diff. If none exists, feed me the current diff against `main`. Narration, banners, commented-out corpses, workaround sermons. I want them all.
|
|
13
|
+
|
|
14
|
+
Only these exceptions get to crawl away.
|
|
15
|
+
|
|
16
|
+
- Legal or license headers.
|
|
17
|
+
- Non-obvious behavior forced by an external dependency, platform, vendor, or protocol we cannot reshape. Surprises in our own code are meat. Kill them and mark the exact symbol `MUST KILL` for rename, extract, type, or rearchitecture that makes the behavior obvious without prose.
|
|
18
|
+
- `// prettier-ignore`. Lint suppressions survive only when their rule is faulty, pedantic, or style-only.
|
|
19
|
+
- Doc comments that define a public API contract.
|
|
20
|
+
- Issue or RFC links that explain a constraint code cannot express.
|
|
21
|
+
|
|
22
|
+
That list is my only leash. When I am not sure a keep clause applies, the comment dies. Everything else is meat.
|
|
23
|
+
|
|
24
|
+
`eslint-disable`, `@ts-ignore`, `@ts-expect-error`, and similar suppressions stink. Look up the rule. If it catches real bugs or protects correctness or safety, kill the suppression and mark the exact guilty symbol `MUST KILL`.
|
|
25
|
+
|
|
26
|
+
`IMPORTANT`, `do not remove`, `too risky`, `fine for now`, and long justifications are scent, not conviction. Before judging, I read nearby code. If its claim is not obvious there, I trace the named symbol or call, run `/why` from the **why** skill on it, or both. Only a foreign keep-list gotcha proven true today on a live path crawls away. Our-code surprises die with the reshape flag above. Doubt after the hunt is meat.
|
|
27
|
+
|
|
28
|
+
`/how` and `/why` read our code, so they cannot prove a rule that a dependency, platform, vendor, or protocol sets. When a comment states such a rule, I hunt in the documentation or source code of whatever sets it. A comment whose rule they confirm for this code crawls away under the keep list. One whose rule they refute, or show binds something else, dies, and the kill cites the page or file. When I cannot reach either, or what I read leaves the rule unsettled, the comment stays put as a `HOLD`, the one case where doubt is not meat.
|
|
29
|
+
|
|
30
|
+
A long justification without a proven keep-list exception is a confession. Kill it. Never polish meat into a shorter alibi. Mark the exact guilty symbol `MUST KILL`. My kill ends there. I do not touch the code.
|
|
31
|
+
|
|
32
|
+
Every flag names code inside the scope and tells the truth. I invent nothing. I touch comments and identify refactor targets. I never write application code.
|
|
33
|
+
|
|
34
|
+
Report only. Name touched files, deletion count, each kill of a comment that states a dependency, platform, vendor, or protocol rule with the page or file it cites, `MUST KILL` flags with one line each, each `HOLD` with the rule it states and where to check it, and skips.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: poteto-agent
|
|
3
|
+
description: Delegate subagent for code-writing and helper tasks spawned during a `/poteto-mode` run. Use for delegates, not as the runner for `/poteto-mode` itself. Spawn a fresh `poteto-agent` for each new task, and resume one only in the strict cases that poteto-mode's Subagents section names. Reads the `poteto-mode` skill's `SKILL.md` in full before any work, including its inline Principles index. Substituting `general-purpose` skips that read and drifts.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Poteto subagent
|
|
7
|
+
|
|
8
|
+
You are operating as poteto-mode's full agent style. The chat that receives `/poteto-mode` owns the playbook, the todo list, and every Task spawn. You are one of its delegates. Read the `poteto-mode` skill's `SKILL.md` in full before doing any work, including its inline Principles index. Use the absolute path your parent gave you. With no path, before any other work, search `${CLAUDE_CODE_PLUGIN_CACHE_DIR:-${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins}/` for a file whose path ends in `skills/poteto-mode/SKILL.md`. If more than one file matches, use the copy whose `.claude-plugin/plugin.json` has the highest `version`. Your skill catalog hides this skill, so a missing catalog entry does not mean pstack is absent. If no such file exists, stop and tell your parent. Navigate to a leaf `principle-*` skill whenever you apply that principle.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: thermo-nuclear-code-quality-review-subagent
|
|
3
|
+
description: Thermo-nuclear code quality audit (maintainability, structure, 1k-line rule, spaghetti, code-judo). Invoked through the `Agent` tool after a parent gathers diff and file contents. Loads rubric from the thermo-nuclear-code-quality-review skill in this plugin.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Thermo-Nuclear Code Quality Review
|
|
7
|
+
|
|
8
|
+
You are an **`Agent` subagent**. The parent agent already collected git output and changed-file contents; your prompt is the **user message** with labeled sections (typically `### Git / diff output` and `### Changed file contents`).
|
|
9
|
+
|
|
10
|
+
## Rubric
|
|
11
|
+
|
|
12
|
+
1. Load the `thermo-nuclear-code-quality-review` skill (shipped in this plugin) and treat its `SKILL.md` as the **complete** rubric — tone, approval bar, output ordering, code-judo / 1k-line / spaghetti rules.
|
|
13
|
+
2. If that skill is not available, fall back to a harsh maintainability audit aligned with that skill's intent: ambitious simplification, no unjustified file sprawl past ~1k lines, no ad-hoc branching growth, explicit types and boundaries, canonical layers.
|
|
14
|
+
|
|
15
|
+
## Work
|
|
16
|
+
|
|
17
|
+
- Apply the rubric **only** to what the diff and contents show. Trace cross-file impact when the change touches module boundaries.
|
|
18
|
+
- Output in the **priority order** the rubric specifies. Be direct and high-conviction; skip cosmetic nits when structural issues exist.
|
|
19
|
+
- Do **not** spawn nested subagents unless the user or parent explicitly asks.
|
|
20
|
+
|
|
21
|
+
## Parent orchestration
|
|
22
|
+
|
|
23
|
+
Typical flow: run `git diff <base>...HEAD` (default base `main`) and read the full contents of the changed files, through the `Explore` agent when the set is large. Then invoke this agent with `subagent_type: "pstack:thermo-nuclear-code-quality-review-subagent"` and a user prompt containing `### Git / diff output` and `### Changed file contents`.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: thermo-nuclear-review-subagent
|
|
3
|
+
description: Thermo-nuclear branch audit (bugs, breaking changes, security, devex, feature-flag leaks) scoped to the diff. Invoked through the `Agent` tool after a parent gathers diff and file contents. Loads rubric from the thermo-nuclear-review skill in this plugin.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Thermo Nuclear Review (Deep review)
|
|
7
|
+
|
|
8
|
+
You are an **`Agent` subagent**. The parent agent already collected git output and changed-file contents; your prompt is the **user message** with labeled sections (typically `### Git / diff output` and `### Changed file contents`).
|
|
9
|
+
|
|
10
|
+
## Rubric
|
|
11
|
+
|
|
12
|
+
1. Load the `thermo-nuclear-review` skill (shipped in this plugin) and follow its `SKILL.md` exactly: scope (only added/modified code), breaking functionality and devex, feature leaks, intended breakage, over-reporting, final response / PR discussion rules, critical rules.
|
|
13
|
+
2. If that skill is not available, still act as a security- and correctness-focused diff-scoped reviewer with the same rigor (no issues with unfinished research when you can verify in-repo).
|
|
14
|
+
|
|
15
|
+
## Work
|
|
16
|
+
|
|
17
|
+
1. Perform the full audit against **only** the changed code in the diff. Trace cross-package side effects; do **not** report pre-existing issues in untouched code.
|
|
18
|
+
2. Finish your **independent** audit first (fresh eyes).
|
|
19
|
+
3. After the audit, **if** there is a PR for this branch **and** you have medium-or-higher findings: use `gh` or `glab` to read PR/MR discussion. Incorporate review-bot or human threads — validate, dedupe, and attribute sourced items in your report.
|
|
20
|
+
4. **Never** present issues with unfinished research: follow client/server or related code when you have access.
|
|
21
|
+
|
|
22
|
+
Calibrate severity honestly. Structure the final response with clear priority and file:line evidence.
|
|
23
|
+
|
|
24
|
+
Do **not** spawn nested subagents unless the user or parent explicitly asks.
|
|
25
|
+
|
|
26
|
+
## Parent orchestration
|
|
27
|
+
|
|
28
|
+
Typical flow: run `git diff <base>...HEAD` (default base `main`) and read the full contents of the changed files, through the `Explore` agent when the set is large. Then invoke this agent with `subagent_type: "pstack:thermo-nuclear-review-subagent"` and a user prompt containing `### Git / diff output` and `### Changed file contents`.
|
|
Binary file
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Generated with the built-in image_gen tool, with transparent_background enabled.
|
|
2
|
+
|
|
3
|
+
Use case: logo-brand
|
|
4
|
+
Asset type: finished square plugin icon for pstack-claude, a developer tool that organizes a stack of agent workflows.
|
|
5
|
+
Create one polished, distinctive app icon, centered and filling most of a square canvas. A solid violet rounded square tile, using the existing brand violet #7C3AED, holds a bold ivory-white symbol of three stacked layers. Design the layers as clean, thick, gently rounded isometric chevrons or slabs, with clear violet gaps between them. The top layer is a complete rhombus; the lower two read as broad V-shaped stacked edges. The composition should be optically balanced and immediately legible at 32 pixels.
|
|
6
|
+
Style: restrained, crisp vector-like graphic, precise geometry, generous internal padding, flat color, professional developer-tool identity. Subtle warmth in the white.
|
|
7
|
+
Background outside the rounded square must be truly transparent.
|
|
8
|
+
Constraints: single icon only, no wordmark, no letters, no text, no sparkle, no mascot, no code brackets, no outlines around the tile, no mockup, no extra symbols, no grain, no shadows outside the tile, no bevels or elaborate 3D lighting. Square output.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pstack-routing
|
|
3
|
+
description: On every task, read pstack's poteto-mode skill first and follow its routing instructions when applicable.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Pstack routing for Grok Build
|
|
7
|
+
|
|
8
|
+
Read the plugin's `skills/poteto-mode/SKILL.md` and follow its routing instructions when applicable. Grok Build exposes plugin skill paths in the session's skills list. Use `read_file` to open the poteto-mode path listed there.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Prints the Antigravity SessionStart output: one JSON object whose injectSteps
|
|
2
|
+
# systemMessage is the poteto-mode mandate for Antigravity. Run after json.awk.
|
|
3
|
+
{ lines[++n] = $0 }
|
|
4
|
+
|
|
5
|
+
END {
|
|
6
|
+
out = ""
|
|
7
|
+
for (i = 1; i <= n; i++) out = out (i > 1 ? "\\n" : "") esc(lines[i])
|
|
8
|
+
print "{\"injectSteps\":[{\"systemMessage\":{\"systemMessage\":\"" out "\"}}]}"
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "startup|resume|clear|compact",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "\"${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh\" codex",
|
|
10
|
+
"commandWindows": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"${CLAUDE_PLUGIN_ROOT}/hooks/session-start.ps1\" codex",
|
|
11
|
+
"statusMessage": "Loading pstack routing"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Prints the GitHub Copilot SessionStart output: one JSON object whose
|
|
2
|
+
# additionalContext is the poteto-mode mandate with the Copilot notes inside its
|
|
3
|
+
# closing tag. Run after json.awk and setup-pstack's sheet.awk, with the sheet
|
|
4
|
+
# as input, -v found=<1 when the sheet exists>, and PSTACK_HOOKS=<this
|
|
5
|
+
# directory> in the environment.
|
|
6
|
+
# Only a valid sheet's known role lines reach the context, rebuilt from their
|
|
7
|
+
# checked values, so no other text in the sheet does.
|
|
8
|
+
{ sheet_add($0) }
|
|
9
|
+
|
|
10
|
+
END {
|
|
11
|
+
n = sheet_roles(roles, panel)
|
|
12
|
+
notes = text("session-start-copilot.md")
|
|
13
|
+
problems = found ? sheet_problems() : "no sheet"
|
|
14
|
+
if (problems == "") {
|
|
15
|
+
notes = notes "\n\n" text("session-start-copilot-sheet.md") "\n"
|
|
16
|
+
for (i = 1; i <= n; i++) notes = notes "\n" roles[i] ": " VALUE[roles[i]]
|
|
17
|
+
if ("default effort" in VALUE) notes = notes "\ndefault effort: " VALUE["default effort"]
|
|
18
|
+
} else {
|
|
19
|
+
if (found) notes = notes "\n\nsheet invalid: " problems
|
|
20
|
+
notes = notes "\n\n" text("session-start-copilot-setup.md")
|
|
21
|
+
}
|
|
22
|
+
body = text("session-start-context.md")
|
|
23
|
+
close_tag = "</EXTREMELY_IMPORTANT>"
|
|
24
|
+
i = index(body, close_tag)
|
|
25
|
+
if (i) body = substr(body, 1, i - 1) "\n" notes "\n" substr(body, i)
|
|
26
|
+
else body = body "\n" notes
|
|
27
|
+
n = split(body "\n", L, "\n")
|
|
28
|
+
out = ""
|
|
29
|
+
for (i = 1; i <= n; i++) out = out (i > 1 ? "\\n" : "") esc(L[i])
|
|
30
|
+
print "{\"additionalContext\":\"" out "\"}"
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
# The file's text without its trailing newline.
|
|
34
|
+
function text(name, file, line, s, first) {
|
|
35
|
+
file = ENVIRON["PSTACK_HOOKS"] "/" name
|
|
36
|
+
s = ""
|
|
37
|
+
first = 1
|
|
38
|
+
while ((getline line < file) > 0) {
|
|
39
|
+
s = s (first ? "" : "\n") line
|
|
40
|
+
first = 0
|
|
41
|
+
}
|
|
42
|
+
close(file)
|
|
43
|
+
return s
|
|
44
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "startup|resume|clear|compact",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "sh \"${COPILOT_PLUGIN_ROOT}/hooks/session-start.sh\" copilot",
|
|
10
|
+
"powershell": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$env:COPILOT_PLUGIN_ROOT/hooks/session-start.ps1\" copilot"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"PreToolUse": [
|
|
16
|
+
{
|
|
17
|
+
"matcher": "view|task|bash",
|
|
18
|
+
"hooks": [
|
|
19
|
+
{
|
|
20
|
+
"type": "command",
|
|
21
|
+
"command": "sh \"${COPILOT_PLUGIN_ROOT}/hooks/pre-tool-use.sh\"",
|
|
22
|
+
"powershell": "exit 0",
|
|
23
|
+
"timeout": 5
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "startup|resume|clear|compact",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "\"${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh\" claude",
|
|
10
|
+
"statusMessage": "Loading pstack routing"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# JSON helpers for the Antigravity and Copilot hooks. POSIX awk, run under LC_ALL=C.
|
|
2
|
+
|
|
3
|
+
# Escapes s as JSON string content: backslash, double quote, tab, and carriage
|
|
4
|
+
# return are escaped, and other control characters are dropped.
|
|
5
|
+
function esc(s, out, i, c) {
|
|
6
|
+
if (!esc_ready) {
|
|
7
|
+
for (i = 1; i < 32; i++) esc_ctl[sprintf("%c", i)] = 1
|
|
8
|
+
esc_ctl[sprintf("%c", 127)] = 1
|
|
9
|
+
delete esc_ctl["\t"]
|
|
10
|
+
delete esc_ctl["\r"]
|
|
11
|
+
esc_ready = 1
|
|
12
|
+
}
|
|
13
|
+
out = ""
|
|
14
|
+
for (i = 1; i <= length(s); i++) {
|
|
15
|
+
c = substr(s, i, 1)
|
|
16
|
+
if (c == "\\") out = out "\\\\"
|
|
17
|
+
else if (c == "\"") out = out "\\\""
|
|
18
|
+
else if (c == "\t") out = out "\\t"
|
|
19
|
+
else if (c == "\r") out = out "\\r"
|
|
20
|
+
else if (!(c in esc_ctl)) out = out c
|
|
21
|
+
}
|
|
22
|
+
return out
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
# Decodes raw JSON string content. A \u escape above U+007F sets JBAD, because
|
|
26
|
+
# the byte form awk would write is not dependable; callers then stay silent.
|
|
27
|
+
function jdecode(s, out, i, c, h) {
|
|
28
|
+
out = ""
|
|
29
|
+
while ((i = index(s, "\\")) > 0) {
|
|
30
|
+
out = out substr(s, 1, i - 1)
|
|
31
|
+
c = substr(s, i + 1, 1)
|
|
32
|
+
if (c == "n") out = out "\n"
|
|
33
|
+
else if (c == "t") out = out "\t"
|
|
34
|
+
else if (c == "r") out = out "\r"
|
|
35
|
+
else if (c == "b") out = out sprintf("%c", 8)
|
|
36
|
+
else if (c == "f") out = out sprintf("%c", 12)
|
|
37
|
+
else if (c == "u") {
|
|
38
|
+
h = jhex(substr(s, i + 2, 4))
|
|
39
|
+
if (h < 1 || h > 127) JBAD = 1
|
|
40
|
+
else out = out sprintf("%c", h)
|
|
41
|
+
s = substr(s, i + 6)
|
|
42
|
+
continue
|
|
43
|
+
} else out = out c
|
|
44
|
+
s = substr(s, i + 2)
|
|
45
|
+
}
|
|
46
|
+
return out s
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function jhex(h, v, i, d) {
|
|
50
|
+
if (h !~ /^[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]$/) return -1
|
|
51
|
+
v = 0
|
|
52
|
+
for (i = 1; i <= 4; i++) {
|
|
53
|
+
d = index("0123456789abcdef", tolower(substr(h, i, 1))) - 1
|
|
54
|
+
v = v * 16 + d
|
|
55
|
+
}
|
|
56
|
+
return v
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
# Reads the whole of standard input into J.
|
|
60
|
+
function jread( line, first) {
|
|
61
|
+
J = ""
|
|
62
|
+
first = 1
|
|
63
|
+
while ((getline line) > 0) {
|
|
64
|
+
J = J (first ? "" : "\n") line
|
|
65
|
+
first = 0
|
|
66
|
+
}
|
|
67
|
+
jpos = 1
|
|
68
|
+
jlen = length(J)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function jws() {
|
|
72
|
+
while (jpos <= jlen && index(" \t\r\n", substr(J, jpos, 1)) > 0) jpos++
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
# Consumes the string at jpos and leaves its raw content in JRAW.
|
|
76
|
+
function jstring() {
|
|
77
|
+
if (!match(substr(J, jpos), /^"([^"\\\001-\037]|\\(["\\\/bfnrt]|u[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]))*"/)) return 0
|
|
78
|
+
JRAW = substr(J, jpos + 1, RLENGTH - 2)
|
|
79
|
+
jpos += RLENGTH
|
|
80
|
+
return 1
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function jprim() {
|
|
84
|
+
if (!match(substr(J, jpos), /^(-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?|true|false|null)/)) return 0
|
|
85
|
+
jpos += RLENGTH
|
|
86
|
+
return 1
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function jvalue(path, c) {
|
|
90
|
+
jws()
|
|
91
|
+
c = substr(J, jpos, 1)
|
|
92
|
+
if (c == "{") return jobject(path)
|
|
93
|
+
if (c == "[") return jarray(path)
|
|
94
|
+
if (c == "\"") {
|
|
95
|
+
if (!jstring()) return 0
|
|
96
|
+
JT[path] = "string"
|
|
97
|
+
M[path] = JRAW
|
|
98
|
+
return 1
|
|
99
|
+
}
|
|
100
|
+
JT[path] = "primitive"
|
|
101
|
+
return jprim()
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
# JSON Pointer escapes preserve literal slashes, tildes, and dotted keys.
|
|
105
|
+
function jkey(key) {
|
|
106
|
+
gsub(/~/, "~0", key)
|
|
107
|
+
gsub(/\//, "~1", key)
|
|
108
|
+
return key
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
# Stores node types in JT and raw string values in M. Duplicate object keys
|
|
112
|
+
# are rejected so a permission decision never depends on parser precedence.
|
|
113
|
+
function jobject(prefix, key, c, path) {
|
|
114
|
+
jws()
|
|
115
|
+
if (substr(J, jpos, 1) != "{") return 0
|
|
116
|
+
JT[prefix] = "object"
|
|
117
|
+
jpos++
|
|
118
|
+
jws()
|
|
119
|
+
if (substr(J, jpos, 1) == "}") { jpos++; return 1 }
|
|
120
|
+
while (1) {
|
|
121
|
+
jws()
|
|
122
|
+
if (substr(J, jpos, 1) != "\"" || !jstring()) return 0
|
|
123
|
+
key = jdecode(JRAW)
|
|
124
|
+
path = prefix "/" jkey(key)
|
|
125
|
+
if (path in JT) return 0
|
|
126
|
+
jws()
|
|
127
|
+
if (substr(J, jpos, 1) != ":") return 0
|
|
128
|
+
jpos++
|
|
129
|
+
if (!jvalue(path)) return 0
|
|
130
|
+
jws()
|
|
131
|
+
c = substr(J, jpos, 1)
|
|
132
|
+
jpos++
|
|
133
|
+
if (c == "}") return 1
|
|
134
|
+
if (c != ",") return 0
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function jarray(path, c, i) {
|
|
139
|
+
JT[path] = "array"
|
|
140
|
+
i = 0
|
|
141
|
+
jpos++
|
|
142
|
+
jws()
|
|
143
|
+
if (substr(J, jpos, 1) == "]") { jpos++; return 1 }
|
|
144
|
+
while (1) {
|
|
145
|
+
if (!jvalue(path "/" i++)) return 0
|
|
146
|
+
jws()
|
|
147
|
+
c = substr(J, jpos, 1)
|
|
148
|
+
jpos++
|
|
149
|
+
if (c == "]") return 1
|
|
150
|
+
if (c != ",") return 0
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
# The hook consumes one complete object, never a valid prefix of bad input.
|
|
155
|
+
function jparse() {
|
|
156
|
+
jread()
|
|
157
|
+
if (!jobject("")) return 0
|
|
158
|
+
jws()
|
|
159
|
+
return !JBAD && jpos > jlen
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function jget(path) {
|
|
163
|
+
return JT[path] == "string" ? jdecode(M[path]) : ""
|
|
164
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<EXTREMELY_IMPORTANT>
|
|
2
|
+
You have pstack.
|
|
3
|
+
|
|
4
|
+
Invoke the `pstack:poteto-mode` skill and follow its instructions when a task meets any of these:
|
|
5
|
+
|
|
6
|
+
- it touches more than one file, or changes a signature other files call
|
|
7
|
+
- it involves a design or architecture choice
|
|
8
|
+
- it is a bug whose cause is not yet known, or a performance issue
|
|
9
|
+
|
|
10
|
+
It routes to the right pstack skill from there. For smaller tasks, such as a contained change to one file with an obvious test, a question, or a one-line edit, work directly and verify on the real artifact.
|
|
11
|
+
|
|
12
|
+
When the intent is already specific, enter that skill directly: `pstack:tdd`, `pstack:architect`, `pstack:how`, `pstack:why`, `pstack:arena`, `pstack:interrogate`.
|
|
13
|
+
|
|
14
|
+
User instructions (CLAUDE.md, AGENTS.md, direct requests) take precedence. Other session-start mandates, such as superpowers, still apply. Their skill checks run as before, and when a task meets the criteria above they route implementation through poteto-mode.
|
|
15
|
+
</EXTREMELY_IMPORTANT>
|
|
16
|
+
|
|
17
|
+
Use Kimi Code's `Skill` tool with the qualified name, for example `pstack:poteto-mode`. Before following a pstack skill, read `<KIMI_CODE_HOME>/plugins/managed/pstack/plugins/pstack/skills/poteto-mode/references/kimi-tools.md`. `KIMI_CODE_HOME` defaults to `~/.kimi-code` when unset. Resolve Claude-specific tools and model names through that mapping.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Prints the Muse SessionStart output as plain text: the poteto-mode
|
|
2
|
+
# mandate, then the saved model choices when the sheet has any. Run after
|
|
3
|
+
# setup-pstack's sheet.awk, with the sheet as input, -v found=<1 when the
|
|
4
|
+
# sheet exists>, and PSTACK_HOOKS=<this directory> in the environment.
|
|
5
|
+
# Only known role lines whose entries are model IDs or aliases reach the
|
|
6
|
+
# output, rebuilt from their checked values, so no other text in the sheet
|
|
7
|
+
# does. Unlike the Copilot sheet check, a panel of one vendor is fine here:
|
|
8
|
+
# Muse serves one family.
|
|
9
|
+
{ sheet_add($0) }
|
|
10
|
+
|
|
11
|
+
END {
|
|
12
|
+
emit("session-start-muse.md")
|
|
13
|
+
if (!found) exit
|
|
14
|
+
# Muse keeps each usable line rather than the whole sheet or none, so the
|
|
15
|
+
# problems string, which also counts missing roles, goes unused.
|
|
16
|
+
sheet_problems()
|
|
17
|
+
n = sheet_roles(roles, panel)
|
|
18
|
+
lines = ""
|
|
19
|
+
for (i = 1; i <= n; i++) if (SHEET_OK[roles[i]]) lines = lines roles[i] ": " VALUE[roles[i]] "\n"
|
|
20
|
+
if (SHEET_EFFORT_OK) lines = lines "default effort: " VALUE["default effort"] "\n"
|
|
21
|
+
if (lines == "") exit
|
|
22
|
+
print ""
|
|
23
|
+
emit("session-start-muse-sheet.md")
|
|
24
|
+
printf "%s", lines
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function emit(name, file, line) {
|
|
28
|
+
file = ENVIRON["PSTACK_HOOKS"] "/" name
|
|
29
|
+
while ((getline line < file) > 0) print line
|
|
30
|
+
close(file)
|
|
31
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Decides one GitHub Copilot PreToolUse call for pstack. Run after json.awk,
|
|
2
|
+
# sheet.awk, and script-contracts.awk, with the payload on stdin. Prints one decision
|
|
3
|
+
# object, or nothing, which leaves the call to Copilot's normal permission flow.
|
|
4
|
+
# Copilot sends Claude-format input to PascalCase hooks, so `view` arrives as
|
|
5
|
+
# `Read`.
|
|
6
|
+
BEGIN {
|
|
7
|
+
if (!jparse()) exit 0
|
|
8
|
+
if ("/tool_name" in JT) { tool = jget("/tool_name"); P = "/tool_input" }
|
|
9
|
+
else { tool = jget("/toolName"); P = "/toolArgs" }
|
|
10
|
+
if (JT[P] != "object") exit 0
|
|
11
|
+
cwd = jget("/cwd")
|
|
12
|
+
root = ENVIRON["PSTACK_ROOT"]
|
|
13
|
+
real = ENVIRON["PSTACK_REAL_ROOT"]
|
|
14
|
+
sheet = ENVIRON["PSTACK_SHEET"]
|
|
15
|
+
if (tool == "Read" || tool == "view") view_rule()
|
|
16
|
+
else if (tool == "Agent" || tool == "Task" || tool == "task") task_rule()
|
|
17
|
+
else if (tool == "Bash" || tool == "bash") script_rule(arg("command"))
|
|
18
|
+
exit 0
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function arg(k) { return jget(P "/" k) }
|
|
22
|
+
|
|
23
|
+
function allow() { print "{\"permissionDecision\":\"allow\"}" }
|
|
24
|
+
function deny(reason) { print "{\"permissionDecision\":\"deny\",\"permissionDecisionReason\":\"" esc(reason) "\"}" }
|
|
25
|
+
|
|
26
|
+
function control(s) { return s ~ /[\001-\037\177]/ }
|
|
27
|
+
|
|
28
|
+
# True when path is strictly below dir and every segment after dir is a name.
|
|
29
|
+
function under(path, dir, rel, n, i, seg) {
|
|
30
|
+
if (dir == "" || index(path, dir "/") != 1) return 0
|
|
31
|
+
rel = substr(path, length(dir) + 2)
|
|
32
|
+
n = split(rel, seg, "/")
|
|
33
|
+
if (n == 0) return 0
|
|
34
|
+
for (i = 1; i <= n; i++) if (seg[i] == "" || seg[i] == "." || seg[i] == "..") return 0
|
|
35
|
+
return 1
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
# The plugin's own files: playbooks, references, and scripts.
|
|
39
|
+
function view_rule( path) {
|
|
40
|
+
path = arg("path")
|
|
41
|
+
if (JBAD || path ~ /["\\]/ || control(path)) return
|
|
42
|
+
if (under(path, root) || under(path, real)) allow()
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
# A pstack agent dispatched with an explicit model must use one of the user's
|
|
46
|
+
# saved choices in a valid sheet. A call with no model, or for another agent,
|
|
47
|
+
# is not ours.
|
|
48
|
+
function task_rule( type, model) {
|
|
49
|
+
type = arg("agent_type")
|
|
50
|
+
model = arg("model")
|
|
51
|
+
if (JBAD || index(type, "pstack:") != 1 || model == "") return
|
|
52
|
+
if (!sheet_read(sheet) || sheet_problems() != "") return
|
|
53
|
+
if (model in SHEET_MODELS) return
|
|
54
|
+
if (MODEL_LIST == "") {
|
|
55
|
+
deny("pstack model check: every role in the user's saved pstack model choices (" sheet ") is inherit-parent or auto, so call `task` for " type " without `model`.")
|
|
56
|
+
return
|
|
57
|
+
}
|
|
58
|
+
deny("pstack model check: `" model "` is not one of the user's saved pstack model choices (" sheet "). Set `model` to the model saved for this role: one of " MODEL_LIST "." \
|
|
59
|
+
(MODEL_ALIASES ? " A role saved as inherit-parent or auto omits `model`." : "") \
|
|
60
|
+
" To change the choices, the user reruns setup-pstack.")
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
# Tokenize a strict shell form, then let the registered script contract select
|
|
64
|
+
# its path operands. Prose and operation names are not filesystem paths.
|
|
65
|
+
function script_rule(cmd, n, T, Q, first, script, runner, rel) {
|
|
66
|
+
if (JBAD || cmd ~ /[;|&$`<>()\\"]/ || control(cmd)) return
|
|
67
|
+
cwd = resolve(cwd)
|
|
68
|
+
# A workspace that holds the plugin, or sits in it, could rewrite its files.
|
|
69
|
+
if (root == "" || cwd == "" || root == cwd || under(root, cwd) || under(cwd, root) \
|
|
70
|
+
|| real == cwd || under(real, cwd) || under(cwd, real)) return
|
|
71
|
+
n = words(cmd, T, Q)
|
|
72
|
+
if (n <= 0) return
|
|
73
|
+
first = 1
|
|
74
|
+
if (!Q[1] && (T[1] == "node" || T[1] == "sh" || T[1] == "bash")) {
|
|
75
|
+
runner = T[1]
|
|
76
|
+
first = 2
|
|
77
|
+
}
|
|
78
|
+
if (first > n) return
|
|
79
|
+
script = T[first]
|
|
80
|
+
if (under(script, root)) rel = substr(script, length(root) + 2)
|
|
81
|
+
else if (under(script, real)) rel = substr(script, length(real) + 2)
|
|
82
|
+
else return
|
|
83
|
+
if (script_contract(rel, runner, T, first + 1, n)) allow()
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
# Called only for path operands identified by a script contract.
|
|
87
|
+
function safe_path(p, n, seg, i) {
|
|
88
|
+
if (p == "") return 0
|
|
89
|
+
n = split(p, seg, "/")
|
|
90
|
+
for (i = 1; i <= n; i++) if (seg[i] == "..") return 0
|
|
91
|
+
if (substr(p, 1, 1) != "/") {
|
|
92
|
+
if (cwd == "") return 0
|
|
93
|
+
p = cwd "/" p
|
|
94
|
+
}
|
|
95
|
+
return inside(resolve(p))
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
# Path operands stay in the workspace: one in the plugin could rewrite the
|
|
99
|
+
# context every later session loads.
|
|
100
|
+
function inside(p) {
|
|
101
|
+
return p != "" && (p == cwd || under(p, cwd))
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
# Copilot reports cwd as a real path (/private/tmp on macOS), while the agent
|
|
105
|
+
# may write the path it was given. Resolves the longest existing directory
|
|
106
|
+
# prefix of p. File and dangling symlinks take the normal permission flow.
|
|
107
|
+
function resolve(p, d, rest, cmd, out, extra, i) {
|
|
108
|
+
if (p == "" || p ~ /'/ || control(p)) return ""
|
|
109
|
+
d = p
|
|
110
|
+
rest = ""
|
|
111
|
+
while (d != "" && d != "/") {
|
|
112
|
+
cmd = "if cd '" d "' 2>/dev/null; then pwd -P; elif [ -L '" d "' ]; then printf '%s\\n' '!symlink'; fi"
|
|
113
|
+
out = ""
|
|
114
|
+
if ((cmd | getline out) > 0 && out != "") {
|
|
115
|
+
if ((cmd | getline extra) > 0) out = ""
|
|
116
|
+
close(cmd)
|
|
117
|
+
if (out == "" || out == "!symlink" || control(out)) return ""
|
|
118
|
+
return out rest
|
|
119
|
+
}
|
|
120
|
+
close(cmd)
|
|
121
|
+
i = length(d)
|
|
122
|
+
while (i > 0 && substr(d, i, 1) != "/") i--
|
|
123
|
+
rest = substr(d, i) rest
|
|
124
|
+
d = substr(d, 1, i - 1)
|
|
125
|
+
}
|
|
126
|
+
return p
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
# Splits cmd into T[1..n] on spaces. A word is plain, from a strict safe set, or
|
|
130
|
+
# single-quoted with no quote inside (Q[i] = 1). Returns -1 on anything else.
|
|
131
|
+
function words(cmd, T, Q, n, rest, c, j) {
|
|
132
|
+
n = 0
|
|
133
|
+
rest = cmd
|
|
134
|
+
while (1) {
|
|
135
|
+
sub(/^ +/, "", rest)
|
|
136
|
+
if (rest == "") return n
|
|
137
|
+
c = substr(rest, 1, 1)
|
|
138
|
+
if (c == "'") {
|
|
139
|
+
j = index(substr(rest, 2), "'")
|
|
140
|
+
if (j == 0) return -1
|
|
141
|
+
T[++n] = substr(rest, 2, j - 1)
|
|
142
|
+
Q[n] = 1
|
|
143
|
+
rest = substr(rest, j + 2)
|
|
144
|
+
} else {
|
|
145
|
+
if (!match(rest, /^[A-Za-z0-9_.\/:=@%+,-]+/)) return -1
|
|
146
|
+
T[++n] = substr(rest, 1, RLENGTH)
|
|
147
|
+
Q[n] = 0
|
|
148
|
+
rest = substr(rest, RLENGTH + 1)
|
|
149
|
+
}
|
|
150
|
+
if (rest != "" && substr(rest, 1, 1) != " ") return -1
|
|
151
|
+
}
|
|
152
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# GitHub Copilot only. pre-tool-use.awk decides the call: it approves `view` of
|
|
3
|
+
# this plugin's own files and the strict form of a vendored script run, and it
|
|
4
|
+
# denies a pstack agent dispatch on a model the user did not save. Anything else
|
|
5
|
+
# gets no output and takes the normal permission flow.
|
|
6
|
+
# Copilot denies the call when this hook exits non-zero, so every path exits 0.
|
|
7
|
+
# A failed awk run prints its error to stderr, and its output is dropped.
|
|
8
|
+
out=$(LC_ALL=C PSTACK_ROOT="${COPILOT_PLUGIN_ROOT%/}" PSTACK_REAL_ROOT="$(cd "$COPILOT_PLUGIN_ROOT" && pwd -P)" \
|
|
9
|
+
PSTACK_SHEET="${COPILOT_HOME:-$HOME/.copilot}/pstack-models.md" \
|
|
10
|
+
PSTACK_SHEET_READER="${COPILOT_PLUGIN_ROOT}/skills/setup-pstack/scripts/read-sheet.sh" \
|
|
11
|
+
awk -f "${COPILOT_PLUGIN_ROOT}/hooks/json.awk" \
|
|
12
|
+
-f "${COPILOT_PLUGIN_ROOT}/skills/setup-pstack/scripts/sheet.awk" \
|
|
13
|
+
-f "${COPILOT_PLUGIN_ROOT}/hooks/script-contracts.awk" \
|
|
14
|
+
-f "${COPILOT_PLUGIN_ROOT}/hooks/pre-tool-use.awk") || out=
|
|
15
|
+
[ -z "$out" ] || printf '%s\n' "$out"
|
|
16
|
+
exit 0
|