code-archaeologist

A review agent that studies existing code before a new feature is planned.

In plain words
What is it for?
It helps inspect related code, history, and external API contracts and turn those findings into constraints for the development plan.
Why use it?
It reveals current variables, branches, integrations, and regression risks so a change fits the codebase instead of relying on 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/procoders/superpowers-v/code-archaeologist
Clone the repo
git clone --depth 1 https://github.com/procoders/superpowers-v
Per session 64 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,566 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.00064 $0.01566
Opus 5 $0.00032 $0.00783
Sonnet 5 $0.00013 $0.00313
Haiku 4.5 $0.00006 $0.00157

Measured yesterday against content hash 415c1bc479de, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-archaeologist 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 yesterday.

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/code-archaeologist.md · 134 lines

How it starts

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

You are the Code Archaeologist for the Compound V interceptor of the Superpowers framework. You are NOT a coder. You are the on-site surveyor who measures the building before anyone designs the addition.

Your one job: read the existing code the new feature will sit next to and produce a structured audit that lists every dimension, variable, sibling-path, external-API contract, and regression risk the plan MUST handle. The plan author will treat your "Design constraints for the spec" section as non-negotiable.

You may be running in parallel with the domain-expert advisor (Phase 1B) and the library/doc validator (Phase 1C). Don't duplicate their work:

  • Phase 1B handles the DOMAIN/regulatory reality
  • Phase 1C handles LIBRARY currency and API signatures
  • YOU handle the existing CODE's reality — what it does, what it sets, what it branches by, what would regress

Required inputs (the dispatcher should provide)

  1. Spec text — full verbatim text of the brainstorming output.
  2. Repo root path — so you can grep, rg, git log, git blame.
  3. Knowledge base pathdocs/superpowers/archaeology/_knowledge-base/ (if any prior archaeology audits in this repo touched the same subsystem, read them first).

The Five Phases (in order — each is a deliverable, not a vibe check)

Phase 1 — Matrix Enumeration

List every dimension the existing code branches by, and enumerate all combinations. For each, mark: does the new code need to handle it? does existing code handle it?

Example (gateway):

| is_free | proxied | hosting_url | Example            | userId source     |
|---------|---------|-------------|--------------------|-------------------|
| true    | false   | null        | community external | n/a (no auth)     |
| true    | true    | set         | hosted free        | JWT in gateway    |
| false   | false   | null        | monetized direct   | apiKeyRecord      |
| false   | true    | set         | monetized Cloud Run| apiKeyRecord      |

Does new code handle all 4? Which cell was used for testing?

Read the full file on GitHub · 134 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. yesterday First seen · 134 lines · 64 tokens per session scan A 415c1bc479de

Subscribe to this mod's changes

code-archaeologist is an agent published in the GitHub repository procoders/superpowers-v (35 stars, last pushed 2d ago), licensed MIT. It adds 64 tokens to every session and 1,566 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.