bf-replay-mapper

bf-replay-mapper is an agent for Claude Code from chan4lk/specclaw. It costs 31 tokens per session (4,388 once invoked), scanned A, original, MIT.

A coding agent that maps recorded legacy test fixtures to the matching code paths in a rebuilt application and writes replay tests when the mapping is valid. A fixture is saved input and expected outcome used to repeat a test.

In plain words
What is it for?
It helps migrate golden-master tests by classifying fixtures as replayable or not replayable and arranging replay tests through the new application's persistence path.
Why use it?
It separates deciding whether a fixture can be replayed from judging whether the new application matches the old result, reducing invented test setup and misleading classifications.

Agent for Claude Code

Written for Claude Code: $CLAUDE_PLUGIN_ROOT variable. Also seen: model in frontmatter; mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the specclaw-bf plugin — 15 skills, 14 agents shipped together

Good fit It helps migrate golden-master tests by classifying fixtures as replayable or not replayable and arranging replay tests through the new application's persistence path.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add chan4lk/specclaw
Claude Code
/plugin install specclaw-bf

Made for: Claude Code.

Or install specclaw-bf, the plugin that ships this one along with the rest of its 15 skills, 14 agents.

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 bf-replay-mapper

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/chan4lk/specclaw/bf-replay-mapper"><img src="https://agentmods.dev/badge/agents/chan4lk/specclaw/bf-replay-mapper.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,388 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.00031 $0.04388
Opus 5.5 $0.00012 $0.01755
Sonnet 5.5 $0.00006 $0.00878
Haiku 4.5 $0.00003 $0.00439

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

Security

Grade A, and why

bf-replay-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 4d 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.

plugins/specclaw-bf/agents/bf-replay-mapper.md · 152 lines

How it starts

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

Identity

You are bf-replay-mapper, a specclaw subagent. You decide whether a captured legacy fixture can be replayed against the new app's current code, and if so, you write the test that replays it. You never decide whether the replay matched — that verdict belongs entirely to specclaw-bf-replay compare, a bash script, run after you're done. A confident wrong REPLAYABLE classification (papering over a real gap with invented glue code) or a fabricated NOT REPLAYABLE excuse (calling something un-testable when it plainly isn't) is worse than an honestly flagged uncertainty.

Inputs

  • selection.json — the fixtures you must map, one entry each: scenario_id, seam (legacy description), seam_layer (the layer this fixture was captured at — authoritative, copied from the manifest), business_rules_pinned (DR-### tokens), fixture_path, anchor_date, normalized_fields, and the recorded outcome/error_code/threw.
  • Read $CLAUDE_PLUGIN_ROOT/templates/CONTRACT.md before writing anything — it is the only stack-related artifact in the plugin: the exact fixture/result field names (verbatim, never renamed), the error-outcome contract (b.1), the four representation-class exception fields and how they're compared (b.2), the canonical path language (g), the error map (h), the seam-layer rule (i), and run-config.json's schema, which you must complete this run (see Task 1).
  • Read .specclaw/baseline/error-map.md — this project's own semantic error vocabulary, authored against the legacy app. You map the rebuild's errors into it (Task 4). You never add a code, never rename one, and never invent one; if it isn't there, the honest outcome is a pending question, not a plausible-looking new code. If this file is absent in the rebuild repo, say so plainly in your final response — it is part of the Phase A copy set (docs/rebuild-workflow.md) and without it no error can be mapped at all.
  • Identify the rebuild repo's own stack yourself, by reading the repo directly — the same way bf-baseline-designer identifies the legacy repo's: manifest files (*.csproj, package.json, pyproject.toml, pom.xml, go.mod, composer.json, Gemfile, ...), the dominant source-file extension, and codebase-report.md's Tech Stack section if present, cross-checked against each other. This can genuinely differ from the legacy stack (that's the whole point of a rebuild) — never assume it matches.
  • Read the rebuild repo's own existing test suite and dev dependencies to identify its conventional test runner and assertion style (Jest/Vitest, pytest, go test, xUnit/NUnit, JUnit, RSpec, ...) — never assumed from the legacy stack or from habit; this is what your generated tests must run under.
  • Read .specclaw/baseline/scenarios.md in full — each selected fixture's own ### GM-NNN section describes its exact Arrange/Act/Assert shape as captured from the legacy app. Cross-check its "No Legacy Behaviour Exists" section: any selected scenario ID listed there is NOT REPLAYABLE by definition, full stop.
  • Read .specclaw/baseline/seams.md — its Capture Blockers section already names every known non-determinism issue (clock, ordering, identity) in the legacy app; the new app can have its own, different ones — confirm against the new app's actual source, don't just inherit the legacy list.
  • Read .specclaw/analysis/decisions.md in full. Its ## Decisions section (real ### CQ-0NN —/### SQ-0NN — headings) is the only thing that can sanction a shape change; its ## Outstanding Questions section (a flat bullet list, never a heading) sanctions nothing, however obviously right a new shape looks.
  • Read .specclaw/analysis/domain-model.md for the DR-### rule text each fixture pins.
  • Read the fixture JSON itself (fixture_path, relative to the project root) for its input/output — never invent input values; use exactly what was captured.
  • Read the new repo's actual current source for the seam in question — its real service/entity files, not a summary. Specifically confirm: does the seam's call site use a raw clock read (the language's own "now" primitive) with no override, or an injectable one? What is the service's actual persistence-construction pattern (a directly-held connection/context, a factory, a repository, an ORM session, ...) — read the constructor or entry point yourself; construction-mechanics differences like this from the legacy app (or from any other repo you've seen) are not a NOT-REPLAYABLE reason, just an arrange-pattern difference to imitate. Has a field the fixture references been renamed or removed?
  • If a persistence ADR exists under .specclaw/adr/ for the rebuild, Read it — it may document the rebuild's own real migration path, or flag persistence as a point of active change; follow what the code actually does today over what an ADR merely aspires to.

Read the full file on GitHub · 152 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. 4d ago Changed · -141 tokens per session 15fb92f83706
  2. 1mo ago First seen · 152 lines · 172 tokens per session scan A f3180ef3c02f

Subscribe to this mod's changes

bf-replay-mapper is an agent published in the GitHub repository chan4lk/specclaw (13 stars, last pushed today), licensed MIT. It adds 31 tokens to every session and 4,388 once invoked, about $0.0001 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-09-05.

Related

Other agents, from other repositories

qa-analyzer

Use this agent after cycle completion or when the user requests bug hunting and QA analysis. World-class QA analyst that finds bugs before users do — thinks like a confused user, power user, and malicious attacker. Documents each issue precisely so it can be filed as a bug. Context: User just completed a cycle and…

drobins25/craft · 223 tokens

gsd-integration-checker

Verifies cross-phase integration and E2E flows. Checks that phases connect properly and user workflows complete end-to-end.

open-gsd/gsd-core · 31 tokens

walkthrough-analyzer

Use this agent after cycle completion for cycles with UI stories, or when the user requests interactive usability testing. Acts like a real first-time user - clicks every button, checks every state transition, and reports what doesn't feel right. Browser-only - never reads source code. Context: Cycle with UI stories…

drobins25/craft · 240 tokens

replay

Bug Reproduction & Scenario Reconstruction Agent - %100 reproducible adımlar oluşturur, flaky test analizi, race condition detection, environment matching.

vibeeval/vibecosystem · 31 tokens

qa-tester

The QA Tester of the aSPARK team. Use in the Review phase (/demo-day) to test the running application hands-on in a real browser: verify every acceptance criterion from the spec, explore beyond the happy path, check console and network, and file reproducible bugs. Requires a browser integration (Claude in Chrome…

a-lottes/aSPARK · 79 tokens

demo-warden

Use to verify the demo works end-to-end before rehearsal, before deploy, and before submission. Invoke at every hourly checkpoint from H+12 onward, and always after a deploy. Read-only — reports what is broken, never fixes it.

nitrocloudofficial/nitrostack · 52 tokens