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.
git clone --depth 1 https://github.com/hahaxiang27/FlowHarnessWrote 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/commands/hahaxiang27/flowharness/harness.metrics)<a href="https://agentmods.dev/commands/hahaxiang27/flowharness/harness.metrics"><img src="https://agentmods.dev/badge/commands/hahaxiang27/flowharness/harness.metrics/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/commands/hahaxiang27/flowharness/harness.metrics"><img src="https://agentmods.dev/badge/commands/hahaxiang27/flowharness/harness.metrics.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.00028 | $0.00928 |
| Opus 5.5 | $0.00011 | $0.00371 |
| Sonnet 5.5 | $0.00006 | $0.00186 |
| Haiku 4.5 | $0.00003 | $0.00093 |
Grade A, and why
harness-metrics 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 3mo 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 — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Harness Sprint 度量报告
上下文管理: 🔄 清空上下文 — 使用子代理执行,纯粹基于进度文件生成数据
指令
生成当前 Sprint 的五维度量报告。
输入参数
$ARGUMENTS — 可选:
- Sprint 编号(如 "1")
- "trend" — 生成跨 Sprint 趋势分析
执行步骤
使用 Agent 工具启动子代理,传入以下任务:
你是 Harness 度量分析师。基于进度数据生成度量报告。
1. 读取 `.harness/sprints/sprint-{N}-progress.md`
2. 读取 `.harness/prompts/metrics.md` 了解度量指标定义和计算公式
3. 基于进度文件中的数据,计算五维度量:
- 约束层: 硬/软约束违反次数、约束遵守率
- 信息层: 契约覆盖率、模型覆盖率、模板使用率
- 验证层: 首次通过率、验证分数、E2E通过率
- 修正层: 修正收敛率、平均轮次、人工介入次数
- 执行质量: Sprint完成率、平均任务耗时、有效代码率
4. 生成健康度仪表盘(🟢/🟡/🔴)
5. 提出 Top 3 改进建议
输出:
a. 终端显示度量摘要
b. 写入完整报告到 `.harness/metrics/sprint-{N}.json`
如果参数为 "trend":
a. 读取 .harness/metrics/ 下所有 sprint-*.json
b. 生成跨 Sprint 趋势对比表
c. 识别改善和恶化的指标
d. 输出预测和建议
Dashboard 观测面板更新
metrics 完成后,按 .harness/prompts/dashboard-updater.md 中 Step 17 规则更新 specs/{feature}/dashboard.html:
- 填充
#panel-metrics面板:五维健康度色块 + 统计数字卡片(3x2)+ 全部阻塞项列表 + Top 3 改进建议 + Sprint 评级 - metrics 节点侧边栏状态改为
done+ok,同时更新.topbar中的评级
Memory 更新
如果本次 Sprint 暴露出可复用模式、踩坑、评审反馈或团队规则变化,直接更新 .ai-dev/context/ 下的对应文件:
.ai-dev/context/mistakes.md.ai-dev/context/known-patterns.md.ai-dev/context/review-feedback.md.ai-dev/context/reusable-patterns.md.ai-dev/context/team-rules.md
SDD Step Gate
When specs/{REQUIREMENT_ID}/dashboard-state.json exists (SDD workflow active), after this command completes follow .harness/prompts/command-step-gate.md:
- Update dashboard-state.json and dashboard.html when applicable.
- Mark this command done, next step next, workflow_plan.phase = awaiting_user.
- Stop immediately - do not chain the next internal command in the same turn.
- Hand off with .harness/prompts/step-gate-handoff.md.
Skip only for standalone invocation without dashboard state, or when the user explicitly asks to batch remaining steps.
Requirement Artifact Path Convention
For a requirement id {REQUIREMENT_ID}, keep all delivery artifacts bucketed by that id:
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.
- 3mo ago First seen · 93 lines · 28 tokens per session scan A 345e60258d32
harness-metrics is a command published in the GitHub repository hahaxiang27/FlowHarness (4 stars, last pushed 5mo ago), licensed MIT. It adds 28 tokens to every session and 928 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-31.
harness-metrics compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| harness-metricshahaxiang27/FlowHarness | Command | 4 | 5mo ago | MIT | A | 28 | Claude Code |
| checklistgithub/spec-kit | Command | 153k | today | MIT | A | 13 | Claude Code |
| clarifygithub/spec-kit | Command | 153k | today | MIT | A | 27 | Claude Code |
| specifygithub/spec-kit | Command | 153k | today | MIT | A | 13 | Claude Code |
| analyzegithub/spec-kit | Command | 153k | today | MIT | A | 26 | Claude Code |
| convergegithub/spec-kit | Command | 153k | today | MIT | A | 35 | Claude Code |
| implementgithub/spec-kit | Command | 153k | today | MIT | A | 14 | Claude Code |