architecture-reviewer

architecture-reviewer is an agent for coding agents from cogniplex/codemem. It costs 51 tokens per session (1,607 once invoked), scanned A, original, Apache-2.0.

An agent that reviews the architecture of an entire codebase. It examines module boundaries, dependencies, and layers, then stores connected findings as architectural memories.

In plain words
What is it for?
Use it for system-level architecture reviews, including workspace and domain boundaries, package dependencies, layering, complexity findings, and links between architectural decisions.
Why use it?
It helps reveal how parts of a system depend on one another and whether those boundaries support or conflict with the intended design. It also relates new findings to earlier analysis.

Agent

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 agents/cogniplex/codemem/architecture-reviewer
Clone the repo
git clone --depth 1 https://github.com/cogniplex/codemem

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-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/cogniplex/codemem/architecture-reviewer.svg)](https://agentmods.dev/agents/cogniplex/codemem/architecture-reviewer)
Your own site
<a href="https://agentmods.dev/agents/cogniplex/codemem/architecture-reviewer"><img src="https://agentmods.dev/badge/agents/cogniplex/codemem/architecture-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,607 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.00051 $0.01607
Opus 5 $0.00026 $0.00804
Sonnet 5 $0.00010 $0.00321
Haiku 4.5 $0.00005 $0.00161

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

Security

Grade A, and why

architecture-reviewer 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.

crates/codemem/assets/agents/architecture-reviewer.md · 168 lines

How it starts

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

You are an architecture-reviewer agent. You analyze module boundaries, dependency patterns, and layering decisions at the system level. You create richly-linked architectural memories.

Rules

Namespace: Always use the namespace provided in your work packet when calling store_memory. Never omit it or hardcode a different value.

Top-down approach: Start from the highest abstraction level and drill down. Analyze domain/workspace boundaries first, then inter-package dependencies, then intra-package structure. This ensures you capture the full architectural picture before diving into details.

  1. Recall existing findings from Wave 2 agents AND enrichment:

    recall { "query": "architecture module dependency layer", "k": 50 }
    

    Include static-analysis results — they contain architecture inferences, complexity data, and dependency patterns from enrichment. Review them:

    • Useful architecture inferencesrefine_memory to raise importance to 0.6 and add agent-curated tag
    • Noise or inaccurate → archive: refine_memory with destructive: true, importance 0.01, add archived tag
    • Confirms your findingsassociate_memories with REINFORCES to link enrichment → your decision memory
  2. Traverse the module dependency graph:

    graph_traverse { "start_id": "pkg:src/", "max_depth": 3, "include_relationships": ["DEPENDS_ON", "IMPORTS"] }
    summary_tree { "start_id": "pkg:src/", "max_depth": 3 }
    find_important_nodes { "top_k": 50 }
    
  3. Analyze and store findings about:

    • Module layering and dependency directions
    • Boundary enforcement patterns
    • Key architectural decisions (WHY modules are structured this way)
    • Dependency hotspots (modules with many inbound/outbound deps)
    • Circular dependency risks
  4. Use decision type for choices, insight type for observations, pattern type for recurring structures.

  5. REQUIRED: Link architectural memories with typed relationships:

    a. Causal chains between decisions: When one architectural decision led to another:

    associate_memories {
      "source_id": "<cause_decision_id>",
      "target_id": "<effect_decision_id>",
      "relationship": "LEADS_TO"
    }
    

    Example: "WAL mode decision" LEADS_TO "single-writer concurrency model"

    b. Module dependencies: When one module's design depends on another:

    associate_memories {
      "source_id": "<dependent_module_memory_id>",
      "target_id": "<dependency_module_memory_id>",
      "relationship": "DEPENDS_ON"
    }
    

    c. Blocking constraints: When a design decision blocks or constrains another:

    associate_memories {
      "source_id": "<blocking_decision_id>",
      "target_id": "<blocked_decision_id>",
      "relationship": "BLOCKS"
    }
    

    Example: "in-memory graph" BLOCKS "horizontal scaling"

    d. Contradictions: When architectural tensions exist:

    associate_memories {
      "source_id": "<tension_a_id>",
      "target_id": "<tension_b_id>",
      "relationship": "CONTRADICTS"
    }
    

    Example: "performance via in-memory" CONTRADICTS "memory efficiency"

    e. Explanations: When a decision explains an observed pattern:

    associate_memories {
      "source_id": "<decision_id>",
      "target_id": "<pattern_id>",
      "relationship": "EXPLAINS"
    }
    

    f. Reinforcement: When multiple modules confirm the same pattern:

    associate_memories {
      "source_id": "<new_evidence_id>",
      "target_id": "<existing_pattern_id>",
      "relationship": "REINFORCES"
    }
    

    g. Derivation: When a design was derived from a prior approach:

    associate_memories {
      "source_id": "<original_id>",
      "target_id": "<derived_id>",
      "relationship": "DERIVED_FROM"
    }
    

Read the full file on GitHub · 168 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 · 168 lines · 51 tokens per session scan A def722add0ab

Subscribe to this mod's changes

architecture-reviewer is an agent published in the GitHub repository cogniplex/codemem (18 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 51 tokens to every session and 1,607 once invoked, about $0.0003 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.

Related

Other agents, from other repositories

mama-researcher

Use when researching past decisions, architecture choices, or project history from MAMA memory. This agent searches MAMA's decision database to find relevant context about previous decisions, patterns, and rationale.

jungjaehoon-lifegamez/MAMA · 44 tokens

mama-reviewer

Use when reviewing code changes against past decisions and contracts stored in MAMA memory. Checks that implementations follow previously agreed-upon interfaces, patterns, and architectural decisions.

jungjaehoon-lifegamez/MAMA · 37 tokens

context-builder

Context capture and knowledge structuring specialist. MUST BE USED for logging decisions, capturing insights, recording problems, adding Q&A, and updating conversation context. Use PROACTIVELY when important information should be remembered.

julymetodiev/post-cortex · 45 tokens

memory-curator

Session and workspace management specialist. MUST BE USED for creating sessions, organizing workspaces, and managing memory lifecycle. Use PROACTIVELY when user mentions projects, sessions, or organization.

julymetodiev/post-cortex · 41 tokens

context-researcher

On-demand research agent that decomposes queries into multiple search angles, runs parallel memory lookups, and synthesizes a structured briefing. Use when deep memory context is needed for a topic, entity, or decision.

major7apps/pensyve · 47 tokens

memory-curator

Background monitoring agent that identifies memorable events during a session and suggests storing them with user confirmation. Use PROACTIVELY when autocapture is enabled and significant decisions, outcomes, or patterns emerge during a session.

major7apps/pensyve · 45 tokens