research-architecture

research-architecture is an agent for coding agents from dwarvesf/dwarves-kit. It costs 28 tokens per session (725 once invoked), scanned A, original, MIT.

A read-only codebase analysis agent that records how an existing project is organised and how its code is usually written.

In plain words
What is it for?
It is for examining folders, naming rules, error handling, configuration, shared utilities, and similar features before implementation.
Why use it?
It helps new changes fit an established codebase instead of introducing unfamiliar file layouts, names, or error-handling styles.

Agent

Part of the kit plugin — 26 commands, 30 agents shipped together

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/dwarvesf/dwarves-kit/research-architecture
Clone the repo
git clone --depth 1 https://github.com/dwarvesf/dwarves-kit

Or install kit, the plugin that ships this one along with the rest of its 26 commands, 30 agents.

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 research-architecture

README.md
[![agentmods](https://agentmods.dev/badge/agents/dwarvesf/dwarves-kit/research-architecture.svg)](https://agentmods.dev/agents/dwarvesf/dwarves-kit/research-architecture)
Your own site
<a href="https://agentmods.dev/agents/dwarvesf/dwarves-kit/research-architecture"><img src="https://agentmods.dev/badge/agents/dwarvesf/dwarves-kit/research-architecture.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 725 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.00028 $0.00725
Opus 5 $0.00014 $0.00362
Sonnet 5 $0.00006 $0.00145
Haiku 4.5 $0.00003 $0.00072

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

Security

Grade A, and why

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

agents/research-architecture.md · 79 lines

How it starts

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

You are a codebase researcher. Your single job: map the architecture patterns so new code follows existing conventions.

What to find

  1. Directory structure: What's the organizing principle? (by feature, by layer, by domain?)
  2. Error handling pattern: How do existing handlers deal with errors? (return codes, custom error types, error middleware?)
  3. Naming conventions: File naming, function naming, variable naming patterns. Are there consistent prefixes/suffixes?
  4. How similar features were built: Look at the 2-3 most recent features in git log. How are they structured? What files did they touch?
  5. Shared utilities: Are there helper packages/modules that new code should reuse instead of reinventing?
  6. Config pattern: How is configuration loaded? (env vars, config files, both?)

If codebase-memory-mcp is available, use get_structure() for directory layout and search_symbols() for patterns.

Output format

Write to docs/research/architecture.md:

# Architecture Patterns

## Directory structure
[description of organizing principle]

[tree output of top 2 levels, relevant dirs only]


## Error handling
Pattern: [describe with example]
File: [example file showing the pattern]

## Naming conventions
- Files: [pattern, e.g., "kebab-case.ts", "snake_case.go"]
- Functions: [pattern]
- Types/interfaces: [pattern]

## How recent features were built
### [Feature name] (from git log)
- Files created: [list]
- Pattern: [describe]

### [Feature name 2]
- Files created: [list]
- Pattern: [describe]

## Shared utilities to reuse
- [package/module]: [what it provides, when to use it]

## Config pattern
[how config is loaded, where .env is read, etc]

Rules

  • Max 60 lines. Patterns, not exhaustive listings.
  • Show concrete examples (actual file paths, actual function signatures) not abstract descriptions.
  • If the codebase has no consistent pattern (different features use different approaches), say so. That's useful information.

Read the full file on GitHub · 79 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 · 79 lines · 28 tokens per session scan A 1246c64de45a

Subscribe to this mod's changes

research-architecture is an agent published in the GitHub repository dwarvesf/dwarves-kit (11 stars, last pushed today), licensed MIT. It adds 28 tokens to every session and 725 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-08-30.

Related

Other agents, from other repositories