Learn from consequences, not instructions — generate and enforce constraints from experience
Unified skill for constraint generation, pre-action checking, circuit breaker management,
and constraint lifecycle. Consolidates 7 granular skills into a single enforcement system.
Trigger: 行動前∨閾値到達 (pre-action or threshold reached)
Source skills: constraint-generator, circuit-breaker, emergency-override, constraint-lifecycle, constraint-versioning, positive-framer (partial), contextual-injection (partial)
CODEBLOCK0
Dependencies: leegitw/failure-memory (for eligibility data)
CODEBLOCK1
Standalone usage: Requires failure-memory for constraint generation from observations.
For full lifecycle management, install the complete suite (see Neon Agentic Suite).
Data handling: This skill operates within your agent's trust boundary. When triggered,
it uses your agent's configured model for constraint checking and generation. No external APIs
or third-party services are called. Results are written to output/constraints/ in your workspace.
Instructions get ignored. Rules get forgotten. Documentation goes unread. This skill takes a different approach — constraints generated from actual failures:
R≥3 ∧ C≥2)The insight: A constraint born from "this actually broke" carries more weight than "this might break." Consequences teach better than instructions.
CODEBLOCK2
| Command | CJK | Logic | Trigger |
|---|---|---|---|
| INLINECODE3 | 検査 | action→constraints[]→pass∨block | Next Steps (auto) |
| INLINECODE4 |
/ce status | 状態 | active[], circuit∈{CLOSED,OPEN,HALF} | Explicit |
| /ce override | 上書 | constraint→bypass(temp), audit.log++ | Explicit |
| /ce lifecycle | 周期 | state∈{draft→active→retiring→retired} | Explicit |
| /ce version | 版本 | constraint→v++, history.preserve | Explicit |
| /ce threshold | 閾値 | user∨context→custom_threshold | Explicit |
| Argument | Required | Description |
|---|---|---|
| action | Yes | Action to check against constraints |
| --severity |
critical, important, minor (default: all) |
| Argument | Required | Description |
|---|---|---|
| observation | Yes | Observation ID or pattern to generate constraint from |
| --force |
| Argument | Required | Description |
|---|---|---|
| --circuit | No | Show circuit breaker status only |
| --active |
| Argument | Required | Description |
|---|---|---|
| constraint | Yes | Constraint ID to override |
| reason |
| Argument | Required | Description |
|---|---|---|
| constraint | Yes | Constraint ID |
| state |
draft, active, retiring, retired |
| Argument | Required | Description |
|---|---|---|
| constraint | Yes | Constraint ID |
| --bump |
major, minor, patch (default: minor) |
| Argument | Required | Description |
|---|---|---|
| --R | No | Custom recurrence threshold (default: 3) |
| --C |
Configuration is loaded from (in order of precedence):
.openclaw/constraint-engine.yaml (OpenClaw standard)CODEBLOCK3
Observation becomes eligible for constraint when:
CODEBLOCK4
| Criterion | Meaning |
|---|---|
| R≥3 | At least 3 recurrences |
| C≥2 |
Constraints are automatically reframed positively:
| Negative | Positive |
|---|---|
| "Don't commit without tests" | "Always run tests before commit" |
| "Don't push to main directly" |
CODEBLOCK5
CODEBLOCK6
| State | Meaning | Behavior |
|---|---|---|
| CLOSED | Normal operation | Constraints enforced |
| OPEN |
| Severity | Threshold | Window |
|---|---|---|
| CRITICAL | 3 violations | 30 days |
| IMPORTANT |
CODEBLOCK7
CODEBLOCK8
CODEBLOCK9
CODEBLOCK10
CODEBLOCK11
| Condition | Behavior |
|---|---|
| Invalid sub-command | List available sub-commands |
| Constraint not found |
After invoking this skill:
| Condition | Action |
|---|---|
| Constraint generated | Add to output/constraints/draft/, notify user |
| Constraint activated |
output/constraints/active/ |output/hooks/blocked.log, explain why |This skill reads/writes:
CODEBLOCK12
What this skill accesses:
.openclaw/constraint-engine.yaml and INLINECODE26.learnings/ directory)output/constraints/ and INLINECODE29What this skill does NOT access:
What this skill does NOT do:
Dependency note:
This skill reads observation data from failure-memory skill's workspace (.learnings/).
Install leegitw/failure-memory for full constraint generation functionality.
Without failure-memory, constraint generation will have no observation data to process.
Audit logging:
Override actions are logged to output/hooks/blocked.log for audit purposes.
Logs are stored locally in the workspace only.
/ce check validates action against active constraints/ce check blocks when constraint violated, shows reason/ce generate creates constraint from eligible observation/ce generate applies positive reframing/ce status shows circuit breaker state and active constraints/ce override creates temporary bypass with audit log/ce lifecycle transitions constraint through states/ce version increments constraint version preserving history该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 constraint-engine-1776419982 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 constraint-engine-1776419982 技能
skillhub install constraint-engine-1776419982
文件大小: 4.92 KB | 发布时间: 2026-4-17 20:21