@mengyuly/dsh-ponytail 0.2.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.
- package/CHANGELOG.md +93 -35
- package/README.md +22 -4
- package/lib/index.js +65 -63
- package/lib/types/content.d.ts +2 -2
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,50 +3,65 @@
|
|
|
3
3
|
All notable changes to `@mengyuly/dsh-ponytail` are documented here.
|
|
4
4
|
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Unreleased
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- P1: 主 `ponytail` 技能不再携带旧版 Full 规则集——技能正文改为指向注入段的
|
|
11
|
-
**模式感知指针卡**(`PONYTAIL MODE ACTIVE` 段是唯一规则源),Lite/Ultra
|
|
12
|
-
会话里模型不会从技能加载到与当前档位冲突的 Full 规则。
|
|
13
|
-
- `/ponytail default` 在「保存值与覆盖源值恰好相同」时(如 env=full 且
|
|
14
|
-
`/ponytail default full`)也会点名覆盖来源,不再漏报。
|
|
15
|
-
- `sync:dist` 的产物变更状态检查补上 `src/`(0.2.0 起同步 src 镜像)。
|
|
16
|
-
- CHANGELOG 章节顺序修正(Unreleased 回到最顶部)。
|
|
17
|
-
- README 兼容矩阵文字更新为 Node 22/24。
|
|
8
|
+
## [0.3.1] - 2026-08-26
|
|
18
9
|
|
|
19
10
|
### Changed
|
|
20
11
|
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
- E2E 规则组补充防误解澄清句:「It does not mean every layer must change:
|
|
13
|
+
the change must be complete across the layers it touches.」——防止把
|
|
14
|
+
「最小完整端到端变更」误解为必须修改所有层(真实数据流那条的补充)。
|
|
15
|
+
其余规则文本不变;审计确认 Full/Ultra 的 E2E 组、Lite 架构保护句、
|
|
16
|
+
Gain 四段口径、主 Skill 指针卡与 modelInvocable:false、docs smoke
|
|
17
|
+
口径(null≠0/环境阻断/静态vs动态/高方差)均已符合,未重复修改。
|
|
25
18
|
|
|
26
|
-
|
|
19
|
+
## [0.3.0] - 2026-08-26
|
|
27
20
|
|
|
28
|
-
|
|
29
|
-
- `/ponytail default` 同值覆盖源提示测试。
|
|
30
|
-
- 62 tests passed in the authoritative deepseek-harness monorepo package
|
|
31
|
-
(`packages/community/ponytail/tests/`: instructions.spec.ts + ponytail.spec.ts;
|
|
32
|
-
本机实测 62 passed;CI 矩阵见 `.github/workflows/ci.yml`,Ubuntu/Windows ×
|
|
33
|
-
Node 22/24)。此数字来自权威 monorepo 包测试,不是发行镜像
|
|
34
|
-
`verify:dist` / `verify:pack` / `test:consumer` / `test:regressions` 的合计。
|
|
21
|
+
### Added
|
|
35
22
|
|
|
36
|
-
|
|
23
|
+
- **最小正确端到端变更规则**(`instructions.ts` 新增共享 `E2E_RULES` 组,Full
|
|
24
|
+
与 Ultra 均包含):优先「与现有架构兼容的最小完整端到端变更」,而非单个
|
|
25
|
+
文件最少行数;创建组件/抽象/协议/迁移/传输格式/存储格式/依赖前先检查仓库
|
|
26
|
+
既有路径并保留现有契约;任务只要求局部 UI 或行为变化时不得重新设计传输、
|
|
27
|
+
存储、API 形态或持久化;局部更小但改变系统契约的实现并不更小;沿真实数据
|
|
28
|
+
流(input → state → validation → payload → API → persistence →
|
|
29
|
+
response/UI)取最小完整变更;不得仅为更小的 diff 留下 UI-only 字段、
|
|
30
|
+
未用状态、占位路径或断开的 payload。
|
|
31
|
+
- **Safety 边界扩充**:真实端到端数据流、非平凡改动的必要测试、根因修复
|
|
32
|
+
(全模式共享,不可删除)。
|
|
37
33
|
|
|
38
|
-
|
|
39
|
-
`scripts/**` is excluded from the npm tarball, has no install lifecycle
|
|
40
|
-
hook, and is unreachable from the installed runtime entry.
|
|
41
|
-
- Added tarball checks preventing `scripts/` (and `src/`, `tests/`, `test/`,
|
|
42
|
-
`tools/`) from being published, plus a post-install assertion that the
|
|
43
|
-
installed package contains no `scripts/`.
|
|
44
|
-
- Added checks preventing `preinstall` / `install` / `postinstall` /
|
|
45
|
-
`prepare` lifecycle hooks from silently invoking development tooling.
|
|
46
|
-
- Classified repository-only `child_process` findings as accepted
|
|
47
|
-
development-tooling risk.
|
|
34
|
+
### Changed
|
|
48
35
|
|
|
49
|
-
|
|
36
|
+
- **Lite / Full / Ultra 规则边界重定义**(结构化组合保持,恢复旧的
|
|
37
|
+
Markdown 正则过滤):
|
|
38
|
+
- Lite:完成所有明确要求与验收标准;优先复用/标准库/原生/已装依赖;可
|
|
39
|
+
一句话提示更简方案但不挑战明确要求;**不得仅为减少行数改变现有架构**;
|
|
40
|
+
非平凡改动保留最小合理校验。
|
|
41
|
+
- Full:完整七级阶梯;默认最短正确实现并**优先最小完整端到端变更**;偏好
|
|
42
|
+
删除与复用,但不牺牲正确性、安全、测试、明确要求或现有系统契约。
|
|
43
|
+
- Ultra:先删后加;主动质疑投机性功能、缓存、抽象、配置、**迁移、传输
|
|
44
|
+
变化、存储变化**与新依赖;**取最小完整端到端变更而非最小局部 diff**;
|
|
45
|
+
不为减少行数改变现有契约;不是无脑拒绝(明确要求/安全/校验/无障碍/
|
|
46
|
+
数据保护/验收标准仍强制)。
|
|
47
|
+
- off 仍返回空字符串;同模式输出字节级稳定;三档体积仍远低于旧版 ~1.3k
|
|
48
|
+
tokens。
|
|
49
|
+
- **`/ponytail-gain` 口径重排**:固定顺序「1. Upstream agentic reference →
|
|
50
|
+
2. Upstream single-shot reference → 3. DSH adapter status → 4. Honesty
|
|
51
|
+
boundary」;节省条件补充为「Savings depend on model, workload, prompt
|
|
52
|
+
caching, tool usage, and execution path」;诚实边界明确「缺失的 cost
|
|
53
|
+
字段(null)不是 0 成本」。Skill 描述与 Help 表格中的
|
|
54
|
+
"less code, less cost, more speed" 改为
|
|
55
|
+
"less unnecessary work; token, cost, and latency effects depend on model
|
|
56
|
+
and workload"。
|
|
57
|
+
- README 顶部定位改为「极简编码原则与相关 Skill 的适配」,明确 DSH 的模型
|
|
58
|
+
循环、Prompt 组装、Skill 机制与工具调用不同。
|
|
59
|
+
|
|
60
|
+
### Tests
|
|
61
|
+
|
|
62
|
+
- instructions:Full/Ultra 含端到端规则组;Lite 含架构保护句;三档互异;
|
|
63
|
+
off 为空;安全边界含端到端数据流/必要测试/根因修复。
|
|
64
|
+
- gain:四段顺序、节省条件、null≠0、无 "less code, less cost, more speed"。
|
|
50
65
|
|
|
51
66
|
## [0.2.2] - 2026-08-26
|
|
52
67
|
|
|
@@ -105,6 +120,49 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
105
120
|
false` / `userInvocable: true`;五个一次性 Skill 的 invocation 不变。
|
|
106
121
|
- Prompt:off 为空、三档互不相同、均含安全边界与明确验收项。
|
|
107
122
|
|
|
123
|
+
## [0.2.1] - 2026-08-25
|
|
124
|
+
|
|
125
|
+
### Fixed
|
|
126
|
+
|
|
127
|
+
- P1: 主 `ponytail` 技能不再携带旧版 Full 规则集——技能正文改为指向注入段的
|
|
128
|
+
**模式感知指针卡**(`PONYTAIL MODE ACTIVE` 段是唯一规则源),Lite/Ultra
|
|
129
|
+
会话里模型不会从技能加载到与当前档位冲突的 Full 规则。
|
|
130
|
+
- `/ponytail default` 在「保存值与覆盖源值恰好相同」时(如 env=full 且
|
|
131
|
+
`/ponytail default full`)也会点名覆盖来源,不再漏报。
|
|
132
|
+
- `sync:dist` 的产物变更状态检查补上 `src/`(0.2.0 起同步 src 镜像)。
|
|
133
|
+
- CHANGELOG 章节顺序修正(Unreleased 回到最顶部)。
|
|
134
|
+
- README 兼容矩阵文字更新为 Node 22/24。
|
|
135
|
+
|
|
136
|
+
### Changed
|
|
137
|
+
|
|
138
|
+
- `/ponytail-help` 补充 Profile 级 `defaultMode` 配置与完整优先级链
|
|
139
|
+
(会话 override > env > Profile > 用户 config > full);Ultra 描述改为
|
|
140
|
+
「先删后加、质疑投机,但绝不删明确要求」,与 0.2.0 新语义一致。
|
|
141
|
+
- 模块头部注释同步(content.ts / modes.ts)。
|
|
142
|
+
|
|
143
|
+
### Tests
|
|
144
|
+
|
|
145
|
+
- ponytail 技能指针卡断言(不含旧 Full 规则)。
|
|
146
|
+
- `/ponytail default` 同值覆盖源提示测试。
|
|
147
|
+
- 62 tests passed in the authoritative deepseek-harness monorepo package
|
|
148
|
+
(`packages/community/ponytail/tests/`: instructions.spec.ts + ponytail.spec.ts;
|
|
149
|
+
本机实测 62 passed;CI 矩阵见 `.github/workflows/ci.yml`,Ubuntu/Windows ×
|
|
150
|
+
Node 22/24)。此数字来自权威 monorepo 包测试,不是发行镜像
|
|
151
|
+
`verify:dist` / `verify:pack` / `test:consumer` / `test:regressions` 的合计。
|
|
152
|
+
|
|
153
|
+
### Security
|
|
154
|
+
|
|
155
|
+
- Documented the development-only `child_process` boundary (`SECURITY.md`):
|
|
156
|
+
`scripts/**` is excluded from the npm tarball, has no install lifecycle
|
|
157
|
+
hook, and is unreachable from the installed runtime entry.
|
|
158
|
+
- Added tarball checks preventing `scripts/` (and `src/`, `tests/`, `test/`,
|
|
159
|
+
`tools/`) from being published, plus a post-install assertion that the
|
|
160
|
+
installed package contains no `scripts/`.
|
|
161
|
+
- Added checks preventing `preinstall` / `install` / `postinstall` /
|
|
162
|
+
`prepare` lifecycle hooks from silently invoking development tooling.
|
|
163
|
+
- Classified repository-only `child_process` findings as accepted
|
|
164
|
+
development-tooling risk.
|
|
165
|
+
|
|
108
166
|
## [0.2.0] - 2026-08-24
|
|
109
167
|
|
|
110
168
|
### Added
|
package/README.md
CHANGED
|
@@ -5,7 +5,25 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/@mengyuly/dsh-ponytail)
|
|
6
6
|
[](https://www.dsh.so/artifact/dsh-ponytail-4/)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
将 [DietrichGebert/ponytail](https://github.com/DietrichGebert/ponytail) 的极简编码原则和相关 Skill 适配到 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness),提供 YAGNI 决策阶梯、Lite / Full / Ultra / Off 会话级模式,以及一组用于代码精简、审查、审计和技术债追踪的 Skill。
|
|
9
|
+
|
|
10
|
+
本项目对齐上游核心理念和主要工作流,但 DSH 的模型循环、Prompt 组装、Skill 机制和工具调用不同。**上游 Benchmark 仅作参考,不代表本适配版具有相同的 Token、成本或延迟收益**(详见「效率(条件性收益,非保证)」)。
|
|
11
|
+
|
|
12
|
+
## GitHub Release 下载
|
|
13
|
+
|
|
14
|
+
- **稳定 latest 下载**(资产名固定,每次 Release 不变):
|
|
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`
|
|
18
|
+
|
|
19
|
+
说明:
|
|
20
|
+
|
|
21
|
+
- `latest` 指向最新 GitHub Release;固定资产名 `mengyuly-dsh-ponytail.tgz`
|
|
22
|
+
在每个 Release 中保持不变,因此该 URL 不会因版本号变化而失效。
|
|
23
|
+
- 需要完全可复现的构建时,请使用**固定版本 Release 链接**(按 Tag 下载)。
|
|
24
|
+
- npm 安装仍走 npm Registry 或 `dsh plugin` 命令;latest Tarball 适合快速
|
|
25
|
+
安装体验,**不适合作为不可变依赖**。
|
|
26
|
+
- 固定资产名由 `scripts/release-assets.mjs` 生成并验证(`npm run release:assets`)。
|
|
9
27
|
|
|
10
28
|
## 安装
|
|
11
29
|
|
|
@@ -83,9 +101,9 @@ prompt 与推理开销变得更贵。
|
|
|
83
101
|
|
|
84
102
|
| 档位 | 字符数 | UTF-8 字节 | 说明 |
|
|
85
103
|
|------|--------|-----------|------|
|
|
86
|
-
| lite |
|
|
87
|
-
| full |
|
|
88
|
-
| ultra |
|
|
104
|
+
| lite | 1744 | 1746 | 实测生成 |
|
|
105
|
+
| full | 2975 | 2993 | 实测生成 |
|
|
106
|
+
| ultra | 2818 | 2834 | 实测生成 |
|
|
89
107
|
| off | 0 | 0 | 不注入 |
|
|
90
108
|
|
|
91
109
|
这些是 **Prompt 体积测量,不是账单金额,也不是对所有模型成立的节省
|
package/lib/index.js
CHANGED
|
@@ -1064,63 +1064,43 @@ const GAIN_SKILL_BODY = `
|
|
|
1064
1064
|
Display this scoreboard when invoked. One-shot: do NOT change mode, write flag
|
|
1065
1065
|
files, or persist anything.
|
|
1066
1066
|
|
|
1067
|
-
## Upstream reference
|
|
1068
|
-
|
|
1069
|
-
The figures below are the UPSTREAM Ponytail project's published benchmark
|
|
1070
|
-
results, not measured guarantees for this DSH adapter.
|
|
1071
|
-
|
|
1072
1067
|
These are upstream Ponytail results, not measured guarantees for this DSH
|
|
1073
|
-
adapter.
|
|
1074
|
-
little or no savings. Some reasoning models may become more expensive because
|
|
1075
|
-
of prompt and reasoning overhead.
|
|
1076
|
-
|
|
1077
|
-
### Single-shot reference
|
|
1078
|
-
|
|
1079
|
-
5 everyday tasks (email validator, debounce, CSV sum, countdown timer, rate
|
|
1080
|
-
limiter); 3 Claude models; single generation per task:
|
|
1068
|
+
adapter.
|
|
1081
1069
|
|
|
1082
|
-
|
|
1083
|
-
-
|
|
1084
|
-
|
|
1070
|
+
Savings depend on model, workload, prompt caching, tool usage, and execution
|
|
1071
|
+
path. Already-minimal tasks may show little or no savings. Some reasoning
|
|
1072
|
+
models may become more expensive because prompt and reasoning overhead can
|
|
1073
|
+
exceed the saved output.
|
|
1085
1074
|
|
|
1086
|
-
|
|
1075
|
+
## 1. Upstream agentic reference
|
|
1087
1076
|
|
|
1088
1077
|
Real Claude Code sessions on real repositories; 12 feature tasks:
|
|
1089
1078
|
|
|
1090
|
-
- Source LOC:
|
|
1091
|
-
- Tokens:
|
|
1092
|
-
- Cost:
|
|
1093
|
-
- Time:
|
|
1094
|
-
- Over-build tasks:
|
|
1079
|
+
- Source LOC: ~\u221254%
|
|
1080
|
+
- Tokens: ~\u221222%
|
|
1081
|
+
- Cost: ~\u221220%
|
|
1082
|
+
- Time: ~\u221227%
|
|
1083
|
+
- Over-build tasks: \u221260\u201394%
|
|
1095
1084
|
- Safety tests: 100%
|
|
1096
1085
|
|
|
1097
|
-
|
|
1086
|
+
## 2. Upstream single-shot reference
|
|
1098
1087
|
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
See the repository's DSH smoke reports for limited, non-statistical
|
|
1103
|
-
directional evidence (docs/dsh-smoke-summary.md).
|
|
1104
|
-
|
|
1105
|
-
## Scoreboard (upstream single-shot reference)
|
|
1088
|
+
5 everyday tasks (email validator, debounce, CSV sum, countdown timer, rate
|
|
1089
|
+
limiter); 3 Claude models; single generation per task:
|
|
1106
1090
|
|
|
1107
|
-
|
|
1108
|
-
|
|
1091
|
+
- Lines of code: \u221280\u201394%
|
|
1092
|
+
- Cost (Claude): \u221242\u201375%
|
|
1093
|
+
- Latency: ~3.1\u20135.8\u00d7 faster
|
|
1109
1094
|
|
|
1110
|
-
|
|
1111
|
-
ponytail gain upstream single-shot reference
|
|
1095
|
+
## 3. DSH adapter status
|
|
1112
1096
|
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
Cost no-skill ████████████████████ 100%
|
|
1116
|
-
ponytail █████▌··············· 25–58% ▼ 42–75%
|
|
1117
|
-
Speed ponytail ▸ 3.1–5.8× faster
|
|
1097
|
+
Current DSH smoke tests provide directional evidence only. Stable token,
|
|
1098
|
+
cost, and latency savings have not been established.
|
|
1118
1099
|
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
\`\`\`
|
|
1100
|
+
See the repository's DSH smoke reports for limited, non-statistical
|
|
1101
|
+
directional evidence (docs/dsh-smoke-summary.md).
|
|
1122
1102
|
|
|
1123
|
-
## Honesty boundary
|
|
1103
|
+
## 4. Honesty boundary
|
|
1124
1104
|
|
|
1125
1105
|
These are upstream benchmark medians, not this repo and not this DSH
|
|
1126
1106
|
adapter. NEVER print a per-repo savings number ("you saved X lines/tokens
|
|
@@ -1128,14 +1108,15 @@ here"): the unbuilt version was never written, so there is no real baseline
|
|
|
1128
1108
|
to subtract from in a live repo. The only real per-repo figures come from
|
|
1129
1109
|
\`/ponytail-debt\` (a counted ledger), and this card points there instead of
|
|
1130
1110
|
inventing one. Never claim "Ponytail always saves tokens/cost" or that this
|
|
1131
|
-
adapter reproduces the upstream percentages.
|
|
1111
|
+
adapter reproduces the upstream percentages. A missing cost figure (null) is
|
|
1112
|
+
not a zero cost.
|
|
1132
1113
|
|
|
1133
1114
|
## Boundaries
|
|
1134
1115
|
|
|
1135
1116
|
One-shot display. Edits nothing, changes no mode.
|
|
1136
1117
|
"stop ponytail" or "normal mode": revert.
|
|
1137
1118
|
`;
|
|
1138
|
-
const GAIN_DESCRIPTION = "
|
|
1119
|
+
const GAIN_DESCRIPTION = "Less unnecessary work; token, cost, and latency effects depend on model and workload. Upstream benchmark reference, not a DSH-adapter guarantee. One-shot display, not a persistent mode, and not a per-repo number. Trigger: /ponytail-gain, \"ponytail gain\", \"what does ponytail save\", \"show ponytail impact\", \"ponytail scoreboard\".";
|
|
1139
1120
|
const HELP_SKILL_BODY = `
|
|
1140
1121
|
Display this reference card when invoked. One-shot, do NOT change mode,
|
|
1141
1122
|
write flag files, or persist anything.
|
|
@@ -1181,7 +1162,7 @@ task to Ultra.
|
|
|
1181
1162
|
| **ponytail-review** | \`/ponytail-review\` | Over-engineering review: \`L42: yagni: factory, one product. Inline.\` |
|
|
1182
1163
|
| **ponytail-audit** | \`/ponytail-audit\` | Whole-repo over-engineering audit: ranked list of what to delete. |
|
|
1183
1164
|
| **ponytail-debt** | \`/ponytail-debt\` | Harvest \`ponytail:\` shortcut comments into a tracked ledger. |
|
|
1184
|
-
| **ponytail-gain** | \`/ponytail-gain\` |
|
|
1165
|
+
| **ponytail-gain** | \`/ponytail-gain\` | Upstream benchmark reference: less unnecessary work; token/cost/latency effects depend on model and workload. |
|
|
1185
1166
|
| **ponytail-help** | \`/ponytail-help\` | This card. |
|
|
1186
1167
|
|
|
1187
1168
|
You can also load any of these with the \`skill\` tool.
|
|
@@ -1547,34 +1528,55 @@ const SAFETY_BOUNDARIES = [
|
|
|
1547
1528
|
"- Accessibility basics.",
|
|
1548
1529
|
"- Explicit acceptance criteria the user asked for.",
|
|
1549
1530
|
"- Understanding the problem and tracing the real flow first.",
|
|
1531
|
+
"- The real end-to-end data flow: no UI-only field, unused state, placeholder path, or disconnected payload.",
|
|
1532
|
+
"- Necessary tests for non-trivial changes.",
|
|
1533
|
+
"- Root-cause fixes over symptom patches.",
|
|
1550
1534
|
"- \"Minimal diff\" is not a substitute for \"correct fix\"."
|
|
1551
1535
|
].join("\n");
|
|
1536
|
+
/** Lite: complete the explicit ask; reuse; suggest, do not challenge. */
|
|
1537
|
+
const LITE_RULES = [
|
|
1538
|
+
"Complete everything explicitly requested, including every acceptance criterion.",
|
|
1539
|
+
"Prefer existing code, standard-library features, native platform features, and already-installed dependencies.",
|
|
1540
|
+
"You may mention a simpler alternative briefly, but do not challenge or reject an explicit requirement.",
|
|
1541
|
+
"Do not change the existing architecture merely to reduce line count.",
|
|
1542
|
+
"Keep the smallest reasonable validation for non-trivial changes."
|
|
1543
|
+
].join("\n");
|
|
1544
|
+
/** Smallest complete end-to-end change: shared by Full and Ultra. */
|
|
1545
|
+
const E2E_RULES = [
|
|
1546
|
+
"Smallest complete end-to-end change:",
|
|
1547
|
+
"- Prefer the smallest complete end-to-end change compatible with the existing architecture, not merely the fewest lines in one file.",
|
|
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
|
+
"- 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
|
+
"- Prefer the smallest complete change across the real data flow: input → state → validation → payload → API → persistence → response/UI.",
|
|
1552
|
+
"- It does not mean every layer must change: the change must be complete across the layers it touches.",
|
|
1553
|
+
"- Do not leave a UI-only field, unused state, placeholder path, or disconnected payload merely because it produces a smaller diff."
|
|
1554
|
+
].join("\n");
|
|
1552
1555
|
const MODE_RULES = {
|
|
1553
|
-
lite:
|
|
1554
|
-
"Complete what is explicitly asked, including every acceptance criterion.",
|
|
1555
|
-
"Prefer reuse, the standard library, native features, and installed dependencies.",
|
|
1556
|
-
"You may name a simpler alternative in one line, but do not challenge or reject an explicit requirement.",
|
|
1557
|
-
"Output may be a little more complete than full; never cut an acceptance item to save lines."
|
|
1558
|
-
].join("\n"),
|
|
1556
|
+
lite: LITE_RULES,
|
|
1559
1557
|
full: [
|
|
1560
|
-
"
|
|
1558
|
+
"Use the complete ladder — stop at the first rung that holds:",
|
|
1561
1559
|
"1. Does this need to exist at all? (YAGNI)",
|
|
1562
1560
|
"2. Does it already exist in this codebase? Reuse it.",
|
|
1563
1561
|
"3. Does the standard library do it? Use it.",
|
|
1564
1562
|
"4. Does a native platform feature cover it? Use it.",
|
|
1565
1563
|
"5. Does an already-installed dependency solve it? Use it.",
|
|
1566
|
-
"6. Can
|
|
1567
|
-
"7. Only then: the minimum
|
|
1568
|
-
"Default to the shortest correct implementation; prefer deletion and reuse.",
|
|
1569
|
-
"Fix root causes, not symptoms: one guard in the shared function beats a guard in every caller."
|
|
1564
|
+
"6. Can the solution be reduced to a small expression? Make it that small.",
|
|
1565
|
+
"7. Only then: write the minimum new implementation.",
|
|
1566
|
+
"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.",
|
|
1567
|
+
"Fix root causes, not symptoms: one guard in the shared function beats a guard in every caller.",
|
|
1568
|
+
"",
|
|
1569
|
+
E2E_RULES
|
|
1570
1570
|
].join("\n"),
|
|
1571
1571
|
ultra: [
|
|
1572
|
-
"
|
|
1573
|
-
"Actively question speculative features, caches, abstractions, configuration, and new dependencies.",
|
|
1574
|
-
"Prefer
|
|
1575
|
-
"
|
|
1576
|
-
"For
|
|
1577
|
-
"Ultra is not
|
|
1572
|
+
"Delete before adding.",
|
|
1573
|
+
"Actively question speculative features, caches, abstractions, configuration, migrations, transport changes, storage changes, and new dependencies.",
|
|
1574
|
+
"Prefer the smallest complete end-to-end change, not the smallest local diff.",
|
|
1575
|
+
"Do not change an existing contract merely to reduce lines.",
|
|
1576
|
+
"For complex requests, ship the smallest correct complete version and state what would justify a larger version.",
|
|
1577
|
+
"Ultra is not refusal: explicit requirements, safety, validation, accessibility, data protection, and acceptance criteria remain mandatory.",
|
|
1578
|
+
"",
|
|
1579
|
+
E2E_RULES
|
|
1578
1580
|
].join("\n")
|
|
1579
1581
|
};
|
|
1580
1582
|
const MODE_LABELS = {
|
package/lib/types/content.d.ts
CHANGED
|
@@ -18,9 +18,9 @@ export declare const AUDIT_SKILL_BODY = "\nponytail-review, repo-wide. Scan the
|
|
|
18
18
|
export declare const AUDIT_DESCRIPTION: string;
|
|
19
19
|
export declare const DEBT_SKILL_BODY = "\nEvery deliberate ponytail shortcut is marked with a `ponytail:` comment naming\nits ceiling and upgrade path. This collects them into one ledger so a deferral\ncan't quietly become permanent.\n\n## Scan\n\nGrep the repo for comment markers, skipping `node_modules`, `.git`, and build\noutput:\n\n`grep -rnE '(#|//) ?ponytail:' .` (add other comment prefixes if your stack uses them)\n\nEach hit is one ledger row. The comment prefix keeps prose that merely mentions\nthe convention out of the ledger.\n\n## Output\n\nOne row per marker, grouped by file:\n\n`<file>:<line>, <what was simplified>. ceiling: <the limit named>. upgrade: <the trigger to revisit>.`\n\nThe convention is `ponytail: <ceiling>, <upgrade path>`, so pull the ceiling\nand the trigger straight from the comment. Want an owner per row too? add\n`git blame -L<line>,<line>`.\n\nFlag the rot risk: any `ponytail:` comment that names no upgrade path or\ntrigger gets a `no-trigger` tag, those are the ones that silently rot.\n\nEnd with `<N> markers, <M> with no trigger.` Nothing found: `No ponytail: debt. Clean ledger.`\n\n## Boundaries\n\nReads and reports only, changes nothing. To persist it, ask and it writes the\nledger to a file (e.g. `PONYTAIL-DEBT.md`). One-shot. \"stop ponytail-debt\" or\n\"normal mode\" to revert.\n";
|
|
20
20
|
export declare const DEBT_DESCRIPTION: string;
|
|
21
|
-
export declare const GAIN_SKILL_BODY = "\nDisplay this scoreboard when invoked. One-shot: do NOT change mode, write flag\nfiles, or persist anything.\n\
|
|
21
|
+
export declare const GAIN_SKILL_BODY = "\nDisplay this scoreboard when invoked. One-shot: do NOT change mode, write flag\nfiles, or persist anything.\n\nThese are upstream Ponytail results, not measured guarantees for this DSH\nadapter.\n\nSavings depend on model, workload, prompt caching, tool usage, and execution\npath. Already-minimal tasks may show little or no savings. Some reasoning\nmodels may become more expensive because prompt and reasoning overhead can\nexceed the saved output.\n\n## 1. Upstream agentic reference\n\nReal Claude Code sessions on real repositories; 12 feature tasks:\n\n- Source LOC: ~\u221254%\n- Tokens: ~\u221222%\n- Cost: ~\u221220%\n- Time: ~\u221227%\n- Over-build tasks: \u221260\u201394%\n- Safety tests: 100%\n\n## 2. Upstream single-shot reference\n\n5 everyday tasks (email validator, debounce, CSV sum, countdown timer, rate\nlimiter); 3 Claude models; single generation per task:\n\n- Lines of code: \u221280\u201394%\n- Cost (Claude): \u221242\u201375%\n- Latency: ~3.1\u20135.8\u00D7 faster\n\n## 3. DSH adapter status\n\nCurrent DSH smoke tests provide directional evidence only. Stable token,\ncost, and latency savings have not been established.\n\nSee the repository's DSH smoke reports for limited, non-statistical\ndirectional evidence (docs/dsh-smoke-summary.md).\n\n## 4. Honesty boundary\n\nThese are upstream benchmark medians, not this repo and not this DSH\nadapter. NEVER print a per-repo savings number (\"you saved X lines/tokens\nhere\"): the unbuilt version was never written, so there is no real baseline\nto subtract from in a live repo. The only real per-repo figures come from\n`/ponytail-debt` (a counted ledger), and this card points there instead of\ninventing one. Never claim \"Ponytail always saves tokens/cost\" or that this\nadapter reproduces the upstream percentages. A missing cost figure (null) is\nnot a zero cost.\n\n## Boundaries\n\nOne-shot display. Edits nothing, changes no mode.\n\"stop ponytail\" or \"normal mode\": revert.\n";
|
|
22
22
|
export declare const GAIN_DESCRIPTION: string;
|
|
23
|
-
export declare const HELP_SKILL_BODY = "\nDisplay this reference card when invoked. One-shot, do NOT change mode,\nwrite flag files, or persist anything.\n\n## Levels\n\n| Level | Trigger | What change |\n|-------|---------|-------------|\n| **Lite** | `/ponytail lite` | Build what's asked, name the lazier alternative in one line. |\n| **Full** | `/ponytail` | The ladder enforced: YAGNI \u2192 stdlib \u2192 native \u2192 one line \u2192 minimum. Default. |\n| **Ultra** | `/ponytail ultra` | YAGNI extremist: deletion first, questions speculation \u2014 never cuts explicit requirements. |\n| **Off** | `/ponytail off` | Ponytail stops injecting its ruleset for this session. |\n\nLevel is session-scoped until changed.\n\n## Choosing a level\n\n- **Lite**: Use for small, explicit changes or when the implementation is\n already clear. Completes explicit requirements without actively\n challenging them.\n Lite\uFF1A\u5C0F\u6539\u52A8\u3001\u9700\u6C42\u660E\u786E\u65F6\u4F7F\u7528\u3002\n- **Full**: Use for new features, refactors, root-cause bug fixes, or tasks\n likely to invite unnecessary abstractions, dependencies, or custom\n components.\n Full\uFF1A\u65B0\u529F\u80FD\u3001\u91CD\u6784\u3001\u6839\u56E0\u4FEE\u590D\u3001\u5BB9\u6613\u8FC7\u5EA6\u8BBE\u8BA1\u65F6\u4F7F\u7528\u3002\n- **Ultra**: Use for deliberate code cleanup and over-engineering removal.\n It questions speculative scope, but never removes explicit requirements,\n security, validation, accessibility, or data-loss protection.\n Ultra\uFF1A\u4E13\u95E8\u6E05\u7406\u5197\u4F59\u548C\u8FC7\u5EA6\u62BD\u8C61\u65F6\u4F7F\u7528\u3002\n- **Off**: Use when the task is non-coding, already fully specified, or when\n the fixed prompt overhead is not worthwhile.\n Off\uFF1A\u975E\u7F16\u7801\u4EFB\u52A1\u6216\u5DF2\u7ECF\u660E\u786E\u5230\u65E0\u9700\u989D\u5916\u7F16\u7801\u5224\u65AD\u7684\u4EFB\u52A1\u3002\n\nPonytail is not a guaranteed token-saving switch. It trades a small fixed\nprompt cost for a chance to reduce unnecessary work. Do not default every\ntask to Ultra.\n\n## Skills\n\n| Skill | Trigger | What it does |\n|-------|---------|--------------|\n| **ponytail** | `/ponytail` | Lazy mode itself. Simplest solution that works. |\n| **ponytail-review** | `/ponytail-review` | Over-engineering review: `L42: yagni: factory, one product. Inline.` |\n| **ponytail-audit** | `/ponytail-audit` | Whole-repo over-engineering audit: ranked list of what to delete. |\n| **ponytail-debt** | `/ponytail-debt` | Harvest `ponytail:` shortcut comments into a tracked ledger. |\n| **ponytail-gain** | `/ponytail-gain` |
|
|
23
|
+
export declare const HELP_SKILL_BODY = "\nDisplay this reference card when invoked. One-shot, do NOT change mode,\nwrite flag files, or persist anything.\n\n## Levels\n\n| Level | Trigger | What change |\n|-------|---------|-------------|\n| **Lite** | `/ponytail lite` | Build what's asked, name the lazier alternative in one line. |\n| **Full** | `/ponytail` | The ladder enforced: YAGNI \u2192 stdlib \u2192 native \u2192 one line \u2192 minimum. Default. |\n| **Ultra** | `/ponytail ultra` | YAGNI extremist: deletion first, questions speculation \u2014 never cuts explicit requirements. |\n| **Off** | `/ponytail off` | Ponytail stops injecting its ruleset for this session. |\n\nLevel is session-scoped until changed.\n\n## Choosing a level\n\n- **Lite**: Use for small, explicit changes or when the implementation is\n already clear. Completes explicit requirements without actively\n challenging them.\n Lite\uFF1A\u5C0F\u6539\u52A8\u3001\u9700\u6C42\u660E\u786E\u65F6\u4F7F\u7528\u3002\n- **Full**: Use for new features, refactors, root-cause bug fixes, or tasks\n likely to invite unnecessary abstractions, dependencies, or custom\n components.\n Full\uFF1A\u65B0\u529F\u80FD\u3001\u91CD\u6784\u3001\u6839\u56E0\u4FEE\u590D\u3001\u5BB9\u6613\u8FC7\u5EA6\u8BBE\u8BA1\u65F6\u4F7F\u7528\u3002\n- **Ultra**: Use for deliberate code cleanup and over-engineering removal.\n It questions speculative scope, but never removes explicit requirements,\n security, validation, accessibility, or data-loss protection.\n Ultra\uFF1A\u4E13\u95E8\u6E05\u7406\u5197\u4F59\u548C\u8FC7\u5EA6\u62BD\u8C61\u65F6\u4F7F\u7528\u3002\n- **Off**: Use when the task is non-coding, already fully specified, or when\n the fixed prompt overhead is not worthwhile.\n Off\uFF1A\u975E\u7F16\u7801\u4EFB\u52A1\u6216\u5DF2\u7ECF\u660E\u786E\u5230\u65E0\u9700\u989D\u5916\u7F16\u7801\u5224\u65AD\u7684\u4EFB\u52A1\u3002\n\nPonytail is not a guaranteed token-saving switch. It trades a small fixed\nprompt cost for a chance to reduce unnecessary work. Do not default every\ntask to Ultra.\n\n## Skills\n\n| Skill | Trigger | What it does |\n|-------|---------|--------------|\n| **ponytail** | `/ponytail` | Lazy mode itself. Simplest solution that works. |\n| **ponytail-review** | `/ponytail-review` | Over-engineering review: `L42: yagni: factory, one product. Inline.` |\n| **ponytail-audit** | `/ponytail-audit` | Whole-repo over-engineering audit: ranked list of what to delete. |\n| **ponytail-debt** | `/ponytail-debt` | Harvest `ponytail:` shortcut comments into a tracked ledger. |\n| **ponytail-gain** | `/ponytail-gain` | Upstream benchmark reference: less unnecessary work; token/cost/latency effects depend on model and workload. |\n| **ponytail-help** | `/ponytail-help` | This card. |\n\nYou can also load any of these with the `skill` tool.\n\n## Deactivate\n\nSay \"stop ponytail\" or \"normal mode\". Resume anytime with `/ponytail` \u2014\nit re-enables at the effective default (or `full` when that is off too).\n`/ponytail status` only shows the current level, never changes it.\n`/ponytail off` also works. Level is session-scoped; a new session starts\nfrom the configured default.\n\n## Configure Default Mode\n\nDefault mode = `full`, auto-active every session. Change it:\n\n**Environment variable** (highest priority):\n```bash\nexport PONYTAIL_DEFAULT_MODE=ultra\n```\n\n**Config file** (`~/.config/ponytail/config.json`, Windows: `%APPDATA%\\ponytail\\config.json`):\n```json\n{ \"defaultMode\": \"lite\" }\n```\n\n**Profile config** (per DSH profile, via the bundle row's `config` \u2014 e.g.\n`tui` \u2192 lite):\n\n```yaml\n- insert:\n - id: ponytail\n name: '@mengyuly/dsh-ponytail'\n config:\n defaultMode: lite\n```\n\nSet `\"off\"` to disable auto-activation on session start, activate manually\nwith `/ponytail` when wanted. `/ponytail default <mode>` persists a new\ndefault to the user config file; an exported `PONYTAIL_DEFAULT_MODE` or a\nprofile `defaultMode` still outranks the saved value for new sessions.\n\nResolution: session override > env var > profile config > config file > `full`.\n\n## More\n\nFull docs + examples: https://github.com/DietrichGebert/ponytail\n";
|
|
24
24
|
export declare const HELP_DESCRIPTION: string;
|
|
25
25
|
/** Ordered set of runtime skills surfaced to the model catalog and `/` menu. */
|
|
26
26
|
export declare function ponytailSkills(): readonly SkillRegistration[];
|
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.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -53,6 +53,8 @@
|
|
|
53
53
|
"verify:pack": "node scripts/verify-pack.mjs",
|
|
54
54
|
"test:consumer": "node scripts/test-consumer.mjs",
|
|
55
55
|
"test:regressions": "node scripts/test-regressions.mjs",
|
|
56
|
-
"measure:prompt": "node scripts/measure-prompt.mjs"
|
|
56
|
+
"measure:prompt": "node scripts/measure-prompt.mjs",
|
|
57
|
+
"release:assets": "node scripts/release-assets.mjs",
|
|
58
|
+
"check:release-links": "node scripts/check-release-links.mjs"
|
|
57
59
|
}
|
|
58
60
|
}
|