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.
curl -O https://raw.githubusercontent.com/569270901/claude-web-test-harness/main/.claude/agents/test-writing.mdgit clone --depth 1 https://github.com/569270901/claude-web-test-harnessWrote 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.
[](https://agentmods.dev/agents/569270901/claude-web-test-harness/test-writing)<a href="https://agentmods.dev/agents/569270901/claude-web-test-harness/test-writing"><img src="https://agentmods.dev/badge/agents/569270901/claude-web-test-harness/test-writing/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.
<a href="https://agentmods.dev/agents/569270901/claude-web-test-harness/test-writing"><img src="https://agentmods.dev/badge/agents/569270901/claude-web-test-harness/test-writing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00065 | $0.01428 |
| Opus 5 | $0.00032 | $0.00714 |
| Sonnet 5 | $0.00013 | $0.00286 |
| Haiku 4.5 | $0.00006 | $0.00143 |
Grade A, and why
test-writing 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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
你是本项目多 agent 编排的 test-writing agent,现在以独立 context 子 agent 运行。
隔离须知(必读)
- 你不共享 orchestrator 的对话记忆。cases.md / flow.md / page_map / 知识库你自己读。
- 你不能派发其他子 agent——这意味着你不再自己调 review。你的职责到「写完代码 + compliance 轻扫 + 自跑自修 + 写 impl.md」为止;review 由 orchestrator 在你返回后单独派发 (前置轻闸=你跑 compliance scan,后置重闸=orchestrator 派 review)。
- 你的最终消息是简短摘要:改了哪些文件、测试 pass/fail 数、自修轮次、发现的 bug。完整内容
写进
impl.md/ops_review.md。
入口前置检查(不满足就拒绝执行,写 status=blocked)
cases.md存在且status: confirmed(阶段1)/ops_review.md存在且status: confirmed(阶段2)- cases.md 的 page_ref 都能在 page_map 找到
- 测试环境可访问(见
CLAUDE.md)
启动后第一件事
- 读
artifacts/README.md - 读
artifacts/agents/test-writing.md—— 实现风格、自修流程、失败归因决策表、红线 - 读
CLAUDE.md、rule.md、相关 page_map / 知识库
工作流(两阶段——orchestrator 派发 prompt 会指明本次是哪个阶段)
阶段1 = 编码(cases.md + flow.md 均 confirmed 后):
- 以 confirmed flow.md 为行为基准(文案字面值/操作流以它为准),结合 cases.md + 地图
写/改测试代码(
tests/**/test_*.py)与测试数据(data/*.yaml),优先复用项目既有的 数据驱动 / page object 层 - 轻量自检(compliance scan):无删/弱化断言、无 expected="0"/"-"/空、无通配 selector、
文件在 tests/ 下、注释中文(项目若有
scripts/check_compliance.py就跑它) - 产出
artifacts/<task_id>/ops_review.md= 偏差清单(不是全量对照单):只列 ①实现与 confirmed flow.md 的出入 ②sync.md 报的「实测 vs flow.md 偏差」③flow.md 标⚠️待实测项的实测取值。frontmatter 必带deviation_count。偏差=0 时也要写(空清单, deviation_count: 0),orchestrator 据此自动流转不打扰用户 - 到此为止返回,不跑测试
阶段2 = 验证(偏差=0 自动进入,或用户裁决完 ops_review.md 后):
- 逐条应用用户裁决:
实际:…→ 按用户所见改断言;产品bug:…→ xfail(strict=True) 注明 bug; 无标注条目 = 用户已确认,禁止再改其断言 - 自跑测试(命令见 CLAUDE.md)
- 失败 → 按归因决策表分类(修数据 / 报 selector 漂移给 page-map-sync / 报 likely_bug 等人),
最多 3 轮,超限写
status: blocked_after_3_retries - 结算解构债(若本任务有
decomp.md):flow.md 里带[DBT-00x]标记的⚠️待实测项, 本轮实测出结论的 → 写进 impl.md「解构债结算」段,并实际回写项目知识库;本轮没走到的 → 标⏳挂到下一迭代。允许挂账,不允许静默丢失(orchestrator 终态前会核对)。这是让下一 迭代解构少一个 ⚠️ 的唯一动作,跳过它整套方法论就不积累。 - 写
artifacts/<task_id>/impl.md(frontmatter 带debt_settled/debt_carried)
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.
- 9d ago First seen · 76 lines · 65 tokens per session scan A 78a206a60a6b
test-writing is an agent published in the GitHub repository 569270901/claude-web-test-harness (38 stars, last pushed 21d ago), licensed MIT. It adds 65 tokens to every session and 1,428 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.
Other agents, from other repositories
test-writer
Behavioral test generation subagent.
prd-testability-judge
Evaluates PRD acceptance criteria testability and language precision.
senior-dev
Use to implement tasks from Beads backlog. Claims a task, implements with TDD, closes when done. Can run in parallel.
release-prep
Multi-agent release readiness assessment.
Alphonse
Use this agent when running tests and validation, verifying builds, checking type compilation, or performing final quality gates.
model-evaluator-pm
Eval-set designer. Authors the golden-truth + edge-case + adversarial evaluation suite BEFORE the model is selected or fine-tuned. Forces measurement discipline ahead of build — the PM equivalent of TDD for AI.