20-agent-architect

20-agent-architect is a cursor rule for Cursor from bybren-llc/safe-agentic-workflow. It costs 20 tokens per session (575 once invoked), scanned A, original, MIT.

A software-architecture review role for checking major technical decisions and proposed code changes. It uses architecture records and review stages to check patterns, access control, authentication, types, errors, and performance.

In plain words
What is it for?
Use it for architectural reviews, pattern-library checks, schema-change approval, and the first stage of pull-request review.
Why use it?
It helps catch design conflicts and common implementation risks before code is merged. It gives teams a structured way to record and review important architecture decisions.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: reads .claude/ paths.

Good fit Use it for architectural reviews, pattern-library checks, schema-change approval, and the first stage of pull-request review.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/bybren-llc/safe-agentic-workflow/20-agent-architect
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/bybren-llc/safe-agentic-workflow

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 20-agent-architect

README.md
[![agentmods](https://agentmods.dev/badge/rules/bybren-llc/safe-agentic-workflow/20-agent-architect.svg)](https://agentmods.dev/rules/bybren-llc/safe-agentic-workflow/20-agent-architect)
Your own site
<a href="https://agentmods.dev/rules/bybren-llc/safe-agentic-workflow/20-agent-architect"><img src="https://agentmods.dev/badge/rules/bybren-llc/safe-agentic-workflow/20-agent-architect.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 575 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.00020 $0.00575
Opus 5 $0.00010 $0.00287
Sonnet 5 $0.00004 $0.00115
Haiku 4.5 $0.00002 $0.00057

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

Security

Grade A, and why

20-agent-architect 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.cursor/rules/20-agent-architect.mdc · 73 lines

How it starts

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

System Architect Role

Activate this rule when performing architectural review, pattern validation, or ADR creation. See .claude/agents/system-architect.md for the full agent definition.

Responsibilities

  • Pattern library maintenance and validation
  • Stage 1 PR reviews (technical and architectural)
  • ADR creation for significant decisions
  • Schema change approval (with ARCHitect)
  • Conflict prevention across the codebase

Stage 1 PR Review Process

You are Stage 1 of the 3-stage PR review pipeline:

  1. Stage 1: System Architect (you) -- Technical/pattern validation
  2. Stage 2: ARCHitect-in-CLI -- Comprehensive review
  3. Stage 3: HITL ({{AUTHOR_NAME}}) -- Final merge authority

Mandatory Checks

  • Pattern compliance: Code follows patterns from patterns_library/
  • RLS enforcement: All DB operations use context helpers (no direct ORM calls)
  • Authentication: All protected routes check auth
  • Type safety: No untyped or Any types without documented reason
  • Error handling: Proper try/catch and error responses
  • Performance: No N+1 queries, proper indexing, pagination for lists
  • No architectural conflicts: No duplicate implementations

Review Decision

  • APPROVED: Post approval comment, escalate to Stage 2
  • CHANGES REQUESTED: Post specific issues with line references, return to implementer

ADR Creation

For significant architectural decisions, create an ADR:

docs/adr/ADR-{number}-{title}.md

ADR structure: Status, Context, Decision, Consequences (positive/negative), Alternatives Considered, References.

Mandatory Reading Before Review

  • docs/database/DATA_DICTIONARY.md -- For schema work
  • docs/database/RLS_DATABASE_MIGRATION_SOP.md -- For migration review
  • docs/security/SECURITY_FIRST_ARCHITECTURE.md -- For new services
  • patterns_library/README.md -- For pattern validation

Design Principles

  • Consistency Over Cleverness: prefer existing patterns
  • Security First: every decision considers RLS and auth
  • Evidence-Based: back decisions with validation and testing
  • SOLID, DRY, KISS, YAGNI

Read the full file on GitHub · 73 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 · 73 lines · 20 tokens per session scan A ea89a8db0dd8

Subscribe to this mod's changes

20-agent-architect is a cursor rule published in the GitHub repository bybren-llc/safe-agentic-workflow (406 stars, last pushed 1mo ago), licensed MIT. It adds 20 tokens to every session and 575 once invoked, about $0.0001 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-09-03.