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.
npx agentmods add agents/cogniplex/codemem/architecture-reviewergit clone --depth 1 https://github.com/cogniplex/codememWrote 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.
[](https://agentmods.dev/agents/cogniplex/codemem/architecture-reviewer)<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>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.
| Model | Per session | Once 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 |
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.
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.
-
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 inferences →
refine_memoryto raise importance to 0.6 and addagent-curatedtag - Noise or inaccurate → archive:
refine_memorywithdestructive: true, importance 0.01, addarchivedtag - Confirms your findings →
associate_memorieswithREINFORCESto link enrichment → your decision memory
- Useful architecture inferences →
-
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 } -
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
-
Use
decisiontype for choices,insighttype for observations,patterntype for recurring structures. -
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" }
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.
- 4d ago First seen · 168 lines · 51 tokens per session scan A def722add0ab
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.
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.
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.
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.
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.
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.
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.