@hunter-harness/workflow-harness 0.2.15 → 0.2.17
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 +14 -1
- package/harness/bundles/general/claude-code/README.md +1 -1
- package/harness/bundles/general/claude-code/harness-archive/SKILL.md +7 -4
- package/harness/bundles/general/claude-code/harness-archive/reference.md +1 -1
- package/harness/bundles/general/claude-code/harness-codebase-map/SKILL.md +4 -2
- package/harness/bundles/general/claude-code/harness-knowledge-ingest/SKILL.md +4 -2
- package/harness/bundles/general/claude-code/harness-knowledge-ingest/scripts/harness_knowledge.py +16 -1
- package/harness/bundles/general/claude-code/harness-knowledge-query/SKILL.md +4 -2
- package/harness/bundles/general/claude-code/harness-plan/SKILL.md +8 -4
- package/harness/bundles/general/claude-code/harness-plan/checklist.md +5 -5
- package/harness/bundles/general/claude-code/harness-review/SKILL.md +5 -2
- package/harness/bundles/general/claude-code/harness-review/reference.md +13 -0
- package/harness/bundles/general/claude-code/harness-run/SKILL.md +7 -3
- package/harness/bundles/general/claude-code/harness-run/checklist.md +4 -4
- package/harness/bundles/general/claude-code/harness-submit/SKILL.md +6 -3
- package/harness/bundles/general/claude-code/harness-submit/checklist.md +5 -5
- package/harness/bundles/general/claude-code/harness-submit/reference.md +3 -3
- package/harness/bundles/general/claude-code/harness-sync/SKILL.md +4 -2
- package/harness/bundles/general/claude-code/harness-sync/reference.md +1 -1
- package/harness/bundles/general/claude-code/harness-test/SKILL.md +7 -4
- package/harness/bundles/general/claude-code/harness-test/checklist.md +8 -5
- package/harness/bundles/general/claude-code/harness-test/pitfalls.md +1 -1
- package/harness/bundles/general/claude-code/harness-test/reference.md +28 -13
- package/harness/bundles/general/claude-code/protocols/submit-protocol.md +1 -1
- package/harness/bundles/general/claude-code/scripts/harness_deploy.py +7 -0
- package/harness/bundles/general/claude-code/scripts/harness_gate.py +75 -0
- package/harness/bundles/general/claude-code/scripts/harness_integration.py +64 -2
- package/harness/bundles/general/claude-code/scripts/harness_ledger.py +70 -3
- package/harness/bundles/general/claude-code/scripts/harness_paths.py +17 -0
- package/harness/bundles/general/claude-code/scripts/harness_plan_finalize.py +306 -7
- package/harness/bundles/general/claude-code/scripts/harness_profile.py +58 -7
- package/harness/bundles/general/claude-code/scripts/harness_review.py +107 -0
- package/harness/bundles/general/claude-code/scripts/harness_test_cleanup.py +175 -0
- package/harness/bundles/general/codebuddy/.harness-build.json +1 -1
- package/harness/bundles/general/codebuddy/CONTEXT.md +14 -1
- package/harness/bundles/general/codebuddy/README.md +1 -1
- package/harness/bundles/general/codebuddy/harness-archive/SKILL.md +7 -4
- package/harness/bundles/general/codebuddy/harness-archive/reference.md +1 -1
- package/harness/bundles/general/codebuddy/harness-codebase-map/SKILL.md +4 -2
- package/harness/bundles/general/codebuddy/harness-knowledge-ingest/SKILL.md +4 -2
- package/harness/bundles/general/codebuddy/harness-knowledge-ingest/scripts/harness_knowledge.py +16 -1
- package/harness/bundles/general/codebuddy/harness-knowledge-query/SKILL.md +4 -2
- package/harness/bundles/general/codebuddy/harness-plan/SKILL.md +8 -4
- package/harness/bundles/general/codebuddy/harness-plan/checklist.md +5 -5
- package/harness/bundles/general/codebuddy/harness-review/SKILL.md +5 -2
- package/harness/bundles/general/codebuddy/harness-review/reference.md +13 -0
- package/harness/bundles/general/codebuddy/harness-run/SKILL.md +7 -3
- package/harness/bundles/general/codebuddy/harness-run/checklist.md +4 -4
- package/harness/bundles/general/codebuddy/harness-submit/SKILL.md +6 -3
- package/harness/bundles/general/codebuddy/harness-submit/checklist.md +5 -5
- package/harness/bundles/general/codebuddy/harness-submit/reference.md +3 -3
- package/harness/bundles/general/codebuddy/harness-sync/SKILL.md +4 -2
- package/harness/bundles/general/codebuddy/harness-sync/reference.md +1 -1
- package/harness/bundles/general/codebuddy/harness-test/SKILL.md +7 -4
- package/harness/bundles/general/codebuddy/harness-test/checklist.md +8 -5
- package/harness/bundles/general/codebuddy/harness-test/pitfalls.md +1 -1
- package/harness/bundles/general/codebuddy/harness-test/reference.md +28 -13
- package/harness/bundles/general/codebuddy/protocols/submit-protocol.md +1 -1
- package/harness/bundles/general/codebuddy/scripts/harness_deploy.py +7 -0
- package/harness/bundles/general/codebuddy/scripts/harness_gate.py +75 -0
- package/harness/bundles/general/codebuddy/scripts/harness_integration.py +64 -2
- package/harness/bundles/general/codebuddy/scripts/harness_ledger.py +70 -3
- package/harness/bundles/general/codebuddy/scripts/harness_paths.py +17 -0
- package/harness/bundles/general/codebuddy/scripts/harness_plan_finalize.py +306 -7
- package/harness/bundles/general/codebuddy/scripts/harness_profile.py +58 -7
- package/harness/bundles/general/codebuddy/scripts/harness_review.py +107 -0
- package/harness/bundles/general/codebuddy/scripts/harness_test_cleanup.py +175 -0
- package/harness/bundles/general/codex/.harness-build.json +1 -1
- package/harness/bundles/general/codex/CONTEXT.md +14 -1
- package/harness/bundles/general/codex/README.md +1 -1
- package/harness/bundles/general/codex/harness-archive/SKILL.md +7 -4
- package/harness/bundles/general/codex/harness-archive/reference.md +1 -1
- package/harness/bundles/general/codex/harness-codebase-map/SKILL.md +4 -2
- package/harness/bundles/general/codex/harness-knowledge-ingest/SKILL.md +4 -2
- package/harness/bundles/general/codex/harness-knowledge-ingest/scripts/harness_knowledge.py +16 -1
- package/harness/bundles/general/codex/harness-knowledge-query/SKILL.md +4 -2
- package/harness/bundles/general/codex/harness-plan/SKILL.md +8 -4
- package/harness/bundles/general/codex/harness-plan/checklist.md +5 -5
- package/harness/bundles/general/codex/harness-review/SKILL.md +5 -2
- package/harness/bundles/general/codex/harness-review/reference.md +13 -0
- package/harness/bundles/general/codex/harness-run/SKILL.md +7 -3
- package/harness/bundles/general/codex/harness-run/checklist.md +4 -4
- package/harness/bundles/general/codex/harness-submit/SKILL.md +6 -3
- package/harness/bundles/general/codex/harness-submit/checklist.md +5 -5
- package/harness/bundles/general/codex/harness-submit/reference.md +3 -3
- package/harness/bundles/general/codex/harness-sync/SKILL.md +4 -2
- package/harness/bundles/general/codex/harness-sync/reference.md +1 -1
- package/harness/bundles/general/codex/harness-test/SKILL.md +7 -4
- package/harness/bundles/general/codex/harness-test/checklist.md +8 -5
- package/harness/bundles/general/codex/harness-test/pitfalls.md +1 -1
- package/harness/bundles/general/codex/harness-test/reference.md +28 -13
- package/harness/bundles/general/codex/protocols/submit-protocol.md +1 -1
- package/harness/bundles/general/codex/scripts/harness_deploy.py +7 -0
- package/harness/bundles/general/codex/scripts/harness_gate.py +75 -0
- package/harness/bundles/general/codex/scripts/harness_integration.py +64 -2
- package/harness/bundles/general/codex/scripts/harness_ledger.py +70 -3
- package/harness/bundles/general/codex/scripts/harness_paths.py +17 -0
- package/harness/bundles/general/codex/scripts/harness_plan_finalize.py +306 -7
- package/harness/bundles/general/codex/scripts/harness_profile.py +58 -7
- package/harness/bundles/general/codex/scripts/harness_review.py +107 -0
- package/harness/bundles/general/codex/scripts/harness_test_cleanup.py +175 -0
- package/harness/bundles/general/cursor/.harness-build.json +1 -1
- package/harness/bundles/general/cursor/CONTEXT.md +14 -1
- package/harness/bundles/general/cursor/README.md +1 -1
- package/harness/bundles/general/cursor/harness-archive/SKILL.md +7 -4
- package/harness/bundles/general/cursor/harness-archive/reference.md +1 -1
- package/harness/bundles/general/cursor/harness-codebase-map/SKILL.md +4 -2
- package/harness/bundles/general/cursor/harness-knowledge-ingest/SKILL.md +4 -2
- package/harness/bundles/general/cursor/harness-knowledge-ingest/scripts/harness_knowledge.py +16 -1
- package/harness/bundles/general/cursor/harness-knowledge-query/SKILL.md +4 -2
- package/harness/bundles/general/cursor/harness-plan/SKILL.md +8 -4
- package/harness/bundles/general/cursor/harness-plan/checklist.md +5 -5
- package/harness/bundles/general/cursor/harness-review/SKILL.md +5 -2
- package/harness/bundles/general/cursor/harness-review/reference.md +13 -0
- package/harness/bundles/general/cursor/harness-run/SKILL.md +7 -3
- package/harness/bundles/general/cursor/harness-run/checklist.md +4 -4
- package/harness/bundles/general/cursor/harness-submit/SKILL.md +6 -3
- package/harness/bundles/general/cursor/harness-submit/checklist.md +5 -5
- package/harness/bundles/general/cursor/harness-submit/reference.md +3 -3
- package/harness/bundles/general/cursor/harness-sync/SKILL.md +4 -2
- package/harness/bundles/general/cursor/harness-sync/reference.md +1 -1
- package/harness/bundles/general/cursor/harness-test/SKILL.md +7 -4
- package/harness/bundles/general/cursor/harness-test/checklist.md +8 -5
- package/harness/bundles/general/cursor/harness-test/pitfalls.md +1 -1
- package/harness/bundles/general/cursor/harness-test/reference.md +28 -13
- package/harness/bundles/general/cursor/protocols/submit-protocol.md +1 -1
- package/harness/bundles/general/cursor/scripts/harness_deploy.py +7 -0
- package/harness/bundles/general/cursor/scripts/harness_gate.py +75 -0
- package/harness/bundles/general/cursor/scripts/harness_integration.py +64 -2
- package/harness/bundles/general/cursor/scripts/harness_ledger.py +70 -3
- package/harness/bundles/general/cursor/scripts/harness_paths.py +17 -0
- package/harness/bundles/general/cursor/scripts/harness_plan_finalize.py +306 -7
- package/harness/bundles/general/cursor/scripts/harness_profile.py +58 -7
- package/harness/bundles/general/cursor/scripts/harness_review.py +107 -0
- package/harness/bundles/general/cursor/scripts/harness_test_cleanup.py +175 -0
- package/harness/bundles/java/claude-code/.harness-build.json +1 -1
- package/harness/bundles/java/claude-code/CONTEXT.md +14 -1
- package/harness/bundles/java/claude-code/README.md +1 -1
- package/harness/bundles/java/claude-code/harness-apidoc/SKILL.md +5 -2
- package/harness/bundles/java/claude-code/harness-archive/SKILL.md +7 -4
- package/harness/bundles/java/claude-code/harness-archive/reference.md +1 -1
- package/harness/bundles/java/claude-code/harness-codebase-map/SKILL.md +4 -2
- package/harness/bundles/java/claude-code/harness-knowledge-ingest/SKILL.md +4 -2
- package/harness/bundles/java/claude-code/harness-knowledge-ingest/scripts/harness_knowledge.py +16 -1
- package/harness/bundles/java/claude-code/harness-knowledge-query/SKILL.md +4 -2
- package/harness/bundles/java/claude-code/harness-package/SKILL.md +5 -2
- package/harness/bundles/java/claude-code/harness-package/checklist.md +4 -4
- package/harness/bundles/java/claude-code/harness-plan/SKILL.md +8 -4
- package/harness/bundles/java/claude-code/harness-plan/checklist.md +5 -5
- package/harness/bundles/java/claude-code/harness-review/SKILL.md +5 -2
- package/harness/bundles/java/claude-code/harness-review/reference.md +13 -0
- package/harness/bundles/java/claude-code/harness-run/SKILL.md +7 -3
- package/harness/bundles/java/claude-code/harness-run/checklist.md +4 -4
- package/harness/bundles/java/claude-code/harness-submit/SKILL.md +6 -3
- package/harness/bundles/java/claude-code/harness-submit/checklist.md +5 -5
- package/harness/bundles/java/claude-code/harness-submit/reference.md +3 -3
- package/harness/bundles/java/claude-code/harness-sync/SKILL.md +4 -2
- package/harness/bundles/java/claude-code/harness-sync/reference.md +1 -1
- package/harness/bundles/java/claude-code/harness-test/SKILL.md +8 -5
- package/harness/bundles/java/claude-code/harness-test/pitfalls.md +1 -1
- package/harness/bundles/java/claude-code/harness-test/reference.md +1 -1
- package/harness/bundles/java/claude-code/protocols/submit-protocol.md +1 -1
- package/harness/bundles/java/claude-code/scripts/harness_deploy.py +7 -0
- package/harness/bundles/java/claude-code/scripts/harness_gate.py +75 -0
- package/harness/bundles/java/claude-code/scripts/harness_integration.py +64 -2
- package/harness/bundles/java/claude-code/scripts/harness_ledger.py +70 -3
- package/harness/bundles/java/claude-code/scripts/harness_paths.py +17 -0
- package/harness/bundles/java/claude-code/scripts/harness_plan_finalize.py +306 -7
- package/harness/bundles/java/claude-code/scripts/harness_profile.py +58 -7
- package/harness/bundles/java/claude-code/scripts/harness_review.py +107 -0
- package/harness/bundles/java/claude-code/scripts/harness_test_cleanup.py +175 -0
- package/harness/bundles/java/codebuddy/.harness-build.json +1 -1
- package/harness/bundles/java/codebuddy/CONTEXT.md +14 -1
- package/harness/bundles/java/codebuddy/README.md +1 -1
- package/harness/bundles/java/codebuddy/harness-apidoc/SKILL.md +5 -2
- package/harness/bundles/java/codebuddy/harness-archive/SKILL.md +7 -4
- package/harness/bundles/java/codebuddy/harness-archive/reference.md +1 -1
- package/harness/bundles/java/codebuddy/harness-codebase-map/SKILL.md +4 -2
- package/harness/bundles/java/codebuddy/harness-knowledge-ingest/SKILL.md +4 -2
- package/harness/bundles/java/codebuddy/harness-knowledge-ingest/scripts/harness_knowledge.py +16 -1
- package/harness/bundles/java/codebuddy/harness-knowledge-query/SKILL.md +4 -2
- package/harness/bundles/java/codebuddy/harness-package/SKILL.md +5 -2
- package/harness/bundles/java/codebuddy/harness-package/checklist.md +4 -4
- package/harness/bundles/java/codebuddy/harness-plan/SKILL.md +8 -4
- package/harness/bundles/java/codebuddy/harness-plan/checklist.md +5 -5
- package/harness/bundles/java/codebuddy/harness-review/SKILL.md +5 -2
- package/harness/bundles/java/codebuddy/harness-review/reference.md +13 -0
- package/harness/bundles/java/codebuddy/harness-run/SKILL.md +7 -3
- package/harness/bundles/java/codebuddy/harness-run/checklist.md +4 -4
- package/harness/bundles/java/codebuddy/harness-submit/SKILL.md +6 -3
- package/harness/bundles/java/codebuddy/harness-submit/checklist.md +5 -5
- package/harness/bundles/java/codebuddy/harness-submit/reference.md +3 -3
- package/harness/bundles/java/codebuddy/harness-sync/SKILL.md +4 -2
- package/harness/bundles/java/codebuddy/harness-sync/reference.md +1 -1
- package/harness/bundles/java/codebuddy/harness-test/SKILL.md +8 -5
- package/harness/bundles/java/codebuddy/harness-test/pitfalls.md +1 -1
- package/harness/bundles/java/codebuddy/harness-test/reference.md +1 -1
- package/harness/bundles/java/codebuddy/protocols/submit-protocol.md +1 -1
- package/harness/bundles/java/codebuddy/scripts/harness_deploy.py +7 -0
- package/harness/bundles/java/codebuddy/scripts/harness_gate.py +75 -0
- package/harness/bundles/java/codebuddy/scripts/harness_integration.py +64 -2
- package/harness/bundles/java/codebuddy/scripts/harness_ledger.py +70 -3
- package/harness/bundles/java/codebuddy/scripts/harness_paths.py +17 -0
- package/harness/bundles/java/codebuddy/scripts/harness_plan_finalize.py +306 -7
- package/harness/bundles/java/codebuddy/scripts/harness_profile.py +58 -7
- package/harness/bundles/java/codebuddy/scripts/harness_review.py +107 -0
- package/harness/bundles/java/codebuddy/scripts/harness_test_cleanup.py +175 -0
- package/harness/bundles/java/codex/.harness-build.json +1 -1
- package/harness/bundles/java/codex/CONTEXT.md +14 -1
- package/harness/bundles/java/codex/README.md +1 -1
- package/harness/bundles/java/codex/harness-apidoc/SKILL.md +5 -2
- package/harness/bundles/java/codex/harness-archive/SKILL.md +7 -4
- package/harness/bundles/java/codex/harness-archive/reference.md +1 -1
- package/harness/bundles/java/codex/harness-codebase-map/SKILL.md +4 -2
- package/harness/bundles/java/codex/harness-knowledge-ingest/SKILL.md +4 -2
- package/harness/bundles/java/codex/harness-knowledge-ingest/scripts/harness_knowledge.py +16 -1
- package/harness/bundles/java/codex/harness-knowledge-query/SKILL.md +4 -2
- package/harness/bundles/java/codex/harness-package/SKILL.md +5 -2
- package/harness/bundles/java/codex/harness-package/checklist.md +4 -4
- package/harness/bundles/java/codex/harness-plan/SKILL.md +8 -4
- package/harness/bundles/java/codex/harness-plan/checklist.md +5 -5
- package/harness/bundles/java/codex/harness-review/SKILL.md +5 -2
- package/harness/bundles/java/codex/harness-review/reference.md +13 -0
- package/harness/bundles/java/codex/harness-run/SKILL.md +7 -3
- package/harness/bundles/java/codex/harness-run/checklist.md +4 -4
- package/harness/bundles/java/codex/harness-submit/SKILL.md +6 -3
- package/harness/bundles/java/codex/harness-submit/checklist.md +5 -5
- package/harness/bundles/java/codex/harness-submit/reference.md +3 -3
- package/harness/bundles/java/codex/harness-sync/SKILL.md +4 -2
- package/harness/bundles/java/codex/harness-sync/reference.md +1 -1
- package/harness/bundles/java/codex/harness-test/SKILL.md +8 -5
- package/harness/bundles/java/codex/harness-test/pitfalls.md +1 -1
- package/harness/bundles/java/codex/harness-test/reference.md +1 -1
- package/harness/bundles/java/codex/protocols/submit-protocol.md +1 -1
- package/harness/bundles/java/codex/scripts/harness_deploy.py +7 -0
- package/harness/bundles/java/codex/scripts/harness_gate.py +75 -0
- package/harness/bundles/java/codex/scripts/harness_integration.py +64 -2
- package/harness/bundles/java/codex/scripts/harness_ledger.py +70 -3
- package/harness/bundles/java/codex/scripts/harness_paths.py +17 -0
- package/harness/bundles/java/codex/scripts/harness_plan_finalize.py +306 -7
- package/harness/bundles/java/codex/scripts/harness_profile.py +58 -7
- package/harness/bundles/java/codex/scripts/harness_review.py +107 -0
- package/harness/bundles/java/codex/scripts/harness_test_cleanup.py +175 -0
- package/harness/bundles/java/cursor/.harness-build.json +1 -1
- package/harness/bundles/java/cursor/CONTEXT.md +14 -1
- package/harness/bundles/java/cursor/README.md +1 -1
- package/harness/bundles/java/cursor/harness-apidoc/SKILL.md +5 -2
- package/harness/bundles/java/cursor/harness-archive/SKILL.md +7 -4
- package/harness/bundles/java/cursor/harness-archive/reference.md +1 -1
- package/harness/bundles/java/cursor/harness-codebase-map/SKILL.md +4 -2
- package/harness/bundles/java/cursor/harness-knowledge-ingest/SKILL.md +4 -2
- package/harness/bundles/java/cursor/harness-knowledge-ingest/scripts/harness_knowledge.py +16 -1
- package/harness/bundles/java/cursor/harness-knowledge-query/SKILL.md +4 -2
- package/harness/bundles/java/cursor/harness-package/SKILL.md +5 -2
- package/harness/bundles/java/cursor/harness-package/checklist.md +4 -4
- package/harness/bundles/java/cursor/harness-plan/SKILL.md +8 -4
- package/harness/bundles/java/cursor/harness-plan/checklist.md +5 -5
- package/harness/bundles/java/cursor/harness-review/SKILL.md +5 -2
- package/harness/bundles/java/cursor/harness-review/reference.md +13 -0
- package/harness/bundles/java/cursor/harness-run/SKILL.md +7 -3
- package/harness/bundles/java/cursor/harness-run/checklist.md +4 -4
- package/harness/bundles/java/cursor/harness-submit/SKILL.md +6 -3
- package/harness/bundles/java/cursor/harness-submit/checklist.md +5 -5
- package/harness/bundles/java/cursor/harness-submit/reference.md +3 -3
- package/harness/bundles/java/cursor/harness-sync/SKILL.md +4 -2
- package/harness/bundles/java/cursor/harness-sync/reference.md +1 -1
- package/harness/bundles/java/cursor/harness-test/SKILL.md +8 -5
- package/harness/bundles/java/cursor/harness-test/pitfalls.md +1 -1
- package/harness/bundles/java/cursor/harness-test/reference.md +1 -1
- package/harness/bundles/java/cursor/protocols/submit-protocol.md +1 -1
- package/harness/bundles/java/cursor/scripts/harness_deploy.py +7 -0
- package/harness/bundles/java/cursor/scripts/harness_gate.py +75 -0
- package/harness/bundles/java/cursor/scripts/harness_integration.py +64 -2
- package/harness/bundles/java/cursor/scripts/harness_ledger.py +70 -3
- package/harness/bundles/java/cursor/scripts/harness_paths.py +17 -0
- package/harness/bundles/java/cursor/scripts/harness_plan_finalize.py +306 -7
- package/harness/bundles/java/cursor/scripts/harness_profile.py +58 -7
- package/harness/bundles/java/cursor/scripts/harness_review.py +107 -0
- package/harness/bundles/java/cursor/scripts/harness_test_cleanup.py +175 -0
- package/harness/manifests/general/claude-code.json +38 -34
- package/harness/manifests/general/codebuddy.json +38 -34
- package/harness/manifests/general/codex.json +38 -34
- package/harness/manifests/general/cursor.json +38 -34
- package/harness/manifests/java/claude-code.json +40 -36
- package/harness/manifests/java/codebuddy.json +40 -36
- package/harness/manifests/java/codex.json +40 -36
- package/harness/manifests/java/cursor.json +40 -36
- package/hunter-workflow-family.json +2 -2
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ name: harness-knowledge-query
|
|
|
3
3
|
description: 根据新需求、设计任务、代码修改请求或问题排查,在规划和编码前查询 .harness/knowledge
|
|
4
4
|
历史上下文。适用场景:query knowledge、查找历史需求、根据归档理解需求、继续之前类似开发、生成需求上下文包。
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=6a9274f7a054dc17; overlay=java; agent=codex; do not edit -->
|
|
7
7
|
# harness-knowledge-query
|
|
8
8
|
|
|
9
9
|
并行 change 中查询必须传 `--change <change-id>`;成功后以该 change 的 `meta/knowledge-context.json` 为稳定指针。全局 `context-packs/latest.json` 仅向后兼容,不得用于判断多个 active change 的上下文归属。
|
|
@@ -111,6 +111,7 @@ powershell.exe -Command "python '<ingest-skill-dir>\scripts\harness_knowledge.py
|
|
|
111
111
|
- 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
|
|
112
112
|
- 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
|
|
113
113
|
- 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
|
|
114
|
+
> 片段:p0-trust · query 成功须含 `contextPack`/`planInput.kind` 与 `latest.json` 写入
|
|
114
115
|
|
|
115
116
|
## Output Format
|
|
116
117
|
|
|
@@ -128,7 +129,7 @@ powershell.exe -Command "python '<ingest-skill-dir>\scripts\harness_knowledge.py
|
|
|
128
129
|
|
|
129
130
|
## 交互白名单
|
|
130
131
|
|
|
131
|
-
**无**
|
|
132
|
+
**无** blocking user confirmation;`stale`/`conflicted` 命中记 `issue`,不阻断 query。
|
|
132
133
|
|
|
133
134
|
## 执行日志
|
|
134
135
|
|
|
@@ -143,3 +144,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
143
144
|
> **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 边界保持最新。
|
|
144
145
|
|
|
145
146
|
每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
|
|
147
|
+
> 片段:logging · phase=`knowledge-query` · 独立运行时控制台报告;变更上下文写 decision/issue/artifact
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: harness-package
|
|
3
3
|
description: 增量模块打包:拉取最新→编译验证→mvn package→汇总 jar/war。使用场景:打包、package、发版准备
|
|
4
4
|
---
|
|
5
|
-
<!-- generated by harness_deploy.py; core=
|
|
5
|
+
<!-- generated by harness_deploy.py; core=6a9274f7a054dc17; overlay=java; agent=codex; do not edit -->
|
|
6
6
|
# harness-package — 增量模块打包(Java overlay)
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -34,6 +34,7 @@ description: 增量模块打包:拉取最新→编译验证→mvn package→
|
|
|
34
34
|
9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit> --json`;`changedSegments=[]` 时复用已有 profile/rules/map/knowledge/change/code 指纹,不再重复跑全量 `harness-sync`、知识重建或代码库扫描。只有对应 segment 变化或缺失时才定向刷新;快照不能替代源码读取和验证门禁。
|
|
35
35
|
|
|
36
36
|
状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
|
|
37
|
+
> 片段:read-protocol
|
|
37
38
|
|
|
38
39
|
## Workflow
|
|
39
40
|
|
|
@@ -50,6 +51,7 @@ description: 增量模块打包:拉取最新→编译验证→mvn package→
|
|
|
50
51
|
- 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
|
|
51
52
|
- 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
|
|
52
53
|
- 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
|
|
54
|
+
> 片段:p0-trust
|
|
53
55
|
|
|
54
56
|
## 渐进披露
|
|
55
57
|
|
|
@@ -58,7 +60,7 @@ description: 增量模块打包:拉取最新→编译验证→mvn package→
|
|
|
58
60
|
|
|
59
61
|
## 交互白名单
|
|
60
62
|
|
|
61
|
-
**无**
|
|
63
|
+
**无** blocking user confirmation;冲突/失败记 `issue`/`decision`。
|
|
62
64
|
|
|
63
65
|
## 执行日志
|
|
64
66
|
|
|
@@ -73,3 +75,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
73
75
|
> **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 边界保持最新。
|
|
74
76
|
|
|
75
77
|
每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
|
|
78
|
+
> 片段:logging · phase=`package`
|
|
@@ -6,7 +6,7 @@ description: harness-package 的8步工作流详细步骤、模块识别方法
|
|
|
6
6
|
|
|
7
7
|
## 步骤 0:启动准备
|
|
8
8
|
|
|
9
|
-
确定变更名:用 Glob 搜索 `.harness/changes/*/plans/*-plan.md`(**排除 `.harness/archive/*/`**),读取 frontmatter 提取 `change-name`。默认最多一个未归档变更;如有多个,优先取最近修改的,或用
|
|
9
|
+
确定变更名:用 Glob 搜索 `.harness/changes/*/plans/*-plan.md`(**排除 `.harness/archive/*/`**),读取 frontmatter 提取 `change-name`。默认最多一个未归档变更;如有多个,优先取最近修改的,或用 blocking user confirmation 询问用户。
|
|
10
10
|
|
|
11
11
|
如果 `$ARGUMENTS` 非空且与检测到的变更名不一致,以 `$ARGUMENTS` 为准。
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ description: harness-package 的8步工作流详细步骤、模块识别方法
|
|
|
18
18
|
- `.harness/changes/<change-name>/reports/test/test-report-*.md` 是否存在(旧路径 `tests/` 兼容)
|
|
19
19
|
- `.harness/changes/<change-name>/reports/review/review-report-*.md` 是否存在(参考性,不阻塞;旧路径 `reviews/` 兼容)
|
|
20
20
|
|
|
21
|
-
如果缺失 test 报告,使用 `
|
|
21
|
+
如果缺失 test 报告,使用 `blocking user confirmation` 询问用户:
|
|
22
22
|
|
|
23
23
|
```
|
|
24
24
|
检测到 harness-test 尚未运行(缺少测试报告):
|
|
@@ -195,7 +195,7 @@ powershell.exe -Command "git -C '<项目路径>' diff '@{u}'...HEAD --name-only"
|
|
|
195
195
|
|
|
196
196
|
## 步骤 4:打包模式选择
|
|
197
197
|
|
|
198
|
-
使用
|
|
198
|
+
使用 blocking user confirmation 向用户展示选项:
|
|
199
199
|
|
|
200
200
|
```markdown
|
|
201
201
|
已识别 N 个变更模块及其依赖链,请选择打包模式:
|
|
@@ -250,7 +250,7 @@ powershell.exe -Command "mvn package -pl <module-list> -am"
|
|
|
250
250
|
1. 依赖是否完整(是否需要先 `mvn install` 安装上游模块)
|
|
251
251
|
2. 版本冲突(参考 `reference.md` 常见问题)
|
|
252
252
|
3. 编译错误(是否遗漏了某个变更文件)
|
|
253
|
-
- 用
|
|
253
|
+
- 用 blocking user confirmation 询问用户:重试 / 调整模块范围 / 停止
|
|
254
254
|
|
|
255
255
|
## 步骤 6:结果收集
|
|
256
256
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: harness-plan
|
|
3
3
|
description: 将需求转化为设计文档+实施计划+完整测试场景表,必须在编码前完成。使用场景:需求分析、feature plan、技术方案设计、实现方案规划
|
|
4
4
|
---
|
|
5
|
-
<!-- generated by harness_deploy.py; core=
|
|
5
|
+
<!-- generated by harness_deploy.py; core=6a9274f7a054dc17; overlay=java; agent=codex; do not edit -->
|
|
6
6
|
# harness-plan — 需求规划
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -28,6 +28,7 @@ description: 将需求转化为设计文档+实施计划+完整测试场景表
|
|
|
28
28
|
9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit> --json`;`changedSegments=[]` 时复用已有 profile/rules/map/knowledge/change/code 指纹,不再重复跑全量 `harness-sync`、知识重建或代码库扫描。只有对应 segment 变化或缺失时才定向刷新;快照不能替代源码读取和验证门禁。
|
|
29
29
|
|
|
30
30
|
状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
|
|
31
|
+
> 片段:read-protocol · plan 额外写 `meta/worktree.json`、`meta/change-context.json`
|
|
31
32
|
|
|
32
33
|
## Worktree 门禁
|
|
33
34
|
|
|
@@ -39,11 +40,12 @@ description: 将需求转化为设计文档+实施计划+完整测试场景表
|
|
|
39
40
|
| `requested=true` + path 存在 | 切换 worktree 执行 |
|
|
40
41
|
| `requested=true` + path 不存在 | **必须创建**(run)或 **停止**(test/review/submit) |
|
|
41
42
|
|
|
42
|
-
**严禁** `requested=true` 时静默回主目录。创建失败 → 停止或
|
|
43
|
+
**严禁** `requested=true` 时静默回主目录。创建失败 → 停止或 blocking user confirmation 降级(须 🟡WARN + 用户确认)。
|
|
43
44
|
|
|
44
45
|
**状态与代码分离**:代码/编译/测试在 `worktreeRoot`;`stateDir`(logs/events/ledger/reports)写回 `.harness/changes/<change-name>/`。
|
|
45
46
|
|
|
46
47
|
创建命令与 JSON 模板 → 各 skill `reference.md`(plan 写决策,run 创建/更新)。
|
|
48
|
+
> 片段:worktree-gate · plan 在**设计审批包**写入 `worktree.json`(模板 → `reference.md`)
|
|
47
49
|
|
|
48
50
|
## 原生规划协议
|
|
49
51
|
|
|
@@ -63,7 +65,7 @@ description: 将需求转化为设计文档+实施计划+完整测试场景表
|
|
|
63
65
|
| 1 | `harness-knowledge-query` 单次 query(内部 ensure-current;失败记 `issue`) |
|
|
64
66
|
| 2 | 歧义优先检查 + 复杂度分级;先确认会改变实现方向的语义歧义 |
|
|
65
67
|
| 3 | 按复杂度执行有预算的代码探索;简单修复不得扩散到无关模块 |
|
|
66
|
-
| 4 | **设计审批包**
|
|
68
|
+
| 4 | **设计审批包** blocking user confirmation;确认事件早于 approved 设计文档和 `meta/worktree.json` |
|
|
67
69
|
| 5–6 | plan + implementation-detail + test-scenarios → `plans/` |
|
|
68
70
|
| 7.5 | 仅 `--adversarial` 对抗评审 |
|
|
69
71
|
| 8 | 在临时产物集上运行 `harness_plan_finalize.py finalize`;原子发布、唯一 `phase.end`、render → `checklist.md` |
|
|
@@ -75,13 +77,14 @@ change-name 范围变更 → 提示重命名或记 🟡WARN(→ `reference.md`
|
|
|
75
77
|
- 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
|
|
76
78
|
- 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
|
|
77
79
|
- 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
|
|
80
|
+
> 片段:p0-trust
|
|
78
81
|
|
|
79
82
|
## 关键规则
|
|
80
83
|
|
|
81
84
|
| 规则 | 要点 |
|
|
82
85
|
|------|------|
|
|
83
86
|
| 产物路径 | 只写 `.harness/changes/<cn>/`;禁止 superpowers 输入 |
|
|
84
|
-
| 设计审批包 | 一次
|
|
87
|
+
| 设计审批包 | 一次 blocking user confirmation 含 worktree(读 `harness.json` `defaultWorktree`) |
|
|
85
88
|
| 阶段 8 | spec/plan/detail/scenarios/worktree.json 先进入 staging;仅 finalizer 校验成功后发布并写唯一 `phase.end`/log,失败不得手工补终态 |
|
|
86
89
|
| Plan 结束 | **禁止**询问执行模式;只提示 `/harness-run` |
|
|
87
90
|
| 知识查询 | 0.5 失败不得假装已读历史 |
|
|
@@ -117,3 +120,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
117
120
|
> **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 边界保持最新。
|
|
118
121
|
|
|
119
122
|
每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
|
|
123
|
+
> 片段:logging · phase=`plan`
|
|
@@ -6,7 +6,7 @@ description: harness-plan 的阶段检查清单和覆盖检查列表。仅在执
|
|
|
6
6
|
|
|
7
7
|
## 阶段 0:工作区变更检查 ⚠️ 强制检查
|
|
8
8
|
|
|
9
|
-
> 有未提交业务变更(排除 `.harness/`)→ **默认 baseline 隔离**,append `decision` 事件,**不
|
|
9
|
+
> 有未提交业务变更(排除 `.harness/`)→ **默认 baseline 隔离**,append `decision` 事件,**不 blocking user confirmation**,继续规划。PowerShell 失败 → ❌ 停止。
|
|
10
10
|
|
|
11
11
|
**固定命令**:`powershell.exe -Command "git -C '<项目路径>' status --porcelain"`
|
|
12
12
|
|
|
@@ -27,7 +27,7 @@ description: harness-plan 的阶段检查清单和覆盖检查列表。仅在执
|
|
|
27
27
|
|
|
28
28
|
## 设计审批包字段:Worktree
|
|
29
29
|
|
|
30
|
-
> worktree 不再单独询问。阶段 4 **设计审批包** 一次
|
|
30
|
+
> worktree 不再单独询问。阶段 4 **设计审批包** 一次 blocking user confirmation 含 worktree 选项(推荐值读 `harness.json` `defaultWorktree`)。确认后写入 `meta/worktree.json`。
|
|
31
31
|
|
|
32
32
|
- [ ] 审批包确认后写入 worktree.json(`requested` true/false)
|
|
33
33
|
- [ ] 阶段 8 检查 worktree.json 存在
|
|
@@ -63,7 +63,7 @@ description: harness-plan 的阶段检查清单和覆盖检查列表。仅在执
|
|
|
63
63
|
|
|
64
64
|
- [ ] 变更涉及 HTTP/RPC 客户端(Feign/RestTemplate/SDK 封装)时:取客户端注解路径(类级 + 方法级拼接),与服务提供方 controller 的 `@RequestMapping` + 方法级注解**完整拼接路径**逐一比对,在计划/执行记录中列出比对结果。只看方法级注解不算完成。
|
|
65
65
|
|
|
66
|
-
## 阶段 4:设计审批包 ⚠️ 强制阻断(一次
|
|
66
|
+
## 阶段 4:设计审批包 ⚠️ 强制阻断(一次 blocking user confirmation)
|
|
67
67
|
|
|
68
68
|
> 合并原「设计审核 + worktree + 场景表预览 + change-name」。推荐 worktree 读 `harness.json` `defaultWorktree`。
|
|
69
69
|
|
|
@@ -89,7 +89,7 @@ source: harness-plan
|
|
|
89
89
|
---
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
展示可审核包后,使用 `
|
|
92
|
+
展示可审核包后,使用 `blocking user confirmation` 询问用户:
|
|
93
93
|
- **确认**:设计方向正确,继续任务拆分
|
|
94
94
|
- **修改**:某个部分需要调整,修改后再审核
|
|
95
95
|
- **取消**:方向不对,回到需求澄清阶段
|
|
@@ -154,7 +154,7 @@ source: harness-plan
|
|
|
154
154
|
阶段 7.5 执行完成后,确认以下事项:
|
|
155
155
|
|
|
156
156
|
```
|
|
157
|
-
□ 已用 **设计审批包** 一次
|
|
157
|
+
□ 已用 **设计审批包** 一次 blocking user confirmation(设计 + 场景表摘要 + worktree + change-name)
|
|
158
158
|
□ **未**单独询问 worktree 或对抗评审(对抗评审仅 `--adversarial`)
|
|
159
159
|
□ 用户同意后,已用 Agent 工具委派 harness-evaluator(haiku, context:fork, plan 模式只读, maxTurns:8)
|
|
160
160
|
□ 已用 context:fork 隔离上下文(evaluator 未参与规划,破除确认偏误)
|
|
@@ -3,7 +3,7 @@ name: harness-review
|
|
|
3
3
|
description: 6维度代码审查(架构/安全/规范/兼容/测试/性能),对照项目规则(见
|
|
4
4
|
.harness/context-index.json)和测试场景表,在隔离上下文运行。使用场景:代码审查、提交前检查、合并评审
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=6a9274f7a054dc17; overlay=java; agent=codex; do not edit -->
|
|
7
7
|
# harness-review — 代码审查
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -42,6 +42,7 @@ description: 6维度代码审查(架构/安全/规范/兼容/测试/性能)
|
|
|
42
42
|
9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit> --json`;`changedSegments=[]` 时复用已有 profile/rules/map/knowledge/change/code 指纹,不再重复跑全量 `harness-sync`、知识重建或代码库扫描。只有对应 segment 变化或缺失时才定向刷新;快照不能替代源码读取和验证门禁。
|
|
43
43
|
|
|
44
44
|
状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
|
|
45
|
+
> 片段:read-protocol
|
|
45
46
|
|
|
46
47
|
## Workflow
|
|
47
48
|
|
|
@@ -102,6 +103,7 @@ review:
|
|
|
102
103
|
- 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
|
|
103
104
|
- 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
|
|
104
105
|
- 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
|
|
106
|
+
> 片段:p0-trust
|
|
105
107
|
|
|
106
108
|
## 关键规则(硬门禁速查)
|
|
107
109
|
|
|
@@ -129,7 +131,7 @@ review 读取 `state-snapshot.json`(`harness_state.py` / state-layout-protocol
|
|
|
129
131
|
|
|
130
132
|
## 交互白名单
|
|
131
133
|
|
|
132
|
-
**无**
|
|
134
|
+
**无** blocking user confirmation(审查全自动)。委派失败 → 主会话审查 + `decision` 事件。
|
|
133
135
|
|
|
134
136
|
## 执行日志
|
|
135
137
|
|
|
@@ -144,3 +146,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
144
146
|
> **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 边界保持最新。
|
|
145
147
|
|
|
146
148
|
每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
|
|
149
|
+
> 片段:logging · phase=`review` · 事件:phase/decision/verification/issue/artifact
|
|
@@ -84,3 +84,16 @@ RED 高风险建议: N | YELLOW 中低风险建议: M | 仅供参考,不阻塞
|
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
fixback 是给后续修复循环使用的结构化清单,不替代 review-report;无 RED/YELLOW 时记录跳过原因,不生成空文件。
|
|
87
|
+
|
|
88
|
+
## CodeGraph Identity 合同(C12)
|
|
89
|
+
|
|
90
|
+
调用 `codegraph_explore` 后必须校验响应中的 `repositoryId` / `indexedHead` / `indexedAt`:
|
|
91
|
+
|
|
92
|
+
- `repositoryId` 必须与 `harness_paths.repository_identity(project_root)` 一致
|
|
93
|
+
- `indexedHead` 必须与当前 HEAD 一致
|
|
94
|
+
- `indexedAt` 必须存在
|
|
95
|
+
|
|
96
|
+
identity 不匹配时记 `CODEGRAPH_IDENTITY_MISMATCH` warning,降级为 Grep/Glob + Read。
|
|
97
|
+
identity 匹配时正常使用 codegraph 结果。
|
|
98
|
+
|
|
99
|
+
校验函数:`harness_review.validate_codegraph_identity(response, expected_repository_id, expected_head)`。
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
name: harness-run
|
|
3
3
|
description: 按变更簇执行 TDD 编码循环(RED→GREEN→REFACTOR→编译验证),逐变更簇实现计划中的任务。使用场景:开始编码、实现功能、写代码、TDD 编码
|
|
4
4
|
---
|
|
5
|
-
<!-- generated by harness_deploy.py; core=
|
|
5
|
+
<!-- generated by harness_deploy.py; core=6a9274f7a054dc17; overlay=java; agent=codex; do not edit -->
|
|
6
6
|
# harness-run — 需求编码
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
9
9
|
|
|
10
|
-
基于 plan + test-scenarios,按**变更簇**执行 TDD(RED→GREEN→REFACTOR→构建验证),写入 verification-ledger。负责 worktree 创建/切换(见
|
|
10
|
+
基于 plan + test-scenarios,按**变更簇**执行 TDD(RED→GREEN→REFACTOR→构建验证),写入 verification-ledger。负责 worktree 创建/切换(见 worktree-gate)。
|
|
11
11
|
|
|
12
12
|
## When to Use
|
|
13
13
|
|
|
@@ -28,11 +28,12 @@ description: 按变更簇执行 TDD 编码循环(RED→GREEN→REFACTOR→编
|
|
|
28
28
|
| `requested=true` + path 存在 | 切换 worktree 执行 |
|
|
29
29
|
| `requested=true` + path 不存在 | **必须创建**(run)或 **停止**(test/review/submit) |
|
|
30
30
|
|
|
31
|
-
**严禁** `requested=true` 时静默回主目录。创建失败 → 停止或
|
|
31
|
+
**严禁** `requested=true` 时静默回主目录。创建失败 → 停止或 blocking user confirmation 降级(须 🟡WARN + 用户确认)。
|
|
32
32
|
|
|
33
33
|
**状态与代码分离**:代码/编译/测试在 `worktreeRoot`;`stateDir`(logs/events/ledger/reports)写回 `.harness/changes/<change-name>/`。
|
|
34
34
|
|
|
35
35
|
创建命令与 JSON 模板 → 各 skill `reference.md`(plan 写决策,run 创建/更新)。
|
|
36
|
+
> 片段:worktree-gate · 创建命令 → `reference.md`
|
|
36
37
|
|
|
37
38
|
## 统一读取协议
|
|
38
39
|
|
|
@@ -47,6 +48,7 @@ description: 按变更簇执行 TDD 编码循环(RED→GREEN→REFACTOR→编
|
|
|
47
48
|
9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit> --json`;`changedSegments=[]` 时复用已有 profile/rules/map/knowledge/change/code 指纹,不再重复跑全量 `harness-sync`、知识重建或代码库扫描。只有对应 segment 变化或缺失时才定向刷新;快照不能替代源码读取和验证门禁。
|
|
48
49
|
|
|
49
50
|
状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
|
|
51
|
+
> 片段:read-protocol · run 必读文件优先级 → `reference.md` Step 0
|
|
50
52
|
|
|
51
53
|
## 执行模式
|
|
52
54
|
|
|
@@ -78,6 +80,7 @@ description: 按变更簇执行 TDD 编码循环(RED→GREEN→REFACTOR→编
|
|
|
78
80
|
- 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
|
|
79
81
|
- 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
|
|
80
82
|
- 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
|
|
83
|
+
> 片段:p0-trust
|
|
81
84
|
|
|
82
85
|
## 关键规则(硬门禁速查)
|
|
83
86
|
|
|
@@ -147,3 +150,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
147
150
|
> **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 边界保持最新。
|
|
148
151
|
|
|
149
152
|
每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
|
|
153
|
+
> 片段:logging · phase=`run`
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
- [ ] worktree 创建命令必须使用 PowerShell:`git worktree add ...`
|
|
15
15
|
- [ ] 创建后验证 `.claude/worktrees/<change-name>/.git` 存在
|
|
16
16
|
- [ ] 创建成功后更新 `worktree.json` 的 `created=true/createdAt/createdBy`
|
|
17
|
-
- [ ] 创建失败 → 停止,或
|
|
17
|
+
- [ ] 创建失败 → 停止,或 blocking user confirmation 询问是否改为主目录执行
|
|
18
18
|
- [ ] 禁止 `requested=true && worktree 不存在` 时直接主目录执行
|
|
19
19
|
- [ ] 记录 `projectRoot / worktreeRoot / stateDir`
|
|
20
20
|
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
### 步骤 0.1:执行模式
|
|
40
40
|
|
|
41
|
-
- [ ] 默认 Inline;`--subagent` → Subagent-Driven;**不
|
|
41
|
+
- [ ] 默认 Inline;`--subagent` → Subagent-Driven;**不 blocking user confirmation 选模式**
|
|
42
42
|
|
|
43
43
|
## 步骤 0.5:测试基础设施探测(⚠️ 必须先于任何 TDD 降级结论)
|
|
44
44
|
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
> 如果 run 开始前检测到已有未提交变更,必须执行此步骤。
|
|
57
57
|
|
|
58
58
|
- [ ] 检查 git status 是否有 run 前的预存变更
|
|
59
|
-
- [ ] 如果有预存变更 → 使用
|
|
59
|
+
- [ ] 如果有预存变更 → 使用 blocking user confirmation 询问用户处理方式(保留/暂存/终止)
|
|
60
60
|
- [ ] 用户选择保留 → 创建 `.harness/changes/<change>/pre-existing-files.json`(文件列表 + diff hash + 用户选择)
|
|
61
61
|
- [ ] 用户选择保留 → 创建 `.harness/changes/<change>/pre-existing-diff.patch`(完整 diff 备份)
|
|
62
62
|
- [ ] 在执行日志中记录预存变更检测结果和用户选择
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
- [ ] 确认当前 cwd 在 `.claude/worktrees/<change-name>/` 下
|
|
200
200
|
- [ ] 生成变更摘要:`git diff --stat` + `git diff --stat --cached`
|
|
201
201
|
- [ ] 构建 commit message:`wip(<scope>): <change-name> 编码完成 — N任务/M文件变更`
|
|
202
|
-
- [ ] **⚠️ 强制阻断**:用
|
|
202
|
+
- [ ] **⚠️ 强制阻断**:用 blocking user confirmation 展示变更列表 + commit message,等待用户确认
|
|
203
203
|
- [ ] 用户确认 → 执行 `git add -A` + `git commit`(不用 --no-verify、--no-gpg-sign)
|
|
204
204
|
- [ ] 用户拒绝 → 记录 `❌用户拒绝`,继续后续流程
|
|
205
205
|
- [ ] 记录 checkpoint commit hash 到执行日志
|
|
@@ -3,7 +3,7 @@ name: harness-submit
|
|
|
3
3
|
description: 最终提交封装:验证→中文 commit→提交/推送;worktree 模式含 --no-ff
|
|
4
4
|
合并回主分支。使用场景:提交代码、commit、push、合并分支、merge to main、完成开发
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=6a9274f7a054dc17; overlay=java; agent=codex; do not edit -->
|
|
7
7
|
# harness-submit — 最终提交(含 worktree 合并)
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -43,6 +43,7 @@ description: 最终提交封装:验证→中文 commit→提交/推送;workt
|
|
|
43
43
|
9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit> --json`;`changedSegments=[]` 时复用已有 profile/rules/map/knowledge/change/code 指纹,不再重复跑全量 `harness-sync`、知识重建或代码库扫描。只有对应 segment 变化或缺失时才定向刷新;快照不能替代源码读取和验证门禁。
|
|
44
44
|
|
|
45
45
|
状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
|
|
46
|
+
> 片段:read-protocol
|
|
46
47
|
|
|
47
48
|
## 状态目录分层
|
|
48
49
|
|
|
@@ -60,7 +61,7 @@ worktree 合并前必须运行 `harness_change.py integration-lock acquire --run
|
|
|
60
61
|
1. **合并最新代码** — 主目录与 worktree 均**不在业务工作区 stash/pull**;远端同步由合并段 integration transaction 在隔离 integration worktree 内完成(见「worktree 合并流程」);**正常路径禁止 `git stash` / `stash pop`**
|
|
61
62
|
2. **最终验证** — ledger 复用优先;**提交前最终门禁只调 `can-reuse`**(删除与 coverage 冲突的二次全量门禁):`harness_ledger.py can-reuse --verification unitTestFull --scope module --project . --profile-input unitTestFull --command <resolved commands.unitTestFull.command>`。`--command` **按 profile key resolve**:读 `build-profile.json` 的 `commands.unitTestFull.command`(v2),或 `harness_profile.py resolve --project . --key unitTestFull --json` 取 resolved command,**不复制示例模块名**(文档示例只展示 key)。`--profile-input unitTestFull` 从 `verificationInputs.unitTestFull`(v2 由 `commands.unitTestFull.inputs` 派生)展开依赖闭包,**禁止用仅含 staged 文件的 `--files` 快捷方式**冒充全量闭包。`reuse=true` → 不再执行二次全量测试;仅 `reuse=false` 时执行**同一 resolved verification**(profile `unitTestFull` 命令),成功后用同一文件集、command、`scope=module` 经 **`harness_ledger.py record`** 写回 ledger `unitTestFull` 项。增量 `unitTest` 永远不能冒充 `unitTestFull` 门禁。
|
|
62
63
|
3. **.gitignore + 精确暂存** ⚠️ — 检查 `.harness/` 在 `.gitignore`;**禁止 `git add -A`**。若存在 `evidence/test-tracking.json`,先执行 `python <skills-root>/scripts/harness_test_guard.py stage --project . --change-dir ".harness/changes/<change-name>" --json`;失败即硬停止。无 manifest 时不使用 `-f`。manifest 之外的文件按精确业务路径正常暂存,**禁止全局 force-add**。
|
|
63
|
-
4. **提交方式** — 主目录:
|
|
64
|
+
4. **提交方式** — 主目录:blocking user confirmation 三选项(commit+push / 仅本地 / 取消);**worktree:固定仅本地 commit**
|
|
64
65
|
5. **commit-message.txt** ⚠️ — 展示 staged、diff stat、完整中文 message;用户确认
|
|
65
66
|
6. **commit / push** — `git commit -F`;主目录按选项 push(push 前 fetch 检查远端);**worktree:只 commit,记录 local hash**
|
|
66
67
|
7. **收尾** — **`harness_gate.py close --phase submit --status ...`**;主目录:可选 worktree 清理 + 提示 `/harness-archive`;**worktree:接续下方合并流程**
|
|
@@ -96,6 +97,7 @@ M7. **ledger + 收尾** — 经 `harness_ledger.py record` 写入 `mergeFinalHas
|
|
|
96
97
|
- 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
|
|
97
98
|
- 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
|
|
98
99
|
- 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
|
|
100
|
+
> 片段:p0-trust
|
|
99
101
|
|
|
100
102
|
## 关键规则(硬门禁速查)
|
|
101
103
|
|
|
@@ -141,7 +143,7 @@ git 经 PowerShell;commit/报告不得含明文密钥。遵循 `../protocols/s
|
|
|
141
143
|
|
|
142
144
|
## 交互白名单
|
|
143
145
|
|
|
144
|
-
本 skill **仅允许**以下
|
|
146
|
+
本 skill **仅允许**以下 blocking user confirmation;其余默认值 + `decision` 事件:
|
|
145
147
|
|
|
146
148
|
1. **提交方式 + commit message**(主目录一次确认);worktree 固定仅本地 commit,仅确认 message
|
|
147
149
|
2. **远程有新提交**(push 前):重新验证 / 停止 push
|
|
@@ -159,3 +161,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
159
161
|
> **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 边界保持最新。
|
|
160
162
|
|
|
161
163
|
每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
|
|
164
|
+
> 片段:logging · phase=`submit`/`merge`
|
|
@@ -12,7 +12,7 @@ description: harness-submit 的8 步工作流详细步骤和执行日志记录
|
|
|
12
12
|
- commit message 必须写入 `.harness/changes/<change>/runtime/commit-message.txt`。
|
|
13
13
|
- 使用 `git commit -F`,禁止先英文 commit 再 amend。
|
|
14
14
|
- commit message 禁止 `Co-Authored-By`、`Generated by`、`AI generated`。
|
|
15
|
-
-
|
|
15
|
+
- blocking user confirmation 参数错误时不得自行绕过,必须改用固定模板重问。
|
|
16
16
|
- staged diff 是唯一提交依据。
|
|
17
17
|
|
|
18
18
|
|
|
@@ -130,7 +130,7 @@ powershell.exe -Command "Select-String -Path '<项目路径>\.gitignore' -Patter
|
|
|
130
130
|
|
|
131
131
|
如果未包含:
|
|
132
132
|
- **必须提醒用户**:`⚠️ .gitignore 未包含 .harness/,会导致 .harness/ 下文件被提交(含日志、报告、可能含敏感信息)`
|
|
133
|
-
- **默认不提交 .harness/ 下文件**:使用
|
|
133
|
+
- **默认不提交 .harness/ 下文件**:使用 blocking user confirmation 询问用户是否:
|
|
134
134
|
1. 添加 .harness/ 到 .gitignore(推荐)
|
|
135
135
|
2. 仅 stage 业务代码文件,不提交 .harness/
|
|
136
136
|
3. 取消提交
|
|
@@ -146,7 +146,7 @@ powershell.exe -Command "git -C '<项目路径>' status --porcelain | Select-Str
|
|
|
146
146
|
|
|
147
147
|
**worktree 模式(requested=true)**:固定为「仅本地 commit」,不展示「commit+push」选项;commit 完成后继续下方「worktree 合并流程」,跳过下方三选项询问。
|
|
148
148
|
|
|
149
|
-
`harness-submit` 不调用 Superpowers 呈现合并选项。只允许使用固定
|
|
149
|
+
`harness-submit` 不调用 Superpowers 呈现合并选项。只允许使用固定 blocking user confirmation 模板:
|
|
150
150
|
|
|
151
151
|
```text
|
|
152
152
|
本次变更已完成验证,请选择提交方式:
|
|
@@ -156,7 +156,7 @@ powershell.exe -Command "git -C '<项目路径>' status --porcelain | Select-Str
|
|
|
156
156
|
3. 取消提交
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
禁止在此步骤引入"创建 PR""丢弃所有变更""直接合并到主分支"等旧选项,避免 blocking user confirmation 参数错误和流程歧义。
|
|
160
160
|
|
|
161
161
|
## 步骤 5:展示提交摘要 + 确认 ⚠️ 强制阻断
|
|
162
162
|
|
|
@@ -256,7 +256,7 @@ powershell.exe -Command "git -C '<项目路径>' log HEAD..@{u} --oneline"
|
|
|
256
256
|
- **不得直接 pull 后 push**
|
|
257
257
|
- 必须 pull/rebase 后**重新构建/测试**(ledger 复用条件被破坏,须重跑并写回 ledger)
|
|
258
258
|
- 验证通过后再 push
|
|
259
|
-
- 使用
|
|
259
|
+
- 使用 blocking user confirmation 询问用户:
|
|
260
260
|
```
|
|
261
261
|
远程有新提交(N 个),需要 pull/rebase 后重新验证:
|
|
262
262
|
1. 重新验证(pull/rebase + 构建 + 测试)
|
|
@@ -4,7 +4,7 @@ description: harness-submit 的提交格式、固定交互模板和中文 commit
|
|
|
4
4
|
|
|
5
5
|
# harness-submit 参考
|
|
6
6
|
|
|
7
|
-
## 提交方式
|
|
7
|
+
## 提交方式 blocking user confirmation 固定模板
|
|
8
8
|
|
|
9
9
|
问题标题:`请选择提交方式`
|
|
10
10
|
|
|
@@ -14,7 +14,7 @@ description: harness-submit 的提交格式、固定交互模板和中文 commit
|
|
|
14
14
|
2. `仅本地 commit,不 push`
|
|
15
15
|
3. `取消提交`
|
|
16
16
|
|
|
17
|
-
不得临场增加复杂对象或嵌套参数,避免
|
|
17
|
+
不得临场增加复杂对象或嵌套参数,避免 blocking user confirmation 参数错误。
|
|
18
18
|
|
|
19
19
|
> **worktree 模式(meta/worktree.json requested=true)**:固定选项 2「仅本地 commit」,不展示「commit+push」;commit 成功后 skill **自动接续** worktree 合并流程(`/harness-merge` 为别名)。push 只在主分支完成,产出 `mergeFinalHash`。
|
|
20
20
|
|
|
@@ -148,5 +148,5 @@ powershell.exe -NoProfile -Command "git -C '<项目路径>' log HEAD..@{u} --one
|
|
|
148
148
|
|
|
149
149
|
- 步骤 1(合并最新代码):按无 upstream / 远端无新提交判定 N/A,在执行日志记录理由。
|
|
150
150
|
- 步骤 5(commit-message.txt + `git commit -F`)N/A:无可暂存 diff,无新 commit 需生成。执行日志标注 `commit-message.txt / git commit -F: N/A(工作树 clean,无新 commit;N 个 wip 提交已存在,原样推送)`。
|
|
151
|
-
- 步骤 4(提交方式选择):固定三选项仍适用。但当 review 标了 RED 兼容性破坏等需人工确认项时,可在"commit + push"选项的描述中注明"并确认 <RED 项>",**不得新增第四选项**、不得临场拼复杂
|
|
151
|
+
- 步骤 4(提交方式选择):固定三选项仍适用。但当 review 标了 RED 兼容性破坏等需人工确认项时,可在"commit + push"选项的描述中注明"并确认 <RED 项>",**不得新增第四选项**、不得临场拼复杂 blocking user confirmation 参数。
|
|
152
152
|
- push 仍按步骤 6:fetch 检查远端 → `git push -u`(无 upstream 则新建远端分支)→ 记录 pre-pull hash + final pushed hash。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: harness-sync
|
|
3
3
|
description: 检查并更新项目AI元数据(CodeGraph索引、harness-codebase-map分析、CLAUDE.md、AGENTS.md、.harness/完整性),确保Claude对代码库的理解与最新代码一致。当用户说'同步/更新索引/刷新元数据/检查一致性'时使用
|
|
4
4
|
---
|
|
5
|
-
<!-- generated by harness_deploy.py; core=
|
|
5
|
+
<!-- generated by harness_deploy.py; core=6a9274f7a054dc17; overlay=java; agent=codex; do not edit -->
|
|
6
6
|
# harness-sync — 元数据同步
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -38,7 +38,7 @@ python <skills-root>/scripts/harness_sync.py finalize --project . --run-id <run-
|
|
|
38
38
|
| 3 | `.harness/codebase/map/` 是否过期 → 报告建议 `/harness-codebase-map` |
|
|
39
39
|
| 3.5 | `harness_knowledge.py sync`;可 `sync --update`;失败不得假装可用。**知识闭环主入口**是 `/harness-knowledge-ingest auto`(含 Agent judge),sync 不重复列人工知识待办 |
|
|
40
40
|
| 3.6 | 单次运行 `harness_knowledge.py maintain --project . --drain --json`,有界推进全部 `.harness/knowledge/maintenance-outbox/{pending,failed}`;不得为每个条目重复启动 Python/重建索引(§8.2:archive close 只 enqueue,sync 异步推进 outbox 到 completed/pending-judge) |
|
|
41
|
-
| 4 | CLAUDE.md 完整性/行数 → 超限
|
|
41
|
+
| 4 | CLAUDE.md 完整性/行数 → 超限 blocking user confirmation 瘦身 |
|
|
42
42
|
| 5 | AGENTS.md 与各 Agent 指令入口一致;Claude Code 启用时验证 CLAUDE.md 引用 AGENTS.md,禁止反向循环引用 |
|
|
43
43
|
| 6 | `.harness/` 结构(init 规程 → `reference.md` 第 6 步);已装 skill 新鲜度只经 `hunter-harness refresh --dry-run --json` 的 post-adaptation freshness 判断,禁止 raw build 字节比较 |
|
|
44
44
|
| 7–9 | `项目规则(见 .harness/context-index.json)/`、构建配置、测试目录 — **只提示不自动修复** |
|
|
@@ -50,6 +50,7 @@ python <skills-root>/scripts/harness_sync.py finalize --project . --run-id <run-
|
|
|
50
50
|
- 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
|
|
51
51
|
- 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
|
|
52
52
|
- 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
|
|
53
|
+
> 片段:p0-trust
|
|
53
54
|
|
|
54
55
|
## 关键规则
|
|
55
56
|
|
|
@@ -80,3 +81,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
80
81
|
> **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 边界保持最新。
|
|
81
82
|
|
|
82
83
|
每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
|
|
84
|
+
> 片段:logging · phase=`sync`;有未归档变更时写入其 change-dir events
|
|
@@ -58,7 +58,7 @@ powershell.exe -Command "git -C '<项目路径>' diff --stat HEAD~5 2>$null"
|
|
|
58
58
|
|
|
59
59
|
**瘦身策略**:如果超过 200 行,不是简单截断——而是把可独立成篇的细节(如完整编码规范、详细架构图)迁移到 `项目规则(见 .harness/context-index.json)/` 下,CLAUDE.md 保留简洁的索引和关键命令。
|
|
60
60
|
|
|
61
|
-
> ⚠️ CLAUDE.md 需要瘦身时,必须用
|
|
61
|
+
> ⚠️ CLAUDE.md 需要瘦身时,必须用 blocking user confirmation 与用户确认拆分方案后再执行。
|
|
62
62
|
|
|
63
63
|
### 5. AGENTS.md 一致性
|
|
64
64
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: harness-test
|
|
3
3
|
description: 测试执行:读取场景表,执行单元测试+API接口测试+数据兼容验证,输出测试报告。当用户说'跑测试/验证/跑用例/接口测试/单元测试'时使用
|
|
4
4
|
---
|
|
5
|
-
<!-- generated by harness_deploy.py; core=
|
|
5
|
+
<!-- generated by harness_deploy.py; core=6a9274f7a054dc17; overlay=java; agent=codex; do not edit -->
|
|
6
6
|
# harness-test — 测试执行
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -39,6 +39,7 @@ description: 测试执行:读取场景表,执行单元测试+API接口测试
|
|
|
39
39
|
9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit> --json`;`changedSegments=[]` 时复用已有 profile/rules/map/knowledge/change/code 指纹,不再重复跑全量 `harness-sync`、知识重建或代码库扫描。只有对应 segment 变化或缺失时才定向刷新;快照不能替代源码读取和验证门禁。
|
|
40
40
|
|
|
41
41
|
状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
|
|
42
|
+
> 片段:read-protocol
|
|
42
43
|
|
|
43
44
|
## Workflow
|
|
44
45
|
|
|
@@ -95,12 +96,13 @@ description: 测试执行:读取场景表,执行单元测试+API接口测试
|
|
|
95
96
|
- **runtime overlay**:`-Dspring.config.additional-location=file:<ascii-abs-path>/application-harness-test.yml`;禁止默认 Edit tracked `application*.yml`
|
|
96
97
|
- **known-good-test-profile**:profile 名、baseURL、healthUrl 写在 build-profile,非 skill 硬编码
|
|
97
98
|
- **多租户请求头**:header 名/值来自 build-profile 的 `httpHeaders` 配置
|
|
98
|
-
- **Service Gate**:`harness_service.py ensure` 返回 `needs-user-decision`(用户进程占端口)时**才**
|
|
99
|
+
- **Service Gate**:`harness_service.py ensure` 返回 `needs-user-decision`(用户进程占端口)时**才** blocking user confirmation
|
|
99
100
|
## P0 执行可信度规则
|
|
100
101
|
|
|
101
102
|
- 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
|
|
102
103
|
- 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
|
|
103
104
|
- 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
|
|
105
|
+
> 片段:p0-trust
|
|
104
106
|
|
|
105
107
|
## 关键规则(硬门禁速查)
|
|
106
108
|
|
|
@@ -140,11 +142,11 @@ python <skills-root>/scripts/harness_test_guard.py record --project . --change-d
|
|
|
140
142
|
|
|
141
143
|
### 六、服务启动 + 生命周期管理
|
|
142
144
|
|
|
143
|
-
启动等待状态机:0–30s 每 2s 探测、30–120s 每 5s 探测、>120s 读日志判定;遇启动失败特征立即停。**Service Gate**:`harness_service.py ensure` 返回 `action=needs-user-decision`(用户自启服务占端口)时 **才**
|
|
145
|
+
启动等待状态机:0–30s 每 2s 探测、30–120s 每 5s 探测、>120s 读日志判定;遇启动失败特征立即停。**Service Gate**:`harness_service.py ensure` 返回 `action=needs-user-decision`(用户自启服务占端口)时 **才** blocking user confirmation;AI 托管服务或端口空闲则自动继续,不询问。服务指纹(`moduleInputsHash`,来自 CLI `--files` ∪ `serviceStart.inputFiles`)+ `startCommandHash` + `profile` + `overlayPath` + 进程身份任一变化即 restart;**空输入被拒绝**,不生成可复用空指纹。测试结束默认清理 AI 启动的服务。详见 `reference.md`「服务决策门」。
|
|
144
146
|
|
|
145
147
|
### 七、运行时配置叠加(不动 tracked 配置)
|
|
146
148
|
|
|
147
|
-
禁止默认 Edit tracked 应用配置文件。默认运行时配置叠加(ASCII 绝对路径);改 tracked 配置 → 默认拒绝,记 `decision` 事件(不
|
|
149
|
+
禁止默认 Edit tracked 应用配置文件。默认运行时配置叠加(ASCII 绝对路径);改 tracked 配置 → 默认拒绝,记 `decision` 事件(不 blocking user confirmation,报告 🟡 WARN)。详见 `reference.md`。
|
|
148
150
|
|
|
149
151
|
### 八、Token 缓存与复用
|
|
150
152
|
|
|
@@ -176,7 +178,7 @@ python <skills-root>/scripts/harness_test_guard.py record --project . --change-d
|
|
|
176
178
|
|
|
177
179
|
## 交互白名单
|
|
178
180
|
|
|
179
|
-
本 skill **仅允许**以下
|
|
181
|
+
本 skill **仅允许**以下 blocking user confirmation;其余默认值 + `decision` 事件:
|
|
180
182
|
|
|
181
183
|
1. **Service Gate**:仅当 `harness_service.py ensure` 返回 `needs-user-decision`(用户进程占端口)时询问处理方式
|
|
182
184
|
|
|
@@ -193,3 +195,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
193
195
|
> **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 边界保持最新。
|
|
194
196
|
|
|
195
197
|
每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
|
|
198
|
+
> 片段:logging · phase=`test` · 事件:phase/command/verification/decision/issue/artifact
|
|
@@ -191,7 +191,7 @@ $cred = $resp.data.accessToken
|
|
|
191
191
|
**严重度**:🟡WARN
|
|
192
192
|
**场景**:测试期间为了切换外部服务配置直接 Edit tracked 配置文件(如 `application-local-dev.yml`),测试后再还原,留下 diff 噪声
|
|
193
193
|
**后果**:git diff --stat 出现意外文件、提交风险、误以为有业务变更
|
|
194
|
-
**正确做法**:生成运行时配置叠加 `.harness/changes/<change>/runtime/application-harness-test.yml`(不提交),启动用 `-Dspring.config.additional-location=file:...` 叠加(按技术栈);如必须改 tracked 配置,先
|
|
194
|
+
**正确做法**:生成运行时配置叠加 `.harness/changes/<change>/runtime/application-harness-test.yml`(不提交),启动用 `-Dspring.config.additional-location=file:...` 叠加(按技术栈);如必须改 tracked 配置,先 blocking user confirmation,最终报告至少 🟡 WARN
|
|
195
195
|
|
|
196
196
|
### 规则 22:唯一约束字段与本地预存数据冲突
|
|
197
197
|
**严重度**:❌FAIL
|
|
@@ -151,7 +151,7 @@ spring:
|
|
|
151
151
|
powershell.exe -NoProfile -Command "mvn spring-boot:run -pl <module-from-build-profile> -Dspring-boot.run.profiles=local-dev -Dspring-boot.run.jvmArguments='-Dspring.config.additional-location=file:C:/temp/harness-test-overlay/<change-name>/application-harness-test.yml'"
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
不得默认使用 `.harness/changes/<change>/runtime/application-harness-test.yml` 相对路径作为 JVM `additional-location`。如必须修改 tracked yml,先
|
|
154
|
+
不得默认使用 `.harness/changes/<change>/runtime/application-harness-test.yml` 相对路径作为 JVM `additional-location`。如必须修改 tracked yml,先 blocking user confirmation,最终报告至少 🟡 WARN。
|
|
155
155
|
|
|
156
156
|
## Service Decision Gate 与服务生命周期管理
|
|
157
157
|
|