From 31d804e5f28ffe7a98115ca86f00d947eb413333 Mon Sep 17 00:00:00 2001 From: Julius Brussee Date: Fri, 1 May 2026 01:08:03 +0200 Subject: [PATCH] docs(skill): ultra-mode code-symbol guard, expand auto-clarity, Typst+LaTeX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three small SKILL.md edits batched: * Ultra mode: spell out that abbreviation applies to prose only, never to code symbols, function names, API names, or error strings (#238 by @AnthoHansen). Stops models from rendering literal `fn` in code where the user wrote `function`. * Auto-clarity (#239 by @AnthoHansen): bullet list replaces run-on sentence; adds explicit trigger for compression-induced ambiguity in technical sequences (e.g. "migrate table drop column backup first"). * Typst + LaTeX (#243 by @wildwestrom): add .typ, .typst, .tex to COMPRESSIBLE_EXTENSIONS in caveman-compress/scripts/detect.py and to the boundaries lists in SKILL.md / README.md. Synced SKILL.md to caveman/, plugins/caveman/skills/caveman/, .cursor/skills/caveman/, .windsurf/skills/caveman/, and rebuilt caveman.skill ZIP. Co-Authored-By: Anthony Domínguez Co-Authored-By: West Co-Authored-By: Claude Opus 4.7 (1M context) --- .cursor/skills/caveman/SKILL.md | 11 +++++++++-- .windsurf/skills/caveman/SKILL.md | 11 +++++++++-- caveman-compress/README.md | 2 +- caveman-compress/SKILL.md | 2 +- caveman-compress/scripts/detect.py | 2 +- caveman.skill | Bin 2243 -> 2356 bytes caveman/SKILL.md | 11 +++++++++-- plugins/caveman/skills/caveman/SKILL.md | 11 +++++++++-- plugins/caveman/skills/compress/SKILL.md | 4 ++-- .../caveman/skills/compress/scripts/detect.py | 2 +- skills/caveman/SKILL.md | 11 +++++++++-- skills/compress/SKILL.md | 4 ++-- skills/compress/scripts/detect.py | 2 +- 13 files changed, 54 insertions(+), 19 deletions(-) diff --git a/.cursor/skills/caveman/SKILL.md b/.cursor/skills/caveman/SKILL.md index 2ab498b..073d6bb 100644 --- a/.cursor/skills/caveman/SKILL.md +++ b/.cursor/skills/caveman/SKILL.md @@ -31,7 +31,7 @@ Yes: "Bug in auth middleware. Token expiry check use `<` not `<=`. Fix:" |-------|------------| | **lite** | No filler/hedging. Keep articles + full sentences. Professional but tight | | **full** | Drop articles, fragments OK, short synonyms. Classic caveman | -| **ultra** | Abbreviate (DB/auth/config/req/res/fn/impl), strip conjunctions, arrows for causality (X → Y), one word when one word enough | +| **ultra** | Abbreviate prose words (DB/auth/config/req/res/fn/impl), strip conjunctions, arrows for causality (X → Y), one word when one word enough. Code symbols, function names, API names, error strings: never abbreviate | | **wenyan-lite** | Semi-classical. Drop filler/hedging but keep grammar structure, classical register | | **wenyan-full** | Maximum classical terseness. Fully 文言文. 80-90% character reduction. Classical sentence patterns, verbs precede objects, subjects often omitted, classical particles (之/乃/為/其) | | **wenyan-ultra** | Extreme abbreviation while keeping classical Chinese feel. Maximum compression, ultra terse | @@ -53,7 +53,14 @@ Example — "Explain database connection pooling." ## Auto-Clarity -Drop caveman for: security warnings, irreversible action confirmations, multi-step sequences where fragment order risks misread, user asks to clarify or repeats question. Resume caveman after clear part done. +Drop caveman when: +- Security warnings +- Irreversible action confirmations +- Multi-step sequences where fragment order or omitted conjunctions risk misread +- Compression itself creates technical ambiguity (e.g., `"migrate table drop column backup first"` — order unclear without articles/conjunctions) +- User asks to clarify or repeats question + +Resume caveman after clear part done. Example — destructive op: > **Warning:** This will permanently delete all rows in the `users` table and cannot be undone. diff --git a/.windsurf/skills/caveman/SKILL.md b/.windsurf/skills/caveman/SKILL.md index 2ab498b..073d6bb 100644 --- a/.windsurf/skills/caveman/SKILL.md +++ b/.windsurf/skills/caveman/SKILL.md @@ -31,7 +31,7 @@ Yes: "Bug in auth middleware. Token expiry check use `<` not `<=`. Fix:" |-------|------------| | **lite** | No filler/hedging. Keep articles + full sentences. Professional but tight | | **full** | Drop articles, fragments OK, short synonyms. Classic caveman | -| **ultra** | Abbreviate (DB/auth/config/req/res/fn/impl), strip conjunctions, arrows for causality (X → Y), one word when one word enough | +| **ultra** | Abbreviate prose words (DB/auth/config/req/res/fn/impl), strip conjunctions, arrows for causality (X → Y), one word when one word enough. Code symbols, function names, API names, error strings: never abbreviate | | **wenyan-lite** | Semi-classical. Drop filler/hedging but keep grammar structure, classical register | | **wenyan-full** | Maximum classical terseness. Fully 文言文. 80-90% character reduction. Classical sentence patterns, verbs precede objects, subjects often omitted, classical particles (之/乃/為/其) | | **wenyan-ultra** | Extreme abbreviation while keeping classical Chinese feel. Maximum compression, ultra terse | @@ -53,7 +53,14 @@ Example — "Explain database connection pooling." ## Auto-Clarity -Drop caveman for: security warnings, irreversible action confirmations, multi-step sequences where fragment order risks misread, user asks to clarify or repeats question. Resume caveman after clear part done. +Drop caveman when: +- Security warnings +- Irreversible action confirmations +- Multi-step sequences where fragment order or omitted conjunctions risk misread +- Compression itself creates technical ambiguity (e.g., `"migrate table drop column backup first"` — order unclear without articles/conjunctions) +- User asks to clarify or repeats question + +Resume caveman after clear part done. Example — destructive op: > **Warning:** This will permanently delete all rows in the `users` table and cannot be undone. diff --git a/caveman-compress/README.md b/caveman-compress/README.md index 7c0e8ba..2c52cdc 100644 --- a/caveman-compress/README.md +++ b/caveman-compress/README.md @@ -98,7 +98,7 @@ Examples: | Type | Compress? | |------|-----------| -| `.md`, `.txt`, `.rst` | ✅ Yes | +| `.md`, `.txt`, `.rst`, `.typ`, `.typst`, `.tex` | ✅ Yes | | Extensionless natural language | ✅ Yes | | `.py`, `.js`, `.ts`, `.json`, `.yaml` | ❌ Skip (code/config) | | `*.original.md` | ❌ Skip (backup files) | diff --git a/caveman-compress/SKILL.md b/caveman-compress/SKILL.md index 9e41fd8..eecc203 100644 --- a/caveman-compress/SKILL.md +++ b/caveman-compress/SKILL.md @@ -103,7 +103,7 @@ Compressed: ## Boundaries -- ONLY compress natural language files (.md, .txt, extensionless) +- ONLY compress natural language files (.md, .txt, .typ, .typst, .tex, extensionless) - NEVER modify: .py, .js, .ts, .json, .yaml, .yml, .toml, .env, .lock, .css, .html, .xml, .sql, .sh - If file has mixed content (prose + code), compress ONLY the prose sections - If unsure whether something is code or prose, leave it unchanged diff --git a/caveman-compress/scripts/detect.py b/caveman-compress/scripts/detect.py index 5f50fd3..8d5f6d7 100644 --- a/caveman-compress/scripts/detect.py +++ b/caveman-compress/scripts/detect.py @@ -6,7 +6,7 @@ import re from pathlib import Path # Extensions that are natural language and compressible -COMPRESSIBLE_EXTENSIONS = {".md", ".txt", ".markdown", ".rst"} +COMPRESSIBLE_EXTENSIONS = {".md", ".txt", ".markdown", ".rst", ".typ", ".typst", ".tex"} # Extensions that are code/config and should be skipped SKIP_EXTENSIONS = { diff --git a/caveman.skill b/caveman.skill index a9d4340cf4fcf32ff72ca681424c5198a586b25a..ce22ecf373522649283fe6dd914da512adb7faa4 100644 GIT binary patch literal 2356 zcmZ|Rc{tSF0>JU#C=4T%!Z7sOw?dX0+lwSkGh`4#WjC0yj-|yCNrhxkmdL(E_MI$c zP!Snxwy}*pjL^ims{7n~pZh*N=Q+zi=X=hdA4BA!!^Z&t00YzDbgN5%Qot%R0H8Pk zfD?cLb~e5aI2$)PVchiQEE|sGhG*4Twd@ZY2U5{ZHPxX&bUa4UyjZ< z;i{ECkGIG(`h4MilIEQLHNtb}78m3(=MnRmZd+BC#S!y)(-GuK+)K3775fDy!}(c9 znOkD9wV2C6KCygTzOhFxX>ip|q%PjrS(_4j5vigjK{i;kvhcE<%NtbT%UHr0eTwiZ z<7U`@NPSf-HtBrELt`uL96_n<^4t#QlrX&IoE}2rSfA+v+aqG~n`#&JX9Jai74Y}! zX88owlo&7j+0cusa^>(v5vSgCd}S|Gt9(t^e@@y)qX=^|jHE0=2{Z8g2m$JgKR{<4 zVkvP_P`zG$_Z|>lYN$D1a%4nhyuJ}xU+u^7^)q?3w}oDmIhNoCt??4JxinLvFRv^z zVZPE@Z51yT*j4ymql~it7<=1C7%@x244RiXoHRWG<2C$r%UDh;>;CPLAyzumBzYj} zZ26&)p~+<&R%2vkoL3g zFEZQw6fPOvYu$tx4>sP^Nk1;Z7X^!652!v;VO)H}wz@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{2^ zJKG1`af+209LnrXzPR;edeu|?j=|h(pTl;`gP+pn+j>0i+51|zdBi++n7_T)=o~FX zeK#gl=6Mno3BooFO=2A{^Fg((_t(zZ5W*x}lL?k{Ep>wqEz6O~;7yTR>(R zGMv{#KzWa?~_QbHzRC{+$r6MLxE?-AbF>1SML&oj2g&bdh zZ4v8nL+tjSoGNDFCSAHc@#+#(iQY`3i-m_ehp5j=$w)%XF=aetg#&|nidpLANl(?>nQ7c#7Css%?cHdN~ z=w`RH|5ztLd%$=--(P6=*u%|3ttzA%rb8-GxRw@=NN<1kWx%|AH%W3xT4ccM&~;5r z{uz3Nt5PfLYS-vJ+ZQQO2AueJhd+Paf-Ve4HU&@LUZMEfN7xZoT?_t9=?!$XU~FB? z%`UbcZ$H?eaTEz6~PHzc9Kc}?b`h%AjbNGJ|E-?qK))xo!?vS-U2m**xEl1!5k z9eO#c$|qgRPwhM+U;DR>Zkd1Z+4bzr+wuw?uEm78~HE`Y`} z;UO`oCp;PVcGw|YnWe1tU}L3(=5^O)4GlAC-jZU890z6=k!Bao# **Warning:** This will permanently delete all rows in the `users` table and cannot be undone. diff --git a/plugins/caveman/skills/caveman/SKILL.md b/plugins/caveman/skills/caveman/SKILL.md index 2ab498b..073d6bb 100644 --- a/plugins/caveman/skills/caveman/SKILL.md +++ b/plugins/caveman/skills/caveman/SKILL.md @@ -31,7 +31,7 @@ Yes: "Bug in auth middleware. Token expiry check use `<` not `<=`. Fix:" |-------|------------| | **lite** | No filler/hedging. Keep articles + full sentences. Professional but tight | | **full** | Drop articles, fragments OK, short synonyms. Classic caveman | -| **ultra** | Abbreviate (DB/auth/config/req/res/fn/impl), strip conjunctions, arrows for causality (X → Y), one word when one word enough | +| **ultra** | Abbreviate prose words (DB/auth/config/req/res/fn/impl), strip conjunctions, arrows for causality (X → Y), one word when one word enough. Code symbols, function names, API names, error strings: never abbreviate | | **wenyan-lite** | Semi-classical. Drop filler/hedging but keep grammar structure, classical register | | **wenyan-full** | Maximum classical terseness. Fully 文言文. 80-90% character reduction. Classical sentence patterns, verbs precede objects, subjects often omitted, classical particles (之/乃/為/其) | | **wenyan-ultra** | Extreme abbreviation while keeping classical Chinese feel. Maximum compression, ultra terse | @@ -53,7 +53,14 @@ Example — "Explain database connection pooling." ## Auto-Clarity -Drop caveman for: security warnings, irreversible action confirmations, multi-step sequences where fragment order risks misread, user asks to clarify or repeats question. Resume caveman after clear part done. +Drop caveman when: +- Security warnings +- Irreversible action confirmations +- Multi-step sequences where fragment order or omitted conjunctions risk misread +- Compression itself creates technical ambiguity (e.g., `"migrate table drop column backup first"` — order unclear without articles/conjunctions) +- User asks to clarify or repeats question + +Resume caveman after clear part done. Example — destructive op: > **Warning:** This will permanently delete all rows in the `users` table and cannot be undone. diff --git a/plugins/caveman/skills/compress/SKILL.md b/plugins/caveman/skills/compress/SKILL.md index 1a6652f..8537948 100644 --- a/plugins/caveman/skills/compress/SKILL.md +++ b/plugins/caveman/skills/compress/SKILL.md @@ -4,7 +4,7 @@ description: > Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens. Preserves all technical substance, code, URLs, and structure. Compressed version overwrites the original file. Human-readable backup saved as FILE.original.md. - Trigger: /caveman:compress or "compress memory file" + Trigger: /caveman:compress FILEPATH or "compress memory file" --- # Caveman Compress @@ -103,7 +103,7 @@ Compressed: ## Boundaries -- ONLY compress natural language files (.md, .txt, extensionless) +- ONLY compress natural language files (.md, .txt, .typ, .typst, .tex, extensionless) - NEVER modify: .py, .js, .ts, .json, .yaml, .yml, .toml, .env, .lock, .css, .html, .xml, .sql, .sh - If file has mixed content (prose + code), compress ONLY the prose sections - If unsure whether something is code or prose, leave it unchanged diff --git a/plugins/caveman/skills/compress/scripts/detect.py b/plugins/caveman/skills/compress/scripts/detect.py index 5f50fd3..8d5f6d7 100644 --- a/plugins/caveman/skills/compress/scripts/detect.py +++ b/plugins/caveman/skills/compress/scripts/detect.py @@ -6,7 +6,7 @@ import re from pathlib import Path # Extensions that are natural language and compressible -COMPRESSIBLE_EXTENSIONS = {".md", ".txt", ".markdown", ".rst"} +COMPRESSIBLE_EXTENSIONS = {".md", ".txt", ".markdown", ".rst", ".typ", ".typst", ".tex"} # Extensions that are code/config and should be skipped SKIP_EXTENSIONS = { diff --git a/skills/caveman/SKILL.md b/skills/caveman/SKILL.md index 2ab498b..073d6bb 100644 --- a/skills/caveman/SKILL.md +++ b/skills/caveman/SKILL.md @@ -31,7 +31,7 @@ Yes: "Bug in auth middleware. Token expiry check use `<` not `<=`. Fix:" |-------|------------| | **lite** | No filler/hedging. Keep articles + full sentences. Professional but tight | | **full** | Drop articles, fragments OK, short synonyms. Classic caveman | -| **ultra** | Abbreviate (DB/auth/config/req/res/fn/impl), strip conjunctions, arrows for causality (X → Y), one word when one word enough | +| **ultra** | Abbreviate prose words (DB/auth/config/req/res/fn/impl), strip conjunctions, arrows for causality (X → Y), one word when one word enough. Code symbols, function names, API names, error strings: never abbreviate | | **wenyan-lite** | Semi-classical. Drop filler/hedging but keep grammar structure, classical register | | **wenyan-full** | Maximum classical terseness. Fully 文言文. 80-90% character reduction. Classical sentence patterns, verbs precede objects, subjects often omitted, classical particles (之/乃/為/其) | | **wenyan-ultra** | Extreme abbreviation while keeping classical Chinese feel. Maximum compression, ultra terse | @@ -53,7 +53,14 @@ Example — "Explain database connection pooling." ## Auto-Clarity -Drop caveman for: security warnings, irreversible action confirmations, multi-step sequences where fragment order risks misread, user asks to clarify or repeats question. Resume caveman after clear part done. +Drop caveman when: +- Security warnings +- Irreversible action confirmations +- Multi-step sequences where fragment order or omitted conjunctions risk misread +- Compression itself creates technical ambiguity (e.g., `"migrate table drop column backup first"` — order unclear without articles/conjunctions) +- User asks to clarify or repeats question + +Resume caveman after clear part done. Example — destructive op: > **Warning:** This will permanently delete all rows in the `users` table and cannot be undone. diff --git a/skills/compress/SKILL.md b/skills/compress/SKILL.md index 1a6652f..8537948 100644 --- a/skills/compress/SKILL.md +++ b/skills/compress/SKILL.md @@ -4,7 +4,7 @@ description: > Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens. Preserves all technical substance, code, URLs, and structure. Compressed version overwrites the original file. Human-readable backup saved as FILE.original.md. - Trigger: /caveman:compress or "compress memory file" + Trigger: /caveman:compress FILEPATH or "compress memory file" --- # Caveman Compress @@ -103,7 +103,7 @@ Compressed: ## Boundaries -- ONLY compress natural language files (.md, .txt, extensionless) +- ONLY compress natural language files (.md, .txt, .typ, .typst, .tex, extensionless) - NEVER modify: .py, .js, .ts, .json, .yaml, .yml, .toml, .env, .lock, .css, .html, .xml, .sql, .sh - If file has mixed content (prose + code), compress ONLY the prose sections - If unsure whether something is code or prose, leave it unchanged diff --git a/skills/compress/scripts/detect.py b/skills/compress/scripts/detect.py index 5f50fd3..8d5f6d7 100644 --- a/skills/compress/scripts/detect.py +++ b/skills/compress/scripts/detect.py @@ -6,7 +6,7 @@ import re from pathlib import Path # Extensions that are natural language and compressible -COMPRESSIBLE_EXTENSIONS = {".md", ".txt", ".markdown", ".rst"} +COMPRESSIBLE_EXTENSIONS = {".md", ".txt", ".markdown", ".rst", ".typ", ".typst", ".tex"} # Extensions that are code/config and should be skipped SKIP_EXTENSIONS = {