| name | harness-candidate-pr-loop |
| description | Run the full candidate harness cycle: worktree isolation, invariant validation, benchmarking, comparison, artifact generation, and draft PR preparation.
|
harness-candidate-pr-loop Skill
Purpose
Execute the full slow-loop candidate cycle without merging anything:
create worktree → apply bounded plan → validate invariants → benchmark baseline/candidate → compare → record artifacts → prepare PR
Steps
- Create an isolated candidate worktree with
worktree.py.
- Apply the reviewed
MutationPlan in that worktree only.
- Run invariant validation:
python ${CLAUDE_PLUGIN_ROOT}/scripts/harness_core/validate_invariants.py \
--harness-dir $CLAUDE_PROJECT_DIR \
--mutation-plan ${CLAUDE_PLUGIN_ROOT}/state/mutation-plan.json
- Run baseline and candidate benchmarks with
benchmark_runner.py.
- Compare them with
compare_candidates.py.
- Persist the decision in
harness-run-ledger.sqlite.
- Render
HARNESS_EVOLUTION_STATE.md, OPEN_BREAKS.md, and the PR body template.
- Optionally open a draft PR with
gh pr create.
Hard Stops
- Never merge or auto-merge.
- Abort if held-out regressions appear.
- Abort if invariant validation fails.
- Abort if worktree isolation is not active.
Required Artifacts
${CLAUDE_PLUGIN_ROOT}/state/mutation-plan.json
${CLAUDE_PLUGIN_ROOT}/state/harness-report.json
${CLAUDE_PLUGIN_DATA}/harness-run-ledger.sqlite
${CLAUDE_PLUGIN_DATA}/run-artifacts/