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.
git clone --depth 1 https://github.com/bernierllc/agents-environment-configWrote 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.
[](https://agentmods.dev/rules/bernierllc/agents-environment-config/architecture)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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/**/*.mdwith 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/*.mdcfiles - 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
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.
- 2mo ago Changed · -3 tokens per session ee0187b2bca4
- 3mo ago First seen · 84 lines · 760 tokens per session scan A c01bf7c9e472
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.
architecture compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| architecturebernierllc/agents-environment-config | Cursor rule | 11 | yesterday | MIT | A | 757 | Cursor |
| archlangChanMeng666/archlang | Cursor rule | 96 | today | MIT | A | 0 | Cursor |
| figma-performancehoshikitsunoda/figma-plugins-vibe-coding-template | Cursor rule | 21 | 11mo ago | MIT | A | 0 | Cursor |
| ant-designTideTree/awesome-cursor-rules-mdc-zh | Cursor rule | 14 | 8mo ago | none | A | 0 | Cursor |
| clone-aiOmerfaruk-aydn/sitecloner | Cursor rule | 2 | 6mo ago | none | A | 374 | Cursor |
| ponytailDietrichGebert/ponytail | Cursor rule | 201k | 8d ago | MIT | A | 604 | Cursor |
| angular-20angular/angular | Cursor rule | 102k | 5d ago | MIT | A | 0 | Cursor |