https://alexjs.com/ You can either integrate it with external tooling (common use is in a build pipeline for docs), or use the JS API directly: https://github.com/get-alex/alex#api .
I've had a quick look and it looks great for identifying where improvements can be made to content in your codebase.
I don't think it's suitable for my use case as the content will be in a database or localStorage, and it seems to only be able to recommend changes rather than dynamically make them. Unless I have misinterpreted things.