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 commands/hahaxiang27/flowharness/harness.scopegit 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.scope)<a href="https://agentmods.dev/commands/hahaxiang27/flowharness/harness.scope"><img src="https://agentmods.dev/badge/commands/hahaxiang27/flowharness/harness.scope.svg" alt="Measured on agentmods" 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.00030 | $0.02935 |
| Opus 5 | $0.00015 | $0.01468 |
| Sonnet 5 | $0.00006 | $0.00587 |
| Haiku 4.5 | $0.00003 | $0.00294 |
Grade A, and why
harness-scope 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 5d 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 — 250 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Harness Scope 声明生成
关联 Constitution 原则 XI · 模块边界纪律。
上下文管理: 保持当前上下文(需要 CLAUDE.md / spec / plan 多处对照)
指令
为当前 Sprint 生成 .harness/scope/sprint-<N>.yaml,作为 boundary-reviewer 的输入和 evaluator L2.4 的对照标的。
读取以下文件:
.harness/scope/_template.yaml— scope schema 模板CLAUDE.md(项目根)— 已有的"焦点 / 出范围"叙述(如存在).harness/sprints/sprint-<N>.md— 当前 Sprint 计划specs/[FEATURE_ID]/plan.md— 本 feature 的 Project Structure 段(如存在).harness/prompts/boundary-reviewer.md— 用于 discovery 模式调用
输入参数(用户可选提供)
- Sprint 编号:
$ARGUMENTS或从.harness/sprints/推断当前最新 Sprint - 模式:
--interactive强制走交互问答;不传时按"自动推断 → 用户确认"流程
执行步骤
Step 1 · 推断 Sprint 编号 + 当前 Feature
- Sprint N: 用户参数 → 否则从
.harness/sprints/sprint-*.md取最大值 - Feature ID: 从 sprint-N.md 的目标段或当前分支名解析
- 若文件缺失或冲突 → 报错并要求用户传 Sprint 编号
Step 2 · 自动收集机械字段
按项目现有结构探测模块命名空间或源码根:
- 优先读取
specs/[FEATURE_ID]/plan.md的 Project Structure / Source Code 段 - 其次读取项目现有构建、包管理或模块声明文件
- 再从
[SOURCE_ROOT]下的顶级目录、路径别名或命名空间声明推断最长公共前缀 - 探测失败 → 交互问用户:"本项目用于边界扫描的模块路径前缀是什么?"
dependency_rules 和 metadata 直接从 _template.yaml 复制默认值,不修改。
Step 3 · 推断 in_scope / out_of_scope(按优先级三选一)
优先级 A · CLAUDE.md 已有的"焦点/出范围"表(最优)
如果 CLAUDE.md 包含形如下表的段落("焦点" / "Sprint 焦点" / "in-scope" 等关键词触发):
| 模块 | 文件数 | 出范围理由 |
|---|---|---|
| `[MODULE_A]` | 126 | 本 Sprint 不投入 |
| `[MODULE_B]` | 17 | 非当前 [FEATURE_ID] 范围 |
→ 直接 lift 到 yaml:
- 列在表中的模块 →
out_of_scope,reason取自该列 - CLAUDE.md 文中提到"焦点 N 模块"且明确列出的 →
in_scope - 其余在源码树中存在但 CLAUDE.md 未提及的模块 → 列入
unclassified,第 4 步交互确认
优先级 B · spec + plan 推断(次优)
如果 CLAUDE.md 没有这张表:
- 读
specs/[FEATURE_ID]/plan.md的 Project Structure / Source Code 段,列出本 feature 涉及的模块 →in_scope - 扫
[SOURCE_ROOT]下的所有顶级模块,未列入 in_scope 的默认入out_of_scope,reason: "本 feature plan 未涉及" - 这种情况准确度中等,必须 100% 走 Step 4 用户确认
优先级 C · 交互问答兜底
如果 A 和 B 都不可用:
- 列出
[SOURCE_ROOT]下所有顶级模块及文件数 - 问:"本 Sprint 主要在哪几个模块写代码?(输入逗号分隔模块 id 或路径)" → in_scope
- 问:"剩余 N 个模块默认归 out_of_scope(保留不投入),有要例外的吗?" → 调整
- 对每个 out_of_scope 模块问一句 reason(可批量复用:"非当前 [FEATURE_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.
- 5d ago First seen · 250 lines · 30 tokens per session scan A ea3f10f2a580
harness-scope is a command published in the GitHub repository hahaxiang27/FlowHarness (4 stars, last pushed 2mo ago), licensed MIT. It adds 30 tokens to every session and 2,935 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.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
constitution
Create or update the project constitution from interactive or provided principle inputs.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.