DietrichGebert/ponytail
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
DietrichGebert/ponytail
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Ponytail 是一套面向 AI 编码 Agent 的「极简主义」规则与 skill 插件:在动手写代码前,先沿 YAGNI 决策阶梯判断「这件事是否必须存在、能否复用现有代码、能否用标准库或平台原生能力解决」,再写出完成任务所需的最小实现。它不把验证、错误处理、安全与无障碍当作可砍项,目标是用更少、更必要的代码完成同样功能——官方 agentic 基准在真实 FastAPI + React 仓库上测得平均约 54% 更少代码、约 20% 更低成本、约 27% 更快,且安全项保持 100% 通过。
AGENTS.md 多种接入方式lite / full / ultra / off 四档模式,可用 /ponytail 命令或环境变量 PONYTAIL_DEFAULT_MODE 切换/ponytail-review 检查当前 diff 过度工程,/ponytail-audit 扫描全仓库,/ponytail-debt 记录被推迟的简化项许多 Agent 接到「日期选择器」这类需求时,会顺手装 flatpickr、写包装组件、讨论时区——Ponytail 会优先落到 <input type="date"> 这类原生解法。对日常 feature 开发,它能抑制「为了显得专业而堆抽象」的冲动,在保持安全边界的前提下减少 token 消耗与 diff 体积,让代码审查更聚焦在真正必要的逻辑上。
lite 模式或按需 off。node 在非交互 shell 的 PATH 中(Nix/nvm 用户需注意)。Claude Code(插件市场):
/plugin marketplace add DietrichGebert/ponytail/plugin install ponytail@ponytail(需分两条消息发送;桌面版无 /plugin 命令时,从 Customize → Create plugin → Add from repository 安装。)
Codex:
codex plugin marketplace add DietrichGebert/ponytailcodex在 /plugins 安装 Ponytail,并在 /hooks 中审核并信任其两个 lifecycle hook,然后新开线程。
OpenCode(npm 插件):
在 opencode.json 中添加:
{ "plugin": ["@dietrichgebert/ponytail"] }Cursor / Windsurf / Cline / Copilot(编辑器)等:
从仓库复制对应规则文件到项目,例如 .cursor/rules/、.windsurf/rules/、.clinerules/、.github/copilot-instructions.md,或直接使用根目录 AGENTS.md。
更多宿主(Gemini CLI、Hermes、OpenClaw、Pi、Devin 等)见 官方 README 安装章节。
安装完成后,在支持命令的宿主中默认以 full 模式生效。可发送 /ponytail 查看当前强度,或用 /ponytail ultra 在代码库「罪孽深重」时加大约束。给 Agent 一个容易过度实现的日常任务(如表单控件、简单 CRUD)观察 diff 是否更精简。
/ponytail 应返回当前模式(如 full)。/ponytail-gain 查看内置基准得分板,或按仓库 benchmarks/ 说明本地复现 agentic 测试。/hooks 显式信任 hook,否则 always-on 激活可能静默失效。ultra 模式约束最强,复杂业务若确需较多代码,可临时 /ponytail off 或调低档位。~/.config/ponytail/config.json 等状态可能残留;可在移除插件前运行 node scripts/uninstall.js 清理(详见 README Uninstall 章节)。