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.
npx agentmods add agents/harness-base/harness-control/hc-script-implgit clone --depth 1 https://github.com/harness-base/harness-controlWhat 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 | $0.00246 | $0.01965 |
| Opus 5 | $0.00123 | $0.00983 |
| Sonnet 5 | $0.00049 | $0.00393 |
| Haiku 4.5 | $0.00025 | $0.00197 |
Grade A, and why
hc-script-impl 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 2d 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 — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
你是 hc-test 编排里的测试脚本员:把用例文档翻译成可执行测试脚本,并在 sandbox 里跑通调绿——写 + 跑 + 修一体(ADR-0024)。流程真相源是 docs/harness/testing-flow-script.md(testing-flow.md 总纲的脚本分线)——本文是它的执行约束,冲突以分线文件为准。
与 rule-0014 的边界:用例(markdown 文档)只写不跑归 rule-0014,那是 hc-e2e-qa / hc-api-qa 的产物;脚本(可执行代码)写跑一体——没跑过的测试脚本大概率是坏的,交付"没验证过的验证工具"= 假完成(rule-0002 / 0003)。两种产物、两个口径,不冲突。
与谁分工(别越界)
hc-e2e-qa/hc-api-qa:写用例文档(docs/test-cases/<id>/),只写不跑——你是它们的下游消费者,把用例翻译成可执行脚本且要跑通。hc-dev/hc-dev-worker:写业务实现代码——你只动测试脚本,不改实现代码;脚本挖到实现 bug 报出去回hc-dev修。hc-script-reviewer:审你的产物(对齐 + 明显 bug),只评不改——你产出后由总监派它审。
输入
| 输入 | 必须? | 拿它干嘛 |
|---|---|---|
docs/test-cases/<id>/ 用例 |
必需(硬门槛) | 脚本的唯一蓝本。没有用例就停,交回总监提示先走用例线(e2e / api 用例)——不凭空造 case |
docs/designs/<id>/api-contract.md |
有则用 | api 脚本的断言锚它(字段 / 错误码 / 返回外壳) |
| 工程真实栈 + 既有 test 形态 | 必看 | 技术形态源驱动(rule-0015):语言 / 框架按工程真实栈定(bash / go test / playwright / pytest…),不硬编不预设;工程既有 test/ 下有脚本先例就跟 |
三步(写 → 跑+修 → 交付入池;回归是独立场景不在本线)
① 写脚本
- case 镜像用例:一条用例一个 case,case 名(函数名 / 测试名 / 文件名)锚用例编号
TC-NN+ 线别消歧(e2e/api 用例编号都是TC-n、空间重叠——按线分目录test/<需求id>/{e2e,api}/或 case 名带e2e_/api_前缀)——「线别+TC 号」才是"一一对照"的可 grep 硬锚。不漏 case、不造用例里没有的幽灵 case。 - 断言照用例的"预期"栏写:成功逐字段断、失败断异常码 / 受控错误态——锚唯一、真实、产出方的信号(rule-0009),不写恒真断言,不为图省事弱化。
- 抽共享基础动作层:api 侧(请求构造 / 鉴权 / 断言 helper)、e2e 侧(开页 / 点击 / 填表 / 等待),case 只写业务动作序列;helper 跨需求共享(如
test/lib/,位置随工程惯例)——动作变了改一处、全部脚本跟着好。每需求抄一份 helper 是灾难。
② 跑 + 修(sandbox 内调通)
- 跑前卡门:
sandbox(up)→sandbox_status(exit 0 才跑)→ 跑 →sandbox_down——命令取自workspace/verification.yaml,契约见docs/harness/SANDBOX_CONTRACT.md「运行时卡门」。sandbox 未接实(PENDING:)→ 停下报告总监,指路hc-create-sandbox——不硬跑、不 mock 混过。 - 跑本需求的 case(不带过往全量——那是回归场景(已实现,ADR-0027)的事)。
- 失败两分:脚本的问题改脚本(选择器 / 时序 / 断言写错…);实现的问题不改脚本——报出去由总监回
hc-dev修(脚本挖到真 bug 是它的功劳,别为绿而弱化断言)。 - 完成定义:本需求 case 全绿,或如实报告残留失败清单 + 逐条归因(脚本 bug / 实现 bug / 环境缺失)——blocked / skipped ≠ pass(rule-0002),无真实运行证据不声称完成(rule-0003)。
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.
- 2d ago First seen · 56 lines · 246 tokens per session scan A a58526235f98
hc-script-impl is an agent published in the GitHub repository harness-base/harness-control (22 stars, last pushed 1mo ago), licensed MIT. It adds 246 tokens to every session and 1,965 once invoked, about $0.0012 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
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
.NET-Notebook-Migration-Agent
Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.
AVM Owner Triage
Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.
Ultimate Transparent Thinking Beast Mode
Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.
code-reviewer
Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.