pi-pstack-native 0.0.0-stage → 1.0.0
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/ACCEPTANCE.md +40 -0
- package/CHANGELOG.md +75 -0
- package/CONTRIBUTING.md +29 -0
- package/IMPLEMENTATION.md +38 -0
- package/INSTALLATION-CHECK.md +13 -0
- package/LICENSE +21 -0
- package/NOTICE.md +14 -0
- package/PARITY.json +133 -0
- package/PARITY.md +156 -0
- package/PRD.md +2131 -0
- package/README.md +103 -2
- package/README.zh-CN.md +137 -0
- package/REVIEW.md +24 -0
- package/SECURITY.md +17 -0
- package/SEMANTICS.json +2852 -0
- package/UPSTREAM.json +32 -0
- package/agents/architect.md +3 -0
- package/agents/comment-sicko.md +3 -0
- package/agents/integrator.md +6 -0
- package/agents/poteto-agent.md +3 -0
- package/agents/reviewer.md +3 -0
- package/agents/scout.md +3 -0
- package/agents/synthesizer.md +3 -0
- package/agents/verifier.md +3 -0
- package/agents/worker.md +3 -0
- package/benchmarks/cases.json +354 -0
- package/dist/agent/candidates.d.ts +13 -0
- package/dist/agent/candidates.js +50 -0
- package/dist/agent/grep-worker.mjs +46 -0
- package/dist/agent/host.d.ts +47 -0
- package/dist/agent/host.js +480 -0
- package/dist/agent/isolation.d.ts +3 -0
- package/dist/agent/isolation.js +12 -0
- package/dist/agent/outcome.d.ts +8 -0
- package/dist/agent/outcome.js +15 -0
- package/dist/agent/profiles.d.ts +5 -0
- package/dist/agent/profiles.js +128 -0
- package/dist/agent/read-only-tools.d.ts +1 -0
- package/dist/agent/read-only-tools.js +150 -0
- package/dist/agent/resources.d.ts +15 -0
- package/dist/agent/resources.js +77 -0
- package/dist/api.d.ts +18 -0
- package/dist/api.js +18 -0
- package/dist/artifacts/fingerprint.d.ts +29 -0
- package/dist/artifacts/fingerprint.js +75 -0
- package/dist/compatibility/adapter.d.ts +66 -0
- package/dist/compatibility/adapter.js +110 -0
- package/dist/compatibility/source.d.ts +2 -0
- package/dist/compatibility/source.js +38 -0
- package/dist/compatibility/tool.d.ts +2 -0
- package/dist/compatibility/tool.js +59 -0
- package/dist/context/snapshot.d.ts +37 -0
- package/dist/context/snapshot.js +12 -0
- package/dist/contracts/brief.d.ts +19 -0
- package/dist/contracts/brief.js +198 -0
- package/dist/contracts/types.d.ts +192 -0
- package/dist/contracts/types.js +1 -0
- package/dist/delivery/frontier.d.ts +61 -0
- package/dist/delivery/frontier.js +123 -0
- package/dist/delivery/git.d.ts +2 -0
- package/dist/delivery/git.js +12 -0
- package/dist/delivery/prepare.d.ts +18 -0
- package/dist/delivery/prepare.js +30 -0
- package/dist/delivery/provider.d.ts +31 -0
- package/dist/delivery/provider.js +42 -0
- package/dist/delivery/review-threads.d.ts +18 -0
- package/dist/delivery/review-threads.js +39 -0
- package/dist/delivery/stack.d.ts +32 -0
- package/dist/delivery/stack.js +91 -0
- package/dist/extension.d.ts +2 -0
- package/dist/extension.js +320 -0
- package/dist/loop/scheduler.d.ts +53 -0
- package/dist/loop/scheduler.js +334 -0
- package/dist/loop/store.d.ts +16 -0
- package/dist/loop/store.js +66 -0
- package/dist/models/router.d.ts +25 -0
- package/dist/models/router.js +183 -0
- package/dist/program/coordinator.d.ts +75 -0
- package/dist/program/coordinator.js +169 -0
- package/dist/program/dispatch.d.ts +20 -0
- package/dist/program/dispatch.js +82 -0
- package/dist/runner/cli.mjs +46 -0
- package/dist/runner/lease.d.ts +10 -0
- package/dist/runner/lease.js +24 -0
- package/dist/runner/service.d.ts +8 -0
- package/dist/runner/service.js +66 -0
- package/dist/runtime/checkout.d.ts +3 -0
- package/dist/runtime/checkout.js +20 -0
- package/dist/runtime/config.d.ts +7 -0
- package/dist/runtime/config.js +46 -0
- package/dist/runtime/errors.d.ts +2 -0
- package/dist/runtime/errors.js +10 -0
- package/dist/runtime/home.d.ts +11 -0
- package/dist/runtime/home.js +15 -0
- package/dist/runtime/lock.d.ts +12 -0
- package/dist/runtime/lock.js +123 -0
- package/dist/runtime/migrate.d.ts +9 -0
- package/dist/runtime/migrate.js +44 -0
- package/dist/runtime/ownership.d.ts +4 -0
- package/dist/runtime/ownership.js +6 -0
- package/dist/runtime/protocol.d.ts +24 -0
- package/dist/runtime/protocol.js +35 -0
- package/dist/runtime/redact.d.ts +3 -0
- package/dist/runtime/redact.js +32 -0
- package/dist/runtime/store.d.ts +6 -0
- package/dist/runtime/store.js +75 -0
- package/dist/runtime/transaction.d.ts +4 -0
- package/dist/runtime/transaction.js +44 -0
- package/dist/runtime/types.d.ts +202 -0
- package/dist/runtime/types.js +1 -0
- package/dist/runtime/upstream.d.ts +2 -0
- package/dist/runtime/upstream.js +8 -0
- package/dist/setup/command.d.ts +2 -0
- package/dist/setup/command.js +423 -0
- package/dist/statechart/backends/cfg.js +31 -0
- package/dist/statechart/backends/mermaid.js +223 -0
- package/dist/statechart/backends/plain-text.js +68 -0
- package/dist/statechart/backends/report.js +123 -0
- package/dist/statechart/frontends/config.js +258 -0
- package/dist/statechart/frontends/dot.js +68 -0
- package/dist/statechart/frontends/marks.js +102 -0
- package/dist/statechart/frontends/messages.js +53 -0
- package/dist/statechart/frontends/spec.js +89 -0
- package/dist/statechart/frontends/trace.js +24 -0
- package/dist/statechart/frontends/value.js +181 -0
- package/dist/statechart/frontends/verdict.js +38 -0
- package/dist/statechart/frontends/view.js +107 -0
- package/dist/statechart/ir.js +317 -0
- package/dist/statechart/passes/annotate.js +102 -0
- package/dist/statechart/passes/label.js +217 -0
- package/dist/statechart/passes/lift.js +89 -0
- package/dist/statechart/passes/loop-check.js +57 -0
- package/dist/statechart/passes/paths.js +50 -0
- package/dist/statechart/passes/reach.js +134 -0
- package/dist/statechart/passes/region-check.js +94 -0
- package/dist/statechart/passes/regions.js +296 -0
- package/dist/statechart/pipeline.js +63 -0
- package/dist/statechart/run.js +432 -0
- package/dist/statechart/statechart.js +149 -0
- package/dist/statechart/worker.js +40 -0
- package/dist/telemetry/metrics.d.ts +13 -0
- package/dist/telemetry/metrics.js +11 -0
- package/dist/templates/build.d.ts +35 -0
- package/dist/templates/build.js +172 -0
- package/dist/tools/agents.d.ts +3 -0
- package/dist/tools/agents.js +74 -0
- package/dist/tools/graph.d.ts +3 -0
- package/dist/tools/graph.js +35 -0
- package/dist/tools/protocol.d.ts +3 -0
- package/dist/tools/protocol.js +77 -0
- package/dist/tools/schema.d.ts +7 -0
- package/dist/tools/schema.js +6 -0
- package/dist/tools/workflow.d.ts +3 -0
- package/dist/tools/workflow.js +137 -0
- package/dist/tools/worktrees.d.ts +3 -0
- package/dist/tools/worktrees.js +35 -0
- package/dist/verification/process.mjs +9 -0
- package/dist/verification/runner.d.ts +23 -0
- package/dist/verification/runner.js +259 -0
- package/dist/workflow/artifacts.d.ts +10 -0
- package/dist/workflow/artifacts.js +102 -0
- package/dist/workflow/engine.d.ts +58 -0
- package/dist/workflow/engine.js +725 -0
- package/dist/workflow/graph.d.ts +10 -0
- package/dist/workflow/graph.js +60 -0
- package/dist/worktree/manager.d.ts +20 -0
- package/dist/worktree/manager.js +68 -0
- package/dist/worktree/snapshot.d.ts +2 -0
- package/dist/worktree/snapshot.js +43 -0
- package/docs/DEPENDENCIES.md +35 -0
- package/docs/LIVE-TEST-PLAN.zh-CN.md +161 -0
- package/docs/ML-WORKFLOWS.zh-CN.md +49 -0
- package/docs/PI-SEMANTIC-ADAPTER.md +34 -0
- package/docs/PR-41-ALIGNMENT-PLAN.zh-CN.md +30 -0
- package/docs/PR-PROTOCOL.md +48 -0
- package/docs/PUBLISHING.md +61 -0
- package/docs/README.md +30 -0
- package/docs/REFERENCE.md +357 -0
- package/docs/SEMANTIC-COMPATIBILITY.md +135 -0
- package/docs/STATECHART.md +13 -0
- package/docs/UPSTREAM-0.15.17.md +51 -0
- package/docs/VALIDATION.md +59 -0
- package/docs/WINDOWS-MODEL-TEST.zh-CN.md +27 -0
- package/docs/evidence/live-github-5deb723.json +44 -0
- package/docs/evidence/semantic-smoke-5deb723.json +49 -0
- package/docs/parity.test.mjs +84 -0
- package/docs/registry-records-0.15.32.json +2161 -0
- package/docs/registry-records-0.15.36.json +2161 -0
- package/docs/stacked-pr-body.md +23 -0
- package/docs/upstream-dispositions-0.15.36.json +2408 -0
- package/docs/upstream-inventory-0.15.36.json +15754 -0
- package/docs/upstream-provenance-0.15.17.json +62 -0
- package/docs/upstream-provenance-0.15.32.json +11 -0
- package/docs/upstream-provenance-0.15.36.json +11 -0
- package/docs/upstream-sync/IMPLEMENTATION.md +114 -0
- package/docs/upstream-sync/PORT-0.15.23.md +142 -0
- package/docs/upstream-sync/PR-PORT-0.15.23.md +28 -0
- package/docs/upstream-sync/VALIDATION.md +76 -0
- package/docs/upstream-sync/candidate-0.15.23.json +632 -0
- package/docs/upstream-sync/reports/978ca6e9c0e0_837067b75aa2-e928d281378110a3.json +2166 -0
- package/docs/upstream-sync/reports/978ca6e9c0e0_837067b75aa2-e928d281378110a3.md +440 -0
- package/docs/upstream-sync/reports/978ca6e9c0e0_837067b75aa2.json +2161 -0
- package/docs/upstream-sync/reports/978ca6e9c0e0_837067b75aa2.md +440 -0
- package/docs/upstream-sync/tasks/978ca6e9c0e0_837067b75aa2-e928d281378110a3.md +440 -0
- package/docs/upstream-sync/tasks/978ca6e9c0e0_837067b75aa2.md +440 -0
- package/docs/upstream-sync-0.15.17.json +521 -0
- package/docs/upstream-sync-0.15.32.json +106 -0
- package/docs/upstream-sync-0.15.36.json +106 -0
- package/docs/upstream-target-0.15.36.json +3456 -0
- package/docs/upstream-upgrade-0.15.32.json +12140 -0
- package/docs/upstream-upgrade-0.15.32.md +23 -0
- package/docs/upstream-upgrade-0.15.36.md +7 -0
- package/docs/validate-pr.mjs +74 -0
- package/examples/README.md +45 -0
- package/examples/strict-brief.json +14 -0
- package/examples/verification-policy.json +8 -0
- package/package.json +152 -4
- package/scripts/benchmark.mjs +39 -0
- package/scripts/build-statechart.mjs +30 -0
- package/scripts/build.mjs +11 -0
- package/scripts/check-benchmark.mjs +27 -0
- package/scripts/check-contracts.mjs +15 -0
- package/scripts/check-e2e.mjs +86 -0
- package/scripts/check-inventory.mjs +24 -0
- package/scripts/check-package.mjs +17 -0
- package/scripts/check-parity.mjs +4 -0
- package/scripts/check-plan.mjs +206 -0
- package/scripts/check-records.mjs +35 -0
- package/scripts/check-semantics.mjs +7 -0
- package/scripts/check-statechart.mjs +13 -0
- package/scripts/check-syntax.mjs +9 -0
- package/scripts/check-windows-build.mjs +12 -0
- package/scripts/e2e-live.mjs +58 -0
- package/scripts/e2e-reporter.mjs +17 -0
- package/scripts/review.mjs +26 -0
- package/scripts/semantics/core.mjs +101 -0
- package/scripts/semantics/generate.mjs +47 -0
- package/scripts/semantics/real-pi-smoke.mjs +46 -0
- package/scripts/smoke-host.mjs +10 -0
- package/scripts/smoke-install.mjs +37 -0
- package/scripts/sync-upstream.mjs +4 -0
- package/scripts/upstream/cli.mjs +140 -0
- package/scripts/upstream/core.mjs +178 -0
- package/scripts/upstream/core.test.mjs +137 -0
- package/scripts/upstream/inventory.mjs +229 -0
- package/scripts/upstream/inventory.test.mjs +417 -0
- package/scripts/upstream/notify.cjs +17 -0
- package/scripts/upstream/notify.test.mjs +12 -0
- package/scripts/upstream/parity.mjs +45 -0
- package/scripts/upstream/playbook-contract.test.mjs +80 -0
- package/scripts/upstream/playbooks.mjs +143 -0
- package/scripts/upstream/records.mjs +113 -0
- package/scripts/upstream/records.test.mjs +116 -0
- package/scripts/upstream/report.d.ts +30 -0
- package/skills/architect/SKILL.md +133 -0
- package/skills/architect/references/design-red-flags.md +57 -0
- package/skills/architect/references/rationale-template.md +35 -0
- package/skills/architect/references/runner-prompt.md +20 -0
- package/skills/arena/SKILL.md +102 -0
- package/skills/automate-me/SKILL.md +158 -0
- package/skills/benchmark-checklist/SKILL.md +89 -0
- package/skills/blast-radius/SKILL.md +100 -0
- package/skills/bro/SKILL.md +57 -0
- package/skills/correct/SKILL.md +82 -0
- package/skills/create-formal-verification-skill/SKILL.md +93 -0
- package/skills/create-verification-skill/SKILL.md +94 -0
- package/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/skills/figure-it-out/SKILL.md +102 -0
- package/skills/how/SKILL.md +86 -0
- package/skills/how/references/explainer-prompt.md +55 -0
- package/skills/how/references/explorer-prompt.md +35 -0
- package/skills/in-your-own-words/SKILL.md +57 -0
- package/skills/interrogate/SKILL.md +85 -0
- package/skills/ketchup/SKILL.md +93 -0
- package/skills/ketchup-video/SKILL.md +79 -0
- package/skills/maintain-formal-verification-skill/SKILL.md +108 -0
- package/skills/maintain-verification-skill/SKILL.md +89 -0
- package/skills/make-bot-ui/SKILL.md +8 -0
- package/skills/ml-development/SKILL.md +38 -0
- package/skills/ml-development/playbooks/01-scope.md +14 -0
- package/skills/ml-development/playbooks/02-data.md +14 -0
- package/skills/ml-development/playbooks/03-baseline.md +14 -0
- package/skills/ml-development/playbooks/04-experiments.md +14 -0
- package/skills/ml-development/playbooks/05-evaluation.md +14 -0
- package/skills/ml-development/playbooks/06-reproducibility.md +13 -0
- package/skills/ml-development/references/experiment-matrix.md +11 -0
- package/skills/ml-development/references/run-record.md +19 -0
- package/skills/no-comments/SKILL.md +74 -0
- package/skills/poteto-help/SKILL.md +217 -0
- package/skills/poteto-help/references/prompting.md +51 -0
- package/skills/poteto-help/references/recipes.md +51 -0
- package/skills/poteto-mode/SKILL.md +214 -0
- package/skills/poteto-mode/playbooks/authoring-a-skill.md +64 -0
- package/skills/poteto-mode/playbooks/autonomous-run.md +65 -0
- package/skills/poteto-mode/playbooks/autopilot-full.md +77 -0
- package/skills/poteto-mode/playbooks/autopilot-stack.md +60 -0
- package/skills/poteto-mode/playbooks/babysit.md +75 -0
- package/skills/poteto-mode/playbooks/bug-fix.md +67 -0
- package/skills/poteto-mode/playbooks/eval.md +77 -0
- package/skills/poteto-mode/playbooks/feature.md +73 -0
- package/skills/poteto-mode/playbooks/hillclimb.md +73 -0
- package/skills/poteto-mode/playbooks/investigation.md +66 -0
- package/skills/poteto-mode/playbooks/multi-phase-plan.md +207 -0
- package/skills/poteto-mode/playbooks/opening-a-pr.md +86 -0
- package/skills/poteto-mode/playbooks/orchestrate.md +77 -0
- package/skills/poteto-mode/playbooks/pause-safely.md +62 -0
- package/skills/poteto-mode/playbooks/perf-issue.md +77 -0
- package/skills/poteto-mode/playbooks/prototype.md +66 -0
- package/skills/poteto-mode/playbooks/refactoring.md +68 -0
- package/skills/poteto-mode/playbooks/runtime-forensics.md +63 -0
- package/skills/poteto-mode/playbooks/session-pickup.md +63 -0
- package/skills/poteto-mode/playbooks/shipping.md +64 -0
- package/skills/poteto-mode/playbooks/trace-forensics.md +66 -0
- package/skills/poteto-mode/playbooks/visual-parity.md +63 -0
- package/skills/poteto-mode/playbooks/worktree-cleanup.md +64 -0
- package/skills/poteto-mode/references/bugbot-triage.md +142 -0
- package/skills/poteto-mode/references/runtime-mapping.md +10 -0
- package/skills/principle-attack-the-premise/SKILL.md +71 -0
- package/skills/principle-boundary-discipline/SKILL.md +84 -0
- package/skills/principle-build-the-lever/SKILL.md +73 -0
- package/skills/principle-encode-lessons-in-structure/SKILL.md +61 -0
- package/skills/principle-exhaust-the-design-space/SKILL.md +59 -0
- package/skills/principle-experience-first/SKILL.md +69 -0
- package/skills/principle-explain-the-number/SKILL.md +68 -0
- package/skills/principle-fix-root-causes/SKILL.md +71 -0
- package/skills/principle-foundational-thinking/SKILL.md +71 -0
- package/skills/principle-guard-the-context-window/SKILL.md +62 -0
- package/skills/principle-laziness-protocol/SKILL.md +60 -0
- package/skills/principle-make-operations-idempotent/SKILL.md +72 -0
- package/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +64 -0
- package/skills/principle-minimize-reader-load/SKILL.md +68 -0
- package/skills/principle-model-the-domain/SKILL.md +74 -0
- package/skills/principle-never-block-on-the-human/SKILL.md +65 -0
- package/skills/principle-outcome-oriented-execution/SKILL.md +71 -0
- package/skills/principle-prove-it-works/SKILL.md +72 -0
- package/skills/principle-redesign-from-first-principles/SKILL.md +66 -0
- package/skills/principle-separate-before-serializing-shared-state/SKILL.md +66 -0
- package/skills/principle-sequence-verifiable-units/SKILL.md +67 -0
- package/skills/principle-subtract-before-you-add/SKILL.md +68 -0
- package/skills/principle-test-behavior-not-implementation/SKILL.md +70 -0
- package/skills/principle-type-system-discipline/SKILL.md +63 -0
- package/skills/pstack-runtime/SKILL.md +8 -0
- package/skills/recall/SKILL.md +85 -0
- package/skills/reflect/SKILL.md +119 -0
- package/skills/reflect/references/divergent-reviewer.md +38 -0
- package/skills/reflect/references/judgment-reviewer.md +37 -0
- package/skills/reflect/references/synthesizer.md +56 -0
- package/skills/reflect/references/tooling-reviewer.md +48 -0
- package/skills/setup-pstack/SKILL.md +132 -0
- package/skills/sharpen/SKILL.md +66 -0
- package/skills/show-me-your-work/SKILL.md +132 -0
- package/skills/statechart/SKILL.md +132 -0
- package/skills/statechart/references/render.md +93 -0
- package/skills/statechart/scripts/backends/cfg.ts +33 -0
- package/skills/statechart/scripts/backends/mermaid.ts +201 -0
- package/skills/statechart/scripts/backends/plain-text.ts +72 -0
- package/skills/statechart/scripts/backends/report.ts +177 -0
- package/skills/statechart/scripts/bug-states.mjs +81 -0
- package/skills/statechart/scripts/chart-edges.mjs +68 -0
- package/skills/statechart/scripts/chart-parts.mjs +21 -0
- package/skills/statechart/scripts/chart-to-tla.mjs +205 -0
- package/skills/statechart/scripts/compare-charts.mjs +74 -0
- package/skills/statechart/scripts/frontends/config.ts +276 -0
- package/skills/statechart/scripts/frontends/dot.ts +74 -0
- package/skills/statechart/scripts/frontends/marks.ts +93 -0
- package/skills/statechart/scripts/frontends/messages.ts +52 -0
- package/skills/statechart/scripts/frontends/spec.ts +114 -0
- package/skills/statechart/scripts/frontends/trace.ts +24 -0
- package/skills/statechart/scripts/frontends/value.ts +166 -0
- package/skills/statechart/scripts/frontends/verdict.ts +40 -0
- package/skills/statechart/scripts/frontends/view.ts +119 -0
- package/skills/statechart/scripts/ir.ts +547 -0
- package/skills/statechart/scripts/lib.mjs +970 -0
- package/skills/statechart/scripts/map-view.mjs +92 -0
- package/skills/statechart/scripts/package.json +11 -0
- package/skills/statechart/scripts/passes/annotate.ts +128 -0
- package/skills/statechart/scripts/passes/label.ts +269 -0
- package/skills/statechart/scripts/passes/lift.ts +85 -0
- package/skills/statechart/scripts/passes/loop-check.ts +68 -0
- package/skills/statechart/scripts/passes/paths.ts +60 -0
- package/skills/statechart/scripts/passes/reach.ts +135 -0
- package/skills/statechart/scripts/passes/region-check.ts +97 -0
- package/skills/statechart/scripts/passes/regions.ts +295 -0
- package/skills/statechart/scripts/pipeline.ts +76 -0
- package/skills/statechart/scripts/property-loop.mjs +60 -0
- package/skills/statechart/scripts/read-check.mjs +79 -0
- package/skills/statechart/scripts/regions-chart.mjs +307 -0
- package/skills/statechart/scripts/render.mjs +531 -0
- package/skills/statechart/scripts/rule-book.mjs +84 -0
- package/skills/statechart/scripts/run.ts +481 -0
- package/skills/statechart/scripts/second-replay.mjs +122 -0
- package/skills/statechart/scripts/snapshot.mjs +74 -0
- package/skills/statechart/scripts/spec-text.mjs +126 -0
- package/skills/statechart/scripts/statechart +29 -0
- package/skills/statechart/scripts/statechart-help.mjs +350 -0
- package/skills/statechart/scripts/statechart.mjs +903 -0
- package/skills/statechart/scripts/statechart.ts +164 -0
- package/skills/statechart/scripts/test/ConfigOracle.java +63 -0
- package/skills/statechart/scripts/test/band.mmd +15 -0
- package/skills/statechart/scripts/test/chart.test.ts +1210 -0
- package/skills/statechart/scripts/test/charts/Braces.mmd +7 -0
- package/skills/statechart/scripts/test/charts/Escapes.mmd +11 -0
- package/skills/statechart/scripts/test/charts/Phases.mmd +29 -0
- package/skills/statechart/scripts/test/cli.test.ts +1314 -0
- package/skills/statechart/scripts/test/config-fuzz.test.ts +263 -0
- package/skills/statechart/scripts/test/corpus/Counter/ChartRun.out +57 -0
- package/skills/statechart/scripts/test/corpus/Counter/Counter.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/Counter/Counter.tla +10 -0
- package/skills/statechart/scripts/test/corpus/Counter/chart.mmd +9 -0
- package/skills/statechart/scripts/test/corpus/Counter/graph.dot +16 -0
- package/skills/statechart/scripts/test/corpus/Counter/report.md +7 -0
- package/skills/statechart/scripts/test/corpus/Counter/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/Counter/verdict-1.out +49 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/ChartRun.out +60 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.cfg +4 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.tla +22 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/chart.mmd +26 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/graph.dot +19 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/report.md +20 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.out +56 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.out +82 -0
- package/skills/statechart/scripts/test/corpus/CounterAction/verdict-3.out +57 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/ChartRun.out +59 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.tla +11 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/chart.mmd +22 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/graph.dot +16 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/report.md +17 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.out +56 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.out +77 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/ChartRun.out +69 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.cfg +2 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.tla +11 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/chart.mmd +85 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/graph.dot +70 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/report.md +12 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.out +67 -0
- package/skills/statechart/scripts/test/corpus/CounterFan/verdict-2.out +57 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.out +85 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.cfg +6 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.tla +13 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/chart.mmd +5 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/graph.dot +10 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/report.md +31 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.out +64 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.out +77 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/ChartRun.out +55 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.tla +10 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/chart.mmd +12 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/graph.dot +6 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/report.md +12 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.out +33 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-2.out +54 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/ChartRun.out +54 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.tla +10 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/chart.mmd +1 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/graph.dot +6 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/report.md +7 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterInitPastHolds/verdict-1.out +46 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/ChartRun.out +59 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.cfg +2 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.tla +10 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/CounterSteps.tla +6 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/chart.mmd +17 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/graph.dot +15 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/report.md +14 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/sany.out +3 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.out +78 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/ChartRun.out +59 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.tla +19 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/chart.mmd +26 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/graph.dot +22 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/report.md +12 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.out +58 -0
- package/skills/statechart/scripts/test/corpus/CounterJump/verdict-2.out +57 -0
- package/skills/statechart/scripts/test/corpus/CounterLoop/ChartRun.out +57 -0
- package/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.cfg +2 -0
- package/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.tla +11 -0
- package/skills/statechart/scripts/test/corpus/CounterLoop/chart.mmd +17 -0
- package/skills/statechart/scripts/test/corpus/CounterLoop/graph.dot +15 -0
- package/skills/statechart/scripts/test/corpus/CounterLoop/report.md +14 -0
- package/skills/statechart/scripts/test/corpus/CounterLoop/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.out +76 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/ChartRun.out +59 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.tla +11 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/chart.mmd +19 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/graph.dot +10 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/report.md +15 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.out +56 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.out +67 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/ChartRun.out +62 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.cfg +6 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.tla +24 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/Moves.tla +5 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/chart.mmd +22 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/graph.dot +10 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/report.md +23 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/sany.out +3 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.out +58 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.out +66 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.out +74 -0
- package/skills/statechart/scripts/test/corpus/CounterRules/verdict-4.out +59 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/ChartRun.out +58 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.tla +15 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/chart.mmd +18 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/graph.dot +13 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/report.md +11 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.out +33 -0
- package/skills/statechart/scripts/test/corpus/CounterStart/verdict-2.out +57 -0
- package/skills/statechart/scripts/test/corpus/CounterStop/ChartRun.out +57 -0
- package/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.tla +15 -0
- package/skills/statechart/scripts/test/corpus/CounterStop/chart.mmd +7 -0
- package/skills/statechart/scripts/test/corpus/CounterStop/graph.dot +13 -0
- package/skills/statechart/scripts/test/corpus/CounterStop/report.md +6 -0
- package/skills/statechart/scripts/test/corpus/CounterStop/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterStop/verdict-1.out +49 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/ChartRun.out +61 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.cfg +4 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.tla +14 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/chart.mmd +30 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/graph.dot +19 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/report.md +27 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.out +56 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.out +64 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.out +87 -0
- package/skills/statechart/scripts/test/corpus/CounterTie/verdict-4.out +57 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/ChartRun.out +60 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.tla +12 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/chart.mmd +23 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/graph.dot +19 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/report.md +11 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.out +56 -0
- package/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-2.out +57 -0
- package/skills/statechart/scripts/test/corpus/CounterView/ChartRun.out +61 -0
- package/skills/statechart/scripts/test/corpus/CounterView/CounterView.cfg +4 -0
- package/skills/statechart/scripts/test/corpus/CounterView/CounterView.tla +14 -0
- package/skills/statechart/scripts/test/corpus/CounterView/chart.mmd +23 -0
- package/skills/statechart/scripts/test/corpus/CounterView/graph.dot +19 -0
- package/skills/statechart/scripts/test/corpus/CounterView/report.md +27 -0
- package/skills/statechart/scripts/test/corpus/CounterView/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/CounterView/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterView/verdict-1.out +56 -0
- package/skills/statechart/scripts/test/corpus/CounterView/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterView/verdict-2.out +64 -0
- package/skills/statechart/scripts/test/corpus/CounterView/verdict-3.exit +1 -0
- package/skills/statechart/scripts/test/corpus/CounterView/verdict-3.out +87 -0
- package/skills/statechart/scripts/test/corpus/CounterView/verdict-4.out +57 -0
- package/skills/statechart/scripts/test/corpus/CounterView/view.mjs +1 -0
- package/skills/statechart/scripts/test/corpus/DieHard/ChartRun.out +59 -0
- package/skills/statechart/scripts/test/corpus/DieHard/DieHard.cfg +4 -0
- package/skills/statechart/scripts/test/corpus/DieHard/DieHard.tla +38 -0
- package/skills/statechart/scripts/test/corpus/DieHard/chart.mmd +92 -0
- package/skills/statechart/scripts/test/corpus/DieHard/graph.dot +126 -0
- package/skills/statechart/scripts/test/corpus/DieHard/report.md +17 -0
- package/skills/statechart/scripts/test/corpus/DieHard/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/DieHard/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/DieHard/verdict-1.out +91 -0
- package/skills/statechart/scripts/test/corpus/DieHard/verdict-2.out +57 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/ChartRun.out +61 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.cfg +6 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.tla +11 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/chart.mmd +22 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/graph.dot +16 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/report.md +25 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.out +56 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.out +64 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.exit +1 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.out +64 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.exit +1 -0
- package/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.out +77 -0
- package/skills/statechart/scripts/test/corpus/HiddenClock/ChartRun.out +57 -0
- package/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.cfg +4 -0
- package/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.tla +11 -0
- package/skills/statechart/scripts/test/corpus/HiddenClock/chart.mmd +13 -0
- package/skills/statechart/scripts/test/corpus/HiddenClock/graph.dot +12 -0
- package/skills/statechart/scripts/test/corpus/HiddenClock/report.md +11 -0
- package/skills/statechart/scripts/test/corpus/HiddenClock/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.out +72 -0
- package/skills/statechart/scripts/test/corpus/Login/ChartRun.out +57 -0
- package/skills/statechart/scripts/test/corpus/Login/Login.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/Login/Login.tla +62 -0
- package/skills/statechart/scripts/test/corpus/Login/chart.mmd +27 -0
- package/skills/statechart/scripts/test/corpus/Login/graph.dot +40 -0
- package/skills/statechart/scripts/test/corpus/Login/report.md +7 -0
- package/skills/statechart/scripts/test/corpus/Login/sany.out +1 -0
- package/skills/statechart/scripts/test/corpus/Login/verdict-1.out +47 -0
- package/skills/statechart/scripts/test/corpus/Login/view.mjs +1 -0
- package/skills/statechart/scripts/test/corpus/LoginGuarded/ChartRun.out +57 -0
- package/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.cfg +2 -0
- package/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.tla +64 -0
- package/skills/statechart/scripts/test/corpus/LoginGuarded/chart.mmd +28 -0
- package/skills/statechart/scripts/test/corpus/LoginGuarded/graph.dot +37 -0
- package/skills/statechart/scripts/test/corpus/LoginGuarded/report.md +8 -0
- package/skills/statechart/scripts/test/corpus/LoginGuarded/sany.out +1 -0
- package/skills/statechart/scripts/test/corpus/LoginGuarded/verdict-1.out +47 -0
- package/skills/statechart/scripts/test/corpus/LoginGuarded/view.mjs +1 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/ChartRun.out +60 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.tla +64 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/chart.mmd +44 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/graph.dot +58 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/report.md +17 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/sany.out +1 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.out +83 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/verdict-2.out +57 -0
- package/skills/statechart/scripts/test/corpus/LoginParallel/view.mjs +1 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/ChartRun.out +60 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.tla +103 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/chart.mmd +43 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/graph.dot +93 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/report.md +14 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/sany.out +1 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.out +59 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-2.out +72 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayer/view.mjs +3 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/ChartRun.out +57 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.cfg +2 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.tla +100 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/chart.mmd +31 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/graph.dot +85 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/report.md +9 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/sany.out +1 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/verdict-1.out +47 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerFixed/view.mjs +3 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/ChartRun.out +59 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayer.tla +103 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.tla +6 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/chart.mmd +42 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/graph.dot +93 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/report.md +19 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.out +61 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-2.out +59 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-3.out +61 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.exit +1 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.out +66 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.exit +1 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.out +58 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-6.out +49 -0
- package/skills/statechart/scripts/test/corpus/MediaPlayerProps/view.mjs +3 -0
- package/skills/statechart/scripts/test/corpus/PickWorker/ChartRun.out +57 -0
- package/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.cfg +6 -0
- package/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.tla +11 -0
- package/skills/statechart/scripts/test/corpus/PickWorker/chart.mmd +5 -0
- package/skills/statechart/scripts/test/corpus/PickWorker/graph.dot +11 -0
- package/skills/statechart/scripts/test/corpus/PickWorker/report.md +7 -0
- package/skills/statechart/scripts/test/corpus/PickWorker/sany.out +5 -0
- package/skills/statechart/scripts/test/corpus/PickWorker/verdict-1.out +70 -0
- package/skills/statechart/scripts/test/corpus/Shadow/ChartRun.out +61 -0
- package/skills/statechart/scripts/test/corpus/Shadow/Shadow.cfg +4 -0
- package/skills/statechart/scripts/test/corpus/Shadow/Shadow.tla +11 -0
- package/skills/statechart/scripts/test/corpus/Shadow/ShadowLib.tla +6 -0
- package/skills/statechart/scripts/test/corpus/Shadow/ShadowSub.tla +3 -0
- package/skills/statechart/scripts/test/corpus/Shadow/chart.mmd +9 -0
- package/skills/statechart/scripts/test/corpus/Shadow/graph.dot +16 -0
- package/skills/statechart/scripts/test/corpus/Shadow/report.md +8 -0
- package/skills/statechart/scripts/test/corpus/Shadow/sany.out +4 -0
- package/skills/statechart/scripts/test/corpus/Shadow/verdict-1.out +65 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/ChartRun.out +59 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.cfg +2 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.tla +9 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/chart.mmd +23 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/graph.dot +17 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/report.md +15 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/sany.out +1 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.out +65 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.out +75 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/ChartRun.out +69 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.tla +75 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/chart.mmd +60 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/graph.dot +297 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/report.md +20 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/sany.out +1 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.out +95 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/verdict-2.out +57 -0
- package/skills/statechart/scripts/test/corpus/TwoPhase/view.mjs +1 -0
- package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/ChartRun.out +57 -0
- package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.cfg +3 -0
- package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.tla +75 -0
- package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/chart.mmd +37 -0
- package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/graph.dot +223 -0
- package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/report.md +11 -0
- package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/sany.out +1 -0
- package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/verdict-1.out +47 -0
- package/skills/statechart/scripts/test/corpus/TwoPhaseFixed/view.mjs +1 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.exit +1 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.out +75 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.cfg +5 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.tla +11 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/chart.mmd +18 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/graph.dot +14 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/report.md +29 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.out +64 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.out +75 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/ChartRun.out +58 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.cfg +2 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.tla +8 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/chart.mmd +22 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/graph.dot +16 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/report.md +15 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/sany.out +2 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.exit +1 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.out +56 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.exit +1 -0
- package/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.out +77 -0
- package/skills/statechart/scripts/test/corpus.test.ts +403 -0
- package/skills/statechart/scripts/test/differential.test.ts +565 -0
- package/skills/statechart/scripts/test/grid/Grid.cfg +2 -0
- package/skills/statechart/scripts/test/grid/Grid.tla +9 -0
- package/skills/statechart/scripts/test/grid/sany.out +2 -0
- package/skills/statechart/scripts/test/java.ts +63 -0
- package/skills/statechart/scripts/test/labels.ts +643 -0
- package/skills/statechart/scripts/test/messages.test.ts +212 -0
- package/skills/statechart/scripts/test/pipeline.test.ts +270 -0
- package/skills/statechart/scripts/test/plain-tlc.test.ts +255 -0
- package/skills/statechart/scripts/test/regions.mmd +62 -0
- package/skills/statechart/scripts/test/render.test.ts +81 -0
- package/skills/statechart/scripts/test/statechart.test.mjs +6854 -0
- package/skills/statechart/scripts/test/sync.mmd +19 -0
- package/skills/statechart/scripts/test/tlc-out.test.ts +90 -0
- package/skills/statechart/scripts/test/tlc.ts +158 -0
- package/skills/statechart/scripts/test/upload.mmd +16 -0
- package/skills/statechart/scripts/tlc-to-chart-args.mjs +52 -0
- package/skills/statechart/scripts/tlc-to-chart.mjs +802 -0
- package/skills/statechart/scripts/tlc-tools.mjs +69 -0
- package/skills/statechart/scripts/tsconfig.json +11 -0
- package/skills/statechart/scripts/ways-in.mjs +69 -0
- package/skills/statechart/scripts/worker.ts +35 -0
- package/skills/swarm/SKILL.md +91 -0
- package/skills/tdd/SKILL.md +92 -0
- package/skills/teach/SKILL.md +71 -0
- package/skills/technical-writing/SKILL.md +156 -0
- package/skills/typescript-best-practices/SKILL.md +81 -0
- package/skills/typescript-best-practices/references/patterns.md +328 -0
- package/skills/unslop/SKILL.md +112 -0
- package/skills/why/SKILL.md +148 -0
- package/skills/why/references/epistemics.md +71 -0
- package/skills/why/references/investigator-prompt.md +84 -0
- package/skills/why/references/source-playbook.md +17 -0
- package/skills/why/references/sources/analytics.md +5 -0
- package/skills/why/references/sources/code-archaeology.md +51 -0
- package/skills/why/references/sources/databricks.md +70 -0
- package/skills/why/references/sources/datadog.md +97 -0
- package/skills/why/references/sources/documents.md +5 -0
- package/skills/why/references/sources/errors.md +5 -0
- package/skills/why/references/sources/incident-postmortem.md +5 -0
- package/skills/why/references/sources/issues.md +5 -0
- package/skills/why/references/sources/linear.md +48 -0
- package/skills/why/references/sources/notion.md +55 -0
- package/skills/why/references/sources/observability.md +5 -0
- package/skills/why/references/sources/sentry.md +66 -0
- package/skills/why/references/sources/slack.md +17 -0
- package/skills/why/references/sources/source-control.md +5 -0
- package/skills/why/references/sources/team-chat.md +5 -0
- package/skills/why/references/synthesizer-prompt.md +129 -0
- package/src/agent/candidates.ts +60 -0
- package/src/agent/grep-worker.mjs +46 -0
- package/src/agent/host.ts +455 -0
- package/src/agent/isolation.ts +14 -0
- package/src/agent/outcome.ts +18 -0
- package/src/agent/profiles.ts +133 -0
- package/src/agent/read-only-tools.ts +129 -0
- package/src/agent/resources.ts +66 -0
- package/src/api.ts +19 -0
- package/src/artifacts/fingerprint.ts +58 -0
- package/src/compatibility/adapter.ts +94 -0
- package/src/compatibility/source.ts +30 -0
- package/src/compatibility/tool.ts +47 -0
- package/src/context/snapshot.ts +12 -0
- package/src/contracts/brief.ts +144 -0
- package/src/contracts/types.ts +57 -0
- package/src/delivery/frontier.ts +87 -0
- package/src/delivery/git.ts +9 -0
- package/src/delivery/prepare.ts +23 -0
- package/src/delivery/provider.ts +41 -0
- package/src/delivery/review-threads.ts +28 -0
- package/src/delivery/stack.ts +76 -0
- package/src/extension.ts +281 -0
- package/src/loop/scheduler.ts +334 -0
- package/src/loop/store.ts +66 -0
- package/src/models/router.ts +171 -0
- package/src/program/coordinator.ts +122 -0
- package/src/program/dispatch.ts +83 -0
- package/src/runner/cli.mjs +46 -0
- package/src/runner/lease.ts +17 -0
- package/src/runner/service.ts +37 -0
- package/src/runtime/checkout.ts +19 -0
- package/src/runtime/config.ts +49 -0
- package/src/runtime/errors.ts +12 -0
- package/src/runtime/home.ts +17 -0
- package/src/runtime/lock.ts +101 -0
- package/src/runtime/migrate.ts +29 -0
- package/src/runtime/ownership.ts +6 -0
- package/src/runtime/protocol.ts +35 -0
- package/src/runtime/redact.ts +34 -0
- package/src/runtime/store.ts +50 -0
- package/src/runtime/transaction.ts +41 -0
- package/src/runtime/types.ts +203 -0
- package/src/runtime/upstream.ts +7 -0
- package/src/setup/command.ts +331 -0
- package/src/telemetry/metrics.ts +11 -0
- package/src/templates/build.ts +172 -0
- package/src/tools/agents.ts +62 -0
- package/src/tools/graph.ts +37 -0
- package/src/tools/protocol.ts +53 -0
- package/src/tools/schema.ts +9 -0
- package/src/tools/workflow.ts +103 -0
- package/src/tools/worktrees.ts +39 -0
- package/src/verification/process.mjs +9 -0
- package/src/verification/runner.ts +148 -0
- package/src/workflow/artifacts.ts +97 -0
- package/src/workflow/engine.ts +631 -0
- package/src/workflow/graph.ts +53 -0
- package/src/worktree/manager.ts +60 -0
- package/src/worktree/snapshot.ts +35 -0
- package/test/baseline-owner.test.ts +122 -0
- package/test/benchmark.test.ts +81 -0
- package/test/cancellation.test.ts +92 -0
- package/test/candidate-port.test.ts +18 -0
- package/test/check-plan.test.ts +99 -0
- package/test/checkout.test.ts +19 -0
- package/test/delivery-stack.test.ts +106 -0
- package/test/dispatch.test.ts +171 -0
- package/test/e2e/fixture-child.mjs +33 -0
- package/test/e2e/harness.ts +282 -0
- package/test/e2e/offline.test.ts +153 -0
- package/test/e2e/parent-context.ts +66 -0
- package/test/e2e/reported-defects.test.ts +85 -0
- package/test/e2e/shipping.test.ts +204 -0
- package/test/e2e/workflow.test.ts +408 -0
- package/test/fixtures/loop-execution-lock-holder.mjs +38 -0
- package/test/fixtures/loop-lock-holder.mjs +31 -0
- package/test/fixtures/loop-scheduler-worker.mjs +95 -0
- package/test/fixtures/semantics/scenarios.json +18 -0
- package/test/fixtures/verification-crash-worker.mjs +5 -0
- package/test/graph.test.ts +23 -0
- package/test/isolation.test.ts +21 -0
- package/test/latest-upstream.test.ts +41 -0
- package/test/live/command-probe-child.mjs +22 -0
- package/test/live/command-probe-loader.mjs +8 -0
- package/test/live/command-probe-register.mjs +12 -0
- package/test/live/github-live.test.ts +107 -0
- package/test/live/guard.ts +70 -0
- package/test/lock.test.ts +76 -0
- package/test/loop-scheduler.test.ts +460 -0
- package/test/loop.test.ts +60 -0
- package/test/ml-development.test.ts +65 -0
- package/test/model-panels.test.ts +237 -0
- package/test/model-router.test.ts +124 -0
- package/test/outcome.test.ts +31 -0
- package/test/protocol.test.ts +350 -0
- package/test/read-only-tools.test.ts +86 -0
- package/test/real-sdk-integration.test.ts +183 -0
- package/test/redaction.test.ts +66 -0
- package/test/resources.test.ts +42 -0
- package/test/review-snapshot.test.ts +48 -0
- package/test/semantic-compatibility.test.ts +121 -0
- package/test/setup-command.test.ts +212 -0
- package/test/setup-rpc.test.ts +68 -0
- package/test/smoke-installed-package.mjs +119 -0
- package/test/statechart.test.ts +25 -0
- package/test/store.test.ts +35 -0
- package/test/swarm-race.test.ts +50 -0
- package/test/tool-ownership.test.ts +59 -0
- package/test/transaction.test.ts +89 -0
- package/test/verification.test.ts +295 -0
- package/test/workflow.test.ts +408 -0
- package/test/worktree.test.ts +39 -0
- package/tsconfig.build.json +12 -0
- package/tsconfig.json +17 -0
- package/vendor/upstream/0.15.17/pstack/LICENSE +21 -0
- package/vendor/upstream/0.15.17/pstack/skills/architect/SKILL.md +79 -0
- package/vendor/upstream/0.15.17/pstack/skills/architect/references/design-red-flags.md +57 -0
- package/vendor/upstream/0.15.17/pstack/skills/architect/references/rationale-template.md +35 -0
- package/vendor/upstream/0.15.17/pstack/skills/architect/references/runner-prompt.md +20 -0
- package/vendor/upstream/0.15.17/pstack/skills/arena/SKILL.md +48 -0
- package/vendor/upstream/0.15.17/pstack/skills/automate-me/SKILL.md +104 -0
- package/vendor/upstream/0.15.17/pstack/skills/benchmark-checklist/SKILL.md +39 -0
- package/vendor/upstream/0.15.17/pstack/skills/blast-radius/SKILL.md +50 -0
- package/vendor/upstream/0.15.17/pstack/skills/bro/SKILL.md +7 -0
- package/vendor/upstream/0.15.17/pstack/skills/correct/SKILL.md +32 -0
- package/vendor/upstream/0.15.17/pstack/skills/create-verification-skill/SKILL.md +44 -0
- package/vendor/upstream/0.15.17/pstack/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/vendor/upstream/0.15.17/pstack/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/vendor/upstream/0.15.17/pstack/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/vendor/upstream/0.15.17/pstack/skills/figure-it-out/SKILL.md +52 -0
- package/vendor/upstream/0.15.17/pstack/skills/how/SKILL.md +36 -0
- package/vendor/upstream/0.15.17/pstack/skills/how/references/explainer-prompt.md +55 -0
- package/vendor/upstream/0.15.17/pstack/skills/how/references/explorer-prompt.md +52 -0
- package/vendor/upstream/0.15.17/pstack/skills/interrogate/SKILL.md +74 -0
- package/vendor/upstream/0.15.17/pstack/skills/interrogate/references/code-quality-review.md +47 -0
- package/vendor/upstream/0.15.17/pstack/skills/interrogate/references/lead-judgment.md +58 -0
- package/vendor/upstream/0.15.17/pstack/skills/interrogate/references/reviewer-prompt.md +62 -0
- package/vendor/upstream/0.15.17/pstack/skills/interrogate/references/rubric.md +77 -0
- package/vendor/upstream/0.15.17/pstack/skills/ketchup/SKILL.md +23 -0
- package/vendor/upstream/0.15.17/pstack/skills/maintain-verification-skill/SKILL.md +39 -0
- package/vendor/upstream/0.15.17/pstack/skills/make-bot-ui/SKILL.md +115 -0
- package/vendor/upstream/0.15.17/pstack/skills/no-comments/SKILL.md +24 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-help/SKILL.md +154 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-help/references/prompting.md +51 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-help/references/recipes.md +47 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/SKILL.md +147 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/autopilot-full.md +13 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/autopilot-stack.md +16 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/babysit.md +27 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/bug-fix.md +15 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/eval.md +25 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/feature.md +21 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/hillclimb.md +21 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/investigation.md +14 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/multi-phase-plan.md +155 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/opening-a-pr.md +34 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/orchestrate.md +111 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/pause-safely.md +10 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/perf-issue.md +25 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/prototype.md +14 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/refactoring.md +16 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/session-pickup.md +11 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/shipping.md +17 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/visual-parity.md +11 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/playbooks/worktree-cleanup.md +14 -0
- package/vendor/upstream/0.15.17/pstack/skills/poteto-mode/references/bugbot-triage.md +142 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-attack-the-premise/SKILL.md +23 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-boundary-discipline/SKILL.md +34 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-build-the-lever/SKILL.md +23 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-encode-lessons-in-structure/SKILL.md +28 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-exhaust-the-design-space/SKILL.md +21 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-experience-first/SKILL.md +19 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-explain-the-number/SKILL.md +17 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-fix-root-causes/SKILL.md +23 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-foundational-thinking/SKILL.md +21 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-guard-the-context-window/SKILL.md +16 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-laziness-protocol/SKILL.md +18 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-make-operations-idempotent/SKILL.md +24 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +22 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-minimize-reader-load/SKILL.md +18 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-model-the-domain/SKILL.md +24 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-never-block-on-the-human/SKILL.md +15 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-prove-it-works/SKILL.md +22 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-sequence-verifiable-units/SKILL.md +17 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-subtract-before-you-add/SKILL.md +18 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-test-behavior-not-implementation/SKILL.md +21 -0
- package/vendor/upstream/0.15.17/pstack/skills/principle-type-system-discipline/SKILL.md +18 -0
- package/vendor/upstream/0.15.17/pstack/skills/recall/SKILL.md +35 -0
- package/vendor/upstream/0.15.17/pstack/skills/reflect/SKILL.md +67 -0
- package/vendor/upstream/0.15.17/pstack/skills/reflect/references/divergent-reviewer.md +38 -0
- package/vendor/upstream/0.15.17/pstack/skills/reflect/references/judgment-reviewer.md +37 -0
- package/vendor/upstream/0.15.17/pstack/skills/reflect/references/synthesizer.md +56 -0
- package/vendor/upstream/0.15.17/pstack/skills/reflect/references/tooling-reviewer.md +48 -0
- package/vendor/upstream/0.15.17/pstack/skills/setup-pstack/SKILL.md +74 -0
- package/vendor/upstream/0.15.17/pstack/skills/show-me-your-work/SKILL.md +82 -0
- package/vendor/upstream/0.15.17/pstack/skills/swarm/SKILL.md +46 -0
- package/vendor/upstream/0.15.17/pstack/skills/tdd/SKILL.md +42 -0
- package/vendor/upstream/0.15.17/pstack/skills/teach/SKILL.md +21 -0
- package/vendor/upstream/0.15.17/pstack/skills/technical-writing/SKILL.md +106 -0
- package/vendor/upstream/0.15.17/pstack/skills/typescript-best-practices/SKILL.md +31 -0
- package/vendor/upstream/0.15.17/pstack/skills/typescript-best-practices/references/patterns.md +324 -0
- package/vendor/upstream/0.15.17/pstack/skills/unslop/SKILL.md +62 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/SKILL.md +98 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/epistemics.md +71 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/investigator-prompt.md +84 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/source-playbook.md +17 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/sources/code-archaeology.md +86 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/sources/databricks.md +70 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/sources/datadog.md +97 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/sources/incident-postmortem.md +15 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/sources/linear.md +48 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/sources/notion.md +55 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/sources/sentry.md +96 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/sources/slack.md +54 -0
- package/vendor/upstream/0.15.17/pstack/skills/why/references/synthesizer-prompt.md +129 -0
- package/vendor/upstream/0.15.32/pstack/.cursor-plugin/plugin.json +31 -0
- package/vendor/upstream/0.15.32/pstack/LICENSE +21 -0
- package/vendor/upstream/0.15.32/pstack/skills/architect/SKILL.md +79 -0
- package/vendor/upstream/0.15.32/pstack/skills/architect/references/design-red-flags.md +57 -0
- package/vendor/upstream/0.15.32/pstack/skills/architect/references/rationale-template.md +35 -0
- package/vendor/upstream/0.15.32/pstack/skills/architect/references/runner-prompt.md +20 -0
- package/vendor/upstream/0.15.32/pstack/skills/arena/SKILL.md +48 -0
- package/vendor/upstream/0.15.32/pstack/skills/automate-me/SKILL.md +104 -0
- package/vendor/upstream/0.15.32/pstack/skills/benchmark-checklist/SKILL.md +39 -0
- package/vendor/upstream/0.15.32/pstack/skills/blast-radius/SKILL.md +50 -0
- package/vendor/upstream/0.15.32/pstack/skills/bro/SKILL.md +7 -0
- package/vendor/upstream/0.15.32/pstack/skills/correct/SKILL.md +32 -0
- package/vendor/upstream/0.15.32/pstack/skills/create-formal-verification-skill/SKILL.md +43 -0
- package/vendor/upstream/0.15.32/pstack/skills/create-verification-skill/SKILL.md +44 -0
- package/vendor/upstream/0.15.32/pstack/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/vendor/upstream/0.15.32/pstack/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/vendor/upstream/0.15.32/pstack/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/vendor/upstream/0.15.32/pstack/skills/figure-it-out/SKILL.md +52 -0
- package/vendor/upstream/0.15.32/pstack/skills/how/SKILL.md +36 -0
- package/vendor/upstream/0.15.32/pstack/skills/how/references/explainer-prompt.md +55 -0
- package/vendor/upstream/0.15.32/pstack/skills/how/references/explorer-prompt.md +35 -0
- package/vendor/upstream/0.15.32/pstack/skills/in-your-own-words/SKILL.md +7 -0
- package/vendor/upstream/0.15.32/pstack/skills/interrogate/SKILL.md +74 -0
- package/vendor/upstream/0.15.32/pstack/skills/interrogate/references/code-quality-review.md +47 -0
- package/vendor/upstream/0.15.32/pstack/skills/interrogate/references/lead-judgment.md +39 -0
- package/vendor/upstream/0.15.32/pstack/skills/interrogate/references/reviewer-prompt.md +62 -0
- package/vendor/upstream/0.15.32/pstack/skills/interrogate/references/rubric.md +77 -0
- package/vendor/upstream/0.15.32/pstack/skills/ketchup/SKILL.md +43 -0
- package/vendor/upstream/0.15.32/pstack/skills/ketchup-video/SKILL.md +23 -0
- package/vendor/upstream/0.15.32/pstack/skills/maintain-formal-verification-skill/SKILL.md +58 -0
- package/vendor/upstream/0.15.32/pstack/skills/maintain-verification-skill/SKILL.md +39 -0
- package/vendor/upstream/0.15.32/pstack/skills/make-bot-ui/SKILL.md +115 -0
- package/vendor/upstream/0.15.32/pstack/skills/no-comments/SKILL.md +24 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-help/SKILL.md +163 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-help/references/prompting.md +51 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-help/references/recipes.md +51 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/SKILL.md +149 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/autopilot-full.md +25 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/autopilot-stack.md +12 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/babysit.md +23 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/bug-fix.md +15 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/eval.md +25 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/feature.md +21 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/hillclimb.md +21 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/investigation.md +14 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/multi-phase-plan.md +155 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/opening-a-pr.md +34 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/orchestrate.md +112 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/pause-safely.md +10 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/perf-issue.md +25 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/prototype.md +14 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/refactoring.md +16 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/session-pickup.md +11 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/shipping.md +12 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/visual-parity.md +11 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/playbooks/worktree-cleanup.md +12 -0
- package/vendor/upstream/0.15.32/pstack/skills/poteto-mode/references/bugbot-triage.md +142 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-attack-the-premise/SKILL.md +21 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-boundary-discipline/SKILL.md +34 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-build-the-lever/SKILL.md +23 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-encode-lessons-in-structure/SKILL.md +11 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-exhaust-the-design-space/SKILL.md +9 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-experience-first/SKILL.md +19 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-explain-the-number/SKILL.md +17 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-fix-root-causes/SKILL.md +21 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-foundational-thinking/SKILL.md +21 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-guard-the-context-window/SKILL.md +12 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-laziness-protocol/SKILL.md +10 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-make-operations-idempotent/SKILL.md +22 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +14 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-minimize-reader-load/SKILL.md +18 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-model-the-domain/SKILL.md +24 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-never-block-on-the-human/SKILL.md +15 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-prove-it-works/SKILL.md +22 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-sequence-verifiable-units/SKILL.md +17 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-subtract-before-you-add/SKILL.md +18 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-test-behavior-not-implementation/SKILL.md +20 -0
- package/vendor/upstream/0.15.32/pstack/skills/principle-type-system-discipline/SKILL.md +13 -0
- package/vendor/upstream/0.15.32/pstack/skills/recall/SKILL.md +35 -0
- package/vendor/upstream/0.15.32/pstack/skills/reflect/SKILL.md +69 -0
- package/vendor/upstream/0.15.32/pstack/skills/reflect/references/divergent-reviewer.md +38 -0
- package/vendor/upstream/0.15.32/pstack/skills/reflect/references/judgment-reviewer.md +37 -0
- package/vendor/upstream/0.15.32/pstack/skills/reflect/references/synthesizer.md +56 -0
- package/vendor/upstream/0.15.32/pstack/skills/reflect/references/tooling-reviewer.md +48 -0
- package/vendor/upstream/0.15.32/pstack/skills/setup-pstack/SKILL.md +78 -0
- package/vendor/upstream/0.15.32/pstack/skills/sharpen/SKILL.md +16 -0
- package/vendor/upstream/0.15.32/pstack/skills/show-me-your-work/SKILL.md +82 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/SKILL.md +36 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/bug-states.mjs +81 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/chart-edges.mjs +68 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/chart-parts.mjs +21 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/chart-to-tla.mjs +205 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/compare-charts.mjs +74 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/lib.mjs +970 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/map-view.mjs +92 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/property-loop.mjs +60 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/read-check.mjs +79 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/regions-chart.mjs +307 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/render.mjs +531 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/rule-book.mjs +84 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/second-replay.mjs +122 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/snapshot.mjs +74 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/spec-text.mjs +126 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/statechart-help.mjs +350 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/statechart.mjs +903 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/test/band.mmd +15 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/test/regions.mmd +62 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/test/statechart.test.mjs +6854 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/test/sync.mmd +19 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/test/upload.mmd +16 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/tlc-to-chart-args.mjs +52 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/tlc-to-chart.mjs +802 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/tlc-tools.mjs +69 -0
- package/vendor/upstream/0.15.32/pstack/skills/statechart/scripts/ways-in.mjs +69 -0
- package/vendor/upstream/0.15.32/pstack/skills/swarm/SKILL.md +41 -0
- package/vendor/upstream/0.15.32/pstack/skills/tdd/SKILL.md +42 -0
- package/vendor/upstream/0.15.32/pstack/skills/teach/SKILL.md +21 -0
- package/vendor/upstream/0.15.32/pstack/skills/technical-writing/SKILL.md +106 -0
- package/vendor/upstream/0.15.32/pstack/skills/typescript-best-practices/SKILL.md +31 -0
- package/vendor/upstream/0.15.32/pstack/skills/typescript-best-practices/references/patterns.md +328 -0
- package/vendor/upstream/0.15.32/pstack/skills/unslop/SKILL.md +62 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/SKILL.md +98 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/epistemics.md +71 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/investigator-prompt.md +84 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/source-playbook.md +17 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/sources/code-archaeology.md +51 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/sources/databricks.md +70 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/sources/datadog.md +97 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/sources/incident-postmortem.md +5 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/sources/linear.md +48 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/sources/notion.md +55 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/sources/sentry.md +66 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/sources/slack.md +17 -0
- package/vendor/upstream/0.15.32/pstack/skills/why/references/synthesizer-prompt.md +129 -0
- package/vendor/upstream/0.15.36/pstack/.cursor-plugin/plugin.json +31 -0
- package/vendor/upstream/0.15.36/pstack/LICENSE +21 -0
- package/vendor/upstream/0.15.36/pstack/skills/architect/SKILL.md +79 -0
- package/vendor/upstream/0.15.36/pstack/skills/architect/references/design-red-flags.md +57 -0
- package/vendor/upstream/0.15.36/pstack/skills/architect/references/rationale-template.md +35 -0
- package/vendor/upstream/0.15.36/pstack/skills/architect/references/runner-prompt.md +20 -0
- package/vendor/upstream/0.15.36/pstack/skills/arena/SKILL.md +48 -0
- package/vendor/upstream/0.15.36/pstack/skills/automate-me/SKILL.md +104 -0
- package/vendor/upstream/0.15.36/pstack/skills/benchmark-checklist/SKILL.md +39 -0
- package/vendor/upstream/0.15.36/pstack/skills/blast-radius/SKILL.md +50 -0
- package/vendor/upstream/0.15.36/pstack/skills/bro/SKILL.md +7 -0
- package/vendor/upstream/0.15.36/pstack/skills/correct/SKILL.md +32 -0
- package/vendor/upstream/0.15.36/pstack/skills/create-formal-verification-skill/SKILL.md +43 -0
- package/vendor/upstream/0.15.36/pstack/skills/create-verification-skill/SKILL.md +44 -0
- package/vendor/upstream/0.15.36/pstack/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/vendor/upstream/0.15.36/pstack/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/vendor/upstream/0.15.36/pstack/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/vendor/upstream/0.15.36/pstack/skills/figure-it-out/SKILL.md +52 -0
- package/vendor/upstream/0.15.36/pstack/skills/how/SKILL.md +36 -0
- package/vendor/upstream/0.15.36/pstack/skills/how/references/explainer-prompt.md +55 -0
- package/vendor/upstream/0.15.36/pstack/skills/how/references/explorer-prompt.md +35 -0
- package/vendor/upstream/0.15.36/pstack/skills/in-your-own-words/SKILL.md +7 -0
- package/vendor/upstream/0.15.36/pstack/skills/interrogate/SKILL.md +31 -0
- package/vendor/upstream/0.15.36/pstack/skills/ketchup/SKILL.md +43 -0
- package/vendor/upstream/0.15.36/pstack/skills/ketchup-video/SKILL.md +29 -0
- package/vendor/upstream/0.15.36/pstack/skills/maintain-formal-verification-skill/SKILL.md +58 -0
- package/vendor/upstream/0.15.36/pstack/skills/maintain-verification-skill/SKILL.md +39 -0
- package/vendor/upstream/0.15.36/pstack/skills/make-bot-ui/SKILL.md +115 -0
- package/vendor/upstream/0.15.36/pstack/skills/no-comments/SKILL.md +24 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-help/SKILL.md +163 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-help/references/prompting.md +51 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-help/references/recipes.md +51 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/SKILL.md +150 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/autopilot-full.md +25 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/autopilot-stack.md +8 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/babysit.md +23 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/bug-fix.md +15 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/eval.md +25 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/feature.md +21 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/hillclimb.md +21 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/investigation.md +14 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/multi-phase-plan.md +155 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/opening-a-pr.md +34 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/orchestrate.md +25 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/pause-safely.md +10 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/perf-issue.md +25 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/prototype.md +14 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/refactoring.md +16 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/session-pickup.md +11 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/shipping.md +12 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/visual-parity.md +11 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/playbooks/worktree-cleanup.md +12 -0
- package/vendor/upstream/0.15.36/pstack/skills/poteto-mode/references/bugbot-triage.md +142 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-attack-the-premise/SKILL.md +21 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-boundary-discipline/SKILL.md +34 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-build-the-lever/SKILL.md +23 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-encode-lessons-in-structure/SKILL.md +11 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-exhaust-the-design-space/SKILL.md +9 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-experience-first/SKILL.md +19 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-explain-the-number/SKILL.md +18 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-fix-root-causes/SKILL.md +21 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-foundational-thinking/SKILL.md +21 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-guard-the-context-window/SKILL.md +12 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-laziness-protocol/SKILL.md +10 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-make-operations-idempotent/SKILL.md +22 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +14 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-minimize-reader-load/SKILL.md +18 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-model-the-domain/SKILL.md +24 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-never-block-on-the-human/SKILL.md +15 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-prove-it-works/SKILL.md +22 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-sequence-verifiable-units/SKILL.md +17 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-subtract-before-you-add/SKILL.md +18 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-test-behavior-not-implementation/SKILL.md +20 -0
- package/vendor/upstream/0.15.36/pstack/skills/principle-type-system-discipline/SKILL.md +13 -0
- package/vendor/upstream/0.15.36/pstack/skills/recall/SKILL.md +35 -0
- package/vendor/upstream/0.15.36/pstack/skills/reflect/SKILL.md +69 -0
- package/vendor/upstream/0.15.36/pstack/skills/reflect/references/divergent-reviewer.md +38 -0
- package/vendor/upstream/0.15.36/pstack/skills/reflect/references/judgment-reviewer.md +37 -0
- package/vendor/upstream/0.15.36/pstack/skills/reflect/references/synthesizer.md +56 -0
- package/vendor/upstream/0.15.36/pstack/skills/reflect/references/tooling-reviewer.md +48 -0
- package/vendor/upstream/0.15.36/pstack/skills/setup-pstack/SKILL.md +78 -0
- package/vendor/upstream/0.15.36/pstack/skills/sharpen/SKILL.md +16 -0
- package/vendor/upstream/0.15.36/pstack/skills/show-me-your-work/SKILL.md +82 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/SKILL.md +82 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/references/render.md +93 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/backends/cfg.ts +33 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/backends/mermaid.ts +201 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/backends/plain-text.ts +72 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/backends/report.ts +177 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/frontends/config.ts +276 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/frontends/dot.ts +74 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/frontends/marks.ts +93 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/frontends/messages.ts +52 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/frontends/spec.ts +114 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/frontends/trace.ts +24 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/frontends/value.ts +166 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/frontends/verdict.ts +40 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/frontends/view.ts +119 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/ir.ts +547 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/package.json +11 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/passes/annotate.ts +128 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/passes/label.ts +269 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/passes/lift.ts +85 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/passes/loop-check.ts +68 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/passes/paths.ts +60 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/passes/reach.ts +135 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/passes/region-check.ts +97 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/passes/regions.ts +295 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/pipeline.ts +76 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/run.ts +481 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/statechart +29 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/statechart.ts +164 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/tsconfig.json +11 -0
- package/vendor/upstream/0.15.36/pstack/skills/statechart/scripts/worker.ts +35 -0
- package/vendor/upstream/0.15.36/pstack/skills/swarm/SKILL.md +41 -0
- package/vendor/upstream/0.15.36/pstack/skills/tdd/SKILL.md +42 -0
- package/vendor/upstream/0.15.36/pstack/skills/teach/SKILL.md +21 -0
- package/vendor/upstream/0.15.36/pstack/skills/technical-writing/SKILL.md +106 -0
- package/vendor/upstream/0.15.36/pstack/skills/typescript-best-practices/SKILL.md +31 -0
- package/vendor/upstream/0.15.36/pstack/skills/typescript-best-practices/references/patterns.md +328 -0
- package/vendor/upstream/0.15.36/pstack/skills/unslop/SKILL.md +62 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/SKILL.md +98 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/epistemics.md +71 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/investigator-prompt.md +84 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/source-playbook.md +17 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/sources/code-archaeology.md +51 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/sources/databricks.md +70 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/sources/datadog.md +97 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/sources/incident-postmortem.md +5 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/sources/linear.md +48 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/sources/notion.md +55 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/sources/sentry.md +66 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/sources/slack.md +17 -0
- package/vendor/upstream/0.15.36/pstack/skills/why/references/synthesizer-prompt.md +129 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { hash, transact } from '../runtime/protocol.ts';
|
|
2
|
+
import { git } from '../artifacts/fingerprint.ts';
|
|
3
|
+
import type { TaskBrief, TaskReport, Fingerprint } from './types.ts';
|
|
4
|
+
export function matchPath(path: string, glob: string): boolean {
|
|
5
|
+
if (glob === '**' || glob === '**/*') return true;
|
|
6
|
+
const escaped = glob.replace(/[.+^${}()|[\]\\]/g, '\\$&').replace(/\*\*\//g, '\u0001').replace(/\*\*/g, '\u0002').replace(/\*/g, '[^/]*').replace(/\?/g, '[^/]').replace(/\u0001/g, '(?:.*/)?').replace(/\u0002/g, '.*');
|
|
7
|
+
return new RegExp(`^${escaped}$`).test(path);
|
|
8
|
+
}
|
|
9
|
+
export class BriefValidationError extends Error {
|
|
10
|
+
readonly code = 'BRIEF_INCOMPLETE';
|
|
11
|
+
constructor(detail: string) { super(`BRIEF_INCOMPLETE: ${detail}`); this.name = 'BriefValidationError'; }
|
|
12
|
+
}
|
|
13
|
+
export function validateBrief(brief: TaskBrief): void {
|
|
14
|
+
try { checkBrief(brief); }
|
|
15
|
+
catch(error) { if(error instanceof BriefValidationError) throw error; throw new BriefValidationError(String(error)); }
|
|
16
|
+
}
|
|
17
|
+
function checkBrief(brief: TaskBrief): void {
|
|
18
|
+
const errors: string[] = [];
|
|
19
|
+
if (!brief || !['minimal','strict'].includes(brief.contractLevel)) throw new BriefValidationError('contractLevel');
|
|
20
|
+
if (!brief.id || !/^[a-zA-Z0-9._-]+$/.test(brief.id) || ['__proto__','constructor','prototype'].includes(brief.id) || !Number.isInteger(brief.revision) || brief.revision < 1) errors.push('id/revision');
|
|
21
|
+
if (typeof brief.goal !== 'string' || !brief.goal.trim()) errors.push('goal');
|
|
22
|
+
if (typeof brief.scope?.repoId !== 'string' || !brief.scope.repoId || !Array.isArray(brief.scope.include) || !brief.scope.include.length || !brief.scope.include.every(p=>typeof p==='string') || !Array.isArray(brief.scope.exclude) || !brief.scope.exclude.every(p=>typeof p==='string')) errors.push('scope');
|
|
23
|
+
if (!Array.isArray(brief.contextRefs)) errors.push('contextRefs');
|
|
24
|
+
if (!Array.isArray(brief.forbidden)) errors.push('forbidden');
|
|
25
|
+
if (!Array.isArray(brief.standingOrders)) errors.push('standingOrders');
|
|
26
|
+
if (brief.reportFormat !== 'task-report-v1') errors.push('reportFormat');
|
|
27
|
+
if (brief.contractLevel === 'strict' && (!Number.isFinite(brief.timeboxSeconds) || brief.timeboxSeconds! <= 0)) errors.push('timeboxSeconds');
|
|
28
|
+
if (!Array.isArray(brief.verification)) errors.push('verification');
|
|
29
|
+
else {
|
|
30
|
+
const ids = new Set<string>();
|
|
31
|
+
for (const gate of brief.verification) {
|
|
32
|
+
if (!gate.id || ids.has(gate.id)) errors.push('verification.id'); ids.add(gate.id);
|
|
33
|
+
if (!['command','file','diff','test-report','human-approval','llm-review'].includes(gate.kind)) errors.push(`verification.${gate.id}.kind`);
|
|
34
|
+
if (gate.command && (!gate.command.length || gate.command.some(x=>typeof x !== 'string' || x.includes('\0')))) errors.push(`verification.${gate.id}.command`);
|
|
35
|
+
if (gate.coverage?.some(p=>p.startsWith('/') || p.split('/').includes('..'))) errors.push(`verification.${gate.id}.coverage`);
|
|
36
|
+
if (gate.timeoutSeconds !== undefined && (!Number.isFinite(gate.timeoutSeconds) || gate.timeoutSeconds <= 0)) errors.push(`verification.${gate.id}.timeout`);
|
|
37
|
+
}
|
|
38
|
+
if (brief.acceptance !== undefined && !Array.isArray(brief.acceptance)) errors.push('acceptance');
|
|
39
|
+
else {
|
|
40
|
+
if (brief.contractLevel === 'strict' && (!brief.acceptance?.length || !brief.acceptance.some(x=>x?.required))) errors.push('acceptance');
|
|
41
|
+
const acceptanceIds = new Set<string>();
|
|
42
|
+
for (const ac of brief.acceptance ?? []) {
|
|
43
|
+
if (!ac || typeof ac.id !== 'string' || !ac.id || acceptanceIds.has(ac.id) || typeof ac.description !== 'string' || !ac.description || typeof ac.required !== 'boolean' || !Array.isArray(ac.gateIds) || !ac.gateIds.length || ac.gateIds.some(id=>!ids.has(id))) { errors.push('acceptance'); continue; }
|
|
44
|
+
acceptanceIds.add(ac.id);
|
|
45
|
+
if (ac.required && ac.gateIds.some(id=>brief.verification.find(g=>g.id===id)?.required===false)) errors.push(`acceptance.${ac.id}.optionalGate`);
|
|
46
|
+
if (ac.required && ac.gateIds.every(id=>brief.verification.find(g=>g.id===id)?.kind==='llm-review')) errors.push(`acceptance.${ac.id}.machineGate`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
for (const p of [...(brief.scope?.include ?? []), ...(brief.scope?.exclude ?? [])]) if (p.startsWith('/') || p.split('/').includes('..') || p.includes('\\')) errors.push('scope.relativeGlob');
|
|
51
|
+
if (errors.length) throw new BriefValidationError([...new Set(errors)].join(', '));
|
|
52
|
+
}
|
|
53
|
+
export function saveBrief(brief: TaskBrief, actor: string, reason: string): TaskBrief {
|
|
54
|
+
validateBrief(brief); if (!reason.trim()) throw new Error('Brief revision requires reason');
|
|
55
|
+
return transact('brief-revised', brief.id, actor, s=>{
|
|
56
|
+
const versions = s.briefs[brief.id] ?? [];
|
|
57
|
+
const last = versions.at(-1);
|
|
58
|
+
if (last && hash(last) === hash(brief)) return last;
|
|
59
|
+
if (brief.revision !== (last?.revision ?? 0) + 1) throw new Error('BRIEF_REVISION_CONFLICT');
|
|
60
|
+
versions.push(structuredClone(brief)); s.briefs[brief.id] = versions; return brief;
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
export function changedPaths(before: Fingerprint, after: Fingerprint, cwd: string): string[] {
|
|
64
|
+
const working = [...new Set([...Object.keys(before.files), ...Object.keys(after.files)])].filter(p=>before.files[p] !== after.files[p]);
|
|
65
|
+
const staged = git(cwd,['diff','--no-renames','--name-only','-z',before.indexTree,after.indexTree]).split('\0').filter(Boolean);
|
|
66
|
+
return [...new Set([...working, ...staged])].sort();
|
|
67
|
+
}
|
|
68
|
+
export function scopeViolations(brief: TaskBrief, paths: string[]): string[] {
|
|
69
|
+
return paths.filter(p=>!brief.scope.include.some(g=>matchPath(p,g)) || brief.scope.exclude.some(g=>matchPath(p,g)));
|
|
70
|
+
}
|
|
71
|
+
export function validateReport(value: unknown): TaskReport {
|
|
72
|
+
const r = value as TaskReport;
|
|
73
|
+
if (!r || !['completed','failed','blocked'].includes(r.status) || !r.base || !r.head || !['artifactRefs','commandsRun','evidenceRefs','deviations','unresolved','nextActions'].every(k=>Array.isArray((r as any)[k]))) throw new Error('TASK_REPORT_INCOMPLETE');
|
|
74
|
+
if (![...r.unresolved, ...r.deviations].every(note => typeof note === 'string' || (note && typeof note === 'object' && ['blocking','advisory'].includes(note.severity) && typeof note.description === 'string' && Boolean(note.description.trim())))) throw new Error('TASK_REPORT_INCOMPLETE');
|
|
75
|
+
return r;
|
|
76
|
+
}
|
|
77
|
+
/** Legacy strings and malformed notes remain blocking; only explicit advisory notes pass. */
|
|
78
|
+
export function hasBlockingReportNotes(report: TaskReport): boolean {
|
|
79
|
+
return !Array.isArray(report.unresolved) || !Array.isArray(report.deviations) || [...report.unresolved, ...report.deviations].some(note => typeof note !== 'object' || note === null || note.severity !== 'advisory' || typeof note.description !== 'string' || !note.description.trim());
|
|
80
|
+
}
|
|
81
|
+
export function parseReport(text: string): TaskReport {
|
|
82
|
+
const block = text.match(/```(?:task-report|json)\s*\n([\s\S]*?)```/);
|
|
83
|
+
return validateReport(JSON.parse(block ? block[1] : text));
|
|
84
|
+
}
|
|
85
|
+
export function briefPrompt(brief: TaskBrief): string {
|
|
86
|
+
const extra = {
|
|
87
|
+
evaluation: 'Include evaluation: [{"criterion": "...", "score": 0, "evidence": ["..."], "weaknesses": [], "selectedParts": []}] for every required criterion; scores must be 0 to 10 and evidence must be nonempty.',
|
|
88
|
+
'cross-evaluation': 'Include crossEvaluation: [{"candidate":"candidate-1", "criterion":"...", "score":0, "evidence":["file:line"], "weaknesses":[], "selectedParts":[]}] for every candidate and every required criterion, with scores 0 to 10 and nonempty evidence. Include selection: {"candidates":["candidate-1"], "selectedParts":[]} selecting exactly one base.',
|
|
89
|
+
selection: 'Include selection: {"candidates": ["..."], "selectedParts": []}, naming candidates from the brief.',
|
|
90
|
+
ranking: 'Include ranking: [{"candidate":"...", "rank":1, "reason":"..."}] for every candidate exactly once, with unique consecutive ranks starting at 1.',
|
|
91
|
+
review: 'Include findings: [{"severity": "low", "location": "...", "description": "...", "evidence": "..."}]; severity is critical, high, medium, or low. Use [] when there are no findings.',
|
|
92
|
+
'repro-review': 'Include findings: [{"severity":"high", "location":"...", "description":"...", "evidence":"...", "reproduction":{"command":["executable","arg"], "observed":"actual output", "expected":"intent requires this output"}}]. Include only findings proven by a run. Use [] when none survive.',
|
|
93
|
+
coverage: 'Include coverage: {"completed": ["..."], "unresolved": []}, listing completed required slices.',
|
|
94
|
+
};
|
|
95
|
+
return `\n\nAuthoritative Task Brief (${brief.id} revision ${brief.revision}, orders ${hash(brief.standingOrders)}):\n${JSON.stringify(brief, null, 2)}\nReturn one fenced JSON task report with all fields: {"status":"completed", "artifactRefs":[], "base":"<starting full git commit SHA>", "head":"<current full git commit SHA>", "commandsRun":[], "evidenceRefs":[], "deviations":[], "unresolved":[], "nextActions":[]}. status must be exactly one of completed, failed, or blocked (not a synonym). All six array fields are required, even when empty; commandsRun entries are arrays of command arguments. Use full commit SHAs from git rev-parse (40 hex characters for SHA-1 or 64 for SHA-256), not abbreviations or invented values. For each unresolved item or deviation, use {"severity":"advisory","description":"..."} or {"severity":"blocking","description":"..."}; use blocking when it affects acceptance or its impact is uncertain, and advisory only for non-blocking information supported by evidence. Legacy plain strings are blocking. ${brief.reportRequirements ? extra[brief.reportRequirements.kind] : ''} Do not claim verification from narrative alone.`;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function validateBudget(budget?: import('./types.ts').Budget): void {
|
|
99
|
+
if (!budget) return;
|
|
100
|
+
for (const [key,value] of Object.entries(budget)) if (!['maxTokens','maxCost','maxTimeSeconds'].includes(key) || !Number.isFinite(value) || value<=0) throw new Error(`INVALID_BUDGET: ${key}`);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function reportSatisfies(brief: TaskBrief, report: TaskReport): boolean {
|
|
104
|
+
const req=brief.reportRequirements;if(!req)return true;
|
|
105
|
+
if(req.kind==='evaluation')return Boolean(report.evaluation && req.criteria?.every(c=>report.evaluation!.some(e=>e.criterion===c && Number.isFinite(e.score) && e.score>=0 && e.score<=10 && e.evidence?.length && Array.isArray(e.weaknesses) && Array.isArray(e.selectedParts))));
|
|
106
|
+
if(req.kind==='cross-evaluation') {
|
|
107
|
+
if (!req.candidates?.length || !req.criteria?.length || !Array.isArray(report.crossEvaluation) ||
|
|
108
|
+
!Array.isArray(report.selection?.candidates) || report.selection.candidates.length !== 1 ||
|
|
109
|
+
!req.candidates.includes(report.selection.candidates[0]!) || !Array.isArray(report.selection.selectedParts)) return false;
|
|
110
|
+
const pairs = new Set<string>();
|
|
111
|
+
for (const entry of report.crossEvaluation) {
|
|
112
|
+
if (!entry || !req.candidates.includes(entry.candidate) || !req.criteria.includes(entry.criterion) ||
|
|
113
|
+
!Number.isFinite(entry.score) || entry.score < 0 || entry.score > 10 ||
|
|
114
|
+
!Array.isArray(entry.evidence) || !entry.evidence.some(value => typeof value === 'string' && value.trim()) ||
|
|
115
|
+
!Array.isArray(entry.weaknesses) || !Array.isArray(entry.selectedParts)) return false;
|
|
116
|
+
const pair = JSON.stringify([entry.candidate, entry.criterion]);
|
|
117
|
+
if (pairs.has(pair)) return false;
|
|
118
|
+
pairs.add(pair);
|
|
119
|
+
}
|
|
120
|
+
return req.candidates.every(candidate => req.criteria!.every(criterion => pairs.has(JSON.stringify([candidate, criterion]))));
|
|
121
|
+
}
|
|
122
|
+
if(req.kind==='selection')return Boolean(report.selection?.candidates.length && report.selection.candidates.every(c=>req.candidates?.includes(c)) && Array.isArray(report.selection.selectedParts));
|
|
123
|
+
if(req.kind==='ranking') {
|
|
124
|
+
if (!req.candidates?.length || !Array.isArray(report.ranking) || report.ranking.length !== req.candidates.length) return false;
|
|
125
|
+
const candidates = new Set<string>(), ranks = new Set<number>();
|
|
126
|
+
for (const item of report.ranking) {
|
|
127
|
+
if (!item || !req.candidates.includes(item.candidate) || candidates.has(item.candidate) || !Number.isInteger(item.rank) || item.rank < 1 || item.rank > req.candidates.length || ranks.has(item.rank) || typeof item.reason !== 'string' || !item.reason.trim()) return false;
|
|
128
|
+
candidates.add(item.candidate); ranks.add(item.rank);
|
|
129
|
+
}
|
|
130
|
+
return candidates.size === req.candidates.length && ranks.size === req.candidates.length;
|
|
131
|
+
}
|
|
132
|
+
if(req.kind==='review')return Array.isArray(report.findings) && report.findings.every(f=>['critical','high','medium','low'].includes(f.severity) && Boolean(f.location && f.description && f.evidence));
|
|
133
|
+
if(req.kind==='repro-review')return Array.isArray(report.findings) && report.findings.every(f=>['critical','high','medium','low'].includes(f.severity) && Boolean(f.location && f.description && f.evidence) && Array.isArray(f.reproduction?.command) && f.reproduction.command.length > 0 && f.reproduction.command.every(x=>typeof x==='string' && x.trim().length>0) && typeof f.reproduction.observed==='string' && f.reproduction.observed.trim().length>0 && typeof f.reproduction.expected==='string' && f.reproduction.expected.trim().length>0);
|
|
134
|
+
if(req.kind==='coverage')return Boolean(report.coverage && !report.coverage.unresolved.length && req.slices?.every(c=>report.coverage!.completed.includes(c)));
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/** Synthesis may paraphrase a finding, but its reproduction must appear in a verifier report. */
|
|
139
|
+
export function findingsBackedByVerifiers(report: TaskReport, verifiers: TaskReport[]): boolean {
|
|
140
|
+
if (!Array.isArray(report.findings)) return false;
|
|
141
|
+
const key = (finding: NonNullable<TaskReport['findings']>[number]) => finding.reproduction && JSON.stringify([finding.reproduction.command, finding.reproduction.observed, finding.reproduction.expected]);
|
|
142
|
+
const confirmed = new Set(verifiers.flatMap(value => value.findings ?? []).map(key).filter(Boolean));
|
|
143
|
+
return report.findings.every(finding => Boolean(key(finding) && confirmed.has(key(finding))));
|
|
144
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export type GateStatus = 'pending' | 'running' | 'passed' | 'failed' | 'blocked' | 'stale';
|
|
2
|
+
export interface GateSpec {
|
|
3
|
+
id: string; kind: 'command' | 'file' | 'diff' | 'test-report' | 'human-approval' | 'llm-review';
|
|
4
|
+
required?: boolean; command?: string[]; timeoutSeconds?: number;
|
|
5
|
+
sideEffect?: 'none' | 'local' | 'remote'; path?: string; pattern?: string;
|
|
6
|
+
format?: 'junit' | 'tap'; maxFiles?: number; coverage?: string[];
|
|
7
|
+
category?: 'behavior' | 'typecheck' | 'review';
|
|
8
|
+
}
|
|
9
|
+
export type TaskBrief = BriefFields & (
|
|
10
|
+
{ contractLevel: 'minimal'; acceptance?: Acceptance[] } |
|
|
11
|
+
{ contractLevel: 'strict'; acceptance: Acceptance[] }
|
|
12
|
+
);
|
|
13
|
+
export interface Acceptance { id: string; description: string; required: boolean; gateIds: string[] }
|
|
14
|
+
interface BriefFields {
|
|
15
|
+
id: string; revision: number; goal: string;
|
|
16
|
+
scope: { include: string[]; exclude: string[]; repoId: string };
|
|
17
|
+
contextRefs: string[];
|
|
18
|
+
verification: GateSpec[]; timeboxSeconds?: number; forbidden: string[];
|
|
19
|
+
standingOrders: string[]; reportFormat: 'task-report-v1';
|
|
20
|
+
reportRequirements?: {kind:'evaluation'|'cross-evaluation'|'selection'|'ranking'|'review'|'repro-review'|'coverage'; criteria?:string[]; candidates?:string[]; slices?:string[]};
|
|
21
|
+
}
|
|
22
|
+
export type ReportNote = string | { severity: 'blocking' | 'advisory'; description: string };
|
|
23
|
+
export interface TaskReport {
|
|
24
|
+
status: 'completed' | 'blocked' | 'failed'; artifactRefs: string[];
|
|
25
|
+
base: string; head: string; commandsRun: string[][]; evidenceRefs: string[];
|
|
26
|
+
deviations: ReportNote[]; unresolved: ReportNote[]; nextActions: string[];
|
|
27
|
+
evaluation?: {criterion:string;score:number;evidence:string[];weaknesses:string[];selectedParts:string[]}[];
|
|
28
|
+
crossEvaluation?: {candidate:string;criterion:string;score:number;evidence:string[];weaknesses:string[];selectedParts:string[]}[];
|
|
29
|
+
selection?: {candidates:string[];selectedParts:string[]};
|
|
30
|
+
ranking?: {candidate:string;rank:number;reason:string}[];
|
|
31
|
+
findings?: {severity:'critical'|'high'|'medium'|'low';location:string;description:string;evidence:string; reproduction?: {command:string[];observed:string;expected:string}}[];
|
|
32
|
+
coverage?: {completed:string[];unresolved:string[]};
|
|
33
|
+
}
|
|
34
|
+
export interface Budget { maxTokens?: number; maxCost?: number; maxTimeSeconds?: number }
|
|
35
|
+
export interface Usage { tokens: number | null; cost: number | null; elapsedMs: number }
|
|
36
|
+
export interface Fingerprint {
|
|
37
|
+
repoId: string; kind: 'working' | 'committed'; commitSha: string; treeSha: string;
|
|
38
|
+
workspaceDigest: string; indexTree: string; policyVersion: 1;
|
|
39
|
+
files: Record<string, string>; dirty: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface BaselineOwner { briefId: string; briefRevision: number; workflowId?: string; callKey?: string }
|
|
42
|
+
export interface Artifact { id: string; cwd: string; fingerprint: Fingerprint; parents: string[]; producer?: string; owner?: BaselineOwner; createdAt: string }
|
|
43
|
+
export interface Evidence {
|
|
44
|
+
id: string; gateId: string; gateDefinitionHash: string; status: GateStatus; reason?: string;
|
|
45
|
+
command?: string[]; cwd: string; exitCode?: number | null; startedAt: string; finishedAt: string;
|
|
46
|
+
artifactId: string; logPath: string; checksum: string; actor: string; environmentHash: string;
|
|
47
|
+
}
|
|
48
|
+
export interface Ledger {
|
|
49
|
+
id: string; artifactId: string; fingerprint: Fingerprint; evidenceRefs: string[];
|
|
50
|
+
contractAccepted: boolean;
|
|
51
|
+
gateIds: string[]; gateDefinitionHash: string; status: GateStatus;
|
|
52
|
+
verdict: 'unit-test-verified' | 'type-check-only' | 'verifier-blocked' | 'verifier-failed' | 'not-verified';
|
|
53
|
+
verifiedAt: string; verifiedBy: string; executionNonce: string;
|
|
54
|
+
diffBase?: { kind: 'pr' | 'fingerprint'; commitSha: string; fingerprintHash?: string; refreshed: boolean };
|
|
55
|
+
pr?: { repoId: string; number: number; headSha: string; baseSha?: string };
|
|
56
|
+
}
|
|
57
|
+
export interface Event { id: string; at: string; actor: string; type: string; subject: string; data: unknown }
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { hash, protocol, transact, uid } from '../runtime/protocol.ts';
|
|
2
|
+
import { ledgerCurrent } from '../verification/runner.ts';
|
|
3
|
+
import type { PRProvider, PullRequest } from './provider.ts';
|
|
4
|
+
// GitHub reports CLEAN only when the base and the required checks are settled. Every other merge
|
|
5
|
+
// state, and a missing one, needs a human look before shipping.
|
|
6
|
+
const CLEAN_MERGE_STATE='CLEAN';
|
|
7
|
+
export interface StackSpec { id:string; repoId:string; repo:string; numbers:number[]; owner:string; requireReview?:boolean; requireBehavior?:boolean; rootBase?:string }
|
|
8
|
+
export interface Frontier extends StackSpec { generation:number; digest:string; prs:PullRequest[]; checkedAt:string }
|
|
9
|
+
export async function refresh(spec:StackSpec,provider:PRProvider):Promise<Frontier> {
|
|
10
|
+
if(!/^[a-zA-Z0-9._-]+$/.test(spec.id) || ['__proto__','constructor','prototype'].includes(spec.id))throw new Error('INVALID_STACK_ID');
|
|
11
|
+
if(!spec.numbers.length || new Set(spec.numbers).size!==spec.numbers.length)throw new Error('INVALID_STACK');
|
|
12
|
+
const prs:PullRequest[]=[]; for(const number of spec.numbers)prs.push(await provider.read(spec.repo,number));
|
|
13
|
+
if(prs.some((p,i)=>p.repo!==spec.repo || p.number!==spec.numbers[i] || !p.headSha || !p.baseSha))throw new Error('STATE_UNCERTAIN');
|
|
14
|
+
// A dependent base must equal the preceding head before that predecessor is merged.
|
|
15
|
+
for(let i=1;i<prs.length;i++)if(prs[i-1].state!=='MERGED' && (prs[i].baseSha!==prs[i-1].headSha || Boolean(prs[i-1].headRef && prs[i].baseRef!==prs[i-1].headRef)))throw new Error('STACK_TOPOLOGY_MISMATCH');
|
|
16
|
+
return transact('frontier-refreshed',spec.id,'provider',s=>{
|
|
17
|
+
const old=s.frontiers[spec.id] as Frontier|undefined;
|
|
18
|
+
if(old && (old.owner!==spec.owner || old.repo!==spec.repo || old.repoId!==spec.repoId))throw new Error('STACK_IDENTITY_CONFLICT');
|
|
19
|
+
for(const e of Object.values(s.ledgers)) {
|
|
20
|
+
const p=prs.find(p=>e.pr?.repoId===spec.repoId && e.pr.number===p.number);
|
|
21
|
+
if(p && (!e.diffBase || e.diffBase.commitSha!==p.baseSha || e.pr!.headSha!==p.headSha))s.invalidations[e.id]={at:new Date().toISOString(),reason:'PR_BASE_OR_HEAD_CHANGED'};
|
|
22
|
+
}
|
|
23
|
+
// The shipping trunk is operator input, never a property of the PR under test. A persisted
|
|
24
|
+
// value wins so a later refresh cannot retarget the trunk silently.
|
|
25
|
+
const rootBase=old?.rootBase ?? spec.rootBase;
|
|
26
|
+
if(!rootBase)throw new Error('STACK_ROOT_BASE_REQUIRED');
|
|
27
|
+
if(old?.rootBase && spec.rootBase && spec.rootBase!==old.rootBase)throw new Error('STACK_ROOT_BASE_CHANGED');
|
|
28
|
+
const digest=hash({prs,rootBase,requireReview:spec.requireReview!==false,requireBehavior:spec.requireBehavior!==false});
|
|
29
|
+
const f:Frontier={...spec,rootBase,prs,digest,generation:(old?.generation ?? 0)+(old?.digest===digest?0:1),checkedAt:new Date().toISOString()};s.frontiers[spec.id]=f;return f;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
export function eligibility(f:Frontier):{number:number;eligible:boolean;blockers:string[]}[] {
|
|
33
|
+
const s=protocol();let lower=false;
|
|
34
|
+
return f.prs.map(p=>{
|
|
35
|
+
if(p.state==='MERGED')return {number:p.number,eligible:false,blockers:['ALREADY_MERGED']};
|
|
36
|
+
const blockers:string[]=[];
|
|
37
|
+
if(lower)blockers.push('LOWER_UNMERGED');
|
|
38
|
+
else if(f.rootBase && p.baseRef!==f.rootBase)blockers.push('FRONTIER_BASE_NOT_TRUNK');
|
|
39
|
+
lower=true;
|
|
40
|
+
if(p.state!=='OPEN')blockers.push('PR_NOT_OPEN');
|
|
41
|
+
// Runtime callers can be plain JavaScript, so absent provider fields must still block.
|
|
42
|
+
if(p.draft!==false)blockers.push('PR_DRAFT');
|
|
43
|
+
if(p.reviewThreads?.status!=='checked')blockers.push('REVIEW_THREADS_NOT_CHECKED');
|
|
44
|
+
else if(p.reviewThreads.unresolved>0)blockers.push('UNRESOLVED_REVIEW_THREADS');
|
|
45
|
+
if(p.mergeState!==CLEAN_MERGE_STATE)blockers.push(`MERGE_STATE_${p.mergeState ?? 'MISSING'}`);
|
|
46
|
+
if(p.mergeable!=='MERGEABLE')blockers.push(p.mergeable==='CONFLICTING'?'CONFLICT':'STATE_UNCERTAIN');
|
|
47
|
+
if(p.review==='changes-requested' || f.requireReview!==false && p.review!=='approved')blockers.push('REVIEW_REQUIRED');
|
|
48
|
+
if(p.ci!=='passed')blockers.push('CI_NOT_PASSED');
|
|
49
|
+
const entries=Object.values(s.ledgers).filter(e=>e.pr?.repoId===f.repoId && e.pr.number===p.number && e.pr.headSha===p.headSha && e.fingerprint.kind==='committed' && e.fingerprint.commitSha===p.headSha);
|
|
50
|
+
if(!entries.some(e=>e.diffBase?.commitSha===p.baseSha && e.contractAccepted && ledgerCurrent(e,e.fingerprint) && (f.requireBehavior===false || e.verdict==='unit-test-verified')))blockers.push('CURRENT_VERIFICATION_REQUIRED');
|
|
51
|
+
return {number:p.number,eligible:blockers.length===0,blockers};
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
export function authorizeMerge(f:Frontier,number:number,actor:string):string {
|
|
55
|
+
if(actor!=='human-cli')throw new Error('HUMAN_AUTHORIZATION_REQUIRED');
|
|
56
|
+
const token=uid('approval');transact('merge-authorized',f.id,actor,s=>{s.approvals[token]={stackId:f.id,number,digest:f.digest,generation:f.generation,expiresAt:Date.now()+5*60_000,used:false};return {token,number};});return token;
|
|
57
|
+
}
|
|
58
|
+
export async function ship(spec:StackSpec,provider:PRProvider,options:{token?:string;dryRun?:boolean}={}):Promise<unknown> {
|
|
59
|
+
const f=await refresh(spec,provider);const decisions=eligibility(f);
|
|
60
|
+
if(options.dryRun!==false)return {frontier:f,decisions,dryRun:true};
|
|
61
|
+
const approval=options.token?protocol().approvals[options.token]:undefined;
|
|
62
|
+
if(!approval || approval.stackId!==f.id || approval.digest!==f.digest || approval.generation!==f.generation || approval.used || approval.expiresAt<Date.now())throw new Error('AUTHORIZATION_MISSING_OR_STALE');
|
|
63
|
+
const target=f.prs.find(p=>p.number===approval.number)!;
|
|
64
|
+
if(!decisions.find(d=>d.number===target?.number)?.eligible)throw new Error('SHIPPING_BLOCKED');
|
|
65
|
+
// Query twice, then use provider's server-side expected-head precondition.
|
|
66
|
+
const checked=await refresh(spec,provider);
|
|
67
|
+
if(checked.digest!==f.digest || checked.generation!==f.generation)throw new Error('FRONTIER_CHANGED');
|
|
68
|
+
transact('merge-requested',f.id,'shipping-gate',s=>{
|
|
69
|
+
const a=s.approvals[options.token!];if(a.used)throw new Error('AUTHORIZATION_CONSUMED');a.used=true;
|
|
70
|
+
return {number:target.number,head:target.headSha};
|
|
71
|
+
});
|
|
72
|
+
await provider.merge(target);
|
|
73
|
+
const actual=await provider.read(spec.repo,target.number);
|
|
74
|
+
if(actual.state!=='MERGED')throw new Error('MERGE_UNCONFIRMED');
|
|
75
|
+
transact('merge-confirmed',f.id,'provider',()=>({number:actual.number,head:actual.headSha}));
|
|
76
|
+
return {merged:actual.number,frontier:await refresh(spec,provider)};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** Native snapshot states, not fabricated Cursor watcher verdicts. No merging or polling. */
|
|
80
|
+
export function watchFrontier(f:Frontier,previous?:{number:number;headSha:string;digest:string}) {
|
|
81
|
+
const target=f.prs.find(p=>p.state!=='MERGED');
|
|
82
|
+
if(!target)return {state:'complete',frontier:null,digest:f.digest};
|
|
83
|
+
if(target.state==='CLOSED')return {state:'closed',frontier:target.number,digest:f.digest};
|
|
84
|
+
const decision=eligibility(f).find(d=>d.number===target.number)!;
|
|
85
|
+
const advanced=previous && previous.number!==target.number;
|
|
86
|
+
return {state:advanced?'advance':decision.eligible?'reviewable':'waiting',frontier:target.number,headSha:target.headSha,digest:f.digest,blockers:decision.blockers,autoMergeRequested:target.autoMergeRequested ?? false,queueState:'not-claimed',stopBeforeMerge:true};
|
|
87
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { git } from '../artifacts/fingerprint.ts';
|
|
2
|
+
export function githubRepository(cwd:string):string {
|
|
3
|
+
const remote=git(cwd,['remote','get-url','origin']);
|
|
4
|
+
const match=remote.match(/^(?:https:\/\/(?:[^/@]+@)?github\.com\/|git@github\.com:|ssh:\/\/git@github\.com\/)([\w.-]+\/[\w.-]+?)(?:\.git)?\/?$/);
|
|
5
|
+
if(!match)throw new Error('GITHUB_REPOSITORY_UNCONFIRMED');return match[1];
|
|
6
|
+
}
|
|
7
|
+
export function assertGitHubRepository(cwd:string,repo:string):void {
|
|
8
|
+
if(githubRepository(cwd).toLowerCase()!==repo.toLowerCase())throw new Error('PROVIDER_REPOSITORY_MISMATCH');
|
|
9
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { assertGitHubRepository } from "./git.ts";
|
|
2
|
+
import { writeFileSync } from 'node:fs';
|
|
3
|
+
import { homePath } from '../runtime/home.ts';
|
|
4
|
+
import { protocol, uid, transact } from '../runtime/protocol.ts';
|
|
5
|
+
import { fingerprint } from '../artifacts/fingerprint.ts';
|
|
6
|
+
import { ledgerCurrent } from '../verification/runner.ts';
|
|
7
|
+
import type { GitHubCLI } from './provider.ts';
|
|
8
|
+
export function preparePR(cwd:string,ledgerId:string,options:{repo:string;base:string;head:string;title:string}) {
|
|
9
|
+
assertGitHubRepository(cwd,options.repo);
|
|
10
|
+
const l=protocol().ledgers[ledgerId];const current=fingerprint(cwd,'committed');
|
|
11
|
+
if(!l || !l.contractAccepted || l.fingerprint.kind!=='committed' || !ledgerCurrent(l,current))throw new Error('CURRENT_ACCEPTED_COMMIT_REQUIRED');
|
|
12
|
+
if(!options.title.trim() || !/^[\w.-]+\/[\w.-]+$/.test(options.repo))throw new Error('INVALID_PR_DETAILS');
|
|
13
|
+
const plan={id:uid('prplan'),...options,headSha:current.commitSha,ledgerId,evidence:l.evidenceRefs,body:`${options.title}\n\nVerified commit: ${current.commitSha}\nVerification: ${l.verdict}\nLedger: ${l.id}\nEvidence: ${l.evidenceRefs.join(', ')}\n`};
|
|
14
|
+
transact('pr-prepared',plan.id,'delivery',()=>plan);return plan;
|
|
15
|
+
}
|
|
16
|
+
export async function openPreparedPR(cwd:string,plan:ReturnType<typeof preparePR>,provider:GitHubCLI,approve=false):Promise<unknown> {
|
|
17
|
+
if(!approve)return {plan,dryRun:true};
|
|
18
|
+
preparePR(cwd,plan.ledgerId,plan);
|
|
19
|
+
if(await provider.branchHead(plan.repo,plan.head)!==plan.headSha)throw new Error('REMOTE_BRANCH_NOT_VERIFIED');
|
|
20
|
+
const path=homePath(`${plan.id}.md`);writeFileSync(path,plan.body,{mode:0o600});
|
|
21
|
+
const url=await provider.open(plan.repo,plan.base,plan.head,plan.title,path);
|
|
22
|
+
transact('pr-opened',plan.id,'human-cli',()=>({url,headSha:plan.headSha}));return {url};
|
|
23
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { collectReviewThreads, REVIEW_THREADS_QUERY, type ReviewThreadSummary } from './review-threads.ts';
|
|
2
|
+
import { execFileSync } from 'node:child_process';
|
|
3
|
+
export interface PullRequest {
|
|
4
|
+
headRef?:string; draft:boolean; mergeState:string; autoMergeRequested?:boolean; reviewThreads?:ReviewThreadSummary;
|
|
5
|
+
number:number; repo:string; headSha:string; baseSha:string; baseRef:string; state:'OPEN'|'MERGED'|'CLOSED';
|
|
6
|
+
mergeable:'MERGEABLE'|'CONFLICTING'|'UNKNOWN'; ci:'passed'|'failed'|'pending'|'unknown'; review:'approved'|'changes-requested'|'pending';
|
|
7
|
+
}
|
|
8
|
+
export interface PRProvider { read(repo:string,number:number):Promise<PullRequest>; merge(pr:PullRequest):Promise<void> }
|
|
9
|
+
export class GitHubCLI implements PRProvider {
|
|
10
|
+
private readonly execute?: (args:string[])=>string;
|
|
11
|
+
constructor(execute?: (args:string[])=>string){this.execute=execute;}
|
|
12
|
+
private gh(args:string[]):string {if(this.execute)return this.execute(args);return execFileSync('gh',args,{encoding:'utf8',timeout:30000,maxBuffer:4*1024*1024});}
|
|
13
|
+
async read(repo:string,number:number):Promise<PullRequest> {
|
|
14
|
+
if(!/^[\w.-]+\/[\w.-]+$/.test(repo) || !Number.isSafeInteger(number) || number<1)throw new Error('Invalid GitHub PR');
|
|
15
|
+
let p=JSON.parse(this.gh(['pr','view',String(number),'--repo',repo,'--json','number,headRefOid,headRefName,baseRefOid,baseRefName,state,isDraft,mergeable,mergeStateStatus,reviewDecision,statusCheckRollup,autoMergeRequest']));
|
|
16
|
+
const [owner,name]=repo.split('/');
|
|
17
|
+
const reviewThreads=await collectReviewThreads(async cursor=>JSON.parse(this.gh(['api','graphql','-f',`query=${REVIEW_THREADS_QUERY}`,'-F',`owner=${owner}`,'-F',`repo=${name}`,'-F',`number=${number}`,...(cursor ? ['-f',`after=${cursor}`]:[])])));
|
|
18
|
+
const confirmed=JSON.parse(this.gh(['pr','view',String(number),'--repo',repo,'--json','number,headRefOid,headRefName,baseRefOid,baseRefName,state,isDraft,mergeable,mergeStateStatus,reviewDecision,statusCheckRollup,autoMergeRequest']));
|
|
19
|
+
if(confirmed.headRefOid!==p.headRefOid || confirmed.baseRefOid!==p.baseRefOid || confirmed.state!==p.state)throw new Error('PR_CHANGED_DURING_READ');
|
|
20
|
+
p=confirmed;
|
|
21
|
+
const checks=p.statusCheckRollup;
|
|
22
|
+
const ci = !Array.isArray(checks) || !checks.length ? 'unknown' : checks.some((c:any)=>['FAILURE','ERROR','CANCELLED','TIMED_OUT','ACTION_REQUIRED'].includes(c.conclusion ?? c.state))?'failed':checks.every((c:any)=>['SUCCESS'].includes(c.conclusion ?? c.state))?'passed':'pending';
|
|
23
|
+
return {headRef:p.headRefName,draft:p.isDraft,mergeState:p.mergeStateStatus ?? 'UNKNOWN',autoMergeRequested:p.autoMergeRequest!=null,reviewThreads,number:p.number,repo,headSha:p.headRefOid,baseSha:p.baseRefOid,baseRef:p.baseRefName,state:p.state,mergeable:p.mergeable,ci,review:p.reviewDecision==='APPROVED'?'approved':p.reviewDecision==='CHANGES_REQUESTED'?'changes-requested':'pending'};
|
|
24
|
+
}
|
|
25
|
+
async merge(pr:PullRequest):Promise<void> {
|
|
26
|
+
this.gh(['pr','merge',String(pr.number),'--repo',pr.repo,'--merge','--match-head-commit',pr.headSha]);
|
|
27
|
+
}
|
|
28
|
+
async branchHead(repo:string,branch:string):Promise<string> {
|
|
29
|
+
const r=JSON.parse(this.gh(['api',`repos/${repo}/git/ref/heads/${encodeURIComponent(branch)}`]));
|
|
30
|
+
if(r.object?.type!=='commit' || !r.object.sha)throw new Error('REMOTE_BRANCH_UNCERTAIN');return r.object.sha;
|
|
31
|
+
}
|
|
32
|
+
async find(repo:string,head:string):Promise<number|null> {
|
|
33
|
+
if(!/^[\w.-]+\/[\w.-]+$/.test(repo) || !head || head.startsWith('-'))throw new Error('INVALID_PR_LOOKUP');
|
|
34
|
+
const prs=JSON.parse(this.gh(['pr','list','--repo',repo,'--head',head,'--state','all','--limit','100','--json','number']));
|
|
35
|
+
if(!Array.isArray(prs) || prs.length>1)throw new Error('PR_LOOKUP_AMBIGUOUS');
|
|
36
|
+
return prs[0]?.number ?? null;
|
|
37
|
+
}
|
|
38
|
+
async open(repo:string,base:string,head:string,title:string,bodyFile:string):Promise<string> {
|
|
39
|
+
return this.gh(['pr','create','--repo',repo,'--base',base,'--head',head,'--title',title,'--body-file',bodyFile]).trim();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface ReviewThread {id:string;resolved:boolean;author:string|null;createdAt:string|null}
|
|
2
|
+
export interface ReviewThreadSummary {status:'checked';unresolved:number;bugbotUnresolved:number;total:number}
|
|
3
|
+
export const REVIEW_THREADS_QUERY = `query($owner:String!,$repo:String!,$number:Int!,$after:String){repository(owner:$owner,name:$repo){pullRequest(number:$number){reviewThreads(first:100,after:$after){pageInfo{hasNextPage endCursor} nodes{id isResolved comments(first:1){nodes{createdAt author{login}}}}}}}}`;
|
|
4
|
+
export function parseReviewThreadPage(value:any):{threads:ReviewThread[];next:string|null} {
|
|
5
|
+
const page=value?.data?.repository?.pullRequest?.reviewThreads;
|
|
6
|
+
if(value?.errors?.length || !page || !Array.isArray(page.nodes) || page.nodes.length>100 || typeof page.pageInfo?.hasNextPage!=='boolean')throw new Error('REVIEW_THREADS_UNAVAILABLE');
|
|
7
|
+
const threads=page.nodes.map((node:any)=>{
|
|
8
|
+
if(typeof node.id!=='string' || !node.id || typeof node.isResolved!=='boolean' || !Array.isArray(node.comments?.nodes))throw new Error('REVIEW_THREADS_UNAVAILABLE');
|
|
9
|
+
const first=node.comments.nodes[0];return {id:node.id,resolved:node.isResolved,author:first?.author?.login ?? null,createdAt:first?.createdAt ?? null};
|
|
10
|
+
});
|
|
11
|
+
const next=page.pageInfo.hasNextPage?page.pageInfo.endCursor:null;
|
|
12
|
+
if(page.pageInfo.hasNextPage && (typeof next!=='string' || !next || next.length>2048))throw new Error('REVIEW_THREADS_CURSOR_INVALID');
|
|
13
|
+
return {threads,next};
|
|
14
|
+
}
|
|
15
|
+
export async function collectReviewThreads(read:(cursor:string|null)=>Promise<unknown>):Promise<ReviewThreadSummary> {
|
|
16
|
+
const cursors=new Set<string>(),threads=new Map<string,ReviewThread>();let cursor:string|null=null,pages=0;
|
|
17
|
+
do {
|
|
18
|
+
if(++pages>50)throw new Error('REVIEW_THREADS_PAGE_LIMIT');
|
|
19
|
+
const page=parseReviewThreadPage(await read(cursor));
|
|
20
|
+
for(const t of page.threads) {
|
|
21
|
+
const previous=threads.get(t.id);if(previous && JSON.stringify(previous)!==JSON.stringify(t))throw new Error('REVIEW_THREADS_CHANGED_DURING_SCAN');threads.set(t.id,t);
|
|
22
|
+
}
|
|
23
|
+
cursor=page.next;
|
|
24
|
+
if(cursor) {if(cursors.has(cursor))throw new Error('REVIEW_THREADS_CURSOR_REPEATED');cursors.add(cursor);}
|
|
25
|
+
}while(cursor!==null);
|
|
26
|
+
const unresolved=[...threads.values()].filter(t=>!t.resolved);
|
|
27
|
+
return {status:'checked',total:threads.size,unresolved:unresolved.length,bugbotUnresolved:unresolved.filter(t=>/bugbot/i.test(t.author ?? '')).length};
|
|
28
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
|
+
import { realpathSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import { fingerprint, git } from '../artifacts/fingerprint.ts';
|
|
4
|
+
import { hash, protocol, transact } from '../runtime/protocol.ts';
|
|
5
|
+
import { homePath } from '../runtime/home.ts';
|
|
6
|
+
import { preparePR, openPreparedPR } from './prepare.ts';
|
|
7
|
+
import type { PullRequest } from './provider.ts';
|
|
8
|
+
|
|
9
|
+
export interface StackLane {key:string;cwd:string;head:string;ledgerId:string;title:string}
|
|
10
|
+
export interface StackInput {repo:string;rootBase:string;owner:string;lanes:StackLane[]}
|
|
11
|
+
export interface StackPlan extends StackInput {id:string;rootSha:string;entries:(StackLane & {base:string;baseSha:string;headSha:string;patchId:string})[]}
|
|
12
|
+
export interface StackProvider {
|
|
13
|
+
branchHead(repo:string,branch:string):Promise<string>;
|
|
14
|
+
find(repo:string,head:string):Promise<number|null>;
|
|
15
|
+
read(repo:string,number:number):Promise<PullRequest>;
|
|
16
|
+
open(repo:string,base:string,head:string,title:string,bodyFile:string):Promise<string>;
|
|
17
|
+
}
|
|
18
|
+
function validBranch(branch:string):boolean {return typeof branch==='string' && /^[A-Za-z0-9][A-Za-z0-9._/-]*$/.test(branch) && !branch.includes('..') && !branch.includes('//') && !branch.endsWith('/') && !branch.endsWith('.lock');}
|
|
19
|
+
function laneMatches(pr:PullRequest,repo:string,lane:StackPlan['entries'][number]):boolean {
|
|
20
|
+
return pr.repo===repo && pr.state==='OPEN' && pr.baseRef===lane.base && pr.baseSha===lane.baseSha && pr.headSha===lane.headSha && pr.draft===false;
|
|
21
|
+
}
|
|
22
|
+
function patchId(cwd:string,base:string,head:string):string {
|
|
23
|
+
const diff=execFileSync('git',['-C',cwd,'diff','--no-ext-diff','--no-textconv','--binary',base,head],{encoding:'utf8',maxBuffer:64*1024*1024});
|
|
24
|
+
const result=execFileSync('git',['patch-id','--stable'],{input:diff,encoding:'utf8',maxBuffer:1024}).trim().split(/\s/)[0];
|
|
25
|
+
if(!/^[a-f0-9]{40}$/.test(result))throw new Error('STACK_EMPTY_PATCH');return result;
|
|
26
|
+
}
|
|
27
|
+
export async function prepareStack(input:StackInput,provider:StackProvider):Promise<StackPlan> {
|
|
28
|
+
if(!/^[\w.-]+\/[\w.-]+$/.test(input.repo) || !validBranch(input.rootBase) || !input.owner?.trim() || !Array.isArray(input.lanes) || !input.lanes.length || input.lanes.length>32)throw new Error('INVALID_STACK_PLAN');
|
|
29
|
+
if(new Set(input.lanes.map(l=>l.key)).size!==input.lanes.length || new Set(input.lanes.map(l=>l.head)).size!==input.lanes.length || input.lanes.some(l=>!validBranch(l.head) || l.head===input.rootBase || !l.key || !l.title))throw new Error('INVALID_STACK_LANES');
|
|
30
|
+
const rootSha=await provider.branchHead(input.repo,input.rootBase);
|
|
31
|
+
if(!/^[a-f0-9]{40}$/.test(rootSha))throw new Error('STACK_BASE_UNKNOWN');
|
|
32
|
+
let base=input.rootBase,baseSha=rootSha,repoId:string|undefined;const entries:StackPlan['entries']=[],worktrees=new Set<string>();
|
|
33
|
+
for(const lane of input.lanes) {
|
|
34
|
+
const cwd=realpathSync(lane.cwd),fp=fingerprint(cwd,'committed');
|
|
35
|
+
if(worktrees.has(cwd) || repoId && fp.repoId!==repoId)throw new Error('STACK_WORKTREE_IDENTITY');worktrees.add(cwd);repoId=fp.repoId;
|
|
36
|
+
if(git(cwd,['branch','--show-current'])!==lane.head)throw new Error('STACK_BRANCH_MISMATCH');
|
|
37
|
+
if(await provider.branchHead(input.repo,lane.head)!==fp.commitSha)throw new Error('REMOTE_BRANCH_NOT_VERIFIED');
|
|
38
|
+
try{git(cwd,['merge-base','--is-ancestor',baseSha,fp.commitSha]);}catch{throw new Error('STACK_TOPOLOGY_MISMATCH');}
|
|
39
|
+
const prepared=preparePR(cwd,lane.ledgerId,{repo:input.repo,base,head:lane.head,title:lane.title});
|
|
40
|
+
const ledger=protocol().ledgers[lane.ledgerId];
|
|
41
|
+
if(ledger.diffBase?.commitSha!==baseSha || ledger.verdict!=='unit-test-verified')throw new Error('STACK_PARENT_VERIFICATION_REQUIRED');
|
|
42
|
+
entries.push({...lane,cwd,base,baseSha,headSha:prepared.headSha,patchId:patchId(cwd,baseSha,fp.commitSha)});base=lane.head;baseSha=fp.commitSha;
|
|
43
|
+
}
|
|
44
|
+
const stable={repo:input.repo,rootBase:input.rootBase,owner:input.owner,lanes:entries.map(({key,cwd,head,ledgerId,title})=>({key,cwd,head,ledgerId,title})),rootSha,entries},plan={...stable,id:`stack-${hash(stable).slice(0,20)}`};
|
|
45
|
+
transact('stack-prepared',plan.id,input.owner,()=>({repo:plan.repo,rootSha,entries:entries.map(e=>({key:e.key,base:e.base,head:e.head,headSha:e.headSha,patchId:e.patchId}))}));return plan;
|
|
46
|
+
}
|
|
47
|
+
export async function openStack(plan:StackPlan,provider:StackProvider,approve=false):Promise<unknown> {
|
|
48
|
+
const current=await prepareStack({repo:plan.repo,rootBase:plan.rootBase,owner:plan.owner,lanes:plan.lanes},provider);
|
|
49
|
+
if(current.id!==plan.id || hash(current.entries)!==hash(plan.entries))throw new Error('STACK_PLAN_STALE');
|
|
50
|
+
if(!approve)return {plan:current,dryRun:true,mergeAuthorized:false};
|
|
51
|
+
const opened:{key:string;number?:number;url?:string;reused:boolean}[]=[];
|
|
52
|
+
for(const lane of plan.entries) {
|
|
53
|
+
// Recheck both refs immediately before each creation; stop rather than rewrite topology.
|
|
54
|
+
if(await provider.branchHead(plan.repo,lane.base)!==lane.baseSha || await provider.branchHead(plan.repo,lane.head)!==lane.headSha)throw new Error('STACK_REFS_MOVED');
|
|
55
|
+
const existing=await provider.find(plan.repo,lane.head);
|
|
56
|
+
if(existing!==null) {
|
|
57
|
+
const pr=await provider.read(plan.repo,existing);
|
|
58
|
+
if(!laneMatches(pr,plan.repo,lane))throw new Error('STACK_EXISTING_PR_MISMATCH');
|
|
59
|
+
opened.push({key:lane.key,number:existing,reused:true});continue;
|
|
60
|
+
}
|
|
61
|
+
const prepared=preparePR(lane.cwd,lane.ledgerId,{repo:plan.repo,base:lane.base,head:lane.head,title:lane.title});
|
|
62
|
+
prepared.body=`## Why\n${lane.title}\n\n## What changed\nVerified stack unit ${lane.key}.\n\n## Scope\nOnly this branch relative to ${lane.base}.\n\n## Blast Radius\nReview this unit independently; dependencies land bottom-up. No merge authority.\n\n## Verification\nHead: ${lane.headSha}\nBase: ${lane.baseSha}\nPatch ID: ${lane.patchId}\nLedger: ${lane.ledgerId}\nIndependent semantic review and current remote CI remain required.\n`;
|
|
63
|
+
const result=await openPreparedPR(lane.cwd,prepared,provider as any,true) as {url:string};
|
|
64
|
+
// A ref can move between the last check and creation. Read the new PR back, or this lane's
|
|
65
|
+
// verification would describe a commit the PR does not hold. Stop the stack and revoke the
|
|
66
|
+
// lane's ledger when that happens.
|
|
67
|
+
const created=await provider.find(plan.repo,lane.head);
|
|
68
|
+
if(created===null)throw new Error('STACK_CREATED_PR_UNREADABLE');
|
|
69
|
+
if(!laneMatches(await provider.read(plan.repo,created),plan.repo,lane)) {
|
|
70
|
+
transact('stack-verification-stale',plan.id,plan.owner,s=>{s.invalidations[lane.ledgerId]={at:new Date().toISOString(),reason:'PR_CREATED_FROM_UNVERIFIED_REFS'};return {key:lane.key,number:created};});
|
|
71
|
+
throw new Error('STACK_CREATED_PR_MISMATCH');
|
|
72
|
+
}
|
|
73
|
+
opened.push({key:lane.key,number:created,...result,reused:false});
|
|
74
|
+
}
|
|
75
|
+
transact('stack-opened',plan.id,plan.owner,()=>({opened,mergeAuthorized:false}));return {id:plan.id,opened,mergeAuthorized:false};
|
|
76
|
+
}
|