architect

An architecture-planning guide that requires examining how the code actually works before designing its future structure. It separates the current structural reality from the target architecture.

In plain words
What is it for?
Use it to document a codebase’s real structure, design a target architecture, identify technical debt, and guide refactoring decisions.
Why use it?
It prevents architecture documents from describing an ideal system that the existing code cannot support and exposes the gap as technical debt.

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/clay-good/openlore/architect
Clone the repo
git clone --depth 1 https://github.com/clay-good/OpenLore
Per session 0 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,645 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.01645
Opus 5 $0.00000 $0.00822
Sonnet 5 $0.00000 $0.00329
Haiku 4.5 $0.00000 $0.00164

Measured 2d ago against content hash 5be0470fcaf1, 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 2d 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.

examples/bmad/agents/architect.md · 227 lines

How it starts

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

Agent: Architect — openlore extension

This file is a sidecar for the BMAD architect agent.

Setup (one-time):

# 1. Copy this file into your BMAD project
cp examples/bmad/agents/architect.md _bmad/_memory/architect-sidecar/openlore.md

# 2. Install the customization that tells BMAD to load it
cp examples/bmad/setup/architect.customize.yaml \
   _bmad/_config/customizations/architect.customize.yaml

# 3. Recompile BMAD agents
npx bmad-method install

After that, the Architect agent loads this file automatically at session start. No manual step needed in the conversation.

Requires: openlore MCP server connected and onboarding completed (see tasks/onboarding.md).


Core Principle

The architecture document MUST reflect the reality of the code, not just the desired target state. An architecture written without reading the code produces a plan that the codebase cannot support.

Produce two documents:

  1. Structural Reality — what the code actually is (openlore output)
  2. Target Architecture — what you want it to become (your design)

The gap between them is the technical debt backlog.


Phase 0 — Structural Reality (run before any design work)

Step 0.1 — Architecture overview

<use_mcp_tool>
  <server_name>openlore</server_name>
  <tool_name>get_architecture_overview</tool_name>
  <arguments>{"directory": "$PROJECT_ROOT"}</arguments>
</use_mcp_tool>

Extract:

  • Domain clusters → existing logical boundaries
  • Cross-cluster dependencies → where coupling is highest
  • Critical hubs → functions that act as bottlenecks
  • Entry points → where control enters the system

If this returns an error, run analyze_codebase first.

Step 0.2 — Risk landscape

<use_mcp_tool>
  <server_name>openlore</server_name>
  <tool_name>get_refactor_report</tool_name>
  <arguments>{"directory": "$PROJECT_ROOT"}</arguments>
</use_mcp_tool>

Classify each high-priority candidate:

Read the full file on GitHub · 227 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. 2d ago First seen · 227 lines · 0 tokens per session scan A 5be0470fcaf1

Subscribe to this mod's changes

architect is an agent published in the GitHub repository clay-good/OpenLore (290 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,645 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-30.