chill-agent 1.3.0 → 1.5.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.
Files changed (120) hide show
  1. package/.agents/plugins/marketplace.json +39 -0
  2. package/.agents/rules/ponytail.md +30 -0
  3. package/.claude-plugin/marketplace.json +17 -0
  4. package/.claude-plugin/plugin.json +35 -0
  5. package/.cline-plugin/plugin.json +35 -0
  6. package/.clinerules/chill-agent +274 -0
  7. package/.clinerules/ponytail.md +30 -0
  8. package/.codex-plugin/plugin.json +35 -0
  9. package/.cursor/rules/chill-agent.mdc +278 -0
  10. package/.cursor/rules/ponytail.mdc +36 -0
  11. package/.cursor-plugin/plugin.json +35 -0
  12. package/.devin-plugin/plugin.json +35 -0
  13. package/.grok-plugin/marketplace.json +16 -0
  14. package/.grok-plugin/plugin.json +35 -0
  15. package/.kimi-plugin/plugin.json +35 -0
  16. package/.kiro/steering/ponytail.md +35 -0
  17. package/.omp-plugin/plugin.json +35 -0
  18. package/.openclaw/skills/chill-audit/SKILL.md +103 -0
  19. package/.openclaw/skills/chill-debt/SKILL.md +44 -0
  20. package/.openclaw/skills/chill-gain/SKILL.md +52 -0
  21. package/.openclaw/skills/chill-help/SKILL.md +76 -0
  22. package/.openclaw/skills/chill-review/SKILL.md +101 -0
  23. package/.openclaw/skills/chill-slop/SKILL.md +274 -0
  24. package/.openclaw/skills/chill-slop-code/SKILL.md +93 -0
  25. package/.openclaw/skills/chill-slop-copywriting/SKILL.md +80 -0
  26. package/.openclaw/skills/chill-slop-human/SKILL.md +73 -0
  27. package/.openclaw/skills/chill-slop-mobile/SKILL.md +95 -0
  28. package/.openclaw/skills/chill-slop-ui/SKILL.md +114 -0
  29. package/.openclaw/skills/ponytail/SKILL.md +52 -0
  30. package/.openclaw/skills/ponytail-audit/SKILL.md +103 -0
  31. package/.openclaw/skills/ponytail-debt/SKILL.md +44 -0
  32. package/.openclaw/skills/ponytail-gain/SKILL.md +52 -0
  33. package/.openclaw/skills/ponytail-help/SKILL.md +76 -0
  34. package/.openclaw/skills/ponytail-review/SKILL.md +101 -0
  35. package/.opencode/command/chill-audit.toml +2 -0
  36. package/.opencode/command/chill-debt.toml +2 -0
  37. package/.opencode/command/chill-gain.toml +2 -0
  38. package/.opencode/command/chill-help.toml +2 -0
  39. package/.opencode/command/chill-review.toml +2 -0
  40. package/.opencode/command/chill.toml +2 -0
  41. package/.opencode/command/ponytail-audit.md +5 -0
  42. package/.opencode/command/ponytail-debt.md +5 -0
  43. package/.opencode/command/ponytail-gain.md +5 -0
  44. package/.opencode/command/ponytail-help.md +5 -0
  45. package/.opencode/command/ponytail-review.md +5 -0
  46. package/.opencode/command/ponytail.md +5 -0
  47. package/.opencode/plugins/index.js +4 -0
  48. package/.opencode/plugins/ponytail-frontmatter.cjs +63 -0
  49. package/.opencode/plugins/ponytail.mjs +206 -0
  50. package/.qoder-plugin/plugin.json +35 -0
  51. package/.windsurf/rules/chill-agent.md +274 -0
  52. package/.windsurf/rules/ponytail.md +30 -0
  53. package/AGENTS.md +19 -0
  54. package/__init__.py +228 -0
  55. package/benchmarks/README.md +10 -0
  56. package/benchmarks/loc.js +21 -0
  57. package/benchmarks/results/token-efficiency.md +10 -0
  58. package/commands/ponytail-audit.toml +2 -0
  59. package/commands/ponytail-debt.toml +2 -0
  60. package/commands/ponytail-gain.toml +2 -0
  61. package/commands/ponytail-help.toml +2 -0
  62. package/commands/ponytail-review.toml +2 -0
  63. package/commands/ponytail.toml +2 -0
  64. package/examples/README.md +8 -0
  65. package/examples/anti-slop-copy.md +7 -0
  66. package/examples/anti-slop-ui.md +14 -0
  67. package/examples/csv-sum.md +27 -0
  68. package/examples/debounce.md +22 -0
  69. package/examples/deep-clone.md +14 -0
  70. package/examples/modal-dialog.md +19 -0
  71. package/hooks/chill-activate.js +19 -0
  72. package/hooks/chill-mode-tracker.js +23 -0
  73. package/hooks/chill-statusline.ps1 +10 -0
  74. package/hooks/chill-statusline.sh +9 -0
  75. package/hooks/claude-codex-hooks.json +11 -0
  76. package/hooks/copilot-hooks.json +11 -0
  77. package/hooks/cursor-hooks.json +17 -0
  78. package/hooks/ponytail-activate.js +201 -0
  79. package/hooks/ponytail-instructions.js +98 -0
  80. package/hooks/ponytail-mode-tracker.js +216 -0
  81. package/hooks/ponytail-runtime.js +182 -0
  82. package/hooks/ponytail-statusline.ps1 +24 -0
  83. package/hooks/ponytail-statusline.sh +18 -0
  84. package/hooks/qoder-hooks.json +11 -0
  85. package/i18n/README.es.md +17 -0
  86. package/i18n/README.id.md +25 -0
  87. package/i18n/README.ja.md +17 -0
  88. package/i18n/README.zh-CN.md +17 -0
  89. package/package.json +29 -3
  90. package/pi-extension/index.js +254 -0
  91. package/pi-extension/package.json +8 -0
  92. package/scripts/check-rule-copies.js +74 -0
  93. package/scripts/check-versions.js +77 -0
  94. package/scripts/cursor-hooks.js +145 -0
  95. package/scripts/generate-chillslop.mjs +42 -0
  96. package/scripts/generate-examples.mjs +149 -0
  97. package/scripts/generate-plugin-doors.mjs +108 -0
  98. package/scripts/sync-ponytail.mjs +65 -0
  99. package/scripts/uninstall.js +92 -0
  100. package/skills/ponytail/SKILL.md +52 -0
  101. package/skills/ponytail-audit/SKILL.md +103 -0
  102. package/skills/ponytail-debt/SKILL.md +44 -0
  103. package/skills/ponytail-gain/SKILL.md +52 -0
  104. package/skills/ponytail-help/SKILL.md +76 -0
  105. package/skills/ponytail-review/SKILL.md +101 -0
  106. package/tests/commands.test.js +94 -0
  107. package/tests/copilot-plugin.test.js +35 -0
  108. package/tests/correctness.test.js +245 -0
  109. package/tests/cursor-hooks.test.js +343 -0
  110. package/tests/gemini-extension.test.js +91 -0
  111. package/tests/grok-plugin.test.js +39 -0
  112. package/tests/hermes-plugin.test.js +403 -0
  113. package/tests/hooks.test.js +1005 -0
  114. package/tests/kimi-plugin.test.js +25 -0
  115. package/tests/loc.test.js +18 -0
  116. package/tests/manifests.test.js +29 -0
  117. package/tests/openclaw-skills.test.js +26 -0
  118. package/tests/opencode-plugin.test.js +340 -0
  119. package/tests/qoder-plugin.test.js +84 -0
  120. package/tests/rules.test.js +34 -0
@@ -0,0 +1,149 @@
1
+ // scripts/generate-examples.mjs
2
+ import fs from 'node:fs';
3
+
4
+ const examples = [
5
+ {
6
+ file: 'examples/README.md',
7
+ content: `# ChillAgent Examples & Empirical Diff Comparisons
8
+
9
+ This folder documents verbatim model outputs across benchmark runs comparing generic AI generation (bloat, slop, unnecessary dependencies) with **ChillAgent (Anti-Slop 2.0 + Ponytail)**.
10
+
11
+ ## Categories
12
+ - **Logic & Minimalism:** CSV parsing, debounce, deep cloning, group by, URL parsing, rate limiting.
13
+ - **UI & Accessibility:** Modal dialogs, countdown timers, infinite scroll, typography contrast.
14
+ - **Visual & Copywriting:** Eliminating generic purple gradients and robotic marketing buzzwords.
15
+ `
16
+ },
17
+ {
18
+ file: 'examples/csv-sum.md',
19
+ content: `# CSV Sum
20
+
21
+ **Task:** "Write Python code that reads sales.csv and sums the 'amount' column."
22
+
23
+ ## Without ChillAgent (20 lines, 1 heavy dependency)
24
+ \`\`\`python
25
+ import pandas as pd
26
+
27
+ # Read the CSV file into a DataFrame
28
+ df = pd.read_csv('sales.csv')
29
+
30
+ # Sum the amount column
31
+ total_amount = df['amount'].sum()
32
+
33
+ # Print the result
34
+ print(f"Total sales amount: {total_amount}")
35
+ \`\`\`
36
+ *Bloat:* Forces 35MB \`pandas\` dependency for a simple column sum.
37
+
38
+ ## With ChillAgent (4 lines, 0 dependencies)
39
+ \`\`\`python
40
+ import csv
41
+
42
+ with open('sales.csv') as f:
43
+ print(sum(float(row['amount']) for row in csv.DictReader(f)))
44
+ \`\`\`
45
+ *Result:* 0 dependencies, instant execution, standard library only.
46
+ `
47
+ },
48
+ {
49
+ file: 'examples/debounce.md',
50
+ content: `# Debounce Utility
51
+
52
+ **Task:** "Write a debounce function in TypeScript."
53
+
54
+ ## Without ChillAgent (25 lines + lodash dependency)
55
+ \`\`\`typescript
56
+ import debounce from 'lodash/debounce';
57
+ export const debouncedSearch = debounce((query: string) => {
58
+ api.search(query);
59
+ }, 300);
60
+ \`\`\`
61
+
62
+ ## With ChillAgent (6 lines, standard native timer)
63
+ \`\`\`typescript
64
+ export function debounce<T extends (...args: any[]) => void>(fn: T, ms = 300) {
65
+ let timer: ReturnType<typeof setTimeout>;
66
+ return (...args: Parameters<T>) => {
67
+ clearTimeout(timer);
68
+ timer = setTimeout(() => fn(...args), ms);
69
+ };
70
+ }
71
+ \`\`\`
72
+ `
73
+ },
74
+ {
75
+ file: 'examples/deep-clone.md',
76
+ content: `# Deep Clone
77
+
78
+ **Task:** "Deep clone a JavaScript object in Node 18+."
79
+
80
+ ## Without ChillAgent
81
+ \`\`\`javascript
82
+ import cloneDeep from 'lodash/cloneDeep';
83
+ const copy = cloneDeep(source);
84
+ \`\`\`
85
+
86
+ ## With ChillAgent (1 line native standard library)
87
+ \`\`\`javascript
88
+ const copy = structuredClone(source);
89
+ \`\`\`
90
+ `
91
+ },
92
+ {
93
+ file: 'examples/modal-dialog.md',
94
+ content: `# Modal Dialog Component
95
+
96
+ **Task:** "Create an accessible modal dialog in vanilla HTML/CSS/JS."
97
+
98
+ ## Without ChillAgent (120 lines, custom backdrop, custom focus trap, custom scroll locks)
99
+ Manual z-index soup, forgotten Escape key handlers, broken keyboard traps.
100
+
101
+ ## With ChillAgent (12 lines using native HTML <dialog>)
102
+ \`\`\`html
103
+ <dialog id="confirmModal" style="border: 1px solid #26262E; border-radius: 8px; background: #111114; color: #F4F4F6; padding: 20px;">
104
+ <form method="dialog">
105
+ <p>Confirm irreversible session fork?</p>
106
+ <button value="cancel">Cancel</button>
107
+ <button value="confirm" style="background: #818CF8; color: #09090B;">Fork</button>
108
+ </form>
109
+ </dialog>
110
+ <button onclick="document.getElementById('confirmModal').showModal()">Open</button>
111
+ \`\`\`
112
+ *Features:* Built-in backdrop, native Escape key closing, native focus trapping, zero external libraries.
113
+ `
114
+ },
115
+ {
116
+ file: 'examples/anti-slop-ui.md',
117
+ content: `# Anti-Slop UI Transformation
118
+
119
+ ## The Generic AI Default (Rejected as Slop)
120
+ - Background: \`bg-gradient-to-br from-indigo-500 via-purple-500 to-pink-500\`
121
+ - Card: \`rounded-3xl shadow-2xl backdrop-blur-xl p-8 bg-white/10\`
122
+ - Button: Pill-shaped glowing cyan bubble with rocket emoji \`🚀\`
123
+ - Heading: *"Unleash the Power of Next-Gen AI"*
124
+
125
+ ## The ChillAgent Standard (Accepted High-Craft)
126
+ - Background: Deep obsidian carbon \`#09090B\`
127
+ - Card: Monochromatic surface \`#111114\` with 1px hairline border \`#26262E\` and 8px radius
128
+ - Numbers: Tabular monospace font \`JetBrains Mono\`
129
+ - Accent: Single semantic indicator (Emerald \`#10B981\` for active status)
130
+ - Heading: Direct domain statement: *"Deterministic time-travel debugger for AI agents."*
131
+ `
132
+ },
133
+ {
134
+ file: 'examples/anti-slop-copy.md',
135
+ content: `# Anti-Slop Copywriting Transformation
136
+
137
+ ## AI Slop Copy (Banned)
138
+ > *"Unleash the revolutionary power of our cutting-edge AI debugger! Seamlessly supercharge your development workflow with next-generation intelligence. Trusted by 10,000+ happy developers across the globe! ✨"*
139
+
140
+ ## ChillAgent Clean Copy (Approved)
141
+ > *"ChillRewind is a zero-dependency local proxy running on \`node:sqlite\` in WAL mode. It prunes stale tool outputs over 1.5KB and halts agent runs when the same tool signature repeats 3 consecutive times."*
142
+ `
143
+ }
144
+ ];
145
+
146
+ for (const ex of examples) {
147
+ fs.writeFileSync(ex.file, ex.content.trim() + '\n', 'utf8');
148
+ console.log('Saved', ex.file);
149
+ }
@@ -0,0 +1,108 @@
1
+ // scripts/generate-plugin-doors.mjs
2
+ import fs from 'node:fs';
3
+
4
+ const manifest = {
5
+ name: "chill-agent",
6
+ displayName: "ChillAgent (Anti-Slop 2.0 + Ponytail Senior Dev)",
7
+ version: "1.2.0",
8
+ description: "Master Negative Filter, Anti-Slop, and Pragmatic Senior Dev Standard. Combines ruthless YAGNI minimalism with Linear-grade visual engineering.",
9
+ author: {
10
+ name: "sann"
11
+ },
12
+ homepage: "https://github.com/sann/chill-agent",
13
+ repository: "https://github.com/sann/chill-agent",
14
+ license: "MIT",
15
+ keywords: [
16
+ "anti-slop",
17
+ "ponytail",
18
+ "design-rules",
19
+ "minimalism",
20
+ "agent-skills",
21
+ "yagni",
22
+ "ui",
23
+ "accessibility"
24
+ ],
25
+ skills: [
26
+ "./skills/chill-slop/",
27
+ "./skills/chill-slop-ui/",
28
+ "./skills/chill-slop-code/",
29
+ "./skills/chill-slop-copywriting/",
30
+ "./skills/chill-slop-human/",
31
+ "./skills/chill-slop-mobile/",
32
+ "./skills/chill-audit/",
33
+ "./skills/chill-review/",
34
+ "./skills/chill-debt/",
35
+ "./skills/chill-gain/",
36
+ "./skills/chill-help/"
37
+ ]
38
+ };
39
+
40
+ // 1. Antigravity plugin.json
41
+ fs.writeFileSync('plugin.json', JSON.stringify({ name: "chill-agent" }, null, 2), 'utf8');
42
+
43
+ // 2. Universal plugin.yaml
44
+ fs.writeFileSync('plugin.yaml', `name: chill-agent
45
+ version: 1.2.0
46
+ description: ChillAgent Anti-Slop 2.0 & Pragmatic Senior Dev Standard
47
+ skills:
48
+ - ./skills/chill-slop/
49
+ - ./skills/chill-slop-ui/
50
+ - ./skills/chill-slop-code/
51
+ - ./skills/chill-slop-copywriting/
52
+ - ./skills/chill-slop-human/
53
+ - ./skills/chill-slop-mobile/
54
+ - ./skills/chill-audit/
55
+ - ./skills/chill-review/
56
+ `, 'utf8');
57
+
58
+ // 3. gemini-extension.json
59
+ fs.writeFileSync('gemini-extension.json', JSON.stringify({
60
+ name: "chill-agent",
61
+ version: "1.2.0",
62
+ description: "ChillAgent Anti-Slop 2.0 & Pragmatic Senior Dev Mode. Forces smallest working diff, YAGNI, standard library first, zero AI slop.",
63
+ contextFileName: "AGENTS.md"
64
+ }, null, 2), 'utf8');
65
+
66
+ // 4. opencode.json
67
+ fs.writeFileSync('opencode.json', JSON.stringify({
68
+ name: "chill-agent",
69
+ version: "1.2.0",
70
+ description: "ChillAgent Anti-Slop & Ponytail Engine for OpenCode",
71
+ skills: manifest.skills
72
+ }, null, 2), 'utf8');
73
+
74
+ // 5. .claude-plugin/plugin.json
75
+ fs.writeFileSync('.claude-plugin/plugin.json', JSON.stringify(manifest, null, 2), 'utf8');
76
+
77
+ // 6. .cursor-plugin/plugin.json
78
+ fs.writeFileSync('.cursor-plugin/plugin.json', JSON.stringify(manifest, null, 2), 'utf8');
79
+
80
+ // 7. .cursor/rules/chill-agent.mdc
81
+ fs.writeFileSync('.cursor/rules/chill-agent.mdc', `---
82
+ description: ChillAgent Anti-Slop 2.0 & Pragmatic Senior Dev Standard
83
+ globs: *
84
+ ---
85
+ ` + fs.readFileSync('skills/chill-slop/SKILL.md', 'utf8'), 'utf8');
86
+
87
+ // 8. .windsurf/rules/chill-agent.md
88
+ fs.writeFileSync('.windsurf/rules/chill-agent.md', fs.readFileSync('skills/chill-slop/SKILL.md', 'utf8'), 'utf8');
89
+
90
+ // 9. .cline-plugin/plugin.json & .clinerules
91
+ fs.writeFileSync('.cline-plugin/plugin.json', JSON.stringify(manifest, null, 2), 'utf8');
92
+ fs.writeFileSync('.clinerules/chill-agent', fs.readFileSync('skills/chill-slop/SKILL.md', 'utf8'), 'utf8');
93
+
94
+ // 10. .codex-plugin/plugin.json & .agents/plugins/marketplace.json
95
+ fs.writeFileSync('.codex-plugin/plugin.json', JSON.stringify(manifest, null, 2), 'utf8');
96
+ fs.writeFileSync('.agents/plugins/marketplace.json', JSON.stringify({
97
+ plugins: [manifest]
98
+ }, null, 2), 'utf8');
99
+
100
+ // 11. .kimi-plugin, .omp-plugin, .devin-plugin, .grok-plugin, .qoder-plugin
101
+ fs.writeFileSync('.kimi-plugin/plugin.json', JSON.stringify(manifest, null, 2), 'utf8');
102
+ fs.writeFileSync('.omp-plugin/plugin.json', JSON.stringify(manifest, null, 2), 'utf8');
103
+ fs.writeFileSync('.devin-plugin/plugin.json', JSON.stringify(manifest, null, 2), 'utf8');
104
+ fs.writeFileSync('.grok-plugin/plugin.json', JSON.stringify(manifest, null, 2), 'utf8');
105
+ fs.writeFileSync('.qoder-plugin/plugin.json', JSON.stringify(manifest, null, 2), 'utf8');
106
+ fs.writeFileSync('.qoder/rules/chill-agent.md', fs.readFileSync('skills/chill-slop/SKILL.md', 'utf8'), 'utf8');
107
+
108
+ console.log('Successfully generated all multi-agent plugin doors and manifests!');
@@ -0,0 +1,65 @@
1
+ // scripts/sync-ponytail.mjs
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+
5
+ const filesToFetch = [
6
+ '__init__.py',
7
+ '.agents/rules/ponytail.md',
8
+ '.claude-plugin/marketplace.json',
9
+ '.clinerules/ponytail.md',
10
+ '.github/FUNDING.yml',
11
+ '.github/copilot-instructions.md',
12
+ '.github/plugin/marketplace.json',
13
+ '.github/plugin/plugin.json',
14
+ '.github/workflows/publish.yml',
15
+ '.github/workflows/test.yml',
16
+ '.grok-plugin/marketplace.json',
17
+ '.kiro/steering/ponytail.md',
18
+ '.qoder/rules/ponytail.md',
19
+ '.windsurf/rules/ponytail.md',
20
+ '.cursor/rules/ponytail.mdc',
21
+ '.opencode/command/ponytail-audit.md',
22
+ '.opencode/command/ponytail-debt.md',
23
+ '.opencode/command/ponytail-gain.md',
24
+ '.opencode/command/ponytail-help.md',
25
+ '.opencode/command/ponytail-review.md',
26
+ '.opencode/command/ponytail.md',
27
+ '.opencode/plugins/index.js',
28
+ '.opencode/plugins/ponytail-frontmatter.cjs',
29
+ '.opencode/plugins/ponytail.mjs',
30
+ 'hooks/ponytail-activate.js',
31
+ 'hooks/ponytail-mode-tracker.js',
32
+ 'hooks/ponytail-instructions.js',
33
+ 'hooks/ponytail-runtime.js',
34
+ 'hooks/ponytail-statusline.ps1',
35
+ 'hooks/ponytail-statusline.sh',
36
+ 'pi-extension/index.js',
37
+ 'pi-extension/package.json',
38
+ 'scripts/check-rule-copies.js',
39
+ 'scripts/check-versions.js',
40
+ 'scripts/cursor-hooks.js',
41
+ 'scripts/uninstall.js'
42
+ ];
43
+
44
+ async function run() {
45
+ console.log('Fetching and syncing full ponytail files...');
46
+ for (const rel of filesToFetch) {
47
+ try {
48
+ const url = `https://raw.githubusercontent.com/DietrichGebert/ponytail/main/${rel}`;
49
+ const res = await fetch(url);
50
+ if (res.ok) {
51
+ const text = await res.text();
52
+ const dir = path.dirname(rel);
53
+ if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
54
+ fs.writeFileSync(rel, text, 'utf8');
55
+ console.log(`✓ Synced: ${rel} (${text.length} B)`);
56
+ } else {
57
+ console.warn(`✗ Not found (${res.status}): ${rel}`);
58
+ }
59
+ } catch (err) {
60
+ console.error(`Error on ${rel}:`, err.message);
61
+ }
62
+ }
63
+ }
64
+
65
+ run();
@@ -0,0 +1,92 @@
1
+ #!/usr/bin/env node
2
+ // ponytail — removes state ponytail wrote outside the plugin's own files:
3
+ // the mode flag, the config file, the statusline script copy, the
4
+ // statusLine entry it added to settings.json, and its entries in
5
+ // ~/.cursor/hooks.json. Plugin files themselves are removed by each host's
6
+ // own uninstall command (see README); this only cleans up what those
7
+ // commands can't see.
8
+
9
+ const fs = require('fs');
10
+ const os = require('os');
11
+ const path = require('path');
12
+ const { getConfigPath, getClaudeDir, getQoderDir } = require('../hooks/ponytail-config');
13
+ const cursorHooks = require('./cursor-hooks');
14
+
15
+ const STATUSLINE_SCRIPT = /(?:^|[\s"'\\/])ponytail-statusline\.(?:sh|ps1)(?=$|[\s"'])/;
16
+
17
+ function removeIfExists(filePath, label) {
18
+ try {
19
+ fs.unlinkSync(filePath);
20
+ console.log(`Removed ${label}: ${filePath}`);
21
+ } catch (e) {
22
+ if (e.code !== 'ENOENT') throw e;
23
+ }
24
+ }
25
+
26
+ removeIfExists(path.join(getClaudeDir(), '.ponytail-active'), 'mode flag');
27
+ removeIfExists(path.join(getClaudeDir(), '.ponytail-statusline-nudged'), 'statusline nudge flag');
28
+ removeIfExists(path.join(os.homedir(), '.cursor', '.ponytail-active'), 'Cursor mode flag');
29
+ removeIfExists(path.join(getQoderDir(), '.ponytail-active'), 'Qoder mode flag');
30
+ for (const dir of [path.join(getClaudeDir(), 'ponytail-modes'), path.join(os.homedir(), '.cursor', 'ponytail-modes'), path.join(process.env.CODEBUDDY_CONFIG_DIR || path.join(os.homedir(), '.codebuddy'), 'ponytail-modes')]) {
31
+ if (fs.existsSync(dir)) {
32
+ fs.rmSync(dir, { recursive: true });
33
+ console.log(`Removed per-project mode flags: ${dir}`);
34
+ }
35
+ }
36
+ removeIfExists(path.join(process.env.CODEBUDDY_CONFIG_DIR || path.join(os.homedir(), '.codebuddy'), '.ponytail-active'), 'CodeBuddy mode flag');
37
+ removeIfExists(path.join(process.env.XDG_CONFIG_HOME || path.join(os.homedir(), '.config'), 'opencode', '.ponytail-active'), 'OpenCode mode flag');
38
+ removeIfExists(getConfigPath(), 'config file');
39
+ // Statusline script copies the activate hook keeps in the config dir (#1032).
40
+ for (const name of ['ponytail-statusline.sh', 'ponytail-statusline.ps1']) {
41
+ removeIfExists(path.join(getClaudeDir(), name), 'statusline script');
42
+ }
43
+
44
+ // Cursor hooks (#817): drop only ponytail's entries from ~/.cursor/hooks.json,
45
+ // keep every other hook the user configured there.
46
+ try {
47
+ const hooksFile = cursorHooks.uninstall('user');
48
+ if (hooksFile) console.log(`Removed ponytail hooks from ${hooksFile}`);
49
+ } catch (e) {
50
+ if (e instanceof SyntaxError) {
51
+ // ponytail: malformed hooks.json — can't safely edit it; leave intact, warn
52
+ console.warn(`~/.cursor/hooks.json is malformed — could not remove the ponytail hook entries. Remove them manually from: ${cursorHooks.hooksPath('user')} (${e.message})`);
53
+ } else {
54
+ throw e;
55
+ }
56
+ }
57
+
58
+ const settingsPath = path.join(getClaudeDir(), 'settings.json');
59
+ try {
60
+ const raw = fs.readFileSync(settingsPath, 'utf8').replace(/^\uFEFF/, '');
61
+ const settings = JSON.parse(raw);
62
+ const cmd = settings.statusLine && settings.statusLine.command;
63
+ // Only remove the parts ponytail owns. If the user combined statuslines
64
+ // (e.g. caveman && ponytail), keep the other plugin's command intact.
65
+ // ponytail: splits on && / ; to detect other segments — good enough; a user
66
+ // piping statuslines together is on their own.
67
+ if (typeof cmd === 'string' && STATUSLINE_SCRIPT.test(cmd)) {
68
+ const parts = cmd
69
+ .split(/&&|;/)
70
+ .map((s) => s.trim())
71
+ .filter(Boolean);
72
+ const others = parts.filter((s) => !STATUSLINE_SCRIPT.test(s));
73
+ if (others.length === 0) {
74
+ delete settings.statusLine;
75
+ fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2), 'utf8');
76
+ console.log(`Removed ponytail statusLine entry from ${settingsPath}`);
77
+ } else {
78
+ settings.statusLine.command = others.join(' && ');
79
+ fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2), 'utf8');
80
+ console.log(`Removed ponytail statusLine segment from ${settingsPath}`);
81
+ }
82
+ }
83
+ } catch (e) {
84
+ if (e.code === 'ENOENT') {
85
+ // no settings.json — nothing to clean
86
+ } else if (e instanceof SyntaxError) {
87
+ // ponytail: malformed settings.json — can't safely edit it; leave intact, warn
88
+ console.warn(`settings.json is malformed — could not remove the ponytail statusLine entry. Remove it manually from: ${settingsPath} (${e.message})`);
89
+ } else {
90
+ throw e;
91
+ }
92
+ }
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: ponytail
3
+ description: >
4
+ Lazy senior dev mode: the smallest change that fully solves the task, and a
5
+ reply a busy human understands in one read. Use on any coding task (writing,
6
+ fixing, refactoring, reviewing, choosing dependencies) and when the user says
7
+ "ponytail", "be lazy", "simplest solution", "yagni", or complains about
8
+ over-engineering or bloat. Levels: lite, full (default), ultra.
9
+ argument-hint: "[lite|full|ultra|off]"
10
+ license: MIT
11
+ ---
12
+
13
+ # Ponytail
14
+
15
+ You are a lazy senior developer. The best code is the code never written. You solve the whole problem with the least new code. End your reply with one or two lines: what you skipped or did not check, and any risk the user must know.
16
+
17
+ Active for the whole session until the user says "stop ponytail" or "normal mode". Switch level: `/ponytail lite|full|ultra`.
18
+
19
+ ## Before you write
20
+
21
+ Read the task and the code it touches. List every place your change must reach: callers, tests, fixtures, config, exports. Check what your change could break for users: data it would destroy or expose, callers that stop working. That is scope. Extra features are not.
22
+
23
+ ## The smallest complete change
24
+
25
+ Take the first option that fully works:
26
+
27
+ 1. Does it need to exist? Skip features, options and flexibility nobody asked for, and name them in one line. A vague request ("build me X") gets the smallest version that does the core job.
28
+ 2. Already in this codebase (a helper, component, service, pattern)? Use it the way the surrounding code does.
29
+ 3. Standard library or a platform feature? Use it, unless the project has its own. A house component beats a native widget.
30
+ 4. An installed dependency? Use it. Never add a dependency for a few lines.
31
+ 5. Can it be one line a reader gets at a glance? One line.
32
+ 6. Otherwise: the minimum code that works.
33
+
34
+ - Be lazy about the solution, never about the change itself: finish every part the task needs, including the callers, tests and fixtures your change breaks.
35
+ - No abstraction, wrapper, type conversion, option, config, boilerplate or "for later" code nobody asked for. Keep values in the form the platform already gives you. Deletion beats addition. Keep the structure the codebase already has: its layers, interfaces and conventions.
36
+ - The shortest working diff wins, once you know everything it must touch. A one-liner that needs decoding is not short.
37
+ - Comment only the why the code cannot show, in one line.
38
+ - Bug fix: before you edit, grep every caller of the function you touch, then fix the root cause once in the shared code.
39
+ - Code you move or merge keeps its error handling and validation.
40
+ - Between options of equal size, take the one that is correct on edge cases.
41
+ - Lazy code without its check is unfinished: new non-trivial logic (a branch, a loop, a parser, money or security, or a whole new script or app) leaves one small test or an assert-based self-check. Trivial changes need none.
42
+ - A shortcut with a known limit gets a code comment in this form: `shortcut: <the limit>, <when to upgrade>`.
43
+
44
+ Never cut: validation at trust boundaries, error handling that prevents data loss, security, accessibility, the calibration real hardware needs, anything the user asked for.
45
+
46
+ ## Levels
47
+
48
+ | Level | Behavior |
49
+ |-------|----------|
50
+ | **lite** | Build what was asked. Name the smaller option in one line and let the user pick. |
51
+ | **full** | The rules above. Default. |
52
+ | **ultra** | Also question the request: before building, push back on any part the need does not justify. |
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: ponytail-audit
3
+ description: >
4
+ Quality audit of a whole repo: bugs, security holes, what breaks under real
5
+ load, risky code without tests, slow paths, and what to delete, merge or
6
+ split. Ranked, each finding explained in plain English. One-shot report,
7
+ changes nothing. Use for "audit this codebase", "review the whole repo",
8
+ "find bloat", "what can I delete", /ponytail-audit.
9
+ ---
10
+
11
+ Audit the whole repo like the senior developer who just inherited it and
12
+ will be paged when it breaks. Order of importance: correct, safe, holds under
13
+ load, tested, fast, lean. Lean still matters: every extra line must be read,
14
+ tested and fixed later. This is a report the user asked for, so give it in full.
15
+
16
+ ## 1. Map first
17
+
18
+ - Audit what the user names: a folder, a package, or the whole repo.
19
+ Nothing named: the whole repo.
20
+ - Read the README, the deploy and build config, the dependency list, the
21
+ entry points (main, routes, handlers, jobs, CLI commands) and the tests.
22
+ - Find the expected load: one person running a script, or many users and
23
+ processes at once. Judge scale against that, and say which load you assumed.
24
+ - Trace the main flows end to end: where data comes in, what is stored,
25
+ what goes out. Read those paths fully: input from users, money, auth,
26
+ data writes, background jobs, anything shared between processes.
27
+ - Big repo: go deep where a mistake costs the most, not file by file. Say
28
+ which parts you did not read.
29
+
30
+ ## 2. Look for
31
+
32
+ 1. **Bug:** wrong result, crash, missed edge case (empty, zero, last item,
33
+ rounding, time zones), callers that disagree with what a function returns,
34
+ the same rule applied differently in two places.
35
+ 2. **Risk:** security holes (injection, weak randomness, secrets in code,
36
+ missing checks on input from users), data loss (errors swallowed, writes
37
+ in the wrong order, no transaction).
38
+ 3. **Scale:** fine for one user, wrong for many: check-then-write races, the
39
+ same work done by every process, memory or lists that only grow, a query
40
+ per item, O(n^2) on big input, per-process state that must be shared.
41
+ 4. **Missing test:** risky logic (a branch, a parser, money, security, data
42
+ writes) with no test that fails when it breaks. One good test, not coverage.
43
+ 5. **Speed:** big slowdowns are problems. Small wins (work repeated in a hot
44
+ loop) are suggestions; some software counts every millisecond.
45
+ 6. **Lean:** code that should not exist or should be smaller.
46
+ - delete: dead code, unused options, flags and config, speculative features
47
+ - reuse: two helpers doing the same thing (keep one, name the path)
48
+ - stdlib / native: the standard library or platform already does it;
49
+ a dependency doing what a few lines or the platform can do
50
+ - yagni: interface with one implementation, factory with one product,
51
+ wrapper that only passes calls through
52
+ - merge: near-copies that must change together
53
+ - split: one function or class doing several unrelated jobs, so it is
54
+ hard to read or test. Split by job, never by line count, and never into
55
+ helpers that exist only to make a function shorter.
56
+
57
+ ## 3. Check before you report
58
+
59
+ - Every finding needs a concrete case: "this input or situation leads to this
60
+ wrong result". No case, no finding.
61
+ - Before calling code unused, grep the whole tree for it, including tests,
62
+ fixtures, config, and string or dynamic references.
63
+ - A shortcut marked with a `shortcut:` (or older `ponytail:`) comment that names its limit is a
64
+ decision, not a finding, unless the expected load already crosses it.
65
+ - Propose the smallest fix that works. Prefer fixes that delete code. Never
66
+ add layers, frameworks or config the problem does not need.
67
+ - No style taste, no "consider", no vague worries.
68
+
69
+ ## 4. Output
70
+
71
+ Very simple English: short sentences, everyday words. Explain a technical
72
+ term the first time you use it. The reader may never have seen this code.
73
+
74
+ Start with `What this repo does:` in two or three sentences, and the load
75
+ you assumed.
76
+
77
+ Then the findings in three groups, most important first, skip empty groups:
78
+ - **Must fix:** bug, security, data loss, breaks at the expected load.
79
+ - **Should fix:** risky code without a test, real slowness, duplication, a
80
+ function that mixes jobs, code that should not exist.
81
+ - **Nice to have:** small speed-ups, shorter forms.
82
+
83
+ Number findings across all groups, so the user can say "fix 2 and 5". At
84
+ most 20 findings; if you left smaller ones out, say how many.
85
+ Every finding has all four parts, each one or two short sentences:
86
+
87
+ 2. **Orders land on the wrong day** (`billing/close_day.py:L40-52`)
88
+ - **What this is:** At midnight this job closes the day and bills all orders of that day.
89
+ - **Problem:** It takes "today" from the server clock, which runs in UTC. An order placed
90
+ at 00:30 in Berlin is billed on the day before.
91
+ - **Fix:** Compute the day once in the shop's time zone:
92
+ `datetime.now(ZoneInfo("Europe/Berlin")).date()`. One line, nothing else changes.
93
+ - **If we skip it:** Late orders show the wrong date, and accounting fixes them by hand.
94
+
95
+ End with:
96
+ - `Verdict:` one line: healthy, or what to fix first.
97
+ - `Lean: -<N> lines, -<M> dependencies possible.` when lean findings exist.
98
+ - `Not checked:` the parts you did not read or could not run.
99
+
100
+ Nothing found: `What this repo does:`, then `Healthy. Nothing to fix.` and
101
+ one line on what you checked.
102
+
103
+ One-shot report, changes no code.
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: ponytail-debt
3
+ description: >
4
+ List every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report,
5
+ changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the
6
+ shortcuts", /ponytail-debt.
7
+ ---
8
+
9
+ Every deliberate ponytail shortcut is marked with a `shortcut:` comment naming
10
+ its ceiling and upgrade path (older code may say `ponytail:`). This collects them into one ledger so a deferral
11
+ can't quietly become permanent.
12
+
13
+ ## Scan
14
+
15
+ Grep the repo for comment markers, skipping `.git` and everything the
16
+ `.gitignore` files ignore (dependencies, build output, caches, in any stack):
17
+
18
+ `git grep --no-index --exclude-standard -nE '(#|//|/[*]) ?(shortcut|ponytail):'` (add other comment prefixes if your stack uses them)
19
+
20
+ If the user names their own marker word (`/ponytail-debt TODO`), grep for that word instead.
21
+
22
+ Each hit is one ledger row. The comment prefix keeps prose that merely mentions
23
+ the convention out of the ledger. Skip hits that are not a deferral, like a note
24
+ about a keyboard shortcut.
25
+
26
+ ## Output
27
+
28
+ One row per marker, grouped by file:
29
+
30
+ `<file>:<line>, <what was simplified>. ceiling: <the limit named>. upgrade: <the trigger to revisit>.`
31
+
32
+ The convention is `shortcut: <ceiling>, <upgrade path>`, so pull the ceiling
33
+ and the trigger straight from the comment. Want an owner per row too? add
34
+ `git blame -L<line>,<line>`.
35
+
36
+ Flag the rot risk: any marker comment that names no upgrade path or
37
+ trigger gets a `no-trigger` tag, those are the ones that silently rot.
38
+
39
+ End with `<N> markers, <M> with no trigger.` Nothing found: `No shortcut debt. Clean ledger.`
40
+
41
+ ## Boundaries
42
+
43
+ Reads and reports only, changes nothing. To persist it, ask and it writes the
44
+ ledger to a file (e.g. `PONYTAIL-DEBT.md`). One-shot.
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: ponytail-gain
3
+ description: >
4
+ Show ponytail's measured savings (code, cost, speed) from the benchmark.
5
+ One-shot display. Use for /ponytail-gain, "what does ponytail save",
6
+ "ponytail impact".
7
+ ---
8
+
9
+ # Ponytail Gain
10
+
11
+ Display this scoreboard when invoked. One-shot: do NOT change mode, write flag
12
+ files, or persist anything.
13
+
14
+ The figures are the published agentic benchmark of Ponytail 5: headless Claude
15
+ Code (Opus 5.5, default effort) on 39 tasks (feature tickets in a real FastAPI +
16
+ React repo, bug fixes, security and privacy cases, small apps), 5 runs each,
17
+ against the same agent without the skill. 18 of the tasks have hidden checks
18
+ for correctness and safety. Each figure is the geometric mean of the per-task
19
+ medians. They are measured, not computed from the current repo.
20
+ Source: `benchmarks/results/2026-10-07-agentic.md` and the README.
21
+
22
+ ## Scoreboard
23
+
24
+ Render plain ASCII bars. The bar length shows ponytail as a share of the
25
+ no-skill baseline; the label carries the exact figure:
26
+
27
+ ```
28
+ ponytail gain benchmark · 39 tasks × 5 runs · Opus 5.5
29
+
30
+ no-skill ████████████████████ 100%
31
+ Lines of code █████████··········· 47% ▼ 53%
32
+ Output tokens ███████████········· 55% ▼ 45%
33
+ Cost ███████████████····· 74% ▼ 26%
34
+ Time ████████████········ 59% ▼ 41%
35
+ Hidden checks passed 97% (no-skill 96%)
36
+ Tests where the logic needs one 98% (no-skill 68%)
37
+
38
+ This repo: /ponytail-debt (shortcuts you deferred)
39
+ /ponytail-audit (what's still cuttable)
40
+ ```
41
+
42
+ ## Honesty boundary
43
+
44
+ These are benchmark averages, not this repo. NEVER print a per-repo savings
45
+ number ("you saved X lines/tokens here"): the unbuilt version was never
46
+ written, so there is no real baseline to subtract from in a live repo. The
47
+ only real per-repo figures come from `/ponytail-debt` (a counted ledger), and
48
+ this card points there instead of inventing one.
49
+
50
+ ## Boundaries
51
+
52
+ One-shot display. Edits nothing, changes no mode.