dj-sc-digger 1.1.0__tar.gz
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.
- dj_sc_digger-1.1.0/.agents/rules/ponytail.md +30 -0
- dj_sc_digger-1.1.0/.agents/skills/ponytail/SKILL.md +120 -0
- dj_sc_digger-1.1.0/.agents/skills/ponytail-audit/SKILL.md +41 -0
- dj_sc_digger-1.1.0/.agents/skills/ponytail-debt/SKILL.md +44 -0
- dj_sc_digger-1.1.0/.agents/skills/ponytail-gain/SKILL.md +50 -0
- dj_sc_digger-1.1.0/.agents/skills/ponytail-help/SKILL.md +71 -0
- dj_sc_digger-1.1.0/.agents/skills/ponytail-review/SKILL.md +57 -0
- dj_sc_digger-1.1.0/.gitattributes +2 -0
- dj_sc_digger-1.1.0/.github/workflows/ci.yml +76 -0
- dj_sc_digger-1.1.0/.github/workflows/live.yml +31 -0
- dj_sc_digger-1.1.0/.github/workflows/publish.yml +85 -0
- dj_sc_digger-1.1.0/.gitignore +20 -0
- dj_sc_digger-1.1.0/.graphifyignore +10 -0
- dj_sc_digger-1.1.0/AGENTS.md +83 -0
- dj_sc_digger-1.1.0/CHANGELOG.md +791 -0
- dj_sc_digger-1.1.0/LICENSE +201 -0
- dj_sc_digger-1.1.0/PKG-INFO +825 -0
- dj_sc_digger-1.1.0/PROJECT-SPECIFICATION.md +1439 -0
- dj_sc_digger-1.1.0/README.md +585 -0
- dj_sc_digger-1.1.0/dj_digger/__init__.py +11 -0
- dj_sc_digger-1.1.0/dj_digger/__main__.py +4 -0
- dj_sc_digger-1.1.0/dj_digger/analysis.py +166 -0
- dj_sc_digger-1.1.0/dj_digger/analysis_report.py +72 -0
- dj_sc_digger-1.1.0/dj_digger/auth.py +300 -0
- dj_sc_digger-1.1.0/dj_digger/automation_errors.py +10 -0
- dj_sc_digger-1.1.0/dj_digger/beatport_playlist.py +199 -0
- dj_sc_digger-1.1.0/dj_digger/browser.py +219 -0
- dj_sc_digger-1.1.0/dj_digger/browser_session.py +288 -0
- dj_sc_digger-1.1.0/dj_digger/cart_models.py +273 -0
- dj_sc_digger-1.1.0/dj_digger/cli.py +544 -0
- dj_sc_digger-1.1.0/dj_digger/clipboard.py +46 -0
- dj_sc_digger-1.1.0/dj_digger/config.py +154 -0
- dj_sc_digger-1.1.0/dj_digger/crate_models.py +96 -0
- dj_sc_digger-1.1.0/dj_digger/db.py +542 -0
- dj_sc_digger-1.1.0/dj_digger/decks.py +85 -0
- dj_sc_digger-1.1.0/dj_digger/diagnostics.py +31 -0
- dj_sc_digger-1.1.0/dj_digger/export.py +473 -0
- dj_sc_digger-1.1.0/dj_digger/files.py +225 -0
- dj_sc_digger-1.1.0/dj_digger/gate_models.py +111 -0
- dj_sc_digger-1.1.0/dj_digger/gates/__init__.py +1 -0
- dj_sc_digger-1.1.0/dj_digger/gates/browser.py +783 -0
- dj_sc_digger-1.1.0/dj_digger/gates/hubs.py +203 -0
- dj_sc_digger-1.1.0/dj_digger/gates/providers.py +845 -0
- dj_sc_digger-1.1.0/dj_digger/hls_audio.py +180 -0
- dj_sc_digger-1.1.0/dj_digger/html_fallback.py +263 -0
- dj_sc_digger-1.1.0/dj_digger/http.py +126 -0
- dj_sc_digger-1.1.0/dj_digger/instance.py +29 -0
- dj_sc_digger-1.1.0/dj_digger/library.py +69 -0
- dj_sc_digger-1.1.0/dj_digger/links.py +501 -0
- dj_sc_digger-1.1.0/dj_digger/local_audio.py +173 -0
- dj_sc_digger-1.1.0/dj_digger/logging_setup.py +127 -0
- dj_sc_digger-1.1.0/dj_digger/media.py +230 -0
- dj_sc_digger-1.1.0/dj_digger/media_processes.py +45 -0
- dj_sc_digger-1.1.0/dj_digger/models.py +206 -0
- dj_sc_digger-1.1.0/dj_digger/paths.py +41 -0
- dj_sc_digger-1.1.0/dj_digger/player.py +623 -0
- dj_sc_digger-1.1.0/dj_digger/private_json.py +45 -0
- dj_sc_digger-1.1.0/dj_digger/py.typed +0 -0
- dj_sc_digger-1.1.0/dj_digger/scanner.py +246 -0
- dj_sc_digger-1.1.0/dj_digger/schema.py +123 -0
- dj_sc_digger-1.1.0/dj_digger/services/__init__.py +1 -0
- dj_sc_digger-1.1.0/dj_digger/services/accounts.py +67 -0
- dj_sc_digger-1.1.0/dj_digger/services/collection.py +339 -0
- dj_sc_digger-1.1.0/dj_digger/services/downloads.py +502 -0
- dj_sc_digger-1.1.0/dj_digger/services/library.py +96 -0
- dj_sc_digger-1.1.0/dj_digger/services/local_library.py +146 -0
- dj_sc_digger-1.1.0/dj_digger/services/opening.py +24 -0
- dj_sc_digger-1.1.0/dj_digger/services/operations.py +104 -0
- dj_sc_digger-1.1.0/dj_digger/services/playback.py +124 -0
- dj_sc_digger-1.1.0/dj_digger/services/profile_import.py +182 -0
- dj_sc_digger-1.1.0/dj_digger/services/purchases.py +1037 -0
- dj_sc_digger-1.1.0/dj_digger/services/runtime.py +203 -0
- dj_sc_digger-1.1.0/dj_digger/soundcloud.py +598 -0
- dj_sc_digger-1.1.0/dj_digger/soundcloud_errors.py +17 -0
- dj_sc_digger-1.1.0/dj_digger/state.py +161 -0
- dj_sc_digger-1.1.0/dj_digger/store_match.py +293 -0
- dj_sc_digger-1.1.0/dj_digger/store_parse.py +230 -0
- dj_sc_digger-1.1.0/dj_digger/store_urls.py +88 -0
- dj_sc_digger-1.1.0/dj_digger/stores/__init__.py +1 -0
- dj_sc_digger-1.1.0/dj_digger/stores/bandcamp.py +1000 -0
- dj_sc_digger-1.1.0/dj_digger/tui/__init__.py +150 -0
- dj_sc_digger-1.1.0/dj_digger/tui/app.py +972 -0
- dj_sc_digger-1.1.0/dj_digger/tui/audio.py +404 -0
- dj_sc_digger-1.1.0/dj_digger/tui/crates.py +288 -0
- dj_sc_digger-1.1.0/dj_digger/tui/diagnostic_screens.py +54 -0
- dj_sc_digger-1.1.0/dj_digger/tui/digging.py +85 -0
- dj_sc_digger-1.1.0/dj_digger/tui/downloads.py +569 -0
- dj_sc_digger-1.1.0/dj_digger/tui/filters.py +227 -0
- dj_sc_digger-1.1.0/dj_digger/tui/jobs.py +42 -0
- dj_sc_digger-1.1.0/dj_digger/tui/keymap.py +200 -0
- dj_sc_digger-1.1.0/dj_digger/tui/library_scan.py +204 -0
- dj_sc_digger-1.1.0/dj_digger/tui/local.py +400 -0
- dj_sc_digger-1.1.0/dj_digger/tui/local_screens.py +199 -0
- dj_sc_digger-1.1.0/dj_digger/tui/opening.py +692 -0
- dj_sc_digger-1.1.0/dj_digger/tui/playback.py +457 -0
- dj_sc_digger-1.1.0/dj_digger/tui/playlist.py +41 -0
- dj_sc_digger-1.1.0/dj_digger/tui/presentation.py +84 -0
- dj_sc_digger-1.1.0/dj_digger/tui/render.py +537 -0
- dj_sc_digger-1.1.0/dj_digger/tui/rows.py +34 -0
- dj_sc_digger-1.1.0/dj_digger/tui/screens.py +962 -0
- dj_sc_digger-1.1.0/dj_digger/tui/theme.py +78 -0
- dj_sc_digger-1.1.0/dj_digger/tui/widgets.py +432 -0
- dj_sc_digger-1.1.0/dj_digger/wav.py +102 -0
- dj_sc_digger-1.1.0/docs/architecture.md +116 -0
- dj_sc_digger-1.1.0/docs/graph-notes.md +75 -0
- dj_sc_digger-1.1.0/docs/implementation/code-cleanup-2026-09-06.md +48 -0
- dj_sc_digger-1.1.0/docs/implementation/deck-sources.md +35 -0
- dj_sc_digger-1.1.0/docs/implementation/dj-digger-1.1.md +53 -0
- dj_sc_digger-1.1.0/docs/implementation/release-1.1.md +48 -0
- dj_sc_digger-1.1.0/docs/refactor/progress.md +32 -0
- dj_sc_digger-1.1.0/docs/refactor/review.md +48 -0
- dj_sc_digger-1.1.0/docs/refactor/verification.md +89 -0
- dj_sc_digger-1.1.0/docs/superpowers/plans/2026-08-24-download-scroll-stability.md +211 -0
- dj_sc_digger-1.1.0/docs/superpowers/plans/2026-08-24-reliable-gate-downloads.md +1557 -0
- dj_sc_digger-1.1.0/docs/superpowers/plans/2026-09-hypeddit-unlock-check.md +41 -0
- dj_sc_digger-1.1.0/docs/superpowers/specs/2026-07-30-playback-buffer-and-motion-design.md +147 -0
- dj_sc_digger-1.1.0/docs/superpowers/specs/2026-08-24-download-gates-and-error-banner-design.md +158 -0
- dj_sc_digger-1.1.0/docs/superpowers/specs/2026-08-24-download-scroll-stability-design.md +76 -0
- dj_sc_digger-1.1.0/pyproject.toml +75 -0
- dj_sc_digger-1.1.0/scripts/benchmark_analysis.py +138 -0
- dj_sc_digger-1.1.0/scripts/benchmark_playlist.py +93 -0
- dj_sc_digger-1.1.0/scripts/evaluate_analysis.py +55 -0
- dj_sc_digger-1.1.0/scripts/package_smoke.py +43 -0
- dj_sc_digger-1.1.0/scripts/spec_section_map.py +246 -0
- dj_sc_digger-1.1.0/scripts/tool_migration_smoke.py +51 -0
- dj_sc_digger-1.1.0/tests/conftest.py +150 -0
- dj_sc_digger-1.1.0/tests/fixtures/bandcamp/README.md +40 -0
- dj_sc_digger-1.1.0/tests/fixtures/bandcamp/product_url.txt +1 -0
- dj_sc_digger-1.1.0/tests/fixtures/bandcamp/sidecart_after_add.html +3785 -0
- dj_sc_digger-1.1.0/tests/fixtures/bandcamp/track_page.html +3762 -0
- dj_sc_digger-1.1.0/tests/fixtures/bandcamp/track_page_buy_open.html +4115 -0
- dj_sc_digger-1.1.0/tests/fixtures/hypeddit_gate_hot_or_not.html +25 -0
- dj_sc_digger-1.1.0/tests/fixtures/hypeddit_hub_empty.html +7 -0
- dj_sc_digger-1.1.0/tests/fixtures/hypeddit_hub_shops.html +9 -0
- dj_sc_digger-1.1.0/tests/fixtures/hypeddit_makeba.html +14 -0
- dj_sc_digger-1.1.0/tests/fixtures/hypeddit_makeba_download.json +4 -0
- dj_sc_digger-1.1.0/tests/fixtures/hypeddit_smartlink_captcha_asset.html +12 -0
- dj_sc_digger-1.1.0/tests/fixtures/playlist_resolve.json +249 -0
- dj_sc_digger-1.1.0/tests/fixtures/tracks.json +62 -0
- dj_sc_digger-1.1.0/tests/helpers.py +41 -0
- dj_sc_digger-1.1.0/tests/test_analysis.py +87 -0
- dj_sc_digger-1.1.0/tests/test_analysis_benchmark.py +18 -0
- dj_sc_digger-1.1.0/tests/test_architecture.py +51 -0
- dj_sc_digger-1.1.0/tests/test_auth.py +270 -0
- dj_sc_digger-1.1.0/tests/test_bandcamp_dom.py +151 -0
- dj_sc_digger-1.1.0/tests/test_browser.py +246 -0
- dj_sc_digger-1.1.0/tests/test_browser_session.py +341 -0
- dj_sc_digger-1.1.0/tests/test_cart.py +2011 -0
- dj_sc_digger-1.1.0/tests/test_cli.py +468 -0
- dj_sc_digger-1.1.0/tests/test_config.py +139 -0
- dj_sc_digger-1.1.0/tests/test_db.py +224 -0
- dj_sc_digger-1.1.0/tests/test_diagnostics.py +138 -0
- dj_sc_digger-1.1.0/tests/test_dig.py +410 -0
- dj_sc_digger-1.1.0/tests/test_download_workflow.py +169 -0
- dj_sc_digger-1.1.0/tests/test_file_results.py +189 -0
- dj_sc_digger-1.1.0/tests/test_gates.py +1566 -0
- dj_sc_digger-1.1.0/tests/test_hls_audio.py +145 -0
- dj_sc_digger-1.1.0/tests/test_html_fallback.py +131 -0
- dj_sc_digger-1.1.0/tests/test_hypeddit_live.py +145 -0
- dj_sc_digger-1.1.0/tests/test_library.py +194 -0
- dj_sc_digger-1.1.0/tests/test_links.py +501 -0
- dj_sc_digger-1.1.0/tests/test_live.py +179 -0
- dj_sc_digger-1.1.0/tests/test_local_audio.py +40 -0
- dj_sc_digger-1.1.0/tests/test_local_media.py +291 -0
- dj_sc_digger-1.1.0/tests/test_operations.py +121 -0
- dj_sc_digger-1.1.0/tests/test_player.py +802 -0
- dj_sc_digger-1.1.0/tests/test_profile_import.py +115 -0
- dj_sc_digger-1.1.0/tests/test_scanner.py +243 -0
- dj_sc_digger-1.1.0/tests/test_shop_live.py +175 -0
- dj_sc_digger-1.1.0/tests/test_shop_mutate.py +66 -0
- dj_sc_digger-1.1.0/tests/test_soundcloud.py +686 -0
- dj_sc_digger-1.1.0/tests/test_state.py +131 -0
- dj_sc_digger-1.1.0/tests/test_tui.py +5636 -0
- dj_sc_digger-1.1.0/tests/test_tui_lifecycle.py +88 -0
- dj_sc_digger-1.1.0/uv.lock +1031 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Ponytail, lazy senior dev mode
|
|
2
|
+
|
|
3
|
+
You are a lazy senior developer. Lazy means efficient, not careless. The best code is the code never written.
|
|
4
|
+
|
|
5
|
+
Before writing any code, stop at the first rung that holds:
|
|
6
|
+
|
|
7
|
+
1. Does this need to be built at all? (YAGNI)
|
|
8
|
+
2. Does it already exist in this codebase? Reuse the helper, util, or pattern that's already here, don't re-write it.
|
|
9
|
+
3. Does the standard library already do this? Use it.
|
|
10
|
+
4. Does a native platform feature cover it? Use it.
|
|
11
|
+
5. Does an already-installed dependency solve it? Use it.
|
|
12
|
+
6. Can this be one line? Make it one line.
|
|
13
|
+
7. Only then: write the minimum code that works.
|
|
14
|
+
|
|
15
|
+
The ladder runs after you understand the problem, not instead of it: read the task and the code it touches, trace the real flow end to end, then climb.
|
|
16
|
+
|
|
17
|
+
Bug fix = root cause, not symptom: a report names a symptom. Grep every caller of the function you touch and fix the shared function once — one guard there is a smaller diff than one per caller, and patching only the path the ticket names leaves a sibling caller still broken.
|
|
18
|
+
|
|
19
|
+
Rules:
|
|
20
|
+
|
|
21
|
+
- No abstractions that weren't explicitly requested.
|
|
22
|
+
- No new dependency if it can be avoided.
|
|
23
|
+
- No boilerplate nobody asked for.
|
|
24
|
+
- Deletion over addition. Boring over clever. Fewest files possible.
|
|
25
|
+
- 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.
|
|
26
|
+
- Question complex requests: "Do you actually need X, or does Y cover it?"
|
|
27
|
+
- Pick the edge-case-correct option when two stdlib approaches are the same size, lazy means less code, not the flimsier algorithm.
|
|
28
|
+
- Mark deliberate simplifications that cut a real corner with a known ceiling (global lock, O(n²) scan, naive heuristic) with a `ponytail:` comment naming the ceiling and upgrade path.
|
|
29
|
+
|
|
30
|
+
Not lazy about: understanding the problem (read it fully and trace the real flow before picking a rung, a small diff you don't understand is just laziness dressed up as efficiency), input validation at trust boundaries, error handling that prevents data loss, security, accessibility, the calibration real hardware needs (the platform is never the spec ideal, a clock drifts, a sensor reads off), anything explicitly requested. Lazy code without its check is unfinished: non-trivial logic leaves ONE runnable check behind, the smallest thing that fails if the logic breaks (an assert-based demo/self-check or one small test file; no frameworks, no fixtures). Trivial one-liners need no test.
|
|
@@ -0,0 +1,120 @@
|
|
|
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 on ANY
|
|
9
|
+
coding task: writing, adding, refactoring, fixing, reviewing, or designing
|
|
10
|
+
code, and choosing libraries or dependencies. Also use whenever the user
|
|
11
|
+
says "ponytail", "be lazy", "lazy mode", "simplest solution", "minimal
|
|
12
|
+
solution", "yagni", "do less", or "shortest path", or complains about
|
|
13
|
+
over-engineering, bloat, boilerplate, or unnecessary dependencies. Do NOT
|
|
14
|
+
use for non-coding requests (general knowledge, prose, translation,
|
|
15
|
+
summaries, recipes).
|
|
16
|
+
argument-hint: "[lite|full|ultra]"
|
|
17
|
+
license: MIT
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Ponytail
|
|
21
|
+
|
|
22
|
+
You are a lazy senior developer. Lazy means efficient, not careless. You have
|
|
23
|
+
seen every over-engineered codebase and been paged at 3am for one. The best
|
|
24
|
+
code is the code never written.
|
|
25
|
+
|
|
26
|
+
## Persistence
|
|
27
|
+
|
|
28
|
+
ACTIVE EVERY RESPONSE. No drift back to over-building. Still active if
|
|
29
|
+
unsure. Off only: "stop ponytail" / "normal mode". Default: **full**.
|
|
30
|
+
Switch: `/ponytail lite|full|ultra`.
|
|
31
|
+
|
|
32
|
+
## The ladder
|
|
33
|
+
|
|
34
|
+
Stop at the first rung that holds:
|
|
35
|
+
|
|
36
|
+
1. **Does this need to exist at all?** Speculative need = skip it, say so in one line. (YAGNI)
|
|
37
|
+
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.
|
|
38
|
+
3. **Stdlib does it?** Use it.
|
|
39
|
+
4. **Native platform feature covers it?** `<input type="date">` over a picker lib, CSS over JS, DB constraint over app code.
|
|
40
|
+
5. **Already-installed dependency solves it?** Use it. Never add a new one for what a few lines can do.
|
|
41
|
+
6. **Can it be one line?** One line.
|
|
42
|
+
7. **Only then:** the minimum code that works.
|
|
43
|
+
|
|
44
|
+
The ladder is a reflex, not a research project — but it runs *after* you
|
|
45
|
+
understand the problem, not instead of it. Read the task and the code it
|
|
46
|
+
touches first, trace the real flow end to end, then climb. Two rungs work →
|
|
47
|
+
take the higher one and move on. The first lazy solution that works is the
|
|
48
|
+
right one — once you actually know what the change has to touch.
|
|
49
|
+
|
|
50
|
+
**Bug fix = root cause, not symptom.** A report names a symptom. Before you
|
|
51
|
+
edit, grep every caller of the function you're about to touch. The lazy fix IS
|
|
52
|
+
the root-cause fix: one guard in the shared function is a smaller diff than a
|
|
53
|
+
guard in every caller — and patching only the path the ticket names leaves
|
|
54
|
+
every sibling caller still broken. Fix it once, where all callers route through.
|
|
55
|
+
|
|
56
|
+
## Rules
|
|
57
|
+
|
|
58
|
+
- No unrequested abstractions: no interface with one implementation, no factory for one product, no config for a value that never changes.
|
|
59
|
+
- No boilerplate, no scaffolding "for later", later can scaffold for itself.
|
|
60
|
+
- Deletion over addition. Boring over clever, clever is what someone decodes at 3am.
|
|
61
|
+
- 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.
|
|
62
|
+
- 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.
|
|
63
|
+
- Two stdlib options, same size? Take the one that's correct on edge cases. Lazy means writing less code, not picking the flimsier algorithm.
|
|
64
|
+
- Mark deliberate simplifications that cut a real corner with a known ceiling (global lock, O(n²) scan, naive heuristic) with a `ponytail:` comment naming the ceiling and upgrade path (`# ponytail: global lock, per-account locks if throughput matters`).
|
|
65
|
+
|
|
66
|
+
## Output
|
|
67
|
+
|
|
68
|
+
Code first. Then at most three short lines: what was skipped, when to add it.
|
|
69
|
+
No essays, no feature tours, no design notes. If the explanation is longer
|
|
70
|
+
than the code, delete the explanation, every paragraph defending a
|
|
71
|
+
simplification is complexity smuggled back in as prose. Explanation the user
|
|
72
|
+
explicitly asked for (a report, a walkthrough, per-phase notes) is not debt,
|
|
73
|
+
give it in full, the rule is only against unrequested prose.
|
|
74
|
+
|
|
75
|
+
Pattern: `[code] → skipped: [X], add when [Y].`
|
|
76
|
+
|
|
77
|
+
## Intensity
|
|
78
|
+
|
|
79
|
+
| Level | What change |
|
|
80
|
+
|-------|------------|
|
|
81
|
+
| **lite** | Build what's asked, but name the lazier alternative in one line. User picks. |
|
|
82
|
+
| **full** | The ladder enforced. Stdlib and native first. Shortest diff, shortest explanation. Default. |
|
|
83
|
+
| **ultra** | YAGNI extremist. Deletion before addition. Ship the one-liner and challenge the rest of the requirement in the same breath. |
|
|
84
|
+
|
|
85
|
+
Example: "Add a cache for these API responses."
|
|
86
|
+
- lite: "Done, cache added. FYI: `functools.lru_cache` covers this in one line if you'd rather not own a cache class."
|
|
87
|
+
- full: "`@lru_cache(maxsize=1000)` on the fetch function. Skipped custom cache class, add when lru_cache measurably falls short."
|
|
88
|
+
- 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."
|
|
89
|
+
|
|
90
|
+
## When NOT to be lazy
|
|
91
|
+
|
|
92
|
+
Never simplify away: input validation at trust boundaries, error handling
|
|
93
|
+
that prevents data loss, security measures, accessibility basics, anything
|
|
94
|
+
explicitly requested. User insists on the full version → build it, no
|
|
95
|
+
re-arguing.
|
|
96
|
+
|
|
97
|
+
Never lazy about understanding the problem. The ladder shortens the
|
|
98
|
+
solution, never the reading. Trace the whole thing first — every file the
|
|
99
|
+
change touches, the actual flow — before picking a rung. Laziness that skips
|
|
100
|
+
comprehension to ship a small diff is the dangerous kind: it dresses up as
|
|
101
|
+
efficiency and ships a confident wrong fix. Read fully, then be lazy.
|
|
102
|
+
|
|
103
|
+
Hardware is never the ideal on paper: a real clock drifts, a real sensor
|
|
104
|
+
reads off, a PCA9685 runs a few percent fast. Leave the calibration knob, not
|
|
105
|
+
just less code, the physical world needs tuning a minimal model can't see.
|
|
106
|
+
|
|
107
|
+
Lazy code without its check is unfinished. Non-trivial logic (a branch, a
|
|
108
|
+
loop, a parser, a money/security path) leaves ONE runnable check behind, the
|
|
109
|
+
smallest thing that fails if the logic breaks: an `assert`-based
|
|
110
|
+
`demo()`/`__main__` self-check or one small `test_*.py`. No frameworks, no
|
|
111
|
+
fixtures, no per-function suites unless asked. Trivial one-liners need no
|
|
112
|
+
test, YAGNI applies to tests too.
|
|
113
|
+
|
|
114
|
+
## Boundaries
|
|
115
|
+
|
|
116
|
+
Ponytail governs what you build, not how you talk (pair with Caveman for
|
|
117
|
+
terse prose). "stop ponytail" / "normal mode": revert. Level persists until
|
|
118
|
+
changed or session end.
|
|
119
|
+
|
|
120
|
+
The shortest path to done is the right path.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ponytail-audit
|
|
3
|
+
description: >
|
|
4
|
+
Whole-repo audit for over-engineering. Like ponytail-review, but scans the
|
|
5
|
+
entire codebase instead of a diff: a ranked list of what to delete, simplify,
|
|
6
|
+
or replace with stdlib/native equivalents. Use when the user says "audit this
|
|
7
|
+
codebase", "audit for over-engineering", "what can I delete from this repo",
|
|
8
|
+
"find bloat", "ponytail-audit", or "/ponytail-audit". One-shot report, does
|
|
9
|
+
not apply fixes.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
ponytail-review, repo-wide. Scan the whole tree instead of a diff. Rank
|
|
13
|
+
findings biggest cut first.
|
|
14
|
+
|
|
15
|
+
## Tags
|
|
16
|
+
|
|
17
|
+
Same as ponytail-review:
|
|
18
|
+
|
|
19
|
+
- `delete:` dead code, unused flexibility, speculative feature. Replacement: nothing.
|
|
20
|
+
- `stdlib:` hand-rolled thing the standard library ships. Name the function.
|
|
21
|
+
- `native:` dependency or code doing what the platform already does. Name the feature.
|
|
22
|
+
- `yagni:` abstraction with one implementation, config nobody sets, layer with one caller.
|
|
23
|
+
- `shrink:` same logic, fewer lines. Show the shorter form.
|
|
24
|
+
|
|
25
|
+
## Hunt
|
|
26
|
+
|
|
27
|
+
Deps the stdlib or platform already ships, single-implementation interfaces,
|
|
28
|
+
factories with one product, wrappers that only delegate, files exporting one
|
|
29
|
+
thing, dead flags and config, hand-rolled stdlib.
|
|
30
|
+
|
|
31
|
+
## Output
|
|
32
|
+
|
|
33
|
+
One line per finding, ranked: `<tag> <what to cut>. <replacement>. [path]`.
|
|
34
|
+
End with `net: -<N> lines, -<M> deps possible.` Nothing to cut: `Lean already. Ship.`
|
|
35
|
+
|
|
36
|
+
## Boundaries
|
|
37
|
+
|
|
38
|
+
Scope: over-engineering and complexity only. Correctness bugs, security holes,
|
|
39
|
+
and performance are explicitly out of scope. Route them to a normal review
|
|
40
|
+
pass. Lists findings, applies nothing. One-shot.
|
|
41
|
+
"stop ponytail-audit" or "normal mode" to revert.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ponytail-debt
|
|
3
|
+
description: >
|
|
4
|
+
Harvest every `ponytail:` comment in the codebase into a debt ledger, so the
|
|
5
|
+
deliberate shortcuts and deferrals ponytail leaves behind get tracked instead
|
|
6
|
+
of rotting into "later means never". Use when the user says "ponytail debt",
|
|
7
|
+
"/ponytail-debt", "what did ponytail defer", "list the shortcuts", "ponytail
|
|
8
|
+
ledger", or "what did we mark to do later". One-shot report, changes nothing.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Every deliberate ponytail shortcut is marked with a `ponytail:` comment naming
|
|
12
|
+
its ceiling and upgrade path. This collects them into one ledger so a deferral
|
|
13
|
+
can't quietly become permanent.
|
|
14
|
+
|
|
15
|
+
## Scan
|
|
16
|
+
|
|
17
|
+
Grep the repo for comment markers, skipping `node_modules`, `.git`, and build
|
|
18
|
+
output:
|
|
19
|
+
|
|
20
|
+
`grep -rnE '(#|//) ?ponytail:' .` (add other comment prefixes if your stack uses them)
|
|
21
|
+
|
|
22
|
+
Each hit is one ledger row. The comment prefix keeps prose that merely mentions
|
|
23
|
+
the convention out of the ledger.
|
|
24
|
+
|
|
25
|
+
## Output
|
|
26
|
+
|
|
27
|
+
One row per marker, grouped by file:
|
|
28
|
+
|
|
29
|
+
`<file>:<line>, <what was simplified>. ceiling: <the limit named>. upgrade: <the trigger to revisit>.`
|
|
30
|
+
|
|
31
|
+
The convention is `ponytail: <ceiling>, <upgrade path>`, so pull the ceiling
|
|
32
|
+
and the trigger straight from the comment. Want an owner per row too? add
|
|
33
|
+
`git blame -L<line>,<line>`.
|
|
34
|
+
|
|
35
|
+
Flag the rot risk: any `ponytail:` comment that names no upgrade path or
|
|
36
|
+
trigger gets a `no-trigger` tag, those are the ones that silently rot.
|
|
37
|
+
|
|
38
|
+
End with `<N> markers, <M> with no trigger.` Nothing found: `No ponytail: debt. Clean ledger.`
|
|
39
|
+
|
|
40
|
+
## Boundaries
|
|
41
|
+
|
|
42
|
+
Reads and reports only, changes nothing. To persist it, ask and it writes the
|
|
43
|
+
ledger to a file (e.g. `PONYTAIL-DEBT.md`). One-shot. "stop ponytail-debt" or
|
|
44
|
+
"normal mode" to revert.
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
---
|
|
10
|
+
|
|
11
|
+
# Ponytail Gain
|
|
12
|
+
|
|
13
|
+
Display this scoreboard when invoked. One-shot: do NOT change mode, write flag
|
|
14
|
+
files, or persist anything.
|
|
15
|
+
|
|
16
|
+
The figures are the published benchmark medians (5 everyday tasks: email
|
|
17
|
+
validator, debounce, CSV sum, countdown timer, rate limiter; three models:
|
|
18
|
+
Haiku, Sonnet, Opus). They are measured, not computed from the current repo.
|
|
19
|
+
Source: `benchmarks/` and the README.
|
|
20
|
+
|
|
21
|
+
## Scoreboard
|
|
22
|
+
|
|
23
|
+
Render plain ASCII bars. The bar length shows the measured range; the label
|
|
24
|
+
carries the exact figure:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
ponytail gain benchmark median · 5 tasks · 3 models
|
|
28
|
+
|
|
29
|
+
Lines of code no-skill ████████████████████ 100%
|
|
30
|
+
ponytail ██▌················· 6–20% ▼ 80–94%
|
|
31
|
+
Cost no-skill ████████████████████ 100%
|
|
32
|
+
ponytail █████▌·············· 23–53% ▼ 47–77%
|
|
33
|
+
Speed ponytail ▸ 3–6× faster
|
|
34
|
+
|
|
35
|
+
This repo: /ponytail-debt (shortcuts you deferred)
|
|
36
|
+
/ponytail-audit (what's still cuttable)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Honesty boundary
|
|
40
|
+
|
|
41
|
+
These are benchmark medians, not this repo. NEVER print a per-repo savings
|
|
42
|
+
number ("you saved X lines/tokens here"): the unbuilt version was never
|
|
43
|
+
written, so there is no real baseline to subtract from in a live repo. The
|
|
44
|
+
only real per-repo figures come from `/ponytail-debt` (a counted ledger), and
|
|
45
|
+
this card points there instead of inventing one.
|
|
46
|
+
|
|
47
|
+
## Boundaries
|
|
48
|
+
|
|
49
|
+
One-shot display. Edits nothing, changes no mode.
|
|
50
|
+
"stop ponytail" or "normal mode": revert.
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
---
|
|
8
|
+
|
|
9
|
+
# Ponytail Help
|
|
10
|
+
|
|
11
|
+
Display this reference card when invoked. One-shot, do NOT change mode,
|
|
12
|
+
write flag files, or persist anything.
|
|
13
|
+
|
|
14
|
+
## Levels
|
|
15
|
+
|
|
16
|
+
| Level | Trigger | What change |
|
|
17
|
+
|-------|---------|-------------|
|
|
18
|
+
| **Lite** | `/ponytail lite` | Build what's asked, name the lazier alternative in one line. |
|
|
19
|
+
| **Full** | `/ponytail` | The ladder enforced: YAGNI → stdlib → native → one line → minimum. Default. |
|
|
20
|
+
| **Ultra** | `/ponytail ultra` | YAGNI extremist. Deletion before addition. Challenges requirements before building. |
|
|
21
|
+
|
|
22
|
+
Level sticks until changed or session end.
|
|
23
|
+
|
|
24
|
+
## Skills
|
|
25
|
+
|
|
26
|
+
| Skill | Trigger | What it does |
|
|
27
|
+
|-------|---------|--------------|
|
|
28
|
+
| **ponytail** | `/ponytail` | Lazy mode itself. Simplest solution that works. |
|
|
29
|
+
| **ponytail-review** | `/ponytail-review` | Over-engineering review: `L42: yagni: factory, one product. Inline.` |
|
|
30
|
+
| **ponytail-audit** | `/ponytail-audit` | Whole-repo over-engineering audit: ranked list of what to delete. |
|
|
31
|
+
| **ponytail-debt** | `/ponytail-debt` | Harvest `ponytail:` shortcut comments into a tracked ledger. |
|
|
32
|
+
| **ponytail-gain** | `/ponytail-gain` | Measured-impact scoreboard: less code, less cost, more speed. |
|
|
33
|
+
| **ponytail-help** | `/ponytail-help` | This card. |
|
|
34
|
+
|
|
35
|
+
Codex uses `@ponytail`, `@ponytail-review`, and `@ponytail-help`; Claude Code
|
|
36
|
+
and OpenCode use the slash-command forms above (OpenCode ships all six as
|
|
37
|
+
slash commands).
|
|
38
|
+
|
|
39
|
+
## Deactivate
|
|
40
|
+
|
|
41
|
+
Say "stop ponytail" or "normal mode". Resume anytime with `/ponytail`.
|
|
42
|
+
`/ponytail off` also works.
|
|
43
|
+
|
|
44
|
+
## Configure Default Mode
|
|
45
|
+
|
|
46
|
+
Default mode = `full`, auto-active every session. Change it:
|
|
47
|
+
|
|
48
|
+
**Environment variable** (highest priority):
|
|
49
|
+
```bash
|
|
50
|
+
export PONYTAIL_DEFAULT_MODE=ultra
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Config file** (`~/.config/ponytail/config.json`, Windows: `%APPDATA%\ponytail\config.json`):
|
|
54
|
+
```json
|
|
55
|
+
{ "defaultMode": "lite" }
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Set `"off"` to disable auto-activation on session start, activate manually
|
|
59
|
+
with `/ponytail` when wanted.
|
|
60
|
+
|
|
61
|
+
Resolution: env var > config file > `full`.
|
|
62
|
+
|
|
63
|
+
## Update
|
|
64
|
+
|
|
65
|
+
Enable auto-update once: open `/plugin`, go to Marketplaces, pick ponytail, Enable auto-update. Claude Code then pulls new versions at startup (run `/reload-plugins` when it prompts). Manual refresh: `/plugin marketplace update ponytail` then `/reload-plugins`.
|
|
66
|
+
|
|
67
|
+
If `/plugin` is not recognized, your Claude Code is out of date. Update it (`npm install -g @anthropic-ai/claude-code@latest`, or `brew upgrade claude-code`) and restart. Other hosts use their own update flow.
|
|
68
|
+
|
|
69
|
+
## More
|
|
70
|
+
|
|
71
|
+
Full docs + examples: https://github.com/DietrichGebert/ponytail
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ponytail-review
|
|
3
|
+
description: >
|
|
4
|
+
Code review focused exclusively on over-engineering. Finds what to delete:
|
|
5
|
+
reinvented standard library, unneeded dependencies, speculative abstractions,
|
|
6
|
+
dead flexibility. One line per finding: location, what to cut, what replaces
|
|
7
|
+
it. Use when the user says "review for over-engineering", "what can we
|
|
8
|
+
delete", "is this over-engineered", "simplify review", or invokes
|
|
9
|
+
/ponytail-review. Complements correctness-focused review, this one only
|
|
10
|
+
hunts complexity.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
Review diffs for unnecessary complexity. One line per finding: location, what
|
|
14
|
+
to cut, what replaces it. The diff's best outcome is getting shorter.
|
|
15
|
+
|
|
16
|
+
## Format
|
|
17
|
+
|
|
18
|
+
`L<line>: <tag> <what>. <replacement>.`, or `<file>:L<line>: ...` for
|
|
19
|
+
multi-file diffs.
|
|
20
|
+
|
|
21
|
+
Tags:
|
|
22
|
+
|
|
23
|
+
- `delete:` dead code, unused flexibility, speculative feature. Replacement: nothing.
|
|
24
|
+
- `stdlib:` hand-rolled thing the standard library ships. Name the function.
|
|
25
|
+
- `native:` dependency or code doing what the platform already does. Name the feature.
|
|
26
|
+
- `yagni:` abstraction with one implementation, config nobody sets, layer with one caller.
|
|
27
|
+
- `shrink:` same logic, fewer lines. Show the shorter form.
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
❌ "This EmailValidator class might be more complex than necessary, have you
|
|
32
|
+
considered whether all these validation rules are needed at this stage?"
|
|
33
|
+
|
|
34
|
+
✅ `L12-38: stdlib: 27-line validator class. "@" in email, 1 line, real validation is the confirmation mail.`
|
|
35
|
+
|
|
36
|
+
✅ `L4: native: moment.js imported for one format call. Intl.DateTimeFormat, 0 deps.`
|
|
37
|
+
|
|
38
|
+
✅ `repo.py:L88: yagni: AbstractRepository with one implementation. Inline it until a second one exists.`
|
|
39
|
+
|
|
40
|
+
✅ `L52-71: delete: retry wrapper around an idempotent local call. Nothing replaces it.`
|
|
41
|
+
|
|
42
|
+
✅ `L30-44: shrink: manual loop builds dict. dict(zip(keys, values)), 1 line.`
|
|
43
|
+
|
|
44
|
+
## Scoring
|
|
45
|
+
|
|
46
|
+
End with the only metric that matters: `net: -<N> lines possible.`
|
|
47
|
+
|
|
48
|
+
If there is nothing to cut, say `Lean already. Ship.` and stop.
|
|
49
|
+
|
|
50
|
+
## Boundaries
|
|
51
|
+
|
|
52
|
+
Scope: over-engineering and complexity only. Correctness bugs, security holes,
|
|
53
|
+
and performance are explicitly out of scope. Route them to a normal review
|
|
54
|
+
pass, not this one. A single smoke test or `assert`-based
|
|
55
|
+
self-check is the ponytail minimum, not bloat, never flag it for deletion.
|
|
56
|
+
Does not apply the fixes, only lists them.
|
|
57
|
+
"stop ponytail-review" or "normal mode": revert to verbose review style.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
# The test job in publish.yml only ever ran on a release or a tag, which is the
|
|
4
|
+
# moment it is already too late to learn anything from it. This one runs on the
|
|
5
|
+
# commits themselves.
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
pull_request:
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
lint:
|
|
16
|
+
name: Lint
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
# Pinned to a commit rather than a tag, as in publish.yml: a tag can be
|
|
20
|
+
# moved to point at new code.
|
|
21
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
22
|
+
- name: Check specification section map
|
|
23
|
+
run: python3 scripts/spec_section_map.py --check
|
|
24
|
+
- name: Install uv
|
|
25
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
26
|
+
- name: Ruff
|
|
27
|
+
run: uv run --frozen --extra dev ruff check .
|
|
28
|
+
|
|
29
|
+
test:
|
|
30
|
+
name: ${{ matrix.os }} / Python ${{ matrix.python-version }}
|
|
31
|
+
runs-on: ${{ matrix.os }}
|
|
32
|
+
strategy:
|
|
33
|
+
fail-fast: false
|
|
34
|
+
matrix:
|
|
35
|
+
# auth.py carries separate cookie paths for macOS and WSL/Windows and
|
|
36
|
+
# browser.py resolves programs per platform, but only Linux was ever run
|
|
37
|
+
# - so the support was asserted rather than checked.
|
|
38
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
39
|
+
# Every version requires-python claims to support.
|
|
40
|
+
python-version: ["3.12", "3.13", "3.14"]
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
43
|
+
- name: Install uv
|
|
44
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
45
|
+
# --extra dev, because pytest lives in an optional dependency rather than
|
|
46
|
+
# in the default set: without it uv resolves an environment that cannot
|
|
47
|
+
# run the suite at all.
|
|
48
|
+
- name: Install FFmpeg (Linux)
|
|
49
|
+
if: runner.os == 'Linux'
|
|
50
|
+
run: sudo apt-get update && sudo apt-get install -y ffmpeg
|
|
51
|
+
- name: Install FFmpeg (macOS)
|
|
52
|
+
if: runner.os == 'macOS'
|
|
53
|
+
run: command -v ffmpeg || brew install ffmpeg
|
|
54
|
+
- name: Install FFmpeg (Windows)
|
|
55
|
+
if: runner.os == 'Windows'
|
|
56
|
+
run: choco install ffmpeg --yes --no-progress
|
|
57
|
+
- name: Run tests
|
|
58
|
+
run: uv run --frozen --extra dev --extra analyze --python ${{ matrix.python-version }} pytest
|
|
59
|
+
- name: Build and verify isolated installation
|
|
60
|
+
run: |
|
|
61
|
+
uv build
|
|
62
|
+
uv run --no-sync --python ${{ matrix.python-version }} python scripts/package_smoke.py
|
|
63
|
+
- name: Check out the pinned legacy informational package
|
|
64
|
+
if: matrix.python-version == '3.14'
|
|
65
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
66
|
+
with:
|
|
67
|
+
ref: 0bbde9994f96878ab121f1b3d522bceb839cc44f
|
|
68
|
+
path: .legacy-release
|
|
69
|
+
persist-credentials: false
|
|
70
|
+
- name: Verify pip, pipx and uv name migration
|
|
71
|
+
if: matrix.python-version == '3.14'
|
|
72
|
+
run: |
|
|
73
|
+
uv build --project .legacy-release --out-dir .legacy-dist
|
|
74
|
+
uv run --no-sync python scripts/tool_migration_smoke.py .legacy-dist/dj_soundcloud_digger-1.0.1-py3-none-any.whl dist/dj_sc_digger-1.1.0-py3-none-any.whl --manager pip
|
|
75
|
+
uv run --no-sync python scripts/tool_migration_smoke.py .legacy-dist/dj_soundcloud_digger-1.0.1-py3-none-any.whl dist/dj_sc_digger-1.1.0-py3-none-any.whl --manager pipx
|
|
76
|
+
uv run --no-sync python scripts/tool_migration_smoke.py .legacy-dist/dj_soundcloud_digger-1.0.1-py3-none-any.whl dist/dj_sc_digger-1.1.0-py3-none-any.whl --manager uv
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Live API check
|
|
2
|
+
|
|
3
|
+
# tests/test_live.py is the only thing standing between us and SoundCloud
|
|
4
|
+
# changing api-v2 under the client, and it is opt-in (`addopts = -m 'not live'`),
|
|
5
|
+
# so in practice it ran when somebody remembered. Once a week it runs by itself.
|
|
6
|
+
#
|
|
7
|
+
# Deliberately not a gate on anything: it fails when somebody else's API moves,
|
|
8
|
+
# which is news rather than a reason to block a release.
|
|
9
|
+
on:
|
|
10
|
+
schedule:
|
|
11
|
+
# Mondays, 06:00 UTC. Early enough in the week to do something about it.
|
|
12
|
+
- cron: "0 6 * * 1"
|
|
13
|
+
workflow_dispatch:
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
live:
|
|
20
|
+
name: Hit the real api-v2
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
24
|
+
- name: Install uv
|
|
25
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
26
|
+
- name: Run the live tests
|
|
27
|
+
# Point these at another playlist by setting DJ_DIGGER_LIVE_URL in the
|
|
28
|
+
# repository variables, for when the default one disappears.
|
|
29
|
+
env:
|
|
30
|
+
DJ_DIGGER_LIVE_URL: ${{ vars.DJ_DIGGER_LIVE_URL }}
|
|
31
|
+
run: uv run --extra dev pytest -m live
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
# Least privilege by default. The publish job asks for the one extra token it
|
|
9
|
+
# needs, and only for itself.
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
# Nothing reached PyPI through a test before this job existed: a tag push went
|
|
15
|
+
# straight to build and upload, and a release cannot be unpublished. It stays
|
|
16
|
+
# here rather than being replaced by ci.yml, because that one is triggered by
|
|
17
|
+
# the commit and this one gates the upload - a release must not depend on a
|
|
18
|
+
# run that happened to be green on some earlier push.
|
|
19
|
+
test:
|
|
20
|
+
name: Release check on ${{ matrix.os }} / Python ${{ matrix.python-version }}
|
|
21
|
+
runs-on: ${{ matrix.os }}
|
|
22
|
+
strategy:
|
|
23
|
+
fail-fast: false
|
|
24
|
+
matrix:
|
|
25
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
26
|
+
# Every version requires-python claims to support, so the claim is
|
|
27
|
+
# checked rather than asserted.
|
|
28
|
+
python-version: ["3.12", "3.13", "3.14"]
|
|
29
|
+
steps:
|
|
30
|
+
# Third-party actions are pinned to a commit rather than a tag. A tag can
|
|
31
|
+
# be moved to point at new code, and the job below hands an OIDC token
|
|
32
|
+
# that publishes to PyPI under our name to whatever these actions run.
|
|
33
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
34
|
+
- name: Install uv
|
|
35
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
36
|
+
# --extra dev, because pytest lives in an optional dependency rather than
|
|
37
|
+
# in the default set: without it uv resolves an environment that cannot
|
|
38
|
+
# run the suite at all.
|
|
39
|
+
- name: Install FFmpeg (Linux)
|
|
40
|
+
if: runner.os == 'Linux'
|
|
41
|
+
run: sudo apt-get update && sudo apt-get install -y ffmpeg
|
|
42
|
+
- name: Install FFmpeg (macOS)
|
|
43
|
+
if: runner.os == 'macOS'
|
|
44
|
+
run: command -v ffmpeg || brew install ffmpeg
|
|
45
|
+
- name: Install FFmpeg (Windows)
|
|
46
|
+
if: runner.os == 'Windows'
|
|
47
|
+
run: choco install ffmpeg --yes --no-progress
|
|
48
|
+
- name: Run tests
|
|
49
|
+
run: uv run --extra dev --extra analyze --python ${{ matrix.python-version }} pytest
|
|
50
|
+
- name: Build and verify isolated installation
|
|
51
|
+
run: |
|
|
52
|
+
uv build
|
|
53
|
+
uv run --no-sync --python ${{ matrix.python-version }} python scripts/package_smoke.py
|
|
54
|
+
- name: Check out the pinned legacy informational package
|
|
55
|
+
if: matrix.python-version == '3.14'
|
|
56
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
57
|
+
with:
|
|
58
|
+
ref: 0bbde9994f96878ab121f1b3d522bceb839cc44f
|
|
59
|
+
path: .legacy-release
|
|
60
|
+
persist-credentials: false
|
|
61
|
+
- name: Verify pip, pipx and uv name migration
|
|
62
|
+
if: matrix.python-version == '3.14'
|
|
63
|
+
run: |
|
|
64
|
+
uv build --project .legacy-release --out-dir .legacy-dist
|
|
65
|
+
uv run --no-sync python scripts/tool_migration_smoke.py .legacy-dist/dj_soundcloud_digger-1.0.1-py3-none-any.whl dist/dj_sc_digger-1.1.0-py3-none-any.whl --manager pip
|
|
66
|
+
uv run --no-sync python scripts/tool_migration_smoke.py .legacy-dist/dj_soundcloud_digger-1.0.1-py3-none-any.whl dist/dj_sc_digger-1.1.0-py3-none-any.whl --manager pipx
|
|
67
|
+
uv run --no-sync python scripts/tool_migration_smoke.py .legacy-dist/dj_soundcloud_digger-1.0.1-py3-none-any.whl dist/dj_sc_digger-1.1.0-py3-none-any.whl --manager uv
|
|
68
|
+
|
|
69
|
+
pypi-publish:
|
|
70
|
+
name: Upload release to PyPI
|
|
71
|
+
needs: test
|
|
72
|
+
runs-on: ubuntu-latest
|
|
73
|
+
environment: pypi
|
|
74
|
+
permissions:
|
|
75
|
+
id-token: write # IMPORTANT: Mandatory for PyPI Trusted Publisher (OIDC)
|
|
76
|
+
steps:
|
|
77
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
78
|
+
- name: Check specification section map
|
|
79
|
+
run: python3 scripts/spec_section_map.py --check
|
|
80
|
+
- name: Install uv
|
|
81
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
82
|
+
- name: Build package
|
|
83
|
+
run: uv build
|
|
84
|
+
- name: Publish to PyPI
|
|
85
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
*.json
|
|
2
|
+
*.yaml
|
|
3
|
+
*.csv
|
|
4
|
+
*.html
|
|
5
|
+
graphify-out/
|
|
6
|
+
|
|
7
|
+
# Test fixtures are real API payloads and have to be committed.
|
|
8
|
+
!tests/fixtures/*.json
|
|
9
|
+
!tests/fixtures/*.html
|
|
10
|
+
!tests/fixtures/bandcamp/*.html
|
|
11
|
+
!tests/fixtures/hypeddit/*.html
|
|
12
|
+
|
|
13
|
+
__pycache__/
|
|
14
|
+
*.py[cod]
|
|
15
|
+
*.egg-info/
|
|
16
|
+
.pytest_cache/
|
|
17
|
+
.ruff_cache/
|
|
18
|
+
.venv/
|
|
19
|
+
build/
|
|
20
|
+
dist/
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Architecture corpus: current source, tests and operational documentation.
|
|
2
|
+
.agents/
|
|
3
|
+
.claude/
|
|
4
|
+
docs/superpowers/
|
|
5
|
+
CHANGELOG.md
|
|
6
|
+
# Generated commentary must not feed back into extraction.
|
|
7
|
+
docs/graph-notes.md
|
|
8
|
+
graphify-out/
|
|
9
|
+
# Index the fixture-driven tests, not third-party HTML and API payloads.
|
|
10
|
+
tests/fixtures/
|