dotdog
Generates Mermaid graphs from compiled .dag files for visualization.
Generates SVG badges to display spec completeness or token savings on Shields.io.
Verifies Supabase tables and configurations against .dog contract specifications.
Verifies Vercel projects and deployments against .dog contract specifications.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dotdoglist all projects"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
dotdog
Spec-driven design for agent-ready projects and workspaces. Turn plans, repos, or multi-repo products into structured
.dogspecs, compile.daggraphs, and let agents query real project structure instead of guessing.
What dotdog does
dotdog is a spec-driven design toolchain for single repos, monorepos, and polyrepo workspaces.
It supports three starting points:
Empty project — create a spec foundation before implementation.
Existing project — map the current repo into structured graph facts.
Workspace product — describe a product made from N repositories with
.doghouse/workspace.json.
The core flow:
plan -> spec workspace -> validation -> repo/workspace graph -> agent execution.dog files are the human-readable source specs. .dag files are compiled implementation graphs for agents and tools.
Related MCP server: io.github.pmgarg/cgraphy
Install
npm install -g dotdog # npm
brew install dotdog # Homebrew
bun add -g dotdog # bunRequires Node.js >= 20 or Bun >= 1.3.
Quick Start
dotdog init my-project # create a spec workspace
dotdog validate # check spec completeness
dotdog compile # build the .dag implementation graph
dotdog serve # expose the graph to MCP-compatible agentsFor an existing product or organization workspace:
dotdog workspace init --id example-workspace
dotdog workspace add ../example-service --alias example-service --role api
dotdog workspace add ../example-interface --alias example-interface --role web
dotdog workspace validate
dotdog workspace graph --jsonFor a project created with GitHub Spec Kit:
dotdog speckit import .
dotdog compile .doghouse/speckit
dotdog serve .doghouse/speckitThe importer reads local specs/<feature> artifacts, writes generated graphs under .doghouse/speckit, and preserves edited outputs unless --force is explicit. Imported Markdown is quoted inside generated .dog files so source content cannot create unintended graph syntax.
What init creates
dotdog init <project> creates a project spec workspace under specs/<project>/.
specs/<project>/
INDEX.dog
SPEC.dog
constitution.dog
data-model.dog
plan.dog
COPY.dogPlanned full scaffold:
specs/<project>/
INDEX.dog
SPEC.dog
constitution.dog
data-model.dog
plan.dog
COPY.dog
tasks.dog
tasks/
AGENTS.dogEdit order:
SPEC.dog— product intent, behavior, flows, and user stories.data-model.dog— entities, states, schemas, and relationships.plan.dog— implementation phases and tasks.constitution.dog— constraints, rules, and boundaries.INDEX.dog— navigation map for humans and agents.COPY.dog— user-facing text and interface language.
Then run:
dotdog validate
dotdog compileWorkspaces for N repos
A Dotdog workspace is a product boundary. It can contain one repo, a monorepo, or N separate repositories.
Workspace metadata lives in:
.doghouse/workspace.jsonExample:
{
"version": 1,
"workspace": { "id": "example-workspace", "name": "example-workspace" },
"repos": [
{ "alias": "example-service", "role": "api", "path": "../example-service" },
{ "alias": "example-interface", "role": "web", "path": "../example-interface" }
],
"groups": [],
"edges": []
}The workspace graph emits repo-qualified facts so humans and agents can distinguish where a fact came from:
example-service:src/routes/core-flow.ts
example-interface:src/features/core-flow/index.tsNo manifest is required for single-repo projects; Dotdog treats the current repo as a one-repo workspace by default.
Only .doghouse/workspace.json is intended for version control. Generated workspace graphs and observed facts are ignored by default because they may contain repository metadata. Workspace CLI and MCP responses use repository-relative paths; the legacy cwd key is a relative alias for path.
Repo mapping direction
dotdog should not only scaffold empty projects. It should also map existing repos.
The intended graph connects product intent to real implementation:
frontend component -> API route -> backend handler -> schema -> database table -> env var -> infra resource -> task/spec reasonTarget node types include files, directories, packages, frontend components, routes, pages, API endpoints, backend handlers, services, schemas, database tables, migrations, environment variables, cloud resources, CI workflows, tests, tasks, and specs.
For greenfield work, run dotdog design after dotdog compile. It audits the compiled data model for stable identifiers, relationships, lifecycle, ownership, access patterns, and sensitive-data handling, then gives concrete next steps without inventing domain facts.
Target edge types include imports, calls, renders, reads, writes, depends_on, implements, configured_by, deployed_by, tested_by, documented_by, and owned_by.
See Spec-Driven Repo Mapping for the formal plan.
Commands
Command | Description |
| Create a spec workspace for a new project. |
| Score spec completeness. Checks file existence, entity descriptions, section counts. |
| Compile |
| Deep analysis. Detects domain, stack, gaps with severity, entity quality audit. |
| Audit compiled data models and emit actionable JSON with |
| Generate a shields.io SVG badge showing token savings. |
| Detect drift between spec and reality. Compares plan.dog tasks against code. |
| Count tokens in |
| Build search index for semantic queries across compiled specs. |
| Semantic search across compiled specs using the search index. |
| Start MCP server over stdio. AI agents query specs and workspace metadata without hallucination. |
| Create |
| Add a repository to the workspace manifest with |
| List workspace repos and groups. Use |
| Validate workspace manifest aliases, paths, groups, and edges. |
| Emit deterministic workspace graph JSON. |
| Find a bounded shortest path in a repo-world DAG. Use |
| Inspect an existing repo and generate graph-ready |
| Import local GitHub Spec Kit artifacts into queryable dotdog projects. |
| Walk through a scenario. Reads SPEC.dog scenarios, checks pre/postconditions. |
| List all predictions with status (pending, correct, wrong, partial). |
| Mark a prediction as correct, wrong, or partial with evidence. |
| Baseline health check. Validates specs, detects stale .dag. |
| Output Mermaid graph from |
| Generate missing spec files from SPEC.dog (data-model, COPY, INDEX). |
| Parse a |
| List, init, or manage spec kits (starter templates). |
| List all projects and their |
| Prints "woof" because every good CLI deserves an easter egg. |
| Test live endpoints + cloud infrastructure against .dog contracts. Hits URLs, diffs responses, backup failover. Verify S3 buckets, Vercel projects, Supabase tables, and more. |
Planned:
Command | Description |
| Create a spec workspace and seed it from the current repo. |
Cross-repo trace/search | Infer relationships across workspace repos beyond explicit manifest edges. |
File Formats
.dog : Human-Written Source Spec
Markdown prose + YAML structured blocks. Free and open source. Define entities, relationships, events, predictions, implementation facts, and copy in a single format that both humans and parsers understand.
### Entity: User
A person who uses the app.
```yaml
entity: User
type: entity
properties:
id:
type: string
required: true
email:
type: string
required: true
states: [active, suspended]
lifecycle: active -> suspended
### `.dag` : Machine-Compiled Implementation Graph
JSON graph compiled from `.dog` files. Nodes, edges, properties, and states in a deterministic structure. Designed for AI agents to query exact project structure with lower token cost than raw prose.
Example graph facts:
```text
CoreFlowPage renders StatusPanel
CoreFlowPage calls POST /api/core-flow
POST /api/core-flow writes records
POST /api/core-flow depends_on SERVICE_TOKEN
records implemented_by prisma/schema.prismaMCP Server : AI Agent Integration
dotdog serve exposes specs to any MCP-compatible AI agent over stdio.
Tool | Description |
| Exact entity with properties, states, lifecycle, and connected edges |
| BFS subgraph from any starting node to any depth |
| Find entities by name or type |
| Property definitions only : zero prose, agent-optimized |
| Node count, edge count, file count, compile time |
| Array of project names |
| Structured workspace metadata with repos, groups, and |
| Read-only checks for declared infrastructure resources |
| Bounded shortest connecting subgraph between two entities |
Agent workflow:
workspace.list -> listProjects -> getEntity -> traverse graphdotdog serve is a local stdio server. It does not open a TCP port or write query logs. If you place it behind a gateway, secure the gateway with authentication and least-privilege access.
Dogfood
dotdog validates its own specs. Every PR:
dotdog validate -> find gaps -> fix spec -> PR -> merge -> tag -> CI publishEat your own dogfood. The tool is the project.
VS Code Extension
Syntax highlighting for .dog files. Install:
cp -r extensions/vscode ~/.vscode/extensions/dotdogFormat Specifications
.dogformat spec : language definition, EBNF grammar, validation rules.dagformat spec : graph definition, MCP API, token efficiency
Related Projects
dotdefi — Spec-first DeFi development. Write .dog specs, generate Solidity stubs.
collar — DAG-first agent harness.
dogbench — Token-savings benchmarks for Collar and dotdog.
dogfood-paybot — Dogfood test: dotdog on a real payment bot project.
homebrew-dotdog — Homebrew tap for
brew install dotdog.
Links
GitHub: specdog/dotdog
npm: dotdog
Docs: Tutorial · FAQ · Integrations · Use Cases
llms.txt: llms.txt : structured for AI agent discovery
AGENTS.md: AGENTS.md : instructions for AI coding agents
Spec-Driven Development
dotdog is built for spec-driven development and spec-driven design. Write or map the spec first. Validate it. Compile it. Let agents query the implementation graph.
plan -> spec -> validate -> compile -> serve -> agent queriesNo more specs that rot in a wiki. No more agents guessing from prose. One source. Queryable graph.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only MCP tools for AI agent discovery, structured resources, and NIULAI information.
Data-ontology maps of your business systems, served to AI agents over MCP.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Let AI agents query data and act across all your business apps via MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to manage and query a temporally-aware knowledge graph memory, supporting episode tracking, entity relationships, and semantic search via MCP tools.1-
- AlicenseNot gradedqualityAmaintenanceEnables AI coding agents to query a codebase as a knowledge graph, providing token-budgeted context, search, and impact analysis via MCP tools.MIT
- AlicenseNot gradedqualityCmaintenanceEnables LLM agents to query a structured knowledge library for search, explanations, related concepts, learning paths, examples, and cross-domain references via MCP.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to query a local, multi-repo code graph for symbol exploration, blast radius analysis, co-change mining, and durable code-anchored memory via MCP tools.891 npm14Business Source 1.1