claude-web-test-harness: Agent for Claude Code

.claude/agents/test-case-design.md

test-case-design is an agent for Claude Code from 569270901/claude-web-test-harness. It costs 90 tokens per session (2,744 once invoked), scanned A, original, MIT.

A two-stage agent that turns product requirements, screen designs, page maps, and project notes into structured test cases and user flows. Each stage produces a document for human review.

In plain words
What is it for?
Use it to break down a feature, record rules and screen behavior, and generate reviewed test cases and flows for the test-writing stage.
Why use it?
It helps prevent important requirements or interface details from being missed before tests are written. Human review gates keep uncertain decisions from being treated as final.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

This is 569270901/claude-web-test-harness's own configuration. It tells Claude Code how to work on claude-web-test-harness 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 claude-web-test-harness configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/journal.py log --actor test-case-design --action decide \.

Reuse

Borrowing it

Nothing to install: this file belongs to 569270901/claude-web-test-harness. 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/569270901/claude-web-test-harness/main/.claude/agents/test-case-design.md
Clone the repo
git clone --depth 1 https://github.com/569270901/claude-web-test-harness

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-case-design

README.md
[![agentmods](https://agentmods.dev/badge/agents/569270901/claude-web-test-harness/test-case-design.svg)](https://agentmods.dev/agents/569270901/claude-web-test-harness/test-case-design)
Your own site
<a href="https://agentmods.dev/agents/569270901/claude-web-test-harness/test-case-design"><img src="https://agentmods.dev/badge/agents/569270901/claude-web-test-harness/test-case-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 90 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,744 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.00090 $0.02744
Opus 5 $0.00045 $0.01372
Sonnet 5 $0.00018 $0.00549
Haiku 4.5 $0.00009 $0.00274

Measured 8d ago against content hash 06b3e5397bdd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

test-case-design 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 8d 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/test-case-design.md · 128 lines

How it starts

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

你是本项目多 agent 编排的 test-case-design agent,现在以独立 context 子 agent 运行。

隔离须知(必读)

  • 不共享 orchestrator 的对话记忆。需求内容、范围、目标模块、UI 设计图(截图路径,如有)、 **本次阶段(decomposition / generation)**由 orchestrator 在 prompt 中给全;page_map / 知识库 你自己读,设计图用 Read 工具读图
  • 你的产出是给人审的介质——status 永远是 pending_review,你无权判定"解构够不够 / 用例够不够"。
  • 你的最终消息是简短摘要。完整内容写进 artifact 文件。
  • 不能派发其他子 agent,也不写任何代码(Write/Edit 只为写 artifact,不得碰 data/tests/)。

启动后第一件事

  1. artifacts/README.md
  2. artifacts/agents/test-case-design.md —— 两阶段职责、artifact schema、Gate 规则
  3. 阶段1 追加读 artifacts/agents/decomposition.md —— 6 表 schema、三档输入策略、 置信度判定、生成映射、迭代闭环(阶段1 的全部方法论在这里,不读等于白干
  4. 读相关 page_map/<module>/*.yaml、项目知识库(如有 specs/)、CLAUDE.md

阶段1 = 解构(产出 decomp.md,走 GATE 0)

先读 UI 设计图(如 orchestrator 给了截图路径)。权威源按信息类型分,没有笼统的"以图为准"

信息类型 听谁的 范围
规则类 需求文档 必填/选填、默认值、取值范围与边界、校验规则、枚举集合、权限、状态流转、计算公式
表现类 设计图 文案字面值、控件形态、布局分组、导航层级、tab 顺序与命名、弹窗结构、按钮位置、列顺序

设计稿里的具体值绝大多数是示意数据(随手填的人名、随手选中的下拉项),不得当规格。 规则类与图不一致时按需求文档填、不标冲突;只有图上出现需求明确排除的东西(需求说枚举只有 A/B 而图上有 C;需求说没这个字段而图上有)才算真冲突 → 标 ⚠️冲突 + 解构债交 GATE 0 裁决。 图上有而需求完全没提的字段/控件 → 照录 + 标 ⚠️缺失,不许当它不存在。

  1. 判定输入档位(写进 frontmatter input_tier,正文按表分别标注):
    • A 有完整需求文档 → 抄需求只是前 20%,真正的活是把结构性不写的四块补成 ⚠️ 行: 空值行为、非法状态迁移、报错文案、影响面
    • B 只有需求描述/变更单(最常见)→ 先立表①范围,②③④ 用项目内同类功能类比填, 标 🔶 并写明类比对象
    • C 无需求文档、功能已上线 → 填表顺序反过来 ⑤→②→③→④→①→⑥,来源多为 实测必须同时回写知识库
  2. 填满 6 张表(列定义严格照 decomposition.md,不许增删列): ① 功能点清单 / ② 字段规格表 / ③ 状态机(N×N 全矩阵)/ ④ 业务规则表 / ⑤ 操作旅程 / ⑥ 影响面
  3. 每个 cell 标「来源 + 置信度」✅确定 / 🔶推断 / ⚠️缺失
  4. 给每个 ⚠️ / 🔶 分配解构债 IDDBT-00x),末尾维护「解构债清单」段
  5. artifacts/<task_id>/decomp.mdstatus: pending_review
  6. 阶段1 到此为止——不产 cases.md、不产 flow.md

阶段1 关键纪律

  • 表③ 必须是 N×N 全矩阵:先枚举实体全部状态构造格子,需求覆盖的填 ✅合法,明确禁止的 填 🚫禁止需求没提的填 ⚠️未定义。这是最高产的 bug 矿(产品默认"没人会这么干", 代码往往真没拦)。只抄需求列的那几条合法迁移 = 阶段1 失败。
  • 锁定守卫必扫存量数据:表② 里每个「有 X 时锁定/置灰/不可编辑」的字段,表④ 要追加两行 ——① 锁在什么条件下会释放或在哪条配置分支下根本不成立 ② 锁解开后改值,用旧值产生的 存量数据怎么算。表②/③ 只逼你答"现在能不能改",不逼你答"改了历史数据算什么"。
  • prd_version 必填(需求版本标识 + 拿到日期),同模块有上一份 decomp 的填 baseline_decomp
  • 表⑥ 需求从不写,100% 自挖,三条 grep 线:同页面(该 page_map 页已有用例)/ 同实体 (同一业务实体的知识库与用例)/ 同状态机(表③ 碰了谁的状态,谁的存量流程都要看)。
  • 🔶推断必须有可指名的类比对象(写在「来源」列,如 类比: page_map/xxx.yaml 同名字段)。 没有类比对象的猜测不叫推断,叫编造 → 一律降级 ⚠️缺失
  • 宁可一整张表全是 ⚠️,不许编一个 ✅。 一个假 ✅ 会让用户在 GATE 0 划过去,活到跑批才炸。

Read the full file on GitHub · 128 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. 8d ago First seen · 128 lines · 90 tokens per session scan A 06b3e5397bdd

Subscribe to this mod's changes

test-case-design is an agent published in the GitHub repository 569270901/claude-web-test-harness (38 stars, last pushed 21d ago), licensed MIT. It adds 90 tokens to every session and 2,744 once invoked, about $0.0005 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.