@wenaixi/dsh-ponytail 5.1.0 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,31 +1,44 @@
1
1
  ---
2
2
  name: ponytail-debt
3
3
  description: >
4
- 把代码库中所有 `ponytail:` 注释收割为债务台账,让 ponytail 有意留下的捷径和延期不会悄悄烂成「以后再说就是永远不做」。触发词:ponytail debt / /ponytail-debt / ponytail 延期了什么 / 列出捷径 / ponytail 台账 / 标记了什么待做。一次性报告,不改代码。
4
+ Harvest every `ponytail:` comment in the codebase into a debt ledger, so the
5
+ deliberate shortcuts and deferrals ponytail leaves behind get tracked instead
6
+ of rotting into "later means never". Use when the user says "ponytail debt",
7
+ "/ponytail-debt", "what did ponytail defer", "list the shortcuts", "ponytail
8
+ ledger", or "what did we mark to do later". One-shot report, changes nothing.
5
9
  ---
6
10
 
7
- ponytail 有意留下的每个捷径都会用 `ponytail:` 注释标出天花板和升级路径。本技能把它们收割为一张台账,让延期不会悄悄变成永久。
11
+ Every deliberate ponytail shortcut is marked with a `ponytail:` comment naming
12
+ its ceiling and upgrade path. This collects them into one ledger so a deferral
13
+ can't quietly become permanent.
8
14
 
9
- ## 扫描
15
+ ## Scan
10
16
 
11
- 在仓库中 grep 注释标记,跳过 `node_modules`、`.git` 和构建产物:
17
+ Grep the repo for comment markers, skipping `node_modules`, `.git`, and build
18
+ output:
12
19
 
13
- `grep -rnE '(#|//) ?ponytail:' .` (若技术栈有其他注释前缀,请一并加入)
20
+ `grep -rnE '(#|//) ?ponytail:' .` (add other comment prefixes if your stack uses them)
14
21
 
15
- 每个命中即为台账的一行,注释前缀可避免把正文中偶然提及约定的内容误收入台账。
22
+ Each hit is one ledger row. The comment prefix keeps prose that merely mentions
23
+ the convention out of the ledger.
16
24
 
17
- ## 输出
25
+ ## Output
18
26
 
19
- 每行一个标记,按文件分组:
27
+ One row per marker, grouped by file:
20
28
 
21
- `<文件>:<行号>,<简化了什么>。天花板:<注释中提到的限制>。升级:<何时回头处理的触发条件>。`
29
+ `<file>:<line>, <what was simplified>. ceiling: <the limit named>. upgrade: <the trigger to revisit>.`
22
30
 
23
- 约定为 `ponytail: <天花板>,<升级路径>`,因此天花板和触发条件直接从注释中提取。想给每行加负责人?再跑 `git blame -L<行号>,<行号>`。
31
+ The convention is `ponytail: <ceiling>, <upgrade path>`, so pull the ceiling
32
+ and the trigger straight from the comment. Want an owner per row too? add
33
+ `git blame -L<line>,<line>`.
24
34
 
25
- 风险标记:任何未写明升级路径或触发条件的 `ponytail:` 注释打上 `no-trigger` 标签,这些是最容易悄悄腐烂的。
35
+ Flag the rot risk: any `ponytail:` comment that names no upgrade path or
36
+ trigger gets a `no-trigger` tag, those are the ones that silently rot.
26
37
 
27
- 结尾汇总 `<N> 个标记,<M> 个无触发条件。` 若无命中:`无 ponytail: 债务,台账干净。`
38
+ End with `<N> markers, <M> with no trigger.` Nothing found: `No ponytail: debt. Clean ledger.`
28
39
 
29
- ## 边界
40
+ ## Boundaries
30
41
 
31
- 只读、只报告,不改任何东西。如需落盘,询问后可将台账写入文件(例如 `PONYTAIL-DEBT.md`)。一次性报告。「stop ponytail-debt / 正常模式」可退出。
42
+ Reads and reports only, changes nothing. To persist it, ask and it writes the
43
+ ledger to a file (e.g. `PONYTAIL-DEBT.md`). One-shot. "stop ponytail-debt" or
44
+ "normal mode" to revert.
@@ -1,37 +1,50 @@
1
1
  ---
2
2
  name: ponytail-gain
3
3
  description: >
4
- 以精简看板展示 ponytail 的实测收益:更少代码、更低成本、更快速度,数据来自 benchmark 中位数。一次性展示,非持久模式,也非本仓实时统计。触发词:/ponytail-gain / ponytail gain / ponytail 能省多少 / 展示 ponytail 收益 / ponytail 看板。
4
+ Show ponytail's measured impact as a compact scoreboard: less code, less
5
+ cost, more speed, from the benchmark medians. One-shot display, not a
6
+ persistent mode, and not a per-repo number. Trigger: /ponytail-gain,
7
+ "ponytail gain", "what does ponytail save", "show ponytail impact",
8
+ "ponytail scoreboard".
5
9
  ---
6
10
 
7
- # Ponytail Gain · 收益看板
11
+ # Ponytail Gain
8
12
 
9
- 被调用时展示此看板。一次性展示:不要切换模式、写 flag 文件或做任何持久化。
13
+ Display this scoreboard when invoked. One-shot: do NOT change mode, write flag
14
+ files, or persist anything.
10
15
 
11
- 数据为已发布的 benchmark 中位数(5 个日常任务:邮箱校验、防抖、CSV 求和、倒计时、限流器;3 个模型:Haiku、Sonnet、Opus),是实测值而非基于当前仓库计算。来源:`benchmarks/` 与 README。
16
+ The figures are the published benchmark medians (5 everyday tasks: email
17
+ validator, debounce, CSV sum, countdown timer, rate limiter; three models:
18
+ Haiku, Sonnet, Opus). They are measured, not computed from the current repo.
19
+ Source: `assets/benchmark-3model.svg` and `assets/benchmark-agentic.svg`.
12
20
 
13
- ## 看板
21
+ ## Scoreboard
14
22
 
15
- 用纯 ASCII 条形图渲染,条形长度表示实测区间,标签给出精确数值:
23
+ Render plain ASCII bars. The bar length shows the measured range; the label
24
+ carries the exact figure:
16
25
 
17
26
  ```
18
- ponytail gain benchmark 中位数 · 5 任务 · 3 模型
27
+ ponytail gain benchmark median · 5 tasks · 3 models
19
28
 
20
- 代码行数 无技能 ████████████████████ 100%
21
- ponytail ██▌················· 6–20% ▼ 80–94%
22
- 成本 无技能 ████████████████████ 100%
23
- ponytail █████▌·············· 23–53% ▼ 47–77%
24
- 速度 ponytail ▸ 3–6× 更快
29
+ Lines of code no-skill ████████████████████ 100%
30
+ ponytail ██▌················· 6–20% ▼ 80–94%
31
+ Cost no-skill ████████████████████ 100%
32
+ ponytail █████▌·············· 23–53% ▼ 47–77%
33
+ Speed ponytail ▸ 3–6× faster
25
34
 
26
- 本仓: /ponytail-debt (已延期的捷径)
27
- /ponytail-audit(仍可删的地方)
35
+ This repo: /ponytail-debt (shortcuts you deferred)
36
+ /ponytail-audit (what's still cuttable)
28
37
  ```
29
38
 
30
- ## 诚实边界
39
+ ## Honesty boundary
31
40
 
32
- 这些是 benchmark 中位数,不是本仓数据。永远不要打印针对本仓的节省数字(例如「本仓节省了 X 行/Token」):没写的版本从未存在,因此在真实仓库中没有可对比的基线。唯一真实的本仓数字来自 `/ponytail-debt`(已计数的台账),本卡片也会指向那里,而不是凭空捏造。
41
+ These are benchmark medians, not this repo. NEVER print a per-repo savings
42
+ number ("you saved X lines/tokens here"): the unbuilt version was never
43
+ written, so there is no real baseline to subtract from in a live repo. The
44
+ only real per-repo figures come from `/ponytail-debt` (a counted ledger), and
45
+ this card points there instead of inventing one.
33
46
 
34
- ## 边界
47
+ ## Boundaries
35
48
 
36
- 一次性展示,不改任何东西,不切换模式。
37
- 「stop ponytail / 正常模式」可退出。
49
+ One-shot display. Edits nothing, changes no mode.
50
+ "stop ponytail" or "normal mode": revert.
@@ -1,58 +1,87 @@
1
1
  ---
2
2
  name: ponytail-help
3
3
  description: >
4
- ponytail 全量模式、技能与命令的速查卡,一次性展示,非持久模式。触发词:/ponytail-help / ponytail help / ponytail 有哪些命令 / 怎么用 ponytail。
4
+ Quick-reference card for all ponytail modes, skills, and commands.
5
+ One-shot display, not a persistent mode. Trigger: /ponytail-help,
6
+ "ponytail help", "what ponytail commands", "how do I use ponytail".
5
7
  ---
6
8
 
7
- # Ponytail Help · 速查卡
9
+ # Ponytail Help
8
10
 
9
- 被调用时展示此速查卡。一次性展示,不要切换模式、写 flag 文件或做任何持久化。
11
+ Display this reference card when invoked. One-shot, do NOT change mode,
12
+ write flag files, or persist anything.
10
13
 
11
- ## 等级
14
+ ## Levels
12
15
 
13
- | 等级 | 触发 | 变化 |
14
- |-------|---------|------|
15
- | **Lite** | `/ponytail lite` | 按要求构建,但在同一行里点出更懒的替代方案。 |
16
- | **Full** | `/ponytail` | 强制走梯子:YAGNI → 标准库 → 原生 → 一行 → 最小实现。默认。 |
17
- | **Ultra** | `/ponytail ultra` | YAGNI 极端派,先删后加,在构建前先挑战需求本身。 |
16
+ | Level | Trigger | What change |
17
+ |-------|---------|-------------|
18
+ | **Lite** | `/ponytail lite` | Build what's asked, name the lazier alternative in one line. |
19
+ | **Full** | `/ponytail` | The ladder enforced: YAGNI → stdlib → native → one line → minimum. Default. |
20
+ | **Ultra** | `/ponytail ultra` | YAGNI extremist. Deletion before addition. Challenges requirements before building. |
18
21
 
19
- 等级会保持到被修改或会话结束。
22
+ Level sticks until changed or session end.
20
23
 
21
- ## 技能
24
+ ## Skills
22
25
 
23
- | 技能 | 触发 | 作用 |
24
- |-------|---------|------|
25
- | **ponytail** | `/ponytail` | 懒人模式本体,用最简可用的解法。 |
26
- | **ponytail-review** | `/ponytail-review` | 过度设计评审:`L42: yagni: 工厂只有一个产品,直接内联。` |
27
- | **ponytail-audit** | `/ponytail-audit` | 全仓过度设计审计:按可删行数排序的清单。 |
28
- | **ponytail-debt** | `/ponytail-debt` | 收割 `ponytail:` 捷径注释,生成待办台账。 |
29
- | **ponytail-gain** | `/ponytail-gain` | 实测收益看板:更少代码、更低成本、更快速度。 |
30
- | **ponytail-help** | `/ponytail-help` | 本卡片。 |
26
+ | Skill | Trigger | What it does |
27
+ |-------|---------|--------------|
28
+ | **ponytail** | `/ponytail` | Lazy mode itself. Simplest solution that works. |
29
+ | **ponytail-review** | `/ponytail-review` | Over-engineering review: `L42: yagni: factory, one product. Inline.` |
30
+ | **ponytail-audit** | `/ponytail-audit` | Whole-repo over-engineering audit: ranked list of what to delete. |
31
+ | **ponytail-debt** | `/ponytail-debt` | Harvest `ponytail:` shortcut comments into a tracked ledger. |
32
+ | **ponytail-gain** | `/ponytail-gain` | Measured-impact scoreboard: less code, less cost, more speed. |
33
+ | **ponytail-help** | `/ponytail-help` | This card. |
31
34
 
35
+ Codex uses `@ponytail`, `@ponytail-review`, and `@ponytail-help`; Claude Code
36
+ and OpenCode use the slash-command forms above (OpenCode ships all six as
37
+ slash commands).
32
38
 
33
- ## 退出
39
+ ## Deactivate
34
40
 
35
- 说「stop ponytail / 正常模式」即可退出,随时用 `/ponytail` 恢复。
36
- `/ponytail off` 同样可用。
41
+ Say "stop ponytail" or "normal mode". Resume anytime with `/ponytail`.
42
+ `/ponytail off` also works.
37
43
 
38
- ## 配置默认等级
44
+ ## Configure Default Mode
39
45
 
40
- 默认等级为 `full`,每会话自动激活。修改方式:
46
+ Default mode = `full`, auto-active every session. Change it:
41
47
 
42
- **环境变量**(优先级最高):
48
+ **Environment variable** (highest priority):
43
49
  ```bash
44
50
  export PONYTAIL_DEFAULT_MODE=ultra
45
51
  ```
46
52
 
47
- **配置文件**(`$DSH_HOME/ponytail/config.json`,默认 `~/.dsh/ponytail/config.json`):
48
- ```json
49
- { "defaultMode": "lite" }
53
+ **Profile patch** (`profiles/<name>/cordis.patch.yml`):
54
+
55
+ `dsh plugin add` does NOT write this file. After installing, add a top-level
56
+ entry by hand or the config card will not render:
57
+
58
+ ```yaml
59
+ - id: ponytail
60
+ name: "@wenaixi/dsh-ponytail"
61
+ config:
62
+ defaultMode: lite # off|lite|full|ultra
50
63
  ```
51
64
 
52
- 设为 `"off"` 可关闭会话启动时的自动激活,需要时再用 `/ponytail` 手动开启。
65
+ Then restart the host (patch entries compose at startup, not on reload).
66
+ The plugin config card writes the patch for you once it renders;
67
+ `/ponytail default <mode>` does the same from a prompt. Set `"off"` to
68
+ disable auto-activation on session start, activate manually with `/ponytail`
69
+ when wanted.
70
+
71
+ Resolution: env var > profile patch > built-in `full`. The card shows all three
72
+ sources and which one wins, so a level that "looks" set but is shadowed is
73
+ visible instead of silently ignored.
74
+
75
+ ## Update
76
+
77
+ ```bash
78
+ dsh plugin --profile <name> add @wenaixi/dsh-ponytail
79
+ ```
53
80
 
54
- 优先级:环境变量 > 配置文件 > `full`。
81
+ Restart the host after updating: a plugin entry's artifact fingerprint is
82
+ computed at process start and frozen, so a page refresh alone keeps serving
83
+ the previous build. A fresh install only needs a refresh.
55
84
 
56
- ## 更多
85
+ ## More
57
86
 
58
- 完整文档与示例:https://github.com/DietrichGebert/ponytail
87
+ Full docs + examples: https://github.com/DietrichGebert/ponytail
@@ -1,45 +1,57 @@
1
1
  ---
2
2
  name: ponytail-review
3
3
  description: >
4
- 专挑过度设计的代码评审,只找能删的东西:重复造的标准库、没必要的依赖、臆想的抽象、闲置的灵活性。每条发现一行写完:位置、该删什么、用什么替代。触发词:过度设计评审 / 能删什么 / 是否过度设计 / 简化评审 / ponytail-review / /ponytail-review。配合面向正确性的评审使用,本技能只猎复杂度。
4
+ Code review focused exclusively on over-engineering. Finds what to delete:
5
+ reinvented standard library, unneeded dependencies, speculative abstractions,
6
+ dead flexibility. One line per finding: location, what to cut, what replaces
7
+ it. Use when the user says "review for over-engineering", "what can we
8
+ delete", "is this over-engineered", "simplify review", or invokes
9
+ /ponytail-review. Complements correctness-focused review, this one only
10
+ hunts complexity.
5
11
  ---
6
12
 
7
- 只评审 diff 中的不必要复杂度,每条发现一行写完:位置、该删什么、用什么替代。diff 的最好结局是变短。
13
+ Review diffs for unnecessary complexity. One line per finding: location, what
14
+ to cut, what replaces it. The diff's best outcome is getting shorter.
8
15
 
9
- ## 格式
16
+ ## Format
10
17
 
11
- `L<行号>: <标签> <该删什么>。<替代方案>。` 多文件 diff 用 `<文件>:L<行号>: ...`。
18
+ `L<line>: <tag> <what>. <replacement>.`, or `<file>:L<line>: ...` for
19
+ multi-file diffs.
12
20
 
13
- 标签:
21
+ Tags:
14
22
 
15
- - `delete:` 死代码、未使用的灵活性、臆想功能。替代:无。
16
- - `stdlib:` 标准库已有的东西被手写了一遍,写出函数名。
17
- - `native:` 依赖或代码在做平台已有的事,写出平台特性名。
18
- - `yagni:` 只有一个实现的抽象、没人改的配置、只有一个调用方的分层。
19
- - `shrink:` 同样逻辑,更少行数,给出更短写法。
23
+ - `delete:` dead code, unused flexibility, speculative feature. Replacement: nothing.
24
+ - `stdlib:` hand-rolled thing the standard library ships. Name the function.
25
+ - `native:` dependency or code doing what the platform already does. Name the feature.
26
+ - `yagni:` abstraction with one implementation, config nobody sets, layer with one caller.
27
+ - `shrink:` same logic, fewer lines. Show the shorter form.
20
28
 
21
- ## 示例
29
+ ## Examples
22
30
 
23
- ❌ 「这个 EmailValidator 类是不是有点复杂,要不要考虑现阶段是否真的需要这么多校验规则?」
31
+ ❌ "This EmailValidator class might be more complex than necessary, have you
32
+ considered whether all these validation rules are needed at this stage?"
24
33
 
25
- ✅ `L12-38: stdlib: 27 行的校验类。邮箱里有 "@" 就算 1 行,真正的校验是发确认邮件。`
34
+ ✅ `L12-38: stdlib: 27-line validator class. "@" in email, 1 line, real validation is the confirmation mail.`
26
35
 
27
- ✅ `L4: native: 为了一次格式化就引入 moment.js。用 Intl.DateTimeFormat,0 依赖。`
36
+ ✅ `L4: native: moment.js imported for one format call. Intl.DateTimeFormat, 0 deps.`
28
37
 
29
- ✅ `repo.py:L88: yagni: 只有一个实现的 AbstractRepository。先内联,等第二个实现出现再说。`
38
+ ✅ `repo.py:L88: yagni: AbstractRepository with one implementation. Inline it until a second one exists.`
30
39
 
31
- ✅ `L52-71: delete: 在幂等的本地调用外包了一层重试。删掉即可。`
40
+ ✅ `L52-71: delete: retry wrapper around an idempotent local call. Nothing replaces it.`
32
41
 
33
- ✅ `L30-44: shrink: 手写循环拼 dict。用 dict(zip(keys, values)),1 行。`
42
+ ✅ `L30-44: shrink: manual loop builds dict. dict(zip(keys, values)), 1 line.`
34
43
 
35
- ## 评分
44
+ ## Scoring
36
45
 
37
- 最后只留一个关心的指标:`net: -<N> 行可删。`
46
+ End with the only metric that matters: `net: -<N> lines possible.`
38
47
 
39
- 若无可删之处,直接说 `已足够精简,直接发版。` 并结束。
48
+ If there is nothing to cut, say `Lean already. Ship.` and stop.
40
49
 
41
- ## 边界
50
+ ## Boundaries
42
51
 
43
- 范围:只看过度设计和复杂度。正确性 bug、安全漏洞、性能问题明确不在范围内,请走常规评审通道。单个冒烟测试或基于 `assert` 的自检是 ponytail 的最低要求,不算臃肿,永远不要标为可删。
44
- 只列发现,不直接改代码。
45
- 「stop ponytail-review / 正常模式」可切回啰嗦的评审风格。
52
+ Scope: over-engineering and complexity only. Correctness bugs, security holes,
53
+ and performance are explicitly out of scope. Route them to a normal review
54
+ pass, not this one. A single smoke test or `assert`-based
55
+ self-check is the ponytail minimum, not bloat, never flag it for deletion.
56
+ Does not apply the fixes, only lists them.
57
+ "stop ponytail-review" or "normal mode": revert to verbose review style.