dsh-hiss-plugins 1.1.0 → 1.2.0
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/README.md +31 -13
- package/cordis.patch.yml +5 -2
- package/lib/client.js +3 -0
- package/lib/init/index.js +72 -0
- package/lib/init/prompt.js +92 -0
- package/locale/en.json +3 -2
- package/locale/zh.json +3 -2
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# dsh-hiss-plugins
|
|
2
2
|
|
|
3
|
-
一个 DeepSeek Harness **bundle
|
|
3
|
+
一个 DeepSeek Harness **bundle 插件**,把七个功能装在一个包里:**colgrep**(语义代码检索)、**codegraph**(代码图 MCP)、**project-mcp**(项目 `.mcp.json`)、**git-bash**(Windows 上的 Git Bash shell)、**superpowers**(superpowers 技能常驻引导)、**ponytail**(ponytail 采纳提示与 `/ponytail` 等级切换)、**init**(读项目生成 `AGENTS.md`)。七个功能各占一条顶层行,可以在 **Plugins 页**里单独开关;包还带一个管理标签,就挂在那个页面上。
|
|
4
4
|
|
|
5
5
|
安装后对 `web`、`headless` 等任意 profile 的**所有 preset、所有会话**生效。
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## 八条行与七个开关
|
|
8
8
|
|
|
9
|
-
`cordis.patch.yml` 只做一件事:`insert`
|
|
9
|
+
`cordis.patch.yml` 只做一件事:`insert` 八条**顶层行**。宿主用 `name`(模块说明符)解析模块,用 `id` 记住开关状态。
|
|
10
10
|
|
|
11
11
|
| 行 id | 模块 | 作用 | 默认 |
|
|
12
12
|
|---|---|---|---|
|
|
@@ -17,8 +17,9 @@
|
|
|
17
17
|
| `dsh-hiss-plugins-gitbash` | `dsh-hiss-plugins/gitbash` | Windows 上接入 Git Bash:提供 `ctx.shell` + 宿主 `bash` 工具 | 非 Windows 关 |
|
|
18
18
|
| `dsh-hiss-plugins-superpowers` | `dsh-hiss-plugins/superpowers` | superpowers 技能常驻引导:任何回复前先检查有没有适用的技能,有就先加载(技能集本身由 DSH 原生发现) | 开 |
|
|
19
19
|
| `dsh-hiss-plugins-ponytail` | `dsh-hiss-plugins/ponytail` | ponytail 采纳提示(随等级变化)+ 宿主 `/ponytail` 等级命令 | 开 |
|
|
20
|
+
| `dsh-hiss-plugins-init` | `dsh-hiss-plugins/init` | 宿主 `/init` 命令:读项目、生成/更新 `AGENTS.md` | 开 |
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
**七条功能行就是 Plugins 页里那七个开关。** 载体行不在标签的开关列表里 —— 它是空的 host 半,但只有它在,浏览器半才会被送进页面;关掉它,管理标签本身就没了。
|
|
22
23
|
|
|
23
24
|
为什么必须是顶层行:插件管理器只为「组合后的 patch 里存在同 `id`、同 `name`,且挂载后父 entry 就是 profile 的 `include`」的行持久化开关。包在 `cordis:group` 里的子行在 `listPlugins()` 里被判为 `unaddressable`,**永远不会有开关**。所以这里没有组:git-bash 行把 realm 隔离写在自己身上(见下)。
|
|
24
25
|
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
- 宿主把 `{ id: <行 id>, disabled: <bool> }` 覆盖写进 **profile 自己的** `cordis.patch.yml`(保留注释、原子写)—— 只影响这个 profile,不动包内的 `cordis.patch.yml`,所以升级/重装不会丢开关。
|
|
31
32
|
- **带 HMR 的 profile 立即生效**(远程结果 `application: "applied"`);**没有 HMR 的 profile 返回 `application: "restart-required"`(`restartReason: "no-hmr"`),重启 dsh 才生效**。
|
|
32
33
|
- 行不可开关时,`listPlugins()` 会给出 `readOnlyReason`:`unaddressable`(不是顶层行 / 名字对不上)或 `management-required`(插件管理器自己的行或受保护模块)。
|
|
33
|
-
-
|
|
34
|
+
- 关掉一条功能行只是让那条行不激活:另外六条行不受影响,管理标签仍在(载体行开着)。
|
|
34
35
|
|
|
35
36
|
## 安装 / 卸载
|
|
36
37
|
|
|
@@ -39,7 +40,7 @@ dsh plugin --profile web add dsh-hiss-plugins
|
|
|
39
40
|
# 或从本仓 checkout:dsh plugin --profile web add link:./dsh-hiss-plugins
|
|
40
41
|
```
|
|
41
42
|
|
|
42
|
-
把 `web` 换成你的 profile 名(例如 `headless`),然后**重启 dsh**。`dsh plugin` 会把本包装进 profile 的 `node_modules`;因为 `package.json` 声明了 `dsh.bundle.patch`,profile 的 bundle 列表会自动追加 `dsh-hiss-plugins
|
|
43
|
+
把 `web` 换成你的 profile 名(例如 `headless`),然后**重启 dsh**。`dsh plugin` 会把本包装进 profile 的 `node_modules`;因为 `package.json` 声明了 `dsh.bundle.patch`,profile 的 bundle 列表会自动追加 `dsh-hiss-plugins`,重启后八条行一起激活。
|
|
43
44
|
|
|
44
45
|
```powershell
|
|
45
46
|
dsh plugin --profile web remove dsh-hiss-plugins
|
|
@@ -49,7 +50,7 @@ dsh plugin --profile web remove dsh-hiss-plugins
|
|
|
49
50
|
|
|
50
51
|
## 管理标签(浏览器半)
|
|
51
52
|
|
|
52
|
-
Plugins 页(侧边栏 **插件**)里多出一个 `dsh-hiss-plugins`
|
|
53
|
+
Plugins 页(侧边栏 **插件**)里多出一个 `dsh-hiss-plugins` 标签,列出上面七条功能行与它们的开关。
|
|
53
54
|
|
|
54
55
|
- 浏览器半是 **`lib/client.js`** —— 手写的 lazy-CJS bundle,没有构建步骤:`window.__ModuleLoader__.load({ id: "dsh-hiss-plugins", factory })` 只注册工厂,模块体(slot 注册、locale 字典)在首次被 require 时执行。`id` 必须逐字等于包名(客户端图里的行 id 就是包名)。
|
|
55
56
|
- `package.json` 里 `dsh.client.platform = "web"`、`exports["./client"]` 指向 `lib/client.js`;客户端模块系统按 Loader 行扫描,**只有本包有行挂载,这个文件才会被送进浏览器**。
|
|
@@ -306,6 +307,22 @@ colgrep command:"init" / command:"status" / command:"clear"
|
|
|
306
307
|
|
|
307
308
|
验证:`/ponytail ultra` 后给一个编码任务,模型应加载 `ponytail` 技能并按 ultra 档执行;`/ponytail off` 后该提示词段变空。
|
|
308
309
|
|
|
310
|
+
## 功能:init(读项目生成 AGENTS.md)
|
|
311
|
+
|
|
312
|
+
注册宿主命令 **`/init`**:把一条固定的、面向仓库调研的指令作为持久 user 消息交给模型,让智能体先读项目、再在项目根写 `AGENTS.md`。插件本身不读文件、不生成内容 —— 阅读、检索、写入都走智能体已有的工具,指令的质量就是功能的全部。
|
|
313
|
+
|
|
314
|
+
- **目标位置**:从会话工作目录向上找最近的、含 `.git` 的祖先目录作为项目根,写 `<项目根>/AGENTS.md`;找不到 `.git` 时用工作目录本身。
|
|
315
|
+
- **已有文件按增量合并**:先读 `AGENTS.md`,保留仍然正确的内容与维护者手写的规则,只删除错误或重复的部分并说明删了什么。没有 `AGENTS.md` 但有 `CLAUDE.md` / `AGENT.md` 时,读它作为上下文、新建 `AGENTS.md`,不改写旧文件。
|
|
316
|
+
- **命令必须有证据**:只允许记录 manifest、脚本、Makefile、CI 文件或文档里真实存在的命令;提示词明确禁止编造命令/路径/脚本名/版本,也禁止为了“发现”事实去跑安装、构建、测试、网络或破坏性命令。
|
|
317
|
+
- **结构**:项目概览、安装/首次运行、构建/测试/lint(含单测跑法)、架构地图、仓库特有约定、测试要求、Git/PR 规则、安全与陷阱;没有内容的段直接省略。目标 80–150 行,约 200 行是硬上限;用仓库现有文档的语言写;不写泛泛而谈的建议、不抄 README、不含密钥或个人路径。
|
|
318
|
+
- **完成前自检**:重新从磁盘读文件,逐条核对命令、路径、环境变量和配置名;确认文件回答了“怎么装、怎么验、核心代码在哪、什么不能碰”,并报告无法确认或刻意省略的内容。
|
|
319
|
+
- 命令**不接受参数**(`/init foo` 返回 `Usage: /init (no arguments)`),也不提交任何改动。
|
|
320
|
+
- 提示词在 `lib/init/prompt.js`(纯逻辑、无宿主导入),命令接缝在 `lib/init/index.js`(`commands` + `workingDirectory`,经 `invocation.agent.followup(createUserMessage(...))` 注入)。
|
|
321
|
+
|
|
322
|
+
前置要求:无 —— 只用宿主已有的 `commands`、`workingDirectory` 服务,以及 `@deepseek-ai/dsh-llm` 的 `createUserMessage`。
|
|
323
|
+
|
|
324
|
+
验证:在任意项目里执行 `/init`,模型应开始读仓库并写出 `AGENTS.md`;下一个会话由 DSH 的 `dsh-agent-instructions` 自动加载它。
|
|
325
|
+
|
|
309
326
|
## 开发与测试
|
|
310
327
|
|
|
311
328
|
```powershell
|
|
@@ -316,8 +333,8 @@ pnpm test # 在包目录内也可:node --test-isolation=none --test
|
|
|
316
333
|
结构:
|
|
317
334
|
|
|
318
335
|
```text
|
|
319
|
-
package.json
|
|
320
|
-
cordis.patch.yml
|
|
336
|
+
package.json 八条行的 bundle 声明(dsh.bundle.patch)+ 浏览器半声明(dsh.client)+ exports/files
|
|
337
|
+
cordis.patch.yml 八条顶层行(载体 + 七个功能)
|
|
321
338
|
lib/index.js 载体行:空 host 半
|
|
322
339
|
lib/client.js 浏览器半:Plugins 页管理标签(手写 lazy-CJS,无构建步骤)
|
|
323
340
|
lib/colgrep/ colgrep 工具
|
|
@@ -326,17 +343,18 @@ lib/project-mcp/ lib/config.js 纯逻辑(无宿主依赖)+ lib/index.js
|
|
|
326
343
|
lib/gitbash/ lib/resolve.js 纯逻辑 + lib/gitbash-executor.js 执行器 + lib/index.js 组合根
|
|
327
344
|
lib/superpowers/ 常驻引导提示词段(只注册 systemPrompt 段,不导入宿主包)
|
|
328
345
|
lib/ponytail/ lib/mode.js 纯逻辑(等级解析与默认值)+ lib/index.js 提示词段与 /ponytail 命令
|
|
346
|
+
lib/init/ lib/prompt.js 纯逻辑(/init 指令正文)+ lib/index.js 命令接缝
|
|
329
347
|
locale/*.json 管理标签的文案字典
|
|
330
|
-
test/ node:test:<feature>/
|
|
348
|
+
test/ node:test:<feature>/ 七个目录 + manifest / patch / client 三个契约测试
|
|
331
349
|
```
|
|
332
350
|
|
|
333
|
-
`lib/project-mcp/config.js`、`lib/gitbash/resolve.js` 与 `lib/
|
|
351
|
+
`lib/project-mcp/config.js`、`lib/gitbash/resolve.js`、`lib/ponytail/mode.js` 与 `lib/init/prompt.js` 刻意不导入任何宿主包,所以这些纯逻辑分支可以在没有 dsh 安装的环境里完整跑测试;宿主接缝由各功能的 `index.js` 承担。浏览器半用 fake `window.__ModuleLoader__` + fake `ctx` 测注册与远程调用,不启动浏览器。测试全部离线,不联网、不依赖 `colgrep`/`codegraph` CLI。
|
|
334
352
|
|
|
335
353
|
## 发布(给维护者)
|
|
336
354
|
|
|
337
355
|
```powershell
|
|
338
|
-
git tag dsh-hiss-plugins@1.
|
|
339
|
-
git push origin dsh-hiss-plugins@1.
|
|
356
|
+
git tag dsh-hiss-plugins@1.2.0 # 必须与本目录 package.json 的 version 逐字一致
|
|
357
|
+
git push origin dsh-hiss-plugins@1.2.0
|
|
340
358
|
```
|
|
341
359
|
|
|
342
360
|
CI(`.github/workflows/publish.yml`,Windows runner)解析 tag、跑全量测试,再用 **npm trusted publishing(OIDC,无需任何 token)** 发布;包内 `prepublishOnly` 会再跑一次 `npm test`。手工发布:`npm publish`(`publishConfig.access` 已设为 public),发版前先 `node ../scripts/smoke-profile.mjs` 走一遍真实安装 + 真启动。发布新版本前记得递增 `package.json` 的 `version`。
|
package/cordis.patch.yml
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# dsh-hiss-plugins bundle patch: one package,
|
|
1
|
+
# dsh-hiss-plugins bundle patch: one package, eight top-level rows.
|
|
2
2
|
#
|
|
3
3
|
# The carrier row (`dsh-hiss-plugins`) is an empty host half: it exists so the package
|
|
4
4
|
# holds a Loader row, which is what the client module system serves the browser half
|
|
5
5
|
# (`lib/client.js`, the Plugins-page management tab) for.
|
|
6
6
|
#
|
|
7
|
-
# The
|
|
7
|
+
# The seven feature rows are deliberate TOP-LEVEL rows, never a `cordis:group` with
|
|
8
8
|
# children: the plugin manager can only persist enablement for an entry whose parent
|
|
9
9
|
# tree is the profile's include and that it can address by row id (see
|
|
10
10
|
# `dsh-plugin-manager`'s `listPlugins()`), so a nested row can never be switched from
|
|
@@ -37,3 +37,6 @@
|
|
|
37
37
|
|
|
38
38
|
- id: dsh-hiss-plugins-ponytail
|
|
39
39
|
name: 'dsh-hiss-plugins/ponytail'
|
|
40
|
+
|
|
41
|
+
- id: dsh-hiss-plugins-init
|
|
42
|
+
name: 'dsh-hiss-plugins/init'
|
package/lib/client.js
CHANGED
|
@@ -34,6 +34,7 @@ window.__ModuleLoader__.load({
|
|
|
34
34
|
{ key: "gitbash", moduleName: `${PACKAGE_ID}/gitbash`, description: "featureGitbashDescription" },
|
|
35
35
|
{ key: "superpowers", moduleName: `${PACKAGE_ID}/superpowers`, description: "featureSuperpowersDescription" },
|
|
36
36
|
{ key: "ponytail", moduleName: `${PACKAGE_ID}/ponytail`, description: "featurePonytailDescription" },
|
|
37
|
+
{ key: "init", moduleName: `${PACKAGE_ID}/init`, description: "featureInitDescription" },
|
|
37
38
|
];
|
|
38
39
|
/** The same features keyed by the name a card shows. */
|
|
39
40
|
const FEATURE_BY_KEY = new Map(FEATURES.map((feature) => [feature.key, feature]));
|
|
@@ -75,6 +76,7 @@ window.__ModuleLoader__.load({
|
|
|
75
76
|
featureGitbashDescription: "Windows 上的 Git Bash shell",
|
|
76
77
|
featureSuperpowersDescription: "superpowers 技能常驻引导(任何回复前先检查并加载技能)",
|
|
77
78
|
featurePonytailDescription: "ponytail 采纳提示与 /ponytail 等级切换",
|
|
79
|
+
featureInitDescription: "生成或更新项目 AGENTS.md(/init)",
|
|
78
80
|
};
|
|
79
81
|
/** English dictionary checked against the Chinese key set. */
|
|
80
82
|
const en = {
|
|
@@ -96,6 +98,7 @@ window.__ModuleLoader__.load({
|
|
|
96
98
|
featureGitbashDescription: "Git Bash shell on Windows",
|
|
97
99
|
featureSuperpowersDescription: "always-on superpowers skill mandate",
|
|
98
100
|
featurePonytailDescription: "ponytail adoption hint and /ponytail level switching",
|
|
101
|
+
featureInitDescription: "generates or updates the project's AGENTS.md (/init)",
|
|
99
102
|
};
|
|
100
103
|
|
|
101
104
|
/** Read one thrown value as text. */
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `/init` command: hand the model one self-contained instruction to read the
|
|
3
|
+
* repository and write its AGENTS.md.
|
|
4
|
+
*
|
|
5
|
+
* The row does no filesystem work of its own. The agent already has the reading,
|
|
6
|
+
* search, and writing tools, and the prompt is the product; a generator here would
|
|
7
|
+
* duplicate those tools and still guess at the repository's commands. The thin seam
|
|
8
|
+
* also keeps the command usable from every UI that composes `commands`.
|
|
9
|
+
*
|
|
10
|
+
* @module dsh-hiss-plugins/init
|
|
11
|
+
*/
|
|
12
|
+
import { createUserMessage } from "@deepseek-ai/dsh-llm";
|
|
13
|
+
import { buildInitPrompt } from "./prompt.js";
|
|
14
|
+
|
|
15
|
+
export const name = "init";
|
|
16
|
+
export const inject = ["commands", "workingDirectory"];
|
|
17
|
+
|
|
18
|
+
/** The command is argument-free; extra input is a usage error, not a silent no-op. */
|
|
19
|
+
const USAGE = "Usage: /init (no arguments)";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Register the `/init` command.
|
|
23
|
+
*
|
|
24
|
+
* @param {import("@deepseek-ai/cordis").Context} ctx - host context carrying
|
|
25
|
+
* `commands` and `workingDirectory`.
|
|
26
|
+
*/
|
|
27
|
+
export function apply(ctx) {
|
|
28
|
+
ctx.commands.register({
|
|
29
|
+
name: "init",
|
|
30
|
+
description: "Read this project and write AGENTS.md",
|
|
31
|
+
handler: (invocation) => runInit(ctx, invocation),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Execute one `/init` invocation.
|
|
37
|
+
*
|
|
38
|
+
* @param {object} ctx host context.
|
|
39
|
+
* @param {object} invocation the command invocation.
|
|
40
|
+
* @returns {Promise<{ kind: "success" | "error", text: string }>} the command result.
|
|
41
|
+
*/
|
|
42
|
+
async function runInit(ctx, invocation) {
|
|
43
|
+
if (invocation.rawInput.trim().length > 0) return { kind: "error", text: USAGE };
|
|
44
|
+
const cwd = await resolveCwd(ctx, invocation);
|
|
45
|
+
invocation.agent.followup(createUserMessage({
|
|
46
|
+
content: [{ type: "text", text: buildInitPrompt(cwd) }],
|
|
47
|
+
source: { kind: "user" },
|
|
48
|
+
}));
|
|
49
|
+
return { kind: "success", text: "Reading this project and writing AGENTS.md." };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Name the session directory in the prompt, best effort.
|
|
54
|
+
*
|
|
55
|
+
* A failed lookup is not a reason to refuse: the agent's own tools still resolve
|
|
56
|
+
* relative paths against the session cwd, so the prompt simply omits the absolute
|
|
57
|
+
* path and lets the agent find the project root itself.
|
|
58
|
+
*
|
|
59
|
+
* @param {object} ctx host context.
|
|
60
|
+
* @param {object} invocation the command invocation.
|
|
61
|
+
* @returns {Promise<string | undefined>} the session working directory, when known.
|
|
62
|
+
*/
|
|
63
|
+
async function resolveCwd(ctx, invocation) {
|
|
64
|
+
try {
|
|
65
|
+
return await ctx.workingDirectory.ensure(invocation.agent, invocation.signal);
|
|
66
|
+
} catch (error) {
|
|
67
|
+
// A cancellation is not a bookkeeping failure: never enqueue a prompt the
|
|
68
|
+
// user has already withdrawn.
|
|
69
|
+
if (invocation.signal.aborted) throw error;
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `/init` instruction: the evidence the model must collect, the sections a
|
|
3
|
+
* useful AGENTS.md carries, and the checks that keep it honest.
|
|
4
|
+
*
|
|
5
|
+
* Kept free of host imports so the text is testable under this repo's own
|
|
6
|
+
* `node --test` (the same split `lib/ponytail/mode.js` and
|
|
7
|
+
* `lib/project-mcp/config.js` use).
|
|
8
|
+
*
|
|
9
|
+
* @module dsh-hiss-plugins/init/prompt
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/** The file this command produces. */
|
|
13
|
+
export const TARGET = "AGENTS.md";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The sections the prompt suggests, in order. Each entry is one source of truth:
|
|
17
|
+
* the prompt renders the same headings, and the tests assert every one survives.
|
|
18
|
+
*/
|
|
19
|
+
export const SECTIONS = [
|
|
20
|
+
{ heading: "Project overview", guidance: "what the project is, the stack and key versions, and the top-level layout (2–3 sentences)." },
|
|
21
|
+
{ heading: "Setup", guidance: "install and first-run commands, required runtime and tool versions, environment-file steps." },
|
|
22
|
+
{ heading: "Build, test, and lint", guidance: "exact commands, including how to run one test or one file, and what must pass before a change is done." },
|
|
23
|
+
{ heading: "Architecture", guidance: "where the core code lives and the rules that keep the parts separate." },
|
|
24
|
+
{ heading: "Conventions", guidance: "repository-specific style and patterns, not universal advice; one short real example when it beats prose." },
|
|
25
|
+
{ heading: "Testing", guidance: "what to add or update, fixtures, and the checks CI runs." },
|
|
26
|
+
{ heading: "Git and pull requests", guidance: "branch, commit message, pull request, and release or migration rules." },
|
|
27
|
+
{ heading: "Security and gotchas", guidance: "secrets, dangerous commands, generated files, and do-not-touch areas; state what is always done, what needs asking first, and what is never done." },
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Build the user message `/init` hands the model.
|
|
32
|
+
*
|
|
33
|
+
* @param {string | undefined} cwd the session working directory, when the host resolved one.
|
|
34
|
+
* @returns {string} the complete instruction.
|
|
35
|
+
*/
|
|
36
|
+
export function buildInitPrompt(cwd) {
|
|
37
|
+
const start = typeof cwd === "string" && cwd !== ""
|
|
38
|
+
? `\`${cwd}\``
|
|
39
|
+
: "the current session working directory";
|
|
40
|
+
const sections = SECTIONS
|
|
41
|
+
.map((section, index) => `${index + 1}. **${section.heading}** — ${section.guidance}`)
|
|
42
|
+
.join("\n");
|
|
43
|
+
return [
|
|
44
|
+
"Generate or update `AGENTS.md` for this repository.",
|
|
45
|
+
"",
|
|
46
|
+
"DSH loads this file at the start of future sessions, so write it to be read cold: the reader is a capable coding agent with no prior context. After reading this one file it should know how to set the project up, run the checks that matter, find the code, follow the house rules, and avoid the traps. Write for that reader, not for a human browsing the README.",
|
|
47
|
+
"",
|
|
48
|
+
"## 1. Locate the target",
|
|
49
|
+
`- Start from ${start}.`,
|
|
50
|
+
"- The project root is the nearest ancestor that contains `.git`; if there is none, use the working directory itself.",
|
|
51
|
+
"- The target is `<project root>/AGENTS.md`.",
|
|
52
|
+
"- If it already exists, read it first and update it in place. Keep accurate content and rules written by the maintainers; remove only what is wrong or redundant, and say what you removed.",
|
|
53
|
+
"- If it does not exist but `AGENT.md` or `CLAUDE.md` does, read that file for context and write a new `AGENTS.md`. Do not delete or rewrite the other file.",
|
|
54
|
+
"",
|
|
55
|
+
"## 2. Gather evidence",
|
|
56
|
+
"Read the files that tell a new teammate what to do. Check what exists:",
|
|
57
|
+
"- README and contributor docs; package manifests and workspace config (`package.json`, `pnpm-workspace.yaml`, `pyproject.toml`, `Cargo.toml`, `go.mod`, ...); lockfiles and toolchain pins; `Makefile` / `Taskfile` / `justfile` / `scripts/`; CI workflows; lint, format, type-check, and test config.",
|
|
58
|
+
"- The entry points, one or two representative source files, and the tests around them.",
|
|
59
|
+
"- Release, migration, and deployment notes when the repository has them.",
|
|
60
|
+
"",
|
|
61
|
+
"Extract:",
|
|
62
|
+
"- The exact install, setup, build, test, lint, and single-test commands the repository really uses. A command may appear only if it is written in a manifest, script, Makefile, CI file, or documentation, or you ran it successfully and it is cheap and safe. Never invent a command, path, script name, or version.",
|
|
63
|
+
"- The small set of directories and files that carry the core behavior, and the boundaries between them. Write a map, not a full tree.",
|
|
64
|
+
"- Conventions a newcomer cannot infer from a glance: module system and language level, formatting and lint rules, naming, error handling, layering, generated code, migrations, platform assumptions.",
|
|
65
|
+
"- The traps: setup steps that are easy to miss, ordering constraints, checks CI runs that differ from local ones, environment variables, platform quirks, known failures, generated files, and paths that must not be edited by hand.",
|
|
66
|
+
"",
|
|
67
|
+
"Change only `AGENTS.md` files — no source, configuration, or other documentation edits. Do not commit anything. Do not run installs, builds, test suites, network calls, or destructive commands merely to discover facts; inspect the repository instead.",
|
|
68
|
+
"",
|
|
69
|
+
"## 3. Write the file",
|
|
70
|
+
"Use only the sections this repository needs; omit empty ones. A useful order:",
|
|
71
|
+
sections,
|
|
72
|
+
"",
|
|
73
|
+
"Quality bar:",
|
|
74
|
+
"- Put the commands early: setup and build/test before deeper explanation, so the reader does not have to hunt.",
|
|
75
|
+
"- Be specific: `pnpm --filter web test` beats a vague instruction to run the tests; name the package, file, or test when it matters.",
|
|
76
|
+
"- Keep it tight: aim for 80–150 lines and treat about 200 as a hard ceiling unless the repository genuinely needs more. Prefer bullets and short tables to prose.",
|
|
77
|
+
"- Include only what is true for this repository. No generic advice, no marketing, no full API documentation, and no copying the README.",
|
|
78
|
+
"- Prefer facts the agent cannot get from one quick look; leave out obvious file lists.",
|
|
79
|
+
"- Write for any future agent, not just this run: no references to this conversation, the `/init` command, or the fact that the file was generated.",
|
|
80
|
+
"- Write in the language of the repository's existing documentation. If there is none, use the language of this conversation.",
|
|
81
|
+
"- In a monorepo, one root `AGENTS.md` is still the default. Add a short per-package section instead of creating nested files unless a package genuinely needs its own file.",
|
|
82
|
+
"- Never include secrets, tokens, personal paths, or values that only work on your machine.",
|
|
83
|
+
"",
|
|
84
|
+
"## 4. Verify before you finish",
|
|
85
|
+
"- Re-read the file from disk.",
|
|
86
|
+
"- Check every command, path, environment variable, and config name against the repository; fix or delete anything you cannot confirm.",
|
|
87
|
+
"- Check that the file answers: how to set up, how to run the relevant checks, where the core code lives, and what not to touch.",
|
|
88
|
+
"- Do not claim the file was written until it exists on disk.",
|
|
89
|
+
"",
|
|
90
|
+
"Finish with a short report: the absolute path, the line count, the evidence behind each command, and anything you could not verify or deliberately left out.",
|
|
91
|
+
].join("\n");
|
|
92
|
+
}
|
package/locale/en.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "dsh-hiss-plugins",
|
|
4
|
-
"description": "One DeepSeek Harness bundle carrying
|
|
4
|
+
"description": "One DeepSeek Harness bundle carrying seven switchable plugins — colgrep, codegraph, project-mcp, git-bash, superpowers, ponytail and init — managed from a tab in the Plugins page."
|
|
5
5
|
},
|
|
6
6
|
"loading": "Reading plugins…",
|
|
7
7
|
"error": "Plugins are unavailable: {error}",
|
|
@@ -20,5 +20,6 @@
|
|
|
20
20
|
"featureProjectMcpDescription": "mounts the project's .mcp.json per session",
|
|
21
21
|
"featureGitbashDescription": "Git Bash shell on Windows",
|
|
22
22
|
"featureSuperpowersDescription": "always-on superpowers skill mandate",
|
|
23
|
-
"featurePonytailDescription": "ponytail adoption hint and /ponytail level switching"
|
|
23
|
+
"featurePonytailDescription": "ponytail adoption hint and /ponytail level switching",
|
|
24
|
+
"featureInitDescription": "generates or updates the project's AGENTS.md (/init)"
|
|
24
25
|
}
|
package/locale/zh.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "dsh-hiss-plugins",
|
|
4
|
-
"description": "一个 DeepSeek Harness 组合包,携带 colgrep、codegraph、project-mcp、git-bash、superpowers、ponytail
|
|
4
|
+
"description": "一个 DeepSeek Harness 组合包,携带 colgrep、codegraph、project-mcp、git-bash、superpowers、ponytail、init 七个可独立开关的插件,并在插件页提供管理标签。"
|
|
5
5
|
},
|
|
6
6
|
"loading": "正在读取插件…",
|
|
7
7
|
"error": "暂时无法读取插件:{error}",
|
|
@@ -20,5 +20,6 @@
|
|
|
20
20
|
"featureProjectMcpDescription": "按会话挂载项目 .mcp.json",
|
|
21
21
|
"featureGitbashDescription": "Windows 上的 Git Bash shell",
|
|
22
22
|
"featureSuperpowersDescription": "superpowers 技能常驻引导(任何回复前先检查并加载技能)",
|
|
23
|
-
"featurePonytailDescription": "ponytail 采纳提示与 /ponytail 等级切换"
|
|
23
|
+
"featurePonytailDescription": "ponytail 采纳提示与 /ponytail 等级切换",
|
|
24
|
+
"featureInitDescription": "生成或更新项目 AGENTS.md(/init)"
|
|
24
25
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-hiss-plugins",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "dsh-hiss-plugins — one DeepSeek Harness bundle carrying
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "dsh-hiss-plugins — one DeepSeek Harness bundle carrying seven independently switchable plugins (colgrep, codegraph, project-mcp, git-bash, superpowers, ponytail, init) plus a management tab in the Plugins page.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
7
7
|
"deepseek-harness",
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
"git-bash",
|
|
13
13
|
"semantic-search",
|
|
14
14
|
"superpowers",
|
|
15
|
-
"ponytail"
|
|
15
|
+
"ponytail",
|
|
16
|
+
"agents-md",
|
|
17
|
+
"init"
|
|
16
18
|
],
|
|
17
19
|
"license": "MIT",
|
|
18
20
|
"author": {
|
|
@@ -37,6 +39,7 @@
|
|
|
37
39
|
"./gitbash": "./lib/gitbash/index.js",
|
|
38
40
|
"./superpowers": "./lib/superpowers/index.js",
|
|
39
41
|
"./ponytail": "./lib/ponytail/index.js",
|
|
42
|
+
"./init": "./lib/init/index.js",
|
|
40
43
|
"./client": "./lib/client.js",
|
|
41
44
|
"./locale/*.json": "./locale/*.json",
|
|
42
45
|
"./package.json": "./package.json"
|