architecture

architecture is a cursor rule for Cursor from bernierllc/agents-environment-config. It costs 757 tokens per session, scanned A, original, MIT.

A set of rules for software architecture, meaning the way a codebase is divided and how its parts fit together. It records core design principles and decisions about how systems should be structured.

In plain words
What is it for?
Use it when designing features, reviewing structure, deciding where code belongs, or explaining the project's preferred architectural approach.
Why use it?
It gives contributors shared guidance when choosing designs, boundaries, and long-term trade-offs.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions Cursor.

Good fit Use it when designing features, reviewing structure, deciding where code belongs, or explaining the project's preferred architectural approach.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/bernierllc/agents-environment-config/architecture
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/bernierllc/agents-environment-config

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for architecture

README.md
[![agentmods](https://agentmods.dev/badge/rules/bernierllc/agents-environment-config/architecture/github.svg)](https://agentmods.dev/rules/bernierllc/agents-environment-config/architecture)
Your own site
<a href="https://agentmods.dev/rules/bernierllc/agents-environment-config/architecture"><img src="https://agentmods.dev/badge/rules/bernierllc/agents-environment-config/architecture/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for architecture

Your own site · 80×15
<a href="https://agentmods.dev/rules/bernierllc/agents-environment-config/architecture"><img src="https://agentmods.dev/badge/rules/bernierllc/agents-environment-config/architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 757 This file is loaded in full into every session.
When invoked 757 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00757 $0.00757
Opus 5.5 $0.00303 $0.00303
Sonnet 5.5 $0.00151 $0.00151
Haiku 4.5 $0.00076 $0.00076

Measured 2mo ago against content hash ee0187b2bca4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

architecture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/general/architecture.mdc · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Architecture Rules

Core Principles

Design Philosophy

  • Separation of Concerns: Models, repositories, routes, docs live in their own packages
  • DRY + KISS: Reuse abstractions and ship the simplest working solution
  • Self-documenting Code: Expressive identifiers, minimal explanatory comments
  • Conventions: Extend existing code style and architecture—never reinvent

System Architecture

  • Database Default: PostgreSQL unless project rules specify otherwise
  • Python Environment: If python backend exists, ensure local venv; create if absent
  • Shell Scripts: Use commander.js, human-friendly with color coding
  • Documentation: Store in /docs/**/*.md with cross-links to related docs

File Organization

Directory Structure

project/
├── docs/           # Documentation
├── plans/          # Planning docs with task lists
├── .cursor/rules/  # Cursor rules
├── models/         # Data models
├── repositories/   # Data access layer
├── routes/         # API routes
└── [tech-specific] # Framework-specific directories

Documentation Standards

  • Architecture, Design, Functionality, Principles: Note in .cursor/rules/*.mdc files
  • Be Pithy: Link to files in /docs/ rather than including all content
  • Planning Docs: Store in ./plans/**/*.md, use task lists (- [ ] / - [x]) and cross-link
  • Implementation Docs: If mock, ensure docs have implementation docs added/updated

Code Quality

Error Handling

  • Explicit Error Handling: No uncaught exceptions
  • Docstrings: On every public symbol
  • Validation: Comprehensive input validation and error reporting

Refactoring Guidelines

  • Size Management: If file/function/method/class gets too large, suggest refactor plan in ./plans/
  • Reusability: Consider reusability with other functionality in the project
  • Safe Refactoring: Move functionality to more manageable and reusable state

Integration Standards

MCP Servers

  • API Integration: If project has APIs, install MCP server for those APIs
  • Security: MCP server MUST respect authorization and authentication
  • Environment: If cannot respect auth, MUST only run in dev environments

Read the full file on GitHub · 84 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed · -3 tokens per session ee0187b2bca4
  2. 3mo ago First seen · 84 lines · 760 tokens per session scan A c01bf7c9e472

Subscribe to this mod's changes

architecture is a cursor rule published in the GitHub repository bernierllc/agents-environment-config (11 stars, last pushed yesterday), licensed MIT. It adds 757 tokens to every session, about $0.0030 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

architecture compared with cursor rules from other repositories

architecture next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
architecturebernierllc/agents-environment-configCursor rule11yesterdayMITA757Cursor
archlangChanMeng666/archlangCursor rule96todayMITA0Cursor
figma-performancehoshikitsunoda/figma-plugins-vibe-coding-templateCursor rule2111mo agoMITA0Cursor
ant-designTideTree/awesome-cursor-rules-mdc-zhCursor rule148mo agononeA0Cursor
clone-aiOmerfaruk-aydn/siteclonerCursor rule26mo agononeA374Cursor
ponytailDietrichGebert/ponytailCursor rule201k8d agoMITA604Cursor
angular-20angular/angularCursor rule102k5d agoMITA0Cursor