ariadne: Agent for Claude Code

.claude/agents/refactor-investigator.md

refactor-investigator is an agent for Claude Code from CRJFisher/ariadne. It costs 145 tokens per session (2,149 once invoked), scanned A, original, MIT.

A code-investigation agent that turns one group of related software faults into a single refactoring plan grounded in the actual code.

In plain words
What is it for?
Use it to inspect the relevant files, identify the right level of change, and describe one coherent fix without writing source code.
Why use it?
It prevents separate quick fixes from missing a shared architectural cause or targeting dead and duplicated code.

Agent for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: model in frontmatter.

This is CRJFisher/ariadne's own configuration. It tells Claude Code how to work on ariadne itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ariadne configures →

Reuse

Borrowing it

Nothing to install: this file belongs to CRJFisher/ariadne. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/CRJFisher/ariadne/main/.claude/agents/refactor-investigator.md
Clone the repo
git clone --depth 1 https://github.com/CRJFisher/ariadne

Made for: Claude Code.

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 refactor-investigator

README.md
[![agentmods](https://agentmods.dev/badge/agents/crjfisher/ariadne/refactor-investigator/github.svg)](https://agentmods.dev/agents/crjfisher/ariadne/refactor-investigator)
Your own site
<a href="https://agentmods.dev/agents/crjfisher/ariadne/refactor-investigator"><img src="https://agentmods.dev/badge/agents/crjfisher/ariadne/refactor-investigator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for refactor-investigator

Your own site · 80×15
<a href="https://agentmods.dev/agents/crjfisher/ariadne/refactor-investigator"><img src="https://agentmods.dev/badge/agents/crjfisher/ariadne/refactor-investigator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 145 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,149 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00145 $0.02149
Opus 5.5 $0.00058 $0.00860
Sonnet 5.5 $0.00029 $0.00430
Haiku 4.5 $0.00015 $0.00215

Measured 5d ago against content hash 975da7dbfcc0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

refactor-investigator 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.

.claude/agents/refactor-investigator.md · 156 lines

How it starts

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

Purpose

The prioritize skill has selected the candidate PlanTask rows for one AriadneFaultArea and handed you exactly one change group: the architectural root, its fault_area node, and the localized leaves that together fix that area. The plan engine produced this group cheaply — its strategist trusts the triage evidence rollup, spot-checks at most a few lines, and never reads the cited files front to back. Its job is to route and size, not to design the fix.

Your job is the design the plan deliberately deferred: investigate the real code and produce one coherent refactoring plan that resolves every issue in the group. You are the stage that gets to grips with packages/core, so you find what the rollup cannot — that three "independent localized fixes" are really one data-completeness move, that a cited path is dead code, that a member surface is built twice by two drifting builders, that the right altitude is one language-agnostic change with the per-language leaves as thin adapters.

You do not author source code, a classifier, a registry entry, or a backlog task. You produce a plan. The prioritize skill renders your plan into a comprehension doc and, when the human funds the group, graduates it into backlog/ alongside the epic.

Hydrate the change group

Your dispatch prompt contains:

  • fault_area — the group's AriadneFaultArea.
  • row_paths[] — the ~/.ariadne/plan/tasks/<id>.json files for the group's rows (root + fault_area node + localized leaves).
  • output_path — where to write your plan (under ~/.ariadne/prioritize/<timestamp>/<fault_area>/refactor_plan.md).

Read every row. Each PlanTask carries tier, title, body, fault_area, core_fix_effort / core_fix_effort_rationale, and evidence[] — one row per false-positive with member_evidence (file/line/why), member_symbol, project, diagnosis, and resolution_failure. The leaves carry the real evidence; the root and faultarea node inherit it by union. Treat the evidence as the ground truth of _what is failing and where; treat the plan bodies as a hypothesis about the fix that you must verify against the code.

Read the full file on GitHub · 156 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 Changed 975da7dbfcc0
  2. 17d ago First seen · 156 lines · 145 tokens per session scan A 61b9e03e227d

Subscribe to this mod's changes

refactor-investigator is an agent published in the GitHub repository CRJFisher/ariadne (23 stars, last pushed 4d ago), licensed MIT. It adds 145 tokens to every session and 2,149 once invoked, about $0.0006 per session on Opus 5.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-10-06.

Related

Other agents, from other repositories