← All work
Published - npm and PyPI

DocsGuard

Reads the rules you wrote in your own docs, then blocks any commit that contradicts them. And it will not accuse you of anything it cannot quote.

338 installs a monthnpm + PyPIPre-commit hookLocal embeddings

What it does

I spent months writing architecture docs. Then I watched an AI coding agent ignore every one of them, cheerfully, in a single afternoon.

Writing the rule down is not enforcement. So DocsGuard sits between the change and the repository. When you commit, it reads your markdown docs, works out which rules the change actually touches, and blocks the commit if it contradicts one.

The interesting part isn't catching violations. It's refusing to invent them.

See it work

Pick a rule from the docs and a change to the code, then run the check. Try every combination — the interesting one is the third rule with the third change.

The decision that mattered

A finding it cannot quote is downgraded to a warning, never reported as a violation.

A model asked whether a diff violates a rule will always find something. That is what models do. Ship that and within a week your team turns the hook off, and you're worse off than before you had it.

So a finding has to cite the actual text from the retrieved doc chunk that justifies it. If it can't produce that quote, the claim is downgraded to a warning rather than reported as a violation. The tool is allowed to say I noticed something but I can't back it up.

Try the third option in the demo above. It's a real-looking violation that the system refuses to assert, because nothing in the documentation actually supports it.

338installs last month
2registries: npm and PyPI
1500char doc chunks
0cloud embedding calls

Built with

Node.js@xenova/transformers (MiniLM, local)GroqHuskyPublished to npm + PyPI
← CodeLogs All work dockgate →