@hunter-harness/workflow-harness 0.4.3 → 0.4.9
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/CONTEXT.md +1 -1
- package/harness/bundles/general/claude-code/README.md +36 -38
- package/harness/bundles/general/claude-code/contracts/workflow-policy.json +0 -50
- package/harness/bundles/general/claude-code/harness-archive/SKILL.md +4 -3
- package/harness/bundles/general/claude-code/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-codebase-map/templates/TESTING.md +1 -1
- package/harness/bundles/general/claude-code/harness-execute/SKILL.md +19 -17
- package/harness/bundles/general/{codex/harness-run/checklist.md → claude-code/harness-execute/coding-checklist.md} +9 -9
- package/harness/bundles/general/{codex/harness-run/reference.md → claude-code/harness-execute/coding-reference.md} +36 -36
- package/harness/bundles/general/{codex/harness-run → claude-code/harness-execute}/protocols.md +4 -4
- package/harness/bundles/general/{codebuddy/harness-test/checklist.md → claude-code/harness-execute/testing-checklist.md} +9 -10
- package/harness/bundles/general/claude-code/{harness-test/pitfalls-java.md → harness-execute/testing-pitfalls-java.md} +2 -2
- package/harness/bundles/general/{codex/harness-test/pitfalls.md → claude-code/harness-execute/testing-pitfalls.md} +7 -7
- package/harness/bundles/general/claude-code/{harness-test/reference.md → harness-execute/testing-reference.md} +13 -13
- 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 +2 -2
- package/harness/bundles/general/claude-code/harness-plan/checklist.md +1 -1
- package/harness/bundles/general/claude-code/harness-plan/reference.md +30 -3
- package/harness/bundles/general/claude-code/harness-pull/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-push/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-review/SKILL.md +5 -5
- package/harness/bundles/general/claude-code/harness-review/checklist.md +1 -1
- package/harness/bundles/general/claude-code/harness-submit/SKILL.md +2 -2
- package/harness/bundles/general/claude-code/harness-submit/checklist.md +1 -1
- package/harness/bundles/general/claude-code/harness-submit/reference.md +1 -1
- package/harness/bundles/general/claude-code/harness-sync/SKILL.md +2 -2
- package/harness/bundles/general/claude-code/protocols/evidence-based-reporting-protocol.md +1 -1
- package/harness/bundles/general/claude-code/protocols/ledger-protocol.md +8 -8
- package/harness/bundles/general/claude-code/protocols/sensitive-info-protocol.md +2 -2
- package/harness/bundles/general/claude-code/scripts/harness_archive.py +28 -1
- package/harness/bundles/general/claude-code/scripts/harness_change.py +74 -0
- package/harness/bundles/general/claude-code/scripts/harness_context.py +271 -10
- package/harness/bundles/general/claude-code/scripts/harness_deploy.py +2 -2
- package/harness/bundles/general/claude-code/scripts/harness_events.py +4 -1
- package/harness/bundles/general/claude-code/scripts/harness_gate.py +281 -77
- package/harness/bundles/general/claude-code/scripts/harness_profile.py +3 -3
- package/harness/bundles/general/claude-code/scripts/harness_review.py +120 -0
- package/harness/bundles/general/claude-code/scripts/harness_runtime.py +13 -0
- package/harness/bundles/general/codebuddy/.harness-build.json +1 -1
- package/harness/bundles/general/codebuddy/CONTEXT.md +1 -1
- package/harness/bundles/general/codebuddy/README.md +36 -38
- package/harness/bundles/general/codebuddy/contracts/workflow-policy.json +0 -50
- package/harness/bundles/general/codebuddy/harness-archive/SKILL.md +4 -3
- package/harness/bundles/general/codebuddy/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-codebase-map/templates/TESTING.md +1 -1
- package/harness/bundles/general/codebuddy/harness-execute/SKILL.md +19 -17
- package/harness/bundles/general/{claude-code/harness-run/checklist.md → codebuddy/harness-execute/coding-checklist.md} +9 -9
- package/harness/bundles/general/codebuddy/{harness-run/reference.md → harness-execute/coding-reference.md} +36 -36
- package/harness/bundles/general/codebuddy/{harness-run → harness-execute}/protocols.md +4 -4
- package/harness/bundles/general/{codex/harness-test/checklist.md → codebuddy/harness-execute/testing-checklist.md} +9 -10
- package/harness/bundles/general/codebuddy/{harness-test/pitfalls-java.md → harness-execute/testing-pitfalls-java.md} +2 -2
- package/harness/bundles/general/{claude-code/harness-test/pitfalls.md → codebuddy/harness-execute/testing-pitfalls.md} +7 -7
- package/harness/bundles/general/codebuddy/{harness-test/reference.md → harness-execute/testing-reference.md} +13 -13
- 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 +2 -2
- package/harness/bundles/general/codebuddy/harness-plan/checklist.md +1 -1
- package/harness/bundles/general/codebuddy/harness-plan/reference.md +30 -3
- package/harness/bundles/general/codebuddy/harness-pull/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-push/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-review/SKILL.md +5 -5
- package/harness/bundles/general/codebuddy/harness-review/checklist.md +1 -1
- package/harness/bundles/general/codebuddy/harness-submit/SKILL.md +2 -2
- package/harness/bundles/general/codebuddy/harness-submit/checklist.md +1 -1
- package/harness/bundles/general/codebuddy/harness-submit/reference.md +1 -1
- package/harness/bundles/general/codebuddy/harness-sync/SKILL.md +2 -2
- package/harness/bundles/general/codebuddy/protocols/evidence-based-reporting-protocol.md +1 -1
- package/harness/bundles/general/codebuddy/protocols/ledger-protocol.md +8 -8
- package/harness/bundles/general/codebuddy/protocols/sensitive-info-protocol.md +2 -2
- package/harness/bundles/general/codebuddy/scripts/harness_archive.py +28 -1
- package/harness/bundles/general/codebuddy/scripts/harness_change.py +74 -0
- package/harness/bundles/general/codebuddy/scripts/harness_context.py +271 -10
- package/harness/bundles/general/codebuddy/scripts/harness_deploy.py +2 -2
- package/harness/bundles/general/codebuddy/scripts/harness_events.py +4 -1
- package/harness/bundles/general/codebuddy/scripts/harness_gate.py +281 -77
- package/harness/bundles/general/codebuddy/scripts/harness_profile.py +3 -3
- package/harness/bundles/general/codebuddy/scripts/harness_review.py +120 -0
- package/harness/bundles/general/codebuddy/scripts/harness_runtime.py +13 -0
- package/harness/bundles/general/codex/.harness-build.json +1 -1
- package/harness/bundles/general/codex/CONTEXT.md +1 -1
- package/harness/bundles/general/codex/README.md +36 -38
- package/harness/bundles/general/codex/contracts/workflow-policy.json +0 -50
- package/harness/bundles/general/codex/harness-archive/SKILL.md +4 -3
- package/harness/bundles/general/codex/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-codebase-map/templates/TESTING.md +1 -1
- package/harness/bundles/general/codex/harness-execute/SKILL.md +19 -17
- package/harness/bundles/general/{cursor/harness-run/checklist.md → codex/harness-execute/coding-checklist.md} +9 -9
- package/harness/bundles/general/{cursor/harness-run/reference.md → codex/harness-execute/coding-reference.md} +36 -36
- package/harness/bundles/general/{claude-code/harness-run → codex/harness-execute}/protocols.md +4 -4
- package/harness/bundles/general/{cursor/harness-test/checklist.md → codex/harness-execute/testing-checklist.md} +9 -10
- package/harness/bundles/general/codex/{harness-test/pitfalls-java.md → harness-execute/testing-pitfalls-java.md} +2 -2
- package/harness/bundles/general/{codebuddy/harness-test/pitfalls.md → codex/harness-execute/testing-pitfalls.md} +7 -7
- package/harness/bundles/general/codex/{harness-test/reference.md → harness-execute/testing-reference.md} +13 -13
- 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 +2 -2
- package/harness/bundles/general/codex/harness-plan/checklist.md +1 -1
- package/harness/bundles/general/codex/harness-plan/reference.md +30 -3
- package/harness/bundles/general/codex/harness-pull/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-push/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-review/SKILL.md +3 -3
- package/harness/bundles/general/codex/harness-review/checklist.md +1 -1
- package/harness/bundles/general/codex/harness-submit/SKILL.md +2 -2
- package/harness/bundles/general/codex/harness-submit/checklist.md +1 -1
- package/harness/bundles/general/codex/harness-submit/reference.md +1 -1
- package/harness/bundles/general/codex/harness-sync/SKILL.md +2 -2
- package/harness/bundles/general/codex/protocols/evidence-based-reporting-protocol.md +1 -1
- package/harness/bundles/general/codex/protocols/ledger-protocol.md +8 -8
- package/harness/bundles/general/codex/protocols/sensitive-info-protocol.md +2 -2
- package/harness/bundles/general/codex/scripts/harness_archive.py +28 -1
- package/harness/bundles/general/codex/scripts/harness_change.py +74 -0
- package/harness/bundles/general/codex/scripts/harness_context.py +271 -10
- package/harness/bundles/general/codex/scripts/harness_deploy.py +2 -2
- package/harness/bundles/general/codex/scripts/harness_events.py +4 -1
- package/harness/bundles/general/codex/scripts/harness_gate.py +281 -77
- package/harness/bundles/general/codex/scripts/harness_profile.py +3 -3
- package/harness/bundles/general/codex/scripts/harness_review.py +120 -0
- package/harness/bundles/general/codex/scripts/harness_runtime.py +13 -0
- package/harness/bundles/general/cursor/.harness-build.json +1 -1
- package/harness/bundles/general/cursor/CONTEXT.md +1 -1
- package/harness/bundles/general/cursor/README.md +36 -38
- package/harness/bundles/general/cursor/contracts/workflow-policy.json +0 -50
- package/harness/bundles/general/cursor/harness-archive/SKILL.md +4 -3
- package/harness/bundles/general/cursor/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-codebase-map/templates/TESTING.md +1 -1
- package/harness/bundles/general/cursor/harness-execute/SKILL.md +19 -17
- package/harness/bundles/general/{codebuddy/harness-run/checklist.md → cursor/harness-execute/coding-checklist.md} +9 -9
- package/harness/bundles/general/{claude-code/harness-run/reference.md → cursor/harness-execute/coding-reference.md} +36 -36
- package/harness/bundles/general/cursor/{harness-run → harness-execute}/protocols.md +4 -4
- package/harness/bundles/general/{claude-code/harness-test/checklist.md → cursor/harness-execute/testing-checklist.md} +9 -10
- package/harness/bundles/general/cursor/{harness-test/pitfalls-java.md → harness-execute/testing-pitfalls-java.md} +2 -2
- package/harness/bundles/general/cursor/{harness-test/pitfalls.md → harness-execute/testing-pitfalls.md} +7 -7
- package/harness/bundles/general/cursor/{harness-test/reference.md → harness-execute/testing-reference.md} +13 -13
- 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 +2 -2
- package/harness/bundles/general/cursor/harness-plan/checklist.md +1 -1
- package/harness/bundles/general/cursor/harness-plan/reference.md +30 -3
- package/harness/bundles/general/cursor/harness-pull/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-push/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-review/SKILL.md +3 -3
- package/harness/bundles/general/cursor/harness-review/checklist.md +1 -1
- package/harness/bundles/general/cursor/harness-submit/SKILL.md +2 -2
- package/harness/bundles/general/cursor/harness-submit/checklist.md +1 -1
- package/harness/bundles/general/cursor/harness-submit/reference.md +1 -1
- package/harness/bundles/general/cursor/harness-sync/SKILL.md +2 -2
- package/harness/bundles/general/cursor/protocols/evidence-based-reporting-protocol.md +1 -1
- package/harness/bundles/general/cursor/protocols/ledger-protocol.md +8 -8
- package/harness/bundles/general/cursor/protocols/sensitive-info-protocol.md +2 -2
- package/harness/bundles/general/cursor/scripts/harness_archive.py +28 -1
- package/harness/bundles/general/cursor/scripts/harness_change.py +74 -0
- package/harness/bundles/general/cursor/scripts/harness_context.py +271 -10
- package/harness/bundles/general/cursor/scripts/harness_deploy.py +2 -2
- package/harness/bundles/general/cursor/scripts/harness_events.py +4 -1
- package/harness/bundles/general/cursor/scripts/harness_gate.py +281 -77
- package/harness/bundles/general/cursor/scripts/harness_profile.py +3 -3
- package/harness/bundles/general/cursor/scripts/harness_review.py +120 -0
- package/harness/bundles/general/cursor/scripts/harness_runtime.py +13 -0
- package/harness/bundles/general/pi/.harness-build.json +1 -1
- package/harness/bundles/general/pi/CONTEXT.md +1 -1
- package/harness/bundles/general/pi/README.md +36 -38
- package/harness/bundles/general/pi/contracts/workflow-policy.json +0 -50
- package/harness/bundles/general/pi/harness-archive/SKILL.md +4 -3
- package/harness/bundles/general/pi/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/pi/harness-codebase-map/templates/TESTING.md +1 -1
- package/harness/bundles/general/pi/harness-execute/SKILL.md +19 -17
- package/harness/bundles/general/pi/harness-execute/coding-checklist.md +279 -0
- package/harness/bundles/general/pi/harness-execute/coding-reference.md +886 -0
- package/harness/bundles/general/pi/harness-execute/protocols.md +141 -0
- package/harness/bundles/general/pi/harness-execute/testing-checklist.md +358 -0
- package/harness/bundles/general/pi/harness-execute/testing-pitfalls-java.md +14 -0
- package/harness/bundles/general/pi/harness-execute/testing-pitfalls.md +307 -0
- package/harness/bundles/general/pi/harness-execute/testing-reference.md +880 -0
- package/harness/bundles/general/pi/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/general/pi/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/general/pi/harness-plan/SKILL.md +2 -2
- package/harness/bundles/general/pi/harness-plan/checklist.md +1 -1
- package/harness/bundles/general/pi/harness-plan/reference.md +30 -3
- package/harness/bundles/general/pi/harness-pull/SKILL.md +1 -1
- package/harness/bundles/general/pi/harness-push/SKILL.md +1 -1
- package/harness/bundles/general/pi/harness-review/SKILL.md +3 -3
- package/harness/bundles/general/pi/harness-review/checklist.md +1 -1
- package/harness/bundles/general/pi/harness-submit/SKILL.md +2 -2
- package/harness/bundles/general/pi/harness-submit/checklist.md +1 -1
- package/harness/bundles/general/pi/harness-submit/reference.md +1 -1
- package/harness/bundles/general/pi/harness-sync/SKILL.md +2 -2
- package/harness/bundles/general/pi/protocols/evidence-based-reporting-protocol.md +1 -1
- package/harness/bundles/general/pi/protocols/ledger-protocol.md +8 -8
- package/harness/bundles/general/pi/protocols/sensitive-info-protocol.md +2 -2
- package/harness/bundles/general/pi/scripts/harness_archive.py +28 -1
- package/harness/bundles/general/pi/scripts/harness_change.py +74 -0
- package/harness/bundles/general/pi/scripts/harness_context.py +271 -10
- package/harness/bundles/general/pi/scripts/harness_deploy.py +2 -2
- package/harness/bundles/general/pi/scripts/harness_events.py +4 -1
- package/harness/bundles/general/pi/scripts/harness_gate.py +281 -77
- package/harness/bundles/general/pi/scripts/harness_profile.py +3 -3
- package/harness/bundles/general/pi/scripts/harness_review.py +120 -0
- package/harness/bundles/general/pi/scripts/harness_runtime.py +13 -0
- package/harness/bundles/java/claude-code/.harness-build.json +1 -1
- package/harness/bundles/java/claude-code/CONTEXT.md +1 -1
- package/harness/bundles/java/claude-code/README.md +36 -38
- package/harness/bundles/java/claude-code/contracts/workflow-policy.json +0 -50
- package/harness/bundles/java/claude-code/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-archive/SKILL.md +4 -3
- package/harness/bundles/java/claude-code/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-codebase-map/templates/TESTING.md +1 -1
- package/harness/bundles/java/claude-code/harness-execute/SKILL.md +51 -17
- package/harness/bundles/java/claude-code/{harness-run/checklist.md → harness-execute/coding-checklist.md} +6 -6
- package/harness/bundles/java/claude-code/{harness-run/reference.md → harness-execute/coding-reference.md} +37 -37
- package/harness/bundles/java/claude-code/harness-execute/protocols.md +141 -0
- package/harness/bundles/java/claude-code/{harness-test/checklist.md → harness-execute/testing-checklist.md} +9 -9
- package/harness/bundles/java/claude-code/{harness-test/pitfalls-java.md → harness-execute/testing-pitfalls-java.md} +1 -1
- package/harness/bundles/java/claude-code/harness-execute/testing-pitfalls.md +307 -0
- package/harness/bundles/java/claude-code/{harness-test/reference.md → harness-execute/testing-reference.md} +13 -13
- 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-package/checklist.md +7 -7
- package/harness/bundles/java/claude-code/harness-plan/SKILL.md +2 -2
- package/harness/bundles/java/claude-code/harness-plan/checklist.md +1 -1
- package/harness/bundles/java/claude-code/harness-plan/reference.md +30 -3
- package/harness/bundles/java/claude-code/harness-pull/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-push/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-review/SKILL.md +5 -5
- package/harness/bundles/java/claude-code/harness-review/checklist.md +1 -1
- package/harness/bundles/java/claude-code/harness-submit/SKILL.md +2 -2
- package/harness/bundles/java/claude-code/harness-submit/checklist.md +1 -1
- package/harness/bundles/java/claude-code/harness-submit/reference.md +1 -1
- package/harness/bundles/java/claude-code/harness-sync/SKILL.md +2 -2
- package/harness/bundles/java/claude-code/protocols/evidence-based-reporting-protocol.md +1 -1
- package/harness/bundles/java/claude-code/protocols/ledger-protocol.md +8 -8
- package/harness/bundles/java/claude-code/protocols/sensitive-info-protocol.md +2 -2
- package/harness/bundles/java/claude-code/scripts/harness_archive.py +28 -1
- package/harness/bundles/java/claude-code/scripts/harness_change.py +74 -0
- package/harness/bundles/java/claude-code/scripts/harness_context.py +271 -10
- package/harness/bundles/java/claude-code/scripts/harness_deploy.py +2 -2
- package/harness/bundles/java/claude-code/scripts/harness_events.py +4 -1
- package/harness/bundles/java/claude-code/scripts/harness_gate.py +281 -77
- package/harness/bundles/java/claude-code/scripts/harness_profile.py +3 -3
- package/harness/bundles/java/claude-code/scripts/harness_review.py +120 -0
- package/harness/bundles/java/claude-code/scripts/harness_runtime.py +13 -0
- package/harness/bundles/java/codebuddy/.harness-build.json +1 -1
- package/harness/bundles/java/codebuddy/CONTEXT.md +1 -1
- package/harness/bundles/java/codebuddy/README.md +36 -38
- package/harness/bundles/java/codebuddy/contracts/workflow-policy.json +0 -50
- package/harness/bundles/java/codebuddy/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-archive/SKILL.md +4 -3
- package/harness/bundles/java/codebuddy/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-codebase-map/templates/TESTING.md +1 -1
- package/harness/bundles/java/codebuddy/harness-execute/SKILL.md +51 -17
- package/harness/bundles/java/codebuddy/{harness-run/checklist.md → harness-execute/coding-checklist.md} +6 -6
- package/harness/bundles/java/codebuddy/{harness-run/reference.md → harness-execute/coding-reference.md} +37 -37
- package/harness/bundles/java/codebuddy/harness-execute/protocols.md +141 -0
- package/harness/bundles/java/codebuddy/{harness-test/checklist.md → harness-execute/testing-checklist.md} +9 -9
- package/harness/bundles/java/codebuddy/{harness-test/pitfalls-java.md → harness-execute/testing-pitfalls-java.md} +1 -1
- package/harness/bundles/java/codebuddy/harness-execute/testing-pitfalls.md +307 -0
- package/harness/bundles/java/codebuddy/{harness-test/reference.md → harness-execute/testing-reference.md} +13 -13
- 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-package/checklist.md +7 -7
- package/harness/bundles/java/codebuddy/harness-plan/SKILL.md +2 -2
- package/harness/bundles/java/codebuddy/harness-plan/checklist.md +1 -1
- package/harness/bundles/java/codebuddy/harness-plan/reference.md +30 -3
- package/harness/bundles/java/codebuddy/harness-pull/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-push/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-review/SKILL.md +5 -5
- package/harness/bundles/java/codebuddy/harness-review/checklist.md +1 -1
- package/harness/bundles/java/codebuddy/harness-submit/SKILL.md +2 -2
- package/harness/bundles/java/codebuddy/harness-submit/checklist.md +1 -1
- package/harness/bundles/java/codebuddy/harness-submit/reference.md +1 -1
- package/harness/bundles/java/codebuddy/harness-sync/SKILL.md +2 -2
- package/harness/bundles/java/codebuddy/protocols/evidence-based-reporting-protocol.md +1 -1
- package/harness/bundles/java/codebuddy/protocols/ledger-protocol.md +8 -8
- package/harness/bundles/java/codebuddy/protocols/sensitive-info-protocol.md +2 -2
- package/harness/bundles/java/codebuddy/scripts/harness_archive.py +28 -1
- package/harness/bundles/java/codebuddy/scripts/harness_change.py +74 -0
- package/harness/bundles/java/codebuddy/scripts/harness_context.py +271 -10
- package/harness/bundles/java/codebuddy/scripts/harness_deploy.py +2 -2
- package/harness/bundles/java/codebuddy/scripts/harness_events.py +4 -1
- package/harness/bundles/java/codebuddy/scripts/harness_gate.py +281 -77
- package/harness/bundles/java/codebuddy/scripts/harness_profile.py +3 -3
- package/harness/bundles/java/codebuddy/scripts/harness_review.py +120 -0
- package/harness/bundles/java/codebuddy/scripts/harness_runtime.py +13 -0
- package/harness/bundles/java/codex/.harness-build.json +1 -1
- package/harness/bundles/java/codex/CONTEXT.md +1 -1
- package/harness/bundles/java/codex/README.md +36 -38
- package/harness/bundles/java/codex/contracts/workflow-policy.json +0 -50
- package/harness/bundles/java/codex/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-archive/SKILL.md +4 -3
- package/harness/bundles/java/codex/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-codebase-map/templates/TESTING.md +1 -1
- package/harness/bundles/java/codex/harness-execute/SKILL.md +51 -17
- package/harness/bundles/java/codex/{harness-run/checklist.md → harness-execute/coding-checklist.md} +6 -6
- package/harness/bundles/java/codex/{harness-run/reference.md → harness-execute/coding-reference.md} +37 -37
- package/harness/bundles/java/codex/harness-execute/protocols.md +141 -0
- package/harness/bundles/java/codex/{harness-test/checklist.md → harness-execute/testing-checklist.md} +9 -9
- package/harness/bundles/java/codex/{harness-test/pitfalls-java.md → harness-execute/testing-pitfalls-java.md} +1 -1
- package/harness/bundles/java/codex/harness-execute/testing-pitfalls.md +307 -0
- package/harness/bundles/java/codex/{harness-test/reference.md → harness-execute/testing-reference.md} +13 -13
- 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-package/checklist.md +7 -7
- package/harness/bundles/java/codex/harness-plan/SKILL.md +2 -2
- package/harness/bundles/java/codex/harness-plan/checklist.md +1 -1
- package/harness/bundles/java/codex/harness-plan/reference.md +30 -3
- package/harness/bundles/java/codex/harness-pull/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-push/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-review/SKILL.md +3 -3
- package/harness/bundles/java/codex/harness-review/checklist.md +1 -1
- package/harness/bundles/java/codex/harness-submit/SKILL.md +2 -2
- package/harness/bundles/java/codex/harness-submit/checklist.md +1 -1
- package/harness/bundles/java/codex/harness-submit/reference.md +1 -1
- package/harness/bundles/java/codex/harness-sync/SKILL.md +2 -2
- package/harness/bundles/java/codex/protocols/evidence-based-reporting-protocol.md +1 -1
- package/harness/bundles/java/codex/protocols/ledger-protocol.md +8 -8
- package/harness/bundles/java/codex/protocols/sensitive-info-protocol.md +2 -2
- package/harness/bundles/java/codex/scripts/harness_archive.py +28 -1
- package/harness/bundles/java/codex/scripts/harness_change.py +74 -0
- package/harness/bundles/java/codex/scripts/harness_context.py +271 -10
- package/harness/bundles/java/codex/scripts/harness_deploy.py +2 -2
- package/harness/bundles/java/codex/scripts/harness_events.py +4 -1
- package/harness/bundles/java/codex/scripts/harness_gate.py +281 -77
- package/harness/bundles/java/codex/scripts/harness_profile.py +3 -3
- package/harness/bundles/java/codex/scripts/harness_review.py +120 -0
- package/harness/bundles/java/codex/scripts/harness_runtime.py +13 -0
- package/harness/bundles/java/cursor/.harness-build.json +1 -1
- package/harness/bundles/java/cursor/CONTEXT.md +1 -1
- package/harness/bundles/java/cursor/README.md +36 -38
- package/harness/bundles/java/cursor/contracts/workflow-policy.json +0 -50
- package/harness/bundles/java/cursor/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-archive/SKILL.md +4 -3
- package/harness/bundles/java/cursor/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-codebase-map/templates/TESTING.md +1 -1
- package/harness/bundles/java/cursor/harness-execute/SKILL.md +51 -17
- package/harness/bundles/java/cursor/{harness-run/checklist.md → harness-execute/coding-checklist.md} +6 -6
- package/harness/bundles/java/cursor/{harness-run/reference.md → harness-execute/coding-reference.md} +37 -37
- package/harness/bundles/java/cursor/harness-execute/protocols.md +141 -0
- package/harness/bundles/java/cursor/{harness-test/checklist.md → harness-execute/testing-checklist.md} +9 -9
- package/harness/bundles/java/cursor/{harness-test/pitfalls-java.md → harness-execute/testing-pitfalls-java.md} +1 -1
- package/harness/bundles/java/cursor/harness-execute/testing-pitfalls.md +307 -0
- package/harness/bundles/java/cursor/{harness-test/reference.md → harness-execute/testing-reference.md} +13 -13
- 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-package/checklist.md +7 -7
- package/harness/bundles/java/cursor/harness-plan/SKILL.md +2 -2
- package/harness/bundles/java/cursor/harness-plan/checklist.md +1 -1
- package/harness/bundles/java/cursor/harness-plan/reference.md +30 -3
- package/harness/bundles/java/cursor/harness-pull/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-push/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-review/SKILL.md +3 -3
- package/harness/bundles/java/cursor/harness-review/checklist.md +1 -1
- package/harness/bundles/java/cursor/harness-submit/SKILL.md +2 -2
- package/harness/bundles/java/cursor/harness-submit/checklist.md +1 -1
- package/harness/bundles/java/cursor/harness-submit/reference.md +1 -1
- package/harness/bundles/java/cursor/harness-sync/SKILL.md +2 -2
- package/harness/bundles/java/cursor/protocols/evidence-based-reporting-protocol.md +1 -1
- package/harness/bundles/java/cursor/protocols/ledger-protocol.md +8 -8
- package/harness/bundles/java/cursor/protocols/sensitive-info-protocol.md +2 -2
- package/harness/bundles/java/cursor/scripts/harness_archive.py +28 -1
- package/harness/bundles/java/cursor/scripts/harness_change.py +74 -0
- package/harness/bundles/java/cursor/scripts/harness_context.py +271 -10
- package/harness/bundles/java/cursor/scripts/harness_deploy.py +2 -2
- package/harness/bundles/java/cursor/scripts/harness_events.py +4 -1
- package/harness/bundles/java/cursor/scripts/harness_gate.py +281 -77
- package/harness/bundles/java/cursor/scripts/harness_profile.py +3 -3
- package/harness/bundles/java/cursor/scripts/harness_review.py +120 -0
- package/harness/bundles/java/cursor/scripts/harness_runtime.py +13 -0
- package/harness/bundles/java/pi/.harness-build.json +1 -1
- package/harness/bundles/java/pi/CONTEXT.md +1 -1
- package/harness/bundles/java/pi/README.md +36 -38
- package/harness/bundles/java/pi/contracts/workflow-policy.json +0 -50
- package/harness/bundles/java/pi/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/pi/harness-archive/SKILL.md +4 -3
- package/harness/bundles/java/pi/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/pi/harness-codebase-map/templates/TESTING.md +1 -1
- package/harness/bundles/java/pi/harness-execute/SKILL.md +51 -17
- package/harness/bundles/java/pi/harness-execute/coding-checklist.md +252 -0
- package/harness/bundles/java/pi/harness-execute/coding-reference.md +820 -0
- package/harness/bundles/java/pi/harness-execute/protocols.md +141 -0
- package/harness/bundles/java/pi/harness-execute/testing-checklist.md +320 -0
- package/harness/bundles/java/pi/harness-execute/testing-pitfalls-java.md +16 -0
- package/harness/bundles/java/pi/harness-execute/testing-pitfalls.md +307 -0
- package/harness/bundles/java/pi/harness-execute/testing-reference.md +792 -0
- package/harness/bundles/java/pi/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/java/pi/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/java/pi/harness-package/SKILL.md +1 -1
- package/harness/bundles/java/pi/harness-package/checklist.md +7 -7
- package/harness/bundles/java/pi/harness-plan/SKILL.md +2 -2
- package/harness/bundles/java/pi/harness-plan/checklist.md +1 -1
- package/harness/bundles/java/pi/harness-plan/reference.md +30 -3
- package/harness/bundles/java/pi/harness-pull/SKILL.md +1 -1
- package/harness/bundles/java/pi/harness-push/SKILL.md +1 -1
- package/harness/bundles/java/pi/harness-review/SKILL.md +3 -3
- package/harness/bundles/java/pi/harness-review/checklist.md +1 -1
- package/harness/bundles/java/pi/harness-submit/SKILL.md +2 -2
- package/harness/bundles/java/pi/harness-submit/checklist.md +1 -1
- package/harness/bundles/java/pi/harness-submit/reference.md +1 -1
- package/harness/bundles/java/pi/harness-sync/SKILL.md +2 -2
- package/harness/bundles/java/pi/protocols/evidence-based-reporting-protocol.md +1 -1
- package/harness/bundles/java/pi/protocols/ledger-protocol.md +8 -8
- package/harness/bundles/java/pi/protocols/sensitive-info-protocol.md +2 -2
- package/harness/bundles/java/pi/scripts/harness_archive.py +28 -1
- package/harness/bundles/java/pi/scripts/harness_change.py +74 -0
- package/harness/bundles/java/pi/scripts/harness_context.py +271 -10
- package/harness/bundles/java/pi/scripts/harness_deploy.py +2 -2
- package/harness/bundles/java/pi/scripts/harness_events.py +4 -1
- package/harness/bundles/java/pi/scripts/harness_gate.py +281 -77
- package/harness/bundles/java/pi/scripts/harness_profile.py +3 -3
- package/harness/bundles/java/pi/scripts/harness_review.py +120 -0
- package/harness/bundles/java/pi/scripts/harness_runtime.py +13 -0
- package/harness/manifests/general/claude-code.json +65 -73
- package/harness/manifests/general/codebuddy.json +65 -73
- package/harness/manifests/general/codex.json +65 -73
- package/harness/manifests/general/cursor.json +65 -73
- package/harness/manifests/general/pi.json +65 -73
- package/harness/manifests/java/claude-code.json +68 -76
- package/harness/manifests/java/codebuddy.json +68 -76
- package/harness/manifests/java/codex.json +68 -76
- package/harness/manifests/java/cursor.json +68 -76
- package/harness/manifests/java/pi.json +68 -76
- package/hunter-workflow-family.json +2 -2
- package/package.json +15 -15
- package/harness/bundles/general/claude-code/harness-run/SKILL.md +0 -207
- package/harness/bundles/general/claude-code/harness-test/SKILL.md +0 -270
- package/harness/bundles/general/codebuddy/harness-run/SKILL.md +0 -188
- package/harness/bundles/general/codebuddy/harness-test/SKILL.md +0 -250
- package/harness/bundles/general/codex/harness-run/SKILL.md +0 -188
- package/harness/bundles/general/codex/harness-test/SKILL.md +0 -250
- package/harness/bundles/general/cursor/harness-run/SKILL.md +0 -188
- package/harness/bundles/general/cursor/harness-test/SKILL.md +0 -250
- package/harness/bundles/general/pi/harness-run/SKILL.md +0 -188
- package/harness/bundles/general/pi/harness-run/checklist.md +0 -279
- package/harness/bundles/general/pi/harness-run/protocols.md +0 -141
- package/harness/bundles/general/pi/harness-run/reference.md +0 -886
- package/harness/bundles/general/pi/harness-test/SKILL.md +0 -250
- package/harness/bundles/general/pi/harness-test/checklist.md +0 -359
- package/harness/bundles/general/pi/harness-test/pitfalls-java.md +0 -14
- package/harness/bundles/general/pi/harness-test/pitfalls.md +0 -307
- package/harness/bundles/general/pi/harness-test/reference.md +0 -880
- package/harness/bundles/java/claude-code/harness-run/SKILL.md +0 -225
- package/harness/bundles/java/claude-code/harness-run/protocols.md +0 -141
- package/harness/bundles/java/claude-code/harness-test/SKILL.md +0 -284
- package/harness/bundles/java/claude-code/harness-test/pitfalls.md +0 -307
- package/harness/bundles/java/codebuddy/harness-run/SKILL.md +0 -206
- package/harness/bundles/java/codebuddy/harness-run/protocols.md +0 -141
- package/harness/bundles/java/codebuddy/harness-test/SKILL.md +0 -264
- package/harness/bundles/java/codebuddy/harness-test/pitfalls.md +0 -307
- package/harness/bundles/java/codex/harness-run/SKILL.md +0 -206
- package/harness/bundles/java/codex/harness-run/protocols.md +0 -141
- package/harness/bundles/java/codex/harness-test/SKILL.md +0 -264
- package/harness/bundles/java/codex/harness-test/pitfalls.md +0 -307
- package/harness/bundles/java/cursor/harness-run/SKILL.md +0 -206
- package/harness/bundles/java/cursor/harness-run/protocols.md +0 -141
- package/harness/bundles/java/cursor/harness-test/SKILL.md +0 -264
- package/harness/bundles/java/cursor/harness-test/pitfalls.md +0 -307
- package/harness/bundles/java/pi/harness-run/SKILL.md +0 -206
- package/harness/bundles/java/pi/harness-run/checklist.md +0 -252
- package/harness/bundles/java/pi/harness-run/protocols.md +0 -141
- package/harness/bundles/java/pi/harness-run/reference.md +0 -820
- package/harness/bundles/java/pi/harness-test/SKILL.md +0 -264
- package/harness/bundles/java/pi/harness-test/checklist.md +0 -320
- package/harness/bundles/java/pi/harness-test/pitfalls-java.md +0 -16
- package/harness/bundles/java/pi/harness-test/pitfalls.md +0 -307
- package/harness/bundles/java/pi/harness-test/reference.md +0 -792
- /package/harness/bundles/general/claude-code/{harness-test → harness-execute}/scripts/runtime-helpers.mjs +0 -0
- /package/harness/bundles/general/codebuddy/{harness-test → harness-execute}/scripts/runtime-helpers.mjs +0 -0
- /package/harness/bundles/general/codex/{harness-test → harness-execute}/scripts/runtime-helpers.mjs +0 -0
- /package/harness/bundles/general/cursor/{harness-test → harness-execute}/scripts/runtime-helpers.mjs +0 -0
- /package/harness/bundles/general/pi/{harness-test → harness-execute}/scripts/runtime-helpers.mjs +0 -0
- /package/harness/bundles/java/claude-code/{harness-test → harness-execute}/scripts/runtime-helpers.mjs +0 -0
- /package/harness/bundles/java/codebuddy/{harness-test → harness-execute}/scripts/runtime-helpers.mjs +0 -0
- /package/harness/bundles/java/codex/{harness-test → harness-execute}/scripts/runtime-helpers.mjs +0 -0
- /package/harness/bundles/java/cursor/{harness-test → harness-execute}/scripts/runtime-helpers.mjs +0 -0
- /package/harness/bundles/java/pi/{harness-test → harness-execute}/scripts/runtime-helpers.mjs +0 -0
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: harness-run
|
|
3
|
-
description: 按变更簇执行 TDD 编码循环(RED→GREEN→REFACTOR→编译验证),逐变更簇实现计划中的任务。仅当用户显式调用
|
|
4
|
-
/harness-run 时使用;不得因用户提到编码/实现就自动触发,也不得被其他阶段 skill 自动接续。
|
|
5
|
-
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=ab7b7953c9715e18; overlay=java; agent=cursor; do not edit -->
|
|
7
|
-
# harness-run — 需求编码
|
|
8
|
-
|
|
9
|
-
> **2026-08 阶段合并**:原 `run`(编码)与 `test`(验证)合并为单一 `execute` 阶段,
|
|
10
|
-
> 统一入口为 **`/harness-execute`**(`harness/harness-execute/SKILL.md`)。本 skill 作为
|
|
11
|
-
> 别名保留,frontmatter `name` 不变、内容照旧可用;门禁入参 `--phase run` 经
|
|
12
|
-
> `LEGACY_PHASE_ALIASES` 归一为 execute。别名至少保留一个 minor 版本,退役时间见
|
|
13
|
-
> `docs/harness-improvement-roadmap/`。下文出现的阶段名 `run`/`test` 均按别名解析。
|
|
14
|
-
|
|
15
|
-
## Purpose
|
|
16
|
-
|
|
17
|
-
基于 plan + test-scenarios,按**变更簇**执行 TDD(RED→GREEN→REFACTOR→构建验证),写入 verification-ledger。负责 worktree 创建/切换(见 worktree-gate)。
|
|
18
|
-
|
|
19
|
-
## When to Use
|
|
20
|
-
|
|
21
|
-
仅当用户显式调用 `/harness-run` 时执行;plan 完成后**不自动**进入本阶段。参数:`--subagent` 强制 Subagent-Driven;`--inline` 等同默认;`--fixback` 读最新 review fixback。**默认 Inline,不询问执行模式**。
|
|
22
|
-
|
|
23
|
-
**单阶段原则**:run 关门后必须停止并交还用户,仅提示 `plannedPhases` 中的真实下一阶段;禁止自动开始其他阶段。
|
|
24
|
-
|
|
25
|
-
## 前置条件
|
|
26
|
-
|
|
27
|
-
- 设计文档(`plans/*-design.md` 优先,回退 `spec/*-design.md`)与 `plans/*-plan.md`(含 frontmatter)存在且已审批
|
|
28
|
-
- 读 `meta/worktree.json`:`requested=true` 时 worktree 须存在或 run 负责创建
|
|
29
|
-
|
|
30
|
-
## Worktree 门禁
|
|
31
|
-
|
|
32
|
-
读取 `meta/worktree.json`(兼容旧路径 `worktree.json`):
|
|
33
|
-
|
|
34
|
-
| 条件 | 行为 |
|
|
35
|
-
|------|------|
|
|
36
|
-
| `requested=false` | 主目录执行 |
|
|
37
|
-
| `requested=true` + path 存在 | 切换 worktree 执行 |
|
|
38
|
-
| `requested=true` + path 不存在 | **必须创建**(run)或 **停止**(test/review/submit) |
|
|
39
|
-
|
|
40
|
-
**严禁** `requested=true` 时静默回主目录。创建失败 → 停止或 blocking user confirmation 降级(须 🟡WARN + 用户确认)。
|
|
41
|
-
|
|
42
|
-
**状态与代码分离**:代码/编译/测试在 `worktreeRoot`;`stateDir`(logs/events/ledger/reports)写回 `.harness/changes/<change-name>/`。
|
|
43
|
-
|
|
44
|
-
创建命令与 JSON 模板 → 各 skill `reference.md`(plan 写决策,run 创建/更新)。
|
|
45
|
-
> 片段:worktree-gate · 创建命令 → `reference.md`
|
|
46
|
-
|
|
47
|
-
## 统一读取协议
|
|
48
|
-
|
|
49
|
-
0. **脚本在 `<skills-root>/scripts/` 共享,不在每个 skill 子目录下** — 实际形态是 `.codebuddy/skills/scripts/harness_*.py`(`.claude`/`.cursor`/`.codex` 同理),**没有** `.../skills/harness-<phase>/scripts/`。plan、run/test、archive 三份执行日志里都先猜成后者、报 `No such file` 再靠 Search 找回来;照第一种写法直接用
|
|
50
|
-
1. **`.harness/changes/<change-name>/` 是唯一真相源** — 所有输入从该目录读取,产物写入对应子目录
|
|
51
|
-
2. **change-name 优先从 frontmatter 读取** — `plans/*-design.md`、`spec/*-design.md`、`plans/*-plan.md` 的 YAML `change-name`
|
|
52
|
-
3. **frontmatter 缺失时兼容旧格式** — 从路径推断,标记 `🟡 legacy-plan`,不失败
|
|
53
|
-
4. **design** — 设计真相源按序取第一个存在的:`plans/<change>-design.md`(v2 发布产物,哈希绑定)→ `spec/<change>-design.md`(legacy 手写)。两份**同时存在**时以 `plans/` 为准,并记 `🟡 WARN 设计文档双份`——v2 发布的那份才受完整性门禁保护,读手写的那份等于绕过校验
|
|
54
|
-
5. **plan** — 任务真相源:`plans/<change>-plan.md`
|
|
55
|
-
6. **implementation-detail** — 自适应执行参考;legacy 缺失 🟡WARN,不阻断
|
|
56
|
-
7. **test-scenarios** — 测试真相源:`plans/<change>-test-scenarios.md`
|
|
57
|
-
8. **禁止读取 `docs/superpowers/` 作为正式输入** — 旧草稿仅人工线索
|
|
58
|
-
9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --json`。首次 Plan 捕获时,脚本把当时的 Git HEAD 写入不可变 `changeBase`;后续阶段只刷新 `git.head` 与各段指纹,不得用当前 HEAD 覆盖 `changeBase`。只有迁移旧 change 且已能证明真实计划起点时,才在首次补录时传 `--base <baseCommit>`。`changedSegments=[]` 时复用已有 profile/rules/map/change/code 指纹,不再重复跑全量 `harness-sync` 或代码库扫描。`knowledge` 段仅为兼容空段,知识始终按需远端查询;快照不能替代源码读取和验证门禁。
|
|
59
|
-
|
|
60
|
-
状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
|
|
61
|
-
> 片段:read-protocol · run 必读文件优先级 → `reference.md` Step 0
|
|
62
|
-
|
|
63
|
-
## 执行模式
|
|
64
|
-
|
|
65
|
-
默认 **Inline Execution**;仅 `--subagent` 切换 Subagent-Driven。
|
|
66
|
-
|
|
67
|
-
## Workflow 概要
|
|
68
|
-
|
|
69
|
-
0. 加载上下文:普通 Run 先 `harness_context.py prepare --project . --change <id> --phase run --executor <tool> --json`(`--project` 必填,漏了直接 argparse 报错),再 **`harness_context.py begin --project . --change <id> --phase run --executor <tool> --json`** 校验交接,最后运行 **`harness_gate.py begin --phase run --change <id>`**。<br>**交接凭证不必手工补**:v2 计划的 `plan finalize` 不写 context 事务,`prepare` 会在检测到 committed 的 `meta/publication-journals/*.json` 时自动补录 `plan → run` 凭证(凭证带 `bootstrapSource=plan_publication_journal` 留痕)。仍报 `HANDOFF_REQUIRED`/`LEGACY_BOOTSTRAP_REQUIRED` 说明**没有**这份发布证据——回到 plan 阶段确认发布是否真的完成,**不得**自己拼 `classify + configure-plan + close` 造凭证。`harness_gate.py` 会从当前已安装适配器自动识别 skills root;只有执行复制到别处的脚本时才显式传 `--skills-root`。`--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 补传事件,失败只告警。
|
|
70
|
-
0.5. **测试基础设施探测**(先写 `CHECKING`,四项证据齐备后再结论)→ `reference.md` Step 0.5;测试基线已由上一步 gate begin 内部建立,不得再次执行 guard begin
|
|
71
|
-
1. **变更簇 TDD** — `protocols.md` `run-tdd-protocol`;批量 RED/GREEN;按需 `change-cluster-review-protocol`(高风险 + reviewer 预检可用)
|
|
72
|
-
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、规范命令和输入闭包;不得再手填另一套身份。detect 在嵌套/多组件仓库返回 `DETECTION_AMBIGUOUS` 时,响应里的 `profileTemplate` 就是可填骨架(已含 defaultsFingerprint、excludedRoots 默认集与 commands 条目形状),按 `hint` 填好写入 `.harness/config/build-profile.json` 即可,**不要去反读 `harness_profile.py` 源码凑结构**。`diff-hash --change-dir` 纳入 ignored tests → `reference.md` Step 2c
|
|
73
|
-
3. **场景覆盖检查**(场景表映射,禁止用用例数冒充场景数)
|
|
74
|
-
4. **关门检查**(10 项)→ 只执行一次 `harness_gate.py close`;`--to-phase` 必须取返回的 `nextPhases` 或 `plannedPhases` 中 run 的真实后继,禁止写死 test。该命令内部关闭 test guard、写 `phase.end`、释放租约、写 handoff 并补传事件;不得再单独调用 test-guard/context close。失败时按结构化 `recoveryAction` 原样重试,已完成步骤幂等复用。
|
|
75
|
-
|
|
76
|
-
**阶段归属规则**:只用 `ownerPhase=run` 的任务和场景判定编码阶段结果。`ownerPhase=test` 的任务或场景按计划留给测试阶段属于正常移交,必须记录为“待测试阶段执行”,不得将编码阶段降级为 WARN;只有 run 自身负责的工作未完成、验证降级或证据异常时才使用 WARN。
|
|
77
|
-
|
|
78
|
-
> 关门脚本与本规则一致:`harness_gate.py close --phase run` 的 C9 场景覆盖只要求 `ownerPhase` 为 `plan`/`run` 的必需场景有通过 receipt,`ownerPhase=test` 的场景出现在返回值的 `deferred` 里,不阻断 run。若 run 关门报 `REQUIRED_SCENARIO_NOT_EXECUTED` 且缺的是接口/端到端场景,那是 `meta/scenario-manifest.json` 里 `ownerPhase` 标错了(或老清单没声明),应当修清单——**不要**为了过门在 run 阶段起服务补跑本属 test 的验证。
|
|
79
|
-
|
|
80
|
-
**Fixback**:入口只用 `launch-review`,后续问题处理通过 `resolve-issue/close` 驱动,不得把修复说明当成新的普通 Run。只读取返回的受影响问题和文件;验证仅失效与 `changedFiles` 相交的目标,其他 Test/Review 证据继续复用。RED 优先;`manual`、`workflow` 或未选用的建议不进入代码批次,使用中文记录处理结论。
|
|
81
|
-
|
|
82
|
-
**构建/测试执行入口**:所有构建与测试命令(mvn / gradle / npm test / pytest 等)必须经 `harness_test_runner.py exec` 发起,**禁止**用 `powershell.exe -Command` 直接裸跑:
|
|
83
|
-
|
|
84
|
-
```text
|
|
85
|
-
python <skills-root>/scripts/harness_test_runner.py exec --project . --timeout-seconds <预估上限> -- <构建命令及参数>
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
该入口持有项目级互斥锁并托管进程树。裸跑构建在宿主工具超时后会被推入后台,多个后台构建同时写同一个 `target/`、`build/` 或 `node_modules/.cache`,表现为编译产物被清空、日志文件被占用、"增量编译抖动"——这些都不是代码缺陷,是并发自相残杀,排查成本极高。`--timeout-seconds` 按最慢的一次全量构建估(默认 300 秒偏短),宁可给足也不要让命令被中途掐断。
|
|
89
|
-
|
|
90
|
-
返回 `TEST_RUN_ALREADY_ACTIVE`(退出码 3)说明**已有构建在跑**:等它结束或用 `lock-status` 查明持有者,**不得**改用裸跑绕开锁,也不得另起一个并行构建。确认持有进程已消失时才用 `lock-reap` 回收。
|
|
91
|
-
|
|
92
|
-
**长阶段租约**:`gate begin` 的租约默认 TTL 3600 秒,而 run 阶段常常跑得更久。租约过期不会中断执行,**也不再阻断收尾**:`gate close` 发现租约过期而 run-id 仍是本阶段的,会自动用原 run-id 重取并照常关门,只在返回体的 `leaseLapsed` 里记下这个阶段跑过了 TTL。过期本身不说明所有权变了——抢占会重写租约文件把 run-id 换掉,那时报的是 `LEASE_OWNER_MISMATCH`。
|
|
93
|
-
|
|
94
|
-
因此**不需要**为了长阶段定期续租。确实想让租约始终有效时,用本阶段原 run-id 刷新即可(同 run-id 重复 claim 即刷新,不会新开 attempt):
|
|
95
|
-
|
|
96
|
-
```text
|
|
97
|
-
python <skills-root>/scripts/harness_change.py claim --change <id> --phase run --run-id <本阶段 run-id> --ttl-seconds 3600 --json
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
仍然报 `LEASE_ABSENT` 说明这个阶段**根本没有租约记录**(从未 begin,或已被释放),不是超时;先确认 `gate begin` 真的跑过。报 `LEASE_INVALID` 说明租约文件损坏,无法证明没被抢占,需人工确认无并发后再用上面的命令重取。两种情况都**不要**重跑 `gate begin`——那会新开 attempt 并丢失本轮 capsule。
|
|
101
|
-
|
|
102
|
-
**执行器边界**:优先使用项目 build profile 和已有测试入口。禁止为了绕过 ESM、路径或参数问题临时生成 `.js`、`require` 脚本;需要文件式 runner 时使用项目已有入口,确需新增时遵循项目模块类型(例如 ESM 使用 `.mjs`)。runner 包装说明写入 `runnerCommand` 元数据,不得拼进账本的规范 `command`。
|
|
103
|
-
|
|
104
|
-
**Foundation Gate**:若 `meta/implementation-checkpoints.json` 中 `foundation-gate` 为 pending,不得开始 plan 中任务 6+;由 `harness_gate.py` 硬阻断。
|
|
105
|
-
|
|
106
|
-
### Java 构建验证(Maven)
|
|
107
|
-
|
|
108
|
-
- 所有 `mvn`/`git` 经 `powershell.exe -NoProfile -Command`;命令读 `.harness/config/build-profile.json` 的 `commands`(v2,按 profile key resolve;**禁止 hardcode 模块名/端口**)
|
|
109
|
-
- 增量编译:`commands.compile`(典型 `mvn compile -pl <module> -o -q`)
|
|
110
|
-
- 变更簇 TDD:多测试类合并一次按 `commands.unitTest` resolve(典型 `mvn test -pl <module> -Dtest=A,B,C -o`);每簇最多一次 RED + 一次 GREEN Maven
|
|
111
|
-
- **轻量 run**:默认只 compile;全量 `mvn test` 仅当改了 mapper/sql/权限/controller/公共模块或用户要求 full-run-validation
|
|
112
|
-
- **install -am**:仅 worktree 首建或上游模块文件变化时(见 ledger-protocol);非每次 run 强制
|
|
113
|
-
- worktree 中确认 `.mvn/maven.config` 等构建配置存在;缺失时从主目录复制
|
|
114
|
-
## P0 执行可信度规则
|
|
115
|
-
|
|
116
|
-
- 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
|
|
117
|
-
- 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
|
|
118
|
-
- 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
|
|
119
|
-
|
|
120
|
-
## 生成内容语言约定
|
|
121
|
-
|
|
122
|
-
- sync/ingest 等生成的文档、规则、知识条目、架构说明一律**优先使用中文**撰写(标识符、命令、代码、API 字段名保持原文)
|
|
123
|
-
- 面向平台展示的标题/摘要/正文默认中文;仅当用户明确要求或目标系统强制时才用英文
|
|
124
|
-
> 片段:p0-trust
|
|
125
|
-
|
|
126
|
-
## 关键规则(硬门禁速查)
|
|
127
|
-
|
|
128
|
-
> 全文判定、示例、模板 → `reference.md`;ledger → `../protocols/ledger-protocol.md`
|
|
129
|
-
|
|
130
|
-
| 域 | 要点 |
|
|
131
|
-
|----|------|
|
|
132
|
-
| **文档输入** | 只读 `.harness/changes/<cn>/`;禁止 `docs/superpowers/` |
|
|
133
|
-
| **变更簇 TDD** | 一簇一次 RED/GREEN;低价值项豁免;新分支必须 RED |
|
|
134
|
-
| **RED/GREEN** | RED 须有效;静态验证 ≠ 测试通过;greenfield 大重写豁免见 reference |
|
|
135
|
-
| **Mapper/DB** | 纯 Mock 不得宣称 DB 验证通过;迁移脚本**永不自动执行** |
|
|
136
|
-
| **探测/ledger** | 基础设施先探测;每次构建/测试经 `harness_ledger.py record`;禁止手写 ledger JSON;用 canonical `diff-hash --change-dir` |
|
|
137
|
-
| **Gate/Guard** | 跨 Agent/阶段先用 `harness_context.py prepare/begin`;阶段门禁与上下文交接统一用 `harness_gate.py begin/close`;gate 内部负责 guard begin/close,模型只在需要记录测试来源或修复时调用 guard 的 `record/stage/mark` |
|
|
138
|
-
| **预存变更** | 保留 → baseline 隔离;存在则最终 ≥ 🟡WARN |
|
|
139
|
-
| **关门/状态** | 10 项关门检查;持久化 run-task-status;仅 run-owned P0 静态-only 导致 WARN;test-owned 待办正常移交 |
|
|
140
|
-
| **Worktree** | `requested=true` 时代码只写 worktree |
|
|
141
|
-
| **构建/测试** | 一律经 `harness_test_runner.py exec`;禁止裸跑 mvn/gradle/npm test;`TEST_RUN_ALREADY_ACTIVE` 表示已有构建在跑,等待而非另起 |
|
|
142
|
-
| **租约** | 阶段超 TTL 由 close 自动用原 run-id 重取,无需续租;`LEASE_ABSENT`(无记录)/`LEASE_INVALID`(文件损坏)才需人工 `harness_change.py claim`,一律不重跑 begin |
|
|
143
|
-
| **PowerShell** | 所有 git 经 `powershell.exe -NoProfile -Command` |
|
|
144
|
-
|
|
145
|
-
### 陈旧测试安全修复与精确跟踪
|
|
146
|
-
|
|
147
|
-
测试编译或 RED/GREEN 失败时,先区分当前实现缺陷、测试基础设施故障与陈旧测试。只有同时满足以下条件才允许自动修复陈旧测试:当前生产代码、已批准计划或可验证的历史变更能唯一确定新契约;修改范围仅限测试文件;修复后会立即重跑该测试及本变更目标测试。符合时以 `stale-test-repair` 记录:
|
|
148
|
-
|
|
149
|
-
```text
|
|
150
|
-
python <skills-root>/scripts/harness_test_guard.py record --project . --change-dir ".harness/changes/<change-name>" --files "<精确测试文件路径,逗号分隔>" --reason stale-test-repair --json
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
新建或正常更新测试分别使用 `tdd-created` / `test-updated`。若预期行为存在业务歧义,停止测试修复并记录 `BLOCKED_PREEXISTING`,不得猜测新断言。
|
|
154
|
-
|
|
155
|
-
**禁止临时排除测试**:不得将测试改名为 `.bak`、移出测试目录、删除、添加 `@Disabled`/`@Ignore`、修改 Surefire/Gradle exclude 或跳过测试来制造绿色结果;也不得仅为满足陈旧测试而修改生产代码。`.gitignore` 中的测试只能通过 manifest 的精确路径闭环处理,禁止全局放宽 ignore。
|
|
156
|
-
|
|
157
|
-
### Java TDD / 数据访问补充
|
|
158
|
-
|
|
159
|
-
| 项 | 规则 |
|
|
160
|
-
|----|------|
|
|
161
|
-
| **低价值豁免** | ErrorCode 常量、VO/DTO 字段、注释、import 清理、格式化、SQL 脚本、配置模板、文档 — 不单独建测试类;禁止为单个错误码单独跑 Maven |
|
|
162
|
-
| **Mapper / LambdaQueryWrapper / SQL** | 纯 Mock 返回值**不得**宣称 DB 验证通过 → 🟡 静态验证,交 harness-test 真实 DB |
|
|
163
|
-
| **行为性新分支** | 正则/条件/分支逻辑变更新增分支须 RED→GREEN;不属于低价值豁免 |
|
|
164
|
-
| **ledger** | compile 必写;执行了 test 写 unitTest,否则 `NOT_RUN_BY_RUN`;diffHash 用 `harness_ledger.py diff-hash --change-dir`(见 reference) |
|
|
165
|
-
| **陈旧 Java 测试** | `cannot find symbol`/mapper 方法改名/DTO 字段迁移只有在当前接口和批准计划唯一确定替代契约时才允许只改测试;修复后定向 `mvn test -Dtest=<class>`,再跑目标测试并记录 `stale-test-repair` |
|
|
166
|
-
| **禁止规避** | 禁止把 `*Test.java` 改成 `.bak`、删除、`@Disabled`/`@Ignore`、Surefire exclude 或以 `-DskipTests` 充当 GREEN |
|
|
167
|
-
## Output Format
|
|
168
|
-
|
|
169
|
-
变更文件表 + 构建/测试证据 + 场景覆盖摘要 + 最终状态(✅OK / 🟡WARN / ❌FAIL)。→ `reference.md`
|
|
170
|
-
|
|
171
|
-
## 渐进披露
|
|
172
|
-
|
|
173
|
-
- **Read `protocols.md`** — run-tdd + change-cluster-review
|
|
174
|
-
- **Read `reference.md`** — Step 0–5 细节、TDD/RED/ledger/迁移/安全矩阵
|
|
175
|
-
- **Read `checklist.md`** — 逐步勾选
|
|
176
|
-
|
|
177
|
-
## 交互白名单
|
|
178
|
-
|
|
179
|
-
1. **预存变更**:保留 / 暂存 / 终止
|
|
180
|
-
2. **数据库迁移**:展示审查清单并确认(**永不自动执行**)
|
|
181
|
-
3. **worktree 创建失败**:是否改主目录
|
|
182
|
-
|
|
183
|
-
## 执行日志
|
|
184
|
-
|
|
185
|
-
`events.ndjson` 为唯一事实源(schema_version 3,兼容读取 v1/v2;`note` 承载人类可读摘要);`logs/execution-log.md` 由 `harness_events.py` 渲染,**禁止用 Write/Edit 直接维护**。直接修改的内容会在 `phase.end` 或 finalize 时被完整重建覆盖,属于数据丢失;需要保留的详情必须进入事件 `note`。结构 → [[../protocols/report-pipeline-protocol.md|report-pipeline-protocol]]
|
|
186
|
-
|
|
187
|
-
**`phase.start` 由 `harness_gate.py begin` 写,不要再手工追加一次。** 两条同 `run-id` 的
|
|
188
|
-
`phase.start` 会让 `plan finalize` 以 `PHASE_START_DUPLICATE` 卡死,而且手工那次会先触发
|
|
189
|
-
auto-seal、把正在开始的 attempt 封成 `RECOVERED`。要补触发指令说明就带 `--note` 跑 `gate begin`。
|
|
190
|
-
(重复追加现已按 `(phase, run-id)` 判为幂等 no-op,但依赖它不如不写。)
|
|
191
|
-
|
|
192
|
-
```powershell
|
|
193
|
-
# 阶段开始:gate begin 负责,note 在这里给
|
|
194
|
-
python <skills-root>/scripts/harness_gate.py begin --change-dir ".harness/changes/<change-name>" --phase <phase> --note "<触发指令>"
|
|
195
|
-
# 阶段中的其他事件才用 append
|
|
196
|
-
python <skills-root>/scripts/harness_events.py append --change-dir ".harness/changes/<change-name>" --phase <phase> --type <command|issue|verification> --run-id <phase-run-id> --note "<摘要>"
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
> **脚本接线**:`harness_events.py append`;`harness_archive.py finalize`;`harness_preflight.py check`;`harness_ledger.py can-reuse`;`harness_service.py ensure/stop`(须 `--files`/`serviceStart.inputFiles`)。JSON 输出按 D13 护栏解读。
|
|
200
|
-
|
|
201
|
-
> **Task 4 §6.1 写入契约**:普通 `append` = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex` 无需去重扫描)。仅 `--type phase.end` append 在追加成功后渲染一次 `execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。高频 command append 期间 log 可能滞后,phase 边界保持最新。
|
|
202
|
-
|
|
203
|
-
每个阶段的 `phase.start` 与对应 `phase.end` 必须复用同一 `--run-id` / `--attempt`;阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`。重试同一阶段时生成新的 run-id 并增加 `--attempt <n>`,不得覆盖或伪装成一次执行。**`attempt` 按 phase 全局递增,不是按 run-id**:一个 run-id 只绑定一个 attempt,重试必须「新 run-id + 下一个 attempt」两者同时换,只换其一会撞 `EVENT_ATTEMPT_CONFLICT` 或 `PHASE_ALREADY_CLOSED`。已发布 plan 的修订通过重跑 `plan evidence-pack` + `plan finalize` 分配新 attempt(`harness_plan_finalize.py republish` 已于 0.3.0 移除)。
|
|
204
|
-
|
|
205
|
-
阶段跑得久(plan/run 常见)时用 `harness_context.py renew --project . --change <cn> --executor <tool>` 续租;租约到期本身不再阻断 `close`(同一 owner 的过期租约不构成冲突,收据里记 `leaseLapsed`),但续租能让 `view` 的状态如实反映在跑。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
|
|
206
|
-
> 片段:logging · phase=`run`
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: harness-run 的原生执行协议。内化 TDD 与变更簇审查能力,但不运行时依赖 Superpowers。
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# harness-run 原生执行协议
|
|
6
|
-
|
|
7
|
-
本文件定义 `/harness-run` 的内置执行协议。它吸收 test-driven-development 与 subagent-driven-development 的有效做法,但正式流程不调用 Superpowers,也不把外部 skill 是否存在作为执行条件。
|
|
8
|
-
|
|
9
|
-
## 协议一:run-tdd-protocol
|
|
10
|
-
|
|
11
|
-
用于每个变更簇。目标是保留 RED→GREEN→REFACTOR 的行为约束,同时允许 harness 按证据分级处理缺失测试基础设施的现实情况。
|
|
12
|
-
|
|
13
|
-
### RED 三态
|
|
14
|
-
|
|
15
|
-
| RED 类型 | 何时使用 | 证据要求 |
|
|
16
|
-
|----------|----------|----------|
|
|
17
|
-
| 真实 RED | 测试基础设施可用,能写测试并运行失败 | 测试编译通过,失败断言指向目标行为 |
|
|
18
|
-
| 静态 RED | 测试基础设施不可用或目标层无法真实验证 | 记录降级原因、静态验证场景、待 harness-test 验证场景 |
|
|
19
|
-
| 复用 RED | 计划和测试场景已明确失败场景,且本轮只执行同一场景的实现 | 引用 test-scenarios 编号与前序证据,仍需在 run 日志登记 |
|
|
20
|
-
|
|
21
|
-
RED 失败原因必须与目标 bug 或需求直接相关。无效 RED(测试搭建错误、private 访问限制、mock/stubbing 错误、依赖注入失败、NPE 来自测试夹具)不得进入 GREEN。
|
|
22
|
-
|
|
23
|
-
### GREEN
|
|
24
|
-
|
|
25
|
-
GREEN 只做让当前变更簇通过的最小实现。不得顺手处理无关重构、顺手扩范围、或把未确认业务决策写入代码。
|
|
26
|
-
|
|
27
|
-
### REFACTOR
|
|
28
|
-
|
|
29
|
-
REFACTOR 只允许不改变行为的整理。若重构改变行为,必须回到 RED/GREEN。重构后重新运行当前变更簇对应验证;若无法运行真实测试,必须更新静态验证说明。
|
|
30
|
-
|
|
31
|
-
### 证据写入
|
|
32
|
-
|
|
33
|
-
每个变更簇结束必须写入或更新:
|
|
34
|
-
|
|
35
|
-
- `evidence/verification-ledger.json`:构建/测试命令、证据、diffHash、复用状态。
|
|
36
|
-
- `evidence/run-task-status.md`:任务状态、对应场景、未验证项。
|
|
37
|
-
- `events.ndjson`:关键 command / verification / issue / artifact 事件;RED 类型、GREEN 结果、REFACTOR 结果和验证证据放入事件 `note`。
|
|
38
|
-
|
|
39
|
-
执行日志是上述事件在阶段边界生成的只读投影,不作为变更簇的直接输出目标。
|
|
40
|
-
|
|
41
|
-
禁止把静态验证写成“测试通过”。静态 RED/GREEN 的最终状态至少是 🟡WARN,除非后续真实验证已完成。
|
|
42
|
-
|
|
43
|
-
上述分级只评估 `ownerPhase=run` 的任务和场景。`ownerPhase=test` 的验证按计划留给测试阶段时,记录为“待测试阶段执行”,不得将编码阶段降级为 WARN;后续阶段未开始不是当前阶段的风险。
|
|
44
|
-
|
|
45
|
-
## 协议二:change-cluster-review-protocol
|
|
46
|
-
|
|
47
|
-
用于高风险变更簇后的轻量审查。它内化 subagent-driven-development 的“新上下文审查”价值,但不把每个变更簇的 subagent 审查设为默认流程。
|
|
48
|
-
|
|
49
|
-
### 触发条件
|
|
50
|
-
|
|
51
|
-
满足**全部**条件时启用:
|
|
52
|
-
|
|
53
|
-
- 变更簇命中高风险(数据迁移、权限、安全、并发、幂等、核心契约变更、缺真实测试证据等,见原触发列表任一)
|
|
54
|
-
- 当前宿主已显式提供隔离 reviewer 能力;需要固定 reviewer 时,单次 `check-agents` 返回 `executionMode=delegated`
|
|
55
|
-
|
|
56
|
-
未满足时记录“跳过变更簇隔离审查:低风险 / 正常 inline / 后续 harness-review 覆盖”,不得视为降级或显示不可用告警。
|
|
57
|
-
|
|
58
|
-
### 审查方式
|
|
59
|
-
|
|
60
|
-
`executionMode=delegated` 时委派只读 `harness-reviewer` 审查当前变更簇 diff。**不 retry**;spawn 失败或无效返回 → 主会话 checklist 自审,记一次 `issue` 事件。
|
|
61
|
-
|
|
62
|
-
审查范围只限当前变更簇:
|
|
63
|
-
|
|
64
|
-
- 是否偏离 plan / implementation-detail。
|
|
65
|
-
- 是否遗漏 test-scenarios 中的 P0/P1 场景。
|
|
66
|
-
- 是否破坏 API、数据、权限、安全或兼容契约。
|
|
67
|
-
- 是否引入非计划文件、临时 debug、敏感信息或过程性注释。
|
|
68
|
-
|
|
69
|
-
### 输出
|
|
70
|
-
|
|
71
|
-
审查结论写入当前 run 日志:
|
|
72
|
-
|
|
73
|
-
```markdown
|
|
74
|
-
### 变更簇审查 — <cluster>
|
|
75
|
-
- 触发原因: <risk trigger>
|
|
76
|
-
- 方式: reviewer / 主会话自审 / 跳过
|
|
77
|
-
- 结论: OK / YELLOW / RED
|
|
78
|
-
- 问题: <文件:行 + 建议>
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
RED 问题必须在当前 run 中处理或明确记录为未处理风险;YELLOW 问题可交给后续 `/harness-review`。
|
|
82
|
-
|
|
83
|
-
## fixback 证据契约
|
|
84
|
-
|
|
85
|
-
> `launch-review` 的返回体里带 `evidenceContract` 字段,内容与本节一致。这里写一份是因为
|
|
86
|
-
> 光靠运行时返回,调用方往往已经动手改代码了才看到。
|
|
87
|
-
|
|
88
|
-
### 命令链
|
|
89
|
-
|
|
90
|
-
```text
|
|
91
|
-
run-start(修复前,采 RED)→ 改代码 → run-start(修复后,采 GREEN)
|
|
92
|
-
→ evidence-template ×2 → register-evidence ×2 → resolve-issue
|
|
93
|
-
→ run-start(受影响链)→ evidence-template --kind verification
|
|
94
|
-
→ evidence-template --kind review → close
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### 别手写证据 JSON
|
|
98
|
-
|
|
99
|
-
证据文件的 `provenance` 需要 `sessionId` / `commandHash` / `resultDigest` / `runReceiptPath`
|
|
100
|
-
四个字段,全部能从 `session.json` 直接读出来。用模板生成,不要手抄:
|
|
101
|
-
|
|
102
|
-
```text
|
|
103
|
-
python <skills-root>/scripts/harness_fixback.py evidence-template \
|
|
104
|
-
--change-dir <change-dir> --kind red|green|verification|review \
|
|
105
|
-
--session <sessionId> --out <证据 JSON 路径> --json
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
输出即可直接喂给 `register-evidence`。撞 `FIXBACK_RUN_PROVENANCE_INVALID` 时,错误体会点名
|
|
109
|
-
**哪个字段、期望什么、实际什么**——按它改,不要去读实现反推。
|
|
110
|
-
|
|
111
|
-
### `--product-identity`
|
|
112
|
-
|
|
113
|
-
产品身份指纹,把 RED/GREEN 绑定到同一产品状态。规范取值是**当前 git HEAD**。省略即自动推导,
|
|
114
|
-
`launch-review` 会在返回体的 `resolvedProductIdentity` 里回显;`close --final-product-identity`
|
|
115
|
-
**原样引用那个值**,不要另行推导——推导方式不同就会撞 `FIXBACK_GREEN_IDENTITY_MISMATCH`。
|
|
116
|
-
|
|
117
|
-
### RED 必须在修复之前
|
|
118
|
-
|
|
119
|
-
RED 证明问题真实存在,GREEN 证明修复真的生效。先改完再把改动回退来凑 RED,证明的只是回退后的
|
|
120
|
-
状态,不是原始缺陷,中途还会留下脏工作树。
|
|
121
|
-
|
|
122
|
-
### close 的两张收据与 review-findings.json
|
|
123
|
-
|
|
124
|
-
`close` 要 `--affected-receipt`(`kind=verification`,受影响链的托管会话)和 `--review-receipt`
|
|
125
|
-
(`kind=review`,指向 `reports/review/review-findings.json`)。
|
|
126
|
-
|
|
127
|
-
review 收据的放行规则按 **disposition**,不按 severity:
|
|
128
|
-
|
|
129
|
-
| disposition | 是否阻塞 | 说明 |
|
|
130
|
-
|---|---|---|
|
|
131
|
-
| `OPEN` / 未登记 | ❌ 阻塞 | 还没人处置,必须先给结论 |
|
|
132
|
-
| `FIXED` / `NOT_APPLICABLE` | ✅ 放行 | 已闭环 |
|
|
133
|
-
| `ACCEPTED_RISK` / `DEFERRED` | ✅ 放行 | 记入收据 `residualRisks` 留痕 |
|
|
134
|
-
|
|
135
|
-
> ⚠️ **不要为了让 close 通过而清空或删改 `review-findings.json`。** 它是发现的真相源,写空等于
|
|
136
|
-
> 抹掉整轮审查的审计轨迹。处置结论属于另一个 sidecar:
|
|
137
|
-
>
|
|
138
|
-
> ```text
|
|
139
|
-
> python <skills-root>/scripts/harness_review.py write-dispositions \
|
|
140
|
-
> --change-dir <change-dir> --input <dispositions.json>
|
|
141
|
-
> ```
|