product-cli — Claude Code MCP server: What/How graph and checks
Keeps a product described as one connected What/How graph in YAML and Turtle, and hands an agent the tools to edit and verify it.
Open on GitHubWhat product-cli does
product-cli is a single Rust binary plus an MCP server. The graph sits as files under .product/; there is no database and no service to run. The What side covers the domain and event model — entities, commands, events, read models, UI steps, systems, triggers. The How side covers contracts, screen composition and delivery features. Typed links join the two, so asking the graph to describe a system is a query rather than a hunt through a stale document.
Install from source with cargo install --path product-cli. The What→How→Build skills for Claude ship inside the binary. product init writes them into .claude/skills/ of the new repo, --no-skills skips that, and product skills install --global puts them in ~/.claude/skills/ for every project. Start a fresh Claude session afterwards, then run /product-session. Authoring sessions are not tied to Claude: product session start and product author domain can host them in GitHub Copilot CLI. Pick the CLI with --cli claude|copilot, with [author].cli in .product/config.toml, or with a global value in ~/.config/product/config.toml; with nothing set, claude wins.
Validation runs against the framework's SHACL shapes and SPARQL rules. product domain validate checks individual nodes, --strict adds graph-level completeness. product mcp --http starts the MCP server and serves a live page at / with three connected views: Systems, Domain and Flows.
What it helps with
- capture a domain and event model that a machine can read
- check graph nodes against the framework's conformance shapes
- derive an aggregate's executable signature from its description
- run flow-derived scenarios for a decider
- view the What graph as an ER diagram or event swimlanes
Example prompts for the agent
- Scaffold the project with
product init --demoand list the nodes it captured - Run a strict check on the graph:
product domain validate --strict - Start the MCP server with
product mcp --httpand walk me through what shows up at/
How to install product-cli
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about product-cli
How do I install product-cli in Claude Code?
Build the binary from source: cargo install --path product-cli. Then run product init, which places the What→How→Build Claude skills in the repo's .claude/skills/. Open a fresh Claude session and call /product-session.
What does product-cli do?
It maintains a product graph under .product/ in YAML and Turtle and exposes it to an agent through MCP tools. The graph holds the domain model, events, contracts and delivery features, while commands like product domain validate and product decider derive check and extend it.
How is ddd different from the .product/ graph?
ddd is a separate tool with its own .ddd/ store and its own commands, such as ddd validate and ddd diff --sarif build.sarif. It reads the .product/ graph as one more governed surface through ddd what.