@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
|
@@ -360,10 +360,34 @@ status: approved
|
|
|
360
360
|
# 1) 规划自然产出 → 证据包(结构化身份/哈希全由冻结模块推导)
|
|
361
361
|
npx hunter-harness plan evidence-pack --input .harness/changes/<cn>/meta/plan-evidence-input.json \
|
|
362
362
|
--output .harness/changes/<cn>/meta/plan-evidence.json
|
|
363
|
-
# 2)
|
|
363
|
+
# 2) assurance / 高风险计划:记录对抗评审收据(0.4.8+;非 assurance 可跳过)
|
|
364
|
+
npx hunter-harness plan review-record --input .harness/changes/<cn>/meta/plan-evidence.json \
|
|
365
|
+
--receipt .harness/changes/<cn>/meta/plan-review-draft.json
|
|
366
|
+
# 3) 证据包 → 质量门 + 原子发布 + 事件 outbox
|
|
364
367
|
npx hunter-harness plan finalize --input .harness/changes/<cn>/meta/plan-evidence.json
|
|
365
368
|
```
|
|
366
369
|
|
|
370
|
+
**对抗评审收据(assurance 必做,0.4.8 起有正式链路)**:profile.mode 被推到 `assurance`
|
|
371
|
+
(auth/concurrency/migration 等风险信号自动推断)或任一场景 `risk_level: "high"` 时,
|
|
372
|
+
finalize 硬性要求证据包顶层 `adversarial_review` 收据,缺失即 `PLAN_REVIEW_REQUIRED` fail closed。
|
|
373
|
+
收据的 `input_hash` 绑定产物 + 语义投影 + capabilities + 高风险发现 + 透镜(全在 CLI 内部管线,
|
|
374
|
+
外部不可预计算),所以**不要手拼收据**:
|
|
375
|
+
|
|
376
|
+
1. 先完成阶段 7.5 对抗评审,把结论写成草稿 `meta/plan-review-draft.json`:
|
|
377
|
+
`{ "reviewer_identity": "inline:<标识>", "findings": [] }`
|
|
378
|
+
(`review_mode` 缺省 `inline`;`completed_at` 缺省取当前时间;`findings` 为空数组表示无发现)
|
|
379
|
+
2. 跑 `plan review-record`:CLI 内部重跑 layer1/layer2/layer3 算出权威 `input_hash`,
|
|
380
|
+
代算 `findings_hash`,把完整收据写回证据包顶层 `adversarial_review`(缺省覆盖 `--input`,
|
|
381
|
+
可用 `--output` 写到别处)。stdout 的 `review_required: false` 表示该包未触发评审、收据不会被消费。
|
|
382
|
+
3. 再跑 `plan finalize`。
|
|
383
|
+
|
|
384
|
+
两条公开契约(不再需要从 dist 里翻):
|
|
385
|
+
|
|
386
|
+
- `PLAN_REVIEW_REQUIRED` 报错的 `expected_review.input_hash` 就是绑定期望值——校验器自曝期望,
|
|
387
|
+
手工构造收据时用它;`findings_hash` 是你端 `findings` 数组 canonical JSON 的 sha256。
|
|
388
|
+
- 收据绑定**证据包内容**:`review-record` 写回后任何对 pack 的修改(包括重跑 evidence-pack)
|
|
389
|
+
都使收据失效,必须重跑 `review-record`。墙钟时间不进 `input_hash`,不必担心时间戳漂移。
|
|
390
|
+
|
|
367
391
|
**自然输入文件**(`meta/plan-evidence-input.json`,权威定义 `packages/cli/src/commands/plan-evidence-pack.ts` 的 `EvidencePackInputFile`)由规划阶段逐步沉淀,各字段定稿时点不得倒置。
|
|
368
392
|
|
|
369
393
|
> 📋 **先取骨架,别猜结构**:CLI 自带模板输出,不需要去找 TS 接口或翻 npx 缓存——
|
|
@@ -388,10 +412,13 @@ npx hunter-harness plan finalize --input .harness/changes/<cn>/meta/plan-evidenc
|
|
|
388
412
|
- `structured_input.scenarios` **至少 3 条**——八维度缺项由命令补 `not_applicable`,但场景总数不能少于 3
|
|
389
413
|
- `intent.acceptance_examples` 2~5 条,`approval.content.acceptance_examples` 3~7 条 → 取 3 条同时满足
|
|
390
414
|
- `key_alternatives` / `invariants` / `failure_behaviors` / `compatibility_boundaries` 各至少 1 条
|
|
391
|
-
- `intent.in_scope`/`out_of_scope` 与 `approval.content`
|
|
415
|
+
- `intent.in_scope`/`out_of_scope` 与 `approval.content` 同名字段必须**集合相等**;0.4.8 起 approval 侧可以**整项省略**(从 intent 继承,成功输出的 `warnings` 会标 `approval_scope_inherited`),写了就必须相等
|
|
416
|
+
- `intent.uncertainties` 非空时,每一项都会生成未决决策 `intent_uncertainty:<sha256(文本)>`,必须在 `decision_nodes` 提供**同 id** 的节点(通常是一条 `product_decision`,`status: "resolved"` + `resolution`/`resolved_by: "user"`/`resolved_at` 三元);不想走决策图就留空数组。缺节点时边界报错会直接列出期望的决策 id
|
|
417
|
+
- `tasks[].affected_paths` 必须是**文件形态**的相对路径:正斜杠分隔、不能以 `/` 结尾、不含 `.`/`..` 段、不接受盘符/绝对路径。目录路径会被拒——改为列出其中的具体文件
|
|
392
418
|
- tasks 只写 `task_id/objective/affected_paths/owner_phase`,六个 refs 数组由命令接线;多写 `cluster`/`title` 这类键会因精确键集被拒
|
|
393
419
|
- scenarios 只写 `scenario_id/title/acceptance/coverage_dimension/execution_level/evidence_requirements/risk_level`(+可选 `verification_command`);`priority`/`test_file` 这类计划表列不属于本输入
|
|
394
420
|
- `machine.worktree_policy` ∈ `project_default | required | forbidden`(没有 `none`)
|
|
421
|
+
- `decision_nodes[]` 的 `type` ∈ `fact | engineering_default | product_decision | risk_decision`,`status` ∈ `pending | resolved | blocked | superseded`;`status: "resolved"` 必须带 `resolution`/`resolved_by`/`resolved_at` 三元,且 `resolved_by` 与类型推导的解决者一致(fact→evidence、engineering_default→engineering_default、产品/风险决策→user)
|
|
395
422
|
|
|
396
423
|
> **结构错了怎么读报错**:命令在边界返回 `code:"PLAN_EVIDENCE_INPUT_INVALID"`(`stage:"boundary"`),
|
|
397
424
|
> `field_path` 指向第一处问题,`problems[]` 逐条给 `missing_keys`/`unexpected_keys`/`message`。
|
|
@@ -428,7 +455,7 @@ npx hunter-harness plan finalize --input .harness/changes/<cn>/meta/plan-evidenc
|
|
|
428
455
|
> 可执行三元是**可选**的,但要么整组给全、要么整组省略。ledger 场景全部带齐 → manifest 声明
|
|
429
456
|
> `schemaVersion 2`,关门可绑结构化执行收据;否则降为 1。
|
|
430
457
|
|
|
431
|
-
- **证据包**(`plan-evidence.json`)是命令推导的产物(trusted/publication/context/baseline),不得手改;任何字段变化必须改自然输入后重跑 evidence-pack
|
|
458
|
+
- **证据包**(`plan-evidence.json`)是命令推导的产物(trusted/publication/context/baseline),不得手改;任何字段变化必须改自然输入后重跑 evidence-pack。唯一的例外是 `adversarial_review` 顶层字段——它由 `plan review-record`(或手工构造的合规收据)写入,evidence-pack 构建时也会透传自然输入里已有的该字段。
|
|
432
459
|
- **成功语义**:finalize exit 0 且 `code:"PLAN_FINALIZED"`。落盘事实 = 八 target(plans/*.md ×4 + meta/*.json ×4)+ `meta/publication-journals/<op>.json`(状态 committed)+ `meta/plan-events.ndjson`(artifact_published/phase_ended)。确定性门失败 exit 1 且 `code:"PLAN_FINALIZE_DETERMINISTIC_FAILED"` 附 findings——此时必须回到对应阶段修正规划内容,**不得**手改证据包或 staged 内容绕过。
|
|
433
460
|
- **验证**:journal `state==="committed"` + 八 target 存在 + plan-events.ndjson 含两类终态事件;不得手工补写任何一项。
|
|
434
461
|
- **legacy 收据**:v2 路径不写 `plan-finalization.json`;消费方若读历史 legacy receipt,`harness_plan_finalize.py verify` 保持可读。0.3.0 起 v2 无 legacy 回退——自然输入不完整先补齐(例如补真实审批记录),不得走已删除的 Python finalizer。
|
|
@@ -3,7 +3,7 @@ name: harness-pull
|
|
|
3
3
|
description: 从 Hunter Platform 下拉配置/规则/架构/指令(及显式来源分支的分支文件恢复)。仅当用户显式调用
|
|
4
4
|
/harness-pull 或明确说'从平台拉取/恢复'时使用;不得自动触发。
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=8aa1d6994e1d3d22; overlay=none; agent=codebuddy; do not edit -->
|
|
7
7
|
# harness-pull — 从 Hunter Platform 下拉与恢复
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -3,7 +3,7 @@ name: harness-push
|
|
|
3
3
|
description: 上传本地配置/规则/架构/指令(及显式归档)到 Hunter Platform。仅当用户显式调用 /harness-push
|
|
4
4
|
或明确说'上传到平台'时使用;不得因存在本地修改就自动触发。
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=8aa1d6994e1d3d22; overlay=none; agent=codebuddy; do not edit -->
|
|
7
7
|
# harness-push — 上传到 Hunter Platform
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -4,7 +4,7 @@ description: 6维度代码审查(架构/安全/规范/兼容/测试/性能)
|
|
|
4
4
|
.harness/context-index.json)和测试场景表,在隔离上下文运行。仅当用户显式调用 /harness-review 时使用;不得在
|
|
5
5
|
test 结束后自动接续执行。
|
|
6
6
|
---
|
|
7
|
-
<!-- generated by harness_deploy.py; core=
|
|
7
|
+
<!-- generated by harness_deploy.py; core=8aa1d6994e1d3d22; overlay=none; agent=codebuddy; do not edit -->
|
|
8
8
|
# harness-review — 代码审查
|
|
9
9
|
|
|
10
10
|
## Purpose
|
|
@@ -25,7 +25,7 @@ description: 6维度代码审查(架构/安全/规范/兼容/测试/性能)
|
|
|
25
25
|
## 前置条件
|
|
26
26
|
|
|
27
27
|
- `.harness/changes/<change-name>/plans/<change-name>-plan.md` 存在(任务真相源)
|
|
28
|
-
- 必须读取 `.harness/changes/<change-name>/meta/worktree.json`:`requested=true` 且 worktree 已创建 → 在 worktree 目录中执行审查;`requested=true` 但 worktree 不存在 → 停止,提示先修复 `harness-
|
|
28
|
+
- 必须读取 `.harness/changes/<change-name>/meta/worktree.json`:`requested=true` 且 worktree 已创建 → 在 worktree 目录中执行审查;`requested=true` 但 worktree 不存在 → 停止,提示先修复 `harness-execute`,不得静默回主目录
|
|
29
29
|
- **review 不阻塞后续流程**:test 报告缺失或未运行不阻止 review(review 是参考性阶段),但应在报告中标注 test 状态供参考
|
|
30
30
|
|
|
31
31
|
## 统一读取协议
|
|
@@ -49,7 +49,7 @@ description: 6维度代码审查(架构/安全/规范/兼容/测试/性能)
|
|
|
49
49
|
先用 `harness_context.py prepare --phase review --executor <tool> [--change <id>] --json` 与 `harness_context.py begin --phase review --change <id> --executor <tool> --json` 解析唯一 active change 并校验实际前序 receipt;多个 active change 未显式选择时返回 `ACTIVE_CHANGE_AMBIGUOUS`,禁止再按 Glob/mtime 猜测。阶段门禁使用 `harness_gate.py begin --phase review --change <id> --task <n> --skills-root <skills-root> --executor-tool <tool> --json`;结束时只执行一次 `harness_gate.py close`,正常路径的 `--to-phase` 取 `plannedPhases` 中 review 的后继,Fixback 才返回 run。由 gate 完成阶段事件、租约、上下文交接与远端补传。不得手工追加阶段边界或再次调用 context close;任一 close 失败不得宣称评审完成。
|
|
50
50
|
|
|
51
51
|
0. **启动准备** — 确定变更名(Glob `.harness/changes/*/plans/*-plan.md`,排除 `.harness/archive/*/`,读 frontmatter 提取 change-name);**append `phase.start` 事件**(不得等审查完成才补)
|
|
52
|
-
1. **读取 worktree 状态(门禁检查)** — 读 `.harness/changes/<change-name>/meta/worktree.json`:`requested=true` 但 worktree 不存在 → 停止并提示先修复 `harness-
|
|
52
|
+
1. **读取 worktree 状态(门禁检查)** — 读 `.harness/changes/<change-name>/meta/worktree.json`:`requested=true` 但 worktree 不存在 → 停止并提示先修复 `harness-execute`,不得静默回主目录(否则 git diff 为空);`requested=true` 且 worktree 已创建 → spawned agent 用该 worktree 路径执行 `git diff`(确保审查 worktree 变更而非主目录);`requested=false` → 审查主目录变更
|
|
53
53
|
<!-- @section-id review.delegate -->
|
|
54
54
|
### 2. 审查执行(独立评审优先)
|
|
55
55
|
|
|
@@ -59,8 +59,8 @@ review 默认优先在独立上下文执行,避免主会话已形成的实现
|
|
|
59
59
|
|
|
60
60
|
项目规模小、风险低或没有 CodeGraph 都不是跳过独立评审的理由。原因码是稳定机器字段,仅用于协议与技术详情;面向用户的事件摘要必须写成「已使用独立评审」或「当前环境没有可用的隔离评审能力,已由主会话完成评审」等中文说明。
|
|
61
61
|
|
|
62
|
-
3. **持久化报告与事实 sidecar(强制,主会话)** — Agent 返回后主会话 Write 到 `reports/review/review-report-*.md
|
|
63
|
-
4. **生成修复反馈(原生协议)** — 若报告存在 RED/YELLOW 问题,执行 `protocols.md` 的 `review-fixback-protocol`,将问题转化为结构化 fixback 清单并落盘到 `.harness/changes/<change-name>/reports/review/fixback-YYYYMMDD-HHmm.md
|
|
62
|
+
3. **持久化报告与事实 sidecar(强制,主会话)** — Agent 返回后主会话 Write 到 `reports/review/review-report-*.md`,并调用 `python <skills-root>/scripts/harness_review.py scaffold --change-dir <change-dir> [--run-id <id>]` 生成 findings 写入骨架(runId 缺省从 events.ndjson 最新 review phase.start 推断),补齐每一条发现后经 `harness_review.py write-findings --change-dir <change-dir> --stdin` 落地。每条发现必须填写 `fixbackAction=code|manual|workflow`:只有确实需要修改产品代码的项使用 `code`;人工验收用 `manual`;流程、暂存或工具使用建议用 `workflow`。权威计数来自 `reports/review/review-findings.json`,不是 Markdown。任一写入缺失 → 评审未完整结束,不得关门。
|
|
63
|
+
4. **生成修复反馈(原生协议)** — 若报告存在 RED/YELLOW 问题,执行 `protocols.md` 的 `review-fixback-protocol`,将问题转化为结构化 fixback 清单并落盘到 `.harness/changes/<change-name>/reports/review/fixback-YYYYMMDD-HHmm.md`;随后重跑 `harness_review.py scaffold --change-dir <change-dir>`(已有 findings 时输出每条的 OPEN 处置骨架,runId 自动与 findings 同轮),逐条改判后交给 `harness_review.py write-dispositions --change-dir <change-dir> --stdin` 落地,权威状态写入 `reports/review/fixback-dispositions.json`。若无 RED/YELLOW,也必须写空 findings sidecar,并记录 `review-fixback-protocol: skipped(no findings)`。不调用 Superpowers `receiving-code-review`,也不记录外部 skill 降级。
|
|
64
64
|
5. **收尾** — 先写完 `review-findings.json` 与 `fixback-dispositions.json`,且两者 `runId` 必须等于本轮 Review;每个 finding 必须有 disposition。随后只调用一次 gate close,由门禁校验 sidecar、写 `phase.end` 与交接;缺失或不一致时保持 Review 未结束并按恢复提示补齐。控制台输出摘要。
|
|
65
65
|
|
|
66
66
|
## Review 定位(重要)
|
|
@@ -8,7 +8,7 @@ description: harness-review 的6维度审查检查项详细列表。仅在执行
|
|
|
8
8
|
|
|
9
9
|
用 Glob 搜索 `.harness/changes/*/plans/*-plan.md`(**排除 `.harness/archive/*/`**),读取 frontmatter 提取 `change-name`。默认最多一个未归档变更;如有多个,优先取最近修改的,或询问用户。后续所有路径基于此变更名。
|
|
10
10
|
|
|
11
|
-
**读取 worktree 状态**:读 `.harness/changes/<change-name>/meta/worktree.json`。`requested=true` 且 worktree 已创建 → 后续 `git diff` 的 `<项目路径>` 用 worktree 路径(`.worktrees/<change-name>`);`requested=true` 但 worktree 不存在 → 停止,提示先修复 `harness-
|
|
11
|
+
**读取 worktree 状态**:读 `.harness/changes/<change-name>/meta/worktree.json`。`requested=true` 且 worktree 已创建 → 后续 `git diff` 的 `<项目路径>` 用 worktree 路径(`.worktrees/<change-name>`);`requested=true` 但 worktree 不存在 → 停止,提示先修复 `harness-execute`,不得静默回主目录。
|
|
12
12
|
|
|
13
13
|
## 审查流程
|
|
14
14
|
|
|
@@ -3,7 +3,7 @@ name: harness-submit
|
|
|
3
3
|
description: 最终提交封装:验证→中文 commit→提交/推送;worktree 模式含 --no-ff 合并回主分支。仅当用户显式调用
|
|
4
4
|
/harness-submit(或 /harness-merge 重入合并段)时使用;用户口头说'提交/commit/push'时必须先确认,不得自动触发。
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=8aa1d6994e1d3d22; overlay=none; agent=codebuddy; do not edit -->
|
|
7
7
|
# harness-submit — 最终提交(含 worktree 合并)
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -55,7 +55,7 @@ worktree 合并前必须运行 `harness_change.py integration-lock acquire --run
|
|
|
55
55
|
|
|
56
56
|
### 提交流程(步骤 0–7)
|
|
57
57
|
|
|
58
|
-
0. **启动准备** — `harness_context.py prepare --project . --change <id> --phase submit --executor <tool> --json`(`--project` 必填)确定唯一变更与 executionRoot;`harness_context.py begin --project . --change <id> --phase submit --executor <tool> --json` 校验 review→submit receipt;**`harness_gate.py begin --phase submit --change <id>`**;读 ledger,以 `harness_ledger.py diff-hash --repo <executionRoot> --base <baseCommit> --change-dir ".harness/changes/<change-name>" --json` 计算 diffHash + post-test 7 类分类(`executionRoot` 必须直接取准备回执;禁止手写 ledger / 手工 phase.end
|
|
58
|
+
0. **启动准备** — `harness_context.py prepare --project . --change <id> --phase submit --executor <tool> --json`(`--project` 必填)确定唯一变更与 executionRoot;`harness_context.py begin --project . --change <id> --phase submit --executor <tool> --json` 校验 review→submit receipt;**`harness_gate.py begin --phase submit --change <id>`**;读 ledger,以 `harness_ledger.py diff-hash --repo <executionRoot> --base <baseCommit> --change-dir ".harness/changes/<change-name>" --json` 计算 diffHash + post-test 7 类分类(`executionRoot` 必须直接取准备回执;禁止手写 ledger / 手工 phase.end)。若 gate begin 报 `CONTEXT_HANDOFF_REQUIRED` / `CONTEXT_BEGIN_REQUIRED`(上一阶段关门时未写交接的历史断链),**一条命令修复**:`harness_context.py handoff --project . --change <id> --to-phase submit --executor <tool> --json`(自动补租约→写收据→begin 确认;**不要**再 `harness_change.py claim` 阶段租约,也不要手工拼 context close/prepare/begin 序列)
|
|
59
59
|
1. **合并最新代码** — 主目录与 worktree 均**不在业务工作区 stash/pull**;远端同步由合并段 integration transaction 在隔离 integration worktree 内完成(见「worktree 合并流程」);**正常路径禁止 `git stash` / `stash pop`**
|
|
60
60
|
2. **最终验证** — ledger 复用优先;提交前只调用 `can-reuse --project . --profile-input unitTestFull --command <profile 规范命令>`。不得传入另一套 `--files`,不得把 runner 包装说明写进 `command`。`reuse=true` 时禁止重跑;只有真实输入、依赖、工具链或环境身份变化时才执行一次同一 profile 验证,并只登记一条结果。不要读取 ledger/archive 实现源码或临时编写散列脚本排查参数。
|
|
61
61
|
- 无远端 CI 且 gate-policy 未强制 remote provider 时,验证通过/复用后运行 `harness_archive.py certify-local --change-dir ... --project . --json`,从同一 ledger 生成 `local-reproducible` 产品候选收据;该命令不执行测试。
|
|
@@ -33,7 +33,7 @@ description: harness-submit 的8 步工作流详细步骤和执行日志记录
|
|
|
33
33
|
1. 通过 state layout resolver 读取权威 `evidence/verification-ledger.json`,记录 `diffHash` / `currentHead` / `unitTest` / `apiTest` 状态;split-v1 不得回退复制到 contract 目录
|
|
34
34
|
2. 执行 `harness_ledger.py diff-hash --repo . --base <baseCommit> --change-dir ".harness/changes/<change-name>" --json` 计算当前 diffHash;manifest 校验失败即停止,不得绕过后与 ledger 比对
|
|
35
35
|
3. 若 test 之后有代码变更(当前 diffHash ≠ test 完成时的 diffHash),按 7 类对 post-test diff 分类(见 `../protocols/ledger-protocol.md` 第六章),写入 ledger 的 `postTestClassification`
|
|
36
|
-
4. 行为性变更(BEHAVIORAL_SERVICE_CHANGE / API_CONTRACT_CHANGE / SQL_OR_MAPPER_CHANGE / SECURITY_OR_PERMISSION_CHANGE)→ **停止 submit**,提示先重跑 `/harness-
|
|
36
|
+
4. 行为性变更(BEHAVIORAL_SERVICE_CHANGE / API_CONTRACT_CHANGE / SQL_OR_MAPPER_CHANGE / SECURITY_OR_PERMISSION_CHANGE)→ **停止 submit**,提示先重跑 `/harness-execute` 相关场景
|
|
37
37
|
5. 非行为性变更(NON_BEHAVIORAL_CLEANUP / COMMENT_ONLY / TEST_ONLY)→ 可继续 submit,但后续验证按复用规则处理
|
|
38
38
|
|
|
39
39
|
**append `phase.start` 事件**(`harness_events.py append`;`note` 含 ledger diffHash、post-test 分类、验证策略):
|
|
@@ -136,7 +136,7 @@ powershell.exe -NoProfile -Command "git -C '<项目路径>' log HEAD..@{u} --one
|
|
|
136
136
|
powershell.exe -Command "[System.IO.Directory]::Delete('<worktree-path>', $true)"
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
-
4. **ExitWorktree 工具限制**:`ExitWorktree(remove)` 只删由 `EnterWorktree` 创建的 worktree。若本会话进入的是已存在 worktree(由 `harness-
|
|
139
|
+
4. **ExitWorktree 工具限制**:`ExitWorktree(remove)` 只删由 `EnterWorktree` 创建的 worktree。若本会话进入的是已存在 worktree(由 `harness-execute` 创建),工具会拒绝删除。此时用 `action:keep` 返回主仓库,再按上述 1-3 步手动清理。
|
|
140
140
|
|
|
141
141
|
5. **清理后更新 `meta/worktree.json`**:置 `created=false` + 追加 `removedAt`/`removedBy`/`removalNote`,记录产出保留待 `/harness-archive`。
|
|
142
142
|
|
|
@@ -4,7 +4,7 @@ description: Use when the user asks to synchronize, refresh, or validate Harness
|
|
|
4
4
|
metadata, adapters, remote knowledge ownership, instruction entrypoints,
|
|
5
5
|
config origins, or CodeGraph status.
|
|
6
6
|
---
|
|
7
|
-
<!-- generated by harness_deploy.py; core=
|
|
7
|
+
<!-- generated by harness_deploy.py; core=8aa1d6994e1d3d22; overlay=none; agent=codebuddy; do not edit -->
|
|
8
8
|
# harness-sync
|
|
9
9
|
|
|
10
10
|
## Purpose
|
|
@@ -36,7 +36,7 @@ CLI 负责 Python runtime 解析、Adapter 事务、远端知识职责、文档
|
|
|
36
36
|
## Interpret
|
|
37
37
|
|
|
38
38
|
- `OK`:所有可验证组件通过。
|
|
39
|
-
- `ADVISORY`:例如需要运行中文指令审计提案;退出码仍为 0,且 `sync`
|
|
39
|
+
- `ADVISORY`:例如需要运行中文指令审计提案;退出码仍为 0,且 `sync` 本身没有改写文档。`CODEGRAPH_SERVICE_UNREACHABLE` 也属此级:daemon 未运行时索引仍可正常查询(CLI/MCP 直读数据库),仅增量自动同步暂停,不需要按 WARN 修复。
|
|
40
40
|
- `WARN`:存在过期、冲突、待评审或 `UNKNOWN` 证据;按组件的中文 `nextAction` 处理。
|
|
41
41
|
- `FAIL`:组件执行失败;不得宣称同步完成。
|
|
42
42
|
- `BLOCKED`:runtime、项目状态或能力契约阻塞;先修复阻塞条件。
|
|
@@ -42,7 +42,7 @@ description: harness 全流程的证据化报告协议。所有 skill 输出必
|
|
|
42
42
|
| 情况 | 状态标记 | 报告表述 |
|
|
43
43
|
|------|:--------:|----------|
|
|
44
44
|
| 测试命令输出包含测试通过证据(Java=`Tests run: N, Failures: 0`;前端/Python 按各自工具) | ✅ | ✅ 已测试通过:N 个用例,0 失败 |
|
|
45
|
-
| TDD 降级(无测试基础设施) | 🟡 | 🟡 静态验证通过,未执行真实单元测试,待测试基础设施补齐后运行 harness-
|
|
45
|
+
| TDD 降级(无测试基础设施) | 🟡 | 🟡 静态验证通过,未执行真实单元测试,待测试基础设施补齐后运行 harness-execute |
|
|
46
46
|
| 测试命令被 hook 拒绝 | ❌ | ❌ 测试命令被拒绝,无法确认测试结果 |
|
|
47
47
|
| 测试失败(有 Failures > 0) | ❌ | ❌ 测试失败:N 个用例,M 个失败 |
|
|
48
48
|
| 用户确认跳过测试 | 🟡 | 🟡 用户确认跳过测试 |
|
|
@@ -4,7 +4,7 @@ description: verification-ledger、diffHash、service-fingerprint 的统一协
|
|
|
4
4
|
|
|
5
5
|
# Ledger Protocol
|
|
6
6
|
|
|
7
|
-
> 本协议被 harness-plan / harness-
|
|
7
|
+
> 本协议被 harness-plan / harness-execute / harness-execute / harness-submit / harness-archive 共同引用。
|
|
8
8
|
> 目标:消除跨阶段重复编译/测试,让每个"✅ 已验证"结论可追溯、可复用,避免 post-test 小改动导致前序报告有效性表达不清。
|
|
9
9
|
|
|
10
10
|
## 一、为什么需要 verification-ledger
|
|
@@ -156,7 +156,7 @@ verification-ledger 把每次验证(compile / unit test / api test / package
|
|
|
156
156
|
"moduleInputsHash": "sha256:<依赖闭包内容指纹>",
|
|
157
157
|
"moduleInputsFiles": ["<project>/Svc.java", "..."],
|
|
158
158
|
"profile": "local-dev-remote-sdk",
|
|
159
|
-
"overlayPath": "C:/temp/harness-
|
|
159
|
+
"overlayPath": "C:/temp/harness-execute-overlay/<change>/application-harness-execute.yml",
|
|
160
160
|
"startCommandHash": "sha256:<command 指纹>",
|
|
161
161
|
"command": "<serviceStart.command>",
|
|
162
162
|
"startedAt": "..."
|
|
@@ -165,7 +165,7 @@ verification-ledger 把每次验证(compile / unit test / api test / package
|
|
|
165
165
|
|
|
166
166
|
`moduleInputsHash` 由 CLI `--files` ∪ `build-profile.json` 的 `serviceStart.inputFiles`(glob 列表,相对 project 展开)计算。**空输入被拒绝**(exit 非 0),不得生成可复用的空指纹(§5.1/§5.2)。
|
|
167
167
|
|
|
168
|
-
复用必须**同时**满足(§5.3):`moduleInputsHash` 一致、`startCommandHash` 一致、`profile` 一致、`overlayPath` 一致、进程身份(pid 存活 + create time 匹配 `startedAt`)可确认。任一变化 -> AI 自动 restart;身份无法确认 -> `needs-user-decision`;非 AI 用户进程永不自动 kill。否则必须进入 Service Decision Gate(见 harness-
|
|
168
|
+
复用必须**同时**满足(§5.3):`moduleInputsHash` 一致、`startCommandHash` 一致、`profile` 一致、`overlayPath` 一致、进程身份(pid 存活 + create time 匹配 `startedAt`)可确认。任一变化 -> AI 自动 restart;身份无法确认 -> `needs-user-decision`;非 AI 用户进程永不自动 kill。否则必须进入 Service Decision Gate(见 harness-execute)。
|
|
169
169
|
|
|
170
170
|
### 4.2 unitTestFull 最终全量门禁
|
|
171
171
|
|
|
@@ -216,13 +216,13 @@ harness_ledger.py diff-hash --repo <projectRoot> --base <baseCommit> --change-di
|
|
|
216
216
|
- manifest 存在时必须严格验证 schema/mode/projectRoot、精确相对路径、文件存在性与 SHA-256;结构非法、路径越界或 hash 漂移均非零退出,旧 ledger 不得复用。
|
|
217
217
|
- ignored test 在 checkpoint 前由 manifest 加入内容集;经 guard force-stage/commit 后由 Git diff 加入同一路径,集合去重,因此 hash 保持不变。
|
|
218
218
|
- diffHash 只用于"内容是否变化"判断,不等于 commit hash
|
|
219
|
-
- 账本中 `currentHead`(验证时 HEAD)与 `diffHash` 分开记录;reuse 规则 #2 允许 HEAD 前移(如 harness-
|
|
219
|
+
- 账本中 `currentHead`(验证时 HEAD)与 `diffHash` 分开记录;reuse 规则 #2 允许 HEAD 前移(如 harness-execute Step 5 checkpoint commit),因 diffHash 已 commit-invariant,HEAD 前移不改变指纹
|
|
220
220
|
- **禁止**使用类似 `3files-84plus-5minus` 的描述性字符串作为复用依据
|
|
221
221
|
- **禁止**删除/忽略 test-tracking manifest 后继续复用,也禁止用手写 Git/Node/PowerShell hash 替代 canonical 命令。
|
|
222
222
|
|
|
223
223
|
## 六、Post-test 变更分类
|
|
224
224
|
|
|
225
|
-
当 `/harness-
|
|
225
|
+
当 `/harness-execute` 完成后又发生代码变更(常见于 review 后清理、submit 前发现的小问题),后续 submit/package/archive **必须先对变更做分类**,写入 ledger 的 `postTestClassification`:
|
|
226
226
|
|
|
227
227
|
| 类型 | 示例 | 是否需要重跑 API | 是否需要重跑 unit | 是否需要重 compile |
|
|
228
228
|
|------|------|:---:|:---:|:---:|
|
|
@@ -245,15 +245,15 @@ post-test 变更: NON_BEHAVIORAL_CLEANUP
|
|
|
245
245
|
API 测试: 🔁 复用上一轮结果(diffHash 未变 / 仅清理性变更)
|
|
246
246
|
```
|
|
247
247
|
|
|
248
|
-
**行为性变更**:必须重新运行 `/harness-
|
|
248
|
+
**行为性变更**:必须重新运行 `/harness-execute` 的相关场景(至少覆盖变更影响的接口/权限/SQL),ledger 对应项作废并重写。
|
|
249
249
|
|
|
250
250
|
## 七、各阶段与 ledger 的交互
|
|
251
251
|
|
|
252
252
|
| 阶段 | 读 ledger | 写 ledger |
|
|
253
253
|
|------|:---:|:---:|
|
|
254
254
|
| harness-plan | 计划起点读(了解前序变更状态/已有 ledger,作为复用链起点) | 计划落定后写初始 ledger(changeName/module/profile/baseCommit/diffHash 占位) |
|
|
255
|
-
| harness-
|
|
256
|
-
| harness-
|
|
255
|
+
| harness-execute | 步骤 2 前读(确认是否已有 compile/unitTest 可复用) | 步骤 2 后写 compile + unitTest(若跑了全量测试) |
|
|
256
|
+
| harness-execute | Phase 1 前读(复用 run 的 unitTest) | Phase 1/2 后写 unitTest + apiTest |
|
|
257
257
|
| harness-submit | 验证前读(复用 test 的 compile/unitTest) | 若重跑则写回 |
|
|
258
258
|
| harness-archive | 归档前读(汇总各阶段状态,写入 `summary-data.json` 并上传平台) | 不写(归档时一并移入 archive) |
|
|
259
259
|
|
|
@@ -98,13 +98,13 @@ spring:
|
|
|
98
98
|
> `HUNTER_HARNESS_SENSITIVE_SCAN=block` 才恢复阻断、`=off` 完全关闭。
|
|
99
99
|
> 门禁放行不等于内容可以带明文凭据——本节的要求始终成立。
|
|
100
100
|
|
|
101
|
-
profile `build-profile.json`、规则文档、Skill Markdown **不得包含凭据明文值**(spec §3.4 凭据边界:配置只含 env key、cache path、角色,不含值)。发布前用 `harness-
|
|
101
|
+
profile `build-profile.json`、规则文档、Skill Markdown **不得包含凭据明文值**(spec §3.4 凭据边界:配置只含 env key、cache path、角色,不含值)。发布前用 `harness-execute/scripts/runtime-helpers.mjs` 的 `findCredentialValues(text)` 扫描:
|
|
102
102
|
|
|
103
103
|
- 命中 `password/token/secret/accessKey/Authorization: Bearer/jdbc password=` 等明文值 → ❌FAIL,必须改为占位符 `<*_REDACTED>` 或 env 引用 `${ENV}` / `$ENV`。
|
|
104
104
|
- 占位符 `<TOKEN_REDACTED>` 与 env 引用 `${TEST_TOKEN}` / `$DB_PASSWORD` 不报(credential 配置允许 env key)。
|
|
105
105
|
|
|
106
106
|
```js
|
|
107
|
-
import { findCredentialValues } from '<skills-root>/harness-
|
|
107
|
+
import { findCredentialValues } from '<skills-root>/harness-execute/scripts/runtime-helpers.mjs';
|
|
108
108
|
const findings = findCredentialValues(fs.readFileSync('build-profile.json', 'utf8'));
|
|
109
109
|
if (findings.length > 0) { /* ❌FAIL: 列出 line/code/snippet,改为 env key 或占位符 */ }
|
|
110
110
|
```
|
|
@@ -819,6 +819,10 @@ def evaluate_product_ci_gate(change_dir: Path) -> dict[str, Any]:
|
|
|
819
819
|
"evidenceValid": True,
|
|
820
820
|
"capabilities": sorted(capabilities),
|
|
821
821
|
"evidence": evidence,
|
|
822
|
+
"nextAction": (
|
|
823
|
+
"项目策略要求远端认证证据:先跑远端 CI 验证,或调整 "
|
|
824
|
+
"meta/gate-policy.json 的 candidateVerification.remoteRequired"
|
|
825
|
+
),
|
|
822
826
|
}
|
|
823
827
|
if not allow_local_release:
|
|
824
828
|
return {
|
|
@@ -833,6 +837,12 @@ def evaluate_product_ci_gate(change_dir: Path) -> dict[str, Any]:
|
|
|
833
837
|
"evidenceValid": True,
|
|
834
838
|
"capabilities": sorted(capabilities),
|
|
835
839
|
"evidence": evidence,
|
|
840
|
+
"nextAction": (
|
|
841
|
+
"本地可复现证据需要显式授权:harness_change.py "
|
|
842
|
+
f"allow-local-release --change {change_dir.name}"
|
|
843
|
+
"(写入 candidateVerification.allowLocalRelease=true),"
|
|
844
|
+
"然后重跑 archive"
|
|
845
|
+
),
|
|
836
846
|
}
|
|
837
847
|
return {
|
|
838
848
|
"ok": True,
|
|
@@ -2469,6 +2479,13 @@ def validate_sensitive_evidence_publication_gate(
|
|
|
2469
2479
|
change_dir, exclude_dirs=hruntime.PUBLICATION_EXCLUDED_DIRS
|
|
2470
2480
|
)
|
|
2471
2481
|
if candidates:
|
|
2482
|
+
quarantine_cmd = (
|
|
2483
|
+
"harness_runtime.py quarantine-evidence --project . "
|
|
2484
|
+
f"--change-dir {change_dir} "
|
|
2485
|
+
+ " ".join(
|
|
2486
|
+
f"--file {item['path']}" for item in candidates
|
|
2487
|
+
)
|
|
2488
|
+
)
|
|
2472
2489
|
return _advisory_sensitive_gate(
|
|
2473
2490
|
{
|
|
2474
2491
|
"ok": False,
|
|
@@ -2476,7 +2493,8 @@ def validate_sensitive_evidence_publication_gate(
|
|
|
2476
2493
|
"receiptPath": str(receipt_path),
|
|
2477
2494
|
"unresolvedFailures": candidates,
|
|
2478
2495
|
"nextAction": (
|
|
2479
|
-
"
|
|
2496
|
+
"把明文证据逐条隔离出可发布树(原字节移入私有隔离区,"
|
|
2497
|
+
"一轮命令可带全部 --file):" + quarantine_cmd
|
|
2480
2498
|
),
|
|
2481
2499
|
},
|
|
2482
2500
|
policy,
|
|
@@ -6366,6 +6384,11 @@ def validate_report_adequacy(summary: dict[str, Any]) -> dict[str, Any]:
|
|
|
6366
6384
|
"code": "DIFF_ZERO_WITH_NONEMPTY_COMMIT",
|
|
6367
6385
|
"severity": "error",
|
|
6368
6386
|
"message": f"final commit {final} differs from base {base} but filesChanged=0",
|
|
6387
|
+
"nextAction": (
|
|
6388
|
+
"产品代码路径未声明会导致 diff 归到 foreignPaths。声明后重跑 archive:"
|
|
6389
|
+
"harness_change.py declare-ownership --change <change> "
|
|
6390
|
+
"--product-path <产品代码目录>(精确路径,可重复传)"
|
|
6391
|
+
),
|
|
6369
6392
|
})
|
|
6370
6393
|
|
|
6371
6394
|
# HH-ARCHIVE-20260730-001: refuse internally-consistent but truncated boundaries.
|
|
@@ -7160,6 +7183,10 @@ def _project_release_policy_gate(
|
|
|
7160
7183
|
"candidateVerification.allowLocalRelease=true"
|
|
7161
7184
|
),
|
|
7162
7185
|
"remoteRequired": remote_required,
|
|
7186
|
+
"nextAction": (
|
|
7187
|
+
"本地发布需要显式授权:harness_change.py allow-local-release "
|
|
7188
|
+
f"--change {change_dir.name},然后重跑 archive"
|
|
7189
|
+
),
|
|
7163
7190
|
}
|
|
7164
7191
|
evidence = candidate_gate.get("evidence")
|
|
7165
7192
|
evidence = evidence if isinstance(evidence, dict) else {}
|
|
@@ -1099,6 +1099,59 @@ def cmd_resolve(args: argparse.Namespace) -> int:
|
|
|
1099
1099
|
)
|
|
1100
1100
|
|
|
1101
1101
|
|
|
1102
|
+
def allow_local_release(project_root: Path, change_id: str) -> dict[str, Any]:
|
|
1103
|
+
"""在 gate-policy.json 写入 candidateVerification.allowLocalRelease=true。
|
|
1104
|
+
|
|
1105
|
+
archive 的 PROJECT_RELEASE_POLICY_BLOCKED 要求这个策略位,此前只能手工
|
|
1106
|
+
编辑 meta/gate-policy.json(2026-08-30 sales-insight-agent archive 实测)。
|
|
1107
|
+
这里给出正规入口:保留既有策略内容,只翻转一个布尔位;幂等。
|
|
1108
|
+
"""
|
|
1109
|
+
resolved = resolve_change(project_root, change_id)
|
|
1110
|
+
if not resolved.get("ok"):
|
|
1111
|
+
return resolved
|
|
1112
|
+
change_dir = Path(resolved["changeDir"])
|
|
1113
|
+
policy_path = change_dir / "meta" / "gate-policy.json"
|
|
1114
|
+
policy: dict[str, Any] = {"schemaVersion": 1}
|
|
1115
|
+
if policy_path.is_file():
|
|
1116
|
+
try:
|
|
1117
|
+
data = _read_json(policy_path)
|
|
1118
|
+
except (OSError, json.JSONDecodeError) as exc:
|
|
1119
|
+
return {
|
|
1120
|
+
"ok": False,
|
|
1121
|
+
"code": "GATE_POLICY_INVALID",
|
|
1122
|
+
"message": str(exc),
|
|
1123
|
+
"path": str(policy_path),
|
|
1124
|
+
}
|
|
1125
|
+
if not isinstance(data, dict) or data.get("schemaVersion") != 1:
|
|
1126
|
+
return {
|
|
1127
|
+
"ok": False,
|
|
1128
|
+
"code": "GATE_POLICY_INVALID",
|
|
1129
|
+
"message": "gate-policy.json 必须是 schemaVersion=1 的对象",
|
|
1130
|
+
"path": str(policy_path),
|
|
1131
|
+
}
|
|
1132
|
+
policy = data
|
|
1133
|
+
candidate = policy.get("candidateVerification")
|
|
1134
|
+
candidate = dict(candidate) if isinstance(candidate, dict) else {}
|
|
1135
|
+
if candidate.get("allowLocalRelease") is True:
|
|
1136
|
+
return {
|
|
1137
|
+
"ok": True,
|
|
1138
|
+
"code": "LOCAL_RELEASE_ALREADY_ALLOWED",
|
|
1139
|
+
"changeId": resolved["changeId"],
|
|
1140
|
+
"path": str(policy_path),
|
|
1141
|
+
"candidateVerification": candidate,
|
|
1142
|
+
}
|
|
1143
|
+
candidate["allowLocalRelease"] = True
|
|
1144
|
+
policy["candidateVerification"] = candidate
|
|
1145
|
+
_write_json(policy_path, policy)
|
|
1146
|
+
return {
|
|
1147
|
+
"ok": True,
|
|
1148
|
+
"code": "LOCAL_RELEASE_ALLOWED",
|
|
1149
|
+
"changeId": resolved["changeId"],
|
|
1150
|
+
"path": str(policy_path),
|
|
1151
|
+
"candidateVerification": candidate,
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
|
|
1102
1155
|
def declare_product_ownership(
|
|
1103
1156
|
project_root: Path, change_id: str, *, product_paths: list[str]
|
|
1104
1157
|
) -> dict[str, Any]:
|
|
@@ -1167,6 +1220,20 @@ def declare_product_ownership(
|
|
|
1167
1220
|
}
|
|
1168
1221
|
|
|
1169
1222
|
|
|
1223
|
+
def cmd_allow_local_release(args: argparse.Namespace) -> int:
|
|
1224
|
+
project = resolve_main_project_root()
|
|
1225
|
+
payload = allow_local_release(project, args.change)
|
|
1226
|
+
if payload.get("ok"):
|
|
1227
|
+
emit(payload, as_json=bool(args.json))
|
|
1228
|
+
return 0
|
|
1229
|
+
return emit_error(
|
|
1230
|
+
str(payload.get("code", "ALLOW_LOCAL_RELEASE_FAILED")),
|
|
1231
|
+
str(payload.get("message", "allow local release failed")),
|
|
1232
|
+
as_json=bool(args.json),
|
|
1233
|
+
extra={k: v for k, v in payload.items() if k not in {"ok", "message"}},
|
|
1234
|
+
)
|
|
1235
|
+
|
|
1236
|
+
|
|
1170
1237
|
def cmd_declare_ownership(args: argparse.Namespace) -> int:
|
|
1171
1238
|
project = resolve_main_project_root()
|
|
1172
1239
|
payload = declare_product_ownership(
|
|
@@ -1564,6 +1631,13 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
1564
1631
|
)
|
|
1565
1632
|
p_ownership.set_defaults(func=cmd_declare_ownership)
|
|
1566
1633
|
|
|
1634
|
+
p_local_release = sub.add_parser(
|
|
1635
|
+
"allow-local-release", parents=[shared],
|
|
1636
|
+
help="set candidateVerification.allowLocalRelease=true in gate-policy.json",
|
|
1637
|
+
)
|
|
1638
|
+
p_local_release.add_argument("--change", required=True)
|
|
1639
|
+
p_local_release.set_defaults(func=cmd_allow_local_release)
|
|
1640
|
+
|
|
1567
1641
|
p_claim = sub.add_parser("claim", parents=[shared])
|
|
1568
1642
|
p_claim.add_argument("--change", required=True)
|
|
1569
1643
|
p_claim.add_argument("--phase", required=True)
|