Usage
Options
| Option | Description | Default |
|---|---|---|
--graph <path> | Path to graph.json | .devgraph/graph.json |
--out-dir <dir> | Output directory | .devgraph/agents |
--service <name> | Generate for a specific service only | - |
--service-path <path> | Base path to service directories for inference | - |
--format <format> | Output format: agents or skills | agents |
--best-effort | Generate even with missing data (mark as TODO) | - |
--json | Output result as JSON instead of writing files | - |
Description
Generates richAGENTS.md files for each service in your graph. These files help AI coding assistants (like Claude, Cursor, Copilot) understand your services better by providing context about commands, dependencies, APIs, and codebase structure.
The command automatically infers information from:
- package.json scripts:
dev,build,test,start,lint - Lockfiles: Detects package manager (npm, pnpm, yarn, bun)
- Filesystem landmarks:
src/,app/,lib/,components/,tests/, etc.
Examples
Generate agents for all services:./packages/api-gateway/package.json to infer commands.
Use best-effort mode for incomplete graphs:
TODO.
Output Format
Each generatedAGENTS.md includes:
Agent Skills Format
Use--format skills to generate Agent Skills — the open standard supported by Claude Code, Cursor, Gemini CLI, VS Code, GitHub Copilot, and 25+ other tools.
Output Structure
devgraph impact, devgraph validate, devgraph run).
Per-service skills provide commands, dependencies, downstream consumers, API routes, and key directories for each service.
Skills use progressive disclosure — agents load only the name and description at startup (~100 tokens), then read the full skill body only when the task is relevant.
Use Cases
AI-assisted development: DropAGENTS.md or Agent Skills files in your repo so AI tools understand your services.
Onboarding: New developers can quickly understand how to work with each service.
Documentation: Auto-generate baseline documentation from your devgraph blocks.