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,76 +1,67 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: setup-pstack
|
|
3
|
-
description:
|
|
3
|
+
description: Configure which models pstack uses per role and at what reasoning budget. Detects the child model routes this deployment serves and writes `$DSH_HOME/pstack-models.md`, which overrides the skill defaults. Use for /setup-pstack, "configure pstack models", "pstack budget", or changing pstack's model choices.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Setup pstack
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
> DSH port of pstack. `pstack_subagent` replaces Cursor's Task tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
|
|
9
|
+
|
|
10
|
+
Write `$DSH_HOME/pstack-models.md`, the role file `pstack_subagent` re-reads on every delegation and that sets pstack's model per role.
|
|
11
|
+
|
|
12
|
+
That file is the only thing this skill writes. It never touches `package.json`, `cordis.patch.yml`, a native default model, or a credential.
|
|
9
13
|
|
|
10
14
|
## Steps
|
|
11
15
|
|
|
12
|
-
### 1. Detect available
|
|
16
|
+
### 1. Detect available models
|
|
13
17
|
|
|
14
|
-
Call `list_subagent_models` with no arguments to list
|
|
18
|
+
Call `list_subagent_models()` with no arguments to list the LLM providers this deployment serves. Call `list_subagent_models({ provider })` to list that provider's models, then `list_subagent_models({ provider, model })` to list the reasoning efforts that exact model supports.
|
|
15
19
|
|
|
16
|
-
|
|
20
|
+
That adapter metadata is the only dependable source. This deployment decides which routes exist, and only the model's own advertised effort list says whether `max`, `xhigh`, `high`, or `medium` is available. Do not infer an effort ladder from a model id.
|
|
21
|
+
|
|
22
|
+
When `list_subagent_models` is not available in this session, do not invent a route. Either ask the user for a `provider/model` pair they have already confirmed, or write `inherit-parent` for every role and say plainly that the choices are unverified. Never hardcode a model id, never ask for an API key, and never claim a route works because it looks plausible. `inherit-parent` and `auto` always work because they send no route at all.
|
|
17
23
|
|
|
18
24
|
### 2. Load current state
|
|
19
25
|
|
|
20
|
-
|
|
26
|
+
The role list and the shape of a value come from this package's `../../docs/pstack-models.example.md`. Read that file. It is generated from the role manifest, so it is the list: do not re-derive role names from memory and never add a role the manifest does not name.
|
|
27
|
+
|
|
28
|
+
If `$DSH_HOME/pstack-models.md` already exists, read it and treat its `# budget` line and its role values as the current choices, and keep every role the user changed by hand. Otherwise start from the example's `inherit-parent` values. A line whose role is not in the example, such as `how critics`, is from a retired role: list it for the user as retired, then drop it.
|
|
21
29
|
|
|
22
30
|
### 3. Budget, map, and confirm
|
|
23
31
|
|
|
24
|
-
**(a) Ask for a budget.**
|
|
32
|
+
**(a) Ask for a budget.** Prefer `ask_user_question` over free text. Offer these four options with these exact labels, and name the current budget when the file records one. With no file, say that no budget is recorded yet and that every role currently inherits the parent route.
|
|
25
33
|
|
|
26
34
|
- `unlimited — max reasoning`
|
|
27
35
|
- `large — xhigh reasoning`
|
|
28
36
|
- `medium — high reasoning`
|
|
29
37
|
- `small — medium reasoning`
|
|
30
38
|
|
|
31
|
-
**(b) Apply it.**
|
|
39
|
+
**(b) Apply it.** Keep the route of every role the user set by family, list, or alias (`inherit-parent`, `auto`). Only the effort of a role that already names a route follows the budget. `unlimited`, `large`, `medium`, and `small` target `max`, `xhigh`, `high`, and `medium`.
|
|
32
40
|
|
|
33
|
-
|
|
41
|
+
Apply a target only when that model's own `list_subagent_models({ provider, model })` list contains it. When it does not, use the highest effort at or below the target that the model does advertise, and say which role moved. When nothing at or below the target is advertised, mark the role as needing a choice instead of writing an effort the adapter would reject. `inherit-parent` and `auto` never change, because they carry no effort.
|
|
42
|
+
|
|
43
|
+
**(c) Show the roles and confirm.** Show every role with its route, marking any route that does not resolve on this deployment as needing a choice. Also list each line step 2 dropped as retired. Ask whether to accept as-is or change specific roles, offering the confirmed routes plus `inherit-parent` and `auto`, which both mean this role runs on the parent chat model. Prefer `ask_user_question` over free text.
|
|
44
|
+
|
|
45
|
+
For the panel roles (`arena runners`, `architect runners`, `interrogate reviewers`) the value is a list, and `pstack_subagent` starts one child per entry, alias entries included, so the list length sets the count. `arena cross-judge pool` is also a list, but `pstack_subagent` starts one child from it, chosen with `roleIndex`. `swarm workers` is a list as well: its first entry is the default route for every worker, a race passes `roleIndex` to give different arms different entries, and the caller still starts each worker itself. Two entries on the same route are not a cross-model panel; say so instead of implying model diversity.
|
|
34
46
|
|
|
35
47
|
### 4. Validate
|
|
36
48
|
|
|
37
|
-
Every
|
|
49
|
+
Every route written must be one this deployment serves, and every effort must appear in that exact model's advertised list. `inherit-parent` and `auto` always pass. If a chosen route does not resolve, stop and ask again rather than writing it and hoping the first delegation catches it. Remember that the effort you write is the level that role *starts* at: a caller may raise or lower it per delegation with `reasoningEffort`, and a running child may change its own, so a role line that names a modest level is not a mistake to correct.
|
|
38
50
|
|
|
39
51
|
### 5. Write the file
|
|
40
52
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
# pstack model configuration. One line per role. Delete a line to inherit the parent route.
|
|
45
|
-
# Value: inherit-parent | <provider>/<model> [effort]
|
|
46
|
-
# budget: large (xhigh)
|
|
47
|
-
feature, refactoring: inherit-parent
|
|
48
|
-
bug-fix: inherit-parent
|
|
49
|
-
perf-issue: inherit-parent
|
|
50
|
-
hillclimb: inherit-parent
|
|
51
|
-
judgment and prose: inherit-parent
|
|
52
|
-
hardest tasks: inherit-parent
|
|
53
|
-
how explorer: inherit-parent
|
|
54
|
-
how explainer: inherit-parent
|
|
55
|
-
why investigators: inherit-parent
|
|
56
|
-
why synthesizer: inherit-parent
|
|
57
|
-
reflect tooling: inherit-parent
|
|
58
|
-
reflect judgment, divergent, synthesizer: inherit-parent
|
|
59
|
-
arena runners: inherit-parent, inherit-parent
|
|
60
|
-
arena cross-judge pool: inherit-parent, inherit-parent
|
|
61
|
-
swarm workers: inherit-parent
|
|
62
|
-
architect runners: inherit-parent, inherit-parent
|
|
63
|
-
interrogate reviewers: inherit-parent, inherit-parent
|
|
64
|
-
```
|
|
53
|
+
Read the old `$DSH_HOME/pstack-models.md` first, keep the user's own edits, name the retired roles you dropped, and confirm before overwriting. Then write the complete file in one pass, so a re-run of this skill produces the same bytes and converges: a `# budget` line naming the chosen label and its target effort, and one line per role, using the exact role keys from the example.
|
|
54
|
+
|
|
55
|
+
Read `../../docs/pstack-models.example.md` from this package and write the same shape to `$DSH_HOME/pstack-models.md`, replacing each `inherit-parent` with the route the user confirmed. Do not retype the role keys from this skill: the example is generated from the role manifest, and a hand-written copy would drift from the parser.
|
|
65
56
|
|
|
66
57
|
### 6. Confirm
|
|
67
58
|
|
|
68
|
-
Tell the user the file was written and that it applies to
|
|
59
|
+
Tell the user the file was written and that it applies to the next delegation, because `pstack_subagent` re-reads it every time. A child that already started keeps the route it started with. Re-running this skill updates the file.
|
|
69
60
|
|
|
70
61
|
### 7. Offer a verification skill (optional)
|
|
71
62
|
|
|
72
|
-
Check whether the project has a way to drive the real app for proof (a `verify-*` skill, or an existing harness). If not, offer once: "want a project-local verification skill, so agents can drive the app the way a user does and prove changes work? I can generate one with /create-verification-skill." On yes, invoke `/create-verification-skill
|
|
63
|
+
Check whether the project has a way to drive the real app for proof (a `verify-*` skill, or an existing harness). If not, offer once: "want a project-local verification skill, so agents can drive the app the way a user does and prove changes work? I can generate one with /create-verification-skill." On yes, invoke `/create-verification-skill` (its `SKILL.md` is in this package's skill resources). On no, move on without pushing.
|
|
73
64
|
|
|
74
65
|
### 8. Offer a formal verification skill (optional)
|
|
75
66
|
|
|
76
|
-
Check whether the project already has a formal verification skill. If not, offer once: "want a formal verification skill, so agents can prove a key property of your code holds in every case in scope, not only the cases tests reach? I can generate one with /create-formal-verification-skill." On yes, invoke `/create-formal-verification-skill
|
|
67
|
+
Check whether the project already has a formal verification skill (a project skill that runs a model checker, a proof, or another verifier against the code). If not, offer once: "want a formal verification skill, so agents can prove a key property of your code holds in every case in scope, not only the cases tests reach? I can generate one with /create-formal-verification-skill." On yes, invoke `/create-formal-verification-skill` (its `SKILL.md` is in this package's skill resources). On no, move on without pushing.
|
|
@@ -4,8 +4,6 @@ description: Make a task deeper, not bigger, then rewrite the prompt. Use for /s
|
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
> DSH port of pstack. `pstack_subagent` replaces Cursor's `Task` tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
|
|
8
|
-
|
|
9
7
|
I want a deeper version of this task, not a bigger one. Before rewriting it, do four things:
|
|
10
8
|
|
|
11
9
|
1. Say what a top professional in this field would do here that I'm not asking for.
|
|
@@ -4,10 +4,10 @@ description: "Keep a reviewable decision trail for long-running or unattended wo
|
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
> DSH port of pstack. `pstack_subagent` replaces Cursor's `Task` tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
|
|
8
|
-
|
|
9
7
|
# Show me your work
|
|
10
8
|
|
|
9
|
+
> DSH port of pstack. `pstack_subagent` replaces Cursor's Task tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
|
|
10
|
+
|
|
11
11
|
Keep one canonical log.
|
|
12
12
|
|
|
13
13
|
## The format
|
|
@@ -35,13 +35,13 @@ ts phase decision why evidence result
|
|
|
35
35
|
|
|
36
36
|
## Logging a row
|
|
37
37
|
|
|
38
|
-
Write each entry the way you'd tell a teammate what you did. Plain words, concrete actions, no AI speak or abstract jargon (
|
|
38
|
+
Write each entry the way you'd tell a teammate what you did. Plain words, concrete actions, no AI speak or abstract jargon (apply `unslop` to log text too; read its `SKILL.md` at its absolute resource path).
|
|
39
39
|
|
|
40
|
-
Use the helper `scripts/log.
|
|
40
|
+
Use the helper `scripts/log.mjs <logfile> <phase> <decision> <why> <evidence> <result>`; run it through `pstack_script` with `id: "log"`, which needs no `node` on PATH. It stamps `ts`, writes the header on first use, strips stray tabs/newlines, and prefixes any cell starting with `=`, `+`, `-`, or `@` with a single quote. A bare `printf` appending a row works too, but mind those same bytes if cells come from generated or user-supplied text.
|
|
41
41
|
|
|
42
42
|
Log decision points and checkpoints, not every action: a fork chosen, a unit completed with its verification result, a pivot or revert with its trigger, a blocker surfaced, a gate fixed. For loop runs, one row per iteration. Skip the trivial and self-evident.
|
|
43
43
|
|
|
44
|
-
A run is one agent conversation, including its later turns and any summary of it. A pickup, a replacement agent, or a new chat starts a new run. When a run adds to a log that already has rows, its first row has phase `start`, and so does its first row after another run's `start` row. So a run that comes back to a log in a later turn first reads the log's last rows to see whether another run wrote since. A `start` row names the `ts` range of the rows before it that this run did not write, and its evidence names this run, such as its
|
|
44
|
+
A run is one agent conversation, including its later turns and any summary of it. A pickup, a replacement agent, or a new chat starts a new run. When a run adds to a log that already has rows, its first row has phase `start`, and so does its first row after another run's `start` row. So a run that comes back to a log in a later turn first reads the log's last rows to see whether another run wrote since. A `start` row names the `ts` range of the rows before it that this run did not write, and its evidence names this run, such as its session id. Use phase `start` for nothing else.
|
|
45
45
|
|
|
46
46
|
## Where it lives
|
|
47
47
|
|
|
@@ -52,11 +52,11 @@ Commit it only when the work is ambitious enough that a reviewer needs the trail
|
|
|
52
52
|
## Rules
|
|
53
53
|
|
|
54
54
|
- Append-only. A wrong call gets a new row that supersedes it. Never edit or delete history.
|
|
55
|
-
- Prefer evidence produced by committed scripts over hand-made one-offs
|
|
55
|
+
- Prefer evidence produced by committed scripts over hand-made one-offs, per `principle-encode-lessons-in-structure`; read its `SKILL.md` at its absolute resource path.
|
|
56
56
|
|
|
57
|
-
## Audit the log against the
|
|
57
|
+
## Audit the log against the run's events
|
|
58
58
|
|
|
59
|
-
At the end of the run, before handing back, check the log told the truth. Read this run's
|
|
59
|
+
At the end of the run, before handing back, check the log told the truth. Read this run's raw events through `pstack_history` (`scope: "current"`), paging with `fromSeq` and `nextFromSeq` and pinning `throughSeq` so later turns cannot join the basis. Don't read the session store directory or glob across workspaces: that reads unrelated private sessions. If the read is `denied` or `unavailable`, say which layer failed and mark this audit unfinished rather than certifying the log. Walk this run's rows against what actually happened. Each stretch of them begins at one of this run's `start` rows, or at the first row if this run created the log, and ends at the next `start` row of another run:
|
|
60
60
|
|
|
61
61
|
- Check that every row maps to a real decision or action.
|
|
62
62
|
- Check that each row's evidence resolves and shows what the row claims.
|
|
@@ -66,7 +66,7 @@ Correct the log, not the story. The audit never edits or removes a row, even an
|
|
|
66
66
|
|
|
67
67
|
## Cross-model review of the trail
|
|
68
68
|
|
|
69
|
-
Before handing back,
|
|
69
|
+
Before handing back, start a `pstack_subagent` on a role configured to a different provider or model family from the one that did the work. Self-review is not a substitute. Brief it with the audit trail and the raw events you paged, because it cannot read this run's log on its own. It flags what the user should pay attention to: not a redo of the work, a scan for what's suboptimal or risky. When no other family is configured, write `reviewed by <the route that actually ran>` and state that this was same-model review instead of claiming independence. Pick that subagent's role per the Subagents section of `poteto-mode`; read its `SKILL.md` at its absolute resource path. Start from the level the role line names, raise it for hard work and lower it for routine work by passing `reasoningEffort`; a child that cannot call `set_reasoning_effort` keeps the level you gave it.
|
|
70
70
|
|
|
71
71
|
- Decisions logged with weak or absent evidence.
|
|
72
72
|
- Verification steps skipped or claimed without proof in the transcript.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { appendFileSync, existsSync, mkdirSync, statSync } from "node:fs";
|
|
3
|
+
import { dirname, resolve } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
//#region .runtime-sources/skills/poteto-mode/scripts/log.ts
|
|
6
|
+
/**
|
|
7
|
+
* Append one well-formed row to a show-me-your-work decision log (TSV).
|
|
8
|
+
*
|
|
9
|
+
* A Node replacement for the upstream `scripts/log.sh`. The observable rules are
|
|
10
|
+
* the shell script's, because `skills/show-me-your-work/SKILL.md` tells the model
|
|
11
|
+
* to read this file in a spreadsheet:
|
|
12
|
+
*
|
|
13
|
+
* - The header is written once, and only when the file is missing or empty.
|
|
14
|
+
* - Rows are appended, never rewritten. A network mount can make the emptiness
|
|
15
|
+
* test lie for a file that exists, and the cost is one stray header line, not
|
|
16
|
+
* the rows.
|
|
17
|
+
* - Tabs, CRs, and LFs inside a cell become spaces, so a cell always stays on one
|
|
18
|
+
* line and a row always has exactly six columns.
|
|
19
|
+
* - A cell starting with `=`, `+`, `-`, or `@` gets one leading quote. Evidence
|
|
20
|
+
* is attacker-controlled (PR titles, filenames, generated text), and a
|
|
21
|
+
* spreadsheet parses those four characters as a formula.
|
|
22
|
+
* - The row ends with a newline.
|
|
23
|
+
*
|
|
24
|
+
* No shell, no `date` process, and no `tr`/`printf` semantics to reproduce.
|
|
25
|
+
*/
|
|
26
|
+
/** The exact header line, including its trailing newline. */
|
|
27
|
+
const HEADER = "ts phase decision why evidence result\n";
|
|
28
|
+
/**
|
|
29
|
+
* Usage text.
|
|
30
|
+
*
|
|
31
|
+
* The shell script printed `log.sh` here because that was its own name. The
|
|
32
|
+
* shipped file is `log.mjs`, and an error that tells the reader to run a script
|
|
33
|
+
* this package no longer contains is worse than one that names the real path. The
|
|
34
|
+
* exit code and the stream are unchanged.
|
|
35
|
+
*/
|
|
36
|
+
const USAGE = "usage: log.mjs <logfile> <phase> <decision> <why> <evidence> <result>\n";
|
|
37
|
+
/** Formula-leading characters a spreadsheet would evaluate. */
|
|
38
|
+
const FORMULA_PREFIXES = [
|
|
39
|
+
"=",
|
|
40
|
+
"+",
|
|
41
|
+
"-",
|
|
42
|
+
"@"
|
|
43
|
+
];
|
|
44
|
+
/**
|
|
45
|
+
* One cell as the spreadsheet sees it.
|
|
46
|
+
*
|
|
47
|
+
* Exported because the skill's own contract is worth a unit test: the rules are
|
|
48
|
+
* about what lands in a cell, not about how a row is assembled.
|
|
49
|
+
*/
|
|
50
|
+
function cleanCell(value) {
|
|
51
|
+
const flat = value.replaceAll(/[\t\n\r]/g, " ");
|
|
52
|
+
return FORMULA_PREFIXES.some((prefix) => flat.startsWith(prefix)) ? `'${flat}` : flat;
|
|
53
|
+
}
|
|
54
|
+
/** `YYYY-MM-DDTHH:MM:SSZ`, the format `date -u +%Y-%m-%dT%H:%M:%SZ` prints. */
|
|
55
|
+
function timestamp(now = /* @__PURE__ */ new Date()) {
|
|
56
|
+
return now.toISOString().replace(/\.\d{3}Z$/, "Z");
|
|
57
|
+
}
|
|
58
|
+
/** Read whether a file is missing or empty, treating any read failure as empty. */
|
|
59
|
+
function isEmptyOrMissing(logfile) {
|
|
60
|
+
if (!existsSync(logfile)) return true;
|
|
61
|
+
try {
|
|
62
|
+
return statSync(logfile).size === 0;
|
|
63
|
+
} catch {
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Append one row.
|
|
69
|
+
*
|
|
70
|
+
* @param logfile - target TSV; its parent directories are created as needed.
|
|
71
|
+
* @param cells - exactly five cell values: phase, decision, why, evidence, result.
|
|
72
|
+
* @param now - injectable clock, so the timestamp format is testable.
|
|
73
|
+
* @returns the row written, without re-reading the file.
|
|
74
|
+
* @throws {TypeError} when `cells` does not hold exactly five values.
|
|
75
|
+
*/
|
|
76
|
+
function appendDecisionRow(logfile, cells, now = /* @__PURE__ */ new Date()) {
|
|
77
|
+
if (cells.length !== 5) throw new TypeError(`expected 5 cells after the logfile, received ${cells.length}`);
|
|
78
|
+
const absolute = resolve(logfile);
|
|
79
|
+
const directory = dirname(absolute);
|
|
80
|
+
if (directory !== "" && !existsSync(directory)) mkdirSync(directory, { recursive: true });
|
|
81
|
+
if (isEmptyOrMissing(absolute)) appendFileSync(absolute, HEADER);
|
|
82
|
+
const row = `${[timestamp(now), ...cells.map(cleanCell)].join(" ")}\n`;
|
|
83
|
+
appendFileSync(absolute, row);
|
|
84
|
+
return row;
|
|
85
|
+
}
|
|
86
|
+
/** Run the CLI. Returns the process exit code. */
|
|
87
|
+
function main(argv, io = {
|
|
88
|
+
stdout: (value) => process.stdout.write(value),
|
|
89
|
+
stderr: (value) => process.stderr.write(value)
|
|
90
|
+
}) {
|
|
91
|
+
if (argv.length !== 6) {
|
|
92
|
+
io.stderr(USAGE);
|
|
93
|
+
return 1;
|
|
94
|
+
}
|
|
95
|
+
const [logfile, ...cells] = argv;
|
|
96
|
+
try {
|
|
97
|
+
appendDecisionRow(logfile, cells);
|
|
98
|
+
return 0;
|
|
99
|
+
} catch (error) {
|
|
100
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
101
|
+
io.stderr(`log.mjs: ${message}\n`);
|
|
102
|
+
return 1;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
const entryPoint = process.argv[1];
|
|
106
|
+
if (entryPoint !== void 0 && resolve(entryPoint) === fileURLToPath(import.meta.url)) process.exitCode = main(process.argv.slice(2));
|
|
107
|
+
//#endregion
|
|
108
|
+
export { HEADER, USAGE, appendDecisionRow, cleanCell, main, timestamp };
|
|
@@ -4,13 +4,13 @@ description: Fan out N parallel workers, drain them, and return one report. Use
|
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
> DSH port of pstack. `pstack_subagent` replaces Cursor's `Task` tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
|
|
8
|
-
|
|
9
7
|
# Swarm
|
|
10
8
|
|
|
9
|
+
> DSH port of pstack. `pstack_subagent` replaces Cursor's Task tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
|
|
10
|
+
|
|
11
11
|
## Start
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Open a `todo_write` list with one entry per phase before launching anything.
|
|
14
14
|
|
|
15
15
|
1. Frame
|
|
16
16
|
2. Fan out
|
|
@@ -21,12 +21,14 @@ Call `todo_write` with one entry per phase before launching anything.
|
|
|
21
21
|
|
|
22
22
|
1. State the done predicate and the artifact or report the swarm must return.
|
|
23
23
|
2. Choose the shape. Partition into slices, race N workers on identical briefs, or mix both. For a race or mixed shape, declare `first pass`, `rank all`, or `best-of` before spawning.
|
|
24
|
-
4.
|
|
25
|
-
5. Give each worker its own writable output when it writes. When workers verify or measure commits, each brief names the exact SHAs. A measurement brief also names the method (sample count, what one sample is, order). The worker records both in its result.
|
|
24
|
+
4. Pick the worker route. Use `role: "swarm workers"` for every worker: that role is a list, not a panel, so you start each worker yourself with one `pstack_subagent` call each. A role the file does not name inherits the parent route. Never invent a model id. Without `roleIndex` the tool takes the first entry, which is the default route for every worker. For a model race, keep `role: "swarm workers"` and pass a different `roleIndex` per arm, so this call's result carries that arm's actual route instead of leaving it implied. The tool reports the entry and route this call selected; it cannot compare separate calls, so when two arms land on the same entry you must say in your synthesis that they share one route and that this is not a cross-model race. Read the Subagents section of the `poteto-mode` skill at its absolute resource path first. Start from the level the role line names, raise it for hard work and lower it for routine work by passing `reasoningEffort`; a child that cannot call `set_reasoning_effort` keeps the level you gave it.
|
|
25
|
+
5. Give each worker its own writable output when it writes: the worker calls `create_worktree({ name })` in its own Session, or you create the checkouts one at a time and pass each absolute `path` as that worker's `cwd`. Two workers in one checkout are not isolated, and the parallel writes will collide on shared files. When workers verify or measure commits, each brief names the exact SHAs. A measurement brief also names the method (sample count, what one sample is, order). The worker records both in its result.
|
|
26
26
|
|
|
27
27
|
## Phase B: Fan out
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Start all N workers in one batch of `pstack_subagent` calls with `agent: "general"` and the step 4 role. A worker is a managed activation, so there is no background flag and nothing polls: each result arrives as a completion notice. Every worker runs locally as a child of this Session; there is no cloud environment, no VM, and no per-arm machine.
|
|
30
|
+
|
|
31
|
+
When a worker must start from a branch other than the current one, make that branch reachable locally and start the checkout from it: the worker calls `create_worktree({ name, from })` with a local revision, or you create the checkout yourself and pass its absolute `path` as the worker's `cwd`. Creation does not fetch, so a branch that only exists on a remote has to be fetched first; a missing local revision fails instead of silently branching off the current commit.
|
|
30
32
|
|
|
31
33
|
Every brief stands alone. Include the goal, scope, exact slice or race arm, how to verify, and what to report. Reports use `PASS`, `ISSUES`, or `BLOCKED` with evidence. A worker that can prove a defect reports `ISSUES` and lists every issue it can prove, not only the first.
|
|
32
34
|
|
|
@@ -4,8 +4,6 @@ description: Use only when the user explicitly asks for TDD, a failing test, or
|
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
> DSH port of pstack. `pstack_subagent` replaces Cursor's `Task` tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
|
|
8
|
-
|
|
9
7
|
# TDD Bug Fix
|
|
10
8
|
|
|
11
9
|
When fixing a bug with a clear, cheap test path, make the broken behavior executable before changing production code. The goal is a focused regression test that fails before the fix and passes after it.
|
|
@@ -4,10 +4,10 @@ description: Explain a body of work plainly so a person actually understands it.
|
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
> DSH port of pstack. `pstack_subagent` replaces Cursor's `Task` tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
|
|
8
|
-
|
|
9
7
|
# Teach
|
|
10
8
|
|
|
9
|
+
> DSH port of pstack. `pstack_subagent` replaces Cursor's Task tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
|
|
10
|
+
|
|
11
11
|
**You explain what a thing is, how it works, and why it's built that way, in one plain account at the person's pace. The goal is that they understand it, not that you change anything.**
|
|
12
12
|
|
|
13
13
|
Teach sits on top of `how` and `why`. Get your bearings on what the work is and what it touches, then run `how` for how it works and `why` for why it's that way. Those are real skill invocations that do their own digging. Blend what they find into one plain explanation, lead with what matters to the person, and go deeper when they ask. Reword freely for teaching, with one exception. Keep `why`'s confidence language intact (its hedges are findings, not style).
|
|
@@ -4,10 +4,10 @@ description: "Layered technical-writing standard: Diátaxis structure, Google de
|
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
> DSH port of pstack. `pstack_subagent` replaces Cursor's `Task` tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
|
|
8
|
-
|
|
9
7
|
# Technical writing
|
|
10
8
|
|
|
9
|
+
> DSH port of pstack. `pstack_subagent` replaces Cursor's Task tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
|
|
10
|
+
|
|
11
11
|
Write so a tired engineer understands on the first read. Apply all four layers.
|
|
12
12
|
|
|
13
13
|
Three rules sit above the layers:
|
|
@@ -4,11 +4,11 @@ description: TypeScript best practices. Use when reading or editing any .ts or .
|
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
> DSH port of pstack. `pstack_subagent` replaces Cursor's `Task` tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
|
|
8
|
-
|
|
9
7
|
# TypeScript best practices
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
> DSH port of pstack. `pstack_subagent` replaces Cursor's Task tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
|
|
10
|
+
|
|
11
|
+
Apply `principle-type-system-discipline` first; read its `SKILL.md` at its absolute resource path.
|
|
12
12
|
|
|
13
13
|
| Rule | Summary |
|
|
14
14
|
|------|---------|
|
|
@@ -23,10 +23,12 @@ Apply the **type-system-discipline** principle skill first.
|
|
|
23
23
|
| Type guards | Must verify the claim. A lying guard is worse than `as` because the bug hides behind a name that says it's safe. Name them `isX` or `hasX`. |
|
|
24
24
|
| Exhaustiveness | Inline `const _exhaustive: never = x;` in default arms so the compiler errors when a new variant is added. |
|
|
25
25
|
| `satisfies` over `as` | Validates the value without widening literal types. |
|
|
26
|
-
| Boundary validation | Parse where data crosses in, into a named domain type. `Record<string, unknown>` (however spelled) stops at that parse. Trust types inside. See
|
|
26
|
+
| Boundary validation | Parse where data crosses in, into a named domain type. `Record<string, unknown>` (however spelled) stops at that parse. Trust types inside. See `principle-boundary-discipline`; read its `SKILL.md` at its absolute resource path. |
|
|
27
27
|
| Schema-derived types | Reach for `Pick`/`Omit`/`Parameters`/`ReturnType`/`Awaited`/`typeof` before declaring a new interface. |
|
|
28
28
|
| Object args | Pass objects, not positional, so argument order is self-documenting. Skip on hot paths (per-frame render, tokenizers, parsers). |
|
|
29
29
|
| Real tests | Don't mock what you can run. Prefer the framework's real test primitives with leak/disposable checks, and verify UI in a running build. Mock only what you can't run locally. |
|
|
30
30
|
| Structured telemetry | Prefer structured logger diagnostics with enough context to debug from an id. No `console.log` in shipped code. |
|
|
31
31
|
|
|
32
32
|
Examples: `references/patterns.md`.
|
|
33
|
+
|
|
34
|
+
This skill is explicit-invocation only. DSH does not consume a `paths` glob, so opening a `.ts` or `.tsx` file does not attach it: load it by name when you want it applied.
|
|
@@ -4,8 +4,6 @@ description: Cut AI tells from any writing.
|
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
> DSH port of pstack. `pstack_subagent` replaces Cursor's `Task` tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
|
|
8
|
-
|
|
9
7
|
# Unslop
|
|
10
8
|
|
|
11
9
|
Edit text to remove AI patterns. Scan for the patterns below, then rewrite. Preserve meaning and match the intended tone.
|
|
@@ -4,15 +4,15 @@ description: Use for 'why does X work this way', 'why we picked Y', design ratio
|
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
> DSH port of pstack. `pstack_subagent` replaces Cursor's `Task` tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
|
|
8
|
-
|
|
9
7
|
# Why
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
> DSH port of pstack. `pstack_subagent` replaces Cursor's Task tool, and `role` replaces Cursor model slugs. Full mapping: `../../docs/harness/dsh.md`.
|
|
10
|
+
|
|
11
|
+
Investigate the motivation and intent behind code. The companion `how` skill answers what the code does and how it works; read its `SKILL.md` at its absolute resource path when you need it. `why` answers what forces led to its shape.
|
|
12
12
|
|
|
13
|
-
Each spawn below names a
|
|
13
|
+
Each spawn below names a role key. `pstack_subagent` reads the route from `$DSH_HOME/pstack-models.md` on every delegation, and a role the file does not name inherits the parent route. Never invent a model id: this package cannot know which routes a deployment serves. An effort is different, because the target model advertises its own list and `pstack_subagent` checks your value against it and names the real values when it refuses, so predict no ladder beyond that. Read the Subagents section of the `poteto-mode` skill at its absolute resource path before you spawn anything. Start from the level the role line names, raise it for hard work and lower it for routine work by passing `reasoningEffort`; a child that cannot call `set_reasoning_effort` keeps the level you gave it.
|
|
14
14
|
|
|
15
|
-
Every spawn is
|
|
15
|
+
Every spawn is `agent: "general"` with a brief that forbids writes. **Do not swap in a narrower preset or tool set.** A narrower set can drop MCP tools, which disables the MCP-backed investigators and the synthesizer's citation spot-checks. Investigators still must not write anything, and each brief says so; that rule is an instruction, not a sandbox, so check `git status` before believing a report.
|
|
16
16
|
|
|
17
17
|
## Operating Posture
|
|
18
18
|
|
|
@@ -22,7 +22,7 @@ Operate as a **careful, cautious, and precise investigator**. Be honest about wh
|
|
|
22
22
|
|
|
23
23
|
The **target** is usually a chunk of code, a pattern, a feature, or a named design decision. The **question** is usually a design rationale, a tradeoff, a motivating edge case, an external constraint, dead code, or a broad history sweep.
|
|
24
24
|
|
|
25
|
-
If the target is vague ("why do we do it this way?" with no clear referent), make your best guess from conversation context (open files, recent edits,
|
|
25
|
+
If the target is vague ("why do we do it this way?" with no clear referent), make your best guess from conversation context (open files, recent edits, cursor location, what was just discussed). State your interpretation briefly so the user can redirect if you're off, then proceed.
|
|
26
26
|
|
|
27
27
|
## Step 2. Establish the Code Anchor
|
|
28
28
|
|
|
@@ -34,7 +34,7 @@ Before spawning investigators, build the seed context inline: file paths and lin
|
|
|
34
34
|
|
|
35
35
|
### Discovery
|
|
36
36
|
|
|
37
|
-
Before spawning investigators, list the MCP
|
|
37
|
+
Before spawning investigators, list the tools this Session actually has, and treat an MCP as available only when its own tools appear in that list. The DSH harness exposes no MCP directory to inspect, and this port does not read one: an MCP that is absent from the tool list is a recorded gap, never a guess.
|
|
38
38
|
|
|
39
39
|
Map each available MCP to one evidence category:
|
|
40
40
|
|
|
@@ -48,7 +48,7 @@ Map each available MCP to one evidence category:
|
|
|
48
48
|
|
|
49
49
|
Source control is always available through git and `gh`. For the other six, classify using the MCP name, server instructions, tool names, and resource descriptors. If an MCP could fit more than one category, choose the one matching its primary evidence. Record ambiguous cases in the coverage map.
|
|
50
50
|
|
|
51
|
-
Spawn one investigator per category that has a matching MCP, all in
|
|
51
|
+
Spawn one investigator per category that has a matching MCP, all in one batch of `pstack_subagent` calls so they start together, each owning exactly one tool or MCP. Don't ask one agent to cover multiple MCPs. Use `role: "why investigators"`. Each call returns a child id and the reports arrive as completion notices, so nothing polls and the synthesizer waits for every investigator that was started.
|
|
52
52
|
|
|
53
53
|
Each investigator's prompt is `references/investigator-prompt.md` filled in, plus:
|
|
54
54
|
- the category playbook `references/sources/<source>.md` for the selected MCP, adapted from the examples in `references/source-playbook.md`
|
|
@@ -78,7 +78,7 @@ If your scope assessment suggests a single-commit trivial target where the PR de
|
|
|
78
78
|
|
|
79
79
|
## Step 4. Synthesize
|
|
80
80
|
|
|
81
|
-
Spawn one synthesizer
|
|
81
|
+
Spawn one synthesizer with `role: "why synthesizer"`. It gets:
|
|
82
82
|
1. The investigator findings, including any null results and any categories skipped with justification
|
|
83
83
|
2. The code anchor
|
|
84
84
|
3. The user's original question
|
package/cordis.patch.yml
CHANGED
|
@@ -1,20 +1,39 @@
|
|
|
1
1
|
# dsh-pstack bundle patch.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
# for Cursor's `Task` tool. It resolves pstack role lines from
|
|
9
|
-
# `~/.dsh/pstack-models.md` and delegates through `ctx.subagents`.
|
|
3
|
+
# `pstack` registers the bundled skill provider. `pstack-subagent` registers
|
|
4
|
+
# `pstack_subagent`, which starts one child per activation and re-reads the role
|
|
5
|
+
# file on every delegation. `pstack-history` registers `pstack_history`, the
|
|
6
|
+
# restricted read-only history tool; it reads raw events through `sessionQuery`
|
|
7
|
+
# and authorizes the caller and its direct children only.
|
|
10
8
|
#
|
|
11
|
-
# The
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
9
|
+
# The two worktree rows carry the README promise that worktree support ships as a
|
|
10
|
+
# necessary dependency: the bundle turns the official integration on when the
|
|
11
|
+
# profile does not have it, and mounts nothing when it does. `disabled: !!js` is
|
|
12
|
+
# evaluated by the Loader at every mount decision, and each expression reads the
|
|
13
|
+
# composed row list rather than a startup snapshot. The row handle is
|
|
14
|
+
# `ctx[Symbol.for('cordis.entry')]` (this entry), not `ctx.fiber.entry`, which
|
|
15
|
+
# resolves to the enclosing `include` row and therefore never sees these siblings.
|
|
16
|
+
# `scripts/worktree-mount.ts` owns the text of both expressions and `check:assets`
|
|
17
|
+
# fails when this file drifts from it. See
|
|
18
|
+
# docs/decisions/2026-10-26-worktree-guard-reads-own-entry.md.
|
|
19
|
+
#
|
|
20
|
+
# `pstack-history` is appended after the unit-4 rows so no delivered line moves.
|
|
21
|
+
# Row order is not part of the history contract; the two worktree guards, by
|
|
22
|
+
# contrast, stay adjacent and byte-identical to their generator.
|
|
15
23
|
- insert:
|
|
16
24
|
- id: pstack
|
|
17
|
-
name:
|
|
18
|
-
|
|
25
|
+
name: dsh-pstack
|
|
19
26
|
- id: pstack-subagent
|
|
20
|
-
name:
|
|
27
|
+
name: dsh-pstack/subagent
|
|
28
|
+
config:
|
|
29
|
+
maxDepth: 2
|
|
30
|
+
- id: pstack-worktree
|
|
31
|
+
name: '@deepseek-ai/dsh-experimental-worktree'
|
|
32
|
+
disabled: !!js "(() => { const own = ctx[Symbol.for('cordis.entry')]; const rows = own && own.parent && own.parent.data; if (!Array.isArray(rows)) return false; return rows.some((row) => row !== null && typeof row === 'object' && row.id !== 'pstack-worktree' && row.name === '@deepseek-ai/dsh-experimental-worktree' && row.disabled !== true) })()"
|
|
33
|
+
- id: pstack-tool-worktree
|
|
34
|
+
name: '@deepseek-ai/dsh-experimental-tool-worktree'
|
|
35
|
+
disabled: !!js "(() => { const own = ctx[Symbol.for('cordis.entry')]; const rows = own && own.parent && own.parent.data; if (!Array.isArray(rows)) return false; return rows.some((row) => row !== null && typeof row === 'object' && row.id !== 'pstack-tool-worktree' && row.name === '@deepseek-ai/dsh-experimental-tool-worktree' && row.disabled !== true) })()"
|
|
36
|
+
- id: pstack-history
|
|
37
|
+
name: dsh-pstack/history
|
|
38
|
+
- id: pstack-script
|
|
39
|
+
name: dsh-pstack/script
|