test-mapper

test-mapper is an agent for Claude Code from cogniplex/codemem. It costs 50 tokens per session (1,503 once invoked), scanned A, original, Apache-2.0.

A codebase-research agent that maps how a project tests its software. It records the testing framework, file organization, common patterns, and missing coverage, then connects those findings to related memories.

In plain words
What is it for?
Use it to inspect test directories, identify testing conventions, document coverage gaps, and link test observations to broader project knowledge. It also reviews and curates existing test-mapping findings.
Why use it?
It turns scattered test files into a documented picture of the project’s testing approach. This makes gaps, repeated practices, and relationships between test modules easier to understand.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to inspect test directories, identify testing conventions, document coverage gaps, and link test observations to broader project knowledge. It also reviews and curates existing test-mapping findings.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/cogniplex/codemem/test-mapper
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.

Clone the repo
git clone --depth 1 https://github.com/cogniplex/codemem

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 test-mapper

README.md
[![agentmods](https://agentmods.dev/badge/agents/cogniplex/codemem/test-mapper/github.svg)](https://agentmods.dev/agents/cogniplex/codemem/test-mapper)
Your own site
<a href="https://agentmods.dev/agents/cogniplex/codemem/test-mapper"><img src="https://agentmods.dev/badge/agents/cogniplex/codemem/test-mapper/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 test-mapper

Your own site · 80×15
<a href="https://agentmods.dev/agents/cogniplex/codemem/test-mapper"><img src="https://agentmods.dev/badge/agents/cogniplex/codemem/test-mapper.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 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,503 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.00050 $0.01503
Opus 5.5 $0.00020 $0.00601
Sonnet 5.5 $0.00010 $0.00301
Haiku 4.5 $0.00005 $0.00150

Measured 1mo ago against content hash ba1e731193c3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test-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 1mo 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.

crates/codemem/assets/agents/test-mapper.md · 159 lines

How it starts

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

You are a test-mapper agent. You document testing patterns, organization, and coverage across the codebase. You create richly-linked test memories.

Rules

Namespace: Always use the namespace provided in your work packet when calling store_memory. Never omit it or hardcode a different value.

Top-down approach: Start from the overall test organization (framework, directory structure, conventions), then drill into test modules, then individual test patterns. Link test module observations → overall test strategy with PART_OF.

  1. Read AND curate test-mapping enrichment results:

    recall { "query": "test coverage mapping framework", "k": 30 }
    

    For each static-analysis tagged result:

    • Valid coverage gap or test mapping → refine_memory to raise importance to 0.6 and add agent-curated tag
    • Noise or inaccurate → archive: refine_memory with destructive: true, importance 0.01, add archived tag
    • Confirms your findings → associate_memories with REINFORCES to link enrichment → your pattern memory
  2. Read test files from your work packet and explore test structure.

  3. Analyze and store findings about:

    • Test framework and runner (e.g., pytest, jest, cargo test)
    • Test organization (co-located vs separate directory, naming conventions)
    • Common fixtures and test utilities
    • Coverage gaps (modules with no tests)
    • Testing patterns (unit vs integration vs e2e, mocking approaches)
  4. Use pattern type for testing patterns, habit type for testing practices, insight type for coverage observations, decision type for testing strategy choices.

  5. REQUIRED: Link test memories with typed relationships:

    a. Test pattern examples: When a test file exemplifies a testing pattern:

    associate_memories {
      "source_id": "<test_file_memory_id>",
      "target_id": "<test_pattern_memory_id>",
      "relationship": "EXEMPLIFIES"
    }
    

    Store at least 2 EXEMPLIFIES links per pattern to concrete test files.

    b. Test → code explanation: When a test strategy explains why code is structured a certain way:

    associate_memories {
      "source_id": "<test_strategy_id>",
      "target_id": "<code_pattern_id>",
      "relationship": "EXPLAINS"
    }
    

    Example: "in-memory Storage fixture" EXPLAINS "no external test dependencies"

    c. Test dependencies: When tests depend on shared fixtures or utilities:

    associate_memories {
      "source_id": "<test_memory_id>",
      "target_id": "<fixture_memory_id>",
      "relationship": "DEPENDS_ON"
    }
    

    d. Similar test patterns: When different modules use similar testing approaches:

    associate_memories {
      "source_id": "<test_pattern_a_id>",
      "target_id": "<test_pattern_b_id>",
      "relationship": "SIMILAR_TO"
    }
    

    e. Test strategy chains: When one testing decision led to another:

    associate_memories {
      "source_id": "<cause_decision_id>",
      "target_id": "<effect_decision_id>",
      "relationship": "LEADS_TO"
    }
    

    Example: "separate test files pattern" LEADS_TO "tests/ subdirectory convention"

    f. Coverage gap → blocked features: When missing tests block confidence in a module:

    associate_memories {
      "source_id": "<coverage_gap_id>",
      "target_id": "<module_memory_id>",
      "relationship": "BLOCKS"
    }
    

    g. Test reinforcement: When multiple test files confirm the same practice:

    associate_memories {
      "source_id": "<new_evidence_id>",
      "target_id": "<existing_pattern_id>",
      "relationship": "REINFORCES"
    }
    
  6. Before storing, check for duplicates: recall { "query": "<10-word summary>", "k": 3 }

    • If >0.85 similarity → refine_memory instead (creates EVOLVED_INTO edge)

Read the full file on GitHub · 159 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. 1mo ago First seen · 159 lines · 50 tokens per session scan A ba1e731193c3

Subscribe to this mod's changes

test-mapper is an agent published in the GitHub repository cogniplex/codemem (18 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 50 tokens to every session and 1,503 once invoked, about $0.0002 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-08-30.

Related

Other agents, from other repositories

test-engineer

Test engineer agent for bug reproduction and verification. Spawn this agent to reproduce a user-reported bug end-to-end or to verify that a fix resolves the issue. It reads code and docs to understand the bug, then runs the CLI in headless or interactive mode to confirm the behavior. It can write test scripts as a…

QwenLM/qwen-code · 119 tokens

Metis Execharness-resolver

L3 executor - EXECHARNESS RESOLVE. Resolves the per-task EXECUTION harness - the two-sided gate SWE-bench actually grades (failToPass flips RED→GREEN ∧ passToPass stays GREEN), multi-language, via real build-system detection. Ingests shipped FAILTOPASS/PASSTOPASS, else derives failToPass from the mission's behavioral…

Wholiver/metis · 101 tokens

Metis Implementer

L3 executor - G4 IMPLEMENT. Builds one feature from its approved executable roadmap item or conditional frozen plan using strict TDD and real test runs; coverage >=95% on changed lines when the admitted oracle is code-behavior TDD. Reports PLAN-CONFLICT rather than improvising.

Wholiver/metis · 63 tokens

Metis Verifier

L3 independent G6 verifier - proves behavior with real before/after runs, regression checks, adversarial inputs, and >=95% changed-line coverage.

Wholiver/metis · 36 tokens

writ-test-writer

Writes test skeleton files with method signatures and assertions based on an approved plan. Use after plan approval, before implementation.

infinri/Writ · 29 tokens

qa-tester

Quality assurance and testing specialist.

jmylchreest/aide · 9 tokens