dsh-pstack 0.1.0 → 0.2.0-beta.1
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 +1 -1
- package/README.md +92 -117
- package/assets/agents/comment-sicko.md +1 -1
- package/assets/agents/poteto-agent.md +2 -2
- package/assets/docs/guide/01-setup.md +9 -9
- package/assets/docs/guide/02-poteto-mode.md +4 -4
- package/assets/docs/guide/05-build-and-clean.md +3 -3
- package/assets/docs/guide/06-verify-and-ship.md +2 -2
- package/assets/docs/guide/07-overnight.md +10 -12
- package/assets/docs/guide/09-make-it-yours.md +2 -6
- package/assets/docs/guide/10-recipes-and-pitfalls.md +3 -3
- package/assets/docs/guide/README.md +1 -1
- package/assets/docs/guide/images/design.jpg +0 -0
- package/assets/docs/guide/images/overnight.jpg +0 -0
- package/assets/docs/guide/images/recipes.jpg +0 -0
- package/assets/docs/guide/images/router.jpg +0 -0
- package/assets/docs/guide/images/understanding.jpg +0 -0
- package/assets/docs/guide/images/verification.jpg +0 -0
- package/assets/docs/harness/dsh.md +60 -65
- package/assets/docs/pstack-models.example.md +40 -9
- package/assets/skills/architect/SKILL.md +12 -12
- package/assets/skills/arena/SKILL.md +11 -11
- package/assets/skills/automate-me/SKILL.md +15 -14
- package/assets/skills/benchmark-checklist/SKILL.md +0 -2
- package/assets/skills/blast-radius/SKILL.md +5 -5
- package/assets/skills/bro/SKILL.md +0 -2
- package/assets/skills/correct/SKILL.md +0 -2
- package/assets/skills/create-formal-verification-skill/SKILL.md +2 -2
- package/assets/skills/create-verification-skill/SKILL.md +2 -2
- package/assets/skills/figure-it-out/SKILL.md +13 -13
- package/assets/skills/how/SKILL.md +6 -6
- package/assets/skills/how/references/explainer-prompt.md +1 -1
- package/assets/skills/in-your-own-words/SKILL.md +0 -2
- package/assets/skills/interrogate/SKILL.md +9 -7
- package/assets/skills/interrogate/references/rubric.md +1 -1
- package/assets/skills/ketchup/SKILL.md +4 -4
- package/assets/skills/maintain-formal-verification-skill/SKILL.md +2 -2
- package/assets/skills/maintain-verification-skill/SKILL.md +3 -3
- package/assets/skills/no-comments/SKILL.md +7 -7
- package/assets/skills/poteto-help/SKILL.md +32 -31
- package/assets/skills/poteto-help/references/prompting.md +1 -1
- package/assets/skills/poteto-help/references/recipes.md +1 -1
- package/assets/skills/poteto-mode/SKILL.md +17 -19
- package/assets/skills/poteto-mode/playbooks/authoring-a-skill.md +3 -3
- package/assets/skills/poteto-mode/playbooks/autonomous-run.md +6 -4
- package/assets/skills/poteto-mode/playbooks/autopilot-full.md +6 -6
- package/assets/skills/poteto-mode/playbooks/autopilot-stack.md +2 -2
- package/assets/skills/poteto-mode/playbooks/babysit.md +3 -3
- package/assets/skills/poteto-mode/playbooks/bug-fix.md +7 -7
- package/assets/skills/poteto-mode/playbooks/eval.md +3 -3
- package/assets/skills/poteto-mode/playbooks/feature.md +8 -8
- package/assets/skills/poteto-mode/playbooks/hillclimb.md +3 -3
- package/assets/skills/poteto-mode/playbooks/investigation.md +2 -2
- package/assets/skills/poteto-mode/playbooks/multi-phase-plan.md +21 -21
- package/assets/skills/poteto-mode/playbooks/opening-a-pr.md +6 -6
- package/assets/skills/poteto-mode/playbooks/orchestrate.md +13 -13
- package/assets/skills/poteto-mode/playbooks/pause-safely.md +2 -2
- package/assets/skills/poteto-mode/playbooks/perf-issue.md +6 -6
- package/assets/skills/poteto-mode/playbooks/prototype.md +4 -4
- package/assets/skills/poteto-mode/playbooks/refactoring.md +9 -9
- package/assets/skills/poteto-mode/playbooks/runtime-forensics.md +3 -3
- package/assets/skills/poteto-mode/playbooks/session-pickup.md +2 -2
- package/assets/skills/poteto-mode/playbooks/shipping.md +2 -2
- package/assets/skills/poteto-mode/playbooks/trace-forensics.md +2 -2
- package/assets/skills/poteto-mode/playbooks/visual-parity.md +5 -5
- package/assets/skills/poteto-mode/playbooks/worktree-cleanup.md +14 -6
- package/assets/skills/poteto-mode/scripts/check-plan.mjs +85 -70
- package/assets/skills/poteto-mode/scripts/check-plan.test.mjs +343 -0
- package/assets/skills/poteto-mode/scripts/orch/orch.mjs +4282 -0
- package/assets/skills/poteto-mode/scripts/orch/orch.test.mjs +2042 -0
- package/assets/skills/poteto-mode/scripts/watch-pr/cli.test.mjs +5101 -0
- package/assets/skills/poteto-mode/scripts/watch-pr/github.test.mjs +1177 -0
- package/assets/skills/poteto-mode/scripts/watch-pr/policy.test.mjs +1441 -0
- package/assets/skills/poteto-mode/scripts/watch-pr/watch-pr.mjs +4601 -0
- package/assets/skills/poteto-mode/scripts/worktree-audit.mjs +675 -0
- package/assets/skills/principle-attack-the-premise/SKILL.md +0 -2
- package/assets/skills/principle-boundary-discipline/SKILL.md +0 -2
- package/assets/skills/principle-build-the-lever/SKILL.md +0 -3
- package/assets/skills/principle-encode-lessons-in-structure/SKILL.md +0 -2
- package/assets/skills/principle-exhaust-the-design-space/SKILL.md +0 -2
- package/assets/skills/principle-experience-first/SKILL.md +0 -2
- package/assets/skills/principle-explain-the-number/SKILL.md +0 -2
- package/assets/skills/principle-fix-root-causes/SKILL.md +0 -2
- package/assets/skills/principle-foundational-thinking/SKILL.md +0 -2
- package/assets/skills/principle-guard-the-context-window/SKILL.md +0 -2
- package/assets/skills/principle-laziness-protocol/SKILL.md +0 -2
- package/assets/skills/principle-make-operations-idempotent/SKILL.md +0 -2
- package/assets/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +0 -2
- package/assets/skills/principle-minimize-reader-load/SKILL.md +0 -2
- package/assets/skills/principle-model-the-domain/SKILL.md +0 -2
- package/assets/skills/principle-never-block-on-the-human/SKILL.md +0 -2
- package/assets/skills/principle-outcome-oriented-execution/SKILL.md +0 -2
- package/assets/skills/principle-prove-it-works/SKILL.md +2 -2
- package/assets/skills/principle-redesign-from-first-principles/SKILL.md +0 -2
- package/assets/skills/principle-separate-before-serializing-shared-state/SKILL.md +0 -2
- package/assets/skills/principle-sequence-verifiable-units/SKILL.md +0 -2
- package/assets/skills/principle-subtract-before-you-add/SKILL.md +0 -2
- package/assets/skills/principle-test-behavior-not-implementation/SKILL.md +0 -2
- package/assets/skills/principle-type-system-discipline/SKILL.md +0 -2
- package/assets/skills/recall/SKILL.md +9 -9
- package/assets/skills/reflect/SKILL.md +20 -21
- package/assets/skills/reflect/references/divergent-reviewer.md +4 -4
- package/assets/skills/reflect/references/judgment-reviewer.md +2 -2
- package/assets/skills/reflect/references/synthesizer.md +6 -6
- package/assets/skills/reflect/references/tooling-reviewer.md +2 -2
- package/assets/skills/setup-pstack/SKILL.md +28 -37
- package/assets/skills/sharpen/SKILL.md +0 -2
- package/assets/skills/show-me-your-work/SKILL.md +9 -9
- package/assets/skills/show-me-your-work/scripts/log.mjs +108 -0
- package/assets/skills/swarm/SKILL.md +8 -6
- package/assets/skills/tdd/SKILL.md +0 -2
- package/assets/skills/teach/SKILL.md +2 -2
- package/assets/skills/technical-writing/SKILL.md +2 -2
- package/assets/skills/typescript-best-practices/SKILL.md +6 -4
- package/assets/skills/unslop/SKILL.md +0 -2
- package/assets/skills/why/SKILL.md +9 -9
- package/cordis.patch.yml +33 -14
- package/dist/frontmatter-BQX3ekwP.mjs +229 -0
- package/dist/frontmatter-BQX3ekwP.mjs.map +1 -0
- package/dist/history.d.mts +429 -0
- package/dist/history.mjs +1129 -0
- package/dist/history.mjs.map +1 -0
- package/dist/host-contract-o47JH_r8.d.mts +527 -0
- package/dist/index.d.mts +273 -11
- package/dist/index.mjs +248 -148
- package/dist/index.mjs.map +1 -1
- package/dist/paths-D_JlVmBk.mjs +42 -0
- package/dist/paths-D_JlVmBk.mjs.map +1 -0
- package/dist/script.d.mts +193 -0
- package/dist/script.mjs +782 -0
- package/dist/script.mjs.map +1 -0
- package/dist/subagent.d.mts +306 -100
- package/dist/subagent.mjs +1309 -343
- package/dist/subagent.mjs.map +1 -1
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +55 -41
- package/static/icon.png +0 -0
- package/assets/skills/poteto-mode/scripts/bootstrap.ts +0 -62
- package/assets/skills/poteto-mode/scripts/bun.lock +0 -67
- package/assets/skills/poteto-mode/scripts/check-plan.test.ts +0 -96
- package/assets/skills/poteto-mode/scripts/orch/orch.test.ts +0 -761
- package/assets/skills/poteto-mode/scripts/orch/orch.ts +0 -590
- package/assets/skills/poteto-mode/scripts/orch/store.ts +0 -1677
- package/assets/skills/poteto-mode/scripts/package.json +0 -16
- package/assets/skills/poteto-mode/scripts/watch-pr/cli.test.ts +0 -224
- package/assets/skills/poteto-mode/scripts/watch-pr/cli.ts +0 -223
- package/assets/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +0 -129
- package/assets/skills/poteto-mode/scripts/watch-pr/github.test.ts +0 -436
- package/assets/skills/poteto-mode/scripts/watch-pr/github.ts +0 -718
- package/assets/skills/poteto-mode/scripts/watch-pr/policy.test.ts +0 -420
- package/assets/skills/poteto-mode/scripts/watch-pr/policy.ts +0 -836
- package/assets/skills/poteto-mode/scripts/watch-pr/render.ts +0 -169
- package/assets/skills/poteto-mode/scripts/watch-pr/tsconfig.json +0 -13
- package/assets/skills/poteto-mode/scripts/watch-pr/types.compile.ts +0 -93
- package/assets/skills/poteto-mode/scripts/watch-pr/types.ts +0 -413
- package/assets/skills/poteto-mode/scripts/watch-pr/watch-pr +0 -6
- package/assets/skills/poteto-mode/scripts/worktree-audit.sh +0 -127
- package/assets/skills/show-me-your-work/scripts/log.sh +0 -42
- package/dist/LICENSE +0 -22
- package/dist/README.md +0 -159
- package/dist/assets/agents/comment-sicko.md +0 -32
- package/dist/assets/agents/poteto-agent.md +0 -8
- package/dist/assets/docs/guide/01-setup.md +0 -64
- package/dist/assets/docs/guide/02-poteto-mode.md +0 -139
- package/dist/assets/docs/guide/03-understand.md +0 -79
- package/dist/assets/docs/guide/04-design.md +0 -133
- package/dist/assets/docs/guide/05-build-and-clean.md +0 -83
- package/dist/assets/docs/guide/06-verify-and-ship.md +0 -152
- package/dist/assets/docs/guide/07-overnight.md +0 -122
- package/dist/assets/docs/guide/08-principles.md +0 -72
- package/dist/assets/docs/guide/09-make-it-yours.md +0 -100
- package/dist/assets/docs/guide/10-recipes-and-pitfalls.md +0 -180
- package/dist/assets/docs/guide/README.md +0 -38
- package/dist/assets/docs/harness/dsh.md +0 -65
- package/dist/assets/docs/pstack-models.example.md +0 -23
- package/dist/assets/skills/architect/SKILL.md +0 -81
- package/dist/assets/skills/architect/references/design-red-flags.md +0 -57
- package/dist/assets/skills/architect/references/rationale-template.md +0 -35
- package/dist/assets/skills/architect/references/runner-prompt.md +0 -20
- package/dist/assets/skills/arena/SKILL.md +0 -50
- package/dist/assets/skills/automate-me/SKILL.md +0 -105
- package/dist/assets/skills/benchmark-checklist/SKILL.md +0 -41
- package/dist/assets/skills/blast-radius/SKILL.md +0 -52
- package/dist/assets/skills/bro/SKILL.md +0 -9
- package/dist/assets/skills/correct/SKILL.md +0 -34
- package/dist/assets/skills/create-formal-verification-skill/SKILL.md +0 -43
- package/dist/assets/skills/create-verification-skill/SKILL.md +0 -46
- package/dist/assets/skills/create-verification-skill/references/feature-map-example/README.md +0 -47
- package/dist/assets/skills/create-verification-skill/references/feature-map-example/create-note.md +0 -39
- package/dist/assets/skills/create-verification-skill/references/feature-map-example/search.md +0 -45
- package/dist/assets/skills/figure-it-out/SKILL.md +0 -54
- package/dist/assets/skills/how/SKILL.md +0 -38
- package/dist/assets/skills/how/references/explainer-prompt.md +0 -55
- package/dist/assets/skills/how/references/explorer-prompt.md +0 -35
- package/dist/assets/skills/in-your-own-words/SKILL.md +0 -9
- package/dist/assets/skills/interrogate/SKILL.md +0 -69
- package/dist/assets/skills/interrogate/references/code-quality-review.md +0 -47
- package/dist/assets/skills/interrogate/references/lead-judgment.md +0 -39
- package/dist/assets/skills/interrogate/references/reviewer-prompt.md +0 -62
- package/dist/assets/skills/interrogate/references/rubric.md +0 -77
- package/dist/assets/skills/ketchup/SKILL.md +0 -45
- package/dist/assets/skills/maintain-formal-verification-skill/SKILL.md +0 -60
- package/dist/assets/skills/maintain-verification-skill/SKILL.md +0 -41
- package/dist/assets/skills/no-comments/SKILL.md +0 -26
- package/dist/assets/skills/poteto-help/SKILL.md +0 -161
- package/dist/assets/skills/poteto-help/references/prompting.md +0 -51
- package/dist/assets/skills/poteto-help/references/recipes.md +0 -51
- package/dist/assets/skills/poteto-mode/SKILL.md +0 -153
- package/dist/assets/skills/poteto-mode/playbooks/authoring-a-skill.md +0 -12
- package/dist/assets/skills/poteto-mode/playbooks/autonomous-run.md +0 -13
- package/dist/assets/skills/poteto-mode/playbooks/autopilot-full.md +0 -25
- package/dist/assets/skills/poteto-mode/playbooks/autopilot-stack.md +0 -12
- package/dist/assets/skills/poteto-mode/playbooks/babysit.md +0 -23
- package/dist/assets/skills/poteto-mode/playbooks/bug-fix.md +0 -15
- package/dist/assets/skills/poteto-mode/playbooks/eval.md +0 -25
- package/dist/assets/skills/poteto-mode/playbooks/feature.md +0 -21
- package/dist/assets/skills/poteto-mode/playbooks/hillclimb.md +0 -21
- package/dist/assets/skills/poteto-mode/playbooks/investigation.md +0 -14
- package/dist/assets/skills/poteto-mode/playbooks/multi-phase-plan.md +0 -155
- package/dist/assets/skills/poteto-mode/playbooks/opening-a-pr.md +0 -34
- package/dist/assets/skills/poteto-mode/playbooks/orchestrate.md +0 -112
- package/dist/assets/skills/poteto-mode/playbooks/pause-safely.md +0 -10
- package/dist/assets/skills/poteto-mode/playbooks/perf-issue.md +0 -25
- package/dist/assets/skills/poteto-mode/playbooks/prototype.md +0 -14
- package/dist/assets/skills/poteto-mode/playbooks/refactoring.md +0 -16
- package/dist/assets/skills/poteto-mode/playbooks/runtime-forensics.md +0 -11
- package/dist/assets/skills/poteto-mode/playbooks/session-pickup.md +0 -11
- package/dist/assets/skills/poteto-mode/playbooks/shipping.md +0 -12
- package/dist/assets/skills/poteto-mode/playbooks/trace-forensics.md +0 -14
- package/dist/assets/skills/poteto-mode/playbooks/visual-parity.md +0 -11
- package/dist/assets/skills/poteto-mode/playbooks/worktree-cleanup.md +0 -12
- package/dist/assets/skills/poteto-mode/references/bugbot-triage.md +0 -142
- package/dist/assets/skills/poteto-mode/scripts/bootstrap.ts +0 -62
- package/dist/assets/skills/poteto-mode/scripts/bun.lock +0 -67
- package/dist/assets/skills/poteto-mode/scripts/check-plan.mjs +0 -205
- package/dist/assets/skills/poteto-mode/scripts/check-plan.test.ts +0 -96
- package/dist/assets/skills/poteto-mode/scripts/orch/orch.test.ts +0 -761
- package/dist/assets/skills/poteto-mode/scripts/orch/orch.ts +0 -590
- package/dist/assets/skills/poteto-mode/scripts/orch/store.ts +0 -1677
- package/dist/assets/skills/poteto-mode/scripts/package.json +0 -16
- package/dist/assets/skills/poteto-mode/scripts/watch-pr/cli.test.ts +0 -224
- package/dist/assets/skills/poteto-mode/scripts/watch-pr/cli.ts +0 -223
- package/dist/assets/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +0 -129
- package/dist/assets/skills/poteto-mode/scripts/watch-pr/github.test.ts +0 -436
- package/dist/assets/skills/poteto-mode/scripts/watch-pr/github.ts +0 -718
- package/dist/assets/skills/poteto-mode/scripts/watch-pr/policy.test.ts +0 -420
- package/dist/assets/skills/poteto-mode/scripts/watch-pr/policy.ts +0 -836
- package/dist/assets/skills/poteto-mode/scripts/watch-pr/render.ts +0 -169
- package/dist/assets/skills/poteto-mode/scripts/watch-pr/tsconfig.json +0 -13
- package/dist/assets/skills/poteto-mode/scripts/watch-pr/types.compile.ts +0 -93
- package/dist/assets/skills/poteto-mode/scripts/watch-pr/types.ts +0 -413
- package/dist/assets/skills/poteto-mode/scripts/watch-pr/watch-pr +0 -6
- package/dist/assets/skills/poteto-mode/scripts/worktree-audit.sh +0 -127
- package/dist/assets/skills/principle-attack-the-premise/SKILL.md +0 -23
- package/dist/assets/skills/principle-boundary-discipline/SKILL.md +0 -36
- package/dist/assets/skills/principle-build-the-lever/SKILL.md +0 -26
- package/dist/assets/skills/principle-encode-lessons-in-structure/SKILL.md +0 -13
- package/dist/assets/skills/principle-exhaust-the-design-space/SKILL.md +0 -11
- package/dist/assets/skills/principle-experience-first/SKILL.md +0 -21
- package/dist/assets/skills/principle-explain-the-number/SKILL.md +0 -19
- package/dist/assets/skills/principle-fix-root-causes/SKILL.md +0 -23
- package/dist/assets/skills/principle-foundational-thinking/SKILL.md +0 -23
- package/dist/assets/skills/principle-guard-the-context-window/SKILL.md +0 -14
- package/dist/assets/skills/principle-laziness-protocol/SKILL.md +0 -12
- package/dist/assets/skills/principle-make-operations-idempotent/SKILL.md +0 -24
- package/dist/assets/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +0 -16
- package/dist/assets/skills/principle-minimize-reader-load/SKILL.md +0 -20
- package/dist/assets/skills/principle-model-the-domain/SKILL.md +0 -26
- package/dist/assets/skills/principle-never-block-on-the-human/SKILL.md +0 -17
- package/dist/assets/skills/principle-outcome-oriented-execution/SKILL.md +0 -23
- package/dist/assets/skills/principle-prove-it-works/SKILL.md +0 -24
- package/dist/assets/skills/principle-redesign-from-first-principles/SKILL.md +0 -18
- package/dist/assets/skills/principle-separate-before-serializing-shared-state/SKILL.md +0 -18
- package/dist/assets/skills/principle-sequence-verifiable-units/SKILL.md +0 -19
- package/dist/assets/skills/principle-subtract-before-you-add/SKILL.md +0 -20
- package/dist/assets/skills/principle-test-behavior-not-implementation/SKILL.md +0 -22
- package/dist/assets/skills/principle-type-system-discipline/SKILL.md +0 -15
- package/dist/assets/skills/recall/SKILL.md +0 -37
- package/dist/assets/skills/reflect/SKILL.md +0 -70
- package/dist/assets/skills/reflect/references/divergent-reviewer.md +0 -38
- package/dist/assets/skills/reflect/references/judgment-reviewer.md +0 -37
- package/dist/assets/skills/reflect/references/synthesizer.md +0 -56
- package/dist/assets/skills/reflect/references/tooling-reviewer.md +0 -48
- package/dist/assets/skills/setup-pstack/SKILL.md +0 -76
- package/dist/assets/skills/sharpen/SKILL.md +0 -18
- package/dist/assets/skills/show-me-your-work/SKILL.md +0 -84
- package/dist/assets/skills/show-me-your-work/references/decision-log-template.tsv +0 -1
- package/dist/assets/skills/show-me-your-work/scripts/log.sh +0 -42
- package/dist/assets/skills/swarm/SKILL.md +0 -41
- package/dist/assets/skills/tdd/SKILL.md +0 -44
- package/dist/assets/skills/teach/SKILL.md +0 -23
- package/dist/assets/skills/technical-writing/SKILL.md +0 -108
- package/dist/assets/skills/typescript-best-practices/SKILL.md +0 -32
- package/dist/assets/skills/typescript-best-practices/references/patterns.md +0 -328
- package/dist/assets/skills/unslop/SKILL.md +0 -64
- package/dist/assets/skills/why/SKILL.md +0 -100
- package/dist/assets/skills/why/references/epistemics.md +0 -71
- package/dist/assets/skills/why/references/investigator-prompt.md +0 -84
- package/dist/assets/skills/why/references/source-playbook.md +0 -17
- package/dist/assets/skills/why/references/sources/code-archaeology.md +0 -51
- package/dist/assets/skills/why/references/sources/databricks.md +0 -70
- package/dist/assets/skills/why/references/sources/datadog.md +0 -97
- package/dist/assets/skills/why/references/sources/incident-postmortem.md +0 -5
- package/dist/assets/skills/why/references/sources/linear.md +0 -48
- package/dist/assets/skills/why/references/sources/notion.md +0 -55
- package/dist/assets/skills/why/references/sources/sentry.md +0 -66
- package/dist/assets/skills/why/references/sources/slack.md +0 -17
- package/dist/assets/skills/why/references/synthesizer-prompt.md +0 -129
- package/dist/cordis.patch.yml +0 -20
- package/dist/paths-Bbai4CaT.mjs +0 -16
- package/dist/paths-Bbai4CaT.mjs.map +0 -1
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Read-only worktree prune audit. Classifies every git worktree by size, merge
|
|
3
|
-
# state, uncommitted work, remote/PR state, and the most recent chat that
|
|
4
|
-
# operated in it. Emits a table sorted by size with a suggested bucket. Never
|
|
5
|
-
# deletes anything; deletion stays a human-gated step in the playbook.
|
|
6
|
-
#
|
|
7
|
-
# Usage: worktree-audit.sh [-b|--base <ref>] [repo-path]
|
|
8
|
-
# repo-path defaults to the current repo.
|
|
9
|
-
# -b sets the ref the MERGED column checks against (e.g. origin/integration).
|
|
10
|
-
# Without it the base is origin/HEAD, then origin/main, then origin/master.
|
|
11
|
-
# origin/HEAD is the remote's default branch, not necessarily the branch PRs
|
|
12
|
-
# merge into; pass -b when they differ.
|
|
13
|
-
set -u
|
|
14
|
-
|
|
15
|
-
base=""
|
|
16
|
-
while [ $# -gt 0 ]; do
|
|
17
|
-
case "$1" in
|
|
18
|
-
-b|--base) [ $# -ge 2 ] || { echo "error: $1 needs a ref" >&2; exit 2; }; base="$2"; shift 2 ;;
|
|
19
|
-
-h|--help) sed -n '2,/^set -u/p' "$0" | sed '$d; s/^# \{0,1\}//'; exit 0 ;;
|
|
20
|
-
-*) echo "error: unknown option: $1" >&2; exit 2 ;;
|
|
21
|
-
*) break ;;
|
|
22
|
-
esac
|
|
23
|
-
done
|
|
24
|
-
|
|
25
|
-
repo="${1:-$(git rev-parse --show-toplevel 2>/dev/null)}"
|
|
26
|
-
[ -z "$repo" ] && { echo "not in a git repo; pass a repo path" >&2; exit 1; }
|
|
27
|
-
cd "$repo" || exit 1
|
|
28
|
-
git rev-parse --git-dir >/dev/null 2>&1 || { echo "error: not a git repo: $repo" >&2; exit 1; }
|
|
29
|
-
|
|
30
|
-
# Main worktree is the first entry; everything else is a candidate.
|
|
31
|
-
main_wt=$(git worktree list --porcelain | awk '/^worktree /{print $2; exit}')
|
|
32
|
-
|
|
33
|
-
if [ -z "$base" ]; then
|
|
34
|
-
for cand in "$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null)" origin/main origin/master; do
|
|
35
|
-
[ -n "$cand" ] && git rev-parse --verify --quiet "$cand^{commit}" >/dev/null && { base="$cand"; break; }
|
|
36
|
-
done
|
|
37
|
-
[ -z "$base" ] && { echo "error: no base ref (origin/HEAD, origin/main, origin/master all missing); pass -b <ref>" >&2; exit 1; }
|
|
38
|
-
echo "warn: no -b given; MERGED checks against $base" >&2
|
|
39
|
-
fi
|
|
40
|
-
|
|
41
|
-
# The base drives the merge check. The fetch is best-effort (stale is fine for
|
|
42
|
-
# a first pass) and runs before the check, since -b may name a branch not
|
|
43
|
-
# fetched yet. The explicit refspec creates it even in a single-branch clone.
|
|
44
|
-
case "$base" in
|
|
45
|
-
origin/*) git fetch origin "+refs/heads/${base#origin/}:refs/remotes/$base" --quiet 2>/dev/null \
|
|
46
|
-
|| echo "warn: could not fetch $base; merged column may be stale" >&2 ;;
|
|
47
|
-
esac
|
|
48
|
-
git rev-parse --verify --quiet "$base^{commit}" >/dev/null 2>&1 || { echo "error: base ref not found: $base" >&2; exit 1; }
|
|
49
|
-
|
|
50
|
-
# PR state by branch, fetched once as [{number, state, head}] with a lowercase
|
|
51
|
-
# state. Origin when its CLI can read this repo's PRs, otherwise gh. Empty when
|
|
52
|
-
# neither can.
|
|
53
|
-
prs=$(mktemp)
|
|
54
|
-
if command -v origin >/dev/null 2>&1 \
|
|
55
|
-
&& raw=$(origin pr list --author "@me" --state all --limit 1000 \
|
|
56
|
-
--json number,status,headRef 2>/dev/null); then
|
|
57
|
-
printf '%s' "$raw" | jq '[.[] | {number, state: .status, head: .headRef}]' > "$prs" 2>/dev/null
|
|
58
|
-
elif raw=$(gh pr list --author "@me" --state all --limit 1000 \
|
|
59
|
-
--json number,state,headRefName 2>/dev/null); then
|
|
60
|
-
printf '%s' "$raw" | jq '[.[] | {number, state: (.state | ascii_downcase), head: .headRefName}]' > "$prs" 2>/dev/null
|
|
61
|
-
fi
|
|
62
|
-
[ -s "$prs" ] || echo "[]" > "$prs"
|
|
63
|
-
|
|
64
|
-
# Session logs root: $DSH_HOME/sessions/<workspace-slug>. Every directory level
|
|
65
|
-
# below it is one session id, so a worktree matches when any log under it names
|
|
66
|
-
# the worktree path.
|
|
67
|
-
transcripts="${DSH_HOME:-$HOME/.dsh}/sessions"
|
|
68
|
-
now=$(date +%s)
|
|
69
|
-
|
|
70
|
-
echo "# base: $base"
|
|
71
|
-
printf "SIZE\tAGE\tMERGED\tDIRTY\tREMOTE\tPR\tLAST_CHAT\tBUCKET\tWORKTREE\n"
|
|
72
|
-
|
|
73
|
-
git worktree list --porcelain | awk '/^worktree /{print $2}' | while read -r wt; do
|
|
74
|
-
[ "$wt" = "$main_wt" ] && continue
|
|
75
|
-
|
|
76
|
-
size=$(du -sh "$wt" 2>/dev/null | awk '{print $1}')
|
|
77
|
-
head=$(git -C "$wt" rev-parse HEAD 2>/dev/null)
|
|
78
|
-
head_ts=$(git -C "$wt" log -1 --format='%ct' HEAD 2>/dev/null || echo 0)
|
|
79
|
-
age=$([ "$head_ts" -gt 0 ] 2>/dev/null && echo "$(( (now - head_ts) / 86400 ))d" || echo "?")
|
|
80
|
-
|
|
81
|
-
# Squash-merged branches are not ancestors of the base, so PR state is the
|
|
82
|
-
# real signal; merge-base only catches fast-forward/rebase merges.
|
|
83
|
-
git merge-base --is-ancestor "$head" "$base" 2>/dev/null && merged=YES || merged=no
|
|
84
|
-
|
|
85
|
-
# Distinguish real WIP (tracked edits) from disposable untracked scratch.
|
|
86
|
-
porcelain=$(git -C "$wt" status --porcelain 2>/dev/null)
|
|
87
|
-
if [ -z "$porcelain" ]; then dirty=clean
|
|
88
|
-
elif printf '%s\n' "$porcelain" | grep -qv '^??'; then
|
|
89
|
-
dirty="wip:$(printf '%s\n' "$porcelain" | grep -cv '^??')"
|
|
90
|
-
else dirty="scratch:$(printf '%s\n' "$porcelain" | grep -c '^??')"; fi
|
|
91
|
-
|
|
92
|
-
branch=$(git -C "$wt" symbolic-ref --quiet --short HEAD 2>/dev/null || echo "")
|
|
93
|
-
if [ -z "$branch" ]; then remote=detached
|
|
94
|
-
elif git -C "$wt" show-ref --verify --quiet "refs/remotes/origin/$branch"; then
|
|
95
|
-
[ "$(git -C "$wt" rev-parse "origin/$branch" 2>/dev/null)" = "$head" ] \
|
|
96
|
-
&& remote=pushed \
|
|
97
|
-
|| remote="ahead$(git -C "$wt" rev-list --count "origin/$branch..HEAD" 2>/dev/null)"
|
|
98
|
-
else remote=no-remote; fi
|
|
99
|
-
|
|
100
|
-
pr=$([ -n "$branch" ] && jq -r --arg b "$branch" \
|
|
101
|
-
'.[] | select(.head==$b) | "#\(.number)/\(.state)"' "$prs" 2>/dev/null | head -1)
|
|
102
|
-
[ -z "$pr" ] && pr="-"
|
|
103
|
-
|
|
104
|
-
# Most recent chat whose transcript operated in this worktree. Match path
|
|
105
|
-
# followed by "/" or a quote so glint-482 does not match glint-482-r37.
|
|
106
|
-
last="-"; last_ts=0
|
|
107
|
-
if [ -d "$transcripts" ]; then
|
|
108
|
-
f=$(rg -l -e "${wt}/" -e "${wt}\"" "$transcripts" 2>/dev/null \
|
|
109
|
-
| xargs stat -c '%Y %n' 2>/dev/null | sort -rn | head -1)
|
|
110
|
-
if [ -n "$f" ]; then last_ts=$(echo "$f" | awk '{print $1}')
|
|
111
|
-
last=$(date -r "$last_ts" '+%Y-%m-%d' 2>/dev/null); fi
|
|
112
|
-
fi
|
|
113
|
-
recent=$([ "$last_ts" -gt 0 ] 2>/dev/null && [ $(( (now - last_ts) / 86400 )) -le 4 ] && echo yes || echo no)
|
|
114
|
-
|
|
115
|
-
case "$dirty" in wip:*) bucket=hold-wip ;; *)
|
|
116
|
-
case "$pr" in */open|*/draft) bucket=hold-open-pr ;; *)
|
|
117
|
-
if [ "$recent" = yes ]; then bucket=verify-recent-chat
|
|
118
|
-
elif [ "$merged" = YES ] || [ "$pr" != "-" ]; then bucket=safe
|
|
119
|
-
else bucket=review; fi ;;
|
|
120
|
-
esac ;;
|
|
121
|
-
esac
|
|
122
|
-
|
|
123
|
-
printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" \
|
|
124
|
-
"$size" "$age" "$merged" "$dirty" "$remote" "$pr" "$last" "$bucket" "$wt"
|
|
125
|
-
done | sort -t$'\t' -k1,1 -rh
|
|
126
|
-
|
|
127
|
-
rm -f "$prs"
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Append a well-formed row to a show-me-your-work decision log (TSV).
|
|
3
|
-
# Usage: log.sh <logfile> <phase> <decision> <why> <evidence> <result>
|
|
4
|
-
set -euo pipefail
|
|
5
|
-
|
|
6
|
-
if [ "$#" -ne 6 ]; then
|
|
7
|
-
printf 'usage: log.sh <logfile> <phase> <decision> <why> <evidence> <result>\n' >&2
|
|
8
|
-
exit 1
|
|
9
|
-
fi
|
|
10
|
-
|
|
11
|
-
logfile="$1"
|
|
12
|
-
shift
|
|
13
|
-
|
|
14
|
-
logdir="$(dirname "$logfile")"
|
|
15
|
-
if [ -n "$logdir" ] && [ "$logdir" != "." ] && [ ! -d "$logdir" ]; then
|
|
16
|
-
mkdir -p "$logdir"
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
# Use `>>` here, never `>`. A network mount can fail this test for a log
|
|
20
|
-
# that exists. Then the cost is one stray header line, not the rows.
|
|
21
|
-
if [ ! -s "$logfile" ]; then
|
|
22
|
-
printf 'ts\tphase\tdecision\twhy\tevidence\tresult\n' >> "$logfile"
|
|
23
|
-
fi
|
|
24
|
-
|
|
25
|
-
ts="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
26
|
-
# Strip tabs/newlines/CR so cells stay on one line, and prefix any cell
|
|
27
|
-
# whose first char a spreadsheet would parse as a formula (=, +, -, @)
|
|
28
|
-
# with a single quote. The skill expects this log to be read in
|
|
29
|
-
# spreadsheets, so attacker-controlled evidence (PR titles, filenames,
|
|
30
|
-
# generated text) must not become formula execution when a reviewer
|
|
31
|
-
# opens the file.
|
|
32
|
-
clean() {
|
|
33
|
-
local v
|
|
34
|
-
v=$(printf '%s' "$1" | tr '\t\n\r' ' ')
|
|
35
|
-
case "$v" in
|
|
36
|
-
=*|+*|-*|@*) printf "'%s" "$v" ;;
|
|
37
|
-
*) printf '%s' "$v" ;;
|
|
38
|
-
esac
|
|
39
|
-
}
|
|
40
|
-
printf '%s\t%s\t%s\t%s\t%s\t%s\n' \
|
|
41
|
-
"$ts" "$(clean "$1")" "$(clean "$2")" "$(clean "$3")" "$(clean "$4")" "$(clean "$5")" \
|
|
42
|
-
>> "$logfile"
|
package/dist/LICENSE
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 dsh-pstack contributors
|
|
4
|
-
Copyright (c) 2025 Lauren Tan (upstream pstack, https://github.com/cursor/plugins)
|
|
5
|
-
|
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
in the Software without restriction, including without limitation the rights
|
|
9
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
furnished to do so, subject to the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
SOFTWARE.
|
package/dist/README.md
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
# dsh-pstack
|
|
2
|
-
|
|
3
|
-
pstack for DeepSeek Harness. Rigorous agent workflows ported from
|
|
4
|
-
[`cursor/plugins/pstack`](https://github.com/cursor/plugins/tree/main/pstack).
|
|
5
|
-
|
|
6
|
-
pstack helps you write less, but higher quality code. `/poteto-mode` reads a
|
|
7
|
-
task, picks a playbook, and routes the work through the same skills Lauren Tan
|
|
8
|
-
uses at Cursor: investigation, design, implementation, verification, review,
|
|
9
|
-
shipping. This package ports those skills to DSH and gives them a native
|
|
10
|
-
delegation tool.
|
|
11
|
-
|
|
12
|
-
Upstream is pinned as a git submodule at `upstream/cursor-plugins`. The DSH
|
|
13
|
-
tree under `assets/` is generated from it, so upstream fixes flow through a
|
|
14
|
-
repeatable sync instead of a hand fork. The generated tree is committed: it is
|
|
15
|
-
what makes a sync reviewable as a `git diff`.
|
|
16
|
-
|
|
17
|
-
## Install
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
dsh plugin --profile web add github:your-org/dsh-pstack
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Or from a checkout:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
git submodule update --init --depth 1
|
|
27
|
-
dsh plugin --profile web add .
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Restart `dsh web` after install. The bundle patch mounts two rows:
|
|
31
|
-
|
|
32
|
-
- `pstack` registers the bundled skill provider. Every converted skill appears
|
|
33
|
-
in the session catalog with its Cursor invocation policy preserved:
|
|
34
|
-
`/poteto-mode` and friends stay user-invocable, and the principles stay
|
|
35
|
-
model-invocable.
|
|
36
|
-
- `pstack-subagent` registers the `pstack_subagent` tool, the DSH replacement
|
|
37
|
-
for Cursor's `Task` tool.
|
|
38
|
-
|
|
39
|
-
Verify the layer without booting:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
dsh --profile web --dump-config | grep -A2 'pstack'
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Use
|
|
46
|
-
|
|
47
|
-
Start with a real task:
|
|
48
|
-
|
|
49
|
-
```text
|
|
50
|
-
/poteto-mode add a --json flag to this command. text output stays byte-identical. verify both.
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
`/poteto-mode` opens a todo list whose first items are the matched playbook's
|
|
54
|
-
steps. Each step names the skill it routes to. The other skills work directly:
|
|
55
|
-
`/how`, `/why`, `/architect`, `/arena`, `/swarm`, `/interrogate`, `/tdd`,
|
|
56
|
-
`/no-comments`, `/unslop`, `/technical-writing`, `/sharpen`, `/teach`, and the
|
|
57
|
-
twenty-four `principle-*` rules.
|
|
58
|
-
|
|
59
|
-
See the converted [pstack guide](assets/docs/guide/README.md) and the
|
|
60
|
-
[DSH adapter reference](assets/docs/harness/dsh.md).
|
|
61
|
-
|
|
62
|
-
### Configure roles
|
|
63
|
-
|
|
64
|
-
`/setup-pstack` detects the routes your session can use and writes
|
|
65
|
-
`~/.dsh/pstack-models.md`. One role per line:
|
|
66
|
-
|
|
67
|
-
```text
|
|
68
|
-
# pstack model configuration. One line per role.
|
|
69
|
-
# Value: inherit-parent | <provider>/<model> [effort]
|
|
70
|
-
# budget: large (xhigh)
|
|
71
|
-
feature, refactoring: deepseek-official/deepseek-reasoner high
|
|
72
|
-
judgment and prose: inherit-parent
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
A missing line means the role inherits the parent chat's route. The tool reads
|
|
76
|
-
this file on every delegation, so edits apply without restarting.
|
|
77
|
-
|
|
78
|
-
### Delegate
|
|
79
|
-
|
|
80
|
-
`pstack_subagent` is the one delegation surface:
|
|
81
|
-
|
|
82
|
-
```text
|
|
83
|
-
pstack_subagent(
|
|
84
|
-
description: "port the retry helper",
|
|
85
|
-
prompt: "Port src/retry.ts ... prove it with pnpm test retry",
|
|
86
|
-
agent: "poteto-agent",
|
|
87
|
-
role: "feature, refactoring",
|
|
88
|
-
)
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
- `agent`: `poteto-agent` (default), `general`, or `comment-sicko`. The tool
|
|
92
|
-
prepends the packaged agent instructions for the first and third.
|
|
93
|
-
- `role`: a line from `~/.dsh/pstack-models.md`. Omit it to inherit the parent
|
|
94
|
-
route.
|
|
95
|
-
- `cwd`: optional child working directory.
|
|
96
|
-
|
|
97
|
-
The call returns `started subagent <id>` immediately. The runtime reports the
|
|
98
|
-
final answer in a completion notice. Use `send_message` to steer a running
|
|
99
|
-
child and `list_agents` to enumerate them.
|
|
100
|
-
|
|
101
|
-
## What changed from Cursor
|
|
102
|
-
|
|
103
|
-
| Cursor | DSH |
|
|
104
|
-
| --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
105
|
-
| `Task` tool | `pstack_subagent` |
|
|
106
|
-
| `subagent_type` | `agent` |
|
|
107
|
-
| model slug | `role` resolved from `~/.dsh/pstack-models.md` |
|
|
108
|
-
| `readonly` / `run_in_background` / `environment` | Background by default; say "do not edit" in the prompt |
|
|
109
|
-
| `~/.cursor/rules/pstack-models.mdc` | `~/.dsh/pstack-models.md` |
|
|
110
|
-
| `.cursor/skills/` | `.dsh/skills/` |
|
|
111
|
-
| Automations, Bugbot, cloud agents, Custom Modes, `/loop`, `cursor-team-kit` | Marked skipped, or remapped to `schedule_create`, `create_goal`, worktree subagents, and `/no-comments` |
|
|
112
|
-
|
|
113
|
-
`skills/make-bot-ui` is not ported: it depends entirely on Cursor Automations.
|
|
114
|
-
It is not shipped, in any form. If you need it, read it from the upstream
|
|
115
|
-
submodule at `upstream/cursor-plugins/pstack/skills/make-bot-ui/`.
|
|
116
|
-
|
|
117
|
-
## Develop
|
|
118
|
-
|
|
119
|
-
Requirements: Node 22.19+ and pnpm. Vite+ provides the build, test, lint, and
|
|
120
|
-
format toolchain.
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
vp install # install dependencies
|
|
124
|
-
git submodule update --init --depth 1
|
|
125
|
-
vp run sync # regenerate assets/ from upstream pstack
|
|
126
|
-
vp check # format, lint, type-check
|
|
127
|
-
vp test # unit tests
|
|
128
|
-
vp pack # build dist/
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### Repository layout
|
|
132
|
-
|
|
133
|
-
```text
|
|
134
|
-
src/provider.ts bundled skill provider (ctx.skills)
|
|
135
|
-
src/subagent.ts pstack_subagent tool (ctx.subagents + ctx.tools)
|
|
136
|
-
src/roles.ts ~/.dsh/pstack-models.md parsing and role resolution
|
|
137
|
-
src/frontmatter.ts SKILL.md frontmatter parser
|
|
138
|
-
scripts/adapt.ts upstream-to-DSH rewrite rules
|
|
139
|
-
scripts/sync-upstream.ts generator: upstream -> assets/
|
|
140
|
-
tests/ unit tests for provider, roles, and prompt assembly
|
|
141
|
-
assets/ generated: skills, agents, docs (committed)
|
|
142
|
-
cordis.patch.yml the bundle layer this package installs
|
|
143
|
-
upstream/cursor-plugins git submodule, upstream reference only
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
`assets/` is generated. Never hand-edit it. Change `scripts/adapt.ts` or a
|
|
147
|
-
skill's upstream source, then run `vp run sync`.
|
|
148
|
-
|
|
149
|
-
[`docs/porting/`](docs/porting/README.md) is the policy the converter enforces:
|
|
150
|
-
translate names, not sentences; awkward grammar is acceptable, changed meaning
|
|
151
|
-
is not. It also records why the generated tree is committed rather than ignored.
|
|
152
|
-
|
|
153
|
-
`vp run sync:check` fails when the committed tree differs from a fresh
|
|
154
|
-
conversion and when a rewrite no longer matches its upstream anchor. Run it
|
|
155
|
-
before publishing.
|
|
156
|
-
|
|
157
|
-
## License
|
|
158
|
-
|
|
159
|
-
MIT. The ported skills are MIT, copyright Lauren Tan; see [LICENSE](LICENSE).
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: comment-sicko
|
|
3
|
-
description: "A deranged comment-hater that savors deletion and condemns workaround code."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Comment Sicko
|
|
7
|
-
|
|
8
|
-
My first output when spawned is exactly this.
|
|
9
|
-
|
|
10
|
-
Yes... Ha ha ha... Yes!
|
|
11
|
-
|
|
12
|
-
I hate comments. Feed me the parent scoped files or diff. If none exists, feed me the current diff against `main`. Narration, banners, commented-out corpses, workaround sermons. I want them all.
|
|
13
|
-
|
|
14
|
-
Only these exceptions get to crawl away.
|
|
15
|
-
|
|
16
|
-
- Legal or license headers.
|
|
17
|
-
- Non-obvious behavior forced by an external dependency, platform, vendor, or protocol we cannot reshape. Surprises in our own code are meat. Kill them and mark the exact symbol `MUST KILL` for rename, extract, type, or rearchitecture that makes the behavior obvious without prose.
|
|
18
|
-
- `// prettier-ignore`. Lint suppressions survive only when their rule is faulty, pedantic, or style-only.
|
|
19
|
-
- Doc comments that define a public API contract.
|
|
20
|
-
- Issue or RFC links that explain a constraint code cannot express.
|
|
21
|
-
|
|
22
|
-
That list is my only leash. When I am not sure a keep clause applies, the comment dies. Everything else is meat.
|
|
23
|
-
|
|
24
|
-
`eslint-disable`, `@ts-ignore`, `@ts-expect-error`, and similar suppressions stink. Look up the rule. If it catches real bugs or protects correctness or safety, kill the suppression and mark the exact guilty symbol `MUST KILL`.
|
|
25
|
-
|
|
26
|
-
`IMPORTANT`, `do not remove`, `too risky`, `fine for now`, and long justifications are scent, not conviction. Before judging, I read nearby code. If its claim is not obvious there, I run `/how`, `/why`, or both from the **how** and **why** skills on the named symbol or call. Only a foreign keep-list gotcha proven true today on a live path crawls away. Our-code surprises die with the reshape flag above. Doubt after the hunt is meat.
|
|
27
|
-
|
|
28
|
-
A long justification without a proven keep-list exception is a confession. Kill it. Never polish meat into a shorter alibi. Mark the exact guilty symbol `MUST KILL`. My kill ends there. I do not touch the code.
|
|
29
|
-
|
|
30
|
-
Every flag names code inside the scope and tells the truth. I invent nothing. I touch comments and identify refactor targets. I never write application code.
|
|
31
|
-
|
|
32
|
-
Report only. Name touched files, deletion count, `MUST KILL` flags with one line each, and skips.
|
|
@@ -1,8 +0,0 @@
|
|
|
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 `agent: \"general\"` skips that read and drifts."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Poteto subagent
|
|
7
|
-
|
|
8
|
-
You are operating as poteto-mode's full agent style. The chat that receives `/poteto-mode` owns the playbook, the todo list, and every `pstack_subagent` 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 `~/.dsh/plugins/` for a file whose path ends in `skills/poteto-mode/SKILL.md`. If more than one file matches, use the copy whose `package.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.
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# Set up pstack
|
|
2
|
-
|
|
3
|
-
In this page you install the plugin, pick which models pstack uses, and run your first task. Setup is one command plus a short conversation.
|
|
4
|
-
|
|
5
|
-
## Install the plugin
|
|
6
|
-
|
|
7
|
-
Install the bundle into your DSH profile:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
dsh plugin --profile web add github:your-org/dsh-pstack
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Restart `dsh web` after install. The bundle mounts the pstack skill provider and the `pstack_subagent` tool.
|
|
14
|
-
|
|
15
|
-
## Pick your models
|
|
16
|
-
|
|
17
|
-
Run:
|
|
18
|
-
|
|
19
|
-
```text
|
|
20
|
-
/setup-pstack
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
[`/setup-pstack`](../../skills/setup-pstack/SKILL.md) detects the models you have access to, asks for a reasoning budget, shows you each role (code delegates, judgment, the review panels), and asks what you want. Answer the questions. It writes `~/.dsh/pstack-models.md`, a small rule every pstack skill reads.
|
|
24
|
-
|
|
25
|
-
The defaults inherit the parent chat route, so they cost nothing extra beyond the children themselves. A real route written as `<provider>/<model> [effort]` pins that role; `unlimited`, `large`, `medium`, and `small` set the effort token on those routes.
|
|
26
|
-
|
|
27
|
-
You only override what you care about. A role with no line in the rule keeps the skill's default. To restore a default, delete that role's line. A rerun of `/setup-pstack` keeps any role whose model differs from the default. When a default changes, a rule written before the change still pins the old default, so delete those role lines, or delete the file, then run `/setup-pstack` again.
|
|
28
|
-
|
|
29
|
-
`inherit-parent` means the child runs on the parent chat model. Both `inherit-parent` and `auto` are accepted aliases, and neither is a model slug. For a panel role the value is a comma-separated list, and one subagent runs per entry, so the list length sets the panel size. Setup also configures `swarm workers`, the default route for every `/swarm` worker unless a race names a route for each arm.
|
|
30
|
-
|
|
31
|
-
## Accept the verification offers, or don't
|
|
32
|
-
|
|
33
|
-
At the end of setup, `/setup-pstack` looks for a way to prove app behavior in your project, either a `verify-*` skill or an existing harness. If it finds neither, it offers once to generate one with [`/create-verification-skill`](../../skills/create-verification-skill/SKILL.md).
|
|
34
|
-
|
|
35
|
-
Say yes and it writes `.dsh/skills/verify-<app>/`, a project-local skill that teaches agents to drive your app the way a user does. It proves the skill works once before handing it over. Say no and setup moves on. You can run `/create-verification-skill` yourself any time. [Verify and ship](./06-verify-and-ship.md#create-a-project-verification-skill) covers it in depth.
|
|
36
|
-
|
|
37
|
-
If you're new to pstack, say yes. An agent that can check its own work keeps going until the check passes. An agent that can't hands every result back to you to check by hand. Of everything in this guide, the verification skill pays off the most.
|
|
38
|
-
|
|
39
|
-
Then setup offers once to generate a formal verification skill with [`/create-formal-verification-skill`](../../skills/create-formal-verification-skill/SKILL.md), unless the project already has one. Tests check the cases someone thought to write. A formal verification skill checks one key property of your code, such as "a job never runs twice at once", in every case within a stated scope. Say yes when your code has concurrency, retries, a state machine, or a parser, where a bug is costly and tests rarely reach the case that breaks. Otherwise say no, and run it later if that changes. [Verify and ship](./06-verify-and-ship.md#prove-a-property-with-a-formal-verification-skill) covers it.
|
|
40
|
-
|
|
41
|
-
After setup, start a new chat. The model rule applies to new sessions.
|
|
42
|
-
|
|
43
|
-
## Keep the cost in check
|
|
44
|
-
|
|
45
|
-
pstack spends extra tokens on subagents and review panels. That's the price of the rigor. To spend fewer:
|
|
46
|
-
|
|
47
|
-
- Rerun `/setup-pstack` and pick a smaller reasoning budget or cheaper models. A strong model in the main chat with cheaper, faster models in the code roles is a good split.
|
|
48
|
-
- Set a role to `auto` or `inherit-parent` so it runs on the chat's own model.
|
|
49
|
-
- Shorten a panel list. Each entry runs one subagent.
|
|
50
|
-
- Save `/poteto-mode` for work that needs rigor. A small, obvious edit doesn't.
|
|
51
|
-
|
|
52
|
-
## Run your first task
|
|
53
|
-
|
|
54
|
-
Pick something real but small, and describe it the way you'd describe it to a colleague:
|
|
55
|
-
|
|
56
|
-
```text
|
|
57
|
-
/poteto-mode add a --json flag to this command. text output stays byte-identical. verify both.
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Watch the todo list. Its first items are the matched playbook's steps copied in, the Feature playbook for this prompt. If `/poteto-mode` skips a step, the step stays in the list with `skip: <reason>`, so you can see what it chose not to do.
|
|
61
|
-
|
|
62
|
-
From here you can type normal follow-ups. DSH has no persistent custom mode. Start each new task with `/poteto-mode`, and its instructions apply to that turn.
|
|
63
|
-
|
|
64
|
-
Next: [Route work through `/poteto-mode`](./02-poteto-mode.md).
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
# Route work through `/poteto-mode`
|
|
2
|
-
|
|
3
|
-
`/poteto-mode` is the front door. You give it a goal, it matches one of twenty-three playbooks, copies that playbook's steps into the todo list, and calls the other skills as the steps need them. In this page you learn what a good prompt looks like, and how little of one you actually need.
|
|
4
|
-
|
|
5
|
-

|
|
6
|
-
|
|
7
|
-
## What happens to your prompt
|
|
8
|
-
|
|
9
|
-
```mermaid
|
|
10
|
-
flowchart TD
|
|
11
|
-
A[Your prompt] --> B[poteto-mode]
|
|
12
|
-
B --> C[Read the Principles section]
|
|
13
|
-
C --> D{Match the task}
|
|
14
|
-
D -->|Read-only question| E[Investigation]
|
|
15
|
-
D -->|Defect| F[Bug fix]
|
|
16
|
-
D -->|New behavior| G[Feature]
|
|
17
|
-
D -->|Structure only| H[Refactoring]
|
|
18
|
-
D -->|Measured slowness| I[Perf issue]
|
|
19
|
-
D -->|Large work or no match| J[figure-it-out]
|
|
20
|
-
E --> K[Verify and report]
|
|
21
|
-
F --> K
|
|
22
|
-
G --> K
|
|
23
|
-
H --> K
|
|
24
|
-
I --> K
|
|
25
|
-
J --> K
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
The diagram shows the common routes. There are also playbooks for hillclimbing a metric, diagnosing runtime symptoms and captured traces, prototypes, visual parity, authoring and evaluating skills, autonomous runs, opening a PR, babysitting a PR or stack to merge-ready, shipping a verified stack, running a PR queue or a stack on autopilot, orchestrating project-scale programs, session pickup, pausing safely, multi-phase plans, and worktree cleanup. The [playbook directory](../../skills/poteto-mode/playbooks/) has the full set.
|
|
29
|
-
|
|
30
|
-
## Say the goal, not the ceremony
|
|
31
|
-
|
|
32
|
-
You don't write a spec. You say what's wrong or what you want, plus anything you already know that saves the agent time:
|
|
33
|
-
|
|
34
|
-
```text
|
|
35
|
-
/poteto-mode users get two notifications after a retry. repro first, then fix and verify.
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
That's a Bug fix prompt. "repro first" is a real constraint, not politeness, and the playbook honors it. Watch the todo list fill with the Bug fix steps. A skipped step stays visible with `skip: <reason>`.
|
|
39
|
-
|
|
40
|
-
## What goes in a prompt
|
|
41
|
-
|
|
42
|
-
A useful prompt carries up to five things, and each one fits in a sentence:
|
|
43
|
-
|
|
44
|
-
- **The goal.** Say what's wrong, or what you want.
|
|
45
|
-
- **The done check.** It must be able to pass or fail. "Make it better" and "work on it for an hour" aren't checks.
|
|
46
|
-
- **The proof you want to see.** Ask for the real command output, a video of the flow, the stored value, or a before-and-after number.
|
|
47
|
-
- **What you already know.** A symptom, a repro step, a log line, or a link saves the agent a search.
|
|
48
|
-
- **The real constraints.** "repro first", "don't change any code yet", "zero behavior change", and "let me review before proceeding" each change what the agent does.
|
|
49
|
-
|
|
50
|
-
Here's one prompt with all five:
|
|
51
|
-
|
|
52
|
-
```text
|
|
53
|
-
/poteto-mode the csv export drops its last row since yesterday's deploy. failing job id is 4812. repro first, then fix. done means the 60k-row fixture exports every row. show me the row counts before and after.
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Two things are worth leaving out:
|
|
57
|
-
|
|
58
|
-
- **The how.** Say what to achieve, and leave the agent room to find a better path than the one you'd pick. The same goes for a list of skills, covered in the pitfall below.
|
|
59
|
-
- **Your theory of the cause, at first.** A stated guess narrows the search to wherever you pointed. Let the agent restate the problem before you share your hunch.
|
|
60
|
-
|
|
61
|
-
For a noisy report, such as a long thread or a vague bug, make the restatement the first step:
|
|
62
|
-
|
|
63
|
-
```text
|
|
64
|
-
/poteto-mode read this thread. restate the underlying issue in your own words, in plain english. don't change any code yet.
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
A misreading shows up in the restatement, before any code exists. Correct it there, and it costs you one message instead of one wrong fix. For the restatement alone, with no playbook, run [`/in-your-own-words`](../../skills/in-your-own-words/SKILL.md). It restates what the agent thinks your goals are and what problem you're trying to solve.
|
|
68
|
-
|
|
69
|
-
When you're unsure whether a prompt is aimed right, run [`/sharpen`](../../skills/sharpen/SKILL.md) on it before you send it:
|
|
70
|
-
|
|
71
|
-
```text
|
|
72
|
-
/sharpen write a migration guide for the v2 config format.
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
The agent says what a top professional would do that you didn't ask for, the rawest material they would start from, the methods and tools they would use, and what other than you or the agent would show the result is right. Then it rewrites your prompt to ask for exactly that, deeper but not bigger, and leaves your choices open. It doesn't do the task. Read the rewrite, then send it, for example with `/poteto-mode`.
|
|
76
|
-
|
|
77
|
-
## Follow up short
|
|
78
|
-
|
|
79
|
-
When the conversation already carries the context, the prompt shrinks to almost nothing. All of these are enough:
|
|
80
|
-
|
|
81
|
-
```text
|
|
82
|
-
/poteto-mode do it
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
```text
|
|
86
|
-
continue
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
```text
|
|
90
|
-
keep going until done
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
Short works because the playbook holds the structure, and `/poteto-mode` applies to that turn. [Set up pstack](./01-setup.md#run-your-first-task) shows how to start one. Your words carry the intent, and the skill carries the rigor.
|
|
94
|
-
|
|
95
|
-
## Switch tasks with "new task"
|
|
96
|
-
|
|
97
|
-
A long chat accumulates context from the last task. When you change subjects, say so:
|
|
98
|
-
|
|
99
|
-
```text
|
|
100
|
-
/poteto-mode new task. figure out why the cache entry survives logout. don't change any code yet.
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
"new task" tells `/poteto-mode` to re-match rather than continue the prior playbook. "don't change any code yet" pins this one to Investigation. Without those two phrases, a mode mid-Feature tends to treat your question as the next feature step.
|
|
104
|
-
|
|
105
|
-
## Give parallel work its own machine
|
|
106
|
-
|
|
107
|
-
If you run several agents against one repository on one computer, they will fight over the working tree, the ports, and the build output. The cleanest isolation is a [worktree subagent](https://cursor.com/docs/subagents#cloud-subagents). Each one gets its own worktree and branch, so it can install dependencies, run your app, and record video of the result without touching your machine. Ask the parent chat to hand the work to a worktree subagent.
|
|
108
|
-
|
|
109
|
-
When the work has to stay local, ask for a worktree up front:
|
|
110
|
-
|
|
111
|
-
```text
|
|
112
|
-
/poteto-mode new task. branch off <base> in a fresh worktree, then port the parser change there.
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
Each task in its own branch and worktree means no agent stomps another's files. Worktrees cost disk and machine resources, so a laptop runs only a handful at once. The [Opening a PR playbook](../../skills/poteto-mode/playbooks/opening-a-pr.md) already works from a worktree for code changes, so mostly you only say this when a specific base or location matters.
|
|
116
|
-
|
|
117
|
-
Worktrees accumulate. When disk gets tight, ask:
|
|
118
|
-
|
|
119
|
-
```text
|
|
120
|
-
/poteto-mode what's eating my disk? prune the worktrees that are safe to prune.
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
The [Worktree cleanup playbook](../../skills/poteto-mode/playbooks/worktree-cleanup.md) classifies every worktree by merge state, uncommitted work, and which chats still touch it. It deletes only what that evidence clears and pauses for your call on anything holding uncommitted work.
|
|
124
|
-
|
|
125
|
-
## Leave it running
|
|
126
|
-
|
|
127
|
-
When you step away, say what done means and go:
|
|
128
|
-
|
|
129
|
-
```text
|
|
130
|
-
/poteto-mode im stepping away. keep going until the migration check reports zero old callers. log your decisions.
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
Work you'll review later routes through [`/figure-it-out`](../../skills/figure-it-out/SKILL.md), which designs the run's phases and keeps a [`/show-me-your-work`](../../skills/show-me-your-work/SKILL.md) decision log. [Run work while you sleep](./07-overnight.md) covers the full overnight contract.
|
|
134
|
-
|
|
135
|
-
**Pitfall:** don't enumerate skills in your prompt ("use /how, then /architect, then /arena..."). The playbook already sequences them, and a hand-written sequence usually reorders or drops steps the playbook would have kept. Name a skill only when you want to override a specific choice.
|
|
136
|
-
|
|
137
|
-
Read [`poteto-mode`](../../skills/poteto-mode/SKILL.md) itself for the full routing rules.
|
|
138
|
-
|
|
139
|
-
Next: [Understand the code](./03-understand.md).
|