@wenaixi/dsh-ponytail 5.1.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 +130 -241
- package/README.md +99 -104
- package/lib/client.js +58 -16
- package/lib/ponytail-config.d.ts +11 -2
- package/lib/ponytail-config.d.ts.map +1 -1
- package/lib/ponytail-config.js +4 -2
- 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 +2 -2
- package/lib/ponytail-priority.js +2 -2
- package/lib/ponytail-remote.d.ts +19 -10
- package/lib/ponytail-remote.d.ts.map +1 -1
- package/lib/ponytail-remote.js +55 -52
- package/lib/ponytail-remote.js.map +1 -1
- 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.d.ts +4 -0
- package/lib/ponytail.d.ts.map +1 -1
- package/lib/ponytail.js +37 -12
- package/lib/ponytail.js.map +1 -1
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +1 -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.js
CHANGED
|
@@ -18,15 +18,15 @@ import { createCommandDispatcher } from './ponytail-commands.js';
|
|
|
18
18
|
import { renderPromptSection } from './ponytail-instructions.js';
|
|
19
19
|
import { createDiskStorage, createPonytailState } from './ponytail-state.js';
|
|
20
20
|
import { PonytailProvider } from './ponytail-skills.js';
|
|
21
|
-
import { PonytailRemote } from './ponytail-remote.js';
|
|
21
|
+
import { PonytailRemote, readSkillMeta } from './ponytail-remote.js';
|
|
22
22
|
// Config 的类型标注交给 schemastery 推断:PonytailConfig 里两个可持久化字段已是
|
|
23
23
|
// VolatileRef 形状,手动标注反而会让 TS 在 meta.default 上做无意义的交叉比对。
|
|
24
24
|
export const Config = Schema.object({
|
|
25
25
|
providerName: Schema.string().default('ponytail'),
|
|
26
26
|
skillDir: Schema.string(),
|
|
27
27
|
// 注意:不给 defaultMode 设 Schema 默认值——Cordis 校验会把缺省 fill 成显式配置,
|
|
28
|
-
//
|
|
29
|
-
// resolvePriority()(env > patch >
|
|
28
|
+
// 从而让补丁的缺省与显式写入不可区分(诊断面板会失去判别力);缺省时由 apply 走
|
|
29
|
+
// resolvePriority()(env > patch > full,见 ponytail-priority.ts)
|
|
30
30
|
//
|
|
31
31
|
// volatile 声明的含义是「改了不必重挂载」:宿主 loader 收到新值后就地提交到本进程的引用
|
|
32
32
|
// 并派发 loader/volatile-update(cordis-plugin-loader/lib/index.js:393-425),
|
|
@@ -37,6 +37,9 @@ export const Config = Schema.object({
|
|
|
37
37
|
// 技能禁用列表此前只存在 config.json(HTTP 端点专属)。迁入 Config 后由官方表单承载,
|
|
38
38
|
// 获得 revision 冲突保护与跨页面同步;旧值由 ponytail-settings 的 migrateLegacyConfig 一次性导入。
|
|
39
39
|
disabledSkills: Schema.array(Schema.string()).volatile(),
|
|
40
|
+
// 技能描述下发给模型目录与面板的语言。带默认值 zh:它不参与优先级链,
|
|
41
|
+
// 填默认值没有 shadow 代价,而面板需要区分「显式选了 en」与「没配过」。
|
|
42
|
+
skillDescriptionLang: Schema.union(['zh', 'en']).default('zh').volatile(),
|
|
40
43
|
});
|
|
41
44
|
// ---------------------------------------------------------------------------
|
|
42
45
|
// 插件元信息
|
|
@@ -108,6 +111,9 @@ export function apply(ctx, config = {}) {
|
|
|
108
111
|
...(rawConfig['disabledSkills'] !== undefined
|
|
109
112
|
? { disabledSkills: rawConfig['disabledSkills'] }
|
|
110
113
|
: {}),
|
|
114
|
+
...(rawConfig['skillDescriptionLang'] !== undefined
|
|
115
|
+
? { skillDescriptionLang: rawConfig['skillDescriptionLang'] }
|
|
116
|
+
: {}),
|
|
111
117
|
};
|
|
112
118
|
// 配置通道:有 settings 服务走官方路径(写入落 profile 补丁,由官方表单承载);
|
|
113
119
|
// 无 settings 服务的组合(headless / CLI —— dsh-base 的 settings 行在无 profileContext 时禁用)
|
|
@@ -169,7 +175,7 @@ export function apply(ctx, config = {}) {
|
|
|
169
175
|
// 等级状态唯一归属:get()/set()/syncFromFile() 三方法,闭包态随 HMR 重建
|
|
170
176
|
const state = createPonytailState({ sink: configSink, storage: createDiskStorage(profileDir) });
|
|
171
177
|
// 会话启动对齐(对齐上游 ponytail-activate.js SessionStart 语义):
|
|
172
|
-
// 每次会话启动都按 resolvePriority()(env > patch >
|
|
178
|
+
// 每次会话启动都按 resolvePriority()(env > patch > full)重写 flag,
|
|
173
179
|
// 因此 /ponytail <档> 只在本会话生效,跨会话持久化必须用 /ponytail default <档>。
|
|
174
180
|
state.set(initialMode === 'off' ? null : initialMode);
|
|
175
181
|
if (state.get()) {
|
|
@@ -191,6 +197,9 @@ export function apply(ctx, config = {}) {
|
|
|
191
197
|
// 同步过滤。此前从未传入,UI 改开关对模型侧目录无效(静默失效,跨会话仍放行)。
|
|
192
198
|
// 失效闭环:POST 变更点直调 invalidateSkills() → providerInstance.invalidate() → 宿主重扫。
|
|
193
199
|
isSkillEnabled: (name) => state.isSkillEnabled(name),
|
|
200
|
+
// 描述语言每次现读 volatile 引用:官方表单改完经 loader/volatile-update 就地更新引用,
|
|
201
|
+
// 闭包化读取让下一次 list/get 立刻拿到新语言(配合下方监听里的 invalidate 生效)。
|
|
202
|
+
getDescriptionLang: () => readVolatile(resolved.skillDescriptionLang) ?? 'zh',
|
|
194
203
|
});
|
|
195
204
|
return providerInstance;
|
|
196
205
|
});
|
|
@@ -227,6 +236,17 @@ export function apply(ctx, config = {}) {
|
|
|
227
236
|
patchOverride = undefined;
|
|
228
237
|
ctx.logger.debug('[ponytail] 默认档已由 profile 补丁提交,乐观缓存已清除');
|
|
229
238
|
}
|
|
239
|
+
// 描述语言变了但目录不失效,模型侧仍读旧语言的描述(面板经 remote 能看到新值,
|
|
240
|
+
// 两侧因此不一致):与 disabledSkills 同一条失效路径。
|
|
241
|
+
if (touched.has('skillDescriptionLang')) {
|
|
242
|
+
try {
|
|
243
|
+
providerInstance?.invalidate();
|
|
244
|
+
}
|
|
245
|
+
catch {
|
|
246
|
+
// 同上:失效失败不阻断,宿主会保留旧缓存到下次自然失效
|
|
247
|
+
}
|
|
248
|
+
ctx.logger.debug('[ponytail] 技能描述语言已变更,技能目录已失效');
|
|
249
|
+
}
|
|
230
250
|
});
|
|
231
251
|
// 只读推导值走官方 Typert 通道(命名空间 ponytail):优先级诊断链与当前生效等级
|
|
232
252
|
// 不是配置——它们由 env / profile 补丁 / 兜底三层合并得出,写进配置层
|
|
@@ -236,13 +256,18 @@ export function apply(ctx, config = {}) {
|
|
|
236
256
|
// 缺失时快照通道不可用(客户端降级为不显示优先级段),但不得掀翻其余能力。
|
|
237
257
|
if (typeof ctx.plugin === 'function') {
|
|
238
258
|
ctx.plugin(PonytailRemote, {
|
|
239
|
-
snapshot: () =>
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
259
|
+
snapshot: () => {
|
|
260
|
+
const skillLang = readVolatile(resolved.skillDescriptionLang) ?? 'zh';
|
|
261
|
+
return {
|
|
262
|
+
currentMode: state.get() ?? 'off',
|
|
263
|
+
priority: resolvePriority({
|
|
264
|
+
envRaw: process.env['PONYTAIL_DEFAULT_MODE'],
|
|
265
|
+
patchMode: readPatchMode(),
|
|
266
|
+
}),
|
|
267
|
+
skillLang,
|
|
268
|
+
skills: readSkillMeta(skillLang),
|
|
269
|
+
};
|
|
270
|
+
},
|
|
246
271
|
});
|
|
247
272
|
}
|
|
248
273
|
else {
|
|
@@ -269,7 +294,7 @@ export function apply(ctx, config = {}) {
|
|
|
269
294
|
state,
|
|
270
295
|
logger: ctx.logger,
|
|
271
296
|
// 默认档唯一真源(ADR-0007 修订 ADR-0006):命令层的「兜底切默认档」与 apply 启动判定、
|
|
272
|
-
// UI 面板 defaultMode 共用 resolvePriority().effective(env > patch >
|
|
297
|
+
// UI 面板 defaultMode 共用 resolvePriority().effective(env > patch > full)。
|
|
273
298
|
// 修复前未注入此闭包 → 落到 ponytail-config.getDefaultMode()(无 patch 层),
|
|
274
299
|
// 当 cordis.patch.yml 显式声明 defaultMode 时,/ponytail foobar 会把等级从 patch 档切到 config 档(静默不一致)。
|
|
275
300
|
// 必须传实时闭包而非快照:/ponytail default <档> 写盘后,下一次命令解析要读到新值。
|
package/lib/ponytail.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ponytail.js","sourceRoot":"","sources":["../src/ponytail.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAW,OAAO,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAMxC,OAAO,MAAM,MAAM,0BAA0B,CAAA;AAE7C,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,aAAa,EACb,cAAc,EACd,YAAY,GAEb,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,mBAAmB,GAEpB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,qB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e,EAAE,CAAC,GAAG,IAAe,EAAE,EAAE;QAChD,IAAI,CAAC;YACH,MAAM,CAAC,OAAO,CAAC,GAAG,IAAoD,CAAA;YACtE,IAAI,UAAU,EAAE,CAAC;gBACf,GAAG,CAAC,MAAM,CAAC,KAAK,CACd,sBAAsB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,UAAU,kBAAkB,EAAE,CAC7E,CAAA;YACH,CAAC;YACD,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,IAAI,OAAO,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;gBAChE,uCAAuC;gBACvC,KAAK,CAAC,UAAU,EAAE,CAAA;gBAClB,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAmB,OAAO,CAAC,MAAM,iBAAiB,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;YACnF,CAAC;QACH,CAAC;QAAC,OAAO,GAAY,EAAE,CAAC;YACtB,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,iCAAiC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QACjE,CAAC;IACH,CAAC,CAAC,CAAA;IAIF,mCAAmC;IACnC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE;QACd,OAAO,GAAG,EAAE;YACV,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAA;QAC5D,CAAC,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA"}
|
package/locale/en.json
CHANGED
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
"confirm.reset": "Restore default config? Level returns to Standard (full) and all 6 skills are re-enabled.",
|
|
8
8
|
"error.operation": "Operation failed: ",
|
|
9
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": "中文",
|
|
10
14
|
"level.env": "Environment variable",
|
|
11
15
|
"level.fallback": "Built-in fallback",
|
|
12
16
|
"level.patch": "Profile patch",
|
|
@@ -23,6 +27,8 @@
|
|
|
23
27
|
"mode.off": "Off",
|
|
24
28
|
"mode.title": "Intensity Level",
|
|
25
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.",
|
|
26
32
|
"panel.title": "Lazy Senior Dev Mode settings",
|
|
27
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: ",
|
|
28
34
|
"priority.title": "Config Priority",
|
package/locale/zh.json
CHANGED
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
"confirm.reset": "确定恢复默认配置吗?等级回到标准(full),并重新启用全部 6 个技能。",
|
|
8
8
|
"error.operation": "操作失败:",
|
|
9
9
|
"error.rejected": "本部署没有接受这次修改,值已保留供你核对。",
|
|
10
|
+
"lang.changed": "技能描述语言已切为「{name}」",
|
|
11
|
+
"lang.en": "English",
|
|
12
|
+
"lang.title": "技能描述语言",
|
|
13
|
+
"lang.zh": "中文",
|
|
10
14
|
"level.env": "环境变量",
|
|
11
15
|
"level.fallback": "内置兜底",
|
|
12
16
|
"level.patch": "Profile 补丁",
|
|
@@ -23,6 +27,8 @@
|
|
|
23
27
|
"mode.off": "关闭",
|
|
24
28
|
"mode.title": "运行强度等级",
|
|
25
29
|
"mode.ultra": "激进",
|
|
30
|
+
"mode.unset": "未设置",
|
|
31
|
+
"mode.unsetHint": "Profile 补丁未配置运行等级,当前由内置兜底决定。点上方任一档位即写入补丁。",
|
|
26
32
|
"panel.title": "懒人模式配置",
|
|
27
33
|
"priority.intro": "运行等级按下列顺序取第一个有效值;被更高优先级压制的项,在界面上修改不会生效。当前生效:",
|
|
28
34
|
"priority.title": "配置优先级",
|
package/package.json
CHANGED
|
@@ -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.
|