Replace em dashes with context-appropriate punctuation#191
Conversation
Remove every em dash (U+2014) from the JS source and test tree (312 files),
which violated the repo's no-em-dash convention. Rather than a blanket
character swap, fixes were made in context:
- Comments and JSDoc: rewritten with the punctuation the sentence wants
(comma, colon, parentheses, sentence split, or a semicolon between two
independent clauses), not a mechanical hyphen.
- Runtime string values (log/CLI/error messages and the test strings that
assert them): replaced deterministically (" - ") so source and assertions
stay byte-identical.
Done via a fan-out of small-model subagents, one per batch of files.
Checks: npm test (1485 pass), npm run lint, npm run typecheck all green.
No em dashes remain in src, hypaware-core, bin, or test.
The em-dash cleanup collided with the @ref annotation format, whose gloss separator was a em dash. Standardize it on a colon instead: - Normalize all @ref glosses to `@ref LLP NNNN#anchor [relation]: gloss`, fixing the inconsistent separators the cleanup left (some hyphens, some missing) and 27 annotations where an agent misplaced the colon before the relation bracket or added a stray period. - A structural check confirms every @ref LLP number, anchor, and relation is byte-identical to master; only the separator and gloss prose changed. - Update the format docs to match: AGENTS.md, the ref-check skill, and llp/0001. Also add the no-em-dash rule to AGENTS.md Code Style and make AGENTS.md and the ref-check skill em-dash-free themselves. Checks: npm test (1485 pass), lint, typecheck all green. A grammar validator confirms all 363 @ref occurrences conform to the canonical form.
Code review + resolutionRan two finder passes over the diff (semantic string-change risk, and mechanical artifacts), plus follow-up validation. Finder 1 — string-literal behavior risk: clean. Every changed string is display text (logs, CLI/stderr, error fields, tool descriptions); none are object keys, delimiters, regexes, partition labels, cache keys, or wire formats. Where a string is asserted in a test, both sides were updated together. No behavioral risk. Finder 2 — mechanical artifacts: found one real category. 53
No other mechanical damage (no merged words, no corrupted code, no broken JSDoc). Checks: Follow-up noted (out of scope here): the broader LLP corpus still has ~936 em dashes across 43 |
What
Removes every em dash (
U+2014) from the JS source and test tree. 312 files contained ~1269 em dashes in source plus more in tests, violating the repo's no-em-dash convention.Fixes were context-aware, not a blanket character swap:
" - "so a source string and any test asserting it stay byte-identical. This is what keeps the suite green.Executed as a fan-out of small-model (haiku) subagents, one per batch of 6 files (52 batches), with the source-vs-string distinction baked into each agent's instructions.
Checks
npm test- 1485 pass, 0 failnpm run lint- cleannpm run typecheck- cleangrepconfirms zero remainingU+2014insrc,hypaware-core,bin,testNote: this PR is
.jsonly. Markdown docs (README,AGENTS.md,llp/) are intentionally out of scope.Second of three cleanup PRs (dead code merged in #190; type-import specifiers next).