| Docs drift. Examples in README.md stop matching the implementation. CI usually doesn’t notice. I built doksnet, a small Rust CLI that lets you link a documentation section to a code snippet and verify that both sides stay in sync using Blake3 hashes. You define mappings like: • README.md:15-25 • src/lib.rs:40-65 doksnet stores the ranges + their hashes in a compact .doks file.
doksnet test re-extracts the content and fails (exit code 1) if anything changed — including whitespace. Basic flow: • doksnet new – initialize • doksnet add – create doc ↔ code mapping (interactive) • doksnet test – CI-safe verification • doksnet test-interactive – review/fix mismatches It’s repo-local, no external service, no parsing/AST magic — just deterministic text extraction + hashing. There’s also a GitHub Action if you want to enforce sync in CI. Repo: https://github.com/Pulko/doksnet
Install: cargo install doksnet
Web: https://doksnet.pulko-app.com Interested in feedback on the approach — especially whether this tool could be more useful then “Rewrite all the readme based on new changes. Make no mistakes”, for instance, in environments where AI usage is restricted |