@hunter-harness/workflow-harness 0.2.59 → 0.2.61
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/README.md +14 -16
- package/harness/bundles/general/claude-code/harness-archive/SKILL.md +43 -46
- package/harness/bundles/general/claude-code/harness-archive/checklist.md +10 -10
- package/harness/bundles/general/claude-code/harness-archive/reference.md +29 -22
- package/harness/bundles/general/claude-code/harness-archive/templates/summary-data-template.json +1 -7
- package/harness/bundles/general/claude-code/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-plan/SKILL.md +4 -4
- package/harness/bundles/general/claude-code/harness-review/SKILL.md +2 -2
- package/harness/bundles/general/claude-code/harness-run/SKILL.md +5 -3
- package/harness/bundles/general/claude-code/harness-run/checklist.md +10 -9
- package/harness/bundles/general/claude-code/harness-run/protocols.md +2 -0
- package/harness/bundles/general/claude-code/harness-run/reference.md +19 -16
- package/harness/bundles/general/claude-code/harness-submit/SKILL.md +2 -2
- package/harness/bundles/general/claude-code/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-test/SKILL.md +2 -2
- package/harness/bundles/general/claude-code/harness-test/checklist.md +2 -2
- package/harness/bundles/general/claude-code/harness-test/pitfalls.md +3 -3
- package/harness/bundles/general/claude-code/harness-test/reference.md +2 -2
- package/harness/bundles/general/claude-code/protocols/archive-report-protocol.md +18 -25
- package/harness/bundles/general/claude-code/protocols/evidence-based-reporting-protocol.md +5 -5
- package/harness/bundles/general/claude-code/protocols/ledger-protocol.md +7 -7
- package/harness/bundles/general/claude-code/protocols/report-pipeline-protocol.md +10 -9
- package/harness/bundles/general/claude-code/protocols/sensitive-info-protocol.md +3 -3
- package/harness/bundles/general/claude-code/protocols/state-layout-protocol.md +5 -6
- package/harness/bundles/general/claude-code/scripts/harness_archive.py +1043 -1108
- package/harness/bundles/general/claude-code/scripts/harness_context.py +8 -2
- package/harness/bundles/general/claude-code/scripts/harness_events.py +5 -0
- package/harness/bundles/general/claude-code/scripts/harness_ledger.py +79 -2
- package/harness/bundles/general/claude-code/scripts/harness_profile.py +7 -0
- package/harness/bundles/general/claude-code/scripts/harness_state.py +22 -3
- package/harness/bundles/general/codebuddy/.harness-build.json +1 -1
- package/harness/bundles/general/codebuddy/README.md +14 -16
- package/harness/bundles/general/codebuddy/harness-archive/SKILL.md +43 -46
- package/harness/bundles/general/codebuddy/harness-archive/checklist.md +10 -10
- package/harness/bundles/general/codebuddy/harness-archive/reference.md +29 -22
- package/harness/bundles/general/codebuddy/harness-archive/templates/summary-data-template.json +1 -7
- package/harness/bundles/general/codebuddy/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-plan/SKILL.md +4 -4
- package/harness/bundles/general/codebuddy/harness-review/SKILL.md +2 -2
- package/harness/bundles/general/codebuddy/harness-run/SKILL.md +5 -3
- package/harness/bundles/general/codebuddy/harness-run/checklist.md +10 -9
- package/harness/bundles/general/codebuddy/harness-run/protocols.md +2 -0
- package/harness/bundles/general/codebuddy/harness-run/reference.md +19 -16
- package/harness/bundles/general/codebuddy/harness-submit/SKILL.md +2 -2
- package/harness/bundles/general/codebuddy/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-test/SKILL.md +2 -2
- package/harness/bundles/general/codebuddy/harness-test/checklist.md +2 -2
- package/harness/bundles/general/codebuddy/harness-test/pitfalls.md +3 -3
- package/harness/bundles/general/codebuddy/harness-test/reference.md +2 -2
- package/harness/bundles/general/codebuddy/protocols/archive-report-protocol.md +18 -25
- package/harness/bundles/general/codebuddy/protocols/evidence-based-reporting-protocol.md +5 -5
- package/harness/bundles/general/codebuddy/protocols/ledger-protocol.md +7 -7
- package/harness/bundles/general/codebuddy/protocols/report-pipeline-protocol.md +10 -9
- package/harness/bundles/general/codebuddy/protocols/sensitive-info-protocol.md +3 -3
- package/harness/bundles/general/codebuddy/protocols/state-layout-protocol.md +5 -6
- package/harness/bundles/general/codebuddy/scripts/harness_archive.py +1043 -1108
- package/harness/bundles/general/codebuddy/scripts/harness_context.py +8 -2
- package/harness/bundles/general/codebuddy/scripts/harness_events.py +5 -0
- package/harness/bundles/general/codebuddy/scripts/harness_ledger.py +79 -2
- package/harness/bundles/general/codebuddy/scripts/harness_profile.py +7 -0
- package/harness/bundles/general/codebuddy/scripts/harness_state.py +22 -3
- package/harness/bundles/general/codex/.harness-build.json +1 -1
- package/harness/bundles/general/codex/README.md +14 -16
- package/harness/bundles/general/codex/harness-archive/SKILL.md +43 -46
- package/harness/bundles/general/codex/harness-archive/checklist.md +10 -10
- package/harness/bundles/general/codex/harness-archive/reference.md +29 -22
- package/harness/bundles/general/codex/harness-archive/templates/summary-data-template.json +1 -7
- package/harness/bundles/general/codex/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-plan/SKILL.md +4 -4
- package/harness/bundles/general/codex/harness-review/SKILL.md +2 -2
- package/harness/bundles/general/codex/harness-run/SKILL.md +5 -3
- package/harness/bundles/general/codex/harness-run/checklist.md +10 -9
- package/harness/bundles/general/codex/harness-run/protocols.md +2 -0
- package/harness/bundles/general/codex/harness-run/reference.md +19 -16
- package/harness/bundles/general/codex/harness-submit/SKILL.md +2 -2
- package/harness/bundles/general/codex/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-test/SKILL.md +2 -2
- package/harness/bundles/general/codex/harness-test/checklist.md +2 -2
- package/harness/bundles/general/codex/harness-test/pitfalls.md +3 -3
- package/harness/bundles/general/codex/harness-test/reference.md +2 -2
- package/harness/bundles/general/codex/protocols/archive-report-protocol.md +18 -25
- package/harness/bundles/general/codex/protocols/evidence-based-reporting-protocol.md +5 -5
- package/harness/bundles/general/codex/protocols/ledger-protocol.md +7 -7
- package/harness/bundles/general/codex/protocols/report-pipeline-protocol.md +10 -9
- package/harness/bundles/general/codex/protocols/sensitive-info-protocol.md +3 -3
- package/harness/bundles/general/codex/protocols/state-layout-protocol.md +5 -6
- package/harness/bundles/general/codex/scripts/harness_archive.py +1043 -1108
- package/harness/bundles/general/codex/scripts/harness_context.py +8 -2
- package/harness/bundles/general/codex/scripts/harness_events.py +5 -0
- package/harness/bundles/general/codex/scripts/harness_ledger.py +79 -2
- package/harness/bundles/general/codex/scripts/harness_profile.py +7 -0
- package/harness/bundles/general/codex/scripts/harness_state.py +22 -3
- package/harness/bundles/general/cursor/.harness-build.json +1 -1
- package/harness/bundles/general/cursor/README.md +14 -16
- package/harness/bundles/general/cursor/harness-archive/SKILL.md +43 -46
- package/harness/bundles/general/cursor/harness-archive/checklist.md +10 -10
- package/harness/bundles/general/cursor/harness-archive/reference.md +29 -22
- package/harness/bundles/general/cursor/harness-archive/templates/summary-data-template.json +1 -7
- package/harness/bundles/general/cursor/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-plan/SKILL.md +4 -4
- package/harness/bundles/general/cursor/harness-review/SKILL.md +2 -2
- package/harness/bundles/general/cursor/harness-run/SKILL.md +5 -3
- package/harness/bundles/general/cursor/harness-run/checklist.md +10 -9
- package/harness/bundles/general/cursor/harness-run/protocols.md +2 -0
- package/harness/bundles/general/cursor/harness-run/reference.md +19 -16
- package/harness/bundles/general/cursor/harness-submit/SKILL.md +2 -2
- package/harness/bundles/general/cursor/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-test/SKILL.md +2 -2
- package/harness/bundles/general/cursor/harness-test/checklist.md +2 -2
- package/harness/bundles/general/cursor/harness-test/pitfalls.md +3 -3
- package/harness/bundles/general/cursor/harness-test/reference.md +2 -2
- package/harness/bundles/general/cursor/protocols/archive-report-protocol.md +18 -25
- package/harness/bundles/general/cursor/protocols/evidence-based-reporting-protocol.md +5 -5
- package/harness/bundles/general/cursor/protocols/ledger-protocol.md +7 -7
- package/harness/bundles/general/cursor/protocols/report-pipeline-protocol.md +10 -9
- package/harness/bundles/general/cursor/protocols/sensitive-info-protocol.md +3 -3
- package/harness/bundles/general/cursor/protocols/state-layout-protocol.md +5 -6
- package/harness/bundles/general/cursor/scripts/harness_archive.py +1043 -1108
- package/harness/bundles/general/cursor/scripts/harness_context.py +8 -2
- package/harness/bundles/general/cursor/scripts/harness_events.py +5 -0
- package/harness/bundles/general/cursor/scripts/harness_ledger.py +79 -2
- package/harness/bundles/general/cursor/scripts/harness_profile.py +7 -0
- package/harness/bundles/general/cursor/scripts/harness_state.py +22 -3
- package/harness/bundles/java/claude-code/.harness-build.json +1 -1
- package/harness/bundles/java/claude-code/README.md +14 -16
- package/harness/bundles/java/claude-code/harness-apidoc/SKILL.md +2 -2
- package/harness/bundles/java/claude-code/harness-archive/SKILL.md +43 -46
- package/harness/bundles/java/claude-code/harness-archive/checklist.md +10 -10
- package/harness/bundles/java/claude-code/harness-archive/reference.md +29 -22
- package/harness/bundles/java/claude-code/harness-archive/templates/summary-data-template.json +1 -7
- package/harness/bundles/java/claude-code/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-package/SKILL.md +2 -2
- package/harness/bundles/java/claude-code/harness-plan/SKILL.md +4 -4
- package/harness/bundles/java/claude-code/harness-review/SKILL.md +2 -2
- package/harness/bundles/java/claude-code/harness-run/SKILL.md +5 -3
- package/harness/bundles/java/claude-code/harness-run/protocols.md +2 -0
- package/harness/bundles/java/claude-code/harness-submit/SKILL.md +2 -2
- package/harness/bundles/java/claude-code/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-test/SKILL.md +2 -2
- package/harness/bundles/java/claude-code/harness-test/checklist.md +2 -2
- package/harness/bundles/java/claude-code/harness-test/pitfalls.md +3 -3
- package/harness/bundles/java/claude-code/harness-test/reference.md +2 -2
- package/harness/bundles/java/claude-code/protocols/archive-report-protocol.md +18 -25
- package/harness/bundles/java/claude-code/protocols/evidence-based-reporting-protocol.md +5 -5
- package/harness/bundles/java/claude-code/protocols/ledger-protocol.md +7 -7
- package/harness/bundles/java/claude-code/protocols/report-pipeline-protocol.md +10 -9
- package/harness/bundles/java/claude-code/protocols/sensitive-info-protocol.md +3 -3
- package/harness/bundles/java/claude-code/protocols/state-layout-protocol.md +5 -6
- package/harness/bundles/java/claude-code/scripts/harness_archive.py +1043 -1108
- package/harness/bundles/java/claude-code/scripts/harness_context.py +8 -2
- package/harness/bundles/java/claude-code/scripts/harness_events.py +5 -0
- package/harness/bundles/java/claude-code/scripts/harness_ledger.py +79 -2
- package/harness/bundles/java/claude-code/scripts/harness_profile.py +7 -0
- package/harness/bundles/java/claude-code/scripts/harness_state.py +22 -3
- package/harness/bundles/java/codebuddy/.harness-build.json +1 -1
- package/harness/bundles/java/codebuddy/README.md +14 -16
- package/harness/bundles/java/codebuddy/harness-apidoc/SKILL.md +2 -2
- package/harness/bundles/java/codebuddy/harness-archive/SKILL.md +43 -46
- package/harness/bundles/java/codebuddy/harness-archive/checklist.md +10 -10
- package/harness/bundles/java/codebuddy/harness-archive/reference.md +29 -22
- package/harness/bundles/java/codebuddy/harness-archive/templates/summary-data-template.json +1 -7
- package/harness/bundles/java/codebuddy/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-package/SKILL.md +2 -2
- package/harness/bundles/java/codebuddy/harness-plan/SKILL.md +4 -4
- package/harness/bundles/java/codebuddy/harness-review/SKILL.md +2 -2
- package/harness/bundles/java/codebuddy/harness-run/SKILL.md +5 -3
- package/harness/bundles/java/codebuddy/harness-run/protocols.md +2 -0
- package/harness/bundles/java/codebuddy/harness-submit/SKILL.md +2 -2
- package/harness/bundles/java/codebuddy/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-test/SKILL.md +2 -2
- package/harness/bundles/java/codebuddy/harness-test/checklist.md +2 -2
- package/harness/bundles/java/codebuddy/harness-test/pitfalls.md +3 -3
- package/harness/bundles/java/codebuddy/harness-test/reference.md +2 -2
- package/harness/bundles/java/codebuddy/protocols/archive-report-protocol.md +18 -25
- package/harness/bundles/java/codebuddy/protocols/evidence-based-reporting-protocol.md +5 -5
- package/harness/bundles/java/codebuddy/protocols/ledger-protocol.md +7 -7
- package/harness/bundles/java/codebuddy/protocols/report-pipeline-protocol.md +10 -9
- package/harness/bundles/java/codebuddy/protocols/sensitive-info-protocol.md +3 -3
- package/harness/bundles/java/codebuddy/protocols/state-layout-protocol.md +5 -6
- package/harness/bundles/java/codebuddy/scripts/harness_archive.py +1043 -1108
- package/harness/bundles/java/codebuddy/scripts/harness_context.py +8 -2
- package/harness/bundles/java/codebuddy/scripts/harness_events.py +5 -0
- package/harness/bundles/java/codebuddy/scripts/harness_ledger.py +79 -2
- package/harness/bundles/java/codebuddy/scripts/harness_profile.py +7 -0
- package/harness/bundles/java/codebuddy/scripts/harness_state.py +22 -3
- package/harness/bundles/java/codex/.harness-build.json +1 -1
- package/harness/bundles/java/codex/README.md +14 -16
- package/harness/bundles/java/codex/harness-apidoc/SKILL.md +2 -2
- package/harness/bundles/java/codex/harness-archive/SKILL.md +43 -46
- package/harness/bundles/java/codex/harness-archive/checklist.md +10 -10
- package/harness/bundles/java/codex/harness-archive/reference.md +29 -22
- package/harness/bundles/java/codex/harness-archive/templates/summary-data-template.json +1 -7
- package/harness/bundles/java/codex/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-package/SKILL.md +2 -2
- package/harness/bundles/java/codex/harness-plan/SKILL.md +4 -4
- package/harness/bundles/java/codex/harness-review/SKILL.md +2 -2
- package/harness/bundles/java/codex/harness-run/SKILL.md +5 -3
- package/harness/bundles/java/codex/harness-run/protocols.md +2 -0
- package/harness/bundles/java/codex/harness-submit/SKILL.md +2 -2
- package/harness/bundles/java/codex/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-test/SKILL.md +2 -2
- package/harness/bundles/java/codex/harness-test/checklist.md +2 -2
- package/harness/bundles/java/codex/harness-test/pitfalls.md +3 -3
- package/harness/bundles/java/codex/harness-test/reference.md +2 -2
- package/harness/bundles/java/codex/protocols/archive-report-protocol.md +18 -25
- package/harness/bundles/java/codex/protocols/evidence-based-reporting-protocol.md +5 -5
- package/harness/bundles/java/codex/protocols/ledger-protocol.md +7 -7
- package/harness/bundles/java/codex/protocols/report-pipeline-protocol.md +10 -9
- package/harness/bundles/java/codex/protocols/sensitive-info-protocol.md +3 -3
- package/harness/bundles/java/codex/protocols/state-layout-protocol.md +5 -6
- package/harness/bundles/java/codex/scripts/harness_archive.py +1043 -1108
- package/harness/bundles/java/codex/scripts/harness_context.py +8 -2
- package/harness/bundles/java/codex/scripts/harness_events.py +5 -0
- package/harness/bundles/java/codex/scripts/harness_ledger.py +79 -2
- package/harness/bundles/java/codex/scripts/harness_profile.py +7 -0
- package/harness/bundles/java/codex/scripts/harness_state.py +22 -3
- package/harness/bundles/java/cursor/.harness-build.json +1 -1
- package/harness/bundles/java/cursor/README.md +14 -16
- package/harness/bundles/java/cursor/harness-apidoc/SKILL.md +2 -2
- package/harness/bundles/java/cursor/harness-archive/SKILL.md +43 -46
- package/harness/bundles/java/cursor/harness-archive/checklist.md +10 -10
- package/harness/bundles/java/cursor/harness-archive/reference.md +29 -22
- package/harness/bundles/java/cursor/harness-archive/templates/summary-data-template.json +1 -7
- package/harness/bundles/java/cursor/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-package/SKILL.md +2 -2
- package/harness/bundles/java/cursor/harness-plan/SKILL.md +4 -4
- package/harness/bundles/java/cursor/harness-review/SKILL.md +2 -2
- package/harness/bundles/java/cursor/harness-run/SKILL.md +5 -3
- package/harness/bundles/java/cursor/harness-run/protocols.md +2 -0
- package/harness/bundles/java/cursor/harness-submit/SKILL.md +2 -2
- package/harness/bundles/java/cursor/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-test/SKILL.md +2 -2
- package/harness/bundles/java/cursor/harness-test/checklist.md +2 -2
- package/harness/bundles/java/cursor/harness-test/pitfalls.md +3 -3
- package/harness/bundles/java/cursor/harness-test/reference.md +2 -2
- package/harness/bundles/java/cursor/protocols/archive-report-protocol.md +18 -25
- package/harness/bundles/java/cursor/protocols/evidence-based-reporting-protocol.md +5 -5
- package/harness/bundles/java/cursor/protocols/ledger-protocol.md +7 -7
- package/harness/bundles/java/cursor/protocols/report-pipeline-protocol.md +10 -9
- package/harness/bundles/java/cursor/protocols/sensitive-info-protocol.md +3 -3
- package/harness/bundles/java/cursor/protocols/state-layout-protocol.md +5 -6
- package/harness/bundles/java/cursor/scripts/harness_archive.py +1043 -1108
- package/harness/bundles/java/cursor/scripts/harness_context.py +8 -2
- package/harness/bundles/java/cursor/scripts/harness_events.py +5 -0
- package/harness/bundles/java/cursor/scripts/harness_ledger.py +79 -2
- package/harness/bundles/java/cursor/scripts/harness_profile.py +7 -0
- package/harness/bundles/java/cursor/scripts/harness_state.py +22 -3
- package/harness/manifests/general/claude-code.json +35 -39
- package/harness/manifests/general/codebuddy.json +35 -39
- package/harness/manifests/general/codex.json +35 -39
- package/harness/manifests/general/cursor.json +35 -39
- package/harness/manifests/java/claude-code.json +35 -39
- package/harness/manifests/java/codebuddy.json +35 -39
- package/harness/manifests/java/codex.json +35 -39
- package/harness/manifests/java/cursor.json +35 -39
- package/hunter-workflow-family.json +5 -5
- package/package.json +1 -1
- package/harness/bundles/general/claude-code/harness-archive/templates/render-summary.mjs +0 -299
- package/harness/bundles/general/codebuddy/harness-archive/templates/render-summary.mjs +0 -299
- package/harness/bundles/general/codex/harness-archive/templates/render-summary.mjs +0 -299
- package/harness/bundles/general/cursor/harness-archive/templates/render-summary.mjs +0 -299
- package/harness/bundles/java/claude-code/harness-archive/templates/render-summary.mjs +0 -299
- package/harness/bundles/java/codebuddy/harness-archive/templates/render-summary.mjs +0 -299
- package/harness/bundles/java/codex/harness-archive/templates/render-summary.mjs +0 -299
- package/harness/bundles/java/cursor/harness-archive/templates/render-summary.mjs +0 -299
|
@@ -23,18 +23,18 @@
|
|
|
23
23
|
|
|
24
24
|
## 共用规则文件(强制约束)
|
|
25
25
|
|
|
26
|
-
跨 skill 共用的强制约束规则全部集中在 `protocols/` 下(8 个 protocol;其中 report pipeline
|
|
26
|
+
跨 skill 共用的强制约束规则全部集中在 `protocols/` 下(8 个 protocol;其中 report pipeline 用于结构化事件,以及 summary-data 的生成与校验),各 skill 通过相对路径引用:
|
|
27
27
|
|
|
28
28
|
| 文件 | 作用 |
|
|
29
29
|
|------|------|
|
|
30
30
|
| `protocols/powershell-protocol.md` | Shell 执行安全策略:Windows/中文路径下禁止普通 Bash,所有 git/构建命令必须通过 `powershell.exe -Command "..."` 执行;命令被拒绝时不得回退普通 Bash;所有"成功"必须有明确证据(构建成功 / git 输出 / 文件存在 / exit code 0) |
|
|
31
|
-
| `protocols/sensitive-info-protocol.md` | 敏感信息脱敏:token、密码、Authorization header、Cookie、API key、access/secret key 不得明文出现在 execution-log、报告、commit message、
|
|
31
|
+
| `protocols/sensitive-info-protocol.md` | 敏感信息脱敏:token、密码、Authorization header、Cookie、API key、access/secret key 不得明文出现在 execution-log、报告、commit message、summary-data 中;引用时统一替换为 `<TOKEN_REDACTED>` / `<PASSWORD_REDACTED>` / `<SECRET_REDACTED>` |
|
|
32
32
|
| `protocols/evidence-based-reporting-protocol.md` | 证据化报告:所有 skill 输出必须区分 ✅ 真实成功 / 🟡 静态验证或用户跳过 / ❌ 失败或被拒绝;禁止把"静态验证"写成"测试通过",禁止把"命令被拒绝"写成"成功" |
|
|
33
33
|
| `protocols/ledger-protocol.md` | 验证账本:每个变更目录维护 `verification-ledger.json`,记录 compile/unitTest/apiTest 的结果+证据+diffHash+作用范围;后续阶段先读 ledger 判定是否可复用,避免跨阶段重复编译/测试;post-test 变更按 7 类分类,决定是否重跑 |
|
|
34
34
|
| `protocols/state-layout-protocol.md` | 状态目录分层:`.harness/changes/<cn>/` 下按 `meta/`、`logs/`、`evidence/`、`reports/`、`scripts/`、`backups/` 子目录分层写入;读取时先读新路径再兼容旧路径 |
|
|
35
35
|
| `protocols/submit-protocol.md` | 固定提交交互:提交方式与 commit message 确认使用固定选项模板,禁止 AI footer |
|
|
36
|
-
| `protocols/archive-report-protocol.md` | 归档报告:`summary-data.json
|
|
37
|
-
| `protocols/report-pipeline-protocol.md` | 报告流水线:`events.ndjson` + `harness_archive.py
|
|
36
|
+
| `protocols/archive-report-protocol.md` | 归档报告:`summary-data.json`、manifest/checksum 与真实性规则 |
|
|
37
|
+
| `protocols/report-pipeline-protocol.md` | 报告流水线:`events.ndjson` + `harness_archive.py execute/replay` + 数据一致性校验 |
|
|
38
38
|
|
|
39
39
|
每个 skill 的 SKILL.md 关键规则章节都通过相对路径引用这些 protocol(`../protocols/powershell-protocol.md` 等)。
|
|
40
40
|
|
|
@@ -85,8 +85,7 @@
|
|
|
85
85
|
│ │ ├── test/
|
|
86
86
|
│ │ ├── review/
|
|
87
87
|
│ │ └── final/
|
|
88
|
-
│ │
|
|
89
|
-
│ │ └── final-summary.html # 最终报告(代码量+产出清单+测试/审查摘要)
|
|
88
|
+
│ │ └── summary-data.json # 平台展示使用的最终报告数据
|
|
90
89
|
│ ├── events.ndjson # 结构化事件层(新流程推荐;历史 archive 可缺失)
|
|
91
90
|
│ └── backups/
|
|
92
91
|
├── <change-name>/ # 当前未归档变更(最多 1 个,不提交)
|
|
@@ -160,9 +159,9 @@
|
|
|
160
159
|
- **Bash 拒绝、PowerShell 重试、降级、跳过、用户确认都必须记录**
|
|
161
160
|
- 日志状态统一使用 `✅OK / 🟡WARN(原因) / ❌FAIL(原因)`
|
|
162
161
|
- harness-archive 归档时从日志汇总:时间线、总用时、Skill 调用统计
|
|
163
|
-
- `harness_archive.py
|
|
162
|
+
- `harness_archive.py execute/replay` 优先从 `events.ndjson` 汇总命令、验证、artifact、问题和决策;旧 archive 缺少 events 时才回放 execution-log/ledger/manifest
|
|
164
163
|
- sync 默认不关联具体变更目录,仅在已有变更目录时追加日志和 events
|
|
165
|
-
- archive
|
|
164
|
+
- archive 是例外:`execute` 负责一次准备记录和一次正式 `phase.start` / `phase.end`,调用者不得重复追加阶段边界,也不得串行运行 `auto-gate`、`status`、`finalize`
|
|
166
165
|
|
|
167
166
|
## Skill 目录结构
|
|
168
167
|
|
|
@@ -211,8 +210,7 @@ harness-skills/
|
|
|
211
210
|
├── checklist.md # 归档前后检查项
|
|
212
211
|
├── reference.md # 归档操作 + 占位符真实性规则
|
|
213
212
|
└── templates/
|
|
214
|
-
|
|
215
|
-
└── render-summary.mjs # final-summary UTF-8 固定渲染脚本
|
|
213
|
+
└── summary-data-template.json # 最终报告数据结构
|
|
216
214
|
```
|
|
217
215
|
|
|
218
216
|
## Skill 列表
|
|
@@ -280,11 +278,11 @@ harness-skills/
|
|
|
280
278
|
| **submit hash 记录** | pre-pull local hash + final pushed hash 双标注(主目录);worktree 模式 submit 段只本地 commit,合并段产生 `mergeFinalHash`,archive 以 `mergeFinalHash` 为准(无则回退 final pushed hash) |
|
|
281
279
|
| **archive 阶段 1** | 归档前确认实际计划阶段的证据与结局;有 Git 时核对最终提交身份,无 Git、无 upstream 或跳过 submit 时使用内容清单身份。发布候选资格与本地封存分开判断;阶段边界由 finalize 单进程维护,调用者不额外 append |
|
|
282
280
|
| **archive 文件移动** | 只用 PowerShell 或 Read+Write+验证,**禁止 Bash mv/cp/rm**;移动失败时不删除原目录 |
|
|
283
|
-
| **archive
|
|
281
|
+
| **archive 最终报告** | 必须运行 `harness_archive.py execute`,由内部 finalize 生成权威 `summary-data.json` 并完成 validate。平台直接读取该 JSON;本地不生成重复的 HTML 报告。无测试或无 review 时必须标记 `NOT_RUN` / `ADVISORY_NOT_RUN`,禁止伪造 100% 通过率。状态演进须真实展示(✅OK / 🟡WARN / 🔁REUSED / 🔁RETESTED / 📝ADVISORY / 🧹NON_BEHAVIORAL_CLEANUP) |
|
|
284
282
|
|
|
285
283
|
### 敏感信息脱敏
|
|
286
284
|
|
|
287
|
-
- token / Authorization / Cookie / Redis 密码 / 数据库密码 / API key / access&secret key 不得明文出现在 execution-log、报告、commit message、
|
|
285
|
+
- token / Authorization / Cookie / Redis 密码 / 数据库密码 / API key / access&secret key 不得明文出现在 execution-log、报告、commit message、summary-data 中
|
|
288
286
|
- 引用敏感值时统一使用占位符:`<TOKEN_REDACTED>` / `<PASSWORD_REDACTED>` / `<SECRET_REDACTED>` / `<API_KEY_REDACTED>` / `<AUTH_HEADER_REDACTED>` / `<COOKIE_REDACTED>`
|
|
289
287
|
- 命令示例使用占位符,不复述真实值
|
|
290
288
|
- 测试中临时使用的 token 在持久化测试报告中必须替换为占位符
|
|
@@ -426,7 +424,7 @@ npx hunter-harness # 初始化阶段检查环境/CodeGraph/基础状态(非
|
|
|
426
424
|
/harness-test # 运行测试(30条避坑规则)
|
|
427
425
|
/harness-review # 代码审查
|
|
428
426
|
/harness-submit # 提交代码(worktree 模式含合并;/harness-merge 为别名)
|
|
429
|
-
/harness-archive # 归档产出(harness_archive.py
|
|
427
|
+
/harness-archive # 归档产出(harness_archive.py execute),释放工作区
|
|
430
428
|
```
|
|
431
429
|
|
|
432
430
|
## 避坑知识来源
|
|
@@ -455,8 +453,8 @@ npx hunter-harness # 初始化阶段检查环境/CodeGraph/基础状态(非
|
|
|
455
453
|
- `protocols/sensitive-info-protocol.md`:敏感信息脱敏(token/密码/密钥占位符化,已取代原 `harness-plan/sensitive-info.md`,各 skill 引用此版本)。
|
|
456
454
|
- `protocols/evidence-based-reporting-protocol.md`:证据化报告(✅/🟡/❌ 三态,已取代原 `harness-plan/evidence-based-reporting.md`,各 skill 引用此版本)。
|
|
457
455
|
- `protocols/submit-protocol.md`:固定提交交互、中文 commit 文件、禁止 AI footer。
|
|
458
|
-
- `protocols/archive-report-protocol.md`:summary-data
|
|
459
|
-
- `protocols/report-pipeline-protocol.md`:events.ndjson + `harness_archive.py
|
|
456
|
+
- `protocols/archive-report-protocol.md`:summary-data、manifest/checksum 与平台归档展示合同。
|
|
457
|
+
- `protocols/report-pipeline-protocol.md`:events.ndjson + `harness_archive.py execute/replay` + summary-data 一致性校验。
|
|
460
458
|
- `protocols/state-layout-protocol.md`:`.harness/changes/<cn>/` 子目录分层(meta/logs/evidence/reports/scripts/backups),读取先新后旧。
|
|
461
459
|
|
|
462
460
|
各 skill 的 `SKILL.md` 只保留阶段目标和硬门禁,细节优先引用这些协议,避免在多个 skill 中复制并产生冲突。
|
|
@@ -477,4 +475,4 @@ backups/ 未提交但用于验证的测试文件等备份
|
|
|
477
475
|
|
|
478
476
|
读取时先读新路径,再兼容旧路径。详见 `protocols/state-layout-protocol.md`。
|
|
479
477
|
|
|
480
|
-
Archive
|
|
478
|
+
Archive 常规入口为 `harness_archive.py execute`,内部 finalize 生成 `summary-data.json`。Hunter Platform 直接读取该文件,避免本地重复渲染和两份报告数据不一致。
|
|
@@ -21,7 +21,7 @@ disallowed-tools:
|
|
|
21
21
|
- Bash(awk *)
|
|
22
22
|
- Bash(curl *)
|
|
23
23
|
---
|
|
24
|
-
<!-- generated by harness_deploy.py; core=
|
|
24
|
+
<!-- generated by harness_deploy.py; core=a5e0c1d624b5fad6; overlay=none; agent=claude-code; do not edit -->
|
|
25
25
|
# harness-archive — 变更归档
|
|
26
26
|
|
|
27
27
|
## Purpose
|
|
@@ -47,7 +47,7 @@ disallowed-tools:
|
|
|
47
47
|
- **产品候选验证**:
|
|
48
48
|
- 有远端 CI:保留 `product-candidate-ci.json` 兼容证据;归档会把有效的 legacy schema v1 证据迁移为 `remote-claimed` 的 schema v2 `product-candidate-verification.json`,不会冒充 `remote-attested`。
|
|
49
49
|
- `remote-attested` 必须同时带远端运行 URL 与 `verification.attestationDigest`;只有 URL、旧 JSON 哈希或 ledger 哈希只能达到 `remote-claimed`。
|
|
50
|
-
- 无 CI
|
|
50
|
+
- 无 CI:`execute` 在候选收据缺失时自动尝试本地认证,只复用身份一致且完整的 `unitTestFull` ledger 证据,并在产品内容未变化时把提交前验证安全重绑定到当前 HEAD;认证不会执行测试。只有需要单独诊断认证结果时才手工运行 `certify-local`。
|
|
51
51
|
- `release-candidate` 要求候选验证通过;正常本地完成或结束未完成变更使用 `--intent record-only`,固定 `releaseEligible=false`,但仍生成 ZIP 并上传平台。
|
|
52
52
|
|
|
53
53
|
## Inputs
|
|
@@ -64,62 +64,60 @@ disallowed-tools:
|
|
|
64
64
|
6. **implementation-detail** — 自适应执行参考;legacy 缺失 🟡WARN,不阻断
|
|
65
65
|
7. **test-scenarios** — 测试真相源:`plans/<change>-test-scenarios.md`
|
|
66
66
|
8. **禁止读取 `docs/superpowers/` 作为正式输入** — 旧草稿仅人工线索
|
|
67
|
-
9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit
|
|
67
|
+
9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --json`。首次 Plan 捕获时,脚本把当时的 Git HEAD 写入不可变 `changeBase`;后续阶段只刷新 `git.head` 与各段指纹,不得用当前 HEAD 覆盖 `changeBase`。只有迁移旧 change 且已能证明真实计划起点时,才在首次补录时传 `--base <baseCommit>`。`changedSegments=[]` 时复用已有 profile/rules/map/change/code 指纹,不再重复跑全量 `harness-sync` 或代码库扫描。`knowledge` 段仅为兼容空段,知识始终按需远端查询;快照不能替代源码读取和验证门禁。
|
|
68
68
|
|
|
69
69
|
状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
|
|
70
70
|
> 片段:read-protocol
|
|
71
71
|
|
|
72
72
|
## Workflow
|
|
73
73
|
|
|
74
|
-
先用 `harness_change.py resolve [--change] --json` 解析 change;多个 active change 未显式选择时返回 `CHANGE_SELECTION_REQUIRED`,禁止按 Glob/mtime
|
|
74
|
+
先用 `harness_change.py resolve [--change] --json` 解析 change;多个 active change 未显式选择时返回 `CHANGE_SELECTION_REQUIRED`,禁止按 Glob/mtime 自动选择。常规路径只运行一次 `harness_archive.py execute`。该命令一次性完成状态采集、自动门禁和 finalize,并复用同一份预检结果。调用者不得再串行运行 `auto-gate`、`status` 和 `finalize`,避免重复扫描、重复事件和幽灵 change 目录。
|
|
75
75
|
|
|
76
76
|
### Phase 0:读取规则和上下文
|
|
77
77
|
|
|
78
78
|
1. 读取本文件。
|
|
79
|
-
2.
|
|
80
|
-
3.
|
|
81
|
-
|
|
82
|
-
- `../protocols/state-layout-protocol.md`
|
|
83
|
-
- `../protocols/powershell-protocol.md`
|
|
84
|
-
- `../protocols/sensitive-info-protocol.md`
|
|
85
|
-
- `../protocols/evidence-based-reporting-protocol.md`
|
|
86
|
-
- `../protocols/report-pipeline-protocol.md`
|
|
87
|
-
4. 用 `harness_change.py resolve [--change] --json` 解析 `$ARGUMENTS`;多个 active change 时让用户选择。
|
|
79
|
+
2. 用 `harness_change.py resolve [--change] --json` 解析 `$ARGUMENTS`;多个 active change 时让用户选择。
|
|
80
|
+
3. 按共享读取协议刷新一次状态快照。首次 Plan 已记录的 `changeBase` 必须保持不变,归档阶段不得把当前 HEAD 写回为基线。
|
|
81
|
+
4. 常规路径不预读全部参考资料。仅在 `execute` 返回阻断或需要解释结果时,读取 `reference.md` 和对应协议章节。
|
|
88
82
|
|
|
89
83
|
### Phase 1:确认归档对象(扫描未归档变更)
|
|
90
84
|
|
|
91
|
-
使用 resolver 返回的 active changes 展示变更概要;同时读取 `plannedPhases
|
|
85
|
+
使用 resolver 返回的 active changes 展示变更概要;同时读取 `plannedPhases`、已完成阶段和用户表达的生命周期结局。Git remote 与平台连接不是归档前置条件,不在这里额外探测。
|
|
92
86
|
|
|
93
|
-
- **Read `checklist.md`** — 归档前检查项
|
|
94
87
|
- 发现多个未归档变更 → 让用户选择或终止
|
|
95
88
|
|
|
96
|
-
### Phase 2
|
|
89
|
+
### Phase 2:确定归档结局
|
|
97
90
|
|
|
98
|
-
|
|
91
|
+
根据用户当前指令确定一次归档结局:
|
|
99
92
|
|
|
100
|
-
-
|
|
101
|
-
-
|
|
93
|
+
- 明确要求发布候选:`--intent release-candidate --closure completed`。
|
|
94
|
+
- 正常完成但不要求发布:`--intent record-only --closure completed`。
|
|
95
|
+
- 主动停止或被其他方案替代:`--intent record-only --closure abandoned|superseded --closure-reason "<中文原因>"`。
|
|
102
96
|
|
|
103
|
-
|
|
97
|
+
信息已经明确时,不重复询问。信息不足且会改变结局时,才用中文提供「正常完成」「发布候选」「主动废弃」「被其他方案替代」「取消」。无 upstream 不阻止保存。
|
|
104
98
|
|
|
105
99
|
### Phase 3:执行归档
|
|
106
100
|
|
|
107
|
-
1.
|
|
108
|
-
2.
|
|
109
|
-
3.
|
|
101
|
+
1. 不要为归档预先补跑测试或手工修 ledger。候选收据缺失时,`execute` 会先尝试复用身份一致的全量 ledger 完成本地认证;无法认证时保留结构化原因,`record-only` 仍按事实归档,`release-candidate` 则由发布门禁决定是否阻断。
|
|
102
|
+
2. 运行一次 `harness_archive.py execute --change-dir "<executionRoot>" --archive-root ".harness/archive" --intent <...> --closure <...> [--closure-reason "..."] --json`。`execute` 只采集一次状态,并把准备耗时、正式归档耗时和唯一阶段轮次写入事件。调用者不得在它前后再运行 `auto-gate`、`status`、`finalize` 或手工追加 archive 阶段边界。
|
|
103
|
+
3. `meta/archive-meta.md` 与 `reports/final/summary-data.json` 均由脚本生成。禁止手写、补字段或手工修改 ledger 以绕过门禁。
|
|
104
|
+
4. `execute` 失败时,先按 `reasonCode` 处理,不要盲目重跑:
|
|
105
|
+
- `ARCHIVE_BASE_EQUALS_FEATURE_TIP`:正常完成不允许空范围归档。仅可选择受控认领既有提交范围、改为未完成封存,或取消。
|
|
106
|
+
- 受控认领既有范围:先展示 base、tip 和产品文件清单;获得用户明确确认后运行 `adopt-existing-range --base <base> --tip <tip> --reason "<中文原因>" --confirm-existing-range --json`,再重跑一次 `execute`。禁止直接编辑 snapshot 或 ledger。
|
|
107
|
+
- `abandoned` / `superseded`:允许没有产品增量,但必须保存中文原因,并固定 `releaseEligible=false`。
|
|
108
|
+
- 其他阻断:读取 `reference.md` 中对应错误的恢复说明;原变更目录必须保留。
|
|
109
|
+
|
|
110
|
+
**本地不执行知识 ingest**;服务端在 ZIP 持久保存并解包后 ingest。失败时保留原目录、ZIP 和回执。
|
|
110
111
|
- **归档包上传**:始终先生成一个确定性 ZIP;有远程凭据时再调用 `npx hunter-harness archive upload`。ZIP 仅包含 `summary-data.json`、`spec/**/*.md`、`plans/**/*.md`、`archive-meta.md`、`change-context.json` 和稳定 manifest;明确排除 logs、review/test 报告、HTML、缓存、备份、凭据和临时文件。
|
|
111
112
|
- **失败可恢复**:无论远端凭据是否齐全,都先生成 ZIP 与 `<change-key>.upload.json`;上传或服务端 ingest 失败不破坏本地归档。待上传 ZIP 与逐 change 回执保留在 `.harness/state/local/archive-packages/`,可枚举独立重试。只有 CLI 核验 package hash 且服务端同时返回 `archive_status=durable`、`knowledge_status=ready` 后,才清理对应 ZIP 与回执;`indexing` 记为 pending,不记为失败。
|
|
112
113
|
- **监控终态(C3)**:auto-upload 之后自动 `events-sync`,用归档前 change 路径派生的 `run_id` + 原 `change_key` 上报;失败只记 warning。
|
|
113
114
|
|
|
114
|
-
- **Read `reference.md`** —
|
|
115
|
-
- **Read `templates/summary-data-template.json`** — summary
|
|
116
|
-
- **Read `templates/render-summary.mjs`** — final-summary 渲染脚本(finalize 内嵌调用)
|
|
115
|
+
- **Read `reference.md`** — 仅在阻断恢复或需要解释输出字段时读取
|
|
116
|
+
- **Read `templates/summary-data-template.json`** — 仅在排查 summary 校验失败时读取
|
|
117
117
|
|
|
118
118
|
### Phase 4:验证与提示
|
|
119
119
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
- **Read `checklist.md`** — 归档后验证项
|
|
120
|
+
以 `execute` 返回的 manifest、ZIP、上传回执和 `finalStatus` 为权威结果。只有返回字段缺失或不一致时,才读取 `checklist.md` 做人工诊断。不要为了重复确认成功结果再次扫描整个目录。
|
|
123
121
|
|
|
124
122
|
## P0 执行可信度规则
|
|
125
123
|
|
|
@@ -143,15 +141,15 @@ disallowed-tools:
|
|
|
143
141
|
|
|
144
142
|
### 二、归档前确认或自动门禁
|
|
145
143
|
|
|
146
|
-
`
|
|
144
|
+
`execute` 内部运行自动门禁。实际计划最后阶段已终态、边界快照存在且 `status.archivable=true` 时直接执行;未满足时返回阻断且不移动原目录。用户取消后不得重跑。
|
|
147
145
|
|
|
148
146
|
### 三、文件移动只用内置工具或 PowerShell
|
|
149
147
|
|
|
150
148
|
移动用 Read+Write+验证 或 PowerShell;**禁止 Bash mv/cp/rm**。移动失败时不删除原目录,报错退出让用户手动处理。
|
|
151
149
|
|
|
152
|
-
###
|
|
150
|
+
### 四、数据化归档门禁
|
|
153
151
|
|
|
154
|
-
必须通过 `harness_archive.py finalize` 生成权威 `reports/final/summary-data.json` 并完成 validate
|
|
152
|
+
必须通过 `harness_archive.py finalize` 生成权威 `reports/final/summary-data.json` 并完成 validate。平台监控直接读取该数据;本地不再生成重复的 HTML 报告。统计数字只能来自 summary-data、events、ledger 或 manifest。详见 `../protocols/report-pipeline-protocol.md`、`../protocols/archive-report-protocol.md`、`reference.md`。
|
|
155
153
|
|
|
156
154
|
### 五、manifest/checksum 必须存在
|
|
157
155
|
|
|
@@ -166,13 +164,15 @@ disallowed-tools:
|
|
|
166
164
|
|
|
167
165
|
### 七、verification-ledger 汇总状态
|
|
168
166
|
|
|
169
|
-
归档前读 `evidence/verification-ledger.json`,提取各阶段 status、postTestClassification、复用关系,供
|
|
167
|
+
归档前读 `evidence/verification-ledger.json`,提取各阶段 status、postTestClassification、复用关系,供 summary-data 真实记录状态演进。若 ledger 有 `postTestClassification`,summary-data 必须记录该分类及对应的复用/重测决策。
|
|
168
|
+
|
|
169
|
+
门禁策略未声明 `database` 能力,且 `requiredValidations` / `requiredValidationsByPhase` 也未要求 `dbCompatibility` 时,数据库兼容性投影固定为 `NOT_APPLICABLE`,原因来自能力配置。不得要求纯前端、文档或无数据库项目伪造数据库证据。
|
|
170
170
|
|
|
171
|
-
### 八、
|
|
171
|
+
### 八、summary-data 不得伪造且必须记录状态演进
|
|
172
172
|
|
|
173
173
|
无测试报告 → 显示"未运行测试 / 静态验证",不得 100% 通过率;无 review → "📝ADVISORY:未运行 review"。状态用 ✅OK / 🟡WARN / 🔁REUSED / 🔁RETESTED / 📝ADVISORY / 🧹NON_BEHAVIORAL_CLEANUP,复用前一阶段结果显示 🔁REUSED,**不得伪装成重新执行,不得无脑全绿**。
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
`summary-data.json` 是最终报告的唯一权威数据源,必须产出并通过 validate/adequacy。平台按该文件展示归档结果,本地不维护第二份展示文件。
|
|
176
176
|
|
|
177
177
|
### 九、CONDITIONAL_OK 最终状态
|
|
178
178
|
|
|
@@ -180,15 +180,15 @@ API 测试 `USER_SKIPPED` 或 DB 兼容 `BLOCKED_BY_DBA` 时,最终状态必
|
|
|
180
180
|
|
|
181
181
|
### 十、未提交测试文件归档
|
|
182
182
|
|
|
183
|
-
未提交但用于验证的测试文件必须归档到 `backups/uncommitted-tests
|
|
183
|
+
未提交但用于验证的测试文件必须归档到 `backups/uncommitted-tests/`,并在 summary-data 中记录。
|
|
184
184
|
|
|
185
185
|
### 十一、归档事件单一所有权
|
|
186
186
|
|
|
187
|
-
|
|
187
|
+
`execute` 在一次性预检通过后负责且仅负责一次正式 `phase.start` / `phase.end`。准备阶段单独使用 `phase.prepare.start/end`,不计为归档重跑。调用者不得重复追加阶段边界。归档后 events.ndjson 与自动渲染的 execution-log.md 一起位于 archive。
|
|
188
188
|
|
|
189
189
|
### 十二、Shell 安全 / 敏感信息 / 证据化报告
|
|
190
190
|
|
|
191
|
-
git 命令通过 `powershell.exe -Command "..."` 执行;archive-meta.md 和
|
|
191
|
+
git 命令通过 `powershell.exe -Command "..."` 执行;archive-meta.md 和 summary-data.json 不得含明文 token、密码或密钥;归档报告必须区分 ✅真实成功 / 🟡跳过·静态验证 / ❌失败。
|
|
192
192
|
|
|
193
193
|
### 十三、归档完整性与发布资格分离
|
|
194
194
|
|
|
@@ -196,27 +196,24 @@ git 命令通过 `powershell.exe -Command "..."` 执行;archive-meta.md 和 fi
|
|
|
196
196
|
|
|
197
197
|
## Output Format
|
|
198
198
|
|
|
199
|
-
> 归档元数据格式见 `reference.md` 的 archive-meta
|
|
199
|
+
> 归档元数据格式见 `reference.md` 的 archive-meta 模板;最终报告使用 `templates/summary-data-template.json` 定义的数据结构。
|
|
200
200
|
|
|
201
201
|
产出文件:
|
|
202
202
|
|
|
203
203
|
- `.harness/archive/YYYY-MM-DD-<change-name>/meta/archive-meta.md` — 归档元数据
|
|
204
204
|
- `.harness/archive/YYYY-MM-DD-<change-name>/events.ndjson` — 结构化事件层(新流程推荐;旧 archive 可缺失)
|
|
205
205
|
- `.harness/archive/YYYY-MM-DD-<change-name>/reports/final/summary-data.json` — 最终报告数据源
|
|
206
|
-
- `.harness/archive/YYYY-MM-DD-<change-name>/reports/final/final-summary.html` — 可选展示投影,由 `render-summary.mjs` 渲染(Node 失败时 Python fallback);渲染失败降级 warning,`--no-html` 可跳过
|
|
207
206
|
- `.harness/archive/YYYY-MM-DD-<change-name>/evidence/archive-manifest-before.json` / `archive-manifest-after.json` — 归档前后 manifest/checksum
|
|
208
207
|
|
|
209
208
|
## 渐进披露
|
|
210
209
|
|
|
211
|
-
- **Read `checklist.md`** 仅在
|
|
212
|
-
- **Read `reference.md`**
|
|
213
|
-
- **Read `
|
|
214
|
-
- **Read `templates/summary-data-template.json`** 仅在 Phase 3 生成 `summary-data.json` 时 — 含最终报告数据结构
|
|
215
|
-
- **Read `templates/render-summary.mjs`** 仅在 Phase 3 渲染 `final-summary.html` 时 — 固定 HTML 渲染脚本
|
|
210
|
+
- **Read `checklist.md`** 仅在 `execute` 返回结果缺失或 manifest 不一致时
|
|
211
|
+
- **Read `reference.md`** 仅在阻断恢复、受控范围认领或解释最终状态时
|
|
212
|
+
- **Read `templates/summary-data-template.json`** 仅在 summary 校验失败时
|
|
216
213
|
|
|
217
214
|
## 交互白名单
|
|
218
215
|
|
|
219
|
-
|
|
216
|
+
仅当生命周期结局不明确,或需要受控认领既有提交范围时,允许阻断式确认。拒绝后终止,不执行任何移动。
|
|
220
217
|
|
|
221
218
|
## 执行日志
|
|
222
219
|
|
|
@@ -8,11 +8,10 @@ description: harness-archive 的归档前检查项和归档后验证项。仅在
|
|
|
8
8
|
|
|
9
9
|
归档遵循 `../protocols/archive-report-protocol.md`,门禁要点见 SKILL.md `## 关键规则` 四/五/九:
|
|
10
10
|
|
|
11
|
-
-
|
|
11
|
+
- 生成并校验 `reports/final/summary-data.json`;平台直接使用该文件展示结果。
|
|
12
12
|
- 归档前生成 `evidence/archive-manifest-before.json`,移动后生成 `archive-manifest-after.json`。
|
|
13
|
-
-
|
|
13
|
+
- 归档统计只能来自 summary-data 或 manifest。
|
|
14
14
|
- before/after checksum 不一致时,不得删除原目录。
|
|
15
|
-
- 默认渲染器 `templates/render-summary.mjs`(finalize 内嵌调用)。
|
|
16
15
|
- 需要跨工作区恢复时传 `--durable-root <独立存储>`;成功必须为 `ARCHIVED_DURABLE`,并验证 content-addressed object 与 durable receipt 可读回。
|
|
17
16
|
- `restore-durable` 只恢复到不存在的目标;目标已存在或对象 digest 不符时 fail closed,禁止覆盖。
|
|
18
17
|
- 未配置 durable root 时显式记录 `ARCHIVED_LOCAL_ONLY` 风险,不得把同工作区 move 宣称为独立备份。
|
|
@@ -33,9 +32,9 @@ description: harness-archive 的归档前检查项和归档后验证项。仅在
|
|
|
33
32
|
|
|
34
33
|
## 归档前检查(Phase 1)
|
|
35
34
|
|
|
36
|
-
> ⚠️
|
|
35
|
+
> ⚠️ **单一所有权**:`execute` 负责一次准备记录和一次正式 `phase.start` / `phase.end`。归档前检查不得自行追加 archive 阶段边界。
|
|
37
36
|
|
|
38
|
-
- [ ] 未在调用
|
|
37
|
+
- [ ] 未在调用 `execute` 前手工追加 archive 阶段边界,也未串行调用 `auto-gate`、`status`、`finalize`
|
|
39
38
|
- [ ] 只有一个未归档变更目录(多个时终止或让用户选择)
|
|
40
39
|
- [ ] 已确认 `closure`:正常完成 / 主动废弃 / 被其他方案替代;后两者有中文 `closure-reason`
|
|
41
40
|
- [ ] 正常完成按 `plannedPhases` 核对;提前结束只要求可识别变更与安全封存的最小材料
|
|
@@ -46,13 +45,16 @@ description: harness-archive 的归档前检查项和归档后验证项。仅在
|
|
|
46
45
|
- [ ] Git 项目记录 dirty/HEAD/upstream;无 upstream 或仅本地 commit 允许归档,但 `releaseEligible=false`
|
|
47
46
|
- [ ] 非 Git 项目生成确定性内容清单与产品树散列,并记录 `sourceControl=none`
|
|
48
47
|
- [ ] 最终产品身份来自 Submit 收据或当前内容;提交前候选只允许在验证输入未变化时由 `certify-local` 自动重绑定
|
|
48
|
+
- [ ] `changeBase` 来自首次 Plan 快照,后续阶段未用当前 HEAD 覆盖;正常完成时 base 与产品 tip 不得相同
|
|
49
|
+
- [ ] 如使用既有提交范围,`meta/archive-range-adoption.json` 由 `adopt-existing-range --confirm-existing-range` 生成,未手工修改 ledger 或 snapshot
|
|
50
|
+
- [ ] 主动废弃或被替代允许没有产品增量,但必须有中文原因,且不得声明为发布候选
|
|
49
51
|
- [ ] **test/review 报告状态确认**:
|
|
50
52
|
- ✅ `.harness/changes/<change-name>/tests/test-report-*.md` 存在 → 归档正常
|
|
51
|
-
- 🟡 不存在 → 必须在 archive-meta.md 和
|
|
53
|
+
- 🟡 不存在 → 必须在 archive-meta.md 和 summary-data.json 中标记「跳过测试」或「未运行测试」,不得伪造通过率
|
|
52
54
|
- ✅ `.harness/changes/<change-name>/reports/review/review-report-*.md` 存在(旧路径 `reviews/review-report-*.md` 兼容回退)→ 作为 📝ADVISORY 归档材料
|
|
53
55
|
- 📝 `.harness/changes/<change-name>/reports/review/fixback-*.md` 存在 → 随 review 报告一并归档;默认 advisory,除非 `strict-review-gate=true`
|
|
54
56
|
- 🟡 不存在但 `logs/execution-log.md` 有 harness-review 小节 → **review 已运行但未落盘**(harness-review `context:fork` 交接缝常见,见 `agent/case-candidates/2026-06-30-harness-review-forked-not-persisting-report.md`):从 execution-log/会话补落盘到 `reports/review/review-report-YYYYMMDD-HHmm.md` 再归档,**不得误标"未运行 review"**(实际跑过)
|
|
55
|
-
- 🟡 不存在且 execution-log 无 review 小节 → 在 archive-meta.md 和
|
|
57
|
+
- 🟡 不存在且 execution-log 无 review 小节 → 在 archive-meta.md 和 summary-data.json 中标记「📝ADVISORY:未运行 review」
|
|
56
58
|
|
|
57
59
|
## 归档后验证(Phase 4)
|
|
58
60
|
|
|
@@ -61,11 +63,9 @@ description: harness-archive 的归档前检查项和归档后验证项。仅在
|
|
|
61
63
|
- [ ] before/after manifest 校验通过(排除 `logs/execution-log.md`——归档追加结束记录预期 sha256 变化;其他 moved 文件 sha256 必须一致,missing/mismatch=0)
|
|
62
64
|
- [ ] archive-meta.md 由 finalize 自动生成且字段完整;调用者未手写或补改
|
|
63
65
|
- [ ] summary-data.json 已生成,且为合法 JSON
|
|
64
|
-
- [ ]
|
|
65
|
-
- [ ] **final-summary.html 真实性检查**:
|
|
66
|
+
- [ ] **summary-data.json 真实性检查**:
|
|
66
67
|
- 无测试报告时,`summary-data.json.verification.unitTests.status` / `summary-data.json.verification.apiTests.status` 必须标记为 `NOT_RUN`、`USER_SKIPPED`、`BLOCKED` 或 `STATIC_ONLY`,不得显示 100%
|
|
67
68
|
- 无 review 报告时,`summary-data.json.reviewSummary.status` 必须标记为 `ADVISORY_NOT_RUN`,不得显示 100%
|
|
68
69
|
- 跳过、复用、人工确认的部分必须明确标记,不伪装成 ✅
|
|
69
|
-
- final-summary.html 中不得残留 `{{...}}` 占位符
|
|
70
70
|
- [ ] 原目录 `.harness/changes/<change-name>/` 已删除(仅在前面所有验证通过后)
|
|
71
71
|
- [ ] .harness/ 下无残留未归档变更目录
|
|
@@ -1,19 +1,35 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: harness-archive 的归档流程、manifest、summary-data
|
|
2
|
+
description: harness-archive 的归档流程、manifest、summary-data 校验、目录结构与最终状态规则。
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# harness-archive 参考
|
|
6
6
|
|
|
7
7
|
## 归档流程(对齐 SKILL.md Workflow)
|
|
8
8
|
|
|
9
|
-
- **Phase 0 读取上下文**:读 SKILL.md
|
|
10
|
-
- **Phase 1
|
|
11
|
-
- **Phase 2
|
|
9
|
+
- **Phase 0 读取上下文**:读 SKILL.md,解析 `$ARGUMENTS`,刷新一次状态快照。常规路径不预读全部参考资料。
|
|
10
|
+
- **Phase 1 确认归档对象**:使用 `harness_change.py resolve` 解析 contract/state 双层目录;多变更让用户选择或终止。
|
|
11
|
+
- **Phase 2 确定归档结局**:已有明确指令时直接使用;只有结局不明确或需要认领既有提交范围时才询问。
|
|
12
12
|
- **Phase 3 执行归档**:
|
|
13
|
-
1.
|
|
14
|
-
2. `meta/archive-meta.md`
|
|
15
|
-
3.
|
|
16
|
-
- **Phase 4
|
|
13
|
+
1. 运行一次 `python <skills-root>/scripts/harness_archive.py execute --change-dir ... --archive-root ".harness/archive" --intent <...> --closure <...> --json`。不要预先运行 `auto-gate` 或 `status`,也不要随后直接运行 `finalize`。候选收据缺失时,`execute` 会先尝试复用完整且身份一致的 `unitTestFull` ledger;产品内容未变化而 HEAD 因提交前移时,只重绑定候选身份,不重跑测试。
|
|
14
|
+
2. `execute` 在同一进程中复用预检结果,并负责且仅负责一次正式 `phase.start` / `phase.end`。准备耗时单独记录。`meta/archive-meta.md` 与 summary 均由 finalize 内部生成;禁止手写。
|
|
15
|
+
3. finalize 在 before-manifest 前执行 cleanup(删除 lock/pid/launcher/credential,截断超大日志)。它采用冻结优先:collect 前 fsync 事件并写 `evidence/evidence-cutoff.json`;cutoff 后不再追加事件。source consistency 或 summary consistency 失败时,脚本保留原 changes 目录并非零退出。
|
|
16
|
+
- **Phase 4 验证与提示**:优先使用 `execute` 返回的 manifest、ZIP 和上传回执;仅在结果缺失或不一致时读取 `checklist.md`。
|
|
17
|
+
|
|
18
|
+
数据库兼容性由项目能力配置决定。门禁策略既未声明 `database` 能力,也未把 `dbCompatibility` 列为必需验证时,汇总结果为 `NOT_APPLICABLE`,并以 `capability-profile` 作为类型化来源;只有明确具备数据库能力或明确要求该验证时才检查数据库证据。
|
|
19
|
+
|
|
20
|
+
## 基线折叠的恢复方式
|
|
21
|
+
|
|
22
|
+
`ARCHIVE_BASE_EQUALS_FEATURE_TIP` 表示正常完成的归档范围为空。不要修改 ledger、state snapshot 或制造空提交。按实际情况选择:
|
|
23
|
+
|
|
24
|
+
1. 本次变更确实对应仓库中一段已有提交:展示 base、tip 和产品文件清单,获得用户明确确认后运行:
|
|
25
|
+
|
|
26
|
+
```powershell
|
|
27
|
+
python <skills-root>/scripts/harness_archive.py adopt-existing-range --change-dir ".harness/changes/<change>" --base <base> --tip <tip> --reason "<中文原因>" --confirm-existing-range --json
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
命令生成不可覆盖的 `meta/archive-range-adoption.json`,并绑定仓库身份、ownership、diffHash 和文件清单。随后只重跑一次 `execute`。
|
|
31
|
+
2. 需求未完成:使用 `--intent record-only --closure abandoned|superseded --closure-reason "<中文原因>"`。零产品增量作为 warning 保存,不阻止封存,且 `releaseEligible=false`。
|
|
32
|
+
3. 无法证明范围或用户拒绝确认:取消归档,保留原目录。
|
|
17
33
|
|
|
18
34
|
## manifest 生成
|
|
19
35
|
|
|
@@ -55,29 +71,21 @@ powershell.exe -NoProfile -ExecutionPolicy Bypass -File "harness-skills/harness-
|
|
|
55
71
|
|
|
56
72
|
报告必须突出业务目标和维护者结论。所有统计数字只能来自 events、summary-data、ledger 或 manifest,不得手写另一套。历史 archive 没有 `events.ndjson` 时,允许从 ledger/log/manifest 回放,并在 `reportPipeline.sources` 中记录来源。
|
|
57
73
|
|
|
58
|
-
##
|
|
59
|
-
|
|
60
|
-
默认使用 Node.js 渲染器:
|
|
61
|
-
|
|
62
|
-
```powershell
|
|
63
|
-
powershell.exe -NoProfile -Command "& '<node-path>' 'harness-skills/harness-archive/templates/render-summary.mjs' --summary '.harness/archive/<date-change>/reports/final/summary-data.json' --out '.harness/archive/<date-change>/reports/final/final-summary.html'"
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
如模板脚本位于 skill 目录,则先复制到 archive 目录或直接引用 skill 路径。
|
|
74
|
+
## 平台展示与数据校验
|
|
67
75
|
|
|
68
|
-
|
|
76
|
+
平台监控直接读取 `reports/final/summary-data.json`,归档阶段不再生成本地 HTML 报告,也不得由模型临场维护第二份展示数据。
|
|
69
77
|
|
|
70
78
|
`validate` 是 `harness_archive.py finalize` 的内嵌同进程步骤(不再作为独立 `report validate` CLI 调用)。finalize 在 validate error 存在时恢复原 `.harness/changes/<change>` 目录并 exit 非 0,绝不归档未通过校验的变更。
|
|
71
79
|
|
|
72
80
|
## repair(归档后修复,不改写原版)
|
|
73
81
|
|
|
74
|
-
|
|
82
|
+
归档后发现来源事实与 summary-data 不一致时,使用显式修复(`replay` 仍为只读):
|
|
75
83
|
|
|
76
84
|
```powershell
|
|
77
85
|
python <skills-root>/scripts/harness_archive.py repair --archive-dir ".harness/archive/<archive-id>" --json
|
|
78
86
|
```
|
|
79
87
|
|
|
80
|
-
repair 在 archive
|
|
88
|
+
repair 在 archive 外生成候选版本。来源校验与数据校验通过后,写入不可变 `derived/v<N>/`(summary-data.json + repair-record.json),并更新 `derived/authoritative.json` pointer;原 summary 与 manifest 不覆盖。知识层仅从 authoritative pointer 且 hash 校验通过的版本提取。
|
|
81
89
|
|
|
82
90
|
## archive-meta.md 模板
|
|
83
91
|
|
|
@@ -103,8 +111,7 @@ cleanup 步骤(before-manifest 前):删除 `events.ndjson.lock`、`runtime
|
|
|
103
111
|
|
|
104
112
|
## 目录结构与最终状态规则
|
|
105
113
|
|
|
106
|
-
-
|
|
107
|
-
- `render-summary.mjs` 是默认 UTF-8 渲染器;finalize 内嵌调用,不得由模型临场写 HTML。
|
|
114
|
+
- 平台直接读取 `reports/final/summary-data.json`;本地不生成重复展示文件。
|
|
108
115
|
- 新路径优先:`meta/`、`logs/`、`evidence/`、`reports/final/`、`scripts/`、`backups/uncommitted-tests/`。旧路径只做读取兼容,不再写大量根目录文件。
|
|
109
116
|
- 当 `summary-data.json.verification.apiTests.status=USER_SKIPPED` 或 `verification.dbCompatibility.status=BLOCKED_BY_DBA`,最终状态必须是 `CONDITIONAL_OK`。
|
|
110
117
|
- 复杂 PowerShell 命令写入 `scripts/*.ps1` 后 `-File` 执行,禁止内联 `$` / `$_`。
|
package/harness/bundles/general/claude-code/harness-archive/templates/summary-data-template.json
CHANGED
|
@@ -203,13 +203,7 @@
|
|
|
203
203
|
"source": "events.ndjson | evidence/verification-ledger.json"
|
|
204
204
|
}
|
|
205
205
|
],
|
|
206
|
-
"artifacts": [
|
|
207
|
-
{
|
|
208
|
-
"path": "reports/final/final-summary.html",
|
|
209
|
-
"kind": "final-report",
|
|
210
|
-
"phase": "archive"
|
|
211
|
-
}
|
|
212
|
-
],
|
|
206
|
+
"artifacts": [],
|
|
213
207
|
"validationIssues": [],
|
|
214
208
|
"sourceConsistency": {
|
|
215
209
|
"ok": true,
|
|
@@ -20,7 +20,7 @@ disallowed-tools:
|
|
|
20
20
|
- Bash(awk *)
|
|
21
21
|
- Bash(curl *)
|
|
22
22
|
---
|
|
23
|
-
<!-- generated by harness_deploy.py; core=
|
|
23
|
+
<!-- generated by harness_deploy.py; core=a5e0c1d624b5fad6; overlay=none; agent=claude-code; do not edit -->
|
|
24
24
|
# harness-codebase-map — 代码库地图
|
|
25
25
|
|
|
26
26
|
## Purpose
|
|
@@ -8,7 +8,7 @@ disallowed-tools:
|
|
|
8
8
|
- Bash(git *)
|
|
9
9
|
- Bash(curl *)
|
|
10
10
|
---
|
|
11
|
-
<!-- generated by harness_deploy.py; core=
|
|
11
|
+
<!-- generated by harness_deploy.py; core=a5e0c1d624b5fad6; overlay=none; agent=claude-code; do not edit -->
|
|
12
12
|
# harness-knowledge-ingest
|
|
13
13
|
|
|
14
14
|
知识 ingest 完全由 Hunter Platform 负责。归档完成时,客户端生成一个确定性 ZIP;
|
|
@@ -8,7 +8,7 @@ disallowed-tools:
|
|
|
8
8
|
- Bash(git *)
|
|
9
9
|
- Bash(curl *)
|
|
10
10
|
---
|
|
11
|
-
<!-- generated by harness_deploy.py; core=
|
|
11
|
+
<!-- generated by harness_deploy.py; core=a5e0c1d624b5fad6; overlay=none; agent=claude-code; do not edit -->
|
|
12
12
|
# harness-knowledge-query
|
|
13
13
|
|
|
14
14
|
项目知识以 Hunter Platform 的服务端索引为唯一真源。客户端只提交查询并消费结果:
|
|
@@ -21,7 +21,7 @@ disallowed-tools:
|
|
|
21
21
|
- Bash(awk *)
|
|
22
22
|
- Bash(curl *)
|
|
23
23
|
---
|
|
24
|
-
<!-- generated by harness_deploy.py; core=
|
|
24
|
+
<!-- generated by harness_deploy.py; core=a5e0c1d624b5fad6; overlay=none; agent=claude-code; do not edit -->
|
|
25
25
|
# harness-plan — 需求规划
|
|
26
26
|
|
|
27
27
|
## Purpose
|
|
@@ -46,7 +46,7 @@ disallowed-tools:
|
|
|
46
46
|
6. **implementation-detail** — 自适应执行参考;legacy 缺失 🟡WARN,不阻断
|
|
47
47
|
7. **test-scenarios** — 测试真相源:`plans/<change>-test-scenarios.md`
|
|
48
48
|
8. **禁止读取 `docs/superpowers/` 作为正式输入** — 旧草稿仅人工线索
|
|
49
|
-
9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit
|
|
49
|
+
9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --json`。首次 Plan 捕获时,脚本把当时的 Git HEAD 写入不可变 `changeBase`;后续阶段只刷新 `git.head` 与各段指纹,不得用当前 HEAD 覆盖 `changeBase`。只有迁移旧 change 且已能证明真实计划起点时,才在首次补录时传 `--base <baseCommit>`。`changedSegments=[]` 时复用已有 profile/rules/map/change/code 指纹,不再重复跑全量 `harness-sync` 或代码库扫描。`knowledge` 段仅为兼容空段,知识始终按需远端查询;快照不能替代源码读取和验证门禁。
|
|
50
50
|
|
|
51
51
|
状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
|
|
52
52
|
> 片段:read-protocol · plan 额外写 `meta/worktree.json`、`meta/change-context.json`
|
|
@@ -85,7 +85,7 @@ disallowed-tools:
|
|
|
85
85
|
| 阶段 | 动作 |
|
|
86
86
|
|------|------|
|
|
87
87
|
| 0 | 用当前解释器运行 `harness_runtime.py doctor`,后续消费绝对 argv;git status;脏工作区 → baseline 隔离 + `decision`,不询问 |
|
|
88
|
-
| 0.5 | 确定英文 `change-name` 后,根据需求生成一次简洁的中文展示标题(建议 6~24 个可见字符,保留必要产品名),执行 `harness_context.py prepare --phase plan --executor <tool> [--change <id>] --title "<中文标题>" --json
|
|
88
|
+
| 0.5 | 确定英文 `change-name` 后,根据需求生成一次简洁的中文展示标题(建议 6~24 个可见字符,保留必要产品名),执行 `harness_context.py prepare --phase plan --executor <tool> [--change <id>] --title "<中文标题>" --json`;英文名继续作为目录与稳定标识。立即运行一次 `harness_state.py capture --project . --change-dir "<executionRoot>" --json`,把此时 HEAD 固定为不可变 `changeBase`。以其唯一 change/executionRoot 初始化 plan-run-id 与 attempt(首次为 1),用同一身份追加 `phase.start`;从第一条知识查询起保留事件证据,并在 finalizer 中复用该身份 |
|
|
89
89
|
| 0.6 | 使用 `classify` 返回的默认阶段和项目能力生成 `plannedPhases`,向用户用中文说明可选阶段;确认后运行 `harness_context.py configure-plan --project . --change <id> --phases "plan,run,...,archive" --operator <tool> --reason "<中文原因>" --json`。无 Git 或不需要提交时不得加入 `submit`;快速迭代默认 `plan,run,archive`。省略项由脚本写入 `skippedPhases`,不得伪造阶段事件 |
|
|
90
90
|
| 1 | `harness-knowledge-query` 单次远端 query(失败记 `issue`,不建立本地索引或离线回退) |
|
|
91
91
|
| 2 | 歧义优先检查 + 复杂度分级;先确认会改变实现方向的语义歧义 |
|
|
@@ -126,7 +126,7 @@ change-name 范围变更 → 提示重命名或记 🟡WARN(→ `reference.md`
|
|
|
126
126
|
| 简单修复探索预算 | 预计不超过 2 个代码文件、且不涉及认证/安全/迁移/并发/API 契约重设时,最多 1 次合并 CodeGraph 查询 + 1 次定向补查、1 个用户澄清问题;无关发现只记非阻断说明 |
|
|
127
127
|
| 精简产物 | 简单修复只保留实现所需的设计、任务、边界和测试;禁止在 spec/plan/detail/scenarios 中重复同一背景和结论 |
|
|
128
128
|
| 测试执行成本 | 场景表必须设计快速反馈层级、预计时长、资源预算、超时和可复用证据;默认先跑受影响测试,再跑模块门禁,候选验证只复用身份一致的全量证据 |
|
|
129
|
-
| state snapshot |
|
|
129
|
+
| state snapshot | Plan 首次 capture 固定不可变 `changeBase`;后续刷新只更新 HEAD 和各段指纹,不得把当前 HEAD 写回为基线。读取 `state-snapshot.json` 了解 project/worktree root、HEAD/base、profile/rules/map/knowledge 指纹;失效由脚本刷新,**不得仅凭缓存跳过代码探索或验证门禁**(design §3.6) |
|
|
130
130
|
| 协议 | sensitive-info / evidence-based-reporting / state-layout |
|
|
131
131
|
|
|
132
132
|
产出物表、frontmatter、legacy 兼容、结束输出模板 → `reference.md`
|
|
@@ -22,7 +22,7 @@ disallowed-tools:
|
|
|
22
22
|
- Bash(curl *)
|
|
23
23
|
- Bash(codegraph *)
|
|
24
24
|
---
|
|
25
|
-
<!-- generated by harness_deploy.py; core=
|
|
25
|
+
<!-- generated by harness_deploy.py; core=a5e0c1d624b5fad6; overlay=none; agent=claude-code; do not edit -->
|
|
26
26
|
# harness-review — 代码审查
|
|
27
27
|
|
|
28
28
|
## Purpose
|
|
@@ -56,7 +56,7 @@ disallowed-tools:
|
|
|
56
56
|
6. **implementation-detail** — 自适应执行参考;legacy 缺失 🟡WARN,不阻断
|
|
57
57
|
7. **test-scenarios** — 测试真相源:`plans/<change>-test-scenarios.md`
|
|
58
58
|
8. **禁止读取 `docs/superpowers/` 作为正式输入** — 旧草稿仅人工线索
|
|
59
|
-
9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit
|
|
59
|
+
9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --json`。首次 Plan 捕获时,脚本把当时的 Git HEAD 写入不可变 `changeBase`;后续阶段只刷新 `git.head` 与各段指纹,不得用当前 HEAD 覆盖 `changeBase`。只有迁移旧 change 且已能证明真实计划起点时,才在首次补录时传 `--base <baseCommit>`。`changedSegments=[]` 时复用已有 profile/rules/map/change/code 指纹,不再重复跑全量 `harness-sync` 或代码库扫描。`knowledge` 段仅为兼容空段,知识始终按需远端查询;快照不能替代源码读取和验证门禁。
|
|
60
60
|
|
|
61
61
|
状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
|
|
62
62
|
> 片段:read-protocol
|