bmad-observability-agent

Phase 6: MCP Rules

Command: Configure MCP rules (via /o11y-engineer)

Goal: Generate IDE-specific rule files that embed Dynatrace DQL queries and observability context directly into the developer’s AI assistant.

What Are MCP Rules?

MCP (Model Context Protocol) rules are configuration files that provide AI assistants with project-specific observability context. They embed DQL queries, service mappings, and debugging instructions so that developers can query telemetry directly from their IDE.

Supported IDEs

IDE Rule File Location Format
Claude Code .claude/commands/o11y/ Markdown
Cursor .cursor/rules/ .mdc
Windsurf .windsurfrules/ Markdown
Copilot .github/copilot-instructions.md Markdown
Amazon Q .amazonq/rules/ Markdown

Workflow

Step 1: Detect IDE

The agent asks which IDE you use and configures the output format accordingly.

Step 2: Scan Project

The agent scans your project to discover:

Step 3: Collect Context

You provide:

Step 4: Generate DQL Queries

For each discovered service, the agent generates:

Step 5: Write Rule Files

Rule files are written to the IDE-specific location in your project directory.

Step 6: Document

A manifest of generated rules is saved at observability-specs/mcp-rules-manifest.yaml.

Prerequisites

MCP rules work best with the Dynatrace MCP server configured in your AI assistant. See Dynatrace Setup for configuration instructions.

Next Step

After generating MCP rules, proceed to Phase 7: Implementation to hand off to the B-MAD agent ecosystem.