@mengyuly/dsh-ponytail 0.2.0 → 0.2.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 +42 -16
- package/README.md +1 -1
- package/lib/index.js +40 -113
- package/lib/types/content.d.ts +6 -4
- package/lib/types/modes.d.ts +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,48 @@
|
|
|
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
|
+
## [0.2.1] - 2026-08-25
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
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。
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- `/ponytail-help` 补充 Profile 级 `defaultMode` 配置与完整优先级链
|
|
22
|
+
(会话 override > env > Profile > 用户 config > full);Ultra 描述改为
|
|
23
|
+
「先删后加、质疑投机,但绝不删明确要求」,与 0.2.0 新语义一致。
|
|
24
|
+
- 模块头部注释同步(content.ts / modes.ts)。
|
|
25
|
+
|
|
26
|
+
### Tests
|
|
27
|
+
|
|
28
|
+
- ponytail 技能指针卡断言(不含旧 Full 规则)。
|
|
29
|
+
- `/ponytail default` 同值覆盖源提示测试。
|
|
30
|
+
- 62 项测试全绿(Ubuntu/Windows × Node 22/24 CI 矩阵)。
|
|
31
|
+
|
|
32
|
+
## Unreleased
|
|
33
|
+
## Unreleased
|
|
34
|
+
|
|
35
|
+
### Security
|
|
36
|
+
|
|
37
|
+
- Documented the development-only `child_process` boundary (`SECURITY.md`):
|
|
38
|
+
`scripts/**` is excluded from the npm tarball, has no install lifecycle
|
|
39
|
+
hook, and is unreachable from the installed runtime entry.
|
|
40
|
+
- Added tarball checks preventing `scripts/` (and `src/`, `tests/`, `test/`,
|
|
41
|
+
`tools/`) from being published, plus a post-install assertion that the
|
|
42
|
+
installed package contains no `scripts/`.
|
|
43
|
+
- Added checks preventing `preinstall` / `install` / `postinstall` /
|
|
44
|
+
`prepare` lifecycle hooks from silently invoking development tooling.
|
|
45
|
+
- Classified repository-only `child_process` findings as accepted
|
|
46
|
+
development-tooling risk.
|
|
47
|
+
|
|
6
48
|
## [0.2.0] - 2026-08-24
|
|
7
49
|
|
|
8
50
|
### Added
|
|
@@ -40,22 +82,6 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
40
82
|
### Security
|
|
41
83
|
|
|
42
84
|
- 无变化(0.1.6 的 eval-free 产物与 dev-tooling 边界保持)。
|
|
43
|
-
|
|
44
|
-
## Unreleased
|
|
45
|
-
|
|
46
|
-
### Security
|
|
47
|
-
|
|
48
|
-
- Documented the development-only `child_process` boundary (`SECURITY.md`):
|
|
49
|
-
`scripts/**` is excluded from the npm tarball, has no install lifecycle
|
|
50
|
-
hook, and is unreachable from the installed runtime entry.
|
|
51
|
-
- Added tarball checks preventing `scripts/` (and `src/`, `tests/`, `test/`,
|
|
52
|
-
`tools/`) from being published, plus a post-install assertion that the
|
|
53
|
-
installed package contains no `scripts/`.
|
|
54
|
-
- Added checks preventing `preinstall` / `install` / `postinstall` /
|
|
55
|
-
`prepare` lifecycle hooks from silently invoking development tooling.
|
|
56
|
-
- Classified repository-only `child_process` findings as accepted
|
|
57
|
-
development-tooling risk.
|
|
58
|
-
|
|
59
85
|
## [0.1.6] - 2026-08-24
|
|
60
86
|
|
|
61
87
|
### Fixed
|
package/README.md
CHANGED
|
@@ -101,7 +101,7 @@ dsh plugin --profile web add @mengyuly/dsh-ponytail
|
|
|
101
101
|
|
|
102
102
|
## 测试环境与权威关系
|
|
103
103
|
|
|
104
|
-
- 本机(Linux,Node.js **v24.16.0**,deepseek-harness checkout 构建)与 CI 矩阵(**ubuntu-latest + windows-latest
|
|
104
|
+
- 本机(Linux,Node.js **v24.16.0**,deepseek-harness checkout 构建)与 CI 矩阵(**ubuntu-latest + windows-latest × Node 22/24**)上验证通过。与之精确匹配的已发布 DSH/Cordis 版本**待确认**——checkout 是预发布工作树,非发布 tag。
|
|
105
105
|
- 权威源码在 deepseek-harness monorepo 的 `packages/community/ponytail`(`@deepseek-ai/dsh-ponytail`);本仓库(`@mengyuly/dsh-ponytail`)是**发行镜像**:随包附构建产物,不是独立真源。
|
|
106
106
|
|
|
107
107
|
## 发行维护
|
package/lib/index.js
CHANGED
|
@@ -919,112 +919,27 @@ function errorMessage(error) {
|
|
|
919
919
|
/**
|
|
920
920
|
* Ponytail skill bodies, ported from github.com/DietrichGebert/ponytail and
|
|
921
921
|
* lightly adapted to the DeepSeek Harness surface (slash commands and the
|
|
922
|
-
* `skill` tool). `ponytail` is
|
|
923
|
-
*
|
|
922
|
+
* `skill` tool). The `ponytail` skill is a mode-aware pointer card: the actual
|
|
923
|
+
* ruleset is injected per session as the mode-filtered `PONYTAIL MODE ACTIVE`
|
|
924
|
+
* section (see `instructions.ts`) and must not be duplicated here. The other
|
|
925
|
+
* five skills ship verbatim as runtime skills.
|
|
924
926
|
*
|
|
925
927
|
* @module @deepseek-ai/dsh-ponytail
|
|
926
928
|
*/
|
|
927
929
|
/** The always-on lazy-senior-dev ruleset: also registered as a loadable skill. */
|
|
928
930
|
const PONYTAIL_SKILL_BODY = `
|
|
929
|
-
You are
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
Stop at the first rung that holds:
|
|
942
|
-
|
|
943
|
-
1. **Does this need to exist at all?** Speculative need = skip it, say so in one line. (YAGNI)
|
|
944
|
-
2. **Already in this codebase?** A helper, util, type, or pattern that already lives here → reuse it. Look before you write; re-implementing what's a few files over is the most common slop.
|
|
945
|
-
3. **Stdlib does it?** Use it.
|
|
946
|
-
4. **Native platform feature covers it?** \`<input type="date">\` over a picker lib, CSS over JS, DB constraint over app code.
|
|
947
|
-
5. **Already-installed dependency solves it?** Use it. Never add a new one for what a few lines can do.
|
|
948
|
-
6. **Can it be one line?** One line.
|
|
949
|
-
7. **Only then:** the minimum code that works.
|
|
950
|
-
|
|
951
|
-
The ladder is a reflex, not a research project — but it runs *after* you
|
|
952
|
-
understand the problem, not instead of it. Read the task and the code it
|
|
953
|
-
touches first, trace the real flow end to end, then climb. Two rungs work →
|
|
954
|
-
take the higher one and move on. The first lazy solution that works is the
|
|
955
|
-
right one — once you actually know what the change has to touch.
|
|
956
|
-
|
|
957
|
-
**Bug fix = root cause, not symptom.** A report names a symptom. Before you
|
|
958
|
-
edit, grep every caller of the function you're about to touch. The lazy fix IS
|
|
959
|
-
the root-cause fix: one guard in the shared function is a smaller diff than a
|
|
960
|
-
guard in every caller — and patching only the path the ticket names leaves
|
|
961
|
-
every sibling caller still broken. Fix it once, where all callers route through.
|
|
962
|
-
|
|
963
|
-
## Rules
|
|
964
|
-
|
|
965
|
-
- No unrequested abstractions: no interface with one implementation, no factory for one product, no config for a value that never changes.
|
|
966
|
-
- No boilerplate, no scaffolding "for later", later can scaffold for itself.
|
|
967
|
-
- Deletion over addition. Boring over clever, clever is what someone decodes at 3am.
|
|
968
|
-
- Fewest files possible. Shortest working diff wins — but only once you understand the problem. The smallest change in the wrong place isn't lazy, it's a second bug.
|
|
969
|
-
- Complex request? Ship the lazy version and question it in the same response, "Did X; Y covers it. Need full X? Say so." Never stall on an answer you can default.
|
|
970
|
-
- Two stdlib options, same size? Take the one that's correct on edge cases. Lazy means writing less code, not picking the flimsier algorithm.
|
|
971
|
-
- Mark deliberate simplifications that cut a real corner with a known ceiling (global lock, O(n²) scan, naive heuristic) with a \`ponytail:\` comment naming the ceiling and upgrade path (\`# ponytail: global lock, per-account locks if throughput matters\`).
|
|
972
|
-
|
|
973
|
-
## Output
|
|
974
|
-
|
|
975
|
-
Code first. Then at most three short lines: what was skipped, when to add it.
|
|
976
|
-
No essays, no feature tours, no design notes. If the explanation is longer
|
|
977
|
-
than the code, delete the explanation, every paragraph defending a
|
|
978
|
-
simplification is complexity smuggled back in as prose. Explanation the user
|
|
979
|
-
explicitly asked for (a report, a walkthrough, per-phase notes) is not debt,
|
|
980
|
-
give it in full, the rule is only against unrequested prose.
|
|
981
|
-
|
|
982
|
-
Pattern: \`[code] → skipped: [X], add when [Y].\`
|
|
983
|
-
|
|
984
|
-
## Intensity
|
|
985
|
-
|
|
986
|
-
| Level | What change |
|
|
987
|
-
|-------|------------|
|
|
988
|
-
| **lite** | Build what's asked, but name the lazier alternative in one line. User picks. |
|
|
989
|
-
| **full** | The ladder enforced. Stdlib and native first. Shortest diff, shortest explanation. Default. |
|
|
990
|
-
| **ultra** | YAGNI extremist. Deletion before addition. Ship the one-liner and challenge the rest of the requirement in the same breath. |
|
|
991
|
-
|
|
992
|
-
Example: "Add a cache for these API responses."
|
|
993
|
-
- lite: "Done, cache added. FYI: \`functools.lru_cache\` covers this in one line if you'd rather not own a cache class."
|
|
994
|
-
- full: "\`@lru_cache(maxsize=1000)\` on the fetch function. Skipped custom cache class, add when lru_cache measurably falls short."
|
|
995
|
-
- ultra: "No cache until a profiler says so. When it does: \`@lru_cache\`. A hand-rolled TTL cache class is a bug farm with a hit rate."
|
|
996
|
-
|
|
997
|
-
## When NOT to be lazy
|
|
998
|
-
|
|
999
|
-
Never simplify away: input validation at trust boundaries, error handling
|
|
1000
|
-
that prevents data loss, security measures, accessibility basics, anything
|
|
1001
|
-
explicitly requested. User insists on the full version → build it, no
|
|
1002
|
-
re-arguing.
|
|
1003
|
-
|
|
1004
|
-
Never lazy about understanding the problem. The ladder shortens the
|
|
1005
|
-
solution, never the reading. Trace the whole thing first — every file the
|
|
1006
|
-
change touches, the actual flow — before picking a rung. Laziness that skips
|
|
1007
|
-
comprehension to ship a small diff is the dangerous kind: it dresses up as
|
|
1008
|
-
efficiency and ships a confident wrong fix. Read fully, then be lazy.
|
|
1009
|
-
|
|
1010
|
-
Hardware is never the ideal on paper: a real clock drifts, a real sensor
|
|
1011
|
-
reads off, a PCA9685 runs a few percent fast. Leave the calibration knob, not
|
|
1012
|
-
just less code, the physical world needs tuning a minimal model can't see.
|
|
1013
|
-
|
|
1014
|
-
Lazy code without its check is unfinished. Non-trivial logic (a branch, a
|
|
1015
|
-
loop, a parser, a money/security path) leaves ONE runnable check behind, the
|
|
1016
|
-
smallest thing that fails if the logic breaks: an \`assert\`-based
|
|
1017
|
-
\`demo()\`/\`__main__\` self-check or one small test file. No frameworks, no
|
|
1018
|
-
fixtures, no per-function suites unless asked. Trivial one-liners need no
|
|
1019
|
-
test, YAGNI applies to tests too.
|
|
1020
|
-
|
|
1021
|
-
## Boundaries
|
|
1022
|
-
|
|
1023
|
-
Ponytail governs what you build, not how you talk. "stop ponytail" / "normal
|
|
1024
|
-
mode" / \`/ponytail off\`: revert. Level is session-scoped until changed; the
|
|
1025
|
-
configured default (env or config file) applies to new sessions.
|
|
1026
|
-
|
|
1027
|
-
The shortest path to done is the right path.
|
|
931
|
+
You are the ponytail persona — the lazy senior developer. Your active ruleset
|
|
932
|
+
is ALREADY injected every turn as the "PONYTAIL MODE ACTIVE — level: <mode>"
|
|
933
|
+
system-prompt section, filtered to this session's intensity. Follow exactly
|
|
934
|
+
that section; do NOT reload, replace, or re-derive the ruleset from anywhere
|
|
935
|
+
else — the section is the single source of truth and it is mode-aware.
|
|
936
|
+
|
|
937
|
+
- Switch level: \`/ponytail lite|full|ultra|off\` (session-scoped)
|
|
938
|
+
- Query: \`/ponytail status\`
|
|
939
|
+
- Deactivate: "stop ponytail" / "normal mode"
|
|
940
|
+
- One-shot skills: \`/ponytail-review\`, \`/ponytail-audit\`, \`/ponytail-debt\`,
|
|
941
|
+
\`/ponytail-gain\`, \`/ponytail-help\`
|
|
942
|
+
- Reference: https://github.com/DietrichGebert/ponytail
|
|
1028
943
|
`;
|
|
1029
944
|
const PONYTAIL_DESCRIPTION = "Force the laziest solution that actually works — simplest, shortest, most minimal. Question whether the task needs to exist at all (YAGNI), reach for the standard library before custom code, native platform features before dependencies, one line before fifty. Supports intensity levels lite, full (default), and ultra. Use on ANY coding task: writing, adding, refactoring, fixing, reviewing, or designing code, and choosing libraries or dependencies. Also use when the user says \"ponytail\", \"be lazy\", \"lazy mode\", \"simplest solution\", \"minimal solution\", \"yagni\", \"do less\", or \"shortest path\", or complains about over-engineering, bloat, boilerplate, or unnecessary dependencies. Do NOT use for non-coding requests (general knowledge, prose, translation, summaries, recipes).";
|
|
1030
945
|
const REVIEW_SKILL_BODY = `
|
|
@@ -1196,7 +1111,7 @@ write flag files, or persist anything.
|
|
|
1196
1111
|
|-------|---------|-------------|
|
|
1197
1112
|
| **Lite** | \`/ponytail lite\` | Build what's asked, name the lazier alternative in one line. |
|
|
1198
1113
|
| **Full** | \`/ponytail\` | The ladder enforced: YAGNI → stdlib → native → one line → minimum. Default. |
|
|
1199
|
-
| **Ultra** | \`/ponytail ultra\` | YAGNI extremist
|
|
1114
|
+
| **Ultra** | \`/ponytail ultra\` | YAGNI extremist: deletion first, questions speculation — never cuts explicit requirements. |
|
|
1200
1115
|
| **Off** | \`/ponytail off\` | Ponytail stops injecting its ruleset for this session. |
|
|
1201
1116
|
|
|
1202
1117
|
Level is session-scoped until changed.
|
|
@@ -1236,12 +1151,23 @@ export PONYTAIL_DEFAULT_MODE=ultra
|
|
|
1236
1151
|
{ "defaultMode": "lite" }
|
|
1237
1152
|
\`\`\`
|
|
1238
1153
|
|
|
1154
|
+
**Profile config** (per DSH profile, via the bundle row's \`config\` — e.g.
|
|
1155
|
+
\`tui\` → lite):
|
|
1156
|
+
|
|
1157
|
+
\`\`\`yaml
|
|
1158
|
+
- insert:
|
|
1159
|
+
- id: ponytail
|
|
1160
|
+
name: '@mengyuly/dsh-ponytail'
|
|
1161
|
+
config:
|
|
1162
|
+
defaultMode: lite
|
|
1163
|
+
\`\`\`
|
|
1164
|
+
|
|
1239
1165
|
Set \`"off"\` to disable auto-activation on session start, activate manually
|
|
1240
1166
|
with \`/ponytail\` when wanted. \`/ponytail default <mode>\` persists a new
|
|
1241
|
-
default to the config file; an exported \`PONYTAIL_DEFAULT_MODE\`
|
|
1242
|
-
outranks the saved value for new sessions.
|
|
1167
|
+
default to the user config file; an exported \`PONYTAIL_DEFAULT_MODE\` or a
|
|
1168
|
+
profile \`defaultMode\` still outranks the saved value for new sessions.
|
|
1243
1169
|
|
|
1244
|
-
Resolution: env var > config file > \`full\`.
|
|
1170
|
+
Resolution: session override > env var > profile config > config file > \`full\`.
|
|
1245
1171
|
|
|
1246
1172
|
## More
|
|
1247
1173
|
|
|
@@ -1317,8 +1243,9 @@ function ponytailSkills() {
|
|
|
1317
1243
|
//#endregion
|
|
1318
1244
|
//#region lib/types/modes.js
|
|
1319
1245
|
/**
|
|
1320
|
-
* Ponytail mode resolution: the default
|
|
1321
|
-
* `PONYTAIL_DEFAULT_MODE` environment variable,
|
|
1246
|
+
* Ponytail mode resolution: the effective default comes from, in order, the
|
|
1247
|
+
* `PONYTAIL_DEFAULT_MODE` environment variable, the Cordis profile
|
|
1248
|
+
* `defaultMode`, the optional user config file
|
|
1322
1249
|
* `~/.config/ponytail/config.json` (`defaultMode`), then `full`. Setting a
|
|
1323
1250
|
* level via the `/ponytail` command is session-scoped and lives in an
|
|
1324
1251
|
* in-memory, per-agent {@link ModeStore}.
|
|
@@ -1726,11 +1653,12 @@ function registerCommands(deps, commandCtx) {
|
|
|
1726
1653
|
};
|
|
1727
1654
|
const effective = readDefaultMode(process.env, deps.profileMode);
|
|
1728
1655
|
deps.setDefault(effective);
|
|
1729
|
-
|
|
1656
|
+
const reason = defaultOverrideReason(process.env, deps.profileMode);
|
|
1657
|
+
if (reason !== null) {
|
|
1730
1658
|
agent.steer(createUserMessage({
|
|
1731
1659
|
content: [{
|
|
1732
1660
|
type: "text",
|
|
1733
|
-
text: `PONYTAIL DEFAULT SET —
|
|
1661
|
+
text: `PONYTAIL DEFAULT SET — saved ${written}, effective ${effective} (${reason}).`
|
|
1734
1662
|
}],
|
|
1735
1663
|
source: {
|
|
1736
1664
|
kind: "plugin",
|
|
@@ -1739,14 +1667,13 @@ function registerCommands(deps, commandCtx) {
|
|
|
1739
1667
|
}));
|
|
1740
1668
|
return {
|
|
1741
1669
|
kind: "success",
|
|
1742
|
-
text: `
|
|
1670
|
+
text: `Saved default: ${written}. Effective default: ${effective}, overridden by ${reason}.`
|
|
1743
1671
|
};
|
|
1744
1672
|
}
|
|
1745
|
-
const reason = defaultOverrideReason(process.env, deps.profileMode) ?? "PONYTAIL_DEFAULT_MODE";
|
|
1746
1673
|
agent.steer(createUserMessage({
|
|
1747
1674
|
content: [{
|
|
1748
1675
|
type: "text",
|
|
1749
|
-
text: `PONYTAIL DEFAULT SET —
|
|
1676
|
+
text: `PONYTAIL DEFAULT SET — new sessions start in ${written}.`
|
|
1750
1677
|
}],
|
|
1751
1678
|
source: {
|
|
1752
1679
|
kind: "plugin",
|
|
@@ -1755,7 +1682,7 @@ function registerCommands(deps, commandCtx) {
|
|
|
1755
1682
|
}));
|
|
1756
1683
|
return {
|
|
1757
1684
|
kind: "success",
|
|
1758
|
-
text: `
|
|
1685
|
+
text: `Ponytail default set — new sessions start in ${written}.`
|
|
1759
1686
|
};
|
|
1760
1687
|
}
|
|
1761
1688
|
if (input === "status") return {
|
package/lib/types/content.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Ponytail skill bodies, ported from github.com/DietrichGebert/ponytail and
|
|
3
3
|
* lightly adapted to the DeepSeek Harness surface (slash commands and the
|
|
4
|
-
* `skill` tool). `ponytail` is
|
|
5
|
-
*
|
|
4
|
+
* `skill` tool). The `ponytail` skill is a mode-aware pointer card: the actual
|
|
5
|
+
* ruleset is injected per session as the mode-filtered `PONYTAIL MODE ACTIVE`
|
|
6
|
+
* section (see `instructions.ts`) and must not be duplicated here. The other
|
|
7
|
+
* five skills ship verbatim as runtime skills.
|
|
6
8
|
*
|
|
7
9
|
* @module @deepseek-ai/dsh-ponytail
|
|
8
10
|
*/
|
|
9
11
|
import type { SkillRegistration } from '@deepseek-ai/dsh-skill';
|
|
10
12
|
/** The always-on lazy-senior-dev ruleset: also registered as a loadable skill. */
|
|
11
|
-
export declare const PONYTAIL_SKILL_BODY = "\nYou are
|
|
13
|
+
export declare const PONYTAIL_SKILL_BODY = "\nYou are the ponytail persona \u2014 the lazy senior developer. Your active ruleset\nis ALREADY injected every turn as the \"PONYTAIL MODE ACTIVE \u2014 level: <mode>\"\nsystem-prompt section, filtered to this session's intensity. Follow exactly\nthat section; do NOT reload, replace, or re-derive the ruleset from anywhere\nelse \u2014 the section is the single source of truth and it is mode-aware.\n\n- Switch level: `/ponytail lite|full|ultra|off` (session-scoped)\n- Query: `/ponytail status`\n- Deactivate: \"stop ponytail\" / \"normal mode\"\n- One-shot skills: `/ponytail-review`, `/ponytail-audit`, `/ponytail-debt`,\n `/ponytail-gain`, `/ponytail-help`\n- Reference: https://github.com/DietrichGebert/ponytail\n";
|
|
12
14
|
export declare const PONYTAIL_DESCRIPTION: string;
|
|
13
15
|
export declare const REVIEW_SKILL_BODY = "\nReview diffs for unnecessary complexity. One line per finding: location, what\nto cut, what replaces it. The diff's best outcome is getting shorter.\n\n## Format\n\n`L<line>: <tag> <what>. <replacement>.`, or `<file>:L<line>: ...` for\nmulti-file diffs.\n\nTags:\n\n- `delete:` dead code, unused flexibility, speculative feature. Replacement: nothing.\n- `stdlib:` hand-rolled thing the standard library ships. Name the function.\n- `native:` dependency or code doing what the platform already does. Name the feature.\n- `yagni:` abstraction with one implementation, config nobody sets, layer with one caller.\n- `shrink:` same logic, fewer lines. Show the shorter form.\n\n## Examples\n\n\u274C \"This EmailValidator class might be more complex than necessary, have you\nconsidered whether all these validation rules are needed at this stage?\"\n\n\u2705 `L12-38: stdlib: 27-line validator class. \"@\" in email, 1 line, real validation is the confirmation mail.`\n\n\u2705 `L4: native: moment.js imported for one format call. Intl.DateTimeFormat, 0 deps.`\n\n\u2705 `repo.py:L88: yagni: AbstractRepository with one implementation. Inline it until a second one exists.`\n\n\u2705 `L52-71: delete: retry wrapper around an idempotent local call. Nothing replaces it.`\n\n\u2705 `L30-44: shrink: manual loop builds dict. dict(zip(keys, values)), 1 line.`\n\n## Scoring\n\nEnd with the only metric that matters: `net: -<N> lines possible.`\n\nIf there is nothing to cut, say `Lean already. Ship.` and stop.\n\n## Boundaries\n\nScope: over-engineering and complexity only. Correctness bugs, security holes,\nand performance are explicitly out of scope. Route them to a normal review\npass, not this one. A single smoke test or `assert`-based\nself-check is the ponytail minimum, not bloat, never flag it for deletion.\nDoes not apply the fixes, only lists them.\n\"stop ponytail-review\" or \"normal mode\": revert to verbose review style.\n";
|
|
14
16
|
export declare const REVIEW_DESCRIPTION: string;
|
|
@@ -18,7 +20,7 @@ export declare const DEBT_SKILL_BODY = "\nEvery deliberate ponytail shortcut is
|
|
|
18
20
|
export declare const DEBT_DESCRIPTION: string;
|
|
19
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 medians (5 everyday tasks: email\nvalidator, debounce, CSV sum, countdown timer, rate limiter; three models:\nHaiku, Sonnet, Opus). They are measured, not computed from the current repo.\nSource: the upstream `benchmarks/` directory and README.\n\n## Scoreboard\n\nRender plain ASCII bars. The bar length shows the measured range; the label\ncarries the exact figure:\n\n```\n ponytail gain benchmark median \u00B7 5 tasks \u00B7 3 models\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\u2588\u258C\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 23\u201353% \u25BC 47\u201377%\n Speed ponytail \u25B8 3\u20136\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 benchmark medians, not this repo. NEVER print a per-repo savings\nnumber (\"you saved X lines/tokens here\"): the unbuilt version was never\nwritten, so there is no real baseline to subtract from in a live repo. The\nonly real per-repo figures come from `/ponytail-debt` (a counted ledger), and\nthis card points there instead of inventing one.\n\n## Boundaries\n\nOne-shot display. Edits nothing, changes no mode.\n\"stop ponytail\" or \"normal mode\": revert.\n";
|
|
20
22
|
export declare const GAIN_DESCRIPTION: string;
|
|
21
|
-
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
|
|
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";
|
|
22
24
|
export declare const HELP_DESCRIPTION: string;
|
|
23
25
|
/** Ordered set of runtime skills surfaced to the model catalog and `/` menu. */
|
|
24
26
|
export declare function ponytailSkills(): readonly SkillRegistration[];
|
package/lib/types/modes.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Ponytail mode resolution: the default
|
|
3
|
-
* `PONYTAIL_DEFAULT_MODE` environment variable,
|
|
2
|
+
* Ponytail mode resolution: the effective default comes from, in order, the
|
|
3
|
+
* `PONYTAIL_DEFAULT_MODE` environment variable, the Cordis profile
|
|
4
|
+
* `defaultMode`, the optional user config file
|
|
4
5
|
* `~/.config/ponytail/config.json` (`defaultMode`), then `full`. Setting a
|
|
5
6
|
* level via the `/ponytail` command is session-scoped and lives in an
|
|
6
7
|
* in-memory, per-agent {@link ModeStore}.
|
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.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|