21-stack-architecture

21-stack-architecture is a cursor rule for Cursor from ConlinJoe/ai-platform. It costs 0 tokens per session (957 once invoked), scanned A, original, MIT.

A repository rule for keeping templates, components, and styling inside the boundaries of the detected software stack. It applies the matching framework profile only when repository evidence supports it.

In plain words
What is it for?
Use it when adding or changing views, templates, components, or styles in repositories that may contain several packages or frameworks.
Why use it?
It prevents code from following the wrong framework conventions or putting logic in an inappropriate layer.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when adding or changing views, templates, components, or styles in repositories that may contain several packages or frameworks.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/conlinjoe/ai-platform/21-stack-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/ConlinJoe/ai-platform

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 21-stack-architecture

README.md
[![agentmods](https://agentmods.dev/badge/rules/conlinjoe/ai-platform/21-stack-architecture/github.svg)](https://agentmods.dev/rules/conlinjoe/ai-platform/21-stack-architecture)
Your own site
<a href="https://agentmods.dev/rules/conlinjoe/ai-platform/21-stack-architecture"><img src="https://agentmods.dev/badge/rules/conlinjoe/ai-platform/21-stack-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 21-stack-architecture

Your own site · 80×15
<a href="https://agentmods.dev/rules/conlinjoe/ai-platform/21-stack-architecture"><img src="https://agentmods.dev/badge/rules/conlinjoe/ai-platform/21-stack-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 957 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00957
Opus 5.5 $0.00000 $0.00383
Sonnet 5.5 $0.00000 $0.00191
Haiku 4.5 $0.00000 $0.00096

Measured 4d ago against content hash 1c7cf6e3c758, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

21-stack-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 4d 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/21-stack-architecture.mdc · 106 lines

How it starts

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

Stack-native architecture

Apply this rule only after detecting the installed stack from repository evidence and reading applicable project contracts and ADRs. A familiar stack is not the default. If detection is uncertain, say so and do not apply an unrelated profile.

Canonical check, exceptions, and baseline behavior: docs/contracts/features/stack-native-architecture.md. Decision: ADR 0011.

Appearance, design references, and visual fidelity do not waive this rule. Implement the approved design with the stack's normal boundaries.

Template and MVC-style views

Use this profile for Blade and comparable server templates when the file's nearest Composer package is Laravel, Roots/Sage/Acorn, or another MVC-style template architecture. A nested package.json does not hide that Composer package. A nearer Composer package that does not declare Laravel or Roots is uncertain: do not inherit an ancestor Roots or Laravel profile. A sibling package does not apply. Use that framework's own layer names.

  • Views render prepared data.
  • Conditions, loops, formatting, components, and class selection may live in the template.
  • Queries, persistence, business decisions, substantial data transformation, content parsing, and service orchestration belong in the controller, composer, presenter, service, or equivalent.
  • Do not treat a template expression or helper call as prohibited logic by itself.
  • Do not impose Laravel controllers, actions, or service class names on a framework that has a different structure.

Roots/Sage/Acorn: prepare fields and queries in composers or the equivalent Acorn layer. get_field and WP_Query in a new Blade view are not the presentation layer.

Components

Use this profile for React, Vue, Svelte, Solid, Preact, Angular, and similar component architectures.

  • Follow that framework's component, hook, rendering, and data-access conventions.
  • Do not apply MVC "no logic in views" restrictions to components.
  • Do not invent a shared separation that conflicts with the installed framework.

Read the full file on GitHub · 106 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. 4d ago First seen · 106 lines · 957 tokens per session scan A 1c7cf6e3c758

Subscribe to this mod's changes

21-stack-architecture is a cursor rule published in the GitHub repository ConlinJoe/ai-platform (2 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 957 tokens. 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-10-30.