Skip to main content
rule CX Codex

architecture-understanding — Claude Code rule: what it does

The architecture-understanding rule has the agent read docs/architecture.md and check code changes against its architecture. Use it when a project documents its design in a Mermaid diagram.

no license ★ 1,054 updated 2025-07-17

Install into Cursor · Manually: put the files in place All methods and platforms ↓
.cursor/rules/architecture-understanding.mdc
Open on GitHub

What architecture-understanding does

The agent parses the Mermaid diagram in docs/architecture.md to identify module boundaries, relationships, data flows, interfaces, and dependencies. It then checks proposed changes against the documented constraints and separation of concerns.

If the file is missing, the agent stops and alerts the user. A diagram it cannot parse prompts a request for clarification; an architectural violation triggers a warning. The rule’s core check depends on docs/architecture.md being present.

For Claude Code, put the rule at .claude/rules/architecture-understanding.md. Cline uses .clinerules/architecture-understanding.md.

What it helps with

  • parse a project’s Mermaid architecture diagram
  • identify module boundaries and dependencies
  • trace data flows and system interfaces
  • check code changes against architecture constraints
  • keep new code within defined component boundaries

Example prompts for the agent

  • Read docs/architecture.md and explain how the project modules relate to one another.
  • Check this change against the architecture documented in docs/architecture.md.
  • Review whether the new code preserves the separation of concerns in the architecture.

How to install architecture-understanding

Manually: put the files in place

.cursor/rules/architecture-understanding.mdc

Frontmatter: description, globs, alwaysApply

Step by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules

Questions about architecture-understanding

How do I install architecture-understanding in Claude Code?

Save the rule at .claude/rules/architecture-understanding.md.

What does architecture-understanding do?

It guides the agent through the Mermaid diagram in docs/architecture.md and checks changes against the documented architecture.

What happens if the Mermaid diagram cannot be parsed?

The agent asks for clarification. If docs/architecture.md is missing, it stops and notifies the user.

Similar IDE rules

All IDE rules for Agent setup: memory, context, orchestration →

From the same set11

The whole set →
directory-structure directory-structure defines a standard top-level repository layout for your AI coding assistant, mapping source files, tests, and configuration. CX Codex +1 ★ 1,054repo stars debug The debug rule sets the order for troubleshooting: gather evidence and context, explain the cause, then edit code. It applies when an error persists or a fix is incomplete. CX Codex +1 ★ 1,054repo stars cursor-rules-location cursor-rules-location keeps repository rule files organized by rejecting any .mdc files created outside the .cursor/rules directory. CX Codex +1 ★ 1,054repo stars develop-mcp-server The develop-mcp-server rule structures MCP server work from planning to validation, with setup guidance for Node.js and Python projects. CX Codex +1 ★ 1,054repo stars plan Makes the agent read your docs, task notes and source before planning, ask clarifying questions, and only then propose a solution. CX Codex +1 ★ 1,054repo stars implement implement enforces a strict coding protocol with dependency checks, step-by-step edits, simulation passes, and automated test coverage before finalizing changes. CX Codex +1 ★ 1,054repo stars memory This rule organizes project memory across docs/, tasks/, and .cursor/rules/. It helps an agent retain plans, context, errors, and project decisions between tasks. CX Codex +1 ★ 1,054repo stars memory Keeps project memory in a fixed set of files the agent reads before work: requirements, architecture, stack, task plan, current state. CX Codex +1 ★ 1,054repo stars

More in the catalog

Project sponsors

Companies that keep this analytics open