tools tier

tools-token-retarget

Applies a reviewed old-to-new token map across a file set, longest token first so a shorter row cannot corrupt a longer one, skipping any line marked NAMING-ALLOW. The map is the artifact a human approves; this only applies it.

Applies a reviewed old-to-new token map across a file set, longest token first so a shorter row cannot corrupt a longer one, skipping any line marked NAMING-ALLOW. The map is the artifact a human approves; this only applies it.

Tiertools
Roletooling
Pathcrates/tools/token-retarget
Edition2021
Targetstools-token-retarget, tools_token_retarget
Public items4 across 0 modules
Tests9

What it is for

Applies a reviewed old-to-new token map to text, so a rename campaign is a program and not a remembered shell line.

Two properties do the work, and both exist because the obvious implementation gets them wrong. Longest token first: a map holding both personals_ and personals_profiles must rewrite the longer one first, or the shorter row reaches it first and leaves sighting_profiles spelled as something nobody mapped. `NAMING-ALLOW` lines are untouched: a document that quotes a retired name in order to argue about it — a naming study, a lexicon row, a rename map — would otherwise be rewritten into nonsense by the very campaign it records.

The map is the artifact a human approves. This applies it and counts what it did.

Capabilities

crate root

Applies a reviewed old-to-new token map to text, so a rename campaign is a program and not

Item
pub const ALLOW_MARKER: & str

Rule

Applies a reviewed old-to-new token map to text, so a rename campaign is a program and not

Item
pub struct Rule
fn parse_map(tsv : & str) -> Vec <Rule>
fn apply(text : & str, rules : & Rule) ->(String, usize)

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

No public modules: the crate root is its whole surface.

Public surface

`crate root`

ItemWhat it is
pub struct RuleOne approved substitution.
pub const ALLOW_MARKER: & strMarker that exempts a line
fn parse_map(tsv : & str) -> Vec <Rule>Parse a two-column TSV
fn apply(text : & str, rules : & Rule) ->(String, usize)Apply the rules to one file's text

No pub use re-exports: every item above is declared in this crate.

Boundary

Depends on no other workspace tier.

Shares tier tools with 84 other crates: tools-advisory-reach, tools-archive-guard, tools-artifact-scaffold, tools-ask-ai-core, tools-ask-ais, tools-ask-gemini, tools-book, tools-book-report, … (84 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)tools
Architectural role (taxonomy)tooling
Locationcrates/tools/token-retarget
Vocabulary in force (lexicon)current

Dependencies

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
anyhow^1noalways
clap^4derive, envnoalways

Development, in this workspace.

CrateTierOptionalOnly on
`tools-cli-conformance`toolsnoalways

Build. None.

Depended on by. Nothing in this workspace.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  SELF["tools-token-retarget"]
  SELF -->|development| n_tools_cli_conformance["tools-cli-conformance"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
bintools-token-retarget`src/main.rs`
libtools_token_retarget`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

No workspace crate depends on this one.

Verification

KindCount
Unit tests9
Integration tests0
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
crate root400

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc44
Public modules with a //! block00
pie showData
    title Public items with rustdoc
    "Documented" : 4
    "No rustdoc detected" : 0

Metrics

MetricValue
Rust source files2
Source lines279
Code lines217
Public API items4
Public modules0
Tests9
Examples0
Cargo features0
Direct runtime dependencies2
Workspace reverse dependencies0
pie showData
    title Public API by kind
    "constant" : 1
    "function" : 2
    "struct" : 1
pie showData
    title Rust source composition
    "Code" : 217
    "Blank or comment" : 62

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

All tools · Manual