DocLayer is a zero-dependency engineering contract layer and safety harness for AI coding agents. When autonomous agents encounter errors, code alone doesn't convey operational prohibitions. DocLayer introduces: • doclayer explain: Inspect declared contracts and negative invariants before writing code. • doclayer check: Machine-check AST contract drift in CI. • 4-tier epistemic model: Separate facts from decisions. • Self-verifying: Governs its own Python codebase with zero dependencies.
Hey Product Hunt community! 👋
I'm Parag, creator of DocLayer (https://github.com/paragpallavsi...).
I built DocLayer after noticing a critical gap with autonomous AI coding agents:
Agents don't just read code; they take real actions. But source code alone cannot convey what NOT to do.
When an agent hits an error like SQLite lock contention (`ERR_DB_LOCKED`), a naive agent might just delete the `.db` file to clear the lock - causing catastrophic data loss.
DocLayer introduces a durable engineering contract layer:
- `doclayer explain `: AI agents run this before coding to see declared contracts, active safety invariants, and negative prohibitions (e.g. "NEVER delete database on lock; apply backoff retry").
- `doclayer check --strict`: CI linter that catches AST contract drift when code changes.
It is 100% open-source, written in Python with zero external runtime dependencies, and uses its own engine to govern its own codebase!
Would love to hear your feedback, thoughts on agent safety, and feature suggestions! 🚀