# architecture-understanding

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.

- rule · `type=rule` · Claude Code, Cline, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop) · ★ 1054 repo stars
- Author: Bhartendu-Kumar
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Bhartendu-Kumar/rules_template/tree/HEAD/.cursor/rules/architecture-understanding.mdc
- Updated: 2025-07-17
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/architecture-understanding

## What it 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`.

## Install

### Cursor (native platform)

**Manually: put the files in place**
- File: `.cursor/rules/architecture-understanding.mdc` — Frontmatter: description, globs, alwaysApply

### Claude Code

**Manually: put the files in place**
- File: `.claude/rules/architecture-understanding.md` — The paths frontmatter field limits the files: move globs from the source into paths

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/architecture-understanding.instructions.md` — The applyTo field sets which files it applies to: move globs from the source into applyTo

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/architecture-understanding.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/architecture-understanding.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Bhartendu-Kumar/rules_template/tree/HEAD/.cursor/rules/architecture-understanding.mdc

## When to use it
- 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
- 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.

## Similar
- [oma-architecture](https://affpapa.org/en/nevibecode/skills/oma-architecture.md) — skill · ★ 1472 repo stars
- [architecture](https://affpapa.org/en/nevibecode/skills/owainlewis-architecture.md) — skill · 331 installs
- [architecture-designer](https://affpapa.org/en/nevibecode/skills/architecture-designer.md) — skill · 8500 installs
- [c4-architecture](https://affpapa.org/en/nevibecode/commands/c4-architecture.md) — command · ★ 42780 repo stars
- [c4-codebase-architecture](https://affpapa.org/en/nevibecode/skills/c4-codebase-architecture.md) — skill · ★ 24 repo stars
- [architecture-diagrams](https://affpapa.org/en/nevibecode/skills/architecture-diagrams.md) — skill · 2000 installs

From the same set: [bhartendu-kumar/rules_template](https://affpapa.org/en/nevibecode/by/bhartendu-kumar/rules_template.md) — 11 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
