Skip to content

Commit 477ff07

Browse files
committed
Repo audit pass: hardening, hygiene, virality
install.sh: - Atomic download (.tmp + mv), curl --retry 3 --proto =https - Backup existing target as .bak.<ts> before overwrite; skip with UNCHANGED if identical - Guard LOCAL_PROMPT under curl|bash (BASH_SOURCE may be empty) - Fix verify_hermes grep to ^# TLDR (matches all variants) - Canonical repo URL jqbit/TLDR (was rename-alias jqbit/TLDR.md) README.md: - Add license / stars / last-commit badges - Hoist -82% headline result above the fold with footnote - Add Install-arg column to variants table; recommend TLDR.merged.md - Add inspect-first one-liner + star CTA - Demote benchmark caveat to a footnote, lead with results - Align Hermes verify grep with script - Canonical URLs CONTRIBUTING.md: - Add accurate + merged variants to bullets, CI dry-run examples data/agent-locations.md: - Variants blockquote covers all 4; "Most people: merged" hint - Canonical URLs; align Hermes verify grep data/contributing.md: removed (duplicate of root CONTRIBUTING.md) New files: - .gitignore: macOS/editor/python/node noise + *.bak.* - SECURITY.md: advisory link + curl-pipe-bash scope note Historical bench/research/philosophy docs untouched.
1 parent c32c2e5 commit 477ff07

7 files changed

Lines changed: 114 additions & 102 deletions

File tree

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# OS
2+
.DS_Store
3+
4+
# Python
5+
__pycache__/
6+
*.pyc
7+
*.pyo
8+
9+
# Node
10+
node_modules/
11+
12+
# Logs
13+
*.log
14+
15+
# Env
16+
.env
17+
.env.*
18+
19+
# Editors
20+
*.swp
21+
*.swo
22+
*~
23+
.idea/
24+
.vscode/
25+
26+
# Backups
27+
*.bak
28+
*.bak.*

CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The best contributions are small and specific:
1010

1111
- bug reports where TLDR.md made an agent worse
1212
- examples of agents/apps where the prompt works or fails
13-
- tighter wording for [`TLDR.md`](TLDR.md) or [`TLDR.blunt.md`](TLDR.blunt.md)
13+
- tighter wording for [`TLDR.md`](TLDR.md), [`TLDR.blunt.md`](TLDR.blunt.md), [`TLDR.accurate.md`](TLDR.accurate.md), or [`TLDR.merged.md`](TLDR.merged.md)
1414
- docs fixes, install notes, or agent-specific path updates
1515
- benchmark results from your own setup
1616

@@ -56,7 +56,7 @@ Please include:
5656
- agent/app name
5757
- version if known
5858
- where instructions should be installed
59-
- whether it uses [`TLDR.md`](TLDR.md) or [`TLDR.blunt.md`](TLDR.blunt.md)
59+
- whether it uses [`TLDR.md`](TLDR.md), [`TLDR.blunt.md`](TLDR.blunt.md), [`TLDR.accurate.md`](TLDR.accurate.md), or [`TLDR.merged.md`](TLDR.merged.md)
6060
- any quirks users should know
6161

6262
## Running checks
@@ -73,6 +73,8 @@ python3 -m py_compile bench/dspy/*.py bench/check-md-links.py bench/check-doc-sy
7373
bash -n install.sh
7474
bash install.sh regular --dry-run
7575
bash install.sh blunt --dry-run
76+
bash install.sh accurate --dry-run
77+
bash install.sh merged --dry-run
7678
bash install.sh blunt --dry-run --with-hermes
7779
python3 bench/check-md-links.py
7880
python3 bench/check-doc-sync.py

README.md

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,55 @@
11
# TLDR.md — Too Long Didn't Read
22

3+
![License](https://img.shields.io/github/license/jqbit/TLDR)
4+
![Stars](https://img.shields.io/github/stars/jqbit/TLDR)
5+
![Last commit](https://img.shields.io/github/last-commit/jqbit/TLDR)
6+
37
**Tiny prompt. Shorter answers. Same brain.**
48

9+
**−82% prose reduction**, 100% compliance across 5 agents × 5 prompts.[^bench]
10+
11+
[^bench]: See [`data/benchmarks.md`](data/benchmarks.md) for methodology and caveats.
12+
513
TLDR.md makes AI assistants answer directly: less filler, less fake enthusiasm, less "let me know if..." sludge.
614

715
> It changes communication style only.
816
> Tools, reasoning, code quality, and safety stay the same.
917
1018
## Pick one
1119

12-
| File | Use this if... |
13-
|---|---
14-
| [`TLDR.md`](TLDR.md) | You want terse output. Start here. |
15-
| [`TLDR.blunt.md`](TLDR.blunt.md) | You want terse output plus less sycophancy / more pushback when warranted. |
16-
| [`TLDR.accurate.md`](TLDR.accurate.md) | You want accurate, complete answers without extreme brevity sacrificing precision. |
17-
| [`TLDR.merged.md`](TLDR.merged.md) | You want accurate + blunt + terse combined in one file. |
20+
| File | Install arg | Use this if... |
21+
|---|---|---|
22+
| [`TLDR.md`](TLDR.md) | `regular` | You want terse output. |
23+
| [`TLDR.blunt.md`](TLDR.blunt.md) | `blunt` | You want terse output plus less sycophancy / more pushback when warranted. |
24+
| [`TLDR.accurate.md`](TLDR.accurate.md) | `accurate` | You want accurate, complete answers without extreme brevity sacrificing precision. |
25+
| **[`TLDR.merged.md`](TLDR.merged.md)** | `merged` | **Most people, start here.** Accurate + blunt + terse combined. |
1826

1927
## One-line install
2028

2129
No clone. No editing. The install script writes the chosen prompt to the 7 standard coding-agent locations.
2230

2331
```bash
2432
# Regular
25-
curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR.md/main/install.sh | bash -s -- regular
33+
curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR/main/install.sh | bash -s -- regular
2634

2735
# Blunt
28-
curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR.md/main/install.sh | bash -s -- blunt
36+
curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR/main/install.sh | bash -s -- blunt
2937

3038
# Accurate
31-
curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR.md/main/install.sh | bash -s -- accurate
39+
curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR/main/install.sh | bash -s -- accurate
3240

33-
# Merged (accurate + blunt + terse)
34-
curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR.md/main/install.sh | bash -s -- merged
41+
# Merged (accurate + blunt + terse) — recommended
42+
curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR/main/install.sh | bash -s -- merged
3543
```
3644

45+
Inspect first: `curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR/main/install.sh | less`
46+
47+
If this makes your agent less annoying, drop a ⭐ — helps others find it.
48+
3749
Optional: include Hermes too.
3850

3951
```bash
40-
curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR.md/main/install.sh | bash -s -- blunt --with-hermes
52+
curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR/main/install.sh | bash -s -- blunt --with-hermes
4153
```
4254

4355
`--with-hermes` preserves an existing `~/.hermes/SOUL.md`, makes a backup, and appends or updates a managed TLDR block. Use `--overwrite-hermes` only if you want prompt-only `SOUL.md`.
@@ -57,7 +69,7 @@ for p in ~/.claude/CLAUDE.md ~/.gemini/AGENTS.md ~/.codex/AGENTS.md \
5769
[ -f "$p" ] && grep -q "^# TLDR" "$p" && echo "$p" || echo "$p"
5870
done
5971

60-
grep -q "target 3 words" ~/.hermes/SOUL.md 2>/dev/null && echo "✓ ~/.hermes/SOUL.md" || echo "✗ ~/.hermes/SOUL.md"
72+
grep -q "^# TLDR" ~/.hermes/SOUL.md 2>/dev/null && echo "✓ ~/.hermes/SOUL.md" || echo "✗ ~/.hermes/SOUL.md"
6173
```
6274

6375
## Current defaults
@@ -91,7 +103,12 @@ git reset --soft HEAD~1
91103
- extra caveats and summary paragraphs
92104
- "let me know if you want more" endings
93105

94-
## Benchmarks (historical)
106+
## Benchmarks
107+
108+
- **TLDR.md v0.13.1:** −82.1% total prose reduction, 100% average compliance (5 agents × 5 prompts).
109+
- **TLDR.md v0.14.3:** −80.0% single-turn prose reduction; −75.1% across 8-turn coding conversations; no significant decay.
110+
- **TLDR.blunt.md v0.18.0:** DSPy round-2 + 5-agent cross-model validation; avg pushback 0.848, correct-user agreement 0.912, mean prose 11.0 words, validation phrases 0%.
111+
- **TLDR.accurate.md v0.1.0:** Accuracy-first variant; prioritizes correctness and detail where brevity would harm precision.
95112

96113
Current prompt sizes:
97114

@@ -101,12 +118,7 @@ Current prompt sizes:
101118
| [`TLDR.blunt.md`](TLDR.blunt.md) | 1,487 |
102119
| [`TLDR.accurate.md`](TLDR.accurate.md) | 1,627 |
103120

104-
These benchmark results were measured on earlier shipped prompts. The current prompt files were later tightened to a 1-sentence / 3-word-default / 6-word-max profile and have not yet been rerun through the full bench.
105-
106-
- **TLDR.md v0.13.1:** −82.1% total prose reduction, 100% average compliance (5 agents × 5 prompts).
107-
- **TLDR.md v0.14.3:** −80.0% single-turn prose reduction; −75.1% across 8-turn coding conversations; no significant decay.
108-
- **TLDR.blunt.md v0.18.0:** DSPy round-2 + 5-agent cross-model validation; avg pushback 0.848, correct-user agreement 0.912, mean prose 11.0 words, validation phrases 0%.
109-
- **TLDR.accurate.md v0.1.0:** Accuracy-first variant; prioritizes correctness and detail where brevity would harm precision.
121+
> Note: v0.14.3 numbers measured on a prior prompt revision; current prompts are tighter (1-sentence / 3-word default / 6-word max) and have not been re-benched.
110122
111123
Full historical details:
112124
- [`data/agent-locations.md`](data/agent-locations.md)

SECURITY.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Only the `main` branch is supported.
6+
7+
## Reporting a Vulnerability
8+
9+
- **Sensitive issues:** please use [GitHub security advisories](https://github.com/jqbit/TLDR/security/advisories/new).
10+
- **Non-sensitive issues:** open a regular [issue](https://github.com/jqbit/TLDR/issues).
11+
12+
Aspirational response time: **within 7 days**. No guarantees — this is a personal project.
13+
14+
## Scope
15+
16+
This repo ships prompt files and an install script. The primary attack surface is the install script (`install.sh`), which is intended to be run via `curl | bash`.
17+
18+
**Please inspect `install.sh` before running it.**

data/agent-locations.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
Where to drop `TLDR.md` (or `TLDR.blunt.md`) for each supported coding-agent CLI.
44

5-
> **Both variants use the same file paths.** Pick the variant you want — drop it at the path. TLDR.md = terse only. TLDR.blunt.md = terse + anti-sycophancy.
5+
> **Both variants use the same file paths.** Pick the variant you want — drop it at the path. TLDR.md = terse only. TLDR.blunt.md = terse + anti-sycophancy. TLDR.accurate.md = terse + accuracy. TLDR.merged.md = all combined.
6+
>
7+
> **Most people: merged.** Pick `TLDR.merged.md` unless you have a reason not to.
68
79
## The eight files
810

@@ -27,16 +29,16 @@ No clone. No editing. Installs to the 7 standard coding-agent locations.
2729

2830
```bash
2931
# Regular
30-
curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR.md/main/install.sh | bash -s -- regular
32+
curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR/main/install.sh | bash -s -- regular
3133

3234
# Blunt
33-
curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR.md/main/install.sh | bash -s -- blunt
35+
curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR/main/install.sh | bash -s -- blunt
3436
```
3537

3638
Optional: include Hermes too.
3739

3840
```bash
39-
curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR.md/main/install.sh | bash -s -- blunt --with-hermes
41+
curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR/main/install.sh | bash -s -- blunt --with-hermes
4042
```
4143

4244
`--with-hermes` preserves an existing `~/.hermes/SOUL.md`, makes a backup, and appends or updates a managed TLDR block. Use `--overwrite-hermes` only if you want prompt-only `SOUL.md`.
@@ -47,17 +49,17 @@ curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR.md/main/install.sh | bas
4749

4850
```bash
4951
# Regular (terse only)
50-
TLDR_URL=https://raw.githubusercontent.com/jqbit/TLDR.md/main/TLDR.md
52+
TLDR_URL=https://raw.githubusercontent.com/jqbit/TLDR/main/TLDR.md
5153

5254
# Blunt (terse + anti-sycophancy, DSPy-optimized + 5-agent cross-validated)
53-
TLDR_URL=https://raw.githubusercontent.com/jqbit/TLDR.md/main/TLDR.blunt.md
55+
TLDR_URL=https://raw.githubusercontent.com/jqbit/TLDR/main/TLDR.blunt.md
5456
```
5557

5658
### Install all 7 standard locations at once
5759

5860
```bash
5961
# (uses $TLDR_URL from above; default to TLDR.md if unset)
60-
: ${TLDR_URL:=https://raw.githubusercontent.com/jqbit/TLDR.md/main/TLDR.md}
62+
: ${TLDR_URL:=https://raw.githubusercontent.com/jqbit/TLDR/main/TLDR.md}
6163

6264
for d in ~/.claude/CLAUDE.md ~/.gemini/AGENTS.md ~/.codex/AGENTS.md \
6365
~/AGENTS.md ~/.config/opencode/AGENTS.md \
@@ -116,7 +118,7 @@ for p in ~/.claude/CLAUDE.md ~/.gemini/AGENTS.md ~/.codex/AGENTS.md \
116118
[ -f "$p" ] && grep -q "^# TLDR" "$p" && echo "$p" || echo "$p"
117119
done
118120
# Hermes (variant-neutral marker; works even if TLDR is merged below an existing persona header)
119-
grep -q "target 3 words" ~/.hermes/SOUL.md 2>/dev/null && echo "✓ ~/.hermes/SOUL.md" || echo "✗ ~/.hermes/SOUL.md"
121+
grep -q "^# TLDR" ~/.hermes/SOUL.md 2>/dev/null && echo "✓ ~/.hermes/SOUL.md" || echo "✗ ~/.hermes/SOUL.md"
120122
```
121123

122124
You should see ✓ for each of the locations you actually installed to.

data/contributing.md

Lines changed: 0 additions & 64 deletions
This file was deleted.

install.sh

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Examples:
1212
install.sh accurate
1313
install.sh merged
1414
install.sh blunt --with-hermes
15-
curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR.md/main/install.sh | bash -s -- blunt
15+
curl -fsSL https://raw.githubusercontent.com/jqbit/TLDR/main/install.sh | bash -s -- blunt
1616
1717
Behavior:
1818
- Installs the chosen prompt to the 7 standard coding-agent locations.
@@ -72,9 +72,14 @@ case "$VARIANT" in
7272
*) PROMPT_NAME="TLDR.md" ;;
7373
esac
7474

75-
RAW_BASE="https://raw.githubusercontent.com/jqbit/TLDR.md/main"
76-
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd || true)"
77-
LOCAL_PROMPT="${SCRIPT_DIR}/${PROMPT_NAME}"
75+
RAW_BASE="https://raw.githubusercontent.com/jqbit/TLDR/main"
76+
if [ -f "${BASH_SOURCE[0]:-}" ]; then
77+
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd || true)"
78+
LOCAL_PROMPT="${SCRIPT_DIR}/${PROMPT_NAME}"
79+
else
80+
SCRIPT_DIR=""
81+
LOCAL_PROMPT=""
82+
fi
7883
TMP_PROMPT=""
7984
PROMPT_PATH=""
8085

@@ -89,17 +94,19 @@ download_file() {
8994
local url="$1"
9095
local out="$2"
9196
if command -v curl >/dev/null 2>&1; then
92-
curl -fsSL "$url" -o "$out"
97+
curl -fsSL --retry 3 --proto =https "$url" -o "$out.tmp"
98+
mv -f "$out.tmp" "$out"
9399
elif command -v wget >/dev/null 2>&1; then
94-
wget -qO "$out" "$url"
100+
wget -qO "$out.tmp" "$url"
101+
mv -f "$out.tmp" "$out"
95102
else
96103
printf 'Need curl or wget.\n' >&2
97104
exit 1
98105
fi
99106
}
100107

101108
resolve_prompt() {
102-
if [ -f "$LOCAL_PROMPT" ]; then
109+
if [ -n "$LOCAL_PROMPT" ] && [ -f "$LOCAL_PROMPT" ]; then
103110
PROMPT_PATH="$LOCAL_PROMPT"
104111
return
105112
fi
@@ -115,6 +122,13 @@ write_standard_path() {
115122
return
116123
fi
117124
mkdir -p "$(dirname "$target")"
125+
if [ -f "$target" ]; then
126+
if cmp -s "$PROMPT_PATH" "$target"; then
127+
printf 'UNCHANGED %s\n' "$target"
128+
return
129+
fi
130+
cp "$target" "${target}.bak.$(date +%Y%m%d-%H%M%S)"
131+
fi
118132
cp "$PROMPT_PATH" "$target"
119133
printf 'INSTALLED %s\n' "$target"
120134
}
@@ -210,7 +224,7 @@ verify_path() {
210224

211225
verify_hermes() {
212226
local soul="$HOME/.hermes/SOUL.md"
213-
if grep -q 'target 3 words' "$soul" 2>/dev/null; then
227+
if grep -q '^# TLDR' "$soul" 2>/dev/null; then
214228
printf '✓ %s\n' "$soul"
215229
else
216230
printf '✗ %s\n' "$soul"

0 commit comments

Comments
 (0)