pi-ponytail 0.1.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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DietrichGebert
4
+ Copyright (c) 2026 thelegendtubaguy
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/NOTICE ADDED
@@ -0,0 +1,5 @@
1
+ Ponytail rules, skills, and command behavior are adapted from:
2
+
3
+ https://github.com/DietrichGebert/ponytail
4
+
5
+ Original license: MIT. Original copyright notice is preserved in LICENSE.
package/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # pi-ponytail
2
+
3
+ Ponytail lazy senior developer mode for pi: YAGNI first, stdlib/native before dependencies, smallest working diff, one runnable check for non-trivial logic.
4
+
5
+ Source behavior is adapted from [DietrichGebert/ponytail](https://github.com/DietrichGebert/ponytail).
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pi install npm:pi-ponytail
11
+ ```
12
+
13
+ Try without installing:
14
+
15
+ ```bash
16
+ pi -e npm:pi-ponytail
17
+ ```
18
+
19
+ ## Commands
20
+
21
+ - `/ponytail` — enable the configured default mode (`full` unless changed).
22
+ - `/ponytail lite|full|ultra|off` — set session mode.
23
+ - `/ponytail status` — show current and default mode.
24
+ - `/ponytail default lite|full|ultra|off` — persist the default mode in the Ponytail config file.
25
+ - `/ponytail-review` — run the over-engineering review skill.
26
+ - `/ponytail-audit` — run the whole-repo over-engineering audit skill.
27
+ - `/ponytail-debt` — list `ponytail:` debt markers.
28
+ - `/ponytail-help` — show the quick reference.
29
+
30
+ Say `stop ponytail` or `normal mode` to disable the persistent mode in the current session.
31
+
32
+ ## Default mode
33
+
34
+ Resolution order:
35
+
36
+ 1. `PONYTAIL_DEFAULT_MODE=lite|full|ultra|off`
37
+ 2. `$XDG_CONFIG_HOME/ponytail/config.json` or `~/.config/ponytail/config.json`
38
+ 3. `full`
39
+
40
+ Config file shape:
41
+
42
+ ```json
43
+ { "defaultMode": "full" }
44
+ ```
45
+
46
+ ## pi package manifest
47
+
48
+ `package.json` exposes:
49
+
50
+ ```json
51
+ {
52
+ "keywords": ["pi-package"],
53
+ "pi": {
54
+ "extensions": ["./extensions/ponytail.js"],
55
+ "skills": ["./skills"]
56
+ }
57
+ }
58
+ ```
59
+
60
+ ## Development
61
+
62
+ ```bash
63
+ npm test
64
+ npm pack --dry-run
65
+ ```
@@ -0,0 +1,215 @@
1
+ import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
2
+ import { dirname, join } from "node:path";
3
+ import { homedir } from "node:os";
4
+ import { fileURLToPath } from "node:url";
5
+
6
+ export const DEFAULT_MODE = "full";
7
+ export const VALID_MODES = ["off", "lite", "full", "ultra"];
8
+
9
+ const skillPath = fileURLToPath(new URL("../skills/ponytail/SKILL.md", import.meta.url));
10
+
11
+ export function normalizeMode(mode) {
12
+ if (typeof mode !== "string") return null;
13
+ const normalized = mode.trim().toLowerCase();
14
+ return VALID_MODES.includes(normalized) ? normalized : null;
15
+ }
16
+
17
+ export function getConfigDir() {
18
+ if (process.env.XDG_CONFIG_HOME) return join(process.env.XDG_CONFIG_HOME, "ponytail");
19
+
20
+ if (process.platform === "win32") {
21
+ return join(process.env.APPDATA || join(homedir(), "AppData", "Roaming"), "ponytail");
22
+ }
23
+
24
+ return join(homedir(), ".config", "ponytail");
25
+ }
26
+
27
+ export function getConfigPath() {
28
+ return join(getConfigDir(), "config.json");
29
+ }
30
+
31
+ export function readDefaultMode() {
32
+ const envMode = normalizeMode(process.env.PONYTAIL_DEFAULT_MODE);
33
+ if (envMode) return envMode;
34
+
35
+ try {
36
+ const config = JSON.parse(readFileSync(getConfigPath(), "utf8"));
37
+ return normalizeMode(config.defaultMode) || DEFAULT_MODE;
38
+ } catch {
39
+ return DEFAULT_MODE;
40
+ }
41
+ }
42
+
43
+ export function writeDefaultMode(mode) {
44
+ const normalized = normalizeMode(mode);
45
+ if (!normalized) return null;
46
+
47
+ const configPath = getConfigPath();
48
+ mkdirSync(dirname(configPath), { recursive: true });
49
+ writeFileSync(configPath, `${JSON.stringify({ defaultMode: normalized }, null, 2)}\n`, "utf8");
50
+ return normalized;
51
+ }
52
+
53
+ export function filterSkillBodyForMode(body, mode) {
54
+ const effectiveMode = normalizeMode(mode) || DEFAULT_MODE;
55
+ const withoutFrontmatter = String(body || "").replace(/^---[\s\S]*?---\s*/, "");
56
+
57
+ return withoutFrontmatter
58
+ .split(/\r?\n/)
59
+ .filter((line) => {
60
+ const tableLabel = line.match(/^\|\s*\*\*(.+?)\*\*\s*\|/);
61
+ if (tableLabel) {
62
+ const labelMode = normalizeMode(tableLabel[1]);
63
+ if (labelMode) return labelMode === effectiveMode;
64
+ }
65
+
66
+ const exampleLabel = line.match(/^-\s*([^:]+):\s*/);
67
+ if (exampleLabel) {
68
+ const labelMode = normalizeMode(exampleLabel[1]);
69
+ if (labelMode) return labelMode === effectiveMode;
70
+ }
71
+
72
+ return true;
73
+ })
74
+ .join("\n");
75
+ }
76
+
77
+ export function getPonytailInstructions(mode) {
78
+ const effectiveMode = normalizeMode(mode) || DEFAULT_MODE;
79
+
80
+ try {
81
+ const body = readFileSync(skillPath, "utf8");
82
+ return `PONYTAIL MODE ACTIVE — level: ${effectiveMode}\n\n${filterSkillBodyForMode(body, effectiveMode)}`;
83
+ } catch {
84
+ return null;
85
+ }
86
+ }
87
+
88
+ export function resolveSessionMode(entries, fallbackMode = DEFAULT_MODE) {
89
+ const fallback = normalizeMode(fallbackMode) || DEFAULT_MODE;
90
+ if (!Array.isArray(entries)) return fallback;
91
+
92
+ for (let i = entries.length - 1; i >= 0; i -= 1) {
93
+ const entry = entries[i];
94
+ if (entry?.type !== "custom" || entry.customType !== "ponytail-mode") continue;
95
+
96
+ const mode = normalizeMode(entry?.data?.mode);
97
+ if (mode) return mode;
98
+ }
99
+
100
+ return fallback;
101
+ }
102
+
103
+ export function parsePonytailCommand(text, defaultMode = DEFAULT_MODE) {
104
+ const fallback = normalizeMode(defaultMode) || DEFAULT_MODE;
105
+ const normalizedText = String(text || "").trim().toLowerCase();
106
+
107
+ if (!normalizedText) {
108
+ return { type: "set-mode", mode: fallback === "off" ? DEFAULT_MODE : fallback };
109
+ }
110
+
111
+ const [primary, secondary] = normalizedText.split(/\s+/);
112
+
113
+ if (primary === "status") return { type: "status" };
114
+
115
+ if (primary === "default") {
116
+ const mode = normalizeMode(secondary);
117
+ return mode ? { type: "set-default", mode } : { type: "invalid" };
118
+ }
119
+
120
+ const mode = normalizeMode(primary);
121
+ return mode ? { type: "set-mode", mode } : { type: "invalid" };
122
+ }
123
+
124
+ export default function ponytailExtension(pi) {
125
+ let configuredDefaultMode = readDefaultMode();
126
+ let currentMode = configuredDefaultMode;
127
+
128
+ const setMode = (mode, ctx) => {
129
+ const normalized = normalizeMode(mode);
130
+ if (!normalized) return;
131
+
132
+ currentMode = normalized;
133
+ pi.appendEntry("ponytail-mode", { mode: normalized });
134
+ ctx?.ui?.notify?.(`Ponytail mode set to ${normalized}.`, "info");
135
+ };
136
+
137
+ const sendAlias = (skillName, args, ctx) => {
138
+ const suffix = String(args || "").trim();
139
+ const message = suffix ? `/skill:${skillName} ${suffix}` : `/skill:${skillName}`;
140
+
141
+ if (ctx?.isIdle?.() === false) {
142
+ pi.sendUserMessage(message, { deliverAs: "followUp" });
143
+ ctx?.ui?.notify?.(`/${skillName} queued as follow-up.`, "info");
144
+ return;
145
+ }
146
+
147
+ pi.sendUserMessage(message);
148
+ };
149
+
150
+ pi.registerCommand("ponytail", {
151
+ description: "Set Ponytail lazy-dev mode: lite, full, ultra, off, status, or default <mode>",
152
+ handler: async (args, ctx) => {
153
+ const parsed = parsePonytailCommand(args, configuredDefaultMode);
154
+
155
+ if (parsed.type === "status") {
156
+ ctx?.ui?.notify?.(`Ponytail: current ${currentMode} • default ${configuredDefaultMode}`, "info");
157
+ return;
158
+ }
159
+
160
+ if (parsed.type === "set-default") {
161
+ const written = writeDefaultMode(parsed.mode);
162
+ if (written) {
163
+ configuredDefaultMode = readDefaultMode();
164
+ const message = configuredDefaultMode === written
165
+ ? `Default Ponytail mode set to ${written}.`
166
+ : `Saved default ${written}, but PONYTAIL_DEFAULT_MODE keeps default at ${configuredDefaultMode}.`;
167
+ ctx?.ui?.notify?.(message, "info");
168
+ }
169
+ return;
170
+ }
171
+
172
+ if (parsed.type === "set-mode") {
173
+ setMode(parsed.mode, ctx);
174
+ return;
175
+ }
176
+
177
+ ctx?.ui?.notify?.("Unknown /ponytail mode. Use lite, full, ultra, off, status, or default <mode>.", "warning");
178
+ },
179
+ });
180
+
181
+ for (const name of ["ponytail-review", "ponytail-audit", "ponytail-debt", "ponytail-help"]) {
182
+ pi.registerCommand(name, {
183
+ description: `Run /skill:${name}`,
184
+ handler: (args, ctx) => sendAlias(name, args, ctx),
185
+ });
186
+ }
187
+
188
+ pi.on("session_start", async (_event, ctx) => {
189
+ const entries = ctx?.sessionManager?.getBranch?.() || ctx?.sessionManager?.getEntries?.() || [];
190
+ configuredDefaultMode = readDefaultMode();
191
+ currentMode = resolveSessionMode(entries, configuredDefaultMode);
192
+ });
193
+
194
+ pi.on("input", async (event) => {
195
+ if (event?.source === "extension") return { action: "continue" };
196
+
197
+ const text = String(event?.text || "");
198
+ if (currentMode !== "off" && /\b(stop ponytail|normal mode)\b/i.test(text)) {
199
+ setMode("off");
200
+ }
201
+
202
+ return { action: "continue" };
203
+ });
204
+
205
+ pi.on("before_agent_start", async (event) => {
206
+ if (!currentMode || currentMode === "off") return;
207
+
208
+ const instructions = getPonytailInstructions(currentMode);
209
+ if (!instructions) return;
210
+
211
+ return {
212
+ systemPrompt: `${event.systemPrompt}\n\n${instructions}`,
213
+ };
214
+ });
215
+ }
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "pi-ponytail",
3
+ "version": "0.1.1",
4
+ "description": "Ponytail lazy senior developer mode packaged for pi.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/thelegendtubaguy/pi-ponytail.git"
10
+ },
11
+ "homepage": "https://github.com/thelegendtubaguy/pi-ponytail#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/thelegendtubaguy/pi-ponytail/issues"
14
+ },
15
+ "keywords": [
16
+ "pi-package",
17
+ "pi",
18
+ "pi-extension",
19
+ "pi-skill",
20
+ "ponytail",
21
+ "yagni",
22
+ "minimalism"
23
+ ],
24
+ "files": [
25
+ "extensions",
26
+ "skills",
27
+ "README.md",
28
+ "LICENSE",
29
+ "NOTICE"
30
+ ],
31
+ "scripts": {
32
+ "test": "node --test test/*.test.js"
33
+ },
34
+ "pi": {
35
+ "extensions": [
36
+ "./extensions/ponytail.js"
37
+ ],
38
+ "skills": [
39
+ "./skills"
40
+ ]
41
+ }
42
+ }
@@ -0,0 +1,100 @@
1
+ ---
2
+ name: ponytail
3
+ description: >
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 whenever
9
+ the user says "ponytail", "be lazy", "lazy mode", "simplest solution",
10
+ "minimal solution", "yagni", "do less", or "shortest path", and whenever
11
+ they complain about over-engineering, bloat, boilerplate, or unnecessary
12
+ dependencies.
13
+ license: MIT
14
+ ---
15
+
16
+ # Ponytail
17
+
18
+ You are a lazy senior developer. Lazy means efficient, not careless. You have
19
+ seen every over-engineered codebase and been paged at 3am for one. The best
20
+ code is the code never written.
21
+
22
+ ## Persistence
23
+
24
+ ACTIVE EVERY RESPONSE. No drift back to over-building. Still active if
25
+ unsure. Off only: "stop ponytail" / "normal mode". Default: **full**.
26
+ Switch: `/ponytail lite|full|ultra`.
27
+
28
+ ## The ladder
29
+
30
+ Stop at the first rung that holds:
31
+
32
+ 1. **Does this need to exist at all?** Speculative need = skip it, say so in one line. (YAGNI)
33
+ 2. **Stdlib does it?** Use it.
34
+ 3. **Native platform feature covers it?** `<input type="date">` over a picker lib, CSS over JS, DB constraint over app code.
35
+ 4. **Already-installed dependency solves it?** Use it. Never add a new one for what a few lines can do.
36
+ 5. **Can it be one line?** One line.
37
+ 6. **Only then:** the minimum code that works.
38
+
39
+ The ladder is a reflex, not a research project. Two rungs work → take the
40
+ higher one and move on. The first lazy solution that works is the right one.
41
+
42
+ ## Rules
43
+
44
+ - No unrequested abstractions: no interface with one implementation, no factory for one product, no config for a value that never changes.
45
+ - No boilerplate, no scaffolding "for later", later can scaffold for itself.
46
+ - Deletion over addition. Boring over clever, clever is what someone decodes at 3am.
47
+ - Fewest files possible. Shortest working diff wins.
48
+ - 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.
49
+ - Two stdlib options, same size? Take the one that's correct on edge cases. Lazy means writing less code, not picking the flimsier algorithm.
50
+ - Mark deliberate simplifications with a `ponytail:` comment (`// ponytail: this exists`), simple reads as intent, not ignorance. Shortcut with a known ceiling (global lock, O(n²) scan, naive heuristic)? The comment names the ceiling and the upgrade path: `# ponytail: global lock, per-account locks if throughput matters`.
51
+
52
+ ## Output
53
+
54
+ Code first. Then at most three short lines: what was skipped, when to add it.
55
+ No essays, no feature tours, no design notes. If the explanation is longer
56
+ than the code, delete the explanation, every paragraph defending a
57
+ simplification is complexity smuggled back in as prose. Explanation the user
58
+ explicitly asked for (a report, a walkthrough, per-phase notes) is not debt,
59
+ give it in full, the rule is only against unrequested prose.
60
+
61
+ Pattern: `[code] → skipped: [X], add when [Y].`
62
+
63
+ ## Intensity
64
+
65
+ | Level | What change |
66
+ |-------|------------|
67
+ | **lite** | Build what's asked, but name the lazier alternative in one line. User picks. |
68
+ | **full** | The ladder enforced. Stdlib and native first. Shortest diff, shortest explanation. Default. |
69
+ | **ultra** | YAGNI extremist. Deletion before addition. Ship the one-liner and challenge the rest of the requirement in the same breath. |
70
+
71
+ Example: "Add a cache for these API responses."
72
+ - lite: "Done, cache added. FYI: `functools.lru_cache` covers this in one line if you'd rather not own a cache class."
73
+ - full: "`@lru_cache(maxsize=1000)` on the fetch function. Skipped custom cache class, add when lru_cache measurably falls short."
74
+ - 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."
75
+
76
+ ## When NOT to be lazy
77
+
78
+ Never simplify away: input validation at trust boundaries, error handling
79
+ that prevents data loss, security measures, accessibility basics, anything
80
+ explicitly requested. User insists on the full version → build it, no
81
+ re-arguing.
82
+
83
+ Hardware is never the ideal on paper: a real clock drifts, a real sensor
84
+ reads off, a PCA9685 runs a few percent fast. Leave the calibration knob, not
85
+ just less code, the physical world needs tuning a minimal model can't see.
86
+
87
+ Lazy code without its check is unfinished. Non-trivial logic (a branch, a
88
+ loop, a parser, a money/security path) leaves ONE runnable check behind, the
89
+ smallest thing that fails if the logic breaks: an `assert`-based
90
+ `demo()`/`__main__` self-check or one small `test_*.py`. No frameworks, no
91
+ fixtures, no per-function suites unless asked. Trivial one-liners need no
92
+ test, YAGNI applies to tests too.
93
+
94
+ ## Boundaries
95
+
96
+ Ponytail governs what you build, not how you talk (pair with Caveman for
97
+ terse prose). "stop ponytail" / "normal mode": revert. Level persists until
98
+ changed or session end.
99
+
100
+ The shortest path to done is the right path.
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: ponytail-audit
3
+ description: >
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.
10
+ ---
11
+
12
+ ponytail-review, repo-wide. Scan the whole tree instead of a diff. Rank
13
+ findings biggest cut first.
14
+
15
+ ## Tags
16
+
17
+ Same as ponytail-review:
18
+
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.
24
+
25
+ ## Hunt
26
+
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.
30
+
31
+ ## Output
32
+
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.`
35
+
36
+ ## Boundaries
37
+
38
+ Complexity only, correctness bugs, security holes, and performance go to a
39
+ normal review pass. Lists findings, applies nothing. One-shot.
40
+ "stop ponytail-audit" or "normal mode" to revert.
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: ponytail-debt
3
+ description: >
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.
9
+ ---
10
+
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.
14
+
15
+ ## Scan
16
+
17
+ Grep the repo for comment markers, skipping `node_modules`, `.git`, and build
18
+ output:
19
+
20
+ `grep -rnE '(#|//) ?ponytail:' .` (add other comment prefixes if your stack uses them)
21
+
22
+ Each hit is one ledger row. The comment prefix keeps prose that merely mentions
23
+ the convention out of the ledger.
24
+
25
+ ## Output
26
+
27
+ One row per marker, grouped by file:
28
+
29
+ `<file>:<line> — <what was simplified>. ceiling: <the limit named>. upgrade: <the trigger to revisit>.`
30
+
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>`.
34
+
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.
37
+
38
+ End with `<N> markers, <M> with no trigger.` Nothing found: `No ponytail: debt. Clean ledger.`
39
+
40
+ ## Boundaries
41
+
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.
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: ponytail-help
3
+ description: >
4
+ Quick-reference card for all Ponytail modes, skills, and pi commands.
5
+ One-shot display, not a persistent mode. Trigger: /ponytail-help,
6
+ "ponytail help", "what ponytail commands", "how do I use ponytail".
7
+ ---
8
+
9
+ # Ponytail Help
10
+
11
+ Display this reference card when invoked. One-shot, do not change mode,
12
+ write config files, or persist anything.
13
+
14
+ ## Levels
15
+
16
+ | Level | Trigger | What changes |
17
+ |-------|---------|--------------|
18
+ | **Lite** | `/ponytail lite` | Build what's asked, name the lazier alternative in one line. |
19
+ | **Full** | `/ponytail` or `/ponytail full` | Enforce the ladder: YAGNI → stdlib → native → one line → minimum. Default. |
20
+ | **Ultra** | `/ponytail ultra` | YAGNI extremist. Deletion before addition. Challenges requirements before building. |
21
+ | **Off** | `/ponytail off` | Disable persistent Ponytail instructions for the session. |
22
+
23
+ Level sticks until changed or disabled.
24
+
25
+ ## Commands
26
+
27
+ | Command | What it does |
28
+ |---------|--------------|
29
+ | `/ponytail` | Enable the configured default mode. |
30
+ | `/ponytail lite\|full\|ultra\|off` | Set session mode. |
31
+ | `/ponytail status` | Show current/default mode. |
32
+ | `/ponytail default lite\|full\|ultra\|off` | Persist default mode. |
33
+ | `/ponytail-review` | Review a diff for over-engineering only. |
34
+ | `/ponytail-audit` | Audit the repo for bloat, speculative abstractions, and replaceable dependencies. |
35
+ | `/ponytail-debt` | List `ponytail:` shortcut/debt markers. |
36
+ | `/ponytail-help` | Show this card. |
37
+
38
+ ## Deactivate
39
+
40
+ Say `stop ponytail` or `normal mode`. Resume anytime with `/ponytail`.
41
+
42
+ ## Default mode
43
+
44
+ Environment variable, highest priority:
45
+
46
+ ```bash
47
+ export PONYTAIL_DEFAULT_MODE=ultra
48
+ ```
49
+
50
+ Config file: `$XDG_CONFIG_HOME/ponytail/config.json`, `~/.config/ponytail/config.json`, or `%APPDATA%\ponytail\config.json`:
51
+
52
+ ```json
53
+ { "defaultMode": "lite" }
54
+ ```
55
+
56
+ Set `"off"` to disable auto-activation on session start.
57
+
58
+ ## Install / update
59
+
60
+ ```bash
61
+ pi install git:github.com/thelegendtubaguy/pi-ponytail
62
+ pi update git:github.com/thelegendtubaguy/pi-ponytail
63
+ ```
64
+
65
+ Source: https://github.com/thelegendtubaguy/pi-ponytail
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: ponytail-review
3
+ description: >
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.
11
+ ---
12
+
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.
15
+
16
+ ## Format
17
+
18
+ `L<line>: <tag> <what>. <replacement>.`, or `<file>:L<line>: ...` for
19
+ multi-file diffs.
20
+
21
+ Tags:
22
+
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.
28
+
29
+ ## Examples
30
+
31
+ ❌ "This EmailValidator class might be more complex than necessary, have you
32
+ considered whether all these validation rules are needed at this stage?"
33
+
34
+ ✅ `L12-38: stdlib: 27-line validator class. "@" in email, 1 line, real validation is the confirmation mail.`
35
+
36
+ ✅ `L4: native: moment.js imported for one format call. Intl.DateTimeFormat, 0 deps.`
37
+
38
+ ✅ `repo.py:L88: yagni: AbstractRepository with one implementation. Inline it until a second one exists.`
39
+
40
+ ✅ `L52-71: delete: retry wrapper around an idempotent local call. Nothing replaces it.`
41
+
42
+ ✅ `L30-44: shrink: manual loop builds dict. dict(zip(keys, values)), 1 line.`
43
+
44
+ ## Scoring
45
+
46
+ End with the only metric that matters: `net: -<N> lines possible.`
47
+
48
+ If there is nothing to cut, say `Lean already. Ship.` and stop.
49
+
50
+ ## Boundaries
51
+
52
+ Complexity only, correctness bugs, security holes, and performance go to a
53
+ normal review pass, not this one. A single smoke test or `assert`-based
54
+ self-check is the ponytail minimum, not bloat, never flag it for deletion.
55
+ Does not apply the fixes, only lists them.
56
+ "stop ponytail-review" or "normal mode": revert to verbose review style.