spec-as-annotation for Java: your spec lives in the code as @Spec/@AC Lombok annotations and the compiler enforces it. Generates docs, blocks out-of-scope edits, and refuses to finish until each crite
spec-as-annotation for Java. Your spec lives in the code, and the compiler enforces it. Just as javac rejects a bad @Override, speclok makes it reject an incomplete @Spec.
speclok is a tiny, dependency-free annotation library and CLI for Java. It turns the specification of a piece of code into an annotation that sits on the class and method it governs. From that single source of truth, speclok:
1. generates the documentation, the per-task briefing and the task index, 2. enforces the contract at compile time (an incomplete spec is a compile error), and 3. serves the whole thing to an AI coding agent through hooks and an MCP server.
No separate spec files. No .md/.yaml to drift. The spec is versioned with the code, in the same commit, because it is the code.
Write an incomplete @Spec (empty objective, no @AC, an @AC missing then) and your IDE underlines it in red - a standard compile error, anchored at the exact line:
You have a large, old codebase with little or no documentation. Nobody holds the whole thing in their head, the rules for what-can-change-where live in people's memory, and letting an AI agent loose in there is a risk. speclok is for exactly that: it turns the guardrail from tribal knowledge into a rule the compiler enforces.
- No docs, and no time to write them. You do not stop to document the repo. The spec accretes where the work happens: each time you touch a method, you annotate that method. The hot paths get specified over months, with no documentation project - and because the spec is an annotation on the code, it cannot silently lie. - Guardrails t
From the project README.
Add the radar badge to your README — it shows your project was picked up by MCP Radar and links to this page:
[](https://mcp.liqiwa.com/s/Cherobin--speclok.html)
LayerMap MCP: a layered map of your codebase for coding agents: callers, callees and the impact of a change, for TypeScript, JavaScript, Go, Python and Java. MCP server, CLI, and plugins for Claude Co
Morningstar202604/AgentSeedAnti-hallucination guardrails for AI coding agents - hybrid Skill + MCP server (6 tools) that verifies code before it is marked done. Works with Claude Code, Cursor, VS Code, Copilot.
TikyParkinson/mcp-agent-guardrails-spring-boot-starterSecurity & governance guardrails for MCP agents in Java — audit trail, agent-to-tool authorization, prompt-injection detection and rate limiting as a zero-config Spring Boot starter.
okf-memory/okf-agent-memoryGit-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zer
Graphicle-AI/graphicleCode graph and memory for your coding agents, in one Rust program. For Claude Code, Codex, Cursor and any MCP client.
NiazMorshed2007/jev-reviewLocal-first MCP plugin for continuous software-quality review by AI coding agents, powered by Jev.
The top new MCP servers of the week, every Monday. No spam, unsubscribe anytime.