@hunter-harness/workflow-harness 0.3.1 → 0.4.1
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/harness-archive/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-archive/reference.md +30 -1
- package/harness/bundles/general/claude-code/harness-archive/templates/summary-data-template.json +1 -0
- package/harness/bundles/general/claude-code/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-execute/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 +1 -1
- package/harness/bundles/general/claude-code/harness-pull/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-push/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-review/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-run/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-submit/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-test/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/scripts/harness_archive.py +146 -8
- package/harness/bundles/general/claude-code/scripts/harness_deploy.py +1 -1
- package/harness/bundles/general/claude-code/scripts/harness_knowledge_candidates.py +538 -4
- package/harness/bundles/general/codebuddy/.harness-build.json +1 -1
- package/harness/bundles/general/codebuddy/harness-archive/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-archive/reference.md +30 -1
- package/harness/bundles/general/codebuddy/harness-archive/templates/summary-data-template.json +1 -0
- package/harness/bundles/general/codebuddy/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-execute/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 +1 -1
- package/harness/bundles/general/codebuddy/harness-pull/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-push/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-review/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-run/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-submit/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-test/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/scripts/harness_archive.py +146 -8
- package/harness/bundles/general/codebuddy/scripts/harness_deploy.py +1 -1
- package/harness/bundles/general/codebuddy/scripts/harness_knowledge_candidates.py +538 -4
- package/harness/bundles/general/codex/.harness-build.json +1 -1
- package/harness/bundles/general/codex/harness-archive/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-archive/reference.md +30 -1
- package/harness/bundles/general/codex/harness-archive/templates/summary-data-template.json +1 -0
- package/harness/bundles/general/codex/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-execute/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 +1 -1
- package/harness/bundles/general/codex/harness-pull/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-push/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-review/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-run/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-submit/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-test/SKILL.md +1 -1
- package/harness/bundles/general/codex/scripts/harness_archive.py +146 -8
- package/harness/bundles/general/codex/scripts/harness_deploy.py +1 -1
- package/harness/bundles/general/codex/scripts/harness_knowledge_candidates.py +538 -4
- package/harness/bundles/general/cursor/.harness-build.json +1 -1
- package/harness/bundles/general/cursor/harness-archive/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-archive/reference.md +30 -1
- package/harness/bundles/general/cursor/harness-archive/templates/summary-data-template.json +1 -0
- package/harness/bundles/general/cursor/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-execute/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 +1 -1
- package/harness/bundles/general/cursor/harness-pull/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-push/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-review/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-run/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-submit/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-test/SKILL.md +1 -1
- package/harness/bundles/general/cursor/scripts/harness_archive.py +146 -8
- package/harness/bundles/general/cursor/scripts/harness_deploy.py +1 -1
- package/harness/bundles/general/cursor/scripts/harness_knowledge_candidates.py +538 -4
- package/harness/bundles/general/pi/.harness-build.json +6 -0
- package/harness/bundles/general/pi/CONTEXT.md +98 -0
- package/harness/bundles/general/pi/README.md +478 -0
- package/harness/bundles/general/pi/contracts/build-profile-v3.schema.json +302 -0
- package/harness/bundles/general/pi/contracts/ci-metrics.schema.json +36 -0
- package/harness/bundles/general/pi/contracts/doctor-capability.schema.json +43 -0
- package/harness/bundles/general/pi/contracts/external-platform-observation.schema.json +62 -0
- package/harness/bundles/general/pi/contracts/fixtures/managed-execution.json +341 -0
- package/harness/bundles/general/pi/contracts/process-identity.schema.json +132 -0
- package/harness/bundles/general/pi/contracts/run-session.schema.json +142 -0
- package/harness/bundles/general/pi/contracts/service-retirement-receipt.schema.json +85 -0
- package/harness/bundles/general/pi/contracts/service-session.schema.json +147 -0
- package/harness/bundles/general/pi/contracts/workflow-policy.json +574 -0
- package/harness/bundles/general/pi/harness-archive/SKILL.md +322 -0
- package/harness/bundles/general/pi/harness-archive/checklist.md +71 -0
- package/harness/bundles/general/pi/harness-archive/reference.md +150 -0
- package/harness/bundles/general/pi/harness-archive/scripts/gen-manifest.ps1 +31 -0
- package/harness/bundles/general/pi/harness-archive/templates/summary-data-template.json +218 -0
- package/harness/bundles/general/pi/harness-codebase-map/SKILL.md +116 -0
- package/harness/bundles/general/pi/harness-codebase-map/checklist.md +126 -0
- package/harness/bundles/general/pi/harness-codebase-map/reference.md +364 -0
- package/harness/bundles/general/pi/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
- package/harness/bundles/general/pi/harness-codebase-map/templates/CONCERNS.md +49 -0
- package/harness/bundles/general/pi/harness-codebase-map/templates/CONVENTIONS.md +57 -0
- package/harness/bundles/general/pi/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
- package/harness/bundles/general/pi/harness-codebase-map/templates/STACK.md +55 -0
- package/harness/bundles/general/pi/harness-codebase-map/templates/STRUCTURE.md +69 -0
- package/harness/bundles/general/pi/harness-codebase-map/templates/TESTING.md +64 -0
- package/harness/bundles/general/pi/harness-codebase-map/templates/map-manifest.schema.json +73 -0
- package/harness/bundles/general/pi/harness-codebase-map/templates/map-summary.md +64 -0
- package/harness/bundles/general/pi/harness-execute/SKILL.md +170 -0
- package/harness/bundles/general/pi/harness-knowledge-ingest/SKILL.md +103 -0
- package/harness/bundles/general/pi/harness-knowledge-query/SKILL.md +97 -0
- package/harness/bundles/general/pi/harness-plan/SKILL.md +158 -0
- package/harness/bundles/general/pi/harness-plan/checklist.md +243 -0
- package/harness/bundles/general/pi/harness-plan/protocols.md +133 -0
- package/harness/bundles/general/pi/harness-plan/reference.md +468 -0
- package/harness/bundles/general/pi/harness-pull/SKILL.md +55 -0
- package/harness/bundles/general/pi/harness-push/SKILL.md +83 -0
- package/harness/bundles/general/pi/harness-review/SKILL.md +175 -0
- package/harness/bundles/general/pi/harness-review/checklist.md +124 -0
- package/harness/bundles/general/pi/harness-review/protocols.md +69 -0
- package/harness/bundles/general/pi/harness-review/reference.md +114 -0
- package/harness/bundles/general/pi/harness-run/SKILL.md +188 -0
- package/harness/bundles/general/pi/harness-run/checklist.md +279 -0
- package/harness/bundles/general/pi/harness-run/protocols.md +141 -0
- package/harness/bundles/general/pi/harness-run/reference.md +886 -0
- package/harness/bundles/general/pi/harness-submit/SKILL.md +182 -0
- package/harness/bundles/general/pi/harness-submit/checklist.md +452 -0
- package/harness/bundles/general/pi/harness-submit/reference.md +152 -0
- package/harness/bundles/general/pi/harness-sync/SKILL.md +72 -0
- package/harness/bundles/general/pi/harness-sync/reference.md +176 -0
- package/harness/bundles/general/pi/harness-test/SKILL.md +250 -0
- package/harness/bundles/general/pi/harness-test/checklist.md +359 -0
- package/harness/bundles/general/pi/harness-test/pitfalls-java.md +14 -0
- package/harness/bundles/general/pi/harness-test/pitfalls.md +307 -0
- package/harness/bundles/general/pi/harness-test/reference.md +880 -0
- package/harness/bundles/general/pi/harness-test/scripts/runtime-helpers.mjs +216 -0
- package/harness/bundles/general/pi/protocols/archive-report-protocol.md +196 -0
- package/harness/bundles/general/pi/protocols/ci-layering-protocol.md +22 -0
- package/harness/bundles/general/pi/protocols/evidence-based-reporting-protocol.md +134 -0
- package/harness/bundles/general/pi/protocols/execution-session-protocol.md +52 -0
- package/harness/bundles/general/pi/protocols/external-platform-protocol.md +27 -0
- package/harness/bundles/general/pi/protocols/ledger-protocol.md +365 -0
- package/harness/bundles/general/pi/protocols/memory-closeout-protocol.md +21 -0
- package/harness/bundles/general/pi/protocols/model-routing-protocol.md +22 -0
- package/harness/bundles/general/pi/protocols/powershell-protocol.md +238 -0
- package/harness/bundles/general/pi/protocols/registry-governance-protocol.md +31 -0
- package/harness/bundles/general/pi/protocols/report-pipeline-protocol.md +172 -0
- package/harness/bundles/general/pi/protocols/sensitive-info-protocol.md +110 -0
- package/harness/bundles/general/pi/protocols/state-layout-protocol.md +209 -0
- package/harness/bundles/general/pi/protocols/submit-protocol.md +78 -0
- package/harness/bundles/general/pi/protocols/verification-graph-protocol.md +32 -0
- package/harness/bundles/general/pi/scripts/harness_adoption_metrics.py +391 -0
- package/harness/bundles/general/pi/scripts/harness_apidoc.py +53 -0
- package/harness/bundles/general/pi/scripts/harness_archive.py +11345 -0
- package/harness/bundles/general/pi/scripts/harness_change.py +1626 -0
- package/harness/bundles/general/pi/scripts/harness_check_gate.py +113 -0
- package/harness/bundles/general/pi/scripts/harness_context.py +1774 -0
- package/harness/bundles/general/pi/scripts/harness_deploy.py +968 -0
- package/harness/bundles/general/pi/scripts/harness_efficiency.py +443 -0
- package/harness/bundles/general/pi/scripts/harness_environment.py +1690 -0
- package/harness/bundles/general/pi/scripts/harness_events.py +2234 -0
- package/harness/bundles/general/pi/scripts/harness_events_sync.py +1425 -0
- package/harness/bundles/general/pi/scripts/harness_execution_contracts.py +596 -0
- package/harness/bundles/general/pi/scripts/harness_fixback.py +1975 -0
- package/harness/bundles/general/pi/scripts/harness_gate.py +3816 -0
- package/harness/bundles/general/pi/scripts/harness_headless.py +37 -0
- package/harness/bundles/general/pi/scripts/harness_integration.py +2564 -0
- package/harness/bundles/general/pi/scripts/harness_knowledge_candidates.py +796 -0
- package/harness/bundles/general/pi/scripts/harness_ledger.py +3556 -0
- package/harness/bundles/general/pi/scripts/harness_migration_head.py +220 -0
- package/harness/bundles/general/pi/scripts/harness_orchestration.py +344 -0
- package/harness/bundles/general/pi/scripts/harness_paths.py +676 -0
- package/harness/bundles/general/pi/scripts/harness_phase.py +1726 -0
- package/harness/bundles/general/pi/scripts/harness_plan_aggregate.py +249 -0
- package/harness/bundles/general/pi/scripts/harness_plan_finalize.py +1016 -0
- package/harness/bundles/general/pi/scripts/harness_preflight.py +650 -0
- package/harness/bundles/general/pi/scripts/harness_process.py +1065 -0
- package/harness/bundles/general/pi/scripts/harness_profile.py +1817 -0
- package/harness/bundles/general/pi/scripts/harness_report_model.py +442 -0
- package/harness/bundles/general/pi/scripts/harness_retry.py +175 -0
- package/harness/bundles/general/pi/scripts/harness_review.py +631 -0
- package/harness/bundles/general/pi/scripts/harness_runtime.py +2243 -0
- package/harness/bundles/general/pi/scripts/harness_service.py +3355 -0
- package/harness/bundles/general/pi/scripts/harness_state.py +365 -0
- package/harness/bundles/general/pi/scripts/harness_sync.py +407 -0
- package/harness/bundles/general/pi/scripts/harness_test_cleanup.py +175 -0
- package/harness/bundles/general/pi/scripts/harness_test_guard.py +1899 -0
- package/harness/bundles/general/pi/scripts/harness_test_runner.py +1586 -0
- package/harness/bundles/general/pi/scripts/harness_verification.py +593 -0
- package/harness/bundles/general/pi/scripts/harness_workflow_policy.py +266 -0
- package/harness/bundles/java/claude-code/.harness-build.json +1 -1
- package/harness/bundles/java/claude-code/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-archive/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-archive/reference.md +30 -1
- package/harness/bundles/java/claude-code/harness-archive/templates/summary-data-template.json +1 -0
- package/harness/bundles/java/claude-code/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-execute/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 +1 -1
- package/harness/bundles/java/claude-code/harness-plan/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-pull/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-push/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-review/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-run/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-submit/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-test/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/scripts/harness_archive.py +146 -8
- package/harness/bundles/java/claude-code/scripts/harness_deploy.py +1 -1
- package/harness/bundles/java/claude-code/scripts/harness_knowledge_candidates.py +538 -4
- package/harness/bundles/java/codebuddy/.harness-build.json +1 -1
- package/harness/bundles/java/codebuddy/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-archive/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-archive/reference.md +30 -1
- package/harness/bundles/java/codebuddy/harness-archive/templates/summary-data-template.json +1 -0
- package/harness/bundles/java/codebuddy/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-execute/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 +1 -1
- package/harness/bundles/java/codebuddy/harness-plan/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-pull/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-push/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-review/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-run/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-submit/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-test/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/scripts/harness_archive.py +146 -8
- package/harness/bundles/java/codebuddy/scripts/harness_deploy.py +1 -1
- package/harness/bundles/java/codebuddy/scripts/harness_knowledge_candidates.py +538 -4
- package/harness/bundles/java/codex/.harness-build.json +1 -1
- package/harness/bundles/java/codex/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-archive/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-archive/reference.md +30 -1
- package/harness/bundles/java/codex/harness-archive/templates/summary-data-template.json +1 -0
- package/harness/bundles/java/codex/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-execute/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 +1 -1
- package/harness/bundles/java/codex/harness-plan/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-pull/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-push/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-review/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-run/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-submit/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-test/SKILL.md +1 -1
- package/harness/bundles/java/codex/scripts/harness_archive.py +146 -8
- package/harness/bundles/java/codex/scripts/harness_deploy.py +1 -1
- package/harness/bundles/java/codex/scripts/harness_knowledge_candidates.py +538 -4
- package/harness/bundles/java/cursor/.harness-build.json +1 -1
- package/harness/bundles/java/cursor/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-archive/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-archive/reference.md +30 -1
- package/harness/bundles/java/cursor/harness-archive/templates/summary-data-template.json +1 -0
- package/harness/bundles/java/cursor/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-execute/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 +1 -1
- package/harness/bundles/java/cursor/harness-plan/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-pull/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-push/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-review/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-run/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-submit/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-test/SKILL.md +1 -1
- package/harness/bundles/java/cursor/scripts/harness_archive.py +146 -8
- package/harness/bundles/java/cursor/scripts/harness_deploy.py +1 -1
- package/harness/bundles/java/cursor/scripts/harness_knowledge_candidates.py +538 -4
- package/harness/bundles/java/pi/.harness-build.json +6 -0
- package/harness/bundles/java/pi/CONTEXT.md +98 -0
- package/harness/bundles/java/pi/README.md +478 -0
- package/harness/bundles/java/pi/contracts/build-profile-v3.schema.json +302 -0
- package/harness/bundles/java/pi/contracts/ci-metrics.schema.json +36 -0
- package/harness/bundles/java/pi/contracts/doctor-capability.schema.json +43 -0
- package/harness/bundles/java/pi/contracts/external-platform-observation.schema.json +62 -0
- package/harness/bundles/java/pi/contracts/fixtures/managed-execution.json +341 -0
- package/harness/bundles/java/pi/contracts/process-identity.schema.json +132 -0
- package/harness/bundles/java/pi/contracts/run-session.schema.json +142 -0
- package/harness/bundles/java/pi/contracts/service-retirement-receipt.schema.json +85 -0
- package/harness/bundles/java/pi/contracts/service-session.schema.json +147 -0
- package/harness/bundles/java/pi/contracts/workflow-policy.json +574 -0
- package/harness/bundles/java/pi/harness-apidoc/SKILL.md +97 -0
- package/harness/bundles/java/pi/harness-apidoc/checklist.md +142 -0
- package/harness/bundles/java/pi/harness-apidoc/reference.md +233 -0
- package/harness/bundles/java/pi/harness-archive/SKILL.md +322 -0
- package/harness/bundles/java/pi/harness-archive/checklist.md +71 -0
- package/harness/bundles/java/pi/harness-archive/reference.md +150 -0
- package/harness/bundles/java/pi/harness-archive/scripts/gen-manifest.ps1 +31 -0
- package/harness/bundles/java/pi/harness-archive/templates/summary-data-template.json +218 -0
- package/harness/bundles/java/pi/harness-codebase-map/SKILL.md +116 -0
- package/harness/bundles/java/pi/harness-codebase-map/checklist.md +126 -0
- package/harness/bundles/java/pi/harness-codebase-map/reference.md +364 -0
- package/harness/bundles/java/pi/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
- package/harness/bundles/java/pi/harness-codebase-map/templates/CONCERNS.md +49 -0
- package/harness/bundles/java/pi/harness-codebase-map/templates/CONVENTIONS.md +57 -0
- package/harness/bundles/java/pi/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
- package/harness/bundles/java/pi/harness-codebase-map/templates/STACK.md +55 -0
- package/harness/bundles/java/pi/harness-codebase-map/templates/STRUCTURE.md +69 -0
- package/harness/bundles/java/pi/harness-codebase-map/templates/TESTING.md +64 -0
- package/harness/bundles/java/pi/harness-codebase-map/templates/map-manifest.schema.json +73 -0
- package/harness/bundles/java/pi/harness-codebase-map/templates/map-summary.md +64 -0
- package/harness/bundles/java/pi/harness-execute/SKILL.md +170 -0
- package/harness/bundles/java/pi/harness-knowledge-ingest/SKILL.md +103 -0
- package/harness/bundles/java/pi/harness-knowledge-query/SKILL.md +97 -0
- package/harness/bundles/java/pi/harness-package/SKILL.md +94 -0
- package/harness/bundles/java/pi/harness-package/checklist.md +322 -0
- package/harness/bundles/java/pi/harness-package/reference.md +210 -0
- package/harness/bundles/java/pi/harness-plan/SKILL.md +158 -0
- package/harness/bundles/java/pi/harness-plan/checklist.md +243 -0
- package/harness/bundles/java/pi/harness-plan/protocols.md +133 -0
- package/harness/bundles/java/pi/harness-plan/reference.md +468 -0
- package/harness/bundles/java/pi/harness-pull/SKILL.md +55 -0
- package/harness/bundles/java/pi/harness-push/SKILL.md +83 -0
- package/harness/bundles/java/pi/harness-review/SKILL.md +175 -0
- package/harness/bundles/java/pi/harness-review/checklist.md +124 -0
- package/harness/bundles/java/pi/harness-review/protocols.md +69 -0
- package/harness/bundles/java/pi/harness-review/reference.md +114 -0
- package/harness/bundles/java/pi/harness-run/SKILL.md +206 -0
- package/harness/bundles/java/pi/harness-run/checklist.md +252 -0
- package/harness/bundles/java/pi/harness-run/protocols.md +141 -0
- package/harness/bundles/java/pi/harness-run/reference.md +820 -0
- package/harness/bundles/java/pi/harness-submit/SKILL.md +189 -0
- package/harness/bundles/java/pi/harness-submit/checklist.md +452 -0
- package/harness/bundles/java/pi/harness-submit/reference.md +152 -0
- package/harness/bundles/java/pi/harness-sync/SKILL.md +72 -0
- package/harness/bundles/java/pi/harness-sync/reference.md +176 -0
- package/harness/bundles/java/pi/harness-test/SKILL.md +264 -0
- package/harness/bundles/java/pi/harness-test/checklist.md +320 -0
- package/harness/bundles/java/pi/harness-test/pitfalls-java.md +16 -0
- package/harness/bundles/java/pi/harness-test/pitfalls.md +307 -0
- package/harness/bundles/java/pi/harness-test/reference.md +792 -0
- package/harness/bundles/java/pi/harness-test/scripts/runtime-helpers.mjs +216 -0
- package/harness/bundles/java/pi/protocols/archive-report-protocol.md +196 -0
- package/harness/bundles/java/pi/protocols/ci-layering-protocol.md +22 -0
- package/harness/bundles/java/pi/protocols/evidence-based-reporting-protocol.md +134 -0
- package/harness/bundles/java/pi/protocols/execution-session-protocol.md +52 -0
- package/harness/bundles/java/pi/protocols/external-platform-protocol.md +27 -0
- package/harness/bundles/java/pi/protocols/ledger-protocol.md +365 -0
- package/harness/bundles/java/pi/protocols/memory-closeout-protocol.md +21 -0
- package/harness/bundles/java/pi/protocols/model-routing-protocol.md +22 -0
- package/harness/bundles/java/pi/protocols/powershell-protocol.md +238 -0
- package/harness/bundles/java/pi/protocols/registry-governance-protocol.md +31 -0
- package/harness/bundles/java/pi/protocols/report-pipeline-protocol.md +172 -0
- package/harness/bundles/java/pi/protocols/sensitive-info-protocol.md +110 -0
- package/harness/bundles/java/pi/protocols/state-layout-protocol.md +209 -0
- package/harness/bundles/java/pi/protocols/submit-protocol.md +78 -0
- package/harness/bundles/java/pi/protocols/verification-graph-protocol.md +32 -0
- package/harness/bundles/java/pi/scripts/harness_adoption_metrics.py +391 -0
- package/harness/bundles/java/pi/scripts/harness_apidoc.py +53 -0
- package/harness/bundles/java/pi/scripts/harness_archive.py +11345 -0
- package/harness/bundles/java/pi/scripts/harness_change.py +1626 -0
- package/harness/bundles/java/pi/scripts/harness_check_gate.py +113 -0
- package/harness/bundles/java/pi/scripts/harness_context.py +1774 -0
- package/harness/bundles/java/pi/scripts/harness_deploy.py +968 -0
- package/harness/bundles/java/pi/scripts/harness_efficiency.py +443 -0
- package/harness/bundles/java/pi/scripts/harness_environment.py +1690 -0
- package/harness/bundles/java/pi/scripts/harness_events.py +2234 -0
- package/harness/bundles/java/pi/scripts/harness_events_sync.py +1425 -0
- package/harness/bundles/java/pi/scripts/harness_execution_contracts.py +596 -0
- package/harness/bundles/java/pi/scripts/harness_fixback.py +1975 -0
- package/harness/bundles/java/pi/scripts/harness_gate.py +3816 -0
- package/harness/bundles/java/pi/scripts/harness_headless.py +37 -0
- package/harness/bundles/java/pi/scripts/harness_integration.py +2564 -0
- package/harness/bundles/java/pi/scripts/harness_knowledge_candidates.py +796 -0
- package/harness/bundles/java/pi/scripts/harness_ledger.py +3556 -0
- package/harness/bundles/java/pi/scripts/harness_migration_head.py +220 -0
- package/harness/bundles/java/pi/scripts/harness_orchestration.py +344 -0
- package/harness/bundles/java/pi/scripts/harness_paths.py +676 -0
- package/harness/bundles/java/pi/scripts/harness_phase.py +1726 -0
- package/harness/bundles/java/pi/scripts/harness_plan_aggregate.py +249 -0
- package/harness/bundles/java/pi/scripts/harness_plan_finalize.py +1016 -0
- package/harness/bundles/java/pi/scripts/harness_preflight.py +650 -0
- package/harness/bundles/java/pi/scripts/harness_process.py +1065 -0
- package/harness/bundles/java/pi/scripts/harness_profile.py +1817 -0
- package/harness/bundles/java/pi/scripts/harness_report_model.py +442 -0
- package/harness/bundles/java/pi/scripts/harness_retry.py +175 -0
- package/harness/bundles/java/pi/scripts/harness_review.py +631 -0
- package/harness/bundles/java/pi/scripts/harness_runtime.py +2243 -0
- package/harness/bundles/java/pi/scripts/harness_service.py +3355 -0
- package/harness/bundles/java/pi/scripts/harness_state.py +365 -0
- package/harness/bundles/java/pi/scripts/harness_sync.py +407 -0
- package/harness/bundles/java/pi/scripts/harness_test_cleanup.py +175 -0
- package/harness/bundles/java/pi/scripts/harness_test_guard.py +1899 -0
- package/harness/bundles/java/pi/scripts/harness_test_runner.py +1586 -0
- package/harness/bundles/java/pi/scripts/harness_verification.py +593 -0
- package/harness/bundles/java/pi/scripts/harness_workflow_policy.py +266 -0
- package/harness/manifests/general/claude-code.json +19 -19
- package/harness/manifests/general/codebuddy.json +19 -19
- package/harness/manifests/general/codex.json +19 -19
- package/harness/manifests/general/cursor.json +19 -19
- package/harness/manifests/general/pi.json +475 -0
- package/harness/manifests/java/claude-code.json +21 -21
- package/harness/manifests/java/codebuddy.json +21 -21
- package/harness/manifests/java/codex.json +21 -21
- package/harness/manifests/java/cursor.json +21 -21
- package/harness/manifests/java/pi.json +499 -0
- package/hunter-workflow-family.json +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: harness-submit 的提交格式、固定交互模板和中文 commit 文件流程。仅在执行提交流程时读取。
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# harness-submit 参考
|
|
6
|
+
|
|
7
|
+
## 提交方式 blocking user confirmation 固定模板
|
|
8
|
+
|
|
9
|
+
问题标题:`请选择提交方式`
|
|
10
|
+
|
|
11
|
+
选项:
|
|
12
|
+
|
|
13
|
+
1. `commit + push 到当前 upstream`
|
|
14
|
+
2. `仅本地 commit,不 push`
|
|
15
|
+
3. `取消提交`
|
|
16
|
+
|
|
17
|
+
不得临场增加复杂对象或嵌套参数,避免 blocking user confirmation 参数错误。
|
|
18
|
+
|
|
19
|
+
> **worktree 模式(meta/worktree.json requested=true)**:固定选项 2「仅本地 commit」,不展示「commit+push」;commit 成功后 skill **自动接续** worktree 合并流程(`/harness-merge` 为别名)。push 只在主分支完成,产出 `mergeFinalHash`。
|
|
20
|
+
|
|
21
|
+
## Commit Message 固定格式
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
<type>(<scope>): <中文摘要>
|
|
25
|
+
|
|
26
|
+
- 变更点 1
|
|
27
|
+
- 变更点 2
|
|
28
|
+
|
|
29
|
+
验证:
|
|
30
|
+
- <复用 ledger / 重跑验证摘要>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
禁止 footer:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
Co-Authored-By: ...
|
|
37
|
+
Generated by ...
|
|
38
|
+
AI generated ...
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 中文 commit 文件流程
|
|
42
|
+
|
|
43
|
+
1. 创建 runtime 目录:
|
|
44
|
+
|
|
45
|
+
```powershell
|
|
46
|
+
powershell.exe -NoProfile -Command "New-Item -ItemType Directory -Force '.harness/changes/<change>/runtime'"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
2. 写入 message 文件:
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
.harness/changes/<change>/runtime/commit-message.txt
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
3. 用户确认后提交:
|
|
56
|
+
|
|
57
|
+
```powershell
|
|
58
|
+
powershell.exe -NoProfile -Command "git -C '<项目路径>' commit -F '.harness/changes/<change>/runtime/commit-message.txt'"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
禁止:
|
|
62
|
+
|
|
63
|
+
- 命令行内联长中文 commit message;
|
|
64
|
+
- 先英文 commit,再 amend 成中文;
|
|
65
|
+
- 使用 `--no-verify`、`--no-gpg-sign`。
|
|
66
|
+
|
|
67
|
+
## Commit Message 确认模板
|
|
68
|
+
|
|
69
|
+
```markdown
|
|
70
|
+
## 准备提交
|
|
71
|
+
|
|
72
|
+
### 1. Staged 文件
|
|
73
|
+
<git diff --cached --name-only 的实际输出>
|
|
74
|
+
|
|
75
|
+
### 2. Diff Stat
|
|
76
|
+
<git diff --cached --stat 的实际输出>
|
|
77
|
+
|
|
78
|
+
### 3. Commit Message
|
|
79
|
+
```text
|
|
80
|
+
<commit message 完整内容>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### 4. Push 策略
|
|
84
|
+
commit + push / 仅本地 commit
|
|
85
|
+
|
|
86
|
+
确认提交吗?
|
|
87
|
+
1. 确认提交
|
|
88
|
+
2. 修改 message
|
|
89
|
+
3. 取消
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## 远端检查
|
|
93
|
+
|
|
94
|
+
push 前必须执行:
|
|
95
|
+
|
|
96
|
+
```powershell
|
|
97
|
+
powershell.exe -NoProfile -Command "git -C '<项目路径>' fetch"
|
|
98
|
+
powershell.exe -NoProfile -Command "git -C '<项目路径>' log HEAD..@{u} --oneline"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
远端有新提交时,必须让用户选择:
|
|
102
|
+
|
|
103
|
+
1. rebase 后重跑必要验证;
|
|
104
|
+
2. 停止 push,保留本地 commit。
|
|
105
|
+
|
|
106
|
+
## 输出示例
|
|
107
|
+
|
|
108
|
+
```markdown
|
|
109
|
+
## 提交完成 — <change-name>
|
|
110
|
+
|
|
111
|
+
- Commit: `<final-hash>`
|
|
112
|
+
- Push: ✅ 已推送 / ⏭️ 仅本地 commit
|
|
113
|
+
- Commit message: `.harness/changes/<change>/runtime/commit-message.txt`
|
|
114
|
+
- 验证策略: 🔁 复用 test ledger / 🔄 已重跑
|
|
115
|
+
- 下一步: `/harness-archive`
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Worktree 清理兜底(Windows)
|
|
119
|
+
|
|
120
|
+
`git worktree remove <path>` 在 Windows 下常因目录残留 `node_modules` 等深嵌套 gitignored 文件失败(报 "Directory not empty",git 无法删空目录)。按顺序兜底:
|
|
121
|
+
|
|
122
|
+
1. **先删 git 注册和本地分支**(分支须已推送 origin):
|
|
123
|
+
```powershell
|
|
124
|
+
powershell.exe -Command "git -C '<项目路径>' worktree remove '<worktree-path>' --force"
|
|
125
|
+
powershell.exe -Command "git -C '<项目路径>' branch -D <branch>"
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
2. **若目录仍残留**(git 注册已移除但磁盘目录还在):用 robocopy 空 source 镜像清空(能处理长路径与 `node_modules` 深嵌套):
|
|
129
|
+
```powershell
|
|
130
|
+
powershell.exe -Command "$empty=Join-Path $env:TEMP ('emp-'+[Guid]::NewGuid()); New-Item -ItemType Directory -Force $empty | Out-Null; robocopy $empty '<worktree-path>' /MIR | Out-Null; Remove-Item -Recurse -Force $empty"
|
|
131
|
+
```
|
|
132
|
+
⚠️ **hook 误判规避**:不要把 `robocopy ... /MIR` 和 `Remove-Item` 写在同一条命令的参数位——PreToolUse hook 会把 `/MIR` 误判为 `Remove-Item` 的受保护路径(报 "system path '/MIR' is blocked")。若遇此误判,按工具失败恢复策略**拆成两条命令**分别执行,不要重复同一条失败命令。
|
|
133
|
+
|
|
134
|
+
3. **目录清空后删空目录本身**(用 .NET,规避 Remove-Item 对系统路径的 hook 拦截):
|
|
135
|
+
```powershell
|
|
136
|
+
powershell.exe -Command "[System.IO.Directory]::Delete('<worktree-path>', $true)"
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
4. **ExitWorktree 工具限制**:`ExitWorktree(remove)` 只删由 `EnterWorktree` 创建的 worktree。若本会话进入的是已存在 worktree(由 `harness-run` 创建),工具会拒绝删除。此时用 `action:keep` 返回主仓库,再按上述 1-3 步手动清理。
|
|
140
|
+
|
|
141
|
+
5. **清理后更新 `meta/worktree.json`**:置 `created=false` + 追加 `removedAt`/`removedBy`/`removalNote`,记录产出保留待 `/harness-archive`。
|
|
142
|
+
|
|
143
|
+
> 含 `$`/`[Guid]`/`@{}` 的复杂命令建议写入 `scripts/*.ps1` 后 `-File` 执行,避免内联转义问题(参见 `../protocols/powershell-protocol.md`)。
|
|
144
|
+
|
|
145
|
+
## 工作树 clean + 已有 wip commit 场景
|
|
146
|
+
|
|
147
|
+
若进入 `/harness-submit` 时工作树已 clean(`git status --porcelain` 为空),且 run/test 阶段已做 wip commit(HEAD 已是本次变更的提交),则:
|
|
148
|
+
|
|
149
|
+
- 步骤 1(合并最新代码):按无 upstream / 远端无新提交判定 N/A,在执行日志记录理由。
|
|
150
|
+
- 步骤 5(commit-message.txt + `git commit -F`)N/A:无可暂存 diff,无新 commit 需生成。执行日志标注 `commit-message.txt / git commit -F: N/A(工作树 clean,无新 commit;N 个 wip 提交已存在,原样推送)`。
|
|
151
|
+
- 步骤 4(提交方式选择):固定三选项仍适用。但当 review 标了 RED 兼容性破坏等需人工确认项时,可在"commit + push"选项的描述中注明"并确认 <RED 项>",**不得新增第四选项**、不得临场拼复杂 blocking user confirmation 参数。
|
|
152
|
+
- push 仍按步骤 6:fetch 检查远端 → `git push -u`(无 upstream 则新建远端分支)→ 记录 pre-pull hash + final pushed hash。
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: harness-sync
|
|
3
|
+
description: Use when the user asks to synchronize, refresh, or validate Harness
|
|
4
|
+
metadata, adapters, remote knowledge ownership, instruction entrypoints,
|
|
5
|
+
config origins, or CodeGraph status.
|
|
6
|
+
---
|
|
7
|
+
<!-- generated by harness_deploy.py; core=ec59ac2389d9dce9; overlay=none; agent=pi; do not edit -->
|
|
8
|
+
# harness-sync
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
通过一个有界入口刷新 Harness Adapter 与元数据、检查远端知识职责和项目指令状态,并在当前命令输出中给出组件结果。`sync` 是维护命令,不是 change 生命周期阶段:不追加 change 事件、不调用 `events-sync`、不上传运行监控。`sync` 不直接改写 AGENTS/CLAUDE/CODEBUDDY 或规则;文档优化使用远端审计提案。
|
|
13
|
+
|
|
14
|
+
## Before running
|
|
15
|
+
|
|
16
|
+
读取 `reference.md`。`sync` 自身会在任何重操作之前完成能力握手;不要另起一个
|
|
17
|
+
`capabilities` 进程。工作流要求 `sync@2`、`rules-sync@1`、`rules-review@1`、
|
|
18
|
+
`knowledge-sync@3`、`codegraph-status@2`。`BLOCKED_CAPABILITY_MISMATCH` 属环境阻塞,
|
|
19
|
+
不得降级为手工拼接旧流程。
|
|
20
|
+
|
|
21
|
+
## Run
|
|
22
|
+
|
|
23
|
+
```powershell
|
|
24
|
+
npx hunter-harness sync --project <项目路径> --profile interactive --progress jsonl --json
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
CLI 负责 Python runtime 解析、Adapter 事务、远端知识职责、文档审计提示、map、指令图、配置来源、change 状态及 CodeGraph 证据汇总。禁止直接调用旧知识 Python 脚本,禁止使用固定 `HEAD~5`,禁止自动全量重建 CodeGraph。
|
|
28
|
+
|
|
29
|
+
只读诊断使用 `--check`(`--dry-run` 为兼容别名);它不得写 receipt 或投影。普通模式只允许执行用户请求的 Adapter 事务,不写入 `.harness/runtime/sync/`。长阶段的 heartbeat 写 stderr;stdout 只保留紧凑摘要。需要组件级证据时显式加 `--verbose`;`reportPath` 和 `reportSha256` 固定为 `null`。
|
|
30
|
+
|
|
31
|
+
摘要中的 `remediations[]` 是稳定修复契约。先用对应 `previewCommand` 预览;低风险修复用
|
|
32
|
+
`--apply safe`,指定修复用 `--fix <id>`。需覆盖受管投影的修复必须同时提供 `--yes`,
|
|
33
|
+
并依赖 refresh 事务留下的 before snapshot;不允许绕过确认或无备份覆盖。指定修复时,
|
|
34
|
+
无关组件只做只读评估,不得顺带写入。
|
|
35
|
+
|
|
36
|
+
## Interpret
|
|
37
|
+
|
|
38
|
+
- `OK`:所有可验证组件通过。
|
|
39
|
+
- `ADVISORY`:例如需要运行中文指令审计提案;退出码仍为 0,且 `sync` 本身没有改写文档。
|
|
40
|
+
- `WARN`:存在过期、冲突、待评审或 `UNKNOWN` 证据;按组件的中文 `nextAction` 处理。
|
|
41
|
+
- `FAIL`:组件执行失败;不得宣称同步完成。
|
|
42
|
+
- `BLOCKED`:runtime、项目状态或能力契约阻塞;先修复阻塞条件。
|
|
43
|
+
- `UNKNOWN`:证据不足,不等于成功,也不触发无界重建。
|
|
44
|
+
|
|
45
|
+
非交互或 CI 使用 `--check --profile general --progress jsonl --json`。交互式运行若报告 `INSTRUCTION_AUDIT_REQUIRED`,运行 `hunter-harness instructions audit`;规则候选只进入提案,永不自动应用。
|
|
46
|
+
|
|
47
|
+
## 交互后续动作
|
|
48
|
+
|
|
49
|
+
交互式宿主支持选择器时,必须使用**多选复选框**,保持用户熟悉的勾选形式;只显示与本次非 OK 组件对应的选项,再附加“保持现状”。不要改成自由输入或普通编号问答。选项标题和说明优先使用通俗中文,机器原因码只放在技术详情中。
|
|
50
|
+
|
|
51
|
+
- **生成 Codebase Map**:仅在 `codebase-map` 缺失或过期时显示。说明它会扫描项目的技术栈、外部集成、架构、目录结构、编码约定、测试方式和风险,生成 `.harness/codebase/map/` 下的 `STACK.md`、`INTEGRATIONS.md`、`ARCHITECTURE.md`、`STRUCTURE.md`、`CONVENTIONS.md`、`TESTING.md`、`CONCERNS.md`,以及 `map-summary.md` 和 `map-manifest.json`;不会修改源码。
|
|
52
|
+
- **运行指令审计**:仅在 `rules` 需要审计时显示。说明服务端会结合项目类型、现有指令文档、Codebase Map 和近期变更生成中文优化提案,不会直接修改项目文档;用户审阅后才可显式应用。
|
|
53
|
+
- **检查 CodeGraph 后台同步**:仅在 watcher 未验证、停用或存在待同步源码时显示。若索引可用且待同步数为 0,应说明当前查询仍可用,检查 watcher 只是为了确认后续源码能否自动增量更新。
|
|
54
|
+
- **保持现状**:接受本次提示,不执行任何后续动作。
|
|
55
|
+
|
|
56
|
+
## Safety
|
|
57
|
+
|
|
58
|
+
同步不得直接修改项目指令文档或规则。配置真源与生成投影存在漂移时只报告,不静默覆盖真源。change 清理先 dry-run,仅对已验证归档收据执行安全清理。知识查询和 ingest 均为远端职责,不创建 `.harness/knowledge`。
|
|
59
|
+
|
|
60
|
+
无论结果如何,`sync` 都不写持久同步报告、不追加 change 事件、不调用 `events-sync`,也不上传监控;组件详情仅存在于本次 stdout。Adapter 事务本身的必要备份和回滚证据不属于 sync 日志,不得因此禁用。
|
|
61
|
+
|
|
62
|
+
## P0 执行可信度规则
|
|
63
|
+
|
|
64
|
+
- 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
|
|
65
|
+
- 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
|
|
66
|
+
- 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
|
|
67
|
+
|
|
68
|
+
## 生成内容语言约定
|
|
69
|
+
|
|
70
|
+
- sync/ingest 等生成的文档、规则、知识条目、架构说明一律**优先使用中文**撰写(标识符、命令、代码、API 字段名保持原文)
|
|
71
|
+
- 面向平台展示的标题/摘要/正文默认中文;仅当用户明确要求或目标系统强制时才用英文
|
|
72
|
+
> 片段:p0-trust
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: harness-sync 的能力契约、统一状态模型、报告收据和安全恢复参考。
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# harness-sync 参考
|
|
6
|
+
|
|
7
|
+
## 1. 能力握手
|
|
8
|
+
|
|
9
|
+
工作流 family manifest 声明 `minimumCliVersion` 和 `capabilities`。`sync` 在任何高成本
|
|
10
|
+
阶段之前自行核对版本与能力;Skill 不要再运行独立的 `capabilities` 子进程。缺失时返回:
|
|
11
|
+
|
|
12
|
+
```json
|
|
13
|
+
{
|
|
14
|
+
"status": "BLOCKED",
|
|
15
|
+
"reasonCode": "BLOCKED_CAPABILITY_MISMATCH"
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
不得通过直接运行内部脚本绕过该阻塞。打包 smoke 会从已发布 Skill 文档抽取所有 `hunter-harness` 命令,并验证安装后的 CLI 能力清单和 `--help`。
|
|
20
|
+
|
|
21
|
+
## 2. Python runtime
|
|
22
|
+
|
|
23
|
+
CLI 按以下顺序解析 Python,并在详细报告中记录来源:
|
|
24
|
+
|
|
25
|
+
1. `HUNTER_HARNESS_PYTHON`
|
|
26
|
+
2. 项目受管 runtime(`.harness/runtime/python`、`.venv`)
|
|
27
|
+
3. `uv run python`
|
|
28
|
+
4. Windows `py -3`
|
|
29
|
+
5. `python3`
|
|
30
|
+
6. `python`
|
|
31
|
+
|
|
32
|
+
所有探测都必须有超时。完全不可用时返回 `PYTHON_RUNTIME_UNAVAILABLE`,并跳过仍依赖 Python 的变更状态阶段;远端知识和指令审计不允许回退到本地 Python 实现。
|
|
33
|
+
|
|
34
|
+
## 3. 统一同步
|
|
35
|
+
|
|
36
|
+
交互式:
|
|
37
|
+
|
|
38
|
+
```powershell
|
|
39
|
+
npx hunter-harness sync --project <项目路径> --profile interactive --progress jsonl --json
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
CI/非交互式:
|
|
43
|
+
|
|
44
|
+
```powershell
|
|
45
|
+
npx hunter-harness sync --check --project <项目路径> --profile general --progress jsonl --json
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`--check` 是严格只读检查;`--dry-run` 是兼容别名。两者都不生成持久报告、receipt 或
|
|
49
|
+
投影。普通模式可以执行明确请求的 Adapter 事务,但同样不写持久同步报告。每个长阶段
|
|
50
|
+
通过 stderr 输出受限 heartbeat;stdout 默认只输出:
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"status": "WARN",
|
|
55
|
+
"runId": "<run-id>",
|
|
56
|
+
"components": {"ok": 7, "advisory": 1, "warn": 0, "fail": 0, "blocked": 0, "unknown": 0},
|
|
57
|
+
"versions": {
|
|
58
|
+
"cliVersion": "0.0.0",
|
|
59
|
+
"workflowBundleVersion": "0.0.0",
|
|
60
|
+
"adapterBundleVersions": {}
|
|
61
|
+
},
|
|
62
|
+
"remediations": [],
|
|
63
|
+
"reportPath": null,
|
|
64
|
+
"reportSha256": null
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
所有模式的 `reportPath` 和 `reportSha256` 固定为 `null`。只有显式 `--verbose` 才把每个
|
|
69
|
+
组件的 `status`、`reasonCode`、`observedAt`、`durationMs`、证据、是否自动修复及
|
|
70
|
+
`nextAction` 写到 stdout。`sync` 不写 `.harness/runtime/sync/`,不追加 change 生命周期
|
|
71
|
+
事件,不调用 `events-sync`,也不上传运行监控。
|
|
72
|
+
|
|
73
|
+
### 结构化修复
|
|
74
|
+
|
|
75
|
+
- `remediations[]` 含稳定 `id`、风险、写入范围、备份/回滚说明、预计耗时、是否需确认、
|
|
76
|
+
`previewCommand` 与 `applyCommand`。
|
|
77
|
+
- `--apply safe` 只执行低风险、无需确认的修复。
|
|
78
|
+
- `--fix <id>` 只执行该项;需要覆盖受管 Adapter 时必须加 `--yes`。
|
|
79
|
+
- 指定修复时,其他组件仍参与诊断但保持只读。
|
|
80
|
+
- Adapter 覆盖由 refresh 事务执行,before snapshot 位于最新 committed refresh
|
|
81
|
+
transaction;事务失败会自动回滚。预览永远不得产生写入。
|
|
82
|
+
|
|
83
|
+
## 4. 组件状态
|
|
84
|
+
|
|
85
|
+
| 组件 | 核心证据 | 失败/警告原则 |
|
|
86
|
+
|---|---|---|
|
|
87
|
+
| capability | CLI 版本、必需能力 | 不匹配立即 `BLOCKED` |
|
|
88
|
+
| adapter projection | 事务后的实际文件 hash | 使用 post-transaction 校验;partial refresh 不得把未选 adapter 标成 stale |
|
|
89
|
+
| knowledge | 远端职责声明 | 固定报告 `remote-only`、`fallback=false`、`localIndex=false`;不运行本地 ingest |
|
|
90
|
+
| rules | 审计—提案—应用契约 | `sync` 只给出 `instructions audit` 下一步,不改写文档或自动应用候选 |
|
|
91
|
+
| codebase map | manifest 文档清单、hash、生成时间 | 真实文件校验,不复用旧 display status |
|
|
92
|
+
| instruction graph | 入口、include 边、环、主题可达性 | 缺失引用或循环为 `FAIL` |
|
|
93
|
+
| config origins | canonical/projection 路径与 hash | 漂移 `WARN`,不静默覆盖 |
|
|
94
|
+
| changes | 五态分类及归档收据 | `INVALID`/`ORPHAN` 不自动删除 |
|
|
95
|
+
| CodeGraph | `codegraph status --json` 的 pending、数据库观察时间、watcher 可达性 | 输出 `CURRENT/PENDING/STALE/INDEX_PRESENT_UNVERIFIED/MISSING/UNKNOWN`;日志 mtime 只证明 watcher 活动,不证明索引完成;不自动全量 reindex |
|
|
96
|
+
|
|
97
|
+
全局状态优先级:`BLOCKED` → `FAIL` → `WARN` → `ADVISORY` → `OK`。任一 `UNKNOWN`
|
|
98
|
+
至少使全局结果为 `WARN`。远端知识可用性由实际 query/upload 收据判断,`sync` 不伪造本地 freshness。
|
|
99
|
+
|
|
100
|
+
## 5. Git 与 CodeGraph
|
|
101
|
+
|
|
102
|
+
增量基线只使用当前分支的 upstream merge-base;没有 upstream 时仅收集当前 HEAD 和有界文件统计。不得读取旧 `.harness/runtime/sync/last-success.json`,也禁止固定使用 `HEAD~5`。
|
|
103
|
+
|
|
104
|
+
CodeGraph 状态探测优先读取 `codegraph status --json` 的权威 pending 列表;只有该 API
|
|
105
|
+
不可用时才退回受限文件扫描,并把来源标成 `database-scan` 或 `unverified`。`.agents/`、
|
|
106
|
+
`.cursor/`、`.claude/` 等 Adapter 投影和 Markdown 文档不计入源码 pending。daemon log
|
|
107
|
+
mtime 只写入 `watcherObservedAt`,不能冒充 `indexObservedAt`。服务可达、watcher 已启用
|
|
108
|
+
且权威 `pendingFileCount=0` 时为 `CURRENT`。如果 API 不可用,但本地索引存在且受限扫描
|
|
109
|
+
确认 `pendingFileCount=0`,返回 `ADVISORY / INDEX_PRESENT_UNVERIFIED`:索引仍可用于查询,
|
|
110
|
+
只是无法证明 watcher 正在持续运行。存在待同步源码,或已确认 watcher 停用/服务不可达,
|
|
111
|
+
才返回 `WARN`。不要在 sync 内执行全量索引。
|
|
112
|
+
|
|
113
|
+
## 6. Instruction graph
|
|
114
|
+
|
|
115
|
+
只验证当前已启用 Agent 对应的入口文档及其引用图,而不是固定要求所有 Adapter 文件:
|
|
116
|
+
|
|
117
|
+
- `AGENTS.md` 是共享入口,始终验证。
|
|
118
|
+
- 仅启用 Claude Code 时验证 `CLAUDE.md`。
|
|
119
|
+
- 仅启用 CodeBuddy 时验证 `CODEBUDDY.md`。
|
|
120
|
+
- Codex 和 Cursor 不要求额外生成 `CLAUDE.md` 或 `CODEBUDDY.md`。
|
|
121
|
+
|
|
122
|
+
- Claude 可单向引用 AGENTS,共享约束保持单一真源。
|
|
123
|
+
- 禁止 AGENTS 反向引用 CLAUDE 形成环。
|
|
124
|
+
- 最多读取 64 个文件、深度 8、总量 512 KiB。
|
|
125
|
+
- 入口可以很薄;主题只需通过引用图可达,不要求复制到每个入口。
|
|
126
|
+
|
|
127
|
+
## 7. Config origins
|
|
128
|
+
|
|
129
|
+
典型 canonical 来源位于 `docs/ai/harness/`,`.harness/config/` 为生成投影。报告同时给出两侧路径、hash、来源类型与 drift,不把投影误判成真源。
|
|
130
|
+
|
|
131
|
+
## 8. Change 五态与清理
|
|
132
|
+
|
|
133
|
+
- `ACTIVE`:合法活动变更。
|
|
134
|
+
- `ARCHIVED_LEFTOVER`:已由可验证 receipt 归档,但活动目录残留。
|
|
135
|
+
- `RECOVERABLE`:残留可安全隔离恢复。
|
|
136
|
+
- `ORPHAN`:缺少可信归档证据。
|
|
137
|
+
- `INVALID`:结构或收据不合法。
|
|
138
|
+
|
|
139
|
+
先预览:
|
|
140
|
+
|
|
141
|
+
```powershell
|
|
142
|
+
npx hunter-harness doctor --managed-blocks --json
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
change cleanup 由同步报告提供具体动作。只允许已验证的 `ARCHIVED_LEFTOVER` 进入删除路径;`RECOVERABLE` 只能移入隔离区;`ORPHAN`/`INVALID` 保持原状并提示人工处理。
|
|
146
|
+
|
|
147
|
+
## 9. 中文指令与规则提案
|
|
148
|
+
|
|
149
|
+
`sync` 只报告 `INSTRUCTION_AUDIT_REQUIRED`。需要优化时执行:
|
|
150
|
+
|
|
151
|
+
```powershell
|
|
152
|
+
npx hunter-harness instructions audit --json
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
服务端结合项目类型、现有文档、Codebase Map、近期变更总结和公开最佳实践生成中文提案。
|
|
156
|
+
提案先保存到 `.harness/state/local/instruction-proposals/`,项目文件保持不变。审阅后显式执行:
|
|
157
|
+
|
|
158
|
+
```powershell
|
|
159
|
+
npx hunter-harness instructions apply --proposal <proposal.json> --yes --json
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
应用必须校验基线 hash 并使用事务;文件在审计后变化则返回 `INSTRUCTION_PROPOSAL_STALE`。
|
|
163
|
+
近期变更中的经验只形成 rule candidates,`instructions apply` 也不得自动写入这些候选。
|
|
164
|
+
|
|
165
|
+
## 10. 完成判定
|
|
166
|
+
|
|
167
|
+
只有以下条件同时满足才能宣称同步成功:
|
|
168
|
+
|
|
169
|
+
- stdout 摘要完整给出全局状态;使用 `--verbose` 时包含组件结果;
|
|
170
|
+
- 没有 `FAIL` 或 `BLOCKED`;
|
|
171
|
+
- 所有自动修复均有 post-transaction 证据;
|
|
172
|
+
- knowledge 组件明确为 remote-only,且未创建或刷新本地索引;
|
|
173
|
+
- 文档和规则组件未直接改写项目文件;
|
|
174
|
+
- 未写持久 sync 报告、change 事件或监控上传记录;
|
|
175
|
+
- 未把 `UNKNOWN` 描述成已验证;
|
|
176
|
+
- 第二次无输入变化的运行不产生投影 churn。
|