tools-filler-strip: strip model-output filler from text -- drops throat-clearing and rhetorical-framing lines, scrubs inline hedges, marks jargon flips as JARGON, squeezes blank runs. Phrase tables are data in-source; matching is deterministic, no AI, no regex dependency. Doubles as an agent-harness Stop-hook filter (--hook) that re-emits a cleaned reply only when the filter changed something.
| Tier | tools |
| Role | tooling |
| Path | crates/tools/filler-strip |
| Edition | 2021 |
| Targets | tools-filler-strip, tools_filler_strip |
| Public items | 5 across 0 modules |
| Tests | 10 |
What it is for
Strip model-output filler from text.
Three passes, all deterministic phrase-table matching (no regex, no AI): 1. whole-line drop: throat-clearing and rhetorical-framing lines; 2. inline scrub: hedges removed, "worth noting"/"key insight" padding removed, jargon flips replaced with the literal marker JARGON (marked, not silently rewritten -- prose edits stay visible); 3. blank-run squeeze so cuts do not leave holes.
The phrase tables are the specification: extend them there, prove the addition with a test naming the sentence it kills.
Capabilities
crate root
Strip model-output filler from text.
| Item |
|---|
pub const JARGON_MARKER: & str |
fn last_assistant_text(transcript_jsonl : & str) -> Option <String> |
FilterOutcome
Strip model-output filler from text.
| Item |
|---|
pub struct FilterOutcome |
FilterOutcome :: fn changed(& self, original : & str) -> bool |
fn strip_filler(input : & str) -> FilterOutcome |
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`
| Item | What it is |
|---|---|
pub struct FilterOutcome | Result of a filter pass: the cleaned text and the lines dropped whole. |
FilterOutcome :: fn changed(& self, original : & str) -> bool | True when the filter changed anything at all. |
pub const JARGON_MARKER: & str | Marker substituted for a jargon phrase. |
fn strip_filler(input : & str) -> FilterOutcome | Filter input: drop filler lines, scrub the rest, squeeze blank runs. |
fn last_assistant_text(transcript_jsonl : & str) -> Option <String> | Extract the last assistant text message from a session transcript (JSONL, one entry per line; assistant entries carry message.content = {type:"text", text} blocks). |
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 |
| Location | crates/tools/filler-strip |
| Vocabulary in force (lexicon) | current |
Dependencies
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
serde_json | ^1 | — | no | always |
Development. None.
Build. None.
Depended on by. Nothing in this workspace.
Feature flags
No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.
Targets
| Kind | Name | Source |
|---|---|---|
| bin | tools-filler-strip | `src/main.rs` |
| lib | tools_filler_strip | `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
| Property | Evidence |
|---|---|
| async public surface | none detected |
| async runtime | none detected |
| database access | none detected |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | none 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.
Related capabilities
No workspace crate depends on this one.
Verification
| Kind | Count |
|---|---|
| Unit tests | 10 |
| Integration tests | 0 |
| Examples | 0 |
| Doctests | 0 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
crate root | 4 | 0 | 0 |
What the tests establish, by name:
deletes_padding_phrases—src/lib.rsdrops_compliment_opener_line—src/lib.rsdrops_rhetorical_framing_line—src/lib.rshook_extracts_last_assistant_text—src/lib.rsmarks_jargon_instead_of_rewriting—src/lib.rsphrase_tables_are_ascii—src/lib.rsplain_technical_text_passes_unchanged—src/lib.rsscrubs_line_start_hedge—src/lib.rsscrubs_mid_line_hedge—src/lib.rssqueezes_blank_runs_left_by_cuts—src/lib.rs
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 5 | 5 |
Public modules with a //! block | 0 | 0 |
pie showData
title Public items with rustdoc
"Documented" : 5
"No rustdoc detected" : 0
Metrics
| Metric | Value |
|---|---|
| Rust source files | 2 |
| Source lines | 415 |
| Code lines | 324 |
| Public API items | 5 |
| Public modules | 0 |
| Tests | 10 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 1 |
| Workspace reverse dependencies | 0 |
pie showData
title Public API by kind
"constant" : 1
"function" : 2
"method" : 1
"struct" : 1
pie showData
title Rust source composition
"Code" : 324
"Blank or comment" : 91
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.