@hunter-harness/workflow-harness 0.2.57 → 0.2.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/harness/bundles/general/claude-code/.harness-build.json +1 -1
- package/harness/bundles/general/claude-code/harness-archive/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-plan/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-review/SKILL.md +5 -3
- package/harness/bundles/general/claude-code/harness-review/protocols.md +2 -1
- package/harness/bundles/general/claude-code/harness-run/SKILL.md +4 -4
- package/harness/bundles/general/claude-code/harness-submit/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-test/SKILL.md +5 -3
- package/harness/bundles/general/claude-code/harness-test/reference.md +2 -0
- package/harness/bundles/general/claude-code/protocols/report-pipeline-protocol.md +2 -0
- package/harness/bundles/general/claude-code/scripts/harness_context.py +423 -77
- package/harness/bundles/general/claude-code/scripts/harness_events.py +102 -12
- package/harness/bundles/general/claude-code/scripts/harness_fixback.py +529 -1
- package/harness/bundles/general/claude-code/scripts/harness_gate.py +161 -6
- package/harness/bundles/general/claude-code/scripts/harness_ledger.py +81 -8
- package/harness/bundles/general/claude-code/scripts/harness_review.py +25 -2
- package/harness/bundles/general/claude-code/scripts/harness_test_runner.py +155 -1
- package/harness/bundles/general/codebuddy/.harness-build.json +1 -1
- package/harness/bundles/general/codebuddy/harness-archive/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-plan/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-review/SKILL.md +5 -3
- package/harness/bundles/general/codebuddy/harness-review/protocols.md +2 -1
- package/harness/bundles/general/codebuddy/harness-run/SKILL.md +4 -4
- package/harness/bundles/general/codebuddy/harness-submit/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-test/SKILL.md +5 -3
- package/harness/bundles/general/codebuddy/harness-test/reference.md +2 -0
- package/harness/bundles/general/codebuddy/protocols/report-pipeline-protocol.md +2 -0
- package/harness/bundles/general/codebuddy/scripts/harness_context.py +423 -77
- package/harness/bundles/general/codebuddy/scripts/harness_events.py +102 -12
- package/harness/bundles/general/codebuddy/scripts/harness_fixback.py +529 -1
- package/harness/bundles/general/codebuddy/scripts/harness_gate.py +161 -6
- package/harness/bundles/general/codebuddy/scripts/harness_ledger.py +81 -8
- package/harness/bundles/general/codebuddy/scripts/harness_review.py +25 -2
- package/harness/bundles/general/codebuddy/scripts/harness_test_runner.py +155 -1
- package/harness/bundles/general/codex/.harness-build.json +1 -1
- package/harness/bundles/general/codex/harness-archive/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-plan/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-review/SKILL.md +3 -1
- package/harness/bundles/general/codex/harness-review/protocols.md +2 -1
- package/harness/bundles/general/codex/harness-run/SKILL.md +4 -4
- package/harness/bundles/general/codex/harness-submit/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-test/SKILL.md +5 -3
- package/harness/bundles/general/codex/harness-test/reference.md +2 -0
- package/harness/bundles/general/codex/protocols/report-pipeline-protocol.md +2 -0
- package/harness/bundles/general/codex/scripts/harness_context.py +423 -77
- package/harness/bundles/general/codex/scripts/harness_events.py +102 -12
- package/harness/bundles/general/codex/scripts/harness_fixback.py +529 -1
- package/harness/bundles/general/codex/scripts/harness_gate.py +161 -6
- package/harness/bundles/general/codex/scripts/harness_ledger.py +81 -8
- package/harness/bundles/general/codex/scripts/harness_review.py +25 -2
- package/harness/bundles/general/codex/scripts/harness_test_runner.py +155 -1
- package/harness/bundles/general/cursor/.harness-build.json +1 -1
- package/harness/bundles/general/cursor/harness-archive/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-plan/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-review/SKILL.md +3 -1
- package/harness/bundles/general/cursor/harness-review/protocols.md +2 -1
- package/harness/bundles/general/cursor/harness-run/SKILL.md +4 -4
- package/harness/bundles/general/cursor/harness-submit/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-test/SKILL.md +5 -3
- package/harness/bundles/general/cursor/harness-test/reference.md +2 -0
- package/harness/bundles/general/cursor/protocols/report-pipeline-protocol.md +2 -0
- package/harness/bundles/general/cursor/scripts/harness_context.py +423 -77
- package/harness/bundles/general/cursor/scripts/harness_events.py +102 -12
- package/harness/bundles/general/cursor/scripts/harness_fixback.py +529 -1
- package/harness/bundles/general/cursor/scripts/harness_gate.py +161 -6
- package/harness/bundles/general/cursor/scripts/harness_ledger.py +81 -8
- package/harness/bundles/general/cursor/scripts/harness_review.py +25 -2
- package/harness/bundles/general/cursor/scripts/harness_test_runner.py +155 -1
- package/harness/bundles/java/claude-code/.harness-build.json +1 -1
- package/harness/bundles/java/claude-code/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-archive/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-package/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-plan/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-review/SKILL.md +5 -3
- package/harness/bundles/java/claude-code/harness-review/protocols.md +2 -1
- package/harness/bundles/java/claude-code/harness-run/SKILL.md +4 -4
- package/harness/bundles/java/claude-code/harness-submit/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-test/SKILL.md +5 -3
- package/harness/bundles/java/claude-code/protocols/report-pipeline-protocol.md +2 -0
- package/harness/bundles/java/claude-code/scripts/harness_context.py +423 -77
- package/harness/bundles/java/claude-code/scripts/harness_events.py +102 -12
- package/harness/bundles/java/claude-code/scripts/harness_fixback.py +529 -1
- package/harness/bundles/java/claude-code/scripts/harness_gate.py +161 -6
- package/harness/bundles/java/claude-code/scripts/harness_ledger.py +81 -8
- package/harness/bundles/java/claude-code/scripts/harness_review.py +25 -2
- package/harness/bundles/java/claude-code/scripts/harness_test_runner.py +155 -1
- package/harness/bundles/java/codebuddy/.harness-build.json +1 -1
- package/harness/bundles/java/codebuddy/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-archive/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-package/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-plan/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-review/SKILL.md +5 -3
- package/harness/bundles/java/codebuddy/harness-review/protocols.md +2 -1
- package/harness/bundles/java/codebuddy/harness-run/SKILL.md +4 -4
- package/harness/bundles/java/codebuddy/harness-submit/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-test/SKILL.md +5 -3
- package/harness/bundles/java/codebuddy/protocols/report-pipeline-protocol.md +2 -0
- package/harness/bundles/java/codebuddy/scripts/harness_context.py +423 -77
- package/harness/bundles/java/codebuddy/scripts/harness_events.py +102 -12
- package/harness/bundles/java/codebuddy/scripts/harness_fixback.py +529 -1
- package/harness/bundles/java/codebuddy/scripts/harness_gate.py +161 -6
- package/harness/bundles/java/codebuddy/scripts/harness_ledger.py +81 -8
- package/harness/bundles/java/codebuddy/scripts/harness_review.py +25 -2
- package/harness/bundles/java/codebuddy/scripts/harness_test_runner.py +155 -1
- package/harness/bundles/java/codex/.harness-build.json +1 -1
- package/harness/bundles/java/codex/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-archive/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-package/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-plan/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-review/SKILL.md +3 -1
- package/harness/bundles/java/codex/harness-review/protocols.md +2 -1
- package/harness/bundles/java/codex/harness-run/SKILL.md +4 -4
- package/harness/bundles/java/codex/harness-submit/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-test/SKILL.md +5 -3
- package/harness/bundles/java/codex/protocols/report-pipeline-protocol.md +2 -0
- package/harness/bundles/java/codex/scripts/harness_context.py +423 -77
- package/harness/bundles/java/codex/scripts/harness_events.py +102 -12
- package/harness/bundles/java/codex/scripts/harness_fixback.py +529 -1
- package/harness/bundles/java/codex/scripts/harness_gate.py +161 -6
- package/harness/bundles/java/codex/scripts/harness_ledger.py +81 -8
- package/harness/bundles/java/codex/scripts/harness_review.py +25 -2
- package/harness/bundles/java/codex/scripts/harness_test_runner.py +155 -1
- package/harness/bundles/java/cursor/.harness-build.json +1 -1
- package/harness/bundles/java/cursor/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-archive/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-package/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-plan/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-review/SKILL.md +3 -1
- package/harness/bundles/java/cursor/harness-review/protocols.md +2 -1
- package/harness/bundles/java/cursor/harness-run/SKILL.md +4 -4
- package/harness/bundles/java/cursor/harness-submit/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-test/SKILL.md +5 -3
- package/harness/bundles/java/cursor/protocols/report-pipeline-protocol.md +2 -0
- package/harness/bundles/java/cursor/scripts/harness_context.py +423 -77
- package/harness/bundles/java/cursor/scripts/harness_events.py +102 -12
- package/harness/bundles/java/cursor/scripts/harness_fixback.py +529 -1
- package/harness/bundles/java/cursor/scripts/harness_gate.py +161 -6
- package/harness/bundles/java/cursor/scripts/harness_ledger.py +81 -8
- package/harness/bundles/java/cursor/scripts/harness_review.py +25 -2
- package/harness/bundles/java/cursor/scripts/harness_test_runner.py +155 -1
- package/harness/manifests/general/claude-code.json +23 -23
- package/harness/manifests/general/codebuddy.json +23 -23
- package/harness/manifests/general/codex.json +23 -23
- package/harness/manifests/general/cursor.json +23 -23
- package/harness/manifests/java/claude-code.json +24 -24
- package/harness/manifests/java/codebuddy.json +24 -24
- package/harness/manifests/java/codex.json +24 -24
- package/harness/manifests/java/cursor.json +24 -24
- package/hunter-workflow-family.json +5 -5
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ disallowed-tools:
|
|
|
21
21
|
- Bash(awk *)
|
|
22
22
|
- Bash(curl *)
|
|
23
23
|
---
|
|
24
|
-
<!-- generated by harness_deploy.py; core=
|
|
24
|
+
<!-- generated by harness_deploy.py; core=f89f132dc909b0d8; overlay=none; agent=claude-code; do not edit -->
|
|
25
25
|
# harness-archive — 变更归档
|
|
26
26
|
|
|
27
27
|
## Purpose
|
|
@@ -20,7 +20,7 @@ disallowed-tools:
|
|
|
20
20
|
- Bash(awk *)
|
|
21
21
|
- Bash(curl *)
|
|
22
22
|
---
|
|
23
|
-
<!-- generated by harness_deploy.py; core=
|
|
23
|
+
<!-- generated by harness_deploy.py; core=f89f132dc909b0d8; overlay=none; agent=claude-code; do not edit -->
|
|
24
24
|
# harness-codebase-map — 代码库地图
|
|
25
25
|
|
|
26
26
|
## Purpose
|
|
@@ -8,7 +8,7 @@ disallowed-tools:
|
|
|
8
8
|
- Bash(git *)
|
|
9
9
|
- Bash(curl *)
|
|
10
10
|
---
|
|
11
|
-
<!-- generated by harness_deploy.py; core=
|
|
11
|
+
<!-- generated by harness_deploy.py; core=f89f132dc909b0d8; overlay=none; agent=claude-code; do not edit -->
|
|
12
12
|
# harness-knowledge-ingest
|
|
13
13
|
|
|
14
14
|
知识 ingest 完全由 Hunter Platform 负责。归档完成时,客户端生成一个确定性 ZIP;
|
|
@@ -8,7 +8,7 @@ disallowed-tools:
|
|
|
8
8
|
- Bash(git *)
|
|
9
9
|
- Bash(curl *)
|
|
10
10
|
---
|
|
11
|
-
<!-- generated by harness_deploy.py; core=
|
|
11
|
+
<!-- generated by harness_deploy.py; core=f89f132dc909b0d8; overlay=none; agent=claude-code; do not edit -->
|
|
12
12
|
# harness-knowledge-query
|
|
13
13
|
|
|
14
14
|
项目知识以 Hunter Platform 的服务端索引为唯一真源。客户端只提交查询并消费结果:
|
|
@@ -21,7 +21,7 @@ disallowed-tools:
|
|
|
21
21
|
- Bash(awk *)
|
|
22
22
|
- Bash(curl *)
|
|
23
23
|
---
|
|
24
|
-
<!-- generated by harness_deploy.py; core=
|
|
24
|
+
<!-- generated by harness_deploy.py; core=f89f132dc909b0d8; overlay=none; agent=claude-code; do not edit -->
|
|
25
25
|
# harness-plan — 需求规划
|
|
26
26
|
|
|
27
27
|
## Purpose
|
|
@@ -22,7 +22,7 @@ disallowed-tools:
|
|
|
22
22
|
- Bash(curl *)
|
|
23
23
|
- Bash(codegraph *)
|
|
24
24
|
---
|
|
25
|
-
<!-- generated by harness_deploy.py; core=
|
|
25
|
+
<!-- generated by harness_deploy.py; core=f89f132dc909b0d8; overlay=none; agent=claude-code; do not edit -->
|
|
26
26
|
# harness-review — 代码审查
|
|
27
27
|
|
|
28
28
|
## Purpose
|
|
@@ -76,9 +76,9 @@ review 默认优先在独立上下文执行,避免主会话已形成的实现
|
|
|
76
76
|
|
|
77
77
|
项目规模小、风险低或没有 CodeGraph 都不是跳过独立评审的理由。原因码是稳定机器字段,仅用于协议与技术详情;面向用户的事件摘要必须写成「已使用独立评审」或「当前环境没有可用的隔离评审能力,已由主会话完成评审」等中文说明。
|
|
78
78
|
|
|
79
|
-
3. **持久化报告与事实 sidecar(强制,主会话)** — Agent 返回后主会话 Write 到 `reports/review/review-report-*.md`,并把同一批发现写成临时 JSON 后调用 `python <skills-root>/scripts/harness_review.py write-findings --change-dir <change-dir> --input <findings.json
|
|
79
|
+
3. **持久化报告与事实 sidecar(强制,主会话)** — Agent 返回后主会话 Write 到 `reports/review/review-report-*.md`,并把同一批发现写成临时 JSON 后调用 `python <skills-root>/scripts/harness_review.py write-findings --change-dir <change-dir> --input <findings.json>`。每条发现必须填写 `fixbackAction=code|manual|workflow`:只有确实需要修改产品代码的项使用 `code`;人工验收用 `manual`;流程、暂存或工具使用建议用 `workflow`。权威计数来自 `reports/review/review-findings.json`,不是 Markdown。任一写入缺失 → 评审未完整结束,不得关门。
|
|
80
80
|
4. **生成修复反馈(原生协议)** — 若报告存在 RED/YELLOW 问题,执行 `protocols.md` 的 `review-fixback-protocol`,将问题转化为结构化 fixback 清单并落盘到 `.harness/changes/<change-name>/reports/review/fixback-YYYYMMDD-HHmm.md`;随后把 disposition 临时 JSON 交给 `python <skills-root>/scripts/harness_review.py write-dispositions --change-dir <change-dir> --input <dispositions.json>`,权威状态写入 `reports/review/fixback-dispositions.json`。若无 RED/YELLOW,也必须写空 findings sidecar,并记录 `review-fixback-protocol: skipped(no findings)`。不调用 Superpowers `receiving-code-review`,也不记录外部 skill 降级。
|
|
81
|
-
5. **收尾** —
|
|
81
|
+
5. **收尾** — 先写完 `review-findings.json` 与 `fixback-dispositions.json`,且两者 `runId` 必须等于本轮 Review;每个 finding 必须有 disposition。随后只调用一次 gate close,由门禁校验 sidecar、写 `phase.end` 与交接;缺失或不一致时保持 Review 未结束并按恢复提示补齐。控制台输出摘要。
|
|
82
82
|
|
|
83
83
|
## Review 定位(重要)
|
|
84
84
|
|
|
@@ -124,6 +124,8 @@ review:
|
|
|
124
124
|
2. fixback 落盘到 `.harness/changes/<change-name>/reports/review/fixback-YYYYMMDD-HHmm.md`。
|
|
125
125
|
3. 无 RED/YELLOW 时记录跳过原因,不制造空修复任务。
|
|
126
126
|
|
|
127
|
+
没有 `.codegraph/` 只意味着“项目尚未建立 CodeGraph 索引,已直接读取源码”,不得将它写成独立评审不可用或委派失败原因。历史英文原因码不得进入摘要;稳定码只写结构化字段并留在技术详情。
|
|
128
|
+
|
|
127
129
|
## P0 执行可信度规则
|
|
128
130
|
|
|
129
131
|
- 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
|
|
@@ -34,6 +34,7 @@ description: harness-review 的原生修复反馈协议。内化 receiving-code-
|
|
|
34
34
|
| 风险说明 | 说明为什么值得处理 |
|
|
35
35
|
| 推荐修复 | 可执行的修复方向,不写空泛建议 |
|
|
36
36
|
| 验证方式 | 构建、测试、场景编号或人工确认方式 |
|
|
37
|
+
| 修复动作 | `code` / `manual` / `workflow`;只有 `code` 会进入 `/harness-run --fixback` |
|
|
37
38
|
| submit 影响 | 默认 advisory;仅 strict-review-gate=true 时标记阻塞 |
|
|
38
39
|
|
|
39
40
|
如果没有 RED/YELLOW,必须明确写:
|
|
@@ -45,7 +46,7 @@ description: harness-review 的原生修复反馈协议。内化 receiving-code-
|
|
|
45
46
|
### 定位边界
|
|
46
47
|
|
|
47
48
|
- harness-review 默认仅供参考,不阻塞 submit/archive。
|
|
48
|
-
- `review-fixback-protocol`
|
|
49
|
+
- `review-fixback-protocol` 只生成修复反馈,不自动修改代码。人工验收与流程建议不得伪装成代码问题,也不得创建空 Fixback 批次。
|
|
49
50
|
- 不得把 YELLOW 写成必须阻塞 submit。
|
|
50
51
|
- 只有配置 `strict-review-gate: true` 时,RED 才可标记为阻塞 submit。
|
|
51
52
|
|
|
@@ -22,7 +22,7 @@ disallowed-tools:
|
|
|
22
22
|
- Bash(curl *)
|
|
23
23
|
- Bash(codegraph *)
|
|
24
24
|
---
|
|
25
|
-
<!-- generated by harness_deploy.py; core=
|
|
25
|
+
<!-- generated by harness_deploy.py; core=f89f132dc909b0d8; overlay=none; agent=claude-code; do not edit -->
|
|
26
26
|
# harness-run — 需求编码
|
|
27
27
|
|
|
28
28
|
## Purpose
|
|
@@ -78,14 +78,14 @@ disallowed-tools:
|
|
|
78
78
|
|
|
79
79
|
## Workflow 概要
|
|
80
80
|
|
|
81
|
-
0.
|
|
81
|
+
0. 加载上下文:普通 Run 先 `harness_context.py prepare --phase run --executor <tool> [--change <id>] --json`,再 **`harness_context.py begin --phase run --change <id> --executor <tool> --json`** 校验交接,最后运行 **`harness_gate.py begin --phase run --change <id>`**。`--fixback` 不得拼装这些底层步骤,必须只调用一次 `harness_fixback.py launch-review --project . --change <id> --change-dir <change-dir> --executor <tool> --skills-root <skills-root> --product-identity <当前产品身份> --json`:该命令会先筛选结构化评审项,再原子选择 Fixback 分支、确认上下文、取得 Run 门禁并创建已填充批次。返回 `FIXBACK_NOTHING_TO_APPLY` 时直接报告“本轮评审没有需要执行的代码修复”并停止;返回阻塞码时按 `recoveryAction` 停止,不搜索实现、不试探其他参数、不创建空批次。禁止手写 `events.ndjson` / `phase.end`。已连接平台时 begin 会 best-effort 补传事件,失败只告警。
|
|
82
82
|
0.5. **测试基础设施探测**(先写 `CHECKING`,四项证据齐备后再结论)→ `reference.md` Step 0.5;测试基线已由上一步 gate begin 内部建立,不得再次执行 guard begin
|
|
83
83
|
1. **变更簇 TDD** — `protocols.md` `run-tdd-protocol`;批量 RED/GREEN;按需 `change-cluster-review-protocol`(高风险 + reviewer 预检可用)
|
|
84
|
-
2. 构建验证 + **仅**通过 `harness_ledger.py record` 写 ledger(禁止 Write/Edit `verification-ledger.json
|
|
84
|
+
2. 构建验证 + **仅**通过 `harness_ledger.py record` 写 ledger(禁止 Write/Edit `verification-ledger.json`);若本阶段创建/删除了清单、锁文件、源码根或改变技术栈,最后一次产品编辑后、写账本与关门前必须执行 `harness_preflight.py detect --project . --json` 刷新 build profile。`record --project . --profile-input <key>` 会对缺失/陈旧 profile 自动检测并从同一 target 推导 scope、coverage、规范命令和输入闭包;不得再手填另一套身份。`diff-hash --change-dir` 纳入 ignored tests → `reference.md` Step 2c
|
|
85
85
|
3. **场景覆盖检查**(场景表映射,禁止用用例数冒充场景数)
|
|
86
86
|
4. **关门检查**(10 项)→ 只执行一次 `harness_gate.py close`;`--to-phase` 必须取返回的 `nextPhases` 或 `plannedPhases` 中 run 的真实后继,禁止写死 test。该命令内部关闭 test guard、写 `phase.end`、释放租约、写 handoff 并补传事件;不得再单独调用 test-guard/context close。失败时按结构化 `recoveryAction` 原样重试,已完成步骤幂等复用。
|
|
87
87
|
|
|
88
|
-
**Fixback
|
|
88
|
+
**Fixback**:入口只用 `launch-review`,后续问题处理通过 `resolve-issue/close` 驱动,不得把修复说明当成新的普通 Run。只读取返回的受影响问题和文件;验证仅失效与 `changedFiles` 相交的目标,其他 Test/Review 证据继续复用。RED 优先;`manual`、`workflow` 或未选用的建议不进入代码批次,使用中文记录处理结论。
|
|
89
89
|
|
|
90
90
|
**执行器边界**:优先使用项目 build profile 和已有测试入口。禁止为了绕过 ESM、路径或参数问题临时生成 `.js`、`require` 脚本;需要文件式 runner 时使用项目已有入口,确需新增时遵循项目模块类型(例如 ESM 使用 `.mjs`)。runner 包装说明写入 `runnerCommand` 元数据,不得拼进账本的规范 `command`。
|
|
91
91
|
|
|
@@ -21,7 +21,7 @@ disallowed-tools:
|
|
|
21
21
|
- Bash(awk *)
|
|
22
22
|
- Bash(curl *)
|
|
23
23
|
---
|
|
24
|
-
<!-- generated by harness_deploy.py; core=
|
|
24
|
+
<!-- generated by harness_deploy.py; core=f89f132dc909b0d8; overlay=none; agent=claude-code; do not edit -->
|
|
25
25
|
# harness-submit — 最终提交(含 worktree 合并)
|
|
26
26
|
|
|
27
27
|
## Purpose
|
|
@@ -19,7 +19,7 @@ disallowed-tools:
|
|
|
19
19
|
- Bash(awk *)
|
|
20
20
|
- Bash(curl *)
|
|
21
21
|
---
|
|
22
|
-
<!-- generated by harness_deploy.py; core=
|
|
22
|
+
<!-- generated by harness_deploy.py; core=f89f132dc909b0d8; overlay=none; agent=claude-code; do not edit -->
|
|
23
23
|
# harness-sync
|
|
24
24
|
|
|
25
25
|
## Purpose
|
|
@@ -23,7 +23,7 @@ disallowed-tools:
|
|
|
23
23
|
- Bash(node *)
|
|
24
24
|
- Bash(codegraph *)
|
|
25
25
|
---
|
|
26
|
-
<!-- generated by harness_deploy.py; core=
|
|
26
|
+
<!-- generated by harness_deploy.py; core=f89f132dc909b0d8; overlay=none; agent=claude-code; do not edit -->
|
|
27
27
|
# harness-test — 测试执行
|
|
28
28
|
|
|
29
29
|
## Purpose
|
|
@@ -129,7 +129,7 @@ Runner 强制同项目单实例、低调度优先级、逐命令超时、正常
|
|
|
129
129
|
|
|
130
130
|
### Phase 1-2:测试执行(默认主会话执行)
|
|
131
131
|
|
|
132
|
-
**Phase 1 前先检查 verification-ledger
|
|
132
|
+
**Phase 1 前先检查 verification-ledger**:先执行 `harness_preflight.py check --project . --json`;profile 缺失或因清单、锁文件、源码根、技术栈变化而陈旧时立即执行一次 `detect --project . --json`。随后通过 state layout 解析后的路径调用 `harness_ledger.py can-reuse --project . --profile-input <key> --command <profile 解析出的规范命令>`;可复用时不得重跑。不得手工读取实现源码来猜账本参数。按返回的 `executionNeed` 使用中文:`first-run`=“尚未执行,需要首次运行”,`rerun`=“证据已失效,需要重新运行”,`evidence-incomplete`=“已有记录不完整,需要重新验证”,`reuse`=“现有证据可复用”;禁止把首次执行统一描述成“强制重跑”。
|
|
133
133
|
|
|
134
134
|
**默认在主会话执行**(不委派 subagent):
|
|
135
135
|
- 单元测试:可复用则跳过重跑;否则按技术栈执行测试命令
|
|
@@ -169,7 +169,9 @@ Runner 强制同项目单实例、低调度优先级、逐命令超时、正常
|
|
|
169
169
|
|
|
170
170
|
### 四、单元测试复用 + 写入 ledger
|
|
171
171
|
|
|
172
|
-
Phase 1 前用 `harness_ledger.py diff-hash` 和 `can-reuse` 重算真实指纹。验证目标必须使用 profile key 的单一入口:`--project . --profile-input unitTest|unitTestFull --command <规范命令>`;声明 `--profile-input` 后不得同时传入另一套 `--files`。`npx vitest run` 与 `vitest run` 等包装差异由账本规范化,`safe runner` 等说明只能写 `--runner-command` 元数据。可复用则跳过;否则执行同一 profile 命令并只登记一条结果。增量测试记 `unitTest`,模块全量记 `unitTestFull`,API/浏览器分别记录。详见 `checklist.md` 与 ledger protocol。
|
|
172
|
+
Phase 1 前用 `harness_ledger.py diff-hash` 和 `can-reuse` 重算真实指纹。验证目标必须使用 profile key 的单一入口:`--project . --profile-input unitTest|unitTestFull --command <规范命令>`;声明 `--profile-input` 后不得同时传入另一套 `--files`。`record` 与 `can-reuse` 必须消费同一 profile target,由 CLI 推导 scope、coverage、规范命令与输入闭包。`npx vitest run` 与 `vitest run` 等包装差异由账本规范化,`safe runner` 等说明只能写 `--runner-command` 元数据。可复用则跳过;否则执行同一 profile 命令并只登记一条结果。增量测试记 `unitTest`,模块全量记 `unitTestFull`,API/浏览器分别记录。详见 `checklist.md` 与 ledger protocol。
|
|
173
|
+
|
|
174
|
+
报告必须分开呈现“产品测试”与“工具维护”。`ownership.productPaths` 决定产品结论;`.cursor/.agents/.claude/.codebuddy` 的 Harness 投影、context-index 与安装状态变化只进入“工具维护”,不得单独把产品结果降为 WARN。已知升级使用明确文案“Harness 已从 <旧版本> 更新到 <新版本>”,不得写“无关漂移”。场景统计分别列出:已执行、待手工验收、已豁免、说明性、NOT_APPLICABLE;“未验证”必须只等于仍要求执行但尚未完成的场景数。
|
|
173
175
|
|
|
174
176
|
### 五、命令与请求超时治理
|
|
175
177
|
|
|
@@ -762,6 +762,8 @@ python <skills-root>/scripts/harness_ledger.py can-reuse --change-dir <dir> --ve
|
|
|
762
762
|
| `--profile-input requires --project` | can-reuse/record 展开 profile 需要项目根 | 补 `--project <project>` |
|
|
763
763
|
| `record` 缺 `--duration-ms` / `--evidence` | 参数为必填 | 按模板补齐 |
|
|
764
764
|
|
|
765
|
+
`can-reuse` 的主文案按 `executionNeed` 呈现,错误码仅放技术详情:`first-run` 表示首次执行,`rerun` 表示已有证据因输入或环境变化失效,`evidence-incomplete` 表示旧记录缺少当前契约字段,`reuse` 表示可直接复用。不得把 `VALIDATION_MISSING` 翻译成“强制重跑”。
|
|
766
|
+
|
|
765
767
|
## 结果分级规则
|
|
766
768
|
|
|
767
769
|
> 结果状态分级与证据要求遵循 `../protocols/evidence-based-reporting-protocol.md`。
|
|
@@ -74,6 +74,8 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
74
74
|
|---|---|---|
|
|
75
75
|
| `phase.start` | phase, timestamp | 阶段开始 |
|
|
76
76
|
| `phase.end` | phase, timestamp, status | 阶段结束并记录 `OK/WARN/FAIL/BLOCKED`;计算当前 attempt 耗时 |
|
|
77
|
+
| `phase.prepare.start` | phase, timestamp, attempt, trigger | 开始检查再次执行阶段的前置条件;不计入产品阶段 attempt |
|
|
78
|
+
| `phase.prepare.end` | phase, timestamp, attempt, status | 记录准备已启动或受阻及单独耗时;`BLOCKED` 不改变旧产品轮次 |
|
|
77
79
|
| `command` | command, exit_code, duration_ms | 命令事实 |
|
|
78
80
|
| `verification` | name, status, command | 验证事实 |
|
|
79
81
|
| `artifact` | path, kind | 报告、包、manifest 等产物 |
|