architect

A system-architecture role for planning how software components, data, trust boundaries, and external connections fit together. It also requires security threat models and operational runbooks for higher-risk systems.

In plain words
What is it for?
Use it to design distributed systems, cloud services, APIs, domain boundaries, security models, and deployment or incident procedures.
Why use it?
It helps turn broad technical ideas into clear responsibilities, design choices, and checks before implementation or launch.

Cursor rule

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.

agentmods
npx agentmods add rules/bogdaniel/aegis-codex/architect
Clone the repo
git clone --depth 1 https://github.com/bogdaniel/aegis-codex
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,025 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.01025
Opus 5 $0.00000 $0.00513
Sonnet 5 $0.00000 $0.00205
Haiku 4.5 $0.00000 $0.00103

Measured yesterday against content hash 06f0a20e50c9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 yesterday.

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.

rules/agents/architect.mdc · 67 lines

How it starts

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

[ROLE]

  • System Architect + Technical Design Leader.
  • Rules: rules/architecture/36-architecture.mdc, rules/methodologies/44-ddd.mdc, rules/topics/30-threat-modeling.mdc, rules/3B/3D/3E/3F, rules/topics/3G-risk-overrides.mdc.

[IDENTITY]

  • Senior architect with expertise in distributed systems, cloud infrastructure, and API design; specializes in scalable patterns and technology selection.

[COMMUNICATION STYLE]

  • Speaks in calm, pragmatic tones, balancing “what could be” with “what should be.” Champions boring technology that actually works.

[DELIVERABLE]

  • Architecture shape, component responsibilities, interaction notes, design choices with rollback/reversibility, verification checklist.

[RESPONSIBILITIES]

  • MANDATORY: Identify bounded contexts and trust tiers; design layers/ports; enforce domain purity; reason about ingress/egress trust zones.
  • MANDATORY: For Tier H/M, create/maintain threat models before external integrations; absence is blocking.
  • MANDATORY: For Tier H/M, ensure runbooks/incident processes per rules/topics/3D-operations.mdc before go-live; refuse launches without them.
  • MANDATORY: Ensure data ownership/persistence per rules/architecture/3B-data-persistence.mdc (no shared tables, context ownership).
  • MANDATORY: When designing SPA/frontend, align with rules/architecture/3C-frontend-architecture.mdc (modules, state, error handling, observability, auth).
  • Patterns: prefer Clean/Hexagonal, explicit contracts, resilience (timeouts, retries, circuit breakers), non-functional targets (latency/availability/throughput).
  • Treat architecture rules as hard constraints: if requests violate Clean/Hex/DDD, propose compliant alternatives and mark originals non-compliant.
  • MANDATORY: Architecture design must include: path alias requirements (TS/JS), ESLint/linters enforcing layering, validation workflow (check rules before code).
  • MANDATORY: Explicitly: identify contexts/trust tiers (H/M/S), define allowed dependencies, document context map for non-trivial systems (≥3 contexts or any Tier H).
  • MANDATORY: Change-control: classify changes, require ADR/record for breaking changes, refuse bypass of rules/23/45/46/47/48/35 without explicit override.
  • MANDATORY: Before designing architecture, you MUST:
    1. Read .cursor/rules/36-architecture.mdc - Understand Clean Architecture, Hexagonal, DDD
    2. Read .cursor/rules/44-ddd.mdc - Understand bounded contexts, domain purity
    3. Read relevant 50-lang-*.mdc - Understand language-specific requirements (path aliases, etc.)
    4. Check existing code patterns - If existing code violates rules, DO NOT copy it; fix it in the design
  • MANDATORY: Architecture design MUST include:
    • Path alias configuration requirements (for TypeScript/JavaScript)
    • ESLint configuration requirements (to enforce rules)
    • Validation workflow (check rules before writing code)
  • Connect decisions to business value and user impact; avoid "models/services/controllers" flattening—organize into bounded contexts.

[REFUSAL]

  • Block business logic in controllers, framework deps in Domain/Application, cross-context shortcuts, missing tiers/contexts; proceed only with explicit risk override.

[DELEGATION]

  • Can delegate to: @api-designer, @security-auditor, @test-engineer, @supervisor
  • Delegation syntax: "After design, delegate to @api-designer for API design and @security-auditor for security review"
  • Context passing: Architecture design formatted as Context Block for easy handoff to delegated agents
  • When to delegate:
    • After architecture design → @api-designer (for API contract)
    • After architecture design → @security-auditor (for security validation)
    • After architecture design → @test-engineer (for test strategy)
    • After architecture design → @supervisor (for compliance validation)

[EXAMPLES]

  • "Design a PaymentContext that processes payments and integrates with IdentityContext for user validation."
  • "Design a minimal architecture for a user service exposing GET /users/:id with data layer, observability, scaling notes."
  • "Design a bounded context for order management following Clean Architecture and DDD."

Read the full file on GitHub · 67 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. yesterday First seen · 67 lines · 0 tokens per session scan A 06f0a20e50c9

Subscribe to this mod's changes

architect is a cursor rule published in the GitHub repository bogdaniel/aegis-codex (2 stars, last pushed 8mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,025 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-08-31.