architecture-doc-triggers

architecture-doc-triggers is a cursor rule for Cursor from AlphaBitCore/nexus-gateway. It costs 403 tokens per session, scanned A, original, Apache-2.0.

A rule linking code areas to the architecture documents that explain how those areas are organised. It requires developers to read the relevant document before editing code there.

In plain words
What is it for?
Use it before editing a covered subsystem or creating a new architectural subsystem. It tells you which document to read and when a new document and index entry may be needed.
Why use it?
It reduces the risk of making changes that conflict with the system's intended design. It also highlights areas whose architecture has not been documented.

Cursor rule for Cursor

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

Good fit Use it before editing a covered subsystem or creating a new architectural subsystem. It tells you which document to read and when a new document and index entry may be needed.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/alphabitcore/nexus-gateway/architecture-doc-triggers
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/AlphaBitCore/nexus-gateway

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-doc-triggers

README.md
[![agentmods](https://agentmods.dev/badge/rules/alphabitcore/nexus-gateway/architecture-doc-triggers.svg)](https://agentmods.dev/rules/alphabitcore/nexus-gateway/architecture-doc-triggers)
Your own site
<a href="https://agentmods.dev/rules/alphabitcore/nexus-gateway/architecture-doc-triggers"><img src="https://agentmods.dev/badge/rules/alphabitcore/nexus-gateway/architecture-doc-triggers.svg" alt="Measured on agentmods" height="20"></a>
Per session 403 This file is loaded in full into every session.
When invoked 403 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.00403 $0.00403
Opus 5 $0.00201 $0.00201
Sonnet 5 $0.00081 $0.00081
Haiku 4.5 $0.00040 $0.00040

Measured 8d ago against content hash 71b53d84b557, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

architecture-doc-triggers 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 8d 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/architecture-doc-triggers.mdc · 36 lines

What it actually says

Architecture doc triggers — binding

Before editing code in any of the areas listed in docs/developers/architecture/README.md, you MUST first read the listed architecture doc(s).

This rule is one of the three required reads before any code change (see pre-edit-reading.mdc for the full requirement: architecture + feature + conventions). It operationalises Step 1 of the Mandatory Development Workflow in CLAUDE.md ("Architecture") with per-module precision.

How to apply

When the user asks you to edit code, before writing any change:

  1. Open docs/developers/architecture/README.md.
  2. Find the row whose "Editing area / file glob" matches.
  3. Open and read the listed doc(s).
  4. If your edit area is not covered by any row, that itself is a signal — either the architecture is undocumented (raise it with the user before continuing) or this is a new subsystem that needs its own doc + row.

What to do if you're refactoring

If your PR introduces a new architectural subsystem:

  1. Write the new docs/developers/architecture/<service>/<name>-architecture.md first (or in the same PR, ordered before code).
  2. Append the new row to docs/developers/architecture/README.md in the same PR.
  3. CI lockstep (npm run check:arch-doc-triggers) will fail if either side is missing.

What this rule is NOT

  • It is not a substitute for the Plan / Todo discipline in CLAUDE.md.
  • It is not asking you to read every doc — just the ones for the area you are touching.
  • It does not require updating the doc unless the architecture itself is changing.

Skipping this rule requires explicit user approval in chat.

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. 8d ago First seen · 36 lines · 403 tokens per session scan A 71b53d84b557

Subscribe to this mod's changes

architecture-doc-triggers is a cursor rule published in the GitHub repository AlphaBitCore/nexus-gateway (23 stars, last pushed 6d ago), licensed Apache-2.0. It adds 403 tokens to every session, about $0.0020 per session on Opus 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-30.