Skip to content

Releases

v0.1.2

Choose a tag to compare

@pr0d1r2 pr0d1r2 released this 10 Nov 07:07

Still a 0.1 patch, so the version ladder's promise is
unchanged: the json contract and the library surface may still move before
0.2. What a caller can observe: new set names (typography-<code>,
hazard:tags), mojibake reported as one finding and restored by fix,
init --keep-fixable, a schema key at the top of sets --format json,
prebuilt release archives, and the flake building on Intel Macs. v0.1.2
was planned on 2026-10-18 and never tagged, so everything since folds into
it.

Added

  • typography-<code>: every CLDR locale's own quotes and punctuation as a
    set, generated by the same script and pinned tag as the letter sets, with the
    same aliases and lazy lookup. *.md ascii+typography-pl keeps Polish U+201E
    and U+201D through ctrm fix and still straightens a U+201C. ctrm sets
    describes them as punctuation under kind locale, so unlisted_locales
    counts them too; ctrm init never drafts one.

  • double-encoded (#32): text that was UTF-8, read as Latin-1 and saved as
    UTF-8 again ("mojibake") is one finding per run, naming the character it
    decodes to (a.md:1:15 double-encoded "⊥" (U+22A5)), instead of a scatter of
    unrelated findings. The run is a lead U+00C2-U+00F4 plus its continuations
    with at least one C1 control, so an accented letter on its own, or U+00C3
    U+00A9 in Latin-1 prose, is left alone. ctrm fix re-decodes it losslessly,
    and ctrm init lists it under "fix these" instead of widening the file type
    to any.

  • A VS15/VS16 (U+FE0E/U+FE0F) right after a granted character that has a
    standardized variation sequence (✔️) is no longer reported, and fix
    leaves it, so text matching a tool's emoji output stays byte-exact (#34). A
    lone selector, or one after ASCII, is still reported.

  • hazard:tags in a .ctrm set list (#15): tests/fixtures/x/* ascii+hazard:tags
    lets tag characters (U+E0000-U+E007F) into the named paths only. Each is
    reported as a tag-character note at warn, never failing the run
    (not even under --strict), and fix leaves them. The pattern must be an
    exact path or a glob with a literal first segment (* and ** at the
    root are refused), and no other hazard class can be granted. guard
    still refuses to let an agent read such a file.

  • ctrm init --keep-fixable (#36): the draft grants what fix would
    rewrite too (typography), so check reports none of it; a hazard is
    never granted and still fails check. Without it,
    each file type's draft now says how many findings in how many files
    check reports until ctrm fix runs, counting only what the drafted
    line leaves ungranted.

  • x86_64-darwin in the flake systems (#20, closing #18). Consumers
    pin a tag, so v0.1.1 had no characterminator.packages.x86_64-darwin.
    nixpkgs 26.05 is the last release to support this system.

  • Prebuilt binaries attached to each GitHub release from this tag on:
    one archive each for Linux x86_64, Linux aarch64 and macOS aarch64
    (ctrm, LICENSE, README.md) plus one SHA256SUMS, built from the
    tag itself.

Fixed

  • ctrm sets --format json opens with schema like every other document;
    it began at verb. A key added, so the version stays 1. docs/JSON.md
    now lists the keys sets really has.

v0.1.1

Choose a tag to compare

@pr0d1r2 pr0d1r2 released this 04 Oct 07:56
283bc63

A patch: what the first dogfood adoption round found.

Changed

  • caveman preset now also grants U+2261 identical to, U+03A3 the
    summation sigma, U+27FA long left right double arrow and U+2287
    superset of or equal to. Dogfooding found each in 4 to 6 of 13 Rust
    repositories, in files that already used the preset. A file granted
    caveman that held one of them used to fail ctrm check and now
    passes. Sets compose by union only, so a repository that wants them
    refused again replaces the caveman grant with its own set in
    .ctrm-sets.

Fixed

  • ctrm fix rewrites U+2010 hyphen and U+2011 non-breaking hyphen to
    -. Unmapped, a single one left a file type unfixable, and ctrm init
    drafted any for it (#4).
  • ctrm init drafts letters as the language they are written in. Polish
    text with one U+00E9 drafted fi-FI-aux, an auxiliary set of another
    language that held both by accident; it now drafts pl+en-aux
    (#5).

Trip recordings

Choose a tag to compare

@pr0d1r2 pr0d1r2 released this 04 Oct 11:05
3dd8ffb

Automated trip recording assets.

v0.1.0

Choose a tag to compare

@pr0d1r2 pr0d1r2 released this 03 Oct 17:34
1ba27f0

The first release.

Added

  • ctrm check: report every character outside the set its file is
    granted, as path:line:col U+XXXX <set>, then a one-line tally on
    stderr naming the most frequent code points. Exit 1 on a violation.
    --summary folds the rows to one per file and code point with a count;
    --max <n> stops after n rows, so an agent's context stays bounded.
  • ctrm fix: rewrite what the transliteration map can rewrite (dashes,
    curly quotes, ellipsis, no-break space and more), delete hazard
    characters, and report what is left. fix --check writes nothing and
    gates like check.
  • ctrm stats: what each file costs in tokens now and after a fix,
    labelled with the method that counted it (~ estimate or (o200k)).
  • ctrm explain: the set in force for a path, the rule that decided it
    and where that rule was written; --as args|lines|prompt exports the
    configuration as flags, data-file lines or an agent instruction.
  • ctrm sets: the curated presets first, each with what it is for,
    then the declared sets and their members. --containing <c> (a
    character or U+XXXX) lists only the sets that hold it; --locales
    lists the CLDR locale sets.
  • ctrm init: survey the tracked files by type and draft a .ctrm
    that grants each type the fewest presets covering what it already
    holds, every line commented. It never overwrites an existing .ctrm;
    --print writes the draft to stdout.
  • ctrm guard: a Claude Code hook in two tiers. Tag characters and
    bidi embeddings, overrides and isolates -- the carriers of smuggled
    instructions and Trojan Source -- deny a Read and block tool output.
    Every other hazard is reported to the model as a note and the task goes
    on. Every denial ends in a next step (ctrm fix <path>, then read
    again). Input that is not valid UTF-8 or not valid JSON is still
    scanned, and a broken hook exits 1, never 2.
  • Configuration discovery: run from a subdirectory, every verb finds
    the repository root (the nearest .git) and reads its dotfiles, and
    paths are matched and shown relative to that root. -C <dir> names the
    root instead.
  • Refusals instead of silence: an unknown flag, a flag that belongs to
    another verb, a set redefining ascii, any or a hazard class, a
    hazard lowered below forbid, or a bare run with no tracked files is
    refused with exit 2 and the line that caused it. A mistyped verb gets a
    suggestion (did you mean 'check'?), and flags may come before the
    verb.
  • Help: ctrm --help gives every verb and flag a one-line meaning and
    the exit codes; ctrm <verb> --help gives that verb's own page with an
    example. Messages name flags as typed and carry no internal spec ids.
  • Configuration in three dotfiles (.ctrm, .ctrm-sets, .ctrm-map),
    each line with a flag twin (--rule, --set, --map), last match wins.
  • Character sets: function presets (caveman, typography, math,
    legal, marks, box, emoji), coarse script blocks, persian and
    hindi, and letter presets for every CLDR locale (pl, de, ja, ...).
  • Hazards: bidi controls, tag characters, stray byte order marks,
    control characters and default-ignorable characters fire at forbid,
    which no rule can lower, whatever the file's set grants, and fix
    removes them even from a file granted any. Joiners inside
    official emoji sequences and the joiners Persian and Hindi spell with are
    exempt, exactly and only there.
  • Lint levels in the rustc/clippy shape (allow, warn, deny,
    forbid) with --strict and an opt-in --pedantic group: crlf,
    trailing-whitespace, final-newline, unicode-space, not-nfc,
    nfkc-compat, mixed-script, confusable.
  • Emoji compression: presentation selectors and skin tones are deleted,
    keycaps become digits, flags become region codes (PL), and family,
    couple and kiss sequences become their single emoji.
  • An opt-in words map (use words) rewriting logic notation to plain
    words, measured to save tokens under the o200k tokenizer.
  • Output formats: human, --format json and SARIF for GitHub code
    scanning (check --format sarif). Every json document opens with
    "schema":1 and its verb, failures included; a violation carries the
    text fix would write (replacement) and whether it clears it
    (fixable). docs/JSON.md lists every key, unit and
    enum, and when the schema number changes. A file that is not valid
    UTF-8 is named with its line and column, in every format.
  • Adoption: pre-commit hooks (ctrm-check, ctrm-fix) and a composite
    GitHub Action.
  • A library: scan_str, scan_bytes, fix, Hazards::lints_in
    (every hazard in a text, with the same emoji-sequence and byte-order-mark
    exemptions check applies) and the set, map, hazard and lint types,
    with every public function doc-tested.

Known limits

  • guard maps Claude Code's hook format only, and judges at most the first
    16 MiB of a file before a Read.
  • The locale-literal pedantic lint is not built yet.
  • ctrm init drafts one line per file type, so a type whose files mix
    scripts (most *.md in a multilingual tree) is drafted as any, with a
    comment saying so. Splitting a type by directory is planned.
  • Linux and macOS are tested in CI; Windows is not.

See SPEC.md for the rules every one of these behaviours is held
to, and mth tasks SPEC.md for what remains.

Install: cargo install --locked characterminator -- or nix run github:pr0d1r2/characterminator -- check. Docs: README, docs.rs.