@mengyuly/dsh-ponytail 0.2.1 → 0.2.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 +64 -4
- package/README.md +27 -6
- package/lib/index.js +78 -20
- package/lib/types/content.d.ts +2 -2
- package/lib/types/index.d.ts +3 -2
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -27,10 +27,11 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
27
27
|
|
|
28
28
|
- ponytail 技能指针卡断言(不含旧 Full 规则)。
|
|
29
29
|
- `/ponytail default` 同值覆盖源提示测试。
|
|
30
|
-
- 62
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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` 的合计。
|
|
34
35
|
|
|
35
36
|
### Security
|
|
36
37
|
|
|
@@ -45,6 +46,65 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
45
46
|
- Classified repository-only `child_process` findings as accepted
|
|
46
47
|
development-tooling risk.
|
|
47
48
|
|
|
49
|
+
## Unreleased
|
|
50
|
+
|
|
51
|
+
## [0.2.2] - 2026-08-26
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
|
|
55
|
+
- **`/ponytail-gain` 数据口径修正**:收益数字明确标注为 **Upstream
|
|
56
|
+
reference**(Single-shot:5 任务 × 3 Claude 模型,代码 −80~94%、成本
|
|
57
|
+
−42~75%、延迟 3.1–5.8×;Agentic:真实 Claude Code 会话 × 12 功能任务,
|
|
58
|
+
LOC ~−54%、Token ~−22%、成本 ~−20%、时间 ~−27%、过度构建 −60~94%、
|
|
59
|
+
安全 100%),并注明「These are upstream Ponytail results, not measured
|
|
60
|
+
guarantees for this DSH adapter」「Savings depend on model and workload」
|
|
61
|
+
「Already-minimal tasks may show little or no savings」「Some reasoning
|
|
62
|
+
models may become more expensive」。新增 **DSH adapter status**:当前
|
|
63
|
+
smoke 只支持方向性有效,稳定 Token/成本/延迟节省尚未建立。Skill 描述
|
|
64
|
+
由 "less code, less cost, more speed" 改为 "upstream benchmark reference;
|
|
65
|
+
less unnecessary code, while token, cost, and latency effects depend on
|
|
66
|
+
model and workload"。
|
|
67
|
+
- **主 `ponytail` Skill 自动调用策略**:`invocation` 改为
|
|
68
|
+
`modelInvocable: false, userInvocable: true`——指针卡不再进入模型侧
|
|
69
|
+
Skill Catalog(普通编码任务不再重复加载),`/ponytail` 等命令与用户侧
|
|
70
|
+
入口不受影响(命令经 `ctx.skills.get` 加载,不被 modelInvocable 门控;
|
|
71
|
+
语义依据 `@deepseek-ai/dsh-skill` 的 `isModelInvocable`/`isUserInvocable`
|
|
72
|
+
与 `tool-skill` 的 Catalog 过滤源码核实)。whenToUse/描述缩小为
|
|
73
|
+
「仅在用户询问激活/模式/配置/帮助时使用」。
|
|
74
|
+
- **`/ponytail-help` 模式选择指导**:新增 Lite/Full/Ultra/Off 使用建议
|
|
75
|
+
(中英双语)与声明「Ponytail is not a guaranteed token-saving switch. It
|
|
76
|
+
trades a small fixed prompt cost for a chance to reduce unnecessary work.
|
|
77
|
+
Do not default every task to Ultra.」
|
|
78
|
+
- **README 效率说明改为条件性收益**:移除旧的 369/420/406 手工 Token 数字
|
|
79
|
+
与无出处的 A/B 行;改为实测 Prompt 大小(`npm run measure:prompt`)+
|
|
80
|
+
「收益有条件、非保证」说明 + 「上游数据不是本 DSH 适配版的保证」。
|
|
81
|
+
- **新增 `docs/dsh-smoke-summary.md`**:DSH Smoke Benchmark 摘要与证据
|
|
82
|
+
边界(环境、三轮结果、Token/成本口径、动态验证阻断、结论分级),
|
|
83
|
+
明确 directional smoke test;不把 runs 原始数据打进 npm 包。
|
|
84
|
+
|
|
85
|
+
### Added
|
|
86
|
+
|
|
87
|
+
- **`scripts/measure-prompt.mjs` + `npm run measure:prompt`**:从真实
|
|
88
|
+
`getPonytailInstructions()` 生成四档 Prompt,输出 chars/bytes 与
|
|
89
|
+
`estimated_tokens`(无统一 tokenizer 时为 null;off 恒为 0),明确
|
|
90
|
+
「rough estimate only; tokenizer and model dependent」,不冒充 Provider
|
|
91
|
+
Usage。Node ≥ 22.18(原生 type stripping)。
|
|
92
|
+
|
|
93
|
+
### Fixed
|
|
94
|
+
|
|
95
|
+
- `sync:dist` 成功提示文字补上 `src/`(状态检查列表早已覆盖,仅提示遗漏)。
|
|
96
|
+
- CHANGELOG 重复的 `## Unreleased` 标题清理;0.2.1 的 Security 内容归档归位。
|
|
97
|
+
- 模块顶部注释补齐完整优先级链(会话 override > env > Profile > 用户
|
|
98
|
+
config > full),与 modes.ts / content.ts / README / d.ts 一致。
|
|
99
|
+
|
|
100
|
+
### Tests
|
|
101
|
+
|
|
102
|
+
- Gain Skill:含 upstream reference、区分 single-shot/agentic、不声称
|
|
103
|
+
DSH 适配版保证节省、提示简单任务可能不省与模型差异。
|
|
104
|
+
- 主 `ponytail` Skill:仍为指针卡、不含旧 Full 规则;`modelInvocable:
|
|
105
|
+
false` / `userInvocable: true`;五个一次性 Skill 的 invocation 不变。
|
|
106
|
+
- Prompt:off 为空、三档互不相同、均含安全边界与明确验收项。
|
|
107
|
+
|
|
48
108
|
## [0.2.0] - 2026-08-24
|
|
49
109
|
|
|
50
110
|
### Added
|
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ dsh plugin --profile web add @mengyuly/dsh-ponytail
|
|
|
49
49
|
- `/ponytail-review` — 针对最近改动找过度工程,一行一条:位置 + 删什么 + 替代。
|
|
50
50
|
- `/ponytail-audit` — 全仓库过度工程审计,排序清单。
|
|
51
51
|
- `/ponytail-debt` — 收割所有 `ponytail:` 注释成债务账本。
|
|
52
|
-
- `/ponytail-gain` —
|
|
52
|
+
- `/ponytail-gain` — 上游 Benchmark 参考计分板(代码减少;Token/成本/延迟效果取决于模型与任务,**非本适配版保证**)。
|
|
53
53
|
- `/ponytail-help` — 参考卡。
|
|
54
54
|
- **停用**:说 `stop ponytail` 或 `normal mode`(兼容中英文句末标点);随时 `/ponytail` 恢复。
|
|
55
55
|
- **默认值优先级**(代码/测试/文档一致):
|
|
@@ -70,15 +70,36 @@ dsh plugin --profile web add @mengyuly/dsh-ponytail
|
|
|
70
70
|
- **子代理(如实边界)**:DSH 内置 `subagent` 工具是**隔离派生**,默认**不继承**本插件的 system-prompt;`PONYTAIL_SUBAGENT_MATCHER`(匹配子代理 `agentPreset` 的正则)**只用于筛选能进入本 Prompt 管线的子代理**,不是继承开关;DSH 当前没有公开的子代理派生/可继承 Prompt API,因此**未实现、也不宣称父子 Prompt 继承**(有官方 API 后再考虑只读快照传播)。非法正则告警一次并 fail-open。
|
|
71
71
|
- **配置错误**:非法 JSON / 非法 `defaultMode` / 读取失败 / 非法正则只告警一次(不刷屏);配置文件不存在属正常、不告警。
|
|
72
72
|
|
|
73
|
-
##
|
|
73
|
+
## 效率(条件性收益,非保证)
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
Ponytail 会给每次模型请求增加一小段固定规则。它的收益是**有条件的**:
|
|
76
|
+
当 Agent 容易过度设计时,减少的代码、工具调用和返工可能抵消甚至超过
|
|
77
|
+
这部分开销;当任务本来已经很简单时,收益可能接近零,甚至出现额外输入
|
|
78
|
+
开销。它不是"省 Token 开关",也不保证跨模型省钱——某些推理模型可能因
|
|
79
|
+
prompt 与推理开销变得更贵。
|
|
80
|
+
|
|
81
|
+
本 DSH 适配版当前 Prompt 段实测大小(`npm run measure:prompt`,从真实
|
|
82
|
+
`getPonytailInstructions()` 生成):
|
|
83
|
+
|
|
84
|
+
| 档位 | 字符数 | UTF-8 字节 | 说明 |
|
|
85
|
+
|------|--------|-----------|------|
|
|
86
|
+
| lite | 1474 | 1476 | 实测生成 |
|
|
87
|
+
| full | 1678 | 1682 | 实测生成 |
|
|
88
|
+
| ultra | 1625 | 1629 | 实测生成 |
|
|
89
|
+
| off | 0 | 0 | 不注入 |
|
|
90
|
+
|
|
91
|
+
这些是 **Prompt 体积测量,不是账单金额,也不是对所有模型成立的节省
|
|
92
|
+
比例**(无统一 tokenizer,`measure:prompt` 输出中 `estimated_tokens` 为
|
|
93
|
+
null;字符数/4 只是粗略估算)。同模式字节级稳定,KV-cache 前缀命中。
|
|
94
|
+
|
|
95
|
+
**上游数据不是本 DSH 适配版的保证**:上游 Ponytail 的 single-shot
|
|
96
|
+
(代码 −80~94%、成本 −42~75%、延迟 3.1–5.8×)与 agentic(LOC −54% 等)
|
|
97
|
+
结果仅作参考;DSH 适配版**未建立**稳定的 Token/成本/延迟节省率。DSH
|
|
98
|
+
Smoke Benchmark 只提供方向性证据(见 `docs/dsh-smoke-summary.md`)。
|
|
78
99
|
|
|
79
100
|
## 已知限制
|
|
80
101
|
|
|
81
|
-
-
|
|
102
|
+
- 档位差异在**规则语义**上(见上),三者 Prompt 体积相近(实测见上表)。
|
|
82
103
|
- 上游 Claude 专属的 statusline 徽标无 DSH 对应物,MCP 服务器因 DSH 有一等 system-prompt 注入点而弃用。
|
|
83
104
|
- 用户 `config.json` 热更新;`PONYTAIL_DEFAULT_MODE` 与 Profile config 需重启生效。
|
|
84
105
|
- 发行 `lib/` 是预编译产物;改源码请回主仓重建后同步。
|
package/lib/index.js
CHANGED
|
@@ -941,7 +941,7 @@ else — the section is the single source of truth and it is mode-aware.
|
|
|
941
941
|
\`/ponytail-gain\`, \`/ponytail-help\`
|
|
942
942
|
- Reference: https://github.com/DietrichGebert/ponytail
|
|
943
943
|
`;
|
|
944
|
-
const PONYTAIL_DESCRIPTION = "
|
|
944
|
+
const PONYTAIL_DESCRIPTION = "Ponytail activation, modes, configuration, and help reference. The active ruleset is injected every turn by the system prompt; this skill is a pointer card. Use only when the user asks about Ponytail activation, modes, configuration, or help. Coding tasks already receive the active ruleset from the system prompt.";
|
|
945
945
|
const REVIEW_SKILL_BODY = `
|
|
946
946
|
Review diffs for unnecessary complexity. One line per finding: location, what
|
|
947
947
|
to cut, what replaces it. The diff's best outcome is getting shorter.
|
|
@@ -1064,24 +1064,57 @@ 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
|
-
|
|
1068
|
-
validator, debounce, CSV sum, countdown timer, rate limiter; three models:
|
|
1069
|
-
Haiku, Sonnet, Opus). They are measured, not computed from the current repo.
|
|
1070
|
-
Source: the upstream \`benchmarks/\` directory and README.
|
|
1067
|
+
## Upstream reference
|
|
1071
1068
|
|
|
1072
|
-
|
|
1069
|
+
The figures below are the UPSTREAM Ponytail project's published benchmark
|
|
1070
|
+
results, not measured guarantees for this DSH adapter.
|
|
1071
|
+
|
|
1072
|
+
These are upstream Ponytail results, not measured guarantees for this DSH
|
|
1073
|
+
adapter. Savings depend on model and workload. Already-minimal tasks may show
|
|
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:
|
|
1081
|
+
|
|
1082
|
+
- Lines of code: −80–94%
|
|
1083
|
+
- Cost: −42–75%
|
|
1084
|
+
- Latency: ~3.1–5.8× faster
|
|
1085
|
+
|
|
1086
|
+
### Agentic reference
|
|
1087
|
+
|
|
1088
|
+
Real Claude Code sessions on real repositories; 12 feature tasks:
|
|
1089
|
+
|
|
1090
|
+
- Source LOC: ~−54%
|
|
1091
|
+
- Tokens: ~−22%
|
|
1092
|
+
- Cost: ~−20%
|
|
1093
|
+
- Time: ~−27%
|
|
1094
|
+
- Over-build tasks: −60–94%
|
|
1095
|
+
- Safety tests: 100%
|
|
1096
|
+
|
|
1097
|
+
### DSH adapter status
|
|
1098
|
+
|
|
1099
|
+
Current DSH smoke tests support directional effectiveness only. Stable token,
|
|
1100
|
+
cost, and latency savings have not been established.
|
|
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)
|
|
1073
1106
|
|
|
1074
1107
|
Render plain ASCII bars. The bar length shows the measured range; the label
|
|
1075
1108
|
carries the exact figure:
|
|
1076
1109
|
|
|
1077
1110
|
\`\`\`
|
|
1078
|
-
ponytail gain
|
|
1111
|
+
ponytail gain upstream single-shot reference
|
|
1079
1112
|
|
|
1080
1113
|
Lines of code no-skill ████████████████████ 100%
|
|
1081
|
-
ponytail
|
|
1114
|
+
ponytail █▌·················· 6–20% ▼ 80–94%
|
|
1082
1115
|
Cost no-skill ████████████████████ 100%
|
|
1083
|
-
ponytail
|
|
1084
|
-
Speed ponytail ▸ 3–
|
|
1116
|
+
ponytail █████▌··············· 25–58% ▼ 42–75%
|
|
1117
|
+
Speed ponytail ▸ 3.1–5.8× faster
|
|
1085
1118
|
|
|
1086
1119
|
This repo: /ponytail-debt (shortcuts you deferred)
|
|
1087
1120
|
/ponytail-audit (what's still cuttable)
|
|
@@ -1089,18 +1122,20 @@ carries the exact figure:
|
|
|
1089
1122
|
|
|
1090
1123
|
## Honesty boundary
|
|
1091
1124
|
|
|
1092
|
-
These are benchmark medians, not this repo
|
|
1093
|
-
number ("you saved X lines/tokens
|
|
1094
|
-
written, so there is no real baseline
|
|
1095
|
-
only real per-repo figures come from
|
|
1096
|
-
this card points there instead of
|
|
1125
|
+
These are upstream benchmark medians, not this repo and not this DSH
|
|
1126
|
+
adapter. NEVER print a per-repo savings number ("you saved X lines/tokens
|
|
1127
|
+
here"): the unbuilt version was never written, so there is no real baseline
|
|
1128
|
+
to subtract from in a live repo. The only real per-repo figures come from
|
|
1129
|
+
\`/ponytail-debt\` (a counted ledger), and this card points there instead of
|
|
1130
|
+
inventing one. Never claim "Ponytail always saves tokens/cost" or that this
|
|
1131
|
+
adapter reproduces the upstream percentages.
|
|
1097
1132
|
|
|
1098
1133
|
## Boundaries
|
|
1099
1134
|
|
|
1100
1135
|
One-shot display. Edits nothing, changes no mode.
|
|
1101
1136
|
"stop ponytail" or "normal mode": revert.
|
|
1102
1137
|
`;
|
|
1103
|
-
const GAIN_DESCRIPTION = "
|
|
1138
|
+
const GAIN_DESCRIPTION = "Upstream benchmark reference; less unnecessary code, while token, cost, and latency effects depend on model and workload. One-shot display, not a persistent mode, and not a per-repo or DSH-adapter guarantee. Trigger: /ponytail-gain, \"ponytail gain\", \"what does ponytail save\", \"show ponytail impact\", \"ponytail scoreboard\".";
|
|
1104
1139
|
const HELP_SKILL_BODY = `
|
|
1105
1140
|
Display this reference card when invoked. One-shot, do NOT change mode,
|
|
1106
1141
|
write flag files, or persist anything.
|
|
@@ -1116,6 +1151,28 @@ write flag files, or persist anything.
|
|
|
1116
1151
|
|
|
1117
1152
|
Level is session-scoped until changed.
|
|
1118
1153
|
|
|
1154
|
+
## Choosing a level
|
|
1155
|
+
|
|
1156
|
+
- **Lite**: Use for small, explicit changes or when the implementation is
|
|
1157
|
+
already clear. Completes explicit requirements without actively
|
|
1158
|
+
challenging them.
|
|
1159
|
+
Lite:小改动、需求明确时使用。
|
|
1160
|
+
- **Full**: Use for new features, refactors, root-cause bug fixes, or tasks
|
|
1161
|
+
likely to invite unnecessary abstractions, dependencies, or custom
|
|
1162
|
+
components.
|
|
1163
|
+
Full:新功能、重构、根因修复、容易过度设计时使用。
|
|
1164
|
+
- **Ultra**: Use for deliberate code cleanup and over-engineering removal.
|
|
1165
|
+
It questions speculative scope, but never removes explicit requirements,
|
|
1166
|
+
security, validation, accessibility, or data-loss protection.
|
|
1167
|
+
Ultra:专门清理冗余和过度抽象时使用。
|
|
1168
|
+
- **Off**: Use when the task is non-coding, already fully specified, or when
|
|
1169
|
+
the fixed prompt overhead is not worthwhile.
|
|
1170
|
+
Off:非编码任务或已经明确到无需额外编码判断的任务。
|
|
1171
|
+
|
|
1172
|
+
Ponytail is not a guaranteed token-saving switch. It trades a small fixed
|
|
1173
|
+
prompt cost for a chance to reduce unnecessary work. Do not default every
|
|
1174
|
+
task to Ultra.
|
|
1175
|
+
|
|
1119
1176
|
## Skills
|
|
1120
1177
|
|
|
1121
1178
|
| Skill | Trigger | What it does |
|
|
@@ -1181,10 +1238,10 @@ function ponytailSkills() {
|
|
|
1181
1238
|
name: "ponytail",
|
|
1182
1239
|
source: "runtime",
|
|
1183
1240
|
description: PONYTAIL_DESCRIPTION,
|
|
1184
|
-
whenToUse: "
|
|
1241
|
+
whenToUse: "Use only when the user asks about Ponytail activation, modes, configuration, or help. Coding tasks already receive the active ruleset from the system prompt.",
|
|
1185
1242
|
content: PONYTAIL_SKILL_BODY,
|
|
1186
1243
|
invocation: {
|
|
1187
|
-
modelInvocable:
|
|
1244
|
+
modelInvocable: false,
|
|
1188
1245
|
userInvocable: true
|
|
1189
1246
|
}
|
|
1190
1247
|
},
|
|
@@ -1570,8 +1627,9 @@ const instructionCache = /* @__PURE__ */ new Map();
|
|
|
1570
1627
|
* `agent/pre-step` listener honors the plain-text deactivation phrases.
|
|
1571
1628
|
*
|
|
1572
1629
|
* Mode is session-scoped and held in memory; the configured default resolves
|
|
1573
|
-
* from `PONYTAIL_DEFAULT_MODE
|
|
1574
|
-
* {@link readDefaultMode})
|
|
1630
|
+
* from `PONYTAIL_DEFAULT_MODE`, then the Cordis profile `defaultMode`, then
|
|
1631
|
+
* `~/.config/ponytail/config.json` (see {@link readDefaultMode}), then
|
|
1632
|
+
* `full`. A session override via `/ponytail` outranks all of them.
|
|
1575
1633
|
*
|
|
1576
1634
|
* @module @deepseek-ai/dsh-ponytail
|
|
1577
1635
|
*/
|
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\nThe figures are the published benchmark
|
|
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\n## Upstream reference\n\nThe figures below are the UPSTREAM Ponytail project's published benchmark\nresults, not measured guarantees for this DSH adapter.\n\nThese are upstream Ponytail results, not measured guarantees for this DSH\nadapter. Savings depend on model and workload. Already-minimal tasks may show\nlittle or no savings. Some reasoning models may become more expensive because\nof prompt and reasoning overhead.\n\n### 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: \u221242\u201375%\n- Latency: ~3.1\u20135.8\u00D7 faster\n\n### 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### DSH adapter status\n\nCurrent DSH smoke tests support directional effectiveness 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## Scoreboard (upstream single-shot reference)\n\nRender plain ASCII bars. The bar length shows the measured range; the label\ncarries the exact figure:\n\n```\n ponytail gain upstream single-shot reference\n\n Lines of code no-skill \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 100%\n ponytail \u2588\u258C\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7 6\u201320% \u25BC 80\u201394%\n Cost no-skill \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 100%\n ponytail \u2588\u2588\u2588\u2588\u2588\u258C\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7\u00B7 25\u201358% \u25BC 42\u201375%\n Speed ponytail \u25B8 3.1\u20135.8\u00D7 faster\n\n This repo: /ponytail-debt (shortcuts you deferred)\n /ponytail-audit (what's still cuttable)\n```\n\n## 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.\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## 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` | Measured-impact scoreboard: less code, less cost, more speed. |\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";
|
|
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` | Measured-impact scoreboard: less code, less cost, more speed. |\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/lib/types/index.d.ts
CHANGED
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
* `agent/pre-step` listener honors the plain-text deactivation phrases.
|
|
8
8
|
*
|
|
9
9
|
* Mode is session-scoped and held in memory; the configured default resolves
|
|
10
|
-
* from `PONYTAIL_DEFAULT_MODE
|
|
11
|
-
* {@link readDefaultMode})
|
|
10
|
+
* from `PONYTAIL_DEFAULT_MODE`, then the Cordis profile `defaultMode`, then
|
|
11
|
+
* `~/.config/ponytail/config.json` (see {@link readDefaultMode}), then
|
|
12
|
+
* `full`. A session override via `/ponytail` outranks all of them.
|
|
12
13
|
*
|
|
13
14
|
* @module @deepseek-ai/dsh-ponytail
|
|
14
15
|
*/
|
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.2.
|
|
4
|
+
"version": "0.2.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"verify:dist": "node scripts/verify-dist.mjs",
|
|
53
53
|
"verify:pack": "node scripts/verify-pack.mjs",
|
|
54
54
|
"test:consumer": "node scripts/test-consumer.mjs",
|
|
55
|
-
"test:regressions": "node scripts/test-regressions.mjs"
|
|
55
|
+
"test:regressions": "node scripts/test-regressions.mjs",
|
|
56
|
+
"measure:prompt": "node scripts/measure-prompt.mjs"
|
|
56
57
|
}
|
|
57
58
|
}
|