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 | - |
--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:
Use Cases
AI-assisted development: DropAGENTS.md 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.