"""Smoke test for non-LLM rewrite pipeline.""" from __future__ import annotations import sys from pathlib import Path ROOT = Path(__file__).resolve().parent.parent sys.path.insert(0, str(ROOT)) from app.bootstrap import ensure_resources from app.pipeline.orchestrator import rewrite_text, similarity_check def main() -> None: ensure_resources() sample = ( "It is important to note that effective communication plays a crucial role " "in organizational success. Furthermore, this approach facilitates seamless " "collaboration across multifaceted teams." ) result = rewrite_text(sample, tone="Casual", strength=1, preserve_length=True) print("ENGINE:", result.engine) print("IN/OUT:", result.input_words, "->", result.output_words) print("REWRITE:\n", result.text) assert result.text.strip(), "empty rewrite" assert "furthermore" not in result.text.lower() sim = similarity_check(result.text, sample) print("OVERLAP:", sim.overlap_pct, sim.level) print("OK") if __name__ == "__main__": main()