@mengyuly/dsh-ponytail 0.3.0 → 0.3.2

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/CHANGELOG.md CHANGED
@@ -5,6 +5,31 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
5
 
6
6
  ## Unreleased
7
7
 
8
+ ## [0.3.2] - 2026-08-31
9
+
10
+ ### Changed
11
+
12
+ - Compressed the structured Lite/Full/Ultra prompt by merging shared end-to-end,
13
+ contract-preservation, disconnected-payload, and proportional-investigation rules;
14
+ the safety boundaries and Full seven-rung ladder remain intact. Lite also keeps
15
+ its non-challenge boundary and proportional investigation rule.
16
+ - Fixed the version-pinned GitHub Release example to use the asset name actually
17
+ published by v0.3.1; release-link verification now rejects unpublished
18
+ versioned asset names.
19
+ - Fixed invariant package-name synchronization and added a distribution guard;
20
+ normalized source file modes for publishable metadata.
21
+
22
+ ## [0.3.1] - 2026-08-26
23
+
24
+ ### Changed
25
+
26
+ - E2E 规则组补充防误解澄清句:「It does not mean every layer must change:
27
+ the change must be complete across the layers it touches.」——防止把
28
+ 「最小完整端到端变更」误解为必须修改所有层(真实数据流那条的补充)。
29
+ 其余规则文本不变;审计确认 Full/Ultra 的 E2E 组、Lite 架构保护句、
30
+ Gain 四段口径、主 Skill 指针卡与 modelInvocable:false、docs smoke
31
+ 口径(null≠0/环境阻断/静态vs动态/高方差)均已符合,未重复修改。
32
+
8
33
  ## [0.3.0] - 2026-08-26
9
34
 
10
35
  ### Added
package/README.md CHANGED
@@ -13,8 +13,8 @@
13
13
 
14
14
  - **稳定 latest 下载**(资产名固定,每次 Release 不变):
15
15
  `https://github.com/MengYuil/dsh-ponytail/releases/latest/download/mengyuly-dsh-ponytail.tgz`
16
- - **固定版本下载**(按 Tag 不可变):
17
- `https://github.com/MengYuil/dsh-ponytail/releases/download/v0.2.2/mengyuly-dsh-ponytail-0.2.2.tgz`
16
+ - **固定版本下载**(按 Tag 不可变):当前 Release 仅提供固定资产名,使用
17
+ `https://github.com/MengYuil/dsh-ponytail/releases/download/v0.3.1/mengyuly-dsh-ponytail.tgz`
18
18
 
19
19
  说明:
20
20
 
@@ -36,8 +36,9 @@ dsh plugin --profile web add link:$(pwd)
36
36
  # 方式二:GitHub 直接装
37
37
  dsh plugin --profile web add github:MengYuil/dsh-ponytail
38
38
 
39
- # 方式三:Release 打包件(先下 tgz
40
- dsh plugin --profile web add file:./mengyuly-dsh-ponytail-0.1.3.tgz
39
+ # 方式三:Release 打包件(先下 tgz——latest 固定资产名恒定)
40
+ # https://github.com/MengYuil/dsh-ponytail/releases/latest/download/mengyuly-dsh-ponytail.tgz
41
+ dsh plugin --profile web add file:./mengyuly-dsh-ponytail.tgz
41
42
 
42
43
  # 方式四:npm
43
44
  dsh plugin --profile web add @mengyuly/dsh-ponytail
@@ -85,7 +86,7 @@ dsh plugin --profile web add @mengyuly/dsh-ponytail
85
86
  ```
86
87
  例:`web → full`、`tui → lite`、`automation → off`。Profile 配置在插件初始化时读取(Cordis 无公开配置变更事件),**改后需重启该 profile**;非法值只告警一次并回退,不影响启动。用户 `config.json` 仍保持热更新。
87
88
  - **用户 config.json**(`~/.config/ponytail/config.json`,Windows `%APPDATA%\ponytail\config.json`):`{"defaultMode": "lite"}`,热更新(~1s 轮询),非法内容保留上次合法值。
88
- - **子代理(如实边界)**:DSH 内置 `subagent` 工具是**隔离派生**,默认**不继承**本插件的 system-prompt;`PONYTAIL_SUBAGENT_MATCHER`(匹配子代理 `agentPreset` 的正则)**只用于筛选能进入本 Prompt 管线的子代理**,不是继承开关;DSH 当前没有公开的子代理派生/可继承 Prompt API,因此**未实现、也不宣称父子 Prompt 继承**(有官方 API 后再考虑只读快照传播)。非法正则告警一次并 fail-open。
89
+ - **子代理(如实边界)**:DSH 内置 `subagent` 工具是**隔离派生**,但全局 system-prompt section 默认也会参与子代理的独立组装;这不是父代理 Prompt 或会话状态继承。`PONYTAIL_SUBAGENT_MATCHER`(匹配子代理 `agentPreset` 的正则)只用于筛选能进入本 Prompt 管线的子代理,不是继承开关;无 preset 时不会被 matcher 排除。DSH 当前没有公开的父子 Prompt 继承 API,因此**不宣称父子 Prompt 继承**(有官方 API 后再考虑只读模式快照传播)。非法正则告警一次并 fail-open。
89
90
  - **配置错误**:非法 JSON / 非法 `defaultMode` / 读取失败 / 非法正则只告警一次(不刷屏);配置文件不存在属正常、不告警。
90
91
 
91
92
  ## 效率(条件性收益,非保证)
@@ -101,9 +102,9 @@ prompt 与推理开销变得更贵。
101
102
 
102
103
  | 档位 | 字符数 | UTF-8 字节 | 说明 |
103
104
  |------|--------|-----------|------|
104
- | lite | 1474 | 1476 | 实测生成 |
105
- | full | 1678 | 1682 | 实测生成 |
106
- | ultra | 1625 | 1629 | 实测生成 |
105
+ | lite | 1918 | 1920 | 实测生成 |
106
+ | full | 3036 | 3052 | 实测生成 |
107
+ | ultra | 2823 | 2839 | 实测生成 |
107
108
  | off | 0 | 0 | 不注入 |
108
109
 
109
110
  这些是 **Prompt 体积测量,不是账单金额,也不是对所有模型成立的节省
package/lib/index.js CHANGED
@@ -924,7 +924,7 @@ function errorMessage(error) {
924
924
  * section (see `instructions.ts`) and must not be duplicated here. The other
925
925
  * five skills ship verbatim as runtime skills.
926
926
  *
927
- * @module @deepseek-ai/dsh-ponytail
927
+ * @module @mengyuly/dsh-ponytail
928
928
  */
929
929
  /** The always-on lazy-senior-dev ruleset: also registered as a loadable skill. */
930
930
  const PONYTAIL_SKILL_BODY = `
@@ -1288,7 +1288,7 @@ function ponytailSkills() {
1288
1288
  * level via the `/ponytail` command is session-scoped and lives in an
1289
1289
  * in-memory, per-agent {@link ModeStore}.
1290
1290
  *
1291
- * @module @deepseek-ai/dsh-ponytail
1291
+ * @module @mengyuly/dsh-ponytail
1292
1292
  */
1293
1293
  const DEFAULT_MODE = "full";
1294
1294
  const RUNTIME_MODES = [
@@ -1502,7 +1502,7 @@ function isSubagentSession(header) {
1502
1502
  * The three intensities therefore differ in their actual instructions, not
1503
1503
  * just in a table row.
1504
1504
  *
1505
- * @module @deepseek-ai/dsh-ponytail
1505
+ * @module @mengyuly/dsh-ponytail
1506
1506
  */
1507
1507
  /** Shared identity line, carried by every non-`off` mode. */
1508
1508
  const INTRO = "You are a lazy senior developer. Lazy means efficient, not careless. The best code is the code never written.";
@@ -1511,10 +1511,11 @@ const INTRO = "You are a lazy senior developer. Lazy means efficient, not carele
1511
1511
  */
1512
1512
  const COMMON_RULES = [
1513
1513
  "Understand the problem before choosing a solution: read the code the change touches and trace the real flow end to end. Laziness that skips comprehension ships a confident wrong fix.",
1514
- "Reuse what already exists in this codebase before writing anything new.",
1515
- "Reach for the standard library, platform-native features, and already-installed dependencies before custom code.",
1516
- "A non-trivial change leaves ONE minimal runnable check behind (an assert-based self-check or one small test file; no frameworks). Trivial one-liners need no test.",
1517
- "Explain briefly, but never omit the key decisions."
1514
+ "Reuse existing code, standard-library and native features, and installed dependencies before writing custom code.",
1515
+ "Choose the smallest complete change compatible with the existing architecture; completeness does not mean changing every layer.",
1516
+ "Before adding a component, abstraction, migration, protocol, data format, or dependency, inspect and preserve the existing contract.",
1517
+ "Do not leave disconnected UI, unused state, placeholders, or unwired payloads. Scale investigation to the task: a local, understood change does not require tracing unrelated layers.",
1518
+ "For non-trivial changes, leave one minimal runnable check (assert or small test; no framework). Explain key decisions briefly."
1518
1519
  ].join("\n");
1519
1520
  /**
1520
1521
  * The never-cut list. Every non-`off` mode keeps these; intensities tune how
@@ -1536,7 +1537,6 @@ const SAFETY_BOUNDARIES = [
1536
1537
  /** Lite: complete the explicit ask; reuse; suggest, do not challenge. */
1537
1538
  const LITE_RULES = [
1538
1539
  "Complete everything explicitly requested, including every acceptance criterion.",
1539
- "Prefer existing code, standard-library features, native platform features, and already-installed dependencies.",
1540
1540
  "You may mention a simpler alternative briefly, but do not challenge or reject an explicit requirement.",
1541
1541
  "Do not change the existing architecture merely to reduce line count.",
1542
1542
  "Keep the smallest reasonable validation for non-trivial changes."
@@ -1547,14 +1547,14 @@ const E2E_RULES = [
1547
1547
  "- Prefer the smallest complete end-to-end change compatible with the existing architecture, not merely the fewest lines in one file.",
1548
1548
  "- Before creating a component, abstraction, protocol, migration, transport format, storage format, or dependency, inspect the repository’s existing path and preserve its current contract.",
1549
1549
  "- Do not redesign transport, storage, API shape, or persistence when the task only asks for a local UI or behavior change.",
1550
- "- A locally smaller implementation that changes the system contract is not smaller overall.",
1551
1550
  "- Prefer the smallest complete change across the real data flow: input → state → validation → payload → API → persistence → response/UI.",
1551
+ "- It does not mean every layer must change: the change must be complete across the layers it touches.",
1552
1552
  "- Do not leave a UI-only field, unused state, placeholder path, or disconnected payload merely because it produces a smaller diff."
1553
1553
  ].join("\n");
1554
1554
  const MODE_RULES = {
1555
1555
  lite: LITE_RULES,
1556
1556
  full: [
1557
- "Use the complete ladder stop at the first rung that holds:",
1557
+ "Use the seven-rung ladder; stop at the first rung that holds:",
1558
1558
  "1. Does this need to exist at all? (YAGNI)",
1559
1559
  "2. Does it already exist in this codebase? Reuse it.",
1560
1560
  "3. Does the standard library do it? Use it.",
@@ -1562,19 +1562,13 @@ const MODE_RULES = {
1562
1562
  "5. Does an already-installed dependency solve it? Use it.",
1563
1563
  "6. Can the solution be reduced to a small expression? Make it that small.",
1564
1564
  "7. Only then: write the minimum new implementation.",
1565
- "Default to the shortest correct implementation; prefer deletion and reuse, but do not trade away correctness, security, tests, explicit requirements, or the existing system contract.",
1566
- "Fix root causes, not symptoms: one guard in the shared function beats a guard in every caller.",
1567
- "",
1565
+ "Default to the shortest correct implementation; prefer deletion and reuse. Fix root causes, not symptoms (one shared guard beats one per caller).",
1568
1566
  E2E_RULES
1569
1567
  ].join("\n"),
1570
1568
  ultra: [
1571
- "Delete before adding.",
1572
- "Actively question speculative features, caches, abstractions, configuration, migrations, transport changes, storage changes, and new dependencies.",
1573
- "Prefer the smallest complete end-to-end change, not the smallest local diff.",
1574
- "Do not change an existing contract merely to reduce lines.",
1569
+ "Delete before adding. Actively question speculative features, caches, abstractions, configuration, migrations, transport changes, storage changes, and new dependencies.",
1575
1570
  "For complex requests, ship the smallest correct complete version and state what would justify a larger version.",
1576
- "Ultra is not refusal: explicit requirements, safety, validation, accessibility, data protection, and acceptance criteria remain mandatory.",
1577
- "",
1571
+ "Ultra is not refusal: explicit requirements and the safety boundaries remain mandatory.",
1578
1572
  E2E_RULES
1579
1573
  ].join("\n")
1580
1574
  };
@@ -1632,7 +1626,7 @@ const instructionCache = /* @__PURE__ */ new Map();
1632
1626
  * `~/.config/ponytail/config.json` (see {@link readDefaultMode}), then
1633
1627
  * `full`. A session override via `/ponytail` outranks all of them.
1634
1628
  *
1635
- * @module @deepseek-ai/dsh-ponytail
1629
+ * @module @mengyuly/dsh-ponytail
1636
1630
  */
1637
1631
  const name = "ponytail";
1638
1632
  const inject = ["systemPrompt", "skills"];
package/lib/invariant.js CHANGED
@@ -1,9 +1,9 @@
1
1
  //#region lib/types/invariant.js
2
2
  /**
3
- * Package-owned invariant companion for `@deepseek-ai/dsh-ponytail`.
4
- * @module @deepseek-ai/dsh-ponytail/invariant
3
+ * Package-owned invariant companion for `@mengyuly/dsh-ponytail`.
4
+ * @module @mengyuly/dsh-ponytail/invariant
5
5
  */
6
- const PACKAGE_NAME = "@deepseek-ai/dsh-ponytail";
6
+ const PACKAGE_NAME = "@mengyuly/dsh-ponytail";
7
7
  /** Cordis companion plugin name. */
8
8
  const name = "ponytail-invariant";
9
9
  /** Service required before the companion can reserve package ownership. */
@@ -6,7 +6,7 @@
6
6
  * section (see `instructions.ts`) and must not be duplicated here. The other
7
7
  * five skills ship verbatim as runtime skills.
8
8
  *
9
- * @module @deepseek-ai/dsh-ponytail
9
+ * @module @mengyuly/dsh-ponytail
10
10
  */
11
11
  import type { SkillRegistration } from '@deepseek-ai/dsh-skill';
12
12
  /** The always-on lazy-senior-dev ruleset: also registered as a loadable skill. */
@@ -11,7 +11,7 @@
11
11
  * `~/.config/ponytail/config.json` (see {@link readDefaultMode}), then
12
12
  * `full`. A session override via `/ponytail` outranks all of them.
13
13
  *
14
- * @module @deepseek-ai/dsh-ponytail
14
+ * @module @mengyuly/dsh-ponytail
15
15
  */
16
16
  import type { Context } from '@deepseek-ai/cordis';
17
17
  export declare const name = "ponytail";
@@ -5,7 +5,7 @@
5
5
  * The three intensities therefore differ in their actual instructions, not
6
6
  * just in a table row.
7
7
  *
8
- * @module @deepseek-ai/dsh-ponytail
8
+ * @module @mengyuly/dsh-ponytail
9
9
  */
10
10
  import { type PonytailRuntimeMode } from './modes.ts';
11
11
  /**
@@ -1,6 +1,6 @@
1
1
  /**
2
- * Package-owned invariant companion for `@deepseek-ai/dsh-ponytail`.
3
- * @module @deepseek-ai/dsh-ponytail/invariant
2
+ * Package-owned invariant companion for `@mengyuly/dsh-ponytail`.
3
+ * @module @mengyuly/dsh-ponytail/invariant
4
4
  */
5
5
  import type { Context } from '@deepseek-ai/cordis';
6
6
  /** Cordis companion plugin name. */
@@ -6,7 +6,7 @@
6
6
  * level via the `/ponytail` command is session-scoped and lives in an
7
7
  * in-memory, per-agent {@link ModeStore}.
8
8
  *
9
- * @module @deepseek-ai/dsh-ponytail
9
+ * @module @mengyuly/dsh-ponytail
10
10
  */
11
11
  /** One settable runtime intensity. `review` is command-only and never a default. */
12
12
  export type PonytailRuntimeMode = 'off' | 'lite' | 'full' | 'ultra';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mengyuly/dsh-ponytail",
3
3
  "description": "Lazy senior dev mode for DeepSeek Harness: always-on minimal-code ruleset, intensity switching, and short review/audit/debt/gain/help skills",
4
- "version": "0.3.0",
4
+ "version": "0.3.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },