harness-rule-enforce

Promotes approved prose rules into enforced lint, test, or gate-metric checks via dispatchable tickets.

Updated Jul 29, 2026
One-click install
npx skills add https://github.com/MaiconGambini/opencode-harness-guide --skill harness-rule-enforce-maicongambini
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: harness-rule-enforce
Source: https://github.com/MaiconGambini/opencode-harness-guide/tree/main/skills/harness-rule-enforce
Command: npx skills add https://github.com/MaiconGambini/opencode-harness-guide --skill harness-rule-enforce-maicongambini

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams accumulate prose conventions in a learned-rules ledger that are never mechanically enforced, so violations recur and reviews repeat the same findings. This Skill turns an operator-approved prose rule into a real enforcement lane without anyone hand-editing lint configs out of band. ## Core Features & Use Cases - Mechanical checkability triage: Classifies each ledger rule as lint, test, gate_metric, or permanently prose, and excludes judgement-only rules from the enforced_fraction denominator. - Tracer-bullet ticket emission: Outputs a standard ticket owning exactly the lint config plus a fixture, verified by the project's existing lint command discovered by harness-startup-path. - Fail-first acceptance: Requires a fixture from provenance.source_findings that fails before the rule exists and passes after, so enforced_fraction counts only real enforcement. - Use Case: A ledger rule says "no bare except" with enforcement set to prose. The skill classifies it as a lint rule, emits a ticket owning the Ruff config and a violating fixture, and the scheduler lands it through the normal lane flow. ## Quick Start Promote the approved prose rule from the learned-rules ledger into an enforced lint check by emitting a tracer-bullet ticket for the fixer lane.

Frequently Asked Questions about harness-rule-enforce

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I turn a prose coding convention into an enforced lint rule?

Triage whether the rule is mechanically checkable, then emit a tracer-bullet ticket whose ownership set is exactly the lint config plus a fixture reproducing the violation. The scheduler dispatches it as a normal lane and the existing lint command verifies it.

What kinds of rules can be mechanically enforced?

Structural or import-shape rules, forbidden APIs or patterns, and file placement rules map to lint; behavioural invariants map to contract tests; numeric thresholds map to gate_metric. Genuine judgement calls stay prose permanently.

Does this skill edit the lint configuration or ledger directly?

No. It only emits a ticket; the fixer lane authors the rule, and the scheduler writes the ledger's enforcement field and config pointers in the rulebook commit after operator confirmation.

What happens if a rule cannot be checked without false positives?

The lane returns blocked: not mechanically checkable, and the ledger records enforcement as prose with prose_permanent set to true and the reason. No noisy rule is shipped, since a disabled linter is worse than prose.

Why must the promotion fixture fail before the rule exists?

Fail-first evidence proves the check actually catches the recorded violation rather than being a vacuous rule. The fixture is drawn from provenance.source_findings, fails before the rule exists, and passes after.