pstack-dsh 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/HARNESS.md +109 -0
- package/LICENSE +25 -0
- package/README.md +168 -0
- package/TEST-PLAN.md +70 -0
- package/agents/comment-sicko.md +32 -0
- package/agents/poteto-agent.md +9 -0
- package/cordis.patch.yml +4 -0
- package/cordis.yml +4 -0
- package/docs/guide/01-setup.md +41 -0
- package/docs/guide/02-poteto-mode.md +98 -0
- package/docs/guide/03-understand.md +53 -0
- package/docs/guide/04-design.md +81 -0
- package/docs/guide/05-build-and-clean.md +75 -0
- package/docs/guide/06-verify-and-ship.md +87 -0
- package/docs/guide/07-overnight.md +81 -0
- package/docs/guide/08-principles.md +71 -0
- package/docs/guide/09-make-it-yours.md +67 -0
- package/docs/guide/10-recipes-and-pitfalls.md +96 -0
- package/docs/guide/README.md +30 -0
- package/dshx.yml +9 -0
- package/lib/client.js +981 -0
- package/lib/client.js.map +1 -0
- package/lib/index.d.ts +34 -0
- package/lib/index.js +1120 -0
- package/package.json +140 -0
- package/skills/architect/SKILL.md +83 -0
- package/skills/architect/references/design-red-flags.md +33 -0
- package/skills/architect/references/rationale-template.md +35 -0
- package/skills/architect/references/runner-prompt.md +20 -0
- package/skills/arena/SKILL.md +73 -0
- package/skills/automate-me/SKILL.md +103 -0
- package/skills/blast-radius/SKILL.md +50 -0
- package/skills/bro/SKILL.md +7 -0
- package/skills/create-verification-skill/SKILL.md +44 -0
- package/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/skills/figure-it-out/SKILL.md +53 -0
- package/skills/how/SKILL.md +45 -0
- package/skills/how/references/explainer-prompt.md +55 -0
- package/skills/how/references/explorer-prompt.md +52 -0
- package/skills/interrogate/SKILL.md +99 -0
- package/skills/interrogate/references/code-quality-review.md +47 -0
- package/skills/interrogate/references/lead-judgment.md +58 -0
- package/skills/interrogate/references/reviewer-prompt.md +72 -0
- package/skills/interrogate/references/rubric.md +77 -0
- package/skills/maintain-verification-skill/SKILL.md +39 -0
- package/skills/no-comments/SKILL.md +24 -0
- package/skills/poteto-mode/SKILL.md +149 -0
- package/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
- package/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/skills/poteto-mode/playbooks/autopilot-full.md +13 -0
- package/skills/poteto-mode/playbooks/autopilot-stack.md +16 -0
- package/skills/poteto-mode/playbooks/babysit.md +27 -0
- package/skills/poteto-mode/playbooks/bug-fix.md +17 -0
- package/skills/poteto-mode/playbooks/eval.md +25 -0
- package/skills/poteto-mode/playbooks/feature.md +21 -0
- package/skills/poteto-mode/playbooks/hillclimb.md +21 -0
- package/skills/poteto-mode/playbooks/investigation.md +14 -0
- package/skills/poteto-mode/playbooks/multi-phase-plan.md +156 -0
- package/skills/poteto-mode/playbooks/opening-a-pr.md +33 -0
- package/skills/poteto-mode/playbooks/orchestrate.md +113 -0
- package/skills/poteto-mode/playbooks/pause-safely.md +10 -0
- package/skills/poteto-mode/playbooks/perf-issue.md +24 -0
- package/skills/poteto-mode/playbooks/prototype.md +14 -0
- package/skills/poteto-mode/playbooks/refactoring.md +16 -0
- package/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/skills/poteto-mode/playbooks/session-pickup.md +11 -0
- package/skills/poteto-mode/playbooks/shipping.md +17 -0
- package/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
- package/skills/poteto-mode/playbooks/visual-parity.md +11 -0
- package/skills/poteto-mode/playbooks/worktree-cleanup.md +14 -0
- package/skills/poteto-mode/references/bugbot-triage.md +142 -0
- package/skills/poteto-mode/scripts/bootstrap.ts +62 -0
- package/skills/poteto-mode/scripts/bun.lock +67 -0
- package/skills/poteto-mode/scripts/check-plan.mjs +186 -0
- package/skills/poteto-mode/scripts/orch/orch.test.ts +634 -0
- package/skills/poteto-mode/scripts/orch/orch.ts +578 -0
- package/skills/poteto-mode/scripts/orch/store.ts +1607 -0
- package/skills/poteto-mode/scripts/package.json +16 -0
- package/skills/poteto-mode/scripts/watch-pr/cli.test.ts +224 -0
- package/skills/poteto-mode/scripts/watch-pr/cli.ts +223 -0
- package/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +118 -0
- package/skills/poteto-mode/scripts/watch-pr/github.test.ts +306 -0
- package/skills/poteto-mode/scripts/watch-pr/github.ts +699 -0
- package/skills/poteto-mode/scripts/watch-pr/policy.test.ts +420 -0
- package/skills/poteto-mode/scripts/watch-pr/policy.ts +832 -0
- package/skills/poteto-mode/scripts/watch-pr/render.ts +169 -0
- package/skills/poteto-mode/scripts/watch-pr/tsconfig.json +13 -0
- package/skills/poteto-mode/scripts/watch-pr/types.compile.ts +93 -0
- package/skills/poteto-mode/scripts/watch-pr/types.ts +401 -0
- package/skills/poteto-mode/scripts/watch-pr/watch-pr +6 -0
- package/skills/poteto-mode/scripts/worktree-audit.sh +86 -0
- package/skills/principle-attack-the-premise/SKILL.md +22 -0
- package/skills/principle-boundary-discipline/SKILL.md +33 -0
- package/skills/principle-build-the-lever/SKILL.md +22 -0
- package/skills/principle-encode-lessons-in-structure/SKILL.md +30 -0
- package/skills/principle-exhaust-the-design-space/SKILL.md +20 -0
- package/skills/principle-experience-first/SKILL.md +18 -0
- package/skills/principle-fix-root-causes/SKILL.md +22 -0
- package/skills/principle-foundational-thinking/SKILL.md +20 -0
- package/skills/principle-guard-the-context-window/SKILL.md +16 -0
- package/skills/principle-laziness-protocol/SKILL.md +17 -0
- package/skills/principle-make-operations-idempotent/SKILL.md +23 -0
- package/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +21 -0
- package/skills/principle-minimize-reader-load/SKILL.md +22 -0
- package/skills/principle-model-the-domain/SKILL.md +25 -0
- package/skills/principle-never-block-on-the-human/SKILL.md +21 -0
- package/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
- package/skills/principle-prove-it-works/SKILL.md +32 -0
- package/skills/principle-redesign-from-first-principles/SKILL.md +15 -0
- package/skills/principle-separate-before-serializing-shared-state/SKILL.md +15 -0
- package/skills/principle-sequence-verifiable-units/SKILL.md +21 -0
- package/skills/principle-subtract-before-you-add/SKILL.md +20 -0
- package/skills/principle-test-behavior-not-implementation/SKILL.md +24 -0
- package/skills/principle-type-system-discipline/SKILL.md +30 -0
- package/skills/recall/SKILL.md +35 -0
- package/skills/reflect/SKILL.md +65 -0
- package/skills/reflect/references/divergent-reviewer.md +43 -0
- package/skills/reflect/references/judgment-reviewer.md +42 -0
- package/skills/reflect/references/synthesizer.md +56 -0
- package/skills/reflect/references/tooling-reviewer.md +55 -0
- package/skills/setup-pstack/SKILL.md +32 -0
- package/skills/setup-pstack/references/catalog.md +28 -0
- package/skills/setup-pstack/references/spawn.md +61 -0
- package/skills/show-me-your-work/SKILL.md +82 -0
- package/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
- package/skills/show-me-your-work/scripts/log.sh +40 -0
- package/skills/swarm/SKILL.md +44 -0
- package/skills/tdd/SKILL.md +44 -0
- package/skills/teach/SKILL.md +21 -0
- package/skills/technical-writing/SKILL.md +127 -0
- package/skills/typescript-best-practices/SKILL.md +30 -0
- package/skills/typescript-best-practices/references/patterns.md +313 -0
- package/skills/unslop/SKILL.md +67 -0
- package/skills/why/SKILL.md +146 -0
- package/skills/why/references/epistemics.md +144 -0
- package/skills/why/references/investigator-prompt.md +103 -0
- package/skills/why/references/source-playbook.md +17 -0
- package/skills/why/references/sources/code-archaeology.md +88 -0
- package/skills/why/references/sources/databricks.md +70 -0
- package/skills/why/references/sources/datadog.md +99 -0
- package/skills/why/references/sources/incident-postmortem.md +15 -0
- package/skills/why/references/sources/linear.md +48 -0
- package/skills/why/references/sources/notion.md +55 -0
- package/skills/why/references/sources/sentry.md +100 -0
- package/skills/why/references/sources/slack.md +54 -0
- package/skills/why/references/synthesizer-prompt.md +135 -0
- package/src/catalog-types.ts +54 -0
- package/src/catalog.ts +308 -0
- package/src/client/PstackSettings.tsx +519 -0
- package/src/client/api.ts +56 -0
- package/src/client/index.tsx +38 -0
- package/src/client/locales.ts +65 -0
- package/src/client/poteto-defaults.ts +37 -0
- package/src/frontmatter.ts +73 -0
- package/src/home.ts +13 -0
- package/src/http-trust.ts +38 -0
- package/src/ids.ts +39 -0
- package/src/index.ts +85 -0
- package/src/overlay-model.ts +139 -0
- package/src/overlay.ts +40 -0
- package/src/persona.ts +38 -0
- package/src/plugin-config.ts +29 -0
- package/src/request-overlay.ts +40 -0
- package/src/roles.ts +55 -0
- package/src/settings-api.ts +48 -0
- package/src/settings-draft.ts +144 -0
- package/src/settings-routes.ts +77 -0
- package/src/skills-provider.ts +96 -0
- package/src/spawn.ts +52 -0
- package/src/tools.ts +226 -0
package/HARNESS.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# DSH harness map
|
|
2
|
+
|
|
3
|
+
This port carries pstack 0.15's 23 playbooks and 23 principles, with DSH call sites and model-invocable principles. See [UPGRADE-0.15.md](./UPGRADE-0.15.md) for the pinned upstream source and excluded runtime changes.
|
|
4
|
+
|
|
5
|
+
Sources: official pstack (`cursor/plugins` `pstack/`) and official DeepSeek Harness (`deepseek-ai/deepseek-harness`). Tool names and fields below are from DSH source, not from Cursor `Task` and not from grok-build `task`.
|
|
6
|
+
|
|
7
|
+
Sister port [pstack-grokbuild](https://github.com/aa2246740/pstack-grokbuild) is process lessons only. Do not copy its call sites.
|
|
8
|
+
|
|
9
|
+
Workbench: [dshx](https://github.com/aa2246740/dsh-external-plugin-devkit) (`dshx kb cat start-here`). Official DSH source outranks dshx. dshx is not a DSH fork and not Creator Mode.
|
|
10
|
+
|
|
11
|
+
## Verdict
|
|
12
|
+
|
|
13
|
+
**Yes. The discipline ports. Cursor and Grok runtimes do not.**
|
|
14
|
+
|
|
15
|
+
Install this repo as a DSH plugin on official DeepSeek Harness **0.1.5-rc.3** (`@deepseek-ai/dsh@0.1.5-rc.3`). `@deepseek-ai/dsh-*` peers are `^0.1.5-rc.3`. Do not write `~/.cursor/rules`. Do not invent Cursor panel slugs. Do not send grok `task` fields. Out of the box, children inherit this conversation's route. Configure roles in **Settings → pstack**. `/setup-pstack` is an optional pointer.
|
|
16
|
+
|
|
17
|
+
Official model-facing `subagent` cannot take a pstack role or a per-call model. This plugin registers `pstack_spawn`, which calls `ctx.subagents.start` / `startContinuable` on the shipped `spawn` provider and applies overlay route plus effort on the `agent/request` waterfall.
|
|
18
|
+
|
|
19
|
+
## Mapping: pstack need → DSH API
|
|
20
|
+
|
|
21
|
+
| pstack need | DSH API | Source |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| Slash skill / poteto-mode | `ctx.skills` provider + `dsh-tool-skill` `skill` tool. User `/name` injection. Frontmatter: kebab-case `name`, `description`, optional `whenToUse`, `disable-model-invocation`, `user-invocable`. `name: Poteto Mode` is invalid; this port uses `poteto-mode`. | `packages/skill/tool-skill/README.md`; `docs/subsystems/skills.md`; `packages/skill/skill-filesystem/README.md`; `packages/skill/skill/src/index.ts` `SKILL_NAME` `/^[a-z0-9]+(?:-[a-z0-9]+)*$/` |
|
|
24
|
+
| Plugin install | npm bundle `dsh.bundle.patch` → `dsh plugin --profile web add github:aa2246740/pstack-dsh` (pnpm, then restart Host and reload) | `docs/user/develop/basic/publish.md` |
|
|
25
|
+
| Settings GUI | Official **`settings.section`** list slot. This plugin registers id `pstack`, order 16, nav from `ctx.locale` (zh/en). Browser `dsh.client` + Host `GET`/`PUT` `/plugins/pstack-dsh/settings` on `ctx.webServer`. Overlay file unchanged. **Hypothesis:** slash skills cannot call `openSection`; that method is onboarding-only on `SettingsRoot`. | `packages/client/ui-settings/src/client/contract/slots.ts` `settings.section`; `packages/client/ui-settings-models/src/client/index.ts`; `packages/client/ui-settings-plugins/src/client/index.ts`; `packages/client/ui-settings-general/src/client/SettingsRoot.tsx` `openSection`; `packages/host/webserver/src/index.ts` `webServer.register`; dsh-oauth-login `src/client/index.tsx` |
|
|
26
|
+
| Spawn child | Model-facing official tool **`subagent`**: only `description`, `prompt`, `run_in_background`. No model, effort, isolation, `subagent_type`. This plugin's **`pstack_spawn`**: those three plus `role` and optional `route_index`. Internally `ctx.subagents.start('spawn', …)` / `startContinuable`. | `docs/tool-catalog.md` `#deepseek-aidsh-tool-subagent`; `packages/subagent/tool-subagent/src/index.ts`; `packages/bundle/base/cordis.patch.yml` `providerName: spawn`, `toolName: subagent`, `backgroundMode: continuable` |
|
|
27
|
+
| Per-child model | `AgentOptions` `{ provider?, model?, maxTokens? }` on `SubagentStartRequest.agentOptions`. Not a model-facing `subagent` field. "Another model requires another named tool instance" unless a plugin sets `agentOptions` at start. Overlay maps a logged-in route onto that object. Omit it to inherit the parent. | `packages/core/agent/src/runtime-types.ts` `AgentOptions`; `packages/subagent/subagent/src/types.ts` `SubagentStartRequest.agentOptions`; `packages/subagent/tool-subagent/README.md` Config `agentOptions` |
|
|
28
|
+
| Per-role reasoning effort | **Not on `subagent`.** `LlmCallConfig.reasoningEffort` via the `agent/request` waterfall. Adapter-owned via `resolveModelInfo().reasoning.efforts`. Empty efforts: omit. Never copy grok `xhigh/high/medium/low` or Cursor `max` unless that exact id is on **this** route. | `packages/llm/llm/src/call-config.ts` `LlmCallConfig`; `packages/llm/llm/src/types.ts` `LlmModelReasoningInfo`; `packages/core/agent/src/runtime-types.ts` `'agent/request'`; `packages/llm/llm/src/index.ts` `resolveModelInfo` rejects invalid effort metadata |
|
|
29
|
+
| Wait | Continuable: settlement notice + `send_message`. One-shot background: `job_output`. Foreground: the tool awaits `run.result`. | tool-subagent README; `docs/tool-catalog.md` jobs / subagent-control |
|
|
30
|
+
| Cancel | Continuable: `interrupt_agent`. Jobs: `job_kill`. | `docs/tool-catalog.md` `#deepseek-aidsh-tool-subagent-control`, `#deepseek-aidsh-tool-jobs` |
|
|
31
|
+
| Isolation / worktree / Cursor cloud | **No field** on `subagent`. Spawn-in-process inherits parent cwd. Drop `environment: "cloud"`. Parent may `git worktree add` and put the path in the prompt. | `packages/subagent/subagent-spawn-in-process/README.md` |
|
|
32
|
+
| Nested spawn | Default `maxDepth` **3** (tool-subagent Config). Playbooks that used nested Cursor Task + worktree still prefer parent-owned fan-out so isolation stays in the prompt. | `packages/subagent/tool-subagent/src/index.ts` `maxDepth` default `3` |
|
|
33
|
+
| Todo | `todo_write({ todos: [{ content, status }] })` wholesale replace. Status: `pending` \| `in_progress` \| `completed`. **No** `id`, `merge`, `cancelled`. | `packages/todo/tool-todo/README.md` |
|
|
34
|
+
| Ask human | `ask_user_question` | `packages/interaction/tool-ask-user/README.md` |
|
|
35
|
+
| Overnight /loop | **No** grok `scheduler_create`. Closest shipped tools: `create_goal` / `update_goal` (`dsh-tool-goal`). If those tools are absent, keep iterating in this chat; do not invent a scheduler. | `docs/tool-catalog.md` `#deepseek-aidsh-tool-goal` |
|
|
36
|
+
| Credentials (presence only) | `ctx.credentials.describe(ref)` → `{ configured }` never the value | `packages/credentials/credentials/README.md` |
|
|
37
|
+
| DSH home | `$DSH_HOME`, else `~/.dsh` | `packages/util/home-paths/README.md` |
|
|
38
|
+
| DeepSeek default key ref | `DEEPSEEK_API_KEY` on provider `deepseek-official` | `packages/llm/llm-deepseek/src/index.ts` `DEFAULT_API_KEY_ENV`, `PROVIDER` |
|
|
39
|
+
| OAuth store (peer, not required) | `$DSH_HOME/.dsh-oauth-auth.json` (legacy `.pi-login-auth.json`). Map store ids → `pi-*` routes from [dsh-oauth-login](https://github.com/aa2246740/dsh-oauth-login). Do not read `~/.pi`, `~/.codex`, `~/.claude`, grok CLI login. | dsh-oauth-login `src/ids.ts`, `src/catalog.ts` |
|
|
40
|
+
| Independent verify | Parent `pstack_spawn` `role: independent-verifier`. Second opinion is a different logged-in route when overlay mapped one; otherwise inherit. The verifier does not write the diff. | this file |
|
|
41
|
+
| `cursor-team-kit` (`deslop`, `control-ui`, `control-cli`) | Not shipped. `/unslop` and `/no-comments` remain. Drive the real app (browser, CLI, tests). | official pstack README "not shipped here" |
|
|
42
|
+
| Benny automations | Cursor automation pack. Left under `automations/` as source, not a DSH runtime. | pstack `automations/` |
|
|
43
|
+
| Graphite `gt` | Optional if `gt` is on PATH. Otherwise `gh` + git. | playbooks |
|
|
44
|
+
|
|
45
|
+
## Official `subagent` fields the model may send
|
|
46
|
+
|
|
47
|
+
From `docs/tool-catalog.md` `#deepseek-aidsh-tool-subagent` (generated from a booted plugin, not a guess):
|
|
48
|
+
|
|
49
|
+
- `description` (string, required)
|
|
50
|
+
- `prompt` (string, required)
|
|
51
|
+
- `run_in_background` (boolean, optional)
|
|
52
|
+
|
|
53
|
+
Do not send `model`, `provider`, `reasoning_effort`, `thinking`, `isolation`, `subagent_type`, `environment`, `readonly`, `resume_from`. They are not on this schema.
|
|
54
|
+
|
|
55
|
+
Shipped `subagent` is continuable and defaults omitted `run_in_background` to background. Shipped `subagent_fork` is one-shot and defaults to foreground. This plugin talks to `spawn`, not `fork`.
|
|
56
|
+
|
|
57
|
+
## Default spawn shape
|
|
58
|
+
|
|
59
|
+
Parent session only:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
pstack_spawn
|
|
63
|
+
description: <3-5 words>
|
|
64
|
+
prompt: <full brief, file pointers not inlined dumps>
|
|
65
|
+
role: <pstack role key, e.g. feature | how-explainer | independent-verifier | poteto-agent | comment-sicko>
|
|
66
|
+
run_in_background: true
|
|
67
|
+
route_index: <only for panel roles when overlay has more than one route; default 0>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Do not send model or effort on that call. Route and effort come from `$DSH_HOME/pstack-dsh.json` when that role is mapped to a live logged-in route; otherwise the child inherits this conversation.
|
|
71
|
+
|
|
72
|
+
If `pstack_spawn` is missing, fall back to official `subagent` with only `description`, `prompt`, `run_in_background`. That path inherits the parent and cannot apply the overlay.
|
|
73
|
+
|
|
74
|
+
Then wait on the settlement notice (continuable) or `job_output` (one-shot). Cancel with `interrupt_agent` or `job_kill`.
|
|
75
|
+
|
|
76
|
+
Code-writing delegates: the playbook role key (`feature`, `bug-fix`, …). Ad-hoc helpers with no role key: `poteto-agent`. `/no-comments`: `comment-sicko`. Independent verify: `independent-verifier`.
|
|
77
|
+
|
|
78
|
+
## Effort home (hypothesis, labeled)
|
|
79
|
+
|
|
80
|
+
**Store:** `$DSH_HOME/pstack-dsh.json` `roles.<key>.routes[].reasoningEffort`, only when `resolveModelInfo(provider, model).reasoning.efforts` lists that id.
|
|
81
|
+
|
|
82
|
+
**Apply:** `ctx.on('agent/request', …)` replaces `LlmCallConfig` for the child session id remembered at spawn. `AgentOptions` has no effort field, so spawn-time `agentOptions` can set provider/model only.
|
|
83
|
+
|
|
84
|
+
If a future DSH build stops firing host-level `agent/request` for in-process children, inherit-parent still works; mapped effort would not. Do not invent a spawn-tool field to paper over that.
|
|
85
|
+
|
|
86
|
+
## What Settings → pstack / `/setup-pstack` may list
|
|
87
|
+
|
|
88
|
+
The Settings page is the editor. It reads and writes `$DSH_HOME/pstack-dsh.json` through the same `buildCatalog` / overlay modules spawn uses. `/setup-pstack` only tells the user to open that page.
|
|
89
|
+
|
|
90
|
+
Only:
|
|
91
|
+
|
|
92
|
+
1. Registered `ctx.llm` adapters whose API key `credentials.describe(ref).configured` is true (settings `apiKeyEnv` walk, plus `DEEPSEEK_API_KEY` for `deepseek-official`).
|
|
93
|
+
2. Routes already in the dsh-oauth-login store **and** registered as `pi-*` adapters.
|
|
94
|
+
|
|
95
|
+
Empty catalog: inherit parent. Tell the user to add a key or install/login [dsh-oauth-login](https://github.com/aa2246740/dsh-oauth-login). Do not block. Do not show a vendor catalog.
|
|
96
|
+
|
|
97
|
+
## What this port dropped
|
|
98
|
+
|
|
99
|
+
| Cursor / Grok field | Why dropped |
|
|
100
|
+
|---|---|
|
|
101
|
+
| `Task.model` / Cursor panel slugs | Not on DSH `subagent`. Never invent slugs. |
|
|
102
|
+
| `Task.subagent_type` | DSH has no such field. Role is `pstack_spawn.role`. |
|
|
103
|
+
| `Task.isolation` / `environment: "cloud"` | No isolation field. Parent worktree + path in prompt. |
|
|
104
|
+
| grok `task.reasoning_effort` | Not on grok `task` either; also not on DSH `subagent`. |
|
|
105
|
+
| grok `~/.grok/roles` | DSH does not use that tree. Overlay is `$DSH_HOME/pstack-dsh.json`. |
|
|
106
|
+
| Cursor `~/.cursor/rules/pstack-models.mdc` | Cursor-only. |
|
|
107
|
+
| grok `scheduler_create` / Cursor `/loop` | Not in DSH. Use `create_goal` when present. |
|
|
108
|
+
| grok `get_task_output` | DSH settlement notice / `job_output`. |
|
|
109
|
+
| Cursor `AskQuestion` / `TodoWrite` | DSH `ask_user_question` / `todo_write`. |
|
package/LICENSE
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lauren Tan
|
|
4
|
+
Copyright (c) 2026 aa2246740
|
|
5
|
+
|
|
6
|
+
Official pstack playbooks and principles: Lauren Tan (poteto).
|
|
7
|
+
DeepSeek Harness port packaging and harness mapping: aa2246740 / pstack-dsh.
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# official pstack 的 DeepSeek Harness 移植
|
|
2
|
+
|
|
3
|
+
## 安装 / Install
|
|
4
|
+
|
|
5
|
+
### 官方 DeepSeek Harness 桌面 App(推荐) / Desktop app (recommended)
|
|
6
|
+
|
|
7
|
+
打开 **设置 → 插件 → 添加插件**,在“包名或地址”中输入:
|
|
8
|
+
|
|
9
|
+
Open **Settings → Plugins → Add plugin** and enter this in “Package name or address”:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
github:aa2246740/pstack-dsh#v0.2.3
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
桌面端插件管理器负责 Desktop profile 和内置包管理器。本发布已包含编译好的 `lib/`;普通使用不需要 clone 或本地构建。若应用提示刷新或重新打开,请按提示完成。
|
|
16
|
+
|
|
17
|
+
The desktop plugin manager owns the Desktop profile and bundled package manager. This release includes built `lib/`; normal use needs no clone or local build. Follow the app if it asks you to reload or reopen after installation.
|
|
18
|
+
|
|
19
|
+
### Web CLI
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
dsh plugin --profile web add github:aa2246740/pstack-dsh#v0.2.3
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
这条官方 CLI 命令只写入 `web` profile,不能修改 Desktop App 的 profile。对于已运行的 Web Host,请重新打开该 Host 一次,再刷新网页。
|
|
26
|
+
|
|
27
|
+
This official CLI command writes only the `web` profile; it cannot modify the Desktop App profile. For an already-running Web Host, reopen that Host once and reload the page.
|
|
28
|
+
|
|
29
|
+
面向官方 DeepSeek Harness **0.2.0-rc.2**(tag `dsh-v0.2.0-rc.2`,npm `@deepseek-ai/dsh@0.2.0-rc.2`)。Node `^22.19.0` 或 `>=24`。`@deepseek-ai/dsh-*` peer 范围是 `>=0.2.0-rc.1 <0.2.1`,接受 `0.2.0-rc.2`,拒绝 `0.1.7` alpha。
|
|
30
|
+
|
|
31
|
+
Targets official DeepSeek Harness **0.2.0-rc.2** (tag `dsh-v0.2.0-rc.2`, npm `@deepseek-ai/dsh@0.2.0-rc.2`). Node `^22.19.0` or `>=24`. The `@deepseek-ai/dsh-*` peer range is `>=0.2.0-rc.1 <0.2.1`: it accepts `0.2.0-rc.2` and rejects `0.1.7` alphas.
|
|
32
|
+
|
|
33
|
+
**English title.** pstack-dsh, a DeepSeek Harness port of official pstack.
|
|
34
|
+
|
|
35
|
+
**中文.** 这是 official pstack 的 DeepSeek Harness 移植。玩法和原则来自 poteto 的 official pstack;只有调用层换成 DSH。
|
|
36
|
+
|
|
37
|
+
**English.** This is a DeepSeek Harness port of official pstack. Playbooks and principles are poteto's. Only the harness call layer is swapped.
|
|
38
|
+
|
|
39
|
+
## 来源 / Credits
|
|
40
|
+
|
|
41
|
+
23 个玩法(playbooks)和 23 条原则(principles)是 [poteto](https://x.com/poteto) 写的,出自 [official pstack](https://github.com/cursor/plugins/tree/main/pstack)。本仓库是 DeepSeek Harness 移植([aa2246740/pstack-dsh](https://github.com/aa2246740/pstack-dsh))。调用层用 [HARNESS.md](./HARNESS.md) 里的 DSH 工具名。玩法和原则不是本仓库写的。
|
|
42
|
+
|
|
43
|
+
The 23 playbooks and 23 principles are [poteto](https://x.com/poteto)'s, from [official pstack](https://github.com/cursor/plugins/tree/main/pstack). This repository is the DeepSeek Harness port ([aa2246740/pstack-dsh](https://github.com/aa2246740/pstack-dsh)). Harness calls use DSH tools named in [HARNESS.md](./HARNESS.md). This port did not author those playbooks or principles.
|
|
44
|
+
|
|
45
|
+
## 本地目录 / Local checkout
|
|
46
|
+
|
|
47
|
+
已经 clone 到本机时(开发/本地测试):
|
|
48
|
+
|
|
49
|
+
A local checkout (development/local testing):
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
git clone https://github.com/aa2246740/pstack-dsh.git
|
|
53
|
+
dsh plugin --profile web add ./pstack-dsh
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
然后同样重启 Host,再刷新页面。
|
|
57
|
+
|
|
58
|
+
Then restart that Host and reload the page.
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
dsh plugin --profile web remove pstack-dsh
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Desktop App 请使用上面的应用内“添加插件”入口。官方 CLI 只管理 `web` profile。
|
|
65
|
+
|
|
66
|
+
Use the in-app “Add plugin” entry above for the Desktop App. The public CLI manages the `web` profile only.
|
|
67
|
+
|
|
68
|
+
## 开始用 / Get started
|
|
69
|
+
|
|
70
|
+
两步。
|
|
71
|
+
|
|
72
|
+
Two steps.
|
|
73
|
+
|
|
74
|
+
1. 要做事、要严谨,直接用 [`/poteto-mode`](./skills/poteto-mode/SKILL.md)。不用先跑 setup。子 agent 默认继承当前对话的路由。
|
|
75
|
+
2. 只有想给某个角色换已登录的路由时,打开 **设置 → pstack**(导航「pstack 角色」/「pstack roles」)。页面写入 `$DSH_HOME/pstack-dsh.json`。[`/setup-pstack`](./skills/setup-pstack/SKILL.md) 只是指向那一页的指针。
|
|
76
|
+
|
|
77
|
+
1. Use [`/poteto-mode`](./skills/poteto-mode/SKILL.md) for work that needs rigor. No setup required. Children inherit this conversation's route.
|
|
78
|
+
2. To pin a logged-in route per role, open **Settings → pstack** (nav label **pstack 角色** / **pstack roles**). The page writes `$DSH_HOME/pstack-dsh.json`. [`/setup-pstack`](./skills/setup-pstack/SKILL.md) is an optional pointer to that page.
|
|
79
|
+
|
|
80
|
+
角色模型列表会随 DSH 的登录、退出登录和模型目录变更通知更新,也可点击「刷新模型列表」。刷新只更新候选项,不覆盖尚未保存的角色和 effort;当前选择若失去登录会标为「暂不可用」。新加入 dsh-oauth-login 的 `pi-*` 路由以及 dsh-antigravity-oauth 的 `agy-*` 路由只要已登录且已注册,就会自动纳入,无需在 pstack 里再维护一份提供商名单。
|
|
81
|
+
|
|
82
|
+
Model choices follow DSH login/logout and catalog notifications. **Refresh models** also updates the choices without replacing unsaved role/effort edits. A selected route that becomes unavailable stays visibly marked. Newly registered, signed-in `pi-*` and `agy-*` routes are discovered without a second provider allowlist.
|
|
83
|
+
|
|
84
|
+
第一次用可以看 [pstack 指南](./docs/guide/README.md)。
|
|
85
|
+
|
|
86
|
+
New here? The [pstack guide](./docs/guide/README.md) walks through a first real task.
|
|
87
|
+
|
|
88
|
+
其余技能是按需的。`/poteto-mode` 会在步骤需要时自己去调。
|
|
89
|
+
|
|
90
|
+
The other skills are situational. The mode skill uses them when a step needs them.
|
|
91
|
+
|
|
92
|
+
## 上游 0.15 同步
|
|
93
|
+
|
|
94
|
+
技能内容同步至 `cursor/plugins` 的 pstack 0.15.0,提交 `71ed0d1076fec562c1b74ee353121a8d00f75382`。保留 DSH 工具和角色路由。
|
|
95
|
+
|
|
96
|
+
设置页的「Poteto 0.15 推荐」仅供参考,不会替换用户已保存的模型或 effort。`how-critics` 不再显示或启动代理,旧配置仍可读写并保留。不包含 Cursor 专用的 make-bot-ui。
|
|
97
|
+
|
|
98
|
+
The Poteto 0.15 recommendations are display-only. Existing model and effort assignments remain unchanged. The retired `how-critics` setting stays readable for compatibility but is hidden and never starts an agent. Cursor-only make-bot-ui is not included.
|
|
99
|
+
|
|
100
|
+
## 默认模型与 effort / Defaults
|
|
101
|
+
|
|
102
|
+
装完就能用,不必先打开设置,也不必跑 `/setup-pstack`。
|
|
103
|
+
|
|
104
|
+
A fresh install is usable without Settings → pstack and without `/setup-pstack`.
|
|
105
|
+
|
|
106
|
+
**模型 / Model.** 不要发送 `model`,除非 live catalog 里已经有这一条。没有 overlay 就继承父对话。不要编造 Cursor 面板 slug(`grok-4.6-fast-xhigh`、`gpt-5.6-sol-max`、`claude-fable-5-thinking-max`、`claude-opus-5-thinking-xhigh`)。
|
|
107
|
+
|
|
108
|
+
Do not send `model` unless that pair was detected live. Missing overlay inherits the parent. Do not invent Cursor panel slugs.
|
|
109
|
+
|
|
110
|
+
**effort.** 只提供该路由 `resolveModelInfo().reasoning.efforts` 列出的 id。没有 effort 字段就省略。skill 从不在 spawn 上发送 `reasoning_effort` 或 `thinking`。官方 `subagent` schema 没有这些字段。角色 effort 写在 overlay 里,由 `agent/request` 落到 `LlmCallConfig.reasoningEffort`。
|
|
111
|
+
|
|
112
|
+
Effort is only the ids that route actually accepts. If the route has none, omit it. Skills never send `reasoning_effort` or `thinking` on spawn. Official `subagent` has no such field. Role effort lives in the overlay and is applied on `agent/request`.
|
|
113
|
+
|
|
114
|
+
**设置 / Settings.** 配置页是官方 Settings 里的 `settings.section`(id `pstack`,order 16)。只列出已登录路由;effort 只列出该路由 live `resolveModelInfo().reasoning.efforts`。空列表就是继承父对话。保存写同一份 overlay,不是第二份配置。
|
|
115
|
+
|
|
116
|
+
The editor is the official Settings `settings.section` (id `pstack`, order 16). It lists logged-in routes only. Effort options are that route's live `resolveModelInfo().reasoning.efforts`. An empty list means inherit the parent. Save writes the same overlay, not a second file.
|
|
117
|
+
|
|
118
|
+
设置页只列出已经登录的 API key 路由,以及 dsh-oauth-login / dsh-antigravity-oauth 里已经签过名、并且适配器已注册的路由。空目录就是继承父对话。
|
|
119
|
+
|
|
120
|
+
## 推荐依赖 / Recommended peer
|
|
121
|
+
|
|
122
|
+
订阅与服务登录(ChatGPT / Claude / Grok / Copilot / OpenRouter / Kimi / Google Antigravity)要出现在 **设置 → pstack** 列表里,可按需安装 [dsh-oauth-login](https://github.com/aa2246740/dsh-oauth-login) 或 dsh-antigravity-oauth。不是硬依赖。只用 API key 的用户可以不装。本插件不读写 `~/.pi`、`~/.codex`、`~/.claude`、grok CLI 登录文件。
|
|
123
|
+
|
|
124
|
+
Subscription logins show up on **Settings → pstack** after you install [dsh-oauth-login](https://github.com/aa2246740/dsh-oauth-login) or dsh-antigravity-oauth. They are not required. API-key-only users work without them. This plugin does not read or write official CLI auth files.
|
|
125
|
+
|
|
126
|
+
```sh
|
|
127
|
+
dsh plugin --profile web add github:aa2246740/dsh-oauth-login#v0.2.7
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## 这不是 Cursor 插件 / Not the Cursor plugin
|
|
131
|
+
|
|
132
|
+
这里的角色映射在 **设置 → pstack**。官方 Cursor `/setup-pstack` 会写 `~/.cursor/rules`,并用 Cursor 的模型名。不要在 DSH 上跑那份。
|
|
133
|
+
|
|
134
|
+
Role mapping in this repo is **Settings → pstack**. Official Cursor `/setup-pstack` writes `~/.cursor/rules` and uses Cursor slugs. Do not run it here.
|
|
135
|
+
|
|
136
|
+
## 工具 / Tools
|
|
137
|
+
|
|
138
|
+
本插件注册:
|
|
139
|
+
|
|
140
|
+
This plugin registers:
|
|
141
|
+
|
|
142
|
+
| 工具 / Tool | 作用 / Role |
|
|
143
|
+
|---|---|
|
|
144
|
+
| `pstack_spawn` | 按角色起 DSH 子 agent。不要传 model / effort。 |
|
|
145
|
+
| `pstack_catalog` | 只列出已登录的 live 路由。 |
|
|
146
|
+
| `pstack_overlay_read` / `pstack_overlay_write` | 读写 `$DSH_HOME/pstack-dsh.json`。 |
|
|
147
|
+
| Settings → pstack | 官方设置页。保存同一份 overlay。 |
|
|
148
|
+
|
|
149
|
+
技能入口:`/poteto-mode`,以及 bundled 的 playbook / principle skills。[`/setup-pstack`](./skills/setup-pstack/SKILL.md) 指向设置页。
|
|
150
|
+
|
|
151
|
+
Slash entry: `/poteto-mode`, plus the bundled playbook and principle skills. [`/setup-pstack`](./skills/setup-pstack/SKILL.md) points at the Settings page.
|
|
152
|
+
|
|
153
|
+
## 开发 / Develop
|
|
154
|
+
|
|
155
|
+
```sh
|
|
156
|
+
pnpm install
|
|
157
|
+
pnpm test
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
不要对用户正在用的 DSH Host 发 `--force`,也不要杀它。对照 [TEST-PLAN.md](./TEST-PLAN.md)。
|
|
161
|
+
|
|
162
|
+
Do not `--force` or kill a user's live DSH Host. See [TEST-PLAN.md](./TEST-PLAN.md).
|
|
163
|
+
|
|
164
|
+
## 许可 / License
|
|
165
|
+
|
|
166
|
+
MIT。玩法与原则:Lauren Tan。DSH 移植打包:aa2246740。见 [LICENSE](./LICENSE)。
|
|
167
|
+
|
|
168
|
+
MIT. Playbooks and principles: Lauren Tan. DSH port packaging: aa2246740. See [LICENSE](./LICENSE).
|
package/TEST-PLAN.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Test plan
|
|
2
|
+
|
|
3
|
+
Cola does not have to be the guinea pig. Run these against a local DSH checkout plus dshx.
|
|
4
|
+
|
|
5
|
+
## Static
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install
|
|
9
|
+
npm test
|
|
10
|
+
npm run typecheck
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`tests/static-call-sites.spec.ts` greps skills and docs for harness leftovers:
|
|
14
|
+
|
|
15
|
+
- Cursor `AskQuestion`, `TodoWrite`, `~/.cursor/rules`
|
|
16
|
+
- Cursor panel slugs (`claude-fable-5-thinking-max`, `gpt-5.6-sol-max`, `grok-4.6-fast-xhigh`, `claude-opus-5-thinking-xhigh`)
|
|
17
|
+
- `subagent_type`, grok `get_task_output`, grok `scheduler_create`
|
|
18
|
+
- spawn docs sending `reasoning_effort` / `thinking`
|
|
19
|
+
- `cursor-team-kit`, `/deslop` as a required control skill
|
|
20
|
+
|
|
21
|
+
## dshx check
|
|
22
|
+
|
|
23
|
+
From a machine with [dshx](https://github.com/aa2246740/dsh-external-plugin-devkit) and a DSH checkout:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
dshx setup --harness /path/to/deepseek-harness
|
|
27
|
+
# link this repo as my-plugins/pstack-dsh if it is not already
|
|
28
|
+
dshx check pstack-dsh --harness /path/to/deepseek-harness
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Must pass: named `export function apply`, no `export default`, boot marker `[my-plugins/pstack-dsh] loaded` in source, portable `cordis.yml`, `dsh.client` + lazy-CJS `lib/client.js` (`window.__ModuleLoader__.load`).
|
|
32
|
+
|
|
33
|
+
## verify-boot (isolated cold boot)
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
dshx status # if a live Host is already supervised, skip this section
|
|
37
|
+
dshx verify-boot pstack-dsh --port 43123
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Never `--force`. Never stop a Host this command did not start.
|
|
41
|
+
|
|
42
|
+
This cloud checkout ran `dshx check` green. `dshx verify-boot pstack-dsh --port 43123` then skipped isolated cold boot: the linked official DSH tree had no installed CLI (`dump-config exited 1`, `id pstack-dsh missing from dump-config`). No Host was started or stopped. Re-run verify-boot on a machine where `dsh` dumps config.
|
|
43
|
+
|
|
44
|
+
## Catalog / overlay (no network models required)
|
|
45
|
+
|
|
46
|
+
`tests/catalog.spec.ts` and `tests/overlay.spec.ts` cover:
|
|
47
|
+
|
|
48
|
+
- empty host → `selectableCount === 0`, `inheritParent: true`, oauth recommend line
|
|
49
|
+
- API-key route only when `credentials.describe` says configured
|
|
50
|
+
- unsigned vendor ids are not listed
|
|
51
|
+
- overlay write rejects a route that is not selectable
|
|
52
|
+
- overlay write rejects `reasoningEffort` when that route has no efforts
|
|
53
|
+
- overlay write rejects an effort id the live adapter did not list
|
|
54
|
+
- missing overlay file → every role inherits
|
|
55
|
+
- Settings snapshot/save uses the same overlay path and rejects unsigned slugs (`tests/settings-api.spec.ts`, `tests/settings-draft.spec.ts`)
|
|
56
|
+
|
|
57
|
+
## Manual Settings (EDITH / local DSH Web)
|
|
58
|
+
|
|
59
|
+
After the bundle has been activated on the intended Host (initial bundle installation requires an authorized Host restart):
|
|
60
|
+
|
|
61
|
+
1. Open Settings (sidebar gear) → **pstack** / **pstack 角色**.
|
|
62
|
+
2. With no keys and no oauth store: inherit-only, oauth recommend line, Save still writes inherit overlay.
|
|
63
|
+
3. Add `DEEPSEEK_API_KEY` or sign in through dsh-oauth-login. The role selector updates from Host notifications, without a page reload. Effort options match `resolveModelInfo` or are omitted.
|
|
64
|
+
4. Save. `$DSH_HOME/pstack-dsh.json` matches the form. `pstack_spawn` does not grow `model` / `reasoning_effort` fields.
|
|
65
|
+
5. `/setup-pstack` only points at Settings → pstack. It does not run a TUI picker.
|
|
66
|
+
6. Leave role/effort edits unsaved, then refresh models or receive a login/logout notification. Choices update; drafts and Save's dirty state remain. A selected route that disappears is marked unavailable rather than silently displaying inherit.
|
|
67
|
+
|
|
68
|
+
`node tests/settings-refresh.browser.mjs [candidate/lib/client.js]` checks these UI behaviors on the existing `127.0.0.1:43127` Host using the globally pinned Playwright runtime. Snapshot responses and Host notifications are simulated only in that test page; no login, saved overlay or server process is changed. Supplying a candidate bundle tests it before live publication.
|
|
69
|
+
|
|
70
|
+
Client builds use dshx `externalClientBundle`; configure matching `DSHX_HARNESS` / `~/.config/dshx/harness` paths before `npm run check`.
|
|
@@ -0,0 +1,32 @@
|
|
|
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.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: poteto-agent
|
|
3
|
+
description: Routing target for `/poteto-mode` and any request for poteto's style. Resume an existing poteto-agent for the conversation rather than spawning a sibling. Reads the `poteto-mode` skill's `SKILL.md` in full before any work, including its inline Principles index. Skipping that read drifts.
|
|
4
|
+
is_background: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Poteto subagent
|
|
8
|
+
|
|
9
|
+
You are operating as poteto-mode's full agent style. Read the `poteto-mode` skill's `SKILL.md` in full before doing any work, including its inline Principles index. Navigate to a leaf `principle-*` skill whenever you apply that principle.
|
package/cordis.patch.yml
ADDED
package/cordis.yml
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
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, then the Settings page if you want per-role routes.
|
|
4
|
+
|
|
5
|
+
## Install the plugin
|
|
6
|
+
|
|
7
|
+
Need **pnpm** on `PATH`. Then:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
dsh plugin --profile web add github:aa2246740/pstack-dsh
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Restart that Host and reload the page. Add writes `$DSH_HOME/profiles/web`; it does not hot-load a running process.
|
|
14
|
+
|
|
15
|
+
## Pick your models
|
|
16
|
+
|
|
17
|
+
Open **Settings** (sidebar gear) → **pstack** (nav **pstack 角色** / **pstack roles**).
|
|
18
|
+
|
|
19
|
+
The page lists only logged-in DSH routes. Save writes `$DSH_HOME/pstack-dsh.json`. A missing file means every role inherits this conversation.
|
|
20
|
+
|
|
21
|
+
You only override what you care about. A role left as `inherit-parent` keeps the parent route. `auto` means the same inherit. For a panel role the value is a list, and one subagent runs per entry. Setup also configures `swarm-workers`, the default route for every `/swarm` worker unless a race names a selectable catalog route for each arm.
|
|
22
|
+
|
|
23
|
+
[`/setup-pstack`](../../skills/setup-pstack/SKILL.md) is a pointer to that page. It is not a TUI editor.
|
|
24
|
+
|
|
25
|
+
If the project has no way to prove app behavior, you can generate one with [`/create-verification-skill`](../../skills/create-verification-skill/SKILL.md). [Verify and ship](./06-verify-and-ship.md#create-a-project-verification-skill) covers when it earns its place.
|
|
26
|
+
|
|
27
|
+
New `pstack_spawn` calls pick up the overlay in this session.
|
|
28
|
+
|
|
29
|
+
## Run your first task
|
|
30
|
+
|
|
31
|
+
Pick something real but small, and describe it the way you'd describe it to a colleague:
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
/poteto-mode add a --json flag to this command. text output stays byte-identical. verify both.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
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.
|
|
38
|
+
|
|
39
|
+
From here you can type normal follow-ups. `/poteto-mode` is sticky. It stays on for the conversation until you opt out by saying so.
|
|
40
|
+
|
|
41
|
+
Next: [Route work through `/poteto-mode`](./02-poteto-mode.md).
|
|
@@ -0,0 +1,98 @@
|
|
|
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[Check principle triggers]
|
|
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, babysitting a PR or stack to merge-ready, shipping a verified stack, running a PR queue 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
|
+
When the conversation already carries the context, the prompt shrinks to almost nothing. All of these are enough:
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
/poteto-mode do it
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
continue
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
keep going until done
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Short works because the mode is sticky and the playbook holds the structure. Your words carry the intent, and the skill carries the rigor.
|
|
55
|
+
|
|
56
|
+
## Switch tasks with "new task"
|
|
57
|
+
|
|
58
|
+
A long chat accumulates context from the last task. When you change subjects, say so:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
/poteto-mode new task. figure out why the cache entry survives logout. don't change any code yet.
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
"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.
|
|
65
|
+
|
|
66
|
+
## Give parallel work its own worktree
|
|
67
|
+
|
|
68
|
+
If you run several agents against one repository, they will fight over the working tree. Ask for isolation up front:
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
/poteto-mode new task. branch off <base> in a fresh worktree, then port the parser change there.
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Each task in its own branch and worktree means no agent stomps another's files. 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.
|
|
75
|
+
|
|
76
|
+
Worktrees accumulate. When disk gets tight, ask:
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
/poteto-mode what's eating my disk? prune the worktrees that are safe to prune.
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
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.
|
|
83
|
+
|
|
84
|
+
## Leave it running
|
|
85
|
+
|
|
86
|
+
When you step away, say what done means and go:
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
/poteto-mode im stepping away. keep going until the migration check reports zero old callers. log your decisions.
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
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.
|
|
93
|
+
|
|
94
|
+
**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.
|
|
95
|
+
|
|
96
|
+
Read [`poteto-mode`](../../skills/poteto-mode/SKILL.md) itself for the full routing rules.
|
|
97
|
+
|
|
98
|
+
Next: [Understand the code](./03-understand.md).
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Understand the code before changing it
|
|
2
|
+
|
|
3
|
+
Editing code you don't understand is how subtle regressions ship. pstack gives you four ways in. `/how` explains what the code does now. `/why` digs up the reasons it's shaped that way. `/teach` blends both into one explanation. `/recall` rebuilds your own recent context on a topic.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
## Trace behavior with `/how`
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
/how do we dedupe notifications? is there an n+1 when we look up subscribers?
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Ask the question you actually have. [`/how`](../../skills/how/SKILL.md) reads the code and answers at the level of a senior engineer onboarding you onto the subsystem, with the runtime flow, the key types, and the non-obvious parts. For a big subsystem it spawns two to four explorers instructed not to write, then an explainer synthesizes their findings. For a narrow question one explainer reads and explains.
|
|
14
|
+
|
|
15
|
+
## Dig up history with `/why`
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
/why was the retry limit set to five? does the reason still hold?
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
[`/why`](../../skills/why/SKILL.md) works like a detective on a cold case. It starts from source control, then queries whatever evidence categories your MCPs expose, such as the issue tracker, long-form docs, team chat, observability, error tracking, and analytics, all in parallel. The report cites everything, separates direct evidence from inference, and says "appears to" when the record is thin. A null result gets reported too, because "nobody wrote down why" is itself an answer.
|
|
22
|
+
|
|
23
|
+
The two compose naturally. `do why first then how` is a perfectly good prompt when you suspect the history explains the mess.
|
|
24
|
+
|
|
25
|
+
## Actually understand it with `/teach`
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
/teach me how this PR changes retries. convince me it fixes the cause and not the symptom.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[`/teach`](../../skills/teach/SKILL.md) is for when a summary isn't enough. It runs `/how` and `/why`, for a small change maybe just one of them, and weaves the findings into a plain explanation that builds up diagram by diagram. The "convince me" framing is worth stealing. It turns the explanation into an argument you can poke at instead of a tour.
|
|
32
|
+
|
|
33
|
+
## Rebuild your own context with `/recall`
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
/recall catch me up on the export work from last week
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
[`/recall`](../../skills/recall/SKILL.md) mines your own recent chats plus the shared record (issues, prior fixes, errors still firing) and hands back a brief on where things stand and what's next. Use it when you're returning to a topic cold. If you want to resume one specific chat, that's the Session pickup playbook below, not `/recall`.
|
|
40
|
+
|
|
41
|
+
## Take over prior work with Session pickup
|
|
42
|
+
|
|
43
|
+
When another agent (or you, last week) left a branch mid-flight:
|
|
44
|
+
|
|
45
|
+
```text
|
|
46
|
+
/poteto-mode take over this branch. read the decision log, figure out what's done, and continue from there. don't redo finished work.
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The [Session pickup playbook](../../skills/poteto-mode/playbooks/session-pickup.md) treats the prior trail as authoritative. It reconstructs the branch state and decisions, names the resume point, and verifies inherited claims against the original goal instead of re-deriving everything from scratch.
|
|
50
|
+
|
|
51
|
+
**Pitfall:** don't skip this page's skills because "the agent will read the code anyway." An agent that starts editing without a traced model tends to fix the symptom at the first plausible spot. `/how` first is cheaper than the second bug.
|
|
52
|
+
|
|
53
|
+
Next: [Design the change](./04-design.md).
|