harness-spec-check

harness-spec-check is a command for Claude Code from hahaxiang27/FlowHarness. It costs 36 tokens per session (1,254 once invoked), scanned A, original, MIT.

A manual checker for whether a feature specification is split into manageable user stories and tasks. It reads the feature’s specification, task list, and project rules, then reports the counts.

In plain words
What is it for?
Use it to audit a feature by ID, count user stories, tasks, and acceptance scenarios, and compare them with the limits in the project constitution.
Why use it?
It helps catch specifications that are too large or detailed before they become difficult to build and review. The check is separate from other workflows, so it does not stop them.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths.

Good fit Use it to audit a feature by ID, count user stories, tasks, and acceptance scenarios, and compare them with the limits in the project constitution.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hahaxiang27/flowharness/harness.spec-check
Install

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.

Clone the repo
git clone --depth 1 https://github.com/hahaxiang27/FlowHarness

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 harness-spec-check

README.md
[![agentmods](https://agentmods.dev/badge/commands/hahaxiang27/flowharness/harness.spec-check/github.svg)](https://agentmods.dev/commands/hahaxiang27/flowharness/harness.spec-check)
Your own site
<a href="https://agentmods.dev/commands/hahaxiang27/flowharness/harness.spec-check"><img src="https://agentmods.dev/badge/commands/hahaxiang27/flowharness/harness.spec-check/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 harness-spec-check

Your own site · 80×15
<a href="https://agentmods.dev/commands/hahaxiang27/flowharness/harness.spec-check"><img src="https://agentmods.dev/badge/commands/hahaxiang27/flowharness/harness.spec-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,254 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.00036 $0.01254
Opus 5 $0.00018 $0.00627
Sonnet 5 $0.00007 $0.00251
Haiku 4.5 $0.00004 $0.00125

Measured 9d ago against content hash 005bd31c7797, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

harness-spec-check 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.

commands/harness.spec-check.md · 114 lines

How it starts

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

Harness Spec 颗粒度审�?

*关联 Constitution 原则 XII · Spec Sizing Discipline�?

**上下文管�?*: 保持当前上下文(需要读 spec.md / tasks.md�?

指令

独立审计某个 feature �?spec 颗粒度,不阻断其他流程。/harness.plan 已经内置同样�?pre-check,本命令是可在任意时刻手工跑的镜像�? 读取以下文件�?1. specs/<feature>/spec.md �?user story 来源 2. specs/<feature>/tasks.md(如存在)�?task 数来�?3. .specify/memory/constitution.md �?取原�?XII 当前阈值(默认 US �?3, Tasks �?30�?

输入参数

  • Feature ID:$ARGUMENTS(必�?· 例如 023-learner-loop�?- 找不到对�?specs/<feature>/spec.md �?立即报错并退�?

执行步骤

Step 1 · �?user story
grep -c "^### User Story" specs/<feature>/spec.md

记下数量 N�?

Step 2 · �?task
grep -c "^- \[[ x]\] T[0-9]" specs/<feature>/tasks.md  # 如存�?```

记下数量 M。tasks.md 缺失则记�?N/A�?
#### Step 3 · �?acceptance scenario(辅助维度)

```bash
grep -c "^[0-9]\+\. \*\*Given\*\*" specs/<feature>/spec.md

记下数量 K。这个不是硬阈值,�?K 远大�?N 通常意味着 user story 颗粒度太大,每个 story 塞了过多场景�?

Step 4 · 输出审计报告

格式�?

# Spec 颗粒度审�?· <feature> · <YYYY-MM-DD>

## 度量

| 维度 | 实际 | 阈值(原则 XII�?| 状�?|
|---|---|---|---|
| User Stories | N | �?3 | �?/ �?�?X |
| Tasks | M | �?30 | �?/ �?�?Y / �?N/A |
| Acceptance Scenarios | K | 无硬阈�?| 参考�?· K/N = 平均 X �?story |

## 判定

- �?**PASS** · 颗粒度合�?· 可进�?`/harness.plan`
- �?**FAIL** · 必须拆分(见下方建议�?
## 拆分建议(FAIL 时输出)

### 当前 User Stories 列表
1. US1 - <title> (Priority: P1)
2. US2 - <title> (Priority: P2)
...

### 推荐拆分方案

�?user story 边界拆成 N 个独�?spec�?

-1- (US1) -2- (US2) -3- (US3) ...


依次跑:

/speckit.specify "<US1 描述>" /speckit.plan ... /speckit.tasks ... /harness.plan /harness.scope ...


### 拆分依赖图(如有�?spec 依赖�?
提议把共享基础设施(如学员侧整合层 `learner/*`)作为前�?spec,先 ship 完再�?US-level spec�?
## 替代方案

如果你认为不该拆�?*3 �?1**�?
1. **合并 user story** · 仅当几个 US 真正紧密耦合,独立交付不构成完整价�?2. **升级 justification** · �?spec 末尾添加 "## Sizing Override" 段,显式写明不可拆分的根本理�?3. **�?spec**(推�?· 默认�?
未做任一处理 · `/harness.plan` 会一直阻塞在 Step 0 pre-check�?```

### 注意

- **只读命令**:不修改任何 spec 文件,只输出审计报告
- 报告写到 stdout,不写盘(用户可以自己导出)
- Constitution 原则 XII 阈值可调(项目可在自己�?constitution.md 里覆盖默认值),本命令读项目实�?constitution
- 关联文档�?  - 原则 XII:`.specify/memory/constitution.md`
  - `/harness.plan` Step 0:`.claude/commands/harness.plan.md`

Read the full file on GitHub · 114 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. 9d ago First seen · 114 lines · 0 tokens per session scan A 005bd31c7797

Subscribe to this mod's changes

harness-spec-check is a command published in the GitHub repository hahaxiang27/FlowHarness (4 stars, last pushed 2mo ago), licensed MIT. It adds 36 tokens to every session and 1,254 once invoked, about $0.0002 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-31.