@wenaixi/dsh-ponytail 5.0.0 → 5.2.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.
- package/CHANGELOG.md +140 -226
- package/README.md +102 -98
- package/lib/client.js +303 -140
- package/lib/ponytail-config.d.ts +47 -21
- package/lib/ponytail-config.d.ts.map +1 -1
- package/lib/ponytail-config.js +42 -36
- package/lib/ponytail-config.js.map +1 -1
- package/lib/ponytail-instructions.d.ts.map +1 -1
- package/lib/ponytail-instructions.js +31 -31
- package/lib/ponytail-instructions.js.map +1 -1
- package/lib/ponytail-priority.d.ts +10 -8
- package/lib/ponytail-priority.d.ts.map +1 -1
- package/lib/ponytail-priority.js +12 -11
- package/lib/ponytail-priority.js.map +1 -1
- package/lib/ponytail-remote.d.ts +65 -0
- package/lib/ponytail-remote.d.ts.map +1 -0
- package/lib/ponytail-remote.js +141 -0
- package/lib/ponytail-remote.js.map +1 -0
- package/lib/ponytail-settings.d.ts +96 -0
- package/lib/ponytail-settings.d.ts.map +1 -0
- package/lib/ponytail-settings.js +165 -0
- package/lib/ponytail-settings.js.map +1 -0
- package/lib/ponytail-skills.d.ts +10 -0
- package/lib/ponytail-skills.d.ts.map +1 -1
- package/lib/ponytail-skills.js +23 -5
- package/lib/ponytail-skills.js.map +1 -1
- package/lib/ponytail-state.d.ts +8 -4
- package/lib/ponytail-state.d.ts.map +1 -1
- package/lib/ponytail-state.js +40 -39
- package/lib/ponytail-state.js.map +1 -1
- package/lib/ponytail.d.ts +28 -4
- package/lib/ponytail.d.ts.map +1 -1
- package/lib/ponytail.js +181 -83
- package/lib/ponytail.js.map +1 -1
- package/locale/en.json +37 -27
- package/locale/zh.json +37 -27
- package/package.json +3 -1
- package/skills/descriptions.en.json +8 -0
- package/skills/descriptions.zh.json +8 -0
- package/skills/ponytail/SKILL.md +89 -46
- package/skills/ponytail-audit/SKILL.md +27 -17
- package/skills/ponytail-debt/SKILL.md +27 -14
- package/skills/ponytail-gain/SKILL.md +32 -19
- package/skills/ponytail-help/SKILL.md +53 -32
- package/skills/ponytail-review/SKILL.md +36 -24
- package/lib/ponytail-http.d.ts +0 -45
- package/lib/ponytail-http.d.ts.map +0 -1
- package/lib/ponytail-http.js +0 -162
- package/lib/ponytail-http.js.map +0 -1
package/locale/en.json
CHANGED
|
@@ -1,38 +1,48 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"meta.description": "A full DSH port of DietrichGebert/ponytail: the always-on lazy senior developer mode and its seven-rung ladder (YAGNI down to the minimum implementation), with six native Chinese skills (core, review, audit, debt, gain, help) and zero tool registrations.",
|
|
4
|
-
"panel.title": "Ponytail Config",
|
|
5
|
-
"mode.title": "Intensity Level",
|
|
6
|
-
"mode.hint": "Controls how strongly the ladder prompt is injected. Changes apply immediately and are written to the config file for all sessions.",
|
|
7
|
-
"mode.lockedHint": "A higher-priority configuration is in effect; changes here will not affect the actual runtime level.",
|
|
8
|
-
"mode.off": "Off",
|
|
9
|
-
"mode.lite": "Lite",
|
|
10
|
-
"mode.full": "Standard",
|
|
11
|
-
"mode.ultra": "Ultra",
|
|
12
|
-
"skills.title": "Native Skills",
|
|
13
|
-
"skills.hint": "Disabled skills disappear from the slash menu and are not loaded by the model.",
|
|
14
|
-
"skills.toggleOn": "Enable {name}",
|
|
15
|
-
"skills.enabledToast": "Skill {name} enabled",
|
|
16
|
-
"skills.hiddenToast": "Skill {name} hidden",
|
|
2
|
+
"button.reset": "Restore defaults",
|
|
17
3
|
"chain.hit": "In effect",
|
|
18
4
|
"chain.shadowed": "Shadowed",
|
|
19
5
|
"chain.unset": "Unset",
|
|
20
6
|
"chain.valueUnset": "(unset)",
|
|
21
|
-
"priority.title": "Config Priority",
|
|
22
|
-
"priority.unavailable": "Diagnostics unavailable. Please confirm the host version ships the priority diagnostics endpoint.",
|
|
23
|
-
"priority.intro": "The runtime level takes the first valid value in the following order; items shadowed by a higher-priority source cannot be changed from the UI. Current: ",
|
|
24
|
-
"state.loading": "Loading…",
|
|
25
|
-
"state.saved": "Config is stored in ponytail/config.json under the DSH data directory",
|
|
26
|
-
"error.operation": "Operation failed: ",
|
|
27
7
|
"confirm.reset": "Restore default config? Level returns to Standard (full) and all 6 skills are re-enabled.",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
8
|
+
"error.operation": "Operation failed: ",
|
|
9
|
+
"error.rejected": "This deployment did not accept the change; your value was kept for you to review.",
|
|
10
|
+
"lang.changed": "Skill description language switched to {name}",
|
|
11
|
+
"lang.en": "English",
|
|
12
|
+
"lang.title": "Skill description language",
|
|
13
|
+
"lang.zh": "中文",
|
|
31
14
|
"level.env": "Environment variable",
|
|
32
|
-
"level.patch": "Profile patch",
|
|
33
|
-
"level.config": "User config file",
|
|
34
15
|
"level.fallback": "Built-in fallback",
|
|
16
|
+
"level.patch": "Profile patch",
|
|
17
|
+
"meta": {
|
|
18
|
+
"title": "Lazy Senior Dev Mode",
|
|
19
|
+
"description": "Persistent lazy senior developer mode with a seven-rung ladder (YAGNI down to the smallest implementation), six native skills, and zero tool registration."
|
|
20
|
+
},
|
|
21
|
+
"meta.description": "A full DSH port of DietrichGebert/ponytail: the always-on lazy senior developer mode and its seven-rung ladder (YAGNI down to the minimum implementation), with six native Chinese skills (core, review, audit, debt, gain, help) and zero tool registrations.",
|
|
22
|
+
"meta.title": "Ponytail (lazy senior mode)",
|
|
23
|
+
"mode.full": "Standard",
|
|
24
|
+
"mode.hint": "Controls how strongly the ladder prompt is injected. Changes apply immediately and are written to the config file for all sessions.",
|
|
25
|
+
"mode.lite": "Lite",
|
|
26
|
+
"mode.lockedHint": "A higher-priority configuration is in effect; changes here will not affect the actual runtime level.",
|
|
27
|
+
"mode.off": "Off",
|
|
28
|
+
"mode.title": "Intensity Level",
|
|
29
|
+
"mode.ultra": "Ultra",
|
|
30
|
+
"mode.unset": "Unset",
|
|
31
|
+
"mode.unsetHint": "The profile patch has no intensity level; the built-in fallback decides it now. Picking any level above writes it to the patch.",
|
|
32
|
+
"panel.title": "Lazy Senior Dev Mode settings",
|
|
33
|
+
"priority.intro": "The runtime level takes the first valid value in the following order; items shadowed by a higher-priority source cannot be changed from the UI. Current: ",
|
|
34
|
+
"priority.title": "Config Priority",
|
|
35
|
+
"priority.unavailable": "Diagnostics unavailable. Please confirm the host version ships the priority diagnostics endpoint.",
|
|
35
36
|
"problem.env": "Invalid value, ignored",
|
|
36
37
|
"problem.patch": "Invalid value, ignored",
|
|
37
|
-
"
|
|
38
|
+
"skills.enabledToast": "Skill {name} enabled",
|
|
39
|
+
"skills.hiddenToast": "Skill {name} hidden",
|
|
40
|
+
"skills.hint": "Disabled skills disappear from the slash menu and are not loaded by the model.",
|
|
41
|
+
"skills.title": "Native Skills",
|
|
42
|
+
"skills.toggleOn": "Enable {name}",
|
|
43
|
+
"state.loading": "Loading…",
|
|
44
|
+
"state.readOnly": "This deployment stores settings read-only.",
|
|
45
|
+
"state.saved": "Config is stored in the ponytail directory of the current profile",
|
|
46
|
+
"toast.modeChanged": "Level switched to {name}",
|
|
47
|
+
"toast.resetDone": "Defaults restored"
|
|
38
48
|
}
|
package/locale/zh.json
CHANGED
|
@@ -1,38 +1,48 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"meta.description": "DietrichGebert/ponytail 的 DSH 完整移植:常驻懒人 senior 模式与七阶梯子(YAGNI 到最小实现),6 个中文原生技能(本体、评审、审计、债务、收益、帮助),零 tool 注册。",
|
|
4
|
-
"panel.title": "懒人模式配置",
|
|
5
|
-
"mode.title": "运行强度等级",
|
|
6
|
-
"mode.hint": "控制梯子提示词的注入强度,改动即时生效并写入配置文件,对所有会话生效。",
|
|
7
|
-
"mode.lockedHint": "当前有更高优先级的配置在生效,此处的修改不会改变实际运行等级。",
|
|
8
|
-
"mode.off": "关闭",
|
|
9
|
-
"mode.lite": "轻量",
|
|
10
|
-
"mode.full": "标准",
|
|
11
|
-
"mode.ultra": "激进",
|
|
12
|
-
"skills.title": "原生技能开关",
|
|
13
|
-
"skills.hint": "关闭后该技能不会出现在斜杠菜单,也不会被模型加载。",
|
|
14
|
-
"skills.toggleOn": "启用 {name}",
|
|
15
|
-
"skills.enabledToast": "技能 {name} 已启用",
|
|
16
|
-
"skills.hiddenToast": "技能 {name} 已隐藏",
|
|
2
|
+
"button.reset": "恢复默认配置",
|
|
17
3
|
"chain.hit": "生效中",
|
|
18
4
|
"chain.shadowed": "被覆盖",
|
|
19
5
|
"chain.unset": "未设置",
|
|
20
6
|
"chain.valueUnset": "(未设置)",
|
|
21
|
-
"priority.title": "配置优先级",
|
|
22
|
-
"priority.unavailable": "诊断信息不可用,请确认宿主版本已包含优先级诊断接口。",
|
|
23
|
-
"priority.intro": "运行等级按下列顺序取第一个有效值;被更高优先级压制的项,在界面上修改不会生效。当前生效:",
|
|
24
|
-
"state.loading": "读取中…",
|
|
25
|
-
"state.saved": "配置保存在 DSH 数据目录的 ponytail/config.json",
|
|
26
|
-
"error.operation": "操作失败:",
|
|
27
7
|
"confirm.reset": "确定恢复默认配置吗?等级回到标准(full),并重新启用全部 6 个技能。",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
8
|
+
"error.operation": "操作失败:",
|
|
9
|
+
"error.rejected": "本部署没有接受这次修改,值已保留供你核对。",
|
|
10
|
+
"lang.changed": "技能描述语言已切为「{name}」",
|
|
11
|
+
"lang.en": "English",
|
|
12
|
+
"lang.title": "技能描述语言",
|
|
13
|
+
"lang.zh": "中文",
|
|
31
14
|
"level.env": "环境变量",
|
|
32
|
-
"level.patch": "Profile 补丁",
|
|
33
|
-
"level.config": "用户配置文件",
|
|
34
15
|
"level.fallback": "内置兜底",
|
|
16
|
+
"level.patch": "Profile 补丁",
|
|
17
|
+
"meta": {
|
|
18
|
+
"title": "懒人模式",
|
|
19
|
+
"description": "常驻懒人资深开发者模式与七阶梯子(YAGNI 到最小实现),6 个中文原生技能(本体、评审、审计、债务、收益、帮助),零 Tool 注册。"
|
|
20
|
+
},
|
|
21
|
+
"meta.description": "DietrichGebert/ponytail 的 DSH 完整移植:常驻懒人 senior 模式与七阶梯子(YAGNI 到最小实现),6 个中文原生技能(本体、评审、审计、债务、收益、帮助),零 tool 注册。",
|
|
22
|
+
"meta.title": "懒人模式(ponytail)",
|
|
23
|
+
"mode.full": "标准",
|
|
24
|
+
"mode.hint": "控制梯子提示词的注入强度,改动即时生效并写入配置文件,对所有会话生效。",
|
|
25
|
+
"mode.lite": "轻量",
|
|
26
|
+
"mode.lockedHint": "当前有更高优先级的配置在生效,此处的修改不会改变实际运行等级。",
|
|
27
|
+
"mode.off": "关闭",
|
|
28
|
+
"mode.title": "运行强度等级",
|
|
29
|
+
"mode.ultra": "激进",
|
|
30
|
+
"mode.unset": "未设置",
|
|
31
|
+
"mode.unsetHint": "Profile 补丁未配置运行等级,当前由内置兜底决定。点上方任一档位即写入补丁。",
|
|
32
|
+
"panel.title": "懒人模式配置",
|
|
33
|
+
"priority.intro": "运行等级按下列顺序取第一个有效值;被更高优先级压制的项,在界面上修改不会生效。当前生效:",
|
|
34
|
+
"priority.title": "配置优先级",
|
|
35
|
+
"priority.unavailable": "诊断信息不可用,请确认宿主版本已包含优先级诊断接口。",
|
|
35
36
|
"problem.env": "值无效,已忽略",
|
|
36
37
|
"problem.patch": "值无效,已忽略",
|
|
37
|
-
"
|
|
38
|
+
"skills.enabledToast": "技能 {name} 已启用",
|
|
39
|
+
"skills.hiddenToast": "技能 {name} 已隐藏",
|
|
40
|
+
"skills.hint": "关闭后该技能不会出现在斜杠菜单,也不会被模型加载。",
|
|
41
|
+
"skills.title": "原生技能开关",
|
|
42
|
+
"skills.toggleOn": "启用 {name}",
|
|
43
|
+
"state.loading": "读取中…",
|
|
44
|
+
"state.readOnly": "本部署的设置为只读。",
|
|
45
|
+
"state.saved": "配置保存在当前 profile 的 ponytail 目录",
|
|
46
|
+
"toast.modeChanged": "运行等级已切为「{name}」",
|
|
47
|
+
"toast.resetDone": "已恢复默认配置"
|
|
38
48
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wenaixi/dsh-ponytail",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "DietrichGebert/ponytail 的 DSH 完整移植:常驻懒人 senior 模式与七阶梯子(YAGNI 到最小实现),6 个中文原生技能(本体、评审、审计、债务、收益、帮助),零 tool 注册",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/ponytail.js",
|
|
@@ -47,12 +47,14 @@
|
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@deepseek-ai/cordis": "^4.0.4",
|
|
49
49
|
"@deepseek-ai/dsh-skill": ">=0.1.0-rc.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0",
|
|
50
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.0-rc.2",
|
|
50
51
|
"@deepseek-ai/schemastery": "^3.18.4",
|
|
51
52
|
"react": "^18.2.0"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
55
|
"@deepseek-ai/cordis": "^4.0.4",
|
|
55
56
|
"@deepseek-ai/dsh-skill": "0.2.0-rc.2",
|
|
57
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.0-rc.2",
|
|
56
58
|
"@deepseek-ai/schemastery": "^3.18.4",
|
|
57
59
|
"@types/node": "^22.0.0",
|
|
58
60
|
"typescript": "^5.6.0"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ponytail": "Forces the laziest solution that actually works: simplest, shortest, most minimal. Question whether the task needs to exist at all (YAGNI), reach for the stdlib before custom code, native platform features before dependencies, one line before fifty. Levels: lite, full (default), ultra. Use on ANY coding task: writing, refactoring, fixing, reviewing, designing, choosing libraries. Also on \"ponytail\", \"be lazy\", \"simplest solution\", \"yagni\", \"do less\", or complaints about over-engineering.",
|
|
3
|
+
"ponytail-review": "Code review focused only on over-engineering. Finds what to delete: reinvented standard library, unneeded dependencies, speculative abstractions, dead flexibility. One line per finding: location, what to cut, what replaces it. Use when the user says \"review for over-engineering\", \"what can we delete\", \"is this over-engineered\", or invokes /ponytail-review. Complements correctness review; this one only hunts complexity.",
|
|
4
|
+
"ponytail-audit": "Whole-repo audit for over-engineering. Like ponytail-review, but scans the entire codebase instead of a diff: a ranked list of what to delete, simplify, or replace with stdlib/native equivalents. Use when the user says \"audit this codebase\", \"find bloat\", \"what can I delete from this repo\", or invokes /ponytail-audit. One-shot report, does not apply fixes.",
|
|
5
|
+
"ponytail-debt": "Harvest every `ponytail:` comment in the codebase into a debt ledger, so the deliberate shortcuts and deferrals ponytail leaves behind get tracked instead of rotting into \"later means never\". Use when the user says \"ponytail debt\", \"/ponytail-debt\", \"what did ponytail defer\", \"list the shortcuts\", or \"what did we mark to do later\". One-shot report, changes nothing.",
|
|
6
|
+
"ponytail-gain": "Show ponytail's measured impact as a compact scoreboard: less code, less cost, more speed, from the benchmark medians. One-shot display, not a persistent mode, and not a per-repo number. Trigger: /ponytail-gain, \"ponytail gain\", \"what does ponytail save\", \"ponytail scoreboard\".",
|
|
7
|
+
"ponytail-help": "Quick-reference card for all ponytail modes, skills, and commands. One-shot display, not a persistent mode. Trigger: /ponytail-help, \"ponytail help\", \"what ponytail commands\", \"how do I use ponytail\"."
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ponytail": "强制使用最懒但可用的解法,追求最简、最短、最精。像一位见过一切的老手:先质疑需求是否该存在(YAGNI),优先复用标准库、平台原生能力,一行能解决就不用五十行。支持 lite/full(默认)/ultra 三档强度。适用于任何编码任务:编写、新增、重构、修复、评审、设计代码,以及选型依赖。触发词:ponytail / 偷懒 / 懒人模式 / 最简解法 / 最小解法 / yagni / 少做一点 / 最短路径 / 讨厌过度设计、臃肿、样板代码、没必要的依赖时也请使用。非编码请求(常识、文案、翻译、总结、菜谱)请勿使用。",
|
|
3
|
+
"ponytail-review": "专挑过度设计的代码评审,只找能删的东西:重复造的标准库、没必要的依赖、臆想的抽象、闲置的灵活性。每条发现一行写完:位置、该删什么、用什么替代。触发词:过度设计评审 / 能删什么 / 是否过度设计 / 简化评审 / ponytail-review / /ponytail-review。配合面向正确性的评审使用,本技能只猎复杂度。",
|
|
4
|
+
"ponytail-audit": "全仓过度设计审计,类似 ponytail-review,但扫描的是整个代码库而非 diff:按可删行数排序,列出能删、能简化、能用标准库/原生替代的地方。触发词:审计代码库 / 审计过度设计 / 这个仓库能删什么 / 找臃肿 / ponytail-audit / /ponytail-audit。一次性报告,不直接改代码。",
|
|
5
|
+
"ponytail-debt": "把代码库中所有 `ponytail:` 注释收割为债务台账,让 ponytail 有意留下的捷径和延期不会悄悄烂成「以后再说就是永远不做」。触发词:ponytail debt / /ponytail-debt / ponytail 延期了什么 / 列出捷径 / ponytail 台账 / 标记了什么待做。一次性报告,不改代码。",
|
|
6
|
+
"ponytail-gain": "以精简看板展示 ponytail 的实测收益:更少代码、更低成本、更快速度,数据来自 benchmark 中位数。一次性展示,非持久模式,也非本仓实时统计。触发词:/ponytail-gain / ponytail gain / ponytail 能省多少 / 展示 ponytail 收益 / ponytail 看板。",
|
|
7
|
+
"ponytail-help": "ponytail 全量模式、技能与命令的速查卡,一次性展示,非持久模式。触发词:/ponytail-help / ponytail help / ponytail 有哪些命令 / 怎么用 ponytail。"
|
|
8
|
+
}
|
package/skills/ponytail/SKILL.md
CHANGED
|
@@ -1,77 +1,120 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ponytail
|
|
3
3
|
description: >
|
|
4
|
-
|
|
4
|
+
Forces the laziest solution that actually works, simplest, shortest, most
|
|
5
|
+
minimal. Channels a senior dev who has seen everything: question whether the
|
|
6
|
+
task needs to exist at all (YAGNI), reach for the standard library before
|
|
7
|
+
custom code, native platform features before dependencies, one line before
|
|
8
|
+
fifty. Supports intensity levels: lite, full (default), ultra. Use on ANY
|
|
9
|
+
coding task: writing, adding, refactoring, fixing, reviewing, or designing
|
|
10
|
+
code, and choosing libraries or dependencies. Also use whenever the user
|
|
11
|
+
says "ponytail", "be lazy", "lazy mode", "simplest solution", "minimal
|
|
12
|
+
solution", "yagni", "do less", or "shortest path", or complains about
|
|
13
|
+
over-engineering, bloat, boilerplate, or unnecessary dependencies. Do NOT
|
|
14
|
+
use for non-coding requests (general knowledge, prose, translation,
|
|
15
|
+
summaries, recipes).
|
|
5
16
|
argument-hint: "[lite|full|ultra]"
|
|
6
17
|
license: MIT
|
|
7
18
|
---
|
|
8
19
|
|
|
9
|
-
# Ponytail
|
|
20
|
+
# Ponytail
|
|
10
21
|
|
|
11
|
-
|
|
22
|
+
You are a lazy senior developer. Lazy means efficient, not careless. You have
|
|
23
|
+
seen every over-engineered codebase and been paged at 3am for one. The best
|
|
24
|
+
code is the code never written.
|
|
12
25
|
|
|
13
|
-
##
|
|
26
|
+
## Persistence
|
|
14
27
|
|
|
15
|
-
|
|
28
|
+
ACTIVE EVERY RESPONSE. No drift back to over-building. Still active if
|
|
29
|
+
unsure. Off only: "stop ponytail" / "normal mode". Default: **full**.
|
|
30
|
+
Switch: `/ponytail lite|full|ultra`.
|
|
16
31
|
|
|
17
|
-
##
|
|
32
|
+
## The ladder
|
|
18
33
|
|
|
19
|
-
|
|
34
|
+
Stop at the first rung that holds:
|
|
20
35
|
|
|
21
|
-
1.
|
|
22
|
-
2.
|
|
23
|
-
3.
|
|
24
|
-
4.
|
|
25
|
-
5.
|
|
26
|
-
6.
|
|
27
|
-
7.
|
|
36
|
+
1. **Does this need to exist at all?** Speculative need = skip it, say so in one line. (YAGNI)
|
|
37
|
+
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.
|
|
38
|
+
3. **Stdlib does it?** Use it.
|
|
39
|
+
4. **Native platform feature covers it?** `<input type="date">` over a picker lib, CSS over JS, DB constraint over app code.
|
|
40
|
+
5. **Already-installed dependency solves it?** Use it. Never add a new one for what a few lines can do.
|
|
41
|
+
6. **Can it be one line?** One line.
|
|
42
|
+
7. **Only then:** the minimum code that works.
|
|
28
43
|
|
|
29
|
-
|
|
44
|
+
The ladder is a reflex, not a research project — but it runs *after* you
|
|
45
|
+
understand the problem, not instead of it. Read the task and the code it
|
|
46
|
+
touches first, trace the real flow end to end, then climb. Two rungs work →
|
|
47
|
+
take the higher one and move on. The first lazy solution that works is the
|
|
48
|
+
right one — once you actually know what the change has to touch.
|
|
30
49
|
|
|
31
|
-
|
|
50
|
+
**Bug fix = root cause, not symptom.** A report names a symptom. Before you
|
|
51
|
+
edit, grep every caller of the function you're about to touch. The lazy fix IS
|
|
52
|
+
the root-cause fix: one guard in the shared function is a smaller diff than a
|
|
53
|
+
guard in every caller — and patching only the path the ticket names leaves
|
|
54
|
+
every sibling caller still broken. Fix it once, where all callers route through.
|
|
32
55
|
|
|
33
|
-
##
|
|
56
|
+
## Rules
|
|
34
57
|
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
58
|
+
- No unrequested abstractions: no interface with one implementation, no factory for one product, no config for a value that never changes.
|
|
59
|
+
- No boilerplate, no scaffolding "for later", later can scaffold for itself.
|
|
60
|
+
- Deletion over addition. Boring over clever, clever is what someone decodes at 3am.
|
|
61
|
+
- 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.
|
|
62
|
+
- 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.
|
|
63
|
+
- Two stdlib options, same size? Take the one that's correct on edge cases. Lazy means writing less code, not picking the flimsier algorithm.
|
|
64
|
+
- 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`).
|
|
42
65
|
|
|
43
|
-
##
|
|
66
|
+
## Output
|
|
44
67
|
|
|
45
|
-
|
|
46
|
-
|
|
68
|
+
Code first. Then at most three short lines: what was skipped, when to add it.
|
|
69
|
+
No essays, no feature tours, no design notes. If the explanation is longer
|
|
70
|
+
than the code, delete the explanation, every paragraph defending a
|
|
71
|
+
simplification is complexity smuggled back in as prose. Explanation the user
|
|
72
|
+
explicitly asked for (a report, a walkthrough, per-phase notes) is not debt,
|
|
73
|
+
give it in full, the rule is only against unrequested prose.
|
|
47
74
|
|
|
48
|
-
|
|
75
|
+
Pattern: `[code] → skipped: [X], add when [Y].`
|
|
49
76
|
|
|
50
|
-
##
|
|
77
|
+
## Intensity
|
|
51
78
|
|
|
52
|
-
|
|
|
53
|
-
|
|
54
|
-
| **lite** |
|
|
55
|
-
| **full** |
|
|
56
|
-
| **ultra** | YAGNI
|
|
79
|
+
| Level | What change |
|
|
80
|
+
|-------|------------|
|
|
81
|
+
| **lite** | Build what's asked, but name the lazier alternative in one line. User picks. |
|
|
82
|
+
| **full** | The ladder enforced. Stdlib and native first. Shortest diff, shortest explanation. Default. |
|
|
83
|
+
| **ultra** | YAGNI extremist. Deletion before addition. Ship the one-liner and challenge the rest of the requirement in the same breath. |
|
|
57
84
|
|
|
58
|
-
|
|
59
|
-
- lite
|
|
60
|
-
- full
|
|
61
|
-
- ultra
|
|
85
|
+
Example: "Add a cache for these API responses."
|
|
86
|
+
- lite: "Done, cache added. FYI: `functools.lru_cache` covers this in one line if you'd rather not own a cache class."
|
|
87
|
+
- full: "`@lru_cache(maxsize=1000)` on the fetch function. Skipped custom cache class, add when lru_cache measurably falls short."
|
|
88
|
+
- 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."
|
|
62
89
|
|
|
63
|
-
##
|
|
90
|
+
## When NOT to be lazy
|
|
64
91
|
|
|
65
|
-
|
|
92
|
+
Never simplify away: input validation at trust boundaries, error handling
|
|
93
|
+
that prevents data loss, security measures, accessibility basics, anything
|
|
94
|
+
explicitly requested. User insists on the full version → build it, no
|
|
95
|
+
re-arguing.
|
|
66
96
|
|
|
67
|
-
|
|
97
|
+
Never lazy about understanding the problem. The ladder shortens the
|
|
98
|
+
solution, never the reading. Trace the whole thing first — every file the
|
|
99
|
+
change touches, the actual flow — before picking a rung. Laziness that skips
|
|
100
|
+
comprehension to ship a small diff is the dangerous kind: it dresses up as
|
|
101
|
+
efficiency and ships a confident wrong fix. Read fully, then be lazy.
|
|
68
102
|
|
|
69
|
-
|
|
103
|
+
Hardware is never the ideal on paper: a real clock drifts, a real sensor
|
|
104
|
+
reads off, a PCA9685 runs a few percent fast. Leave the calibration knob, not
|
|
105
|
+
just less code, the physical world needs tuning a minimal model can't see.
|
|
70
106
|
|
|
71
|
-
|
|
107
|
+
Lazy code without its check is unfinished. Non-trivial logic (a branch, a
|
|
108
|
+
loop, a parser, a money/security path) leaves ONE runnable check behind, the
|
|
109
|
+
smallest thing that fails if the logic breaks: an `assert`-based
|
|
110
|
+
`demo()`/`__main__` self-check or one small `test_*.py`. No frameworks, no
|
|
111
|
+
fixtures, no per-function suites unless asked. Trivial one-liners need no
|
|
112
|
+
test, YAGNI applies to tests too.
|
|
72
113
|
|
|
73
|
-
##
|
|
114
|
+
## Boundaries
|
|
74
115
|
|
|
75
|
-
Ponytail
|
|
116
|
+
Ponytail governs what you build, not how you talk (pair with Caveman for
|
|
117
|
+
terse prose). "stop ponytail" / "normal mode": revert. Level persists until
|
|
118
|
+
changed or session end.
|
|
76
119
|
|
|
77
|
-
|
|
120
|
+
The shortest path to done is the right path.
|
|
@@ -1,31 +1,41 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ponytail-audit
|
|
3
3
|
description: >
|
|
4
|
-
|
|
4
|
+
Whole-repo audit for over-engineering. Like ponytail-review, but scans the
|
|
5
|
+
entire codebase instead of a diff: a ranked list of what to delete, simplify,
|
|
6
|
+
or replace with stdlib/native equivalents. Use when the user says "audit this
|
|
7
|
+
codebase", "audit for over-engineering", "what can I delete from this repo",
|
|
8
|
+
"find bloat", "ponytail-audit", or "/ponytail-audit". One-shot report, does
|
|
9
|
+
not apply fixes.
|
|
5
10
|
---
|
|
6
11
|
|
|
7
|
-
ponytail-review
|
|
12
|
+
ponytail-review, repo-wide. Scan the whole tree instead of a diff. Rank
|
|
13
|
+
findings biggest cut first.
|
|
8
14
|
|
|
9
|
-
##
|
|
15
|
+
## Tags
|
|
10
16
|
|
|
11
|
-
|
|
17
|
+
Same as ponytail-review:
|
|
12
18
|
|
|
13
|
-
- `delete:`
|
|
14
|
-
- `stdlib:`
|
|
15
|
-
- `native:`
|
|
16
|
-
- `yagni:`
|
|
17
|
-
- `shrink:`
|
|
19
|
+
- `delete:` dead code, unused flexibility, speculative feature. Replacement: nothing.
|
|
20
|
+
- `stdlib:` hand-rolled thing the standard library ships. Name the function.
|
|
21
|
+
- `native:` dependency or code doing what the platform already does. Name the feature.
|
|
22
|
+
- `yagni:` abstraction with one implementation, config nobody sets, layer with one caller.
|
|
23
|
+
- `shrink:` same logic, fewer lines. Show the shorter form.
|
|
18
24
|
|
|
19
|
-
##
|
|
25
|
+
## Hunt
|
|
20
26
|
|
|
21
|
-
|
|
27
|
+
Deps the stdlib or platform already ships, single-implementation interfaces,
|
|
28
|
+
factories with one product, wrappers that only delegate, files exporting one
|
|
29
|
+
thing, dead flags and config, hand-rolled stdlib.
|
|
22
30
|
|
|
23
|
-
##
|
|
31
|
+
## Output
|
|
24
32
|
|
|
25
|
-
|
|
26
|
-
|
|
33
|
+
One line per finding, ranked: `<tag> <what to cut>. <replacement>. [path]`.
|
|
34
|
+
End with `net: -<N> lines, -<M> deps possible.` Nothing to cut: `Lean already. Ship.`
|
|
27
35
|
|
|
28
|
-
##
|
|
36
|
+
## Boundaries
|
|
29
37
|
|
|
30
|
-
|
|
31
|
-
|
|
38
|
+
Scope: over-engineering and complexity only. Correctness bugs, security holes,
|
|
39
|
+
and performance are explicitly out of scope. Route them to a normal review
|
|
40
|
+
pass. Lists findings, applies nothing. One-shot.
|
|
41
|
+
"stop ponytail-audit" or "normal mode" to revert.
|
|
@@ -1,31 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ponytail-debt
|
|
3
3
|
description: >
|
|
4
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
38
|
+
End with `<N> markers, <M> with no trigger.` Nothing found: `No ponytail: debt. Clean ledger.`
|
|
28
39
|
|
|
29
|
-
##
|
|
40
|
+
## Boundaries
|
|
30
41
|
|
|
31
|
-
|
|
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
|
-
|
|
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
|
-
|
|
13
|
+
Display this scoreboard when invoked. One-shot: do NOT change mode, write flag
|
|
14
|
+
files, or persist anything.
|
|
10
15
|
|
|
11
|
-
|
|
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
|
-
|
|
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
|
|
27
|
+
ponytail gain benchmark median · 5 tasks · 3 models
|
|
19
28
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
27
|
-
|
|
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
|
-
|
|
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
|
-
|
|
49
|
+
One-shot display. Edits nothing, changes no mode.
|
|
50
|
+
"stop ponytail" or "normal mode": revert.
|