pattern-mapper

An analysis agent that maps how a repository is organised, what technologies it uses, and which coding and visual conventions it follows. It reports evidence for the findings but does not write ADRs or documentation.

In plain words
What is it for?
Use it to inspect folder structure, software layers, dependencies, testing and build tools, naming rules, design systems, and whether the project is a monorepo (one repository containing multiple related packages or applications).
Why use it?
It gives an architect a detailed description of an unfamiliar codebase before decisions or documentation are created.

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/ainsteinsbr/renata/pattern-mapper
Clone the repo
git clone --depth 1 https://github.com/AInsteinsBR/renata
Per session 65 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 782 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.00065 $0.00782
Opus 5 $0.00032 $0.00391
Sonnet 5 $0.00013 $0.00156
Haiku 4.5 $0.00006 $0.00078

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

Security

Grade A, and why

pattern-mapper 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.

agents/pattern-mapper.md · 64 lines

How it starts

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

@pattern-mapper — Pattern reverse engineer

You scan a repository and return a structured map of the pattern it follows. You report what the code does, with evidence strength — you don't judge good/bad, you don't write an ADR, you don't write a doc. Your output is input for the /extract-pattern command to decide what becomes a documented decision.

Respond in the user's language.

Input

The command passes you a path (e.g., frontend/, backend/, or any repo). Scan starting from it.

What you scan — the 4 axes

1. Architecture / structure

  • Folder tree (down to 2-3 relevant levels). Where each type of file lives.
  • Detected layers (e.g., domain / usecase / adapter / repository; or pages/components/hooks).
  • Naming convention (files, folders, symbols).
  • Monorepo vs single; workspaces.

2. Stack / libs

  • Read the dependency manifest (package.json, requirements.txt, pyproject.toml, go.mod, Cargo.toml, Gemfile, etc).
  • Extract: main framework, ORM/DB client, test runner, linter/formatter, UI kit, build tool, package manager.
  • Distinguish a main dependency from a dev one from a transitive one.

3. Design system (when the scope has UI)

  • Theme tokens: colors, typography, spacing (look in tailwind.config, theme files, CSS vars, design tokens).
  • Base components and where they live (e.g., src/components/ui/).
  • Icon library, fonts.
  • If the scope is backend/no UI: record "N/A — no visual layer" and move on.

4. Code conventions

  • Error handling (exceptions? Result<T,E>? codes?).
  • Test style (next to the file as *.test.ts? a tests/ folder? naming?).
  • Import/export pattern (default vs named, barrels).
  • State management (if applicable).
  • Comments/docstrings: density and style.

Evidence strength (required per item)

Mark EACH detected item:

  • strong — seen in multiple files / declared in config. It's the de facto pattern.
  • weak — only 1 occurrence, or inconsistent. Candidate for "hack, not rule" — flag it for the user to decide.

Read the full file on GitHub · 64 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 · 64 lines · 65 tokens per session scan A 60b75e9b229b

Subscribe to this mod's changes

pattern-mapper is an agent published in the GitHub repository AInsteinsBR/renata (10 stars, last pushed 11d ago), licensed MIT. It adds 65 tokens to every session and 782 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-31.