@evertonferreira96/agents 0.0.0-stage → 0.1.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/.claude/agents/api.md +45 -0
- package/.claude/agents/app.md +41 -0
- package/.claude/agents/architect.md +49 -0
- package/.claude/agents/infra.md +27 -0
- package/.claude/agents/product.md +58 -0
- package/.claude/agents/quick.md +33 -0
- package/.claude/agents/security.md +39 -0
- package/.claude/agents/ui.md +54 -0
- package/.claude/agents/verifier.md +56 -0
- package/.claude/agents/web.md +41 -0
- package/.claude/hooks/config-update-check.mjs +14 -0
- package/.claude/hooks/context-budget.mjs +51 -0
- package/.claude/hooks/graphify-update.sh +16 -0
- package/.claude/hooks/guard-bash.sh +64 -0
- package/.claude/hooks/orchestrator-guard.sh +49 -0
- package/.claude/hooks/post-compact.sh +26 -0
- package/.claude/hooks/readonly-guard.sh +54 -0
- package/.claude/hooks/stop-verify.sh +52 -0
- package/.claude/rules/api.md +21 -0
- package/.claude/rules/db.md +9 -0
- package/.claude/rules/delivery-diagram.md +16 -0
- package/.claude/rules/git-workflow.md +34 -0
- package/.claude/rules/graphify.md +3 -0
- package/.claude/rules/mobile.md +22 -0
- package/.claude/rules/tickets.md +9 -0
- package/.claude/rules/ui.md +14 -0
- package/.claude/rules/web.md +27 -0
- package/.claude/settings.json +114 -0
- package/.claude/skills/animate/RECIPES.md +324 -0
- package/.claude/skills/animate/SKILL.md +208 -0
- package/.claude/skills/animate/agents/openai.yaml +5 -0
- package/.claude/skills/animate-expo/RECIPES.md +385 -0
- package/.claude/skills/animate-expo/SKILL.md +264 -0
- package/.claude/skills/animate-expo/agents/openai.yaml +5 -0
- package/.claude/skills/animation-performance/SKILL.md +223 -0
- package/.claude/skills/animation-performance/agents/openai.yaml +5 -0
- package/.claude/skills/apple-design/SKILL.md +291 -0
- package/.claude/skills/apple-design/agents/openai.yaml +5 -0
- package/.claude/skills/arch-api/SKILL.md +291 -0
- package/.claude/skills/arch-api/agents/openai.yaml +3 -0
- package/.claude/skills/arch-api/references/common.md +174 -0
- package/.claude/skills/arch-api/references/contract.md +289 -0
- package/.claude/skills/arch-api/references/domain.md +301 -0
- package/.claude/skills/arch-api/references/endpoints.md +184 -0
- package/.claude/skills/arch-api/references/review.md +228 -0
- package/.claude/skills/arch-api/references/security.md +151 -0
- package/.claude/skills/arch-app/SKILL.md +278 -0
- package/.claude/skills/arch-app/agents/openai.yaml +3 -0
- package/.claude/skills/arch-app/references/navigation-session.md +257 -0
- package/.claude/skills/arch-app/references/review.md +155 -0
- package/.claude/skills/arch-app/references/screens.md +214 -0
- package/.claude/skills/arch-app/references/services.md +301 -0
- package/.claude/skills/arch-app/references/ui-mobile.md +124 -0
- package/.claude/skills/arch-db/SKILL.md +181 -0
- package/.claude/skills/arch-db/agents/openai.yaml +3 -0
- package/.claude/skills/arch-db/references/indexes-queries.md +251 -0
- package/.claude/skills/arch-db/references/migrations.md +191 -0
- package/.claude/skills/arch-db/references/modeling.md +214 -0
- package/.claude/skills/arch-db/references/mysql.md +262 -0
- package/.claude/skills/arch-db/references/pooling-ops.md +112 -0
- package/.claude/skills/arch-db/references/review.md +143 -0
- package/.claude/skills/arch-db/references/transactions-locks.md +141 -0
- package/.claude/skills/arch-web/SKILL.md +307 -0
- package/.claude/skills/arch-web/agents/openai.yaml +3 -0
- package/.claude/skills/arch-web/references/auth-session-env.md +165 -0
- package/.claude/skills/arch-web/references/blocks.md +198 -0
- package/.claude/skills/arch-web/references/cache.md +124 -0
- package/.claude/skills/arch-web/references/review.md +142 -0
- package/.claude/skills/arch-web/references/services.md +297 -0
- package/.claude/skills/arch-web/references/tests.md +159 -0
- package/.claude/skills/arch-web/references/ui-forms.md +143 -0
- package/.claude/skills/break-ui/CATALOG.md +135 -0
- package/.claude/skills/break-ui/SKILL.md +176 -0
- package/.claude/skills/break-ui/agents/openai.yaml +5 -0
- package/.claude/skills/brief/SKILL.md +91 -0
- package/.claude/skills/brief/agents/openai.yaml +3 -0
- package/.claude/skills/diagnosing-bugs/SKILL.md +138 -0
- package/.claude/skills/diagnosing-bugs/agents/openai.yaml +3 -0
- package/.claude/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +44 -0
- package/.claude/skills/emil-design-eng/SKILL.md +675 -0
- package/.claude/skills/emil-design-eng/agents/openai.yaml +5 -0
- package/.claude/skills/find-animation-opportunities/SKILL.md +141 -0
- package/.claude/skills/find-animation-opportunities/agents/openai.yaml +5 -0
- package/.claude/skills/graphify/.graphify_version +1 -0
- package/.claude/skills/graphify/SKILL.md +742 -0
- package/.claude/skills/graphify/agents/openai.yaml +3 -0
- package/.claude/skills/graphify/references/add-watch.md +56 -0
- package/.claude/skills/graphify/references/exports.md +91 -0
- package/.claude/skills/graphify/references/extraction-spec.md +70 -0
- package/.claude/skills/graphify/references/github-and-merge.md +46 -0
- package/.claude/skills/graphify/references/hooks.md +33 -0
- package/.claude/skills/graphify/references/query.md +317 -0
- package/.claude/skills/graphify/references/transcribe.md +52 -0
- package/.claude/skills/graphify/references/update.md +221 -0
- package/.claude/skills/grill-me/SKILL.md +7 -0
- package/.claude/skills/grill-me/agents/openai.yaml +5 -0
- package/.claude/skills/grill-with-docs/SKILL.md +64 -0
- package/.claude/skills/grill-with-docs/agents/openai.yaml +5 -0
- package/.claude/skills/grilling/SKILL.md +30 -0
- package/.claude/skills/grilling/agents/openai.yaml +3 -0
- package/.claude/skills/handoff/SKILL.md +28 -0
- package/.claude/skills/handoff/agents/openai.yaml +5 -0
- package/.claude/skills/impeccable/SKILL.md +89 -0
- package/.claude/skills/impeccable/agents/openai.yaml +5 -0
- package/.claude/skills/impeccable/reference/adapt.md +318 -0
- package/.claude/skills/impeccable/reference/adapt.native.md +58 -0
- package/.claude/skills/impeccable/reference/android.md +46 -0
- package/.claude/skills/impeccable/reference/animate.md +89 -0
- package/.claude/skills/impeccable/reference/audit.md +137 -0
- package/.claude/skills/impeccable/reference/audit.native.md +139 -0
- package/.claude/skills/impeccable/reference/bolder.md +33 -0
- package/.claude/skills/impeccable/reference/clarify.md +94 -0
- package/.claude/skills/impeccable/reference/colorize.md +86 -0
- package/.claude/skills/impeccable/reference/component-review.md +63 -0
- package/.claude/skills/impeccable/reference/craft-floor.md +44 -0
- package/.claude/skills/impeccable/reference/craft.md +5 -0
- package/.claude/skills/impeccable/reference/critique.md +809 -0
- package/.claude/skills/impeccable/reference/degraded/asset-producer.md +42 -0
- package/.claude/skills/impeccable/reference/degraded/documenter.md +24 -0
- package/.claude/skills/impeccable/reference/degraded/finish-reviewer.md +38 -0
- package/.claude/skills/impeccable/reference/degraded/manual-edit-applier.md +92 -0
- package/.claude/skills/impeccable/reference/delight.md +70 -0
- package/.claude/skills/impeccable/reference/distill.md +111 -0
- package/.claude/skills/impeccable/reference/doctor.md +54 -0
- package/.claude/skills/impeccable/reference/document.md +416 -0
- package/.claude/skills/impeccable/reference/extract.md +69 -0
- package/.claude/skills/impeccable/reference/generate.md +101 -0
- package/.claude/skills/impeccable/reference/harden.md +345 -0
- package/.claude/skills/impeccable/reference/hooks.md +113 -0
- package/.claude/skills/impeccable/reference/init.md +131 -0
- package/.claude/skills/impeccable/reference/ios.md +51 -0
- package/.claude/skills/impeccable/reference/layout.md +84 -0
- package/.claude/skills/impeccable/reference/live-setup.md +104 -0
- package/.claude/skills/impeccable/reference/live.md +325 -0
- package/.claude/skills/impeccable/reference/mode-operate.md +21 -0
- package/.claude/skills/impeccable/reference/mode-persuade.md +19 -0
- package/.claude/skills/impeccable/reference/mode-read.md +21 -0
- package/.claude/skills/impeccable/reference/new-work.md +154 -0
- package/.claude/skills/impeccable/reference/onboard.md +234 -0
- package/.claude/skills/impeccable/reference/operate.md +61 -0
- package/.claude/skills/impeccable/reference/optimize.md +258 -0
- package/.claude/skills/impeccable/reference/overdrive.md +127 -0
- package/.claude/skills/impeccable/reference/polish.md +105 -0
- package/.claude/skills/impeccable/reference/quieter.md +99 -0
- package/.claude/skills/impeccable/reference/region-map.md +26 -0
- package/.claude/skills/impeccable/reference/routing.md +24 -0
- package/.claude/skills/impeccable/reference/shape.md +59 -0
- package/.claude/skills/impeccable/reference/typeset.md +80 -0
- package/.claude/skills/impeccable/reference/visualize.md +47 -0
- package/.claude/skills/impeccable/scripts/VERSION +1 -0
- package/.claude/skills/impeccable/scripts/command-metadata.json +98 -0
- package/.claude/skills/impeccable/scripts/data/font-index-failures.json +121 -0
- package/.claude/skills/impeccable/scripts/data/font-index.json +1 -0
- package/.claude/skills/impeccable/scripts/impeccable +206 -0
- package/.claude/skills/impeccable/scripts/impeccable.cmd +214 -0
- package/.claude/skills/impeccable/scripts/live-browser-dom.js +281 -0
- package/.claude/skills/impeccable/scripts/live-browser-ignores.js +242 -0
- package/.claude/skills/impeccable/scripts/live-browser-session.js +148 -0
- package/.claude/skills/impeccable/scripts/live-browser.js +13532 -0
- package/.claude/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
- package/.claude/skills/improve-animations/AUDIT.md +115 -0
- package/.claude/skills/improve-animations/PLAN-TEMPLATE.md +73 -0
- package/.claude/skills/improve-animations/SKILL.md +110 -0
- package/.claude/skills/improve-animations/agents/openai.yaml +5 -0
- package/.claude/skills/mobile-native/SKILL.md +311 -0
- package/.claude/skills/mobile-native/agents/openai.yaml +3 -0
- package/.claude/skills/orchestrate/SKILL.md +181 -0
- package/.claude/skills/orchestrate/agents/openai.yaml +3 -0
- package/.claude/skills/pick-ui-library/SKILL.md +85 -0
- package/.claude/skills/pick-ui-library/agents/openai.yaml +5 -0
- package/.claude/skills/ponytail/SKILL.md +52 -0
- package/.claude/skills/ponytail/agents/openai.yaml +3 -0
- package/.claude/skills/ponytail-audit/SKILL.md +103 -0
- package/.claude/skills/ponytail-audit/agents/openai.yaml +3 -0
- package/.claude/skills/ponytail-debt/SKILL.md +44 -0
- package/.claude/skills/ponytail-debt/agents/openai.yaml +3 -0
- package/.claude/skills/ponytail-review/SKILL.md +101 -0
- package/.claude/skills/ponytail-review/agents/openai.yaml +3 -0
- package/.claude/skills/postgres-best-practices/SKILL.md +42 -0
- package/.claude/skills/postgres-best-practices/agents/openai.yaml +3 -0
- package/.claude/skills/postgres-best-practices/references/backup-restore.md +372 -0
- package/.claude/skills/postgres-best-practices/references/bulk-loading.md +315 -0
- package/.claude/skills/postgres-best-practices/references/connection-pooling.md +310 -0
- package/.claude/skills/postgres-best-practices/references/hot-standby.md +221 -0
- package/.claude/skills/postgres-best-practices/references/indexing.md +318 -0
- package/.claude/skills/postgres-best-practices/references/logical-replication.md +610 -0
- package/.claude/skills/postgres-best-practices/references/major-version-upgrades.md +334 -0
- package/.claude/skills/postgres-best-practices/references/performance-diagnostics.md +553 -0
- package/.claude/skills/postgres-best-practices/references/query-optimization.md +294 -0
- package/.claude/skills/postgres-best-practices/references/query-patterns.md +566 -0
- package/.claude/skills/postgres-best-practices/references/schema-design.md +362 -0
- package/.claude/skills/postgres-best-practices/references/security-roles.md +489 -0
- package/.claude/skills/postgres-best-practices/references/transaction-isolation.md +344 -0
- package/.claude/skills/project-docs/SKILL.md +330 -0
- package/.claude/skills/project-docs/agents/openai.yaml +3 -0
- package/.claude/skills/prototype/PICKER.md +197 -0
- package/.claude/skills/prototype/SKILL.md +98 -0
- package/.claude/skills/prototype/agents/openai.yaml +5 -0
- package/.claude/skills/retro/SKILL.md +43 -0
- package/.claude/skills/retro/agents/openai.yaml +5 -0
- package/.claude/skills/review/SKILL.md +74 -0
- package/.claude/skills/review/agents/openai.yaml +3 -0
- package/.claude/skills/review/references/smells.md +23 -0
- package/.claude/skills/review-animations/SKILL.md +120 -0
- package/.claude/skills/review-animations/STANDARDS.md +187 -0
- package/.claude/skills/review-animations/agents/openai.yaml +5 -0
- package/.claude/skills/tdd/SKILL.md +38 -0
- package/.claude/skills/tdd/agents/openai.yaml +3 -0
- package/.claude/skills/tdd/mocking.md +59 -0
- package/.claude/skills/tdd/tests.md +77 -0
- package/.claude/skills/triage/SKILL.md +58 -0
- package/.claude/skills/triage/agents/openai.yaml +3 -0
- package/.claude/skills/ui-ux-pro-max/SKILL.md +378 -0
- package/.claude/skills/ui-ux-pro-max/agents/openai.yaml +5 -0
- package/.claude/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/.claude/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/.claude/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/.claude/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/.claude/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/.claude/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.claude/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/.claude/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/.claude/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/.claude/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.claude/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/.claude/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/.claude/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/.claude/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/.claude/skills/writing-for-agents/SKILL-MECHANICS.md +22 -0
- package/.claude/skills/writing-for-agents/SKILL.md +81 -0
- package/.claude/skills/writing-for-agents/agents/openai.yaml +3 -0
- package/.worktreeinclude +3 -0
- package/AGENTS.md +44 -0
- package/README.md +14 -2
- package/VERSION +1 -0
- package/bin/agents.mjs +45 -0
- package/docs/adr/README.md +31 -0
- package/docs/brief-template.md +3 -0
- package/docs/plans/README.md +73 -0
- package/package.json +46 -4
- package/scripts/bootstrap.mjs +188 -0
- package/scripts/check-catalog.mjs +43 -0
- package/scripts/skills-update.mjs +51 -0
- package/skills-lock.json +269 -0
- package/templates/CLAUDE.project.md +41 -0
|
@@ -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,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ponytail-review
|
|
3
|
+
description: >
|
|
4
|
+
Quality review of a change: is the logic right, is it safe, does it hold
|
|
5
|
+
under real load, is risky code tested, is it fast enough, and is every line
|
|
6
|
+
needed. Reads the connected code, not only the diff. Each finding is
|
|
7
|
+
explained in plain English. Use for "review this", "code review", "review
|
|
8
|
+
the last commit", "review my PR", "is this over-engineered", /ponytail-review.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Review a change like the senior developer who will be paged when it breaks.
|
|
12
|
+
Order of importance: correct, safe, holds under load, tested, fast, lean.
|
|
13
|
+
Lean still matters: every extra line must be read, tested and fixed later.
|
|
14
|
+
This is a report the user asked for, so give it in full.
|
|
15
|
+
|
|
16
|
+
## 1. Understand first
|
|
17
|
+
|
|
18
|
+
- Review what the user names: uncommitted or staged changes, a branch, a PR
|
|
19
|
+
link, or files. Nothing named: the uncommitted changes, or the last commit
|
|
20
|
+
if there are none.
|
|
21
|
+
- Read the diff, then the code it touches: callers of every changed function,
|
|
22
|
+
the functions it calls, the tests, the README.
|
|
23
|
+
- Trace the real flow: where data comes in, what is stored, what goes out.
|
|
24
|
+
- A change can break code it does not touch. When a signature, return value
|
|
25
|
+
or behavior changes, grep every caller.
|
|
26
|
+
- Find the expected load in the repo (README, deploy config): one person
|
|
27
|
+
running a script, or many users and processes at once. Judge scale against
|
|
28
|
+
that, and say which load you assumed.
|
|
29
|
+
|
|
30
|
+
## 2. Look for
|
|
31
|
+
|
|
32
|
+
1. **Bug:** wrong result, crash, missed edge case (empty, zero, last item,
|
|
33
|
+
rounding, time zones), a caller broken by the change, a fix applied in one
|
|
34
|
+
caller while the shared function stays broken.
|
|
35
|
+
2. **Risk:** security holes (injection, weak randomness, secrets, missing
|
|
36
|
+
checks on input from users), data loss (errors swallowed, writes in the
|
|
37
|
+
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 new logic (a branch, a parser, money, security,
|
|
42
|
+
data writes, a bug fix) with no test that fails when it breaks. One good
|
|
43
|
+
test, not coverage.
|
|
44
|
+
5. **Speed:** big slowdowns are problems. Small wins (work repeated in a hot
|
|
45
|
+
loop) are suggestions; some software counts every millisecond.
|
|
46
|
+
6. **Lean:** code that should not exist or should be smaller.
|
|
47
|
+
- delete: dead code, unused options, speculative features
|
|
48
|
+
- reuse: the repo already has this helper (name the path)
|
|
49
|
+
- stdlib / native: the standard library or platform already does it; a
|
|
50
|
+
new dependency for a few lines
|
|
51
|
+
- yagni: abstraction with one implementation, config nobody sets
|
|
52
|
+
- merge: near-copies that must change together
|
|
53
|
+
- split: one function doing several unrelated jobs, so it is hard to read
|
|
54
|
+
or test. Split by job, never by line count, and never into helpers that
|
|
55
|
+
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
|
+
- Re-read the lines and confirm: the caller exists, the value can really be
|
|
62
|
+
empty, the code really is unused.
|
|
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 change does:` in two or three sentences.
|
|
75
|
+
|
|
76
|
+
Then the findings in three groups, skip empty groups:
|
|
77
|
+
- **Must fix:** bug, security, data loss, breaks at the expected load.
|
|
78
|
+
- **Should fix:** risky code without a test, real slowness, duplication, a
|
|
79
|
+
function that mixes jobs, code that should not exist.
|
|
80
|
+
- **Nice to have:** small speed-ups, shorter forms.
|
|
81
|
+
|
|
82
|
+
Number findings across all groups, so the user can say "fix 2 and 5".
|
|
83
|
+
Every finding has all four parts, each one or two short sentences:
|
|
84
|
+
|
|
85
|
+
2. **Orders land on the wrong day** (`billing/close_day.py:L40-52`)
|
|
86
|
+
- **What this is:** At midnight this job closes the day and bills all orders of that day.
|
|
87
|
+
- **Problem:** It takes "today" from the server clock, which runs in UTC. An order placed
|
|
88
|
+
at 00:30 in Berlin is billed on the day before.
|
|
89
|
+
- **Fix:** Compute the day once in the shop's time zone:
|
|
90
|
+
`datetime.now(ZoneInfo("Europe/Berlin")).date()`. One line, nothing else changes.
|
|
91
|
+
- **If we skip it:** Late orders show the wrong date, and accounting fixes them by hand.
|
|
92
|
+
|
|
93
|
+
End with:
|
|
94
|
+
- `Verdict: Ship.` or `Verdict: fix 1 and 3 first.`
|
|
95
|
+
- `Lean: -<N> lines possible.` when lean findings exist.
|
|
96
|
+
- `Not checked:` one line, if something mattered and you could not check it.
|
|
97
|
+
|
|
98
|
+
Nothing found: `What this change does:`, then `Looks good. Ship.` and one line
|
|
99
|
+
on what you checked.
|
|
100
|
+
|
|
101
|
+
Lists findings, changes no code.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: postgres-best-practices
|
|
3
|
+
description: Best practices and guidelines for working with Postgres. Covers schema design, indexing strategies, query optimization, migrations, and common pitfalls. Use when writing SQL, designing database schemas, optimizing queries, or setting up a Postgres database.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Postgres Best Practices
|
|
7
|
+
|
|
8
|
+
Guidelines and best practices for working with Postgres, covering schema design, indexing, query optimization, and common pitfalls.
|
|
9
|
+
|
|
10
|
+
## Supported Versions
|
|
11
|
+
|
|
12
|
+
This skill covers PostgreSQL 14 through 18. Version-specific features are tagged (e.g., `[PG15+]`, `[PG18+]`); environment-dependent examples identify required privileges, extensions, or multi-node setup.
|
|
13
|
+
|
|
14
|
+
PostgreSQL provides 5 years of support per major version. Always run the latest minor release.
|
|
15
|
+
|
|
16
|
+
| Version | Initial Release | End of Life |
|
|
17
|
+
| ------- | ------------------ | ------------------ |
|
|
18
|
+
| 18 | September 2025 | November 2030 |
|
|
19
|
+
| 17 | September 2024 | November 2029 |
|
|
20
|
+
| 16 | September 2023 | November 2028 |
|
|
21
|
+
| 15 | October 2022 | November 2027 |
|
|
22
|
+
| 14 | September 2021 | November 2026 |
|
|
23
|
+
|
|
24
|
+
Source: [postgresql.org/support/versioning](https://www.postgresql.org/support/versioning/)
|
|
25
|
+
|
|
26
|
+
## References
|
|
27
|
+
|
|
28
|
+
| Area | Resource | When to Use |
|
|
29
|
+
| ----------------------- | --------------------------------------- | ------------------------------------------------------------------ |
|
|
30
|
+
| Schema Design | `references/schema-design.md` | Designing tables, choosing data types, normalizing, partitioning |
|
|
31
|
+
| Indexing | `references/indexing.md` | Choosing index types, composite indexes, partial/covering indexes |
|
|
32
|
+
| Query Optimization | `references/query-optimization.md` | Reading EXPLAIN ANALYZE, fixing bottlenecks, planner tuning |
|
|
33
|
+
| Query Patterns | `references/query-patterns.md` | CTEs, window functions, lateral joins, UPSERT, JSONB, anti-patterns|
|
|
34
|
+
| Performance Diagnostics | `references/performance-diagnostics.md` | pg_stat views, lock analysis, VACUUM, connection management |
|
|
35
|
+
| Logical Replication | `references/logical-replication.md` | Pub/sub replication, live migrations, CDC |
|
|
36
|
+
| Hot Standby | `references/hot-standby.md` | Streaming replication, read replicas, failover |
|
|
37
|
+
| Transaction Isolation | `references/transaction-isolation.md` | Isolation levels, lost updates, serialization failures, retry logic |
|
|
38
|
+
| Backup & Restore | `references/backup-restore.md` | pg_dump/pg_restore, pg_basebackup, PITR, recovery |
|
|
39
|
+
| Security & Roles | `references/security-roles.md` | Privileges, RLS, pg_hba.conf, authentication, SSL |
|
|
40
|
+
| Bulk Data Loading | `references/bulk-loading.md` | COPY patterns, ETL staging, optimizing large loads, batch ops |
|
|
41
|
+
| Connection Pooling | `references/connection-pooling.md` | PgBouncer config, pool modes, prepared statements, sizing |
|
|
42
|
+
| Major Version Upgrades | `references/major-version-upgrades.md` | pg_upgrade, logical replication migration, pre/post checklists |
|