dsh-pstack 0.2.0-beta.1 → 0.2.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -3
- package/README.md +135 -84
- package/README.zh.md +185 -0
- package/cordis.patch.yml +97 -27
- package/dist/host-contract-CUPSpeNk.d.mts +22 -0
- package/dist/index.d.mts +49 -238
- package/dist/index.mjs +250 -123
- package/dist/models.d.mts +44 -0
- package/dist/models.mjs +201 -0
- package/dist/paths-BT77khwm.mjs +48 -0
- package/dist/pstack/LICENSE +21 -0
- package/dist/pstack/README.md +291 -0
- package/dist/pstack/agents/poteto-agent.md +9 -0
- package/{assets → dist/pstack}/docs/guide/01-setup.md +13 -11
- package/{assets → dist/pstack}/docs/guide/02-poteto-mode.md +4 -4
- package/{assets → dist/pstack}/docs/guide/04-design.md +4 -4
- package/{assets → dist/pstack}/docs/guide/05-build-and-clean.md +2 -2
- package/{assets → dist/pstack}/docs/guide/06-verify-and-ship.md +13 -3
- package/{assets → dist/pstack}/docs/guide/07-overnight.md +15 -13
- package/{assets → dist/pstack}/docs/guide/09-make-it-yours.md +6 -2
- package/{assets → dist/pstack}/docs/guide/10-recipes-and-pitfalls.md +7 -5
- package/{assets → dist/pstack}/docs/guide/README.md +1 -1
- package/dist/pstack/docs/harness/dsh.md +98 -0
- package/{assets → dist/pstack}/skills/architect/SKILL.md +12 -12
- package/dist/pstack/skills/arena/SKILL.md +50 -0
- package/{assets → dist/pstack}/skills/automate-me/SKILL.md +14 -14
- package/{assets → dist/pstack}/skills/benchmark-checklist/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/blast-radius/SKILL.md +4 -6
- package/{assets → dist/pstack}/skills/correct/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/create-formal-verification-skill/SKILL.md +4 -2
- package/{assets → dist/pstack}/skills/create-verification-skill/SKILL.md +5 -5
- package/dist/pstack/skills/figure-it-out/SKILL.md +54 -0
- package/dist/pstack/skills/how/SKILL.md +38 -0
- package/{assets → dist/pstack}/skills/in-your-own-words/SKILL.md +1 -1
- package/dist/pstack/skills/interrogate/SKILL.md +33 -0
- package/{assets → dist/pstack}/skills/ketchup/SKILL.md +3 -5
- package/dist/pstack/skills/ketchup-video/SKILL.md +29 -0
- package/{assets → dist/pstack}/skills/maintain-formal-verification-skill/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/maintain-verification-skill/SKILL.md +3 -3
- package/dist/pstack/skills/make-bot-ui/SKILL.md +117 -0
- package/dist/pstack/skills/no-comments/SKILL.md +26 -0
- package/{assets → dist/pstack}/skills/poteto-help/SKILL.md +34 -31
- package/{assets → dist/pstack}/skills/poteto-help/references/prompting.md +1 -1
- package/{assets → dist/pstack}/skills/poteto-help/references/recipes.md +3 -3
- package/{assets → dist/pstack}/skills/poteto-mode/SKILL.md +20 -19
- package/dist/pstack/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
- package/dist/pstack/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/dist/pstack/skills/poteto-mode/playbooks/autopilot-full.md +25 -0
- package/dist/pstack/skills/poteto-mode/playbooks/autopilot-stack.md +8 -0
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/babysit.md +4 -4
- package/dist/pstack/skills/poteto-mode/playbooks/bug-fix.md +15 -0
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/eval.md +3 -3
- package/dist/pstack/skills/poteto-mode/playbooks/feature.md +21 -0
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/hillclimb.md +3 -3
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/investigation.md +2 -2
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/multi-phase-plan.md +23 -23
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/opening-a-pr.md +6 -6
- package/dist/pstack/skills/poteto-mode/playbooks/orchestrate.md +25 -0
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/pause-safely.md +2 -2
- package/dist/pstack/skills/poteto-mode/playbooks/perf-issue.md +25 -0
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/prototype.md +4 -4
- package/dist/pstack/skills/poteto-mode/playbooks/refactoring.md +16 -0
- package/dist/pstack/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/dist/pstack/skills/poteto-mode/playbooks/session-pickup.md +11 -0
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/shipping.md +2 -2
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/trace-forensics.md +2 -2
- package/dist/pstack/skills/poteto-mode/playbooks/visual-parity.md +11 -0
- package/dist/pstack/skills/poteto-mode/playbooks/worktree-cleanup.md +12 -0
- package/{assets → dist/pstack}/skills/poteto-mode/scripts/check-plan.mjs +6 -8
- package/dist/pstack/skills/poteto-mode/scripts/check-plan.test.mjs +128 -0
- package/{assets/skills/poteto-mode/scripts/check-plan.test.mjs → dist/pstack/skills/poteto-mode/scripts/expect.mjs} +12 -101
- package/dist/pstack/skills/poteto-mode/scripts/support.mjs +93 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/cli.mjs +123 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/cli.test.mjs +217 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.mjs +119 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/github.mjs +626 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/github.test.mjs +521 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/policy.mjs +657 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/policy.test.mjs +523 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/render.mjs +106 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/types.mjs +9 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/watch-pr.mjs +5 -0
- package/{assets → dist/pstack}/skills/poteto-mode/scripts/worktree-audit.mjs +15 -22
- package/dist/pstack/skills/poteto-mode/scripts/worktree-audit.test.mjs +134 -0
- package/{assets → dist/pstack}/skills/principle-attack-the-premise/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-boundary-discipline/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-encode-lessons-in-structure/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-exhaust-the-design-space/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-experience-first/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-explain-the-number/SKILL.md +3 -2
- package/{assets → dist/pstack}/skills/principle-fix-root-causes/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-laziness-protocol/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-make-operations-idempotent/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-minimize-reader-load/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-model-the-domain/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-never-block-on-the-human/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-outcome-oriented-execution/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-prove-it-works/SKILL.md +2 -2
- package/{assets → dist/pstack}/skills/principle-redesign-from-first-principles/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-separate-before-serializing-shared-state/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-sequence-verifiable-units/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-subtract-before-you-add/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-test-behavior-not-implementation/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-type-system-discipline/SKILL.md +1 -1
- package/dist/pstack/skills/recall/SKILL.md +37 -0
- package/dist/pstack/skills/reflect/SKILL.md +71 -0
- package/{assets → dist/pstack}/skills/reflect/references/divergent-reviewer.md +4 -4
- package/{assets → dist/pstack}/skills/reflect/references/judgment-reviewer.md +2 -2
- package/{assets → dist/pstack}/skills/reflect/references/synthesizer.md +5 -5
- package/{assets → dist/pstack}/skills/reflect/references/tooling-reviewer.md +2 -2
- package/dist/pstack/skills/setup-pstack/SKILL.md +80 -0
- package/{assets → dist/pstack}/skills/sharpen/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/show-me-your-work/SKILL.md +8 -8
- package/{assets → dist/pstack}/skills/show-me-your-work/scripts/log.mjs +1 -3
- package/dist/pstack/skills/show-me-your-work/scripts/log.test.mjs +56 -0
- package/dist/pstack/skills/statechart/SKILL.md +82 -0
- package/dist/pstack/skills/statechart/references/render.md +93 -0
- package/dist/pstack/skills/statechart/scripts/backends/cfg.mjs +31 -0
- package/dist/pstack/skills/statechart/scripts/backends/mermaid.mjs +186 -0
- package/dist/pstack/skills/statechart/scripts/backends/plain-text.mjs +62 -0
- package/dist/pstack/skills/statechart/scripts/backends/report.mjs +84 -0
- package/dist/pstack/skills/statechart/scripts/frontends/config.mjs +268 -0
- package/dist/pstack/skills/statechart/scripts/frontends/dot.mjs +67 -0
- package/dist/pstack/skills/statechart/scripts/frontends/marks.mjs +94 -0
- package/dist/pstack/skills/statechart/scripts/frontends/messages.mjs +48 -0
- package/dist/pstack/skills/statechart/scripts/frontends/spec.mjs +101 -0
- package/dist/pstack/skills/statechart/scripts/frontends/trace.mjs +39 -0
- package/dist/pstack/skills/statechart/scripts/frontends/value.mjs +180 -0
- package/dist/pstack/skills/statechart/scripts/frontends/verdict.mjs +40 -0
- package/dist/pstack/skills/statechart/scripts/frontends/view.mjs +99 -0
- package/dist/pstack/skills/statechart/scripts/ir.mjs +277 -0
- package/dist/pstack/skills/statechart/scripts/passes/annotate.mjs +92 -0
- package/dist/pstack/skills/statechart/scripts/passes/label.mjs +210 -0
- package/dist/pstack/skills/statechart/scripts/passes/lift.mjs +84 -0
- package/dist/pstack/skills/statechart/scripts/passes/loop-check.mjs +47 -0
- package/dist/pstack/skills/statechart/scripts/passes/paths.mjs +72 -0
- package/dist/pstack/skills/statechart/scripts/passes/reach.mjs +135 -0
- package/dist/pstack/skills/statechart/scripts/passes/region-check.mjs +82 -0
- package/dist/pstack/skills/statechart/scripts/passes/regions.mjs +268 -0
- package/dist/pstack/skills/statechart/scripts/pipeline.mjs +72 -0
- package/dist/pstack/skills/statechart/scripts/run.mjs +440 -0
- package/dist/pstack/skills/statechart/scripts/statechart.mjs +155 -0
- package/dist/pstack/skills/statechart/scripts/statechart.test.mjs +198 -0
- package/dist/pstack/skills/statechart/scripts/worker.mjs +31 -0
- package/dist/pstack/skills/swarm/SKILL.md +43 -0
- package/{assets → dist/pstack}/skills/tdd/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/teach/SKILL.md +2 -2
- package/{assets → dist/pstack}/skills/technical-writing/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/typescript-best-practices/SKILL.md +3 -6
- package/{assets → dist/pstack}/skills/why/SKILL.md +8 -8
- package/dist/script.d.mts +9 -111
- package/dist/script.mjs +32 -329
- package/dist/skill.d.mts +38 -0
- package/dist/skill.mjs +183 -0
- package/dist/skills/authored/decision-audit/SKILL.md +99 -0
- package/dist/skills/authored/decision-audit/SKILL.zh.md +99 -0
- package/dist/skills/authored/decision-audit/references/recover-commit.md +17 -0
- package/dist/skills/authored/decision-audit/references/recover-commit.zh.md +17 -0
- package/dist/skills/authored/decision-write/SKILL.md +131 -0
- package/dist/skills/authored/decision-write/SKILL.zh.md +131 -0
- package/dist/skills/authored/decision-write/references/land.md +48 -0
- package/dist/skills/authored/decision-write/references/land.zh.md +48 -0
- package/dist/skills/authored/setup-project-docs/SKILL.md +58 -0
- package/dist/skills/authored/setup-project-docs/SKILL.zh.md +58 -0
- package/dist/skills/authored/setup-project-docs/references/decision-conventions.md +11 -0
- package/dist/skills/authored/setup-project-docs/references/decision-conventions.zh.md +11 -0
- package/dist/skills/vendored/retro/SKILL.md +44 -0
- package/dist/skills/vendored/retro/agents/openai.yaml +5 -0
- package/dist/skills/vendored/writing-for-agents/SKILL-MECHANICS.md +22 -0
- package/dist/skills/vendored/writing-for-agents/SKILL.md +81 -0
- package/dist/skills/vendored/writing-for-agents/agents/openai.yaml +3 -0
- package/dist/subagent.d.mts +56 -193
- package/dist/subagent.mjs +443 -741
- package/locale/en.json +3 -2
- package/locale/zh.json +3 -2
- package/package.json +63 -66
- package/assets/agents/poteto-agent.md +0 -8
- package/assets/docs/harness/dsh.md +0 -60
- package/assets/docs/pstack-models.example.md +0 -54
- package/assets/skills/arena/SKILL.md +0 -50
- package/assets/skills/figure-it-out/SKILL.md +0 -54
- package/assets/skills/how/SKILL.md +0 -38
- package/assets/skills/interrogate/SKILL.md +0 -71
- package/assets/skills/interrogate/references/code-quality-review.md +0 -47
- package/assets/skills/interrogate/references/lead-judgment.md +0 -39
- package/assets/skills/interrogate/references/reviewer-prompt.md +0 -62
- package/assets/skills/interrogate/references/rubric.md +0 -77
- package/assets/skills/no-comments/SKILL.md +0 -26
- package/assets/skills/poteto-mode/playbooks/authoring-a-skill.md +0 -12
- package/assets/skills/poteto-mode/playbooks/autonomous-run.md +0 -15
- package/assets/skills/poteto-mode/playbooks/autopilot-full.md +0 -25
- package/assets/skills/poteto-mode/playbooks/autopilot-stack.md +0 -12
- package/assets/skills/poteto-mode/playbooks/bug-fix.md +0 -15
- package/assets/skills/poteto-mode/playbooks/feature.md +0 -21
- package/assets/skills/poteto-mode/playbooks/orchestrate.md +0 -112
- package/assets/skills/poteto-mode/playbooks/perf-issue.md +0 -25
- package/assets/skills/poteto-mode/playbooks/refactoring.md +0 -16
- package/assets/skills/poteto-mode/playbooks/runtime-forensics.md +0 -11
- package/assets/skills/poteto-mode/playbooks/session-pickup.md +0 -11
- package/assets/skills/poteto-mode/playbooks/visual-parity.md +0 -11
- package/assets/skills/poteto-mode/playbooks/worktree-cleanup.md +0 -20
- package/assets/skills/poteto-mode/scripts/orch/orch.mjs +0 -4282
- package/assets/skills/poteto-mode/scripts/orch/orch.test.mjs +0 -2042
- package/assets/skills/poteto-mode/scripts/watch-pr/cli.test.mjs +0 -5101
- package/assets/skills/poteto-mode/scripts/watch-pr/github.test.mjs +0 -1177
- package/assets/skills/poteto-mode/scripts/watch-pr/policy.test.mjs +0 -1441
- package/assets/skills/poteto-mode/scripts/watch-pr/watch-pr.mjs +0 -4601
- package/assets/skills/recall/SKILL.md +0 -37
- package/assets/skills/reflect/SKILL.md +0 -69
- package/assets/skills/setup-pstack/SKILL.md +0 -67
- package/assets/skills/swarm/SKILL.md +0 -43
- package/dist/frontmatter-BQX3ekwP.mjs +0 -229
- package/dist/frontmatter-BQX3ekwP.mjs.map +0 -1
- package/dist/history.d.mts +0 -429
- package/dist/history.mjs +0 -1129
- package/dist/history.mjs.map +0 -1
- package/dist/host-contract-o47JH_r8.d.mts +0 -527
- package/dist/index.mjs.map +0 -1
- package/dist/paths-D_JlVmBk.mjs +0 -42
- package/dist/paths-D_JlVmBk.mjs.map +0 -1
- package/dist/script.mjs.map +0 -1
- package/dist/subagent.mjs.map +0 -1
- /package/{static/icon.png → assets/logo.png} +0 -0
- /package/{assets → dist/pstack}/agents/comment-sicko.md +0 -0
- /package/{assets → dist/pstack}/docs/guide/03-understand.md +0 -0
- /package/{assets → dist/pstack}/docs/guide/08-principles.md +0 -0
- /package/{assets → dist/pstack}/docs/guide/images/design.jpg +0 -0
- /package/{assets → dist/pstack}/docs/guide/images/overnight.jpg +0 -0
- /package/{assets → dist/pstack}/docs/guide/images/recipes.jpg +0 -0
- /package/{assets → dist/pstack}/docs/guide/images/router.jpg +0 -0
- /package/{assets → dist/pstack}/docs/guide/images/understanding.jpg +0 -0
- /package/{assets → dist/pstack}/docs/guide/images/verification.jpg +0 -0
- /package/{assets → dist/pstack}/skills/architect/references/design-red-flags.md +0 -0
- /package/{assets → dist/pstack}/skills/architect/references/rationale-template.md +0 -0
- /package/{assets → dist/pstack}/skills/architect/references/runner-prompt.md +0 -0
- /package/{assets → dist/pstack}/skills/bro/SKILL.md +0 -0
- /package/{assets → dist/pstack}/skills/create-verification-skill/references/feature-map-example/README.md +0 -0
- /package/{assets → dist/pstack}/skills/create-verification-skill/references/feature-map-example/create-note.md +0 -0
- /package/{assets → dist/pstack}/skills/create-verification-skill/references/feature-map-example/search.md +0 -0
- /package/{assets → dist/pstack}/skills/how/references/explainer-prompt.md +0 -0
- /package/{assets → dist/pstack}/skills/how/references/explorer-prompt.md +0 -0
- /package/{assets → dist/pstack}/skills/poteto-mode/references/bugbot-triage.md +0 -0
- /package/{assets → dist/pstack}/skills/principle-build-the-lever/SKILL.md +0 -0
- /package/{assets → dist/pstack}/skills/principle-foundational-thinking/SKILL.md +0 -0
- /package/{assets → dist/pstack}/skills/principle-guard-the-context-window/SKILL.md +0 -0
- /package/{assets → dist/pstack}/skills/show-me-your-work/references/decision-log-template.tsv +0 -0
- /package/{assets → dist/pstack}/skills/typescript-best-practices/references/patterns.md +0 -0
- /package/{assets → dist/pstack}/skills/unslop/SKILL.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/epistemics.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/investigator-prompt.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/source-playbook.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/sources/code-archaeology.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/sources/databricks.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/sources/datadog.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/sources/incident-postmortem.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/sources/linear.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/sources/notion.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/sources/sentry.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/sources/slack.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/synthesizer-prompt.md +0 -0
package/dist/models.mjs
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
// src/models.ts
|
|
2
|
+
/** Cordis row name, used by Loader diagnostics. */
|
|
3
|
+
const name = "pstack-models";
|
|
4
|
+
/** The hard dependencies: the adapter registry and the tool registry. */
|
|
5
|
+
const inject = ["llm", "tools"];
|
|
6
|
+
/** Model-facing tool name. */
|
|
7
|
+
const TOOL_NAME = "pstack_models";
|
|
8
|
+
const MAX_PROVIDERS = 64;
|
|
9
|
+
const MAX_MODELS_PER_PROVIDER = 200;
|
|
10
|
+
function entryFromInfo(provider, info) {
|
|
11
|
+
const efforts = info.reasoning?.efforts.map((effort) => effort.id) ?? [];
|
|
12
|
+
return {
|
|
13
|
+
route: `${provider}/${info.id}`,
|
|
14
|
+
id: info.id,
|
|
15
|
+
name: info.name,
|
|
16
|
+
...info.description === void 0 ? {} : { description: info.description },
|
|
17
|
+
...info.context?.contextWindow === void 0 ? {} : { contextWindow: info.context.contextWindow },
|
|
18
|
+
...info.defaultMaxTokens === void 0 ? {} : { maxTokens: info.defaultMaxTokens },
|
|
19
|
+
efforts,
|
|
20
|
+
...info.reasoning?.defaultEffort === void 0 ? {} : { defaultEffort: info.reasoning.defaultEffort }
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/** Collect the catalogue from the live adapters. */
|
|
24
|
+
async function collectCatalogue(llm, providerFilter, signal) {
|
|
25
|
+
const all = llm.listProviders();
|
|
26
|
+
const selected = providerFilter === void 0 ? all : all.filter((provider) => provider.id === providerFilter || provider.name === providerFilter);
|
|
27
|
+
const providers = [];
|
|
28
|
+
let truncated = false;
|
|
29
|
+
for (const provider of selected.slice(0, MAX_PROVIDERS)) {
|
|
30
|
+
let models;
|
|
31
|
+
try {
|
|
32
|
+
models = await llm.listModels(provider.id);
|
|
33
|
+
} catch (error) {
|
|
34
|
+
providers.push({
|
|
35
|
+
provider: provider.id,
|
|
36
|
+
name: provider.name,
|
|
37
|
+
models: [],
|
|
38
|
+
error: describeError(error)
|
|
39
|
+
});
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
if (models.length > MAX_MODELS_PER_PROVIDER) truncated = true;
|
|
43
|
+
const entries = [];
|
|
44
|
+
for (const model of models.slice(0, MAX_MODELS_PER_PROVIDER)) {
|
|
45
|
+
signal.throwIfAborted();
|
|
46
|
+
try {
|
|
47
|
+
entries.push(entryFromInfo(provider.id, await llm.resolveModelInfo(provider.id, model.id, signal)));
|
|
48
|
+
} catch (error) {
|
|
49
|
+
entries.push({
|
|
50
|
+
route: `${provider.id}/${model.id}`,
|
|
51
|
+
id: model.id,
|
|
52
|
+
name: model.name,
|
|
53
|
+
...model.description === void 0 ? {} : { description: model.description },
|
|
54
|
+
efforts: [],
|
|
55
|
+
error: describeError(error)
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
providers.push({
|
|
60
|
+
provider: provider.id,
|
|
61
|
+
name: provider.name,
|
|
62
|
+
models: entries
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
if (selected.length > MAX_PROVIDERS) truncated = true;
|
|
66
|
+
return {
|
|
67
|
+
providers,
|
|
68
|
+
truncated,
|
|
69
|
+
...providerFilter === void 0 ? {} : { providerFilter }
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function renderCatalogue(result) {
|
|
73
|
+
if (result.providers.length === 0) return result.providerFilter === void 0 ? "No provider is registered with the live adapter registry." : `No provider matches "${result.providerFilter}". Registered providers are listed when \`provider\` is omitted.`;
|
|
74
|
+
const lines = [];
|
|
75
|
+
for (const provider of result.providers) {
|
|
76
|
+
lines.push(`${provider.provider} (${provider.name})`);
|
|
77
|
+
if (provider.error !== void 0) {
|
|
78
|
+
lines.push(` model discovery failed: ${provider.error}`);
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
if (provider.models.length === 0) {
|
|
82
|
+
lines.push(" no models advertised");
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
for (const model of provider.models) {
|
|
86
|
+
const efforts = model.efforts.length === 0 ? "no reasoning efforts" : `efforts: ${model.efforts.join(", ")}`;
|
|
87
|
+
const defaultEffort = model.defaultEffort === void 0 ? "" : `; default: ${model.defaultEffort}`;
|
|
88
|
+
const failure = model.error === void 0 ? "" : `; error: ${model.error}`;
|
|
89
|
+
lines.push(` ${model.route} — ${efforts}${defaultEffort}${failure}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (result.truncated) lines.push("", `Truncated at ${MAX_PROVIDERS} providers and ${MAX_MODELS_PER_PROVIDER} models each.`);
|
|
93
|
+
return lines.join("\n");
|
|
94
|
+
}
|
|
95
|
+
const OUTPUT_SCHEMA = {
|
|
96
|
+
type: "object",
|
|
97
|
+
additionalProperties: false,
|
|
98
|
+
properties: {
|
|
99
|
+
providers: {
|
|
100
|
+
type: "array",
|
|
101
|
+
items: {
|
|
102
|
+
type: "object",
|
|
103
|
+
additionalProperties: false,
|
|
104
|
+
properties: {
|
|
105
|
+
provider: { type: "string" },
|
|
106
|
+
name: { type: "string" },
|
|
107
|
+
error: { type: "string" },
|
|
108
|
+
models: {
|
|
109
|
+
type: "array",
|
|
110
|
+
items: {
|
|
111
|
+
type: "object",
|
|
112
|
+
additionalProperties: false,
|
|
113
|
+
properties: {
|
|
114
|
+
route: { type: "string" },
|
|
115
|
+
id: { type: "string" },
|
|
116
|
+
name: { type: "string" },
|
|
117
|
+
description: { type: "string" },
|
|
118
|
+
contextWindow: { type: "integer" },
|
|
119
|
+
maxTokens: { type: "integer" },
|
|
120
|
+
efforts: {
|
|
121
|
+
type: "array",
|
|
122
|
+
items: { type: "string" }
|
|
123
|
+
},
|
|
124
|
+
defaultEffort: { type: "string" },
|
|
125
|
+
error: { type: "string" }
|
|
126
|
+
},
|
|
127
|
+
required: [
|
|
128
|
+
"route",
|
|
129
|
+
"id",
|
|
130
|
+
"name",
|
|
131
|
+
"efforts"
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
required: [
|
|
137
|
+
"provider",
|
|
138
|
+
"name",
|
|
139
|
+
"models"
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
truncated: { type: "boolean" },
|
|
144
|
+
providerFilter: { type: "string" }
|
|
145
|
+
},
|
|
146
|
+
required: ["providers", "truncated"]
|
|
147
|
+
};
|
|
148
|
+
const TOOL_DESCRIPTION = [
|
|
149
|
+
"List the exact model routes this deployment serves, with each route's advertised reasoning-effort tokens.",
|
|
150
|
+
"",
|
|
151
|
+
"Read-only. Use it before writing `$DSH_HOME/pstack-models.mdc`: it reports what the live adapters actually serve, so a role line names a route that exists instead of a slug guessed from an upstream name.",
|
|
152
|
+
"",
|
|
153
|
+
"`provider` limits discovery to one registered provider id or display name; omit it to list every provider.",
|
|
154
|
+
"",
|
|
155
|
+
"A route is written `<provider>/<model>`, and a role line may add `[effort]` using a token from that route's `efforts`. A provider whose discovery fails is reported beside the others rather than dropping the whole catalog."
|
|
156
|
+
].join("\n");
|
|
157
|
+
function createPstackModelsTool(llm) {
|
|
158
|
+
return {
|
|
159
|
+
name: TOOL_NAME,
|
|
160
|
+
description: TOOL_DESCRIPTION,
|
|
161
|
+
parameters: {
|
|
162
|
+
type: "object",
|
|
163
|
+
additionalProperties: false,
|
|
164
|
+
properties: { provider: {
|
|
165
|
+
type: "string",
|
|
166
|
+
description: "A registered provider id or display name to limit discovery to. Omit it to list every provider."
|
|
167
|
+
} }
|
|
168
|
+
},
|
|
169
|
+
output: {
|
|
170
|
+
schema: OUTPUT_SCHEMA,
|
|
171
|
+
render: (_args, value) => [{
|
|
172
|
+
type: "text",
|
|
173
|
+
text: renderCatalogue(value)
|
|
174
|
+
}]
|
|
175
|
+
},
|
|
176
|
+
isConcurrencySafe: () => true,
|
|
177
|
+
async execute(rawArgs, exec) {
|
|
178
|
+
return await collectCatalogue(llm, readProviderArgument(rawArgs), exec.signal);
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
function readProviderArgument(raw) {
|
|
183
|
+
if (raw === null || raw === void 0) return void 0;
|
|
184
|
+
if (typeof raw !== "object" || Array.isArray(raw)) throw new Error("pstack_models arguments must be an object");
|
|
185
|
+
const provider = raw["provider"];
|
|
186
|
+
if (provider === void 0) return void 0;
|
|
187
|
+
if (typeof provider !== "string" || provider.trim() === "") throw new Error("`provider` must be a non-empty string when present");
|
|
188
|
+
return provider.trim();
|
|
189
|
+
}
|
|
190
|
+
/** Register `pstack_models`. */
|
|
191
|
+
function apply(ctx) {
|
|
192
|
+
ctx.tools.register(createPstackModelsTool(ctx.llm));
|
|
193
|
+
}
|
|
194
|
+
function describeError(error) {
|
|
195
|
+
if (error instanceof Error) {
|
|
196
|
+
const code = error.code;
|
|
197
|
+
return typeof code === "string" ? `${error.message} (${code})` : error.message;
|
|
198
|
+
}
|
|
199
|
+
return String(error);
|
|
200
|
+
}
|
|
201
|
+
export { TOOL_NAME, apply, collectCatalogue, createPstackModelsTool, inject, name, renderCatalogue };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { basename, dirname, join, resolve } from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
// src/internal/paths.ts
|
|
4
|
+
/**
|
|
5
|
+
* Package-internal resource locations.
|
|
6
|
+
*
|
|
7
|
+
* Every shipped resource is read from `dist/` and nowhere else. The bundler writes the
|
|
8
|
+
* public entries at `dist/*.mjs` and shared helper chunks under `dist/internal/`, the
|
|
9
|
+
* pstack build writes `dist/pstack/`, and the packaging step writes `dist/skills/`.
|
|
10
|
+
*
|
|
11
|
+
* `PACKAGE_ROOT` therefore sits either one level above this module (an entry bundle in
|
|
12
|
+
* `dist/`) or two (a helper chunk in `dist/internal/`). Both layouts are known, so the
|
|
13
|
+
* directory name decides instead of probing for `dist` first and falling back.
|
|
14
|
+
*/
|
|
15
|
+
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
16
|
+
/** Absolute path of the package root. */
|
|
17
|
+
const PACKAGE_ROOT = basename(HERE) === "internal" ? resolve(HERE, "..", "..") : resolve(HERE, "..");
|
|
18
|
+
/** Absolute path of the one shipped output tree. */
|
|
19
|
+
const DIST_ROOT = join(PACKAGE_ROOT, "dist");
|
|
20
|
+
/** Absolute path of the generated pstack tree. */
|
|
21
|
+
const PORT_ROOT = join(DIST_ROOT, "pstack");
|
|
22
|
+
/** Absolute path of the ported pstack skill directories. */
|
|
23
|
+
const SKILLS_ROOT = join(PORT_ROOT, "skills");
|
|
24
|
+
/** Absolute path of the vendored skill directories (`skills/vendored` at pack time). */
|
|
25
|
+
const VENDORED_SKILLS_ROOT = join(DIST_ROOT, "skills", "vendored");
|
|
26
|
+
/** Absolute path of the skills authored in this repository. */
|
|
27
|
+
const AUTHORED_SKILLS_ROOT = join(DIST_ROOT, "skills", "authored");
|
|
28
|
+
join(PORT_ROOT, "agents");
|
|
29
|
+
/** Absolute path of the `poteto-mode` instructions injected into a poteto-agent brief. */
|
|
30
|
+
const POTETO_MODE_SKILL_PATH = join(SKILLS_ROOT, "poteto-mode", "SKILL.md");
|
|
31
|
+
/** Absolute path of the shipped harness mapping document. */
|
|
32
|
+
const HARNESS_DOC_PATH = join(PORT_ROOT, "docs", "harness", "dsh.md");
|
|
33
|
+
/** Every skill root, in load order. Recursive discovery handles each root's nesting. */
|
|
34
|
+
const SKILL_ROOTS = [
|
|
35
|
+
{
|
|
36
|
+
path: SKILLS_ROOT,
|
|
37
|
+
label: "pstack"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
path: VENDORED_SKILLS_ROOT,
|
|
41
|
+
label: "vendored"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
path: AUTHORED_SKILLS_ROOT,
|
|
45
|
+
label: "authored"
|
|
46
|
+
}
|
|
47
|
+
];
|
|
48
|
+
export { POTETO_MODE_SKILL_PATH as a, VENDORED_SKILLS_ROOT as c, PORT_ROOT as i, HARNESS_DOC_PATH as n, SKILLS_ROOT as o, PACKAGE_ROOT as r, SKILL_ROOTS as s, AUTHORED_SKILLS_ROOT as t };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lauren Tan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
# pstack
|
|
2
|
+
|
|
3
|
+
i'm [poteto](https://x.com/poteto). i'm not a president or ceo, but i've worked with millions of lines of code at Meta, Netflix, and Cursor. i'm also on the react core team where i help build and maintain react compiler.
|
|
4
|
+
|
|
5
|
+
there's a growing sense that ai writes too much slop code. i agree. i don't want to ship like a team of twenty slop artists. throughput without quality is not a goal i aspire to. if you want to go fast, go deep first.
|
|
6
|
+
|
|
7
|
+
**pstack is my answer.** these are the same skills i use every day to ship high quality code at Cursor. this turns cursor into a real engineering team. the goal is not to maximize loc, in fact it's the opposite. pstack helps you write less, but higher quality code.
|
|
8
|
+
|
|
9
|
+
**pstack gives you fearless parallelism.** when you can go deep on one agent and trust it to write good, verifiable code, you can truly parallelize with confidence. start multiple agents up with `poteto-mode` and trust that they'll apply rigorous engineering principles to their work.
|
|
10
|
+
|
|
11
|
+
**cursor gives you the best of all worlds.** every frontier model has its strengths and weaknesses. use any model with pstack. in fact, many of my skills use multi-model workflows to take advantage of each model's unique strengths.
|
|
12
|
+
|
|
13
|
+
fork it. improve it. make it yours. PRs are welcome!
|
|
14
|
+
|
|
15
|
+
## install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
/add-plugin pstack
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
in claude code:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
/plugin marketplace add cursor/plugins
|
|
25
|
+
/plugin install pstack@cursor-plugins
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
claude code leaves auto-update off for third-party marketplaces, so pstack stays on the version you installed. to turn it on, run `/plugin`, open the **marketplaces** tab, select `cursor-plugins`, and choose **enable auto-update**. to update once by hand, run `claude plugin update pstack@cursor-plugins`.
|
|
29
|
+
|
|
30
|
+
claude code prefixes plugin commands and agents, so `/poteto-mode` is `/pstack:poteto-mode`. the [claude code adapter](https://github.com/cursor/plugins/blob/main/pstack/docs/harness/claude-code.md) maps every other cursor name. in claude code, `/pstack:setup-pstack` writes your model choices to `~/.claude/rules/pstack-models.md`, and a step that needs a cursor-only feature, such as bugbot or automations, is skipped with a one-line note.
|
|
31
|
+
|
|
32
|
+
claude code installs a generated copy of pstack, including this readme and the guide, from [`harness/pstack/`](https://github.com/cursor/plugins/tree/main/harness/pstack) at the repository root. after you change pstack, run `node scripts/generate-pstack-harness-trees.mjs` from the repository root and commit the result. ci fails while the generated copy is out of date.
|
|
33
|
+
|
|
34
|
+
## get started
|
|
35
|
+
|
|
36
|
+
two steps:
|
|
37
|
+
|
|
38
|
+
1. run [`/setup-pstack`](./skills/setup-pstack/SKILL.md), pick a reasoning budget, and choose which models you want.
|
|
39
|
+
2. use [`/poteto-mode`](./skills/poteto-mode/SKILL.md) whenever you're doing anything that requires rigor.
|
|
40
|
+
|
|
41
|
+
new here? the [pstack guide](./docs/guide/README.md) walks you through a first real task, from setup and prompting through verification and overnight runs. stuck, or unsure which skill fits? ask [`/poteto-help`](./skills/poteto-help/SKILL.md).
|
|
42
|
+
|
|
43
|
+
that's it. the other skills are situational, and the mode skill uses them for you as needed. out of the box the mode splits work by model strength: code delegates (feature, refactoring, bug fix, perf, hillclimb) go to grok, while the hardest changes, prose, and judgment go to opus 5.5. the default panel is opus 5.5 / grok. [`/setup-pstack`](./skills/setup-pstack/SKILL.md) changes any of it.
|
|
44
|
+
|
|
45
|
+
## usage
|
|
46
|
+
|
|
47
|
+
use [`/poteto-mode`](./skills/poteto-mode/SKILL.md) at the start of a task. it reads your request, picks from a set of playbooks, and runs the other skills as the steps need them.
|
|
48
|
+
|
|
49
|
+
pick `/poteto-mode` from the `/` menu before you type your task, so cursor attaches the skill to the message.
|
|
50
|
+
|
|
51
|
+
### just use [`/poteto-mode`](./skills/poteto-mode/SKILL.md)
|
|
52
|
+
|
|
53
|
+
this skill is the main shortcut. i use it whenever i need the agent to do rigorous engineering work. it comes with twenty-three playbooks:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
/poteto-mode this pr has a subtle bug where the scroll drifts every 750ms even when idle. repro
|
|
57
|
+
first, then fix and verify.
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
/poteto-mode i'm going to bed. land the stack even if ci flakes. i want everything merged by
|
|
62
|
+
morning.
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
<details>
|
|
66
|
+
<summary>the twenty-three playbooks</summary>
|
|
67
|
+
|
|
68
|
+
| playbook | for |
|
|
69
|
+
|---|---|
|
|
70
|
+
| [investigation](./skills/poteto-mode/playbooks/investigation.md) | a read-only question. how does x work, why was y built this way, are we sure. |
|
|
71
|
+
| [bug fix](./skills/poteto-mode/playbooks/bug-fix.md) | reproduce a defect, root-cause it, and fix with runtime evidence. |
|
|
72
|
+
| [perf](./skills/poteto-mode/playbooks/perf-issue.md) | trace a measured slowness and improve it against a baseline. |
|
|
73
|
+
| [hillclimb](./skills/poteto-mode/playbooks/hillclimb.md) | sustained, scientific improvement of one metric against a target, looping hypotheses with before/after measurement and one commit per accepted win. |
|
|
74
|
+
| [runtime forensics](./skills/poteto-mode/playbooks/runtime-forensics.md) | diagnose a live symptom (leak, idle-cpu spin, glitch) from instrumentation. |
|
|
75
|
+
| [trace forensics](./skills/poteto-mode/playbooks/trace-forensics.md) | diagnose a captured profiling artifact (cpuprofile, trace, spindump, heap snapshot). |
|
|
76
|
+
| [feature](./skills/poteto-mode/playbooks/feature.md) | new or changed behavior, built from a named data shape. |
|
|
77
|
+
| [refactoring](./skills/poteto-mode/playbooks/refactoring.md) | a behavior-preserving change to structure or shape. |
|
|
78
|
+
| [prototype](./skills/poteto-mode/playbooks/prototype.md) | a throwaway sketch to make a design or behavioral decision cheaply, or to settle an empirical fork by observing it. |
|
|
79
|
+
| [visual parity](./skills/poteto-mode/playbooks/visual-parity.md) | pixel-exact ui equivalence between two implementations. |
|
|
80
|
+
| [authoring a skill](./skills/poteto-mode/playbooks/authoring-a-skill.md) | writing or editing a SKILL.md. |
|
|
81
|
+
| [eval](./skills/poteto-mode/playbooks/eval.md) | test how a skill or prompt change affects agent behavior, blinded. |
|
|
82
|
+
| [babysit](./skills/poteto-mode/playbooks/babysit.md) | drive a pr or a stack to merge-ready: conflicts, review threads, ci. |
|
|
83
|
+
| [shipping](./skills/poteto-mode/playbooks/shipping.md) | independently verify a green stack, then land the contiguous verified run bottom-up through github by default or origin when available. |
|
|
84
|
+
| [autonomous run](./skills/poteto-mode/playbooks/autonomous-run.md) | drive a long task to completion without stopping. |
|
|
85
|
+
| [orchestrate](./skills/poteto-mode/playbooks/orchestrate.md) | a standing project handed to one coordinator chat: multi-day, many stacked prs, fleets of subagents. |
|
|
86
|
+
| [autopilot-full](./skills/poteto-mode/playbooks/autopilot-full.md) | run independent prs to merged with one owner per pr. a swarm verifies each code-ready head, and every later change to the patch gets a fresh check. |
|
|
87
|
+
| [autopilot-stack](./skills/poteto-mode/playbooks/autopilot-stack.md) | autopilot-full without the merge. build and verify prs for the operator to review and land, stacking a pr only on a pr it builds on. |
|
|
88
|
+
| [session pickup](./skills/poteto-mode/playbooks/session-pickup.md) | resume or take over a prior agent's in-flight work. |
|
|
89
|
+
| [pause safely](./skills/poteto-mode/playbooks/pause-safely.md) | suspend in-flight work cleanly so it can be resumed later. |
|
|
90
|
+
| [multi-phase plan](./skills/poteto-mode/playbooks/multi-phase-plan.md) | work that spans phases or stacked PRs. |
|
|
91
|
+
| [worktree cleanup](./skills/poteto-mode/playbooks/worktree-cleanup.md) | reclaim disk by pruning merged or abandoned worktrees and stale ios simulators, safety-gated. |
|
|
92
|
+
| [opening a pr](./skills/poteto-mode/playbooks/opening-a-pr.md) | open a ready pr from small ordered commits with a conventional commits title and a briefing-style body. invoked at the end of every other playbook. |
|
|
93
|
+
|
|
94
|
+
</details>
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
when invoked it:
|
|
99
|
+
|
|
100
|
+
1. matches your task to a [playbook](./skills/poteto-mode/playbooks/) and opens a todo list whose first items are its steps, copied in verbatim.
|
|
101
|
+
2. routes to the other skills as the steps fire.
|
|
102
|
+
3. writes unslopped replies framed for the consumer and the maintainer.
|
|
103
|
+
|
|
104
|
+
the full rules and playbooks live in [`skills/poteto-mode/SKILL.md`](./skills/poteto-mode/SKILL.md).
|
|
105
|
+
|
|
106
|
+
to keep [`/poteto-mode`](./skills/poteto-mode/SKILL.md) on across turns, pick it from the `/` menu and press option+enter (mac) or alt+enter (windows) instead of enter. that makes it a [custom mode](https://cursor.com/docs/skills#using-a-skill-as-a-custom-mode), which cursor offers in the agents window and the cli. it stays in context every turn until you exit the mode. plain enter attaches it to one message only.
|
|
107
|
+
|
|
108
|
+
[`/poteto-mode`](./skills/poteto-mode/SKILL.md) works extremely well with cursor's `/loop` command. you can make cursor work for many hours without sacrificing rigor.
|
|
109
|
+
|
|
110
|
+
## skills
|
|
111
|
+
|
|
112
|
+
[`/poteto-mode`](./skills/poteto-mode/SKILL.md) runs most of these for you when a step needs them (`how`, `why`, `architect`, `arena`, `swarm`, `interrogate`, `unslop`, `no-comments`, `technical-writing`, `tdd`, and the principles). the table below is for when you want one directly:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
/how do we cancel runs? do we have an n+1 when we look up every run to cancel?
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
/interrogate review this pr.
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
<details>
|
|
123
|
+
<summary>all skills</summary>
|
|
124
|
+
|
|
125
|
+
| skill | use it when |
|
|
126
|
+
|---|---|
|
|
127
|
+
| [`/poteto-mode`](./skills/poteto-mode/SKILL.md) | default entry point for any non-trivial task. |
|
|
128
|
+
| [`/poteto-help`](./skills/poteto-help/SKILL.md) | you're new to pstack, or unsure which skill, playbook, or principle fits. finds out what you're trying to do, answers that part, and hands you a prompt to type. runs only when you type `/poteto-help`. |
|
|
129
|
+
| [`/in-your-own-words`](./skills/in-your-own-words/SKILL.md) | you want the agent to play back your goal and the problem before it starts. runs only when you type `/in-your-own-words`. |
|
|
130
|
+
| [`/sharpen`](./skills/sharpen/SKILL.md) | you want a prompt made deeper, not bigger, before you send it: what a top professional would do that you didn't ask for, the raw material they'd start from, their methods and tools, and an outside check that the result is right. hands back the rewritten prompt and leaves your choices open. doesn't do the task. runs only when you type `/sharpen`. |
|
|
131
|
+
| [`/how`](./skills/how/SKILL.md) | you want a walkthrough of how a subsystem works. |
|
|
132
|
+
| [`/why`](./skills/why/SKILL.md) | you want to know why something was built this way. discovers available MCPs at run time and queries each evidence category in parallel (source control, issue tracker, long-form docs, real-time chat, infra observability, error tracking, analytics warehouse). |
|
|
133
|
+
| [`/recall`](./skills/recall/SKILL.md) | you're starting or resuming work and want your recent context on a topic rebuilt from your own chat history and the shared record, handed back as a tight current-state brief. |
|
|
134
|
+
| [`/ketchup`](./skills/ketchup/SKILL.md) | you want what changed in this chat since your last message, in plain words and small visuals, with every item waiting on you listed and decidable from the reply alone, even when that makes the reply long. |
|
|
135
|
+
| [`/ketchup-video`](./skills/ketchup-video/SKILL.md) | you want the `/ketchup` catch-up as a short subtitled video of slides, with the calls waiting on you as text under it. |
|
|
136
|
+
| [`/blast-radius`](./skills/blast-radius/SKILL.md) | you have a small-looking change and want to know what else it could break, with the one fact it's safe because of proven by running code, not asserted. |
|
|
137
|
+
| [`/architect`](./skills/architect/SKILL.md) | you're about to write code that crosses a function boundary and want the caller's usage, types, and module shape settled first. |
|
|
138
|
+
| [`/arena`](./skills/arena/SKILL.md) | you want N parallel attempts at the same thing, then to grab the best parts of each. |
|
|
139
|
+
| [`/swarm`](./skills/swarm/SKILL.md) | you want N parallel workers across different slices or races, then one aggregated report. |
|
|
140
|
+
| [`/interrogate`](./skills/interrogate/SKILL.md) | you have a diff and want different models to try to break it, keeping only findings a run proves. |
|
|
141
|
+
| [`/automate-me`](./skills/automate-me/SKILL.md) | you want your own `-mode` skill, drafted from how you've actually worked. |
|
|
142
|
+
| [`/make-bot-ui`](./skills/make-bot-ui/SKILL.md) | you want a page or dashboard whose buttons wake a Grok Bot over a webhook, including the sender-key handoff and Tailscale. |
|
|
143
|
+
| [`/setup-pstack`](./skills/setup-pstack/SKILL.md) | you want to pick which models pstack uses per role. detects your models and writes a config rule. |
|
|
144
|
+
| [`/reflect`](./skills/reflect/SKILL.md) | a long task landed and you want the recipe captured as a skill edit. |
|
|
145
|
+
| [`/correct`](./skills/correct/SKILL.md) | you keep correcting agents for the same mistakes. mines history for mistake classes, fixes each at the highest level that works (architecture, then types, lint, and ci, then tests, with docs last), and keeps a table pairing each rule with what enforces it. |
|
|
146
|
+
| [`/teach`](./skills/teach/SKILL.md) | you want to actually understand a change or subsystem, not just have it summarized. runs how + why and weaves one plain explanation, built up diagram by diagram. |
|
|
147
|
+
| [`/tdd`](./skills/tdd/SKILL.md) | you're fixing a bug and there's a cheap local test path. write the failing test first, then the fix. |
|
|
148
|
+
| [`/benchmark-checklist`](./skills/benchmark-checklist/SKILL.md) | you ran a benchmark or measured a speedup or regression. vets the number (limiter, tuning, errors, repeat runs, end-to-end relevance) before you report or act on it. |
|
|
149
|
+
| [`/no-comments`](./skills/no-comments/SKILL.md) | strip comments before review; spawns Comment Sicko, fixes accepted findings, offers encodings for claimed constraints. |
|
|
150
|
+
| [`/typescript-best-practices`](./skills/typescript-best-practices/SKILL.md) | you're reading or editing typescript. grounds the type-system-discipline principle in syntax. |
|
|
151
|
+
| [`/figure-it-out`](./skills/figure-it-out/SKILL.md) | no bundled playbook fits. designs a rigorous, auditable playbook for the task. |
|
|
152
|
+
| [`/show-me-your-work`](./skills/show-me-your-work/SKILL.md) | you want a reviewable decision trail. logs decisions to a tsv you can commit. |
|
|
153
|
+
| [`/create-verification-skill`](./skills/create-verification-skill/SKILL.md) | your project has no scripted way to prove app behavior. generates a project-local verify skill with a feature map, for any language or platform. |
|
|
154
|
+
| [`/maintain-verification-skill`](./skills/maintain-verification-skill/SKILL.md) | your verify skill's feature map has drifted from the app. source wave + one live pass, at most one PR of proven corrections. |
|
|
155
|
+
| [`/create-formal-verification-skill`](./skills/create-formal-verification-skill/SKILL.md) | tests can't reach the case that breaks a race, retry, state machine, parser, or unsafe code. verifies one property with the tool that fits and generates a project-local skill to recheck it on every change. |
|
|
156
|
+
| [`/maintain-formal-verification-skill`](./skills/maintain-formal-verification-skill/SKILL.md) | code your formal verification covers has changed since it was last checked. updates the model, harness, or properties to match the code, reruns, and says whether each failure is drift in the verification or a bug in the code. |
|
|
157
|
+
| [`/statechart`](./skills/statechart/SKILL.md) | someone who owns the behavior needs to see it, not read a spec. checks a tla+ model, draws what the user sees as a mermaid statechart, marks each state that breaks a rule, and gives the shortest path to each one. |
|
|
158
|
+
| [`/unslop`](./skills/unslop/SKILL.md) | you're cleaning up writing. removes AI tells. |
|
|
159
|
+
| [`/bro`](./skills/bro/SKILL.md) | you want the last message restated in plain human language, no jargon. |
|
|
160
|
+
| [`/technical-writing`](./skills/technical-writing/SKILL.md) | layered doc standard (Diátaxis + Google developer style + STE + Global English) for docs, RFCs, readmes, PR descriptions, commit messages. |
|
|
161
|
+
|
|
162
|
+
</details>
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
### examples
|
|
167
|
+
|
|
168
|
+
mostly i type [`/poteto-mode`](./skills/poteto-mode/SKILL.md) at the start of a task and let it route to a playbook. the other skills fire as the steps need them. a few i reach for directly.
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
<details>
|
|
172
|
+
<summary>all the examples</summary>
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
bug fix: /poteto-mode this pr has a subtle bug where the scroll drifts every 750ms even
|
|
176
|
+
when idle. repro first, then fix and verify.
|
|
177
|
+
perf: /poteto-mode a big list takes a second or two to load even though we virtualize.
|
|
178
|
+
run a cpu trace and tell me why.
|
|
179
|
+
feature: /poteto-mode build a small feature behind a feature flag. verify it really works.
|
|
180
|
+
prototype: /poteto-mode build two prototypes of the markdown renderer so we can compare.
|
|
181
|
+
spawn an agent for each.
|
|
182
|
+
multi-phase: /poteto-mode open source these skills as a plugin. nothing internal leaks, work
|
|
183
|
+
in a temp dir, show me the dependency graph first.
|
|
184
|
+
overnight run: /poteto-mode i'm going to bed. land the stack even if ci flakes. i want
|
|
185
|
+
everything merged by morning.
|
|
186
|
+
babysit: /poteto-mode check on pr 123. anything outstanding?
|
|
187
|
+
visual parity: /poteto-mode the row spacing is too tall when this flag is on. the second image
|
|
188
|
+
is correct. repro and fix until it matches.
|
|
189
|
+
figure it out: /poteto-mode i'm stepping away. migrate every caller from the synchronous store
|
|
190
|
+
to the new async one, keeping behavior identical. i want to trust it was done
|
|
191
|
+
right when i'm back.
|
|
192
|
+
how: /how do we cancel runs? do we have an n+1 when we look up every run to cancel?
|
|
193
|
+
why: /why is this feature flag not on yet?
|
|
194
|
+
architect: design this instrumentation to be high signal with no false positives. /architect
|
|
195
|
+
this first.
|
|
196
|
+
arena: /arena take my prompt to the arena verbatim. i want to compare their proposals
|
|
197
|
+
with yours.
|
|
198
|
+
swarm: /swarm check every package under packages/ against its check.sh. one worker per
|
|
199
|
+
package. one report.
|
|
200
|
+
interrogate: /interrogate review this pr.
|
|
201
|
+
tdd: /tdd implement
|
|
202
|
+
unslop: can we unslop and tighten the new changes?
|
|
203
|
+
reflect: /reflect that took too long. capture what we learned so the next run doesn't
|
|
204
|
+
repeat it.
|
|
205
|
+
correct: /correct
|
|
206
|
+
show-me-your-work: /show-me-your-work keep a decision trail i can review when i'm back.
|
|
207
|
+
automate-me: /automate-me
|
|
208
|
+
help: /poteto-help which skill should i use to review this branch?
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
</details>
|
|
212
|
+
|
|
213
|
+
## the `poteto-agent` and Comment Sicko subagents
|
|
214
|
+
|
|
215
|
+
[`/poteto-mode`](./skills/poteto-mode/SKILL.md) runs in the chat that receives it. that chat owns the playbook, the todo list, and every subagent spawn.
|
|
216
|
+
|
|
217
|
+
pstack also ships [`subagent_type: "poteto-agent"`](./agents/poteto-agent.md) as the wrapper for delegates spawned during a run. it reads `poteto-mode` in full, including its inline principles index, before doing any work. substituting `generalPurpose` skips that read and drifts. do not spawn `poteto-agent` to run the playbook itself.
|
|
218
|
+
|
|
219
|
+
[`/poteto-mode`](./skills/poteto-mode/SKILL.md) and [`subagent_type: "poteto-agent"`](./agents/poteto-agent.md) route through the same wrapper.
|
|
220
|
+
|
|
221
|
+
pstack also ships [Comment Sicko](./agents/comment-sicko.md), a read-only comment reviewer available as `subagent_type: "comment-sicko"`. usually invoke it through [`/no-comments`](./skills/no-comments/SKILL.md), not directly.
|
|
222
|
+
|
|
223
|
+
## principles
|
|
224
|
+
|
|
225
|
+
twenty-four short skills, one principle each. `poteto-mode` indexes them inline and reads that index at task start. the standalone files are there so other skills can reference a principle by name, and so the index can point at the full rule for each.
|
|
226
|
+
|
|
227
|
+
<details>
|
|
228
|
+
<summary>all twenty-four principles</summary>
|
|
229
|
+
|
|
230
|
+
| principle | group | rule |
|
|
231
|
+
|---|---|---|
|
|
232
|
+
| [laziness-protocol](./skills/principle-laziness-protocol/SKILL.md) | core | Bias toward deletion and the smallest change that solves the problem. |
|
|
233
|
+
| [foundational-thinking](./skills/principle-foundational-thinking/SKILL.md) | core | Apply before writing logic: choosing core types and data structures, sequencing scaffold-vs-feature work, asking what concurrent actors share. Get the data structures right so downstream code becomes obvious. |
|
|
234
|
+
| [redesign-from-first-principles](./skills/principle-redesign-from-first-principles/SKILL.md) | core | Redesign as if the requirement had been a foundational assumption from day one, instead of bolting it on. |
|
|
235
|
+
| [attack-the-premise](./skills/principle-attack-the-premise/SKILL.md) | core | Apply when two or more fixes that share one premise have failed the same gate. Write the premise down and test it directly before you write another fix that assumes it. |
|
|
236
|
+
| [subtract-before-you-add](./skills/principle-subtract-before-you-add/SKILL.md) | core | Remove dead weight, redundant validators, and stub references first, then build on the simpler base. |
|
|
237
|
+
| [minimize-reader-load](./skills/principle-minimize-reader-load/SKILL.md) | core | Count layers between question and answer, and hidden state in the reader's head; collapse one-caller wrappers and shrink mutable scope. |
|
|
238
|
+
| [outcome-oriented-execution](./skills/principle-outcome-oriented-execution/SKILL.md) | core | Apply during planned rewrites and migrations with explicit phase boundaries. Converge on the target architecture; don't preserve smooth intermediate states with throwaway compatibility code. |
|
|
239
|
+
| [experience-first](./skills/principle-experience-first/SKILL.md) | core | Choose user delight over implementation convenience; ship fewer polished features over more rough ones. |
|
|
240
|
+
| [exhaust-the-design-space](./skills/principle-exhaust-the-design-space/SKILL.md) | core | Build 2-3 competing prototypes and compare side by side before committing. |
|
|
241
|
+
| [build-the-lever](./skills/principle-build-the-lever/SKILL.md) | core | Apply to any non-trivial work, not just bulk work: edits, migrations, analyses, checks. Build the tool that does it or proves it (codemod, script, generator, or a skill your subagents follow) instead of working by hand. The tool is the artifact a reviewer can rerun. |
|
|
242
|
+
| [model-the-domain](./skills/principle-model-the-domain/SKILL.md) | architecture | Encode the domain in a structure instead of scattered conditionals. |
|
|
243
|
+
| [boundary-discipline](./skills/principle-boundary-discipline/SKILL.md) | architecture | Concentrate guards at system boundaries (CLI, config, network, external APIs); trust internal types and keep business logic in pure functions. |
|
|
244
|
+
| [type-system-discipline](./skills/principle-type-system-discipline/SKILL.md) | architecture | Make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, exhaust variants, derive from authoritative schemas. |
|
|
245
|
+
| [make-operations-idempotent](./skills/principle-make-operations-idempotent/SKILL.md) | architecture | Converge to the same end state regardless of partial prior runs. |
|
|
246
|
+
| [migrate-callers-then-delete-legacy-apis](./skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md) | architecture | Migrate callers and delete the old API in the same wave instead of preserving compatibility layers. |
|
|
247
|
+
| [separate-before-serializing-shared-state](./skills/principle-separate-before-serializing-shared-state/SKILL.md) | architecture | Eliminate the sharing first; serialize structurally only when one shared writer is a real invariant. |
|
|
248
|
+
| [prove-it-works](./skills/principle-prove-it-works/SKILL.md) | verification | Apply after completing a task, before declaring done. Verify against the real artifact (run the feature, read the actual value, inspect the diff), not a proxy, self-report, or 'it compiles.'. |
|
|
249
|
+
| [fix-root-causes](./skills/principle-fix-root-causes/SKILL.md) | verification | Trace each symptom back to the first place the system went wrong and fix it there. A guard is a fix only when the state it handles is legitimate. |
|
|
250
|
+
| [sequence-verifiable-units](./skills/principle-sequence-verifiable-units/SKILL.md) | verification | Apply to multi-step work (sweeps, migrations, runs of similar edits) and to how you stack commits and PRs. Break work into small units that each end in a verifiable state, check each before the next, and order delivery so the sequence proves itself to a reviewer. |
|
|
251
|
+
| [test-behavior-not-implementation](./skills/principle-test-behavior-not-implementation/SKILL.md) | verification | Apply when you write, change, or keep a test. Assert what the code's users can observe, so the test fails when that behavior breaks and keeps passing when only the internals change. |
|
|
252
|
+
| [explain-the-number](./skills/principle-explain-the-number/SKILL.md) | verification | Apply before you trust, report, or act on a number you measured: a speedup, a regression, a throughput, a latency, or an eval result. Find what limits it, and rule out that it measured something other than the work you think. |
|
|
253
|
+
| [guard-the-context-window](./skills/principle-guard-the-context-window/SKILL.md) | delegation | Route bulk to subagents; keep summaries in the main thread, not raw payloads. |
|
|
254
|
+
| [never-block-on-the-human](./skills/principle-never-block-on-the-human/SKILL.md) | delegation | Proceed, present the result, let the human course-correct after the fact; reserve confirmation for irreversible actions. |
|
|
255
|
+
| [encode-lessons-in-structure](./skills/principle-encode-lessons-in-structure/SKILL.md) | meta | Encode the rule as a lint, metadata flag, runtime check, or script instead of more text. |
|
|
256
|
+
|
|
257
|
+
</details>
|
|
258
|
+
|
|
259
|
+
## not shipped here
|
|
260
|
+
|
|
261
|
+
a few things `poteto-mode` references but doesn't bundle:
|
|
262
|
+
|
|
263
|
+
- `/deslop` and the `deslop` skill ship in the `cursor-team-kit` plugin.
|
|
264
|
+
- `control-cli` (for CLIs and TUIs) and `control-ui` (for browser, Electron, web) ship in `cursor-team-kit` too.
|
|
265
|
+
- `/create-skill` is a cursor built-in. cursor also ships a built-in `/autopilot` that watches a pr. inside `poteto-mode`, pr-status requests go to the [babysit playbook](./skills/poteto-mode/playbooks/babysit.md) instead.
|
|
266
|
+
|
|
267
|
+
install `cursor-team-kit` alongside pstack if you want the full set.
|
|
268
|
+
|
|
269
|
+
## why are there no planning skills?
|
|
270
|
+
|
|
271
|
+
cursor already has a great plan mode which works great with pstack. but personally, i don't believe in planning. the best spec is code. if you do want to make a plan, [`/poteto-mode`](./skills/poteto-mode/SKILL.md) covers it, but it's not a default.
|
|
272
|
+
|
|
273
|
+
## make it yours
|
|
274
|
+
|
|
275
|
+
`poteto-mode` is my style. you may not want exactly that.
|
|
276
|
+
|
|
277
|
+
type [`/automate-me`](./skills/automate-me/SKILL.md). it mines your recent transcripts, drafts a `<your-name>-mode` skill from how you've actually worked, and routes through pstack underneath. you keep pstack as the base and end up with your own routing skill alongside `poteto-mode`.
|
|
278
|
+
|
|
279
|
+
models are configurable too. type [`/setup-pstack`](./skills/setup-pstack/SKILL.md). it detects the models you have access to and writes a small always-applied rule mapping each role (code, judgment, the review panels) to a model. every skill reads it and falls back to sensible defaults when the rule is absent, so you override only what you want.
|
|
280
|
+
|
|
281
|
+
when a default changes, a rule written before the change still pins the old default. delete those role lines, or delete the file, then run `/setup-pstack` again. a rerun keeps any role whose model differs from the default.
|
|
282
|
+
|
|
283
|
+
## automations
|
|
284
|
+
|
|
285
|
+
pstack also ships a dormant [benny automation pack](https://github.com/cursor/plugins/tree/main/pstack/automations/benny). benny triages slack issue reports, then reproduces and fixes confirmed bugs with real ui evidence. its files are not registered as slash skills.
|
|
286
|
+
|
|
287
|
+
to set it up, point cursor at [`FOR_AGENTS.md`](https://github.com/cursor/plugins/blob/main/pstack/automations/benny/FOR_AGENTS.md). setup copies the pack into the target repository at `.cursor/automations/benny/`, enables pstack there for shared skills, and keeps user configuration outside the copied pack. benny runs on cursor automations, so it is cursor-only.
|
|
288
|
+
|
|
289
|
+
## license
|
|
290
|
+
|
|
291
|
+
MIT
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: poteto-agent
|
|
3
|
+
description: Delegate subagent for code-writing and helper tasks spawned during a `/poteto-mode` run. Use for delegates, not as the runner for `/poteto-mode` itself. Spawn a fresh `poteto-agent` for each new task, and resume one only in the strict cases that poteto-mode's Subagents section names. Reads the `poteto-mode` skill's `SKILL.md` in full before any work, including its inline Principles index. Substituting `generalPurpose` skips that read and drifts.
|
|
4
|
+
is_background: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Poteto subagent
|
|
8
|
+
|
|
9
|
+
You are operating as poteto-mode's full agent style. The chat that receives `/poteto-mode` owns the playbook, the todo list, and every Task spawn. You are one of its delegates. Read the `poteto-mode` skill's `SKILL.md` in full before doing any work, including its inline Principles index. Use the absolute path your parent gave you. With no path, before any other work, search `~/.cursor/plugins/` for a file whose path ends in `skills/poteto-mode/SKILL.md`. If more than one file matches, use the copy whose `.cursor-plugin/plugin.json` has the highest `version`. Your skill catalog hides this skill, so a missing catalog entry does not mean pstack is absent. If no such file exists, stop and tell your parent. Navigate to a leaf `principle-*` skill whenever you apply that principle.
|