LaunchKit · 2026
Back to Skills

constraint-engine

Learn from consequences, not instructions — generate and enforce constraints from experience.

0
0 downloads
by @leegitw

Setup & Installation

openclaw skills install @leegitw/constraint-engine

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install constraint-engine

What This Skill Does

Generates and enforces behavioral constraints derived from observed failures rather than predefined rules. Uses a circuit breaker pattern (CLOSED/OPEN/HALF-OPEN) to block actions that violate active constraints. Consolidates constraint generation, checking, lifecycle management, and versioning into one system.

Constraints derived from actual failures have higher adoption than manually written rules because they carry concrete consequences as evidence.

When to use it

  • Blocking a deployment when code review approval is missing
  • Auto-generating a 'run tests before commit' rule after repeated CI failures
  • Auditing emergency constraint overrides during incident response
  • Retiring outdated constraints after 90-day review cycles
  • Checking staging actions against active constraints before promotion to production

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: check if I can deploy to production

AGENT
  1. 1Run /ce check 'deploy production' against active constraints
  2. 2Identify CON-20260212-005 requires code review approval before production deployment
  3. 3Determine constraint severity is CRITICAL and review approval is absent
  4. 4Block the action and log to output/hooks/blocked.log
  5. 5Surface the violated constraint with override instructions
OUTPUT

[CHECK BLOCKED] deploy production — Constraint CON-20260212-005 violated: 'Always get code review approval before production deployment'. Run /ce override CON-20260212-005 "reason" to bypass with audit trail.