| name | harness-transformer |
| description | Convert a deterministic HarnessDiagnosis into a bounded MutationPlan JSON. Use when mutation pressure is high enough that the harness should propose candidate changes, but do not apply those changes yet.
|
harness-transformer Skill
Purpose
Turn diagnosis findings into a small, reviewable MutationPlan using only the
allowed mutation classes defined by the plugin invariants.
Trigger
Use this skill after harness-analyzer when:
mutation_pressure >= 0.30
- any
critical or high finding is marked mutation_candidate: true
- the user asks for a bounded harness mutation plan
Steps
- Load the latest
HarnessDiagnosis JSON.
- Run:
python ${CLAUDE_PLUGIN_ROOT}/scripts/harness_core/transformer.py \
--diagnosis ${CLAUDE_PLUGIN_ROOT}/state/harness-report.json \
--json-output ${CLAUDE_PLUGIN_ROOT}/state/mutation-plan.json
- Validate the emitted plan:
python ${CLAUDE_PLUGIN_ROOT}/scripts/harness_core/validate_invariants.py \
--harness-dir $CLAUDE_PROJECT_DIR \
--mutation-plan ${CLAUDE_PLUGIN_ROOT}/state/mutation-plan.json
- Summarize:
- patch count
- permission widening flag
- top target paths
- rollback path
- generation mode (
rule_based vs llm_assisted)
Constraints
- Do not apply the patch plan directly.
- Do not emit mutation types outside the schema allowlist.
- If
permission_widening: true, surface the rationale explicitly.
- LLM assistance is advisory only and must be post-validated by deterministic schema and invariant checks.
- If LLM refinement is unavailable or invalid, keep the rule-based candidate plan.
Next Skill
Route to harness-candidate-pr-loop only after invariant validation passes.