CLI tool for structured software specs. Validate .dog, compile .dag, query via MCP.
Feed the dog. Ship with specs. Write .dog specs. Dog checks them. AI agents fetch them.
# npm
npm install -g dotdog
# or Homebrew
brew tap specdog/dotdog
brew install dotdog
dotdog init my-project --minimal # just SPEC.dog + data-model.dog
dotdog validate # score your spec
dotdog compile # build .dag graph
dotdog tokens # see real byte savings
dotdog serve # expose to AI agents via MCP
Adding dotdog to an existing project?
Describe your app in plain English. dotdog finds what you forgot and fills in the blanks.
$ dotdog init my-app
$ dotdog validate
my-app : 7 .dog files, 100% complete
$ dotdog analyze
my-app : 7 files | 100% complete
SPEC.dog : 5 sections, 1.0KB
data-model.dog : 3 sections, 1.6KB (5 entities, 6 rels)
No gaps found.
$ dotdog compile
โ my-app.dag : 3 nodes, 3 edges
12,400 โ 1,860 tokens (85% savings) โ real savings: 88.9% smaller
$ dotdog serve
MCP server running : AI agents query your specs with zero hallucination
| Command | Description |
|---|---|
dotdog validate |
Score spec completeness (0-100%) |
dotdog analyze |
Deep analysis: gaps, entity quality, suggestions |
dotdog parse |
Parse a .dog file into sections |
dotdog compile |
Compile .dog to .dag graph (JSON) |
dotdog generate |
Generate missing spec files from SPEC.dog |
dotdog serve |
MCP server for AI agents over stdio |
dotdog staleness |
Detect drift between spec and reality |
dotdog visualize |
Output Mermaid graph from .dag |
dotdog simulate |
Run a simulation scenario |
dotdog tokens |
Real byte savings (not estimates) |
dotdog init |
Scaffold a new project (--minimal for 2 files) |
dotdog list |
List all projects |
.dog : Human-written spec (markdown + YAML entities). Free forever..dag : Machine-compiled graph (JSON). Token-efficient for AI agents.dotdog serve runs an MCP server over stdio. AI agents query compiled .dag spec graphs without hallucination.
Claude Desktop, Cursor, or any MCP client:
{
"mcpServers": {
"dotdog": {
"command": "npx",
"args": ["-y", "dotdog", "serve"]
}
}
}
Run dotdog compile first to generate .dag files.
| Tool | Description |
|---|---|
getEntity |
Full entity: properties, states, lifecycle, connected edges |
traverse |
BFS subgraph from a starting node |
search |
Find entities by name or type |
schema |
Property schema only: names, types, required |
summary |
Node count, edge count, version, token savings |
listProjects |
All project names with compiled .dag files |
Agent: listProjects()
โ ["spec-platform"]
Agent: getEntity("spec-platform", "Compile")
โ { id: "Compile", type: "entity", lifecycle: ["running โ completed"], edges: [โฆ] }
Agent: summary("spec-platform")
โ { project: "spec-platform", nodes: 11, edges: 5, savings: 91% }
dotdog@0.3.3 ยท MIT