dsh-plugin-guide 0.1.2 → 0.3.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.
Files changed (51) hide show
  1. package/README.es.md +89 -20
  2. package/README.hi.md +89 -20
  3. package/README.md +92 -21
  4. package/README.pt.md +89 -20
  5. package/README.zh.md +92 -21
  6. package/SKILL.md +11 -1
  7. package/bin/dsh-plugin-dev.js +6 -0
  8. package/cordis.patch.yml +5 -0
  9. package/dist/dsh-plugin-dev.js +1623 -0
  10. package/guide/plugin-dev-guide.md +1 -1
  11. package/guide/quick-reference.es.md +1 -1
  12. package/guide/quick-reference.hi.md +1 -1
  13. package/guide/quick-reference.md +1 -1
  14. package/guide/quick-reference.pt.md +1 -1
  15. package/guide/quick-reference.zh-CN.md +1 -1
  16. package/package.json +50 -5
  17. package/references/harness-repo.md +1 -1
  18. package/references/official-docs/AGENTS.md +1 -1
  19. package/references/official-docs/docs/persistence-catalog.md +1 -12
  20. package/references/official-docs/docs/persistence-catalog.zh.md +1 -12
  21. package/references/official-docs/docs/subsystems/persistence.md +1 -1
  22. package/references/official-docs/docs/subsystems/persistence.zh.md +1 -1
  23. package/references/official-docs/docs/subsystems/session.md +0 -11
  24. package/references/official-docs/docs/subsystems/session.zh.md +0 -11
  25. package/scripts/check-docs-drift.ps1 +55 -0
  26. package/scripts/check-readme-sync.mjs +91 -0
  27. package/scripts/verify-artifacts.mjs +70 -0
  28. package/templates/js/LICENSE +15 -0
  29. package/templates/js/README.es.md +42 -0
  30. package/templates/js/README.hi.md +42 -0
  31. package/templates/js/README.md +42 -0
  32. package/templates/js/README.pt.md +42 -0
  33. package/templates/js/README.zh.md +42 -0
  34. package/templates/js/cordis.patch.yml +10 -0
  35. package/templates/js/index.js +38 -0
  36. package/templates/js/package.json +35 -0
  37. package/templates/js/tests/index.test.js +12 -0
  38. package/templates/ts/LICENSE +15 -0
  39. package/templates/ts/README.es.md +44 -0
  40. package/templates/ts/README.hi.md +44 -0
  41. package/templates/ts/README.md +44 -0
  42. package/templates/ts/README.pt.md +44 -0
  43. package/templates/ts/README.zh.md +44 -0
  44. package/templates/ts/cordis.patch.yml +10 -0
  45. package/templates/ts/package.json +44 -0
  46. package/templates/ts/src/config.ts +12 -0
  47. package/templates/ts/src/index.ts +36 -0
  48. package/templates/ts/tests/index.test.ts +12 -0
  49. package/templates/ts/tsconfig.json +17 -0
  50. package/templates/ts/tsdown.config.mjs +15 -0
  51. package/templates/ts/vitest.config.ts +8 -0
package/README.pt.md CHANGED
@@ -1,10 +1,11 @@
1
1
  <div align="center">
2
2
 
3
3
  # 🐳 dsh-plugin-guide
4
+ - **Canal 1024 store**: `npm i -g dsh1024` uma vez, depois `dsh1024 plugin --profile web add dsh-plugin-guide` (conta para o ranking de instalações do [deepseek1024.com](https://deepseek1024.com)).
4
5
 
5
6
  **Tudo o que você precisa para construir plugins do [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness).**
6
7
 
7
- *Arquivo de documentação oficial · primer de Cordis · deep-dives da comunidade · armadilhas testadas em batalha · agent skill*
8
+ *Arquivo de documentação oficial · primer de Cordis · deep-dives da comunidade · armadilhas testadas em batalha · agent skill · toolchain CLI*
8
9
 
9
10
  [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
10
11
  [![DSH plugin](https://img.shields.io/badge/dsh-plugin-✅-green)](https://github.com/topics/dsh-plugin)
@@ -38,6 +39,7 @@ O `dsh-plugin-guide` é a base de conhecimento de desenvolvimento de plugins DSH
38
39
  - **Primer de Cordis** — os cinco conceitos e a linha do tempo de mecanismos (repository-plugin introduzido 0809, removido 0811; os dois canais de instalação).
39
40
  - **20+ armadilhas do mundo real** com causa raiz + correção (cópias duplas de cordis, trio tsconfig, sessões zstd multi-frame, junctions do Windows, `latest` obsoleto do npm, …).
40
41
  - **Deep-dives da comunidade** — 114 repositórios da comunidade arquivados (15 com deep-dive), mais um índice fonte completo onde cada fato aponta para sua origem.
42
+ - **Toolchain CLI** — `dsh-plugin-dev new / check / verify`: gerar, verificar estaticamente e validar o empacotamento de plugins DSH; cada check aponta para a seção da skill que ele aplica.
41
43
 
42
44
  ## Knowledge base
43
45
 
@@ -51,8 +53,42 @@ O `dsh-plugin-guide` é a base de conhecimento de desenvolvimento de plugins DSH
51
53
  | `references/official-docs/` | Cópia textual da documentação oficial do repo (EN + ZH) |
52
54
  | `references/*.md` | Relatórios de pesquisa: docs do repo, site, Cordis, o paper, ecossistema da comunidade, arquivo de 114 repos (15 com deep-dive) |
53
55
  | `scripts/` | Scripts de download idempotentes + verificador de integridade + gerador de instantânea de tópico |
56
+ | `bin/` · `src/cli/` · `dist/` | O CLI `dsh-plugin-dev`: scaffolder, checker, verifier (TypeScript, empacotado com tsdown) |
57
+ | `templates/` | Esqueletos TS + JS: modelo de contrato, Config, tests, cordis.patch.yml, READMEs em cinco idiomas |
54
58
  | `downloads/` | Instantâneas cruas — geradas por `scripts/`, não commitadas |
55
59
 
60
+ ## CLI toolchain
61
+
62
+ O bundle inclui o CLI `dsh-plugin-dev` sem dependências de runtime (`bin/` → `dist/dsh-plugin-dev.js` empacotado com tsdown). Cada check cita a seção da skill que ele aplica, para que um agente possa continuar auditando manualmente.
63
+
64
+ ```sh
65
+ dsh-plugin-dev new <name> [--lang ts|js] [--dir <path>] [--force] [--git]
66
+ dsh-plugin-dev check [--cwd <dir>] [--json] [--strict]
67
+ dsh-plugin-dev verify [--cwd <dir>] [--dsh <bin>] [--pnpm <bin>]
68
+ ```
69
+
70
+ | Subcomando | O que faz |
71
+ |---|---|
72
+ | `new <name>` | Gera um repo de plugin TS ou JS: modelo de contrato `src/index.ts`, Config de Schemastery, tests, tsdown/vitest, `cordis.patch.yml` comentado, READMEs em cinco idiomas. Idempotente; recusa destinos não vazios sem `--force`. |
73
+ | `check` | Checks estáticos: validade de `cordis.patch.yml`, metadados de `package.json` (ponteiro `dsh.bundle.patch`, peer deps, engines, whitelist de files), consistência de READMEs em cinco idiomas, padrões de linha vermelha de engenharia. Emite JSON consumível por CI. |
74
+ | `verify` | `pnpm pack`, depois instala/inicia/desinstala o bundle em um perfil `DSH_HOME` mkdtemp limpo (alinhado com `verify:self-contained`). Falhas reportam a cauda do log mais sugestões. |
75
+
76
+ ### CLI configuration
77
+
78
+ O CLI não tem ajustes hardcoded — cada um é um flag ou uma variável de ambiente.
79
+
80
+ | Ajuste | Flag | Env | Padrão |
81
+ |---|---|---|---|
82
+ | Diretório de templates | — | `DSH_PLUGIN_DEV_TEMPLATES` | `<package>/templates` |
83
+ | Binário dsh | `--dsh` | `DSH_PLUGIN_DEV_DSH` | `dsh` |
84
+ | Binário pnpm | `--pnpm` | `DSH_PLUGIN_DEV_PNPM` | `pnpm` |
85
+ | Timeout de instalação/pack | `--timeout` | `DSH_PLUGIN_DEV_TIMEOUT` | `300000` ms |
86
+ | Timeout de smoke headless | `--smoke-timeout` | `DSH_PLUGIN_DEV_SMOKE_TIMEOUT` | `120000` ms |
87
+
88
+ ### Upstream roadmap
89
+
90
+ O `dsh-plugin-dev` é um candidato upstream para o CLI oficial de desenvolvimento de plugins (item C12): o scaffolder/checker/verifier são as camadas mecânicas, enquanto `SKILL.md` + `guide/` seguem sendo a camada cognitiva.
91
+
56
92
  ## Quick start
57
93
 
58
94
  ```sh
@@ -68,6 +104,14 @@ dsh --profile web --dump-config | grep -A3 'id: dsh-plugin-guide'
68
104
 
69
105
  Depois é só pedir ao seu agente: *"Use a skill dsh-plugin-guide para me construir um plugin de …."*
70
106
 
107
+ Ou use o CLI diretamente:
108
+
109
+ ```sh
110
+ npx dsh-plugin-guide new hello-plugin # gera um repo de plugin TS
111
+ npx dsh-plugin-guide check --json # check estático
112
+ npx dsh-plugin-guide verify # pack + smoke de perfil limpo
113
+ ```
114
+
71
115
  ## Install & uninstall
72
116
 
73
117
  - **canal git** (último `main`): `dsh plugin --profile web add github:PerryLink/dsh-plugin-guide#<sha>` — fixe um commit para reprodutibilidade; o ponto de entrada é JS ESM puro, sem etapa de build.
@@ -94,13 +138,14 @@ O instalador pula `downloads/` (gerado) e `.github/`, e então verifica cada arq
94
138
 
95
139
  ## Configuration
96
140
 
97
- O `dsh-plugin-guide` não expõe nenhum `Config` de Schemastery — ele registra a base de conhecimento como uma agent skill sem chaves ajustáveis.
141
+ O bundle de skill não expõe nenhum `Config` de Schemastery — ele registra a base de conhecimento como uma agent skill sem chaves ajustáveis. O CLI `dsh-plugin-dev` lê seus ajustes de flags e variáveis de ambiente `DSH_PLUGIN_DEV_*` (veja [CLI toolchain](#cli-toolchain)).
98
142
 
99
143
  ## Tools & surfaces
100
144
 
101
145
  | Surface | Kind | Notes |
102
146
  |---|---|---|
103
147
  | `dsh-plugin-guide` | skill | Registrada via `ctx.skills`; carrega `SKILL.md` + `./guide/` + `./references/` sob demanda |
148
+ | `dsh-plugin-dev` | bin (CLI) | Subcomandos `new` / `check` / `verify`; não é uma linha de plugin DSH |
104
149
 
105
150
  ## Permissions & data
106
151
 
@@ -133,15 +178,22 @@ pwsh -File scripts/verify-kit.ps1 -Checkout <checkout> # caminhos crític
133
178
 
134
179
  ## Development
135
180
 
136
- O bundle é ESM puro sem etapa de build. O CI executa a porta de integridade em cada push e pull request:
181
+ O bundle de skill (`index.js`) é ESM puro, sem etapa de build; o CLI `dsh-plugin-dev` é TypeScript compilado com tsdown. Portas:
137
182
 
138
183
  ```sh
184
+ pnpm install --frozen-lockfile
185
+ pnpm run typecheck && pnpm run typecheck:ci
186
+ pnpm test
187
+ pnpm run build
188
+ pnpm run verify:artifacts # auto-check + smoke de scaffold (sem rede)
189
+ pnpm run verify:self-contained # pack + smoke de instalação/início/desinstalação em perfil limpo
190
+ pnpm pack
139
191
  pwsh -File scripts/verify-kit.ps1 # caminhos críticos + varredura de links (+ deriva de docs com -Checkout <checkout>)
140
192
  ```
141
193
 
142
194
  ## Topics
143
195
 
144
- `dsh`, `deepseek-harness`, `dsh-plugin`, `cordis`, `agent-skill`, `plugin-development`, `knowledge-base`
196
+ `dsh`, `deepseek-harness`, `dsh-plugin`, `cordis`, `agent-skill`, `plugin-development`, `knowledge-base`, `cli`, `scaffold`, `checker`
145
197
 
146
198
  ## Contributors
147
199
 
@@ -150,25 +202,42 @@ pwsh -File scripts/verify-kit.ps1 # caminhos críticos + varredura de links (+
150
202
 
151
203
  ## PerryLink DSH Plugin Family
152
204
 
153
- Este projeto é um dos [15 plugins do DeepSeek Harness](https://github.com/PerryLink) mantidos por [PerryLink](https://github.com/PerryLink). Se este te ajuda, os demais provavelmente também:
205
+ Este projeto é um dos [33 plugins de DeepSeek Harness](https://github.com/PerryLink) mantidos por [PerryLink](https://github.com/PerryLink). Se este ajuda você, os outros provavelmente também:
154
206
 
155
207
  | Plugin | One-liner |
156
208
  |---|---|
157
- | [dsh-mcp-panel](https://github.com/PerryLink/dsh-mcp-panel) | Read-only MCP runtime panel: /mcp command + Settings tab with status, tools and errors |
158
- | [dsh-doublecheck](https://github.com/PerryLink/dsh-doublecheck) | Engineering-discipline guard: requirements grill, test gates, adversary review |
159
- | [dsh-background-agents](https://github.com/PerryLink/dsh-background-agents) | Durable background child agents with a Web UI sidebar, messaging and interrupt |
160
- | [dsh-lsp-actions](https://github.com/PerryLink/dsh-lsp-actions) | LSP diagnostics, formatting, completion, code actions and rename over language servers |
161
- | [dsh-output-styles](https://github.com/PerryLink/dsh-output-styles) | Claude Code outputStyles-equivalent runtime style switching |
162
- | [dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-checkpoint-rewind) | Claude Code /rewind-equivalent: snapshots, session forks, one-shot restore |
163
- | [dsh-permission-rules](https://github.com/PerryLink/dsh-permission-rules) | Claude Code-style declarative allow/deny/ask permission rules with audit |
164
- | [dsh-auto-review](https://github.com/PerryLink/dsh-auto-review) | Second-model auto-review on the approval chain, fail-closed by default |
165
- | [dsh-memento](https://github.com/PerryLink/dsh-memento) | Approval-gated cross-session memory: ctx.memory seam + SQLite + memory tool |
166
- | [dsh-skill-pack-security](https://github.com/PerryLink/dsh-skill-pack-security) | Security-audit skill pack: secret scan, dependency and supply-chain review |
167
- | [dsh-session-pin](https://github.com/PerryLink/dsh-session-pin) | Pin sessions in the Web sidebar with durable ordering |
168
- | [dsh-composer-history](https://github.com/PerryLink/dsh-composer-history) | Terminal-style input history for the web composer: arrows, Ctrl+R search |
169
- | [dsh-github](https://github.com/PerryLink/dsh-github) | GitHub PR/issues integration for DSH, every write gated by approval |
170
- | **[dsh-plugin-guide](https://github.com/PerryLink/dsh-plugin-guide)** | Plugin-development knowledge base as an on-demand agent skill |
171
- | [dsh-claude-move](https://github.com/PerryLink/dsh-claude-move) | Migrate Claude Code sessions, memory, skills and CLAUDE.md into DSH |
209
+ | **[dsh-dsh-auto-review](https://github.com/PerryLink/dsh-dsh-auto-review)** | Auto-revisão de segundo modelo na cadeia de aprovação, com falha fechada por padrão | |
210
+ | **[dsh-dsh-background-agents](https://github.com/PerryLink/dsh-dsh-background-agents)** | Agentes filhos em segundo plano duráveis com barra lateral de UI web, mensagens e interrupção | |
211
+ | **[dsh-dsh-budget](https://github.com/PerryLink/dsh-dsh-budget)** | Governança de custos para DeepSeek Harness: orçamentos, carbono e latência em um painel. | |
212
+ | **[dsh-dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-dsh-checkpoint-rewind)** | Equivalente ao /rewind do Claude Code: instantâneos, bifurcações de sessão, restauração de uso único | |
213
+ | **[dsh-dsh-claude-move](https://github.com/PerryLink/dsh-dsh-claude-move)** | Migre sessões, memória, habilidades e CLAUDE.md do Claude Code para o DSH | |
214
+ | **[dsh-dsh-click](https://github.com/PerryLink/dsh-dsh-click)** | Controle de desktop nativo multiplataforma para DeepSeek Harness — Windows primeiro. | |
215
+ | **[dsh-dsh-composer-history](https://github.com/PerryLink/dsh-dsh-composer-history)** | Histórico de entrada estilo terminal para o compositor web: setas, busca Ctrl+R | |
216
+ | **[dsh-dsh-data-quality](https://github.com/PerryLink/dsh-dsh-data-quality)** | Verificações de qualidade de datasets e verificação de citações (a ponte numérica opcional consumida aqui) | |
217
+ | **[dsh-dsh-defend](https://github.com/PerryLink/dsh-dsh-defend)** | Defesa contra injeção de prompt, jailbreak e vazamento de segredos para DeepSeek Harness. | |
218
+ | **[dsh-dsh-doublecheck](https://github.com/PerryLink/dsh-dsh-doublecheck)** | Guardião de disciplina de engenharia: sabatina de requisitos, portões de teste, revisão adversária | |
219
+ | **[dsh-dsh-draw](https://github.com/PerryLink/dsh-dsh-draw)** | Roteamento unificado de geração de imagens estáticas para DeepSeek Harness. | |
220
+ | **[dsh-dsh-fast](https://github.com/PerryLink/dsh-dsh-fast)** | Diagnóstico de desempenho de leitura para DeepSeek Harness. | |
221
+ | **[dsh-dsh-fund-research](https://github.com/PerryLink/dsh-dsh-fund-research)** | Relatórios de pesquisa deterministas para fundos mútuos públicos chineses | |
222
+ | **[dsh-dsh-github](https://github.com/PerryLink/dsh-dsh-github)** | Integração de PR/issues do GitHub para o DSH, cada escrita controlada por aprovação | |
223
+ | **[dsh-dsh-industry-research](https://github.com/PerryLink/dsh-dsh-industry-research)** | Orquestração de pesquisa setorial que sela as suas entregas através do `ctx.researchReport.assemble` deste plugin | |
224
+ | **[dsh-dsh-library](https://github.com/PerryLink/dsh-dsh-library)** | Base de conhecimento documental local para DeepSeek Harness. | |
225
+ | **[dsh-dsh-local-ai](https://github.com/PerryLink/dsh-dsh-local-ai)** | Integração de modelos locais (Ollama) para DeepSeek Harness. | |
226
+ | **[dsh-dsh-lsp-actions](https://github.com/PerryLink/dsh-dsh-lsp-actions)** | Diagnósticos, formatação, autocompletar, ações de código e renomeação LSP sobre servidores de linguagem | |
227
+ | **[dsh-dsh-mask](https://github.com/PerryLink/dsh-dsh-mask)** | Middleware de mascaramento de PII: anonimiza no limite do modelo, restaura na camada de exibição | |
228
+ | **[dsh-dsh-mcp-panel](https://github.com/PerryLink/dsh-dsh-mcp-panel)** | Painel de tempo de execução MCP somente leitura: comando /mcp + aba Settings com status, ferramentas e erros | |
229
+ | **[dsh-dsh-memento](https://github.com/PerryLink/dsh-dsh-memento)** | Memória entre sessões controlada por aprovação: costura ctx.memory + SQLite + ferramenta de memória | |
230
+ | **[dsh-dsh-observe](https://github.com/PerryLink/dsh-dsh-observe)** | Exportador de observabilidade OpenTelemetry e Langfuse para DeepSeek Harness. | |
231
+ | **[dsh-dsh-output-styles](https://github.com/PerryLink/dsh-dsh-output-styles)** | Troca de estilo em tempo de execução equivalente ao outputStyles do Claude Code | |
232
+ | **[dsh-dsh-permission-rules](https://github.com/PerryLink/dsh-dsh-permission-rules)** | Regras de permissão declarativas allow/deny/ask estilo Claude Code com auditoria | |
233
+ | **[dsh-dsh-research-report](https://github.com/PerryLink/dsh-dsh-research-report)** | Motor de relatórios de pesquisa verificáveis com evidência endereçada por conteúdo | |
234
+ | **[dsh-dsh-score](https://github.com/PerryLink/dsh-dsh-score)** | Pontuação de qualidade multidimensional para plugins de DeepSeek Harness. | |
235
+ | **[dsh-dsh-session-pin](https://github.com/PerryLink/dsh-dsh-session-pin)** | Fixe sessões na barra lateral web com ordenação durável | |
236
+ | **[dsh-dsh-session-sync](https://github.com/PerryLink/dsh-dsh-session-sync)** | Sincronização de sessões entre dispositivos para DeepSeek Harness — um espelho git dedicado do seu armazenamento de sessões. | |
237
+ | **[dsh-dsh-skill-pack-security](https://github.com/PerryLink/dsh-dsh-skill-pack-security)** | Pacote de habilidades de auditoria de segurança: varredura de segredos, revisão de dependências e cadeia de suprimentos | |
238
+ | **[dsh-dsh-talk](https://github.com/PerryLink/dsh-dsh-talk)** | Loop de sessão com voz para DeepSeek Harness: fale e ouça a resposta. | |
239
+ | **[dsh-dsh-test-drive](https://github.com/PerryLink/dsh-dsh-test-drive)** | Test drives isolados de instalação e smoke para plugins de DeepSeek Harness. | |
240
+ | **[dsh-dsh-translate](https://github.com/PerryLink/dsh-dsh-translate)** | Tradução de parâmetros entre fornecedores e reparo determinístico de JSON para DeepSeek Harness. | |
172
241
 
173
242
  ## Disclaimer
174
243
 
package/README.zh.md CHANGED
@@ -1,10 +1,13 @@
1
1
  <div align="center">
2
2
 
3
3
  # 🐳 dsh-plugin-guide
4
+ - **1024 商店渠道**:先 `npm i -g dsh1024`,再 `dsh1024 plugin --profile web add dsh-plugin-guide`(计入 [deepseek1024.com](https://deepseek1024.com) 安装排行)。
4
5
 
5
6
  **构建 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 插件所需的一切。**
6
7
 
7
- *官方文档档案 · Cordis 入门 · 社区深读 · 实战踩坑 · agent 技能*
8
+ *官方文档档案 · Cordis 入门 · 社区深读 · 实战踩坑 · agent 技能 · CLI 工具链*
9
+
10
+ > **官方仓库。** 本仓库是 dsh-plugin-guide 的唯一官方仓库,由 PerryLink 维护。其他账号下的同名仓库与本项目无关。
8
11
 
9
12
  [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
10
13
  [![DSH plugin](https://img.shields.io/badge/dsh-plugin-✅-green)](https://github.com/topics/dsh-plugin)
@@ -31,13 +34,14 @@
31
34
 
32
35
  ## What you get
33
36
 
34
- `dsh-plugin-guide` 是 DSH 插件开发知识库,打包为可安装 bundle,把整份内容注册为 `dsh-plugin-guide` agent 技能。该技能在每个会话目录中都可见,并按需加载其工作流步骤、官方文档与社区深读。
37
+ `dsh-plugin-guide` 是 DSH 插件开发知识库加 CLI 工具链,打包为一个可安装 bundle。知识库注册为 `dsh-plugin-guide` agent 技能(在每个会话目录可见,按需加载工作流步骤、官方文档与社区深读);`dsh-plugin-dev` CLI 在其之上提供三个机械层。
35
38
 
36
39
  - **插件契约与红线** —— effect/disposer、waterfall `next()`、模型可见 ⟺ 已记录、Schemastery 配置。
37
40
  - **官方文档档案** —— 官方仓库文档(英 + 中)逐字副本,在最近核验快照处与上游逐字节一致。
38
41
  - **Cordis 入门** —— 五个概念与机制时间线(repository-plugin 0809 引入、0811 移除;两条安装通道)。
39
42
  - **20+ 个实战踩坑** —— 附根因 + 修法(cordis 双副本、tsconfig 三件套、多帧 zstd 会话、Windows junction、过期 npm `latest`…)。
40
43
  - **社区深读** —— 归档 114 个社区仓库(15 个深读),外加每条事实都链回出处的完整来源索引。
44
+ - **CLI 工具链** —— `dsh-plugin-dev new / check / verify`:脚手架、静态检查、打包验证 DSH 插件;每个检查项都链回它强制执行的技能章节。
41
45
 
42
46
  ## Knowledge base
43
47
 
@@ -51,8 +55,42 @@
51
55
  | `references/official-docs/` | 官方仓库文档逐字副本(英 + 中) |
52
56
  | `references/*.md` | 调研报告:仓库文档、网站、Cordis、论文、社区生态、114 仓库归档(15 个深读) |
53
57
  | `scripts/` | 幂等下载脚本 + 完整性检查器 + 话题快照生成器 |
58
+ | `bin/` · `src/cli/` · `dist/` | `dsh-plugin-dev` CLI:脚手架、检查器、验证器(TypeScript,tsdown 打包) |
59
+ | `templates/` | TS + JS 脚手架骨架:契约模板、Config、tests、cordis.patch.yml、五语 README |
54
60
  | `downloads/` | 原始快照 —— 由 `scripts/` 生成、不入库 |
55
61
 
62
+ ## CLI toolchain
63
+
64
+ bundle 附带零运行时依赖的 `dsh-plugin-dev` CLI(`bin/` → tsdown 打包的 `dist/dsh-plugin-dev.js`)。每个检查项都引用它强制执行的技能章节,agent 可继续人工审计。
65
+
66
+ ```sh
67
+ dsh-plugin-dev new <name> [--lang ts|js] [--dir <path>] [--force] [--git]
68
+ dsh-plugin-dev check [--cwd <dir>] [--json] [--strict]
69
+ dsh-plugin-dev verify [--cwd <dir>] [--dsh <bin>] [--pnpm <bin>]
70
+ ```
71
+
72
+ | 子命令 | 作用 |
73
+ |---|---|
74
+ | `new <name>` | 脚手架生成 TS 或 JS 插件仓库:`src/index.ts` 契约模板、Schemastery Config、tests、tsdown/vitest、注释齐全的 `cordis.patch.yml`、五语 README。幂等;无 `--force` 时拒绝覆盖非空目录。 |
75
+ | `check` | 静态检查:`cordis.patch.yml` 合法性、`package.json` 元数据(`dsh.bundle.patch` 指向、peer 依赖、engines、files 白名单)、五语 README 一致性、工程红线模式。输出 CI 可消费的 JSON。 |
76
+ | `verify` | `pnpm pack` 后装入干净 mkdtemp `DSH_HOME` profile 做安装/启动/卸载冒烟(对齐 `verify:self-contained`)。失败给出日志尾部与建议。 |
77
+
78
+ ### CLI configuration
79
+
80
+ CLI 无硬编码可调参数——每个都是 flag 或环境变量。
81
+
82
+ | 可调项 | Flag | 环境变量 | 默认 |
83
+ |---|---|---|---|
84
+ | 模板目录 | — | `DSH_PLUGIN_DEV_TEMPLATES` | `<package>/templates` |
85
+ | dsh 二进制 | `--dsh` | `DSH_PLUGIN_DEV_DSH` | `dsh` |
86
+ | pnpm 二进制 | `--pnpm` | `DSH_PLUGIN_DEV_PNPM` | `pnpm` |
87
+ | 安装/打包超时 | `--timeout` | `DSH_PLUGIN_DEV_TIMEOUT` | `300000` ms |
88
+ | headless 冒烟超时 | `--smoke-timeout` | `DSH_PLUGIN_DEV_SMOKE_TIMEOUT` | `120000` ms |
89
+
90
+ ### Upstream roadmap
91
+
92
+ `dsh-plugin-dev` 是官方插件开发 CLI(规划项 C12)的上游候选:脚手架/检查器/验证器是机械层,`SKILL.md` + `guide/` 仍是认知层。
93
+
56
94
  ## Quick start
57
95
 
58
96
  ```sh
@@ -68,6 +106,14 @@ dsh --profile web --dump-config | grep -A3 'id: dsh-plugin-guide'
68
106
 
69
107
  然后直接问你的 agent:*"用 dsh-plugin-guide 技能帮我构建一个 … 插件。"*
70
108
 
109
+ 或者直接驱动 CLI:
110
+
111
+ ```sh
112
+ npx dsh-plugin-guide new hello-plugin # 脚手架生成 TS 插件仓库
113
+ npx dsh-plugin-guide check --json # 静态检查
114
+ npx dsh-plugin-guide verify # 打包 + 干净 profile 冒烟
115
+ ```
116
+
71
117
  ## Install & uninstall
72
118
 
73
119
  - **git channel**(最新 `main`):`dsh plugin --profile web add github:PerryLink/dsh-plugin-guide#<sha>` —— 固定提交以可复现;入口是纯 ESM JS,无构建步骤。
@@ -94,13 +140,14 @@ pwsh -File scripts/install-skill.ps1 -Target ~/.deepseek/skills/dsh-plugin-guide
94
140
 
95
141
  ## Configuration
96
142
 
97
- `dsh-plugin-guide` 不暴露任何 Schemastery `Config` —— 它把知识库注册为 agent 技能,无可调键。
143
+ 技能 bundle 不暴露任何 Schemastery `Config` —— 它把知识库注册为 agent 技能,无可调键。`dsh-plugin-dev` CLI 从 flag 与 `DSH_PLUGIN_DEV_*` 环境变量读取可调项(见 [CLI toolchain](#cli-toolchain))。
98
144
 
99
145
  ## Tools & surfaces
100
146
 
101
147
  | Surface | Kind | Notes |
102
148
  |---|---|---|
103
149
  | `dsh-plugin-guide` | skill | 经 `ctx.skills` 注册;按需加载 `SKILL.md` + `./guide/` + `./references/` |
150
+ | `dsh-plugin-dev` | bin (CLI) | `new` / `check` / `verify` 子命令;非 DSH 插件行 |
104
151
 
105
152
  ## Permissions & data
106
153
 
@@ -133,15 +180,22 @@ pwsh -File scripts/verify-kit.ps1 -Checkout <checkout> # 关键路径 +
133
180
 
134
181
  ## Development
135
182
 
136
- bundle 是纯 ESM —— 无构建步骤。CI 在每次 push 与 pull request 运行完整性门禁:
183
+ 技能 bundle(`index.js`)是纯 ESM、无构建步骤;`dsh-plugin-dev` CLI TypeScript,经 tsdown 构建。门禁:
137
184
 
138
185
  ```sh
186
+ pnpm install --frozen-lockfile
187
+ pnpm run typecheck && pnpm run typecheck:ci
188
+ pnpm test
189
+ pnpm run build
190
+ pnpm run verify:artifacts # 自检 + 脚手架冒烟(无网络)
191
+ pnpm run verify:self-contained # 打包 + 干净 profile 安装/启动/卸载冒烟
192
+ pnpm pack
139
193
  pwsh -File scripts/verify-kit.ps1 # 关键路径 + 链接扫描(加 -Checkout <checkout> 做文档漂移)
140
194
  ```
141
195
 
142
196
  ## Topics
143
197
 
144
- `dsh`, `deepseek-harness`, `dsh-plugin`, `cordis`, `agent-skill`, `plugin-development`, `knowledge-base`
198
+ `dsh`, `deepseek-harness`, `dsh-plugin`, `cordis`, `agent-skill`, `plugin-development`, `knowledge-base`, `cli`, `scaffold`, `checker`
145
199
 
146
200
  ## Contributors
147
201
 
@@ -150,25 +204,42 @@ pwsh -File scripts/verify-kit.ps1 # 关键路径 + 链接扫描(加 -Checkou
150
204
 
151
205
  ## PerryLink DSH Plugin Family
152
206
 
153
- 本项目是 [PerryLink](https://github.com/PerryLink) 维护的 [15 个 DeepSeek Harness 插件](https://github.com/PerryLink) 之一。如果这个对你有用,其他插件多半也有用:
207
+ 这是 [PerryLink](https://github.com/PerryLink) 维护的 [33 个 DeepSeek Harness 插件](https://github.com/PerryLink) 之一。如果它能帮到你,其他的也会:
154
208
 
155
209
  | Plugin | One-liner |
156
210
  |---|---|
157
- | [dsh-mcp-panel](https://github.com/PerryLink/dsh-mcp-panel) | Read-only MCP runtime panel: /mcp command + Settings tab with status, tools and errors |
158
- | [dsh-doublecheck](https://github.com/PerryLink/dsh-doublecheck) | Engineering-discipline guard: requirements grill, test gates, adversary review |
159
- | [dsh-background-agents](https://github.com/PerryLink/dsh-background-agents) | Durable background child agents with a Web UI sidebar, messaging and interrupt |
160
- | [dsh-lsp-actions](https://github.com/PerryLink/dsh-lsp-actions) | LSP diagnostics, formatting, completion, code actions and rename over language servers |
161
- | [dsh-output-styles](https://github.com/PerryLink/dsh-output-styles) | Claude Code outputStyles-equivalent runtime style switching |
162
- | [dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-checkpoint-rewind) | Claude Code /rewind-equivalent: snapshots, session forks, one-shot restore |
163
- | [dsh-permission-rules](https://github.com/PerryLink/dsh-permission-rules) | Claude Code-style declarative allow/deny/ask permission rules with audit |
164
- | [dsh-auto-review](https://github.com/PerryLink/dsh-auto-review) | Second-model auto-review on the approval chain, fail-closed by default |
165
- | [dsh-memento](https://github.com/PerryLink/dsh-memento) | Approval-gated cross-session memory: ctx.memory seam + SQLite + memory tool |
166
- | [dsh-skill-pack-security](https://github.com/PerryLink/dsh-skill-pack-security) | Security-audit skill pack: secret scan, dependency and supply-chain review |
167
- | [dsh-session-pin](https://github.com/PerryLink/dsh-session-pin) | Pin sessions in the Web sidebar with durable ordering |
168
- | [dsh-composer-history](https://github.com/PerryLink/dsh-composer-history) | Terminal-style input history for the web composer: arrows, Ctrl+R search |
169
- | [dsh-github](https://github.com/PerryLink/dsh-github) | GitHub PR/issues integration for DSH, every write gated by approval |
170
- | **[dsh-plugin-guide](https://github.com/PerryLink/dsh-plugin-guide)** | Plugin-development knowledge base as an on-demand agent skill |
171
- | [dsh-claude-move](https://github.com/PerryLink/dsh-claude-move) | Migrate Claude Code sessions, memory, skills and CLAUDE.md into DSH |
211
+ | **[dsh-dsh-auto-review](https://github.com/PerryLink/dsh-dsh-auto-review)** | 审批链上的第二模型自动审查,默认失败关闭 | |
212
+ | **[dsh-dsh-background-agents](https://github.com/PerryLink/dsh-dsh-background-agents)** | Web UI 侧栏、消息与中断的持久后台子代理 | |
213
+ | **[dsh-dsh-budget](https://github.com/PerryLink/dsh-dsh-budget)** | DeepSeek Harness 的成本治理:预算、碳排与延迟一屏呈现。 | |
214
+ | **[dsh-dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-dsh-checkpoint-rewind)** | Claude Code /rewind 等价:快照、会话 fork、一次性恢复 | |
215
+ | **[dsh-dsh-claude-move](https://github.com/PerryLink/dsh-dsh-claude-move)** | Claude Code 会话、记忆、技能与 CLAUDE.md 迁入 DSH | |
216
+ | **[dsh-dsh-click](https://github.com/PerryLink/dsh-dsh-click)** | 跨平台原生桌面控制(DeepSeek Harness),Windows 优先。 | |
217
+ | **[dsh-dsh-composer-history](https://github.com/PerryLink/dsh-dsh-composer-history)** | Web 输入框的终端式历史:方向键、Ctrl+R 搜索 | |
218
+ | **[dsh-dsh-data-quality](https://github.com/PerryLink/dsh-dsh-data-quality)** | 数据集质量检查与引文核查(本插件可选消费的数字核查桥) | |
219
+ | **[dsh-dsh-defend](https://github.com/PerryLink/dsh-dsh-defend)** | DeepSeek Harness 的提示注入、越狱与密钥泄露防护。 | |
220
+ | **[dsh-dsh-doublecheck](https://github.com/PerryLink/dsh-dsh-doublecheck)** | 工程纪律守卫:需求质询、测试门禁、对手评审 | |
221
+ | **[dsh-dsh-draw](https://github.com/PerryLink/dsh-dsh-draw)** | DeepSeek Harness 的统一静态图像生成路由。 | |
222
+ | **[dsh-dsh-fast](https://github.com/PerryLink/dsh-dsh-fast)** | DeepSeek Harness 只读性能诊断。 | |
223
+ | **[dsh-dsh-fund-research](https://github.com/PerryLink/dsh-dsh-fund-research)** | 面向中国公募基金的确定性研究报告 | |
224
+ | **[dsh-dsh-github](https://github.com/PerryLink/dsh-dsh-github)** | 面向 DSH GitHub PR/issues 集成,每次写入经审批门控 | |
225
+ | **[dsh-dsh-industry-research](https://github.com/PerryLink/dsh-dsh-industry-research)** | 行业研究编排,经本插件的 `ctx.researchReport.assemble` 封存交付物 | |
226
+ | **[dsh-dsh-library](https://github.com/PerryLink/dsh-dsh-library)** | DeepSeek Harness 的本地文档知识库。 | |
227
+ | **[dsh-dsh-local-ai](https://github.com/PerryLink/dsh-dsh-local-ai)** | DeepSeek Harness 的本地模型(Ollama)接入。 | |
228
+ | **[dsh-dsh-lsp-actions](https://github.com/PerryLink/dsh-dsh-lsp-actions)** | 通过语言服务器的 LSP 诊断、格式化、补全、代码操作与重命名 | |
229
+ | **[dsh-dsh-mask](https://github.com/PerryLink/dsh-dsh-mask)** | PII 脱敏中间件:模型边界匿名化、展示层还原 | |
230
+ | **[dsh-dsh-mcp-panel](https://github.com/PerryLink/dsh-dsh-mcp-panel)** | 只读 MCP 运行时面板:/mcp 命令 + 带状态、工具与错误的 Settings 标签页 | |
231
+ | **[dsh-dsh-memento](https://github.com/PerryLink/dsh-dsh-memento)** | 审批门控的跨会话记忆:ctx.memory 接缝 + SQLite + 记忆工具 | |
232
+ | **[dsh-dsh-observe](https://github.com/PerryLink/dsh-dsh-observe)** | DeepSeek Harness 的 OpenTelemetry 与 Langfuse 可观测导出器。 | |
233
+ | **[dsh-dsh-output-styles](https://github.com/PerryLink/dsh-dsh-output-styles)** | Claude Code outputStyles 等价的运行时风格切换 | |
234
+ | **[dsh-dsh-permission-rules](https://github.com/PerryLink/dsh-dsh-permission-rules)** | Claude Code 风格声明式 allow/deny/ask 权限规则,带审计 | |
235
+ | **[dsh-dsh-research-report](https://github.com/PerryLink/dsh-dsh-research-report)** | 可验证研究报告引擎:内容寻址证据账本与封存版本 | |
236
+ | **[dsh-dsh-score](https://github.com/PerryLink/dsh-dsh-score)** | DeepSeek Harness 插件的多维质量评分。 | |
237
+ | **[dsh-dsh-session-pin](https://github.com/PerryLink/dsh-dsh-session-pin)** | 在 Web 侧栏置顶会话,带持久排序 | |
238
+ | **[dsh-dsh-session-sync](https://github.com/PerryLink/dsh-dsh-session-sync)** | DeepSeek Harness 的跨设备会话同步——会话存储的专用 git 镜像。 | |
239
+ | **[dsh-dsh-skill-pack-security](https://github.com/PerryLink/dsh-dsh-skill-pack-security)** | 安全审计技能包:密钥扫描、依赖与供应链审查 | |
240
+ | **[dsh-dsh-talk](https://github.com/PerryLink/dsh-dsh-talk)** | DeepSeek Harness 的语音优先会话闭环:对它说,听它答。 | |
241
+ | **[dsh-dsh-test-drive](https://github.com/PerryLink/dsh-dsh-test-drive)** | DeepSeek Harness 插件的隔离试装冒烟。 | |
242
+ | **[dsh-dsh-translate](https://github.com/PerryLink/dsh-dsh-translate)** | DeepSeek Harness 的厂商参数翻译与确定性 JSON 修复。 | |
172
243
 
173
244
  ## Disclaimer
174
245
 
package/SKILL.md CHANGED
@@ -62,8 +62,18 @@ description: Use when developing, reviewing, packaging, debugging, or answering
62
62
  - 安装/刷新 agent 技能副本:`pwsh -File ./scripts/install-skill.ps1 -Target <skill目录>`(跳过 downloads/ 与 .github/,逐字节校验)。
63
63
  - 冲突裁决:与官方文档冲突时以 `references/official-docs/`(官方仓库原文)为准。
64
64
 
65
+ ## CLI 工具链(dsh-plugin-dev)
66
+
67
+ 本仓库随 bundle 附带零依赖 CLI `dsh-plugin-dev`,把机械检查自动化(知识库仍是认知层,CLI 是机械层):
68
+
69
+ - `dsh-plugin-dev new <name>`:参数化脚手架,生成 TS 或 JS 插件仓库骨架(`src/index.ts` 契约模板、Schemastery Config、tests、tsdown/vitest、注释齐全的 `cordis.patch.yml`、五语 README),模板与 `references/official-docs` 同步更新。
70
+ - `dsh-plugin-dev check [--json] [--strict]`:静态检查(`cordis.patch.yml` 合法性、`package.json` 元数据(`dsh.bundle.patch` 指向/peer 依赖/engines/files 白名单)、五语 README 一致性、工程红线模式),输出 CI 可消费的结构化 JSON;每个检查项在输出里引用本知识库对应章节(skill 联动),agent 可继续人工审计。
71
+ - `dsh-plugin-dev verify`:`pnpm pack` 后装入干净临时 `DSH_HOME` profile 做安装+启动+卸载冒烟(对齐官方 verify:self-contained);失败给出日志尾部与建议。
72
+
73
+ 三个子命令均可逆/幂等;网络/子进程尊重超时与 AbortSignal;只清理自己 mkdtemp 的目录。CLI 零运行时依赖,构建产物经 tsdown 打包为单文件 `dist/dsh-plugin-dev.js`。
74
+
65
75
  ## 边界
66
76
 
67
- - 本技能是"指引 + 约束 + 资料索引",不是脚本/清单的机械执行;精确 API 以生成式参考为准。
77
+ - 本技能是"指引 + 约束 + 资料索引";机械检查由 `dsh-plugin-dev check` 承担,精确 API 以生成式参考为准。
68
78
  - 不得修改知识库外的 harness 仓库文件,除非用户明确要求;vendor/ 与 `.agents/notes/archived/` 只读。
69
79
  - 引用 `downloads/` 内容前先确认其存在(该目录不入 git,需按上文脚本生成);`awesome-dsh-plugins` 的归档仅供本地参考,**不得随仓库再分发**(其上游声明内部使用约束,见 NOTICE.md)。
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ // dsh-plugin-dev CLI entry shim. The real implementation is the tsdown-bundled
3
+ // `dist/dsh-plugin-dev.js` (built by `pnpm run build` / `prepack`). Keeping this
4
+ // shim as a stable path lets the bin stay fixed while the bundle filename may
5
+ // change across tsdown versions.
6
+ import '../dist/dsh-plugin-dev.js'
package/cordis.patch.yml CHANGED
@@ -1,4 +1,9 @@
1
1
  # dsh-plugin-guide bundle layer: register the packaged knowledge base as an agent skill.
2
+ # This file is the `dsh.bundle.patch` layer (see package.json#dsh.bundle.patch).
3
+ # Layer semantics: a YAML array of row verbs; `insert` adds plugin rows to the
4
+ # composed config. Later layers override a row by `id` (whole-config replacement).
2
5
  - insert:
6
+ # `id`: stable row identifier used by later layers to override this row.
3
7
  - id: dsh-plugin-guide
8
+ # `name`: the module the loader imports; resolves to this package's entry (package.json#main → index.js).
4
9
  name: dsh-plugin-guide