claude-agent-skills 1.3.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/README.md +65 -0
- package/bundled-skills/ask-matt/SKILL.md +61 -0
- package/bundled-skills/brainstorming/SKILL.md +159 -0
- package/bundled-skills/brainstorming/scripts/frame-template.html +213 -0
- package/bundled-skills/brainstorming/scripts/helper.js +167 -0
- package/bundled-skills/brainstorming/scripts/server.cjs +723 -0
- package/bundled-skills/brainstorming/scripts/start-server.sh +209 -0
- package/bundled-skills/brainstorming/scripts/stop-server.sh +120 -0
- package/bundled-skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/bundled-skills/brainstorming/visual-companion.md +298 -0
- package/bundled-skills/cavecrew/README.md +41 -0
- package/bundled-skills/cavecrew/SKILL.md +82 -0
- package/bundled-skills/caveman/README.md +48 -0
- package/bundled-skills/caveman/SKILL.md +78 -0
- package/bundled-skills/caveman-commit/README.md +44 -0
- package/bundled-skills/caveman-commit/SKILL.md +65 -0
- package/bundled-skills/caveman-compress/README.md +163 -0
- package/bundled-skills/caveman-compress/SECURITY.md +31 -0
- package/bundled-skills/caveman-compress/SKILL.md +111 -0
- package/bundled-skills/caveman-compress/scripts/__init__.py +9 -0
- package/bundled-skills/caveman-compress/scripts/__main__.py +3 -0
- package/bundled-skills/caveman-compress/scripts/benchmark.py +80 -0
- package/bundled-skills/caveman-compress/scripts/cli.py +85 -0
- package/bundled-skills/caveman-compress/scripts/compress.py +342 -0
- package/bundled-skills/caveman-compress/scripts/detect.py +121 -0
- package/bundled-skills/caveman-compress/scripts/validate.py +213 -0
- package/bundled-skills/caveman-help/README.md +38 -0
- package/bundled-skills/caveman-help/SKILL.md +63 -0
- package/bundled-skills/caveman-review/README.md +33 -0
- package/bundled-skills/caveman-review/SKILL.md +55 -0
- package/bundled-skills/caveman-stats/README.md +30 -0
- package/bundled-skills/caveman-stats/SKILL.md +10 -0
- package/bundled-skills/codebase-design/DEEPENING.md +37 -0
- package/bundled-skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/bundled-skills/codebase-design/SKILL.md +114 -0
- package/bundled-skills/council/SKILL.md +77 -0
- package/bundled-skills/diagnosing-bugs/SKILL.md +134 -0
- package/bundled-skills/diagnosing-bugs/scripts/hitl-loop.template.sh +41 -0
- package/bundled-skills/dispatching-parallel-agents/SKILL.md +185 -0
- package/bundled-skills/domain-modeling/ADR-FORMAT.md +47 -0
- package/bundled-skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/bundled-skills/domain-modeling/SKILL.md +74 -0
- package/bundled-skills/edit-article/SKILL.md +15 -0
- package/bundled-skills/executing-plans/SKILL.md +70 -0
- package/bundled-skills/finishing-a-development-branch/SKILL.md +241 -0
- package/bundled-skills/git-guardrails-claude-code/SKILL.md +95 -0
- package/bundled-skills/git-guardrails-claude-code/scripts/block-dangerous-git.sh +25 -0
- package/bundled-skills/grill-me/SKILL.md +7 -0
- package/bundled-skills/grill-with-docs/SKILL.md +7 -0
- package/bundled-skills/grilling/SKILL.md +10 -0
- package/bundled-skills/handoff/SKILL.md +16 -0
- package/bundled-skills/i-am-dumb/SKILL.md +57 -0
- package/bundled-skills/implement/SKILL.md +15 -0
- package/bundled-skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
- package/bundled-skills/improve-codebase-architecture/SKILL.md +66 -0
- package/bundled-skills/migrate-to-shoehorn/SKILL.md +118 -0
- package/bundled-skills/obsidian-vault/SKILL.md +59 -0
- package/bundled-skills/ponytail/SKILL.md +117 -0
- package/bundled-skills/ponytail-audit/SKILL.md +50 -0
- package/bundled-skills/ponytail-debt/SKILL.md +59 -0
- package/bundled-skills/ponytail-gain/SKILL.md +51 -0
- package/bundled-skills/ponytail-help/SKILL.md +43 -0
- package/bundled-skills/ponytail-review/SKILL.md +51 -0
- package/bundled-skills/prototype/LOGIC.md +79 -0
- package/bundled-skills/prototype/SKILL.md +31 -0
- package/bundled-skills/prototype/UI.md +112 -0
- package/bundled-skills/receiving-code-review/SKILL.md +213 -0
- package/bundled-skills/requesting-code-review/SKILL.md +103 -0
- package/bundled-skills/requesting-code-review/code-reviewer.md +172 -0
- package/bundled-skills/resolving-merge-conflicts/SKILL.md +14 -0
- package/bundled-skills/scaffold-exercises/SKILL.md +106 -0
- package/bundled-skills/setup-matt-pocock-skills/SKILL.md +127 -0
- package/bundled-skills/setup-matt-pocock-skills/domain.md +51 -0
- package/bundled-skills/setup-matt-pocock-skills/issue-tracker-github.md +34 -0
- package/bundled-skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +35 -0
- package/bundled-skills/setup-matt-pocock-skills/issue-tracker-local.md +19 -0
- package/bundled-skills/setup-matt-pocock-skills/triage-labels.md +15 -0
- package/bundled-skills/setup-pre-commit/SKILL.md +91 -0
- package/bundled-skills/subagent-driven-development/SKILL.md +418 -0
- package/bundled-skills/subagent-driven-development/implementer-prompt.md +139 -0
- package/bundled-skills/subagent-driven-development/scripts/review-package +44 -0
- package/bundled-skills/subagent-driven-development/scripts/sdd-workspace +22 -0
- package/bundled-skills/subagent-driven-development/scripts/task-brief +40 -0
- package/bundled-skills/subagent-driven-development/task-reviewer-prompt.md +188 -0
- package/bundled-skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/bundled-skills/systematic-debugging/SKILL.md +296 -0
- package/bundled-skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/bundled-skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/bundled-skills/systematic-debugging/defense-in-depth.md +122 -0
- package/bundled-skills/systematic-debugging/find-polluter.sh +63 -0
- package/bundled-skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/bundled-skills/systematic-debugging/test-academic.md +14 -0
- package/bundled-skills/systematic-debugging/test-pressure-1.md +58 -0
- package/bundled-skills/systematic-debugging/test-pressure-2.md +68 -0
- package/bundled-skills/systematic-debugging/test-pressure-3.md +69 -0
- package/bundled-skills/tdd/SKILL.md +108 -0
- package/bundled-skills/tdd/mocking.md +59 -0
- package/bundled-skills/tdd/refactoring.md +10 -0
- package/bundled-skills/tdd/tests.md +61 -0
- package/bundled-skills/teach/GLOSSARY-FORMAT.md +35 -0
- package/bundled-skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
- package/bundled-skills/teach/MISSION-FORMAT.md +31 -0
- package/bundled-skills/teach/RESOURCES-FORMAT.md +32 -0
- package/bundled-skills/teach/SKILL.md +140 -0
- package/bundled-skills/test-driven-development/SKILL.md +371 -0
- package/bundled-skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/bundled-skills/to-issues/SKILL.md +84 -0
- package/bundled-skills/to-prd/SKILL.md +75 -0
- package/bundled-skills/triage/AGENT-BRIEF.md +207 -0
- package/bundled-skills/triage/OUT-OF-SCOPE.md +105 -0
- package/bundled-skills/triage/SKILL.md +112 -0
- package/bundled-skills/using-git-worktrees/SKILL.md +202 -0
- package/bundled-skills/using-superpowers/SKILL.md +121 -0
- package/bundled-skills/using-superpowers/references/antigravity-tools.md +96 -0
- package/bundled-skills/using-superpowers/references/claude-code-tools.md +50 -0
- package/bundled-skills/using-superpowers/references/codex-tools.md +72 -0
- package/bundled-skills/using-superpowers/references/copilot-tools.md +49 -0
- package/bundled-skills/using-superpowers/references/gemini-tools.md +63 -0
- package/bundled-skills/using-superpowers/references/pi-tools.md +28 -0
- package/bundled-skills/verification-before-completion/SKILL.md +139 -0
- package/bundled-skills/writing-great-skills/GLOSSARY.md +195 -0
- package/bundled-skills/writing-great-skills/SKILL.md +82 -0
- package/bundled-skills/writing-plans/SKILL.md +174 -0
- package/bundled-skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/bundled-skills/writing-skills/SKILL.md +689 -0
- package/bundled-skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/bundled-skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/bundled-skills/writing-skills/graphviz-conventions.dot +172 -0
- package/bundled-skills/writing-skills/persuasion-principles.md +187 -0
- package/bundled-skills/writing-skills/render-graphs.js +168 -0
- package/bundled-skills/writing-skills/testing-skills-with-subagents.md +384 -0
- package/commands/add.js +97 -0
- package/commands/check.js +54 -0
- package/commands/exportSkills.js +30 -0
- package/commands/hub.js +52 -0
- package/commands/importSkills.js +68 -0
- package/commands/list.js +37 -0
- package/commands/remove.js +59 -0
- package/commands/sync.js +66 -0
- package/commands/update.js +70 -0
- package/index.js +100 -0
- package/lib/banner.js +108 -0
- package/lib/constants.js +10 -0
- package/lib/deps.js +51 -0
- package/lib/hash.js +26 -0
- package/lib/install.js +31 -0
- package/lib/lockfile.js +37 -0
- package/lib/prompts.js +50 -0
- package/lib/scope.js +19 -0
- package/lib/summary.js +108 -0
- package/lib/theme.js +11 -0
- package/package.json +43 -0
- package/skills.json +164 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: improve-codebase-architecture
|
|
3
|
+
description: Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Improve Codebase Architecture
|
|
8
|
+
|
|
9
|
+
Surface architectural friction and propose **deepening opportunities** — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.
|
|
10
|
+
|
|
11
|
+
This command is _informed_ by the project's domain model and built on a shared design vocabulary:
|
|
12
|
+
|
|
13
|
+
- Run the `/codebase-design` skill for the architecture vocabulary (**module**, **interface**, **depth**, **seam**, **adapter**, **leverage**, **locality**) and its principles (the deletion test, "the interface is the test surface", "one adapter = hypothetical seam, two = real"). Use these terms exactly in every suggestion — don't drift into "component," "service," "API," or "boundary."
|
|
14
|
+
- The domain language in `CONTEXT.md` gives names to good seams; ADRs in `docs/adr/` record decisions this command should not re-litigate.
|
|
15
|
+
|
|
16
|
+
## Process
|
|
17
|
+
|
|
18
|
+
### 1. Explore
|
|
19
|
+
|
|
20
|
+
Read the project's domain glossary (`CONTEXT.md`) and any ADRs in the area you're touching first.
|
|
21
|
+
|
|
22
|
+
Then use the Agent tool with `subagent_type=Explore` to walk the codebase. Don't follow rigid heuristics — explore organically and note where you experience friction:
|
|
23
|
+
|
|
24
|
+
- Where does understanding one concept require bouncing between many small modules?
|
|
25
|
+
- Where are modules **shallow** — interface nearly as complex as the implementation?
|
|
26
|
+
- Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no **locality**)?
|
|
27
|
+
- Where do tightly-coupled modules leak across their seams?
|
|
28
|
+
- Which parts of the codebase are untested, or hard to test through their current interface?
|
|
29
|
+
|
|
30
|
+
Apply the **deletion test** to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? A "yes, concentrates" is the signal you want.
|
|
31
|
+
|
|
32
|
+
### 2. Present candidates as an HTML report
|
|
33
|
+
|
|
34
|
+
Write a self-contained HTML file to the OS temp directory so nothing lands in the repo. Resolve the temp dir from `$TMPDIR`, falling back to `/tmp` (or `%TEMP%` on Windows), and write to `<tmpdir>/architecture-review-<timestamp>.html` so each run gets a fresh file. Open it for the user — `xdg-open <path>` on Linux, `open <path>` on macOS, `start <path>` on Windows — and tell them the absolute path.
|
|
35
|
+
|
|
36
|
+
The report uses **Tailwind via CDN** for layout and styling, and **Mermaid via CDN** for diagrams where a graph/flow/sequence reliably communicates the structure. Mix Mermaid with hand-crafted CSS/SVG visuals — use Mermaid when relationships are graph-shaped (call graphs, dependencies, sequences), and hand-built divs/SVG when you want something more editorial (mass diagrams, cross-sections, collapse animations). Each candidate gets a **before/after visualisation**. Be visual.
|
|
37
|
+
|
|
38
|
+
For each candidate, render a card with:
|
|
39
|
+
|
|
40
|
+
- **Files** — which files/modules are involved
|
|
41
|
+
- **Problem** — why the current architecture is causing friction
|
|
42
|
+
- **Solution** — plain English description of what would change
|
|
43
|
+
- **Benefits** — explained in terms of locality and leverage, and how tests would improve
|
|
44
|
+
- **Before / After diagram** — side-by-side, custom-drawn, illustrating the shallowness and the deepening
|
|
45
|
+
- **Recommendation strength** — one of `Strong`, `Worth exploring`, `Speculative`, rendered as a badge
|
|
46
|
+
|
|
47
|
+
End the report with a **Top recommendation** section: which candidate you'd tackle first and why.
|
|
48
|
+
|
|
49
|
+
**Use CONTEXT.md vocabulary for the domain, and the `/codebase-design` vocabulary for the architecture.** If `CONTEXT.md` defines "Order," talk about "the Order intake module" — not "the FooBarHandler," and not "the Order service."
|
|
50
|
+
|
|
51
|
+
**ADR conflicts**: if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting the ADR. Mark it clearly in the card (e.g. a warning callout: _"contradicts ADR-0007 — but worth reopening because…"_). Don't list every theoretical refactor an ADR forbids.
|
|
52
|
+
|
|
53
|
+
See [HTML-REPORT.md](HTML-REPORT.md) for the full HTML scaffold, diagram patterns, and styling guidance.
|
|
54
|
+
|
|
55
|
+
Do NOT propose interfaces yet. After the file is written, ask the user: "Which of these would you like to explore?"
|
|
56
|
+
|
|
57
|
+
### 3. Grilling loop
|
|
58
|
+
|
|
59
|
+
Once the user picks a candidate, run the `/grilling` skill to walk the design tree with them — constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.
|
|
60
|
+
|
|
61
|
+
Side effects happen inline as decisions crystallize — run the `/domain-modeling` skill to keep the domain model current as you go:
|
|
62
|
+
|
|
63
|
+
- **Naming a deepened module after a concept not in `CONTEXT.md`?** Add the term to `CONTEXT.md`. Create the file lazily if it doesn't exist.
|
|
64
|
+
- **Sharpening a fuzzy term during the conversation?** Update `CONTEXT.md` right there.
|
|
65
|
+
- **User rejects the candidate with a load-bearing reason?** Offer an ADR, framed as: _"Want me to record this as an ADR so future architecture reviews don't re-suggest it?"_ Only offer when the reason would actually be needed by a future explorer to avoid re-suggesting the same thing — skip ephemeral reasons ("not worth it right now") and self-evident ones.
|
|
66
|
+
- **Want to explore alternative interfaces for the deepened module?** Run the `/codebase-design` skill and use its design-it-twice parallel sub-agent pattern.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: migrate-to-shoehorn
|
|
3
|
+
description: Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Migrate to Shoehorn
|
|
7
|
+
|
|
8
|
+
## Why shoehorn?
|
|
9
|
+
|
|
10
|
+
`shoehorn` lets you pass partial data in tests while keeping TypeScript happy. It replaces `as` assertions with type-safe alternatives.
|
|
11
|
+
|
|
12
|
+
**Test code only.** Never use shoehorn in production code.
|
|
13
|
+
|
|
14
|
+
Problems with `as` in tests:
|
|
15
|
+
|
|
16
|
+
- Trained not to use it
|
|
17
|
+
- Must manually specify target type
|
|
18
|
+
- Double-as (`as unknown as Type`) for intentionally wrong data
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm i @total-typescript/shoehorn
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Migration patterns
|
|
27
|
+
|
|
28
|
+
### Large objects with few needed properties
|
|
29
|
+
|
|
30
|
+
Before:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
type Request = {
|
|
34
|
+
body: { id: string };
|
|
35
|
+
headers: Record<string, string>;
|
|
36
|
+
cookies: Record<string, string>;
|
|
37
|
+
// ...20 more properties
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
it("gets user by id", () => {
|
|
41
|
+
// Only care about body.id but must fake entire Request
|
|
42
|
+
getUser({
|
|
43
|
+
body: { id: "123" },
|
|
44
|
+
headers: {},
|
|
45
|
+
cookies: {},
|
|
46
|
+
// ...fake all 20 properties
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
After:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
import { fromPartial } from "@total-typescript/shoehorn";
|
|
55
|
+
|
|
56
|
+
it("gets user by id", () => {
|
|
57
|
+
getUser(
|
|
58
|
+
fromPartial({
|
|
59
|
+
body: { id: "123" },
|
|
60
|
+
}),
|
|
61
|
+
);
|
|
62
|
+
});
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### `as Type` → `fromPartial()`
|
|
66
|
+
|
|
67
|
+
Before:
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
getUser({ body: { id: "123" } } as Request);
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
After:
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
import { fromPartial } from "@total-typescript/shoehorn";
|
|
77
|
+
|
|
78
|
+
getUser(fromPartial({ body: { id: "123" } }));
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### `as unknown as Type` → `fromAny()`
|
|
82
|
+
|
|
83
|
+
Before:
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
getUser({ body: { id: 123 } } as unknown as Request); // wrong type on purpose
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
After:
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
import { fromAny } from "@total-typescript/shoehorn";
|
|
93
|
+
|
|
94
|
+
getUser(fromAny({ body: { id: 123 } }));
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## When to use each
|
|
98
|
+
|
|
99
|
+
| Function | Use case |
|
|
100
|
+
| --------------- | -------------------------------------------------- |
|
|
101
|
+
| `fromPartial()` | Pass partial data that still type-checks |
|
|
102
|
+
| `fromAny()` | Pass intentionally wrong data (keeps autocomplete) |
|
|
103
|
+
| `fromExact()` | Force full object (swap with fromPartial later) |
|
|
104
|
+
|
|
105
|
+
## Workflow
|
|
106
|
+
|
|
107
|
+
1. **Gather requirements** - ask user:
|
|
108
|
+
- What test files have `as` assertions causing problems?
|
|
109
|
+
- Are they dealing with large objects where only some properties matter?
|
|
110
|
+
- Do they need to pass intentionally wrong data for error testing?
|
|
111
|
+
|
|
112
|
+
2. **Install and migrate**:
|
|
113
|
+
- [ ] Install: `npm i @total-typescript/shoehorn`
|
|
114
|
+
- [ ] Find test files with `as` assertions: `grep -r " as [A-Z]" --include="*.test.ts" --include="*.spec.ts"`
|
|
115
|
+
- [ ] Replace `as Type` with `fromPartial()`
|
|
116
|
+
- [ ] Replace `as unknown as Type` with `fromAny()`
|
|
117
|
+
- [ ] Add imports from `@total-typescript/shoehorn`
|
|
118
|
+
- [ ] Run type check to verify
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: obsidian-vault
|
|
3
|
+
description: Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Obsidian Vault
|
|
7
|
+
|
|
8
|
+
## Vault location
|
|
9
|
+
|
|
10
|
+
`/mnt/d/Obsidian Vault/AI Research/`
|
|
11
|
+
|
|
12
|
+
Mostly flat at root level.
|
|
13
|
+
|
|
14
|
+
## Naming conventions
|
|
15
|
+
|
|
16
|
+
- **Index notes**: aggregate related topics (e.g., `Ralph Wiggum Index.md`, `Skills Index.md`, `RAG Index.md`)
|
|
17
|
+
- **Title case** for all note names
|
|
18
|
+
- No folders for organization - use links and index notes instead
|
|
19
|
+
|
|
20
|
+
## Linking
|
|
21
|
+
|
|
22
|
+
- Use Obsidian `[[wikilinks]]` syntax: `[[Note Title]]`
|
|
23
|
+
- Notes link to dependencies/related notes at the bottom
|
|
24
|
+
- Index notes are just lists of `[[wikilinks]]`
|
|
25
|
+
|
|
26
|
+
## Workflows
|
|
27
|
+
|
|
28
|
+
### Search for notes
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Search by filename
|
|
32
|
+
find "/mnt/d/Obsidian Vault/AI Research/" -name "*.md" | grep -i "keyword"
|
|
33
|
+
|
|
34
|
+
# Search by content
|
|
35
|
+
grep -rl "keyword" "/mnt/d/Obsidian Vault/AI Research/" --include="*.md"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Or use Grep/Glob tools directly on the vault path.
|
|
39
|
+
|
|
40
|
+
### Create a new note
|
|
41
|
+
|
|
42
|
+
1. Use **Title Case** for filename
|
|
43
|
+
2. Write content as a unit of learning (per vault rules)
|
|
44
|
+
3. Add `[[wikilinks]]` to related notes at the bottom
|
|
45
|
+
4. If part of a numbered sequence, use the hierarchical numbering scheme
|
|
46
|
+
|
|
47
|
+
### Find related notes
|
|
48
|
+
|
|
49
|
+
Search for `[[Note Title]]` across the vault to find backlinks:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
grep -rl "\\[\\[Note Title\\]\\]" "/mnt/d/Obsidian Vault/AI Research/"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Find index notes
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
find "/mnt/d/Obsidian Vault/AI Research/" -name "*Index*"
|
|
59
|
+
```
|
|
@@ -0,0 +1,117 @@
|
|
|
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
|
+
argument-hint: "[lite|full|ultra]"
|
|
14
|
+
license: MIT
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Ponytail
|
|
18
|
+
|
|
19
|
+
You are a lazy senior developer. Lazy means efficient, not careless. You have
|
|
20
|
+
seen every over-engineered codebase and been paged at 3am for one. The best
|
|
21
|
+
code is the code never written.
|
|
22
|
+
|
|
23
|
+
## Persistence
|
|
24
|
+
|
|
25
|
+
ACTIVE EVERY RESPONSE. No drift back to over-building. Still active if
|
|
26
|
+
unsure. Off only: "stop ponytail" / "normal mode". Default: **full**.
|
|
27
|
+
Switch: `/ponytail lite|full|ultra`.
|
|
28
|
+
|
|
29
|
+
## The ladder
|
|
30
|
+
|
|
31
|
+
Stop at the first rung that holds:
|
|
32
|
+
|
|
33
|
+
1. **Does this need to exist at all?** Speculative need = skip it, say so in one line. (YAGNI)
|
|
34
|
+
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.
|
|
35
|
+
3. **Stdlib does it?** Use it.
|
|
36
|
+
4. **Native platform feature covers it?** `<input type="date">` over a picker lib, CSS over JS, DB constraint over app code.
|
|
37
|
+
5. **Already-installed dependency solves it?** Use it. Never add a new one for what a few lines can do.
|
|
38
|
+
6. **Can it be one line?** One line.
|
|
39
|
+
7. **Only then:** the minimum code that works.
|
|
40
|
+
|
|
41
|
+
The ladder is a reflex, not a research project — but it runs *after* you
|
|
42
|
+
understand the problem, not instead of it. Read the task and the code it
|
|
43
|
+
touches first, trace the real flow end to end, then climb. Two rungs work →
|
|
44
|
+
take the higher one and move on. The first lazy solution that works is the
|
|
45
|
+
right one — once you actually know what the change has to touch.
|
|
46
|
+
|
|
47
|
+
**Bug fix = root cause, not symptom.** A report names a symptom. Before you
|
|
48
|
+
edit, grep every caller of the function you're about to touch. The lazy fix IS
|
|
49
|
+
the root-cause fix: one guard in the shared function is a smaller diff than a
|
|
50
|
+
guard in every caller — and patching only the path the ticket names leaves
|
|
51
|
+
every sibling caller still broken. Fix it once, where all callers route through.
|
|
52
|
+
|
|
53
|
+
## Rules
|
|
54
|
+
|
|
55
|
+
- No unrequested abstractions: no interface with one implementation, no factory for one product, no config for a value that never changes.
|
|
56
|
+
- No boilerplate, no scaffolding "for later", later can scaffold for itself.
|
|
57
|
+
- Deletion over addition. Boring over clever, clever is what someone decodes at 3am.
|
|
58
|
+
- 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.
|
|
59
|
+
- 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.
|
|
60
|
+
- Two stdlib options, same size? Take the one that's correct on edge cases. Lazy means writing less code, not picking the flimsier algorithm.
|
|
61
|
+
- 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`.
|
|
62
|
+
|
|
63
|
+
## Output
|
|
64
|
+
|
|
65
|
+
Code first. Then at most three short lines: what was skipped, when to add it.
|
|
66
|
+
No essays, no feature tours, no design notes. If the explanation is longer
|
|
67
|
+
than the code, delete the explanation, every paragraph defending a
|
|
68
|
+
simplification is complexity smuggled back in as prose. Explanation the user
|
|
69
|
+
explicitly asked for (a report, a walkthrough, per-phase notes) is not debt,
|
|
70
|
+
give it in full, the rule is only against unrequested prose.
|
|
71
|
+
|
|
72
|
+
Pattern: `[code] → skipped: [X], add when [Y].`
|
|
73
|
+
|
|
74
|
+
## Intensity
|
|
75
|
+
|
|
76
|
+
| Level | What change |
|
|
77
|
+
|-------|------------|
|
|
78
|
+
| **lite** | Build what's asked, but name the lazier alternative in one line. User picks. |
|
|
79
|
+
| **full** | The ladder enforced. Stdlib and native first. Shortest diff, shortest explanation. Default. |
|
|
80
|
+
| **ultra** | YAGNI extremist. Deletion before addition. Ship the one-liner and challenge the rest of the requirement in the same breath. |
|
|
81
|
+
|
|
82
|
+
Example: "Add a cache for these API responses."
|
|
83
|
+
- lite: "Done, cache added. FYI: `functools.lru_cache` covers this in one line if you'd rather not own a cache class."
|
|
84
|
+
- full: "`@lru_cache(maxsize=1000)` on the fetch function. Skipped custom cache class, add when lru_cache measurably falls short."
|
|
85
|
+
- 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."
|
|
86
|
+
|
|
87
|
+
## When NOT to be lazy
|
|
88
|
+
|
|
89
|
+
Never simplify away: input validation at trust boundaries, error handling
|
|
90
|
+
that prevents data loss, security measures, accessibility basics, anything
|
|
91
|
+
explicitly requested. User insists on the full version → build it, no
|
|
92
|
+
re-arguing.
|
|
93
|
+
|
|
94
|
+
Never lazy about understanding the problem. The ladder shortens the
|
|
95
|
+
solution, never the reading. Trace the whole thing first — every file the
|
|
96
|
+
change touches, the actual flow — before picking a rung. Laziness that skips
|
|
97
|
+
comprehension to ship a small diff is the dangerous kind: it dresses up as
|
|
98
|
+
efficiency and ships a confident wrong fix. Read fully, then be lazy.
|
|
99
|
+
|
|
100
|
+
Hardware is never the ideal on paper: a real clock drifts, a real sensor
|
|
101
|
+
reads off, a PCA9685 runs a few percent fast. Leave the calibration knob, not
|
|
102
|
+
just less code, the physical world needs tuning a minimal model can't see.
|
|
103
|
+
|
|
104
|
+
Lazy code without its check is unfinished. Non-trivial logic (a branch, a
|
|
105
|
+
loop, a parser, a money/security path) leaves ONE runnable check behind, the
|
|
106
|
+
smallest thing that fails if the logic breaks: an `assert`-based
|
|
107
|
+
`demo()`/`__main__` self-check or one small `test_*.py`. No frameworks, no
|
|
108
|
+
fixtures, no per-function suites unless asked. Trivial one-liners need no
|
|
109
|
+
test, YAGNI applies to tests too.
|
|
110
|
+
|
|
111
|
+
## Boundaries
|
|
112
|
+
|
|
113
|
+
Ponytail governs what you build, not how you talk (pair with Caveman for
|
|
114
|
+
terse prose). "stop ponytail" / "normal mode": revert. Level persists until
|
|
115
|
+
changed or session end.
|
|
116
|
+
|
|
117
|
+
The shortest path to done is the right path.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ponytail-audit
|
|
3
|
+
description: >
|
|
4
|
+
Whole-repo audit for over-engineering. Generates a ranked list of what to
|
|
5
|
+
delete, simplify, or replace with stdlib/native equivalents across the entire
|
|
6
|
+
codebase. One-shot report, no fixes applied. Use when the user says "audit
|
|
7
|
+
for over-engineering", "what can we delete from this repo", "full codebase
|
|
8
|
+
simplification", or invokes /ponytail-audit.
|
|
9
|
+
license: MIT
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Ponytail Audit
|
|
13
|
+
|
|
14
|
+
Scan the entire repository for over-engineering. Produce a ranked list of
|
|
15
|
+
findings by impact. Apply no changes — report only unless user explicitly
|
|
16
|
+
requests fixes.
|
|
17
|
+
|
|
18
|
+
## What to hunt for
|
|
19
|
+
|
|
20
|
+
- Unnecessary dependencies (something a few lines could replace)
|
|
21
|
+
- Single-implementation interfaces
|
|
22
|
+
- One-product factories
|
|
23
|
+
- Delegating wrappers that add no value
|
|
24
|
+
- Single-export files
|
|
25
|
+
- Hand-rolled reimplementations of stdlib or platform functions
|
|
26
|
+
|
|
27
|
+
## Format
|
|
28
|
+
|
|
29
|
+
One line per finding, ranked by estimated impact (highest first):
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
<tag> <description>. <alternative>. [file_path]
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
End with: `net: -<N> lines, -<M> dependencies possible.`
|
|
36
|
+
If nothing to cut: `Lean already. Ship.`
|
|
37
|
+
|
|
38
|
+
## Tags
|
|
39
|
+
|
|
40
|
+
| Tag | Meaning |
|
|
41
|
+
|-----|---------|
|
|
42
|
+
| `delete:` | Dead code, unused flexibility — no replacement needed |
|
|
43
|
+
| `stdlib:` | Hand-rolled reimplementation of a standard library function |
|
|
44
|
+
| `native:` | Dependency or code duplicating a platform capability |
|
|
45
|
+
| `yagni:` | Abstraction with one implementation, unused config, single-caller layer |
|
|
46
|
+
| `shrink:` | Identical logic achievable in fewer lines |
|
|
47
|
+
|
|
48
|
+
## Scope
|
|
49
|
+
|
|
50
|
+
Over-engineering only. Does not cover correctness, security, or performance.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ponytail-debt
|
|
3
|
+
description: >
|
|
4
|
+
Harvests every ponytail: comment in the codebase into a debt ledger so
|
|
5
|
+
deliberate shortcuts and deferrals get tracked instead of rotting. Use when
|
|
6
|
+
the user says "ponytail debt", "show my shortcuts", "list ponytail markers",
|
|
7
|
+
or invokes /ponytail-debt.
|
|
8
|
+
license: MIT
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Ponytail Debt
|
|
12
|
+
|
|
13
|
+
Scan the codebase for `ponytail:` comments and report them as a debt ledger.
|
|
14
|
+
Read-only by default — make no changes unless explicitly asked.
|
|
15
|
+
|
|
16
|
+
## Scan command
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
grep -rnE '(#|//) ?ponytail:' . \
|
|
20
|
+
--exclude-dir=node_modules \
|
|
21
|
+
--exclude-dir=.git \
|
|
22
|
+
--exclude-dir=dist \
|
|
23
|
+
--exclude-dir=build
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Convention
|
|
27
|
+
|
|
28
|
+
Each marker follows the pattern:
|
|
29
|
+
```
|
|
30
|
+
# ponytail: <ceiling>, <upgrade path>
|
|
31
|
+
// ponytail: <ceiling>, <upgrade path>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Example:
|
|
35
|
+
```python
|
|
36
|
+
# ponytail: global lock, per-account locks if throughput matters
|
|
37
|
+
# ponytail: O(n²) scan, switch to indexed lookup when n > 1000
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Output format
|
|
41
|
+
|
|
42
|
+
Group by file:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
file/path.ext
|
|
46
|
+
L42 global lock — per-account locks if throughput matters
|
|
47
|
+
L87 O(n²) scan — switch to indexed lookup when n > 1000 [no-trigger]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Flag entries missing an upgrade trigger with `[no-trigger]` — these are
|
|
51
|
+
high rot risk: a shortcut with no named condition is "later means never".
|
|
52
|
+
|
|
53
|
+
End with: `<N> markers, <M> with no trigger.`
|
|
54
|
+
If none found: `No ponytail: debt. Clean ledger.`
|
|
55
|
+
|
|
56
|
+
## Persistence
|
|
57
|
+
|
|
58
|
+
Results are ephemeral by default. To write a `PONYTAIL-DEBT.md` file,
|
|
59
|
+
the user must explicitly request it.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ponytail-gain
|
|
3
|
+
description: >
|
|
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".
|
|
9
|
+
license: MIT
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Ponytail Gain
|
|
13
|
+
|
|
14
|
+
Display this scoreboard when invoked. One-shot: do NOT change mode, write flag
|
|
15
|
+
files, or persist anything.
|
|
16
|
+
|
|
17
|
+
The figures are the published benchmark medians (5 everyday tasks: email
|
|
18
|
+
validator, debounce, CSV sum, countdown timer, rate limiter; three models:
|
|
19
|
+
Haiku, Sonnet, Opus). They are measured, not computed from the current repo.
|
|
20
|
+
Source: `benchmarks/` and the README.
|
|
21
|
+
|
|
22
|
+
## Scoreboard
|
|
23
|
+
|
|
24
|
+
Render plain ASCII bars. The bar length shows the measured range; the label
|
|
25
|
+
carries the exact figure:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
ponytail gain benchmark median · 5 tasks · 3 models
|
|
29
|
+
|
|
30
|
+
Lines of code no-skill ████████████████████ 100%
|
|
31
|
+
ponytail ██▌················· 6–20% ▼ 80–94%
|
|
32
|
+
Cost no-skill ████████████████████ 100%
|
|
33
|
+
ponytail █████▌·············· 23–53% ▼ 47–77%
|
|
34
|
+
Speed ponytail ▸ 3–6× faster
|
|
35
|
+
|
|
36
|
+
This repo: /ponytail-debt (shortcuts you deferred)
|
|
37
|
+
/ponytail-audit (what's still cuttable)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Honesty boundary
|
|
41
|
+
|
|
42
|
+
These are benchmark medians, not this repo. NEVER print a per-repo savings
|
|
43
|
+
number ("you saved X lines/tokens here"): the unbuilt version was never
|
|
44
|
+
written, so there is no real baseline to subtract from in a live repo. The
|
|
45
|
+
only real per-repo figures come from `/ponytail-debt` (a counted ledger), and
|
|
46
|
+
this card points there instead of inventing one.
|
|
47
|
+
|
|
48
|
+
## Boundaries
|
|
49
|
+
|
|
50
|
+
One-shot display. Edits nothing, changes no mode.
|
|
51
|
+
"stop ponytail" or "normal mode": revert.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ponytail-help
|
|
3
|
+
description: >
|
|
4
|
+
Quick-reference card for all ponytail modes, skills, and commands.
|
|
5
|
+
One-shot display, not a persistent mode. Trigger: /ponytail-help,
|
|
6
|
+
"ponytail help", "what ponytail commands", "how do I use ponytail".
|
|
7
|
+
license: MIT
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Ponytail Help
|
|
11
|
+
|
|
12
|
+
Display this reference card when invoked. One-shot, do NOT change mode,
|
|
13
|
+
write flag files, or persist anything.
|
|
14
|
+
|
|
15
|
+
## Levels
|
|
16
|
+
|
|
17
|
+
| Level | Trigger | What change |
|
|
18
|
+
|-------|---------|-------------|
|
|
19
|
+
| **Lite** | `/ponytail lite` | Build what's asked, name the lazier alternative in one line. |
|
|
20
|
+
| **Full** | `/ponytail` | The ladder enforced: YAGNI → stdlib → native → one line → minimum. Default. |
|
|
21
|
+
| **Ultra** | `/ponytail ultra` | YAGNI extremist. Deletion before addition. Challenges requirements before building. |
|
|
22
|
+
|
|
23
|
+
Level sticks until changed or session end.
|
|
24
|
+
|
|
25
|
+
## Skills
|
|
26
|
+
|
|
27
|
+
| Skill | Trigger | What it does |
|
|
28
|
+
|-------|---------|--------------|
|
|
29
|
+
| **ponytail** | `/ponytail` | Lazy mode itself. Simplest solution that works. |
|
|
30
|
+
| **ponytail-review** | `/ponytail-review` | Over-engineering review: `L42: yagni: factory, one product. Inline.` |
|
|
31
|
+
| **ponytail-audit** | `/ponytail-audit` | Whole-repo audit: ranked list of what to delete or simplify. |
|
|
32
|
+
| **ponytail-debt** | `/ponytail-debt` | Harvest `ponytail:` comments into a debt ledger. |
|
|
33
|
+
| **ponytail-gain** | `/ponytail-gain` | Measured-impact scoreboard: less code, less cost, more speed. |
|
|
34
|
+
| **ponytail-help** | `/ponytail-help` | This card. |
|
|
35
|
+
|
|
36
|
+
## Deactivate
|
|
37
|
+
|
|
38
|
+
Say "stop ponytail" or "normal mode". Resume anytime with `/ponytail`.
|
|
39
|
+
`/ponytail off` also works.
|
|
40
|
+
|
|
41
|
+
## More
|
|
42
|
+
|
|
43
|
+
Full docs + examples: https://github.com/DietrichGebert/ponytail
|
|
@@ -0,0 +1,51 @@
|
|
|
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.
|
|
10
|
+
license: MIT
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Ponytail Review
|
|
14
|
+
|
|
15
|
+
Review the diff or codebase for over-engineering only. Goal: make the code
|
|
16
|
+
shorter. Report findings as one line each. Apply no fixes unless explicitly
|
|
17
|
+
asked.
|
|
18
|
+
|
|
19
|
+
## Format
|
|
20
|
+
|
|
21
|
+
Single-file diff:
|
|
22
|
+
```
|
|
23
|
+
L<line>: <tag> <what>. <replacement>.
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Multi-file diff:
|
|
27
|
+
```
|
|
28
|
+
<file>:L<line>: <tag> <what>. <replacement>.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
End with: `net: -<N> lines possible.`
|
|
32
|
+
If nothing to cut: `Lean already. Ship.`
|
|
33
|
+
|
|
34
|
+
## Tags
|
|
35
|
+
|
|
36
|
+
| Tag | Meaning |
|
|
37
|
+
|-----|---------|
|
|
38
|
+
| `delete:` | Dead code, unused flexibility, speculative feature — no replacement needed |
|
|
39
|
+
| `stdlib:` | Hand-rolled reimplementation of a standard library function |
|
|
40
|
+
| `native:` | Dependency or code duplicating a platform capability |
|
|
41
|
+
| `yagni:` | Abstraction with one implementation, unused config, single-caller layer |
|
|
42
|
+
| `shrink:` | Identical logic achievable in fewer lines — show the compressed form |
|
|
43
|
+
|
|
44
|
+
## Scope
|
|
45
|
+
|
|
46
|
+
Over-engineering and complexity only. This review does NOT cover:
|
|
47
|
+
- Correctness bugs
|
|
48
|
+
- Security issues
|
|
49
|
+
- Performance concerns
|
|
50
|
+
|
|
51
|
+
Those belong in a separate review pass.
|