@jayofemi/toolbox
Advanced tools
+1
-1
| { | ||
| "name": "@jayofemi/toolbox", | ||
| "version": "1.0.1", | ||
| "version": "1.1.0", | ||
| "description": "An open library of reusable Claude Code skills, commands, and scripts, with a one-command installer.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -58,2 +58,10 @@ #!/usr/bin/env node | ||
| }, | ||
| { | ||
| // A colon swapped in where an em dash would go (an elaboration that should | ||
| // just be a direct sentence). Advisory; legitimate in times, ratios, code. | ||
| id: "colon-elaboration", | ||
| severity: "review", | ||
| pattern: /\b[a-z]+\s+[^.!?:\n]{0,50}[a-z]:\s+[a-z]/gi, | ||
| message: "colon may be standing in for an em dash; if it just elaborates, restructure into a direct sentence (fine for times, ratios, code, labels)", | ||
| }, | ||
| ]; | ||
@@ -60,0 +68,0 @@ |
| --- | ||
| name: wording | ||
| description: >- | ||
| Lint user-visible text before it ships: em and en dashes, AI-tell phrasing, | ||
| the word "copy" misused for site text, and jargon on non-technical surfaces. | ||
| Lint user-visible text before it ships, catching em and en dashes, a colon | ||
| used in place of an em dash, AI-tell phrasing, the word "copy" misused for | ||
| site text, and jargon on non-technical surfaces. | ||
| --- | ||
@@ -17,3 +18,4 @@ | ||
| 1. **No em (U+2014) or en (U+2013) dash, anywhere.** Use a hyphen, comma, period, semicolon, parens, or a rewrite. | ||
| 2. **No AI-tell constructions:** | ||
| 2. **No colon standing in for an em dash.** A colon that just introduces an elaboration or list should be restructured into a direct sentence, even if slightly less formal. For example, "production software: web apps, mobile apps, and automations" becomes "production software including web apps, mobile apps, and automations". Still fine in clock times, ratios, code, and genuine labels. | ||
| 3. **No AI-tell constructions:** | ||
| - the "No X, just Y" punch ("No run arounds, just results"), | ||
@@ -23,4 +25,4 @@ - the "it is not X, it is Y" dramatic reversal, | ||
| Flat, informational contrast is fine: "fixed prices, not open ended hourly" tells the reader the pricing model. The same shape used as rhetoric is not. | ||
| 3. **Do not use "copy" to mean site text.** Prefer "wording" or "site text". ("Copy the file" is fine; "refresh the marketing copy" is the misuse.) | ||
| 4. **No jargon on a non-technical surface.** On anything a general audience reads, say what the thing does, not how it is built. | ||
| 4. **Do not use "copy" to mean site text.** Prefer "wording" or "site text". ("Copy the file" is fine; "refresh the marketing copy" is the misuse.) | ||
| 5. **No jargon on a non-technical surface.** On anything a general audience reads, say what the thing does, not how it is built. | ||
@@ -50,3 +52,3 @@ ## Procedure | ||
| - `FAIL` is an em or en dash. Always wrong; fix it. | ||
| - `REVIEW` is a candidate the detector cannot judge alone: an AI-tell pattern, a dash-like lookalike, or a "copy" usage. You decide. | ||
| - `REVIEW` is a candidate the detector cannot judge alone: an AI-tell pattern, a colon that may be standing in for an em dash, a dash-like lookalike, or a "copy" usage. You decide. | ||
@@ -57,3 +59,3 @@ The detector is deliberately generous on `REVIEW` candidates, because a missed AI-tell costs more than a candidate you glance at and dismiss. | ||
| For the contrast patterns, the test is whether the contrast carries information or is just drama (rule 2). For "copy", confirm it means site text. The detector cannot see jargon; judge that yourself on anything public-facing. | ||
| For the contrast patterns, the test is whether the contrast carries information or is just drama (rule 3). For the colon (rule 2), restructure when it just introduces an elaboration or list, and leave it for clock times, ratios, code, or a genuine label. For "copy", confirm it means site text. The detector cannot see jargon; judge that yourself on anything public-facing. | ||
@@ -60,0 +62,0 @@ ### 4. Fix |
@@ -64,1 +64,14 @@ import { test } from "node:test"; | ||
| }); | ||
| test("flags a colon standing in for an em dash", () => { | ||
| const text = "I build production software: web apps, mobile apps, and automations."; | ||
| assert.ok(ruleIds(text).includes("colon-elaboration")); | ||
| }); | ||
| test("leaves clock-time and ratio colons clean", () => { | ||
| assert.equal(scanText("The standup is at 12:30 today and the split held at 3:1.").length, 0); | ||
| }); | ||
| test("leaves a genuine label lead-in colon clean", () => { | ||
| assert.equal(scanText("Note: see the section below for the full setup.").length, 0); | ||
| }); |
37454
4.36%677
2.73%