@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
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Controlled cleanup helper for test fixtures (retro §5.23).
|
|
3
|
+
|
|
4
|
+
Provides a host-policy-friendly entry point for removing gitignored test
|
|
5
|
+
fixtures (e.g. .pytest_data) within an execution root. Performs realpath
|
|
6
|
+
containment, rejects symlink/reparse escapes, lists exact counts before
|
|
7
|
+
deletion, and outputs a structured receipt.
|
|
8
|
+
"""
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import argparse
|
|
12
|
+
import json
|
|
13
|
+
import os
|
|
14
|
+
import shutil
|
|
15
|
+
import sys
|
|
16
|
+
from pathlib import Path
|
|
17
|
+
from typing import Any
|
|
18
|
+
|
|
19
|
+
if hasattr(sys.stdout, "reconfigure"):
|
|
20
|
+
sys.stdout.reconfigure(encoding="utf-8")
|
|
21
|
+
if hasattr(sys.stderr, "reconfigure"):
|
|
22
|
+
sys.stderr.reconfigure(encoding="utf-8")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _resolve_within(execution_root: Path, rel: str) -> Path | None:
|
|
26
|
+
"""Resolve rel under execution_root, rejecting escapes and symlinks."""
|
|
27
|
+
if not rel or rel.startswith("/"):
|
|
28
|
+
return None
|
|
29
|
+
# Reject absolute paths (Windows drive letter or POSIX).
|
|
30
|
+
if len(rel) >= 2 and rel[1] == ":":
|
|
31
|
+
return None
|
|
32
|
+
parts = rel.replace("\\", "/").split("/")
|
|
33
|
+
if ".." in parts:
|
|
34
|
+
return None
|
|
35
|
+
candidate = (execution_root / rel).resolve(strict=False)
|
|
36
|
+
# Containment check: candidate must be under execution_root.
|
|
37
|
+
try:
|
|
38
|
+
candidate.relative_to(execution_root.resolve(strict=False))
|
|
39
|
+
except ValueError:
|
|
40
|
+
return None
|
|
41
|
+
# Reject symlink/reparse escape: if the path is a symlink, check its target.
|
|
42
|
+
if candidate.is_symlink():
|
|
43
|
+
target = Path(os.readlink(candidate)).resolve(strict=False)
|
|
44
|
+
try:
|
|
45
|
+
target.relative_to(execution_root.resolve(strict=False))
|
|
46
|
+
except ValueError:
|
|
47
|
+
return None
|
|
48
|
+
# Even if target is inside, a symlinked cleanup root is suspicious;
|
|
49
|
+
# reject to avoid following links into unexpected locations.
|
|
50
|
+
return None
|
|
51
|
+
return candidate
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def _count_files(root: Path) -> tuple[int, int]:
|
|
55
|
+
"""Count files and total bytes under root."""
|
|
56
|
+
count = 0
|
|
57
|
+
total = 0
|
|
58
|
+
for dirpath, _dirs, files in os.walk(root):
|
|
59
|
+
for name in files:
|
|
60
|
+
fp = Path(dirpath) / name
|
|
61
|
+
try:
|
|
62
|
+
total += fp.stat().st_size
|
|
63
|
+
count += 1
|
|
64
|
+
except OSError:
|
|
65
|
+
continue
|
|
66
|
+
return count, total
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def cleanup(execution_root: Path, cleanup_roots: list[str]) -> dict[str, Any]:
|
|
70
|
+
"""Remove allowlisted cleanup roots within execution_root.
|
|
71
|
+
|
|
72
|
+
Returns a structured receipt. Any path escape, symlink escape, or
|
|
73
|
+
unallowed root results in ok=false with zero files removed.
|
|
74
|
+
"""
|
|
75
|
+
execution_root = Path(execution_root).resolve(strict=False)
|
|
76
|
+
if not execution_root.is_dir():
|
|
77
|
+
return {
|
|
78
|
+
"ok": False,
|
|
79
|
+
"code": "EXECUTION_ROOT_MISSING",
|
|
80
|
+
"executionRoot": str(execution_root),
|
|
81
|
+
"removedFiles": 0,
|
|
82
|
+
"removedBytes": 0,
|
|
83
|
+
"rejectedEscapes": [],
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
rejected: list[dict[str, str]] = []
|
|
87
|
+
removed_files = 0
|
|
88
|
+
removed_bytes = 0
|
|
89
|
+
cleaned: list[str] = []
|
|
90
|
+
|
|
91
|
+
for rel in cleanup_roots:
|
|
92
|
+
target = _resolve_within(execution_root, rel)
|
|
93
|
+
if target is None:
|
|
94
|
+
rejected.append({"path": rel, "reason": "PATH_ESCAPE_REJECTED"})
|
|
95
|
+
continue
|
|
96
|
+
if not target.exists():
|
|
97
|
+
# Already absent — idempotent reentry.
|
|
98
|
+
continue
|
|
99
|
+
# Re-check symlink after resolution (the parent might be a symlink).
|
|
100
|
+
if target.is_symlink():
|
|
101
|
+
rejected.append({"path": rel, "reason": "SYMLINK_ESCAPE_REJECTED"})
|
|
102
|
+
continue
|
|
103
|
+
# Count before deletion for the receipt.
|
|
104
|
+
try:
|
|
105
|
+
count, total = _count_files(target)
|
|
106
|
+
except OSError:
|
|
107
|
+
count, total = 0, 0
|
|
108
|
+
# Delete.
|
|
109
|
+
try:
|
|
110
|
+
shutil.rmtree(target)
|
|
111
|
+
except OSError as exc:
|
|
112
|
+
rejected.append({"path": rel, "reason": f"DELETE_FAILED: {exc}"})
|
|
113
|
+
continue
|
|
114
|
+
removed_files += count
|
|
115
|
+
removed_bytes += total
|
|
116
|
+
cleaned.append(rel)
|
|
117
|
+
|
|
118
|
+
if rejected:
|
|
119
|
+
return {
|
|
120
|
+
"ok": False,
|
|
121
|
+
"code": rejected[0]["reason"],
|
|
122
|
+
"executionRoot": str(execution_root),
|
|
123
|
+
"removedFiles": removed_files,
|
|
124
|
+
"removedBytes": removed_bytes,
|
|
125
|
+
"rejectedEscapes": rejected,
|
|
126
|
+
"cleaned": cleaned,
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if removed_files == 0 and not cleaned:
|
|
130
|
+
return {
|
|
131
|
+
"ok": True,
|
|
132
|
+
"code": "ALREADY_ABSENT",
|
|
133
|
+
"executionRoot": str(execution_root),
|
|
134
|
+
"removedFiles": 0,
|
|
135
|
+
"removedBytes": 0,
|
|
136
|
+
"rejectedEscapes": [],
|
|
137
|
+
"cleaned": [],
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return {
|
|
141
|
+
"ok": True,
|
|
142
|
+
"code": "CLEANUP_COMPLETE",
|
|
143
|
+
"executionRoot": str(execution_root),
|
|
144
|
+
"removedFiles": removed_files,
|
|
145
|
+
"removedBytes": removed_bytes,
|
|
146
|
+
"rejectedEscapes": [],
|
|
147
|
+
"cleaned": cleaned,
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def main(argv: list[str] | None = None) -> int:
|
|
152
|
+
parser = argparse.ArgumentParser(description=__doc__)
|
|
153
|
+
sub = parser.add_subparsers(dest="action", required=True)
|
|
154
|
+
clean_parser = sub.add_parser("cleanup")
|
|
155
|
+
clean_parser.add_argument("--execution-root", required=True)
|
|
156
|
+
clean_parser.add_argument("--cleanup-roots", required=True, help="JSON array of relative paths")
|
|
157
|
+
clean_parser.add_argument("--json", action="store_true")
|
|
158
|
+
args = parser.parse_args(argv)
|
|
159
|
+
|
|
160
|
+
try:
|
|
161
|
+
roots = json.loads(args.cleanup_roots)
|
|
162
|
+
if not isinstance(roots, list):
|
|
163
|
+
raise ValueError("cleanup-roots must be a JSON array")
|
|
164
|
+
except (json.JSONDecodeError, ValueError) as exc:
|
|
165
|
+
result = {"ok": False, "code": "INVALID_CLEANUP_ROOTS", "error": str(exc)}
|
|
166
|
+
print(json.dumps(result, ensure_ascii=False, indent=2))
|
|
167
|
+
return 1
|
|
168
|
+
|
|
169
|
+
result = cleanup(Path(args.execution_root), roots)
|
|
170
|
+
print(json.dumps(result, ensure_ascii=False, indent=2 if args.json else None))
|
|
171
|
+
return 0 if result["ok"] else 1
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
if __name__ == "__main__":
|
|
175
|
+
raise SystemExit(main())
|
|
@@ -53,9 +53,22 @@ _Avoid_: 仅凭 diffHash 复用, 无证据跳过
|
|
|
53
53
|
_Avoid_: 每轮测试后必杀服务
|
|
54
54
|
|
|
55
55
|
**交互白名单**:
|
|
56
|
-
每个 skill 显式声明的允许
|
|
56
|
+
每个 skill 显式声明的允许 `blocking user confirmation` 场景清单。白名单外一律取默认值并记 decision 事件。
|
|
57
57
|
_Avoid_: 逐决策点询问
|
|
58
58
|
|
|
59
|
+
**阻断式用户确认(blocking user confirmation)**:
|
|
60
|
+
宿主无关的审批原语。canonical skill 使用此术语表达"展示完整审批包并等待明确答复"的语义,不绑定具体宿主工具。adapter 按下表映射到宿主具体工具:
|
|
61
|
+
|
|
62
|
+
| Adapter | 工具 |
|
|
63
|
+
|---------|------|
|
|
64
|
+
| claude-code | AskUserQuestion |
|
|
65
|
+
| codebuddy | AskUserQuestion |
|
|
66
|
+
| codex | request_user_input 或普通对话 |
|
|
67
|
+
| cursor | 普通对话 |
|
|
68
|
+
|
|
69
|
+
finalizer 只校验 approval receipt/decision 的顺序和内容,不校验交互工具品牌。
|
|
70
|
+
_Avoid_: 硬编码宿主工具名, 跨宿主不可移植
|
|
71
|
+
|
|
59
72
|
**部署合成**:
|
|
60
73
|
`harness_deploy.py build` 把通用核心 + shared 片段 + overlay 合成为自包含 SKILL.md 后部署。Vault 源头 DRY,运行时单文件。
|
|
61
74
|
_Avoid_: 运行时跨文件拼规则, fork 维护
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
| harness-knowledge-query | `[Bash(powershell.exe:*), Read, Write, Edit, Glob, Grep]` | 同上 |
|
|
60
60
|
| harness-knowledge-ingest | `[Bash(powershell.exe:*), Read, Write, Edit, Glob, Grep]` | 同上 |
|
|
61
61
|
|
|
62
|
-
> **
|
|
62
|
+
> **blocking user confirmation 不预批准**:各 skill 需要向用户确认时通过普通权限提示调用 `blocking user confirmation`(adapter 映射到 `AskUserQuestion`/`request_user_input`/普通对话),不在 `allowed-tools` 中预批准(遵循 skill-optimizer 规则)。`harness-codebase-map` 额外预批准 `Agent` 用于派发并行 mapper。
|
|
63
63
|
|
|
64
64
|
> **codegraph 命令**:原 `Bash(codegraph *)` 改为 MCP 工具调用(`mcp__codegraph__codegraph_explore` 等),不再通过 Bash。
|
|
65
65
|
>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: harness-apidoc
|
|
3
3
|
description: 从 Java 后端代码生成结构化前端 API 文档(Controller/VO/ErrorCode)。使用场景:接口文档、前端接口文档、API 文档生成
|
|
4
4
|
---
|
|
5
|
-
<!-- generated by harness_deploy.py; core=
|
|
5
|
+
<!-- generated by harness_deploy.py; core=609f851f4d9d2c14; overlay=java; agent=cursor; do not edit -->
|
|
6
6
|
# harness-apidoc — 前端接口文档(Java overlay)
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -27,6 +27,7 @@ description: 从 Java 后端代码生成结构化前端 API 文档(Controller/
|
|
|
27
27
|
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 变化或缺失时才定向刷新;快照不能替代源码读取和验证门禁。
|
|
28
28
|
|
|
29
29
|
状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
|
|
30
|
+
> 片段:read-protocol
|
|
30
31
|
|
|
31
32
|
## Workflow
|
|
32
33
|
|
|
@@ -52,6 +53,7 @@ description: 从 Java 后端代码生成结构化前端 API 文档(Controller/
|
|
|
52
53
|
- 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
|
|
53
54
|
- 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
|
|
54
55
|
- 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
|
|
56
|
+
> 片段:p0-trust
|
|
55
57
|
|
|
56
58
|
## 渐进披露
|
|
57
59
|
|
|
@@ -60,7 +62,7 @@ description: 从 Java 后端代码生成结构化前端 API 文档(Controller/
|
|
|
60
62
|
|
|
61
63
|
## 交互白名单
|
|
62
64
|
|
|
63
|
-
**无**
|
|
65
|
+
**无** blocking user confirmation;缺输入记 `issue`。
|
|
64
66
|
|
|
65
67
|
## 执行日志
|
|
66
68
|
|
|
@@ -75,3 +77,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
75
77
|
> **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 边界保持最新。
|
|
76
78
|
|
|
77
79
|
每次阶段结束必须写 `--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` 环境变量统一注入。
|
|
80
|
+
> 片段:logging · phase=`apidoc`
|
|
@@ -3,7 +3,7 @@ name: harness-archive
|
|
|
3
3
|
description: 归档所有变更产出(计划/测试报告/审查/SQL/API文档)到
|
|
4
4
|
.harness/archive/,含归档元数据和可视化最终总结。使用场景:归档、完成归档、收尾、打包产出物
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=609f851f4d9d2c14; overlay=java; agent=cursor; do not edit -->
|
|
7
7
|
# harness-archive — 变更归档
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -52,6 +52,7 @@ description: 归档所有变更产出(计划/测试报告/审查/SQL/API文档
|
|
|
52
52
|
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 变化或缺失时才定向刷新;快照不能替代源码读取和验证门禁。
|
|
53
53
|
|
|
54
54
|
状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
|
|
55
|
+
> 片段:read-protocol
|
|
55
56
|
|
|
56
57
|
## Workflow
|
|
57
58
|
|
|
@@ -79,7 +80,7 @@ description: 归档所有变更产出(计划/测试报告/审查/SQL/API文档
|
|
|
79
80
|
|
|
80
81
|
### Phase 2:确认归档 ⚠️ 强制阻断
|
|
81
82
|
|
|
82
|
-
|
|
83
|
+
blocking user confirmation 让用户确认归档操作。**用户拒绝 → 终止流程,不执行任何操作。**
|
|
83
84
|
|
|
84
85
|
- **Read `reference.md`** — 确认对话框的内容格式
|
|
85
86
|
|
|
@@ -104,6 +105,7 @@ AskUserQuestion 让用户确认归档操作。**用户拒绝 → 终止流程,
|
|
|
104
105
|
- 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
|
|
105
106
|
- 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
|
|
106
107
|
- 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
|
|
108
|
+
> 片段:p0-trust
|
|
107
109
|
|
|
108
110
|
## 关键规则(硬门禁速查)
|
|
109
111
|
|
|
@@ -115,7 +117,7 @@ AskUserQuestion 让用户确认归档操作。**用户拒绝 → 终止流程,
|
|
|
115
117
|
|
|
116
118
|
### 二、归档前确认是强制阻断检查点
|
|
117
119
|
|
|
118
|
-
|
|
120
|
+
blocking user confirmation 确认;用户拒绝 → 终止,不执行任何操作。
|
|
119
121
|
|
|
120
122
|
### 三、文件移动只用内置工具或 PowerShell
|
|
121
123
|
|
|
@@ -184,7 +186,7 @@ git 命令通过 `powershell.exe -Command "..."` 执行;archive-meta.md 和 fi
|
|
|
184
186
|
|
|
185
187
|
## 交互白名单
|
|
186
188
|
|
|
187
|
-
**仅允许**归档确认(Phase 2
|
|
189
|
+
**仅允许**归档确认(Phase 2 blocking user confirmation);拒绝 → 终止,不执行任何移动。
|
|
188
190
|
|
|
189
191
|
## 执行日志
|
|
190
192
|
|
|
@@ -199,3 +201,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
199
201
|
> **Task 4 §6.1 写入契约**:普通 `append` = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex` 无需去重扫描)。仅 `--type phase.end` append 在追加成功后渲染一次 `execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。高频 command append 期间 log 可能滞后,phase 边界保持最新。
|
|
200
202
|
|
|
201
203
|
每次阶段结束必须写 `--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` 环境变量统一注入。
|
|
204
|
+
> 片段:logging · phase=`archive`
|
|
@@ -8,7 +8,7 @@ description: harness-archive 的归档流程、manifest、summary-data、final-s
|
|
|
8
8
|
|
|
9
9
|
- **Phase 0 读取上下文**:读 SKILL.md / 本文件 / 共用协议(`../protocols/archive-report-protocol.md`、`../protocols/report-pipeline-protocol.md`、`../protocols/state-layout-protocol.md`、`../protocols/powershell-protocol.md`、`../protocols/sensitive-info-protocol.md`、`../protocols/evidence-based-reporting-protocol.md`)/ 解析 `$ARGUMENTS`。
|
|
10
10
|
- **Phase 1 确认归档对象**:Glob `.harness/changes/*/plans/*-plan.md`(排除 archive),展示概要;多变更让用户选择或终止。
|
|
11
|
-
- **Phase 2 确认归档(强制阻断)**:
|
|
11
|
+
- **Phase 2 确认归档(强制阻断)**:blocking user confirmation 确认,拒绝即终止。
|
|
12
12
|
- **Phase 3 执行归档**:
|
|
13
13
|
1. 运行 `python <skills-root>/scripts/harness_archive.py status --change-dir ... --json` 做前置检查。
|
|
14
14
|
2. `meta/archive-meta.md` 由 finalize 生成(与 summary `finalStatus` 同源);禁止手写。维护者结论写入 events 即可。finalize 在 before-manifest 前执行 cleanup(删除 lock/pid/launcher/credential,截断超大日志)。
|
|
@@ -3,7 +3,7 @@ name: harness-codebase-map
|
|
|
3
3
|
description: 分析现有代码库并生成 .harness/codebase/map/
|
|
4
4
|
下的结构化代码库地图。用于陌生项目理解、重大改造前梳理、harness-sync 提示 map 过期后的人工刷新。
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=609f851f4d9d2c14; overlay=java; agent=cursor; do not edit -->
|
|
7
7
|
# harness-codebase-map — 代码库地图
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -56,6 +56,7 @@ description: 分析现有代码库并生成 .harness/codebase/map/
|
|
|
56
56
|
- 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
|
|
57
57
|
- 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
|
|
58
58
|
- 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
|
|
59
|
+
> 片段:p0-trust · map 额外:文件存在/行数/hash 为证据
|
|
59
60
|
|
|
60
61
|
## 关键规则
|
|
61
62
|
|
|
@@ -81,7 +82,7 @@ description: 分析现有代码库并生成 .harness/codebase/map/
|
|
|
81
82
|
|
|
82
83
|
## 交互白名单
|
|
83
84
|
|
|
84
|
-
**无**
|
|
85
|
+
**无** blocking user confirmation;参数/默认值 + `decision` 事件
|
|
85
86
|
|
|
86
87
|
## 执行日志
|
|
87
88
|
|
|
@@ -96,3 +97,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
96
97
|
> **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 边界保持最新。
|
|
97
98
|
|
|
98
99
|
每次阶段结束必须写 `--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` 环境变量统一注入。
|
|
100
|
+
> 片段:logging · phase=`codebase-map`;默认写 reports,有未归档变更时另写 change events
|
|
@@ -3,7 +3,7 @@ name: harness-knowledge-ingest
|
|
|
3
3
|
description: 从 .harness/archive 归档整理、同步和维护项目知识索引。适用场景:ingest knowledge、sync
|
|
4
4
|
knowledge、rebuild knowledge index、promote knowledge、确认知识条目、检查知识库是否过期。
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=609f851f4d9d2c14; overlay=java; agent=cursor; do not edit -->
|
|
7
7
|
# harness-knowledge-ingest
|
|
8
8
|
|
|
9
9
|
从 `.harness/archive/**/reports/final/summary-data.json` 抽取项目知识,生成并维护本地 `.harness/knowledge/` 索引。
|
|
@@ -211,6 +211,7 @@ powershell.exe -Command "python '<skill-dir>\scripts\harness_knowledge.py' sync
|
|
|
211
211
|
- 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
|
|
212
212
|
- 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
|
|
213
213
|
- 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
|
|
214
|
+
> 片段:p0-trust · ingest/sync 须绑定 `upToDate`/产物路径证据
|
|
214
215
|
|
|
215
216
|
## Output Format
|
|
216
217
|
|
|
@@ -230,7 +231,7 @@ powershell.exe -Command "python '<skill-dir>\scripts\harness_knowledge.py' sync
|
|
|
230
231
|
|
|
231
232
|
## 交互白名单
|
|
232
233
|
|
|
233
|
-
**仅当** `.harness/config/harness.json` 中 `knowledge.manualReview=true` 时,promote/demote 高价值条目需
|
|
234
|
+
**仅当** `.harness/config/harness.json` 中 `knowledge.manualReview=true` 时,promote/demote 高价值条目需 blocking user confirmation;否则按 skill 默认策略 + `decision` 事件。
|
|
234
235
|
|
|
235
236
|
## 执行日志
|
|
236
237
|
|
|
@@ -245,3 +246,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
|
|
|
245
246
|
> **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 边界保持最新。
|
|
246
247
|
|
|
247
248
|
每次阶段结束必须写 `--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` 环境变量统一注入。
|
|
249
|
+
> 片段:logging · phase=`knowledge-ingest` · 默认控制台报告;变更上下文写 phase/decision/issue/artifact
|
|
@@ -4552,6 +4552,11 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
4552
4552
|
query.add_argument("--status", action="append", dest="statuses", default=[], help="Only return entries with this lifecycle status")
|
|
4553
4553
|
query.add_argument("--type", action="append", dest="types", default=[], help="Only return entries of this knowledge type")
|
|
4554
4554
|
query.add_argument("--change", default=None, help="Write a change-scoped knowledge-context pointer")
|
|
4555
|
+
query.add_argument(
|
|
4556
|
+
"--verbose",
|
|
4557
|
+
action="store_true",
|
|
4558
|
+
help="Emit full payload including matches array (default: compact output for host decisioning)",
|
|
4559
|
+
)
|
|
4555
4560
|
|
|
4556
4561
|
promote = sub.add_parser("promote", help="Promote a candidate knowledge entry to active")
|
|
4557
4562
|
promote.add_argument("--project", default=".", help="Project root containing .harness/knowledge")
|
|
@@ -4652,7 +4657,17 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
4652
4657
|
Path(args.project), args.query, args.limit, args.files, args.statuses,
|
|
4653
4658
|
args.types, args.change,
|
|
4654
4659
|
)
|
|
4655
|
-
|
|
4660
|
+
if getattr(args, "verbose", False):
|
|
4661
|
+
print(json.dumps(result, ensure_ascii=False, indent=2))
|
|
4662
|
+
else:
|
|
4663
|
+
# C5: compact output — omit matches array; host reads context pack for details.
|
|
4664
|
+
compact = {
|
|
4665
|
+
"query": result["query"],
|
|
4666
|
+
"matchCount": result["matchCount"],
|
|
4667
|
+
"contextPack": result["contextPack"],
|
|
4668
|
+
"planInput": result["planInput"],
|
|
4669
|
+
}
|
|
4670
|
+
print(json.dumps(compact, ensure_ascii=False, indent=2))
|
|
4656
4671
|
return 0
|
|
4657
4672
|
if args.command == "promote":
|
|
4658
4673
|
try:
|
|
@@ -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=609f851f4d9d2c14; overlay=java; agent=cursor; 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=609f851f4d9d2c14; overlay=java; agent=cursor; 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=609f851f4d9d2c14; overlay=java; agent=cursor; 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 未参与规划,破除确认偏误)
|