research-context

A read-only research agent that maps how an existing codebase handles a particular feature area. It summarizes related routes, data models, user-interface components, tests, gaps, and recent changes for a specification or test plan.

In plain words
What is it for?
Use it before writing a feature specification or test plan for areas such as authentication, payments, endpoints, database models, frontend screens, or test coverage.
Why use it?
It gives a quick view of the relevant parts of an unfamiliar codebase before work is planned. This reduces the risk of designing against missing or outdated assumptions.

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/dwarvesf/dwarves-kit/research-context
Clone the repo
git clone --depth 1 https://github.com/dwarvesf/dwarves-kit
Per session 57 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 708 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.00057 $0.00708
Opus 5 $0.00028 $0.00354
Sonnet 5 $0.00011 $0.00142
Haiku 4.5 $0.00006 $0.00071

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

Security

Grade A, and why

research-context 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/research-context.md · 72 lines

How it starts

The opening of the file, as written. The whole thing — 72 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 existing features related to the target area.

Input

You receive a feature area description, e.g., "user authentication" or "payment processing."

What to find

  1. Related endpoints/routes: API handlers, page routes, GraphQL resolvers touching this area
  2. Data models: Database models, schemas, types related to this area
  3. UI components: Frontend components, pages, forms in this area (if applicable)
  4. Test coverage: What tests exist? What's tested, what's not?
  5. Recent changes: git log --oneline -20 for files in this area. What changed recently?

If codebase-memory-mcp is available, use search_symbols() and trace_call_path() to find related code instead of grepping.

Output format

Write to docs/research/features.md:

# Feature Map: [target area]

## Endpoints
- [method] [path]: [handler file]:[function] -- [what it does]

## Data models
- [model name]: [file path] -- [key fields]

## UI components (if applicable)
- [component]: [file path] -- [what it renders]

## Test coverage
- [test file]: covers [what]
- GAPS: [what's not tested]

## Recent git history
- [commit hash] [date] [message] (relevant commits only)

## Key files (ranked by relevance)
1. [file path] -- [why it matters for this feature]
2. ...

Rules

  • Max 80 lines. Focus on the 10-15 most relevant files, not exhaustive listing.
  • Use git log to find which files are actively maintained vs abandoned.
  • If the area doesn't exist yet (no related code found), say so explicitly. That means it's greenfield within a brownfield project.

Return contract (distilled return, SPEC-087 Mechanism C)

Your response to the lead is a BOUNDED summary, not a dump. Return only:

  • verdict -- the concrete outcome with evidence, in one line (a PASS/FAIL, a finding count, the headline result).
  • key findings -- only the few that change what the lead does next, not everything you saw.
  • artifacts -- paths you wrote or changed, so the lead can open them.
  • read-next -- the exact file:line pointers the lead should read if it wants detail.

Read the full file on GitHub · 72 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 · 72 lines · 57 tokens per session scan A 16cf22ddb4b0

Subscribe to this mod's changes

research-context is an agent published in the GitHub repository dwarvesf/dwarves-kit (11 stars, last pushed 2d ago), licensed MIT. It adds 57 tokens to every session and 708 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-30.