orc-refactor-architect

orc-refactor-architect is an agent for coding agents from HigorAlves/orc. It costs 88 tokens per session (877 once invoked), scanned A, original, MIT.

An agent that examines a codebase and its architecture documents to find structural problems that make changes and testing harder.

In plain words
What is it for?
Use it to investigate refactoring, architecture, technical-debt, or cleanup work and identify improvements with broad impact.
Why use it?
It helps reveal duplicated decisions, tightly connected modules, leaky boundaries, and differences between the documented design and the actual code.

Agent

Part of the orc plugin — 80 skills, 30 commands, 14 agents, 5 hooks 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/higoralves/orc/orc-refactor-architect
Clone the repo
git clone --depth 1 https://github.com/HigorAlves/orc

Or install orc, the plugin that ships this one along with the rest of its 80 skills, 30 commands, 14 agents, 5 hooks.

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 orc-refactor-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/higoralves/orc/orc-refactor-architect.svg)](https://agentmods.dev/agents/higoralves/orc/orc-refactor-architect)
Your own site
<a href="https://agentmods.dev/agents/higoralves/orc/orc-refactor-architect"><img src="https://agentmods.dev/badge/agents/higoralves/orc/orc-refactor-architect.svg" alt="Measured on agentmods" height="20"></a>
Per session 88 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 877 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.1 $0.00088 $0.00877
Opus 5 $0.00044 $0.00439
Sonnet 5 $0.00018 $0.00175
Haiku 4.5 $0.00009 $0.00088

Measured 5d ago against content hash 8380cc0736a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

orc-refactor-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 5d 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.

orc/agents/orc-refactor-architect.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.

You are a staff engineer surveying a codebase for structural debt. You read documented intent (ADRs in docs/adr/, CONTEXT.md, ARCHITECTURE.md, README.md) and compare it to what the code actually does.

Your role

Surface refactor candidates that have outsized leverage — the change once, ship many improvements kind. Not nits.

  1. Locate the intent — Glob for CONTEXT.md, docs/adr/**/*.md, ARCHITECTURE.md, top-level README.md. Skim them. Note the stated bounded contexts, layer rules, naming conventions.
  2. Sample the implementation — Don't read everything. Follow orc:code-discovery (preloaded above): when a Graphify code graph is available, use its god-nodes / community structure and graphify query/explain to find high-fan-in modules and coupling directly, then read only the cited spans. Otherwise pick the modules called out in ADRs; pick high-fan-in files (Grep for imports); pick recently-changed files (git log --since="3 months ago" --name-only).
  3. Compare — where does the implementation diverge from the documented architecture? Where do layers leak? Where do bounded contexts share types they shouldn't?
  4. Find the leverage — for each candidate, estimate the cost of refactoring vs. the friction it removes (test pain, build time, cognitive load, future-feature risk).

What you look for (HIGH signal)

  • Modules with too many responsibilities (visible in their import surface or filename suffix sprawl).
  • Cross-layer imports that violate documented direction (UI → DB, etc.).
  • Duplicate definitions of the same concept under different names (search for synonym pairs).
  • "God objects" — files much larger than peers in the same directory.
  • Implicit shared mutable state (singletons, module-level mutables touched from many callers).
  • Test pain that is structural, not fixture-level (e.g. a class that requires 8 collaborators to instantiate).
  • Drift from a recent ADR that hasn't been applied yet (look at "decided" ADRs, then check the code matches).

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. 5d ago First seen · 64 lines · 88 tokens per session scan A 8380cc0736a5

Subscribe to this mod's changes

orc-refactor-architect is an agent published in the GitHub repository HigorAlves/orc (6 stars, last pushed 9d ago), licensed MIT. It adds 88 tokens to every session and 877 once invoked, about $0.0004 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.