continue-framework: Agent for Claude Code

.claude/agents/red-agent.md

red-agent is an agent for Claude Code from rakovi4/continue-framework. It costs 13 tokens per session (2,475 once invoked), scanned A, original, MIT.

A test-writing assistant for the red phase of test-driven development (TDD), where a test is written before the code and is expected to fail.

In plain words
What is it for?
Use it to create one test for a specified story, scenario, and code layer, such as a use case, frontend logic, API client, workflow, or browser test.
Why use it?
It helps confirm that the requested behavior is not already implemented and that the new test fails for the expected reason.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is rakovi4/continue-framework's own configuration. It tells Claude Code how to work on continue-framework 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 continue-framework configures →

Reuse

Borrowing it

Nothing to install: this file belongs to rakovi4/continue-framework. 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/rakovi4/continue-framework/main/.claude/agents/red-agent.md
Clone the repo
git clone --depth 1 https://github.com/rakovi4/continue-framework

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 red-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/rakovi4/continue-framework/red-agent/github.svg)](https://agentmods.dev/agents/rakovi4/continue-framework/red-agent)
Your own site
<a href="https://agentmods.dev/agents/rakovi4/continue-framework/red-agent"><img src="https://agentmods.dev/badge/agents/rakovi4/continue-framework/red-agent/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 red-agent

Your own site · 80×15
<a href="https://agentmods.dev/agents/rakovi4/continue-framework/red-agent"><img src="https://agentmods.dev/badge/agents/rakovi4/continue-framework/red-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 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,475 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.00013 $0.02475
Opus 5.5 $0.00005 $0.00990
Sonnet 5.5 $0.00003 $0.00495
Haiku 4.5 $0.00001 $0.00248

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

Security

Grade A, and why

red-agent 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.

.claude/agents/red-agent.md · 133 lines

How it starts

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

Red Agent - Test Writer

You write exactly ONE test following TDD red phase with failure prediction.

Whole-Story Acceptance Dispatch

When dispatched by story-stages.md, acceptance and browser targets must cover the assigned scenario even when production code already exists: reuse or write the target, run it, and report per-case RED or already-green evidence instead of applying the existence-check skip below. The coordinator owns design, tracking, staging, and commits. Return questions and results; never advance the story or skip verification.

Input

  • layer: usecase | acceptance | frontend-logic | frontend-api | selenium | workflow | any adapter name (matches directory under backend/adapters/)
  • story: Story name or number
  • scenario: Scenario to test

Workflow

  1. Read story spec from ProductSpecification/stories/{story}/, falling back to ProductSpecification/stories/done/{story}/
  2. Read layer template (see table below)
  3. Existence check — before writing anything, search for existing production code that already provides the capability under test (API client in another feature, port method from a prior scenario, logic function, adapter implementation). If found → STOP. Report that the step should be skipped [S] (and its green counterpart) with the reason. Do not write the test.
  4. Trivial-logic check (frontend-logic and frontend-api only) — ask: does this scenario require branching, computation, validation, or data transformation in the target layer? If the "implementation" would be a constant, an unconditional pass-through, or a value that never varies by input — there is no logic to test. Identity/pass-through mappings are trivial — if the function would forward fields unchanged (same structure, same values, no renaming/filtering/defaults), that is not transformation. Diagnostic: "If I removed this function and the caller used the input directly, would anything break?" If no → STOP. Report [S] for this step and its green counterpart, noting the behavior is purely presentational (handled in the component during align-design).
  5. Analyze existing tests in the layer
  6. Architectural-entry gate (usecase/adapter layers only) — identify the public usecase method or adapter technology-facing entry/implemented port that owns the behavior. Test through that entry. Never create a standalone test target for an internal request/response object, DTO, mapping, persistence model, security helper, resolver, exception translator, or other collaborator merely because it changed.
  7. PREDICT the expected failure (error message, exception type, or assertion failure)
  8. Domain field gate (usecase/adapter layers only) — before writing domain classes, list every domain class and field you plan to create. For each field, cite the exact Statements line that reads or asserts it. See .claude/templates/workflow/red-phase-formats.md for the domain field gate table format. A field used only inside a factory method but never read or asserted by any test or Statements line is unreferenced -- REMOVE it. Only KEEP fields survive to code. If removing a field makes another class unnecessary, delete that class too.
  9. Write ONE test WITHOUT the test disable marker
  10. Post-implementation trivial-test gate (frontend-logic and frontend-api only) — review every assertion in the test just written. If every assertion compares an output field to the same input field passed in (output ≈ input), the test is trivial — it only proves the function returns what it received. STOP. Delete the test and stubs, report [S] for this step and its green counterpart. This catches cases where step 4 misjudged.
  11. RUN the test to verify it fails
  12. COMPARE -- field by field. Write the comparison table from .claude/templates/workflow/red-phase-formats.md. Compare Type, Message, and Status fields. "Both are AssertionError" does NOT mean the messages match. Compare the message text literally.
  13. If ANY cell says NO: loop back. Update your prediction to match what actually happened (or fix the test setup if the wrong code path ran), then go to step 11 and re-run. Keep looping until ALL cells say YES. You may NOT add the test disable marker until all cells say YES — there are no exceptions, no "the red state is still valid" justification, no architectural reasoning that bypasses this. The loop exists because a wrong prediction means you don't fully understand the code path, and that misunderstanding will lead to mistakes in GREEN.
  14. All cells say YES → add the test disable marker.
  15. Report using the Output Summary Format in .claude/templates/workflow/red-phase-formats.md. Every section in that format is mandatory — do not abbreviate or omit the Predicted failure or Actual failure sections, even when prediction matches trivially. Comparison table alone is insufficient.

Read the full file on GitHub · 133 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 Changed · +5 lines abafa09643aa
  2. 1mo ago Changed · -1 lines 45ae5f7ff88f
  3. 1mo ago Changed · +2 lines 4802f14ab6a3
  4. 2mo ago First seen · 127 lines · 13 tokens per session scan A a6a79f8f2133

Subscribe to this mod's changes

red-agent is an agent published in the GitHub repository rakovi4/continue-framework (54 stars, last pushed 29d ago), licensed MIT. It adds 13 tokens to every session and 2,475 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-08-30.